IRC channel logs

2023-11-30.log

back to list of logs

<ArneBab>There’s a draft SRFI on mixing defines and expressions within the body. I looked into it and commented, but I’m not sure I grasp all the issues, so please have a look! https://srfi.schemers.org/srfi-245/srfi-245.html
<ArneBab>The discussion so far: https://srfi-email.schemers.org/srfi-245/threads/2023/09/ — this seems important to avoid divergence between what Guile offers and where Scheme progresses.
<isaneran>ArneBab: That's something I wanted to add to my own scheme once I get far enough
<isaneran>think it should work as long as the define is not the last expr
<isaneran>but there are probably other edge cases that make it weird
<isaneran>it's annoying cuz sometimes you just wanna be dump and debug log something between a bunch of defines at the start for example
<isaneran>and I end up doing stuff like (define __ (begin (display ...) (newline) '()))
<isaneran>didn't know I could already do this in guile thoug
<lloda>graywolf: I had a look at filesys.c and imo it's ok if you put everything in one patch
<lloda>it's not all that much of a change so i think it falls within the 'opportunistically' loophole :p
<chrislck>sneek: botsnack
<sneek>:)
<sneek>Welcome back chrislck!!
<chrislck>sneek: botsnack
<sneek>:)
<apteryx>I'm running in a sxml-match infinite loop :-/
<apteryx>just by adding this pattern: ((small ,(node)) node)
<apteryx>where 'node' is the expression being matched
<apteryx>here's the current complete 'snarfi' script, for the curious
<apteryx>I'm attempting to snarf snrfi-209.html with it
<apteryx> https://paste.centos.org/view/b20f8b82
<apteryx>forgot to mention, that script is intended to run as a 'guild' script, so drop in into the guile tree under module/scripts/snarfi.scm and run it with './meta/guild snarfi surfi-209.html'
<lechner>ArneBab / daviid / thanks! i am concerned that some of my projects pre-compile only the modules but not the executables upon installation. perhaps the solution is only to link into /bin
<cwebber>hi hi hi hi hiiiiii
<lechner>a new announcement?
<cwebber>hi lechner !
<cwebber>if you mean from spritely there may be one coming today... :)
<lechner>cwebber / Thank you for all that work on Hoot and your WASM advocacy in general. It's inspired me a lot of questionable emails! https://lists.gnu.org/archive/html/guix-devel/2023-11/msg00005.html
<lechner>to write
<apteryx>maybe it originated from a separate library upstream?
<apteryx>pinoaffe: ^^
<apteryx>(re sxml match documentation being separated from rest of sxml)
<civodul>yes, sxml-match doesn’t have the same origin as sxml itself
<cwebber>heh :)
<dthompson>hey everyone, hoot 0.2.0 is out! https://spritely.institute/news/guile-hoot-v020-released.html
<dthompson>if you don't know about it, hoot is the scheme->wasm compiler than wingo, robin, cwebber, and I work on at spritely. it's super cool and you should check it out. :)
<dthompson>the dream of the 90s is alive: scheme in the browser
<dsmith>Woo
<cwebber>AND THAT'S NOT ALL
<cwebber>dthompson made this incredible post about how to build React-style webapps usin' nothin but Hoot and Scheme! https://spritely.institute/news/building-interactive-web-pages-with-guile-hoot.html
<ArneBab>lechner: I had the problem that the scripts were interpreted. The answer for me is shell-deferring: At the top of the file just add the load path and then running the module via -e '(the module)' -c '' "$@" (this implicitly runs the main method in your file.
<samplet>dthompson: “Building Interactive Web Pages” is amazing! Congrats to you and the whole Hoot team. I’m shocked and impressed that you folks have progressed so quickly.
<cwebber>yes thank you dthompson, wingo_, and robin for making this release happen
<cwebber>HEROIC efforts :D
<dthompson>samplet: thanks! :)
<dthompson>glad you like it
<dthompson>this is something I had the beginnings of at seagl but wasn't ready to show yet
<ArneBab>that example looks really neat! (though it already has quite a bit of code — at that weight I’d only use it when the backend is scheme already and I don’t want people to have to learn a second language)
<ArneBab>I already have ideas about code I’ might want to replace :-)
<ArneBab>Just to be sure: does it implement the correct scoping rules of Scheme (missing that is a shortcoming of biwascheme)
<dthompson>ArneBab: yeah that's all there.
<dthompson>hoot is a backend, so that's all been taken care of by the time hoot gets cps
<civodul>dthompson: wonderful post! it’s great to see the pieces come together nicely!
<civodul>congrats Hootfolks :-)
<civodul>also, the illustration is cute
<civodul>those of the release page are amazing too!
<old>does this version works with guile 3.0.9 or need to be used with source tree?
<dthompson>old: you need guile built from the latest in main
<dthompson>civodul: thank you!!!
<old>okay
<dthompson>guile-next in guix is up-to-date in that regard
<old>so will it works with 3.10 out of the box?
<old>oh okay
<dthompson>yes, whenever that is released
<old>so I can just work with guile-next + guile-hoot without having to keep a source tree?
<dthompson>as we implement more, wingo keeps finding little things that need to be fixed in guile itself
<dthompson>old: yup, I updated both guile-next and guile-hoot in guix so that it's all up to date
<old>dthompson: awesome :-)
<civodul>now we’ll need multi-stage programming :-)
<dthompson>civodul: yesss that would be great :)
<sneek>Yey! chrislck is back :)
<chrislck>sneek: botsnack
<sneek>:)
<daviid>congrat to the hoot team!
<ArneBab>dthompson: that’s really cool!
<rrobin>hi schemers: what library do you use for crypto hash functions, is there any pure scheme one, or does everyone use gcrypt bindings?
<jpoiret>rrobin: if you want actual crypto primitives, your best bet is linking against a well-designed and maintained one, and there are not many of them. but that's just general advice though, some other people may have experience with that
<rrobin>yeah, i just need md5/sha1 here but i was not planning on writting them :)
<sneek>chrislck: wb
<WilhelmVonWeiner>how do i call the car of a list like a procedure? i.e. (cons 'display 10) gives (display . 10) and i want to call (display 10)
<WilhelmVonWeiner>how do i call the car of a list like a procedure? i.e. (cons 'display 10) gives (display . 10) and i want to call (display 10)
<lloda>WilhelmVonWeiner: (eval '(display 10) (interaction-environment))
<lloda>note that '(display . 10) isn't a list
<WilhelmVonWeiner>it's a pair because it doesn't end with an empty list, right?
<jpoiret>WilhelmVonWeiner: why do you want to do that? might be an instance of the xy problem
<WilhelmVonWeiner>jpoiret: i'm just playing with guile in the repl
<jpoiret>in guile (unlike eg. elisp) you don't really want to pass the symbols naming function variables, you can pass the functions themselves, since it's a 1-lisp
<WilhelmVonWeiner>that makes sense. thanks
<pinoaffe>apteryx: (re sxml-match docs) ah, that explains it
<pinoaffe>I think it would be preferrable if the docs were "merged", or if they at least linked to each other
<graywolf>Hi! Where could I find documentation what is permitted module-name? I tried (define-module (aoc 2023 01)) and that does not seem to work. Probably some scheme fundamentals understanding is missing from my side...
<samplet>graywolf: My understanding (from memory!) is that only symbols are allowed in the module name. There’s a trick to allow SRFI numbers in RnRS mode, but it’s only a trick.
<samplet>apteryx has talked about changing this to allow numbers, though.
<graywolf>oh, so '01 is not a symbol?
<graywolf>Oh it does not seem to be
<samplet>Guile says, “(symbol? '01) => #f”.
<graywolf>oh, but 2023-01 is
<graywolf>so I guess (aoc 2023-01) it is :D
<samplet>ACTION realizes what “aoc” means
<samplet>Sounds like fun!
<graywolf>(aoc #{2023-01}#) looks cool and cryptic, as advent of code should be ^_^
<samplet>I bet ‘#{2023}#’ might work, too.
<graywolf>I never finish it, but I always start with great enthusiasm that lasts me at least few days :)
<samplet>In Guile, the ‘#{...}#’ syntax is used for “weird” symbols.
<samplet>I’ve half completed many a aoc in the past.
<graywolf>Oh, nice, I did not realize I can do that. (define-module (aoc #{2023}# #{01}#)) seems to work
<graywolf>noice
<samplet>You could also use ‘year-2023’ and ‘day-01’ or whatever.
<graywolf>I take it back, it seems to break pretty much everything.
<graywolf>I mean, sure, but so far I have file structure YEAR/DAY.ext (so 2022/01.c), and as far as I can tell in guile the filepath needs to match the module to be loadable
<graywolf>Oh, this is interesting. When I define-module with "wrong" path (not found on the filesystem), it breaks (not even display for example is found)
<graywolf>I did not know