AdventOfCode 2017

2018-01-02 Thread Mike Pechkin
hi all,

All tasks on PicoLisp:
https://bitbucket.org/mihailp/tankfeeder/src/default/advent2017/
day 21 - skipped, hardly can understand the description, Its ok.

Legend:
o) pil64 only, because of (co)
o) resident memory size - 10MB
o) day 3 (part 1) solved by hand on paper
o) day 11 is the most interesting
o) (grid) - days 3 (part 2), 14 and 19
o) (co) - day 18
o) (state) - day 25
o) codebase call will be append to huge.l for testing future releases
o) Yes, PicoLisp is practical creature.

p.s. Author of PicoLisp (Alexander Burger) is free for hiring and
CV available by request.



Comments and patches are welcome,
(mike)


Re: Two questions regarding 'native'

2017-10-24 Thread Mike Pechkin
​Alfonso,

Make a post on reddit.com/r/lisp​




> I've created a public Bitbucket repository with my work so far, including
> some examples.
> https://bitbucket.org/alfonsovillen/picolispffi
>
> I don't know if someone will be interested in it, but I'm having fun doing
> it.
>


Re: Differences of Stack and List data structures

2017-10-01 Thread Mike Pechkin
hi,

good startpoints:
http://rosettacode.org/wiki/Stack#PicoLisp
http://rosettacode.org/wiki/Singly-linked_list/Element_definition#PicoLisp


On Sun, Oct 1, 2017 at 3:49 PM, stayfirefo...@outlook.com <
stayfirefo...@outlook.com> wrote:

>
>
>
>
> Sent from Mail  for
> Windows 10
>
> Hello everyone,
>
> What are all differences of stack and list data structures?
>


Re: PicoLisp on quora.com

2017-09-26 Thread Mike Pechkin
>
>
> Uh, oh, this is really tough.


​Just one smart paragraph.

(mike)
​


PicoLisp on quora.com

2017-09-26 Thread Mike Pechkin
hi all,

Can somebody answer to this ?
https://www.quora.com/unanswered/What-is-the-difference-between-PicoLisp-and-Common-Lisp

(mike)


Re: (rand) audit

2017-08-30 Thread Mike Pechkin
On Tue, Aug 29, 2017 at 6:05 PM, Jakob Eriksson 
wrote:

> What does that mean?
>

​in general it means (rand) function generates good pseudo random numbers
checked by special software.


(rand) audit

2017-08-29 Thread Mike Pechkin
hi all,

Buildin (rand) function (D. Knuth's book) passed all tests
by Practically Random software (v0.93).
https://sourceforge.net/projects/pracrand/


While testing I've also implement jsf and sfc RNGs (64bit versions),
passed all tests too:
https://bitbucket.org/mihailp/tankfeeder/src/default/rng/?at=default

Happy hacking,
(mike)


Re: anyone tried cygwin or mingw recently?

2017-07-10 Thread Mike Pechkin
>
>
> Does MSYS handle fork?
>
>
​yes.​


Re: anyone tried cygwin or mingw recently?

2017-07-06 Thread Mike Pechkin
Richard,

I've compile picoLisp under msys (http://www.msys2.org/)
and 'ctl' locking works here.
You should a try.

On Wed, Jul 5, 2017 at 4:20 PM, Alexander Burger 
wrote:

> On Wed, Jul 05, 2017 at 02:27:34PM +0200, Richard Z wrote:
> > > We now checked with Mike. Seems most of it is still needed. So we just
> did the
> > > first case in src/io.c
> >
> > so database locking now works (minus ocassional Windows bugs)?
>
> Unfortunately not. It just passes compilation. We tested with 'ctl'. It
> just
> seems to ignore the lock under Cygwin.
>
> ♪♫ Alex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: anyone tried cygwin or mingw recently?

2017-07-02 Thread Mike Pechkin
On Sun, Jul 2, 2017 at 8:07 PM, Richard Z  wrote:

> Hi,
>
> noticed that the code still has
>
> #ifdef __CYGWIN__
> #include 
> #define fcntl(fd,cmd,fl) 0
> #endif
>

​on my cygwin it compiles and pass buildin tests without code above

Re: single letters

2017-06-16 Thread Mike Pechkin
https://bitbucket.org/mihailp/tankfeeder/src/70c0cfb9e8e3adf4737f70a23a9d4b615d74e4ff/onechar.l?at=default=file-view-default

On Sat, Jun 17, 2017 at 5:31 AM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi list. In picolisp, what would be the simplest way to check if a
> string (trans sym) is one character long and that the character is one
> of the letters a-z or A-Z?
>
> --
> https://qlfiles.net
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Learning Lisp

2017-06-12 Thread Mike Pechkin
https://www.cs.cmu.edu/~dst/LispBook/
all tasks, some ignored, on PicoLisp
https://bitbucket.org/mihailp/tankfeeder/src/5a91a025d78eacf68655b6dbec5c2dd346624146/Touretzky/?at=default

(mike)


KangarooTwelve: fast hashing based on Keccak-p

2017-06-01 Thread Mike Pechkin
hi,

Implementation:
http://keccak.noekeon.org/KangarooTwelve.pdf
https://bitbucket.org/mihailp/tankfeeder/src/644e66f9f04d07227dc4c30cd0dfecd5212aa22b/crypto/?at=default

files:
kangaroo12.l
test-kangaroo12.l

(mike)


Re: Termux-Penti-PicoLisp

2017-05-17 Thread Mike Pechkin
cant play videos on windows 10 in chrome-firefox-opera

On Wed, May 17, 2017 at 6:57 PM, Alexander Burger 
wrote:

> Hi all,
>
> whoever might be interested in PicoLisp development on (and also for)
> Android:
>
> I published an article, with many short videos, in
>
>https://picolisp.com/wiki/?TermuxPentiPicolisp
>
> trying to explain how I do it most of my time.
>
> Hope it is useful! :)
>
> ♪♫ Alex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


update quora

2017-05-07 Thread Mike Pechkin
hi all,

https://www.quora.com/What-is-your-review-of-PicoLisp
Who can add review ?

(mike)


ini and csv

2017-05-03 Thread Mike Pechkin
hi all,

https://bitbucket.org/mihailp/tankfeeder/src
files: ini.l and csv.l
In my repo you can find two parsers for INI and CSV files.
Comments and bug reports are welcome.
Pure fun.

(mike)




Re: native calling

2017-03-02 Thread Mike Pechkin
It needs clear:
o) you create demo picolisp code without native calls as demo and startpoint
o) I need a list of library functions you gonna use
o) I create native wrappers or something
o) you glue your code and native

On Thu, Mar 2, 2017 at 7:06 PM, Mike Pechkin <mike.pech...@gmail.com> wrote:

>
> hi,
>
> I need more experience in (native) usage.
> If somebody need library bindings to something you can request here or
> directly.
>


native calling

2017-03-02 Thread Mike Pechkin
hi,

I need more experience in (native) usage.
If somebody need library bindings to something you can request here or
directly.

(mike)


blake2b

2017-03-01 Thread Mike Pechkin
hi,

I've implement blake2b:
o) cool and fast
o) https://blake2.net/
o) speed comparison https://blake2.net/skylake.png
o) optional keying
o) pass on original test vectors
o) dont forget D.J.Bernstein and ChaCha as core primitive

URL:
https://bitbucket.org/mihailp/tankfeeder/src/1c64f0fec2bd7242092c785129f131121a4e72a8/crypto/?at=default

FILES:
o) blake2.l
o) test-blake2.l

Mike


Re: exercism.io

2017-02-25 Thread Mike Pechkin
https://github.com/exercism/x-common/tree/master/exercises

On Sun, Feb 26, 2017 at 1:20 AM, Joh-Tob Schäg  wrote:

> Thanks for sharing.
> Can you link the list of tasks or is it behind a login wall?
>
> 2017-02-25 9:42 GMT+01:00 Alexander Burger :
>
>> Hi Mike,
>>
>> > I've implemented tasks from A to F:
>> > https://bitbucket.org/mihailp/tankfeeder/src/9de46f9e807786f
>> dbf4a86604aca20dd25f0c19e/exercism-io/?at=default
>>
>> Great! Thanks for sharing!
>>
>> ♪♫ Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: Workers for multicore processing (Question and RFC)

2017-02-25 Thread Mike Pechkin
>
>
>
>
> Is there some "worker" implementation which keeps a queue of task to do
> and creates N worker processes which take tasks from the queue when they
> are finished?
>
>
​you have to implement everything by yourself.
as start point:
https://bitbucket.org/mihailp/tankfeeder/src/9de46f9e807786fdbf4a86604aca20dd25f0c19e/map-reduce.l?at=default=file-view-default

https://bitbucket.org/mihailp/tankfeeder/src/9de46f9e807786fdbf4a86604aca20dd25f0c19e/pow.l?at=default=file-view-default
​


Re: Destructive element modification?

2017-02-24 Thread Mike Pechkin
ast start point:
http://ideone.com/zPndpA

On Sat, Feb 25, 2017 at 9:01 AM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi list. How do I *destructively* modify the value of one element in a
> list? E.g.
>
> (setq Lst (1 2 3 4))
>
> How do I set the second element to be 10, without creating a new list,
> and without using "con" to change a lot of the list?
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


exercism.io

2017-02-24 Thread Mike Pechkin
hi all,

I've implemented tasks from A to F:
https://bitbucket.org/mihailp/tankfeeder/src/9de46f9e807786fdbf4a86604aca20dd25f0c19e/exercism-io/?at=default

o) dumbest and duplicates from rosettacode ignored
o) worth to check are Alphametrics and Change

If you want:
o) pick up one task
o) set reservation
o) implement and send your code
o) repeat

Mike


Re: Ersatz (sym? -.1) differs from pil32

2017-02-14 Thread Mike Pechkin
# pil +
: (== 64 64)
-> T
: (version)
17.1.7
-> (17 1 7)
: (mapcar sym? '(+.1 -.1))
-> (T T)
:



On Tue, Feb 14, 2017 at 3:51 PM, Jon Kleiser  wrote:

> Hi,
>
> There seems to be a tiny difference between Ersatz and ordinary PicoLisp
> in the “sym?” function.
>
> In Ersatz (17.1.25 JVM) I get this:
>
> : (mapcar sym? '(+.1 -.1))
> -> (T NIL)
>
> In 32-bit PicoLisp (16.12.8 C) I get this:
>
> : (mapcar sym? '(+.1 -.1))
> -> (T T)
>
> I have not tested this in 64-bit PicoLisp. Sorry. ;-)
>
> /Jon


Re: Recursion-Loop Macro?

2017-02-12 Thread Mike Pechkin
write yourself recursion call and you will see you don't need macro.


On Sun, Feb 12, 2017 at 5:40 AM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi list. I got the impression from some of the documentation that we
> aren't planning to implement TCO in picoLisp, and that the preferred
> approach is to just use a loop. I don't want to argue against that, but
> I was just wondering if perhaps somebody had a macro that made a loop
> look like a recursive tail call?
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Segfault with huge list...?

2017-02-10 Thread Mike Pechkin
yea

On Fri, Feb 10, 2017 at 5:21 PM, Joh-Tob Schäg <johtob...@gmail.com> wrote:

> (de natsum (N)
>   (if (=0 N)
> 0
> ( +  N
>   ( natsum ( dec N)
>
> Like that?
> Am 10.02.2017 15:28 schrieb "Mike Pechkin" <mike.pech...@gmail.com>:
>
>> hi,
>>
>> On Fri, Feb 10, 2017 at 3:07 PM, Christopher Howard <
>> christopher.how...@qlfiles.net> wrote:
>>
>> > Hi list. When I try to do
>> >
>> > (apply '+ (range 1 100)
>> >
>>
>>
>> ​List of ​millions of items is not a problem.
>> Problem how you use it.
>> (apply) is not for free, ​It *creates*​ a function call with a million of
>> arguments.
>> Stack size make sense.
>>
>>
>> > I get segfault. I thought maybe this was some kind of internal
>> > limitation of the apply function, so I defined a foldl:
>> >
>> > (de foldl (Fn Acc Lst)
>> > (if (== () Lst) Acc
>> > (let Acc2 (Fn Acc (car Lst))
>> >  (foldl Fn Acc2 (cdr Lst)) ) ) )
>> >
>> > : (foldl '+ 0 (range 1 1000))
>> > (foldl '+ 0 (range 1 1000))
>> > -> 500500
>> > : (foldl '+ 0 (range 1 100))
>> > (foldl '+ 0 (range 1 100))
>> >
>> >
>> ​
>> Stack size makes sense too.
>> I like recursions this way:
>>
>> (de rec1 (F A L)
>>(if L
>>   (rec1 F (inc 'A (++ L)) L)
>>   A ) )
>>
>> recursion with hidden accumulator from outer call and car-cdr:
>> (de rec2 (F L A)
>>(default A 0)
>>(if L
>>   (rec2 F (cdr L) (inc 'A (car L)))
>>   A ) )
>> The call will be:  (rec2 '+ (range 1 100)))
>>
>>
>> As recursion just loop you can implement it without big stack too:
>> (de sum1 (L)
>>(let N 0
>>   (for I L
>>  (inc 'N I) ) ) )
>>
>> even without list creation:
>> (de sum2 (X)
>>(let N 0
>>   (for I X
>>  (inc 'N I) ) ) )
>>
>>
>> And finally, that's why (sum) was implemented:
>> (sum prog (range 1 100)))
>>
>>
>> Bonus: for practice write recursion function to sum numbers without
>> (range)
>
>


Re: Segfault with huge list...?

2017-02-10 Thread Mike Pechkin
hi,

On Fri, Feb 10, 2017 at 3:07 PM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi list. When I try to do
>
> (apply '+ (range 1 100)
>


​List of ​millions of items is not a problem.
Problem how you use it.
(apply) is not for free, ​It *creates*​ a function call with a million of
arguments.
Stack size make sense.


> I get segfault. I thought maybe this was some kind of internal
> limitation of the apply function, so I defined a foldl:
>
> (de foldl (Fn Acc Lst)
> (if (== () Lst) Acc
> (let Acc2 (Fn Acc (car Lst))
>  (foldl Fn Acc2 (cdr Lst)) ) ) )
>
> : (foldl '+ 0 (range 1 1000))
> (foldl '+ 0 (range 1 1000))
> -> 500500
> : (foldl '+ 0 (range 1 100))
> (foldl '+ 0 (range 1 100))
>
>
​
Stack size makes sense too.
I like recursions this way:

(de rec1 (F A L)
   (if L
  (rec1 F (inc 'A (++ L)) L)
  A ) )

recursion with hidden accumulator from outer call and car-cdr:
(de rec2 (F L A)
   (default A 0)
   (if L
  (rec2 F (cdr L) (inc 'A (car L)))
  A ) )
The call will be:  (rec2 '+ (range 1 100)))


As recursion just loop you can implement it without big stack too:
(de sum1 (L)
   (let N 0
  (for I L
 (inc 'N I) ) ) )

even without list creation:
(de sum2 (X)
   (let N 0
  (for I X
 (inc 'N I) ) ) )


And finally, that's why (sum) was implemented:
(sum prog (range 1 100)))


Bonus: for practice write recursion function to sum numbers without (range)

Re: box? on address

2017-02-09 Thread Mike Pechkin
hi,

Lets talk about
​​t
ransient
​s​
ymbols
​ from this two links:
http://software-lab.de/doc/ref.html#transient
http://pastebin.com/AsuveCFY

​

On Thu, Feb 9, 2017 at 7:13 PM, Christopher Howard  wrote:

> Hi, I was just trying to understand...
>
> : (box? (box (4 5 6)))
> -> $384375304
> : (box? $384375304)
> -> NIL
> : (car $384375304)
> -> 4
>
> Shouldn't (box? $384375304) be non-NIL?
>
> --
> 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
> http://www.alaskasatelliteinternet.com
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Mips / LibreCMC build

2017-02-08 Thread Mike Pechkin
On Wed, Feb 8, 2017 at 3:45 PM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> I would like to share the build with the world. Did you
> guys want to host the build somehow, or did you want me to host
> elsewhere and then link to my repo?


​You could​
​ create page on
http://picolisp.com/wiki
with anounce here and or reddit.com/r/lisp

​Mike
​


Re: Modularization / Shared Libraries

2017-02-08 Thread Mike Pechkin
On Wed, Feb 8, 2017 at 3:20 PM, Christopher Howard <
christopher.how...@qlfiles.net> wrote:

> Hi all, picolisp newbie here. I was trying to figure out how to
> "modularize" my code; there doesn't seem to be a module system built in,
> but the reference doc did mention support for shared libraries. A few
> questions:
>

​As I can understand you mix two different functions - load and native



>
> 1) On Gnu/Linux, how do you put code into a shared library?
>
>
​Look how builtin tests splits to files:​
https://bitbucket.org/mmamkin/picolisp/src/e33e90fb0e11aa6cdb8634c8ef73b1dac5c1f60a/lib/test.l?at=default=file-view-default



> 2) Where on the system does picolisp search for shared libraries?
>

native searches in dirs from ldconfig -p​


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 return list too.
I general I trust all above.
Comments, patches and optimizations are always welcome.

Mike


Re: Future of PicoLisp?

2017-02-04 Thread Mike Pechkin
> Now as far as trying PicoLisp goes, could we make a little app like
> http://www.tryclj.com?
>

​Already done in ideone.com​


Re: back to the future in bench game

2017-01-17 Thread Mike Pechkin
Author of http://pixielang.org/ in the city.
Welcome to community

On Tue, Jan 17, 2017 at 7:10 PM, Timothy Baldridge 
wrote:

> > Check link in archive:
> >https://web.archive.org/web/20150308140349/http://
> kazimirmajorinc.com/Documents/The-speed-of-eval-in-some-
> Lisp-implementations/index.html
>
> As a Clojure programmer, I find that Clojure code rather...gross. Of
> course it's slow, Clojure is optimized completely differently from other
> lisps. On my machine the example in the link:
>
> (time (do (def i 1)
>   (while (< i 100)
>  (def i (+ i 1))
>  (do (def x 0)
>  (def x (+ x 1))
>
> Takes 1.1sec to run, but no Clojure programmer in their right mind would
> abuse global defs that way. The correct implementation is:
>
> (time (dotimes [i 100]
>  (+ 0 i)))
>
> Which completes in .2ms once the JIT warms up (about 4-5 iterations).
>
> Same with the other example:
>
> (time (do (def i 1)
>   (while (< i 100)
>  (def i (+ i 1))
>  '(do (def x 0)
>   (def x (+ x 1))
>
> 266ms vs:
>
> (time (dotimes [i 100]
> '(do (def x 0)
>
> (def x (+ x 1)
>
> .3 ms with a warm JIT
>
>
> Timothy Baldridge
>
>


Re: differentiate between pg_up vs pg_down keys and delete vs

2017-01-12 Thread Mike Pechkin
this out how i handle keys in 2048 game:
https://bitbucket.org/mihailp/tankfeeder/src/2f70061e8923fe1ac1af1bc7bce57e80fd664ba8/2048.l?at=default=file-view-default


On Thu, Jan 12, 2017 at 5:25 PM, dean  wrote:

>
> -- Forwarded message --
> From: dean 
> Date: 5 January 2017 at 15:55
> Subject: differentiate between pg_up vs pg_down keys and delete vs
> backspace keys
> To: picolisp@software-lab.de
>
>
> So far I've been doing (setq Key_you_want )
> and this has worked well but on the BSDs pgup/pgdown give the same code.
> What do I need to do in picolisp to differentiate between the two.
> BTW I've seen term.l but just want to use the keys...not their intended
> action.
> Happy New Year
> Dean
>
>


Re: why does my thread appear to have been started by Willie Arnold who

2016-12-23 Thread Mike Pechkin
Please if you find a solution to your own problem next time append it as
> answer to your question to prevent others from waisting there time
> responding...
>
>

​Your are not wasting your time.
Never.

Mike​


later vs. co

2016-11-17 Thread Mike Pechkin
hi,

https://bitbucket.org/mihailp/tankfeeder/raw/43d62edb11d56b4ffada4f728ab59b5455c97fbc/pow.l

https://bitmessage.org/wiki/Proof_of_work


I've implement more two versions for calculation Bitmessage POW on (later)
and (co) functions. It works.
environment:
o) DELL PowerEdge 430 (modern)
o) Centos 7
o) pil64
o) equal number (64) of workers for later and co.

bench:
o) in-row ~10 secs
o) co ~10 secs
o) later ~2 secs

p.s. I will add all this code to bundle of tests for future releases.

Mike


Re: map-reduce

2016-11-16 Thread Mike Pechkin
> The parallel magic seems to be here:
>
>
​PicoLisp is pure magic itself.

Mike
​


password hashes

2016-11-07 Thread Mike Pechkin
hi,

1. Now I have a full collection of password hashes:
bcrypt
pbkdf2
scrypt
2. yescrypt and Argon2 are candidates in the future.
Every hash works slower and slower already.
3. I've implement local password hasher pilpwd as (pbkdf2+sha256)
4. Ideas for future online minimalism version: https+native+Argon2 as mimic
of
https://getvau.lt/
https://www.pwdhash.com/
https://lesspass.com/#/

All code are here:
https://bitbucket.org/mihailp/tankfeeder/src/aea7dd71f485f5b6631f1d00afa04ce9f0b35948/crypto/?at=default

Mike


Re: FreeBSD 11

2016-10-11 Thread Mike Pechkin
> When you say you are an ex-ports maintainer, do you mean in general?
> or of a Picolisp Ports-package in particular?


​All related to OpenBSD.
It was in decades ago.
I cant help you here.


FreeBSD 11

2016-10-10 Thread Mike Pechkin
hi all,

%subj% is out:
https://lists.freebsd.org/pipermail/freebsd-announce/2016-October/001760.html


Who want or can test for build and test bundled tests on pil32 and 64 on
FreeBSD 11 ?

Mike


slow nth

2016-10-01 Thread Mike Pechkin
hi,

Current implementation of bcrypt is slow (8 rounds == >4secs).
Its ok, nth is not for free.
o) blowfish encrypt one block of input data takes 32K nth calls.
o) 8 round's bcrypt takes 16M nth calls.

I will try re-implement blowfish's sboxes access and modifications via
balance+lup
Check this out:
http://pastebin.com/SQ6FtdCx

Note: balance+lup gives more profit under pil64 on the same hardware.

Mike


Re: bcrypt

2016-09-20 Thread Mike Pechkin
> Can you make the rounds (cost factor) available as a parameter (perhaps as
> a global) ?
>
That would be quite important to use the library correctly.
>


Default rounds:
o) golang - 10
o) pybcrypt - 12
o) openbsd root - 9
o) openbsd user - 8

Implementation was already "broken":
o) no base64
o) no rounds
o) no compatibility with others implementations
o) lists only

Its so simple to change (increase?) hard-coded value and go forward.
User dont want *store* and pass rounds to function.
The only correct way to *use* library is to implement all himself.

Mike


Re: bcrypt

2016-09-19 Thread Mike Pechkin
all under CC0.
you are free to do you want.

On Mon, Sep 19, 2016 at 3:12 PM, Joe Bogner  wrote:

> Mike, this looks great. What license covers this work - I see CC0 in the
> root LICENSE[1] but didn't want to assume? Can I redistribute the source
> with my example app?
>
> [1] - https://bitbucket.org/mihailp/tankfeeder/src/
> f9ad69ad2a6ec35941f50c4ec1160e7a53ea3e67/LICENSE?at=default&
> fileviewer=file-view-default
>
> On Sun, Sep 18, 2016 at 9:00 AM, Alexander Burger 
> wrote:
>
>> Hi Mike,
>>
>> > bcrypt is ready
>>
>> Cool! Thank you!
>> ♪♫ Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


bcrypt

2016-09-18 Thread Mike Pechkin
hi,

bcrypt is ready
https://bitbucket.org/mihailp/tankfeeder/src/f9ad69ad2a6ec35941f50c4ec1160e7a53ea3e67/crypto/?at=default

1. new blowfish implementation, on "Vars". Pass original test vectors
2. implementation itself comparable to golang's bcrypt results
3. without base64 support, input-output lists only
4. hardcoded 8 rounds
5. to generate password and store it do:
(bcrypt (mapcar char (chop "qwerty123")))
it returns lists form: ((HASH) (SALT))
6. to check password entered do:
(=
   HASH
   (bcrypt (mapcar char (chop FROMUSER)) SALT) )
6. in general i trust all above

Mike


Re: web app example - todo w/mithril.js

2016-09-14 Thread Mike Pechkin
I will implement bcrypt in PicoLisp.


On Wed, Sep 14, 2016 at 7:14 AM, Joe Bogner  wrote:

> I've been working on an example of using PicoLisp to create  as a single
> page web application (javascript / SPA).
>
> The code is available at https://github.com/joebo/pil-mithril-todo
>
> You can play with the example here (may be temporary):
>
> http://csilo.com:8088/
>
> log in with admin/admin
>
>
> I welcome any feedback!
>
> Joe
>


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Mike Pechkin
>
> crashes? What is in the temp stack? Perhaps it is the fixed prin/prinl
> issue of anonymous symbols.
>
>
​tempStack is list, look how it prints when not crashed​

http://pastebin.com/mTj51y4B


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-27 Thread Mike Pechkin
> Perhaps you can 'trace' to locate the exact place?
>
>
http://pastebin.com/kb6DGxpN


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Mike Pechkin
to whom it interesting how it was fixed
https://bitbucket.org/mihailp/picolisp/commits/c25c1b79706ac77c1ec5cfd339fd522f49c61a8b#chg-src/io.c

On Fri, Aug 26, 2016 at 7:23 PM, Alexander Burger 
wrote:

> On Fri, Aug 26, 2016 at 06:04:22PM +0200, Alexander Burger wrote:
> > Must be my fault. I never had the idea to 'prinl' an anonymous symbol
> > ('prinl' just low-level-outputs the names of symbols, but anonymous
> > symbols don't have a name ;)
> >
> > Perhaps it works in pil64 just by chance. I'll check (and fix) both
> > versions).
>
> OK, fixed it in pil32.
>
> pil64 is all right, it did a proper check. And Ersatz and miniPicoLisp
> are also not affected :)
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: toy-forth-in-picolisp, and a 32-bit problem

2016-08-26 Thread Mike Pechkin
hi,

My host is CentOS7 x64 (pil32 and pil64).
​1. simpler code is enough to fault:
: f 4 ;
2. important note: pil32 *not* always coredumps
​3.​
​ ​
problem is like this code:
http://pastebin.com/ZzSXgsUa

Mike


Re: task db example

2016-08-25 Thread Mike Pechkin
Thanks, perfect start point.


On Wed, Aug 24, 2016 at 4:08 PM, Joe Bogner  wrote:

> Some discussion on irc this morning prompted me to create a simple example
> showing how to interact with the db directly.
>
> I posted it to the wiki and am sharing it here in case anyone would benefit
>
> http://picolisp.com/wiki/?taskdb
>
>
>


The Evolution of a PicoLisp Programmer

2016-07-22 Thread Mike Pechkin
hi all,

In mirror of this list:
http://www.willamette.edu/~fruehr/haskell/evolution.html

Provided three different variations of function to check if required
version of PicoLisp is ok or higher. If they written in school, university
or enterprise. Tests included.

https://bitbucket.org/mihailp/tankfeeder/src/e908ca118ec50c72e852d08467ff1451df0745ad/version.l?at=default=file-view-default

Mike


Re: flinuxpicolisp

2016-07-04 Thread Mike Pechkin
hi all,

why not cygwin with 32bit version of PicoLisp?
it works out of box, tested, passed buildin tests and can run all my code
as any linux.

Mike

On Mon, Jul 4, 2016 at 9:17 PM, Thorsten  wrote:

> Hi List,
> I just discovered a nice article by Joe Bogner about FLINUX as an
> alternative was to run PicoLisp under Windows (http://picolisp.com/wiki/?
> flinuxpicolisp).
>
> I tried it out, and succeded to a certain point but not further.
>
> When installing necessary tools like wget, make etc. I often hit the
> "could not change the root directory (No such file or directory)" error,
> but it appeared after the last installation step, and after an C-c
> installation appeared successful.
>
> But when trying to compile the 64bit version, Java is missing, and when I
> try to install it, I get the above error in the middle of the installation
> process that thus cannot finish.
>
> There is some info about this
> (https://github.com/wishstudio/flinux/issues/63), but I could not really
> find a solution. Did somebody on the list succeed with the Flinux install
> of the 64bit version on Windows?
>
> Any hints would be welcome.
> Cheers
> Thorsten
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


all SHA3 finalists on PicoLisp

2016-06-28 Thread Mike Pechkin
hi,

I proud to announce finished implementation of all SHA3 finalists on
PicoLisp:
o) blake, jh, skein, keccak, grostl

Since last emails also have been implemented:
o) crypto: whirlpool, tiger
o) hash: xxhash
o) RNG: mum, xoroshiro128+

https://bitbucket.org/mihailp/tankfeeder/src
dirs: crypto, hash, rng

Mike


Re: Best way to learn picolisp

2016-06-08 Thread Mike Pechkin
On Wed, Jun 8, 2016 at 3:08 PM, Lawrence Bottorff  wrote:

> So, what would the best way to learn picolisp be for a total beginner?
>

Real coding of any task is the best way to learn any programming language.

Mike
​


prog3 and dotimes

2016-06-06 Thread Mike Pechkin
hi all,

I want to share something very important related to picolisp:

1.
Half year ago I was wonder how to implement (prog3) (return third evaluated
expression) (without success), Regenaxer implemented it for me. I promised
I understand it someday. This day came, *now* I understand how (run) works
and why. This is so simple and important as core principle. Look at this
two versions of (prog3) from Alexander:
(de prog3-1 (A B Res . Prg)
   (run Prg 1)
   Res )
(de prog3-2 (A B Res . @) Res)

2.
As you may know (do) function has this form:
(do 'flg|num ['any | (NIL 'any . prg) | (T 'any . prg) ..]) -> any

Someday I was wonder how to implement (do) without NIL and T checks of
clauses.
I've implemented it via (run) as a try:
(de dotimes (N . Prg)
   (while (ge0 (dec 'N))
  (run Prg 1) ) )
(let (A -1  B 0  Prg 777)
   (dotimes 5
  (inc 'A)
  (setq Prg (>> 1 Prg))
  (dec 'B) )
   (test
  T
  (bool
 (and
(= A 4)
(= B -5)
(= Prg 24) ) ) ) )

3.
(dotimes) much slower than (do) anyway in this form and understandable why:
(bench
   (do 1000) )
0.117 sec
(bench
   (dotimes 1000) )
2.403 sec

Mike


Re: PicoLisp Docker container

2016-05-30 Thread Mike Pechkin
and ideone.com have a special minipicolisp version, without IO, networking,
utf8, bignum, db, and etc.
perfect fro embedded beasts.


On Mon, May 30, 2016 at 9:03 PM, Mike  wrote:

> also try add to glot.io
>
> https://github.com/prasmussen/glot/wiki/Instructions-for-adding-a-new-language-to-glot.io
>
> On 30 мая 2016 г., at 19:01, David Bloom  wrote:
>
> Thank you everyone for your help.  Mike, that will definitely be helpful
> as I try to get 386 dev libraries to get 'make all' to work.  Alex, once
> again you have the answer right away:
>
>  ~/picoLisp $ tar xvzf x86-64.linux.tgz
> src64/x86-64.linux.base.s
> src64/x86-64.linux.ext.s
> src64/x86-64.linux.ht.s
> ~/picoLisp $ cd src64/
> ~/picoLisp/src64 $ ls
> Makefile big.lerr.lgc.l
> io.l mkAsmsubr.l
>   sysdefs.cx86-64.linux.base.s
> apply.l  db.l ext.lglob.l
>   lib  mkAsm.l  sym.l
>tags x86-64.linux.ext.s
> arch defs.l   flow.l   ht.l
> main.l   net.lsys
>  version.lx86-64.linux.ht.s
> ~/picoLisp/src64 $ make
> as -o x86-64.linux.base.o x86-64.linux.base.s
> cc -o ../bin/picolisp x86-64.linux.base.o -Wl,--no-as-needed -rdynamic -lc
> -lm -ldl
> strip ../bin/picolisp
> as -o x86-64.linux.ext.o x86-64.linux.ext.s
> cc -o ../lib/ext x86-64.linux.ext.o -shared -export-dynamic
> strip ../lib/ext
> as -o x86-64.linux.ht.o x86-64.linux.ht.s
> cc -o ../lib/ht x86-64.linux.ht.o -shared -export-dynamic
> strip ../lib/ht
> ~/picoLisp/src64 $ cd ../bin/
> ~/picoLisp/bin $ ls
> picolisp   pilpilIndent  pilPretty  pshreplicawatchdog
>
>
> ~/picoLisp/bin $ sudo ln -s /home/tc/picoLisp /usr/lib/picolisp
> ~/picoLisp/bin $ sudo ln -s /usr/lib/picolisp/bin/picolisp /usr/bin
> ~/picoLisp/bin $ sudo ln -s /usr/lib/picolisp/bin/pil /usr/bin
> ~/picoLisp/bin $ pil +
> : (+ 1 2 3)
> -> 6
>
>
> Success!  Soon I shall announce PicoLisp in a Tiny Core Linux container to
> the list.  Thanks again, what a great community.
>
>
> On Mon, May 30, 2016 at 3:38 AM, Alexander Burger 
> wrote:
>
>> Hi David, Rick,
>>
>> On Sun, May 29, 2016 at 03:08:06PM -0400, Rick Hanson wrote:
>> > On Sun, May 29, 2016 at 1:52 PM, David Bloom  wrote:
>> > > ~/picoLisp/src $ make --version
>> > > GNU Make 4.1
>> > > ...
>> > > ---
>> > > ~ $ cd picoLisp/src64/
>> > > ~/picoLisp/src64 $ make
>>
>> OK, building pil64 is the way to go.
>>
>>
>> > > ./mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
>> main.l
>> > > gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l
>> > > sys/x86-64.linux.code.l
>> > > ../ersatz/pil: exec: line 5: java: not found
>> > > Makefile:142: recipe for target 'x86-64.linux.base.s' failed
>> > > make: *** [x86-64.linux.base.s] Error 2
>> >
>> > This just means that the build process can't find java.  The `java`
>> > executable has to be installed and on your PATH.
>>
>> Correct. When the pil64 make process wants to build the *.s files, it
>> needs a running PicoLisp to bootstrap. If it can't find any, it falls
>> back to ErsatzLisp which runs on the JVM.
>>
>> You could easily avoid all this hassle if you download the pre-generated
>> *.s files e.g. from
>>
>>http://software-lab.de/x86-64.linux.tgz
>>
>> ♪♫ Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: PicoLisp Docker container

2016-05-30 Thread Mike Pechkin
try this or use irc
http://www.mail-archive.com/picolisp@software-lab.de/msg05829.html


On Sun, May 29, 2016 at 8:52 PM, David Bloom  wrote:

> Hello List,
>
> I'm trying to make a PicoLisp container for development and scaling of
> PicoLisp applications.  At first I tried compiling within an Alpine Linux
> container and got musl errors, then tried in a 64-bit Tinycore linux
> container.
>
> Using latest source 16.2 I get the error below, any thoughts?  I'm not a C
> guy so this doesn't make much sense to me even when I look at the source
> code.  Thank you in advance for any suggestions, for the amazing language,
> and a very supportive community.
>
> ~/picoLisp/src $ gcc --version
> gcc (GCC) 5.2.0
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
> PURPOSE.
>
> ~/picoLisp/src $ make --version
> GNU Make 4.1
> Built for x86_64-unknown-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <
> http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
>
> ---
> ~/picoLisp/src $ make
> gcc -c -O2 -pipe -falign-functions=32 -fomit-frame-pointer
> -fno-strict-aliasing -W -Wimplicit -Wreturn-type -Wunused -Wformat
> -Wuninitialized -Wstrict-prototypes -D_GNU_SOURCE  -D_FILE_OFFS
> ET_BITS=64 -m32 -D_OS='"Linux"' main.c
> In file included from /usr/include/features.h:389:0,
> from /usr/include/stdio.h:27,
> from pico.h:5,
> from main.c:5:
> /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file
> or directory
> compilation terminated.
> Makefile:129: recipe for target 'main.o' failed
> make: *** [main.o] Error 1
>
> ---
> ~ $ cd picoLisp/src64/
> ~/picoLisp/src64 $ make
> ./mkAsm x86-64 ".linux" .s Linux base "" ../lib/map  version.l glob.l
> main.l gc.l apply.l flow.l sym.l subr.l big.l io.l db.l net.l err.l
> sys/x86-64.linux.code.l
> ../ersatz/pil: exec: line 5: java: not found
> Makefile:142: recipe for target 'x86-64.linux.base.s' failed
> make: *** [x86-64.linux.base.s] Error 2
>
>


Re: new crypto things

2016-04-22 Thread Mike Pechkin
https://bitbucket.org/mihailp/tankfeeder/src
folders: crypto and hash
also you may interested in 4clojure and rosetta folders

On Fri, Apr 22, 2016 at 5:48 PM, cat stevens <thebinarymi...@gmail.com>
wrote:

> PicoLisp has a git? Can I have a link?
> On Apr 22, 2016 9:52 AM, "Mike Pechkin" <mike.pech...@gmail.com> wrote:
>
>> hi all,
>>
>> my new code in repo:
>>
>> hash: adler32, crc64, fnv, siphash
>> crypto: grostl, rc2, rc5, rc6, camellia, idea
>>
>>
>> Mike
>>
>>


new crypto things

2016-04-22 Thread Mike Pechkin
hi all,

my new code in repo:

hash: adler32, crc64, fnv, siphash
crypto: grostl, rc2, rc5, rc6, camellia, idea


Mike


Re: Spring 2016 Lisp Game Jam

2016-04-19 Thread Mike Pechkin
1. 2048 in my repo already
https://bitbucket.org/mihailp/tankfeeder/src/34ef20ee65a0b3c0f1be5a0d56de27fa3d141304/2048.l?at=default=file-view-default

2. the hardest part of tetris implemented too, but without simul.l
https://bitbucket.org/mihailp/tankfeeder/src/34ef20ee65a0b3c0f1be5a0d56de27fa3d141304/citris/?at=default
https://imgur.com/4JelKp9




On Tue, Apr 19, 2016 at 7:29 AM, Robert Herman <rpjher...@gmail.com> wrote:

> I'm on my iPad and cannot check sources, but didn't Alex or somebody
> implement 2048 already? Or do you mean in HTML5?
> What does Alex and everyone else think about implementing a game engine
> from scratch, wrapping a few libraries, or wrapping an entire JS game
> framework?
> Alex made an RC flight sim that still wows me to this day; If only I could
> be so productive!
> I am playing with a C game engine called Corange that is minimal but
> inspiring as a root to wrap for PicoLisp then add the other supporting
> libraries for JS.
>
> And for a stretch, is there anyway to generate C to be compiled into llvm
> bytecode with llvm-gcc or clang? Or am I missing something, and we can
> somehow make a PicoLisp to llvm module, so we can generate JS with
> emscripten? I can see programming a pure PicoLisp game engine, and then
> running it in the browser after it has been translated to JS.
>
> Rob
>
>
> On Monday, April 18, 2016, Mike Pechkin <mike.pech...@gmail.com> wrote:
>
>>
>>
>> On Fri, Apr 15, 2016 at 7:33 PM, Alexander Burger <a...@software-lab.de>
>> wrote:
>>
>>> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
>>> > Hey, everyone, I am thinking on participating in the Lisp Game Jam
>>> coming
>>> > up in just 13 days.
>>> >
>>> > https://itch.io/jam/spring-2016-lisp-game-jam
>>> >
>>> > I invite all picolispers to try, so picolisp gets some love from the
>>> gaming
>>> > community!
>>>
>>> Wow, this is cool!
>>>
>>> Do you have an idea for a game? That would be the first issue.
>>>
>>>
>> ​my list for simul.l games
>> o) 2048
>> o) snake
>> o) roguelike
>> o) tetris​
>>
>>


Re: Spring 2016 Lisp Game Jam

2016-04-17 Thread Mike Pechkin
On Fri, Apr 15, 2016 at 7:33 PM, Alexander Burger 
wrote:

> On Fri, Apr 15, 2016 at 08:35:04PM +0700, Robert Herman wrote:
> > Hey, everyone, I am thinking on participating in the Lisp Game Jam coming
> > up in just 13 days.
> >
> > https://itch.io/jam/spring-2016-lisp-game-jam
> >
> > I invite all picolispers to try, so picolisp gets some love from the
> gaming
> > community!
>
> Wow, this is cool!
>
> Do you have an idea for a game? That would be the first issue.
>
>
​my list for simul.l games
o) 2048
o) snake
o) roguelike
o) tetris​


circR

2016-03-08 Thread Mike Pechkin
hi all,

I've create cool abstraction.
Works as circular list and after reset can count again from the beginning.
Used in Threefish implementation.
Usage example:
http://pastebin.com/dwSiNQgu

Code:
https://bitbucket.org/mihailp/tankfeeder/src/d38de78a9609d31a917ca73f8b8d9fe302afc5b8/circR.l?fileviewer=file-view-default

Code comments are welcome.

Mike


Re: Tractatus Pico-Blaesicus

2016-03-08 Thread Mike Pechkin
Do you mean https://en.wikipedia.org/wiki/Merab_Mamardashvili ?
>
> ​Yeap.
​


> And could you please provide us with an English version ?
> The automated translators that I tried produced nothing readable
> (but I guess the original is somewhat «tarabiscoté»).
>
> ​I cant.

Mike
​


Re: Tractatus Pico-Blaesicus

2016-03-08 Thread Mike Pechkin
hi,

in the beginning of year I've wrote special preface for Forth or coding in
general. In memory of Descartes. It describes zero step before coding.
in Russian:
https://medium.com/@tankfeeder/preface-8ea1e99d46f1#.yziufldc6

p.s. My philosopher is Mamardashvili


Mike



On Mon, Mar 7, 2016 at 8:25 PM, Alexander Burger 
wrote:

> Dear PicoLisp List,
>
> let me announce a strange little piece of [code?, documentation?,
> pamphlet?] which I wrote up to summarize some of the positions and
> philosophy of PicoLisp.
>
> In the spirit of Ludwig Wittgenstein I called it
>
>Tractatus Pico-Blaesicus
>
> and it can be accessed at
>
>http://picolisp.com/tractatus
>
>
> On the top-right of the page is a "Source" link.
>
> The code is an interesting exercise in itself:
>
> The HTML entry function 'tractatus' consists mainly of a read-macro
> which parses the embedded plaintext block into a '' structure,
> with the hierarchy based on the individual indentation levels.
>
> To have it all together in a single source, the CSS "file" is in fact
> the function 'tractatus.css', as well as the source download link
> 'tractatus.l' (despite their names).
>
>
> I suspect that the text is not complete yet, and probably neither
> error-free nor particularly consistent. Let me know what you think
> should be added or changed.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


new crypto functions

2016-02-26 Thread Mike Pechkin
hi,

news from blackbox department.
I've implement new stuff:
o) blowfish
o) twofish
o) BLAKE (hash)
PicoLisp is ok.

Comments and code review are welcome.

Mike


crypto db

2016-02-17 Thread Mike Pechkin
hi,

first of all, i don't understand picodb and didn't write a line of code.
question: is it hard to implement crypto-like-db with encryption on-the-fly?
as example for local password manager, right?

Mike


non-crypto hash functions

2016-02-14 Thread Mike Pechkin
hi all,

https://bitbucket.org/mihailp/tankfeeder/src/4475ad4ceb0c587207ede6a2ff0136d95bae4b82/hash/?at=default

I've implement several hashes on PicoLisp:
o) djb
o) murmur v1,2,3
o) cityhash
All 32bit versions.

Have fun,
Mike


citris

2016-02-09 Thread Mike Pechkin
hi all,

it was idea:
try to create tetris on lists,
destructively and without grid from simul.l

current code:
https://bitbucket.org/mihailp/tankfeeder/src/2a5c18b2694c641564298c34f6aed7842019ae35/citris/?at=default

playground:
1. move.l - use arrow keys to move object inside world
2. roll.l - rolling all possible objects inside world
https://imgur.com/4JelKp9

I have to stop here, rest are trivial and boring :)

Mike


Re: gcc command lines

2016-02-09 Thread Mike Pechkin
hi,

OK. new patch:
o) old lines not touched
o) rename -W -> -Wextra
o) new line:
-Wextra -Wimplicit -Wreturn-type -Wunused -Wformat

Mike


On Mon, Feb 8, 2016 at 11:27 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> hi,
>
> you are correct, this is draft patch.
> > Goal: compile with minimum commands + -Wall
>
> as you can see patch supports goal, and pil32 pass selftests and my code.
>
> Mike
>
>
>


gcc.patch
Description: Binary data


Re: gcc command lines

2016-02-09 Thread Mike Pechkin
oops

o) new line is:
-Wall -Wno-parentheses -Wno-sequence-point \

On Tue, Feb 9, 2016 at 10:50 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> hi,
>
> OK. new patch:
> o) old lines not touched
> o) rename -W -> -Wextra
> o) new line:
> -Wextra -Wimplicit -Wreturn-type -Wunused -Wformat
>
> Mike
>
>
> On Mon, Feb 8, 2016 at 11:27 PM, Mike Pechkin <mike.pech...@gmail.com>
> wrote:
>
>> hi,
>>
>> you are correct, this is draft patch.
>> > Goal: compile with minimum commands + -Wall
>>
>> as you can see patch supports goal, and pil32 pass selftests and my code.
>>
>> Mike
>>
>>
>>
>


Re: gcc command lines

2016-02-08 Thread Mike Pechkin
hi,

you are correct, this is draft patch.
> Goal: compile with minimum commands + -Wall

as you can see patch supports goal, and pil32 pass selftests and my code.

Mike


gcc command lines

2016-02-05 Thread Mike Pechkin
hi all,

Goal: compile with minimum commands + -Wall
Patch attached.
4 new words, others not required.
compiles without warnings and pass selftests on modern Linux.

https://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Warning-Options.html#Warning-Options

1.
-Wall - says itself

2.
-Wno-parentheses for this types of warnings:
big.c: In function ‘doBitXor’:
big.c:1117:44: warning: suggest parentheses around arithmetic in operand of
‘^’ [-Wparentheses]
   setDig(y, unDig(y) ^ unDig(data(c2)) & ~1);
^
pico.h:156:48: note: in definition of macro ‘setDig’
 #define setDig(x,v) (car(numCell(x))=(any)(v))
^
big.c: In function ‘doRand’:
big.c:1224:4: warning: suggest parentheses around assignment used as truth
value [-Wparentheses]
if (m = evCnt(ex, cddr(ex)) + 1 - n)

3.
-Wextra is modern name of -W (oldshool)

4.
-Wno-sequence-point for this:
In file included from /usr/include/sys/types.h:219:0,
 from /usr/include/stdlib.h:314,
 from pico.h:7,
 from io.c:5:
io.c: In function ‘waitFd’:
io.c:1435:22: warning: operation on ‘m’ may be undefined
[-Wsequence-point]
 FD_SET(m = fd, );
  ^


Mike


gcc.patch
Description: Binary data


porting to IRIX SGI

2016-02-02 Thread Mike Pechkin
hi,

With support to server from @theodric and with help from community PicoLisp
has been ported to IRIX. With initial-trivial patch attached it passed all
bundled self tests.
Note: IPv6 must be enabled and modern gcc and gmake from nekoware installed.


% hinv
1 700 MHZ IP35 Processor
CPU: MIPS R16000 Processor Chip Revision: 2.2
FPU: MIPS R16010 Floating Point Chip Revision: 2.2
Main memory size: 4096 Mbytes
Instruction cache size: 32 Kbytes
Data cache size: 32 Kbytes
Secondary unified instruction/data cache size: 4 Mbytes
Integral SCSI controller 0: Version QL12160, low voltage differential
  Disk drive: unit 1 on SCSI controller 0
Integral SCSI controller 1: Version QL12160, single ended
  CDROM: unit 6 on SCSI controller 1
IOC3/IOC4 serial port: tty1
IOC3/IOC4 serial port: tty2
IOC3 parallel port: plp1
Graphics board: V10
Integral Fast Ethernet: ef0, version 1, module 001c01, pci 4
Iris Audio Processor: version EMU revision A4, number 1
USB controller: type OHCI
%
% uname -aR
IRIX64 fuel 6.5 6.5.30f 07202013 IP35

Mike


irix-port.patch
Description: Binary data


Re: porting to IRIX SGI

2016-02-02 Thread Mike Pechkin
and patch for (gcc) call


On Tue, Feb 2, 2016 at 4:31 PM, Mike Pechkin <mike.pech...@gmail.com> wrote:

> hi,
>
> With support to server from @theodric and with help from community
> PicoLisp has been ported to IRIX. With initial-trivial patch attached it
> passed all bundled self tests.
> Note: IPv6 must be enabled and modern gcc and gmake from nekoware
> installed.
>
>
> % hinv
> 1 700 MHZ IP35 Processor
> CPU: MIPS R16000 Processor Chip Revision: 2.2
> FPU: MIPS R16010 Floating Point Chip Revision: 2.2
> Main memory size: 4096 Mbytes
> Instruction cache size: 32 Kbytes
> Data cache size: 32 Kbytes
> Secondary unified instruction/data cache size: 4 Mbytes
> Integral SCSI controller 0: Version QL12160, low voltage differential
>   Disk drive: unit 1 on SCSI controller 0
> Integral SCSI controller 1: Version QL12160, single ended
>   CDROM: unit 6 on SCSI controller 1
> IOC3/IOC4 serial port: tty1
> IOC3/IOC4 serial port: tty2
> IOC3 parallel port: plp1
> Graphics board: V10
> Integral Fast Ethernet: ef0, version 1, module 001c01, pci 4
> Iris Audio Processor: version EMU revision A4, number 1
> USB controller: type OHCI
> %
> % uname -aR
> IRIX64 fuel 6.5 6.5.30f 07202013 IP35
>
> Mike
>
>


gcc-irix.patch
Description: Binary data


Re: libsodium

2016-01-28 Thread Mike Pechkin
repo created
https://bitbucket.org/mihailp/libsodium/src


On Thu, Jan 28, 2016 at 6:14 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> ​hi,
>
> initial job done.
> ported ​"generating random data"
> https://download.libsodium.org/doc/generating_random_data/index.html
> read test.l for good.
>
>
> https://bitbucket.org/mihailp/tankfeeder/src/7c5c01ce46191c828d61242c8d74384bd80b99ea/libsodium/?at=default
>
> Mike
>
>


libsodium

2016-01-28 Thread Mike Pechkin
​hi,

initial job done.
ported ​"generating random data"
https://download.libsodium.org/doc/generating_random_data/index.html
read test.l for good.

https://bitbucket.org/mihailp/tankfeeder/src/7c5c01ce46191c828d61242c8d74384bd80b99ea/libsodium/?at=default

Mike


Re: fp + SunOS

2016-01-26 Thread Mike Pechkin
Ok, sounds good.

On Tue, Jan 26, 2016 at 9:19 AM, Greg Lee <gleetb...@earthlink.net> wrote:

> Hi.
>
> The test result that fails differs from the "correct" value in fptest.l by
> one least significant bit:
>
> : (d2s 4607137420321232833 "%18.16f")
> -> "0.9950041652780258"
> : (d2s 4607137420321232832 "%18.16f")
> -> "0.9950041652780257"
>
>
> This is actually a lot better than I expected. I expected about half of
> the trigonometric and transcendental functions to fail this way on
> different processors, operating systems, and compilers. We should give a
> tip of the hat to the nameless, faceless software engineers who write these
> underlying trig functions that are so fast and so accurate.
>
> The "bug" would be in fptest.l. Floating point tests should not be made
> against exact values, but against a value with an specified delta of
> accuracy. Perhaps a future version of picolisp-fp will have better unit
> tests like that.
>
> Thanks,
>
> Greg Lee
>
>
>
> -Original Message-
> From: Mike Pechkin
> Sent: Jan 25, 2016 5:22 AM
> To: picolisp@software-lab.de
> Subject: fp + SunOS
>
> hi,
>
> fp now works on solaris in pil64.
> only one test fails, on linux it pass:
>
> # pil +
> : (load "@lib/fp.l")
> -> dmodf
> : (load "fptest.l")
> ((dcos 4591870180066957722))
> [fptest.l:201] 4607137420321232833 -- 'test' failed
> ? (dcos 4591870180066957722)
> -> 4607137420321232832
>
> p.s. i've run separate version too, it fails on the same test
>
> Mike
>
> -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe


Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread Mike Pechkin
hi,

i was wrong, i take a part of my words back.
problem in native.l, not gcc.l
patch attached, now sunos works:

# pil +
: (load "@lib/fp.l")
-> dmodf
: (s2r "11.11")
-> 1093780111
: (cons *OS *CPU (== 64 64))
-> ("SunOS" "x86-64" . T)
:


On Mon, Jan 25, 2016 at 2:13 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

>
> have you compiled fp.c 64bit too ?
>
>
> ​you missed the point:​
> o) look at my original email
> o) i've tested *inline* version
> o) gcc function not ported to solaris and doesnt have default branch in
> case to fatal. (file gcc.l)
> o) on linux library works
>
>


native-sunos.patch
Description: Binary data


fp + SunOS

2016-01-25 Thread Mike Pechkin
hi,

fp now works on solaris in pil64.
only one test fails, on linux it pass:

# pil +
: (load "@lib/fp.l")
-> dmodf
: (load "fptest.l")
((dcos 4591870180066957722))
[fptest.l:201] 4607137420321232833 -- 'test' failed
? (dcos 4591870180066957722)
-> 4607137420321232832

p.s. i've run separate version too, it fails on the same test

Mike


Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread Mike Pechkin
1.
(gcc) not ported to Solaris

2.
# pil +
: (load "@lib/fp.l")
-> dmodf
: (test 1065353216 (s2r "1.0"))
!? (native "/root/.pil/tmp/10225/fp" "s2r" 'I X)
[DLL] ld.so.1: picolisp: fatal: /root/.pil/tmp/10225/fp: wrong ELF class:
ELFCLASS32
?


On Sun, Jan 24, 2016 at 10:49 AM, Mike  wrote:

> i will test on solaris 11 next week
>
>


Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread Mike Pechkin
I run pil64 under Solaris 11 on x64


On Mon, Jan 25, 2016 at 11:46 AM,  wrote:

> compile the library as 64bit. (native) is a 64bit-pil-only functionality,
> naturally it only supports interfacing with 64bit libraries (confirmed by
> Abu).-


Re: a floating point math library for 64 bit PicoLisp

2016-01-25 Thread Mike Pechkin
> have you compiled fp.c 64bit too ?


​you missed the point:​
o) look at my original email
o) i've tested *inline* version
o) gcc function not ported to solaris and doesnt have default branch in
case to fatal. (file gcc.l)
o) on linux library works


binary search

2016-01-17 Thread Mike Pechkin
hi all,

Today I was wonder is it possible to create a function for binary search
inside flatten or nested lists.
If I have ordered list I need something faster that O(n) and I should not
care of unique structure.
It was a goal while walking in the forest.

There is my code in repo:
https://goo.gl/EMQt3p

Mike


Re: Translation Request

2016-01-05 Thread Mike Pechkin
ru,
"Вставить пустую строку"


On Tue, Jan 5, 2016 at 9:03 AM, Alexander Burger 
wrote:

> Hello translators!
>
> This is to all who helped with the localization of PicoLisp, by
> providing translation strings for the @loc/?? files.
>
> The new '+InsRowButton' GUI prefix class - a button which inserts an
> empty row into a chart - has a tooltip string
>
>,"Insert empty row"
>
> I made the German (@loc/de) and Japanese translations (@loc/jp),
> and included all into the rolling release at
>
>http://software-lab.de/picoLisp.tgz
>
>
> Can someone post translations of the above string for "es", "no", "ru"
> and "se"?
>
> Thanks!
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


picolisp repo

2015-12-28 Thread Mike Pechkin
hi,

I've changed my opinion, after picolisp gone from code.google.com

I gonna manually support synchronization in my repo between picolisp
releases.
Now in repo i have 15.11 (28dec15) release, i will sync again after every
stable release or more often.

https://bitbucket.org/mihailp/picolisp/src/bbe795241c717504720708e06b49eb2629ab71d9?at=default

Mike


Re: bitmaps from random

2015-12-21 Thread Mike Pechkin
hi,


code is here:
https://bitbucket.org/mihailp/tankfeeder/src/4449cee7f84899243d8ce2799779caf3457f7cc2/random.l?at=default=file-view-default

the *only* source of info from google:
http://www.imagemagick.org/discourse-server/viewtopic.php?t=26710




On Mon, Dec 21, 2015 at 8:04 PM, Christophe Gragnic <
christophegrag...@gmail.com> wrote:

> On Mon, Dec 21, 2015 at 2:43 PM, Mike Pechkin <mike.pech...@gmail.com>
> wrote:
> > hi,
> >
> > bitmaps from (rand) from pil32 and pil64
> > done by "convert" from ImageMagic soft.
> >
> > now looks ok.
> > http://imgur.com/a/bYaAr
>
> Interesting.
> Could you please provide some more details? Like:
> * the PicoLisp code
> * Are pixels pure white or pure black according to (rand T)?
> * the convert command
> * Is there a nice option like «turn a list of 0 and 1 to a bitmap»?
> Thanks.
>
> chri
>
> --
>
> http://profgra.org/lycee/ (site pro)
> http://delicious.com/profgraorg (liens, favoris)
> https://twitter.com/profgraorg
> http://microalg.info (langage de programmation pédagogique)
> http://expressions.club/ (structure des expressions mathématiques)
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>


bitmaps from random

2015-12-21 Thread Mike Pechkin
hi,

bitmaps from (rand) from pil32 and pil64
done by "convert" from ImageMagic soft.

now looks ok.
http://imgur.com/a/bYaAr

Mike


Re: CentOS 7 x64

2015-12-21 Thread Mike Pechkin
if you run "make all" add to list:
 ... glibc-devel openssl-devel

Mike



On Mon, Dec 21, 2015 at 5:35 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> hi,
>
> when centos installed from centOS7-Miminimal.iso you should install
> required rpm by:
> $ yum install gcc glibc-devel.i686 libstdc++-devel.i686
>
> Mike
>
>
>
> On Mon, Dec 21, 2015 at 4:58 PM, Mike Pechkin <mike.pech...@gmail.com>
> wrote:
>
>> hi,
>>
>> news from porting sandbox:
>> checked, pil32 and pil64 compiles on CentOS7 out of box,
>> when all required rpms are installed.
>>
>> Mike
>>
>>
>>
>>
>> On Mon, Dec 21, 2015 at 3:34 PM, Mike Pechkin <mike.pech...@gmail.com>
>> wrote:
>>
>>> hi,
>>>
>>> latest picolisp (32 and 64) cant compile on CentOS 7 out of box.
>>> installing to vmware to check.
>>> plz, stand by.
>>>
>>> Mike
>>>
>>>
>>
>


Re: CentOS 7 x64

2015-12-21 Thread Mike Pechkin
hi,

news from porting sandbox:
checked, pil32 and pil64 compiles on CentOS7 out of box,
when all required rpms are installed.

Mike




On Mon, Dec 21, 2015 at 3:34 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> hi,
>
> latest picolisp (32 and 64) cant compile on CentOS 7 out of box.
> installing to vmware to check.
> plz, stand by.
>
> Mike
>
>


Re: bitmaps from random

2015-12-21 Thread Mike Pechkin
yes, influenced by
http://goo.gl/zhTijq


On Mon, Dec 21, 2015 at 3:43 PM, Mike Pechkin <mike.pech...@gmail.com>
wrote:

> hi,
>
> bitmaps from (rand) from pil32 and pil64
> done by "convert" from ImageMagic soft.
>
> now looks ok.
> http://imgur.com/a/bYaAr
>
> Mike
>
>


Re: SHA3

2015-12-15 Thread Mike Pechkin
​hi,​


Don't forget to link to your stuff from picolisp.com if it's not already
> there.
>
>

​I dont know how to handle this better.

Mike


functions collection

2015-12-09 Thread Mike Pechkin
hi all,

I have a collection of functions, I've combined them in one file:
picolisp.l
https://bitbucket.org/mihailp/tankfeeder/src/40a521f62866?at=default

What inside:
o) functions other coding languages have builtin (sometimes useful)
o) functions to mimic Clojure

I will maintain this file and will add stuff when find something fun.
Feel free to show me your collection for review.

Mike


AES on PicoLisp

2015-12-07 Thread Mike Pechkin
hi,

I've implement AES on PicoLisp.
Pure brutality and limits:
o) AES128 only
o) no decryption (boring after all this)
o) less GC mess
o) no ECB-CBC modes
o) key length only 128 bits
Works, tests passed.

https://bitbucket.org/mihailp/tankfeeder/src/7e40db44e61e72db4a7f172a0434fadd323a8e78/crypto/?at=default

Next will be SHA3 and Curve25519.

p.s. If you have something real fun to implement let me know.

Mike


Re: New article about bin/ssl

2015-11-23 Thread Mike Pechkin
dont forget link to reddit/r/lisp


On Mon, Nov 23, 2015 at 9:09 AM, Mansur Mamkin  wrote:

> Hi all!
> I've written article about using bin/ssl, but haven't yet linked it
> anywhere, you can found it here: http://picolisp.com/wiki/?ssl
>
> I ask Alex to link it to convenient place.
>
> Also, I would be glad if someone can review and check for grammar mistakes.
>
> Best regards,
> Mansur
>
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


picodb

2015-11-07 Thread Mike Pechkin
hi,

as usual entry price for picolisp eco system is high.
i'm on next level, want write trivial code to store and fetch values from
picodb.
functions index is ok but not enough.

i need code examples and tutorials to start trivial manipulations.

p.s. Mansur where is your picodb book? I'm in.

Mike


Re: aix + netbsd

2015-10-20 Thread Mike Pechkin
Kuba,

sent you private email a week ago.
Any news ?

On Tue, Oct 13, 2015 at 12:14 PM, Kuba Tyszko <k...@lbl.pl> wrote:

> I’m sure we could arrange a server access for you if that’s necessary,
>
> Cheers
>
>
> On Oct 12, 2015, at 4:44 PM, Mike Pechkin <mike.pech...@gmail.com> wrote:
>
>
>
> On Mon, Oct 12, 2015 at 11:13 AM, George Orais <gpor...@yahoo.com> wrote:
>
>> Nice! Thanks Mike! Btw, any chance for IRIX? :)
>>
>
>
> ​status unknown.
> is non-root account ​available ?
>
> Mike
>
>
>
>


Re: aix + netbsd

2015-10-13 Thread Mike Pechkin
hi,


I will take it.
I will contact you in private.

On Tue, Oct 13, 2015 at 12:14 PM, Kuba Tyszko  wrote:

> I’m sure we could arrange a server access for you if that’s necessary,
>
>


aix + netbsd

2015-10-12 Thread Mike Pechkin
hi,

News from porting sandbox.

Latest AIX 7.1 (7100-03-05-1524) and
NetBSD 7.0 compiled out of box and passed tests.

Mike


Re: aix + netbsd

2015-10-12 Thread Mike Pechkin
On Mon, Oct 12, 2015 at 11:13 AM, George Orais  wrote:

> Nice! Thanks Mike! Btw, any chance for IRIX? :)
>


​status unknown.
is non-root account ​available ?

Mike


Re: Setting up PicoLisp on Linode

2015-09-25 Thread Mike Pechkin
hi,

I can (want?) try.
IRC channel is good start point.

Mike



On Fri, Sep 25, 2015 at 6:14 PM, Robert Herman  wrote:

> Anybody have any hints, leads or tips on getting PicoLisp running on a
> Linode server? I'd like to see if I can setup a PicoLisp-based site. I have
> no experience doing anything beyond command line REPL in PicoLisp, and the
> GUI tutorial.
> Thanks!
>
> Rob
>


  1   2   >