Reworked main documentation page

2018-06-16 Thread Arie van Wingerden
Hi all,

I reworked the main doc page a bit:

   - bit more stylish (smaller font headers)
   - consistent grouping
   - moved a few links to the now separate examples page
   - and v.v.

Also I intend to continue to rework pages.

My todo's for near future are:

   - rework the frontpage of the Wiki, where I'll put the essence of the
   textual content of Tractatus Blaesicus
   - rework Tractatus Blaesicus itself to a nice(r) demo
   - create useful reference docs to the libraries

Best,
   Arie


Re: picolisp at last ?

2018-06-16 Thread Jean-Christophe Helary
> On Jun 16, 2018, at 20:46, Alexander Williams  wrote:
> 
> JC: wasn't your goal to use PicoLisp 64-bit? ;)

No the goal was to run it on the Mac, which *happens* to be 64bit :)

> I also have an RPi2, and can power it from the MacBook but there's always a 
> spinning rainbow in the top left corner of the display (low power). If you're 
> not connecting external USB disks, it should be fine.

You're right, that's probably not the best idea. I'm checking external 
batteries at the moment. Fascinating the amount of accessories there are for 
the RP...

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


Re: PLEAC last part finished (File Access)

2018-06-16 Thread Alexander Burger
On Sat, Jun 16, 2018 at 03:56:15PM +0200, Arie van Wingerden wrote:
> Or do you mean e.g. something line:
>   ./script mailto:picolisp@software-lab.de?subject=Unsubscribe


Re: PLEAC last part finished (File Access)

2018-06-16 Thread Alexander Burger
Hi Arie,

> please have a look.
> I am still not very sure about the read STDIN until EOF.

Yes, the examples are a bit meaningless as they are now.

> I created a small script, but when is EOF of STDIN really signalled???

Concerning stdinread: You need an (in NIL ..), because when the script runs, the
*current* input channel is still the script itself (this is the nature of a Lisp
interpreter). So if you write

   #!/usr/bin/picolisp /usr/lib/picolisp/lib.l
   (in NIL
  (println "Type a few lines and end with ctrl+d")
  (setq Var (in NIL (till NIL T)))
  (prinl Var)
  (println "Program is finished!") )
   (bye)

and then do

   $ { echo abc; echo def; } | ./stdinread
   "Type a few lines and end with ctrl+d"
   abc
   def

   "Program is finished!"

Note that starting ./stdinread and then typing works but will not print any
output, because ^D terminates the interpreter.

The other examples are fine, aren't they?

♪♫ Alex

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


Re: PLEAC last part finished (File Access)

2018-06-16 Thread Arie van Wingerden
OK. I changed that to an example using redirection of STDIN to a file.

2018-06-16 15:56 GMT+02:00 Arie van Wingerden :

> Or do you mean e.g. something line:
>   ./script  ??
>
> Thx.
>
> 2018-06-16 15:38 GMT+02:00 Arie van Wingerden :
>
>> Hi Alex,
>>
>> please have a look.
>>
>> I am still not very sure about the read STDIN until EOF.
>>
>> I created a small script, but when is EOF of STDIN really signalled???
>>
>> Maybe a small example?
>>
>> Thx,
>>Arie
>>
>
>


Re: PLEAC last part finished (File Access)

2018-06-16 Thread Arie van Wingerden
Or do you mean e.g. something line:
  ./script :

> Hi Alex,
>
> please have a look.
>
> I am still not very sure about the read STDIN until EOF.
>
> I created a small script, but when is EOF of STDIN really signalled???
>
> Maybe a small example?
>
> Thx,
>Arie
>


PLEAC last part finished (File Access)

2018-06-16 Thread Arie van Wingerden
Hi Alex,

please have a look.

I am still not very sure about the read STDIN until EOF.

I created a small script, but when is EOF of STDIN really signalled???

Maybe a small example?

Thx,
   Arie


Re: PLEAC Pattern Matching ready

2018-06-16 Thread Arie van Wingerden
​Hi,
​


> Yes, fully. But also (>= "Z" C "A")
>

​Right!
​

> > > Also a few lines down:  (chop "abcd efg")))
> > ​?? What is wrong?
> Only the spacing of closing parens  (chop "abcd efg") ) )
>

​OK! I'll take the pp advice :)

Thx. again!
   Arie​


Re: PLEAC Pattern Matching ready

2018-06-16 Thread Alexander Burger
On Sat, Jun 16, 2018 at 02:28:11PM +0200, Alexander Burger wrote:
> > ​?? What is wrong?
> 
> Only the spacing of closing parens  (chop "abcd efg") ) )

Concerning the indentation rules, the recommendation is to stay roughly
close to the output format of 'pp' / 'pretty'

♪♫ Alex

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


Re: PLEAC Pattern Matching ready

2018-06-16 Thread Alexander Burger
On Sat, Jun 16, 2018 at 02:18:46PM +0200, Arie van Wingerden wrote:
> >(de isalpha? (Lst)
> >   (fully
> >  '((C)
> > (or (>= "Z" C "A") (>= "z" C "a")) )
> >  Lst ) )
> 
> ​Great! Nice function. Didn't know that :)​

Yes, fully. But also (>= "Z" C "A")

> > Also a few lines down:  (chop "abcd efg")))
> 
> ​?? What is wrong?

Only the spacing of closing parens  (chop "abcd efg") ) )

♪♫ Alex

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


Re: PLEAC Pattern Matching ready

2018-06-16 Thread Arie van Wingerden
Hi,

This is a little inefficient, and the indentation and parenthesis
> placements are a
> not right. I would suggest:
>
>(de isalpha? (Lst)
>   (fully
>  '((C)
> (or (>= "Z" C "A") (>= "z" C "a")) )
>  Lst ) )
>

​Great! Nice function. Didn't know that :)​


> Also a few lines down:  (chop "abcd efg")))
>

​?? What is wrong?
You mean this example?

: (make
   (find
 '((C) (or (sp? C) (nil (link C
 (chop "abcd efg")))
   -> ("a" "b" "c" "d")

​It seems that this works OK?
Please explain!


> Besides this: Very good!
>

​Thx!
​

> I got quite fed up with PLEAC after a while. All the tasks are rather
> simple-
> minded, suitable mainly for Perl's focus on regular expressions (If you
> have a
> hammer, everything looks like a nail to you).
>

​Ah. OK! Well, I won't bother myself then to dive into the rest.
At least we've saved them from possible extinction :)

Best,
   Arie


Re: Question on PLEAC example

2018-06-16 Thread Alexander Burger
On Sat, Jun 16, 2018 at 02:05:33PM +0200, Arie van Wingerden wrote:
># Read STDIN till EOF
> 
>: (setq Var (in NIL (till NIL T)))
>This is a line
>a peaceful line
>it is not drunk
>it drinks no wine
># Here I pressed ctrl+d which forces PicoLisp to end
> 
> As discussed earlier you cannot simulate an EOF from STDIN.
> So, why then such example. It seems not useful at all...

No, it is useful in *scripts*. It is only the interactive REPL
which interferes with STDIN.

♪♫ Alex

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


Question on PLEAC example

2018-06-16 Thread Arie van Wingerden
Hi Alex,

just started on chapter 7.
You give this code as an example.

   # Read STDIN till EOF

   : (setq Var (in NIL (till NIL T)))
   This is a line
   a peaceful line
   it is not drunk
   it drinks no wine
   # Here I pressed ctrl+d which forces PicoLisp to end

As discussed earlier you cannot simulate an EOF from STDIN.
So, why then such example. It seems not useful at all...

Please comment :)

Thx,
   Arie


Re: picolisp at last ?

2018-06-16 Thread Alexander Williams

JC: wasn't your goal to use PicoLisp 64-bit? ;)

I'm actually using a ROCK64 (arm64) daily, and of course run PicoLisp 
64-bit on here. In terms of specs, it's **much** better than RPi3, but 
support is...


I also have an RPi2, and can power it from the MacBook but there's always 
a spinning rainbow in the top left corner of the display (low power). If 
you're not connecting external USB disks, it should be fine.



AW

On Fri, 15 Jun 2018, Jean-Christophe Helary wrote:




On Jun 14, 2018, at 22:55, Jean-Christophe Helary  wrote:


On Jun 14, 2018, at 22:15, O.Hamann mailto:o.ham...@gmx.net>> wrote:

I'm no really sure at the moment about 64bit picolisp,

but for 32bit  I  did that several years ago.


Now that I think about it, I do have an old 32bit RP that's gathering dust. 
It's probably a RP 1 so it runs on ARM 6 and...
The appropriate version of Raspian does have picolisp :)


Ok, after dusting off the unit and installing the latest raspbian, I managed to 
install picolisp, but not the most recent version, for that I need to 
reconfigure the keymap so that I can type properly with that usb Japanese 
keyboard :) Once I get the most recent repositories referenced, I'll have 1.7.. 
Then configure ssh and I'll be able to run the thing directly connected to the 
router. Pretty exciting :) I'm even wondering if I can't power the thing 
directly from the MacBookPro's usb port...


Jean-Christophe Helary
---
http://mac4translators.blogspot.com @brandelune





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


Re: PLEAC Pattern Matching ready

2018-06-16 Thread Alexander Burger
Hi Arie,

> please check chapter 6 on pattern matching.

Thanks!

   : (de isalpha? (Lst)
   (not
 (find
   '((C) (and
   (or (< C "A") (> C "Z"))
   (or (< C "a") (> C "z"
   Lst)))

This is a little inefficient, and the indentation and parenthesis placements 
are a
not right. I would suggest:

   (de isalpha? (Lst)
  (fully
 '((C)
(or (>= "Z" C "A") (>= "z" C "a")) )
 Lst ) )


Also a few lines down:  (chop "abcd efg")))

Besides this: Very good!


> This chapter and the following one are incomplete and all the rest was not
> yet done. Maybe that is something for the future:) I hope that some other
> PicoLispers have the courage to dive in and make PLEAC more complete. I'll

I got quite fed up with PLEAC after a while. All the tasks are rather simple-
minded, suitable mainly for Perl's focus on regular expressions (If you have a
hammer, everything looks like a nail to you).

♪♫ Alex

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