Subscribe

2017-02-06 Thread Jon Kleiser
Hello Jon Kleiser :-) You are now subscribed -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

RE: crypto hash on files

2017-02-06 Thread andreas
hi Mike, Many thanks, that is awesome! You are awesome! Very cool! I will use this in my package management tool (yeah I'm still working on that), that way I don't have to introduce any dependency to openSSL or a similar lib. I'm now starting to use my package management tool in my (small)

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Alexander Burger
Hi Dean, > I'd like to split a list '(txt1 2 txt2 6 > into 2 lists > '(txt1 txt2... > and > '(2 6 You could for example filter them: (let (Lst '(txt1 2 txt2 6) A (filter sym? Lst) B (filter num? Lst) ) ... use A and B ...) > I found drop (in ninety

crypto hash on files

2017-02-06 Thread Mike Pechkin
hi all, @beneroth on IRC requested native implementation to hash files on SHA1. I did SHAKE128 too. Directory in repo: https://bitbucket.org/mihailp/tankfeeder/src/220ba71b3f89e21aaea945d4399ad9eafe91764b/crypto/?at=default Reference via tests: test-sha1sum.l and test-shake128sum.l Code can

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Lindsay John Lawrence
All of those problems are fun to explore... try writing different versions of the selected solutions, iterative vs recursive, using just basic list building block functions vs the wonderfully convenient functions that picolisp provides, etc This particular one piqued my interest enough to try

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Lindsay John Lawrence
Once I started to get the hang of the basic building blocks, I started seeing patterns and ways to build on what I had written before e.g. To me, the next logical development of dropN, pickN is to allow providing a predicate function... effectively making it a general purpose list filter

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Lindsay John Lawrence
I couldn't resist tinkering with this a bit more. # -- (de selectN (Lst P) (let selectNN '((Lst P I) (cond ((= 'NIL Lst) 'NIL) ((P (car Lst) I) (cons (car Lst)

Subscribe

2017-02-06 Thread Christopher Howard
Hello Christopher Howard :-) You are now subscribed -- https://qlfiles.net -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Alexander Burger
On Tue, Feb 07, 2017 at 07:41:45AM +0100, Alexander Burger wrote: > (cond >((= 'NIL Lst) 'NIL) One important note: (= 'NIL Lst) is not a good idea. Better to use (not Lst). (= NIL Lst) would compare *names* if 'Lst' happened to be a symbol, so (= NIL "NIL") returns T.

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Alexander Burger
On Tue, Feb 07, 2017 at 08:13:06AM +0100, Alexander Burger wrote: > Better to use (not Lst). One more note: I even try to avoid 'not' whenever possible, as it is an additional function call overhead. It is often possible to use the complementary flow function, like (ifn Lst ..) instead of (if

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Alexander Burger
Hi Lindsay, > I couldn't resist tinkering with this a bit more. Many thanks for this and all the previous examples! > # -- > (de selectN (Lst P) >(let selectNN > '((Lst P I) > (cond > ((= 'NIL Lst) 'NIL) >

Re: (= code data)

2017-02-06 Thread Lindsay John Lawrence
Very interesting! It will take me a while to digest all of that though =) /Lindsay Side note: I had to look up the square bracket use. I did not realize you could do that in picolisp. The semantics are different but it reminded me of the code in the "Lisp 1.5 Programmer's Manual" (

Subscribe

2017-02-06 Thread Christopher Howard
Hello Christopher Howard :-) You are now subscribed -- Christopher Howard, Computer Assistant Alaska Satellite Internet 3239 La Ree Way, Fairbanks, AK 99709 907-451-0088 or 888-396-5623 (toll free) fax: 888-260-3584 mailto:christop...@alaskasi.com

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Alexander Burger
On Mon, Feb 06, 2017 at 12:25:14PM +0100, Alexander Burger wrote: > > I'd like to split a list '(txt1 2 txt2 6 > > into 2 lists > > '(txt1 txt2... > > and > > '(2 6 > > You could for example filter them: > >(let > (Lst '(txt1 2 txt2 6) > A (filter sym? Lst) > B

Re: (= code data)

2017-02-06 Thread Danilo Kordic
Hi Lindsay. What do You think about: : [load "frac.l"] # https://gist.github.com/DKordic/6016d743c4c124a1c04fc12accf7ef17 Not usable yet :) . : (/ 10 -15) -> (/ -2 3) Maybe `recur' should also be mentioned in ``Jump anywhere'' task. Hi Rowan. [de help: [Sym Txt] [def Sym 'help: Txt]

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
Oh gosh...I missed that completely...Thanks Lindsay...That explains everything! I'm really pleased you told me that because drop looks like a really useful function. Best Regards Dean On 6 February 2017 at 22:27, Lindsay John Lawrence < lawrence.lindsayj...@gmail.com> wrote: > P16 (**) Drop

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
I just came back to say I just looked and didn't realise I had to click P16 to see that function Thanks once again. Just goes to show...however idiot-proof you make your system someone will just invent a better idiot :) On 6 February 2017 at 22:51, dean wrote:

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
Hi Alex : (filter prog2 (1 a 2 b 3 c) '(T NIL .)) -> (1 2 3) : (filter prog2 (1 a 2 b 3 c) '(NIL T .)) -> (a b c) Yes the above is exactly what I'm after. I copied this drop example straight from ninety nine ? P16 (**) Drop every N'th element from a list. : (drop '(a b c d e f g

Re: replacement for (let L2 (drop L1 2)....

2017-02-06 Thread Lindsay John Lawrence
P16 (**) Drop every N’th element from a list. (de drop (Lst N) (make (for (I . X) Lst (unless (=0 (% I N)) (link X) ) ) ) ) : (drop ’(a b c d e f g h i k) 3) -> (a b d e g h k) 'drop' is the function given as a solution to the problem. /Lindsay On Mon, Feb 6, 2017 at 1:24

replacement for (let L2 (drop L1 2)....

2017-02-06 Thread dean
Hi I'd like to split a list '(txt1 2 txt2 6 into 2 lists '(txt1 txt2... and '(2 6 I found drop (in ninety nine...) which looks ideal but it's apparently undefined in pil64. I've looked for something similar but it's not jumping out :) Any help much appreciated.