IRC channel logs


back to list of logs

<manumanumanu>Where is the hygiene part of syntax objects? I am trying to introduce bindings in a procedure (not a define-syntax) into a syntax object directly, but it does't seem to work
<manumanumanu>Do I have to use define-syntax to get the hygiene
<manumanumanu>I know about generate-temporaries and all those, but they aren't pretty :D
<manumanumanu>oh... I can roll my own using gensym.
<paroneayea>moin moin
<civodul>taylan: bytestructures fails to build with Guile 2.0 with: "re-exporting local variable: cstring-pointer"
<civodul>does that ring a bell?
<civodul>i looked into it a bit but couldn't find any obvious issue
<paroneayea>wow, bytestructures is cool
<paroneayea>first time I actually looked at it ;p
<civodul>yeah it's pretty cool!
<cmaloney>pro-tip: Google tries to correct "guile exercism" as "guile exorcism" and that gets into some pretty wild territory. ;)
<paroneayea>wingo: if you're around and have time to talk about suspendable custom ports, give me a ping :)
<paroneayea>if not, a-ok!
<paroneayea>hi wingo !
<paroneayea>wingo: so my feeling from looking at the code is what I really need to do is add read_wait_fd and write_wait_fd stuff to custom ports
<wingo>i am thinking not fwiw
<paroneayea>ok :)
<wingo>if you look at ports-internal.h there is a scm_read and scm_write function
<wingo>which are used by the suspendable ports code
<wingo>right now custom binary ports bounce through C because the C code implements the shim between the R6RS and the Guile implementations of port implementations
<wingo>but to me it makes more sense if we can directly install the custom binary port read procedure as that scm_read member
<wingo>likewise for write
<wingo>and if we can't directly do that, the instead use a wrapper
<paroneayea>ok, how can this be done?
<paroneayea>wingo: and won't the custom binary port read/write procedures still need to "hand over" a file descriptor to the scheduler?
<wingo>change make_custom_binary_input_port (and _output_port, and _input_output_port) to initialize the "scm_read" and "scm_write" members of the port type
<wingo>maybe that won't work, dunno...
<wingo>anyway yes you do need to implement read_wait_fd and write_wait_fd as well :)
<wingo>but you also need to cause the read and write functions to return -1 when/if they would block
<paroneayea>got it, ok
<paroneayea>so in the case of the https wrapper
<wingo>maybe that's sufficient though and you don't need them implemented in scheme?
<wingo>so you could be right there
<paroneayea>it would want to check the read and write from the parent port?
<paroneayea> here's what I started with
<paroneayea>haven't actually tested running it at all ;P
<wingo>i guess i was thinking of the case where a custom binary input port itself wraps another port
<paroneayea>yes and in fact that's what the gnutls / https port does
<janneke`>paroneayea: what a great talk, enjoyed it very much, thanks!
<paroneayea>janneke`: :)
<janneke`>they're taking maxwell's equations a lot further than i am, still it feels as the same inspiration
<paroneayea>I also like their use of the pattern matcher in the metacircular evaluator
<paroneayea>much easier to read than SICP's
<paroneayea>also, using the lambda for the environment was pretty brilliant
<paroneayea>I also think their demo of that UI that automatically generates code is pretty cool, though I'm not sure how we could do such a thing for auto-generating guile code that's in a real, large project
<janneke`>yes -- and i even learned about (guard in pmatch :-D
<janneke`>"test driven development", like it a lot
<paroneayea>it would be nice to have a future where emacs + geiser could try to generate the right code for you in the background while you hack ;)
<paroneayea>or validate it
<janneke>it's both terribly inspiring and scary
<paroneayea>but I'm thinking of a project the size of guix or even pubstrate it would bring such a thing to its knees
<paroneayea>also hopefully it doesn't have any procedures with system side effects like delete-file that it goes and tests out ;)
<janneke>how often haven't i had code that passed a, b and failed c
<janneke>upon change, passed a and c, faied b
<paroneayea>wingo: okay, I'll look into this and try to get things working during this week
<paroneayea>thanks for your advice :)
<paroneayea>so my rough outline on how to do it:
<paroneayea> - add scm_read and scm_write to custom_binary_port and associated methods
<paroneayea> - add read_wait_fd and read_write_fd to custom_binary_port and associated methods
<paroneayea> - turn make-custom-i/o-port type methods into a procedure in scheme that takes keyword arguments for the (read/write)_wait_fd and scm_(read/write) slots
<paroneayea> - profit???
<wingo>so my first point might have been wrong. i do not know.
<wingo>sorry, all this stuff gets confusing
<wingo>there are two general options. one is, if this port is always operated on from scheme, *and* you arrange for it to implement the read/write functions via the scm_read / scm_write members and not the c_read/c_write --
<wingo>then in that case, the read/write functions written in scheme can themselves use suspendable ports, transparently blocking.
<wingo>the second option is to change the read/write functions to allow them to return -1 when they would block, and in that case you implement the read_wait_fd / write_wait_fd methods.
<wingo>i suspect the latter is going to be easier but i don't know
<paroneayea>ok, got it I think :)
<wingo>godspeed :)
<paroneayea>I'm going to have a weird call today where I say "yeah I could have had the stuff up today but I need to extend my language"
<paroneayea>there may be a downside to trying to advance all my causes at once in an intermingled way ;)
<paroneayea>but "sometimes when you're on the bleeding edge, you're bleeding"!
<paroneayea>wingo: thanks for the help, I'm feeling confident it can be done :)
<paroneayea>wingo: I feel like I've been asking a lot of questions lately, I hope you don't mind. at least though, I think they're so I can advance things that I think are also in your interest! I hope that makes it a bit better :)
<wingo>np don't apologize :)
<wingo>i don't mind the questions, just that i don't always have time to answer
<paroneayea>ACTION nods
<paroneayea>I def understand how that is / can be
<cmaloney>Please consider upvoting this card so UNIXStickers will consider making Guile stickers.
<rain1>hello #guile :)
<paroneayea>hi rain1
<francisv>Hi. I want to find out what are the most common words in the subject of my email account. Googling I have that mu-guile makes possible to do all kind of statistics ( I don't know Guile, so I wonder whether the learning curve for such task is worth it? I cannot find any example for finding word frequency in Guile, but I can find a many examples in Phyton and other scripting languages.
<francisv>Could somebody point me to some sources where I can learn on how to get the most frequent words in a text? I would use mu4e to analyze the text of the subjects of my email account.
<quigonjinn>francisv: look at section 9.4
<francisv>quigonjinn: oh yes! something like this I was looking for.
***Fuuzetsu_ is now known as Fuuzetsu
<taylan>sneek: later tell civodul I'm almost sure that was fixed upstream
<sneek>Will do.
<taylan>sneek: later tell civodul see the comment explaining the workaround at the start of $repo_root/bytestructures/guile.scm: if you have this version but still have problems, please notify.
<sneek>Got it.
<taylan>sneek: botsnack