IRC channel logs
2015-10-17.log
back to list of logs
<amz3>where is RMS lisp poem I can't find it <paroneayea>ACTION struggles his way through the church numerals exampel of sicp <paroneayea>(((add1 (add1 (add1 (add1 zero)))) (lambda (x) (format #t "hello ~s\\n" x) (+ x 1))) 0) <davexunit>the only thing I miss from Pelican is a syntax highlighter <davexunit>but Guile doesn't have a pygments equivalent. <davexunit>I feel like I should be able to fontify Scheme code without too much trouble <paroneayea>davexunit: you could shell out to pygments in the meanwhile <davexunit>paroneayea: welllll, I think I can write something that works for Scheme code, at least. <paroneayea>I wonder how much of scheme packages is porting other scheme languages' packages :) <davexunit>mario-goulart: how do I get the source to this egg? <davexunit>I'd like to see how long it is. I imagine it won't be terribly hard to port. <davexunit>like converting to SXML instead of to an HTML string <amz3>^ wants sxmlize the world :) <amz3>did you succeed at converting texinfo to sxml? <davexunit>yes, I didn't have to do anything because Guile comes with it built-in <davexunit>texinfo->stexi to read in the texinfo source <davexunit>then stexi->shtml to convert to HTML in SXML form <lfam>I don't know Guile or Scheme. I'm wondering how that is different similar to an if statement in an imperative language? <lfam>Um... "different similar". You get the point. <lfam>That's like a ternary conditional? <mario-goulart>Or, if you have chicken installed and don't care about VCS history, "chicken-install -r colorize". <davexunit>lfam: yes, if is an expression, not a statement. <lfam>In C it would be 'if 1 ? 1 : 2'. <davexunit>'when' is like 'if', expect it doesn't have an the "else" part of 'if' <davexunit>so, the next part is understanding this funny '@' syntax thing <davexunit>normally, you import guile modules to get access to the variables that they export <davexunit>but this is a short-cut way to pluck out a single variable from a module without explicitly importing it <davexunit>(@ (ice-9 regex) string-match) means "open the (ice-9 regex) module and get the value of the 'string-match" variable" <lfam>So, the #use-module lines at the beginning of the package definition are importing other modules? <davexunit>yes, that's part of the define-module syntax <lfam>That's pretty cool that you can pluck things out like that. <davexunit>it's a convenient short-hand to be used sparingly. <davexunit>in a build procedure like this is one such appropriate place. <davexunit>since build-side code is separated from the client-side code of this module. <lfam>What are the considerations to weigh when decided whether or not it is appropriate? <davexunit>if you're after a rule of thumb, I would say it's: don't use @ <amz3>I was wondering, so the lambda is executed daemon side, that's why the import must happen inside the procedure <lfam>davexunit: Haha, nice and simple. <davexunit>one of the lovely bits of Lisp shining through <davexunit>it's data to the client, it's code to the daemon. <lfam>If I wanted to learn enough to not have to stare at code blocks like that for an hour before I understand them, would reading the Guile manual be a good approach? <davexunit>lfam: perhaps the "Hello, Scheme!" chapter is worth reading <lfam>It didn't help in this case that there are several uses of the word "include" in different contexts. That made it harder :P <davexunit>lfam: for learning Scheme in general, I highly recommend both "The Little Schemer" and "Structure and Interpretation of Computer Programs" from MIT Press <amz3>there is not a lot actually when you look at it from the functional point of view <amz3>yeah, my tutorial is a quick read, you won't learn how to write scheme the good way <lfam>amz3: Wow, cool -> hypermove.net! I will give it a go and tell you my results. <lfam>The procedure index will be helpful. Part of the barrier is not knowing that it would be called "procedure index". <amz3>it's at the end of the manual <amz3>usually reference api are the end <lfam>amz3: That's true but in hypertext I find it very difficult to maintain a sense of linearity. I actually don't prefer hypertext at all for my first introduction to a subject. I find it more useful once I know my way around a little. <amz3>lfam: I'll gladely take feedback about the tutorial <lfam>amz3: It's one reason why I really prefer paper reference books until I really know what I am doing. <amz3>I agree, non linearity is an issue <amz3>I have the opposite problem, is that I can focus on long tutorial <lfam>amz3: hypertext is very useful but I feel like it is only 1/3 of the way to the next thing after books. Maybe I would feel differently if I learned to read with it. <amz3>little schemer, and the other in the serie, are more easy to read for me <lfam>I really like Socratic books like The Little Schemer. I will have to give it a go. <amz3>so you understood what I meant <lfam>Oh my point about hypertext is that I never think to "flip" to the end of hypertext like with a book. I just get lost. <amz3>that's what I like in non linear <amz3>well non linear that is self contained <lfam>Once I know what I am looking for, and how to ask questions, then hypertext is excellent. <amz3>scientific papers have this problem about being non linear too, kind of non linear <lfam>The problem is that the author has to set up the links so you rely on their associative abilities, and I think that is tricky. <amz3>associative ability to do what? <lfam>Scientific papers also suffer from some very unfortunate stylistic restrictions, if you ask me. It's okay to explain something more than once :) <lfam>I mean, when you are writing a hypertext manual, you have to think about what associations would be useful to the reader. I'm sure there are auto-linkers, especially when you generate your docs from source code. But still. <lfam>And then if everything is a link, you can't read the text. So some kind of auto-indexer that can be invoked on any word might be useful. I bet it exists already. <amz3>The content of the Guile manual is good, but it lakes "guides" kind of manual <amz3>In depends of the kind of writing, too many links kills the message <amz3>the tutorial, is a step by step, I don't forward link for instance <amz3>but sometimes, I don't explain fully a procedure because it will break the "background story" <lfam>That makes sense. I guess you could call the worst case a "Wikipedia-trance". Where you want to learn about one thing and you end up reading about many things because the links seemed interesting. <lfam>And then you have to check your browser history to remember why you began. <amz3>there is pdf version of reasoned schemer? <amz3>but almost all the book is available on google books <davexunit>weird macro transformers that aren't standard scheme that I need to figure out how to port. <ArneBab_>unknown_lamer: kde5… I didn’t yet try it, because … why rewrite the backend libraries every few years? They are now porting the applications… I’m pretty sure this will again leave some I need behind :( <ArneBab_>let’s hope they did not make the print applet even worse (losing the kde3 print applet was a real tragedy) <ArneBab_>unknown_lamer: does org-mode run in guile-emacs? <ArneBab_>unknown_lamer: wow… I should really try it again <unknown_lamer>you may also need eir guile branch, but maybe not. I finally lost track of guile development this year so the needed changes may very well be in master <unknown_lamer>no idea, I'm not cool enough to use guix and am still using sid ;) <ArneBab_>My guix doesn’t work again yet, but I’m trying :) <unknown_lamer>I want to use guix but ... work and hcoop are both Debian and I've been using Debian for literally half my life (ouch, turning 30 in a week) <unknown_lamer>I am officially set in my ways / I am spending my messing-with-rebellious-machine time on a home made 3d printer nowadays <ArneBab_>unknown_lamer: I only want Guix as per-user overlay right now <rekado>unknown_lamer you can use Guix on top of Debian. It won't interfere with your Debian programmes as it limits itself to writing to /gnu and /var/guix. <rekado>the guile-emacs package in Guix does have guile-for-guile-emacs as an input, which is taken from the patched branch. <amz3>there is german retention? that's new one <ArneBab_>pushed through while violating due process <amz3>rekado: you are typography nerd? <amz3>it's a not a question, it's a statment :) <amz3>I am mistaken reasoned schemer is not full at google books <amz3>I will resort to use a trick to be able to read the DRM file, via modern.ie VM, If i can't make sens of the source <davexunit>I've decided that the chicken colorize library is way too hairy to be worth porting <sneek>davexunit, you have 1 message. <davexunit>I'm going to write my own syntax highlighter <davexunit>can use parser combinator techniques, but specialized for this purpose <zacts>I still would love to see a guile-scheme based text editor <zacts>I know of guile emacs, but perhaps a simple one started from scratch <zacts>but utilizing the full features offered by guile, from the core of the editor design <zacts>I still want to make a guile based ed/ex-like clone <ArneBab_>zacts: did you try guile-emacs yet? I ran it once, but that was quite some time ago. <ArneBab_>zacts: what features would you want to use which guile-emacs does not use? <zacts>ArneBab_: I tried it once about 4 months ago <zacts>and it was unoptimized, and SLOW <zacts>ArneBab_: perhaps concurrency and more modular design and separation of pieces <zacts>also perhaps a separation from user interface code, and core editor code <zacts>and then glue it all together <amz3>Is there any particular things I should take care when using mutable set-car! and set-cdr! <zacts>I'm just setting up a weechat relay server <amz3>regading emacs vs guile-editor, I don't know which is the best way to go, but let's recognize that other editors were rewritten mostly from scratch with kind of some sucess <zacts>I'll probably start with a UNIX ed-like editor <zacts>and then I'll start towards more of a mini-emacs clone <amz3>there is a mini editor that was the subject of a small hack last year <amz3>integration between zile and guile <zacts>I thought zile was mainly lua <amz3>it was during the potluck <zacts>oh cool, I'll have to check it out <amz3>zile is a c library IIRC <zacts>I think zile is pretty modular <amz3>on top of which a lua editor is written <amz3>I tried to have a look at it <amz3>but well, my c kungfu is lacking <zacts>ACTION searches the zile page <zacts>I'm sure you could use a scheme FFI to interface with the zile lib <zacts>and then build scheme primitives on-top-of it <zacts>and then go pure scheme from there <amz3>it doesn't support utf-8 I think <amz3>that's a zile non-feature <amz3>you will also need to solve the GUI toolkit dilemma <amz3>or do you plan to use ncurse? <zacts>although, I may just implement a full editor from scratch <zacts>perhaps borrowing inspiration from things like zile <zacts>I would separate the GUI and UI from the core editor <amz3>you will need to the magic buffer interface anyway, it's done in zile, maybe you can fork it <zacts>so you could choose any GUI over it <zacts>I wouldn't be opposed to forking zile <zacts>(I would also need to improve my C knowledge too) <zacts>this sounds like a fun little future project <zacts>UTF-8 would be important to me <amz3>OT: I've ported GLL parser no2 to guile :D <amz3>once I fighted my fear of failing, I simply did what I do best: fiddle with code <amz3>I mean I have a working prototype <amz3>zacts: btw, I still think that forking emacs, is hard stuff <amz3>the rewrite vs improve the code is still a fuzzy problem for me but if you have fun go for it! <amz3>neat! GLL2 recursive parse is working!