ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
rob_w has joined #picolisp
_whitelogger has joined #picolisp
Blukunfando has quit [Ping timeout: 240 seconds]
<Regenaxer> Found a bug in 'all' / pil21
<beneroth> oh, an interesting one?
<Regenaxer> yes :)
<Regenaxer> it did not return all symbols
<Regenaxer> under special conditions
<Regenaxer> (symbols '(a b pico))
<Regenaxer> if 'b' has *one* tree empty (e.g. the one with names longer than 7), then 'a' is lost.
<beneroth> sounds like a pretty involved bug :D
<Regenaxer> Just a typo
<Regenaxer> 'P' -> 'Lst'
<beneroth> nice
<Regenaxer> wrong var
<Regenaxer> Hard to find
<Regenaxer> Found just by chance
<beneroth> (all) when used with multiple namespaces active is fetching all reachable symbols, so in the returned list there might be symbols with the same name (but without == pointer equality) ?
<Regenaxer> I noticed that tab completion did not show syms from 'a'
<beneroth> ah
<beneroth> yeah autocompletion is the main feature of (all), certainly.
<Regenaxer> Yes, may be syms with identical name
<Regenaxer> s
<Regenaxer> T
<beneroth> nice find :)
<Regenaxer> 'docs' also calls (all)
<beneroth> not a big issue in practice, but a tricky bug :D
<Regenaxer> :)
<Regenaxer> yeah
<Regenaxer> gives confusion at least
<Regenaxer> Normal applications don't call (all) usually
<beneroth> I did once in an older application to find all classes which inherit from a specific one. but that was not really a great way (worked without problems) ;-)
<Regenaxer> Yes, just a bit expensive perhaps
<beneroth> aye, that's the ugly part of that design *g*
<Regenaxer> 'dep' does basically the same
<Regenaxer> searching classes
<Regenaxer> If you need that at runtime, you can patch 'class' to do (push1 '*Classes *Class)
<beneroth> 'dep is very nice
<beneroth> yep I realized later :)
<Regenaxer> But then class symbols are not gc'd
<Regenaxer> (happens seldom though)
<beneroth> T
<beneroth> btw. @PilCon maybe this software is worth a try (dated UX, but features might fit our needs a bit better than jitsi): https://openmeetings.apache.org/
<beneroth> and haven't heard yet about it having basic conceptual security flaws as does BigBlueButton, though I haven't searched yet
<Regenaxer> interesting
<Regenaxer> but OpenMeetings doesn't seem to have an Android App (?)
<beneroth> T
<beneroth> they used to have an flash client and switched to WebRTC recently
<Regenaxer> I like Jitsi, just screen share on Android is missing (still)
<beneroth> so that will probably be the key: their WebRTC quality, and if its working fine on android too
<Regenaxer> WebRTC quality of Jitsi you mean?
<beneroth> yeah, same. I guess screensharing on mobiles is not a priority because hardly anyone sees mobile phones as universal computing devices, unfortunately :(
<Regenaxer> right
<beneroth> (the limitation to special purpose is completely artificial and vendor-lockin stuff)
<Regenaxer> but it seems to be planned for Jitsi
<beneroth> I mean the WebRTC quality of this Apache Openmeetigns
<beneroth> ah okay
<Regenaxer> ok
<beneroth> didn't check the jitsi plans for a while
<Regenaxer> me neither, but there are feature requests
TeddyDD has quit [Quit: Bridge terminating on SIGTERM]
TeddyDD has joined #picolisp
aw- has quit [Quit: Leaving.]
libertas_ has joined #picolisp
libertas has quit [Ping timeout: 240 seconds]
<tankf33der> one of test failed with today's changes
<tankf33der> take a look later.
<tankf33der> and second too
orivej has quit [Ping timeout: 272 seconds]
<Regenaxer> good
<tankf33der> http://ix.io/2FxF
<tankf33der> this code is broken now.
<tankf33der> seems so.
<tankf33der> afk.
<tankf33der> expecting print b2 and 5 on last line
aw- has joined #picolisp
aw- has quit [Quit: Leaving.]
<Regenaxer> ret
<Regenaxer> This looks like a namespace problem
<Regenaxer> Stopping at a breakpoint shows (with '"b2" (println This (: Z2)))
<Regenaxer> hmm, strange
<Regenaxer> looks all correct
<Regenaxer> I debug
<Regenaxer> later
<Regenaxer> looks like a bug in 'intern'
<Regenaxer> : (setq b2 1)
<Regenaxer> -> 1
<Regenaxer> -> b2
<Regenaxer> : (intern "b2" T)
<Regenaxer> : (val @)
<Regenaxer> -> b2 # !!
<Regenaxer> works in pil64
<Regenaxer> Anyway, a little later
orivej has joined #picolisp
<tankf33der> Regenaxer: i think you break it today :)
orivej has quit [Ping timeout: 240 seconds]
<tankf33der> Regenaxer: i think you broke it today :)
<Regenaxer> Not broke, but I changed 'grid' to do (intern .e T)
<tankf33der> ah. ok
<Regenaxer> and (intern "a") behaves a little different from (intern "a" T)
<Regenaxer> The definition of intern is not clear
<Regenaxer> if the symbol exists
<Regenaxer> your code does (let .. (grid ..) 'b2
<Regenaxer> So b2 exists when grid runs
<Regenaxer> So intern must be wrong for T
<Regenaxer> : (setq a 1) (val (intern (def "a" 2)))
<Regenaxer> -> 1
<Regenaxer> This is correct. Same in pil64
<Regenaxer> : (setq a 1) (val (intern (def "a" 2) T))
<Regenaxer> -> 2
<Regenaxer> This is wrong I think
<Regenaxer> pil64 returns 1 too
<Regenaxer> *if* 'a' exists, it should be returned by 'intern'
<Regenaxer> hmm, now I'm confused
<Regenaxer> : (val (intern (def "aaaa" 2)))
<Regenaxer> -> aaaa
<Regenaxer> *both* in pil21 and pil64
<Regenaxer> I expected -> 2
<Regenaxer> cause aaaa does not exist
<Regenaxer> so intern should intern *that* symbol
<Regenaxer> I must re-think 'intern'
<Regenaxer> Not sure if something else breaks
<Regenaxer> I want to change the behavior a little
rob_w has quit [Quit: Leaving]
<Regenaxer> I try, it is not consistent the way it is now
<Regenaxer> We must test everything related to 'intern' again
<Regenaxer> and be prepared for bugs :(
<Regenaxer> It was not correct in pil64 either
<Regenaxer> ok, done
<Regenaxer> Now we get:
<Regenaxer> : (setq a 1) (val (intern (def "a" 2)))
<Regenaxer> -> 1
<Regenaxer> and also
<Regenaxer> -> 1
<Regenaxer> : (setq a 1) (val (intern (def "a" 2) T))
jibanes has quit [Ping timeout: 260 seconds]
<Regenaxer> tankf33der's last test now gives b2 5
<Regenaxer> I released pil21
<tankf33der> i dont have intern tests in mind, occasionally found it
<tankf33der> running
<Regenaxer> tankf33der, can you please test again?
<Regenaxer> yeah
<Regenaxer> But intern is in many places
jibanes has joined #picolisp
<tankf33der> T.
<Regenaxer> As you see, I'm not sure myself
<Regenaxer> The not clearly defined situation is if we do (intern "foo") or (intern "foo" T) or (intern "foo" 'ns) *and* a symbol with that name does exist already
<Regenaxer> Until now, pil *replaced* the existing symbol
<Regenaxer> I think this is not what is expected
<Regenaxer> and the behavior was different for (intern ) and (intern T) in pil21 (in pil64 not). So totally confusing
<tankf33der> all passed.
<Regenaxer> great
<Regenaxer> Let's watch out if any problem shows up
<Regenaxer> I don't remember why I decided to replace the existing symbol
<beneroth> to purge its value and properties maybe?
<Regenaxer> Not really about value
<Regenaxer> purging values is directly doble
<Regenaxer> The question is what is meant by (intern "foo")
<Regenaxer> for example, vip 3nterns transient symbols into 'priv' to make them editable
<beneroth> as I understand the reference: create an internal symbol with name 'foo if it doesn't already exist
<Regenaxer> so *this* symbol must be interned
<Regenaxer> *with* value and all
<beneroth> ah
<beneroth> I see, it's not only about the name
<Regenaxer> yes, if it does not exist all is clear
<beneroth> hm.. and if the internal symbol already exists?
<Regenaxer> the problem is only the conflict
<beneroth> I always assumed than (intern) does nothing
<beneroth> from the reference doc
<Regenaxer> What should "does nothing" mean?
<beneroth> no operation
<beneroth> no change to nothing
<Regenaxer> it must return a symbol
<Regenaxer> so the old or the new?
<Regenaxer> So not it does "no change to nothing"
<Regenaxer> if it exists
<Regenaxer> it returns the existing one
<Regenaxer> So the above priv intern of vip works because priv must be empty
<Regenaxer> ((intern "cdr") (1 2 3)) -> (2 3)
<Regenaxer> both yesterday and today
<Regenaxer> but
<Regenaxer> ((intern "cdr" T) (1 2 3)) -> car
<Regenaxer> yesterday
<Regenaxer> today's version gives (2 3) now
<Regenaxer> it is more consistent
<beneroth> T
<beneroth> (sry was on long phone calls xD)
<Regenaxer> np :)