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
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 248 seconds]
aw- has joined #picolisp
mabi has quit [*.net *.split]
mabi has joined #picolisp
viaken has quit [*.net *.split]
mario-goulart has quit [*.net *.split]
escew has quit [*.net *.split]
escew has joined #picolisp
viaken has joined #picolisp
mario-go` has joined #picolisp
teddydd has joined #picolisp
rob_w has joined #picolisp
rowanthorpe has joined #picolisp
hunar has joined #picolisp
hunar has quit [Ping timeout: 248 seconds]
hunar has joined #picolisp
hunar has quit [Client Quit]
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
Regenaxer has quit [Remote host closed the connection]
Regenaxer has joined #picolisp
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
beneroth has quit [Quit: Leaving]
razzy has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
<razzy> i have weird trouble. I do not know why Cond does not behave https://termbin.com/t3xu
<razzy> I would expect C to be 4 after cycle.
<razzy> I could make it work with '(() (= C 4)) syntax. but i thought '(= C 4) should work too.
<Regenaxer> (until (Cond) this calls the *function* 'Cond'
<Regenaxer> I think you want (until (eval Cond) ..., right?
<Regenaxer> (= C 4) looks like a function to Pil, with the symbol '=' as a non-evaluated argument list, which does not make much sense
<razzy> Regenaxer: I want that. yes. i think i know better now.
<Regenaxer> 👍👍
razzy has quit [Ping timeout: 248 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 240 seconds]
cranium has joined #picolisp
razzy has joined #picolisp
<razzy> Regenaxer: why is empty list '() also NIL character? Are there issues with using temporary empty lists?
<Regenaxer> It is a consequence of the cell structure
<Regenaxer> The CDR of the last cell of a list *points* to the symbol NIL
<Regenaxer> If there is no last cell, only NIL remains
<Regenaxer> () does not exist
<Regenaxer> the *reader* returns NIL if () appears in the input stream
<Regenaxer> Same with "" btw
<razzy> hmm,.. so i cannot have empty lists in nested caXdr structure
<Regenaxer> Why not?
<Regenaxer> : (1 () 2)
<Regenaxer> -> (1 NIL 2)
<Regenaxer> : (1 "" 2)
<Regenaxer> -> (1 NIL 2)
<razzy> i think it messes up relative adressing,.. maybe,.. or i have bug elsewhere :]
<razzy> hmm propably elsewhere.
<Regenaxer> What happens?
<razzy> i will work on it
<Regenaxer> Think of these structures: https://software-lab.de/doc/ref.html#nilSym
<Regenaxer> And NIL is protected, you cannot change its value directly
<razzy> In my nested list appears lots of dots and NILs that are not suppose to be there L[
<razzy> :]
<Regenaxer> Should be ok
razzy has quit [Ping timeout: 248 seconds]
razzy has joined #picolisp
<razzy> (d) enter (u) enter seems tedious after while. is it possible to make it one keystroke in linux?
<Regenaxer> Why do you need (u)? This is very rarely used
<Regenaxer> Also, you never do (d) and (u) at the same moment, as this is a no-op then
<Regenaxer> I usually do (debug 'foo)
<Regenaxer> then perhaps (d) a few times
<Regenaxer> and sometimes later (unbug 'foo)
razzy has quit [Ping timeout: 250 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 248 seconds]
razzy has joined #picolisp
<Regenaxer> I think you misunderstood (u)
rob_w has quit [Quit: Leaving]
aw- has quit [Ping timeout: 250 seconds]
<razzy> Regenaxer: true. (u) has little merits.
<Regenaxer> yes, little merits :)
<Regenaxer> The idea is to use it after debugging one iteratimn through a loop with (d), you can avoid further stepping this loop with (u)
<Regenaxer> But I think I almost never used it
<razzy> I wished it would debug expression on same lvl. and have kind of interactive blitzing debugger
<Regenaxer> What would that look like?
<Regenaxer> I mean, debugging is always on the same level, until you use (d) to go "down"
<razzy> you have one hit key for next-step, step-down, step-up, safe-eval, previous-step (remember 3 previous steps).
<Regenaxer> I see, yes
<razzy> now i can do next-step, step-down, safe-eval with (later).
<Regenaxer> In pil64 you could define function keys for that, but in pil21 I have not yet found a way cause it uses readline()
<Regenaxer> Well, next-step is just Enter
<razzy> yop, that one is ok :]
<Regenaxer> and for (d) I use the history
<Regenaxer> So mostly I keep hitting Enter, and ESK-k + Enter to get (d)
<Regenaxer> BTW, there is a way to do conditional breakpoinys
<Regenaxer> We should really do all that in PilCon
<razzy> previous-step could be cumbersome done with (later)
<Regenaxer> What is previous-step?
<Regenaxer> ah, sorry
<razzy> you step back in evaluation :]. every operation done in pil :]]
<Regenaxer> You said remember 3 previous steps
<Regenaxer> step back evaluation, yeah, would be cool ;)
<Regenaxer> e.g. undo erasing a file
<razzy> i do not think (later) covers files
<Regenaxer> I do not understand how you use (later) in debugging
<razzy> Regenaxer: (later) makes "incremental" copy of whole pil enviroment yes?
<Regenaxer> It forks
<Regenaxer> a copy-on-write image of the process
<Regenaxer> How is that useful here?
<razzy> yes, that one
<Regenaxer> You want to use it for a kind of "undo"?
<razzy> Regenaxer: safe eval unless (fork) (msg (e)) (bye))
<Regenaxer> right
<Regenaxer> good idea
<razzy> yours btw
<Regenaxer> oh (?)
<razzy> it was your syntax L[
<Regenaxer> I did not think of this for debugging
<Regenaxer> yes, syntax ;)
<Regenaxer> btw, there is also (rollback)
<Regenaxer> but only for DB changes
<razzy> i think it would be possible to have 3 last copies of process.
<Regenaxer> But the REPL must be switched between those processes then
<Regenaxer> can be tricky
<Regenaxer> Things mess up the readline if more than one process reads from it
<razzy> i see, so switch only in emergency?
<razzy> only on user button?
<Regenaxer> I see no way to switch explicitly
<Regenaxer> Any process which starts to (read) accesses the current tty
<Regenaxer> (unless (fork) (msg ..) (bye)) is ok, it does not read
<razzy> i do not fully understand
<Regenaxer> Try (fork) without the (bye)
<Regenaxer> you cannot use the REPL any more
<Regenaxer> because 2 processes read
<razzy> i think there should be option for switching processes in general. but i do not know.
<Regenaxer> What I do often is using 'psh' to connect to running GUI applications
<Regenaxer> Then I have many processes on the same DB
<Regenaxer> bin/psh does perhaps what you mean
<razzy> I will use history for (d) for now. :] improvement :]
<Regenaxer> it forks, then uses ctty to get a separate terminal
<Regenaxer> yeah, most things are well with just (d)
<Regenaxer> or (v foo) and insert '!'
<Regenaxer> Perhaps I do that most often
<Regenaxer> insert '!' to stop only at a certain point
<razzy> i can use !
<Regenaxer> T
<razzy> fast flowing through program would feel nice, so i can have more of the program fresh in memory.
<Regenaxer> right, so you can probably indeed do that using (unless (fork) (ctty "/dev/ttyXX") ...)
<razzy> I write general structure of whole program and than debug stepping to repair syntax.
<Regenaxer> ok, but usually it is easier and faster simply to restart the whole program from command line
<Regenaxer> shell history
hunar has joined #picolisp
cranium has quit [Quit: Leaving]
<hunar> Hello everyone :D I've never used IRC before, the website recommended asking questions here
<hunar> i have a problem while trying to (compile a static picolisp from linux) for (flinux on windows) i'm following this page http://picolisp.com/wiki/?flinuxPicoLisp My problem is at the final linking step it shows this error (cannot find -lcrypt) but both libcrypt.so and libcrypt.a exist on the system, does anybody know what is the problem?
<Regenaxer> Hi hunar! Welcome!
<razzy> Hello hunar
<Regenaxer> hmm, I never tried that
<Regenaxer> (don't even have Windows)
<Regenaxer> Also, the description is perhaps a bit outdated?
<Regenaxer> Current PicoLisp is based on LLVM
<hunar> I also never use windows, but i'm planning to make a software that my friends can benefit from, and everyone i know uses windows.. I'm currently searching for ways to send picolisp projects to windows users such that they dont need to install anything
<hunar> I think they are outdated but that page was my best finding yet :/
<Regenaxer> There was a thread in the mailing list a few days ago
<Regenaxer> Not sure if helpful
<hunar> I'll check it out now :D, i initially asked this question on r/lisp since i didn't know about the mailing list
<Regenaxer> good :)
<hunar> Ok i read it. Unfortunately they have problems in the beginning of their compilation and i have problem at the end
<Regenaxer> Thorsten said he has Debian on WSL
<Regenaxer> that seemed to work out of the box
<Regenaxer> So libcrypt is the problem?
<Regenaxer> This is only needed to build the tools httpGate and ssl. Perhaps you don't need those?
<hunar> My final goal is a windowsy experience, because non of my friends will use WSL :(
<Regenaxer> How does a windowsy experience feel like? ;)
<hunar> When i remove the --static flag it links without any problems, but the --static fails.. there were three makes (make make gate, make tools, make picolisp) the first two succeed but doesn't generate a picolisp binary
<hunar> The windows people want everything to be downloaded once and double clicked :D no dependency or extra step
<Regenaxer> hmm, make gate etc. is the old outdated version
<Regenaxer> I'd recommend to go with pil21
<hunar> oh
<hunar> I was actually confused about what is the difference between (picolisp) and (pil21), i found two github pages that provide those
<Regenaxer> and also what is in Debian etc now
<Regenaxer> yeah, a bit confusing
<hunar> Where is the official source code at? do they use github or gitlab?
<Regenaxer> there is pil32, pil64, miniPicoLisp, ErsatzLisp, PilOS etc
<Regenaxer> the core of all is https://software-lab.de/pil21.tgz
<Regenaxer> a mirror is on https://git.envs.net/mpech/pil21
<Regenaxer> Not sure if I understood. You plan to avoid WSL?
<hunar> Thanks for the info :D, I'll try compiling that source you linked :)
<Regenaxer> ok :)
<hunar> the flinux project sais that it can run unchanged linux executables on windows :| so without msys2 or sygwin or WSL
<Regenaxer> But on plain Windows PicoLisp will not run, it needs POSIX system calls
<hunar> I hope it did :( .. I have one more question before trying the compilation, how does IRC work, i mean can i for example search for a specific word that was once said in this channel?
<Regenaxer> OK, good :)
<razzy> hunar: there is history of channel written in topic.
<hunar> That's great :D thanks
rowanthorpe has quit [Ping timeout: 248 seconds]
AndroUser2 has joined #picolisp
AndroUser2 has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<hunar> It didn't work :( flinux is outdated (last update 2016), I guess my only option now is WSL..
<hunar> the compilation worked, but the flinux didn
<Regenaxer> Good to know
<hunar> I have a new question :D is there anyway to lock or hide (idk what to call it) a picolisp project such that the user cant see/change the source code and break stuff?
<Regenaxer> We had this question occasionally :) I think there is no way atm. Perhaps write an obfuscator?
<hunar> If it was a compiled language i wouldn't have problems since users don't normally edit binary, even bytecode.. but since picolisp interprets code directly i don't have much hope for the answer
<Regenaxer> T
<Regenaxer> So an index mapping all symbols to random names
<hunar> I think even obfuscated lisp would looks nicer to read than other languages :D
<Regenaxer> hehe, yes
<hunar> So creating a program that sits on the client side and asks for login/password doesn't make sense :/
<Regenaxer> Typical PicoLisp programs are web applications, so the source is not visible to users anyway
<Regenaxer> yes, remote server
<hunar> I was a Common Lisp beginner fanboy yesterday, but picolisp was sooo nice that I considered leaving CL entirely. But now I want to go back and at the same time I don't want to leave picolisp, it's so cute and powerful
<Regenaxer> difficult ;)
<Regenaxer> Using both might be confusing
<Regenaxer> CL and Pil are very different in philosophy
<hunar> Indeed.. Thanks for all the help :D you saved me at least 20 more hours of googling, thanks for your time :D
<Regenaxer> welcome :)
<Regenaxer> Just hang around here
<hunar> I will :D, the above login (AndroUser2) was me on a failed attempt at using an app to keep an eye on here
<Regenaxer> I see
<Regenaxer> I use my self-written irc client (in picolisp of course ;)
<Regenaxer> runs permanently on a rented root server
<Regenaxer> and I connect to it from my mobile
<Regenaxer> so I'm typing this on Android
<hunar> That's very cool :D
<hunar> I'm not yet used to IRC, is there a way to permanently have a username across all irc clients? so that i can have this name on android
<Regenaxer> The user name is a matter of the server
<Regenaxer> i.e. libera.chat here
<Regenaxer> same for all channels then
<Regenaxer> I think you already registered your nick at libera.chat, right?
<Regenaxer> Otherwise this channel would not work for you
<hunar> I didn't see a register button :/
<Regenaxer> hmm
<Regenaxer> well, not a button ;)
<hunar> I installed HexChat and clicked on the link on libera.chat (irc.libera.chat:6697 (TLS)) then hexchat popped up and i entered nicknames and stuff
<Regenaxer> Perhaps it registered for you
<Regenaxer> Manually you give a command like "/nickserv register <nick> <mail>
<Regenaxer> No, needs passwd "/nickserv register <pw> <mail>
<Regenaxer> I forgot the details :)
<Regenaxer> Anyway it works for you
<hunar> I found this: If you do not complete registration within one day, your nickname will expire.
<hunar> -NickServ- hunar is now registered to hbkurd@gmail.com.
<hunar> I did it :D
<Regenaxer> Perfect!
<hunar> Thanks :D
hunar has quit [Ping timeout: 240 seconds]
hunar has joined #picolisp
hunar has quit [Client Quit]
AndroUser2 has joined #picolisp
AndroUser2 has quit [Ping timeout: 240 seconds]
v88m has joined #picolisp
AndroUser2 has joined #picolisp
AndroUser2 has quit [Read error: Connection reset by peer]
AndroUser2 has joined #picolisp
AndroUser2 has quit [Remote host closed the connection]
aw- has joined #picolisp
teddydd has quit [Ping timeout: 258 seconds]
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp