IRC channel logs

2024-04-03.log

back to list of logs

<daviid>wingo: after e15617dc0e1e53a54798d88617f0095801a52f1c, make-c-struct is no longer in the manual, is this expected?
<daviid>wingo: there is a typo in the second paragraph of the definition of write-c-struct, which be 'Like read-c-struct above, ...' (not 'Like write-c-struct above, ...')
<Kolev>[Haunt] Why is index.html going to / and not /csh/? Code: https://codeberg.org/csh/personal-site
<wingo>daviid: that would be an error, tx for catch
<ArneBab>freakingpenguin: this looks like it could be a usecase for a reader-macro, so the code could be inserted without having to escape quotes ⇒ #:code #«puts "ruby code"»#. Something similar to #lang in racket, but with stronger encapsulation within Scheme. It might get hard to find a fitting reader macro prefix, though …
<freakingpenguin>ArneBab: Interesting. Is a reader macro the same thing as a reader extension?
<ArneBab>yes
<ArneBab>some basics: https://www.gnu.org/software/guile/manual/html_node/Scheme-Read.html ⇒ read-hash-extend
<ArneBab>here’s an example where I used that for ##: https://hg.sr.ht/~arnebab/wisp/browse/wisp-reader.w?rev=tip#L46
<ArneBab>another example is srfi-10: https://www.gnu.org/software/guile/manual/html_node/SRFI_002d10.html
<ArneBab>sadly the documentation on read-hash-extent is a bit short.
<mwette>here is reader for `longstrings': #""" "hello, world" """: https://github.com/mwette/guile-contrib/blob/main/hereis.scm
<cow_2001>why would you (string #\newline) instead of "\n"?
<freakingpenguin>Thanks for the help ArneBab and mwette. That looks promising!