[Ecls-list] REGEXP fixed, ECL as well

Juan Jose Garcia Ripoll worm at arrakis.es
Wed Dec 4 10:03:05 UTC 2002


On Wednesday 04 December 2002 16:50, Rolf Wester wrote:
> Hi,
>
> I tried to compile the regexp package that can be found at
> http://www2.worldpbx.com/regexp/ but faced some problems.
>
> 1. defpackage doesn't compile unless I comment out the
>     (:documentation ...  part.

Fixed. Thanks!

> 2. The characters #\Bell and #\Escape result in an
>     "NIL is an illegal character name" error

These are non standard. You can replace them with #.(schar "\a" 0) and
#.(schar "\e" 0).

> 3. After fixing this the c-file is written by ECL but with a
>    syntax error.
>    "gcc -g -O2 ....
>     regexcp.c:51: parse error before ';'
>    line 51 is:
>    CLV1=&CAR(env0=CONS(cl_va_arg(args);,env0));/*  STREAM    */

This error was fixed long ago in CVS. I am still trying to finish the port of
CLX before releasing ECL 0.8. You should give the copy in CVS a try.

> I'm looking for a CL-implementation that makes it possible to create fast
> running code (for heavy numerical simulations) either by compiling the lisp
> code or by easy integration of external C-code.

ECL can integrate C code, but the interface for automatic generation of
functions is limited -- it is restricted to char, int, double and char *
types, IIRC. There is, therefore, a chance that you will have to fix this, or
either write the wrapper to your functions yourself (using defCinline,
defCbody, and so on.)

> [...] Another
> point is that it took some time to find the problems because ECL doesn't
> tell much about the line or function where the problem accures. Is there a
> means to tell ECL to be more verbose?

When compiling, information about line number is lost. Nevertheless, the
compiler lists all functions as they are being compiled, and therefore it is
rather easy to spot the offending function. For instance, the following error
takes place in TEST-REGEXP.

;;; Compiling (DEFUN REPLACE-REGEXP ...).
;;; Compiling (DEFUN TEST-REGEXP ...).
;;; The variable *REGEXP-TEST-DATA* is undefined.
;;; The compiler will assume this variable is a global.
"Vt" is an illegal character name.
Broken at COMPILE-FILE.
REGEXP>> :v

I have attached the patches to compile the REGEXP library. It now passes its
own test suite

> (load "regexp.lisp")

;;; Loading "regexp.lisp"
#P"regexp.lisp"

> (regexp::test-regexp)

70 tests performed with 70 passing and 0 failing.
NIL

> (load "regexp")

;;; Loading "regexp.so"
#P"regexp.so"

> (regexp::test-regexp)

70 tests performed with 70 passing and 0 failing.
NIL

> I would be very appreciative for help because I would like to use ECL as a
> Matlab like environment. I have tried Lush but didn't like that it because
> it's not CL. All the other alternatives have some very restrictive and/or
> slow (Python etc.) languages.

Did you have a look at Yorick? ftp://ftp-icf.llnl.gov/pub/Yorick/
It is nice, but it does not have closures, and it may take you some time to
get used to the language. I have written a library for Yorick, called
SpYorick (see web address below), which includes sparse matrices, FFTW,
ARPACK, and so on and so forth.

Best regards

Juanjo

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch
Type: text/x-diff
Size: 1178 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20021204/ecf1972e/attachment.diff>


More information about the ecl-devel mailing list