Beautiful! Even works with 32-bit PicoLisp on Mac. ;-)

/Jon

> On 17. Aug, 2017, at 13:53, Alexander Burger <a...@software-lab.de> wrote:
> 
> Hi Christopher,
> 
>> Hi, I want to create a really simple PicoLisp Web application that
>> parses the URL, and does something. Probably something silly, e.g.,
>> visiting http://localhost/addition/2/2 returns a Web page showing 2+2 =
>> 4. Is there some small sample PicoLisp code I could look at or start
>> with?
> 
> How about this:
> 
> 1. Put these four lines into a file "addition.l":
> 
>      (html 0 "Addition" NIL NIL
>         (let (A (format (next))  B (format (next)))
>            (<h2> NIL "Addition")
>            (prin A " + " B " = " (+ A B)) ) )
> 
> 2. In the same directory start
> 
>      $ pil @lib/http.l @lib/xhtml.l --server 8080 "" -wait
> 
> 3. Connect a browser to
> 
>      http://localhost:8080/addition.l?2&2
> 
>   or, if httpGate is running with a default of 8080, just
> 
>      http://localhost/addition.l?2&2
> 
> ♪♫ Alex
> 

Reply via email to