IRC channel logs

2023-03-23.log

back to list of logs

<mwette>acdw: problems with configure or with make?
<cow_2001>was mucking about with alists and i find it kind of funny that (alist-cons 1 '(2 3) '()) looks like '((1 2 3))
<count3rmeasure>curious if anyone offhand knows of any codebases that utilize pattern matching over records (any kind, not just srfi-9), I'm grepping through a bunch of codebases now but figured I'd check here while I do so
<sneek>Welcome back count3rmeasure, you have 1 message!
<sneek>count3rmeasure, haugh says: so the other day you mentioned interest in using guile-json with the GNU extensions to srfi-9 and I just wanted to let you know that they're fully compatible; you just have to use set-field/set-fields with the json record getters. Lmk if you want to chat more about it, it's pretty sweet.
<count3rmeasure>haugh: thank you for the update, just got the message via sneek
<haugh>count3rmeasure you're welcome. I know dthompson likes his records, maybe give chickadee a grep?
<haugh> https://git.dthompson.us/chickadee.git
<haugh>If you're looking to melt your brain, the (guix records) facility is an advanced application.
<count3rmeasure>thank you haugh!
<count3rmeasure>I'm reading the shepherd source right now and it is so well commented and easy to read! I'm impressed
<count3rmeasure>I'll check the guix records facility now
<haugh>count3rmeasure belay that chickadee recommendation, I don't think he matches a single record in that entire project
<RhodiumToad>.
<count3rmeasure>you were not kidding with chickadee, there appears to be over a hundred ten records defined project wide hahaha
<count3rmeasure>haugh
<count3rmeasure>I love it, exactly what I need to see thank you
<haugh>count3rmeasure, the big break-through for me with record matching was how the ellipses "slicing" across records is so compatible with the list manipulation procedures which accept multiple lists of arguments, like map: http://vpaste.net/uHy5R
<count3rmeasure>I guess I don't get what you mean by "slicing" across records
<count3rmeasure>thank you for that paste though, its giving me something to think about and look up haugh
<haugh>count3rmeasure, maybe a better way to put it is that scheme records are ordered, so pattern matching them works exactly like pattern matching lists.
<count3rmeasure>oh wow
<count3rmeasure>I somehow had no idea
<count3rmeasure>about the ordered nature of scheme records, I mean
<haugh>yeah it's a fun realization, right? it composes very, very well with everything else
<count3rmeasure>thats awesome
<haugh>:)
<count3rmeasure>thank you!
<haugh>happy to help
<dthompson>rekado: I finally looked into you get images to display in the repl in guile-picture-language and I can't believe I have gone all these years without knowing that Geiser looks for #<Image: ...> text and renders inline images.
<dthompson>into how*
<dthompson>rekado: btw what software is git.elephly.net running? it's nice
<daviid>dthompson: guile-cv does that to, fwiw
<rekado>dthompson: it’s Julien’s gitile: https://git.lepiller.eu/gitile/
<rekado>dthompson: I don’t remember how I stumbled upon #<Image: ...> but when I saw it in the geiser sources I knew I had found the hack I needed to build the low-effort picture language.
<dthompson>rekado: it's a great hack!
<dthompson>and ah I should've known it was gitile
<dthompson>need to switch to that myself
<Arsen>is there some "front apply" helper, that basically saves a list and a procedure, and returns a new procedure that will append arguments it gets to the ones saved originally when being called and apply that new appended list
<Arsen>(i.e. partial application)
<drakonis>ah
<jpoiret>(cut apply func (append <> some-list))?
<drakonis>currying?
<Arsen>currying indeed
<drakonis>i'm pretty sure it is available
<drakonis> https://www.gnu.org/software/guile/manual/html_node/Curried-Definitions.html
<jpoiret>nothing to do with currying existing definitions easily though
<Arsen>hmm, that's not quite it, I wanted to do something like (map (partial-apply + 1) (iota 10))
<jpoiret>(cut ...) is a good way to do that
<jpoiret>see https://srfi.schemers.org/srfi-26/srfi-26.html
<Arsen>(apply + (map (cut + 1 <>) (iota 8))) not bad, nice
<Arsen>thanks
<drakonis>new things have been learned today
<drakonis>v. nice.
<haugh>jpoiret, not an issue in this case but you can't put <> in a subform with srfi-26 cut/cute
<haugh>one of the reasons I advocate for further lambda shorthand
<jpoiret>You can't?? Doesn't seem like a useful limitation
<dsmith>sneek, botsnack
<sneek>:)