IRC channel logs


back to list of logs

<daviid>anyone in ML? what do eople think of FANN?
<ArneBab>janneke: you have a client moving to Guile? Nice!
<ArneBab>sneek: later tell mwette: for me wisp is a usecase for additional languages in Guile. It allows me to have the features of Scheme with better readability for newcomers. Essentially a thin shell over Scheme, were the basic syntax of Scheme cannot accomodate to something.
<sneek>Got it.
<ArneBab>sneek: later tell mwette: another use case for additional languages in Guile is to be able to reuse domain specific work people did in other languages. For example being able to parse org-mode documents with real org-mode and get them as data into Guile programs.
<sneek>Got it.
<ArneBab>sneek: later tell mwette: I’m using org-mode as example, because it is essentially specified by its source — and so complex that you can’t just go and re-implement it. At the same time it is already being used as data-interchange format in Emacs.
<sneek>Will do.
<ngz>ArneBab: Its syntax is described in a separate document, though.
<ArneBab>ngz: oh, I did not know that. Thanks! Did anyone succeed in creating a full parser yet (that is not org-mode)?
<ngz>No, but it may be related to the fact that most people think it is only specified by its source :)
<jeko>Hi Guilers !
<jeko>Does someone know how to activate readline in my REPL (guile 2.2.4) ? With (use-modules (ice-9 readline)) I got no code for module (ice-9 readline)
<jeko>(guile installed with Guix)
<janneke>jeko: guix package -i guile-readline
<janneke>or somesuch, it's been split-out from the guile package in guix
<jeko>janneke: alright ! thank you
<brettgilio>That feeling when you've been lisping so hard lately, that you accidentally start replacing periods at the ends of sentences with closing parentheses.
<atw>brettgilio ☺ have you tried structural editing?
<sneek>Welcome back atw, you have 1 message.
<sneek>atw, ArneBab says: you’re right. I hope we can tackle that better and better with time. It feels like there are barriers to entry which prevent reaching the documentation which works pretty well — even offline.
<brettgilio>atw, Paredit ;)
<atw>I use it and love it! I don't type a lot of close-parens because I usually do C-M-n or some other navigation
<brettgilio>atw, I don't need to type them, they are automatically placed by my autosyntax, but for whatever reason I still end up typing them.
<brettgilio>unless there are several in a row
<hiphish>Hello everyone
<hiphish>I have a string with an escaped colon, e.g. "foo\\:bar", where the "\\" is the actual character.
<hiphish>What it the best way to replace the sequence "\\:" in a string with "\\"? It would be find if the string was mutated.
<hiphish>Sorry, meant to replace "\\:" with ":", i.e. "foo\\:bar" becomes "foo:bar"
<manumanumanu>hiphish: if you can stand it being slowish, combining string-tokenize and string-join
<manumanumanu>or wait... string-tokenize will also split :\\
<manumanumanu>hiphish: or if you just want to remove all backslashes in the string, you can use string filter
<manumanumanu>(string-filter #\\\\ "hej\\:hopp")
<manumanumanu>jesus christ, I can't end being wrong today: you want string-delete
<manumanumanu>(string-delete #\\\\ "hej\\\\:hopp") => "hej:hopp"
<hiphish>manumanumanu: But that will delete *all* backslashes, even those that are intentionally in the string.
<hiphish>Perhaps I should be more specific: I want to parse Unix path envrinment variables, like the format $PATH uses.
<hiphish>I have a PEG grammar which can split the string on unescaped colons: "asdf:qw\\:er" becomes "asdf" and "qw\\:er".
<hiphish>What I kneed is to also be able to unescape the escaped characters in the individual paths.
<hiphish>I got it, the pattern is (and (ignore "\\\\") ":"), this matches escaped colons, but only returns the colon itself.
<mwette>ACTION is looking into nyacc/javascript interpreter 2.0 => 2.2 issues: begin is now seq ; apply is now call ; apply+primitive is now prim-call
<chrislck>apologies can't reply back, please ping me - (define x (system "ls")) will make x=0 (the exit-code). anyone knows of way to intercept the "ls" output into a string? I can do (system "ls > /tmp/ls.txt") (call-with-input-file "/tmp/ls.txt") which is ugly...
<chrislck>ACTION chrislckaway
***chrislck is now known as chrislckaway
<manumanumanu>chrislckaway: I do this:
<manumanumanu>this uses the internal open-process from ice-9 popen. It returns three ports, in out and err. That way you can close input and output ports one at a time
<manumanumanu>chrislckaway: look at run/str, not run/lines (which requires my port->list)
<taylan>simplest way to get stdout as a string:
<taylan>(use-modules (ice-9 popen) (ice-9 textual-ports))
<taylan>(get-string-all (open-input-pipe "ls"))
<manumanumanu>taylan: that is however limited, since there is no way for you to close the output port without closing the output port, which is sometimes required when dealing with shell utilities
<manumanumanu>I don't know why open-process isn't exposed, since it strictly more powerful than popen
<ArneBab>manumanumanu: your tools look like they would be great additions to ice-9 popen.
<manumanumanu>port->list is useful, but I have thought about that. You can make it even more general: port-fold
<manumanumanu>oh, you mean run/str and those...
<manumanumanu>I think general procedures for ports should be available at least
<manumanumanu>port-fold, port->list
<manumanumanu>Good night!