IRC channel logs


back to list of logs

***roptat is now known as Guest5836
***Guest5836 is now known as roptat
<iskarian>Hello all :) I have a method X that returns unspecified, or multiple (unknown number of) values, but using (let ((value (X)) (if (not (unspecified? value)) value ...)) only produces the first value. Is there a way to check for unspecified and also get all values?
<rlb>iskarian: depending on what you need perhaps or receive
<iskarian>rlb, thanks for the reply; I saw those, but I do not know the number of values ahead of time... is there a way to make them work with an arbitrary number of values?
<iskarian>Another question: is there a way to format an exception just like I'd see printed if I raised the exception?
<flatwhatson>iskarian: you can (recieve args ...) instead of (receive (a b) ...)
<flatwhatson>there's also call-with-values, eg. (call-with-values myfun list) will return a list of myfun's return values.
<iskarian>oh... thanks, flatwhatson! that makes a lot of sense sense, but it'd be nice if it were in the manual, haha
<flatwhatson>well, it does say "like the argument list in a lambda", which hints at this
<flatwhatson>similarly, you can (receive (first . rest) ...)
<iskarian>fair enough! all the dots make my head spin :)
<flatwhatson>eg. (receive (a b . cs) (values 1 2 3 4 5) cs) gives (3 4 5)
***iskarian is now known as Guest8251
<leoprikler>There's also SRFI 71 let and compose
<leoprikler>e.g. (compose list mv-producer) gives you the values as a list
***iskarian is now known as Guest4146
<garjola>Hi all. I am new to guile and I am looking for a good book to get started. I am familiar with lisps (Elisp, some clojure years ago) and I have configured geiser on Emacs to start playing around. I have the info reference manual, but I was looking for a ¬ęproject oriented¬Ľ book to get familiar with modules and the usual dev cycle with guile. Any recommendations? Thanks!
<leoprikler>There are books on Scheme, such as SICP, but few of them teach the Guile flavour for more or less obvious reasons.
<leoprikler>I think The Little Schemer is also among the book titles, that people can read
<dsmith>sneek: books?
<sneek>books is try htdp and scip
<dsmith>sneek: htdp?
<sneek>I could be wrong, but htdp is How to Design Programs,
<leoprikler>is it scip or sicp?
<dsmith>sneek: forget books
<dsmith>sneek: books is Try htdp and sicp
<mwette>sicp: structure and interpretation of computer programs
<mwette>tspl: the scheme programming language: (this has a chapter on syntax-rules and syntax-case)
<dsmith>tspl Is great
<garjola>Thanks for the pointers. I understand that there are no specific Guile books. I know SICP and HTDP, I will have a look at TSPL.
<vijaymarupudi>Hello all! I'm new to guile, and looking into whether to make it my "main" language
<vijaymarupudi>I was watching a bunch of talks by wingo on youtube, and was curious if there was any progress into the question of a new garbage collector?
<vijaymarupudi>I don't want to depend on the Boehm for my C extensions if possible
<vijaymarupudi>But generally, I've been enjoying Guile, thank you very much for maintaining and improving it!
<leoprikler>It's all Boehm? Always has been.
<leoprikler>w.r.t. GC in C extensions, I don't think you manually interact with boehm anyway, instead using the scm_gc_ calls
<leoprikler>if at all
<vijaymarupudi>I see
<vijaymarupudi>At 21:00 in, wingo seems to talk about possible future plans