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
aw- has joined #picolisp
clacke has quit [Ping timeout: 260 seconds]
rob_w has joined #picolisp
razzy has joined #picolisp
<razzy> Good morning to all!
<Regenaxer> Cheers razzy!
<razzy> now i want to build my blitzing-debugger
<Regenaxer> Good!
<razzy> Regenaxer: I want to run my code, every time program hits (!) where should i put my code?
<razzy> somewhere debug.l
<Regenaxer> Hmm, not easy perhaps. '!' just starts a sub-repl
<Regenaxer> So nothing special
<razzy> not easy? i just want to insert call to my code when (!) executes.
<Regenaxer> ah
<Regenaxer> I thought you mean implicitly
<razzy> I want (print) and wait for (key)s in debug sub-REPL
<Regenaxer> Then don't use '!' at all
<Regenaxer> Put your own function
<Regenaxer> (my! ...)
<razzy> rework !
<razzy> implicitly?
<Regenaxer> automatically
<Regenaxer> in '!'
<Regenaxer> But '!' does a lot of things to set up the env
<razzy> Regenaxer: thank you, that is what I do. I read ! and make my own
<Regenaxer> Check (vi '!)
<Regenaxer> Perhaps call the existing '!'
<Regenaxer> but this is tricky, as it is a FEXPR
<Regenaxer> FSUBR to be exact
<razzy> I am reading up on FEXPR FSUBR
<Regenaxer> razzy, what will your blitzing-debugger do?
<razzy> hmm, how i can not read nice pil code (!) ?
<Regenaxer> cannot read it?
<razzy> Regenaxer: ok, blitzing-debugger: assume style (my! ...). It will (print) to repl, wait for (key), change pil variables. let me write into repl (maybe sub-repl), insert (my!) into next code, remove current (my!) from code.
<razzy> Regenaxer: I was expecting readable nice picolisp code written (!)
<Regenaxer> ok, try this:
<Regenaxer> : (de my! @Exe (macro (out NIL (prinl "Blitz!")) (! . @Exe)))
<Regenaxer> : (let N 7 (my! println N))
<Regenaxer> Blitz!
<Regenaxer> (println N)
<Regenaxer> ! N
<Regenaxer> 7
<Regenaxer> !
<Regenaxer> -> 7
<Regenaxer> -> 7
<Regenaxer> Voila!
<Regenaxer> i.e. just call the existing '!'
<Regenaxer> Otherwise it is nearly impossible
<Regenaxer> because '!' neeeds access to some parts of the runtime system
<Regenaxer> (vi '!) is _break -> brkLoad
<Regenaxer> in src/flow.l
<razzy> hmm, why ! need access to runtime system? runtime system you mean linuxOS? kernel or something?
<razzy> I am thinking I maybe do not need ! at all
<Regenaxer> See what ! does
<Regenaxer> (vi '!)
<Regenaxer> break and brkLoad in src/flow.l
<Regenaxer> basically brkLoad
<Regenaxer> i.e. 'load' (= repl) in a breakpoint
<Regenaxer> The runtime env must be switched
<Regenaxer> I/O channels, variable bindings, tty raw mode etc
<Regenaxer> and when the break repl is exited, the expression must be evaluated
* razzy is thinking
<Regenaxer> You could also call 'brkLoad' via 'native'
<Regenaxer> thats more elegant than the above macro
<razzy> i do not understand all of it. but. If: I insert (my-print-wait-for-key) in _break and compile pil, will it work?
<Regenaxer> yes, this is good
<Regenaxer> Perhaps the best
<Regenaxer> But you need to program in PilSrc (not Lisp)
<Regenaxer> What exactly should it do?
<razzy> could i have lisp function that is called from PilSrc?
<Regenaxer> yes, like 'apply' or the mapping functions do
<Regenaxer> Not trivial
<Regenaxer> What should that function do?
<razzy> I will write that function in lisp. in my ignorance i do not see problem :D
<Regenaxer> Perhaps no problem :)
<Regenaxer> What can the new debugger do the old one cannot?
<Regenaxer> i
<Regenaxer> e. what feature do you desire?
<razzy> Regenaxer: one-key fastness and ability to slap my combo functions on it
<Regenaxer> No idea what that is :)
<razzy> one-key fastness?
<Regenaxer> both
<razzy> big improvement in operation speed. one key instead of ten multiplied over 10000 steps for each new proram
<razzy> i will show you :] if it works
<Regenaxer> You can demonstrate on next PilCon
<razzy> yop, if it works
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
<razzy> hmm, what is expected speed of development in industry?
<Regenaxer> A good programmer writes 15 lines of code per day in the long average
<razzy> 15 lines of code per day of finished polished product?
<Regenaxer> yep
<razzy> in context of picolisp, i find hard to write 15 usefull lines per day :D
<Regenaxer> no worry :)
<razzy> 15 garbage lines for corporate boss, easy :D
rob_w has quit [Quit: Leaving]
aw- has quit [Ping timeout: 260 seconds]
theruran has quit [Quit: Connection closed for inactivity]
peterhil has joined #picolisp
peterhil has quit [Remote host closed the connection]
beneroth has quit [Ping timeout: 268 seconds]
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 260 seconds]
razzy has joined #picolisp