Re: DB- and GUI-Tutorials (was: PilCon tomorrowr)

2021-07-09 Thread cilz

Thank you very much Alex!

Regards,

Eric

Le 09/07/2021 à 19:30, Alexander Burger a écrit :

Hi all,

On Fri, Jul 09, 2021 at 09:07:16AM +0200, Alexander Burger wrote:

I could try to explain the three layers (external symbols, index trees and
entity/relations).

Several people asked in IRC and PM for the old tutorials which were part of the
pil32 and pil64 releases but are no longer included in pil21.

I had removed them because they require additional source and database files,
which I feel should not be part of a production release.

Therefore I ported these parts to pil21 today, and made them available as a
separate package:

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

This tarball can be extracted in some convenient place, and its contents viewed
starting from <...>/tut/index.html

I hope I fixed most incompatibilities and did not produce new errors.

☺/ A!ex




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


Re: Picolisp Outlook

2021-02-23 Thread cilz

Hello guys,

I' m just a hobbyist here, but if you're ok, this is my 2 cents.

As it has already been written by many, Picolisp has already many 
features that are IMHO killing features:


- simplicity

- the integrated web server + client library,

- the integrated NoSQL database + the integrated Prolog

All these features give you an integrated full stack. I don't know many 
other  programming languages which give you such a power.


However, as someone who just do programming for himself, besides this 
amazing community from which I have get so many help, I have sometimes 
missed some full examples of Picolisp use in order to find some ideas. 
For example, I found examples about OODB of the "ProDevTips" blog very 
useful.


In the past, I have been able to do some development in R, because of 
the so many examples that can be easily found on any topic.


Hence I kind of agree with Alex below, for me there's nothing to add yet 
to Picolisp, but to the documentation or IMHO provide some more "full" 
examples which demonstrate the full power of our beloved Picolisp.


Best,

Eric


Le 22/02/2021 à 09:00, Alexander Burger a écrit :

On Sun, Feb 21, 2021 at 05:17:59PM +0100, bied...@gmail.com wrote:

It's 2021, Software is eating the world, people are flocking to Python and
Javascript mainly, we're swimming in machine learning and AI and serverless
and what not. In the current times, where do you see the future of Picolisp
in the years to come? What do you see as the killer feature that could help

For me, the killer feature is *simplicity*. Anybody really interested should be
able to understand all levels of the language and runtime system, being in
control and immune to temporary hypes.


Picolisp to strive and survive? What do you think is missing in the
Picolisp ecosystem?

Documentation.

☺/ A!ex



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


Re: pil21: no more matching parenthesis in debug mode

2020-11-25 Thread cilz

Yes perfect! Thanks Alex

Le 25/11/2020 à 10:44, Alexander Burger a écrit :

set blink-matching-paren on


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


pil21: no more matching parenthesis in debug mode

2020-11-25 Thread cilz

Hi list,

I finally managed to install pil21 on my manjaro distro ;-) And yes I got:

(version) -> (21 0 0)

However I've noticed that there is no more matching parenthesis in debug 
mode. Am I missing something/doing something wrong?


Best, Eric


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


Re: Picolisp is the only language in the world, that can reason about database contents!

2020-05-06 Thread cilz


Le 06/05/2020 à 17:44, Guido Stepken a écrit :
Je ne veux pas faire sursauter trop tôt nos collègues lecteurs des 
États-Unis. Peut-être tu veux attendre quelques semaines de plus 
jusqu'à ce que des choses importantes soient décidées au niveau de l'UE.


Mais je peux toi assurer que des parties importantes viennent de France.

Ce sera une grande surprise pour eux.


Well, let's wait and see if there is any announcement in the coming 
weeks / months (/ Years)?


Eric



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


Re: Picolisp is the only language in the world, that can reason about database contents!

2020-05-06 Thread cilz


Le 06/05/2020 à 16:38, Guido Stepken a écrit :
> May be you can devise a tiny example to help us (at least the very 
noob like me) figure out what you're meaning with this awesome 
statement "Picolisp is the only language in the world, that can reason 
about database contents!"


It's all perfectly written down in Alex' documention on pilog:

https://software-lab.de/doc/select.html

Perhaps you should read the *whole documentation* about PicoLisp first.

Done, tkx.
Getting the *whole mindset* of PicoLisp is not easy, because Alex 
weaved into each other, what normaly is sold and mentally recognized 
as separate products: A Programming Language, a Prolog AI, a BTree 
Database Server, a Graph Database, a modern Web Framework ...

T, this really sets PicoLisp apart!


That's, what makes it so highly efficient to program with. 

+1
I've seen only two (complete, covering everything) simlilar other 
tools in my life, that is such efficient to program with.



I'm curious, what are those two similar other tools?

Best,

Eric



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


Re: Picolisp is the only language in the world, that can reason about database contents!

2020-05-06 Thread cilz


Le 06/05/2020 à 15:19, Guido Stepken a écrit :
Sorry, no tutorial handy ... i only have the full code, which i don't 
want to publish ...



Too bad!

May be you can devise a tiny example to help us (at least the very noob 
like me) figure out what you're meaning with this awesome statement 
"Picolisp is the only language in the world, that can reason about 
database contents!"


Hence, am I right if I consider PicoLisp as the root for building a 
"deductive database system"?


But Prolog, same as *pilog* is a declarative language, very easy to 
learn. What makes pilog unique is, that you can mix it with Lisp.


It's a relatively simple combinatorial problem, that can be divided 
into two (well, four) separate problems:


1st: Find the right, matching boxes to fulfill your 'special' 
customer's demands.


2nd: With the rest of fruits you let pilog reason about, what 
'standard packages' can be rebuilt from that.


3rd. Delete boxes from problem #1 from your inventory (PicoLisp)

4th. Add rebuilt boxes to inventory. There might be some fruits left 
over. (PicoLisp)


Now your homework! ;-)


yes!

Of course, you can implement it with pure Lisp, too! ;-)

Have fun!



Best,

Eric


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


Re: Picolisp is the only language in the world, that can reason about database contents!

2020-05-06 Thread cilz

Hi Guido,

I would love to see some (toy?) code example about this if you have some...

Thanks in advance, best,

Eric

Le 06/05/2020 à 09:27, Guido Stepken a écrit :
You all might have heard about 'pilog' a Prolog like AI system within 
Picolisp, where you can define rules, describe a situation and ask for 
solutions. What can you do with that?


Typically, items come bundled in all kinds of packages, repair 
packages, addons, ...


E.g. We have 30 (all slighly different) meal packages in stock with 
each (banana, apple, pear), (cherry, strayberry, apple), (strawberry, 
banana, orange) ...


All packages having a serial number, only available as complete 
package, 'all or nothing' - rule.


Business, so far, went well. But now we have good customer, ordering 3 
packages: (2x banana, 1 apple), (3 x strawberry), (1 orange,2 apples).


Now comes the question: What is the minimum number of precustomized 
packages i do have to destroy and unlist from the database and how can 
i repackage the rest to fit the scheme of custom packages, (re-)adding 
some 'new' packages (while reusing using old boxes)?


No problem for PicoLisp Pilog. You don't even have to program that. 
Simply give PicoLisp the rules, and let Pilog reason about it


And you even don't have to download all inventory into a Picolisp to 
find the perfect solution: ***Picolip Prolog is sitting in the 
database!!!***


I did implement that for a couple of hundred 'service points' for a 
huge manufacturer. Using Picolisp's built-in distributed database 
cluster. Now Pilog even can reason across several locations and their 
local inventory, saving them *incredible amounts* of money.


Of course, they had to learn howto rewrite their rules that change 
from day to day. Sometimes there is 'norule' day, e.g. when there is 
no personel available to repackage boxes. Pilog then recognizes that 
and does not reason across whole cluster database any longer.


Picolisp is unbeatable in logistics, far ahead of *any* competitor, 
for *any* money. At ZERO cost!!! This little thing is a *genius strike*!


Have fun!

Best regards, Guido Stepken





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


Re: Pil21 Status

2020-05-01 Thread cilz
Congrats! Thank you very much for your hard work. PicoLisp has been my 
best friend during this quarantine :) Best, Eric


Le 01/05/2020 à 15:41, Alexander Burger a écrit :

Hi all,

pil21 reached the first milestone:
It passes the bignum tests in @misc/bigtest :)

Next goal is self-bootstrap

☺/ A!ex



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


EU Lisp online now

2020-04-28 Thread cilz

Hi guys,

FYI EU Lisp 2020 is online now here: https://www.twitch.tv/elsconf

This could gives us some ideas for our own PiLCon 2020.

Best,

Eric


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



Re: PilCon 2020

2020-04-22 Thread cilz

Hello guys,

I too would be happy to "attend" such a virtual meeting ;-)

Take care, best

Eric

Le 22/04/2020 à 08:13, George-Phillip Orais a écrit :
Same here, as lurker and amateur PicoLisper, I love to join and the 
attend this online PilCon 2020, thank you Alex!



BR,
Geo


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de

?subjectUnsubscribe



Re: Installation and update

2020-03-20 Thread cilz

Hi Mike, All,

Thanks for these tips. I was not aware of: pil @lib/test.l +

to check the installation.

Here, I'm using Manjaro Linux and Picolisp can be installed from the Aur 
repo with:


yay -S picolisp

however it installs version (18-9-1) which is not up to date!

Install from source works well however.

Take care,

Eric


Le 07/01/2020 à 20:06, Mike a écrit :

hi all,

I've wrote all information how I do install and update of PicoLisp over all my 
machines.
Page contains 3 variations how to bootstrap to pil64.
https://git.envs.net/mpech/tankf33der/src/branch/master/install-picolisp.md

Comments and updates are welcome

(mike)



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


Re: Reactive programming

2019-11-22 Thread cilz

Hi Alex,

Thanks for these directions. I will try them out!

Best,

Eric

Le 22/11/2019 à 16:31, Alexander Burger a écrit :

Hi Eric,


Is there any way to have a web app watch a
file and update itself (as well as what is
displayed by the browser) as soon as the file
is changed?

Yes, I think the necessary ingredients are there.

For example, I use inotifywait to watch database replication files (in the fifo/
directory) and when they change start 'ssl' to replicate them to a remote
server. In startup scripts I have:

if test -z $(pgrep -u app -x inotifywait)
then
   echo inotifywait
   inotifywait -mq  -e modify  --format '%f' --exclude beat  fifo |
   while read F
   do
  if test -z $(pgrep -u app -f "bin/ssl .* $F.r")
  then
 bin/ssl remoteHost.de 443 $F.r/\!replica key/remoteHost fifo/$F 
db/$F/blob/ 20 20
  fi
   done &
fi

Instead of calling bin/ssl, you would start a script which connects to your
application locally and triggers an 'allow'ed function.

That function then could use Server Sent Events

https://picolisp.com/wiki/?ServerSentEvents

to update things on the user's screen.

☺/ A!ex



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


Reactive programming

2019-11-22 Thread cilz

Hello everybody,

Is there any way to have a web app watch a file and update itself (as 
well as what is displayed by the browser) as soon as the file is changed?


And also can I have this same page automatically be reloaded when the 
current date change for example?


If so, do you have any example or pointer to start with?

Thanks,

Eric


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


Re: Sort order not always kept when querying the database

2019-10-15 Thread cilz

Hello Alex,

Thanks for this message.

Le 09/10/2019 à 21:08, Alexander Burger a écrit :

Hi Eric,

thanks for sharing your code!

As far I could see on a first scan, it looks very good.



The result starts with "Wednesday" instead of
"Monday" as for the week 41 or other weeks!

The values have no inherent ordering, as they all have the same key (the
combination of year and day). So they may appear in any order, just by chance
starting on Monday (probably due to the order the objects were imported).

OK.

If you want to collect the days in order, you could just use the 'date' index,
and calculate the range from the week (I don't know that algorithm at the
moment. Assuming we had such functions, we could do

(collect 'date '+Agenda (weekStart 2019 42) (weekEnd 2019 42))

This would be the most efficient way.

Hum...

Otherwise you could sort it

   (by '((This) (: date)) sort (collect 'year '+Agenda (2019 42)))

with a little more overhead.


Yes this works very well. Now, I have all my weeks sorted from monday to 
sunday.


My new functions to achieve this:

# print any database outputs as a table.
(de showData (DBOutputs)
   (let Fmt *Params
  (tab Fmt "id" "date" "mag" "year" "mthnum" "mthtxt" "week" 
"daynum" "daytxt" "status")
  (tab Fmt "" "--" "--" "" "--" "--" 
"" "--" "--" "--")

  (for This DBOutputs
 (tab Fmt (: id) (: date) (: mag) (: year) (: monthnum)
  (: monthtxt) (: week) (: daynum) (: daytxt) (: 
status) ) ) ) )


# show a given week sorted by date.
# usage: (showThisWeek 2019 42)
(de showThisWeek (Year Week)
   (showData (by '((This) (: date)) sort (collect 'year '+Agenda (list 
Year Week )


Best,

Eric


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


Sort order not always kept when querying the database

2019-10-09 Thread cilz

Gear Guys,

This mail is a kind of follow-up to the thread started here: 
https://www.mail-archive.com/picolisp@software-lab.de/msg09124.html .


Based on Alex's tips I have set up my database like this:

(class +Agenda +Entity)
(rel id    (+Key +Number))
(rel date  (+Ref +Date))
(rel mag   (+Idx +String))
(rel year  (+Aux +Ref +Number) (week))
(rel monthnum  (+Ref +Number))
(rel monthtxt  (+Idx +String))
(rel week  (+Ref +Number))
(rel daynum    (+Ref +Number))
(rel daytxt    (+Idx +String))
(rel status    (+Idx +String))

I read the data from a text file which is in reverse order and looks 
like this for the current month:


# = Agenda =
"date" "mag" "status"
# = 2019 =
# - october

2019-10-31 XYZ ?
2019-10-30 XYZ ?
2019-10-29 XYZ ?
2019-10-28 XYZ ?
2019-10-27 XYZ Rh
2019-10-26 XYZ Rh
2019-10-25 XYZ Cp
2019-10-24 XYZ Cp
2019-10-23 XYZ Cp
2019-10-22 XYZ Cp
2019-10-21 XYZ Cp
2019-10-20 XYZ Rh
2019-10-19 XYZ J
2019-10-18 XYZ J
2019-10-17 XYZ O
2019-10-16 XYZ F
2019-10-15 XYZ Rh
2019-10-14 XYZ F
2019-10-13 XYZ F
2019-10-12 XYZ Rh
2019-10-11 XYZ Liv
2019-10-10 XYZ O
2019-10-09 XYZ Rh
2019-10-08 XYZ O
2019-10-07 XYZ F
2019-10-06 XYZ Rh
2019-10-05 XYZ J
2019-10-04 XYZ J
2019-10-03 XYZ Rdm
2019-10-02 XYZ J
2019-10-01 XYZ F

I read and feed the database with the following function:

(de feedAgendaDB (X)
   (in (list "grep" "-v" "#" X)
  (line) # skip the first line.
 (until (eof)
    # file schema: "date" "mag" "status"
    (let (Dat (read) Mag (read) Stat (read))
   (new! '(+Agenda)
  # DB schema: "id" "date" "mag" "year" "monthnum" 
"monthtxt" "week" "daynum" "daytxt" "status"

  'id   (format (pack (split (chop Dat) "-")))
  'date ($dat Dat "-")
  'mag  Mag
  'year (format (car (mapcar pack (split (chop Dat) 
"-"
  'monthnum (format (cadr (mapcar pack (split (chop 
Dat) "-"
  'monthtxt (get *MonFmt (format (cadr (mapcar pack 
(split (chop Dat) "-")

  'week (week ($dat Dat "-"))
  'daynum   (format (pack (get (split (chop Dat) "-") 3)))
  'daytxt   (day ($dat Dat "-"))
  'status   Stat ) ) ) ) )

where X is the file path.

In order to display the results of data queries I use these functions:

(setq *Params (-10 -9 -8 -7 -11 -11 -7 -8 -11 -8))

(de agendaShowOne (This)
   (let Fmt *Params
  (with This
 (tab Fmt (: id) (: date) (: mag) (: year) (: monthnum)
  (: monthtxt) (: week) (: daynum) (: daytxt) (: 
status) ) ) ) )


(de agendaShowAll (X)
   (mapcar agendaShowOne X) )

So far my main use of the data is to query the database to see what 
happen during one week and I do it this way:


(agendaShowAll (reverse (collect 'year '+Agenda (2019 41

with this result for the week 41:

20191007  737645   mag150  2019   10 October    41 7   
Monday F
20191008  737646   mag150  2019   10 October    41 8   
Tuesday    O
20191009  737647   mag150  2019   10 October    41 9   
Wednesday  Rh
20191010  737648   mag150  2019   10 October    41 10  
Thursday   O
20191011  737649   mag150  2019   10 October    41 11  
Friday Liv
20191012  737650   mag150  2019   10 October    41 12  
Saturday   Rh
20191013  737651   mag150  2019   10 October    41 13  
Sunday F


**My question is about the week 42 for which the result of the query is:**

(agendaShowAll (reverse (collect 'year '+Agenda (2019 42

20191016  737654   mag150  2019   10 October    42 16  
Wednesday  F
20191017  737655   mag150  2019   10 October    42 17  
Thursday   O
20191018  737656   mag150  2019   10 October    42 18  
Friday J
20191019  737657   mag150  2019   10 October    42 19  
Saturday   J
20191020  737658   mag150  2019   10 October    42 20  
Sunday Rh
20191014  737652   mag150  2019   10 October    42 14  
Monday F
20191015  737653   mag150  2019   10 October    42 15  
Tuesday    Rh


The result starts with "Wednesday" instead of "Monday" as for the week 
41 or other weeks! Is there any reason explaining this strange 
behaviour? What am I doing wrong?


For what is worth I'm using PIL:

(version)
18.9.5

on Manjaro linux.

Thanks, best,

Eric



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


Re: How to query the database?

2019-10-02 Thread cilz
Alex,
Thank you very much, I'll try all these this evening when back at home !
Best,
Eric



Envoyé de mon BlackBerry - l'appareil mobile le plus sécurisé - via le réseau 
Orange


  Message original  



De: a...@software-lab.de
Envoyé: 3 octobre 2019 08:25
À: picolisp@software-lab.de
Répondre à: picolisp@software-lab.de
Objet: Re: How to query the database?


Hi Eric,
> "(rel year (+Aux +Ref +Number) (week))"
> makes a huge difference and works very well.
>
> as an example "(mapcar show (collect 'year '+Agenda (2019 32))"
>
> gives the whole week in a very very short query.

Yes, and you can also query larger ranges, like

   (collect 'year '+Agenda (2019 32) (2019 40))

giving all days in weeks 32 through 40.


> All these lead me to two more questions:
>
> 1) is it possible to have something more
> than (week) in "(rel year (+Aux +Ref
> +Number) (week))",

'+Aux' combines any number of relations into an index (they must make sense,
i.e. the resulting combined index key must be monotonuous).


> for example, can I add the "monthnum"? It
> could be nice to also have something like

Basically,

   (rel year (+Aux +Ref +Number) (month week))

should be ok, as the week will not decrease with the month. However you cannot
query then for just year plus week any longer, so it is probably not useful
here.


> "(collect 'year '+Agenda (2019 8))" in order
> to get quickly the whole month "august"

You could invent more complicated models, with redundancies like

   (rel month (+Ref +Bag)
  ((+Number))  # Year
  ((+Number)) )    # Month

But I would not du that, as it complicates everything else. Normal combined
'select's should be fine.


> 2) is there any way to sort the results of
> "(collect 'year '+Agenda (2019 32))" by one
> (or more)
> key(s) of the database?

Yes, e.g.

   (by '((This) (: key2)) sort
  (collect ...) )

or
   (by '((This) (cons (: key2) (: key3) (: key4)) sort
  (collect ...) )

☺/ A!ex

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


Re: How to query the database?

2019-10-01 Thread cilz
Hi Alex,

Thanks very much for helping.

So far I've done the mods to the database rel you suggested and I have this 
query:
(? (select (@A) ((year +Agenda 2019) (week +Agenda 32) (same 2019 @A year) 
(same 32 @A week)) )
which works and gives me results like these:
@A = {1643}
...
@A = {1731}

Now, is there any way to get all those results in a list like this:
( {1643} ... {1731})

in order to print them in a table with the "tab" function like:
...(with This (tab Fmt (: year) (: week) (: status))) 

Regards,

Eric


Envoyé de mon BlackBerry - l'appareil mobile le plus sécurisé - via le réseau 
Orange


  Message original  



De: a...@software-lab.de
Envoyé: 1 octobre 2019 09:36
À: picolisp@software-lab.de
Répondre à: picolisp@software-lab.de
Objet: Re: How to query the database?


Hi Eric,

> (class +Agenda +Entity)
> (rel id (+Key +Number))
> (rel date (+date))
> (rel year (+Idx +Number))
> (rel monthnum (+Idx +Number))
> (rel monthtxt (+Idx +String))
> (rel week (+Idx +Number))
> (rel status (+Idx +String))

'+Idx' is not suitable for numbers, as it builds an index of substrings, not of
the numerical values. '+Ref' would be the best here.

Also, (+date) must be (+Date) (or better (+Ref +Date)).

> Now I want to get all the days for the whole week 32 of the year 2019. My frst
> attempt was to do something like this:
>
> (? (select (@A) ((year +Agenda 2019) (week +Agenda 32))) (show @A))

This is fine (if the indexes are fixed as above). In addition you need also
filter clauses (before the 'show'):

   (same 2019 @A year)
   (same 32 @A week)

☺/ A!ex

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


How to query the database?

2019-09-30 Thread cilz
 Dear Guys,I'm trying to use pil builtin database as a kind of "dataframe" like the one in the R language.My database only holds rectangular data and is setup like this:(class +Agenda +Entity)(rel id                  (+Key +Number))(rel date             (+date))(rel year             (+Idx +Number))(rel monthnum (+Idx +Number))(rel monthtxt    (+Idx +String))(rel week           (+Idx +Number))(rel status         (+Idx +String))An example of line is:20190807 737584 2019 8 "August" 32 FI have lines like the one above for the whole years 2019 and 2018.Now I want to get all the days for the whole week 32 of the year 2019. My frst attempt was to do something like this:(? (select (@A) ((year +Agenda 2019) (week +Agenda 32))) (show @A))however this doesn't work and I got all the items for 2019 without taking into account the week number! What Iam I missing?ThanksEric  Envoyé de mon BlackBerry - l'appareil mobile le plus sécurisé - via le réseau Orange PԔ ‘ &j)m¢˜œ¢X¬¦Ê·«zV›uë.n7œ

Re: PicoLisp for 9-11 years' kids

2019-04-14 Thread cilz
  Hello folks,I guess it's microAlg which you can find here: http://microalg.info/I' dont know if there is an english translation of the website which is french.Best,EricEnvoyé de mon BlackBerry - l'appareil mobile le plus sécurisé - via le réseau Orange   De: eukel...@gmail.comEnvoyé: 14 avril 2019 17:01À: picolisp@software-lab.deRépondre à: picolisp@software-lab.deObjet: Re: PicoLisp for 9-11 years' kids  I'm aware of the existence of a project based in picolisp and focused on education and learning children, I remember it was developed by french people but can't remember any nameThat Project had a web, a web based editor to type code and execute it and also graphic capabilitiesI cannot remember if I Heard about it here in this list or surfing the web, sorryOn Sun, Apr 14, 2019 at 3:11 PM Alexander Burger  wrote:Hi Nehal,

> Discussion over IRC is a good idea. What time will be best?

I think almost any time is good, as there are usually members from east Asia
over Europe till the Amerikas.

☺/ A!ex

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



Re: French localization

2017-03-01 Thread CILz

Hi,

I've been overbooked the past few weeks because of a new job. Hence 
nothing new on my side, sorry.


However, I will find time if Roman need help or if he wants to share the 
work between us.


Best,
Eric

Le 02/03/2017 à 02:50, Raman Gopalan a écrit :


Dear Alex, greetings! :)

> How is the situation? Does anybody have good news? ;)

I would like to work on this activity. I can start working on it
today. Should I just email the files to you OR is there a better way?

R

On 28 February 2017 at 15:33, Alexander Burger > wrote:


On Tue, Jan 24, 2017 at 07:49:43AM +0100, Alexander Burger wrote:
> Dear PicoLispers,
>
> is anybody able and interested to do the French localization of
PicoLisp?

How is the situation? Does anybody have good news? ;)

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






Re: French localization

2017-01-23 Thread CILz

Hello guys,

I'd be happy to help on that task. If anyone else want to step up on 
this let's join our forces.


Best,

EricC


Le 24/01/2017 à 07:49, Alexander Burger a écrit :

Dear PicoLispers,

is anybody able and interested to do the French localization of PicoLisp?
Unfortunately it is still missing.

This task would involve the creation of the files

loc/fr

and

app/loc/fr

with the translation strings English -> French, and the creation of

loc/FR.l

with the proper formats.

It can be tested by adding a line to the '*Locales' global in "app/main.l".

Thanks!
♪♫ Alex


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


How to put my small expert system in pilog on the web

2016-11-24 Thread CILz

Hello,

Thanks to your help so far, I have built a small expert system in Pilog 
which works interactively on the terminal. A question is displayed, the 
user is asked to answer by 'y' or 'n' and in turn a new question is 
displayed or the result of the process.


Now I want this to work on in the web in the browser with:

* the questions/result displayed on a page

* two buttons 'y/n' for the actions

Reading the docs, all this looks doable in the Lisp side but how would I 
do this with Pilog?


Can I call my Pilog predicates inside an Html page?

Any advice will be welcomed ;-)

Thanks,

Eric

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


Re: read in Pilog - SOLVED

2016-11-23 Thread CILz

Alex, you rock! Thanks very much. Eric


Le 23/11/2016 à 20:23, Alexander Burger a écrit :

  : (be read (@X)
   (^ @X (read)) )
-> read

: (? (read @A))
(foo bar)
 @A=(foo bar)


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


Re: read in Pilog

2016-11-23 Thread CILz

Alex, thanks for being so patient! I came up with this:

(be p_read ()
  (^ @ (read)) )

which looks to work so far ;-).

However I wonder if there is a way to catch and unify the read value to 
a variable.


For example in Prolog the predicate 'read/1' allows to catch in 
'read(Value)' where 'Value' can be passed to an other predicate. Can I 
do the same here.


Thanks,
Eric

Le 23/11/2016 à 13:15, Alexander Burger a écrit :

Here too some Lisp function must be called.


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


read in Pilog

2016-11-23 Thread CILz

Is there a way to have something similar to 'read' in Pilog?

Thanks,

Eric

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


Re: How to display some text in Pilog - SOLVED

2016-11-23 Thread CILz

Hello Alex,

Thank you very much, that's it.

In fact, I have tried this solution before asking on the list, however 
as I am still not very fluent in Lisp I have written :


: (be intro

(prin "Hello world\n") )

without the two >> () << at the beginning of the defintion of the 
predicate!!


Best,

Eric


Le 23/11/2016 à 09:27, Alexander Burger a écrit :

   : (be intro ()
   (prin "Hello world\n") )
-> intro

:  (? (intro))
Hello world
-> T

Is this what you mean?


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


How to display some text in Pilog

2016-11-22 Thread CILz

Hello,

I'm trying to translate a small Prolog programme into Pilog however I'm 
stuck on some basic things. For example, how would you translate this 
Prolog term:


intro :-

write("somme text ...").


which yields to (in Swi-Prolog):

?. intro.

somme text ...

true.


Best,

Eric

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


Re: (< @X 18) doesn't behave as expected with pilog (SOLVED)

2016-11-18 Thread CILz

Hi,

Done! Initial version here:

http://picolisp.com/wiki/?accesstolispfunctionfrompilog

I hope it's a right place!

Best,
Eric

Le 14/11/2016 à 15:55, Alexander Burger a écrit :

Wiki would be much better, wouldn't it?


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


Re: First post

2016-11-17 Thread CILz

Hello,

Thanks for all your suggestions/ideas regarding using PicoLisp DB as a 
kind of graph database. I now have to experiment...


Best,

Eric


Le 17/11/2016 à 23:17, andr...@itship.ch a écrit :

Declarations: I have now experience in actually using any graph databases.

One could simply store the pilog declarations as lists or symbols in 
the DB, as I understand it, this is what Regenaxer did in the 
mentioned case.


The other way would be to model the data as pil DB schema, as Joh-Tob 
mentioned.


In fact the relations (to be exact: the field values, which store the 
relation) in picolisp DB are also objects!


See @lib/db.l for the implementation of +Link.

I guess one could easily use pilDB as a graph database, simply by 
creating additional prefix classes to give +Link additional type 
information (type of the edge, e.g. +Be +Loves +Has +Likes), could 
also be a prefix class which stores an additional numeric cost value 
(e.g. distance, to model "travel distance/cost" to a +Link'ed object). 
+Link would be a directed connection A -> B, while modeling a 
bidirectional connection could be done by using +Joint.
Add the prefix class +Ref to the mix, then your edges are 
automatically indexed.


I would not recommend this as a project for pilDB novices, first build 
something simpler to learn how the DB works and is to be used.


Greetings, beneroth


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


Re: First post

2016-11-15 Thread CILz

Hello Joh-Top,

Thanks for your answer. May be Alexander will be able to give us some tips.

Regarding my second question, I wonder if we can build Lisp statements 
(not Pilog ones) and commit them to the database to translate:


Person 'Vincent'

LOVES

Person 'Mia'

since '2015'

In other words, can we add a-kind-of 'property' to a relation?

Two my knowledge so far, I know that we can define an 'object' Person 
with a 'rel' name and an other rel +Link for 'LOVES' but can we add the 
property 'since 2015' to that rel 'LOVES'?


If so we have a property graph database!!

Best,
Eric

Le 16/11/2016 à 08:19, Joh-Tob Schäg a écrit :

Hi Eric,

i talked about storing Pilog rules in a database with 
Regenaxer(Alexander Burger) before. He did it once.


I hope that helps.
Maybe he still has the source.

I do not understand your second question. Can you reformulate it? 
Maybe with an example?


2016-11-16 7:59 GMT+01:00 CILz <mailto:cilzone@cilzonefr>>:


Hi Brad,

In fact we already have "a-kind-of" graph database! Isn't Prolog
all about relation? And Pilog is Prolog on top of PicoLisp, no?

When we write:

(be person (Vincent))

(be person (Mia))

(be loves (Vincent Mia 2015))

we define a relation called 'loves' between two 'persons' say
'Vincent' and 'Mia' which started in '2015'.

In cypher (Neo4's own query language) I would have written
something like this:

create (n:Person {name: {Vincent}})-[:LOVES {since:
{2015}}]->(m:Person {name: {Mia}})

Hence, as far as I understand PL, we are nearly there. My own open
questions are:

1) Can we commit the Pilog statements to the database?

2) Can we achieve something equivalent to the Pilog statements
above directly from Lisp side and commit them to the database?

Best,
Eric

Le 14/11/2016 à 13:24, Brad Collins a écrit :

A graph database written in picolisp that uses something
like pilog would be very useful for me as well.


-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de

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






Re: First post

2016-11-15 Thread CILz

Hi Brad,

In fact we already have "a-kind-of" graph database! Isn't Prolog all 
about relation? And Pilog is Prolog on top of PicoLisp, no?


When we write:

(be person (Vincent))

(be person (Mia))

(be loves (Vincent Mia 2015))

we define a relation called 'loves' between two 'persons' say 'Vincent' 
and 'Mia' which started in '2015'.


In cypher (Neo4's own query language) I would have written something 
like this:


create (n:Person {name: {Vincent}})-[:LOVES {since: 
{2015}}]->(m:Person {name: {Mia}})


Hence, as far as I understand PL, we are nearly there. My own open 
questions are:


1) Can we commit the Pilog statements to the database?

2) Can we achieve something equivalent to the Pilog statements 
above directly from Lisp side and commit them to the database?


Best,
Eric

Le 14/11/2016 à 13:24, Brad Collins a écrit :

A graph database written in picolisp that uses something
like pilog would be very useful for me as well.


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


Re: First post

2016-11-14 Thread CILz
Neo4j is the graph database behind www.gdpr-ui.eu . Neo4j is really 
powerfull and its query language cypher is damned simple to start with!


'vivace-graph' looks interesting, I will have a look at it... Thanks.

Best,

Eric


Le 14/11/2016 à 13:24, Brad Collins a écrit :

A graph database written in picolisp that uses something
like pilog would be very useful for me as well.

There is a graph database written in common lisp which looks
promising, vivace-graph
(https://github.com/kraison/vivace-graph-v3) which seems to
be trying to do something along the lines of neo4j.

Perhaps a place to start?


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


Re: First post

2016-11-14 Thread CILz

Dear All,

Thank you very much for your warm welcome :). It's very much appreciated.

Best,

EricC


Le 14/11/2016 à 11:15, andr...@itship.ch a écrit :

Hi Eric

Warmly welcome to our community :)

No fear, you will soon look through things.
I felt the same, but the community is very friendly and especially 
Alexander is extremely helpful.


I recommend again to join us in IRC :)


- Original Message -
From: CILz [mailto:cilz...@cilzone.fr]
To: picolisp@software-lab.de
Sent: Sat, 12 Nov 2016 15:45:03 +0100
Subject: First post

Dear list,

I take the opportunity of this first post to introduce myself as well as
the reasons for which I come here.

I am not a computer scientist nor a professional web developper but a
kind of "power user" who often gets its hands dirty to build some
applications as close as possible to what he wants... That being said, I
have mostly built some websites using off the shelf CMS ;-)

However, my last "product" is a custom web application fully written
from scratch in R to access a graph database. And this is why I am here:
I want to rebuild it in order to add some "expert system" like capacity...

So starting to digg around, I first came to Prolog a few weeks ago and I
started learning it from scratch. This very week, I discovered Picolisp.
I started exploring it, and so far, I am really impressed! It looks very
appealing: having at hand a powerful language, a built-in database
system as well as Prolog make me dream ... though I don't know if I am
skilled enough to be able to do anything useful!

Any way, I have it up an running on my linux box ... so expect me to ask
very basic questions soon :)

Best,

Eric

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


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


Re: (< @X 18) doesn't behave as expected with pilog

2016-11-14 Thread CILz

Hi Joe,

I just try your solution. Yes 'range/3' is a Pilog predicate hence 
available for any Pilog rules.


It looks like it returns T if:

@Y =< 18 and @Y >= 0, in the case '(range (0 . 18))' rather than @Y < 18 
and @Y > 0. Hence, to get the people under 18 similar to '(< @Y 18)' in 
Lisp, I need '(range (0 . 17) @Y)'.


Good to know this solution too.

Best,

Eric


Le 14/11/2016 à 13:43, Joe Bogner a écrit :

Hi Alex,

range/3 seems to work as I expected. Should it not be used here?

(be age (Paul 19) )
(be age (Kate 17) )

(be underage (@X)
   (age @X @Y)
   (range (0 . 18) @Y))

(? (underage @X) )
  @X=Kate


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


Re: (< @X 18) doesn't behave as expected with pilog (SOLVED: short

2016-11-13 Thread CILz
Hum ! I just noticed that I may have been too friendly here, sorry. I 
wanted to say "Hi Alexander". My apologies. Best, Eric



Le 13/11/2016 à 21:32, CILz a écrit :

Hi Alex,


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


Re: (< @X 18) doesn't behave as expected with pilog (SOLVED: short

2016-11-13 Thread CILz

Hi Alex,

I've just created an account on the wiki however I think I can't add 
something in the reference part. I think that this how-to could fit very 
well here:


http://software-lab.de/doc/ref.html#pilog

to illustrate the last part which starts with " Pilog can be called from 
Lisp and vice versa:"


After the last sentence and just before the horizontal rule, it could be 
word like this:


=

To illustrate this, let's say that you have those two facts in a Pilog 
database:


(be age (Paul 19) )
(be age (Kate 17) )

and that you want to find the person under 18.

In full Prolog you may have written something like this:

underage(X) :- age(X,Y), Y < 18.

however in Pilog the following rule:


(be underage (@X)
  (age @X @Y)
  (< @Y 18) )

won't work and the query:

(? (underage @X) )

will yield to 'NIL' instead of the expected result '@X=Kate' .

The reason is that '<' (less than) is not Pilog function but only a Lisp 
one in PicoLisp.


In order to embed a Lisp expression in a Pilog, you must use '^' 
operator. It causes the rest of the expression to be taken as Lisp. 
Then, inside the Lisp code you can in turn access Pilog-bindings with 
the '->' function.


Hence, in our case the Prolog rule above translates as:

(be underage (@X)
  (age @X @Y)
  (^ @ (< (-> @Y) 18)) )

In '(^ @ (< (-> @Y) 18))', '@' is an anonymous variable used to get the 
result. If you need to access the result you can bind it to a defined 
variable like in '(^ @B (+ (-> @A) 7))' where '@B' is now bound to '@A + 
7'.


You may prefer to define your own Pilog predicate in this particular 
case. Let's say that to avoid confusion, you want to create a Pilog 
predicate call 'less_than' to mimic the Lisp function '<':


(be less_than (@A @B)
  (^ @ (< (-> @A) (-> @B) )))

Then the Pilog rule becomes:

(be underage_1 (@X)
  (age @X @Y)
  (less_than @Y 18) )

and now:

(? (underage @X) )

yields to:

@X=Kate

which is the expected result.

=

Hope this helps.

Best,
Eric

Le 13/11/2016 à 15:47, Alexander Burger a écrit :

You can't be too young, I think. You could write it, and perhaps others
may improve it;)




Re: (< @X 18) doesn't behave as expected with pilog (SOLVED: short

2016-11-13 Thread CILz

Hi,

This is mostly a copy/paste of Alexander's answer below in the form of a 
short how to. I haven't seen such a one on the wiki, so may be it can 
find its way there. However I'm too young here to take such a decision ;-)


==

**How to access a Lisp function from Pilog**

Let's say that you have those two facts in a Pilog database:

(be age (Paul 19) )
(be age (Kate 17) )

and that you want to find the person under 18.

In full Prolog you may have written something like this:

underage(X) :- age(X,Y), Y < 18.

however in Pilog the following rule:


(be underage (@X)
  (age @X @Y)
  (< @Y 18) )

won't work and the query:

(? (underage @X) )

will yield to 'NIL' instead of the expected result '@X=Kate' .

The reason is that '<' (less than) is not Pilog function but only a Lisp 
one in PicoLisp.


In order to embed a Lisp expression in a Pilog, you must use '^' 
operator. It causes the rest of the expression to be taken as Lisp. 
Then, inside the Lisp code you can in turn access Pilog-bindings with 
the '->' function.


Hence, in our case the Prolog rule above translates as:

(be underage (@X)
  (age @X @Y)
  (^ @ (< (-> @Y) 18)) )

In '(^ @ (< (-> @Y) 18))', '@' is an anonymous variable used to get the 
result. If you need to access the result you can bind it to a defined 
variable like in '(^ @B (+ (-> @A) 7))' where '@B' is now bound to '@A + 7'.


You may prefer to define your own Pilog predicate in this particular 
case. Let's say that to avoid confusion, you want to create a Pilog 
predicate call 'less_than' to mimic the Lisp function '<':


(be less_than (@A @B)
  (^ @ (< (-> @A) (-> @B) )))

Then the Pilog rule becomes:

(be underage_1 (@X)
  (age @X @Y)
  (less_than @Y 18) )

and now:

(? (underage @X) )

yields to:

@X=Kate

which is the expected result. Et voià!

==

Best,

Eric

Le 12/11/2016 à 16:27, Alexander Burger a écrit :

Hi Eric,


(be underage (@X)
   (age @X @Y)
   (< @Y 18))

'<' is a Lisp function and not a Pilog rule. To embed a Lisp expression
in Pilog, you must use the '^' operator. It causes the rest of the
expression to be taken as Lisp, and inside the Lisp code you can in turn
access Pilog-bindings with the '->' function.

In the case above it should be something like

(^ @ (< (-> @Y) 18))

'@' is an anonymous variable here. If you want to bind the result of the
Lisp expression to a specific variable, it would be e.g.

(^ @X (+ (-> @N) 7))

This binds @X to @N + 7.


Of course, if you need '<' more often, you could define your own
predicate:

: (be < (@A @B)
   (^ @ (< (-> @A) (-> @B))) )
-> <

: (? (< 3 4))
-> T

: (? (< 4 2))
-> NIL

♪♫ Alex


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


Re: (< @X 18) doesn't behave as expected with pilog

2016-11-12 Thread CILz

Hi Alexander,

Thanks for this answer. It works nicely. I will take my time to 
understand it thoroughly.


Best.


Le 12/11/2016 à 16:27, Alexander Burger a écrit :

Hi Eric,


(be underage (@X)
   (age @X @Y)
   (< @Y 18))

'<' is a Lisp function and not a Pilog rule. To embed a Lisp expression
in Pilog, you must use the '^' operator. It causes the rest of the
expression to be taken as Lisp, and inside the Lisp code you can in turn
access Pilog-bindings with the '->' function.

In the case above it should be something like

(^ @ (< (-> @Y) 18))

'@' is an anonymous variable here. If you want to bind the result of the
Lisp expression to a specific variable, it would be e.g.

(^ @X (+ (-> @N) 7))

This binds @X to @N + 7.


Of course, if you need '<' more often, you could define your own
predicate:

: (be < (@A @B)
   (^ @ (< (-> @A) (-> @B))) )
-> <

: (? (< 3 4))
-> T

: (? (< 4 2))
-> NIL

♪♫ Alex


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


Re: (< @X 18) doesn't behave as expected with pilog

2016-11-12 Thread CILz
Thanks for this Joe. However I will need to investigate as I don't know 
Picolisp enough yet. My purpose is first to translate Prolog queries to 
Pilog in a Prologish/Pilogish way.



Le 12/11/2016 à 16:23, Joe Bogner a écrit :

Untested, but what about using range/3 ?
http://software-lab.de/doc/refR.html#range/3


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


(< @X 18) doesn't behave as expected with pilog

2016-11-12 Thread CILz

Hello,

Let's say that I have those two facts in a pilog database:

(be age (Paul 18))
(be age (Vincent 17))

I'm looking for the guy under 18 with this rule:

(be underage (@X)
  (age @X @Y)
  (< @Y 18))

If I ask (? (underage @X)) the result here is -> NIL where I expect to 
get @X=Vincent.


If I modify the above rule with:

(be underage (@X)
  (age @X @Y)
  (equal @Y 18))

The same query (? (underage @X)) now gives @X=Paul which is the expected 
result.


I'm sure I'm missing something in the first case but I don't know what. 
Any idea?


Thanks,

Eric

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


First post

2016-11-12 Thread CILz

Dear list,

I take the opportunity of this first post to introduce myself as well as 
the reasons for which I come here.


I am not a computer scientist nor a professional web developper but a 
kind of "power user" who often gets its hands dirty to build some 
applications as close as possible to what he wants... That being said, I 
have mostly built some websites using off the shelf CMS ;-)


However, my last "product" is a custom web application fully written 
from scratch in R to access a graph database. And this is why I am here: 
I want to rebuild it in order to add some "expert system" like capacity...


So starting to digg around, I first came to Prolog a few weeks ago and I 
started learning it from scratch. This very week, I discovered Picolisp. 
I started exploring it, and so far, I am really impressed! It looks very 
appealing: having at hand a powerful language, a built-in database 
system as well as Prolog make me dream ... though I don't know if I am 
skilled enough to be able to do anything useful!


Any way, I have it up an running on my linux box ... so expect me to ask 
very basic questions soon :)


Best,

Eric

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


Subscribe

2016-11-11 Thread CILz

Hello CILz  :-)
You are now subscribed


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