I spent four hours working on my photo-blog in Common Lisp that I've mentioned earlier.
Why does Common Lisp hate me? After four hours, I'm not yet even to the point where I can reliably, successfully load all the libraries I need to load. How pathetic is that? I haven't even gotten to the point where I could, you know, actually write my program.
This article explains how to set up an ASDF system file. I'm using ASDF because you almost HAVE to use it if you're utilizing any 3rd-party libraries, because so many 3rd-party libraries use ASDF themselves and because I wouldn't know where to begin to write my own dependency-resolution scripts from scratch.
So my ASD file has all the right dependencies, so all the libraries load in the right order and Lisp knows they exist. Then I have a
packages.lisp that defines my package. Then I have a main source file with all my code in it, which is
IN-PACKAGE my package. This all appears to work.
As long as I fully-qualify every function that comes from another package, it works fine. Problem is that if I try to
(:use :cl-who) in my package, to avoid having to endlessly repeat myself every time I use a function from CL-WHO, I get a flood of warnings saying:
undefined variable: PRINC
Funny, because PRINC is a built-in function in Common Lisp. And PRINC is defined in my package. And if I
IN-PACKAGE to CL-WHO, it's accessible from there too.
Can I use ASDF and still have my package inherit functions from other packages? This is the great mystery which I have been completely unable to solve. Is this some compile-time vs. runtime mess that only exists in Common Lisp? Am I accidentally interning symbols and obliterating other packages' symbols? Am I just mentally retarded?
This is extremely frustrating. I don't care how wonderfully great your programming language is: if you have to arm-wrestle the thing for a week to get your environment set up, what's the point? How can something so simple as importing functions from other packages be so difficult?
I could've had everything done already if I'd have used Ruby. I could
gem install what I need, and then
require it and wow, it works. Hell, I could've had this done in PHP or Perl by now.
If I ever get CL working on my machine, then I have to worry about installing SBCL and all these libraries and mod_lisp and whatnot on my Debian server. God almighty, I don't even want to think about that.