IRC channel logs

2022-01-21.log

back to list of logs

<ArneBab>sneek: later tell vijaymarupudi thank you!
<sneek>Got it.
<chrislck>sneek: botsnack
<sneek>:)
<tohoyn>New debianized version 0.1.0v8-1 of G-Golf has been released. See https://www.iki.fi/tohoyn/g-golf-debian/.
<sneek>tohoyn, you have 1 message!
<sneek>tohoyn, daviid says: i just pushed another important fix, on the master branch ...
<tohoyn>New version 4.1.1-1 of Theme-D has been released. It includes bug fixes and a command line parser. See https://www.iki.fi/tohoyn/theme-d/.
<wingo>zap: (1) char-ready? just checks if there are bytes in the buffer or if select() returns true. for custom ports i don't know if the "select" logic carries through. so that's one thing
<wingo>the other is that select would return true if there's a byte but characters can be multibyte
<wingo>looking at the impl, custom binary input/output ports don't implement the "input_waiting" callback and so char-ready? always returns #t
<wingo>zap: so i am not sure exactly what to do, ideally also you want to be able to poll() on these ports... i think we never fully solved the fibers/suspendable-ports + custom ports issue
<wingo>does anyone else recall?
<civodul>wingo: didn't we get a custom port implementation in Scheme?
<wingo>civodul: iirc we got something really close. when you make a custom port, the read and write callbacks are present in both scheme and c (iirc)
<wingo>the c port implementation calls the c callbacks. the scheme version calls the scheme callbacks. they should do the same thing -- one should be the wrapper of the other iirc.
<wingo>so if you have suspendable ports installed (something we should ensure is always the case, in guile 3.2, if we can manage it), then there's no continuation barrier when reading from a port
<wingo>but, there is the input_waiting vtable method on ports which isn't implemented in scheme at all, and in practice is only implemented for fports, where it delegates out to a quick call to poll(2)
<wingo>again, iirc.
<wingo>unrelatedly, not sure if i shared this here -- this is a really nice article https://cfallin.org/blog/2021/03/15/cranelift-isel-3/
<wingo>& article series
<tohoyn>New version 0.9.9-1 of Theme-D-Golf has been released. It works with g-golf 0.1.0v8. See https://www.iki.fi/tohoyn/theme-d-golf/.
<wingo>civodul: sry to bother but i would try your test case with making the optimization keywords #f rather than simply removing them
<civodul>wingo: you mean adding #:kw #f to the front of the optimization alist?
<wingo>civodul: sure
<civodul>building's gonna take a while, but i can do that
<wingo>or otherwise not simply removing the #:kw #t from the list
<wingo>just worried that the optimization-level defaults were then taking precedence if the kw wasn't in the list at all
<civodul>yeah i can both remove and add to the front, for good measure
<civodul>my reading of the code was that it was okay
<civodul>but yeah, better be safe
<wingo>my reading of (language tree-il optimize) was the reverse; see line 82
<wingo>i could be misunderstanding your setup, of course
<civodul>oh right, i was looking at 'lookup' above, which does (and (assq-ref opts kw) ...)
<zap>hello!
<zap>wingo: thanks for the answer
<zap>I'm pretty lost in gnutls and guile ports now... :)
<dsmith-work>Happy Friday, Guilers!!
<zap>Hey dsmith-work!
<zap>Am I right in that if I set a port to be non-blocking with fnctl than select call should block on a port?
<civodul>zap: i think so
<zap>civodul: Then Im out of ways to check whether I can read a port :) Gnutls guile bindings have this session-record-port that is used to do reads and writes on tls socket. Its representation is soemething like #<input-output: xxx> and I can't coll select on it nor I can check fileno... But port? returns #t
<zap>The weird part is that when I run select on wrapped socket it blocks
<civodul>zap: ah wait, a session record port is not a file port, so it may be different
<civodul>session record ports do implement the input_waiting callback though
<civodul>(or whatever it's called)
<zap>char-ready? does work but it always returns #t so not very useful
<mwette>on MacPorts, when I "port install gnutls +guile" the guile extension does not get installed :( -- checking to see if it is built
<civodul>wingo: peak at 2.1 GiB resident this time, so no real difference it seems
<civodul>that's with current Guile "main"
<mwette>FYI, I filed a macport ticket for gnutls+guile: #64490
<Zambyte>Hi, does anyone know how to check if an optional parameter is defined in some C code? I tried using `if (scm_is_false(my_SCM_arg)) { ... not defined ...} else { ... is defined ...}` but that doesn't seem to work for me
<Zambyte>If I do that I get this error when I don't pass the argument: `uncaught exception: In procedure list-ref: Wrong type argument in position 1: #<undefined>`
<dsmith-work>Zambyte: Yes, there is a value SCM_{something}..
*dsmith-work looks
<dsmith-work>Zambyte: Pretty sure a missing optional parameter arrives as SCM_UNDEFINED in C code.
<Zambyte>dsmith-work: hmm, I just tried `if (scm_is_false(scm_eq_p(my_SCM_arg, SCM_UNDEFINED))) {...}` and I got the same issue
<Zambyte>I'm dumb, I had my condition backwards. It works now :D
<Zambyte>thanks!
<dsmith-work>Zambyte: Actually, you probably want SCM_UNBNDP(x)
<dsmith-work>Which is
<dsmith-work>#define SCM_UNBNDP(x) (scm_is_eq ((x), SCM_UNDEFINED))
<Zambyte>perfect, that works too
<dsmith-work>Cool
<bsima>say earlier I defined a function at the repl, how can i print the source of the definition i wrote?