Re: unhandled constant?

2020-01-31 Thread Han-Wen Nienhuys
On Thu, Jan 30, 2020 at 9:05 AM Han-Wen Nienhuys wrote: > > [guile1.8]$ grep -ir define-syntax-rule . > > (empty) > > I need something that works in GUILE 1.8 too. > > this is what I got from David Kastrup: > > >Got any comments about macros being sooo yesterday compared to syntax > forms? Synta

Re: unhandled constant?

2020-01-31 Thread Ricardo Wurmus
Han-Wen Nienhuys writes: > [guile1.8]$ grep -ir define-syntax-rule . > > (empty) > > I need something that works in GUILE 1.8 too. I suppose you could use (cond-expand (guile-2.2 …) …) to only use this with Guile 2 and fall back to the current code with Guile 1.8. > Would there be a way that

Re: Segfault while building on 64-bit Cygwin

2020-01-31 Thread John Cowan
Aaaand... Cygwin doesn't do core dumps. Under the skin it's WIndows, after all. This is what I get when I specify ulimit -c unlimited and rebuild: Exception: STATUS_ACCESS_VIOLATION at rip=0055A8B1B25 rax= rbx=FF90 rcx=FF90 rdx=0034964A rsi=0700

Re: unhandled constant?

2020-01-31 Thread Linus Björnstam
Guile1.8's macros are run-time macros: they are executed directly and not transformed to output code that is then compiled. That is the reason why your code works: to newer guiles the (inner ...) is only available at expansion time. The macro output is trying to call code that does not exist at

Re: unhandled constant?

2020-01-31 Thread Han-Wen Nienhuys
On Fri, Jan 31, 2020 at 3:58 PM Linus Björnstam wrote: > > Guile1.8's macros are run-time macros: they are executed directly and not > transformed to output code that is then compiled. That is the reason why your > code works: to newer guiles the (inner ...) is only available at expansion > tim

Re: unhandled constant?

2020-01-31 Thread Han-Wen Nienhuys
On Fri, Jan 31, 2020 at 3:58 PM Linus Björnstam wrote: > > Guile1.8's macros are run-time macros: they are executed directly and not > transformed to output code that is then compiled. That is the reason why your > code works: to newer guiles the (inner ...) is only available at expansion > tim

Re: unhandled constant?

2020-01-31 Thread Linus Björnstam
I'm not very familiar with how guile 1.8 works since my first guile version was 2.2, but I remember hearing Andy talk about how macro expansion was done at runtime, due to guile not being compiled. I just put one and one together and figured that the reason the macro you posted works in 1.8 mus

Re: unhandled constant?

2020-01-31 Thread Han-Wen Nienhuys
On Fri, Jan 31, 2020 at 7:20 PM Linus Björnstam wrote: > I don't really understand your question. With defmacro and syntax-case you > can run arbitrary code. If you just output code that does module-define! that > won't be run until runtime, and thus you cannot depend on the result of that > mo

Re: unhandled constant?

2020-01-31 Thread Linus Björnstam
On Fri, 31 Jan 2020, at 20:17, Han-Wen Nienhuys wrote: > > eval-when looks like it might be a solution to the puzzle , but > honestly, the doc at > > https://www.gnu.org/software/guile/manual/html_node/Eval-When.html > > has me mystified. When I run the example through guile 2.2 and > displa

Re: unhandled constant?

2020-01-31 Thread Linus Björnstam
Read the docs. That seems to be a documentation bug. Try fiddling with the arguments to eval when and see if you can make it work. -- Linus Björnstam On Fri, 31 Jan 2020, at 20:17, Han-Wen Nienhuys wrote: > On Fri, Jan 31, 2020 at 7:20 PM Linus Björnstam > wrote: > > I don't really understan