Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
As expected, it was rather trivial to copy over gatePort and gateConnect from PicoLisp 3.0.7 and I have httpGate working in docker!!! I have the code here - https://github.com/ckkashyap/picoLisp/blob/contrib/src/httpGate.c :) Regards, Kashyap On Thu, Mar 14, 2019 at 10:16 AM C K Kashyap wrote:

Re: json.l fails to load on pil 64

2019-03-14 Thread rick
Indeed. aw is famous for writing stellar doc. This is no exception. https://github.com/aw/picolisp-json/blob/master/EXPLAIN_v3.md#global-variables On Thu, 14 Mar 2019 15:42 -04:00, Abel Normand wrote: > > Hello. > > This error related to namespaces feature in json.l. easy workaround: when run

Re: json.l fails to load on pil 64

2019-03-14 Thread C K Kashyap
cool...thanks Abel Regards, Kashyap On Thu, Mar 14, 2019 at 12:38 PM Abel Normand wrote: > Hello. > > This error related to namespaces feature in json.l. easy workaround: when > run pil, set env PIL_NAMESPACES=false before pil. This should fix your > issue, you can actually find this solution

Re: json.l fails to load on pil 64

2019-03-14 Thread Abel Normand
Hello.This error related to namespaces feature in json.l. easy workaround: when run pil, set env PIL_NAMESPACES=false before pil. This should fix your issue, you can actually find this solution in official doc for json.lNail.

json.l fails to load on pil 64

2019-03-14 Thread C K Kashyap
Hi, I get this error when I try to load json.l from https://github.com/aw/picolisp-json/blob/master/json.l [json.l:53] !? (de json-count-brackets (Str) (let Json_stack NIL (mapc '((N) (if (or (= "{" N) (= "[" N)) (push 'Json_stack N) (case N ("]" (let R (pop 'Json_stack) (unless (= "[" R)

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
Looks like it. I just tested on docker on windows and that does not work either. Fortunately it works on a linux VM on Azure. Since getting it to run on docker would be a really nice to have - would it be too hard to have a IPv4 flavor of httpGate? Oh yes, IPv4 is quite alive and kicking - I

Re: A good way to write an api server

2019-03-14 Thread Alexander Burger
Hi Kashyap, > And things worked just fine when I tried on WSL :) .. so it must be the > ipv6 issue on docker. Yes, indeed! All PicoLisp networking functionalities require IPv6 ability. Strange that docker supports only IPv4 these days :( And also strange we find this out now - as I understand

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
And things worked just fine when I tried on WSL :) .. so it must be the ipv6 issue on docker. Regards, Kashyap On Thu, Mar 14, 2019 at 5:55 AM C K Kashyap wrote: > The dbapp is essentially from here - https://picolisp.com/wiki/?mindbgui > and it seems to run fine. > > I tried strace on httpGate

Re: A good way to write an api server

2019-03-14 Thread C K Kashyap
The dbapp is essentially from here - https://picolisp.com/wiki/?mindbgui and it seems to run fine. I tried strace on httpGate and got this - looks like httpGate needs IPv6 and docker supports IPv6 only for Linux hosts and I am running my stuff on a

Re: A good way to write an api server

2019-03-14 Thread Alexander Burger
Hi Kashyap, > I cant seem to get httpGate to run correctly. I tried running it as follows > First run the app on port 8080 - > /pil dbapp.l -main -go -wait & > ... > /bin/httpGate 3000 8080 > ... > root@6b36fb429264:~/picoLisp# telnet localhost 3000 > ... > GET / HTTP/1.1 This seems correct. It