IRC channel logs


back to list of logs

<dsmith>There used to be a guile benchmark site. Lots of graphs, like 60. A datapoint for each commit.
<dsmith>Anyone remember that? Is it still active?
<sneek>Yey! chrislck is back
<Aurora_v_kosmose>Why exactly is this (library (test) (export uwu) (define (uwu) (display "hewwo"))) invalid as file contents?
<Aurora_v_kosmose>If I go by what's shown in the R6RS document, it should just work.
<dsmith>What is the error?
<Aurora_v_kosmose>dsmith: If you mean for my library thing? -> /tmp/test.scm:1:0: source expression failed to match any pattern in form (library (test) (export uwu) (define (uwu) (display "hewwo")))
<dsmith>Aurora_v_kosmose, Hm.. I don't know. Never used r6rs style modules. I think most people don't.
<dsmith>Maybe there are some regressions?
<Aurora_v_kosmose>Apparently, in any case it serves well-enough for the argument I was having with someone. It doesn't even work anyway.
<dsmith>Maybe it needs a #!r6rs at the top?
<dsmith>Just a guess
<Aurora_v_kosmose>Wait, isn't the body supposed to be part of the library declaration according to R6RS?
<dsmith>Aurora_v_kosmose, I think it was the import that was missing
<dsmith>Yes, works with the define in or out of the library form, but NOT with the import form missing
<dsmith>I think the r6rs library stuff is just some macro magic that transforms into a regular old guile module.
<dsmith>Guessing that's why the define doesn't need to be inside the library form.
<Aurora_v_kosmose>That would make sense, though that's not exactly compliant.
<haugh>When I'm extending builtin macros, I often want to use a syntax literal to differentiate the extended behavior, but sometimes a literal would be indistinct (to the user) from a variable. For example, the first form provided to `receive' can be a variable. Now, a keyword can't be a variable, but keywords are considered invalid literals.
<haugh>Is there some other form that's considered a valid literal but an invalid variable?
<haugh>I'm not big on Racket but I seem to recall seeing keywords in their macros, e.g. their `for' loops. Can syntax-case be forced to accept keyword-shaped literals?
<haugh>Obviously there are less aggressive alternatives to tricking out the builtins.
<flatwhatson>haugh: you can match literal keywords in your syntax-case patterns
<haugh>flatwhatson, (syntax-case (#:k) (x #''x)) throws "invalid literals list in form" on 3.0.5
<flatwhatson>you don't need to add it to that list
<flatwhatson>they're self-quoting literals already, and can't be rebound
<haugh>Aha! It seems so obvious now. Thanks
<flatwhatson>you can match them as literals in the pattern, or as pattern variables which can be unpacked & checked with (keyword? (syntax->datum #'kw))
<haugh>...and then they could be converted into symbols and then syntax... hmmmm
<haugh>oh what fun it is to bikeshed on a simple AST
<ulfvonbelow>I see in scmsigs.c there's this comment: /* XXX - Silently ignore setting handlers for `program error signals' because they can't currently be handled by Scheme code. */
<ulfvonbelow>am I to take that to mean that currently it's not supposed to be possible to affect signal handling of any of those signals?
<ulfvonbelow>the reason I ask is because if so, that comment seems to be wrong. install_handler() is called right above it, before that switch is ever evaluated.
<ulfvonbelow>source: spent entire day trying to figure out why subprocesses I spawned kept randomly dying
<RhodiumToad>install_handler doesn't actually call sigaction()
<apteryx>meta: do we apply a procedure to its argument, or do we apply the argument to the procedure?
<wingo>the "you should be prepared to use-modules of srfi-13" language has been there since 2001
<old>apteryx: I think we say that arguments are evaluated and the function is apply on the arguments
<mirai>I think the procedure is what's being applied (to the arguments)
<dsmith>I also remember something about "fresh locations" being made for the arguments, and then the func/proc is applied to them.