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
<geri> ie only preference thing looks bad B)
<geri> (for I POSSIBLE-BROWSERS (T (which I) @))
<geri> this is way cooler than try catch-ing
<geri> also @ has been very nice to have for this script
<geri> what did you mean by handling debug info?
<geri> about completion in my emacs mode
<abu[7]> Not completion. I meant you need to request the namespace and source info (file + line number) from the symbols
<abu[7]> and the in-memory editing of their values (database)
<geri> test
<geri> gonna write down fixing (vi) some capacity
<geri> s/some/in some
<geri> gotta love that i have more TODO's than features
<abu[7]> Yes, good situation :)
<abu[7]> Something to meditate upon
<geri> looks like i got yet another person into picolisp
<geri> 🙏
<geri> also, if you type "(+ 1 2) # comment" into repl
<abu[7]> 👍😎
<geri> it wont be able to receive the line or something
<geri> like itll think you never got input i think
<abu[7]> Probably waits for something
<geri> (prinl 'hello) # comment\n123 sends both lines properly
<abu[7]> Hm, I thought you mean the vip repl, here it works
<geri> in pil +
<geri> okay, inputting newline twice works
<abu[7]> T
<geri> is there a way to change repl prompt?
<geri> if no that makes my life a little easier lol
<abu[7]> *Prompt
<geri> ah
<abu[7]> and 'prompt' for non-REPL input
<abu[7]> The latter I use here in IRC for example
<abu[7]> on in other interpreters
<abu[7]> *Prompt does not change the ':' though
<abu[7]> : (vi '*Prompt)
<geri> okay
<geri> : can also be !
<geri> anything else?
<abu[7]> also '>'
<geri> is all?
<abu[7]> all?
<geri> are there any other options
<geri> ".*[!:>] "
<geri> or is this an accurate regexp
<abu[7]> I think thats all
<geri> okay cool
<geri> thanks
<geri> also i got a tiny bit into forth
<geri> really hard for my brain
<abu[7]> :)
<geri> keeping the stack's state in my head
<abu[7]> yeah
<abu[7]> Hard for the brain, but elegant and powerful
<geri> im yet to reach the point to see the elegance with how hard writing fizzbuzz was
<geri> xd
<geri> its real simple though, which is cool
<abu[7]> I re-vitalized the old Lifo language I told about last time
<abu[7]> after 25 years
<geri> picofork? :D
<geri> i had opened pandora's box...
<abu[7]> Interpreted in pil
<abu[7]> indeed
<geri> oh wait how does that work?
<geri> you wrote a lifo interpreter in picolisp?
<abu[7]> T
<abu[7]> the first is here in @lib/lifo.l
<geri> what file ext do you use for lifo
<abu[7]> .lf
<abu[7]> the second is just a.lf
<abu[7]> I start it as
<abu[7]> ./pil @lib/lifo.l --symbols lifo -go misc/a.lf +
<abu[7]> -- (1 2 3 4 5) mapcar (dup *) p
<abu[7]> (1 4 9 16 25) --
<abu[7]> -- see fact
<abu[7]> : fact (lifo: 1 swap for *) ;
<geri> im kinda confused by that mapcar
<abu[7]> The "-- " is the above 'prompt'
<geri> okay...
<abu[7]> The core is 'eval'
<abu[7]> it is different from Lisp
<abu[7]> ie symbols execute, pairs and numbers auto-push
<abu[7]> -- (a b c) p
<geri> (how do you print the stack XD)
<abu[7]> 'p' is print
<abu[7]> '.' in Forth
<abu[7]> but dot is meta in Lisp
<geri> yeah, thats why i was confused
<abu[7]> just s
<abu[7]> ie '.s' in Forth
<geri> okay cool
<geri> 1 2 3 + +
<geri> the extent of my forth knowledge
<abu[7]> Perfect
<geri> so the whole interpreter is only 220 lines?
<abu[7]> yes
<geri> amazing
<abu[7]> most is util funs
<abu[7]> The interpreter is only until "# Primitives"
<geri> 42 lines xd
<abu[7]> fun :)
<geri> what do parens do for (dup *)
<geri> i guess its like a function or whatnot...
<geri> i didnt get to learning quoting in forth
<geri> okay, i guess (...) is just a literal
<abu[7]> T
<abu[7]> 'eval' pushes everything except symbols
<geri> mapcar being in the middle is rather weird
<geri> input mapcar function
<abu[7]> in Forth also some words take the arg next in the stream
<abu[7]> eg 'if'
<abu[7]> same principle
<geri> i hate that forth cant do if without compiling
<geri> harder to program stuff
<abu[7]> just that Forth has only numbers
<geri> what's if in lifo?
<abu[7]> ses the second file
<abu[7]> 'fibo'
<abu[7]> uses 'if'
<geri> oh right
<geri> all this (push 'RP IP) stuff is really hard xd
<geri> i vote for meaningful names...
<abu[7]> It is from Forth
<abu[7]> SP IP RP
<abu[7]> @ and ! are still missing
<geri> cant find any of those in forth standard docs
<abu[7]> must be
<abu[7]> the most basic words
<abu[7]> 7 X !
<abu[7]> X @ .
<abu[7]> set and fetch a var
<geri> ah right
<abu[7]> variable X
<geri> but itd mean discarding variable @
<geri> and its really comfy sometimes...
<abu[7]> causes X to push its address
<geri> idk if it applies to stack lang tho
<abu[7]> T
<geri> oh wait
<geri> i meant i cant find sp ip rp
<geri> ! @ i know
<abu[7]> ok
<abu[7]> SP @
<abu[7]> is dup
<abu[7]> probably
<geri> gforth doesnt know about sp at least
<abu[7]> I see
<abu[7]> It is lower level
<geri> gotta tell ray lifo is back to life :D
<abu[7]> Ray is the new one?
<geri> raydeejay if that says anything
<geri> they sent you a hello months ago
<geri> xd
<abu[7]> Rings something, yes
<geri> my japanese is slowly but surely getting better, feels very nice
<abu[7]> Supi
<abu[7]> Mine is disappearing slowly
<geri> dont let it!
<geri> or maybe im stealing your skills :D
<abu[7]> Nono :)
<geri> its also way easier to look up words with some kanji in the vocab
geri has quit [Remote host closed the connection]
geri has joined #picolisp
<geri> how do you get path to symbols w/ vip?
<geri> i see that vi 'sym uses fileBuffer but after that im lost
<abu[7]> It uses a property in the symbol '*Dbg'
<abu[7]> (vi 'vip~tag)
<geri> okay thanks
<abu[7]> The properties are set at the end of @lib/debug.l
<abu[7]> `(info "@lib/map")
<abu[7]> The built-in symbols that is
<geri> (get 'vi '*Dbg 1) seems to do the trick
<abu[7]> T
<geri> is it always linum followed by path and namespaces?
<abu[7]> exactly
<geri> good
rob_w has joined #picolisp
rob_w has quit [Read error: Connection reset by peer]
lagash has quit [Ping timeout: 252 seconds]