IRC channel logs

2024-05-14.log

back to list of logs

<ano>is there a way to expand/eval opt arg default value on definition?
<old>ano: You mean like (define* (foo #:key (bar (buz)))) would call (buz) when defining foo?
<ano>e.g. (eval '(define* (FUNC #:optional (ARG (make-hash-table))) (...)) (interaction-environment))
<old>ano: (let ((table (make-hash-table))) (define* (FUNC #:optional (ARG table)) ...))
<ano>yep
<dthompson>hmmm... curious if anyone else can reproduce the following:
<dthompson>open a repl and evaluate: #123
<dthompson>does the repl hang? does interrupting with C-c crash the repl?
<jobol>dthompson, here it hangs but C-c doesn't crash, just interrupt (Guile 3.0.8)
<dthompson>I discovered this because I meant to do #x123 and forgot the x
<mwette>C-cC-c generates 'User interrupt' and prompt returns. C-d generates 'unexpected end of input ...'
<lloda>this is array syntax
<lloda>it's waiting for the rest
<lloda>e.g. try #123()
<dthompson>ah forgot about array syntax
<dthompson>ACTION doesn't use arrays
<dsmith>sneek, botsnack
<sneek>:)
<dsmith>!uptime
<sneek>I've been faithfully serving for one month and 6 days
<sneek>This system has been up 9 weeks, 31 minutes
<chrislck>sneek: botsnack
<sneek>:)
<KE0VVT>Is sneek written in Guile?
<dsmith>Some. It's bobot++ with guile extensions. The old sarahbot from #scheme ported to Guile
<chrislck>sneek: (eval-string "help i'm stuck in a scheme factory")
<chrislck>drats...
<sneek>ACTION looks at chrislck accusingly ...
<RavenJoad>Does Haunt already have a built-in way to generate id anchors for headings from commonmark? For example, "# Heading 1" in markdown converts to <h1 id="heading-1"> in HTML? Or is this a question that should be directed towards guile-commonmark?
<dthompson>RavenJoad: is that part of the commonmark spec? if so that would be a guile-commonmark question. otherwise, I'd say to make this happen you'll want to post-process the sxml tree to add ids.
<RavenJoad>From quickly reading the commonmark spec (and searching for id=), it does not look like it. Commonmark only says that the "# heading" produces <hn>.
<RavenJoad>I was just checking that Haunt does not already have this function present, because I have ended up producing some functions on my own that Haunt ended up having.
<old>Regarding Typed-Schemed, I wonder if while adding type to variable, if qualifiers and/or attributes could also be used. For example, a `mutable' qualifier could be introduced to ensure that only mutable variable can be used in set! forms
<dthompson>RavenJoad: yeah nothing built-in for it
<RavenJoad>dthompson: Ok. Just to confirm, I just need to define a transformation function accepting a post and returning sxml, and install into #:post-template, right?
<dthompson>yeah that's one option. the other option is to make a new reader that is a wrapper around the commonmark reader that does the post processing.
<dthompson>up to you. put it where you want it.
<RavenJoad>I'll probably just go down the function route. It feels like the SXML will be easier to match against.