beneroth changed the topic of #picolisp to: PicoLisp language | The scalpel of software development | Channel Log: https://libera.irclog.whitequark.org/picolisp | Check www.picolisp.com for more information
stultulo has joined #picolisp
f8l has quit [Ping timeout: 260 seconds]
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
bjorkintosh has joined #picolisp
bjorkintosh has joined #picolisp
bjorkintosh has quit [Quit: "Every day, computers are making people easier to use." David Temkin]
bjorkintosh has joined #picolisp
bjorkintosh has joined #picolisp
bjorkintosh has quit [Changing host]
Iacob has quit [Remote host closed the connection]
Iacob has joined #picolisp
rob_w has joined #picolisp
_whitelogger has quit [Ping timeout: 260 seconds]
_whitelogger_ has joined #picolisp
Iacob has quit [Remote host closed the connection]
corecheckno has joined #picolisp
Iacob has joined #picolisp
rob_w has quit [Quit: Leaving]
corecheckno has quit [Remote host closed the connection]
Iacob has quit [Remote host closed the connection]
Iacob has joined #picolisp
<taleon> Is it possible to start PicoLisp in a terminal and connect from a second terminal so that you are in the same instance and can access the same loaded functions and data?
<abu[7]> Yes, with 'ctty', but iirc a bit tricky
<abu[7]> This is used however in bin/pty and psh
<abu[7]> Well, not directly in bin/pty but in PilBox (i.e. on the other side)
<taleon> It would be an interesting function. Then you can edit the same functions and data from two or more terminals and the changes are visible in all terminals. Or you could leave vip open in one terminal, leave the cons cells graphically displayed in another terminal, and set up and test the function in the repl in a third terminal.
<taleon> Do you use sockets or how does that work?
<abu[7]> No, it opens terminal devices
<abu[7]> and pty creates a "pseudo terminal"
<abu[7]> But working from both at the same time is not possible I think
<taleon> Ah, too bad. It would be cool if you could start, for example, `pil --daemon`, then get a socket or a session ID and then connect to the running instance from the other terminals with, say, `pil -c session-id`.
<taleon> It was just an idea of mine to see if it would work. PicoLisp has so many functions that I don't yet know. :-)
<abu[7]> :)
<abu[7]> bin/psh comes close
<abu[7]> I use it on production servers a lot
<abu[7]> Connects to a running applicatioÑ
<abu[7]> But only one term per (child)process
<abu[7]> ie. a running GUI process which had no TTY before that
<taleon> thanks, I'll take a look at it and see if I can manage it.
<abu[7]> Good
<abu[7]> You can try with https://software-lab.de/demoApp.tgz
<abu[7]> Start it as
<abu[7]> $ ./pil app/main.l -ap~main @lib/too.l -'server 8086 "!work" T' +
<abu[7]> Then connect browser to localhost:8086
<abu[7]> It prints session info like
<abu[7]> 8221 = 36075 12247431780744302~
<abu[7]> Pid, port and session ID
<abu[7]> On another terminal do
<abu[7]> bin/psh 36075 12247431780744302~
<abu[7]> Now you have a TTY on that GUI session
<taleon> $ ./bin/psh 18652 = 37657 58649809512526240~
<taleon> [./bin/psh:6] !? (in "~/.pil/pw" (line T))
<taleon> "~/.pil/pw" -- Open error: No such file or directory
<taleon> Not sure if I forgot something.
<abu[7]> Oh, no. Just create it with some random string (a local secret)
<taleon> HaHa, it works! Thank you very much. Now I have something to play with. :-)
<abu[7]> :)
<abu[7]> Insted of the above
<abu[7]> $ ./pil app/main.l -ap~main @lib/too.l -'server 8086 "!work" T' +
<abu[7]> better start it as
<abu[7]> $ ./pil app/main.l -ap~main @lib/too.l -'server 8086 "!work" T' -Wait +
<abu[7]> This avoids a dead REPL
<taleon> $ pil app/main.l -ap~main @lib/too.l -'server 8086 "!work" T' -Wait +
<taleon> 20952 = 36459 45335180032648383~
<taleon> !? (Wait)
<taleon> Wait -- Undefined
<abu[7]> oops
<abu[7]> small "w"
<taleon> ah :)
<abu[7]> 'wait' fuc
<abu[7]> func
<abu[7]> :
<taleon> It works now. Thank you very much. :-)
<abu[7]> 👍
<abu[7]> Perfect!
<abu[7]> You managed it immediately
<taleon> Wasn't that hard thanks to your explanation.
<abu[7]> psh is really useful. I can connect to a customer's session (after looking up the port and sesID from the log file) and debug it life (eg. while talking to him on the phone)
<taleon> Yes, that makes perfect sense, especially on production systems, to avoid downtimes.
Iacob has quit [Read error: Connection reset by peer]
Iacob has joined #picolisp
<taleon> abu[7]: The speed of your Pi calculation is impressive. How high, or to what decimal place, is the precision?
<abu[7]> It is infinite
<abu[7]> runs forever, just gets slower and slower
<abu[7]> But I found a minor mistake, will fix tomorrow
<taleon> After letting the Pi calculation run for a few minutes, I noticed some strange characters. A whitespace, for example, or a `^`.
<taleon> Ok :-)
<abu[7]> Yeah
<abu[7]> Till tomorrom ;)
<abu[7]> good night
<taleon> Good night. :-)
taleon has quit [Quit: leaving]
taleon has joined #picolisp
oldf8l has joined #picolisp
stultulo has quit [Ping timeout: 248 seconds]