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
theruran has joined #picolisp
rob_w has joined #picolisp
razzy has quit [Quit: Lost terminal]
razzy has joined #picolisp
rob_w has quit [Remote host closed the connection]
aw- has quit [Quit: Leaving.]
aw- has joined #picolisp
<razzy> to my knowledge, (rollback) does not work as expected. :(
<razzy> (rollback) should reaload whole database, right?
<Regenaxer> No, (rollback) does nothing
<Regenaxer> It just clears the external symbol tree
<Regenaxer> The "whole" database is never loaded anyway. Would blow up the memory ;)
<razzy> i will code example.
<Regenaxer> Example is not needed
<razzy> in effect, if i do (put> than (rollback) it should be like (put> never happened, right?
<Regenaxer> right
<Regenaxer> because it is not written
<Regenaxer> (rollback) clears the cache
<razzy> I will do minimal example, and maybe find my bug
<Regenaxer> ok
<razzy> minimal example works as expected :]. complex code is broken. Only way to commit to DB is (commit) and funs!> yes?
<Regenaxer> I think so. All functions which commit have a '!'
<Regenaxer> (trace 'commit)
<razzy> it is doing commit somewhere!
<Regenaxer> :)
<Regenaxer> commit is an expr after trace, so you can stop there
<Regenaxer> (debug 'commit)
<Regenaxer> Then (bt)
<razzy> (bt)
<razzy> ?
<razzy> i am now randomly shooting (! to localise commit :]
<Regenaxer> ok, debug will not work
<Regenaxer> you can do this:
<Regenaxer> -> commit
<Regenaxer> : (trace 'commit)
<Regenaxer> $: (v commit)
<Regenaxer> -> T
<Regenaxer> : (commit)
<Regenaxer> commit :
<Regenaxer> (pass $360771234766)
<Regenaxer> !
<Regenaxer> i.e. first trace to get an EXPR, then edit it to insert ! before 'pass'
<Regenaxer> Now it stops at commit and you can backtrace wiw (bt)
<razzy> interesting
<Regenaxer> Or you simply do (traceAll)
<razzy> Regenaxer: (dbgc) should be called (dbgc!) :D in hindsight it is obvious :D
<Regenaxer> Well, (dbgc) should never be called in an application
<Regenaxer> Only in single-user mode in admin code
<Regenaxer> Normally the 'admin' function in @lib/too.l
<Regenaxer> It does (tell 'bye) first
<razzy> i reused functions which i should not :], not production tho :]
<Regenaxer> Reused a function that calls dbgc?
<razzy> you know my "style", does it surprise you anymore?
<Regenaxer> It is good to reuse. Just wondered which function calls 'dbgc'
<razzy> experimental database cleanup
<beneroth> Regenaxer, razzy means he calls (dbgc) like (gc) just in the code :)
<beneroth> razzy, don't do that.
<beneroth> hehe
<Regenaxer> :)
<razzy> beneroth: yes, that was idea :]
<beneroth> you can call (dbgc) when no other database code is running in parallel (no other children processes)
<Regenaxer> Normally (gc) is also not called. Just at the beginning perhaps
<beneroth> or in the middle of big imports
<razzy> i think (gc) should clean unused external symbols also, yes?
<beneroth> define "unused" :D
<razzy> not referenced in running code
<Regenaxer> beneroth, right
<beneroth> for database specific stuff there is also (wipe) and (prune). concerning (gc) all the database stuff is like the rest of picolisp: if it's referenced it stays, otherwise the cells are considered free to be reused
<beneroth> I recommend you to not attempt doing optimizations without running first in any issue demanding that optimization.
<razzy> beneroth: right
<beneroth> you only have to use this stuff in very specific situations, otherwise everything will work fine without you doing any special housekeeping
<beneroth> *without you needing to do...
<Regenaxer> 'create' in @lib/db.l is an example of such hardcore stuff
<beneroth> you should not lead razzy even more into the deep stuff before he grokked the standard stuff, Regenaxer! bad Regenaxer :P
<Regenaxer> haha, very wise! :)
<Regenaxer> very bad indeed
<razzy> uff, bug found, world is not broken. :]
<Regenaxer> Great!
<beneroth> congrats razzy :)
<beneroth> world is broken, but picolisp still works :D
razzy has quit [Ping timeout: 240 seconds]
aw- has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp