IRC channel logs

2023-02-05.log

back to list of logs

<mwette>.
<mfiano>any record/struct like construct that allows for inheriting fields with automatically renamed derived accessors?
<mfiano>Kind of missing CL structs here. Going to have to get macro happy soon to remove all this DRY
<old>Do you have an example of a form?
<mfiano>You mean like in CL? That is one of the most complicated forms :)
<mfiano> http://www.lispworks.com/documentation/HyperSpec/Body/m_defstr.htm
<mwette>scheme macros are the best
<mwette>Have fun with that!
<mfiano>Might just decide to not give a damn about performance and use goops
<mfiano>for now, need to rest the brain a bit. later :)
<haugh>sneek, seen lechner
<sneek>I think I remember lechner in #guile one day and 14 hours ago, saying: Hi, does Guile have something like Hackage?.
<haugh>sneek, later tell lechner A while ago, I saw you were looking at composing forms around abort on #f. Have you seen chain-and from SRFI-197? The syntax-case implementation works for me; you just need eof-object from (ice-9 binary-ports) and let-values from (srfi srfi-11)
<sneek>Okay.
<haugh>sneek botsnack
<sneek>:)
<chrislck>sneek: botsnack
<sneek>:)
<mwette>mfiano: you might want to read about Guile vtables
<old>TIL Scheme 48 first version was done in 48 hours
<old>thanks for the talk flatwhatson
<count3rmeasure>hey all, I'm still implementing commands in guile, and I've run into a problem, I'm trying to pass multiple arguments to the lambda following the invoke in the "make-command" procedure https://sourceware.org/gdb/onlinedocs/gdb/Commands-In-Guile.html#Commands-In-Guile
<count3rmeasure>the docs say to pass the args in as a string, but I'm not really getting that to work, or rather I'm getting one arg through that way, but not multiple
<mwette>in gdb dist I found (make-command "test-cmd" #:command-class COMMAND_OBSCURE #:invoke (lambda (self arg from-tty) ...))
<mwette>Oh, that's in the manual you referenced.
<count3rmeasure>its all good, thank you mwette:
<count3rmeasure>I'm grabbing the source and reading it now for the make-command procedure, kind of shocked i haven't done that before
<count3rmeasure>that should help clear it up
<lechner>Hi, what's the way to check if a POSIX stat record points to a directory, please? This does not work (eq? 'directory (stat:type stat))
<mirai>can something like this be copy-pasted into guile or will it require a rewrite? https://github.com/scheme-requests-for-implementation/srfi-233/blob/main/srfi-233-test.scm
<mirai>lechner: eqv?
<lechner>mirai / not sure that's needed for symbols, but it looks like i am not using file-system-fold correctly
<mwette>lechner: what do you mean by "stat record"? The return from (stat object) is a vector. And (eq? (stat:type (stat "/home/mwette")) 'directory) => #t
<lilyp>I'd guess it fails on symlinks, which you'd have to follow
<mfiano>mwette: Thanks. I saw them in passing the other day. I'll give them a full read in a bit :)
<lechner>mwette / the issue was that 'leaf' in file-system-fold is only entered for 'regular' files, but not for directories. the test is always false
<mwette>lechner: got it -- thanks