IRC channel logs

2021-09-22.log

back to list of logs

<fnstudio>hello! anyone has an example of a case statement at their fingertips and wants to share that with me? in particular, is it possible/convenient to use strings as key/datums?
<fnstudio>i'm asking since i'm receiving some warning with regard to "datum [...] cannot be meaningfully compared using `eqv?'"
<RhodiumToad>strings can't be used for case keys, use symbols or keywords
<fnstudio>RhodiumToad: oh cool, thanks, that answers my problem
<fnstudio>yeah i'll switch to symbols, thanks
<RhodiumToad>strings with equal content are equal? but usually are not eqv? unless they derive from some common source
<RhodiumToad>and case uses eqv? for comparison
<RhodiumToad>whereas symbols with the same names are not only eqv? but eq?
<fnstudio>RhodiumToad: i see, yes that helps, i had some vague memory that strings can't be used in case statements because of that but i didn't remember what the solution was, switching to symbols
<fnstudio>v helpful
<tohoyn>sneek, botsnack
<sneek>:)
<fnstudio>hello, i'd like to use lset-intersection against a list of lists
<fnstudio>i thought it was a matter of using apply against the list but i don't seem to be able to make it work
<fnstudio>my particular problem is about lset-intersection but there is probably a more general question behind this in terms of how to "unpack" a list and make it work as a multi-arg argument for a given function
<fnstudio>i naively tried something along the lines of "(define (get-intersection lists) (apply (lambda (x) (lset-intersection equal? x)) lists))"
<fnstudio>but that doesn't seem to work
<fnstudio>maybe i should be using lambda*?
<lloda`>you can do (apply lset-intersection equal? lists)
<fnstudio>can i?
<lloda`>sure thing
<fnstudio>wow fantastic, thanks, let me try
<fnstudio>i thought the equal? thing might get in the way and a lambda was needed, i'm trying now
<lloda`>apply accepts any number of arguments before the final list argument
<fnstudio>lloda`: ah i see, and it works perfectly, thank you very much!!
<lloda`>yw
<dsmith-work>Hey Hi Howdy, Guilers
<manumanumanu>wingo: just a heads up regarding match.scm, it has gotten extended with object, struct and @ matching. object and struct I don't know what it does, but @ does record matching by field name.
<manumanumanu>which I am struggling to implement in chez
<manumanumanu>wingo: object is an alternative name for @ and struct an alternative name for $. Not documented, so can be ignored.
<manumanumanu>probably due to @ being illegal in r6rs-proper.
<lispmacs[work]>hi, I'm working through the debugging information in the Guile reference manual for 3.0.7. However, all the "binding" procedures in 6.26.1.3 do not seem to be accessible to me. Do I need to load a special module first/
<lispmacs[work]>okay, it is mentioned further on, (system vm frame)
<civodul>manumanumanu: what's @ in match?
<stis>Tja guilers!