IRC channel logs

2024-05-12.log

back to list of logs

<ano>is there a way to set default value for variadic procedure arguments?
<tomnor>shawnw: It's clear enough for the repl, I agree.
<shawnw>ano: see https://www.gnu.org/software/guile/manual/html_node/Optional-Arguments.html
<ano>saw it already and not sure about syntax, something like (define* (FUNC . #:optional (ARGS '("")))), if no ARGS passed then it should be list with empty string
<shawnw>No .
<ano>w/o . it won't be variadic procedure, it will be procedure with 1 optional argument, no?
<ano>yep, w/o . ARGS threaten as single argument, so there is no way to set default ARGS for variadic procedure and default ARGS should be checked/set inside procedure body somehow?
<ano>nvm valid syntax is (define* (FUNC #:optional (OBJ "") . OBJS))
<shawnw>Or (define* (func #:optional (obj "") #:rest objs) ...)
<daviid>lilyp: ok thanks - i'll wait to see how the changes you proposed look ,.. Note that if we really want to follow their template, the main title should 'GTK and Scheme', not 'Scheme' ...
<lilyp>true, I'll fix that hopefully tomorrow
<daviid>lilyp: tx - sorry to bother you with this, it's not as important as it feels when we work on it :), a mere presence is just fine, just one link to the G-Golf project page would actually be enough ...
<lilyp>well, language binding descriptions are more than "awesome" lists, so you ought to get them right
<daviid>lilyp: the least we say the better, just "their" title, a GNU G-Golf subtitle, then one sentence "G-Golf is a Guile Object Library for GNOME." - where G-Golf links to https://www.gnu.org/software/g-golf/ and Guile links to http://www.gnu.org/software/guile/ - is actually enough and better imo
<lilyp>can't share that opinion tbh
<daviid>all those pages are wrong, in design, structure, and most in wording as well - but in the end, those pages are also totally insignificant, so as long as we do not say anything that may become obsolete with time, and as long as at least one occurrence of g-golf (and one for guile) links to their project page, it's fine - thanks again
<Kolev>daviid: Thanks for making GNOME apps in Guile possible!
<ano>what's the best way to exec multi procs in if consequent/alternate blk while there is no(?) progn?
<ano>tried (if (...) (PROC1) ((PROC2) (PROC3)) ) but for some reason get >ERROR: Wrong type to apply: #<unspecified> on the last (huh?) exec, (and (PROC2) (PROC3)) works find but i don't care about returned value
<old>ano: (begin expr ...) is equivalent to Lisp (progn expr ...) I believe
<mwette> ano: that's saying that (proc2) is not returning anything: it should return a procedure
<mwette>Do you mean to say (begin (PROC2) (PROC3)) ?
<ano>yep
<lilyp>daviid: pushed a commit that hopefully fixes our style
<daviid>lilyp: perfect, thanks