Unsubscribe

2024-04-16 Thread Pieter Suurmond
Good bye Pieter Suurmond  :-(
You are now unsubscribed



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


Subscribe

2024-04-16 Thread Pieter Suurmond
Hello Pieter Suurmond  :-)
You are now subscribed



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


Re: Android keyboad for terminal

2024-03-14 Thread Edgaras Šeputis
I think for speed learning/getting used to should be big factor. Also
working out correct sensitivity in settings. Autocomplete I was not
thinking too much about it esp llm, but could be (what I would consider
weird), option, but you'd need to setup your own llm server most likely :)
I was thinking just basic dict based completion like on regular keyboards.
Arrows are on right double tap, they are shown in intro, and if you open
intro video in youtube (play store is a bit of an ass... that it does not
provide direct link, but if you right click on video you get the link)
You'll see bunch of links to more detailed use guide and settings, as well
as summary sheet of use. (again play store is ass and does not allow
links...).

On Thu, Mar 14, 2024 at 3:40 PM  wrote:

> I like carrot. I am looking forward for more polished version. I will
> gladly pay.
> Carrot has smoother learning curve than penti.
> Carrot takes less brain space.
> I can operate carrot with one hand.
> Carrot have less throughput than penti, which can be fixed with personal
> llm auto complete.
> I miss arrows on carrot, my mistake?
>
> Razzy
>
> e-mails are unreliable comm anyway. Shall we move to matrix?
>  Original Message 
> On Mar 13, 2024, 18:30, Alexander Burger < picolisp@software-lab.de>
> wrote:
>
>
> Hi Edgaras, thanks for your work! On Wed, Mar 13, 2024 at 06:55:27PM
> +0200, Edgaras Šeputis wrote: > Who is writing here actually? Alex? No, not
> me. Strange that there is no name ... ☺/ A!ex -- UNSUBSCRIBE: mailto:
> picolisp@software-lab.de?subject=Unsubscribe
>
>


Re: Android keyboad for terminal

2024-03-14 Thread picolisp
I like carrot. I am looking forward for more polished version. I will gladly 
pay.
Carrot has smoother learning curve than penti.
Carrot takes less brain space.
I can operate carrot with one hand.
Carrot have less throughput than penti, which can be fixed with personal llm 
auto complete.
I miss arrows on carrot, my mistake?

Razzy

e-mails are unreliable comm anyway. Shall we move to matrix?
 Original Message 
On Mar 13, 2024, 18:30, Alexander Burger wrote:

> Hi Edgaras, thanks for your work! On Wed, Mar 13, 2024 at 06:55:27PM +0200, 
> Edgaras Šeputis wrote: > Who is writing here actually? Alex? No, not me. 
> Strange that there is no name ... ☺/ A!ex -- UNSUBSCRIBE: 
> mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Android keyboad for terminal

2024-03-13 Thread Alexander Burger
Hi Edgaras,

thanks for your work!

On Wed, Mar 13, 2024 at 06:55:27PM +0200, Edgaras Šeputis wrote:
> Who is writing here actually? Alex?

No, not me. Strange that there is no name ...

☺/ A!ex

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


Re: Android keyboad for terminal

2024-03-13 Thread picolisp
Razzy writing here. :)

Also, can I verify it is not sending information somewhere? No offence meant. :)
 Original Message 
On Mar 13, 2024, 17:55, Edgaras Šeputis wrote:

> I have a bug, fixing it, you need to open settings of it for it work as is. 
> But I'll fix it that it should not crash without first opening preferences.
> It already works decently with one finger in vertical.
>
> Who is writing here actually? Alex?
>
> On Wed, Mar 13, 2024 at 6:43 PM  wrote:
>
>> I was unable to make carrot work. It types nothing, no circle. I have 
>> trouble with keyboards. Can someone verify it's working for him?
>>
>> Idea has potential.
>> I would focus on:
>> -One finger use. Vertical screen
>> -Deep choice-tree
>> -api to outside personal llm, to restructure choices.
>>
>> I have ideas how to make it work, if you are interested.
>>
>>  Original Message 
>> On Mar 13, 2024, 15:58, Edgaras Šeputis < picolisp@software-lab.de> wrote:
>>
>>> No, I'm thinking of premium version in future if there is any interest in 
>>> basic one. That would allow customizing mappings (that I basically have), 
>>> and potentially some features that are more useful for less techy people - 
>>> so I guess suggestions, for faster typing. So at least for now I can't 
>>> offer sources.
>>>
>>> On Wed, Mar 13, 2024 at 4:42 PM  wrote:
>>>
 Cool idea. Do you publish sources?

 Sent from Proton Mail mobile

  Original Message 
 On Mar 13, 2024, 15:02, Edgaras Šeputis < picolisp@software-lab.de> wrote:

> Some quite long time ago I showed my special on screen keyboard here, 
> there was some minor interest, but it was in testing, and not really 
> documented all that well, but now I finally managed to properly release 
> it: https://play.google.com/store/apps/details?id=morphles.CarrotKeys It 
> can be considered similar to Pente. Hope this can be of use for PicoLisp 
> use "on the go" :)

Re: Android keyboad for terminal

2024-03-13 Thread Edgaras Šeputis
I have a bug, fixing it, you need to open settings of it for it work as is.
But I'll fix it that it should not crash without first opening preferences.
It already works decently with one finger in vertical.

Who is writing here actually? Alex?

On Wed, Mar 13, 2024 at 6:43 PM  wrote:

> I was unable to make carrot work. It types nothing, no circle. I have
> trouble with keyboards. Can someone verify it's working for him?
>
> Idea has potential.
> I would focus on:
> -One finger use. Vertical screen
> -Deep choice-tree
> -api to outside personal llm, to restructure choices.
>
> I have ideas how to make it work, if you are interested.
>
>  Original Message 
> On Mar 13, 2024, 15:58, Edgaras Šeputis < picolisp@software-lab.de> wrote:
>
>
> No, I'm thinking of premium version in future if there is any interest in
> basic one. That would allow customizing mappings (that I basically have),
> and potentially some features that are more useful for less techy people -
> so I guess suggestions, for faster typing. So at least for now I can't
> offer sources.
>
> On Wed, Mar 13, 2024 at 4:42 PM  wrote:
>
>> Cool idea. Do you publish sources?
>>
>>
>> Sent from Proton Mail mobile
>>
>>
>>
>>  Original Message 
>> On Mar 13, 2024, 15:02, Edgaras Šeputis < picolisp@software-lab.de>
>> wrote:
>>
>>
>> Some quite long time ago I showed my special on screen keyboard here,
>> there was some minor interest, but it was in testing, and not really
>> documented all that well, but now I finally managed to properly release it:
>> https://play.google.com/store/apps/details?id=morphles.CarrotKeys It can
>> be considered similar to Pente. Hope this can be of use for PicoLisp use
>> "on the go" :)
>>
>>


Re: Android keyboad for terminal

2024-03-13 Thread picolisp
I was unable to make carrot work. It types nothing, no circle. I have trouble 
with keyboards. Can someone verify it's working for him?

Idea has potential.
I would focus on:
-One finger use. Vertical screen
-Deep choice-tree
-api to outside personal llm, to restructure choices.

I have ideas how to make it work, if you are interested.

 Original Message 
On Mar 13, 2024, 15:58, Edgaras Šeputis wrote:

> No, I'm thinking of premium version in future if there is any interest in 
> basic one. That would allow customizing mappings (that I basically have), and 
> potentially some features that are more useful for less techy people - so I 
> guess suggestions, for faster typing. So at least for now I can't offer 
> sources.
>
> On Wed, Mar 13, 2024 at 4:42 PM  wrote:
>
>> Cool idea. Do you publish sources?
>>
>> Sent from Proton Mail mobile
>>
>>  Original Message 
>> On Mar 13, 2024, 15:02, Edgaras Šeputis < picolisp@software-lab.de> wrote:
>>
>>> Some quite long time ago I showed my special on screen keyboard here, there 
>>> was some minor interest, but it was in testing, and not really documented 
>>> all that well, but now I finally managed to properly release it: 
>>> https://play.google.com/store/apps/details?id=morphles.CarrotKeys It can be 
>>> considered similar to Pente. Hope this can be of use for PicoLisp use "on 
>>> the go" :)

Re: Android keyboad for terminal

2024-03-13 Thread Edgaras Šeputis
No, I'm thinking of premium version in future if there is any interest in
basic one. That would allow customizing mappings (that I basically have),
and potentially some features that are more useful for less techy people -
so I guess suggestions, for faster typing. So at least for now I can't
offer sources.

On Wed, Mar 13, 2024 at 4:42 PM  wrote:

> Cool idea. Do you publish sources?
>
>
> Sent from Proton Mail mobile
>
>
>
>  Original Message 
> On Mar 13, 2024, 15:02, Edgaras Šeputis < picolisp@software-lab.de> wrote:
>
>
> Some quite long time ago I showed my special on screen keyboard here,
> there was some minor interest, but it was in testing, and not really
> documented all that well, but now I finally managed to properly release it:
> https://play.google.com/store/apps/details?id=morphles.CarrotKeys It can
> be considered similar to Pente. Hope this can be of use for PicoLisp use
> "on the go" :)
>
>


Re: Android keyboad for terminal

2024-03-13 Thread picolisp
Cool idea. Do you publish sources?

Sent from Proton Mail mobile

 Original Message 
On Mar 13, 2024, 15:02, Edgaras Šeputis wrote:

> Some quite long time ago I showed my special on screen keyboard here, there 
> was some minor interest, but it was in testing, and not really documented all 
> that well, but now I finally managed to properly release it: 
> https://play.google.com/store/apps/details?id=morphles.CarrotKeys It can be 
> considered similar to Pente. Hope this can be of use for PicoLisp use "on the 
> go" :)

Android keyboad for terminal

2024-03-13 Thread Edgaras Šeputis
Some quite long time ago I showed my special on screen keyboard here, there
was some minor interest, but it was in testing, and not really documented
all that well, but now I finally managed to properly release it:
https://play.google.com/store/apps/details?id=morphles.CarrotKeys It can be
considered similar to Pente. Hope this can be of use for PicoLisp use "on
the go" :)


Re: 1brc

2024-03-10 Thread Alexander Burger
On Sun, Mar 10, 2024 at 08:42:21AM +0100, picolisp@software-lab.de wrote:
> I would like to share picolisp single process version:
> https://git.envs.net/mpech/tankf33der/raw/branch/master/1brc/demo.l
> ...
> Parallelized version is a question of future research.

Thanks Mike!

☺/ A!ex

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


1brc

2024-03-09 Thread picolisp

hi all,

https://www.morling.dev/blog/one-billion-row-challenge/

I would like to share picolisp single process version:
https://git.envs.net/mpech/tankf33der/raw/branch/master/1brc/demo.l
Speed is ok 1 million row simple file on 40k cities = 1 sec, it is easy 
to calculate how fast it would finish  1 billion rows file.


Parallelized version is a question of future research.

Happy coding,
(mike)



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


Re: "macros" in miniPicoLisp

2024-03-02 Thread C K Kashyap
Thanks Alex!

On Sat, Mar 2, 2024 at 1:02 PM Alexander Burger 
wrote:

> On Sat, Mar 02, 2024 at 10:05:00AM -0800, C K Kashyap wrote:
> > Another installment of the video -
> > https://www.youtube.com/watch?v=O52fRAsr7Vg
>
> Very nice indeed! This is probably the first time PiccLisp does something
> non~triwial on Windows.
>
> Tharks for sharing!
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: "macros" in miniPicoLisp

2024-03-02 Thread Alexander Burger
On Sat, Mar 02, 2024 at 10:05:00AM -0800, C K Kashyap wrote:
> Another installment of the video -
> https://www.youtube.com/watch?v=O52fRAsr7Vg

Very nice indeed! This is probably the first time PiccLisp does something
non~triwial on Windows.

Tharks for sharing!

☺/ A!ex

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


Re: "macros" in miniPicoLisp

2024-03-02 Thread C K Kashyap
Another installment of the video -
https://www.youtube.com/watch?v=O52fRAsr7Vg
I think my over 15 years of pursuit of finding the perfect programming
language is complete :) - The sad thing is that I had discovered PicoLisp
long ago but had discarded it because it was "just an interpreter" :)
I am finally free to explore my actual ideas now!
Regards,
Kashyap

On Fri, Feb 9, 2024 at 2:28 PM C K Kashyap  wrote:

> Super! - thank Alex.
>
> On Fri, Feb 9, 2024 at 11:17 AM Alexander Burger 
> wrote:
>
>> Hi Kashyap,
>>
>> > Does this look like a reasonable way to create the "create-adder"
>> function?
>> >
>> > (de create-adder Args
>> >(let
>> >   (N (car Args)
>> >  Adder (intern (pack "add-" N))
>> >  P
>> >  (list
>> > 'de
>> > Adder
>> > '(X)
>> > (list '+ N 'X) ) )
>> >   (eval P) ) )
>> >
>> > : (create-adder 10)
>> > -> add-10
>> > : (add-10 20)
>> > -> 30
>>
>> Yes, but you can do it a little simpler by directly calling 'def':
>>
>>(de create-adder (N)
>>   (def (intern (pack "add-" N))
>>  (list '(X) (list '+ N 'X)) ) )
>>
>> Note also that I use (N), i.e. an evaluated argument, as this makes the
>> function
>> more general.
>>
>>
>> Even simpler if you use 'curry':
>>
>>(de create-adder (@N)
>>   (def (intern (pack "add-" @N))
>>  (curry (@N) (X)
>> (+ @N X) ) ) )
>>
>> It is especially simpler if the function body, which is here just (+ N
>> X), is
>> more complicated, because then the 'list'ing and 'cons'ing of the body
>> would
>> become very unreadable.
>>
>>
>> > If I understand correctly, the "macro" capability of miniPicoLisp is
>> not at
>> > par with PicoLisp right?
>>
>> The 'macro' function of mini and normal PicoLisp is the same I think.
>>
>> ☺/ A!ex
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>


Re: Printed representation of (char 0) ?

2024-02-15 Thread Thorsten Jolitz
Hi Alex and beneroth,
there are system interfaces that don't handle binary data and send them as
hex strings to middleware for conversion ...
All I wanted was a quick way to cross check that conversion with PicoLisp,
and that was really easy, except that NUL problem, solved now.
But very interesting discussion, I'm playing around with rd and pr right
now.
Thanks for the input
Cheers
Thorsten

Am Mi., 14. Feb. 2024 um 08:04 Uhr schrieb Alexander Burger <
picolisp@software-lab.de>:

> Hi Thorsten,
>
> > I wonder if there actually is a way to directly print ^@ in PicoLisp for
> a
> > "non-printable" hex "00", instead of NIL?
>
> As we see from the previous discussion, this is not an issue of
> printability.
> Other control characters may also be non-printable. It is an issue of
> binary data vs. symbol names.
>
> But you can of course print a caret and an at-mark instead of NIL
>
>(prin (or (something) "\^@"))
>
>
> > Wrt the application, I just have to deal with fixed length hex strings
> (!)
> > where the values at certain offsets carry semantics, conversions are
> done,
> > and it's crucial that values stay in that position, the NUL values
> matter.
>
> Yes, but why do you need to convert it to a string? I would process these
> data
> all exclusively as a list of numbers, and do the final printing explicitly
> (if
> needed at all). This printing may print '0' as "\^@", and also take care of
> other control characters and non-printable stuff.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Printed representation of (char 0) ?

2024-02-13 Thread Alexander Burger
Hi Thorsten,

> I wonder if there actually is a way to directly print ^@ in PicoLisp for a
> "non-printable" hex "00", instead of NIL?

As we see from the previous discussion, this is not an issue of printability.
Other control characters may also be non-printable. It is an issue of
binary data vs. symbol names.

But you can of course print a caret and an at-mark instead of NIL

   (prin (or (something) "\^@"))


> Wrt the application, I just have to deal with fixed length hex strings (!)
> where the values at certain offsets carry semantics, conversions are done,
> and it's crucial that values stay in that position, the NUL values matter.

Yes, but why do you need to convert it to a string? I would process these data
all exclusively as a list of numbers, and do the final printing explicitly (if
needed at all). This printing may print '0' as "\^@", and also take care of
other control characters and non-printable stuff.

☺/ A!ex

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


Re: Printed representation of (char 0) ?

2024-02-13 Thread picolisp

Hi Thorsten,

I agree with the others, that's not a string you are processing.
Strictly speaking, PicoLisp text functions and PicoLisp strings (and 
symbol names) must not contain NULL character.


How about processing this fixed-size values in binary, using (rd 'cnt) 
and (wr 'cnt) ?


Important: The alternative argument of (rd) makes it work very 
differently, the default behavior with 'sym argument is for PLIO (the 
picolisp binary format).
It's also usually a bad idea to mix binary and text processing when 
working with the same input channel, unless you really know about how 
picolisp text procressing works (the character buffering, with a 
character potentially being 1-4 bytes), so careful with that.


Greetings,
beneroth

On 13.02.24 20:30, Thorsten Jolitz wrote:

Hi Alex, Thomas,
thanks for your input, this is actually what I was looking for :
image.png
or even better:
image.png
I wonder if there actually is a way to directly print ^@ in PicoLisp 
for a "non-printable" hex "00", instead of NIL?
Wrt the application, I just have to deal with fixed length hex strings 
(!) where the values at certain offsets carry semantics, conversions 
are done, and it's crucial that values stay in that position, the NUL 
values matter. And I don't want to write a PicoLisp application for 
this, I just wanted an easy way to produce the expected conversion 
result in PicoLisp as a reference for comparison, and the above 
solution is fine for that.


Am Di., 13. Feb. 2024 um 09:09 Uhr schrieb Alexander Burger 
:


Hi Thorsten,

> But shouldn't hex 23232424 print to something like ##^N^N$$
instead of
> ##$$ ?

The problem is that you try to handle binary data as symbols. This
is not a good
idea. Binary data are numbers.

First of all, do you really have a hex message? Where does
it come from? Normally I would expect a list of numbers
as obtained with e.g.

   (make (do 96 (link (rd 1

If it is really a hexadecimal string, you can obtain the list
of numbers with

   : (make (for (L (chop "23232424") (cut 2 'L)) (link (hex @
   -> (35 35 0 0 36 36)

☺/ A!ex

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


Re: Printed representation of (char 0) ?

2024-02-13 Thread Thorsten Jolitz
Hi Alex, Thomas,
thanks for your input, this is actually what I was looking for :
[image: image.png]
or even better:
[image: image.png]
I wonder if there actually is a way to directly print ^@ in PicoLisp for a
"non-printable" hex "00", instead of NIL?
Wrt the application, I just have to deal with fixed length hex strings (!)
where the values at certain offsets carry semantics, conversions are done,
and it's crucial that values stay in that position, the NUL values matter.
And I don't want to write a PicoLisp application for this, I just wanted an
easy way to produce the expected conversion result in PicoLisp as a
reference for comparison, and the above solution is fine for that.

Am Di., 13. Feb. 2024 um 09:09 Uhr schrieb Alexander Burger <
picolisp@software-lab.de>:

> Hi Thorsten,
>
> > But shouldn't hex 23232424 print to something like ##^N^N$$ instead
> of
> > ##$$ ?
>
> The problem is that you try to handle binary data as symbols. This is not
> a good
> idea. Binary data are numbers.
>
> First of all, do you really have a hex message? Where does
> it come from? Normally I would expect a list of numbers
> as obtained with e.g.
>
>(make (do 96 (link (rd 1
>
> If it is really a hexadecimal string, you can obtain the list
> of numbers with
>
>: (make (for (L (chop "23232424") (cut 2 'L)) (link (hex @
>-> (35 35 0 0 36 36)
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Printed representation of (char 0) ?

2024-02-13 Thread Alexander Burger
Hi Thorsten,

> But shouldn't hex 23232424 print to something like ##^N^N$$ instead of
> ##$$ ?

The problem is that you try to handle binary data as symbols. This is not a good
idea. Binary data are numbers.

First of all, do you really have a hex message? Where does
it come from? Normally I would expect a list of numbers
as obtained with e.g.

   (make (do 96 (link (rd 1

If it is really a hexadecimal string, you can obtain the list
of numbers with

   : (make (for (L (chop "23232424") (cut 2 'L)) (link (hex @
   -> (35 35 0 0 36 36)

☺/ A!ex

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


Re: Printed representation of (char 0) ?

2024-02-13 Thread Tomas Hlavaty
On Tue 13 Feb 2024 at 08:35, Thorsten Jolitz  wrote:
> But shouldn't hex 23232424 print to something like ##^N^N$$
> instead of

no

^N could mean SO character with byte value 14
see the program ascii

a NUL character would be displayed as ^@

> So the printed ASCII string (as char) carries all the information from the
> hex string, and can be converted back to the exact same hex string?

no, you are using wrong tool for the job

as Alex said, a picolisp string cannot contain NUL byte

> At least in some special cases when it's needed?

arbitrary binary data is not a string
parse the binary data properly

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


Re: Printed representation of (char 0) ?

2024-02-12 Thread Tomas Hlavaty
On Tue 13 Feb 2024 at 08:28, Thorsten Jolitz  wrote:
> But when I have a hexadecimal message string with fixed length, and the
> positions inside the string carry semantics? A certain value in a certain
> position has a meaning?

it is not a string, at least not in picolisp/C/unix sense

you need to properly parse the binary data into your own representation
and also write your own code to translate your own representation to
that binary data

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


Re: Printed representation of (char 0) ?

2024-02-12 Thread Thorsten Jolitz
Hi Alex,
But shouldn't hex 23232424 print to something like ##^N^N$$ instead of
##$$ ?
So the printed ASCII string (as char) carries all the information from the
hex string, and can be converted back to the exact same hex string?
At least in some special cases when it's needed?

Alexander Burger  schrieb am Di., 13. Feb. 2024,
07:56:

> Hi Thorsten,
>
> > it's been some time .. ;-)
>
> Welcome back! :)
>
>
> > I'm playing around a bit with hex<->ascii conversion in PicoLisp, and I
> > have the problem that (char 0) = NIL
> >
> >  (hex "00")
> > -> 0
> > : (char (hex "00"))
> > -> NIL
>
> This is correct.
>
> 'char' converts a number to a (transient) symbol here.
>
> A symbol's name is a string, a null-terminated sequence of UTF-8
> characters. In
> case of 'char', this string has a single character and a terminating null
> byte.
> This is the same as in other languages like C.
>
> So the number 65 gives a symbol "A":
>
>: (char 65)
>-> "A"
>
> But what happens with 0?
>
> It gives an empty string, i.e. a null-byte
>
>: (char 0)
>-> NIL
>
> and an empty string in PicoLisp is NIL.
>
>: ""
>-> NIL
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Printed representation of (char 0) ?

2024-02-12 Thread Thorsten Jolitz
Ok I understand that.
But when I have a hexadecimal message string with fixed length, and the
positions inside the string carry semantics? A certain value in a certain
position has a meaning?

Say fixed length is 96 like in the example above, and 2323 ist two start
chars, and then 01 or 02 is a handshake.

And this message has to be translated to ASCII to be understood by a third
party, that sends ASCII answers back, that has to be translated to hex.

This does not work when a round-trip conversion of 232301 results in 23231.

Tomas Hlavaty  schrieb am Di., 13. Feb. 2024,
07:49:

> On Tue 13 Feb 2024 at 00:25, Thorsten Jolitz 
> wrote:
> > I would like to achieve a roundtrip like this:
>
> why?
>
> NUL is often a string sentinel value
> so trying to use it as a character value
> will lead to issues
> do not do that
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Printed representation of (char 0) ?

2024-02-12 Thread Alexander Burger
Hi Thorsten,

> it's been some time .. ;-)

Welcome back! :)


> I'm playing around a bit with hex<->ascii conversion in PicoLisp, and I
> have the problem that (char 0) = NIL
> 
>  (hex "00")
> -> 0
> : (char (hex "00"))
> -> NIL

This is correct.

'char' converts a number to a (transient) symbol here.

A symbol's name is a string, a null-terminated sequence of UTF-8 characters. In
case of 'char', this string has a single character and a terminating null byte.
This is the same as in other languages like C.

So the number 65 gives a symbol "A":

   : (char 65)
   -> "A"

But what happens with 0?

It gives an empty string, i.e. a null-byte

   : (char 0)
   -> NIL

and an empty string in PicoLisp is NIL.

   : ""
   -> NIL

☺/ A!ex

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


Re: Printed representation of (char 0) ?

2024-02-12 Thread Tomas Hlavaty
On Tue 13 Feb 2024 at 00:25, Thorsten Jolitz  wrote:
> I would like to achieve a roundtrip like this:

why?

NUL is often a string sentinel value
so trying to use it as a character value
will lead to issues
do not do that

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


Re: Printed representation of (char 0) ?

2024-02-12 Thread Thorsten Jolitz
I would like to achieve a roundtrip like this:
: (hex (char (char (hex "23"]
-> "23"

but not like this:
: (hex (char (char (hex "01"]
-> "1"
: (hex (char (char (hex "00"]
-> "0"

It should be possible to do this, so that W = X in the end:
: (setq X
"23230200010001000F00323032342D30322D303931302D35342D303520202424")
: (length X)
-> 96
: (setq Y (chop X))
: (length Y)
-> 96
: (setq W (pack (mapcar '((A) (hex (char A))) (make (while Y (link (char
(hex (pack (cut 2 'Y)]
->
"232320001010F000323032342D30322D303931302D35342D303520202424"
: (length W)
-> 72

Am Mo., 12. Feb. 2024 um 23:56 Uhr schrieb Tomas Hlavaty <
picolisp@software-lab.de>:

> On Mon 12 Feb 2024 at 23:25, Thorsten Jolitz 
> wrote:
> > Shouldn't the (char 0) representation print to something
> > like ^N or so too, like (char 1), (char 2) etc?
>
> ^@
>
> what are you trying to achieve?
>
> why not use base64, for example?
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: Printed representation of (char 0) ?

2024-02-12 Thread Tomas Hlavaty
On Mon 12 Feb 2024 at 23:25, Thorsten Jolitz  wrote:
> Shouldn't the (char 0) representation print to something
> like ^N or so too, like (char 1), (char 2) etc?

^@

what are you trying to achieve?

why not use base64, for example?

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


Re: Printed representation of (char 0) ?

2024-02-12 Thread Thorsten Jolitz
Ah sorry, the moment I sent the question, I figured out the answer :
this is just a side effect of the final (pack ..).

When using (str ...) I get what I want:
:  (str (make (while Y (link (char (hex (pack (cut 2 'Y)]
-> "\"#\" \"#\" \"\^B\" NIL NIL NIL \"\^A\" NIL \"\^A\" NIL \"\^O\" NIL NIL
NIL NIL NIL NIL NIL \"2\" \"0\" \"2\" \"4\" \"-\" \"0\" \"2\" \"-\" \"0\"
\"9\" \"1\" \"0\" \"-\" \"5\" \"4\" \"-\" \"0\" \"5\" \" \" \" \" NIL NIL
NIL NIL NIL NIL NIL NIL \"$\" \"$\""

although somehow I still think it would be fine to have 'pack that prints
the NIL too, in this special case:
: (pack (make (while Y (link (char (hex (pack (cut 2 'Y)]
-> "##^B^A^A^O2024-02-0910-54-05  $$"

Am Mo., 12. Feb. 2024 um 23:25 Uhr schrieb Thorsten Jolitz <
tjol...@gmail.com>:

> Hello List,
> it's been some time .. ;-)
>
> I'm playing around a bit with hex<->ascii conversion in PicoLisp, and I
> have the problem that (char 0) = NIL
>
>  (hex "00")
> -> 0
> : (char (hex "00"))
> -> NIL
>
>  and disappears from the resulting ascii string.
>
> : (setq X
> "23230200010001000F00323032342D30322D303931302D35342D303520202424")
> : (setq Y (chop X))
> : (pack (make (while Y (link (char (hex (pack (cut 2 'Y)]
> -> "##^B^A^A^O2024-02-0910-54-05  $$"
>
> So how would it be possible to convert the ascii string back to the
> original hex string, when all the "00" are gone in the ascii
> representation? Shouldn't the (char 0) representation print to something
> like ^N or so too, like (char 1), (char 2) etc?
>
> When I try this online converter, the "00" are maintained as blanks:
> Hex to ASCII Text String Converter (rapidtables.com)
> 
> [image: image.png]
>
> and here is another representation that seems to enable the hex -> ascii
> -> hex conversion, getting exactly the same hex string in the end as in the
> beginning (not exactly the same conversion as above! just an example how it
> might look) :
> [image: image.png]
> Cheers
> Thorsten
>


Printed representation of (char 0) ?

2024-02-12 Thread Thorsten Jolitz
Hello List,
it's been some time .. ;-)

I'm playing around a bit with hex<->ascii conversion in PicoLisp, and I
have the problem that (char 0) = NIL

 (hex "00")
-> 0
: (char (hex "00"))
-> NIL

 and disappears from the resulting ascii string.

: (setq X
"23230200010001000F00323032342D30322D303931302D35342D303520202424")
: (setq Y (chop X))
: (pack (make (while Y (link (char (hex (pack (cut 2 'Y)]
-> "##^B^A^A^O2024-02-0910-54-05  $$"

So how would it be possible to convert the ascii string back to the
original hex string, when all the "00" are gone in the ascii
representation? Shouldn't the (char 0) representation print to something
like ^N or so too, like (char 1), (char 2) etc?

When I try this online converter, the "00" are maintained as blanks:
Hex to ASCII Text String Converter (rapidtables.com)

[image: image.png]

and here is another representation that seems to enable the hex -> ascii ->
hex conversion, getting exactly the same hex string in the end as in the
beginning (not exactly the same conversion as above! just an example how it
might look) :
[image: image.png]
Cheers
Thorsten


Re: "macros" in miniPicoLisp

2024-02-09 Thread C K Kashyap
Super! - thank Alex.

On Fri, Feb 9, 2024 at 11:17 AM Alexander Burger 
wrote:

> Hi Kashyap,
>
> > Does this look like a reasonable way to create the "create-adder"
> function?
> >
> > (de create-adder Args
> >(let
> >   (N (car Args)
> >  Adder (intern (pack "add-" N))
> >  P
> >  (list
> > 'de
> > Adder
> > '(X)
> > (list '+ N 'X) ) )
> >   (eval P) ) )
> >
> > : (create-adder 10)
> > -> add-10
> > : (add-10 20)
> > -> 30
>
> Yes, but you can do it a little simpler by directly calling 'def':
>
>(de create-adder (N)
>   (def (intern (pack "add-" N))
>  (list '(X) (list '+ N 'X)) ) )
>
> Note also that I use (N), i.e. an evaluated argument, as this makes the
> function
> more general.
>
>
> Even simpler if you use 'curry':
>
>(de create-adder (@N)
>   (def (intern (pack "add-" @N))
>  (curry (@N) (X)
> (+ @N X) ) ) )
>
> It is especially simpler if the function body, which is here just (+ N X),
> is
> more complicated, because then the 'list'ing and 'cons'ing of the body
> would
> become very unreadable.
>
>
> > If I understand correctly, the "macro" capability of miniPicoLisp is not
> at
> > par with PicoLisp right?
>
> The 'macro' function of mini and normal PicoLisp is the same I think.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: "macros" in miniPicoLisp

2024-02-09 Thread Alexander Burger
Hi Kashyap,

> Does this look like a reasonable way to create the "create-adder" function?
> 
> (de create-adder Args
>(let
>   (N (car Args)
>  Adder (intern (pack "add-" N))
>  P
>  (list
> 'de
> Adder
> '(X)
> (list '+ N 'X) ) )
>   (eval P) ) )
> 
> : (create-adder 10)
> -> add-10
> : (add-10 20)
> -> 30

Yes, but you can do it a little simpler by directly calling 'def':

   (de create-adder (N)
  (def (intern (pack "add-" N))
 (list '(X) (list '+ N 'X)) ) )

Note also that I use (N), i.e. an evaluated argument, as this makes the function
more general.


Even simpler if you use 'curry':

   (de create-adder (@N)
  (def (intern (pack "add-" @N))
 (curry (@N) (X)
(+ @N X) ) ) )

It is especially simpler if the function body, which is here just (+ N X), is
more complicated, because then the 'list'ing and 'cons'ing of the body would
become very unreadable.


> If I understand correctly, the "macro" capability of miniPicoLisp is not at
> par with PicoLisp right?

The 'macro' function of mini and normal PicoLisp is the same I think.

☺/ A!ex

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


"macros" in miniPicoLisp

2024-02-09 Thread C K Kashyap
Hi Alex,

Does this look like a reasonable way to create the "create-adder" function?

(de create-adder Args
   (let
  (N (car Args)
 Adder (intern (pack "add-" N))
 P
 (list
'de
Adder
'(X)
(list '+ N 'X) ) )
  (eval P) ) )

: (create-adder 10)
-> add-10
: (add-10 20)
-> 30

If I understand correctly, the "macro" capability of miniPicoLisp is not at
par with PicoLisp right?

Regards,
Kashyap


Re: miniPicoLisp + libuv +libSDL

2024-02-02 Thread C K Kashyap
Thanks Alex and RCS :)

On Thu, Feb 1, 2024 at 10:40 AM Alexander Burger 
wrote:

> On Thu, Feb 01, 2024 at 09:05:17AM -0800, C K Kashyap wrote:
> > I finally got around to recording a video (my video recording muscles
> have
> > atrophied :)  )
> >
> > https://www.youtube.com/watch?v=Uv0ZiZAfcGc
>
> Wow, that's cool! Now I see what your intentions are!
>
> Thanks!
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: miniPicoLisp + libuv +libSDL

2024-02-01 Thread Alexander Burger
On Thu, Feb 01, 2024 at 09:05:17AM -0800, C K Kashyap wrote:
> I finally got around to recording a video (my video recording muscles have
> atrophied :)  )
> 
> https://www.youtube.com/watch?v=Uv0ZiZAfcGc

Wow, that's cool! Now I see what your intentions are!

Thanks!
☺/ A!ex

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


Re: miniPicoLisp + libuv +libSDL

2024-02-01 Thread r cs
Thank you for sharing it!
rcs

On Thu, Feb 1, 2024 at 12:15 PM C K Kashyap 
wrote:

> I finally got around to recording a video (my video recording muscles have
> atrophied :)  )
>
> https://www.youtube.com/watch?v=Uv0ZiZAfcGc
>
> Regards,
> Kashyap
>
> On Fri, Jan 26, 2024 at 8:06 AM C K Kashyap  wrote:
>
>> Thanks Alex - I'll take the "very good" for now :)
>>
>> I think I found a better example for demo - libuv's file change callback
>> ... I'll do a demo using that -> make changes to a picolisp script and the
>> screen gets updated as I save the script :)
>>
>> Regards,
>> Kashyap
>>
>> On Fri, Jan 26, 2024 at 7:48 AM Alexander Burger <
>> picolisp@software-lab.de> wrote:
>>
>>> Hi Kashyap,
>>>
>>> > ping Alex :)
>>>
>>> Yes, very good! There is just not much I can say here :)
>>>
>>> ☺/ A!ex
>>>
>>> --
>>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>>
>>

-- 
*Níl aon tinteán mar do thinteán féin. *[Irish Gaelic]
(There is no fireside like your own fireside.)


Re: miniPicoLisp + libuv +libSDL

2024-02-01 Thread C K Kashyap
I finally got around to recording a video (my video recording muscles have
atrophied :)  )

https://www.youtube.com/watch?v=Uv0ZiZAfcGc

Regards,
Kashyap

On Fri, Jan 26, 2024 at 8:06 AM C K Kashyap  wrote:

> Thanks Alex - I'll take the "very good" for now :)
>
> I think I found a better example for demo - libuv's file change callback
> ... I'll do a demo using that -> make changes to a picolisp script and the
> screen gets updated as I save the script :)
>
> Regards,
> Kashyap
>
> On Fri, Jan 26, 2024 at 7:48 AM Alexander Burger 
> wrote:
>
>> Hi Kashyap,
>>
>> > ping Alex :)
>>
>> Yes, very good! There is just not much I can say here :)
>>
>> ☺/ A!ex
>>
>> --
>> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>>
>


Re: minipicolisp with big num

2024-01-26 Thread C K Kashyap
:) ... thanks Alex!

On Fri, Jan 26, 2024 at 10:37 AM Alexander Burger 
wrote:

> Hi Kashyap, Mike,
>
> > Hey Mike ... I am actually asking if there is such a port/variation of
> > miniPicoLisp that has big num support - just like the regular picoLisp.
>
> I have never heard of any such version. In fact, I believe that at the
> moment
> you are the de-facto specialist of miniPicoLisp.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: minipicolisp with big num

2024-01-26 Thread Alexander Burger
Hi Kashyap, Mike,

> Hey Mike ... I am actually asking if there is such a port/variation of
> miniPicoLisp that has big num support - just like the regular picoLisp.

I have never heard of any such version. In fact, I believe that at the moment
you are the de-facto specialist of miniPicoLisp.

☺/ A!ex

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


Re: minipicolisp with big num

2024-01-26 Thread C K Kashyap
Hey Mike ... I am actually asking if there is such a port/variation of
miniPicoLisp that has big num support - just like the regular picoLisp.

Regards,
Kashyap

On Fri, Jan 26, 2024 at 9:14 AM Mike  wrote:

>
>
> > On Jan 26, 2024, at 18:19, C K Kashyap  wrote:
> >
> > 
> > Hey all,
> > Has anyone tried a port of miniPicoLisp with the added big num support?
>
> How did you test it?
>
> (mike)
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>


Re: minipicolisp with big num

2024-01-26 Thread Mike



> On Jan 26, 2024, at 18:19, C K Kashyap  wrote:
> 
> 
> Hey all,
> Has anyone tried a port of miniPicoLisp with the added big num support?

How did you test it?

(mike)


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


Re: docker for pil21

2024-01-26 Thread C K Kashyap
Nice - I did not know about the --no-cache option :)

On Fri, Jan 26, 2024 at 8:09 AM Dmitry Non  wrote:

> Heya!
> Interestingly, I wrote a dockerfile for myself too at the end of Dec.My
> versions should be lighter due to the lack of build dependencies in the
> final image:
>
> FROM alpine:3.19 AS build
>
> RUN apk add --no-cache readline-dev libffi-dev libressl-dev binutils make
> clang llvm llvm-dev pkgconf
> RUN sh -c ' \
> wget https://software-lab.de/picoLisp-23.12.tgz; \
> tar xfz picoLisp-23.12.tgz; \
> cd pil21/src; \
> make \
> '
>
> FROM alpine:3.19
> RUN apk add --no-cache readline-dev libffi-dev libressl-dev
> COPY --from=build /pil21 /usr/lib/picolisp
>
> # RUN ln -s /pil21 /usr/lib/picolisp
> RUN ln -s /usr/lib/picolisp/bin/picolisp /usr/bin
> RUN ln -s /usr/lib/picolisp/bin/pil /usr/bin
>
> ENTRYPOINT ["pil"]
>
> It's availalbe at https://hub.docker.com/r/dmitrynon/picolisp
> but I didn't intend it for public consumption so you're better off using
> your own dockerfile with some additions from mine
>
> On 24 Jan 2024, at 18:47, picolisp@software-lab.de wrote:
>
> hi all,
>
> I have created a docker file for pil21 you can play with.
> Comments are welcome.
>
> https://git.envs.net/mpech/pil21-docker
>
> (mike)
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>
>
>


minipicolisp with big num

2024-01-26 Thread C K Kashyap
Hey all,
Has anyone tried a port of miniPicoLisp with the added big num support?
Regards,
Kashyap


Re: miniPicoLisp + libuv +libSDL

2024-01-26 Thread C K Kashyap
Thanks Alex - I'll take the "very good" for now :)

I think I found a better example for demo - libuv's file change callback
.. I'll do a demo using that -> make changes to a picolisp script and the
screen gets updated as I save the script :)

Regards,
Kashyap

On Fri, Jan 26, 2024 at 7:48 AM Alexander Burger 
wrote:

> Hi Kashyap,
>
> > ping Alex :)
>
> Yes, very good! There is just not much I can say here :)
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: docker for pil21

2024-01-26 Thread Dmitry Non
Heya!
Interestingly, I wrote a dockerfile for myself too at the end of Dec.My 
versions should be lighter due to the lack of build dependencies in the final 
image:

FROM alpine:3.19 AS build

RUN apk add --no-cache readline-dev libffi-dev libressl-dev binutils make clang 
llvm llvm-dev pkgconf
RUN sh -c ' \
wget https://software-lab.de/picoLisp-23.12.tgz; \
tar xfz picoLisp-23.12.tgz; \
cd pil21/src; \
make \
'

FROM alpine:3.19
RUN apk add --no-cache readline-dev libffi-dev libressl-dev
COPY --from=build /pil21 /usr/lib/picolisp

# RUN ln -s /pil21 /usr/lib/picolisp
RUN ln -s /usr/lib/picolisp/bin/picolisp /usr/bin
RUN ln -s /usr/lib/picolisp/bin/pil /usr/bin

ENTRYPOINT ["pil"]

It's availalbe at https://hub.docker.com/r/dmitrynon/picolisp
but I didn't intend it for public consumption so you're better off using your 
own dockerfile with some additions from mine

> On 24 Jan 2024, at 18:47, picolisp@software-lab.de wrote:
> 
> hi all,
> 
> I have created a docker file for pil21 you can play with.
> Comments are welcome.
> 
> https://git.envs.net/mpech/pil21-docker
> 
> (mike)
> 
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe



Re: miniPicoLisp + libuv +libSDL

2024-01-26 Thread Alexander Burger
Hi Kashyap,

> ping Alex :)

Yes, very good! There is just not much I can say here :)

☺/ A!ex

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


Re: miniPicoLisp + libuv +libSDL

2024-01-26 Thread C K Kashyap
ping Alex :)

On Wed, Jan 24, 2024 at 7:58 AM C K Kashyap  wrote:

> Hi Alex et al,
> For quite some time now (years), I've been attempting to have a
> miniPicoLisp + libSDL + libUV working (on Windows as well) for a while and
> I have finally got it working :) ... Much of my time was wasted attempting
> "3 part cell" etc.
>
> I thought that I'd record a video of the demo before sharing but I am
> becoming impatient now :). I have the working version here -
> https://github.com/lispware/minilisp/tree/libuv2
> To see the demo, simply execute server.l (which listens on port 8080 for
> the mouse click locations and returns an RGB color). Then execute client.l
> - this opens an SDL window and sends the mouse click location to port 8080
> and draws a square on the window with the color returned from the server.
> [Please take a look at the Docker file to see the dependencies that are
> needed]
>
> I think I need to work on modelling the callbacks better. It would be
> great if I could have some pointers on how to do it better/right. For
> example, I modelled uv_tcp_listen here -
> https://github.com/lispware/minilisp/blob/2c4581d2288eafd4b5f65b88e37411e22993fc5a/src/lisp_sdl_libuv.c#L573
>  I
> execute the callback from the C callback "on_connection
> 
> "
>
> Regards,
> Kashyap
>


Re: docker for pil21

2024-01-24 Thread C K Kashyap
Nice,
Here's some additions to make the image a little lighter (not including the
*-dev packages) and also adding the appropriate soft links as indicated in
the INSTALL file

FROM alpine:latest as builder

RUN apk update && apk upgrade
RUN apk add bash git make llvm clang readline libffi openssl
RUN apk add llvm-dev readline-dev libffi-dev openssl-dev
WORKDIR /root
RUN git clone https://github.com/picolisp/pil21
WORKDIR /root/pil21/src
RUN touch *.ll
RUN make

FROM alpine:latest
RUN apk add bash git make llvm clang readline libffi openssl vim
COPY --from=builder /root/pil21 /root/pil21
RUN ln -s /root/pil21 /usr/lib/picolisp
RUN ln -s /usr/lib/picolisp/bin/picolisp /usr/bin
RUN ln -s /usr/lib/picolisp/bin/pil /usr/bin
RUN mkdir -p /usr/share/man/man1
RUN mkdir -p /usr/share/bash-completion/completions
RUN ln -s /root/pil21/man/man1/picolisp.1 /usr/share/man/man1
RUN ln -s /root/pil21/man/man1/pil.1 /usr/share/man/man1
RUN ln -s /root/pil21 /usr/share/picolisp
RUN ln -s /root/pil21/lib/bash_completion
/usr/share/bash-completion/completions/pil

On Wed, Jan 24, 2024 at 10:59 AM  wrote:

> hi all,
>
> I have created a docker file for pil21 you can play with.
> Comments are welcome.
>
> https://git.envs.net/mpech/pil21-docker
>
> (mike)
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


docker for pil21

2024-01-24 Thread picolisp

hi all,

I have created a docker file for pil21 you can play with.
Comments are welcome.

https://git.envs.net/mpech/pil21-docker

(mike)

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


miniPicoLisp + libuv +libSDL

2024-01-24 Thread C K Kashyap
Hi Alex et al,
For quite some time now (years), I've been attempting to have a
miniPicoLisp + libSDL + libUV working (on Windows as well) for a while and
I have finally got it working :) ... Much of my time was wasted attempting
"3 part cell" etc.

I thought that I'd record a video of the demo before sharing but I am
becoming impatient now :). I have the working version here -
https://github.com/lispware/minilisp/tree/libuv2
To see the demo, simply execute server.l (which listens on port 8080 for
the mouse click locations and returns an RGB color). Then execute client.l
- this opens an SDL window and sends the mouse click location to port 8080
and draws a square on the window with the color returned from the server.
[Please take a look at the Docker file to see the dependencies that are
needed]

I think I need to work on modelling the callbacks better. It would be great
if I could have some pointers on how to do it better/right. For example, I
modelled uv_tcp_listen here -
https://github.com/lispware/minilisp/blob/2c4581d2288eafd4b5f65b88e37411e22993fc5a/src/lisp_sdl_libuv.c#L573
I
execute the callback from the C callback "on_connection

"

Regards,
Kashyap


Re: Bye from forks sends signals?

2024-01-10 Thread Terry Palfrey
Dmitry Non

Move to real time with the IRC channel:

https://picolisp-explored.com/how-to-join-the-picolisp-community

https://libera.irclog.whitequark.org/picolisp/2024-01-10

On Tue, 9 Jan 2024 at 19:14, Dmitry Non  wrote:

> Hey.
>
> That's awesome. Thank you very much, Alex!
>
> > On 6 Jan 2024, at 06:48, Alexander Burger 
> wrote:
> >
> > Hi Dmitry,
> >
> >> Is this newsletter alive?:)
> >
> > Yes, just not so noisy :)
> >
> >
> >> I'm playing around with `native` and ZeroMQ and found a curious
> behaviour.
> >>
> >>(unless (fork)
> >>  (wait 2000)
> >>  (bye))
> >>
> >>(setq Context (native "libzmq.so" "zmq_ctx_new" 'P))
> >>(setq ZMQ_REP 4)
> >>(setq Socket (native "libzmq.so" "zmq_socket" 'P Context ZMQ_REP))
> >>(native "libzmq.so" "zmq_bind" 'I Socket "tcp://*:")
> >>
> >>(buf
> >> Buffer 10
> >> (prinl "Waiting for messages")
> >> (when (= -1 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
> >>   (prinl (pack "Error: " (errno)
> >
> > This looks good.
> >
> >
> >> The `errno` is 4 (which is signal interrupt as i understand).
> >
> > Yes. EINTR is 4 on most systems. You can see it with
> >
> >   : (sysdefs "errno")
> >   -> EACCES
> >   : EINTR
> >   -> 4
> >
> > or (vi "@lib/sysdefs").
> >
> >
> >> My assumption here is that `bye` throws some signal? Why else would it
> affect
> >> zeromq in the parent process?
> >> Actually, while writing this I found out about SIGCHLD which is
> apparently
> >> sent to parent on child's exit so I guess zmq_recv gets interrupted by
> that
> >> for some reason?
> >
> > Absolutely correct. The child sends a SIGCHLD signal, which must be
> handled or
> > ignored.
> >
> > I don't have libzmq at the moment and cannot test it, but I think it
> should be
> > something like
> >
> >   (while (lt0 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
> >  (unless (== EINTR (errno))
> > (quit (errno) "Signal") ) )
> >
> >
> >> P.S. completely offtopic but since I'm here. I just noticed that
> semicolons
> >> aren't treated as comments. Why?
> >
> > Comments in PicoLisp are # or #{...}#.
> >
> >
> >> Can it be enabled? Otherwise my Emacs' lisp-mode comment/uncomment
> function is
> >> useless and no comment highlight either.
> >
> > There is no built-in way to change it. There are some Emacs libs for
> PicoLisp,
> > but I don't use Emacs and cannot be helpful here.
> >
> > ☺/ A!ex
> >
> > --
> > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subjectUnsubscribe
>


unsubscribe

2024-01-10 Thread Nikolai Schlegel



Re: Bye from forks sends signals?

2024-01-09 Thread Dmitry Non
Hey.

That's awesome. Thank you very much, Alex!

> On 6 Jan 2024, at 06:48, Alexander Burger  wrote:
> 
> Hi Dmitry,
> 
>> Is this newsletter alive?:)
> 
> Yes, just not so noisy :)
> 
> 
>> I'm playing around with `native` and ZeroMQ and found a curious behaviour.  
>> 
>>(unless (fork)
>>  (wait 2000)
>>  (bye))
>> 
>>(setq Context (native "libzmq.so" "zmq_ctx_new" 'P))
>>(setq ZMQ_REP 4)
>>(setq Socket (native "libzmq.so" "zmq_socket" 'P Context ZMQ_REP))
>>(native "libzmq.so" "zmq_bind" 'I Socket "tcp://*:")
>> 
>>(buf
>> Buffer 10
>> (prinl "Waiting for messages")
>> (when (= -1 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
>>   (prinl (pack "Error: " (errno)
> 
> This looks good.
> 
> 
>> The `errno` is 4 (which is signal interrupt as i understand).
> 
> Yes. EINTR is 4 on most systems. You can see it with
> 
>   : (sysdefs "errno")
>   -> EACCES
>   : EINTR
>   -> 4
> 
> or (vi "@lib/sysdefs").
> 
> 
>> My assumption here is that `bye` throws some signal? Why else would it affect
>> zeromq in the parent process?
>> Actually, while writing this I found out about SIGCHLD which is apparently
>> sent to parent on child's exit so I guess zmq_recv gets interrupted by that
>> for some reason?
> 
> Absolutely correct. The child sends a SIGCHLD signal, which must be handled or
> ignored.
> 
> I don't have libzmq at the moment and cannot test it, but I think it should be
> something like
> 
>   (while (lt0 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
>  (unless (== EINTR (errno))
> (quit (errno) "Signal") ) )
> 
> 
>> P.S. completely offtopic but since I'm here. I just noticed that semicolons
>> aren't treated as comments. Why?
> 
> Comments in PicoLisp are # or #{...}#.
> 
> 
>> Can it be enabled? Otherwise my Emacs' lisp-mode comment/uncomment function 
>> is
>> useless and no comment highlight either.
> 
> There is no built-in way to change it. There are some Emacs libs for PicoLisp,
> but I don't use Emacs and cannot be helpful here.
> 
> ☺/ A!ex
> 
> -- 
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe


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


Re: Bye from forks sends signals?

2024-01-05 Thread Alexander Burger
Hi Dmitry,

> Is this newsletter alive?:)

Yes, just not so noisy :)


> I'm playing around with `native` and ZeroMQ and found a curious behaviour.  
> 
> (unless (fork)
>   (wait 2000)
>   (bye))
> 
> (setq Context (native "libzmq.so" "zmq_ctx_new" 'P))
> (setq ZMQ_REP 4)
> (setq Socket (native "libzmq.so" "zmq_socket" 'P Context ZMQ_REP))
> (native "libzmq.so" "zmq_bind" 'I Socket "tcp://*:")
> 
> (buf
>  Buffer 10
>  (prinl "Waiting for messages")
>  (when (= -1 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
>(prinl (pack "Error: " (errno)

This looks good.


> The `errno` is 4 (which is signal interrupt as i understand).

Yes. EINTR is 4 on most systems. You can see it with

   : (sysdefs "errno")
   -> EACCES
   : EINTR
   -> 4

or (vi "@lib/sysdefs").


> My assumption here is that `bye` throws some signal? Why else would it affect
> zeromq in the parent process?
> Actually, while writing this I found out about SIGCHLD which is apparently
> sent to parent on child's exit so I guess zmq_recv gets interrupted by that
> for some reason?

Absolutely correct. The child sends a SIGCHLD signal, which must be handled or
ignored.

I don't have libzmq at the moment and cannot test it, but I think it should be
something like

   (while (lt0 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
  (unless (== EINTR (errno))
 (quit (errno) "Signal") ) )


> P.S. completely offtopic but since I'm here. I just noticed that semicolons
> aren't treated as comments. Why?

Comments in PicoLisp are # or #{...}#.


> Can it be enabled? Otherwise my Emacs' lisp-mode comment/uncomment function is
> useless and no comment highlight either.

There is no built-in way to change it. There are some Emacs libs for PicoLisp,
but I don't use Emacs and cannot be helpful here.

☺/ A!ex

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


Bye from forks sends signals?

2024-01-05 Thread Dmitry Non
Hey!

Is this newsletter alive?:)

Disclaimer: I'm not very familiar with system programming and POSIX


I'm playing around with `native` and ZeroMQ and found a curious behaviour.  

(unless (fork)
  (wait 2000)
  (bye))

(setq Context (native "libzmq.so" "zmq_ctx_new" 'P))
(setq ZMQ_REP 4)
(setq Socket (native "libzmq.so" "zmq_socket" 'P Context ZMQ_REP))
(native "libzmq.so" "zmq_bind" 'I Socket "tcp://*:")

(buf
 Buffer 10
 (prinl "Waiting for messages")
 (when (= -1 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
   (prinl (pack "Error: " (errno)


Basically, the main process sets up a server and waiting for a message and the 
child process simply waits for a bit and exits with `bye`.

The `errno` is 4 (which is signal interrupt as i understand).
The waiting in the child process is important because if it exits before zeromq 
code, everything's fine and the server is patiently waiting.

My assumption here is that `bye` throws some signal? Why else would it affect 
zeromq in the parent process?

Just looking for some explanation. Maybe even the proper way to resolve this.


Actually, while writing this I found out about SIGCHLD which is apparently sent 
to parent on child's exit so I guess zmq_recv gets interrupted by that for some 
reason? Weird. Can anyone confirm that's what I'm seeing?

P.S. completely offtopic but since I'm here. I just noticed that semicolons 
aren't treated as comments. Why? Can it be enabled? Otherwise my Emacs' 
lisp-mode comment/uncomment function is useless and no comment highlight either.


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


Bye from forks sends signals?

2024-01-05 Thread Dmitry Non
Hey!

Is this newsletter alive?:)

Disclaimer: I'm not very familiar with system programming and POSIX


I'm playing around with `native` and ZeroMQ and found a curious behaviour.  

(unless (fork)
  (wait 2000)
  (bye))

(setq Context (native "libzmq.so" "zmq_ctx_new" 'P))
(setq ZMQ_REP 4)
(setq Socket (native "libzmq.so" "zmq_socket" 'P Context ZMQ_REP))
(native "libzmq.so" "zmq_bind" 'I Socket "tcp://*:")

(buf
 Buffer 10
 (prinl "Waiting for messages")
 (when (= -1 (native "libzmq.so" "zmq_recv" 'I Socket Buffer 10 0))
   (prinl (pack "Error: " (errno)


Basically, the main process sets up a server and waiting for a message and the 
child process simply waits for a bit and exits with `bye`.

The `errno` is 4 (which is signal interrupt as i understand).
The waiting in the child process is important because if it exits before zeromq 
code, everything's fine and the server is patiently waiting.

My assumption here is that `bye` throws some signal? Why else would it affect 
zeromq in the parent process?

Just looking for some explanation. Maybe even the proper way to resolve this.


Actually, while writing this I found out about SIGCHLD which is apparently sent 
to parent on child's exit so I guess zmq_recv gets interrupted by that for some 
reason? Weird. Can anyone confirm that's what I'm seeing?

P.S. completely offtopic but since I'm here. I just noticed that semicolons 
aren't treated as comments. Why? Can it be enabled? Otherwise my Emacs' 
lisp-mode comment/uncomment function is useless and no comment highlight either.


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


Unsubscribe

2024-01-04 Thread Stephen Medina
Good bye Stephen Medina  :-(
You are now unsubscribed


Unsubscribe



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


Subscribe

2024-01-04 Thread Dmitry Non
Hello Dmitry Non  :-)
You are now subscribed


Hello world

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


Subscribe

2024-01-04 Thread Christian Ruesch
Hello Christian Ruesch  :-)
You are now subscribed



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


Re: External allocations using miniPicoLisp

2023-12-03 Thread Alexander Burger
Hi Kashyap,

> I think "finally" will do what I need :)

Yes, good idea!

☺/ A!ex

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


Unsubscribe

2023-12-03 Thread Jan-Felix Wittmann
Good bye Jan-Felix Wittmann  :-(
You are now unsubscribed


Gesendet von Outlook für Android

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


Re: External allocations using miniPicoLisp

2023-12-03 Thread C K Kashyap
Thanks Alex,

The penny just dropped for me as I was writing this mail - yup, I remember
now :)
I think "finally" will do what I need :)

Regards,
Kashyap


On Sat, Dec 2, 2023 at 11:35 PM Alexander Burger 
wrote:

> Hi Kashyap,
>
> > Is there a reference implementation of external allocation using
> > miniPicoLisp?
> >
> > Here's what I'd like to do - Create a new function called "alloc" that
> > allocates some memory.
> >
> > (let A (alloc 100)
> >   (poke A 0 10)) # poke simply writes a byte(10) at offset 0
>
> I do not know if anybody has done this in miniPicoLisp, but the official
> PicoLisp has functions 'buf' and 'byte' which behave that way:
>
>(buf A 100  # Allocate on the stack
>   (byte A 10)
>   (byte (+ A 7) 11)
>   ... )
>
> 'buf' allocates memory on the runtime stack, and cleans it up when done.
>
>
> You can also explicitly allocate system memory to get the same effect, but
> this
> has more overhead:
>
>(let A (%@ "malloc" 'P 100)  # Allocate memory
>   (byte A 10)
>   ...
>   (%@ "free" NIL A) )  # Clean up
>
>
> > The part I want to ensure is that the memory that's allocated by alloc
> gets
> > collected by the GC.
>
> This does not make sense. The garbage collector traverses the 'heap'
> structures,
> managing used and unused cells (as discussed in our last mail). Memory
> allocated
> by 'buf' or malloc() does not contain cells reachable from Lisp data
> structures,
> and is therfore not known by the garbage collector. And as it is not part
> of the
> linked list of 'heap's, it will not be free'd.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Unsubscribe

2023-12-03 Thread Олег Тельнов



Re: External allocations using miniPicoLisp

2023-12-02 Thread Alexander Burger
Hi Kashyap,

> Is there a reference implementation of external allocation using
> miniPicoLisp?
> 
> Here's what I'd like to do - Create a new function called "alloc" that
> allocates some memory.
> 
> (let A (alloc 100)
>   (poke A 0 10)) # poke simply writes a byte(10) at offset 0

I do not know if anybody has done this in miniPicoLisp, but the official
PicoLisp has functions 'buf' and 'byte' which behave that way:

   (buf A 100  # Allocate on the stack
  (byte A 10)
  (byte (+ A 7) 11)
  ... )

'buf' allocates memory on the runtime stack, and cleans it up when done.


You can also explicitly allocate system memory to get the same effect, but this
has more overhead:

   (let A (%@ "malloc" 'P 100)  # Allocate memory
  (byte A 10)
  ...
  (%@ "free" NIL A) )  # Clean up


> The part I want to ensure is that the memory that's allocated by alloc gets
> collected by the GC.

This does not make sense. The garbage collector traverses the 'heap' structures,
managing used and unused cells (as discussed in our last mail). Memory allocated
by 'buf' or malloc() does not contain cells reachable from Lisp data structures,
and is therfore not known by the garbage collector. And as it is not part of the
linked list of 'heap's, it will not be free'd.

☺/ A!ex

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


External allocations using miniPicoLisp

2023-12-02 Thread C K Kashyap
Hi Alex et al,

Is there a reference implementation of external allocation using
miniPicoLisp?

Here's what I'd like to do - Create a new function called "alloc" that
allocates some memory.

(let A (alloc 100)
  (poke A 0 10)) # poke simply writes a byte(10) at offset 0

The part I want to ensure is that the memory that's allocated by alloc gets
collected by the GC.

Regards,
Kashyap


Re: possible bug in miniPicoLisp?

2023-11-30 Thread C K Kashyap
Got it.

Thanks Alex.

Regards,
Kashyap


On Wed, Nov 29, 2023 at 9:57 PM Alexander Burger 
wrote:

> On Wed, Nov 29, 2023 at 08:08:33PM -0800, C K Kashyap wrote:
> > Thanks Alex - half a dozen worked in my example :)
>
> Great :)
>
> > I completely get the idea of the inefficiency of CELLS=1 - the segfault
>
> OK
>
> > however seems like a silent bug (more likely some optimistic avoidance
> of a
> > NULL check somewhere perhaps). What do you think?
>
> Yes, it is definitely a bug if YOU set the heap to a bad size. As long as
> it is
> big enough, a runtime check is meaningless and will never fire.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: possible bug in miniPicoLisp?

2023-11-29 Thread Alexander Burger
On Wed, Nov 29, 2023 at 08:08:33PM -0800, C K Kashyap wrote:
> Thanks Alex - half a dozen worked in my example :)

Great :)

> I completely get the idea of the inefficiency of CELLS=1 - the segfault

OK

> however seems like a silent bug (more likely some optimistic avoidance of a
> NULL check somewhere perhaps). What do you think?

Yes, it is definitely a bug if YOU set the heap to a bad size. As long as it is
big enough, a runtime check is meaningless and will never fire.

☺/ A!ex

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


Re: possible bug in miniPicoLisp?

2023-11-29 Thread C K Kashyap
Thanks Alex - half a dozen worked in my example :)

I completely get the idea of the inefficiency of CELLS=1 - the segfault
however seems like a silent bug (more likely some optimistic avoidance of a
NULL check somewhere perhaps). What do you think?

I say this because, even with CELLS=1, most of the stuff just works
(meaning no segfault - granted, highly inefficient)
If sample.l is the following - no problem
(de test (Pat . Prg)
   (bind (fish pat? Pat)
  (unless (match Pat (run Prg 1))
 (msg Prg)
 (quit 'fail Pat) ) ) )

(test '(B) (find pair (1 A 2 (B) 3 CDE)))
(test 4 (find > (1 2 3 4 5 6) (6 5 4 3 2 1)))
(test 4 (find '((A B) (> A B)) (1 2 3 4 5 6) (6 5 4 3 2 1)))
(let (A -1  B 2  C 3)
   (test 'B (find '((X) (gt0 (val X))) '(A B C)))
   (test 2 @@) )
# (test "h"
#(pick '((X) (get X 'str))
#   (list (box) (prog1 (box) (put @ 'str "Hello")) (box)) ) )


Regards,
Kashyap

On Tue, Nov 28, 2023 at 10:51 PM Alexander Burger 
wrote:

> Hi Kashyap,
>
> > I attempted to use 1 as the CELLS value in pico.h and immediately ran
> into
> > segfault
>
> Yes, this is not a good idea ;)
>
> CELLS is the number of cells per heap
>
>typedef struct heap {
>   cell cells[CELLS];
>   struct heap *next;
>} heap;
>
> and PicoLisp allocates as many heaps as needed.
>
> Setting it to 1 creates a huge overhead, because then you'll have one
> 'next'
> link for every cell.
>
> The cells in the heaps are maintained to hold internal linked lists for the
> unused cells. Probably this will not work if CELLS is 1.
>
>
> > Why am I trying CELLS = 1? Just poking around - I was just trying to
> figure
> > out the min number of CELLS I needed for certain programs.
>
> You can get the number of cells in a function with 'size':
>
>: (size '(a b c))
>-> 3
>
>: (pp 'test)
>(de test ("Pat" . "Prg")
>   (bind (fish pat? "Pat")
>  (unless (match "Pat" (run "Prg"))
> (msg "Prg")
> (quit "'test' failed" "Pat") ) ) )
>-> test
>
>: (size test)
>-> 23
>
> Even a minimal system needs a few thousand cells.
>
> Setting CELLS to just a few dozens would work, but the overhead of
> maintaining
> so many heaps will become relatively large.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: possible bug in miniPicoLisp?

2023-11-28 Thread Alexander Burger
Hi Kashyap,

> I attempted to use 1 as the CELLS value in pico.h and immediately ran into
> segfault

Yes, this is not a good idea ;)

CELLS is the number of cells per heap

   typedef struct heap {
  cell cells[CELLS];
  struct heap *next;
   } heap;

and PicoLisp allocates as many heaps as needed.

Setting it to 1 creates a huge overhead, because then you'll have one 'next'
link for every cell.

The cells in the heaps are maintained to hold internal linked lists for the
unused cells. Probably this will not work if CELLS is 1.


> Why am I trying CELLS = 1? Just poking around - I was just trying to figure
> out the min number of CELLS I needed for certain programs.

You can get the number of cells in a function with 'size':

   : (size '(a b c))
   -> 3

   : (pp 'test)
   (de test ("Pat" . "Prg")
  (bind (fish pat? "Pat")
 (unless (match "Pat" (run "Prg"))
(msg "Prg")
(quit "'test' failed" "Pat") ) ) )
   -> test

   : (size test)
   -> 23

Even a minimal system needs a few thousand cells.

Setting CELLS to just a few dozens would work, but the overhead of maintaining
so many heaps will become relatively large.

☺/ A!ex

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


possible bug in miniPicoLisp?

2023-11-28 Thread C K Kashyap
Hi Alex,
I attempted to use 1 as the CELLS value in pico.h and immediately ran into
segfault at mark(ApplyArgs); in gc.c. I got around the segfault by simply
doing this -

   if(ApplyArgs)mark(ApplyArgs);
   if(ApplyBody)mark(ApplyBody);

After that, most things work but I ran into another segfault while trying
to run this sample.l file

## sample.l
(de test (Pat . Prg)
   (bind (fish pat? Pat)
  (unless (match Pat (run Prg 1))
 (msg Prg)
 (quit 'fail Pat) ) ) )

(test "Hello"
   (pick '((X) (get X 'str))
  (list (box) (prog1 (box) (put @ 'str "Hello")) (box)) ) )

kashyap@DESKTOP-NICP8CC:~/s/miniPicoLisp/src$ ../bin/picolisp sample.l
Segmentation fault


I'd appreciate any pointers.

Why am I trying CELLS = 1? Just poking around - I was just trying to figure
out the min number of CELLS I needed for certain programs.

Regards,
Kashyap


Re: pil21 installation fail

2023-11-15 Thread polifemo
Ok, I solved the issue by setting and exporting the environment variable
TMPDIR to /tmp . For some reason clang had no place to save the temporary
files generated during compilation, so I think clang just did not generate
them. I think that was the "clang-16: error: unable to make temporary file:
No such file or directory" error.

Thanks Abu for the clue ;)

On Sun, Nov 12, 2023 at 1:46 AM Alexander Burger 
wrote:

> On Sat, Nov 11, 2023 at 04:14:02PM -0500, polifemo wrote:
> > clang-16: error: unable to make temporary file: No such file or directory
> > make: *** [Makefile:32: ../lib/sysdefs] Error 1
> > ```
> >
> > I think it's trying to search for the sysdefs.c file in pil21/lib, but
> the
> > file is in pil21/src. But I can be wrong.
>
> It does not say that sysdefs.c is not found, but that clang cannot create a
> temporary file.
>
> Where does clang create its temporary files?
>
> https://stackoverflow.com/questions/13336168 says:
>
>When not using the --save-temps option the temporary files are created
> in a
>default directory (i.e. $TMPDIR such as /tmp)
>
> Can you find but more?
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


Re: pil21 installation fail

2023-11-11 Thread Alexander Burger
On Sat, Nov 11, 2023 at 04:14:02PM -0500, polifemo wrote:
> clang-16: error: unable to make temporary file: No such file or directory
> make: *** [Makefile:32: ../lib/sysdefs] Error 1
> ```
> 
> I think it's trying to search for the sysdefs.c file in pil21/lib, but the
> file is in pil21/src. But I can be wrong.

It does not say that sysdefs.c is not found, but that clang cannot create a
temporary file.

Where does clang create its temporary files?

https://stackoverflow.com/questions/13336168 says:

   When not using the --save-temps option the temporary files are created in a
   default directory (i.e. $TMPDIR such as /tmp)

Can you find but more?

☺/ A!ex

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


pil21 installation fail

2023-11-11 Thread polifemo
I just downloaded the latest pil21.tgz (2023-11-11) in my linux box. The
installation fails immediately with:

```
clang-16: error: unable to make temporary file: No such file or directory
make: *** [Makefile:32: ../lib/sysdefs] Error 1
```

I think it's trying to search for the sysdefs.c file in pil21/lib, but the
file is in pil21/src. But I can be wrong.

I'm running archlinux, this is the `uname -a`:
Linux pc 6.5.8-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 19 Oct 2023 22:52:14
+ x86_64 GNU/Linux


Unsubscribe

2023-11-10 Thread Mart Zirnask
Good bye Mart Zirnask  :-(
You are now unsubscribed




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


Re: Frozen Pilbox

2023-11-09 Thread Alexander Burger
On Thu, Nov 09, 2023 at 08:08:22AM +0100, Alexander Burger wrote:
> Now I understand the problem!
> 
> "App.l" has three garbage bytes in the beginning;

I tried on another device. It is all not such a big problem :)

Though PilBox cannot initialize with that faulty file, you can just fix it, and
zip and termux-share it once more. PilBox then starts up fine again.

So it is not true what you wrote, i.e. that termux-share does not work in this
broken state. The unpacking and installation of ZIP files happens on the Java
level *before* any Lisp is started, so you can always undo any mistakes.

☺/ A!ex

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


Re: Frozen PilBox

2023-11-08 Thread Alexander Burger
On Thu, Nov 09, 2023 at 02:37:12AM +, Shaughan Lavine wrote:
> The cache needs to cleared for a new style to take effect. Is that a bug?

No. PilBox (and PicoLisp in general) caches CSS files for 24 hours.

See line 34 in @lib/http.l

   (`(chop "css") "text/css" 86400)

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-08 Thread Alexander Burger
Hi Shaughan,

> Yeah, I'm pretty curious too. The zip opens fine in at least one other App.
> I've attached it. Maybe you will see something.

Now I understand the problem!


"App.l" has three garbage bytes in the beginning;

~/tmp ~/pil21/pil +
: (hd "test/App.l")
  EF BB BF 22 54 65 73 74 22 0A 0A 28 6D 65 6E 75  ..."Test"..(menu
0010  20 22 54 65 73 74 22 0A 20 20 20 28 3C 68 31 3E   "Test".   (
0020  20 22 63 65 6E 74 65 72 20 66 68 22 20 22 54 65   "center fh" "Te
0030  73 74 21 22 29 20 29 0A  st!") ).
-> NIL
: (bin (hex "EF"))
-> "1110"
: (bin (hex "BB"))
-> "10111011"
: (bin (hex "BF"))
-> "1011"

The first byte is "1110", which is the first byte of a *four* byte UTF-8
sequence. This usually not really a problem, PicoLisp just reads a garbage
character.

I have of course not tried to install the file, but obviously PilBox gets
confused. It expects a certain structure in the first line of each "App.l" found
upon startup.

It skips until the *next* double quote, and 'load's possible further files. As
the *first* double quote is already eaten up by that bad byte sequence, it
starts from the last double quote of "Test".

I will try to make this more robust.

☺/ A!ex

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


Frozen PilBox

2023-11-08 Thread Shaughan Lavine
The cache needs to cleared for a new style to take effect. Is that a bug?



–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.

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


Frozen PilBox

2023-11-08 Thread Shaughan Lavine
Oops! I meant to say that it only appears in (global) lib.css.


–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.

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


Frozen PilBox

2023-11-08 Thread Shaughan Lavine
A!ex–
Some other weirdness:
I change test/App.l to
--
"Test"

(menu "Test!"
   ( "h1Style" "Test!") )
--
and add App.l
--
h1Style {
   color: green;
}

and, guess what? Green, as expected.
But I edit lib.css to
--
h1Style {
   color: red;
}
--
the color remains green!
The word "green" afaict appears in no other files loaded in PilBox except 
App.l. I'm very confused.



–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.

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


Re: Frozen Pilbox

2023-11-08 Thread Shaughan Lavine
Yeah, I'm pretty curious too. The zip opens fine in at least one other App. 
I've attached it. Maybe you will see something. I used termux-share to load 
hello.zip and then edited that into the test app. The result works fine.



–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.


On Wednesday, November 8th, 2023 at 11:20 AM, Alexander Burger 
 wrote:


> On Wed, Nov 08, 2023 at 07:06:59PM +, Shaughan Lavine wrote:
>
> > "termux-share test.zip" once again froze everything. "termux-share 
> > hello.zip"
> > worked fine. I'm stumped by that, but I'm going back to what I was doing
> > before—with better backups.
>
>
> I'd really like to know the reason. Is the ZIP damaged? Or is it the name 
> "test"
> which conflicts somehow?
>
> ☺/ A!ex
>
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe<>


Unsubscribe

2023-11-08 Thread Cooper Healy



Re: Frozen Pilbox

2023-11-08 Thread Alexander Burger
On Wed, Nov 08, 2023 at 07:06:59PM +, Shaughan Lavine wrote:
> "termux-share test.zip" once again froze everything. "termux-share hello.zip"
> worked fine. I'm stumped by that, but I'm going back to what I was doing
> before—with better backups.

I'd really like to know the reason. Is the ZIP damaged? Or is it the name "test"
which conflicts somehow?

☺/ A!ex


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


Re: Frozen Pilbox

2023-11-08 Thread Alexander Burger
Hi Shaughan,

> The update did nothing, so I uninstalled then reinstalled, and, lo and behold,
> my main app was still there, with only two days worth of data missing.

Great! I remember the opposite case. We could not get rid of old data, even over
a re-install, unless we went to "Memory and Cache" in the Android settings for
PilBox, and cleared memory and cache explicitly.

☺/ A!ex

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


Limited Email Access Re: Frozen Pilbox

2023-11-08 Thread Howard Porter
I have very limited email access.  If you need to reach me, please call.Thanks.H.


Re: Frozen Pilbox

2023-11-08 Thread Shaughan Lavine
A!ex–
"termux-share test.zip" once again froze everything. "termux-share hello.zip" 
worked fine. I'm stumped by that, but I'm going back to what I was doing 
before—with better backups.
–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.


On Tuesday, November 7th, 2023 at 11:21 PM, Alexander Burger 
 wrote:


> On Tue, Nov 07, 2023 at 10:07:12PM +, Shaughan Lavine wrote:
> 
> > I'll most certainly wait till tomorrow and see if updating does the job

Re: Frozen Pilbox

2023-11-08 Thread Shaughan Lavine
The update did nothing, so I uninstalled then reinstalled, and, lo and behold, 
my main app was still there, with only two days worth of data missing. The 
hello app, which was installed, and the test app I was installing are nowhere 
to be seen. I don't understand how this is possible—I thought un/re-installing 
would delete everything—but I'll take it. Thanks for all your help.



–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.


On Tuesday, November 7th, 2023 at 11:21 PM, Alexander Burger 
 wrote:


> On Tue, Nov 07, 2023 at 10:07:12PM +, Shaughan Lavine wrote:
> 
> > I'll most certainly wait till tomorrow and see if updating does the job

Re: Frozen Pilbox

2023-11-07 Thread Alexander Burger
On Tue, Nov 07, 2023 at 10:07:12PM +, Shaughan Lavine wrote:
> I'll most certainly wait till tomorrow and see if updating does the job.

Now I released PilBox 23.11.8 to PlayStore.

It may take some time to propagate, but you can also download it as ever from

   https://software-lab.de/pilBox.apk

and the sources from

   https://software-lab.de/PilBox.tgz

Hope this helps :)

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-07 Thread Alexander Burger
Hi Shaughan,

> A!ex–
> I'll most certainly wait till tomorrow and see if updating does the job. I
> would have tried that earlier, but I don't know how to force a reinstall.

When PilBox starts up, it checks the file "Version". If this file does not exist
or has a different value, all Lisp files from the APK replace the old ones.

If I messed something up, I sometimes simply do (call "rm" "Version") and then
restart PilBox, but this is no option here as you cannot get a REPL.

If you build or get a new version, "Version" will have changed in the new APK
and everything is installed. Other data in PilBox are not deleted or modified.

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-07 Thread Shaughan Lavine
A!ex–
I'll most certainly wait till tomorrow and see if updating does the job. I 
would have tried that earlier, but I don't know how to force a reinstall. I 
frequently copy everything into the PilBox /storage/emulated/0/… directory. I 
can see files in there with Total Commander, and I have full access to those 
with permission 660. Unfortunately for present purposes the default is 600.



–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.


On Tuesday, November 7th, 2023 at 1:48 PM, Alexander Burger 
 wrote:


> Hi Shaughan,
> 
> > Ah well, unless you have any further suggestions, lesson learned. I'll only
> > lose 12 days of data, and I'll fix permissions so it won't happen again

Re: Frozen Pilbox

2023-11-07 Thread Alexander Burger
Hi Shaughan,

> Ah well, unless you have any further suggestions, lesson learned. I'll only
> lose 12 days of data, and I'll fix permissions so it won't happen again.
> For want of a permission, the data was lost, and all for the wane of a chmod
> 660

I don't quite understand. What permissions did you change, and how?

Would it help to install a new PilBox version? This would overwrite just PilBox
itself, but not your data. I was planning a new release tomorrow anyway.

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-07 Thread Shaughan Lavine
No joy: pty never connects, termux-share times out with a "PilBox is not 
responding" toast, and adb doesn't give access to system files. Your detailed 
instructions for replacing App.l, for all that it didn't work, were very 
helpful. I would have had to find the url, then unpacked everything to find the 
file. And copy and pasting is much easier than typing on a phone.
Ah well, unless you have any further suggestions, lesson learned. I'll only 
lose 12 days of data, and I'll fix permissions so it won't happen again.
For want of a permission, the data was lost, and all for the wane of a chmod 
660 


–Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c

If I replace all the old parts in my PC with new ones, will it turn into a 
Greek ship?

https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts


…if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade.

"Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3.


"I do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance."

Paul Krugman, "The theory of interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade


If war was arithmetic, mathematicians would rule the world.

Littlefinger, _Game of Thrones, Season 2, Episode 4


Not everybody benefits from a misspent youth.

Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28.


Sent from ProtonMail, encrypted email based in Switzerland.


On Monday, November 6th, 2023 at 11:45 PM, Alexander Burger 
 wrote:


> On Tue, Nov 07, 2023 at 07:15:07AM +, Shaughan Lavine wrote:
> 
> > ~ $ unzip -l storage/shared/Download/test.zip
> > Archive: storage/shared/Download/test.zip
> > Length Date Time Name
> > - -- - 
> > 0 2023-11-06 16:27 test/
> > 56 2023-11-06 16:28 test/App.l
> > ...
> > --
> > "Test"
> > 
> > (menu "Test"
> > ( "center fh" "Test!") )
> > --
> 
> 
> This looks all perfectly correct.
> 
> > I can't use bin/pty, since pilbox isn't starting properly. I tried, but it 
> > just times out.
> 
> 
> Then perhaps somehow the file "App.l" in the PilBox home directory (i.e. the
> PilBox app itself) got overwritten?
> 
> You could try to restore "App.l", by extracting it from the sources.
> 
> You probably know, but for the records:
> 
> $ curl -O https://software-lab.de/PilBox.tgz
> $ tar xfz PilBox.tgz PilBox/assets/run/App.l
> $ cd PilBox/assets/run/
> $ zip -r a.zip App.l
> $ termux-share a.zip
> 
> Let's hope ;)
> 
> ☺/ A!ex
> 
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

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


Re: Announce: Database 'search' Function

2023-11-07 Thread Alexander Burger
Hi Abraham,

> I see how I can 'and' criteria together, but can I 'or'?

Yes, but you need to supply Custom Generator and Filter functions.

The documentation has an example for this in "Multiple Indexes", where a
telephone number being searched for may be in the landline *OR* in the mobile
index. The example uses the existing 'relQs' function which in turn generates
the necessary generator and filter functions.


> For instance I
> have a search for items where I want to return all of them that have a link
> to 1 or more tags in a list. Right now I was running the search for each of
> my tags and using 'push1' to get the desired results. Is there a better way?

Perhaps, but it is a bit tedious to supply the proper functions.

What are the "tags" in your case? As you talk about "link"s, I assume they are
(+Ref +Link)s to other objects.

If so, if we take itams and supuliers from the demo app, then items can be
searched by suppliers. Let's assume we have a list of 2 suppliers ({C1} {C2}),
we can search for their items with:

 (for
   (Q
  (search
 '({C1} {C2})  # List of suppliers
 (quote
((X) (cons (list X) pop))  # Generator
((X Val) (memq X Val))  # Filter
(sup +Item) ) )  # Association to item by 'sup' index
  (search Q) )
   (show @) )

☺/ A!ex

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


Re: Announce: Database 'search' Function

2023-11-07 Thread Abraham Palmer
I see how I can 'and' criteria together, but can I 'or'? For instance I
have a search for items where I want to return all of them that have a link
to 1 or more tags in a list. Right now I was running the search for each of
my tags and using 'push1' to get the desired results. Is there a better way?
--Abraham

On Wed, Oct 25, 2023 at 9:14 AM Alexander Burger 
wrote:

> Hi all,
>
> since version 23.10.23 PicoLisp has a new 'search' function. It allows to
> search
> the database for a combination of search criteria:
>
>https://software-lab.de/doc/search.html
>
>
> 'search' provides the same functionality as the Pilog 'select/3' predicate
>
>https://software-lab.de/doc/select.html
>
> but is much simpler to use, two to three times faster, and more general.
>
>
> It is recommended to use 'search' instead of 'select/3' for new projects.
> In the
> long term, 'select/3' will be deprecated.
>
>
> I have already replaced 'select/3' and the other Pilog database predicates
> in
> public projects:
>
>
> -- The PicoLisp tutorial
>
>   https://software-lab.de/tut.tgz
>
>Relevant here is the "family" application
>
>
> -- Demo app
>
>   https://software-lab.de/demoApp.tgz
>
>Online at https://picolisp.com/app
>
>The old version is still available for comparisons in
>https://software-lab.de/demoApp.pilog.tgz
>
>
> -- PicoLisp Wiki
>
>   https://software-lab.de/wiki.tgz
>
>Online at https://picolisp.com/wiki
>
>
> -- Open StreetMap demo
>
>   https://software-lab.de/osm.tgz
>
>Described in https://picolisp.com/wiki/?osmgeodata
>Online at https://picolisp.com/osm
>
> I hope that 'search' turns out to be useful.
>
> ☺/ A!ex
>
> --
> UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe
>


-- 
http://boxturtlebakery.com
(919)357-6034
abra...@boxturtlebakery.com


Re: Frozen Pilbox

2023-11-07 Thread Alexander Burger
On Tue, Nov 07, 2023 at 07:33:29AM +, Shaughan Lavine wrote:
> Would it have been ok to just create the test directory (!mkdir test), copy
> App.l into it, and add PIL-test? I would find that simpler than the zip then
> share dance.

Yes. You don't even need PIL-test. The PIL-* files are only for the zip
uploading, and viewing and deleting in the GUI.

Just creating a directory with a file "App.l" is enough.

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-06 Thread Alexander Burger
On Tue, Nov 07, 2023 at 07:15:07AM +, Shaughan Lavine wrote:
> ~ $ unzip -l storage/shared/Download/test.zip
> Archive: storage/shared/Download/test.zip
> Length Date Time Name
> - -- - 
> 0 2023-11-06 16:27 test/
> 56 2023-11-06 16:28 test/App.l
> ...
> --
> "Test"
> 
> (menu "Test"
> ( "center fh" "Test!") )
> --

This looks all perfectly correct.


> I can't use bin/pty, since pilbox isn't starting properly. I tried, but it 
> just times out.

Then perhaps somehow the file "App.l" in the PilBox home directory (i.e. the
PilBox app itself) got overwritten?

You could try to restore "App.l", by extracting it from the sources.

You probably know, but for the records:

   $ curl -O https://software-lab.de/PilBox.tgz
   $ tar xfz PilBox.tgz PilBox/assets/run/App.l
   $ cd PilBox/assets/run/
   $ zip -r a.zip App.l
   $ termux-share a.zip

Let's hope ;)

☺/ A!ex

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


Re: Frozen Pilbox

2023-11-06 Thread Shaughan Lavine
Thanks! I'll try that in the morning. A related question:
Would it have been ok to just create the test directory (!mkdir test), copy 
App.l into it, and add PIL-test? I would find that simpler than the zip then 
share dance.

–Shaughan openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c If I replace all 
the old parts in my PC with new ones, will it turn into a Greek ship? 
https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts
 …if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade. "Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3. "I 
do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance." Paul Krugman, "The theory of 
interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade If war was 
arithmetic, mathematicians would rule the world. Littlefinger, _Game of 
Thrones, Season 2, Episode 4 Not everybody benefits from a misspent youth. 
Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28. 
Sent from ProtonMail, encrypted email based in Switzerland.

Sent from Proton Mail mobile

 Original Message 
On Nov 6, 2023, 10:51 PM, Alexander Burger wrote:

> On Tue, Nov 07, 2023 at 07:28:27AM +0100, Alexander Burger wrote: > The 
> easiest fix is connecting via 'bin/pty' to a REPL and doing "rm -r test/". 
> This was not completely correct. Of course it is : (call "rm" "-r" "test/") 
> Just in case you have not enabled PTY yet: As you cannot use the built-in 
> REPL of PilBox now, you can upload the necessary ".pty" file also via zip. 
> E.g. on Termux: $ cd $ vi .pty $ zip -r x.zip .pty $ termux-share x.zip $ 
> pil21/bin/pty ☺/ A!ex -- UNSUBSCRIBE: 
> mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Frozen Pilbox

2023-11-06 Thread Shaughan Lavine
A!ex–
Thanks, as always, for your rapid reply.
~ $ unzip -l storage/shared/Download/test.zip
Archive: storage/shared/Download/test.zip
Length Date Time Name
- -- - 
0 2023-11-06 16:27 test/
56 2023-11-06 16:28 test/App.l
- ---
56 2 files
--
App.l
--
"Test"

(menu "Test"
( "center fh" "Test!") )
--
I can't use bin/pty, since pilbox isn't starting properly. I tried, but it just 
times out. I'm going to see what I can do with adb in the morning.

Best,
Shaughan

openpgp4fpr:c04203ea8983566aed3848a33e06c22a1841ba3c If I replace all the old 
parts in my PC with new ones, will it turn into a Greek ship? 
https://www.reddit.com/r/shittyaskscience/comments/4wni7d/if_i_replace_all_the_old_parts_in_my_pc_with_new/?ref=search_posts
 …if you're just gonna end up in Arizona, then being dead isn't that much of a 
downgrade. "Darlene, Mr. Robot, eps2.1k3rnel-pan1c.ksd, season 2, episode 3. "I 
do not pretend here to develop a theory which is _universally_ valid, but it 
may at least have some galactic relevance." Paul Krugman, "The theory of 
interstellar trade," 1978, p. 2. 
http://fermatslibrary.com/s/the-theory-of-interstellar-trade If war was 
arithmetic, mathematicians would rule the world. Littlefinger, _Game of 
Thrones, Season 2, Episode 4 Not everybody benefits from a misspent youth. 
Thomas Pynchon, _Bleeding Edge: A Novel_ (Penguin, New York, 2013) Chapter 28. 
Sent from ProtonMail, encrypted email based in Switzerland.

Sent from Proton Mail mobile

 Original Message 
On Nov 6, 2023, 10:28 PM, Alexander Burger wrote:

> Hi Shaughan, > I created a copy of the Hello World example, changed "Hello 
> World" to "Test" > everywhere placed in a folder named "test", zipped it, 
> then used Termux to share > it with Pilbox. This sounds all correct. > > 
> Pilbox now displays as a completely black screen with the logo in the middle, 
> > and does nothing. I cleared the cache, force stopped the app, ano rebooted. 
> No > change. I have lots of data in another app within Pilbox, so I can't 
> just > reinstall. Any suggestions? I can provide further details of other 
> things I had > done before, but I don't know whether it would be relevant. 
> Android 13. What might be wrong with the ZIP? Does it contain just one single 
> file named "App.l"? If so, nothing else in PilBox should be overwritten, and 
> the problem can be only in the first line of that file, because nothing else 
> is read at PilBox startup. Can you post the output of "unzip -l test.zip" and 
> the content of "App.l"? Attaching the whole ZIP to a mail here is probably 
> not a good idea due to spam filtering. The easiest fix is connecting via 
> 'bin/pty' to a REPL and doing "rm -r test/". ☺/ A!ex -- UNSUBSCRIBE: 
> mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: Frozen Pilbox

2023-11-06 Thread Alexander Burger
On Tue, Nov 07, 2023 at 07:28:27AM +0100, Alexander Burger wrote:
> The easiest fix is connecting via 'bin/pty' to a REPL and doing "rm -r test/".

This was not completely correct. Of course it is

   : (call "rm" "-r" "test/")


Just in case you have not enabled PTY yet: As you cannot use the built-in REPL
of PilBox now, you can upload the necessary ".pty" file also via zip.

E.g. on Termux:

   $ cd
   $ vi .pty
   $ zip -r x.zip .pty
   $ termux-share x.zip
   $ pil21/bin/pty

☺/ A!ex

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


  1   2   3   4   5   6   7   8   9   10   >