Re: Do free Open Source Foundation's Software Stacks fall under US Export Law?

2020-05-06 Thread Joh-Tob Schäg





Ursprüngliche Nachricht  
Von: gstep...@gmail.com
Gesendet: 6. Mai 2020 17:36
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: Re: Do free Open Source Foundation's Software Stacks fall under US 
Export Law?


Am Mittwoch, 6. Mai 2020 schrieb Joh-Tob Schäg :

>Each one perhaps 50 pages long, that need to be adapted for supporting new CPU 
>architecture.


Exactly. 


>> Alex wrote he is tired of having to write meta assembler code for each 
>> platform. I doubt that will be better if has to use someone else's Meta 
>> assembler. Also LuaJIT does not target RISC-V.

> That's true so far. Though there a a couple of billion RISC-V cpus out there 
> now.
And that's what matters to Alex.


> Target LLVM IR means porting it once and being able to target anything which 
> has a translator.

>> And since when doesn't your C version of Picolisp compile on iOS? 
>> Objective-C is a superset of C with parts of Smalltalk.
>
> You seem really ignorant. Are you unaware that pil32/emu/mini have less 
> features than pil64 and are slower too due to overhead/resrictions used by C?

Is slower speed really an issue with pilbox GUI? Certainly not!

> Also the size of LLVM doesn't matter since it is only necessary when 
> compiling the binary. You can likely download binaries Alex built just as you 
> can do.

> "Compiling the binary" is funny  pil21, sitting on top of LLVM JIT engine 
> is post JIT'ing all the time during runtime. That thing is profiling and self 
> optimizing code while running! See HotSpot JIT Engine concepts: 
> https://en.wikipedia.org/wiki/HotSpot


BULLSHIT. Atleast as far as i can read the source:
https://github.com/picolisp/pil21/blob/master/src/lib/llvm.l 
It is just dumping human readable LLVM-IR into a file which receives an ajead 
of time compilation pass where it compiles the Picolisp language primitives for 
the interpreter

> Starting interpreted, then stepwise compiling and replacing inner loops with 
> machine code, outer loops, ... ? Starting slow, modern JIT engines are 
> getting faster while running. Google V8 Javascript compiler is also working 
> this way. That's why 'warm up' phase is often mentioned with benchmarks: 
> https://www.google.com/search?q=llvm+warm+up+phase


You are plain wrong. LLVM can be used as AoT compiler too without anything 
being a JIT. In fact the most common use case for LLVM is as an ahead-of-time 
(AOT) compiler for a language.

> This is not different than Dynasm depending on LUA. Picolisp does not touch 
> most LLVM code. It just needs the assembler part of it. Translating LLVM-IR 
> to what ever you want is not that hard if you don't want to use LLVM and you 
> can audit the resulting ASM.


> I am not reviewing or auditing 3 million lines of LLVM in my life. Apart from 
> that, China market falls flat now because of US export sanctions.


Congrats than stay on the old pil64 or emu, audit the LLVM-IR assembler, write 
your own LLVM-IR assembler.


Also stop the "China LLVM" talking point. Export control can't apply to code. 
The PGP case showed that ages ago and even if it does, we Europeans don't have 
to care about American export sanctions. As long as the code makes it to Europe 
it can end in China. 

> Wrong business strategy for Germany to use US toolchains any longer.


If you believe so.PԔ � &j)mX�����zV�u�.n7�

Re: Do free Open Source Foundation's Software Stacks fall under US Export Law?

2020-05-06 Thread Joh-Tob Schäg

> Sigh! How often have I told here that the main purpose of pil21 is 
> portability?
Do you see any portablity problems:
https://luajit.org/luajit.html
iOS obviously *is* supported. Tons of games are using LuaJIT on all kinds of 
platforms. Of course, always with DYNASM as JIT IR below.

LUAJIT still requires cpu specific headers as you can see here: 
https://github.com/LuaJIT/LuaJIT/blob/v2.1/src/lj_asm_x86.h

Alex wrote he is tired of having to write meta assembler code for each 
platform. I doubt that will be better if has to use someone else's Meta 
assembler. Also LuaJIT does not target RISC-V.

Target LLVM IR means porting it once and being able to target anything which 
has a translator.


> And since when doesn't your C version of Picolisp compile on iOS? Objective-C 
> is a superset of C with parts of Smalltalk.

You seem really ignorant. Are you unaware that pil32/emu/mini have less 
features than pil64 and are slower too due to overhead/resrictions used by C?

Also the size of LLVM doesn't matter since it is only necessary when compiling 
the binary. You can likely download binaries Alex built just as you can do.
This is not different than Dynasm depending on LUA. Picolisp does not touch 
most LLVM code. It just needs the assembler part of it. Translating LLVM-IR to 
what ever you want is not that hard if you don't want to use LLVM and you can 
audit the resulting ASM.

TL;DR: Shut up until you can show the code. This also applies to your "I did 
some cool distributed pilog thing" if you write some cool software but can't 
share it, don't talk about it on the mailing list.




Ursprüngliche Nachricht  
Von: gstep...@gmail.com
Gesendet: 6. Mai 2020 14:51
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: Re: Do free Open Source Foundation's Software Stacks fall under US 
Export Law?


Am Mittwoch, 6. Mai 2020 schrieb Alexander Burger :
> On Wed, May 06, 2020 at 12:51:33PM +0200, Guido Stepken wrote:
>> Use Mike's DYNASM JIT Engine. Better, faster, smaller (tiny, in comparison
>> to LLVM), more portable. He's from Munich.
>
> Useless.

Ah, really?

> Sigh! How often have I told here that the main purpose of pil21 is 
> portability?

Do you see any portablity problems:

https://luajit.org/luajit.html

iOS obviously *is* supported. Tons of games are using LuaJIT on all kinds of 
platforms. Of course, always with DYNASM as JIT IR below.

> I need it to build PilBox on iOS, and to support RISC-V architectures. In fact
> *all* 64-bit architectures, as I got tired of porting pil64.
>
> And I need it NOW!! Not *perhaps* in ten years.

You could have had yesterday. There already is a Lisp on DYNASM, but - written 
in Lua: https://fennel-lang.org/

Easy to follow that example to get the DYNASM IR right.

> Also, please shut up with WebAssembly. I need something running on POSIX for
> server side applications. Something in the browser is as useful for me as
> chewing gum for my cat.

You simply do never listen. Webassembly programs *do* run server side:

https://www.infoworld.com/article/3411496/wasmer-takes-webassembly-server-side.html

Sorry Alex, but sometimes you are your own labyrith not seeing the exit.

And since when doesn't your C version of Picolisp compile on iOS? Objective-C 
is a superset of C with parts of Smalltalk.

Have fun!

> — Alex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>

Re: Graph database

2020-03-25 Thread Joh-Tob Schäg
Have you already looked at the family example?

Here is my brief overview of ascending order of abstractedness:
PicoLisp had no graph database. What is has is this:
 - The ability to serialize/de-serialize all structures in the heap
(Lists, numbers, functions, symbols etc)
 - It has the ability to fetch and deserialize structures when they
are accessed by their reference (also called external symbol) and also
GC the loaded content when it is no longer accessable
 - the ability to make atomic changes to such structures (by write
locking the database).
 - it has relations which allow the database to place pointers in one
or multiple directions, make space for indexes etc... (I have not
fully grasped that myself)
 - The are indexes which automatically maintained and those are
accessible to the database allowing you to discover objects placed in
the database.
 - It has an mechanism which allows you to maintain database
consistent of different machines (replication)

In PicoLisp you can solve many graph database problems with those
structures, however PicoLisp does not care or know what a vertex is.
It does not come support for weighted vertexes, you could build your
own class but is usually more efficient to just implement what you
actually need, not implement some paradigm because you heard of
it/like it.

Tailor PicoLisp to your problem, not your paradigm. This is a thing i
had to learn over a long time.

On Wed, 25 Mar 2020 at 21:46, Lawrence Bottorff  wrote:
>
> I'm afraid at my level of CS theory I don't really know what is meant by a 
> picolisp atom being persistent, much less across distributed picolisp 
> instances. Could someone give me a concrete example of what you describe as: 
> "Any named bag of items automatically represents a (directed, undirected) 
> graph. The name then is the node, the items in the bag then there represent 
> the edges." I do understand the tree structure of a lisp program. But that 
> doesn't make it a graph database. When I tried to fathom the Picolisp "graph 
> database" example, I was quickly confused. The GUI actually added confusion, 
> AFAIC. I'm guessing from what I could ausknobeln from example that the 
> Picolisp version of a CLOS object is a vertex, and the inheritance of that 
> object from other (higher, more general?) objects is a sort of edge. Correct 
> me if I'm wrong. But then there was talk of "records." Is creating a record 
> the same as creating an object instance -- and this record/object is a 
> vertex? Where, what are the edges?
>
> Don't get me wrong, I have long felt that Lisp -- with its parsing actually 
> visible in the code you write -- is or could be very graphDB-friendly; 
> however, Lisp is functional, i.e., you write functions. And even though they 
> are set up as a graph-like tree in nested lists form, they are not in 
> themselves data in the traditional sense, rather, code meant to take you from 
> a domain/input to a range/result. This is not a "record" (or graph vertex?) 
> creation/query/deletion paradigm.
>
> But this relates to a long-standing question I've had about software 
> libraries. As it stands, they may be auto-indexed for our viewing pleasure, 
> but they aren't in any real database form so that you might simply have your 
> program "query-and-plug-in" a library. (Although I've heard Haskell's hlint 
> almost writes your code for you!) No, you have to find the module, plug it in 
> yourself. The whole "code is data", therefore, doesn't seem to get past the 
> higher-order function trick of passing in a function as an argument. What 
> more is there to "code is data?" In Fortran the data was in fact parked just 
> below the code.
>
> At some point I'm just scared and rambling on
>
> On Wed, Mar 25, 2020 at 7:12 AM Guido Stepken  wrote:
>>
>> Lawrence, you haven't yet understood, that any Lisp, by default, is it's own 
>> Graph Database. Especially Picolisp, where Alex has made any Picolisp Atom 
>> persistent and even distributed across other Picolisp instances. 'Data is 
>> code, code is data'.
>>
>> Any named bag of items automatically represents a (directed, undirected) 
>> graph. The name then is the node, the items in the bag then there represent 
>> the edges. Even Picolisp sources you can consider a (directed) graph, often 
>> also called 'syntax tree'.
>>
>> If you like, you can put, group all "edges" with same properties into a new, 
>> searchable bag of edges for fast lookup. Since it's all lazy evaluated (even 
>> the persistent nodes), as Alex already pointed out, it's still ultra fast. 
>> And since in Picolisp everything can be persisted distributed, Picolisp 
>> automatically represents a distributed graph database (with sharding and 
>> everything) which you can build, implement on your own with just a few lines 
>> of code. It's a no-brainer!
>>
>> Picolisp is a genius strike, but most people can't see the forest for all 
>> the trees
>>
>> Have fun!
>>
>> Regards, Guido Stepken
>>
>> P.S. Keep away 

Re: Merry Christmas!!

2019-12-24 Thread Joh-Tob Schäg






  Ursprüngliche Nachricht  



Von: matt...@inogu.se
Gesendet: 24. Dezember 2019 23:47
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: Re: Merry Christmas!!


Merry Christmas everyone!

Mattias

George-Phillip Orais  skrev: (24 december 2019 
15:01:45 CET)
>Hi Everyone!
>
>Just want to greet you all a Merry Christmas and Happy New Year in
>advance!
>
>More power to Pico Lisp community and once again, thank you Alex for
>sharing your talents to us.
>
>
>Cheers from Philippines,
>Geo

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Picolisp Facebook Page (@picolisp)

2019-11-26 Thread Joh-Tob Schäg
SuperSaiyanBlue, you do not need to be there.
You were invited but that does not mean you need to come. I won't come either.
Let them found a FB group if they want. Maybe something good will come
out of it. I do not think it will have a negative impact on the rest
off the community.

On Thu, 21 Nov 2019 at 06:48, SuperSaiyanBlue
 wrote:
>
> Being the biggest privacy violator I'm not sure I could ever be there. 
> (https://stallman.org/facebook.html)
>
> There's an inactive picolisp subreddit which could be resurrected and isn't 
> as bad. Perhaps, that would be better. https://old.reddit.com/r/picolisp/
>
>
>
> On November 20, 2019 6:22:52 AM UTC, Anas Drak  wrote:
> >Dear Picolisp friends,
> >a Picolisp Facebook Page / Group has been created (@picolisp) :
> >https://www.facebook.com/picolisp/
> >Please, join the group and help make it better.
> >
> >Regards,
> >A.D.
>
> --
> SuperSaiyan Blue
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Creating slides in Picolisp

2019-06-22 Thread Joh-Tob Schäg
  I know of no such solution but there is a texbinding   Von: ckkash...@gmail.comGesendet: 22. Juni 2019 17:43An: picolisp@software-lab.deAntworten: picolisp@software-lab.deBetreff: Creating slides in Picolisp  Hi all,I'd like to create HTML presentation slides using picolisp - is there any prior implementation that I can leverage for this?I am looking to be able to generate diagrams (using canvas) mixed with text in my slides.Regards,Kashyap


Re: cloud host for picolisp

2019-06-10 Thread Joh-Tob Schäg
Hi Derenik,

i know of no hoster which provides setup or support for PicoLisp. You
are on your own, but that is less scary that it sounds:
1. Pick a Linux/BSD of your choice
2. install PicoLisp from source or package manager
3. Setup a proxy server to handle encryption etc. (NGINX + HTTP-Gate
or just HTTP gate) and add it to your "autostart".
The best you can  hope for is a well managed Linux installation, which
is not worth paying extra money for when you have 10h-20h hours to
spare to setup it up once well. (Think unattended updates, monitoring
with email notifications, occasional backup, automatic Let's Encrypt
key renewal, ssh login with keys only, DNS name (all things for which
tutorials exist readily.))

As for hosters:
I only looked for budget hosters in Germany. There are two which might
be interesting:
 * Hetzner: Provides non bullshit service and charges very
transparently. Some things cost them money but you are not paying much
more than they are. It has good dedicated servers which are really
cheap when you find something that fit's you bill. I would only
consider them if you have >30€ to spend per month. I have had good
experience with them.
 * For anything cheaper you have to go with a VPS. I've been eyeing a
hoster caller Contabo which has pretty sweet vServer deals starting
from 8€ a month.

It all depends on your time and money budget.
If you are not planning to host your web-app online for a few months
even a Linux (VM) on your local PC would work.

If you tell us more about your situation we can give more tailored
insights. I am positive that you can setup it well. Be not afraid to
ask.

Sincerely,
freemint

On Mon, 10 Jun 2019 at 20:39, Derenik Mikaelyan  wrote:
>
> Hi,
>
> I'd like to use picolisp for making a web-app. I'm not good at server-side 
> setups and maintenance. Is there any cloud hosting-service that provides well 
> managed picolisp installation (for reasonable monthly fee)?
>
> Thanks,
>
> Derenik

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Waiting for a forked child to finish

2019-05-12 Thread Joh-Tob Schäg
The docs:
(later 'var . prg) -> varExecutes prg in a pipe'ed child process. The
return value of prg will later be available in var. Note that later
uses pr and rd to communicate the result, so prg should not write any
data to standard output as a side effect.

: (prog1  # Parallel background calculation of square numbers
   (mapcan '((N) (later (cons) (* N N))) (1 2 3 4))
   (wait NIL (full @)) )
-> (1 4 9 16)

It might help that this code the same.
: (prog1  # Parallel background calculation of square numbers
   (mapcan '((N) (later (list) (* N N))) (1 2 3 4))
   (wait NIL (full @)) )
-> (1 4 9 16)

Or more departmentalized:
(setq B (list ))
-> (NIL)
('((N) (later B (prog1 (* N N) (wait 8000 1)
-> (NIL)
B
-> (NIL)
(wait 8000)
..
B
-> (1)

Later needs a store to place things. This code uses the following non
obvious fact:

 (setq D (list))
-> (NIL)
 (setq `D 8)
-> 8
 D
-> (8)

or in a more general case:
(setq U (range 1 20))
(set (nth U 8) 0)
U
-> (1 2 3 4 5 6 7 0 9 10 11 12 13 14 15 16 17 18 19 20)

What happens step by step:
1.0 prog1 evaluates  (mapcan '((N) (later (list) (* N N))) (1 2 3 4))
and stores the resulting expression
1.1 mapcan calls '((N) (later (list) (* N N))) with 1 through 4.
1.1.1 Each call of this lamda creates a new cell (lets call it temp)
by calling (list) or (cons)
1.1.2  temp is set to be the place where return value of the inner
expression which is calculated by another process is stored by later
1.1.3 the temp cell is returned with the result of the calculation still pending
1.2 mapcan takes these cells and links them destuctively in to one list
1.3 mapcan returns that list and the result it written in to @.

2.0 prog1 evaluates (wait NIL (full @)) ) where @ refers to the return
value of the previous expression at this level of evaluation.
3.0 prog1 returns the value it stores. The value being the value that
was also refered by @

What is @?
@ is the list of cells where (in which car) other process will put
their values into.

Why wait for the full list? This might get really ugly if the list
becomes partially garbage and is written to. I am not sure this
behaves since this is internal to the interpreter and "undefined
behavior"



On Sun, 12 May 2019 at 22:06, C K Kashyap  wrote:
>
> Hi Alex,
> Could you please explain the role of (cons) as the first parameter to later? 
> If I understand correctly, that does not seem to have a role in the the final 
> list return values from the child processes.
> Regards,
> Kashyap
>
> On Sun, May 12, 2019 at 7:17 AM C K Kashyap  wrote:
>>
>> Yup ... that's the first edit I tried :)
>> Regards,
>> Kashyap
>>
>> On Sun, May 12, 2019 at 12:34 AM Alexander Burger  
>> wrote:
>>>
>>> On Sat, May 11, 2019 at 10:09:27PM +0200, Alexander Burger wrote:
>>> >(let Lst
>>> >   (mapcan
>>> >  '((File)
>>> > (later (cons)
>>> >(... download File ...)
>>> >T ) )
>>> >   ...
>>>
>>> Note that instead of 'T' you may also return any non-NIL value, e.g the
>>> downloaded size, or a list with statistical values.
>>>
>>> / A!ex
>>>
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PicoLisp for 9-11 years' kids

2019-04-28 Thread Joh-Tob Schäg
Hello Nehal,
I've been doing some catching up on these videos.
Mr. Alabhya Singh took quiet some time to explain this mathematical problem
with the different approaches. I recall that in Germany when i was
confronted with the same problem (apply + (range 1 N)), i was taught the
Gauss approach
(/ (* N (- N 1)) 2) directly.
I was not consciously aware that
(= (apply + (range 11 20)) (+ (apply + (range 1 10)) (* 10 10)))
Nice trick.
That makes me recall an childhood incident where i came distressed from
Kindergarden (I would have been between 5 and 7) when i realized i ran out
of numbers to count.

> My goal was to find the highest number i can count (looking back it's that
> i run out of ways to say a number when i try to find the highest number i
> can say):
>
> "one,two,tree,(annoyed pause) this goes till ten like that"
> "eleven,twelve,(let's skip the small steps) next is twenty, then
> thirty,forty,fifty, this goes to slow as well, i never finish that way, so
> next is one hundred, so next is one thousand, ten thousand, one hundred
> thousand, thousand thousand, (??) that sounds funny, so it must go on like
> "thousand-thousand-thousand-..." and i now can say all the numbers"
> It turned out it did not.
> I found the next care taker and said "When i grow up i want make
> thousand-thousand €"
> He answered: "You mean like 2000€?"
> I was shocked, 2000 was way smaller than i had in mind. "No like thousand,
> ten-thousand, hundred thousand, thousand-thousand, ten-thousand-thousand"
> He answered: "It is not thousand-thousand it is called a million"
> It dawned on me that for some stupid reason people decided to call
> thousand-thousand a million. Why would they want to do that it is way more
> fun to say thousand-thousand-thousand than thousand-million?
> By the time i was ready to ask the question the staff had left in a hurry

Re: Why List?

2019-04-27 Thread Joh-Tob Schäg
Lisp is language where expression are executed in order. Since lisp code is
expressed in data, we need something that has a way of expression of
express ordering.
That is possible in a dictionary too. Let's imagine the code:
{fak => {1 => {1 => N}, {2=>{1=>if, 2=>{1 => =, 2=> N, 3=>0}, 3=>1, 4=>{1=>
*, 2=> N ,3=> {1=>fib, 2=>{1=>dec,2=>N}}}
I think we would need 9 independent hash tables to store simplest of
programs i could come up with. Of course another grammar would be choose
which leads to flatter hierarchies but that is a point which i can not
elaborate further here.
I doubt that dictionaries would more efficient. This idea may stem from a
confusion about O(x). The big O notation talks about asymptotic time
complexity as how do they compare when the number of elements gets
infinite. Many problems of humans including computing are decidedly finite,
maybe even "small". Algorithms with worse BigO might be better for many all
practical use cases.

Furthermore a person stating that dicts are a more efficient has probably
a) never used one in the way i stated above
b) has never looked at the assembly for both
c) is unaware of the cache hierarchy

I invite you to reflect your idea bearing these in mind.
Furthermore hash table (how you would often implement a dict) does not
"really" have an access time of 0(1) it has a best case O(N/m) where N is
the number of elements and M the number of buckets. The O(1) like behaviour
is achieved by doing a rehashing in to a larger hash table which is a
N*O(n/m) effort.
Furthermore many operations possible with lists are not trivially possible
with dicts that replace lists.
Nesting as seen above is one of them.
Operations which require a complete rehash of the hash table are:
 - inserting an element anywhere
 - removing an element anywhere

Furthermore as seen above access time of any element in a hash table is
proportional to: O(N/M)
Access time in a list is proportional to: O(N-K) where the Nth element is
the one we want to get and the Kth is element we know and use a an
entrypoint to gollow the list.
Getting the next element in a list is there for O(1) while in a hash table
it is O(N/M) with an additional overhead for calculating the hash table.
If you have an strict ordering of execution (as you might want as a
programmer) a list gives you fast access to the next piece of code. A hash
table would give you access to all elements equally slow.

Additionally hash tables are when used as above way more space inefficient
than linked lists. That means fewer information fits in the cache ->
slower. For the performance of the Hash tables it is important that things
are equally distributed over all buckets. This is done by using a hash that
places them "without pattern". (In hash table theory the ideal hash table
uses a random oracle to generate the hashes, which is random number
generator that gives you an random number for a never seen before item or
the number from last time if the item is already known)
This kills the cache and all speculative execution schemes used to speed up
modern processors.

I invite you to program a lisp interpreter in lua with the addressing
scheme above. Lua has only hash tables as data structure. You can see if
you are faster. I guess you are not. Even if you run a LuaJIT which
compiles stuff done and is quiet competitive speed wise.






On Sat, 27 Apr 2019 at 17:26, C K Kashyap  wrote:

> Hi Alex et al,
> I've wondered about this question for a bit. Why should list be the
> fundamental data type? Should it not be a dictionary? Dictionary is
> essentially a function - mapping a domain to a range.
>
> Is it that list could be built more easily with cons cell as the building
> block? Is it like list and dictionary are like the universal gates nand and
> nor - one is preferred because of the nature of the material being used? I
> use the universal gates example here because I was fascinated by the idea
> that I could represent a dictionary in a list (although less efficient) and
> a list in a dictionary (potentially improving the efficiency).
>
> Regards,
> Kashyap
>


Re: Database question

2019-04-16 Thread Joh-Tob Schäg
Your code has several unclearities/problems.
Why do you create and store a new Symbol in the property and then set it's 
value to the value you want to store?
Why don't you just store the value in the property?
(Like (put *DB k v) for kv-add)
Why do you set the value of the first symbol to "Root" ?


If you want to get the complete property list of any symbol (internal or in the 
DB) just call 'getl on it






  Ursprüngliche Nachricht  



Von: ckkash...@gmail.com
Gesendet: 16. April 2019 16:42
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: Re: Database question


Hi Alex,




Does this look reasonable? I tried to implement key-value store/get. I am not 
sure how to enumerate all the keys though. 




(pool "test.db")




(set *DB "ROOT")




(de kv-add (k v)

        (let nv (new T)

                (set nv v)

                (put *DB k nv)

                (commit)))




(de kv-get (k)

        (val (get *DB k)))







Regards,

Kashyap






On Sun, Apr 14, 2019 at 1:58 PM C K Kashyap  wrote:

Thanks Alex!
Regards,
Kashyap


On Sun, Apr 14, 2019 at 1:20 PM Alexander Burger  wrote:

On Sun, Apr 14, 2019 at 12:54:19PM -0700, C K Kashyap wrote:
> Is the builtin database in picolisp tied to OOP? The documentation seems to
> indicate it.

Not necessarily. The DB consists of three independent layers.

Persistent "external" symbols are the base. They are directly in the core
language. They are used to implement b-trees, and in addition - and on top of
those - the entity and relation objects (only those are OOP).


> Is there a way I could use the DB to just accrue immutable
> facts (just like Clojure Datomic works)?

Just create external symbols (with 'new' without a class), and store stuff into
their values and property lists.


> Is there a non-OOP sample that I could use as a starting point?

The tutorial at https://software-lab.de/doc/tut.html#ext

☺/ A!ex

--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
PԔ � &j)mX�����zV�u�.n7�

Re: PicoLisp for 9-11 years' kids

2019-04-13 Thread Joh-Tob Schäg

Hello Nehal,

here are several tangent thoughts.

First: PicoLisp is great for mathematics, as long as you stay with integers or 
fractions (frac.l). Working with 2.321 by *Scl is cumbersome and there is no 
good way to hide the scaling for a new users yet. Even when it is very 
irritating. I would claim "hiding" what PicoLisp does internally is against the 
philosophy of PicoLisp.
The only other way would be to "build" your own floating points by cons-ing the 
decimal place to the number.

When i was young, i found turtle graphic a very intriguing toy. I used a 
platform called netlogo. 
The idea is that you have a turtle on the plain which you move by relative 
coordinate changes.
Such a thing is great for drawing diagrams too. 
The problem is that i think it is impossible to do a nice implementation of 
that, since sin, cos, sqrt, multiplication with 2.321 , all would need to be 
implemented in which makes the implementation much less nice than a 
implementation in a language which "just" works with float points.

That said:
If you mostly do not need floating points or find a work around that works for 
you and them PicoLisp is indeed an option.
If there is one area where PicoLisp is a really nice toy it is: 
symbolic-ai/lisp-ai/good-old-fashioned-ai 
The idea is that you describe your problem in symbolic term and let it be 
solved by search, symbolic transformations and hard coded behavioral rules and 
clever heuristics.
The computer could be made to play chess with them, stack simulated boxes or 
chat really badly with them. Or something like that.

If you want to go down this route SICP might be a excellent inspiration. 
However it is aimed at university students in so far as it builds programs to 
calculate a symbolic derivative. If they are not familiar with such concepts 
and would like more visual stuff, a nice road to introduce recursion is 
L-Systems (they are simple symbolic systems which can be drawn out to look very 
plant like,).

These are my initial thoughts if you could tell us your ideas i can give more 
detailed feedback.
It might be interesting to arrange a time where people interested in that could 
meet in the IRC and discuss some ideas for an hour.

sincerely freemint 




  Ursprüngliche Nachricht  



Von: nehalsingha...@gmail.com
Gesendet: 13. April 2019 11:41
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: PicoLisp for 9-11 years' kids


Dear PicoLisp programmers,


I'll be introducing PicoLisp to two young  exceptionally bright
sibling children (Ojas, boy age 9 years and Oshin, girl age 11 years, who are 
in homeschool) who have no experience of computer science and programming.


PicoLisp being the most advanced computational framework and perfect model 
language suits best for this purpose 


Migrating from one language to another becomes a tough job later in life. Such 
as children knowing Sanskrit/German as their first language will find them easy 
than people who learn them later in lives after already speaking English (or 
any other language for that matter). 


I'm very excited to begin this as it is a radical approach and is extremely 
challenging.


 I am considering what and how I should start. And at what stage should they be 
introduced to C and Assembly?


I want them to get idea of PicoLisp as the language for handling all their day 
to day projects that they'll be needing to do in coming days, and later in life.


I also plan to introduce PicoLisp in local communities and schools depending on 
my experience with them. You may be aware that proponents of other Lisps such 
as http://www.racket-lang.org are putting lot of effort with beginner level, 
easy to programme colorful pictures, animations and graphics to provide lively 
introduction to young students to introduce their language as first language 
early in their lives, even as a tool to learn elementary Math, Science and also 
to make beautiful presentations.


Children will find it extremely attractive if they can create something out of 
PicoLisp, like diagrams, presentations, Math (using svg library to make 
geometric shapes, plot graphs etc). 


These are some of my ideas that I'll be trying to implement. Yet I'll also be 
needing help of other PicoLisp programmers in this regard.


Active cooperation, reviews, feedback and suggestions are welcome. 


Best,
NehalPԔ � &j)mX�����zV�u�.n7�

Re: PicoLisp v. MicroPython ?

2019-01-22 Thread Joh-Tob Schäg
well there is MicroPicoLisp which aims for the low ram embedded space. PicoLisp 
itself depends on some Unix abstractions which are not present in all systems 
but MicroPicoLisp should be fine.


  Ursprüngliche Nachricht  
Von: hbak...@pipeline.com
Gesendet: 23. Januar 2019 01:06
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: PicoLisp v. MicroPython ?

MicroPython (micropython.org) is apparently an
implementation of Python intended for *bare metal*
implementations.

Is PicoLisp aiming for some of the same applications?


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: FrosCon lighting talk [German]

2018-11-16 Thread Joh-Tob Schäg
I did post a transcript with comments in the mailing list before.
I think those were English. 





  Ursprüngliche Nachricht  



Von: r...@tamos.net
Gesendet: 17. November 2018 01:29
An: picolisp@software-lab.de
Antworten: picolisp@software-lab.de
Betreff: Re: FrosCon lighting talk [German]


Thanks for doing this!  I wish I knew German so that I could appreciate it 
(more).  Nevertheless, one comment I have -- and it is of course not your fault 
-- is that they should have provided you with a lapel mic, so that you could 
type with two hands.  (or you could have mastered the penti. :)  Solid, man!  
Again, thanks, freemint!



 On Fri, 16 Nov 2018 21:23 +0100, Joh-Tob Schäg wrote:
 > Hi,
 >
 > I did an lighting talk on PicoLisp at FrosCon this year. The video is
 > now out.
 > My part starts at
 > https://media.ccc.de/v/froscon2018-2322-lightning_talks#t=975
 > While I was terribly exited and my presentation skills where not as good
 > as they might have been if I prepared more I still wanted to share it.
 >
 > Have fun!
 > freemint
 >
 >
 >
 >
 > PÔ” ‘ &j)m¢˜œ¢X¬¦Ê·«zV›uë.n7œµIì¹»®&Þ

 --
 UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


FrosCon lighting talk [German]

2018-11-16 Thread Joh-Tob Schäg
Hi,

I did an lighting talk on PicoLisp at FrosCon this year. The video is now out.
My part starts at https://media.ccc.de/v/froscon2018-2322-lightning_talks#t=975
While I was terribly exited and my presentation skills where not as good as 
they might have been if I prepared more I still wanted to share it.

Have fun!
freemint 




PԔ � &j)mX�����zV�u�.n7�

My 5 minutes lightning talk at FrosCon

2018-09-26 Thread Joh-Tob Schäg
Since there is some much stir around the presentation made by mtsd. (Great
work by the way) I decided it is a good time to put my lightning talk at
FrosCon out there.
Attached is the original version i gave.
Inline is an updated version with more content which could function as a
PicoLisp tutorial or something.

: "PicoLisp" # Hello today i want to talk a bit PicoLisp.
-> "PicoLisp"
: (* 2 1) #In PicoLisp you can multiply.
-> 2
: (* 3 (* 2 1)) # You can combine use the return values to make more
complicated expressions.
-> 6
: (* 4 (* 3 (* 2 1)))
-> 24
: (** 2 (* 5 (* 4 (* 3 (* 2 1) # Numbers in PicoLisp are Integers and
they can be as big as you RAM can handle.
-> 1329227995784915872903807060280344576
: (* 5 4 3 2 1) # Some functions in Picolisp take an arbitrary number of
arguements.
-> 120
: (range 1 12) # And of course there are cleverer ways to generale lists
-> (1 2 3 4 5 6 7 8 9 10 11 12)
: (apply * (range 1 6)) # Here we use the multiply function on the list we
generated with 'range
-> 720
: (de fak (N) (apply * (range 1 N))) # Let's define a function
-> fak
: (mapcar fak (range 1 12)) # Let's test the function by applying to the
number 1 to 12
-> (1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600)
: fak # But what is 'fal , really?
-> ((N) (apply * (range 1 N)))
: ('((N) (apply * (range 1 N))) 8) # It is a list in RAM and the list can
be executed on it's own.
-> 40320
:(replace fak '(N) '(m)) #This means we can also modify function as f they
are lists
-> ((m) (apply * (range 1 N))) # Truth be told they are actually trees
: (de treeplace (List Old New) # Define a function
which replaces symbols on a tree
(mapcar#For each member of the
list in which Old was Replaced by New
  '((X) (if (lst? X) (treeplace X Old New) X)) # Recure on all lists
you see
   (replace List Old New)))
-> treeplace
: fak
-> ((N) (apply * (range 1 N))) # This is was fak looked like
: (treeplace fak 1 2)  # Multiplying by one is useless
-> ((N) (apply * (range 2 N))) # Tada, we optimed our code
: fak # What is the 'fak now
-> ((N) (apply * (range 1 N))) # Fak has not change since i used
non-destructive operations and did not give 'fak the value
: treeplace
-> ((List Old New) (mapcar '((X) (if (lst? X) (treeplace X Old New) X))
(replace List Old New))) # The code is not really clear. X is not very
descriptive.
: (setq treeplace (treeplace treeplace 'X 'Sub)) # Since we are working
with a sub-expression or sub-tree let's call it that.
-> ((List Old New) (mapcar '((Sub) (if (lst? Sub) (treeplace Sub Old New)
Sub)) (replace List Old New)))
: treeplace # Setq sets the Symbols value
-> ((List Old New) (mapcar '((Sub) (if (lst? Sub) (treeplace Sub Old New)
Sub)) (replace List Old New))) # See it is way more clear what the code
does now.

Sincerely Johann-Tobias Schäg
: "PicoLisp"
-> "PicoLisp"
: (* 2 1)
-> 2
: (* 3 (* 2 1))
-> 6
: (* 4 (* 3 (* 2 1)))
-> 24
: (** 2 (* 4 (* 3 (* 2 1
-> 16777216
: (* 5 4 3 2 1)
-> 120
: (range 1 12) 
-> (1 2 3 4 5 6 7 8 9 10 11 12)
: (apply * (range 1 6))
-> 720
: (de fak (N) (apply * (range 1 N)))
-> fak
: (mapcar fak (range 1 12))
-> (1 2 6 24 120 720 5040 40320 362880 3628800 39916800 479001600)
: fak
-> ((N) (apply * (range 1 N)))
: ('((N) (apply * (range 1 N)))
 8)
-> 40320
: (replace fak '(N) '(m))
-> ((m) (apply * (range 1 N)))
: (de treeplace (List Old New) (mapcar '((X) (if (lst? X) (treeplace X Old New) 
X)) (replace List Old New)))
-> treeplace
: fak
-> ((N) (apply * (range 1 N)))
: (treeplace fak 1 2)
-> ((N) (apply * (range 2 N)))
: (setq treeplace (treeplace treeplace 'X 'Sub))
-> ((List Old New) (mapcar '((Sub) (if (lst? Sub) (treeplace Sub Old New) Sub)) 
(replace List Old New)))



Re: address sanitize

2018-07-04 Thread Joh-Tob Schäg
Hello mike,

why would we want address sanitation?

Thanks

2018-07-04 22:25 GMT+02:00 Mike :

> hi,
>
> 1. pil32 (C version) passed builtin tests in gcc 8.1.1. under address
> sanitize (-fsanitize=address).
> 2. undefined behavior still cant understand trivial shifts math in big.c
> and generates false alarms on variable length array too. This is another
> story, its ok for now.
>
>
>
> Happy coding,
>
> (mike)
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>


Testing test.l

2018-07-02 Thread Joh-Tob Schäg
I recently got a windows pc and installed the linux simulation layer. I
choose Ubuntu 18.04.
During executing test.l i noticed the following things

in @test/src/main.l are the following problems:

>
> (unless (member *OS '("SunOS" "OpenBSD" "Cygwin" "AIX" "HP-UX" "IRIX64"))
>(sigio (setq "SigSock" (port T 0 "SigPort"))
>   (setq "SigVal" (udp "SigSock")) )
>(udp "localhost" "SigPort" '(a b c))
>(wait 200)
>(test '(a b c) "SigVal")
>(close "SigSock") )
>
​raises an error i can not unatangle

​
 *
​OS is "Linux"

error is

> ("SigVal")

[test/src/main.l:20] (a b c) -- 'test' failed
>


​@test/src/sym.l

>
> ​
> (when symbols
>(one Foo)
>(test 'pico (nsp 'symbols))
>(test 'myLib (nsp 'Foo))
>(test '(myLib pico) (symbols 'pico)) )
>
​error:​

​ !? (nsp 'symbols)
nsp -- Undefined

> ​
> (when symbols
>(test 1 myLib~Foo)
>(test NIL (nsp 'myLib~Foo)) )​
>
error:  1 -- 'test' failed


> ### zap ###
> (test "abc" (str? (zap 'abc)))
>
The test is wrong, windows is not to blame. I think


--- End Windows for Linux Ubuntu18.04 (using latest tests and version 18 2
17 of pil)


Re: Wiki css

2018-06-25 Thread Joh-Tob Schäg
I would also keep it and somebody finds something annoying (like italic
headlines) they should just send an "upgraded" css to the mailing list and
have some people try it out.

2018-06-25 11:03 GMT+02:00 Manuel Cano :

> Hi all,
>
> I like as it is now. Ari has made a good job, don't throw it away.
> If it was hard for someone before, they could have done what Ari has made

Re: Screenshot of local Wiki

2018-06-23 Thread Joh-Tob Schäg
Hello,

i find the black on black text very hard to read

2018-06-23 12:16 GMT+02:00 Arie van Wingerden :

>
>


Re: Math exp issue?

2018-01-29 Thread Joh-Tob Schäg
Hi

since i basically study mathematics at the moment i will implement exp in
pure picolisp when i find the time.



2018-01-29 8:25 GMT+01:00 Alexander Burger :

> On Mon, Jan 29, 2018 at 08:14:31AM +0100, Alexander Burger wrote:
> > To the question why it returns 101 for (exp 1): 101 is the
> > representation of the float number 1:
> >
> >: (round 101)
> >-> "1.000"
>
> .. and (exp 1) is (exp 0.01) ...
>
> https://the-m6.net/blog/fixed-point-arithmetic-in-picolisp.html
>
> ♪♫ Alex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Subscribe

2017-09-17 Thread Joh-Tob Schäg
As another young person (maybe even younger than you) i can only recommend
two things. Hang around in the #picolisp IRC on freenode.net and improve
your skills by self cultivation.
I had the biggest insights about the nature of picolisp when i tried to
solve problems which i found interesting.



2017-09-17 22:05 GMT+02:00 stayfirefo...@outlook.com <
stayfirefo...@outlook.com>:

> Hello everyone,
>
> My name is Barzi M. Ahmad, I a young person who is interested in
> Artificial General Intelligence, and of course I am interested in
> programming. I'd love to learn PicoLisp (the language, db, prolog engine,
> etc).
>
> I am appreciating your help for educating me.
>
>
>


Re: PicoLisp as first language

2017-07-31 Thread Joh-Tob Schäg
Hello,

i would update Definitions, assignment and bindings

Let is only used for local

Am 31. Juli 2017 16:07:38 MESZ schrieb Nehal :
>Dear PicoLisp programmers,
>
>Hi! I am Nehal, a new PicoLisp learner and programmer from India.
>
>I am currently working on making simple, easy to begin with PicoLisp
>Documentation for school students. Usually children are taught Java,
>C++
>but my objective is to have them started with PicoLisp so that they
>learn
>programming as well as other core subjects such as Math, Physics with
>the
>aid of PicoLisp.  Through this experience they not only will have knack
>on
>several subjects with practical learning but will also hone skills in
>PicoLisp, a virtual machine and language they can befriend for life.
>
>In this light, I recently published an article on picolisp.com. Kindly
>see:
>https
>://
>
>picolisp.com
>
>/wiki/?
>
>picolispforpythonandchickenschemeprogrammers
>
>.
>
>This document is currently having less examples. I would like to have
>something more appended to it.
>
>I will be grateful if you can visit the link and give me feedback.
>Suggestions, extensions are requested and welcome.
>
>Thank you so much.
>
>Regards,
>Nehal
>
>सा विद्या या विमुक्तये


Re: PicoLisp as first language

2017-07-31 Thread Joh-Tob Schäg
Hello

I would update
Definitions, assignment and bindings
 Let is only used for local assignments. setq compares to best to the examples 
of the other languages.

Sincerely,



Am 31. Juli 2017 16:07:38 MESZ schrieb Nehal :
>Dear PicoLisp programmers,
>
>Hi! I am Nehal, a new PicoLisp learner and programmer from India.
>
>I am currently working on making simple, easy to begin with PicoLisp
>Documentation for school students. Usually children are taught Java,
>C++
>but my objective is to have them started with PicoLisp so that they
>learn
>programming as well as other core subjects such as Math, Physics with
>the
>aid of PicoLisp.  Through this experience they not only will have knack
>on
>several subjects with practical learning but will also hone skills in
>PicoLisp, a virtual machine and language they can befriend for life.
>
>In this light, I recently published an article on picolisp.com. Kindly
>see:
>https
>://
>
>picolisp.com
>
>/wiki/?
>
>picolispforpythonandchickenschemeprogrammers
>
>.
>
>This document is currently having less examples. I would like to have
>something more appended to it.
>
>I will be grateful if you can visit the link and give me feedback.
>Suggestions, extensions are requested and welcome.
>
>Thank you so much.
>
>Regards,
>Nehal
>
>सा विद्या या विमुक्तये


Re: Less powerful 'str?

2017-06-17 Thread Joh-Tob Schäg
Take a look at 'read.
You may need to 'eval the result.
If 'read does not suit your needs i wrote a tokenizer and parser but the
source code is not yet ready fot publication
Am 17.06.2017 23:42 schrieb "Christopher Howard" <
christopher.how...@qlfiles.net>:

> Hi list. I find that the 'str function is rather convenient for
> processing commands from the user, as it converts the input to list
> format, like in
>
> : (str (line T))
> go north
> -> (go north)
>
> However, it creates complications in allowing commands like:
>
> : (str (line T))
> `(+ 1 2 3)
> -> (6)
>
> and
>
> : (str (line T))
> "crash!
> EOF Overrun
> ?
>
> Is there another simple way to get the lists provided by 'str without
> the user this power to run code?
>
> --
> https://qlfiles.net
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Introduction

2017-05-24 Thread Joh-Tob Schäg
While your long write-up is certainly welcome it is also unnecessary in my
humble opinion.
We gladly welcome you in the community. Just visit the IRC-channel
#picolisp on freenode.net


2017-05-24 17:27 GMT+02:00 Jimmie Houchin :

> Hello, I just want to take an opportunity to introduce myself to the
> community.
>
> I have for a long time been interested in learning a LISP, but was not
> aware of one that was active and practical. I would research every few
> years but never found one. I do not know how I missed finding PicoLisp.
> But, I am glad to have found it.
>
> I explored Clojure several years ago, but I just have a very hard time
> embracing Java. When I opened a Clojure REPL and see the 3-400mbs of ram.
> It was too much. And I looked again for some other active and practical
> LISP. The only thing I can think of for not seeing or remembering PicoLisp
> is if I encountered it when it was GPL. I attempt to avoid almost any GPL
> software for development. I am very grateful that you changed the license
> to MIT, otherwise I would still be looking.
>
> I am not a professional programmer. But I have spent significant time
> programming. I started with Prograph CPX in 1994. I then learned Python and
> have dabbled with many things, but have spent most of my time with
> Squeak/Pharo Smalltalk.
>
> I am really looking forward to learning PicoLisp and hope that I find
> myself capable. It looks to be a very nice combination of features.
>
> I love the idea of it being a simple LISP.
> I love the idea of being able to learn most all of the system, libraries
> and interpreter.
> I love the idea of having a complete application framework, language,
> database, gui.
> I love the fact that it is small, fast and efficient.
> It looks like a place someone could make a home.
>
> Thank you Alexander for blessing the world with your creation. I pray it
> brings you many blessings in kind.
>
> Shalom
>
> Jimmie Houchin
>
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Order by database question

2017-04-30 Thread Joh-Tob Schäg
That could be because of +Key.
Am 01.05.2017 02:18 schrieb "Henrik Sarvell" :

> Hi list,
>
> I've been looking through the docs and all my notes but it looks like I'm
> not managing to get the result I want no matter how I try.
>
> I've got this E/R:
>
> (class +UrlTag +Macropisobj)
> (rel id(+Key +Number))
> (rel url   (+Ref +Link) NIL (+Url))
> (rel usr   (+Ref +Link) NIL (+User))
> (rel tag   (+Aux +Ref +Link) (usr) NIL (+Tag))
>
> Note that id is auto incrementing on every insert.
>
> And I'm using goal, prove and select to try and achieve the Picolisp DB
> version of this SQL:
>
> SELECT * FROM UrlTag WHERE usr = Usr ORDER BY id DESC LIMIT 0,50
>
> I manage everything apart from the ordering of the result correctly.
>
> I thought this select would order things in descending order:
>
> (select (@Obj)
> ((id +UrlTag (T . NIL)) (usr +UrlTag @Usr))
> (same @Usr @Obj usr) )
>
> But it seems I was wrong?
>
>
>


Re: Picolisp within Picolisp (for games, etc.)? Or, PicoLisp VM?

2017-04-27 Thread Joh-Tob Schäg
I thought about the same.
My insights are:
You can 'let all relevant symbols with alternative functions or just NIL.
Adresses 1 & 2
You might want to change the repl in a way that if for example the symbols
car and list are evaluated they return a meaningless number. (It might be
possible to calculate the offset and execute arbitrary lisp code.) 1 & 2
And alternative would be to rewrite the picolisp eval function and only let
it load Symbols from a certain namespace/symbol to function property list.
Regarding 3: the best way to archieve that is putting the execution of this
code in a 'later. You can either cancel them after a certain time via kill
while your game world goes on (ask regenaxer how the open pipe is handled
or wait for the result) 3 execution time aspect.
To controll the space aspect you need rewrite picolisp in picolisp and
maintain your own free list or let all functions the user can call either
increase a counter on each allocation and throw an error if the number of
allocations exhausts the virtual machine capacity.

Am 28.04.2017 04:18 schrieb "Christopher Howard" <
christopher.how...@qlfiles.net>:
>
> Hi list, I was wondering if there would be a practical way to safely
> contain a picolisp interpreter (or some subset of commands) inside
> another picolisp program. E.g., suppose you have a computer game
> programmed in PicoLisp, and the main character found a computer terminal
> that allowed him to run some commands or program something in PicoLisp.
> The obvious safety concerns here are:
>
> (1) You either want to disable disk access, or make it so that disk
> access pulls from a virtual disk in the game.
>
> (2) You don't want the user to be changing memory in the game itself,
> only his virtual memory.
>
> (3) You don't want the user to be able to exhaust memory or blow the
stack.
>
> --
> https://qlfiles.net
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: Header parsing

2017-04-19 Thread Joh-Tob Schäg
If people are currently working on improving the mailing list. I would be
very pleased not receive automated emails about thanking people for joining
or leaving.
Has anybody else strong opinions about that?

2017-04-19 22:16 GMT+02:00 Henrik Sarvell :

> Hi Rowan,
>
> If it makes you feel better, I get all your emails because I've created a
> Gmail filter that makes sure picolisp mail list mails always go through the
> filters.
>
>
>
>
>
>
> On Wed, Apr 19, 2017 at 11:57 AM, Rowan Thorpe 
> wrote:
>
>> BTW: I receive DMARC reports about bounced/quarantined mails spoofing
>> my address, and just received one from fastmail which matches the
>> quarantined deliveries vukini reported (they failed validation due to
>> the accidentally forwarded SPF and DKIM headers, as I predicted).
>>
>> .so it seems my posts to the list over the years have mostly reached
>> an audience of one  :-D
>>
>> --
>> Rowan Thorpe
>> http://twitter.com/rowanthorpe
>> "There is a great difference between worry and concern. A
>> worried person sees a problem, and a concerned person solves a
>> problem." - Harold Stephens
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: PilMCU status

2017-04-18 Thread Joh-Tob Schäg
If you are still searching an FPGA board you might want to get in contact
with j-core.org
They build an open source processor and are developing an RasPi form factor
compatible FPGA board.
Am 18.04.2017 10:49 schrieb "Rowan Thorpe" :

> On 18 April 2017 at 09:32, Alexander Burger  wrote:
> > Hi Rowan,
> >
> > > mailing-list configuration - for some reason none of the recent emails
> > > to the list from geo got through to me, but everyone else's did (I
> > > read the thread on the list's web-archive OK, but it got me wondering
> > > if any other emails never got through). Because the list-software
> >
> > Indeed something must be wrong with the mailing list. We observe
> rejected mails
> > rather often :(
> > ..[snip]..
> > In fact, everyone of us has the source of the PicoLisp mailing list
> server. It
> > is in the PicoLisp distribution, e.g. in /usr/share/picolisp/misc/mailing,
> or
> > locally in misc/mailing.
>
> I just had a glance at the source and noticed one thing so will
> mention it now, and will try to look/test more thoroughly later for
> anything else. On lines 28-30 there is the "header folding" logic:
>
> > (while (= ";" (last (last L)))
> >  (char)  # Skip TAB
> >  (conc L (trim (split (line) " "))) )
>
> which only folds the next line of a multiline header if the existing
> line ends with ";" and then chomps a single leading char, yet as far
> as I understand it, RFC822 supports [A] folding based on (single or
> multiple) leading TABs or spaces, [B] even if the preceding line
> doesn't end with a ";" :
>
>  https://tools.ietf.org/html/rfc822#section-3.2 (and see token-def in
> section 3.3)
>
> Looking through the source of various emails I've received from other
> gmail/google-apps users I noticed they often have a mix of
> multiline-header-continuations with leading SPACEs (multiple) and some
> with leading TABs, and several are just folded on space without the
> trailing ";" so it seems this isn't a theoretical edge-case...
>
> Obviously chomping only one of multiple leading spaces/tabs probably
> doesn't matter (other than for readability of mail-source), but only
> matching the fold on a trailing ";" certainly does. I suspect that is
> causing recipients' SMTP servers (and/or your own Postfix on
> localhost) to reject my emails because I have SPF/DKIM configured on
> outgoing emails, and those long headers often get folded on space
> (without trailing ";"), which I guess short-circuits the header
> processing and forwards the remainder of the headers as "the body". If
> either the SPF or DKIM headers end up included in the final outgoing
> mail they will cause a validation failure (SPF due to wrong sender,
> and DKIM due to modified content).
>
> --
> Rowan Thorpe
> http://twitter.com/rowanthorpe
> "There is a great difference between worry and concern. A
> worried person sees a problem, and a concerned person solves a
> problem." - Harold Stephens
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Is there documentation for the libraries in @lib/ ?

2017-04-01 Thread Joh-Tob Schäg
Yes you can not find any documentation.

2017-04-02 3:36 GMT+02:00 Bruno Franco :

> I can find the documentation for the default functions, and for the form
> functions, but how about libraries like pilog.l or http.l?
>


Re: Fixed-point scaling and lookup tables

2017-04-01 Thread Joh-Tob Schäg
I'll wait.

2017-04-01 22:45 GMT+02:00 Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com>:

> My next little picolisp project...
>
> Picolisp's built-in functions for scaled arithmetic are brilliant once you
> understand how they work. Still, it would be great to get more scientific
> functions without have to link an external math lib, and get 'real-time'
> performance when needed as well.
>
> http://wilsonminesco.com/16bitMathTables/ is a nice write-up (link found
> on hacker news) of what you can do with fixed point, scaling and lookup
> tables... Also has links to code to generate the tables.
>
> I think the concepts and technique will transfer quite nicely to
> picolisp.  We'll see...
>
> /Lindsay
>
>


Re: Evaluation confusion

2017-04-01 Thread Joh-Tob Schäg
2017-04-01 14:37 GMT+02:00 Alexander Burger :

> On Sat, Apr 01, 2017 at 04:04:32AM -0800, Christopher Howard wrote:
> > Additional question: Should I expect any weird behavior with transient
> > symbols and the '< or '> operators? E.g. (assuming the symbols have not
> > been assigned strange values) is it true that "abc" will always be less
> > than "abd" regardless of the scope of the transient symbols?
>
> Yes. '<' and '>' are comparison functions just like '=' and '>='. They
> compare
> numbers (their numeric values), symbols (their names) and (recursively)
> cells
> and lists.
>
> '==' and 'n==' are of a differend category, as they only look at the
> pointer,
> checking for identity.
>
> So "abc" is less than "abd", and also less than 'abd' (internal symbol).
>
> ♪♫ Alex
>

​... as long as the symbols are not bound to other values.​


> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Evaluation confusion

2017-04-01 Thread Joh-Tob Schäg
No that is not true.
: (setq "ABC" 3)
-> 3
: "ABC"
-> 3
: (setq "ABD" 2)
-> 2
: (> "ABC" "ABD")
-> T
But it is always true if the transient symbols do not refer to themselves.
See Comparing in the docs.

> Numbers are comparable by their numeric value, strings by their name, and
> lists recursively by their elements (if the CAR's are equal, their CDR's
> are
> compared). For differing types, the following rule applies: Numbers are
> less
> than symbols, and symbols are less than lists.
>


2017-04-01 14:04 GMT+02:00 Christopher Howard <
christopher.how...@qlfiles.net>:

> Additional question: Should I expect any weird behavior with transient
> symbols and the '< or '> operators? E.g. (assuming the symbols have not
> been assigned strange values) is it true that "abc" will always be less
> than "abd" regardless of the scope of the transient symbols?
>
> On 04/01/2017 03:56 AM, Christopher Howard wrote:
> > Ah, okay. Somehow in my mind I had reversed the meaning of "==" and "=".
> >
> > @Joh-Tob: I am writing a text-adventure game, using a balanced binary
> > tree as the primary data structure for managing game data. I wrote my
> > own AA Tree implementation (with guidance from Wikipedia). I see the idx
> > and balance functions in PicoLisp reference, but my concern is I don't
> > see how you do with those an (efficient) self-balance after single
> > inserts to an existing tree, nor how to do self-balancing deletes from
> > an existing tree.
> >
> > On 04/01/2017 01:46 AM, Alexander Burger wrote:
> >> Hi Christopher,
> >>
> >>> : (aa-search '(("threshold" (("long-description" "You stand in front of
> >>> a wooden door, reputed to be the home of one Dr. Theobold. The door has
> >>> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
> >>> -> ("threshold" ...
> >>
> >>> However, if I run this command, I get a different result:
> >>>
> >>> : (aa-search (rooms) "threshold")
> >>> ...
> >>
> >>
> >> The problem is the '==' in
> >>
> >>>   (if (== Key (car (aa-kv Tree)))
> >>
> >>
> >> You pass a transient symbol "threshold", and '==' checks for exactly
> this
> >> symbol. The scope of transient symbols is per file or REPL instance, so
> you ran
> >> the first test probably in the same instance, while "threshold" in the
> second
> >> was a new, different, symbol.
> >>
> >> Either use '=' for comparison, or use only internal symbols as keys.
> >>
> >> ♪♫ Alex
> >>
> >
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Evaluation confusion

2017-04-01 Thread Joh-Tob Schäg
@Christopher Howard,

I would be interested in seeing the source code for your text adventure RPG
as i am working on a MOO (MUD (Multi user Dungeon) Object Oriented).

You may not want to rebalance after every insert. But you can balance a
'idx by 'balance . You can always benchmark these combinations it your
approach is faster the mailing list would be interested in your results and
the source.

2017-04-01 13:56 GMT+02:00 Christopher Howard <
christopher.how...@qlfiles.net>:

> Ah, okay. Somehow in my mind I had reversed the meaning of "==" and "=".
>
> @Joh-Tob: I am writing a text-adventure game, using a balanced binary
> tree as the primary data structure for managing game data. I wrote my
> own AA Tree implementation (with guidance from Wikipedia). I see the idx
> and balance functions in PicoLisp reference, but my concern is I don't
> see how you do with those an (efficient) self-balance after single
> inserts to an existing tree, nor how to do self-balancing deletes from
> an existing tree.
>
> On 04/01/2017 01:46 AM, Alexander Burger wrote:
> > Hi Christopher,
> >
> >> : (aa-search '(("threshold" (("long-description" "You stand in front of
> >> a wooden door, reputed to be the home of one Dr. Theobold. The door has
> >> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
> >> -> ("threshold" ...
> >
> >> However, if I run this command, I get a different result:
> >>
> >> : (aa-search (rooms) "threshold")
> >> ...
> >
> >
> > The problem is the '==' in
> >
> >>   (if (== Key (car (aa-kv Tree)))
> >
> >
> > You pass a transient symbol "threshold", and '==' checks for exactly this
> > symbol. The scope of transient symbols is per file or REPL instance, so
> you ran
> > the first test probably in the same instance, while "threshold" in the
> second
> > was a new, different, symbol.
> >
> > Either use '=' for comparison, or use only internal symbols as keys.
> >
> > ♪♫ Alex
> >
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Evaluation confusion

2017-04-01 Thread Joh-Tob Schäg
You seem to want to implement a search binary tree.
Take a look at 'idx it already does that for you.
A possible source of the trouble could be related to 'cadr in '(pp 'rooms).

Also what project are you working on?
(Just curious)

2017-04-01 7:46 GMT+02:00 Christopher Howard :

> Hi list, I'm a little confused at a bug in my code.
>
> I have this procedure 'rooms that returns some data:
>
> : (rooms)
> -> (("threshold" (("long-description" "You stand in front of a wooden
> door, reputed to be the home of one Dr. Theobold. The door has a small
> keyhole.") NIL NIL 1)) NIL NIL 1)
>
> Now, if I run a command (another aa-search) on that data (copy and
> pasted) I get the result I expect:
>
> : (aa-search '(("threshold" (("long-description" "You stand in front of
> a wooden door, reputed to be the home of one Dr. Theobold. The door has
> a small keyhole.") NIL NIL 1)) NIL NIL 1) "threshold")
> -> ("threshold" (("long-description" "You stand in front of a wooden
> door, reputed to be the home of one Dr. Theobold. The door has a small
> keyhole.") NIL NIL 1))
>
> However, if I run this command, I get a different result:
>
> : (aa-search (rooms) "threshold")
> -> NIL
>
> Q: Should not the results be the same?
>
> Here are definitions of the various functions:
>
> : (pp 'rooms)
> (de rooms NIL
>(cadr (aa-search World "rooms")) )
>
> : (pp 'aa-search)
> (de aa-search (Tree Key)
>(unless (not Tree)
>   (if (== Key (car (aa-kv Tree)))
>  (aa-kv Tree)
>  (if (< Key (car (aa-kv Tree)))
> (aa-search (aa-left Tree) Key)
> (aa-search (aa-right Tree) Key) ) ) ) )
> -> aa-search
>
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Documenting PicoLisp code?

2017-03-28 Thread Joh-Tob Schäg
My pleasure

2017-03-28 20:20 GMT+02:00 Tim Johnson :

> * Joh-Tob Schäg  [170328 10:09]:
> > It is no doc string in the elisp sense even though function and syntax
> are
> > similar.
> >
> > (de do_nothing () "Does nothing")
> >
> > Does not behave as expected. It returns the evaluated transient symbol
> > "Does nothing".
> >
> > (de return_null () "returns 0" 0)
> >
> > (de muliply_increase_add (A B C) (let N (* A B) "N is A * B"  (inc 'N 1)
> "N
> > is increased by 1" (setq N (+ N C)) "Everything is done returning N now"
> N))
> >
> >
> > Is an extreme example which illustrates the trade-of both in terms of
> > handling return values and readability. Also be careful around @, @@, @@@
> > with these. The resulting code is also slower. Comments are often
> preferred
> > for that reason.
>
>Thank you.
>
> > 2017-03-28 19:26 GMT+02:00 Tim Johnson :
> >
> > > * Joh-Tob Schäg  [170323 22:18]:
> > > > Either comments inside the code.# Like that
> > > >
> > > > Transistent Symbols at the beginn of the funtion.
> > > > (de power (N E)
> > > >   "Calculates the exponent in a wastefull manner"
> > > >   (apply '* (need E N)))
> > > >
> > > > I have not seen another approach in Picolisp yet
> > > > Am 24.03.2017 04:15 schrieb "Christopher Howard" <
> > > > christopher.how...@qlfiles.net>:
> > > >
> > > > > Hi list. How does one document his picolisp code? Has anybody
> developed
> > > > > any cool markup systems for use with picolisp?
> > > > >
> > >   Joh-Tob seems to be describing a docstring as in elisp and python.
> > >   Does the docstring have to be the third member of the 'de form?
> > >
> > >   Thanks
> > > --
> > > Tim
> > > http://www.akwebsoft.com, http://www.tj49.com
> > > --
> > > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
> > >
>
> --
> Tim
> http://www.akwebsoft.com, http://www.tj49.com
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Documenting PicoLisp code?

2017-03-28 Thread Joh-Tob Schäg
It is no doc string in the elisp sense even though function and syntax are
similar.

(de do_nothing () "Does nothing")

Does not behave as expected. It returns the evaluated transient symbol
"Does nothing".

(de return_null () "returns 0" 0)

(de muliply_increase_add (A B C) (let N (* A B) "N is A * B"  (inc 'N 1) "N
is increased by 1" (setq N (+ N C)) "Everything is done returning N now" N))


Is an extreme example which illustrates the trade-of both in terms of
handling return values and readability. Also be careful around @, @@, @@@
with these. The resulting code is also slower. Comments are often preferred
for that reason.

2017-03-28 19:26 GMT+02:00 Tim Johnson :

> * Joh-Tob Schäg  [170323 22:18]:
> > Either comments inside the code.# Like that
> >
> > Transistent Symbols at the beginn of the funtion.
> > (de power (N E)
> >   "Calculates the exponent in a wastefull manner"
> >   (apply '* (need E N)))
> >
> > I have not seen another approach in Picolisp yet
> > Am 24.03.2017 04:15 schrieb "Christopher Howard" <
> > christopher.how...@qlfiles.net>:
> >
> > > Hi list. How does one document his picolisp code? Has anybody developed
> > > any cool markup systems for use with picolisp?
> > >
>   Joh-Tob seems to be describing a docstring as in elisp and python.
>   Does the docstring have to be the third member of the 'de form?
>
>   Thanks
> --
> Tim
> http://www.akwebsoft.com, http://www.tj49.com
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Random Access?

2017-03-25 Thread Joh-Tob Schäg
> Hi list. I noticed that when I evaluate
>
> (list (box) (box) (box))
>
> I get
>
> ($177760526373112 $177760526373114 $177760526373116)
>
That is common if you just restarted the session or you just needed to
allocate a new block of cells.
> Where each memory location is two more than the previous. I am wondering
> if this behavior is guaranteed to always be the case,
No it is not
> the implication
> being one could have random access to any cell provided he knew the
> address of the first cell.
Yes if your assumption was true it would be that way.
>
> --
> https://qlfiles.net
> --

Why it is not guaranteed?
Both Symbols, Numbers, Lists are built from cells.
Cells are an 128- bit (2* 64) wide something which has flags to tell what
it is.
All unused cells are stored in a free list.
The free list is accidentally in a sorted state when a new block of cells
is allocated (because everey cell is added to the free list in the
beginning that happens by iterating over the block of cells.)
on a garabarage collection all cells which are not reachable by valid paths
are added to the free list again.

That results in three properties.
1 if one element of the is refered to another way it will *NOT* be put back
in to the free list in the right way.
2 The order of the insertion is not defined and all elements are just
inserted at the head maintaining a sorted list makes no sense.
3 blocks of picolisp cells are allocated by the OS at some point in ram so
the blocks are not guaranteed to be in increasing order.

Even if the assumption was true you could not use that information itself
because the car could a list it self.

(make
(do h 7
(link (box))
(link (make (do j (* h h) (link (box)))


Re: Random Access?

2017-03-25 Thread Joh-Tob Schäg
Damn you were faster.
Am 25.03.2017 07:57 schrieb "Alexander Burger" :

> Hi Christopher,
>
> > (list (box) (box) (box))
> > ...
> > ($177760526373112 $177760526373114 $177760526373116)
>
> > Where each memory location is two more than the previous. I am wondering
>
> Yes. BTW, these are actually cell addresses, not bytes. The values have to
> be
> multiplied by 16 to get the physical addresses. And the value is printed in
> octal representation.
>
> Two cell are created for each symbol here, one for the symbol itself and
> one for
> the list being built.
>
>
> > if this behavior is guaranteed to always be the case, the implication
>
> The observed offset of two is not guaranteed. Cells are picked
> sequentially from
> the heap in the beginning, but from the Avail list after garbage
> collection, and
> are not predictable.
>
>
> > being one could have random access to any cell provided he knew the
> > address of the first cell.
>
> Correct. There is even a function for that, 'adr':
>
>: (box)
>-> $377166006651
>
>: (adr @)
>-> -34256457129
>
>: (oct @)
>-> "-377166006651"
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Documenting PicoLisp code?

2017-03-23 Thread Joh-Tob Schäg
Either comments inside the code.# Like that

Transistent Symbols at the beginn of the funtion.
(de power (N E)
  "Calculates the exponent in a wastefull manner"
  (apply '* (need E N)))

I have not seen another approach in Picolisp yet
Am 24.03.2017 04:15 schrieb "Christopher Howard" <
christopher.how...@qlfiles.net>:

> Hi list. How does one document his picolisp code? Has anybody developed
> any cool markup systems for use with picolisp?
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Unclear licensing

2017-03-13 Thread Joh-Tob Schäg
*Actions over Words:*

Step 1. Patch the latest download so it contains the license information
locally.
Step 2.?
Step 3. Profit!







Hint: ? is finding a new place to host and go to 1.


2017-03-13 19:09 GMT+01:00 Bruno Franco :

> I think that what Christopher means is that adding a licence makes the
> developer's wishes clear. When you put a permissible licence its obvious
> you don't care what people do with the code, but if there's no licence at
> all it *could* mean you don't care, or it *could* mean you do care but
> just forgot to say it. In the case with no licence, there will be people
> who would like to use the code however they want, but stop because they're
> not sure the developer would accept it. This is not a problem with anyone
> in this community, who knows the code is free to use for anyone. It is more
> for people who find the code without knowing anything about the developer

Re: Unclear licensing

2017-03-13 Thread Joh-Tob Schäg
Hi Christopher,

You can interpret the:

> Thanks for your concerns! But I still do not see where the problem is. I
> don't
> care what others do with the code. It is free!

As make a ~fork~ of it which adds license headers you seem to desperately
want.

2017-03-13 7:57 GMT+01:00 Alexander Burger :

> Hi Christopher,
>
> > Nevertheless, I would strongly recommend *at least* putting licensing
> > information on the JavaScript files, even if only using the one-liner
> > approach. Since the JavaScript will usually be served through a Web
> > server, it will be impossible for Web users to tell that it is freely
> > licensed code. Code with unclear licensing is no better than proprietary
> > code for practical purposes.
>
> Thanks for your concerns! But I still do not see where the problem is. I
> don't
> care what others do with the code. It is free!
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Announce: PilBox - Building Mobile Apps in PicoLisp

2017-03-12 Thread Joh-Tob Schäg
>
>$../Sdk/ndk-bundle/build/tools/make_standalone_toolchain.py \
>   --*api 21* \
>   --arch arm64 \
>   --install-dir toolchain/
>

​This means it will only work with Android version 5.0 or younger.​

​I feel left behind but i have no arm64 anyway. So i would need to buy a
new smartphone. ​

2017-03-12 20:15 GMT+01:00 Joh-Tob Schäg :

> Non homebrew iOS will not be possible since it is not allowed to create
> apps which run user code with access to the device api.
>
> 2017-03-12 18:54 GMT+01:00 Amaury Hernández Águila :
>
>> Will it be possible to have iOS apps in the future too?
>>
>> On Sun, Mar 12, 2017 at 10:42 AM Jakob Eriksson 
>> wrote:
>>
>>> Fantastic!
>>>
>>> On 2017-03-12 17:10, Alexander Burger wrote:
>>> > Hi all,
>>> >
>>> > it is now possible to build Android Apps completely in PicoLisp!
>>> >
>>> >
>>> > I have prepared an environment which lets you run normal PicoLisp
>>> (Web-)
>>> > applications on Android devices, without the need to write Java code.
>>> I'm using
>>> > it myself in a project for distributed databases currently.
>>> >
>>> > It requires an Android Studio SDK to build, but the resulting APKs
>>> ("Android
>>> > Packages") run on any Arm64 device. The provided code itself is
>>> application
>>> > independent. A simple demo and a template skeleton for your own
>>> experiments is
>>> > included.
>>> >
>>> >
>>> > I will not write a full-fledged Wiki article yet, and better wait for
>>> some
>>> > feedback.
>>> >
>>> > An Adroid SDK project is a monster. Here, on my installation, the
>>> "PilBox/"
>>> > folder contains more than ten thousand files!
>>> >
>>> > I don't know which files exactly I have to export, and what is needed
>>> on your
>>> > side to import it into your SDK. I suspect you first need to import it
>>> somehow
>>> > in the IDE before you can use the command line build tools.
>>> >
>>> > The tarball at
>>> >
>>> >https://software-lab.de/PilBox.tgz
>>> >
>>> > contains a README, trying to explain the details. If anyone dares to
>>> try it out,
>>> > please let me know if anything is missing! Together we may be able to
>>> describe
>>> > the procedures more clearly, extend the README, and perhaps provide
>>> some Wiki
>>> > article(s).
>>> >
>>> > ♪♫ Alex
>>> >
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>
>


Re: Announce: PilBox - Building Mobile Apps in PicoLisp

2017-03-12 Thread Joh-Tob Schäg
Non homebrew iOS will not be possible since it is not allowed to create
apps which run user code with access to the device api.

2017-03-12 18:54 GMT+01:00 Amaury Hernández Águila :

> Will it be possible to have iOS apps in the future too?
>
> On Sun, Mar 12, 2017 at 10:42 AM Jakob Eriksson 
> wrote:
>
>> Fantastic!
>>
>> On 2017-03-12 17:10, Alexander Burger wrote:
>> > Hi all,
>> >
>> > it is now possible to build Android Apps completely in PicoLisp!
>> >
>> >
>> > I have prepared an environment which lets you run normal PicoLisp (Web-)
>> > applications on Android devices, without the need to write Java code.
>> I'm using
>> > it myself in a project for distributed databases currently.
>> >
>> > It requires an Android Studio SDK to build, but the resulting APKs
>> ("Android
>> > Packages") run on any Arm64 device. The provided code itself is
>> application
>> > independent. A simple demo and a template skeleton for your own
>> experiments is
>> > included.
>> >
>> >
>> > I will not write a full-fledged Wiki article yet, and better wait for
>> some
>> > feedback.
>> >
>> > An Adroid SDK project is a monster. Here, on my installation, the
>> "PilBox/"
>> > folder contains more than ten thousand files!
>> >
>> > I don't know which files exactly I have to export, and what is needed
>> on your
>> > side to import it into your SDK. I suspect you first need to import it
>> somehow
>> > in the IDE before you can use the command line build tools.
>> >
>> > The tarball at
>> >
>> >https://software-lab.de/PilBox.tgz
>> >
>> > contains a README, trying to explain the details. If anyone dares to
>> try it out,
>> > please let me know if anything is missing! Together we may be able to
>> describe
>> > the procedures more clearly, extend the README, and perhaps provide
>> some Wiki
>> > article(s).
>> >
>> > ♪♫ Alex
>> >
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>


Re: future?

2017-03-11 Thread Joh-Tob Schäg
Today i learned something on IRC regarding hosting Picolisp:

[11:30]  I found a mistake in (doc '+Joint)
> [11:30]  oh
> [11:31]  is the missing part: pos (+Ord)) ?
> [11:32]  then parenthesis?
> [11:32]  yes, something is missing
> [11:33]  it depends how much we want to write
> [11:33]  The +Dep is in the original source
> [11:33]  and then 2 more lines
> [11:33]  Thanks! I fix it
> [11:33]  without the +Dep though, to avoid confusion
> [11:34]  when will the fix be in the wiki?
> [11:34]  It is not in the wiki, but on the download page
> [11:34]  A few minutes
> [11:34]  ok
> [11:35]  I have the feeling the irc fixes bugs faster than
> git would :D
> [11:35]  indeed :)
> [11:36]  OK, I fixed it. Releasing now
> [11:36]  Thanks!!
>

Actions speak louder than words. So do not add anything that makes picoLisp
less actionable and talk about bugs with Regenaxer.

2017-03-10 13:50 GMT+01:00 Jakob Eriksson :

>
>
> 10 mars 2017 kl. 01:17 skrev  :
>
> Thanks for your comments and insights, Jakob.
> I just want to shortly assure you that I really liked your emails and your
> participation.
>
>
>
> Thanks.
>
>
> Sidenote:
> Before GitHub, sourceforge.net was the singular main hoster for FOSS
> sourcecode.
> They lost their status when they bundled the downloads with adware (and
> malware).
>
>
> Something like that can happen.
>
> But I stand by my point - github and it's social network is unique.
>
>
>
>
>
> BitKeeper vs. Linux (the reason we have git now).
>
>
> So thanks to Bitkeeper we could push the state of the art away from CVS.
> Great.
>
>
>
>
> GitHub:
> On 2017-03-01 GitHub introduced
>
> 
>
> Basically, when uploading FOSS-licensed content to GitHub, the uploader
> automatically grants GitHub a special license, so actually a case of
> dual-licensing.
> The problem now is, that when the content is copyrighted by other authors
> beside the uploader,
> then the uploader cannot (in usual cases) actually grant this license
> legally to GitHub, as most FOSS-licenses forbid sublicensing and/or removal
> of the original attributions.
>
>
>
> Just .. not accurate.
>
> https://news.ycombinator.com/item?id=13767975
>
>
>
>
> I don't believe GitHub will take big damage because of this, especially as
> there is no serious contender on the rise.
>
>
> Exactly there's none.
>
> But it's surely a sign that GitHub is not a singularity from the usual
> development of such things.
> It's not an idealistic group of nerds anymore, but a big company (e.g.
> lookup the "github meritocracy" drama).
>
>
> I never said nor implied such a thing.
> I just observe that github is the largest community of software developers
> in the history of the Universe.
>
>
> For the other points mentioned by you and others about picolisp:
> Just do it. PicoLisp is MIT-licensed. Action speaks louder than words.
>
>
> Put up or shut up? Of course you are right. About me. Because I know where
> to find everything picolisp related. But I argue (maybe incorrectly) that
> there can be other people in a kind of Hitchikers guide to the Galaxy
> situation - Picolisp is behind the leopard etc..
>
>
> But all this is beside the point for PicoLisp, we know now that it won't
> come to github. I just wanted to defend my own viewpoint, I didn't like how
> I was understood.
>
>
> This!
> I'm on it.
>
>
> Speaking of, anybody tried to compile emu pico in emscripten?
>
> -- Jakob
>


Re: Storing functions in the database

2017-03-10 Thread Joh-Tob Schäg
Problem solved.
Reading the full 'doc helps. The solution was 'Any.

: (pool "type.db")
-> T
: (class +Function +Entity)
-> +Function
: (rel name (+Idx +String))
-> +Function
: (rel body (+Any +Need))
-> +Function
: (new! '(+Function) 'name "fakultät" 'body '((N) (apply '* (range 1 N
-> {2}
: (new! '(+Function) 'name "sum2" 'body '((N X) (+ N X )))
-> {5}
: (new! '(+Function) 'name "1-to-N-sum" 'body '((N) (/ (* N (inc N)) 2)))
-> {6}
: (select +Function)
{6} (+Function)
   name "1-to-N-sum"
   body ((N) (/ (* N (inc N)) 2))

{2} (+Function)
   name "fakultät"
   body ((N) (apply '* (range 1 N)))

{5} (+Function)
   name "sum2"
   body ((N X) (+ N X))


2017-03-10 22:46 GMT+01:00 Joh-Tob Schäg :

> Hello,
>
> i try to store a function is a database. Can somebody spot what i am doing
> wrong?
>
> (pool "types.db") #empty
> : (class +Function +Entity)
> -> +Function
> : (rel name (+Idx +String))
> -> +Function
> : (rel body (+Bag +Bag +Need))
> -> +Function
> ? (select +Function)
> {5} (+Function)
>name "1-to-N-sum"
>
> {2} (+Function)
>name "fakultät"
>
> {6} (+Function)
>name "sum2"
>
> -> NIL
> ? (get {6} 'body)
> -> NIL
> ? (get {2} 'body)
> -> NIL
> ? (get {2} body)
> -> NIL
> ? (request '(+Function) 'body '((N X) (+ N X )))  #New Function with this
> body is created because nothing found
> -> {13}
> ? (show {13})
> -> (+Function)
> ? (request '(+Function) 'body '((N X) (+ N X )))  #New Function with this
> body is created again!
> -> {14}
>
>
>
>
>
>


Storing functions in the database

2017-03-10 Thread Joh-Tob Schäg
Hello,

i try to store a function is a database. Can somebody spot what i am doing
wrong?

(pool "types.db") #empty
: (class +Function +Entity)
-> +Function
: (rel name (+Idx +String))
-> +Function
: (rel body (+Bag +Bag +Need))
-> +Function
? (select +Function)
{5} (+Function)
   name "1-to-N-sum"

{2} (+Function)
   name "fakultät"

{6} (+Function)
   name "sum2"

-> NIL
? (get {6} 'body)
-> NIL
? (get {2} 'body)
-> NIL
? (get {2} body)
-> NIL
? (request '(+Function) 'body '((N X) (+ N X )))  #New Function with this
body is created because nothing found
-> {13}
? (show {13})
-> (+Function)
? (request '(+Function) 'body '((N X) (+ N X )))  #New Function with this
body is created again!
-> {14}


Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
Makes sense probably.

The greatest compliment i received in months.

2017-03-03 20:04 GMT+01:00 Alexander Burger :

> On Fri, Mar 03, 2017 at 01:39:25PM +0100, Joh-Tob Schäg wrote:
> > I haven't figured out how to do it yet, but I think, in this case, a
> > 'recursive' solution that renders as points are created would use a lot
> > less resources, assuming that processed replacement rules are garbage
> > collected as the stack unwinds and elements are traversed over.
> >
> > ​This sound like a case for 'co ​
>
> Makes sense probably.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
Mhh it seems that my answer is not relevant to your question.

I haven't figured out how to do it yet, but I think, in this case, a
'recursive' solution that renders as points are created would use a lot
less resources, assuming that processed replacement rules are garbage
collected as the stack unwinds and elements are traversed over.

​This sound like a case for 'co ​



2017-03-03 13:32 GMT+01:00 Joh-Tob Schäg :

> ​​
> The initial iterative replacement solution I came up with (below) quickly
> runs out of resources as it has to build the entire list before starting to
> draw.
>
> ​What error did you get?
> How much resources does picolisp use?
> Do you call ulimit before?​
>
>
> I think you may have some fundamental problems with garabarage allocation

Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
​​
The initial iterative replacement solution I came up with (below) quickly
runs out of resources as it has to build the entire list before starting to
draw.

​What error did you get?
How much resources does picolisp use?
Do you call ulimit before?​


I think you may have some fundamental problems with garabarage allocation.
Please see if you understand that code.

(de expensive-list-increaser (A N)
   (default N 1)
   (prinl "call: " N)
   (if A
  (cons
  (+ 1 (car A))
  (expensive-list-increaser
  (copy (prinl (cdr A)))
  (inc N
   (prinl "A of " N " is no no longer refernced after the function number "
N " returns")
   @@)
(de compreku (D) (expensive-list-increaser (range 1 D))

Picolisp can not garbage collect A of the first call until all other are
finished since the first A could be needed inside first call at a later
point. This is related to PicoLisp not having tail recursion.
You also need to understand that 'mapcar and 'map returns a new list not
the old one modified. This means you create a copy of the list with each
mapcar the longest of which is only cleared after the first recursive call
is finished.

(de compiter (D) (for ( N . A) (range 1 D)
  (prinl "call: " N)
  (prinl (copy A))
  (prinl "The copy of A is no longer accessible so it can be deallocated")))

​# : (compreku 5)
call: 1
2345
call: 2
345
call: 3
45
call: 4
5
call: 5

call: 6
A of 6 is no no longer refernced after the function number 6 returns
A of 5 is no no longer refernced after the function number 5 returns
A of 4 is no no longer refernced after the function number 4 returns
A of 3 is no no longer refernced after the function number 3 returns
A of 2 is no no longer refernced after the function number 2 returns Y
A of 1 is no no longer refernced after the function number 1 returns
​
#: (compiter 5)
call: 1
1
The copy of A is no longer accessible so it can be deallocated
call: 2
2
The copy of A is no longer accessible so it can be deallocated
call: 3
3
The copy of A is no longer accessible so it can be deallocated
call: 4
4
The copy of A is no longer accessible so it can be deallocated
call: 5
5
The copy of A is no longer accessible so it can be deallocated


2017-03-03 12:47 GMT+01:00 Joh-Tob Schäg :

> Is the garbage collection in picolisp immediate if the resource can be
> released?
>
> No, picolisp uses a mark and sweep halt the world garage collector. During
> sweep phase the complete allocated RAM is checked. If that would happen
> after each release of a resource picolisp would be very slow.
> Furthermore in Picolisp it is not possible to decide whether a resource
> can be released or not with out doing mark and sweep. This is because of
> cyclic list and the fact that you could always have a symbol pointing to
> that cell.
>
>
>
> 2017-03-03 12:04 GMT+01:00 Lindsay John Lawrence <
> lawrence.lindsayj...@gmail.com>:
>
>>
>> Is the garbage collection in picolisp immediate if the resource can be
>> released?
>>
>> The initial iterative replacement solution I came up with (below) quickly
>> runs out of resources as it has to build the entire list before starting to
>> draw.
>>
>> I haven't figured out how to do it yet, but I think, in this case, a
>> 'recursive' solution that renders as points are created would use a lot
>> less resources, assuming that processed replacement rules are garbage
>> collected as the stack unwinds and elements are traversed over.
>>
>> It would be a nice accomplishment to be able to render the more complex
>> fractal plants expressed here:  https://en.wikipedia.org/wiki/L-system
>>
>> /Lindsay
>>
>>
>> # https://en.wikipedia.org/wiki/Gosper_curve
>> # Angle 60 degrees = PI/3
>> # Axiom A
>> # Replacement Rules
>> #   A :--> A - B - - B + A + + A A + B -
>> #   B :--> + A - B B - - B - A + + A + B
>>
>> # C (initially = A) grows...very quickly.
>> #: n=0 (length C) -> 15
>> #: n=1 (length (setq C (F C))) -> 113
>> #: n=2 -> 799, n=3 -> 5601, n=4 -> 39215, n=5 -> 274513, n=6 -> 1921599,
>> n=7 .
>>
>> # For n=6...
>> : (bench (nil (Draw-Gosper-Curve)))
>> -> 1.370 sec
>>
>> Which works out to:
>>
>> XY Cnt: 823543 coordinates to plot
>> Min-XY: -66,432.00 -42,345.11
>> Max-XY: 2,048.00 23,611.35"
>>
>> ...about 900K of serialized canvas instructions.
>>
>>
>> Full-code at: https://github.com/thinknlive/picolisp-gosper
>>
>> (de Gosper-Curve (Length Angle N)
>>(let
>>   (A (chop "A-B--B+A++AA+B-")
>>  B (chop "+A-BB--B-A++A+B")
>>

Re: L-system rules with PicoLisp

2017-03-03 Thread Joh-Tob Schäg
Is the garbage collection in picolisp immediate if the resource can be
released?

No, picolisp uses a mark and sweep halt the world garage collector. During
sweep phase the complete allocated RAM is checked. If that would happen
after each release of a resource picolisp would be very slow.
Furthermore in Picolisp it is not possible to decide whether a resource can
be released or not with out doing mark and sweep. This is because of cyclic
list and the fact that you could always have a symbol pointing to that cell.



2017-03-03 12:04 GMT+01:00 Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com>:

>
> Is the garbage collection in picolisp immediate if the resource can be
> released?
>
> The initial iterative replacement solution I came up with (below) quickly
> runs out of resources as it has to build the entire list before starting to
> draw.
>
> I haven't figured out how to do it yet, but I think, in this case, a
> 'recursive' solution that renders as points are created would use a lot
> less resources, assuming that processed replacement rules are garbage
> collected as the stack unwinds and elements are traversed over.
>
> It would be a nice accomplishment to be able to render the more complex
> fractal plants expressed here:  https://en.wikipedia.org/wiki/L-system
>
> /Lindsay
>
>
> # https://en.wikipedia.org/wiki/Gosper_curve
> # Angle 60 degrees = PI/3
> # Axiom A
> # Replacement Rules
> #   A :--> A - B - - B + A + + A A + B -
> #   B :--> + A - B B - - B - A + + A + B
>
> # C (initially = A) grows...very quickly.
> #: n=0 (length C) -> 15
> #: n=1 (length (setq C (F C))) -> 113
> #: n=2 -> 799, n=3 -> 5601, n=4 -> 39215, n=5 -> 274513, n=6 -> 1921599,
> n=7 .
>
> # For n=6...
> : (bench (nil (Draw-Gosper-Curve)))
> -> 1.370 sec
>
> Which works out to:
>
> XY Cnt: 823543 coordinates to plot
> Min-XY: -66,432.00 -42,345.11
> Max-XY: 2,048.00 23,611.35"
>
> ...about 900K of serialized canvas instructions.
>
>
> Full-code at: https://github.com/thinknlive/picolisp-gosper
>
> (de Gosper-Curve (Length Angle N)
>(let
>   (A (chop "A-B--B+A++AA+B-")
>  B (chop "+A-BB--B-A++A+B")
>  C A
>  F '((L) (fish atom
>   (mapcar '((X)
> (cond
>   ((= X "A") A)
>   ((= X "B") B)
>   (T X))) L))) )
>
>
>   # Generate points
>   (do N (setq C (F C)))
>
>   # Plot points
>   (map '((R)
>  (case (car R)
> (("A" "B") (Plot-Line Length Angle))
> ("+" (setq Angle (+ Angle PI/3)))
> ("-" (setq Angle (- Angle PI/3)))
> (T (msg (text "?Gosper-Curve: No-match: @1" @))) )) C )
>
>) )
>
>
>


Re: native calling

2017-03-02 Thread Joh-Tob Schäg
I am not sure this sensible or even doable, but a binding to the torch
library (http://torch.ch) would be cool. Since Picolisp could use high
speed high dimensional math and machine learning.
It is written in C++ and already has a LUA interface. It needs a newer (< 4
years, i guess) NVIDIA graphics card to run.
GNUplot could be usefull too.

2017-03-02 18:06 GMT+01:00 Mike Pechkin :

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


Re: Scaled division and sqrt

2017-02-27 Thread Joh-Tob Schäg
Now there are before there were not.
Am 27.02.2017 10:07 schrieb "Lindsay John Lawrence" <
lawrence.lindsayj...@gmail.com>:

> Hi,
>
> Are there scaled (fixed point) versions of division and sqrt in picolisp?
> I may have missed them..
>
> In any event I wrote a couple of functions to provide that functionality
> that may be useful to others as well. Performance is reasonable.
>
> It is quite nice to be able to be able to do arbitrary precision
> arithmetic in this way =)
>
> /Lindsay
>
> Code:
>
> # Scaled fixed point long division. (if necessary, round last digit)
> # TODO: Brute force implementation...
> #   There is probably a better way to do it.
> : (pp '/*)
> (de /* (N D S)
>(let (Q NIL  R NIL  Acc NIL  Cnt 0)
>   (default S *Scl)
>   (setq S (+ 2 S))
>   (do S
>  (T (>= Cnt S))
>  (setq
> Q (/ N D)
> R (% N D)
> Acc (cons Q Acc)
> Cnt (inc Cnt)
> N R )
>  (when (and (gt0 N) (<= N D))
> (while (and (gt0 N) (<= N D))
>(setq
>   N (* N 10)
>   Acc (cons 0 Acc)
>   Cnt (inc Cnt) ) )
> (pop 'Acc)
> (dec 'Cnt) ) )
>   (setq R (pop 'Acc))
>   (if (<= 5 R)
>  (setq Acc (cons (+ 1 (pop 'Acc)) Acc)) )
>   (setq Acc (flip Acc))
>   (format
>  (pack (cons (car Acc) "." (cdr Acc)))
>  (- S 2) ) ) )
> -> /*
>
> # Scaled fixed point sqrt(); no rounding
> # TODO: Converges in 4-7 iterations in tests, 13 is probably overkill
> : (pp 'sqrt*)
> (de sqrt* (N S)
>(let (P (/ N 2)  M 13)
>   (default S *Scl)
>   (setq N (* N (** 10 S)))
>   (while (ge0 (dec 'M))
>  (setq P (/ (+ P (/ N P)) 2)) )
>   P ) )
> -> sqrt*
>
>
>
> Some Tests:
>
> # Arbitrary Fixed Precision Square Root
> # Compare: bc.
> # also: https://apod.nasa.gov/htmltest/gifcity/sqrt2.1mil
> : (scl 64) (format (sqrt* 2.0) *Scl)
> -> "1.4142135623730950488016887242096980785696718753769480731766797379"
> : (scl 64) (format (sqrt* 0.5) *Scl)
> -> "0.7071067811865475244008443621048490392848359376884740365883398689"
> : (scl 64) (format (sqrt* 9967.0) *Scl)
> -> "99.8348636499294268455686673311236280296661789737252407300182230035"
> : (scl 10) (bench (nil (sqrt* 2.0)))
> 2.027 sec
>
> # Arbitrary Fixed Precision Long Division
> # Compare: bc e.g. "scale=64 1/9967"
> : (scl 64) (/* 1.0 9967.0)
> -> 1003310926055984749673923949031804956355974716564663389184308
> : (scl 64) (format (/* 1.0 9967.0) *Scl)
> -> "0.0001003310926055984749673923949031804956355974716564663389184308"
> : (scl 64) (format (format (/* 1.0 9967.0) *Scl) *Scl)
> -> 1003310926055984749673923949031804956355974716564663389184308
> : (scl 32) (/* 22.0 7.0)
> -> 314285714285714285714285714285714
> : (scl 0) (/* 22.0 7.0)
> -> 3
> : (scl 1) (/* 22.0 7.0)
> -> 31
> : (scl 8) (/* 22.0 7.0)
> -> 314285714
> : (scl 32) (/* 1.0 3.0)
> -> 
> : (scl 32) (/* 10.0 3.0)
> -> 3
> : (scl 32) (format (/* 1.0 3.0) *Scl)
> -> "0."
> : (scl 32) (format (/* 10.0 3.0) *Scl)
> -> "3."
> : (scl 32) (format (/* 0.22 0.7) *Scl)
> -> "0.31428571428571428571428571428571"
> : (scl 32) (format (/* 9968.0 32.0) *Scl)
> -> "311.5000"
> : (scl 1) (bench (nil (format (/* 1.0 9967.0) *Scl)))
> 7.685 sec
>


Re: BBWT

2017-02-26 Thread Joh-Tob Schäg
> Yes, gotta love lisp for the ability to do this (and other things). :)
>
But more often than not this features are not required in practice. Sadly
it is just cool and not significant.  :(


2017-02-26 17:06 GMT+01:00 Rick Hanson :

> A bit off-topic, but I like how this transformation
>
> On 25 Feb 2017, 09:40:43 +0100, Alexander Burger wrote:
> >(if (not (cdr W))
> >   (Put C (car W))
> >   (Put (car (cdr W)) (car W)) )
> > ->
> >(Put
> >   (ifn (cdr W) C (cadr W))
> >   (car W) )
>
> reminds me of factoring in high school algebra.
>
>xy + xz
> ->
>x(y + z)
>
> Yes, gotta love lisp for the ability to do this (and other things). :)
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: exercism.io

2017-02-25 Thread Joh-Tob Schäg
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/
> 9de46f9e807786fdbf4a86604aca20dd25f0c19e/exercism-io/?at=default
>
> Great! Thanks for sharing!
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: later and output

2017-02-25 Thread Joh-Tob Schäg
I am glad i could be of some help.
To be honest Linsday you do a good job for the community and a better job
than i do to be honest.
Maybe somebody can spend some time and spin this in to a draft for the
future less terse picolisp documentation.
I am currently busy with learning for pre-exames.

2017-02-25 21:58 GMT+01:00 Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com>:

>
> My earlier function 'primeFactorz' had a bug! returning the wrong results
> for actual prime numbers :(
>
> : (primeFactorz 17)
> -> (3 5)   # WRONG!
>
> I have to be more careful with integer arithmetic. The corrected function
> is:
>
> (de primeFactorz (N)
>(use Result
>   (recur (N)
>  (let (Root (inc (sqrt N))  X 2)
> (when (gt0 (% N X))
>(setq X 3)
>(while
>   (and
>  (gt0 (% N X))
>  (<= (inc 'X 2) Root) ) ) )
> (setq X (if (<= X Root) X N)
>   Result (cons X Result))
> (unless (= X N) (recurse (/ N X))) ) )
>   Result ) )
>
> : (primeFactorz 17)
> -> (17)
>
> /Lindsay
>
> Addum: I have to say I am  impressed with how straightforward it is to
> parallelize code in picolisp!
>
> I found my bug while playing with Joh-Tob's Check function and the
> discussion on this thread really helped me to understand how to use 'later'.
>
> : (bench (CheckPrimeFactors 1 CheckP1))
> 1.287 sec
> -> NIL
> : (bench (CheckPrimeFactors 1 CheckP2))
> 1.310 sec
> -> NIL
> : (bench (CheckPrimeFactors 1 CheckP1=P2))
> 1.340 sec
> -> NIL
> : (bench (CheckPrimeFactors 32 CheckOdd))
> (2 3 T 5 T 7 8 T)
> (T 11 12 13 T T T 17)
> (18 19 20 T T 23 T T)
> (T 27 28 29 30 31 32 T)
> 0.006 sec
> -> (T 27 28 29 30 31 32 T)
> : (bench (CheckPrimeFactors 32 CheckEven))
> (T T 4 T 6 T T 9)
> (10 T T T 14 15 16 T)
> (T T T 21 22 T 24 25)
> (26 T T T T T T 33)
> 0.006 sec
> -> (26 T T T T T T 33)
>
>
> Definitions: Assuming 'prime-factors' 'primeFactorz':
>
> : CheckP1
> -> ((N) (ifn (= N (apply '* (prime-factors N))) N T))
> : CheckP2
> -> ((N) (ifn (= N (apply '* (primeFactorz N))) N T))
> : CheckP1=P2
> -> ((N) (ifn (= (sort (prime-factors N)) (sort (primeFactorz N))) N T))
> : CheckOdd
> -> ((N) (if (bit? 1 (length (prime-factors N))) N T))
> : CheckEven
> -> ((N) (ifn (bit? 1 (length (prime-factors N))) N T))
>
>
> (de CheckPrimeFactors (Limit Checkit)
>(let Lst (need 8)
>   (for (N 2 (>= Limit N))
>  (map
> '((L)
>(set L NIL)
>(later L (Checkit N))
>(inc 'N) )
> Lst )
>  (wait NIL (full Lst))
>  (ifn (fully flg? Lst) (println Lst)) ) ) )
>
>
>
>


Workers for multicore processing (Question and RFC)

2017-02-25 Thread Joh-Tob Schäg
There are limits on how many processes can exist at the same time and
having more 'later processes than cores is wasteful and Linux only allows
for 1024 file descriptors per process.
? (for N 1 (later (cons) (* N N)))
!? (pipe (pr (prog (* N N
Pipe error: Too many open files
? N
-> 339

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?

Ideas:
Task would be copy of environment + function + values to apply the function
too. There would be some optimization potential in case the function and
environment is static, or reseted each time to a constant value but it
should be possible to fetch a copy of the current environment to.
Such a pool of workers is best represented with a symbol on which certain
functions are applied which are may stored inside the symbol. This could be
archived with some overhead with the picolisp object system when compared
to a manual implementation since the worker queue should be accessible fast
and putting it in val of the symbol would be the easiest way to achieve
that.

Further thoughts:
It might be wise to give the possibility to register a callback on the
return value.
This would allow to make things more efficient.
For example:

(prog1  # Parallel background calculation of square numbers
   (mapcan '((N) (later (cons) )) (range 1 100))
   (wait NIL (full @)) )

could be:

(pool "squares.db")
(with-workerpool W '((workers . 2) (callback . '((R) (put *DB (car R)
(cadr R ))
   (mapcar '((N) (add_task 'W '((N) (cons N (* N N))) N ) (range 1 100)) )]

#Normally the with-workerpool should not finish until the queue is empty

How ever it should also be possible to do something like that:


(with-workerpool W '((callback . NIL) (return . nil) (output .
"+file") (wait . NIL))
   (for X 1000
  (add_task  'W '((N) (ifn (= N (apply '* (prime-factors N)))
 (print N))) X ] # workers run in background main thread can continue

This usage may seem overly complex at first and the proposed interface
is horrible. However i think that such an library could be an valuable
addition to picolisp.

Lets discuss the idea itself, your proposals for the interface and the
implementation.


later and output

2017-02-25 Thread Joh-Tob Schäg
I tried to parallelize the following code:
'(let N 2
   (while (> 1000 N )
  (check N)
  (inc 'N)))
where (check N) is defined as '(ifn (= N (apply '* (prime-factors N)))
(print N))

'later has the following form  '(later
place_where_to_save_the_return_result . program to execute)
However i am not interested in storing the result and (later 'NIL prog)
does not work for obvious reasons.
Furthermore (later (new) (print 8)) does not work either.
Using files as in (out "+file" (later (new) (print 8))) does not work
either.

Is there a way to run '(check N) on multiple cores at the same time and get
the results 'print-ed in to the standard output of the instance where the
process was created or in a file which was opened by it (without reopening
the file before each in print in the child process)?


Re: P35 Prime Factors

2017-02-25 Thread Joh-Tob Schäg
I verified that it works for all numbers lower than 1000.


My code:
(let N 2
   (while (> 1000 N )
  (ifn (= N (apply '* (prime-factors N)))
 (print N))
  (inc 'N)))

2017-02-25 9:58 GMT+01:00 Alexander Burger :

> Hi Lindsay, Joh-Tob,
>
> On Sat, Feb 25, 2017 at 09:36:04AM +0100, Joh-Tob Schäg wrote:
> > The purpose of the list is to increase the speed of the algorithm by
> > skipping some numbers. This is possible because of the math of
> Differences
>
> Correct.
>
> > between consecutive primes but i am currently verifying the algorithm if
> it
> > works, since the list might be wrong.
>
> I took it from Donald E. Knuth's "Art of Computer Programming", Volume 2
> (Seminumerical Algorithms). In "Factoring into Primes" on page 365 he
> writes:
>
>The sequence ... of trial divisors .. can be taken to be simply 2, 3,
> 5, 7,
>11, 13, 17, 19, 23, 25, 29, 31, 35, .. where we alternately add 2 and 4
> after
>the first three terms.
>...
>A further savings of 20 percent ... removing the numbers 30m +/- 5 ..
>
> I believe the term (let (D 2 L (1 2 2 . (4 2 4 2 4 6 2 6 .)) generates that
> sequence.
>
> ♪♫ Alex
>
>
> >
> > 2017-02-25 7:44 GMT+01:00 Lindsay John Lawrence <
> > lawrence.lindsayj...@gmail.com>:
> >
> > > Does anyone know the algorithm that is being expressed here?
> > >
> > > I am trying to understand the code... http://picolisp.com/wiki/?99p35
> > >
> > > de prime-factors (N)
> > >(make
> > >   (let (D 2  L (1 2 2 . (4 2 4 2 4 6 2 6 .))  M (sqrt N))
> > >  (while (>= M D)
> > > (if (=0 (% N D))
> > >(setq M (sqrt (setq N (/ N (link D)
> > >(inc 'D (pop 'L)) ) )
> > >  (link N) ) ) )
> > >
> > > and  having difficulties understanding the purpose of the circular
> list.
> > >
> > > /Lindsay
> > >
> > >
> > >
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: P35 Prime Factors

2017-02-25 Thread Joh-Tob Schäg
The purpose of the list is to increase the speed of the algorithm by
skipping some numbers. This is possible because of the math of Differences
between consecutive primes but i am currently verifying the algorithm if it
works, since the list might be wrong.

2017-02-25 7:44 GMT+01:00 Lindsay John Lawrence <
lawrence.lindsayj...@gmail.com>:

> Does anyone know the algorithm that is being expressed here?
>
> I am trying to understand the code... http://picolisp.com/wiki/?99p35
>
> de prime-factors (N)
>(make
>   (let (D 2  L (1 2 2 . (4 2 4 2 4 6 2 6 .))  M (sqrt N))
>  (while (>= M D)
> (if (=0 (% N D))
>(setq M (sqrt (setq N (/ N (link D)
>(inc 'D (pop 'L)) ) )
>  (link N) ) ) )
>
> and  having difficulties understanding the purpose of the circular list.
>
> /Lindsay
>
>
>


Re: Future of PicoLisp?

2017-02-23 Thread Joh-Tob Schäg
T
Am 23.02.2017 22:52 schrieb "Lindsay John Lawrence" <
lawrence.lindsayj...@gmail.com>:

> I am relatively new to picolisp, with limited knowledge of its development
> history... but I'll politely disagree with some suggestions here regarding
> making the core more 'popular' and open to 'collaborative' development.
>
> Bandwagon collaboration may in all likelihood dull the scapel and result
> in  something far from pico.
>
> What would be great is to see more of an ecosystem built around the
> picolisp core. Build something awesome with picolisp, document it and share
> it with the world.
>
> I am.
>
> /Lindsay
>
>
> ~~~
> Notes: I made as a read through the email thread...penny thoughts, ...a
> bit opinionated and repetitive and therefore subject to change.
>
> Make what more open? From what I can see, the source going back to at
> least 2002 is freely available for anyone to copy and do with as they like.
> There is no lack of transparency or reluctance to share knowledge.
>
> Compared to almost every other development tool I have worked with,
> picolisp is a breath of fresh air.  The more I breathe in, study the
> succinct examples on the wiki, rosetta code, 99probs, tankfeeder, etc the
> more I appreciate that. Many of those examples, despite their brevity, are
> far from trivial.
>
> It is a scapel. A lot a fun to play with. But it is neither a toy lisp, an
> overspecialized lisp, or -- what it feels like to me now -- the 'all things
> to everyone' bloated cruft that is common lisp.
>
> In the short time I have worked with it, I have yet to write a 'hack' to
> get around some limitation or shortcoming of the picolisp environment. I
> have written a surprising amount of useful code and connected it to other
> tools to do useful things in concert.
>
> It is lisp. Therefore, initially, "Lots of Irritating, Silly, Parentheses"
>  that with practice, quickly become an appreciated, simple consistent
> syntax. Syntax sugar is overrated. Look at the mess of most other
> programming languages as they try to add 'advanced' features.
>
> Even as a newbie, I can see how easily the current picolisp core can
> integrate with, or integrate, other tools. How easy it is to leverage
>  functionality like distributed programming, async io, templated
> programming, underlying os pipes, etc that most other runtimes either don't
> provide at all, end up diluting or obfuscating.
>
> In what other language, even other lisps, is it as easy to say... (= code
> data) ?
>
> A high performance, general purpose, interpreted runtime engine, in a few
> hundred kilobytes?. I wish I had 'discovered' it a decade ago.
>
>
>


Re: Recursion-Loop Macro?

2017-02-12 Thread Joh-Tob Schäg
I will think about doing a f-expr for that.
Am 12.02.2017 11:50 schrieb "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: altering LOCAL list elements

2017-02-11 Thread Joh-Tob Schäg
You can also explicitly change the car or cdr of a list cell.
If you do a little diging in the docs you might find the functions.
Am 11.02.2017 12:45 schrieb "dean" :

> >Does that explanation make sense?
>
> Yes it does
>
> >You can either destructivly change the car of a cell in the list or write
> your own pop which keeps the same >cell at the head of the list (by
> reassigning car parts appropiatly).
>
> Thank you...this is the only way I know about at the moment that lets me
> destroy the car and replace it with something new...as you say though it
> creates a whole new AND GLOBAL list because of setq.
>   (setq L (insert '1 (remove '1 L) 2))
>
> Irrespective...thank you for your further advice.
>
>
>
>
> On 11 February 2017 at 10:51, Joh-Tob Schäg  wrote:
>
> > List operations in Picolisp tend to be non destructive and constructive
> > (they allocate new cells to get what you want) leaving old ones to be
> > collected by gc.
> > Am 11.02.2017 11:48 schrieb "Joh-Tob Schäg" :
> >
> >> I understand your problem now.
> >>
> >> You have think about cells in this case.
> >>
> >> When you inc a 'symbol the value part of the symbol-cell is changed.
> >> [prop|val] represents a symbol in this case.
> >> (inc '[NIL|5]) is [NIL|6]
> >> The Symbol was changed destructivly. All earlier refernces to this cell
> >> now evaluate to 6. That is because a cell evaluates to its value.
> >>
> >> If you push 88 on to a list. You do not get back the original list
> >> changed but a new list which has a a cell with 88 in the beginning and
> >> pointer to the old list in the cdr.
> >> [1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [Nil|Nil]
> >> You save this list in to a symbol which now has the pointer to the first
> >> element in it value slot.
> >>
> >> If you push 88 on to this list it looks like this:
> >> [1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [88|pointer to
> >> first cell]
> >> However your symbol L does not notice this change because it is still
> >> pointing to the first cell.
> >> To make it point to the head of the new list you need to setq the value
> >> of L to the new head of the list.
> >>
> >> Does that explanation make sense?
> >>
> >> You can either destructivly change the car of a cell in the list or
> write
> >> your own pop which keeps the same cell at the head of the list (by
> >> reassigning car parts appropiatly).
> >> Am 11.02.2017 11:29 schrieb "dean" :
> >>
> >>> Hi Joh-tob & Joe
> >>> With setq L.(0 0 0) gets changed to (2 0 0) i.e. the replace is
> done
> >>> by index not matching value
> >>> With let L...(0 0 0) stays at (0 0 0)
> >>> I'd wanted the former in conjunction with let.
> >>> Thank you for the suggestion re need...and the explanation re let.
> >>> I can do this with setq but was just wondering if there was a way
> around
> >>> "setting" let'd values more than once...like you can with let'd
> >>> atoms...using inc and dec.
> >>> I don't think you can but didn't think you could with atoms until inc
> >>> and dec came back as an answer on this forum...hence this question :)

Re: altering LOCAL list elements

2017-02-11 Thread Joh-Tob Schäg
List operations in Picolisp tend to be non destructive and constructive
(they allocate new cells to get what you want) leaving old ones to be
collected by gc.
Am 11.02.2017 11:48 schrieb "Joh-Tob Schäg" :

> I understand your problem now.
>
> You have think about cells in this case.
>
> When you inc a 'symbol the value part of the symbol-cell is changed.
> [prop|val] represents a symbol in this case.
> (inc '[NIL|5]) is [NIL|6]
> The Symbol was changed destructivly. All earlier refernces to this cell
> now evaluate to 6. That is because a cell evaluates to its value.
>
> If you push 88 on to a list. You do not get back the original list changed
> but a new list which has a a cell with 88 in the beginning and pointer to
> the old list in the cdr.
> [1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [Nil|Nil]
> You save this list in to a symbol which now has the pointer to the first
> element in it value slot.
>
> If you push 88 on to this list it looks like this:
> [1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [88|pointer to
> first cell]
> However your symbol L does not notice this change because it is still
> pointing to the first cell.
> To make it point to the head of the new list you need to setq the value of
> L to the new head of the list.
>
> Does that explanation make sense?
>
> You can either destructivly change the car of a cell in the list or write
> your own pop which keeps the same cell at the head of the list (by
> reassigning car parts appropiatly).
> Am 11.02.2017 11:29 schrieb "dean" :
>
>> Hi Joh-tob & Joe
>> With setq L.(0 0 0) gets changed to (2 0 0) i.e. the replace is done
>> by index not matching value
>> With let L...(0 0 0) stays at (0 0 0)
>> I'd wanted the former in conjunction with let.
>> Thank you for the suggestion re need...and the explanation re let.
>> I can do this with setq but was just wondering if there was a way around
>> "setting" let'd values more than once...like you can with let'd
>> atoms...using inc and dec.
>> I don't think you can but didn't think you could with atoms until inc and
>> dec came back as an answer on this forum...hence this question :).
>> Thank you for your advice and best regards
>> Dean
>>
>>
>>
>> On 11 February 2017 at 02:07, Joe Bogner  wrote:
>>
>>> dean, is this what you are describing?
>>>
>>> (let L (list 1 2 3)
>>> (setq L (append L (4)))
>>> (printsp L) )
>>>
>>>
>>> (1 2 3 4)
>>>
>>>
>>> The key to this is understanding how let works. It restores the prior
>>> value after execution. See http://software-lab.de/doc/refL.html#let
>>>
>>> Defines local variables. The value of the symbol sym - or the values of
>>> the symbols sym in the list of the second form - ***are saved** and the
>>> symbols are bound to the evaluated any arguments. The 64-bit version also
>>> accepts lst arguments in the second form; they may consist only of symbols
>>> and sublists, and match the any argument (destructuring bind). prg is
>>> executed, then the symbols ***are restored to their original values***.
>>>
>>>
>>>
>>> On Fri, Feb 10, 2017 at 3:22 PM, dean  wrote:
>>>
>>>> Hi
>>>> I've seen that I can alter local/let'd atoms? via inc/dec i.e. (inc
>>>> 'Some_atom)
>>>> which gets me a long way...
>>>> ...but what about list elements?
>>>>
>>>>
>>>> (setq L (0 0 0))
>>>> (de doit ()
>>>>#(let L (0 0 0)
>>>>   (setq L (insert '1 (remove '1 L) 2))
>>>>   (prinl "L is " L)
>>>>#)
>>>> )
>>>>
>>>> When I "setq" L this works but can I do it (somehow) when L is created
>>>> with "let"?
>>>>
>>>
>>>
>>


Re: altering LOCAL list elements

2017-02-11 Thread Joh-Tob Schäg
I understand your problem now.

You have think about cells in this case.

When you inc a 'symbol the value part of the symbol-cell is changed.
[prop|val] represents a symbol in this case.
(inc '[NIL|5]) is [NIL|6]
The Symbol was changed destructivly. All earlier refernces to this cell now
evaluate to 6. That is because a cell evaluates to its value.

If you push 88 on to a list. You do not get back the original list changed
but a new list which has a a cell with 88 in the beginning and pointer to
the old list in the cdr.
[1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [Nil|Nil]
You save this list in to a symbol which now has the pointer to the first
element in it value slot.

If you push 88 on to this list it looks like this:
[1|pointer to 2nd cell] [2| pointer to 2nd cell ] [3|Nil] [88|pointer to
first cell]
However your symbol L does not notice this change because it is still
pointing to the first cell.
To make it point to the head of the new list you need to setq the value of
L to the new head of the list.

Does that explanation make sense?

You can either destructivly change the car of a cell in the list or write
your own pop which keeps the same cell at the head of the list (by
reassigning car parts appropiatly).
Am 11.02.2017 11:29 schrieb "dean" :

> Hi Joh-tob & Joe
> With setq L.(0 0 0) gets changed to (2 0 0) i.e. the replace is done
> by index not matching value
> With let L...(0 0 0) stays at (0 0 0)
> I'd wanted the former in conjunction with let.
> Thank you for the suggestion re need...and the explanation re let.
> I can do this with setq but was just wondering if there was a way around
> "setting" let'd values more than once...like you can with let'd
> atoms...using inc and dec.
> I don't think you can but didn't think you could with atoms until inc and
> dec came back as an answer on this forum...hence this question :).
> Thank you for your advice and best regards
> Dean
>
>
>
> On 11 February 2017 at 02:07, Joe Bogner  wrote:
>
>> dean, is this what you are describing?
>>
>> (let L (list 1 2 3)
>> (setq L (append L (4)))
>> (printsp L) )
>>
>>
>> (1 2 3 4)
>>
>>
>> The key to this is understanding how let works. It restores the prior
>> value after execution. See http://software-lab.de/doc/refL.html#let
>>
>> Defines local variables. The value of the symbol sym - or the values of
>> the symbols sym in the list of the second form - ***are saved** and the
>> symbols are bound to the evaluated any arguments. The 64-bit version also
>> accepts lst arguments in the second form; they may consist only of symbols
>> and sublists, and match the any argument (destructuring bind). prg is
>> executed, then the symbols ***are restored to their original values***.
>>
>>
>>
>> On Fri, Feb 10, 2017 at 3:22 PM, dean  wrote:
>>
>>> Hi
>>> I've seen that I can alter local/let'd atoms? via inc/dec i.e. (inc
>>> 'Some_atom)
>>> which gets me a long way...
>>> ...but what about list elements?
>>>
>>>
>>> (setq L (0 0 0))
>>> (de doit ()
>>>#(let L (0 0 0)
>>>   (setq L (insert '1 (remove '1 L) 2))
>>>   (prinl "L is " L)
>>>#)
>>> )
>>>
>>> When I "setq" L this works but can I do it (somehow) when L is created
>>> with "let"?
>>>
>>
>>
>


Re: altering LOCAL list elements

2017-02-10 Thread Joh-Tob Schäg
Not related to your problem.
You might wanna take a look at the 'need function.

Furthermore i fail to understand your problem.

If picolisp behaves unexpected could you please describe what behavior you
expect wjat you get and provide a test case which runs the functions it
defines?

Alternativly you could define the behavior of the function you want.
Am 10.02.2017 21:28 schrieb "dean" :

> Hi
> I've seen that I can alter local/let'd atoms? via inc/dec i.e. (inc
> 'Some_atom)
> which gets me a long way...
> ...but what about list elements?
>
>
> (setq L (0 0 0))
> (de doit ()
>#(let L (0 0 0)
>   (setq L (insert '1 (remove '1 L) 2))
>   (prinl "L is " L)
>#)
> )
>
> When I "setq" L this works but can I do it (somehow) when L is created
> with "let"?
>


Re: box? on address

2017-02-10 Thread Joh-Tob Schäg
Hi Regenaxer,

I realize that there is no probkem with the evaluation of 'circ?.
Could 'later be (miss)used to cause some havick when it writes back data?
What about timer triggered code?
Am 10.02.2017 22:40 schrieb "Alexander Burger" :

> Hi Joh-Tob,
>
> > Doesn't 'circ? also set the gc bit?
>
> Well observed!! That't true, but it is the "other" mark bit. While gc uses
> the
> bit in the CDR
>
>or (X CDR) 1  # Set mark bit
>
> uses 'circ' the one in the CAR of the cell
>
>or (A) 1  # Mark
>
>
> > Could it be possible that 'circ? evaluates a term which accesses
> something
> > with a changed pointer?
>
> The bits are only set after all evaluation is done, and the raw circ
> detection
> processing runs. Then the bits are cleared (as after garbage collection
> too).
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Segfault with huge list...?

2017-02-10 Thread Joh-Tob Schäg
Linsday when you want to prevent values from neing printed take a look at
the 'nil function.
Am 10.02.2017 19:44 schrieb "Lindsay John Lawrence" <
lawrence.lindsayj...@gmail.com>:

> If it even matters, the overhead of recurse is slowest here.
> So impressive that picolisp can iterate/recurse over a 10M element list in
> these times.
> (VirtualBox VM, 4GB, 1Core, with 64bit Debian).
>
> ... and 'make' is a lot more useful that I first realized.
>
> /Lindsay
>
> # Iterative
> (de sumi (L)
>(let (Sum (car L))
>   (while (setq L (cdr L))
>  (setq Sum (+ Sum (car L))) ) ) )
>
> # Recurse
> (de sumr (N)
>(cond
>   ((not N) 0)
>   (T (+ (car N) (sumr (cdr N ) )
>
> # This may take a moment...
> : (setq bigly (range 1 1000) D NIL) -> NIL
> : (bench (apply '+ bigly))  0.097 sec  -> 500500
> : (bench (sum '+ bigly))0.139 sec  -> 500500
> : (bench (sumi bigly))  0.275 sec  -> 500500
> : (bench (sumr bigly))  0.639 sec  -> 500500
>
> : (setq bigly (need 1000 1) D NIL) -> NIL
> : (bench (apply '+ bigly))  0.099 sec  -> 1000
> : (bench (sum '+ bigly))0.139 sec  -> 1000
> : (bench (sumi bigly))  0.272 sec  -> 1000
> : (bench (sumr bigly))  0.643 sec  -> 1000
>
> : (bench (setq bigly (make (for X 1000 (link (+ (- 1000 X) 1)
> (length bigly))0.437 sec -> 1000
> : (bench (sumr bigly))  0.630 sec  -> 500500
> : (bench (sumi bigly))  0.279 sec  -> 500500
>
>
> Am 10.02.2017 15:28 schrieb "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-10 Thread Joh-Tob Schäg
Doesn't 'circ? also set the gc bit?
Could it be possible that 'circ? evaluates a term which accesses something
with a changed pointer?
Am 10.02.2017 18:12 schrieb "Alexander Burger" :

> H Danilo,
>
> > Please take a quick look at [path "@doc64/structures"] and
> > source code of `car' and `val'.
> >
> > I am not sure what will happen if GC bit is 1.
>
> This is a good question. The interpreter would crash with a bus error.
> Fortunately this won't happen because this bit is guaranteed to be set only
> while GC runs.
>
> ♪♫ Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Segfault with huge list...?

2017-02-10 Thread Joh-Tob Schäg
(de natsum (N)
  (if (=0 N)
0
( +  N
  ( natsum ( dec N)

Like that?
Am 10.02.2017 15:28 schrieb "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: binding free symbols in a lambda definition

2017-02-10 Thread Joh-Tob Schäg
Why not
"(de myf FList
 (apply (car Flist) (cdr Flist))"?
Am 08.02.2017 05:04 schrieb "pd" :

> Hello,
>
> I wonder if there is any way to bind a free symbol in a lambda in order to
> pass the lambda to a defined function (for example)
>
> What I want to do is something like this:
>
> (de myf (f l) (f l))
>
> (let l 99 (myf '((x) (+ (car x) l)) (1 2)))
>
> I want it to return 100 but it fails with an error (1 2) number expected
>
> this is because free symbol l in lambda ((x) (+ (car x) l)) is not bind by
> let as pretended because of quoting of lambda
>
> In other words, I think the problem is quoting avoids let binding as in:
>
> (setq f (let n 10 '((x) (+ x n -> ((x) (+ x n))
>
> but I want it to return -> ((x) (+ x 10))
>
> or using the typicall example:
>
> (de adder (n) '((x) (+ x n)))  ->  ((n) '((x) (+ x n)))
>
> so (adder 1) should return ((x) (+ x 1)) but it returns ((x) (+ x n))
>
> Is there any way to manage this?  Something similar to "expand" in newlisp
> will do the job:
>
> newlisp:
>(define (badadder n) (lambda (x) (+ x n)))
>(badadder 3) -> (lambda (x) (+ x n))
>(define (adder n) (expand (lambda (x) (+ x n)) 'n))
>(adder 3) -> (lambda (x) (+ x 3))
>
> The fist example in newlisp will be:
>
> (define (myf f l) (f l))
>
> (let ((l 99)) (myf (lambda (x) (+ (first x) l)) '(1 2)))
>
> which fails for same reason picolisp fails but in newlisp the solution is:
>
> (define (myf f l) (f l))
>
> (let ((l 99)) (myf (expand (lambda (x) (+ (first x) l)) 'l) '(1 2)))  ->
> 100
>
>
> thanks
>
>
>


Re: Segfault with huge list...?

2017-02-10 Thread Joh-Tob Schäg
That sounds very plausible.
Am 10.02.2017 14:35 schrieb "Joe Bogner" :

> It sounds like it's exceeding the stack size. Have you tried setting it to
> unlimited? ulimit -s unlimited
>
> http://www.mail-archive.com/picolisp@software-lab.de/msg01203.html
>
> On Fri, Feb 10, 2017 at 8:07 AM, Christopher Howard <
> christopher.how...@qlfiles.net> wrote:
>
>> Hi list. When I try to do
>>
>> (apply '+ (range 1 100)
>>
>> 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))
>>
>> .and again, a segfault.
>>
>> Am I doing something wrong?
>>
>> --
>> https://qlfiles.net
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: Segfault with huge list...?

2017-02-10 Thread Joh-Tob Schäg
Maybe you want to try (nil (range 1 100)) and see if the problem is
there.
Am 10.02.2017 14:24 schrieb "Joh-Tob Schäg" :

> I had a similar experience. It tends to happen if you allocate to much at
> once. Should be around 16 Megabyte in this case which normally is no
> problem.
>
> If you have such a long list and want to apply functions to it I would use
> generators instead.
> They are less ram intensive.
>
> You do things wrong.
> For example you still forget to close you parathesis. This will leave us
> in a unresolved tension all day. Obligatory XKCD: https://xkcd.com/859/
> Am 10.02.2017 14:15 schrieb "Christopher Howard" <
> christopher.how...@qlfiles.net>:
>
>> Hi list. When I try to do
>>
>> (apply '+ (range 1 100)
>>
>> 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))
>>
>> ..and again, a segfault.
>>
>> Am I doing something wrong?
>>
>> --
>> https://qlfiles.net
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>


Re: Segfault with huge list...?

2017-02-10 Thread Joh-Tob Schäg
I had a similar experience. It tends to happen if you allocate to much at
once. Should be around 16 Megabyte in this case which normally is no
problem.

If you have such a long list and want to apply functions to it I would use
generators instead.
They are less ram intensive.

You do things wrong.
For example you still forget to close you parathesis. This will leave us in
a unresolved tension all day. Obligatory XKCD: https://xkcd.com/859/
Am 10.02.2017 14:15 schrieb "Christopher Howard" <
christopher.how...@qlfiles.net>:

> Hi list. When I try to do
>
> (apply '+ (range 1 100)
>
> 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))
>
> ..and again, a segfault.
>
> Am I doing something wrong?
>
> --
> https://qlfiles.net
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: qurious quoting

2017-01-01 Thread Joh-Tob Schäg
Are there any questions remaining?
Am 01.01.2017 16:43 schrieb "Danilo Kordic" :

> : (setq E
> '(= (quote 'quote quote)
> (quote (quote . quote) quote)
> (quote . ((quote . quote) . (quote . NIL))) ) )
> : (eval E)
> -> T
> : (view (cadr E))
> +-- quote
> |
> +---+-- quote
> |   |
> |   quote
> |
> +-- quote
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Advice on learning the picolisp asm?

2016-12-31 Thread Joh-Tob Schäg
I think if Regenaxer adds a new function the function pointer and thereby
the binary(assembly code) becomes invalid.
Am 31.12.2016 13:17 schrieb "Alexander Burger" :

> On Sat, Dec 31, 2016 at 12:28:06AM -0500, Bruno Franco wrote:
> > I don't really know any asm, but since the asm code for the picolisp
> > functions is just a (vi 'function) away, I feel tempted to try.
> >
> > I've found some advice on learning asm in general, but is there
> > anything unique of the one used in the picolisp virtual machine
> > that I should know of?
>
> Probably not. All relevant details should be found in "doc64/asm".
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: qurious quoting

2016-12-31 Thread Joh-Tob Schäg
' is a read macro. (4 ' 4 7 8 6) is read is replaced a quoted version of
the next list/atom.

Not sure that helps try to understand the problem by drawing memory cells.
There is a structural difference which is handled in another ways by the
printer.
Am 31.12.2016 05:49 schrieb "Bruno Franco" :

> I was fooling around when I noticed this:
>
> : (quote quote quote quote quote quote quote)
> -> ''NIL
>
> : (quote quote quote quote quote quote 'quote)
> -> '('quote)
>
> : (quote quote quote quote 'quote quote 'quote)
> -> '''('quote quote 'quote)
>
> : (quote 'quote quote quote quote quote 'quote)
> -> ('quote quote quote quote quote 'quote)
>
> So, when none of the quotes are quoted, they are printed as apostrophes.
> And then, from the first quoted quote on, they're printed as the word
> "quote".
>
> Why does a quote need to be quoted to be written as "quote",
> And why do you only need to quote one quote in the beginning to get all
> the rest to be
> written as words?
>


Re: Advice on learning the picolisp asm?

2016-12-31 Thread Joh-Tob Schäg
As far as i know the picolisp assembler can change if now functions are
added to the machine in abway to invalidates all asm. But not sure. If you
want to learn some asm there are better places. Misp is famous for being
easy to work with.
Am 31.12.2016 06:33 schrieb "Bruno Franco" :

> I don't really know any asm, but since the asm code for the picolisp
> functions is just a (vi 'function) away, I feel tempted to try.
>
> I've found some advice on learning asm in general, but is there
> anything unique of the one used in the picolisp virtual machine
> that I should know of?
>


Re: (= code data)

2016-12-27 Thread Joh-Tob Schäg
Classic
Am 27.12.2016 19:08 schrieb "Lindsay John Lawrence" <
lawrence.lindsayj...@gmail.com>:

> I've been working my way through the Rosetta code examples as a way to
> build fluency in picolisp. This little gem was an epiphany in my
> understanding of the equivalence of code and data in lisp.
>
> https://rosettacode.org/wiki/Jump_anywhere#PicoLisp
>
> (de foo (N)
>(prinl "This is 'foo'")
>(printsp N)
>(or (=0 (dec 'N)) (run (cddr foo))) )
>
>
> /Lindsay
> p.s. studying the rosetta code examples has been time well spent.
>
>


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

2016-12-23 Thread Joh-Tob Schäg
​You are right. Sorry for the double standards. I am prone to waster
everyones time on IRC​. Dear Dean do not take it as offense and Mike thanks
for pointing out the irony. I guess i should not reply to mailing lists
when in bad mood.

>
> ​Your are not wasting your time.
> Never.
>
> Mike​
>
>


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

2016-12-23 Thread Joh-Tob Schäg
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...

2016-12-22 22:28 GMT+01:00 dean :

> BTW I seem to have answered my own queston i.e.
> If I wrap an evaluated symbol in nested lists e.g. (list (list (str
> Some_sym) ) )
> then I can wrap as many parens as possible around an evaluated value so
> that I can append a nested list as an element in another list.
> Cheers Dean
>


Re: how to append an element with nested parens and an evaluated centre

2016-12-23 Thread Joh-Tob Schäg
What is the purpose of the symbol V? Is seems like dead code to me. Please
check your code for correctness before asking question. The first line does
not make any sense for another reason.

If you want to have a the list (a (("String"))) use:
(setq L (append L '((("String")

I assume you wanted to have the value of V in there instead of a constant
"String". Have a look at 'fill in this case.

2016-12-22 21:09 GMT+01:00 dean :

> What is the right way to do this...
> (setq V "some_str")
> (setq L '(a))
> (setq L (append L ???))
> --> (  a   ((some_str)))
> i.e. I can do '((some_str))
> but wonder if there's an easy way to use '(()) AND have an evaluated value
> in the middle
> i.e. quote makes specifying any level of parens easy but doesn't let my
> use an evaluated value in the middle.
> Sorry if this is a dumb question
>


Re: Full documentation in a single document?

2016-12-19 Thread Joh-Tob Schäg
There is not. I talked about he same thing with Regenaxer the day before
yesterday. It would be very helpfull if you did create such a script. You
might also think about updating the hyperlinks.

I have an idea for a long term solution but the implemenation migjt take a
while.
Am 19.12.2016 22:51 schrieb "František Fuka" :

> Hello,
>
> is there a single document containing all PicoLisp documentation
> (including the function reference), suitable e.g. for reading in Kindle? Or
> an existing script to generate such a file?
>
> I could stitch it together rather easily from the existing HTML docs but I
> just want to make sure I am not doing something that's already done...
>
> Thanks
>
> --
> *-- Frantisek Fuka*
> (yes, that IS my real name)
>
> -- My Personal homepage: www.fuxoft.cz
> -- My Google+ profile: google.com/+fuxoft
> -- My Telegram chat: telegram.fuxoft.cz
>
>
>


Re: best way to create global list variable/symbol

2016-12-18 Thread Joh-Tob Schäg
Sorry i did not test it well you are right. Will be more carefull about it
next time.
Am 18.12.2016 16:13 schrieb "Alexander Burger" :

> On Sat, Dec 17, 2016 at 11:51:04PM +0100, Joh-Tob Schäg wrote:
> > There is no (efficient) way to find the symbol (1 2 3) is bound to. So
> > would you have to know the symbol all the time.
> >
> > (de add-to-global-list (Sym Value)
> >(setq Sym (cons Value Sym)))
> > (de delete-from-global-list (Sym)
> >(setq Sym (cdr Sym)))
>
> Note that this will not work as one might expect. It sets the value of the
> symbol 'Sym', not of the symbol it is bound to. You need a level of
> indirection
> using 'set' instead of 'setq', and 'val'.
>
>...
>(set Sym (cons Value Sym)))
>...
>(set Sym (cdr (val Sym))) )
>
>
> > But i guess you do not want to pass the symbol around. But the function
> > still does need to what global symbol to work on. You can either use
> > Picolisp object system for that or you can implement it on your own.
> >
> > (de return-list-handler (@Symbol)
> >(fill '((Op-code . Operands)
> >   (cond
> > ((= Op-code "add") (setq @Symbol (cons (car Operands) @Symbol)))
> > ((= Op-code "sort") (setq @Symbol (sort @Symbol)))
> > ((= Op-code "readcar") (car @Symbol))
> > ((= Op-code "readcdr") (cdr @Symbol))
> > ((= Op-code "del") (setq @Symbol (cdr @Symbol)))
>
> Same here. You need 'val' in some places, e.g.
>
>(sort @Symbol) -> (sort (val @Symbol))
>
> Also, I would recommend 'case' instead of 'cond' here
>
>(case Op-code
>   ("add" ..)
>   ("sort" ..)
>   .. )
>
> (For all the above, I'm still not able to detect any practical sense or
> purpose,
> but that's up to Dean perhaps ;)
>
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: best way to create global list variable/symbol

2016-12-17 Thread Joh-Tob Schäg
Why not use the idea i presented?
The one using fill?
Do you understand it?


2016-12-18 0:25 GMT+01:00 dean :

> Thank you Joh-Tob...I'll have a good look at that because ultimately I do
> want to use picolisp objects.
> I just came back to say that changing the argument name from *L (also the
> global symbol) to Larg seemed to crack this. It's as if...given a conflict
> between a global symbol and a local argument symbol, inside a function, the
> local argument symbol wins which seems fair enough. I tried this as a
> result of Alex's remark that L will go back to whatever it was before the
> function. I suppose I'm used to passing variables in through the prototype
> by reference :)
>
> (setq *L '(a))
>
> (de doit (Larg)
>(prog
>   (setq *L (append Larg '(b)))
>   (prinl "inside of fn *L is " *L) ) )
>
> (doit *L)
> (prinl "outside fn *L is " *L)
>
> #inside of fn *L is ab
> #outside fn *L is ab
>
>
>
> On 17 December 2016 at 22:51, Joh-Tob Schäg  wrote:
>
>> For the case:
>> (setq A ( 1 2 3 ))
>> There is no (efficient) way to find the symbol (1 2 3) is bound to. So
>> would you have to know the symbol all the time.
>>
>> (de add-to-global-list (Sym Value)
>>(setq Sym (cons Value Sym)))
>> (de delete-from-global-list (Sym)
>>(setq Sym (cdr Sym)))
>>
>> But i guess you do not want to pass the symbol around. But the function
>> still does need to what global symbol to work on. You can either use
>> Picolisp object system for that or you can implement it on your own.
>>
>> (de return-list-handler (@Symbol)
>>(fill '((Op-code . Operands)
>>   (cond
>> ((= Op-code "add") (setq @Symbol (cons (car Operands) @Symbol)))
>> ((= Op-code "sort") (setq @Symbol (sort @Symbol)))
>> ((= Op-code "readcar") (car @Symbol))
>> ((= Op-code "readcdr") (cdr @Symbol))
>> ((= Op-code "del") (setq @Symbol (cdr @Symbol)))
>>
>> You use it like that:
>> (setq c (return-list-handler '*Global-List))
>> (c "add" 1)
>> (c "add" 2)
>> (c "add" 3)
>> (c "add" 4)
>> *Global-List #-> (4 3 2 1)
>> (c "sort")
>> (c "readcar") #-> 1
>>
>> I would really recommend you using objects though even though they are
>> basically the same under the hood.
>> Does that answer our question?
>>
>>
>> 2016-12-17 22:01 GMT+01:00 Alexander Burger :
>>
>>> Hi Dean,
>>>
>>> On Sat, Dec 17, 2016 at 06:02:29PM +, dean wrote:
>>> > #{Is it possible to change a list AND keep it's name the same at
>>> different
>>> > program levels}#
>>> > (setq L '(a))
>>> > (de doit_temp (L) (prog (setq L (append L '(b))) (prinl "inside of fn
>>> L is
>>> > " L))  )
>>> > (de doit_perm (L) (setq NewL (append L '(b
>>> > (doit_temp L)
>>> > (prinl "outside of fn L is " L)
>>> > (doit_perm L)
>>> > (prinl "outside of fn NewL is " NewL)
>>> >
>>> > #inside of fn L is ab
>>> > #outside of fn L is a
>>> > #outside of fn NewL is ab
>>>
>>> Hmm, again I can't really understand what your question is. And you seem
>>> to use
>>> the wrong terminology.
>>>
>>> The key concept is "symbol binding". Let me try to clear some things up:
>>>
>>>
>>> > #{Is it possible to change a list AND keep it's name the same at
>>> different
>>> > program levels}#
>>>
>>> A list does not have a "name". You can only *bind* a symbol to a list.
>>>
>>> Binding is fundamental concept of Lisp, and you should *really* try to
>>> understand it thoroughly before writing any programs. Please study the
>>> example
>>> code in the distro and at rosettacode.org!
>>>
>>>
>>> > (setq L '(a))
>>>
>>> This binds the symbol 'L' globally to the list '(a)'.
>>>
>>>
>>>
>>> > (de doit_temp (L)
>>> >(prog
>>> >   (setq L (append L '(b)))
>>> >   (prinl "inside of fn L is " L) ) )
>>>
>>> (The 'prog' is not needed)
>>>
>>> The symbol 'L' is bound to some value when the function is called. Then
>>> it is
>>> extended by appending '(b)' to whatever value that is. That is printed,
>>> then 'L'
>>> is restored upon function return to whatever global value it had before

Re: best way to create global list variable/symbol

2016-12-17 Thread Joh-Tob Schäg
For the case:
(setq A ( 1 2 3 ))
There is no (efficient) way to find the symbol (1 2 3) is bound to. So
would you have to know the symbol all the time.

(de add-to-global-list (Sym Value)
   (setq Sym (cons Value Sym)))
(de delete-from-global-list (Sym)
   (setq Sym (cdr Sym)))

But i guess you do not want to pass the symbol around. But the function
still does need to what global symbol to work on. You can either use
Picolisp object system for that or you can implement it on your own.

(de return-list-handler (@Symbol)
   (fill '((Op-code . Operands)
  (cond
((= Op-code "add") (setq @Symbol (cons (car Operands) @Symbol)))
((= Op-code "sort") (setq @Symbol (sort @Symbol)))
((= Op-code "readcar") (car @Symbol))
((= Op-code "readcdr") (cdr @Symbol))
((= Op-code "del") (setq @Symbol (cdr @Symbol)))

You use it like that:
(setq c (return-list-handler '*Global-List))
(c "add" 1)
(c "add" 2)
(c "add" 3)
(c "add" 4)
*Global-List #-> (4 3 2 1)
(c "sort")
(c "readcar") #-> 1

I would really recommend you using objects though even though they are
basically the same under the hood.
Does that answer our question?


2016-12-17 22:01 GMT+01:00 Alexander Burger :

> Hi Dean,
>
> On Sat, Dec 17, 2016 at 06:02:29PM +, dean wrote:
> > #{Is it possible to change a list AND keep it's name the same at
> different
> > program levels}#
> > (setq L '(a))
> > (de doit_temp (L) (prog (setq L (append L '(b))) (prinl "inside of fn L
> is
> > " L))  )
> > (de doit_perm (L) (setq NewL (append L '(b
> > (doit_temp L)
> > (prinl "outside of fn L is " L)
> > (doit_perm L)
> > (prinl "outside of fn NewL is " NewL)
> >
> > #inside of fn L is ab
> > #outside of fn L is a
> > #outside of fn NewL is ab
>
> Hmm, again I can't really understand what your question is. And you seem
> to use
> the wrong terminology.
>
> The key concept is "symbol binding". Let me try to clear some things up:
>
>
> > #{Is it possible to change a list AND keep it's name the same at
> different
> > program levels}#
>
> A list does not have a "name". You can only *bind* a symbol to a list.
>
> Binding is fundamental concept of Lisp, and you should *really* try to
> understand it thoroughly before writing any programs. Please study the
> example
> code in the distro and at rosettacode.org!
>
>
> > (setq L '(a))
>
> This binds the symbol 'L' globally to the list '(a)'.
>
>
>
> > (de doit_temp (L)
> >(prog
> >   (setq L (append L '(b)))
> >   (prinl "inside of fn L is " L) ) )
>
> (The 'prog' is not needed)
>
> The symbol 'L' is bound to some value when the function is called. Then it
> is
> extended by appending '(b)' to whatever value that is. That is printed,
> then 'L'
> is restored upon function return to whatever global value it had before.
>
>
> > (de doit_perm (L)
> >(setq NewL (append L '(b))) )
>
> 'NewL' is global from this function.
>
> It should be named *NewL according to the PicoLisp naming conventions.
>
>
>
> All this explains the output you get :)
>
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: help with list of capital letters as symbol property key

2016-12-16 Thread Joh-Tob Schäg
Maybe can hepl you with that it inserts 15 numbers with different keys and
prints the result after each insert or at least it should. Could not try it

Re: help with list of capital letters as symbol property key

2016-12-16 Thread Joh-Tob Schäg
assoc '(a) '(((a) vlu_a1 vlu_a2) ((a b).vlu_ab1))) #'(a) is the key
(vlu_a1 vlu_a2 ) to be exact. Since ((a) vlu_a1 vlu_a2) is ((a) . (vlu_a1
vlu_a2))
Am 17.12.2016 04:53 schrieb "dean" :

> >'assoc'iation list for such purposes. That is probably the fastest, and
> surely most lispy :)
>
> Then that's what I should really be doing...I wasn't familiar with this
> but looking on the net it seems to involve "assoc" but I've also seen "idx"
> in the lists part of the reference.
>
> I think I "get" assoc
> i.e.
> : (assoc '(a) '(((a) vlu_a1 vlu_a2) ((a b).vlu_ab1))) #'(a) is the key for
> vlu_a1 and vlu_a2
> -> ((a) vlu_a1 vlu_a2)
> : (assoc '(a b) '(((a) vlu_a1 vlu_a2) ((a b).vlu_ab3))) #'(a b) is the key
> just for vlu_ab3
> -> ((a b) .vlu_ab3)
>
> but I can't see how the first few insertions in the example result in this
> structure
> (d (2 NIL 17 NIL A) (a b c))  # 'd' already existed
>
> and wonder
> a) if idx is a possible way of doing association lists and
> b) irrespective of the answer how the above tree comes from the insertions.
> Sorry if it's obvious and I've just missed it.
>
> Best Regards
> Dean
>
> On 14 December 2016 at 19:31, Alexander Burger 
> wrote:
>
>> Hi Bruno,
>>
>> > I'm surprised that (pick '((A B) (and (= A Value) B)) ListA ListB) is
>> > faster than (get ListB (index Value ListA)).
>>
>> > It's true that get traverses ListB right after a traversal of ListA, but
>> > pick seems to do the same traversal of
>> > the same number of elements. The only difference is that pick traverses
>> the
>> > two lists at the same time, instead
>> > of sequentially.
>>
>> Oops, you are right! I have not tested, but the 'pick' solution is
>> probably
>> *slower* than the get/index one, due to the function call overhead for
>> each
>> element.
>>
>> I think I never needed such a case. Usually I try do build 'assoc'iation
>> list
>> for such purposes. That is probably the fastest, and surely most lispy :)
>>
>> - Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: help with list of capital letters as symbol property key

2016-12-16 Thread Joh-Tob Schäg
You can use idx to store associations but it is slower for lower number of
elements. If i do things with idx they tend to be more messy.
Am 17.12.2016 04:53 schrieb "dean" :

> >'assoc'iation list for such purposes. That is probably the fastest, and
> surely most lispy :)
>
> Then that's what I should really be doing...I wasn't familiar with this
> but looking on the net it seems to involve "assoc" but I've also seen "idx"
> in the lists part of the reference.
>
> I think I "get" assoc
> i.e.
> : (assoc '(a) '(((a) vlu_a1 vlu_a2) ((a b).vlu_ab1))) #'(a) is the key for
> vlu_a1 and vlu_a2
> -> ((a) vlu_a1 vlu_a2)
> : (assoc '(a b) '(((a) vlu_a1 vlu_a2) ((a b).vlu_ab3))) #'(a b) is the key
> just for vlu_ab3
> -> ((a b) .vlu_ab3)
>
> but I can't see how the first few insertions in the example result in this
> structure
> (d (2 NIL 17 NIL A) (a b c))  # 'd' already existed
>
> and wonder
> a) if idx is a possible way of doing association lists and
> b) irrespective of the answer how the above tree comes from the insertions.
> Sorry if it's obvious and I've just missed it.
>
> Best Regards
> Dean
>
> On 14 December 2016 at 19:31, Alexander Burger 
> wrote:
>
>> Hi Bruno,
>>
>> > I'm surprised that (pick '((A B) (and (= A Value) B)) ListA ListB) is
>> > faster than (get ListB (index Value ListA)).
>>
>> > It's true that get traverses ListB right after a traversal of ListA, but
>> > pick seems to do the same traversal of
>> > the same number of elements. The only difference is that pick traverses
>> the
>> > two lists at the same time, instead
>> > of sequentially.
>>
>> Oops, you are right! I have not tested, but the 'pick' solution is
>> probably
>> *slower* than the get/index one, due to the function call overhead for
>> each
>> element.
>>
>> I think I never needed such a case. Usually I try do build 'assoc'iation
>> list
>> for such purposes. That is probably the fastest, and surely most lispy :)
>>
>> - Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: Loosing elements in a sorted list

2016-12-16 Thread Joh-Tob Schäg
If they become unreachable, they will be collected.

That is a more compact way ofnsaying what i just said. If you want to get
more technicalnread mine but this one is easier to understand
Am 17.12.2016 03:53 schrieb "John Duncan" :

> If they become unreachable, they will be collected.
>
> On Fri, Dec 16, 2016 at 1:28 PM, Bruno Franco <
> brunofrancosala...@gmail.com> wrote:
>
>> Hi John, Alex,
>>
>> Thank you for your explanations, I think I now understand how sort works:
>> So, for example, in
>>
>> : (setq A (3 1 2 4 5 6))
>> -> (3 1 2 4 5 6)
>> : (setq B (sort A))
>> -> (1 2 3 4 5 6)
>> : A
>> -> (3 4 5 6)
>> : B
>> -> (1 2 3 4 5 6)
>>
>> The symbol A points to the first cell of the list (3 1 2 3 4 5 6), and
>> each cell
>> points to the next cell in the list. When sort is applied, the pointing
>> order of the cells
>> is changed so that each cell is in the right order in the list. But, A is
>> still pointing to
>> the same cell as before, and if that cell has moved, then A ends up
>> pointing to the
>> middle of the list.
>>
>> In the case above, A points to the cell with CAR 3, and when that cell is
>> moved, A ends
>> up pointing to the 3rd element of the list. And so, the list that is
>> built as the value of A
>> starts at the 3rd element.
>>
>> My follow up question is, what happens to those first 2 cells, if they're
>> not assigned to
>> anything? Do they just stay there? Or are they deleted, perhaps by the
>> garbage collector?
>>
>> P.S.
>> I also wanted to apologise. When I reread my first mail I realised it was
>> arrogant of me to
>> imply that a feature of the language might be a bug.
>> You have put a lot of effort into this language, and it shows Several
>> design decisions that
>> first surprised me turned out to be awesome, because they let me write
>> code that was
>> shorter, easier to read, and prettier. And because they lead to a more
>> consistent language.
>>
>> Thank you for all your effort Alex. I like a lot the language you've made.
>>
>>
>>
>> On Thu, Dec 15, 2016 at 8:30 AM, Alexander Burger 
>> wrote:
>>
>>> Hi Bruno,
>>>
>>> > But that might be because with 'by, the operation is not destructive.
>>>
>>> This is correct. 'sort' is destructive, and 'by' is not, because it
>>> builds a
>>> fresh, private list.
>>>
>>>
>>> > Is this normal operation of picolisp? I assumed its not, because I
>>> didn't
>>> > catch any reference to it in the documentation.
>>>
>>> Every destructive function should be marked as such in the reference Let
>>> us
>>> know when you find a case where this is missing.
>>>
>>> - Alex
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>
>>
>
>
> --
> John Duncan
>


Re: Loosing elements in a sorted list

2016-12-16 Thread Joh-Tob Schäg
Assuming
( 1 . Pointertotheonecontaining(2)) and
( 2 . Pointertotheonecontaining(3))
are no longer referenced by a node referenced by the global name space.
They will be reclaimed during next gabarage collection and added to the
free cell list.
Am 17.12.2016 03:33 schrieb "Bruno Franco" :

> Hi John, Alex,
>
> Thank you for your explanations, I think I now understand how sort works:
> So, for example, in
>
> : (setq A (3 1 2 4 5 6))
> -> (3 1 2 4 5 6)
> : (setq B (sort A))
> -> (1 2 3 4 5 6)
> : A
> -> (3 4 5 6)
> : B
> -> (1 2 3 4 5 6)
>
> The symbol A points to the first cell of the list (3 1 2 3 4 5 6), and
> each cell
> points to the next cell in the list. When sort is applied, the pointing
> order of the cells
> is changed so that each cell is in the right order in the list. But, A is
> still pointing to
> the same cell as before, and if that cell has moved, then A ends up
> pointing to the
> middle of the list.
>
> In the case above, A points to the cell with CAR 3, and when that cell is
> moved, A ends
> up pointing to the 3rd element of the list. And so, the list that is built
> as the value of A
> starts at the 3rd element.
>
> My follow up question is, what happens to those first 2 cells, if they're
> not assigned to
> anything? Do they just stay there? Or are they deleted, perhaps by the
> garbage collector?
>
> P.S.
> I also wanted to apologise. When I reread my first mail I realised it was
> arrogant of me to
> imply that a feature of the language might be a bug.
> You have put a lot of effort into this language, and it shows Several
> design decisions that
> first surprised me turned out to be awesome, because they let me write
> code that was
> shorter, easier to read, and prettier. And because they lead to a more
> consistent language.
>
> Thank you for all your effort Alex. I like a lot the language you've made.
>
>
>
> On Thu, Dec 15, 2016 at 8:30 AM, Alexander Burger 
> wrote:
>
>> Hi Bruno,
>>
>> > But that might be because with 'by, the operation is not destructive.
>>
>> This is correct. 'sort' is destructive, and 'by' is not, because it
>> builds a
>> fresh, private list.
>>
>>
>> > Is this normal operation of picolisp? I assumed its not, because I
>> didn't
>> > catch any reference to it in the documentation.
>>
>> Every destructive function should be marked as such in the reference Let
>> us
>> know when you find a case where this is missing.
>>
>> - Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: help extracting number from string

2016-12-15 Thread Joh-Tob Schäg
If i understood it correctly he wants to get all groups of number. "35f79"
-> (35  79)
Am 16.12.2016 09:28 schrieb "Joe Bogner" :

> how about
>
> : (extract format (chop 'ab33Cd))
> -> (3 3)
>
> or
>
> : (format (pack (extract format (chop 'ab33Cd
> -> 33
>
>
> On Thu, Dec 15, 2016 at 4:16 PM, dean  wrote:
>
>> I've seen num? and chop but think I need something in the middle to turn
>> a character to a number
>>
>> Having said that I seem to have got close by accident...i.e. I was going
>> to try and bend this...but it found a single integer as it was :)
>>
>> : (pick '((Ch) (and (= Ch (uppc Ch)) Ch)) (chop 'ab33Cd))
>> -> "3"
>>
>> I'd like this to detect 33 but see that chop precludes this.
>>
>> Any help much appreciated.
>>
>>
>


Re: help extracting number from string

2016-12-15 Thread Joh-Tob Schäg
I am just telling you pick can not help you here.
In this case just write a coroutine. You can handle different reading modes
(numbers vs strings) in there easily.
Am 16.12.2016 06:24 schrieb "dean" :

> I've seen num? and chop but think I need something in the middle to turn a
> character to a number.
>
> Having said that I seem to have got close by accident...i.e. I was going
> to try and bend this...but it found a single integer as it was :)
>
> : (pick '((Ch) (and (= Ch (uppc Ch)) Ch)) (chop 'ab33Cd))
> -> "3"
>
> I'd like this to detect 33 but see that chop precludes this.
>
> Any help much appreciated.
>
>


Re: misunderstanding executing data as code

2016-12-11 Thread Joh-Tob Schäg
You can produce a readable version of a function by (pp 'function)

2016-12-11 8:12 GMT+01:00 Alexander Burger :

> Hi Dean,
>
> first of all, could you please try to produce some readable, Lisp-style
> formatted code for your posts? If possible, boiled-down and simplified
> to the essence?
>
>
> On Sat, Dec 10, 2016 at 10:01:18PM +, dean wrote:
> > The following program shows me trying to extract a function name from a
> > "string" and execute the function using the string.
> > The function is called some_fn.
> > If I type (some_fn) directly...all is well.
> > When I first executed (Fn) that I THOUGHT held the function name...it
> > didn't so I dropped into the REPL and played until I got (some_fn)
> returned
> > i.e. by (str (glue "" Fn)) i.e. -> (some_fn)
> > I thought putting this in my program would call some_fn but it doesn't
> and
> > I don't understand why.
> > Thank you in anticipation
> > Dean
> >
> > (setq Lmnu
> > '(mAin_mnu-some_fn))
> >
> > (de some_fn ()
> >(prinl "yes in some_fn"))
> >
> > (de lmnu_to_mnu_tbl (Lmnu Lkey)
> >(for Ele Lmnu
> > (
> > ifn (car Ele)
> > (prog
> >(setq Optn_fn_pair (split (chop Ele) '-))
> >(setq Optn (get Optn_fn_pair 1))
> >(setq Fn (get Optn_fn_pair 2))
> >
> >(some_fn) #this worked fine
> >
> > #!
> > #: (Fn) #this didn't 'cos Fn contained "s" "o" "m".
> > #-> "n"
> > #: (glue "" Fn)
> > #-> "some_fn"
> > #: (str (glue "" Fn))   #this looked to evaluate to (some_fn) which
> worked
> > above
> > #-> (some_fn)
> >
> >#(str (glue "" Fn)) #but executing it didn't call some_fn
> >#((str (glue "" Fn))) #nor did evaluating what got
> returned
> > )
> > (prog
> ># (printsp Ele 'is 'a 'list)
> ># (prinl)
> > )
> >  )
> >)
> > )
> >
> > (debug 'lmnu_to_mnu_tbl)
> > (lmnu_to_mnu_tbl Lmnu ())
>
>
> If I get you right, you have a symbol 'mAin_mnu-some_fn', and want to
> extact
> the part after the "-" and execute it as a function? Then you could
>
>((intern (pack (cadr (split (chop 'mAin_mnu-some_fn) "-")
>
>
> Or, if you want to keep the function in a variable 'F'
>
>(let F (intern (pack (cadr (split (chop 'mAin_mnu-some_fn) "-"
>   (F) )
>
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: misunderstanding executing data as code

2016-12-10 Thread Joh-Tob Schäg
First things first.
One does not simply say that the pil interpreter is missunderstanding.
Secondly does 'pack fix your problem?
Do you know the difference between a list of chars and a "string-like
Symbol"?


2016-12-10 23:01 GMT+01:00 dean :

> The following program shows me trying to extract a function name from a
> "string" and execute the function using the string.
> The function is called some_fn.
> If I type (some_fn) directly...all is well.
> When I first executed (Fn) that I THOUGHT held the function name...it
> didn't so I dropped into the REPL and played until I got (some_fn) returned
> i.e. by (str (glue "" Fn)) i.e. -> (some_fn)
> I thought putting this in my program would call some_fn but it doesn't and
> I don't understand why.
> Thank you in anticipation
> Dean
>
> (setq Lmnu
> '(mAin_mnu-some_fn))
>
> (de some_fn ()
>(prinl "yes in some_fn"))
>
> (de lmnu_to_mnu_tbl (Lmnu Lkey)
>(for Ele Lmnu
> (
> ifn (car Ele)
> (prog
>(setq Optn_fn_pair (split (chop Ele) '-))
>(setq Optn (get Optn_fn_pair 1))
>(setq Fn (get Optn_fn_pair 2))
>
>(some_fn) #this worked fine
>
> #!
> #: (Fn) #this didn't 'cos Fn contained "s" "o" "m".
> #-> "n"
> #: (glue "" Fn)
> #-> "some_fn"
> #: (str (glue "" Fn))   #this looked to evaluate to (some_fn) which worked
> above
> #-> (some_fn)
>
>#(str (glue "" Fn)) #but executing it didn't call some_fn
>#((str (glue "" Fn))) #nor did evaluating what got returned
> )
> (prog
># (printsp Ele 'is 'a 'list)
># (prinl)
> )
>  )
>)
> )
>
> (debug 'lmnu_to_mnu_tbl)
> (lmnu_to_mnu_tbl Lmnu ())
>


Re: T accidentally redefined to NIL

2016-12-08 Thread Joh-Tob Schäg
Did you 'lint the source code? 'lint should warn you when you have T as
Parameter in a function.

2016-12-09 5:51 GMT+01:00 Bruno Franco :

> My my, I see it! Thanks Alex.
>
> On Thu, Dec 8, 2016 at 1:50 AM, Alexander Burger 
> wrote:
>
>> Hi Bruno,
>>
>> > I've written something that redefines T to NIL, which surprises me
>> > because I thought that T was protected from redefinition like that, and
>> > I have not found a command in the code that looks like it is redefining
>> T.
>>
>> It is true that 'T' is protected from simple, direct modifications like
>>
>>: (set T 7)
>>!? (set T 7)
>>T -- Protected symbol
>>
>> but not from indirect, involved processings. PicoLisp always gives you
>> enough
>> power to shoot into your foot ;)
>>
>>
>> > Could you check it out and see if its something in the code, or a bug in
>> > the language?
>>
>> > # -> Mtx
>> > (de animate (Mtx) # -> a matrix list (Mtx ..)
>> > ...
>> >   (actions (Mtx)) ) )
>> > # (animate (mtx 4))
>>
>> The problem is that you call 'Mtx' as a function in (actions (Mtx)).
>>
>> The value of 'Mtx' is not a function
>>
>>: (mtx 4)
>>-> ((T T T T) (NIL NIL NIL NIL) (NIL NIL NIL NIL) (NIL NIL NIL NIL))
>>
>> so what you end up doing is calling
>>
>>'((T T T T) ...)
>>
>> which *looks* like a fuction but is not *meant* to be one. It binds 'T'
>> as a
>> formal parameter.
>>
>> ♪♫ Alex
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>
>


Re: Login Problems Wiki

2016-12-04 Thread Joh-Tob Schäg
If you would create an account for testing purposes other people could give
there feedback when testing other browsers.
providing an login would improve reproducability.
Am 02.12.2016 04:45 schrieb :

> Hi,
>
> For my blog: thevikidtruth.com
>
> I did some testing on logging into the wiki with different browsers:
>
> 1. Laptop
>
> No Problems Whatsoever!
>
> 2. Android
>
>  a) Severe Issues with Chrome & Firefox - when pressing the login the
>  following response is recieveid:
>
>   The thevikidtruth.com page isn’t working
>
>   thevikidtruth.com didn’t send any data.
>   ERR_EMPTY_RESPONSE
>
> I am able to login maybe once in 15 times, if lucky. Once logged in it
> is stable, more or less but not perfect.
>
>  b) w3m & Samsung Builtin browser have NO Problem & login everytime.
>
> 3. Apple iOS
>
> a) Severe Issues with Chrome, Firefox, Dolphin & Opera - when pressing
> the login similar to Android however I need maybe 3 attempts if lucky,
> on average, instead of 15 to login.
>
> Does anyone have similar issues?
>
> I am trying to debug it and will announce any issues.
>
> thanks,
>
> Vid
>
> --
>
>   vuk...@fastmail.com
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>


Re: Incomplete documentation on 'need'

2016-12-03 Thread Joh-Tob Schäg
You are welcome. But from my personal experience the documentation is
rather terse and changes happen not that often.

Also (doc 'need) does state what it does do. Read the last two lines
`second form`. It is very unclear and i hope Regenaxer takes a look and
clarifies it.

2016-12-03 23:41 GMT+01:00 Bruno Franco :

> Thanks Chri! I'm relieved to hear you say that. I'll make sure to send any
> question I have.
>
> On Sat, Dec 3, 2016 at 5:12 PM, Christophe Gragnic <
> christophegrag...@gmail.com> wrote:
>
>> On Sat, Dec 3, 2016 at 10:54 PM, Bruno Franco
>>  wrote:
>> > I just wanted to point out that (doc 'need) for version 15.11.0 seems to
>> > miss something.
>> > […]
>> > I also wanted to ask if this kind of topic was appropriate for the
>> mailing
>> > list. It seems so small that I wouldn't want to bother everyone just to
>> > point it out.
>>
>> I can't say anything about 'need, but I can answer the last question.
>> This list is very friendly, especially with newbies.
>> You can ask any question or point us to anything.
>>
>>
>> chri
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>>
>
>


Re: forgotten password

2016-11-16 Thread Joh-Tob Schäg
Forgot your password for what service?
Am 17.11.2016 07:53 schrieb :

> Hi,
>
> my login name is vikid
>
> but I forgot my password.
>
> thanks,
>
> vidyuth
>
> --
>
>   vuk...@fastmail.com
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


  1   2   >