views:

212

answers:

1

I'm using an Intel Mac with Mac OS 10.5 and SBCL 1.0.29. I've done pre-1.0 Hunchentoot development here before, so I've had that installed (via asdf-install).

Recently I started a new project, and decided I'd start from Hunchentoot 1.0. I asdf-install'ed Hunchentoot, and it seemed to install 1.0 (and deps) just fine. I can load it in SBCL (via SLIME or Terminal), and I can write code against the new interface, and it compiles great, and everything seems fine.

That is, until I try to access the webpage: I only get empty responses. Firebug reports "200 OK" but Page Info shows size "0 bytes" (text/plain, ISO-8859-1, but I'm guessing those are defaults). So I tried netcat and telnet, and it seems to accept a connection on my port and then immediately disconnect.

Is there a problem with Hunchentoot 1.0 on Mac OS? Or with having 2 Hunchentoot versions asdf-install'ed at the same time? Or something else I'm not thinking of? I'm sure it's probably something obvious but I'm drawing a blank here.

Thanks!

+1  A: 

I recently wrote a tutorial on how to write a Lisp webapp that includes a known working set of dependencies (including Hunchentoot, CFFI, etc).

You might want to check out the documentation. Try running the code from the linked github page and see if it works for you - if it doesn't then the problem is in your Lisp Compiler (not your libraries). I'd link directly to github, but I'm new here, and apparently I don't have enough reputation points to post two links in one answer.

Off the top of my heads, I know SBCL has trouble with threads on Mac OS X. I'd consider looking into Clozure Common Lisp - which is very optimized for Macs.

smanek
I know SBCL threading on Darwin is considered experimental, but is there any specific "trouble" you're referring to? I've been developing Lisp web apps with pre-1.0 Hunchentoot on SBCL (with threading enabled) here for over a year, and never once had a problem with it.
Ken
BTW, I downloaded your app and it runs fine. So while SBCL may have issues, I'm seeing 100% failure with the asdf-installed Hunchentoot 1.0 and 100% success with the in-its-own-folder Hunchentoot 1.0, with the same SBCL, which suggests to me that my SBCL is not at fault here.
Ken
Well, about 1-2 years ago threading was seriously broken on Darwin (mutexes didn't work, the Lisp core would get corrupted, etc). Things may have gotten better since, but I was a little soured on the experience.The fact that my app works proves pretty conclusively (in my mind) that it's probably just a bug in the ASDF version of Hunchentoot (or usocket?) that you're using - and not SBCL itself. The versions of libraries that are asdf-install'able are sometimes just out of date - which is why I avoid asdf-install (but not asdf, of course) and use the latest version of code from the author.
smanek