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
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
<Hunar> Good morning :)
<Hunar> I made this, which is exactly what I wanted http://ix.io/4grc
<abu[m]> Hi Hunar! Very good.
<abu[m]> I would just use (while (args) (put This (next) (next)) as it is 2 cells shorter ;)
<abu[m]> or perhaps (while (next) (put This @ (next))
<abu[m]> because you'll probably won't put a NIL property
<Hunar> That is a great idea :), I like the first one
<abu[m]> ok :)
<abu[m]> A NIL property has special meaning only in DB context
<abu[m]> i.e. the values are never commit'ted
<Hunar> I have a problem. look at this file ix.io/4grf currently if you run this it would print hello, in the new prompt typing (new '(+NN)) wouldn't print hello, why? if I remove the first line then it does print it
<abu[m]> You must set the namespace in the REPL
<Hunar> so when I run a file that contains (symbols ...) i need to re enter the (symbols) command in the repl
<abu[m]> In general you need the right search order whenever you want to access the symtols
<abu[m]> : +NN
<abu[m]> versus
<abu[m]> : (show 'nn~+NN)
<abu[m]> So: (symbols '(nn pico))
<abu[m]> or "--symbols nn" on the command line
<Hunar> is (symbols 'nn 'pico) different fron (symbols '(nn pico)) ?
<abu[m]> Yes, a little. The second one needs all symbols to be namespaces. The first one initializes 'nn' as a namespace if it isn't already
<Hunar> Aha, now I get it :) thanks
<abu[m]> The confusing part is that (symbols ..) in a loaded file does not automatically set the search order in the caller. I.e. the namespace environment is always local.
<Hunar> yeah, it was confusing :)
rob_w has joined #picolisp
<beneroth> Good morning abu[m], Hunar :)
<beneroth> abu[m], what arguments are there against exposing external symbol names to external applications?
<beneroth> 1. could allow size/growth estimations when someone analyzes that who knows the numbering scheme
<beneroth> 2. could allow iteration attack if server does not do additional checks when retrieving a symbol by name
<beneroth> anything else?
<beneroth> I need to expose certain symbols into stable URL, even if for some reasons their indexed properties change. So either A) introduce an unqiue global +Key just for this purpose, or B) use the external symbol name
<abu[m]> Main point is (2) I think
<beneroth> A) would certainly be the cleanest way, but also add some bloat
<beneroth> abu[m], yeah I'm aware of 2. and would have additional checks. I try to think if I overlook anything else
<abu[m]> but knowing only the external symbol does not harm anything. It always needs an .l file or a function
<abu[m]> and those need to be allowed
<beneroth> yeah exactly
<beneroth> concerns are 1. and 2. nothing more. you can also not think of anything more?
<abu[m]> I see no issue at the moment. I expose externals all the time
<abu[m]> The risk is if someone tries all kinds of calls to find if some .l file forgets to check
<abu[m]> i.e. 'must' call
<beneroth> ah well there is one more.. 3. defragmenting the database could mean moving an symbol to another name, making that reference unstable, which could be kept stable by using a +Key
<beneroth> abu[m], yeah, standard security and injection issue of course.
<abu[m]> Yes, if a symbol is removed and later re-allocated, it gives garbage
<beneroth> 3. is more like theoretical, as it's easily the most costly and advanced to do in a production database
<beneroth> abu[m], ah right, 4. re-use!
<beneroth> good point
<beneroth> yeah I think that kills it
<beneroth> re-use, of course
<beneroth> I want to be able to dbgc at some point and reuse those symbols. maybe years in the future.
<abu[m]> And if a legal function or .l file gets the wrong system then, it may crash
<beneroth> here it's about reference in another system to records in pilDB
<abu[m]> The PicoLisp wiki used explicit symbols initially, but later switched to key names
<beneroth> but yeah, 4. reuse, I forgot about that one! embarrassing!
<beneroth> for stableness a specific unique key must be guaranteed, external names don't fulfill that if you ever clean up.
<abu[m]> right
<beneroth> so I add a +Key to 160'9518 records
<beneroth> should I maybe use (put) and (rebuild) instead of (put>) ?
<abu[m]> better :)
<abu[m]> I always use put>
<beneroth> ok
<beneroth> I thought might be faster with all the B-Tree inserts. then again for that the count is probably still rather low
<abu[m]> I believe the speed is the same
<abu[m]> only one index is generated, so caching is optimal
<beneroth> right
<beneroth> thank you abu[m]
<abu[m]> ☺
seninha has joined #picolisp
rob_w has quit [Remote host closed the connection]
seninha has quit [Quit: Leaving]
townsfolkPravda has joined #picolisp
seninha has joined #picolisp
lagash has quit [Remote host closed the connection]
lagash has joined #picolisp
Thorsten[m]1 has joined #picolisp
<Thorsten[m]1> Hi Alex, Hi All ...now I found this chat
<abu[m]> Hi Thorsten!! ☺/
<abu[m]> Welcome back!
<beneroth> hi Thorsten[m] !!
<Thorsten[m]1> So quiet on the other channels, so I thought there must be some discussion somewhere 😎
<abu[m]> Exactly ;)
<abu[m]> Good old IRC is still the best
<Thorsten[m]1> Yes, and now with a nice Android app too
<abu[m]> Right, with element or fluffy it is nice cause it does not need to keep a session open
<abu[m]> and notifies
<abu[m]> Yesterday's PilBox release is now available in PlayStore. Nothing changed in PilBox, just a PicoLisp update.
seninha has quit [Quit: Leaving]
townsfolkPravda has quit [Quit: townsfolkPravda]
chexum has quit [Quit: No Ping reply in 180 seconds.]
chexum has joined #picolisp
chexum has quit [Ping timeout: 255 seconds]
chexum has joined #picolisp