Re: Version 17.12 question / error

2018-04-11 Thread Alexander Burger
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

2018-04-11 Thread Alexander Burger
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


Unsubscribe

2018-04-11 Thread Yves Cloutier
On Wed, Apr 11, 2018 at 5:51 PM, Tomas Hlavaty  wrote:

> Henrik Sarvell  writes:
> > 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

2018-04-11 Thread Henrik Sarvell
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 Burger 
wrote:

> 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

2018-04-11 Thread Tomas Hlavaty
Henrik Sarvell  writes:
> 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: Feed reader and bookmarker

2018-04-11 Thread Henrik Sarvell
Hi Manuel,

I'll try and put it up in some way given the response.

Will notify in this thread when done.



On Tue, Apr 10, 2018 at 3:52 PM, Manuel Cano  wrote:

> Hi,
>
> Where can we find it?
>
> Kind regards,
> Manu
>
> 2018-04-08 15:22 GMT+02:00 Henrik Sarvell :
>
>> Hi list,
>>
>> Before the AI stuff Alex was helping me with some DB related stuff that
>> was going into my new RSS and bookmarker combo of an app.
>>
>> The bookmarking part is a result of delicious deteriorating to such an
>> extent that it was unusable.
>>
>> The feed reading I already had more or less completed in an earlier
>> unpresentable app.
>>
>> It looks like I'm not going to manage to complete that last mile to get
>> to a polished thing. I'm still using it though so it must be good enough.
>>
>> It might take me an hour or two to write an install tutorial in case
>> there is interest in me uploading the project?
>>
>> It's a non-trivial example of a complete app using the standard PicoLisp
>> DB after all, that could be used by beginners to explore without having to
>> overload IRC and mailing list with questions.
>>
>> The database parts should be fairly solid (as they're made by Alex as
>> much as by me) with progressively less clean code upwards in the stack so
>> to speak, ie using jquery and more or less ad hoc Ajax requests.
>>
>
>


Re: Version 17.12 question / error

2018-04-11 Thread Henrik Sarvell
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 Burger 
wrote:

> 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
>