Le Thu, 18 Oct 2007 09:33:45 +0200,
[EMAIL PROTECTED] a écrit :
> If you need to see some code to help you get started, you might be
> interested by a little bomberman-like game prototype available on
> http://matthieu.villeneuve.free.fr/dev/games/ (should work but needs
> some optimization, currently there is only one thread on client side,
> doing update, graphics and networking).
I tried to launch your game "blaster".
So I come in the directory, launch clisp on the server file:
*** - load: A file with name USOCKET does not exist
Ok, logical, I haven't the library usocket. I'm on Gentoo/Linux, and
there is no package for usocket.
I suppose that if I'd want to release a game for end-user, I'd
integrate the libs I use into my game (don't know how, but It should be
possible).
So I download the last usocket release.
The README tells I can use adsf-install. Fine !
I run sbcl, and try a:
(ASDF-INSTALL:INSTALL "usocket-0.3.5.tar.gz")
Yep, but nope:
debugger invoked on a SB-INT:SIMPLE-READER-PACKAGE-ERROR:
SB-INT:SIMPLE-READER-PACKAGE-ERROR on #<SYNONYM-STREAM :SYMBOL
SB-SYS:*STDIN* {90BB369}>: package "ASDF-INSTALL" not found
I have asdf, but no asdf install, and there is no asdf-install on
gentoo.
As you see it, it's really painful. I know i'm a beginner in Lisp, and
I think it shows how difficult it is to learn lisp, and for end-user,
to use lisp applications.
In perl, for example, if I find an application, I just run:
perl thegame.pl
I haven't to launch a lisp, then to use a lisp instruction.
If a library is missing, make/make install will install it, and it will
work.
As a developer, I didn't understand the library system at all.
I saw (asdf:oos 'asdf:load-op :cffi) which is ugly, but works... if I
use (load "myfile.lisp"), not if I run clisp on the file directly (yep,
clisp myfile.lisp doesn't load the clisp rc file, which use a gentoo
config file to know where are the packages).
Then you use (require 'asdf), which doesn't work at all (*** - load: A
file with name asdf does not exist).
I know I have these problems because i'm a beginner, but looking at
those problems, I'm more than hesitating to use lisp on a public
released application.
Another example, the stumpwm window manager, which use common lisp.
I had to:
emerge stumpwm (emerge is the Gentoo's apt-get)
Create a lisp script containing:
(asdf:oos 'asdf:load-op :stumpwm)
(stumpwm:stumpwm)
The create a sh script with:
#!/bin/sh
sbcl --load ~/bin/stumpwm.lisp > ~/.stumpwm.log 2>&1
Then I get:
debugger invoked on a SIMPLE-ERROR:
Error during processing of --eval option (LOAD
#P"/home/galdor/bin/stumpwm.lisp"):
erred while invoking #<COMPILE-OP NIL {AA0BDE9}> on
#<CLX-SOURCE-FILE "dependent" {B3A43E9}>
The error is totally cryptic, and this is really to much for an
application ! I should be able to do an emerge stumpwm, then directly
launch the programm.
How can a developer ask a end-user to do all this work ?
There are a bunch of lisp platforms (clisp, sbcl, allegro cl...),
everyone works differently, and using anything but strict ANSI
CommonLisp is really difficult.
CONCLUSION (sorry for the long mail)
Can't we get a simple package system (ala perl or python) ?
A package should be installable with a simple make/make install, then
it should be usable doing a simple (require "mypackage"), WITHOUT other
work. No RC file to fill for each different lisp vm, no complicated
system to manage packages.
A CPAN-like repository would be perfect.
Just imagine doing simply:
clisp -x '(cpanlike:install apackage)'
(With perl's CPAN: perl -MCPAN -e 'install My::Module')
There should be a simple way to launch an application.
make -> compile the lisp files to binary.
mylisp themainbinary
So, I'll be very happy if you can enlight me on these problems, which
totally spoils my discover of this language :(
--
Nicolas Martyanoff
http://codemore.org
[EMAIL PROTECTED]
_______________________________________________
Gardeners mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/gardeners