[Ecls-list] Function declaration

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Wed Sep 6 10:18:23 UTC 2006


The problem with CLISP is that it does a rather restrictive
interpretation of DIRECTORY. Look below for an example in my home
filesystem. If you want to get the content of a directory in CLISP you
have to call the function twice: once with a mask "*.*" and one with a
mask "*/". The first one returns the files, the second one the
directories. There is not a way to return everything.

ECL on the other hand behaves more like Unix ls. It is probably less
ANSI compliant, if we read the definition strictly: "Determines which,
if any, files that are present in the file system have names matching
pathspec".

I am not sure which option is better.

Juanjo

--- ECL ---
> (directory "emu64/")
(#P"/home/jlr/emu64/runnetbsd" #P"/home/jlr/emu64/runopenbsd"
 #P"/home/jlr/emu64/runsystem" #P"/home/jlr/emu64/freebsd-i386/"
 #P"/home/jlr/emu64/detachtty-9/" #P"/home/jlr/emu64/runfreebsd"
 #P"/home/jlr/emu64/netbsd-i386/" #P"/home/jlr/emu64/openbsd-i386/"
 #P"/home/jlr/emu64/kqemu-1.3.0pre9/" #P"/home/jlr/emu64/bin/"
 #P"/home/jlr/emu64/qemu-0.8.1/" #P"/home/jlr/emu64/share/")
> (directory "emu64/*.*")
(#P"/home/jlr/emu64/runnetbsd" #P"/home/jlr/emu64/runopenbsd"
 #P"/home/jlr/emu64/runsystem" #P"/home/jlr/emu64/runfreebsd")
> (directory "emu64/*")
(#P"/home/jlr/emu64/runnetbsd" #P"/home/jlr/emu64/runopenbsd"
 #P"/home/jlr/emu64/runsystem" #P"/home/jlr/emu64/runfreebsd")
> (directory "emu64/")
(#P"/home/jlr/emu64/runnetbsd" #P"/home/jlr/emu64/runopenbsd"
 #P"/home/jlr/emu64/runsystem" #P"/home/jlr/emu64/freebsd-i386/"
 #P"/home/jlr/emu64/detachtty-9/" #P"/home/jlr/emu64/runfreebsd"
 #P"/home/jlr/emu64/netbsd-i386/" #P"/home/jlr/emu64/openbsd-i386/"
 #P"/home/jlr/emu64/kqemu-1.3.0pre9/" #P"/home/jlr/emu64/bin/"
 #P"/home/jlr/emu64/qemu-0.8.1/" #P"/home/jlr/emu64/share/")

--- CLISP ---
[1]> (directory "emu64/")
(#P"/home/jlr/emu64/")
[2]> (directory "emu64/*")
(#P"/home/jlr/emu64/runnetbsd" #P"/home/jlr/emu64/runopenbsd"
#P"/home/jlr/emu64/runsystem"
 #P"/home/jlr/emu64/runfreebsd")
[3]> (directory "emu64/*.*")
NIL
[4]> (directory "emu64/*/")
(#P"/home/jlr/emu64/freebsd-i386/" #P"/home/jlr/emu64/detachtty-9/"
#P"/home/jlr/emu64/netbsd-i386/"
 #P"/home/jlr/emu64/openbsd-i386/"
#P"/home/jlr/emu64/kqemu-1.3.0pre9/" #P"/home/jlr/emu64/bin/"
 #P"/home/jlr/emu64/qemu-0.8.1/" #P"/home/jlr/emu64/share/")
[5]>



2006/9/6, Juan Jose Garcia-Ripoll <juanjose.garciaripoll at googlemail.com>:
> 2006/9/6, Goffioul Michael <goffioul at imec.be>:
> > Is it possible to somehow compute the argument specifications for
> > a bytecoded function? (I guess this is possible as the disassembler
> > does it).
>
> Look in top.lsp for ext::function-lambda-list.
> Regards,
>
> Juanjo
>
> --
> Max-Planck-Institut für Quantenoptik
> Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
> Phone: +49 89 32905 345   Fax: +49 89 32905 336
> http://www.mpq.mpg.de/Theorygroup/CIRAC/
>


-- 
Max-Planck-Institut für Quantenoptik
Hans-Kopfermann-Str. 1, Garching, D-85748, Germany
Phone: +49 89 32905 345   Fax: +49 89 32905 336
http://www.mpq.mpg.de/Theorygroup/CIRAC/




More information about the ecl-devel mailing list