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
nehals has joined #picolisp
nehals has quit [Client Quit]
lodsw_ has joined #picolisp
lodsw has quit [*.net *.split]
groovy2shoes has quit [*.net *.split]
groovy2shoes has joined #picolisp
_whitelogger has joined #picolisp
aw-1 has joined #picolisp
aw-1 has left #picolisp [#picolisp]
aw-1 has joined #picolisp
aw-1 has quit [Quit: Leaving.]
aw-1 has joined #picolisp
<aw-1> test
<aw-1> oh it works now
aw-1 is now known as aw-mac
<Regenaxer> Perfect :)
<aw-mac> on my Mac now
<aw-mac> aw- is my Linux computer still connected
<Regenaxer> I see
<aw-mac> Regenaxer: i was testing some code and noticed a UTF-8 change
<Regenaxer> yes, it is now up to 4 bytes
<Regenaxer> (which is the full utf8)
<aw-mac> previously the string "lorem𝄞ipsum𝍧lorem" was interpreted as "lorem݄ީpsumݍ笯rem" in PicoLisp
<aw-mac> weird
<aw-mac> now it seems correct
<Regenaxer> good to know
<aw-mac> 4 bytes.. i see
<Regenaxer> I did it mainly for emojis
<Regenaxer> 👍💪
<Regenaxer> 漢字were ok before
<aw-mac> i see
<yunfan> 汉字 :D
<Regenaxer> I also had to change the line editor in the repl
<Regenaxer> oops
<yunfan> just feeled a earthquake
<Regenaxer> Hi yunfan!
<yunfan> Regenaxer: hi
<aw-mac> yunfan: we have many here as well
<aw-mac> oh wow
<aw-mac> Magnitude 6.4 in Taiwan
<yunfan> aw-mac: i remember you live in japan? have you just met that?
<yunfan> yes
<aw-mac> big one
<aw-mac> yunfan: yes i'm in Japan
<Regenaxer> wow
<aw-mac> yunfan: you ok? any damage?
<yunfan> aw-mac: no i am not live in taiwan
<yunfan> i live in hangzhou china mainland
<yunfan> just felt the building shaking for seconds
<aw-mac> oh ok
<yunfan> and when i want to ask my leader to run with me, it stopped :D
<aw-mac> oh right, i remember now
<aw-mac> it's shaking here now
<aw-mac> just a bit
<yunfan> yes, that's what i ask :D
<Regenaxer> aw-mac: How is new life in Okinawa?
<aw-mac> Regenaxer: wonderful, so much cheap fresh vegetables here
<Regenaxer> :)
<Regenaxer> I may have a chance to meet Geo in summer in Sapporo
<aw-mac> ohhh sounds nice
<Regenaxer> yeah
<yunfan> btw, i heard that japan goverment were planning to send free house for anyone willing to live?
<aw-mac> i was thinking of doing a trip to Sapporo this summer as well
<aw-mac> to get away from the heat
<Regenaxer> Good idea!
<Regenaxer> I'm there June 22 - Jul 02
<aw-mac> yunfan: oh yes, "free" houses - it's just old broken homes in places nobody wants to live, with high property tax
<yunfan> aw-mac: if they could send free land, i am very interesting to live there and being farmer :D
<aw-mac> hmm… shaking here is just my desk when I type, sorry my bad
<beneroth> Good morning
<beneroth> nice to see you, aw-mac and yunfan :)
<Regenaxer> Hi beneroth
<beneroth> Hi Regenaxer - nice to see you too, of course :)
<Regenaxer> :)
<yunfan> beneroth: hi nice to see you too :D
<aw-mac> beneroth: hi
<beneroth> Regenaxer, good you added 4bit UTF support!
<Regenaxer> yes, was missing for long
<beneroth> so now picolispDB can claim to be better than MySQL in that regard, too :P
<Regenaxer> cool ;)
<beneroth> in MySQL it was a security weakness even
<Regenaxer> oh, some overflow?
<beneroth> not really, encoding.
<beneroth> 4bit UTF-8 values wou
<beneroth> 4bit UTF-8 values would pass SQL validity parser, but afterwards stripped down to 3bit values before being processed, and if it happens that the 3bit values were valid SQL... it got interpreted
<beneroth> so SQL-injection via emojis was possible under some circumstances
<Regenaxer> I see
<beneroth> we discussed. I wasn't sure we can rule out that risk for pil applications (heavily application dependent), but you saw no risk (probably right) and didn't want to change to 4bit :P
<beneroth> good we have now full UTF-8 capability :)
<Regenaxer> right anyway
<beneroth> exactly!
<beneroth> I guess this update is not breaking anything. It's no change for the DB, as strings are technically stored as raw bytes/numbers anyway, right?
<Regenaxer> yes, symbol names
<Regenaxer> technically just numbers
<beneroth> elegant design
<Regenaxer> The part from "Jo" below
<Regenaxer> What a list of wrong statements!!
<Regenaxer> So I answered today (a bit late though)
<beneroth> I found this blog article when I originally researched picolisp (2014 or earlier)
<Regenaxer> yes, me too, but "Jo" was later (2017)
<beneroth> can't see your comment, it probably as to be enabled first by an admin
<beneroth> aye
<beneroth> I grant that the documentation is a mess. but not an inconsistent nightmare - enterprise software documentation is usually far worse, even when it comes in nicer packaging. picolisp.com I find still a kind a mess, even when it improved with the latest restructuring.
<beneroth> browser GUI... bullshit, especially has Jo than continues to talk about filters/firewalls/closed ports, which has nothing to do with browsers.
<beneroth> the design critic I cannot understand. I find picolisp a extremely practical blend of OOP and functional.
<beneroth> maybe this guy never really grokked OOP (surely not in Alan Kay sense), and probably equals functional with "no values at all, no mutability", coming from a pure math/haskell background maybe...
<beneroth> these are my spontaneous thoughts on that comment. How wrong am I, Regenaxer ? :)
<Regenaxer> I think it is moderated, my comment should show up later
<Regenaxer> Your thoughts are exactly what I think
<Regenaxer> I can post here what I wrote:
<Regenaxer> Jo, what you write is all wrong.
<Regenaxer> oops
<Regenaxer> Jo, what you write is all wrong.
<Regenaxer> a decade. PicoLisp GUI applications run on every browser, even on text browsers
<Regenaxer> like w3m. In PilBox (generic Android App) they run in the WebView component.
<Regenaxer> In PicoLisp there is no "gap between object-oriented language versus relational
<Regenaxer> "every browser has a different behavior" is not true any longer, since at least
<Regenaxer> datamodel". Did you even *look* at it? The PicoLisp database is an OO-DB.
<Regenaxer> Where is the documentetion inconsistent?
<Regenaxer> The statement about /proc/self/fd/0 for stdin is wrong. You read stdin
<Regenaxer> (keyboard, redirected or whatever) the normal way.
<Regenaxer> Maybe this paste went wrong. Anyway ...
<beneroth> a confrontational opening, but well it was a very weak attack on your baby on a good article about it, so probably rightly so.
<Regenaxer> :)
<beneroth> I would have added that you are the picolisp author and that it has been and still is in use in big companies for decades :)
<beneroth> remember: you don't want really to argue with "Jo", you want to counter that comment for the public readers
<Regenaxer> Perhaps, but I just wanted to comment on his statements
<Regenaxer> ok, I should have omitted the name
<Regenaxer> But after that long time the context may be forgotten
<beneroth> na referencing that comment is alright
<beneroth> but in terms of rhetoric you should've added some hints why the reader should value your comment more than "Jo"s, I think
<Regenaxer> I see
<beneroth> should I also add a comment?
<Regenaxer> That would be nice
<Regenaxer> Gives more credibility
<beneroth> yeah.
<Regenaxer> As I'm not unbiased
<Regenaxer> No hurry, just if you have time
<Regenaxer> Perhaps my comment will not show up
<beneroth> haha, you think I am? I have different perspectives than you, and (I believe) more knowledge about mainstream software dev / context these days... but I like to attack every one attacking pil without good arguments. even when the attack was not meant really but just a very bad wording *g*
<beneroth> no worries, I don't think the blogger is very active. maybe it takes some days until the comments are reviewed.
<Regenaxer> Good view :D
<Regenaxer> yeah
<Regenaxer> No hurry after that long time
<beneroth> I like talking and arguing too much. aw-mac and mike are wiser, they shut up.
<Regenaxer> :)
<beneroth> Regenaxer, exactly
<beneroth> haha, rereading the article.. as it is about practical lisps.. I'm not sure I would include Arc. It surely can be used for real applications (the HN webserver and software is written in it afaik), but generally it just lingers unused and incomplete around, afaik
<beneroth> well maybe I'm terrible wrong.
<Regenaxer> Depends how you read "practical". Arc is also targeted at succinctness, which I find important for being practical
<beneroth> well ok the article is on "Fluchtpunkt"-Lisps, defined as "1. Focused. 2. Spartan (radical minimalist) 3. controversial 4. fun" - surely spot on :)
<beneroth> I fully agree with your statement
<beneroth> but as nearly all comparable languages are way less succinct than picolisp, you must accept that the majority of programmers and language designers seems to have another viewpoint :)
<Regenaxer> true
<Regenaxer> I understand that viewpoint
<beneroth> some might have tried to approach your succinctness and failed, but probably because of perverse business incentives not because of a lack of cleverness. lack of radicalism perhaps.
<beneroth> well ok. on second thought I'm regularly doubting the cleverness of the c# designer... and the java designers..
<Regenaxer> T, most developers are not free
<Regenaxer> indeed
<beneroth> T
<beneroth> important point
<Regenaxer> I was lucky as I wan never under pressure
<beneroth> and the limitations are not even external only - you can see with pil beginners. people tend to write way too much code. people tend to overcomplicate things, because simpler is both harder and looks easier.
<Regenaxer> exactly
<beneroth> there is more Zen in pil than what is visible :)
<Regenaxer> Glad to hear
<beneroth> I love this talks with you.
<Regenaxer> :)
<aw-mac> beneroth: we don't shut up, we code ;)
<beneroth> programming, motherfucker!
<beneroth> aw-mac, as I said, wiser than me. I code much, but I talk way too much :P
<aw-mac> Regenaxer: question about (local)
<aw-mac> (local) MYVAR = correct syntax?
<aw-mac> and (local) (MYVAR) = correct syntax?
<aw-mac> and (local) (var1 var2 var3) = correct syntax?
<aw-mac> what about:
<aw-mac> (local) (var1 var2
<aw-mac> var3)
<aw-mac> a bit confused
<aw-mac> beneroth: if you have a chance, i'm curious what you think about the whole RedisDB, MongoDB OSS licensing ordeal that's been going on lately
<Regenaxer> All correct
<Regenaxer> The point is simply that *one* item is 'read' by (local) in the new namespace
<Regenaxer> And 'read' by (local) in the new namespace *only*
<Regenaxer> So creation of the symbol(s) is forced in that namespace
<aw-mac> hmmm
<aw-mac> does (local) VAR1 VAR2 VAR3 = correct syntax?
<aw-mac> or invalid?
<beneroth> I guess (local) is to be looked at like (====) - a special command (not read macro) to change the readers behaviour
<Regenaxer> aw-mac, it is invalid, as (local) reads *one* item
<beneroth> though even (====) takes arguments, so the (local) syntax is really a heavily outlier, agreed Regenaxer ?
<aw-mac> ok ok i see
<Regenaxer> yes, it is unusual
<aw-mac> thanks
<Regenaxer> (here) is similar perhaps
<Regenaxer> or (till)
<beneroth> (here) is just a short-cut for (in NIL (echo ...)), no?
<beneroth> ah now
<beneroth> it isn't
<beneroth> because it acts on reader level
<beneroth> but yeah...
<beneroth> no
<Regenaxer> they all operate on the current input stream
<beneroth> forget may last 5 messages...
<Regenaxer> So (local) is no magic when one is aware how the Lisp reader works
<beneroth> nothing is magic if you understand it, that is not really a overly good argument ;-)
<Regenaxer> hehe, true
<beneroth> granted the lisp reader is simpler, so it's easier to understand, but still
<beneroth> and the syntax of (local) heavily breaks with the usual picolisp conventions. more uniformity would be an improvement, I believe.
<Regenaxer> In any case, I see no other way how 'local' could be implemented
<beneroth> no way that the argument is inside the parens?
<Regenaxer> (local 'sym ...) won't work of course, as syms are then read already
<beneroth> well it would need to be implemented as a read-macro, de facto
<Regenaxer> read + eval
<Regenaxer> read macro also wont work
<Regenaxer> it also reads and then evals
<beneroth> why does it work with (====)
<Regenaxer> (====) just clears the transient table
<Regenaxer> and *keeps* symbols in the current table
<Regenaxer> I mean, it keeps the argument symbols
<Regenaxer> So '====' *must* get exactly those symbols
<beneroth> I see
<Regenaxer> eg. they may have values and properties
<Regenaxer> (local) forces *new* symbols
<beneroth> well couldn't (locale) be a read-macro which sets a flag which governs the reading of its arguments ?
<Regenaxer> So the only way is reading them without searching other namespaces
<Regenaxer> I think it can't
<Regenaxer> reading always means searching the namespaces
<Regenaxer> and using the first found one
<beneroth> ok. I believe it would be nice if you could think once more about (local) on one of your walks :) but I don't dare to argue with you, without having a working code example on my side :P
<beneroth> aw-mac, licensing. well obviously those products are not fully FOSS nor OSS anymore, it's a switch to the classic "open core, closed extensions" FOSS business model, right?
<Regenaxer> I think that there is absolutely no other way
<beneroth> I believe you.
<Regenaxer> except for writing (symbols '(newNamespace) (read)) (a b c)
<beneroth> But I also remember you once believed ARM and picolisp being an impossible combination and then it turned out to be perfect match :P
<Regenaxer> right, one should never be absolute
<beneroth> So if you say something is possible, I believe you. But if you say something is impossible, I think "let's give Regenaxer some more beers and some more walks and than it might change" :P
<Regenaxer> OK, there are other ways, but clumsy, like (symbols '(newNamespace) (read)) (a b c)
<beneroth> well that still this "outside parens" notation
<Regenaxer> yes
<Regenaxer> or read from a separate file
<beneroth> and yes, I see there are huge loops do jump through in the implementation for another way, which is bloat.
<Regenaxer> or pass transients and intern them
<Regenaxer> all clumsy
<Regenaxer> yes
<Regenaxer> One needs to understand that namespaces are only about reading
<beneroth> aw-mac, I see the "AWS and the other clouds make big money on my product and my business model is not really working compared to that" point. In fact I thought about it a lot myself, how to license my product to get around this.
<beneroth> aw-mac, I don't really want the open-core business model. but it's likely the most proven FOSS business model (even when it is, in fact, non-FOSS in nature). What do you think ?
<beneroth> Regenaxer, that last sentence you should write in BIG letters in the reference of every mentioning of the namespacing stuff. because it is true but also a radical different approach than what usually is understood with "namespaces"
orivej has joined #picolisp
clacke_movim has left #picolisp [#picolisp]
<Regenaxer> Is it really so different?
<beneroth> Regenaxer, the point of picolisp namespaces is that it is a tool for loading, but not practical for declarations in library sources.
<Regenaxer> I think it is
<beneroth> declaration of "this is namespace X" are usually within the source code of the library.
<Regenaxer> What is different from other systems is the concept of symbols
<Regenaxer> The declarations are the same
<Regenaxer> I declare all in libraries
<beneroth> T, as in the very nature of lisp, as we are writting ASTs and not something which gets translated into an AST
<beneroth> do you? but what if you use libraries within libraries?
<Regenaxer> 'declaration of "this is namespace X"' is not in libs in pil?
<Regenaxer> The same
<beneroth> I know you can do it, but I haven't find myself a good way without getting into practical problems at some point.
<Regenaxer> I do it a lot in PilBox apps
<Regenaxer> each PIL is a library if you like
<Regenaxer> They all nest other stuff
<Regenaxer> several er.l's run in parallel for example
<Regenaxer> and they include lib/android.l, lib/gis.l etc. each with separate namespace
<beneroth> ok, so you have main namespace 'pico and additionally 'lib and 'foo and 'bar. and 'foo requires stuff from 'lib and 'bar. how to declare this during code-writting, not during loading ?
<beneroth> ok, so lib/android.l is included multiple times, present in multiple (differently namespaced) internal trees ?
<Regenaxer> Then 'foo' loads bar
<Regenaxer> It could be included multiple times
<beneroth> yeah right, that would be a solution, though seems clumsy to me.
<beneroth> well not clumsy, but overhead.
<Regenaxer> not android.l in this case, as it is loaded by PilBox on startup
<Regenaxer> I think you can have *any* structure
<beneroth> yeah, works out if the libraries know about how they're combined.
<Regenaxer> nest libs or not
<Regenaxer> no, they dont need to know
<beneroth> but without that knowledge, you have to nest, right?
<Regenaxer> it depends
<Regenaxer> if a lib uses another, it has to know about it, no?
<Regenaxer> It can use it with ~ or not
<Regenaxer> I think it is totally flexible
<Regenaxer> You specify a search order, thats all
<Regenaxer> and even that can be dynamic
<Regenaxer> as it is just a list of namespaces
<Regenaxer> And if you dont set a search order, you can fetch symbols explicitly with ns~sym
<Regenaxer> or ns1~ns2~ns3~sym though I never did that
<Regenaxer> As I said, what one *really* needs to understand is how symbols and names are related in Lisp (not only PicoLisp)
<Regenaxer> AND that namespaces deal with *names* and *symbols*, not just definitions (values, functions etc.)
<Regenaxer> In other languages symbols and names are not clearly distinguished
<Regenaxer> or, to be correct, symbols don't even exist
<beneroth> T
<beneroth> where do you set the search order? in the final program, right?
<Regenaxer> Not only. In any place you want
<beneroth> yes, but one place, globally, not multiple sort order declarations...
<Regenaxer> Also I change it often in between
<Regenaxer> no
<beneroth> hmmm
<Regenaxer> Sometimes several times in a source file
<Regenaxer> and also in local places
<Regenaxer> with (symbols '(a b c) (doSomething))
<beneroth> is there a way to get (symbols 'namespace 'prog) functionality (ordering changed during prog, reset afterwards) for a whole file? instead of putting most code within the (symbols ... prog) prog block ?
<beneroth> like resetting the namespace ordering has it's happening after (symbols) evaluation had ended, but on EOF of the current file
<Regenaxer> yes, either on top of the file, or outside and then load the file
<Regenaxer> I also extend some libs in other places
<Regenaxer> eg in "radio/lib.l":
<Regenaxer> (symbols '(android pico))
<Regenaxer> (local) (STREAM_MUSIC reset setAudioStreamType setDataSource parse prepare start
<Regenaxer> release)
<Regenaxer> ...
<Regenaxer> (symbols '(radio pico android))
<beneroth> "If the namespace was switched (with symbols) while executing a file, it is restored to the previous one."
<Regenaxer> (local) (radioStream stopStream setRadioAlarm runRadioAlarm clrRadioAlarm)
<beneroth> ah yes
<beneroth> right
<beneroth> humm humm
<Regenaxer> I extend the android lib in radio this way
<beneroth> you are right. I need to play more around with pil namespaces.
<Regenaxer> Another example
<Regenaxer> in fifi I put it on top of the app the normal way:
<Regenaxer> (symbols 'fifi 'gis 'pico 'android)
<Regenaxer> But inside the same file, I have 3 places like
<Regenaxer> (symbols '(fifi gis pico android) .... long prog )
<Regenaxer> The reason is that the code is in tasks
<beneroth> My main problem is a separate one, storing source code in the DB. which is not feasible, but not really because of namespaces, but because source code should not be stored as a list in db. should be stored as text or real source files, than my problems would not occur :)
<Regenaxer> so may be called in other contexts
<Regenaxer> but it operates on the DB or loads stuff
<beneroth> I see
<Regenaxer> No, DB works fine
<Regenaxer> I only declare the classes in the namespaces
<Regenaxer> In PilBox I have currently 4 DBs running in the same process
<Regenaxer> (one after the other, switching namespaces)
<beneroth> oh I'm interested in that setup
<beneroth> so the external symbols are in different namespaces?
<Regenaxer> 2 are BTG and Fifi, not public
<Regenaxer> the other are radio and browser
<beneroth> e.g. {G1} might exist in all for 4 DBs being another object ?
<Regenaxer> yes
<Regenaxer> this is *not* a namespace issue
<beneroth> T
<Regenaxer> only internal symbols
<beneroth> that I will have to come back to.
<Regenaxer> it is (pool) which handles this
<Regenaxer> ok
<Regenaxer> PilBox calls a 'stop' and a 'start' body when switching apps
<Regenaxer> so there 'pool' is called
<Regenaxer> and 'tasks' are stopped and started etc
<Regenaxer> also background bin/ssl processes are stopped and started
<Regenaxer> In Fifi 'start' is 70 lines long
<beneroth> the other issue I was talking about: you have a function definition. on first view a function definition is just a simple list, so could be stored as (+List +Any) in pilDB. which is true and works for simple cases. but when the function declaration contains read macros (especially back-tick) or namespace-prefixes, then the concept falls apart, because what is stored in pilDB is the "read" list, and this might not be usable when loaded from pilDB at a later
<beneroth> point, when the assumptions implicit in the function definition do not longer hold true.
<beneroth> freemint once ran into the same trap.
<beneroth> (dunno if he remembers, he brought it up here once I remember)
<beneroth> you see my "issue" ?
<Regenaxer> you mean cause read macros dont run in plio?
<beneroth> it's a bug, it's wrong usage
<beneroth> no, because they're not present anymore :D
<beneroth> as the code is first read and then written into plio
<Regenaxer> yes
<beneroth> I meant: it's NOT a bug, it's wrong usage
<Regenaxer> no 'read' involved
<Regenaxer> yes
<Regenaxer> Depends what the intention is
<beneroth> storing source code in pilDB (for versioning and editing)
<beneroth> should be text or real blob files which are loaded :)
<beneroth> then no problems anymore
<Regenaxer> One could use a blob for the source
<Regenaxer> T
<beneroth> I would like to store single method definitions
<Regenaxer> ok
<Regenaxer> also comments can be used if in blobs
<Regenaxer> and nested (load)
<beneroth> so not sure if I should use text or blobs. probably dynamically both, depending on the size. or only blobs, for simplicity.
<Regenaxer> Why text *or* blobs? Isnt it the same
<Regenaxer> ?
<beneroth> generally, at the moment at least, in the end real code files get generated from this and loaded the traditional way.
<Regenaxer> text blobs
<beneroth> with text I mean +String instead of +Blob :)
<Regenaxer> ok, so direct path names
<Regenaxer> yes, ok
<Regenaxer> thats the best probably
<Nistur> mornin'
<Regenaxer> can also be edited manually
<beneroth> Hi Nistur :)
<Regenaxer> Hi Nistur
<Nistur> reppin' the pil today (ie wearing my tshirt!)
<beneroth> Regenaxer, T, the unix "it's just simple human-readable text" is so very important, and so easy neglected. but it's so important. see HTTP. see HTML.
<beneroth> Nistur, nice!
<beneroth> Nistur, which was the shop url again? are they still available? I got two, but one already got a hole! :O
<Nistur> :-O
<beneroth> me clumsily getting caught without noticing or something like that, I believe
<Nistur> tbh I'm a little bit disappointed with the quality of them. It had good reviews and was EU based, but the printing especially didn't hold up to what I was hoping for :(
<Nistur> I'll see if I can recall the URL though
<beneroth> I washed them as black clothing, color and print is still fine
<beneroth> Nistur, thanks, I was unable to find the URL in my email or the picolisp mail list archive xD
<beneroth> aw-mac, I'd like to discuss that product licensing topic with you. also I have some ideas for my licensing, you could probably give me some good insights. ping me when you're back :)
<beneroth> Nistur, right, thanks!
<beneroth> so what are you unhappy about the quality? right as was delivered, or something which showed up later?
<Regenaxer> beneroth, I recommend to look at these 2 simple examples for DBs with namespaces:
<Nistur> beneroth: the printing, compared to other tshirts I've got, seemed sub-par. The text wasn't crisp, and the colour offsets seemed a bit wrong (white on the tops of the logo, and bleeding into the text)
<beneroth> Nistur, T
<beneroth> though I didn't bother me much
<beneroth> Regenaxer, thanks! I downloaded both before, but I guess you updated them in the meantime :)
<Nistur> it wasn't terrible :) It just was a bit worse than I was hoping for :P
<beneroth> ok. agreed.
<beneroth> Regenaxer, thanks for the discussion :)
<Regenaxer> :)
<Regenaxer> In case of BTG, it is a lot more complicated
<Regenaxer> The same code runs on the server and in PilBox
<Regenaxer> I will show you next time we meet
aw-1 has joined #picolisp
aw-1 has quit [Client Quit]
aw-mac has quit [Ping timeout: 246 seconds]
<beneroth> Regenaxer, ok. I'm already afraid of diving in that complex artwork ^^ So you say we better arrange a longer meeting (is one week enough? *g*) ? I might be better self-limiting this time ;-)
<beneroth> Regenaxer, I also sent a (way too long) comment to the Fluchtpunkt blog
<beneroth> s/better/better at
<beneroth> maybe this autumn. and maybe I got again a picolisp employee by then. Will see :)
orivej has quit [Ping timeout: 255 seconds]
<Regenaxer> beneroth, ok, let's see
<Regenaxer> No hurry
<Regenaxer> And thanks for posting there!
<Regenaxer> BTG is no hurry, all is still flowing and changing a lot
<beneroth> good
<beneroth> congenial customer
<Regenaxer> yes, very much indeed!
<Regenaxer> And a nice way to develop. We meet every 2 weeks or so (only 3 km from here), and I set up a chat server *inside* the old application so that we are always connected
<Regenaxer> 3 persons on their side and me
<Regenaxer> The chat is cool, uses serverSentEvents
<beneroth> how often do you meet them irl ?
<Regenaxer> 2 weeks or so
<Regenaxer> next time 25th
<Regenaxer> afp
srin_i has quit [Ping timeout: 256 seconds]
<beneroth> [security] code execution vulnerability in broadcom WLAN drivers (both in the FOSS and proprietary variants): https://www.kb.cert.org/vuls/id/166939/
<Regenaxer> ret
xopota has joined #picolisp
xopota has left #picolisp [#picolisp]
<Regenaxer> beneroth: One even more "wild" namespace DB usage: In the BTG program I now allow access to the *old* program's DB from the running new programm. The old program has a similar but widely different E/R model. But I can encapsulate it all into a 'leg' namespace, and it all runs together
<beneroth> wonderful. yeah I think you told me about this - or it was an earlier iteration during another migration ?
<Regenaxer> No, this is the first time I do this
<beneroth> some of my software should "mandantenfaehig", meaning multiple brands/companies within the same app but clearly separated. maybe it would make sense to split those parts in separate DBs, accessed from the same main app.
<Regenaxer> is in the new system since early on (last year)
<Regenaxer> Indeed
<beneroth> and as I tend to / plan to make bigger (concept-wise) application consisting of separate (partly over-lapping) modules/database-spaces... then if I would make bigger use of the concept of multiple databases within the same application, I might reach some better performance/scalability, through reaching more granular caching (fetching) and quasi-local locking by DB-splitting (instead of fumbling with pilDB locking mechanics)...
<beneroth> or so I think... maybe
<beneroth> what do you think?
<Regenaxer> Easier is to use multiple processes
<Regenaxer> same application though
<beneroth> T
<beneroth> multiple processes, but all from the same parent, within one pil IPC family. I really love the pil IPC mechanic.
<beneroth> or better connect complete separated process families by plio ?
<Regenaxer> yes, that too
<Regenaxer> or, even better, not plio but 'blk'
<beneroth> then processed could be split over multiple hosts - but I have a feeling that this should not be necessary (and adds network issues)
<Regenaxer> I use that heavily now in BTG
<Regenaxer> each process reads the other processes DBs
<beneroth> accessing db files with 'blk' even when that DB is open by another pil IPC family ?
<Regenaxer> I have now also dbgc for such multi-connected DBs
<beneroth> oh nice
<Regenaxer> right
<Regenaxer> not same family
<beneroth> gc for such cases is a pretty hard trick
<beneroth> ok
<Regenaxer> but must be on same machine
<beneroth> for preventing network issues, or other reasons?
<Regenaxer> to use 'blk'
<beneroth> (network may endlessly delay, it is a big can of worms)
<beneroth> ah right
<Regenaxer> no need to start other processes even
<beneroth> well ... NFS :P
<Regenaxer> first I used rpc and plio
<Regenaxer> But each access starts the other process
<Regenaxer> via httpGate
<beneroth> overhead because of additional memory caching instead of direct file IO, I believe?
<Regenaxer> overhead because processes are started
<Regenaxer> I have about 40 DBs in BTG in the final stage
<beneroth> holly molly
<Regenaxer> and each DB may refer to objects in another db
<beneroth> different modules/parts of the app, or different user groups, or... ?
<Regenaxer> One DB per user
<beneroth> ah right
<Regenaxer> mirror to/from his PilBox
<beneroth> aye
<Regenaxer> works good so far, but only 8 DBs now
<Regenaxer> Will be tough to explain the system to you
<Regenaxer> I get confused sometimes myself
<beneroth> I look forward to experience with such setups and eventually maybe benchmark it with the more mainstream "distributed db" - which follow quite another approach, abstracting multiple hosts into one while you keep granularity and control, or so understand it currently
<Regenaxer> good
<Regenaxer> oops, must go to buy stuff. Holiday tomorrow and we have guests
<beneroth> yeah, I'm not yet sure if your complex entanglement or the "one way to use the DB independent of how many hosts are involved - if 3 or hundreds" (of the distributed dbs, so the theory, but in practice the abstractions are often quite leaky in corner cases) approach proves better
<beneroth> ok, I just came home from getting supplies :)
<beneroth> happy shopping
<Regenaxer> :)
<Regenaxer> thx, see you! :)
<beneroth> so I will try to work into your concepts myself with the radio and browser examples, and when I fail we prioritize my visit to you higher and make a real in-depth workshop
<beneroth> I thank you!
<Regenaxer> :)
<beneroth> I need to grok this stuff for my architectures within this year, I believe.
<beneroth> :)
<Regenaxer> ret
srin_i has joined #picolisp
srin_i has quit [Quit: Page closed]
sri_ram has joined #picolisp
sri_ram has quit [Client Quit]
srin_i has joined #picolisp
<srin_i> Hi ...I have been able to complete the multi-column file listing, (with variable column size similar to unix ls), based on example 4.18.1 in https://picolisp.com/wiki/?pce-pleac-arrays
<Regenaxer> Perfect
<srin_i> I dont know if this will display correctly, but output of the script is
<srin_i> bin/lsMultiCol.l app CHANGES COPYING cygwin demo doc64 draw2Rects.l~ ext.l img java lib.css lib.l man opt README src TAGS test.l Tinymce tinymce_4.1.7.zip bin colwords.txt CREDITS dbg.l doc draw2Rects.l ersatz games INSTALL lib lib.css~ loc misc pil re-enter src64 test test.l~ tinymce x.pdf
<srin_i> hmm that got messed up :)
<Regenaxer> yeah
<srin_i> Hello Regenaxer...good afternoon :)
<Regenaxer> :)
<srin_i> I was wondering if I could send you the script...as pasting here seems to mess it up (although when you paste, somehow the indentation is retained)
<srin_i> so you could (if time permits) give me suggestions for improvement
<Regenaxer> I use ix.io for that
<srin_i> ix seems to be a unix command?
<Regenaxer> no, it is a website
<Regenaxer> like pastebin
<Regenaxer> but it makes raw mode immediately, thus I like it a lot more
<srin_i> ah ok...will try it now
<srin_i> although just typing ix.io in my browser url gives me a link to something like a man page for the ix command
<Regenaxer> hmm, I've built it into Vip
<Regenaxer> a single commands pastes the current buffer to ix.io
<Regenaxer> let me check what it does
<srin_i> i think i have to install ix and curl
<srin_i> latter should be there already
<Regenaxer> Here is what Vip does :)
<Regenaxer> ("ix.io" # Paste to http://ix.io
<Regenaxer> (out '("curl" "-sF" "f:1=<-" "ix.io")
<Regenaxer> (pipe
<Regenaxer> (mapc prinl (: buffer text)) )
<Regenaxer> (prCmd (rdLines)) ) )
<Regenaxer> So you need only curl
<Regenaxer> echo file >curl "f:1=<-" "ix.io"
<srin_i> ah...thanks...let me try that
<Regenaxer> You'll get back an URL with the paste
<srin_i> (I got no output when I did echo bin/lsMultiCol.l >curl "f:1=<-" "ix.io")
<srin_i> i think i must do cat rather than echo
<srin_i> no..that doesnt work..
<srin_i> echo file simply sends the name of the file to curl, so i thought cat would be similar to the prinl...
<srin_i> but that does not work
<Regenaxer> ah, yes! cat of course
<srin_i> and I must replace > by | ...so experimenting with that...I did not know about curl....nice
<Regenaxer> Hmm, but the above command surely works - I use it often
<Regenaxer> I also find this in my bash history:
<Regenaxer> $ cat file | curl -F 'f:1=<-' ix.io
<srin_i> yes...thats what i did...but i get error from curl
<srin_i> Ah ....a -F flag is needed
<srin_i> is the url to my script
<Regenaxer> yes, my wrong. Vip uses "-sF"
<Regenaxer> anyway, good it works now :)
<srin_i> yes and I made a script from it..:)
<Regenaxer> good :)
<Regenaxer> Got your code
<srin_i> the multicolumn script is at the above url...it is almost certainly inefficient :)
<Regenaxer> I would not make so very long lines ;)
<srin_i> and not indented properly...
<srin_i> my vi is not setup yet..
<srin_i> ah yes...just noticed the in line :)
<srin_i> too long
<Regenaxer> I indented it here, no problem
<srin_i> should set tabstop to 4 instead of 8 i think
<Regenaxer> I think you can get the columns more easily
<Regenaxer> (format (sys "COLUMNS"))
<srin_i> but that did not work
<Regenaxer> oh
<srin_i> in my system...there is no env var called COLUMNS
<Regenaxer> I see, ok
<Regenaxer> then perhaps a tput option?
<srin_i> oh wait...i just did it again ....export | grep "COLUMNS" declare -x COLUMNS="211"
<srin_i> i must have typed it wrong before
<Regenaxer> ok
<srin_i> no...i was right...dont have COLUMNS on my system....in that shell I did an explicit export COLUMNS=211 to test the (sys "COLUMNS") that is why it is still there...it is not there in other terminals
<srin_i> am not familiar with tput...will check that
<Regenaxer> COLUMNS is best
<srin_i> ah a simple
<Regenaxer> otherwise, to parse a file, I would use 'from'
<srin_i> tput cols gives the answer...indeed much simpler
<Regenaxer> (in '("stty" "-a") (when (from "columns ") (till ";" T)))
<srin_i> than parsing stty output
<Regenaxer> T
<srin_i> ah nice!!
<Regenaxer> in your loop, I would not use (read)
<Regenaxer> (read) is the Lisp reader
<Regenaxer> it expects s-expressions
<Regenaxer> does things like comments and read macros
<srin_i> yes it read 211; so i had to do gymnastics to get rid of the ';'...using chop etc
<Regenaxer> yeah
<srin_i> i like your from...till more
<Regenaxer> yes, thats the best
<Regenaxer> and fastest
<srin_i> i think even if less efficient than tput...i like this version...(after from till change, as it shows processing)
<srin_i> (I can also add comment showing the use with tput)
<Regenaxer> Oh, (setq dir (or (opt) ".")) is not a good idea
<Regenaxer> 'dir' is a built-in function
<srin_i> oops :)_
<Regenaxer> (setq *Dir ... is better
<Regenaxer> to denote a global
<srin_i> yes....you are right...in any case I should have used Dir rather than dir....*Dir is even better
<Regenaxer> Of course you could also use (dir) instead of a pipe from 'ls', but this is the exercise ;)
xkapastel has joined #picolisp
<srin_i> :) yes..
<Regenaxer> (off 'LL) is not correct
<Regenaxer> 'off' does not evaluate
<srin_i> (intent was to set LL to NIL)
<Regenaxer> So you set (quote . LL) to (NIL . LL)
<srin_i> (ah so...off LL)
<Regenaxer> no effect :)
<Regenaxer> yes
<Regenaxer> LL is NIL anyway by default
<srin_i> true..i rely on C being non-zero when exiting the loop to see if there is valid info to print
<Regenaxer> (let (N 1) needs no parens here
<srin_i> so not needed
<srin_i> (fixing as you point out :) )
<srin_i> (I have to rework the stty line at leisure, based on you from..till...idea)
<Regenaxer> ok
<Regenaxer> The final main loop seems good
<Regenaxer> I would reformat and indent:
<Regenaxer> (while (find pair L)
<Regenaxer> (map
<Regenaxer> (and
<Regenaxer> '((L W)
<Regenaxer> (prin @)
<Regenaxer> (pop L)
<Regenaxer> (space (- (car W) (length @))) ) )
<Regenaxer> L LL)
<Regenaxer> (prinl) ) )
<Regenaxer> or better:
<Regenaxer> (and C
<Regenaxer> (while (find pair L)
<Regenaxer> (map
<Regenaxer> '((L W)
<Regenaxer> (and
<Regenaxer> (pop L)
<Regenaxer> (prin @)
<Regenaxer> (space (- (car W) (length @))) ) )
<Regenaxer> L
<Regenaxer> LL )
<Regenaxer> (prinl) ) )
<Regenaxer> hmm, does this show up properly?
<Regenaxer> I'm spoiled perhaps as I use a plain text irc client in a terminal
<srin_i> yes....shows up nicely....(copying to my file to remind me later to format)....
<Regenaxer> ok, good to know
<Regenaxer> You use a browser client?
<srin_i> (what is the multiline comment symbol btw?)
<srin_i> yes I am just using from chrome
<Regenaxer> it is #{ comment }#
<srin_i> ah..thanks
<Regenaxer> this also nests
<srin_i> there is also a trick by putting 0 at any point in the file
<srin_i> to stop further reading?
<Regenaxer> yes, but NIL
<srin_i> ah just NIL on a line by itself
<Regenaxer> not even a line, just as top level expression in the file
<Regenaxer> Can also be a read macro
<Regenaxer> `(some condition)
<Regenaxer> if condition does not hold, the reader gets NIL and closes the file
<Regenaxer> There are several examples in the sources
<Regenaxer> eg. `*Dbg at the end of lib.l
<srin_i> great ...will look for it..but this is an easy way to put human readable content near the end of a file....just NIL and then the content
<srin_i> oh very nice...if *DBG is NIL, nothing else is read later...
<srin_i> so a version of 'conditional compilation'
<Regenaxer> yes, read macros are 'conditional compilation'
<Regenaxer> as the reader is in fact a kind of compiler
<srin_i> (were you able to execute my script...do you think the output looks correct on directories such as /tmp? I tested it here...
<Regenaxer> compiles source text into cell structs
<srin_i> one diff is that ls seems to use two spaces between columns, i used one space
<Regenaxer> ok, I replace the first line
<srin_i> yes, i dont have global install
<Regenaxer> It gets too long
<Regenaxer> by 2 chars it seems
<srin_i> yes...i think ls uses different spaces between columns (but the number of columns should be exactly same, I hope?)
<Regenaxer> yes, looks vertically correct
<srin_i> was a very nice learning example for me...
<Regenaxer> great :)
<srin_i> Many thanks for all your help...I thoroughly enjoyed working on an example with "real-world" application...
<Regenaxer> :)
freemint has joined #picolisp
srin_i has quit [Ping timeout: 256 seconds]
ubLIX has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
ubLIX has quit [Ping timeout: 268 seconds]
ubLIX has joined #picolisp
ubLX has joined #picolisp
ubLIX has quit [Ping timeout: 255 seconds]
ubLX has quit [Ping timeout: 250 seconds]
aw-1 has joined #picolisp
orivej has joined #picolisp
orivej has quit [Ping timeout: 246 seconds]
orivej has joined #picolisp