IRC channel logs
2016-09-13.log
back to list of logs
<civodul>and i thought i knew (ice-9 format)... <iyzsong>oh, it's an undocumented feature? :-) <wingo>civodul: wow, new to me too :) <davexunit>I was bummed to learn that I can't make a keyboard with a lambda key without altering the keyboard layout on the machine that the keyboard is plugged into <davexunit>ACTION was hoping to make a keyboard with some features of the symbolics space cadet keyboard <paroneayea>davexunit: well, you could probably bind to some keycode and either use xmodmap or at least some emacs binding to make it a reality :) <davexunit>paroneayea: yeah, but it defeats my goal of having a keyboard that "just worked" like this <davexunit>my basic plan was to replace the left control key with a special function key, so that, say, the "L" key would insert a lambda or something <paroneayea>wow! typing that sentence just made me remember that geiser has a macro expand command. I forgot! <paroneayea>I'm going to be advocating for making all CR-blocking issues to be filed on ActivityPub <amz3`>There is a conversation about a free search engine over at HN <amz3`>they say they need 300€ per month to keep it running <amz3`>I think I abandon for the time being the idea of concept search and focus and making public a search engine... <janneke>how do i junk output from system invocation that's not under my control? <janneke>$ guile -c '(with-output-to-file "/dev/null" (lambda () (system "echo hallo")))' <DeeEff>I wrote this on my other client but I'm not sure it sent: <DeeEff>janneke: I believe you should be calling `$ guile -c '(my-command ...)' 2>&1 > /dev/null` <DeeEff>that said, if you want to keep messages on standard error omit the "2>&1" part <janneke>DeeEff...sure ehm; i want to get rid of system's output /within/ guile already <davexunit>you can also change what file descriptor STDOUT is <janneke>davexunit: that sounds great...i tried with-output-to-file and such... <davexunit>it changes the current output port parameter in guile <davexunit>you'll need to use the POSIX interface to change that <janneke>primitive-move->fdes or so i guess... thanks! <davexunit>I would fork, open /dev/null and set stdout (fdes 0 or 1, I always need to look it up) and exec <DeeEff>stdin is 0, stdout is 1, stderr is 2 <janneke>davexunit: hmm...the `system' call is done in another guile library that i don't want to change for now <davexunit>then you can change stdout, call the procedure, and then change it back to what it was before <DeeEff[m]>you could even write a macro for it if it's common <janneke>21:46:08 janneke@dundal:~/src/cuirass [env] <janneke>$ guile -c '(move->fdes (open-file "/dev/null" "w") 1) (system "echo foo") (move->fdes (current-output-port) 1) (system "echo bar")' <davexunit>add an abstraction with dynamic-wind and you are golden <janneke>i wanted to have (with-junk-output/error) for quite some time now :-) <DeeEff[m]>davexunit: a procedure would work, but this seems analogous to "call-with-x-port" vs "with-x-port" <DeeEff[m]>so a procedure that takes a thunk and a macro <davexunit>best to make a procedure with a thunk and then add sugar on top <davexunit>then you have programmatic and syntactic ways of using it <DeeEff[m]>I'd call it something like `(call-with-fdes fdes new-file thunk)` <DeeEff[m]>and then write a macro `(with-fdes fdes new-file body ...) <DeeEff[m]>maybe even `call-with-fdes-as` and `with-fdes-as` would be better. Anyways, it's a minor detail. <DeeEff[m]>Nah it's easy. Naming things _well_ is hard :D