Re: how to run tests

2010-08-23 Thread Alexander Burger
Hi Edwin,

 i can't find anything on how to run tests that come with the source
 distribution. anybody has an URL or a clue how to do this?

Do you mean the unit tests residing in the test/ directory?

They are started via lib/test.l, with a somewhat special command
(written as a comment in the beginning of lib/test.l):

   $(/bin/pwd)/p lib/test.l -bye

This special path syntax for 'p' is necessary so that the functions
checking pathes and the current working directory return the expected
results.

When all goes well, OK is printed, otherwise an error handler is
entered:

   $ $(/bin/pwd)/p lib/test.l -bye
   OK

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: how to run tests

2010-08-23 Thread Edwin Eyan Moragas
Hi Alex,

On Mon, Aug 23, 2010 at 1:56 PM, Alexander Burger a...@software-lab.de wro=
te:
 Hi Edwin,

 i can't find anything on how to run tests that come with the source
 distribution. anybody has an URL or a clue how to do this?

 Do you mean the unit tests residing in the test/ directory?

yes.


 They are started via lib/test.l, with a somewhat special command
 (written as a comment in the beginning of lib/test.l):

 =A0 $(/bin/pwd)/p lib/test.l -bye

 This special path syntax for 'p' is necessary so that the functions
 checking pathes and the current working directory return the expected
 results.

 When all goes well, OK is printed, otherwise an error handler is
 entered:

 =A0 $ $(/bin/pwd)/p lib/test.l -bye
 =A0 OK

great. thank you. :)

more stuff to do for me. i want this to pass on openbsd. in due time. :)



 Cheers,
 - Alex
 --
 UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe

-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe


Re: non forking picoLisp appserver

2010-08-23 Thread Edwin Eyan Moragas
On Mon, Aug 23, 2010 at 7:10 PM, Alexander Burger a...@software-lab.de wro=
te:
 Hi Edwin,

 can i make the picoLisp app server not fork? that is, when i run

 There was a discussion about that here in 2008. You can easily make a
 non-forking server by not calling the standard 'server' function which
 automatically forks upon a connect, but use a 'listen'ing loop instead:

 
 #!bin/picolisp lib.l

 (load ext.l lib/http.l lib/xhtml.l)

 (allowed () @start)

 (de start ()
 =A0 (html 0 Hello NIL NIL
 =A0 =A0 =A0Hello World! ) )

 (let (P (port 8080) =A0H @start)
 =A0 (setq *Home (cons H (chop H)))
 =A0 (loop
 =A0 =A0 =A0(when (listen P)
 =A0 =A0 =A0 =A0 (http @)
 =A0 =A0 =A0 =A0 (close @) ) ) )
 

 This loops infinitely, listening on port 8080. When a request arrives,
 it is handled, and the connection closed.

 This works, but has disadvantages like denying further requests while a
 transaction is running, and not being able to keep state information in
 a session the way the child processes do after a fork. For certain
 special cases it might well make sense, though.


thank you Alex.

cheers,

/eyan
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe