Re: [Chicken-users] Changes to Svnwiki's extensions system coming

2008-11-10 Thread felix winkelmann
On Mon, Nov 10, 2008 at 9:41 PM, Alejandro Forero Cuervo >

>
> However, I would like to include the body of the
> svnwiki-extensions-init function directly in the svnwiki-extensions
> egg, so that it suffices for the caller to (use svnwiki-extensions).
>
> However, this will result in a loop:
>
> 1. Caller: (use svnwiki-extensions)
>
> 2. svnwiki-extensions, as part of the above for-each: (require
> "svnwiki-foo")
>
> 3. svnwiki-foo, which requires macros and symbols from
> svnwiki-extensions: (use svnwiki-extensions)
>
> 4. Back to #2.
>
> That's the problem I was refering to.  :-)
>

Ah, ok. Now, the circularity is introduced expicitly here, so there
is not much we can do, but splitting the svnwiki-extensions
extension into separate parts, one that provides macros and
support stuff ("svnwiki-utils" ?) and one that explicitly loads the
svnwiki extensions. Note that your are running a nested extension
system inside the existing one. Could you perhaps put each svnwiki-
extension into a separately installed (not separately distributed)
egg? All you need to do is have multiple "install-extension" forms
in your .setup script. You then load the svnwiki-extensions one by one
using the usual require/use/require-extension mechanism.


cheers,
felix


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


Re: [Chicken-users] Changes to Svnwiki's extensions system coming

2008-11-10 Thread Alejandro Forero Cuervo
> > (but there's a problem: sometimes svnwiki-foo will "(use
> > svnwiki-extensions)" to get macros defined there, but the
> > svnwiki-extensions will load svnwiki-foo again and a loop will
> > result; I may be able to fix this in the future, in which case
> > svnwiki-extensions-init will become a no-op).
> 
> You could check extensions for being installed with
> "extension-information" (to test for specific eggs). Alternatively,
> grab the directory contents with "(glob (make-pathname
> (repository-path) "svnwiki-*" "setup-info"))".

This solves a problem other than the one I was refering to.  This particular
problem I'm solving by having all the chicken-eggs that want svnwiki-extensions
to load them create a file in repository-path/svnwiki-extensions-register named
after them.  I then do:

(define (svnwiki-extensions-init)
  (for-each (lambda (name)
  (require (string-append "svnwiki-" name)))
(directory (make-pathname (repository-path) 
"svnwiki-extensions-registry"

And then the caller does:

  (use svnwiki-extensions)
  (svnwiki-extensions-init)

However, I would like to include the body of the
svnwiki-extensions-init function directly in the svnwiki-extensions
egg, so that it suffices for the caller to (use svnwiki-extensions).

However, this will result in a loop:

1. Caller: (use svnwiki-extensions)

2. svnwiki-extensions, as part of the above for-each: (require
"svnwiki-foo")

3. svnwiki-foo, which requires macros and symbols from
svnwiki-extensions: (use svnwiki-extensions)

4. Back to #2.

That's the problem I was refering to.  :-)

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] need regex benchmark

2008-11-10 Thread Alex Shinn
Tobia Conforto <[EMAIL PROTECTED]> writes:

> felix winkelmann wrote:
>> Does someone know of a good regex benchmark
>
> Yes. The file perltestdata in Edi Weitz's
> http://weitz.de/files/cl-ppcre.tar.gz contains a big PCRE stress test
> (15,000 tests) already formatted for  lisp.
>
> Every line of the file contains a s-expr with the following fields:
> - numeric id
> - the test in perl syntax, for cross-language benchmarking
> - the regular expression under test
> - case-insensitive?
> - multi-line?
> - single-line?
> - verbose?
> - target string
> - error-expected?
> - expected-match
> - expected-registers

Thanks, I'll take a look at those tests, but they're likely
to have a lot of duplicates with the existing test suite.

What Felix is looking for, however, is a benchmark.
CL-PPCRE used to have benchmarks, but they weren't very
good, and don't even seem to be available anymore.  The
shootout benchmark is a joke.

I'll be working on comprehensive benchmarks for the next
release of irregex.  In the meantime, I think a simple
collection of common regular expressions and usage patterns
in existing Chicken code would help to reassure people :)

-- 
Alex


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


Re: [Chicken-users] need regex benchmark

2008-11-10 Thread Tobia Conforto

felix winkelmann wrote:

Does someone know of a good regex benchmark


Yes. The file perltestdata in Edi Weitz's http://weitz.de/files/cl-ppcre.tar.gz 
 contains a big PCRE stress test (15,000 tests) already formatted for  
lisp.


Every line of the file contains a s-expr with the following fields:
- numeric id
- the test in perl syntax, for cross-language benchmarking
- the regular expression under test
- case-insensitive?
- multi-line?
- single-line?
- verbose?
- target string
- error-expected?
- expected-match
- expected-registers

Just remember to (define t #t) and (define nil #f) or such ;-]


HTH
Tobia


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


Re: [Chicken-users] chicken-setup failiing to install egg

2008-11-10 Thread Peter Bex
On Mon, Nov 10, 2008 at 10:53:08AM +0100, Alejandro Forero Cuervo wrote:
> > Good to see you.
> 
> Thanks. :-)

yep, good to see you're back!

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
-- Donald Knuth


pgpRsYXin4P1v.pgp
Description: PGP signature
___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


Re: [Chicken-users] Changes to Svnwiki's extensions system coming

2008-11-10 Thread Alejandro Forero Cuervo
> >   By the way, I did a fresh installation of svnwiki today, and it
> > appears that any extensions using SRFI-40 streams no longer work. For
> > example, the svnwiki-post-commit script bombs with the error below
> > when trying the commit the Nameless Wiki for the first time. Any
> > references to the SRFI-40 procedures like stream-cons, stream-delay
> > and so on, result in the unbound variable error. Any ideas what's
> > going on? 
> 
> Things (ie. svnwiki/trunk) are currently broken!  I am making
> significant changes to the code.  I'll update this thread once I
> consider the trunk stable enough for general use.
> 
> I think the best option should be to continue using r13754 for the
> Svnwiki repository and r10471 for the release/3/stream-wiki/trunk
> directory in the chicken-eggs repository.  That should work.
> 
> Sorry for the confusion.

Oh, and I forgot to say: on an older version of Chicken.  The most
recent one that I've used is 2.732.

(I'm trying to get everything working with 3.4.0, which, while not
very difficult, is not trivial.  I should be comitting all my changes
tonight or the tomorrow's night.)

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] chicken-setup failiing to install egg

2008-11-10 Thread Alejandro Forero Cuervo
> Good to see you.

Thanks. :-)

I had neglected Svnwiki for a few months for no particular reason.  I
guess the disagreement we had about how eggs should be handled was
frustrating for me so partially I decided to take a break and
partially I just got caught on other things (what you could call
"personal reasons", but there was nothing in particular).

I've felt great this last week starting to work on Svnwiki (and its
associated eggs) again.  I felt that in very little time I managed to
do a lot of things that I should have done before but that I just
never managed to get myself to start (such as fixing the whole Svnwiki
extension system once and for all or implementing most of the
mail-spec functionality which I've been mising for a while).  The code
(in the current form) is broken, but once I finish fixing it it should
be in a significantly better shape.  I've even discovered and fixed
some bugs in the previous (currently stable) version.

All of this just to say that I intend to become as active as I was (in
developing Svnwiki and related eggs) again.

> I hope we can get rid quickly of all the breakage that we seem to
> have created... I apologize for this mess.

Well, you know that you don't need to apologize.  Temporary breakage
is a cost of major changes, which are required to improve certain
things in important ways.  And, in any case, it is a pleasure to
develope in this awesome mess of a platform that we have.  :-)

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] chicken-setup failiing to install egg

2008-11-10 Thread Alejandro Forero Cuervo
> Indeed a bug, can you run chicken-setup once again with the
> "-verbose" flag given?

Sure:

$ /opt/chicken-3*/bin/chicken-setup -verbose readline
  creating directory `/tmp/chicken-setup-3-root/build.4947.readline.egg-dir'
changing working directory to 
`/tmp/chicken-setup-3-root/build.4947.readline.egg-dir'
Error: (open-input-file) can not open file - No such file or directory: 
"/tmp/chicken-setup-3-root/downloads/readline.egg"

Thanks! :-)

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] Changes to Svnwiki's extensions system coming

2008-11-10 Thread Alejandro Forero Cuervo
>   By the way, I did a fresh installation of svnwiki today, and it
> appears that any extensions using SRFI-40 streams no longer work. For
> example, the svnwiki-post-commit script bombs with the error below
> when trying the commit the Nameless Wiki for the first time. Any
> references to the SRFI-40 procedures like stream-cons, stream-delay
> and so on, result in the unbound variable error. Any ideas what's
> going on? 

Things (ie. svnwiki/trunk) are currently broken!  I am making
significant changes to the code.  I'll update this thread once I
consider the trunk stable enough for general use.

I think the best option should be to continue using r13754 for the
Svnwiki repository and r10471 for the release/3/stream-wiki/trunk
directory in the chicken-eggs repository.  That should work.

Sorry for the confusion.

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] Changes to Svnwiki's extensions system coming

2008-11-10 Thread Ivan Raikov

  I tried using two require-extension forms, but the result is the
same. I think the svnwiki sources are compiled with -R syntax-case, so
I think something else must be going on here.

   -Ivan


"felix winkelmann" <[EMAIL PROTECTED]> writes:

> The "syntax-case" extension replaces the macro-expander. As the current
> toplevel form (the "require-extension") is still being processed, the
> expander will only be active on the *next* toplevel form. Try to use
> two require-extension forms, or load the syntax-case expander into
> the compiler with "-R syntax-case".


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