Re: Version 17.12 question / error
On Wed, Apr 11, 2018 at 11:58:38PM +0200, Henrik Sarvell wrote: > Regarding detach, would this be a proper way of doing a server where detach > is optional?: > > (de server (P H Detach) >... >(loop > (setq *Sock (listen P)) > (NIL (fork) (close P)) > (close *Sock) ) >(when Detach > (detach)) >... Yes, this is a good place, i.e. in the child after a (fork). ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Version 17.12 question / error
Hi Henrik, > Thanks Alex, will try and find the time to refactor all the local calls in > the ext library sources. Yes, sorry for the confusion! The change in namespace semantics last year was a serious cut, but namespaces in PicoLisp were relatively new at that time, and the change resulted in a much more useful and efficient system. > >I use '[' and ']' if there is more than one symbol instead of '(' and ')' as > >a > >convention. See @lib/vip.l, @lib/android.l or @lib/gis.l for extensive > >examples. > > I see (local) [clearHistory clearCache] but I also see (local) loadTxt > loadUrl in android.l? Correct. (local) simply 'reads' the next s-expr in current-namespace-only, so that all symbols in that expression are created here. Thus you can either give a single symbol or a list of symbols. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Version 17.12 question / error
I bit the bullet and refactored, all is good now with the newest version. Regarding detach, would this be a proper way of doing a server where detach is optional?: (de server (P H Detach) (setq *Port P P (port *Port) *Home (cons H (chop H))) (gc) (loop (setq *Sock (listen P)) (NIL (fork) (close P)) (close *Sock) ) (when Detach (detach)) (task *Sock (http @)) (http *Sock) ) On Tue, Apr 10, 2018 at 7:25 AM, Alexander Burgerwrote: > Hi Henrik, > > > When I try to run my stuff I get [ext/base.l:9] pico -- Bad symbol > namespace > > > > And that file currently looks like this: > > https://bitbucket.org/hsarvell/ext/src/31474ae47656ae0c020f7009c9ed14 > c5cc86cc44/base.l?at=default=file-view-default > > It is the 'local' call: > >(local num?) > > > The syntax of 'local' changed last year, it must be > >(local) num? > > of > >(local) [num?] > > I use '[' and ']' if there is more than one symbol instead of '(' and ')' > as a > convention. See @lib/vip.l, @lib/android.l or @lib/gis.l for extensive > examples. > > > > > And just to make sure I didn't copy the wrong file or anything (I > compiled > > in a separate dir and copied on top in the /opt/picolisp/bin/ dir): > > ... > > -rwxrwxrwx 1 henrik henrik 5048 Oct 9 2008 balance > > -rwxrwxrwx 1 henrik henrik 14824 Jul 10 2014 httpGate > > -rwxrwxrwx 1 henrik henrik 5012 Oct 9 2008 lat1 > > -rwxrwxr-x 1 henrik henrik 204736 Apr 9 21:59 picolisp > > This should be fine, but as httpGate and ssl also changed a lot, I would > recommend to do (cd src; make tools gate) and copy these too. > > ♪♫ Alex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Version 17.12 question / error
Henrik Sarvellwrites: > I should probably create a small writeup on how to do that > for a typical PL project listening on a non standard port. https://logand.com/blog/picolisp-behind-nginx-proxy.html from 22sep2009, time flies! -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Re: Version 17.12 question / error
Thanks Alex, will try and find the time to refactor all the local calls in the ext library sources. Regarding ssl and httpGate, I'm managing proxy forwarding with Nginx these days (encrypted too) so I could actually just delete them as I don't use them anymore. I should probably create a small writeup on how to do that for a typical PL project listening on a non standard port. Nginx has been a real eyeopener on how heavy Apache is in comparison. >I use '[' and ']' if there is more than one symbol instead of '(' and ')' as a >convention. See @lib/vip.l, @lib/android.l or @lib/gis.l for extensive examples. I see (local) [clearHistory clearCache] but I also see (local) loadTxt loadUrl in android.l? On Tue, Apr 10, 2018 at 7:25 AM, Alexander Burgerwrote: > Hi Henrik, > > > When I try to run my stuff I get [ext/base.l:9] pico -- Bad symbol > namespace > > > > And that file currently looks like this: > > https://bitbucket.org/hsarvell/ext/src/31474ae47656ae0c020f7009c9ed14 > c5cc86cc44/base.l?at=default=file-view-default > > It is the 'local' call: > >(local num?) > > > The syntax of 'local' changed last year, it must be > >(local) num? > > of > >(local) [num?] > > I use '[' and ']' if there is more than one symbol instead of '(' and ')' > as a > convention. See @lib/vip.l, @lib/android.l or @lib/gis.l for extensive > examples. > > > > > And just to make sure I didn't copy the wrong file or anything (I > compiled > > in a separate dir and copied on top in the /opt/picolisp/bin/ dir): > > ... > > -rwxrwxrwx 1 henrik henrik 5048 Oct 9 2008 balance > > -rwxrwxrwx 1 henrik henrik 14824 Jul 10 2014 httpGate > > -rwxrwxrwx 1 henrik henrik 5012 Oct 9 2008 lat1 > > -rwxrwxr-x 1 henrik henrik 204736 Apr 9 21:59 picolisp > > This should be fine, but as httpGate and ssl also changed a lot, I would > recommend to do (cd src; make tools gate) and copy these too. > > ♪♫ Alex > > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >
Re: Version 17.12 question / error
Hi Henrik, > When I try to run my stuff I get [ext/base.l:9] pico -- Bad symbol namespace > > And that file currently looks like this: > https://bitbucket.org/hsarvell/ext/src/31474ae47656ae0c020f7009c9ed14c5cc86cc44/base.l?at=default=file-view-default It is the 'local' call: (local num?) The syntax of 'local' changed last year, it must be (local) num? of (local) [num?] I use '[' and ']' if there is more than one symbol instead of '(' and ')' as a convention. See @lib/vip.l, @lib/android.l or @lib/gis.l for extensive examples. > And just to make sure I didn't copy the wrong file or anything (I compiled > in a separate dir and copied on top in the /opt/picolisp/bin/ dir): > ... > -rwxrwxrwx 1 henrik henrik 5048 Oct 9 2008 balance > -rwxrwxrwx 1 henrik henrik 14824 Jul 10 2014 httpGate > -rwxrwxrwx 1 henrik henrik 5012 Oct 9 2008 lat1 > -rwxrwxr-x 1 henrik henrik 204736 Apr 9 21:59 picolisp This should be fine, but as httpGate and ssl also changed a lot, I would recommend to do (cd src; make tools gate) and copy these too. ♪♫ Alex -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
Version 17.12 question / error
Hi, I just downloaded and complied the 17.12 version in order to get detach (was using a pre-detach version before). When I try to run my stuff I get [ext/base.l:9] pico -- Bad symbol namespace And that file currently looks like this: https://bitbucket.org/hsarvell/ext/src/31474ae47656ae0c020f7009c9ed14c5cc86cc44/base.l?at=default=file-view-default Also, I can not see any mention of a breaking change relating to this in the CHANGES file. And just to make sure I didn't copy the wrong file or anything (I compiled in a separate dir and copied on top in the /opt/picolisp/bin/ dir): Compile dir: henrik@henrik-pc:/feting/Downloads/picoLisp/bin$ ls -la total 236 drwxrwxr-x 2 henrik henrik 4096 Apr 9 21:59 . drwxrwxr-x 19 henrik henrik 4096 Apr 9 21:36 .. -rwxrwxr-x 1 henrik henrik 204736 Apr 9 21:59 picolisp /opt/picolisp/bin/ dir: henrik@henrik-pc:/opt/picolisp/bin$ ls -la total 320 drwxrwxrwx 2 henrik henrik 4096 Apr 9 21:59 . drwxrwxrwx 29 henrik henrik 4096 Apr 9 21:57 .. -rwxrwxrwx 1 henrik henrik 5048 Oct 9 2008 balance -rwxrwxrwx 1 henrik henrik 14824 Jul 10 2014 httpGate -rwxrwxrwx 1 henrik henrik 5012 Oct 9 2008 lat1 -rwxrwxr-x 1 henrik henrik 204736 Apr 9 21:59 picolisp