Hi, is there any way to use the Gambit compiler to compile programs that use syntax-case macros? I see that one needs to (load "~~lib/syntax-case.scm") in order to use them, but that only seems to work with the interpreter.
Thanks in advance, M.
Afficher les réponses par date
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
On 26 September 2013 16:29, Panicz Maciej Godek godek.maciek@gmail.com wrote:
Hi, is there any way to use the Gambit compiler to compile programs that use syntax-case macros? I see that one needs to (load "~~lib/syntax-case.scm") in order to use them, but that only seems to work with the interpreter.
Thanks in advance, M.
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
and you should be able to omit the (load "~~lib/syntax-case.scm")
On 26 September 2013 16:34, Caolan McMahon caolan.mcmahon@gmail.com wrote:
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
On 26 September 2013 16:29, Panicz Maciej Godek godek.maciek@gmail.com wrote:
Hi, is there any way to use the Gambit compiler to compile programs that use syntax-case macros? I see that one needs to (load "~~lib/syntax-case.scm") in order to use them, but that only seems to work with the interpreter.
Thanks in advance, M.
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On 2013-09-26, at 11:34 AM, Caolan McMahon caolan.mcmahon@gmail.com wrote:
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
This only contributes to my belief that noone reads documentation anymore...
http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#index-define_002dsynta...
Marc
Marc: "figured it out" may well have meant just reading that page, not at all a complaint about documentation in this area.
On 26 September 2013 16:41, Marc Feeley feeley@iro.umontreal.ca wrote:
On 2013-09-26, at 11:34 AM, Caolan McMahon caolan.mcmahon@gmail.com wrote:
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
This only contributes to my belief that noone reads documentation anymore...
http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#index-define_002dsynta...
Marc
On 2013-09-26, at 11:43 AM, Caolan McMahon caolan.mcmahon@gmail.com wrote:
Marc: "figured it out" may well have meant just reading that page, not at all a complaint about documentation in this area.
Coalan: "This" may well have meant the OP...
Marc
2013/9/26 Marc Feeley feeley@iro.umontreal.ca
On 2013-09-26, at 11:34 AM, Caolan McMahon caolan.mcmahon@gmail.com wrote:
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
This only contributes to my belief that noone reads documentation anymore...
http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#index-define_002dsynta...
Well, that's not entirely true -- I've read a lot of documentation before
I dared to post. I've googled for many variations of "gambit scheme define macros" and "gambit scheme syntax case", and it either directed me here http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html (without pointing to the particuar node -- which might be significant, as the document consists of 21 chapters), or here http://prael.wordpress.com/2008/06/29/r5rs-define-syntax-macros-in-gambit-sc... (which doesn't mention the case for the compiler), or to some mailing list archives (which were difficult to digest)
The node you've pointed to is in section 6.3 "Miscellaneous extensions" (of chapter "Scheme extensions"), together with e.g. "vector-copy". Since syntax-rules are described in R5RS, I wouldn't ever think that it might be regarded as an extension to Scheme. Furthermore, I don't know what could be the reason for making the macro feature switched off by default, so it would never come to my mind that it must be switched on explicitly.
Perhaps if the table of contents of the documentation was a little bit more detailed, or if the documentation was generated as one node per page (so that google could index it with more precision), the chances of finding a particular information would increase.
Anyway, I'm really glad that I wrote, because you've helped me so quickly, and so I'm grateful :)
Thanks! M.
On 2013-09-26, at 3:00 PM, Panicz Maciej Godek godek.maciek@gmail.com wrote:
2013/9/26 Marc Feeley feeley@iro.umontreal.ca
On 2013-09-26, at 11:34 AM, Caolan McMahon caolan.mcmahon@gmail.com wrote:
gsc -:s filename.scm
and for interpreter:
gsi -:s filename.scm
...recently had to figure this out myself :)
This only contributes to my belief that noone reads documentation anymore...
http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html#index-define_002dsynta...
Well, that's not entirely true -- I've read a lot of documentation before I dared to post. I've googled for many variations of "gambit scheme define macros" and "gambit scheme syntax case", and it either directed me here http://www.iro.umontreal.ca/~gambit/doc/gambit-c.html (without pointing to the particuar node -- which might be significant, as the document consists of 21 chapters), or here http://prael.wordpress.com/2008/06/29/r5rs-define-syntax-macros-in-gambit-sc... (which doesn't mention the case for the compiler), or to some mailing list archives (which were difficult to digest)
The node you've pointed to is in section 6.3 "Miscellaneous extensions" (of chapter "Scheme extensions"), together with e.g. "vector-copy". Since syntax-rules are described in R5RS, I wouldn't ever think that it might be regarded as an extension to Scheme. Furthermore, I don't know what could be the reason for making the macro feature switched off by default, so it would never come to my mind that it must be switched on explicitly.
Perhaps if the table of contents of the documentation was a little bit more detailed, or if the documentation was generated as one node per page (so that google could index it with more precision), the chances of finding a particular information would increase.
Anyway, I'm really glad that I wrote, because you've helped me so quickly, and so I'm grateful :)
Thanks! M.
I'm sorry for overeacting... Blame it on the frustration of being asked regularly to write more detailed/clear documentation for things that are already documented. It is more fun and time efficient for me to answer questions on undocumented things when they come up.
Marc
On 2013-09-26, at 11:29 AM, Panicz Maciej Godek godek.maciek@gmail.com wrote:
Hi, is there any way to use the Gambit compiler to compile programs that use syntax-case macros? I see that one needs to (load "~~lib/syntax-case.scm") in order to use them, but that only seems to work with the interpreter.
You can either
gsc -:s foo.scm
or
gsc -e '(include "~~lib/syntax-case.scm")' foo.scm
For the interpreter you can also do
gsi -:s
or
gsi -e '(include "~~lib/syntax-case.scm")' -
Marc