From: Haris Bogdanovi� on
Hi.

I try to start honchentoot by typing:

(hunchentoot:start (make-instance 'hunchentoot:acceptor :port 8080))
and after that I don't get the command line back in slime-repl.

I try to open http://localhost:8080 but browser just waits
and lisp.exe then starts to consume 50% of cpu.

Where is the problem ?

Thanks




From: Rupert Swarbrick on
"Haris Bogdanoviæ" <fbogdanovic(a)xnet.hr> writes:
> I try to start honchentoot by typing:
>
> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 8080))
> and after that I don't get the command line back in slime-repl.

You haven't said what lisp you're using, but do you have threads?
Otherwise, hunchentoot:start can't fork and instead keeps hold of the
repl.

> I try to open http://localhost:8080 but browser just waits
> and lisp.exe then starts to consume 50% of cpu.
>
> Where is the problem ?

That, I don't know. Sorry. More information might help. For example, if
I hadn't just read your other post, I wouldn't even know you're on
Windows...

Rupert
From: Captain Obvious on
HB> I try to start honchentoot by typing:

HB> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 8080))
HB> and after that I don't get the command line back in slime-repl.

HB> I try to open http://localhost:8080 but browser just waits
HB> and lisp.exe then starts to consume 50% of cpu.

HB> Where is the problem ?

You're using CLISP which is single-threaded. That is the problem.
Both SLIME and Hunchentoot require blocking reading on a socket, that's why
you don't command line back.

So SLIME+Hunchentoot is problematic on a single-threaded implementation.

You might get more luck trying Hunchentoot on command line directly, but I
don't know whether it would work.
I would not bet on it.

You see, Hunchentoot is not meant to be used with single-threaded CL, and
CLISP particularly. It is just awkward.
Probably at some time somebody have added supported, but it is not well
tested and could have been 'bit-rotted'.

A root cause is that you use Windows. Windows is a ghetto in CL world -- it
is hard to find a free high-quality feature-full implementation for Windows.
Their either cost lots of money, or do not work well or do not have all the
features.

But anyway... If you want to debug your problem with what you have there (I
think it is a good idea to learn to debug yourself instead of asking people
on the newsgroup), run CLISP / Hunchentoot from a command line (not SLIME)
and when it hangs press Ctrl-C.
That will bring you a debugger (unless it is totally dead). In debugger you
can see a backtrace (say :b in REPL), then you'll see what is abusing
function and guess what it is doing. Then you can go to this function in
Hunchentoot's source code and check if you see why you get that problem.

From: Haris Bogdanovic on
I tried the same thing in clisp:

(hunchentoot:start (make-instance 'hunchentoot:acceptor :port 8080))

but it says that there is no package hunchentoot even though there is when I
open emacs.

I have this in .clisprc:
--------------------------------------------------------------
(load "c:/lisp/clisp/asdf.lisp")

(push "c:/lisp/clisp/asdf-reg/alexandria/alexandria"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/babel/babel" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/cffi/cffi" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/trivial-features/trivial-features"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/bordeaux-threads/bordeaux-threads"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/usocket/usocket" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/split-sequence/split-sequence"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/trivial-backtrace/trivial-backtrace"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/rfc2388/rfc2388" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/md5/md5" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/cl+ssl/cl+ssl" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/flexi-streams/flexi-streams"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/trivial-gray-streams/trivial-gray-streams"
asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/cl-ppcre/cl-ppcre" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/cl-fad/cl-fad" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/cl-base64/cl-base64" asdf:*central-registry*)
(push "c:/lisp/clisp/asdf-reg/chunga/chunga" asdf:*central-registry*)

(push "c:/lisp/clisp/asdf-reg/hunchentoot/hunchentoot"
asdf:*central-registry*)

(asdf:oos 'asdf:load-op 'hunchentoot)
-----------------------------------------------------------------------

I see that this probablly won't work, I will try cl-http or alegroserve.
I have ubuntu as a virtual machine so I guess I will eventually move to
linux
when programming in lisp. I would forget about windows long ago but nothing
works
in linux (hardware), no drivers, always some awkward ways of getting things
to work,
if possible at all.


From: Rupert Swarbrick on
"Haris Bogdanovic" <fbogdanovic(a)xnet.hr> writes:
> I tried the same thing in clisp:
>
> (hunchentoot:start (make-instance 'hunchentoot:acceptor :port 8080))
>
> but it says that there is no package hunchentoot even though there is when I
> open emacs.
>
> I have this in .clisprc:
> --------------------------------------------------------------
> (load "c:/lisp/clisp/asdf.lisp")
>
<snip>

> (push "c:/lisp/clisp/asdf-reg/hunchentoot/hunchentoot"
> asdf:*central-registry*)
>
> (asdf:oos 'asdf:load-op 'hunchentoot)
> -----------------------------------------------------------------------

That probably means that your .clisprc isn't being loaded when you run
outside of emacs. If it were, then you'd either get an error when it
tried to do the asdf load or at least the hunchentoot package would have
been defined.

> I see that this probablly won't work, I will try cl-http or
> alegroserve. I have ubuntu as a virtual machine so I guess I will
> eventually move to linux when programming in lisp. I would forget
> about windows long ago but nothing works in linux (hardware), no
> drivers, always some awkward ways of getting things to work, if
> possible at all.

Please direct FUD elsewhere. Amazingly enough, many people use linux on
modern and/or ancient hardware without trouble.


Rupert