Modyfying numbers inside function/variables

2019-05-12 Thread JmageK
nth example. : (set (cdr (cadr incM)) 5) -> 5 : incM -> (NIL (do 5 (printsp 60)(Inc (cdadr (cdadr incM) JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Modyfying numbers inside function/variables

2019-05-13 Thread JmageK
Thanks for the explanation and reference! It makes sense. Jmage -- Securely sent with Tutanota May 13, 2019, 10:32 AM by a...@software-lab.de: > Hi JmageK, > > > The previous mail quizzed me about, the (set (nth u 5) 1000) part. > > I understand it basically setting a

Run a function whenever a request for a file arrives on the picolisp web server

2019-06-07 Thread JmageK
eric server. #load file containing ana function$ pil @lib/http.l --server 8080 ana.l $ curl localhost:8080/tst.html #log ip, agent, url in log.txt$ localhost:8080/n.txt #log ip, agent, url in log.txt JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Run a function whenever a request for a file arrives on the picolisp web server

2019-06-07 Thread JmageK
> Thus, '@X' gets bound to > > (((match '("-" @X "." "h" "t" "m" "l") U) > (and *SesId (timeout *Timeout)) > ... ) ) ) ) > > Note the additional list level, as 'match' binds its parameters to lists! > > So we need the dot in > > (out *HtSock (cond . @X)) > > so that this subexpression gets

Re: Run a function whenever a request for a file arrives on the picolisp web server

2019-06-07 Thread JmageK
Jun 7, 2019, 3:49 PM by a...@software-lab.de: > Hi JmageK, > >> My question is how to have picolisp run the ana function whenever a request >> for a file or another html page arrives when it's running as a generic >> server. >> > > Usually I log only

Re: Run a function whenever a request for a file arrives on the picolisp web server

2019-06-07 Thread JmageK
Jun 7, 2019, 7:31 PM by a...@software-lab.de: > On Fri, Jun 07, 2019 at 03:39:12PM +0200, JmageK wrote: > >> Why is the dot neccesary for the subexpression to be bound, is it a general >> rule that's documented somewhere? >> > > I would say it is a general rule,

Use let variables inside match function

2019-06-14 Thread JmageK
I know I can do this : (match '(@ ~(chop "ts") @) (chop "tst")) -> T But i want to do the following, which doesn't work : (Let S "tst"    (match (list '@ (mapcar any (chop S)) '@)      (chop "1st tst nil") ) ) -> NIL JmageK -- Securely sent with Tuta

Re: Use let variables inside match function

2019-06-15 Thread JmageK
" @) > > The shortest and fastest way is probably: > : (conc (cons '@) (chop S) '(@)) > -> (@ "t" "s" "t" @) > Basically (cons '(@)(chop S)'(@)) Neat solution. Thanks! JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Use let variables inside match function

2019-06-15 Thread JmageK
or    (conc (copy '(@)) (chop "Si")'(@)) > So I would say that > (conc (cons '@) (chop S) '(@)) > > or alternatively > (cons '@ (conc (chop S) '(@)) > is the best > Yeah, this is straight forward. Originally, I assumed it was just a different way to do it, good

Re: Use let variables inside match function

2019-06-15 Thread JmageK
Jun 15, 2019, 1:31 PM by jma...@tuta.io: >> The shortest and fastest way is probably: >> : (conc (cons '@) (chop S) '(@)) >> -> (@ "t" "s" "t" @) >> > Basically (cons '(@)(chop S)'(@)) > Neat solution. Thanks! > I m

Re: Use let variables inside match function

2019-06-15 Thread JmageK
h '@' in > its > CAR)? > Finding different ways to do something, So you know which ones to not use ;). JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Unsubscribe

2019-06-25 Thread JmageK
Good bye JmageK :-( You are now unsubscribed JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Image processing, getting started?

2019-06-20 Thread JmageK
shes : (in"file.jpg"(do 9 (prinl (rd]or : (in"file.jpg"(do 40(PR(rd]For now just knowing how to read the file contents as an array of color values like if rgb then (255 23 123 23 1 0 44 65..) would be sufficient, but a better way is always welcome. I would be testing with jpg or

Re: Image processing, getting started?

2019-06-20 Thread JmageK
Jun 20, 2019, 12:23 PM by a...@software-lab.de: > On Thu, Jun 20, 2019 at 08:46:13AM +0200, Alexander Burger wrote: > >> (in "file" >> (make >> (do (car (info "file")) >> (link (rd 1)) ) ) ) >> > Sorry, this is unnecessarily complex. > Right, but good to know there's a built in way to get file

Re: Image processing, getting started?

2019-06-20 Thread JmageK
without converting 1st. Then perhaps, will look into libraries and conversion stuff. Thanks for the suggestion. JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

ext:Snx undefnied pil32 termux local build

2019-04-20 Thread JmageK
r have that modified Makefile. The dist package from 'itspointless' is outdated 18.x.x and fails some basic tests so can't use that too. JmageK -- Securely sent with Tutanota -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: ext:Snx undefnied pil32 termux local build

2019-04-20 Thread JmageK
pil : (bench (t (who 'car] -> 0.304 secs  I didn't think of this before but now tried copying the picolisp binary and some of it's folders into the install directory. All tests pass so it's fine. Will reply to the original email should I find something next week or so. Thanks for answering.

Re: Behavior of sort

2019-05-05 Thread JmageK
Copy appears to be most reliable as it does not modify the original list. Maybe a tiny bit slower than ->(setq L (sort L)) : (setq L (3 2 1 4 9 0] -> (3 2 1 4 9 0) : (sort (copy L] -> (0 1 2 3 4 9) : L -> (3 2 1 4 9 0)  : (setq L (sort L] -> (0 1 2 3 4 9) : L-> (0

Re: ext:Snx undefnied pil32 termux local build

2019-04-20 Thread JmageK
Thanks for searching but it appears to be the same as what I did. Comment M32 option. JmageK -- Securely sent with Tutanota Apr 21, 2019, 1:03 AM by erik.d.gustaf...@gmail.com: > This might work - Compile 32-bit picolisp on ARM (RPi) > > https://gist.github.com/aw/714d1840bba