[Chicken-users] macroexpand-1 not expanding a macro(?)

2008-02-27 Thread Peter Wright
Hi all, This is probably something really obvious, but I just can't work it out. I borrowed (and adapted) the example from the Common Lisp Hyperspec (http://www.lisp.org/HyperSpec/Body/fun_macroexpa_acroexpand-1.html), as I couldn't seem to google up an example of macroexpand-1 in any Scheme,

[Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Robin Lee Powell
I'm thinking of starting a .com; probably not an especially Web 2.0 sort of one, but maybe with some Ajax involved. I seem to be more comfortable with Lisps than anything else. Are there any compelling reasons to choose a Lisp other than Chicken (my current best-known) for that sort of thing?

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Peter Bex
On Wed, Feb 27, 2008 at 03:35:36PM -0300, Alex Queiroz wrote: On Wed, Feb 27, 2008 at 2:29 PM, Robin Lee Powell [EMAIL PROTECTED] wrote: Are there any compelling reasons to choose a Lisp other than Chicken (my current best-known) for that sort of thing? If you plan to use the

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Alex Queiroz
Hallo, On Wed, Feb 27, 2008 at 4:08 PM, Peter Bex [EMAIL PROTECTED] wrote: This is no longer true according to David. He tells me he has fixed sendfile so it will work in Windows. Or is there something else that prevents Spiffy from working under Windows? If so, please create a ticket

[Chicken-users] DBI

2008-02-27 Thread Ozzi Lee
Has anyone looked into creating a DBI egg yet? I started a wiki page with the barest outline of a proposal for one: http://chicken.wiki.br/dbi Let me know what you think. If someone's already got something going I'd like to pitch in as well. ___

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread John Cowan
Alejandro Forero Cuervo scripsit: Another thing I found useful was using what we call the pre-rendered model: http://wiki.freaks-unidos.net/pre-rendered%20model Somewhat more globally known as baked not fried. http://www.reutershealth.com , which I worked on from 1999 to 2005, is 100% baked

Re: [Chicken-users] DBI

2008-02-27 Thread John Cowan
Ozzi Lee scripsit: Let me know what you think. If someone's already got something going I'd like to pitch in as well. I suggest that a row be an a-list, and that null columns be represented by being non-existent in the a-list. If you end up preferring a plain list or a vector, then use

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread david krentzlin
On Wed, 27 Feb 2008 16:12:39 -0300 Alex Queiroz [EMAIL PROTECTED] wrote: Hallo, On Wed, Feb 27, 2008 at 4:08 PM, Peter Bex [EMAIL PROTECTED] wrote: This is no longer true according to David. He tells me he has fixed sendfile so it will work in Windows. Or is there something else

Re: [Chicken-users] DBI

2008-02-27 Thread Ozzi Lee
I suggest that a row be an a-list, and that null columns be represented by being non-existent in the a-list. If you end up preferring a plain list or a vector, then use (void) instead -- I am trying to get this standardized as the Chicken representation of SQL's NULL. I like a-lists as rows

Re: [Chicken-users] DBI

2008-02-27 Thread Jeremy Sydik
I've been working a little in the same vein, but it's still pretty tied to a specific project My needs are pretty light, but I'm finding that the most useful functions seem to be sql:query-list and sql:query-alist I started out thinking in terms of Perl/Python type DBI, but I'm

Re: [Chicken-users] DBI

2008-02-27 Thread Peter Bex
On Wed, Feb 27, 2008 at 02:40:54PM -0600, Ozzi Lee wrote: In reality, though, I think portability between databases is more hypothetical than real. Projects typically start with one database and stick to it, for moving between databases *even if a portability layer is in use* turns out to

Re: [Chicken-users] DBI

2008-02-27 Thread Peter Bex
On Wed, Feb 27, 2008 at 02:47:14PM -0600, Jeremy Sydik wrote: I've been working a little in the same vein, but it's still pretty tied to a specific project My needs are pretty light, but I'm finding that the most useful functions seem to be sql:query-list and sql:query-alist I'd

Re: [Chicken-users] DBI

2008-02-27 Thread Ozzi Lee
Jeremy Sydik wrote: I've been working a little in the same vein, but it's still pretty tied to a specific project My needs are pretty light, but I'm finding that the most useful functions seem to be sql:query-list and sql:query-alist I started out thinking in terms of Perl/Python type DBI,

Re: [Chicken-users] DBI

2008-02-27 Thread Graham Fawcett
On Wed, Feb 27, 2008 at 4:04 PM, Peter Bex [EMAIL PROTECTED] wrote: I've tended to let null be '(), but that partly comes from liking the look of (null? (alist-ref 'field result)) I'm not entirely comfortable with leaving the value entirely absent simply because the mapping I

Re: [Chicken-users] DBI

2008-02-27 Thread Graham Fawcett
On Wed, Feb 27, 2008 at 4:04 PM, Peter Bex [EMAIL PROTECTED] wrote: On Wed, Feb 27, 2008 at 02:47:14PM -0600, Jeremy Sydik wrote: dbi:query-fold, dbi:query-map, query-for-each. I thought about implementing these, but I haven't been able to think of the use case that makes them

Re: [Chicken-users] DBI

2008-02-27 Thread Peter Bex
On Wed, Feb 27, 2008 at 04:23:37PM -0500, Graham Fawcett wrote: Can you even check for void? Afaik there's no VOID? procedure. You can; just compare with another (void) value: (define void? (cute eq? (void) )) That sounds rather brittle. Afaik void is defined as no value. One possible

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Vincent Manis
On 2008 Feb 27, at 10:45, Graham Fawcett wrote: ... So if you're going RDBMS, I'd pick one database and stick with it, or help write a common dbapi framework. This seems a meritorious project, and not very difficult (just steal the Python API, and Scheme-ize it). Is there any interest in

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Jim Ursetto
On 2/27/08, Graham Fawcett [EMAIL PROTECTED] wrote: Personally, I don't use Spiffy; I wrote a custom framework instead. Would you mind expanding a little on your custom framework and whether it resides behind another webserver via mod_proxy, scgi, fastcgi, cgi, or is itself the main webserver?

Re: [Chicken-users] DBI

2008-02-27 Thread Vincent Manis
On 2008 Feb 27, at 12:11, John Cowan wrote: In reality, though, I think portability between databases is more hypothetical than real. Projects typically start with one database and stick to it, for moving between databases *even if a portability layer is in use* turns out to be hard -- all

void as a return value (Re: [Chicken-users] DBI)

2008-02-27 Thread Vincent Manis
\begin{rant} On the subject of using void as a return value (rather than to indicate that a function or method doesn't return anything), E. Please, please, don't ever write functions that return void as anything other than an indication that no value was returned. #;44 (car

Re: void as a return value (Re: [Chicken-users] DBI)

2008-02-27 Thread Ozzi
Vincent Manis wrote: \begin{rant} On the subject of using void as a return value (rather than to indicate that a function or method doesn't return anything), E. Please, please, don't ever write functions that return void as anything other than an indication that no value was returned.

Re: argument against using '() for null values? ([Chicken-users] DBI)

2008-02-27 Thread Ozzi
I suggest that a row be an a-list, and that null columns be represented by being non-existent in the a-list. If you end up preferring a plain list or a vector, then use (void) instead -- I am trying to get this standardized as the Chicken representation of SQL's NULL. Is there an argument

Re: argument against using '() for null values? ([Chicken-users] DBI)

2008-02-27 Thread Jeremy Sydik
Thinking more about it, I'm leaning MORE toward '() than before. I also like relying on a representation that's standard scheme rather than one that's specifically part of Chicken if we have the choice (and we do) On Feb 27, 2008, at 5:29 PM, Ozzi wrote: I suggest that a row be an a-list,

Re: [Chicken-users] Unfair question: best Lisp for web development?

2008-02-27 Thread Robin Lee Powell
On Wed, Feb 27, 2008 at 09:29:08AM -0800, Robin Lee Powell wrote: I'm thinking of starting a .com; probably not an especially Web 2.0 sort of one, but maybe with some Ajax involved. I seem to be more comfortable with Lisps than anything else. Are there any compelling reasons to choose a

Re: argument against using '() for null values? ([Chicken-users] DBI)

2008-02-27 Thread Graham Fawcett
On Wed, Feb 27, 2008 at 6:33 PM, Jeremy Sydik [EMAIL PROTECTED] wrote: Thinking more about it, I'm leaning MORE toward '() than before. I also like relying on a representation that's standard scheme rather than one that's specifically part of Chicken if we have the choice (and we do)

Re: argument against using '() for null values? ([Chicken-users] DBI)

2008-02-27 Thread Graham Fawcett
On Wed, Feb 27, 2008 at 8:29 PM, Ozzi [EMAIL PROTECTED] wrote: Three that I can think of: 1) It would make alist representations ugly: (query select foo, NULL as bar, baz from stuff) = ((foo . 1) (bar) (baz . a string)) This doesn't bother me. 2) It is not a disjoint type.

Re: [Chicken-users] Syntax of case expressions

2008-02-27 Thread Matt Gushee
Ivan Raikov wrote: Remember that in Scheme, (define foo 'a) is a shortcut for (define (define foo (quote a))) -- quote is a special form, and not a part of the literal. So you in your case statement you are not matching the symbol a, you are actually matching the symbol 'a (the apostrophe is

Re: [Chicken-users] Syntax of case expressions

2008-02-27 Thread Matt Gushee
Matt Gushee wrote: isn't a syntax error? Is it because 'a expands to (quote a), and is thus treated by case as a list of the symbols quote and a? And if so, is that correct behavior? After all, csi (pair? 'a) #f (as I expected). [with apologies for replying to myself] Oh, wait: csi

Re: [Chicken-users] Syntax of case expressions

2008-02-27 Thread Ivan Raikov
Well, R5RS does not specify what happens in the second case, so you can consider it a feature :-) Matt Gushee [EMAIL PROTECTED] writes: Wait a minute, though. I understand now why (('a) ...) didn't match, but how is it that ('a ...) isn't a syntax error? Is it because 'a

Re: void as a return value (Re: [Chicken-users] DBI)

2008-02-27 Thread John Cowan
Vincent Manis scripsit: Please, please, don't ever write functions that return void as anything other than an indication that no value was returned. If no value is returned, you should use (values), which genuinely returns no values and is distinguishable by call-with-values or any of the

Re: argument against using '() for null values? ([Chicken-users] DBI)

2008-02-27 Thread Ozzi
Vectors are currently used in the Postgres egg to represent date-time values. Not saying it's good, but there it is. (BTW, a dbapi needs consistent date/time support too...) In Common Lisp, NIL is the same as '(), and both mean false. In Scheme we have an explicit #f. For the same reasons we

[Chicken-users] regex problem

2008-02-27 Thread Daishi Kato
Hi! I got a segfault error. Sorry, I have no access to Trac right now. Daishi CHICKEN Version 3.0.0 - linux-unix-gnu-x86 [ manyargs dload ptables applyhook ] (c)2000-2008 Felix L. Winkelmanncompiled 2008-02-28 on ganglia (Linux) #;1 (use regex) ; loading library regex ... #;2

Re: [Chicken-users] regex problem

2008-02-27 Thread Leonardo Valeri Manera
On 28/02/2008, Daishi Kato [EMAIL PROTECTED] wrote: rlwrap -s 1 /usr/local/chicken-3.0.0/bin/csi Unrelated, but why rlwrap over the readline egg? Just curious. Leo ___ Chicken-users mailing list Chicken-users@nongnu.org

readline (was Re: [Chicken-users] regex problem

2008-02-27 Thread Daishi Kato
There was a certain reason why I use rlwrap over readline, but I forgot what the functionality that works only with rlwrap was. I want to control whether to use readline or not, and I prefer rlwrap csi to csi -n. Daishi At Thu, 28 Feb 2008 07:18:28 +0100, Leonardo Valeri Manera wrote: On

Re: [Chicken-users] nondescript eggs

2008-02-27 Thread felix winkelmann
On Mon, Feb 25, 2008 at 4:21 PM, Daishi Kato [EMAIL PROTECTED] wrote: Hi, swt should be fine if jni works well, but it's not tested and I'm not going to maintain it. On the other hand, I would like to continue to develop wxchicken, which is not complete yet at all, Ok, I'll leave

Re: [Chicken-users] DBI

2008-02-27 Thread felix winkelmann
On Wed, Feb 27, 2008 at 10:31 PM, Peter Bex [EMAIL PROTECTED] wrote: On Wed, Feb 27, 2008 at 04:23:37PM -0500, Graham Fawcett wrote: Can you even check for void? Afaik there's no VOID? procedure. You can; just compare with another (void) value: (define void? (cute eq? (void) ))

Re: [Chicken-users] macroexpand-1 not expanding a macro(?)

2008-02-27 Thread felix winkelmann
On Wed, Feb 27, 2008 at 2:42 PM, Peter Wright [EMAIL PROTECTED] wrote: Hi all, This is probably something really obvious, but I just can't work it out. I borrowed (and adapted) the example from the Common Lisp Hyperspec