> The file is not in that location but in the clbuild/source tree. I
> compared the asd files of simple-blog and ...clsql-demo and do not
> find any significant difference. I am using SBCL and emacs-slime. I
> googled for the truename error message, but didn't find anything
> related. Maybe this is more a symptom than a cause?
> you (using C-c C-c) ensure that the defclass is evaluated before running theSorry that it took me so long to answer, I've been abroad.
> create-view-from-class forms?
You are right, if I evaluate employee it is not defined, and
the call to create-view-from-class gives the same exception
when called with NIL. However, C-c C-c or M-C-x in the
employee.lisp file (containing the clsql:def-view-class form)
does not change this. Should there be a defclass? I couldn't
find one in the directory tree of the clsql demo.
SBCL is the Lisp itself. It comes with a REPL (command line)
-- try starting it directly in a terminal.
Swank runs in the Lisp and offers an interface for Slime
to connect to.
Slime (the client) is written in Emacs Lisp and runs
inside Emacs. It connects to Swank.
> If I eval something
> within an emacs buffer by M-C-x, where does that happen?
I'm not an Emacs user, but I think it evaluates as Emacs
Lisp within Emacs, not as Common Lisp within the remote
SBCL.
> It doesn't influence the environment started with M-x slime,
> right?
If I'm correct in the above the answer is no. It's not even
in the same Lisp dialect.
> I got confused about this. So the repl and the
> evaluations are two separate things, I guess...
> However I am not sure where the mentioned (C-c C-v i) should
> go for instance. Sorry if I am slow, but I don't really grasp it
> yet :-(.
It's complicated. Are you intent on using Slime for your Common
Lisp coding? Taking out Slime and using a decoupled editor
helps simplify things in the beginning.
> I managed to to connect to my mysql database by executing
> the clsql-tutorial.lisp file (from clsql/examples) with (load
> #p"...").
> However I during file evaluation I get an error after the connection
> is established:
> The value 0
> is not of type
> (OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL
> CHARACTER).
> [Condition of type TYPE-ERROR]
What's your SBCL version? What's your CLSQL version?
Leslie
This community though small, is very productive. SBCL itself is
evolving at a fast pace. You have to keep up with it... use clbuild,
use it to fetch and compile the latest sbcl, libraries etc. Most
often, as with Weblocks, you need the -dev or equivalent bleeding edge
as problems you are finding have been fixed and committed.
http://weblocks.viridian-project.de/installation
Make sure you edit the wnpp-projects file to keep up with the latest -
here is ours (The link will automatically keep up with our changes):
http://image.rayservers.com/wnpp-projects
Also, Leslie is a vim guru. That is an unusual combination in the Lisp
world, most of us are on emacs + slime. Lisp has always been for the
"keyboard artists" as I call them. The original Lisp machines were
amazing man-machine interfaces. In my view once you are familiar with
the quick instant compiles of just one function on slime, its hard to
go back to anything else. Being able to change a single function in a
running web server without a restart is unheard of in other
environments still. Also, the lisp process itself is long lived, you
can serve everything from RAM. In-memory object searching is way
faster than anything tied to disk. You just have to be clever about
persisting important data - this is something we are working on.
Cheers,
---Venkat.
>> It's complicated. Are you intent on using Slime for your Common
>> Lisp coding? Taking out Slime and using a decoupled editor
>> helps simplify things in the beginning.
>
> On the one hand it simplifies the process, but on the other hand
> it is also helpful. Working in the sbcl repl is painful.
Not necessarily. Use `rlwrap' to start SBCL, and activate
SB-ACLREPL while we're at it:
rlwrap sbcl --eval "(require :sb-aclrepl)"
With this you have a good prompt, proper line editing and history.
It helps to have some basic knowledge of Readline's Emacs key
config.
> I installed SBCL via aptitude. The version is: 1.0.29.11.debian.
> I don't know where to geht the CLSQL version number from. I
> installed it two weeks ago via clbuild, so it should be pretty recent.
> The changelog file says, the last change was 2008 though.
The change log is probably stale. Try "git log" for a more
reliable indicator.
The latest release version is, according to the web site,
clsql-5.1.1.tar.gz (Sat, 15 May 2010 15:25:47, 870 KB)
Give it a try.
Also try some newer SBCL if it still doesn't work.
It's not hard to download the latest SBCL directly from
www.sbcl.org and use it.
> I really wanted to get working on a new project and give lisp web
> development a try, because I thought it would be an easy entry
> (as compared to GUI development) and many people consider it
> superior to php/perl/python.
> So far it seems really hard to dive in. My usual ways of learning an
> API and looking at given code, figuring out such problems don't work.
> Googling errors doesn't work that well either, as the community is
> tiny, and there is no way of getting a software bundle that you know
> is in a coherent state.
> I just hope that - with some help - I can put all the initial
> problems
> behind me.
You're right -- it's not easy to get started with Common Lisp
because so many things are different, and the community is
seriously understaffed.
But we've hardly let anyone walk away from here without having
made a serious effort to help them, and I think the same is true
for the communities of other Lisp projects.
"Don't give up" is the best advice I can give you; it will
definitely pay for itself later.
Oh, and do report back here if you experience any further
problems.
Leslie
Ok, thanks. You seem to be right, but I got stuck halfway
unfortunately. One problem I have is understanding the
workings of slime, swank and sbcl. If I eval something
within an emacs buffer by M-C-x, where does that happen?
It doesn't influence the environment started with M-x slime,
right? I got confused about this. So the repl and the
evaluations are two separate things, I guess...
However I am not sure where the mentioned (C-c C-v i) should
I managed to to connect to my mysql database by executing
the clsql-tutorial.lisp file (from clsql/examples) with (load
#p"...").
However I during file evaluation I get an error after the connection
is established:
The value 0
is not of type
(OR (VECTOR CHARACTER) (VECTOR NIL) BASE-STRING SYMBOL