<chrislck>AFAIU, CPS macro writers are voodoo practitioners <leoprikler>Not sure, I think it's harder to write the macro without passing continuations ***apteryx is now known as Guest14481
***apteryx_ is now known as apteryx
<manumanumanu>leoprikler: If I got to chose between writing goof-loop using syntax-case and passing state using parameters and handling everything explicitly using syntax-rules, I would definitely use syntax-case. The reason I don't is to make it more portable. Using syntax-case and programmatically expanding the sequence macros I could actually write the sequence creators as procedures instead of the cluster-fudge it is <manumanumanu>I think the neatest thing if people are willing to break backwards compatibility would be srfi-72 (not sure about that number), which is sort of an amalgamation of syntax-case and explicit renaming <manumanumanu>That more or less completely removes the need for gensym/generate-temporaries in syntax-case <manumanumanu>syntax-case is hygienic unless you tell it not to be. The guarantee is just that any identifier introduced within a macro won't clash with any outside identifiers. That means if I have 2 (in-list identifier) macros that I expand programatically within my loop macro, their binding 'cursor' will collide <leoprikler>I think you've misread me, the question was supposed to be "SRFI 72 Hygienic Macros"? <manumanumanu>I had a look at guile's quasisyntax to see if I could maybe hack a way to add a (syntax-unquote/hygienic ...), but I never got far. <manumanumanu>or a (quasisyntax/hygienic ...) where each unquoted syntax object is guaranteed to be unique. <manumanumanu>or rather, I don't really know to hack quasisyntax.scm. it seems manageable, but jeez... <RhodiumToad>speaking of weird macros, I've been vaguely poking at trying to find a way around the r7rs letrec-syntax booboo <RhodiumToad>(i.e. that letrec-syntax makes a lexical contour, so you can't use it at top level, as you can in guile currently) <RhodiumToad>my somewhat vague thoughts were to do something that expands into a define-values <RhodiumToad>uh, jcowan I think mentioned it to me here a while back <manumanumanu>I don't really understand where that is specified in the r7rs-small document <RhodiumToad>my understanding of r7rs, and jcowan's, is that it creates a lexical scope and therefore you can't put top-level (define)s in it <manumanumanu>RhodiumToad: We need to figure out if any scheme actually does that. Chibi splices. ***ftknox_ is now known as ftknox
<elliotpotts>still haven't found any clue about catching errors during scm_read :( <prussian_blue>exception handling is implemented with setjmp, totally incompatible with c++ <prussian_blue>unless some wizard is familiar with the implementation... it could be possible to throw a c++ exception instead of doing a jmp <dsmith-work>I suspect the only way is to always catch all C++ exceptions on the Scheme->C++ return boundary. *dsmith-work looks up libunwind.. <RhodiumToad>luajit uses it on some platforms/compilers to make its exception handling interoperable with c++ exception <dsmith-work>Doesn't newish Guile have non-contiguous Scheme call stacks? <RhodiumToad>(a fact I recently became aware of due to having to track down a bug in same) <jlicht>does anybody happen to have some guile snippets around to read and write YAML? <jlicht>leoprikler: nice, that looks exactly like what I'm looking for <manumanumanu>ArneBab: goof-loop is now pretty much feature complete! No module definition yet, also no tests nor documentation, but done enough to play with. <manumanumanu>ArneBab: goof-loop is now pretty much feature complete! No module definition yet, also no tests nor documentation, but done enough to play with. <manumanumanu>ArneBab: https://git.sr.ht/~bjoli/goof-loop ... The code produced by the macros is nicer than guile-for-loops, and the iterator protocol is nicer. I believe I can actually implement something like (in-cycle (in-list '(1 2 3)) without much fuzz, using macro rewriting for the common cases, and srfi-158-style generators for the rest