IRC channel logs

2017-01-18.log

back to list of logs

***nalaginrut_ is now known as nalaginrut
<nalaginrut>I can't believe that nowadays we still use TCL in dejagnu, why not a Guile unit test framework?
<roelj>I have the following `(div ,(vlist-for-each (lambda (pair) `(div ...)) my-vlist-items)). (vlist-length my-vlist-items) returns 2. But only one <div> is created eventually.
<roelj>Why is that?
<davexunit>roelj: for-each doesn't return anything
<davexunit>*-for-each procedures iterate over the collection for side-effects
<roelj>davexunit: That's what I'm trying to do (I think), I want to have it insert the `(div ...) part into the existing quasiquote.
<roelj>Oh.. I could use vlist-map instead to have it return the values in a new vlist.
<davexunit>neither of those approaches will have the desired result
<davexunit>I'm saying that for-each returns *nothing*
<davexunit>the `(div ...) in your example will not appear in the resulting list
<davexunit>it's returned from that lambda, but discarded because vlist-for-each doesn't care what that procedure returns
<davexunit>vlist-map will produce a new vlist
<davexunit>which is also not desirable because sxml->xml and other sxml procedures don't know what to do with that.
<davexunit>vlists aren't part of the sxml structure
<roelj>So, then wrap the resulting vlist in vlist->list, and you get a list, which is something sxml->xml can deal with..?
<davexunit>sure, that would work
<davexunit>I'm sure there's also vlist-fold that you can use to just make a list to begin with
<roelj>Aha
<roelj>I'm not sure how that would look like, but I'll experiment some more.
<roelj>Thanks!
<paroneayea>hello!
<OrangeShark>hello paroneayea!
<davexunit>yo
<paroneayea>heya OrangeShark, davexunit
<paroneayea>what is the haps this fine morning?
<davexunit>tired, mostly.
<dsmith-work>Wednesday Greetings, Guilers
<paroneayea>davexunit: so in addition to trying to find what's causing the --listen bug in guile 2.2, I'm wondering if, since 8sync supports nonblocking ports anyway, rather than using the polling coop-repl-server I should just run the repl server inside my own event loop
<paroneayea>wondering how insane an idea this is
<davexunit>paroneayea: 'read' will still block
<davexunit>but you could hack around that a bit
<paroneayea>davexunit: oh right
<paroneayea>hmmm
<davexunit>you could check, in a non-blocking way, if there's anything to read from the port
<davexunit>and then do a blocking read
<paroneayea>davexunit: that's true
<paroneayea>davexunit: hm, maybe a problem is that the code switches what the (current-module) is
<paroneayea>maybe that's not a problem though? I dunno
<paroneayea>I guess I should try it and see!
<davexunit>paroneayea: I have no idea if that's a problem or not, so just trying it out sounds good :)
<roelj>How can I (open-input-pipe ...) but then instead read from (current-error-port)?
<civodul>roelj: that's not possible
<roelj>How can I then read the output of a command that sends it to stderr?
<civodul>open-input-pipe uses 'sh -c command', so you could do (open-input-pipe "command 2>&1") i think
<civodul>not ideal i admit!
<paroneayea>yep
<paroneayea>davexunit: found the commit!
<paroneayea>206dced87 is the commit that breaks --listen
<roelj>civodul: Heh, good enough :)
<paroneayea>davexunit: I'll file a bug.
<paroneayea>filed a bug