Re: [Chicken-users] unbound variable: or

2015-06-03 Thread John Cowan
Peter Bex scripsit: It's pretty cool in that it supports both er/ir macros *and* syntactic closures. Thanks. I've updated http://trac.sacrideo.us/wg/wiki/SyntaxDefinitions accordingly. -- John Cowan http://www.ccil.org/~cowanco...@ccil.org An observable characteristic is

Re: [Chicken-users] unbound variable: or

2015-06-03 Thread Peter Bex
On Tue, Jun 02, 2015 at 07:27:11PM -0400, John Cowan wrote: Define-macro was never part of any Scheme standard. Nonetheless, of the 33 Schemes in my test suite with macros of some kind, all have syntax-rules, 15 have define-macro (MIT is not one of them), 13 have syntax-case, 5 have explicit

Re: [Chicken-users] unbound variable: or

2015-06-03 Thread arc
On 03/06/15 19:00, Peter Bex wrote: On Tue, Jun 02, 2015 at 07:27:11PM -0400, John Cowan wrote: Define-macro was never part of any Scheme standard. Nonetheless, of the 33 Schemes in my test suite with macros of some kind, all have syntax-rules, 15 have define-macro (MIT is not one of them), 13

Re: [Chicken-users] unbound variable: or

2015-06-03 Thread Michele La Monaca
On Wed, Jun 3, 2015 at 1:50 PM, John Cowan co...@mercury.ccil.org wrote: Peter Bex scripsit: It's pretty cool in that it supports both er/ir macros *and* syntactic closures. Thanks. I've updated http://trac.sacrideo.us/wg/wiki/SyntaxDefinitions accordingly. Great reference. Thanks.

Re: [Chicken-users] unbound variable: or

2015-06-03 Thread Peter Bex
On Thu, Jun 04, 2015 at 01:12:50AM +1200, arc wrote: On 03/06/15 19:00, Peter Bex wrote: It's pretty cool in that it supports both er/ir macros *and* syntactic closures. I was under the impression that explicit renaming macros could be implemented in syntactic closures, and that is what is

Re: [Chicken-users] unbound variable: or

2015-06-03 Thread cowan
Peter Bex scripsit: It's just unfortunate that only Picrin bothered to implement ir-macros, considering it's so easy to do with synclo. MIT Scheme could probably add them if anyone sent Chris Hanson a patch. Larceny could implement them too, I think. The trouble is that the naive algorithm is

Re: [Chicken-users] unbound variable: or

2015-06-02 Thread Michele La Monaca
On Sun, May 31, 2015 at 1:53 PM, Peter Bex pe...@more-magic.net wrote: On Sat, May 30, 2015 at 10:30:38PM -0700, chi wrote: On 05/30/2015 07:02 AM, Peter Bex wrote: As has been pointed out time and again, it is fundamentally broken. It would be more correct to say that define-macro has not

Re: [Chicken-users] unbound variable: or

2015-06-02 Thread John Cowan
Michele La Monaca scripsit: It would be more correct to say that define-macro has not the feature set you're interested in, which may or may not be of general interest depending on the context. If you know for sure that nobody but you will use your macro, then define-macro is fine, but if you

Re: [Chicken-users] unbound variable: or

2015-05-31 Thread Peter Bex
On Sat, May 30, 2015 at 10:30:38PM -0700, chi wrote: On 05/30/2015 07:02 AM, Peter Bex wrote: As has been pointed out time and again, it is fundamentally broken. Generally when that is true, you can link to a prepared document explaining it clearly and unambiguously. It's all about

Re: [Chicken-users] unbound variable: or

2015-05-31 Thread John Cowan
chi scripsit: But I can't find anywhere that really explains why that's _fundamentally_ broken, not just ugly. Define-macro has two problems: it prevents (as opposed to selectively escaping from) hygiene, and it only supports global macros. Unhygienic syntax has exactly the same problem as

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread John Cowan
Michele La Monaca scripsit: Gambit has it. Too bad Chicken 4 dropped it. You're right; I was too hasty. There are a number of other Schemes that accept it also. However, it does not fit into the {define-syntax, let-syntax, let*-syntax, letrec-syntax} set provided by all post-R4RS Schemes.

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread chi
On 05/30/2015 07:02 AM, Peter Bex wrote: As has been pointed out time and again, it is fundamentally broken. Generally when that is true, you can link to a prepared document explaining it clearly and unambiguously. Since it has been carefully explained, and rehashed to the point of ad nauseum,

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Peter Danenberg
Quoth chi on Sweetmorn, the 5th of Confusion: I mean it's obvious define-macro is a bad idea. I wonder why no one ever mentions Juergen Lorenz' wonderful define-macro: http://api.call-cc.org/doc/bindings#def:define-macro Looks like it's syntactic sugar around implicit-renaming; gives one the

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Peter Bex
On Fri, May 29, 2015 at 10:23:03PM -0400, John Cowan wrote: Googling for syntax-rules will point you to a lot of basic tutorials. When you want something more advanced, look for JRM's Syntax-rules Primer for the Mildly Eccentric. Read that until you have trouble understanding it; you now know

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Peter Bex
On Sat, May 30, 2015 at 03:42:41PM +0200, Michele La Monaca wrote: On Sat, May 30, 2015 at 4:23 AM, John Cowan co...@mercury.ccil.org wrote: Jinsong Liang scripsit: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Michele La Monaca
On Sat, May 30, 2015 at 4:23 AM, John Cowan co...@mercury.ccil.org wrote: Jinsong Liang scripsit: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one

Re: [Chicken-users] unbound variable: or

2015-05-30 Thread Michele La Monaca
On Sat, May 30, 2015 at 4:02 PM, Peter Bex pe...@more-magic.net wrote: On Sat, May 30, 2015 at 03:42:41PM +0200, Michele La Monaca wrote: On Sat, May 30, 2015 at 4:23 AM, John Cowan co...@mercury.ccil.org wrote: Jinsong Liang scripsit: I want to learn some basic macro programming in

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Michele La Monaca
On Fri, May 29, 2015 at 3:10 AM, Jinsong Liang jinsongli...@gmail.com wrote: Thank you Michele! This is a nice example. Nice but maybe not very useful: (apply-syntax or (#f (+ 1 2) (print hello))) is just a longer and more cumbersome version of (or (#f (+ 1 2) (print hello))) A far more

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Jinsong Liang
Thank you for more examples! I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should I start with? Also, I have heard that, different from Lisp, macro

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread Matt Gushee
Hi, Jinsong-- On Fri, May 29, 2015 at 6:25 PM, Jinsong Liang jinsongli...@gmail.com wrote: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should

Re: [Chicken-users] unbound variable: or

2015-05-29 Thread John Cowan
Jinsong Liang scripsit: I want to learn some basic macro programming in Chicken. However, it seems there are multiple macro definition APIs in Chicken: define-syntax, syntax-rules, syntax-case, define-macro. Which one should I start with? Define-macro is completely obsolete and not supported

Re: [Chicken-users] unbound variable: or

2015-05-28 Thread Jinsong Liang
Thank you Michele! This is a nice example. Jinsong On Thursday, May 28, 2015, Michele La Monaca mikele.chic...@lamonaca.net wrote: On Thu, May 28, 2015 at 1:53 AM, John Cowan co...@mercury.ccil.org javascript:; wrote: Jinsong Liang scripsit: Then is there a straightforward way to get a

Re: [Chicken-users] unbound variable: or

2015-05-28 Thread Michele La Monaca
On Thu, May 28, 2015 at 1:53 AM, John Cowan co...@mercury.ccil.org wrote: Jinsong Liang scripsit: Then is there a straightforward way to get a list of booleans ored? I tried fold with or but it does not work either. It seems writing a loop or a recursion for this is a little overkill. You

[Chicken-users] unbound variable: or

2015-05-27 Thread Jinsong Liang
Hi, In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I try: (apply or '(#t #f)) Error: unbound variable: or Why (apply or '(#t #f)) does not work? Thank you! Jinsong ___ Chicken-users mailing list Chicken-users@nongnu.org

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Daniel Leslie
'or' is a macro, and macros cannot be used as the first operand in apply. -Dan On Wed, May 27, 2015 at 1:25 PM, Jinsong Liang jinsongli...@gmail.com wrote: Hi, In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I try: (apply or '(#t #f)) Error: unbound variable: or

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Peter Bex
On Wed, May 27, 2015 at 08:34:12PM +, Mario Domenech Goulart wrote: On Wed, 27 May 2015 16:25:33 -0400 Jinsong Liang jinsongli...@gmail.com wrote: In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I try: (apply or '(#t #f)) Error: unbound variable: or

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Peter Danenberg
Quoth Peter Bex on Boomtime, the 1st of Confusion: If or were a simple procedure, it would first evaluate all its arguments and then call the procedure. This is also known as applicative vs. normal order; see e.g.: https://mitpress.mit.edu/sicp/full-text/sicp/book/node85.html Procedures are

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Mario Domenech Goulart
Hi Jinsong, On Wed, 27 May 2015 16:25:33 -0400 Jinsong Liang jinsongli...@gmail.com wrote: In Chicken, (apply + '(1 2)) returns 3, which is expected. However, if I try: (apply or '(#t #f)) Error: unbound variable: or Why (apply or '(#t #f)) does not work? Welcome! `or' (*) is not a

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Jinsong Liang
Hi, Thanks a lot for all of your replies! Then is there a straightforward way to get a list of booleans ored? I tried fold with or but it does not work either. It seems writing a loop or a recursion for this is a little overkill. Jinsong On Wed, May 27, 2015 at 4:54 PM, Peter Bex

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Jinsong Liang
Thank you! That solved my problem! Jinsong On Wed, May 27, 2015 at 7:53 PM, John Cowan co...@mercury.ccil.org wrote: Jinsong Liang scripsit: Then is there a straightforward way to get a list of booleans ored? I tried fold with or but it does not work either. It seems writing a loop or

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread John Cowan
Jinsong Liang scripsit: Then is there a straightforward way to get a list of booleans ored? I tried fold with or but it does not work either. It seems writing a loop or a recursion for this is a little overkill. You want any. -- John Cowan http://www.ccil.org/~cowan

Re: [Chicken-users] unbound variable: or

2015-05-27 Thread Matt Gushee
On Wed, May 27, 2015 at 3:46 PM, Peter Danenberg p...@roxygen.org wrote: Quoth Peter Bex on Boomtime, the 1st of Confusion: If or were a simple procedure, it would first evaluate all its arguments and then call the procedure. This is also known as applicative vs. normal order; see e.g.:

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Mario Domenech Goulart
Hi Vok, On Wed, 7 Dec 2011 16:47:03 +0100 Vok Vojwo cev...@gmail.com wrote: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: csi -R sxpath -e (display (sxml:sxml-xml '())) Error: unbound variable: sxml:sxml-xml

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Christian Kellermann
* Vok Vojwo cev...@gmail.com [111207 16:47]: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: csi -R sxpath -e (display (sxml:sxml-xml '())) Error: unbound variable: sxml:sxml-xml It should be part of sxpath-lolevel. The

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Peter Bex
On Wed, Dec 07, 2011 at 04:47:03PM +0100, Vok Vojwo wrote: The documentation of the sxpath egg describes the sxml:sxml-xml function. But when I try to call it, I get an error: It's mentioned under the heading sxpath-lolevel. This is a separate module that you need to load. csi -R sxpath -e

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Vok Vojwo
2011/12/7 Peter Bex peter@xs4all.nl: Try this instead: csi -R sxpath-lolevel -e (print (sxml:sxml-xml '())) Thanks. This works but not as expected ;-) I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 Is it also available?

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Vok Vojwo
2011/12/7 Vok Vojwo cev...@gmail.com: I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 I got it. I had to include sxml-tools/serializer.scm in sxpath-lolevel.scm. After that it is possible to export srl:sxml-xml. And it seems to work:

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Christian Kellermann
* Vok Vojwo cev...@gmail.com [111207 17:32]: 2011/12/7 Vok Vojwo cev...@gmail.com: I was looking for the srl:sxml-xml function: http://modis.ispras.ru/Lizorkin/Apidoc/index.html#docfunc15826 I got it. I had to include sxml-tools/serializer.scm in sxpath-lolevel.scm. After that it is

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Peter Bex
On Wed, Dec 07, 2011 at 05:35:37PM +0100, Christian Kellermann wrote: Why is it not included if it is there? Or why is there an sxml-serializer egg if the code is already part of the SSAX libs, which is part of the sxpath egg? As I understood the egg is just a wrapper around the

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Jim Ursetto
On Dec 7, 2011, at 10:41 AM, Peter Bex wrote: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project. Most eggs include all files from

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Vok Vojwo
2011/12/7 Peter Bex peter@xs4all.nl: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of procedures from the SSAX project.  Most eggs include all files from the

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Vok Vojwo
2011/12/7 Jim Ursetto zbignie...@gmail.com: Other ways were to regularize and improve some of the identifier names, make things more idiomatic, and in sxml-serializer's case, add some feature enhancements. Where is the improvement? Writing sxml-serializer instead of srl:sxml-xml does not

Re: [Chicken-users] unbound variable: sxml:sxml-xml

2011-12-07 Thread Alex Shinn
On Thu, Dec 8, 2011 at 2:17 AM, Vok Vojwo cev...@gmail.com wrote: 2011/12/7 Peter Bex peter@xs4all.nl: Actually, the main reason is that SSAX is a horrible mess which has many completely unrelated procedures all mixed together. There are several egg that provide different sets of

[Chicken-users] unbound variable: make-hash-table

2010-07-09 Thread Martin DeMello
What's going wrong here? $ cat t.scm (define *hash* (make-hash-table)) $ csi t.scm ; loading t.scm ... #;1 *hash* #hash-table (0) $ csc t.scm $ ./t Error: unbound variable: make-hash-table Call history: t.scm:1: make-hash-table-- $ csc -version

Re: [Chicken-users] unbound variable: make-hash-table

2010-07-09 Thread Mario Domenech Goulart
Hi Martin On Fri, 9 Jul 2010 22:14:09 +0530 Martin DeMello martindeme...@gmail.com wrote: What's going wrong here? $ cat t.scm (define *hash* (make-hash-table)) $ csi t.scm ; loading t.scm ... #;1 *hash* #hash-table (0) $ csc t.scm $ ./t Error: unbound variable: make-hash-table

Re: [Chicken-users] unbound variable: make-hash-table

2010-07-09 Thread Jim Ursetto
(use srfi-69) On Jul 9, 2010, at 11:44, Martin DeMello martindeme...@gmail.com wrote: What's going wrong here? $ cat t.scm (define *hash* (make-hash-table)) $ csi t.scm ; loading t.scm ... #;1 *hash* #hash-table (0) $ csc t.scm $ ./t Error: unbound variable: make-hash-table

Re: [Chicken-users] unbound variable: make-hash-table

2010-07-09 Thread Jim Ursetto
Martin, feel free to join us on freenode on #chicken as well, we can answer all kinds of questions there. On Jul 9, 2010, at 12:04, Mario Domenech Goulart mario.goul...@gmail.com wrote: Hi Martin On Fri, 9 Jul 2010 22:14:09 +0530 Martin DeMello martindeme...@gmail.com wrote: What's

Re: [Chicken-users] unbound variable: make-hash-table

2010-07-09 Thread Martin DeMello
Thanks, Jim and Mario! And thanks for the pointer to the IRC channel, will drop by if I have any more questions. martin On Fri, Jul 9, 2010 at 11:13 PM, Jim Ursetto zbignie...@gmail.com wrote: Martin, feel free to join us on freenode on #chicken as well, we can answer all kinds of questions

Re: [Chicken-users] unbound variable: export

2006-10-23 Thread felix winkelmann
On 10/23/06, Andreas Zwinkau [EMAIL PROTECTED] wrote: On Mon, 23 Oct 2006 08:20:51 +0200 felix winkelmann [EMAIL PROTECTED] wrote: Can you provide the exact compilation instructions you used to build cackle-base.so? Just csc -s cackle-base.scm. I uploaded the relevant files to

[Chicken-users] unbound variable: export

2006-10-21 Thread Andreas Zwinkau
I'm trying to build an egg, but can't get a working shared library: csi cackle-base.so Version 2, Build 3 - linux-unix-gnu-x86 - [ dload ptables ] (c)2000-2005 Felix L. Winkelmann ; loading cackle-base.so ... ; loading /usr/lib/chicken/http-server.so ... ; loading library regex

Re: [Chicken-users] unbound variable: export

2006-10-21 Thread felix winkelmann
On 10/21/06, Andreas Zwinkau [EMAIL PROTECTED] wrote: I'm trying to build an egg, but can't get a working shared library: csi cackle-base.so Version 2, Build 3 - linux-unix-gnu-x86 - [ dload ptables ] (c)2000-2005 Felix L. Winkelmann ; loading cackle-base.so ... ; loading

Re: [Chicken-users] unbound variable: export

2006-10-21 Thread Andreas Zwinkau
How exactly are you using export? $ cat cackle-base.scm (define-extension cackle-base) (include cackle-server.scm) [...] $ cat cackle-server.scm (use http-server http-utils) (declare (export cackle:server)) [...] If you compiled cackle-base.scm with the -shared option, load-library will