Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread Graham Fawcett

On 3/8/07, Alejandro Forero Cuervo <[EMAIL PROTECTED]> wrote:

> Out of curiosity --- if an egg doesn't have a 'tags' (and 'trunk')
> directory, it is possible to modify it so that it does?

Not only possible, it is also worthwhile. :-)

You can do this by doing:

[snip]

Excellent -- thank you, Alejo, that looks very easy.

Graham


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread Alejandro Forero Cuervo
> Out of curiosity --- if an egg doesn't have a 'tags' (and 'trunk')
> directory, it is possible to modify it so that it does?

Not only possible, it is also worthwhile. :-)

You can do this by doing:

  cd $EGG
  mkdir trunk tags
  svn add trunk tags
  for file in *; do svn mv $file trunk; done;
  svn commit -m "Moving all the code to the trunk."

Commit and then follow the instructions in “Making a release” at:

  http://chicken.wiki.br/eggs%20tutorial#Making%20a%20new%20release

That should do it. :-)

Alejo.
http://azul.freaks-unidos.net/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: hart.egg

2007-03-08 Thread Hans Bulfone
hi,

On Thu, Mar 08, 2007 at 12:40:48PM +0100, felix winkelmann wrote:
> On 3/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:
> >>
> >> except that i'm getting this message while compiling hart :)
> >>
> >> Warning: declarations are ignored in interpreted code
> >> (##core#declare (quote (export hart-parse hart-html-escape 
> >hart-vector-for-each*)))
> >
> >Odd; it's not happening for me here (Version 2.514 -
> >linux-unix-gnu-x86). I'll try on 2.6 later.
> 
> If you use -X , it probably prefers to use an already installed
> (compiled) version. For someone installing without a preinstalled
> (perhaps older) version, the source file will be prefered. To ensure
> the local version is used use "-X .scm".

i can confirm that the warning goes away when hart is already installed.

actually it's the (use hart-support) in hart.scm that causes the already
installed hart-support.so to be loaded (which doesn't matter because
it's imho not needed in this case as -X hart.scm is only required for the
hart-for macro, as far as i understand)

bye,
hans.


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Re: hart.egg

2007-03-08 Thread Hans Bulfone
hi,

On Thu, Mar 08, 2007 at 06:31:50AM -0500, Graham Fawcett wrote:
> OK, I've added (begin: ...). BTW, one of these days I plan to add a
> (define-hart-keyword) procedure so you can write application-specific
> keyword forms.

sounds great!

> I've also modified the parser and macros to accept multiple
> expressions. So you can now write:
> 
> (hart (raw: "  (html (body ...)))
> 
> as you suggested. Please update from svn and let me know how it works for 
> you.

works fine, tnx!

imho you can do (for-each hart-parse-form body) instead of
(hart-emit (apply hart-parse body)) in the definition of (begin...)
which generates more efficient code:

#;2> ,x (hart (html (begin: "foo" (a "test") (t: x) 99)))
(noop (begin
(print* "footest")
(apply print* (map hart-html-escape (list x)))
(print* "99")))

vs

#;10> ,x (hart (html (begin: "foo" (a "test") (t: x) 99)))
(noop (begin
(print* "")
(begin
  (print* "footest")
  (apply print* (map hart-html-escape (list x)))
  (print* "99"))
(print* "")))

bye,
hans.


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] syntax-case macros as extensions?

2007-03-08 Thread Raffael Cavallaro


On Mar 8, 2007, at 5:28 AM, felix winkelmann wrote:


 Then you have to
make those macros available at _compile-time_, or the
compiler will not see them. "(require ...)" loads code at run-time,
not at compile-time. Try "require-for-syntax".


A somewhat related question: I have some macros that are defined with  
define-syntax using the syntax-case extension. I can't seem to make  
these macros into an extension that is usable at runtime in csi. I  
can load the .scm file just fine, and then the macros work in csi,  
but If I try to compile these into an extension, when I load it I get  
unbound variable errors.


Here's a simple example:

--- dotimes.scm -

(require-for-syntax 'syntax-case)

(define-syntax dotimes
  (syntax-rules ()
((dotimes (var limit) e ...)
 (let loop ((var 0))
   (if (< var limit) (begin e ... (loop (+ 1 var


-- end dotimes.scm 

;;; I suspect that I'm not quite doing the right thing in this setup  
file



-- dotimes.setup ---

(compile -s dotimes.scm)
(install-extension 'dotimes "dotimes.so"
'((syntax) (require-at-runtime syntax-case)))

- end dotimes.setup ---


;; when simply loaded, dotimes.scm works as expected:

  //  /
___ (______ ( ___  ___
||   )| ||___)|___)|   )
|__  |  / | |__  | \  |__  |  /

Version 2.6 - macosx-unix-gnu-x86 - [ libffi dload ptables applyhook ]
(c)2000-2007 Felix L. Winkelmann
#;1> (load "/scheme/dotimes.scm")
; loading /scheme/dotimes.scm ...
; loading /usr/local/lib/chicken/1/syntax-case.so ...
; loading /usr/local/lib/chicken/1/syntax-case-chicken-macros.scm ...
#;2> (dotimes (n 10) (display n))
0123456789


;; when required-for-syntax or used as an extension, it throws an  
unbound variable error:


  //  /
___ (______ ( ___  ___
||   )| ||___)|___)|   )
|__  |  / | |__  | \  |__  |  /

Version 2.6 - macosx-unix-gnu-x86 - [ libffi dload ptables applyhook ]
(c)2000-2007 Felix L. Winkelmann
#;1> (require-for-syntax 'dotimes)
; loading /usr/local/lib/chicken/1/dotimes.so ...
; loading /usr/local/lib/chicken/1/syntax-case.so ...
; loading /usr/local/lib/chicken/1/syntax-case-chicken-macros.scm ...
#;2> (dotimes (n 10) (display n))
Error: unbound variable: n

Call history:

  (dotimes (n (quote 10)) (display n))
  (n (quote 10))
  (quote 10)
  (display n)
(dotimes (n (quote 10)) (display n))
(n (quote 10))  <--

;; same with require-extension instead of require-for-syntax:

  //  /
___ (______ ( ___  ___
||   )| ||___)|___)|   )
|__  |  / | |__  | \  |__  |  /

Version 2.6 - macosx-unix-gnu-x86 - [ libffi dload ptables applyhook ]
(c)2000-2007 Felix L. Winkelmann
#;1> (require-extension dotimes)
; loading /usr/local/lib/chicken/1/dotimes.so ...
; loading /usr/local/lib/chicken/1/syntax-case.so ...
; loading /usr/local/lib/chicken/1/syntax-case-chicken-macros.scm ...
#;2> (dotimes (n 10) (display n))
Error: unbound variable: n

Call history:

  (dotimes (n (quote 10)) (display n))
  (n (quote 10))
  (quote 10)
  (display n)
(dotimes (n (quote 10)) (display n))
(n (quote 10))  <--


Any idea what I'm doing wrong in the setup?

regards,

Ralph


Raffael Cavallaro, Ph.D.
[EMAIL PROTECTED]



___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Problem with sqlite3 egg on MinGW Chicken 2.6

2007-03-08 Thread Ian Oversby

The sqlite3 egg 1.5.6+ requires the synch egg 1.0+.

(At some point the .setup files for the eggs will be changed to state
the required versions but for now you must do it manually.)

Sorry,
Kon


Unfortunately, I couldn't figure out how to do this, and it seems I've made
it worse :-/  I added (require-at-runtime synch) to the setup file and now
it no longer even finds sqlite3:open.  install-extension section now looks
like this:

(install-extension
 'sqlite3
 `(,so-file
   "sqlite3.html" "egg.jpg")
 '((version "1.5.7") (require-at-runtime synch) (documentation
"sqlite3.html")))

Ian


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread minh thu

2007/3/8, Alejandro Forero Cuervo <[EMAIL PROTECTED]>:

> >What if the directory contains multiple eggs ?
> >I ask this because I think I'll end up with lot of eggs for the
> >gl-suite project.
> >Is it better to have, gl-display-*, gl-font, gl-math, gl-repl,
> >gl-samples, gl-etcaetera,
> >or simply gl-suite ?
> >(If the former, Felix, prepare to have more request from me:)
>
> On directory, one egg, please.

Yeah, I totally agree: no directory in Chicken-eggs should have more
than one egg.



:) Fine
thu


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread Alejandro Forero Cuervo
> >What if the directory contains multiple eggs ?
> >I ask this because I think I'll end up with lot of eggs for the
> >gl-suite project.
> >Is it better to have, gl-display-*, gl-font, gl-math, gl-repl,
> >gl-samples, gl-etcaetera,
> >or simply gl-suite ?
> >(If the former, Felix, prepare to have more request from me:)
> 
> On directory, one egg, please.

Yeah, I totally agree: no directory in Chicken-eggs should have more
than one egg.

Alejo.
http://azul.freaks-unidos.net/


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: hart.egg

2007-03-08 Thread Graham Fawcett

On 3/8/07, felix winkelmann <[EMAIL PROTECTED]> wrote:

If you use -X , it probably prefers to use an already installed
(compiled) version. For someone installing without a preinstalled
(perhaps older) version, the source file will be prefered. To ensure
the local version is used use "-X .scm".


Thanks, felix -- I didn't know that. I'll give it a try.

Graham


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread felix winkelmann

On 3/8/07, minh thu <[EMAIL PROTECTED]> wrote:


What if the directory contains multiple eggs ?
I ask this because I think I'll end up with lot of eggs for the
gl-suite project.
Is it better to have, gl-display-*, gl-font, gl-math, gl-repl,
gl-samples, gl-etcaetera,
or simply gl-suite ?
(If the former, Felix, prepare to have more request from me:)



On directory, one egg, please.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread minh thu

2007/3/8, felix winkelmann <[EMAIL PROTECTED]>:

On 3/7/07, Alejandro Forero Cuervo <[EMAIL PROTECTED]> wrote:
>
> egg-post-commit should only automatically upload an egg if (1) it
> detects a change in the directory for the egg's latest release and (2)
> the egg's directory doesn't have the 'autoupdate' Subversion property
> set to 'no'.
>
> The directory for an egg's latest release would be:
>
> 1. If the egg has a 'tags' directory,
>
> 1.1. If the 'tags' directory has a 'latest' property set to 'foo',
> the directory is 'tags/foo'.
>
> 1.2. Otherwise, the directory under 'tags' corresponding to the
> greatest version number.
>
> 2. The egg's directory.
>

I'll do it exactly that way.


Hi,

What if the directory contains multiple eggs ?
I ask this because I think I'll end up with lot of eggs for the
gl-suite project.
Is it better to have, gl-display-*, gl-font, gl-math, gl-repl,
gl-samples, gl-etcaetera,
or simply gl-suite ?
(If the former, Felix, prepare to have more request from me:)

Cheers,
thu


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread felix winkelmann

On 3/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:


Out of curiosity --- if an egg doesn't have a 'tags' (and 'trunk')
directory, it is possible to modify it so that it does?



Yes, you can restructure your egg directory with "svn mv", for example.


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: hart.egg

2007-03-08 Thread felix winkelmann

On 3/8/07, Graham Fawcett <[EMAIL PROTECTED]> wrote:

>
> except that i'm getting this message while compiling hart :)
>
> Warning: declarations are ignored in interpreted code
> (##core#declare (quote (export hart-parse hart-html-escape 
hart-vector-for-each*)))

Odd; it's not happening for me here (Version 2.514 -
linux-unix-gnu-x86). I'll try on 2.6 later.


If you use -X , it probably prefers to use an already installed
(compiled) version. For someone installing without a preinstalled
(perhaps older) version, the source file will be prefered. To ensure
the local version is used use "-X .scm".


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Re: [Chicken-hackers] egg-post-commit

2007-03-08 Thread Graham Fawcett

On 3/8/07, felix winkelmann <[EMAIL PROTECTED]> wrote:

On 3/7/07, Alejandro Forero Cuervo <[EMAIL PROTECTED]> wrote:
>
> egg-post-commit should only automatically upload an egg if (1) it
> detects a change in the directory for the egg's latest release and (2)
> the egg's directory doesn't have the 'autoupdate' Subversion property
> set to 'no'.
>
> The directory for an egg's latest release would be:
>
> 1. If the egg has a 'tags' directory,
> [snip]
I'll do it exactly that way.


Out of curiosity --- if an egg doesn't have a 'tags' (and 'trunk')
directory, it is possible to modify it so that it does?

Thanks,
Graham


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] Re: hart.egg

2007-03-08 Thread Graham Fawcett

Hi Hans,

On 3/6/07, Hans Bulfone <[EMAIL PROTECTED]> wrote:

On Mon, Mar 05, 2007 at 07:08:38PM -0500, Graham Fawcett wrote:
thank you for the quick update!


You're welcome!


> I ended up just adding (use hart-support) into hart.scm. This seems to
> address the problem in the interpreter and compiler both.

yes, works fine for me.

except that i'm getting this message while compiling hart :)

Warning: declarations are ignored in interpreted code
(##core#declare (quote (export hart-parse hart-html-escape 
hart-vector-for-each*)))


Odd; it's not happening for me here (Version 2.514 -
linux-unix-gnu-x86). I'll try on 2.6 later.


how about a (begin: ...) form?
that would also be useful for if: if the branches
contain more than one html tag (of course, as you pointed out,
one could also just use let: )


OK, I've added (begin: ...). BTW, one of these days I plan to add a
(define-hart-keyword) procedure so you can write application-specific
keyword forms.

I've also modified the parser and macros to accept multiple
expressions. So you can now write:

(hart (raw: "http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] compiled program with macros raises unbound-variable error

2007-03-08 Thread foobar
felix winkelmann schrieb:
> On 3/8/07, foobar <[EMAIL PROTECTED]> wrote:
>> Hi list,
>>
>> i've tried to compile a file that uses some macros defined with
>> syntax-rules.
>> I compiled it using: csc -R tinyclos foo.scm
>> So nothing special sofar.
>> The file compiles without warnings or errors.
>>
>> Another file compiled to a shared-library
>> using csc -s cps.scm.
>> This file requires the macros via
>> (require 'cps-syntax).
>
> Is cps-syntax a  source file containing macros? 
yes.
> Then you have to
> make those macros available at _compile-time_, or the
> compiler will not see them. "(require ...)" loads code at run-time,
> not at compile-time. Try "require-for-syntax".
I tried it and it worked :) Thanks very much.
I didn't know that there is a special syntax for such things.
I tried it using csc -run-time-macros but that didn't work
either.
I'll consult the manual for the various forms to require files.

greets
certainty




___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] compiled program with macros raises unbound-variable error

2007-03-08 Thread felix winkelmann

On 3/8/07, foobar <[EMAIL PROTECTED]> wrote:

Hi list,

i've tried to compile a file that uses some macros defined with
syntax-rules.
I compiled it using: csc -R tinyclos foo.scm
So nothing special sofar.
The file compiles without warnings or errors.

Another file compiled to a shared-library
using csc -s cps.scm.
This file requires the macros via
(require 'cps-syntax).


Is cps-syntax a  source file containing macros? Then you have to
make those macros available at _compile-time_, or the
compiler will not see them. "(require ...)" loads code at run-time,
not at compile-time. Try "require-for-syntax".


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


[Chicken-users] compiled program with macros raises unbound-variable error

2007-03-08 Thread foobar
Hi list,

i've tried to compile a file that uses some macros defined with
syntax-rules.
I compiled it using: csc -R tinyclos foo.scm
So nothing special sofar.
The file compiles without warnings or errors.

Another file compiled to a shared-library
using csc -s cps.scm.
This file requires the macros via
(require 'cps-syntax).

This 'cps'-file is then required
by the mainfile via (require 'cps).

The file in question doesn't use the macros
but procedures from cps.scm/so which
inturn use the macros.


When i try to run the main-file i get:
Error: unbound variable: make-problem

Where 'make-problem' is a macro defined in cps-syntax.

I assumed that all macros were expanded during compilation
and only the expanded version is inserted into the code prior
to the final compilation to c and then to systembinary.
But appearently that's not the case.

What am i missing here?
Any hints are very much appreciated.

Best regards
certainty


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users