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
stack1 has quit [*.net *.split]
inara has quit [*.net *.split]
mario-goulart has quit [*.net *.split]
stack1 has joined #picolisp
inara has joined #picolisp
seninha has quit [Quit: Leaving]
avocadoist has quit [Ping timeout: 252 seconds]
avocadoist has joined #picolisp
pablo_escoberg has joined #picolisp
<pablo_escoberg> Hey all.  Is there a way to specify an open ended range in `select` without a generator function?
<pablo_escoberg> I assume (NIL . x) specifies <= x , but does (x . NIL ) mean >=x as well?
<abu[7]> Close :)
<abu[7]> You need 'T'
<pablo_escoberg> ah, ok.  TY
<abu[7]> (NIL . T) is all
<pablo_escoberg> perfect.  Might want to note that in the select doc.
<abu[7]> It is a general feature of comparisons
<abu[7]> 'T' is infinite
<pablo_escoberg> Cool.  I do remember seeing that somewhere.
<abu[7]> Yeah, there is a section "Comparing" in @doc/ref.html
<pablo_escoberg> yeah, that's probably where it was.
<pablo_escoberg> Are there any equivalents to `group by` and aggregates, or does that need to be done manually?
<abu[7]> (by '((X) (weight X)) group Lst)
<abu[7]> or (by weight group Lst)
<pablo_escoberg> ok, I'll look into `by` and `group`
<abu[7]> In case of DB, you need all results first naturally
<pablo_escoberg> Thanks again.
<pablo_escoberg> right
<abu[7]> so 'collect' is good usually
<pablo_escoberg> hmmm....  but for large amounts of data, pretty much manual, right?
<pablo_escoberg> Same with ordering, I assume.
<abu[7]> Yes, 'by' makes sense usually only with 'sort' and 'group' (I never found another use case)
<abu[7]> What do you mean with "manual"?
<abu[7]> "heavy"?
<pablo_escoberg> well, I'm thinking about it and "manual" doesn't exactly makes sense.  It seems `select` returns results in unpredictable order.  So I can use 'sort', but only if I already have all the results
<abu[7]> yeah
<pablo_escoberg> If I'm pulling in a lot of records, that could become an issue with memory, etc.
<abu[7]> right
<pablo_escoberg> But I guess sql engines have to do the same thing at some point...
<abu[7]> So "manual" may make sense
<pablo_escoberg> right, just collect groups using `push`
<abu[7]> E.g. iterate only a single index gives sorted results
<abu[7]> or use tmp files
<abu[7]> collecting separate lists with push still needs memory
<pablo_escoberg> but less than collecting an entire list and using `group` right?
<abu[7]> I think it depends on the use case
<abu[7]> yes, half
<pablo_escoberg> right, ok.  Just trying to figure out what is and isn't built into the db.
<abu[7]> Sometimes it makes sense to iterate several times, once for each group
<pablo_escoberg> right, ok.  this is the first thing I've run into where having an rdbms would actually be easier, but it's a small part of most use cases.  I probably won't run into it for a while.
<abu[7]> 'create' does something like that in the opposite case
<abu[7]> several runs and temporary files
<pablo_escoberg> ah, ok.  lots to play with :)
<abu[7]> opposite means "inmport"
<abu[7]> yeah :)
<abu[7]> Actually, pil db objects don't take sooo very much space, so you get quite far in-memory
<abu[7]> For, syy
<pablo_escoberg> great.  I guess part of me forgets just how much memory modern machines have :).
<abu[7]> yes, this happens for me too all the time
<abu[7]> 100 bytes / obj and 1M objects are 100 MiB
<pablo_escoberg> Yeah, I remember what a huge deal millions of rows was in the 90's.  And that's still plenty for almost all applications.
<abu[7]> T
<abu[7]> I use 'by' usually with 'This' in a db context
<abu[7]> (by '((This) (: name)) ...
<abu[7]> for sorting with multiple criteria
<abu[7]> (by '((This) (list (: ñ€) (: nm) ...
<pablo_escoberg> ah, ok, that should help.
mario-goulart has joined #picolisp
msavoritias has joined #picolisp
seninha has joined #picolisp
seninha has quit [Remote host closed the connection]
seninha has joined #picolisp
razzy has joined #picolisp
<razzy> hello everyone
<razzy> I have big list with 48k sublists. I want to (uniq) it and it explodes in memory. option one upgrade server. option two make memory friendly (uniq)
<abu[7]> Hi razzy!
<abu[7]> yeah, 'uniq' builds a tree from the data in the list
<abu[7]> What means "explode"?
<razzy> violently eat all memory
<abu[7]> No "out of memory" error?
<abu[7]> How much memory does it "eat"?
<razzy> yes error. kill itself
<abu[7]> I see
<razzy> by explosion i mean cascade of rapid expansion.
<abu[7]> You see that with "ps"?
<razzy> abu: yes
<abu[7]> Then better don't create the (sub)lists first, but directly buily the unique list
<abu[7]> E.g. put each new item into an 'idx' tree
<abu[7]> (while (read) (idx MyTree (cons (hash @) @) T))
<abu[7]> in the end (idx 'MyTree)
<abu[7]> mistake
<abu[7]> (while (read) (idx 'MyTree (cons (hash @) @) T))
<abu[7]> So you need the memory only once
<abu[7]> If still to big, build all in temp files
<abu[7]> 'idx' takes 1.5 to 2.0 cells per item
<abu[7]> one cell is 16 bytes
seninha has quit [Ping timeout: 248 seconds]
razzy has quit [Ping timeout: 240 seconds]
razzy has joined #picolisp
razzy has quit [Ping timeout: 248 seconds]
razzy has joined #picolisp
seninha has joined #picolisp
chexum has quit [Ping timeout: 256 seconds]
chexum has joined #picolisp
<pablo_escoberg> Hey all, I just ran across this page: https://picolisp.com/wiki/?ideaspage and have several questions.  First of all, what is/was GSoC?  Second, it looks like the GIS stuff got more or less done, but has any work gone into the fixed point stuff or the browser stuff?  For the latter, I remember there was some discussion a while ago about
<pablo_escoberg> compiling to WASM, which would be great but I don't think anyone is working on.  But I've seen nothing at all about the former.
<abu[7]> Hi pablo_escoberg!
<abu[7]> I don't know what GSoC means
<abu[7]> But I mentioned the Open Streetmap demo a few days ago
<pablo_escoberg> Oh, google summer of code
<beneroth> abu[7], I suspect its "Google Summer of Code". Google invested some things in FOSS coding projects
<pablo_escoberg> just saw the link :)
<abu[7]> It was one of the first projects ported to 'search'
<beneroth> 2012. this is quite old
<pablo_escoberg> right
<abu[7]> beneroth, ah, right
<pablo_escoberg> right, I know about that.
<pablo_escoberg> and will be using it soon, I think.  But has any work gone into the other stuff or was that just a wish list?
<abu[7]> I used this GIS stuff in the FireFightes project
<pablo_escoberg> yeah, the GSM stuff looks great.
<abu[7]> And Mia used it for the IceCream finder app
<abu[7]> I used it also for some logistics projects
<abu[7]> i.e. apps in trucks
<pablo_escoberg> cool.  it will come in very handy for my wine tour app as well.
<abu[7]> Let me check the other stuff on the list
<abu[7]> lots of ideas indeed!
<pablo_escoberg> yeah, really cool stuff
<abu[7]> T
<pablo_escoberg> Question is, has any of it been worked on, and I guess the answer is "no"
<abu[7]> I wonder why I'm the last editor. Logging in ...
<abu[7]> Hmm, I don't remember
<abu[7]> perhaps I pasted this for Thorsten (tj)
<abu[7]> In any case, I have not heard of anything in the list being tackled
<pablo_escoberg> well, it was an interesting thing to find.  Maybe some version of it should be posted more prominently (without the GIS stuff) as sort of a "cool project ideas" page to inspire folks?
<abu[7]> Perhaps, but where?
<pablo_escoberg> Front page of the documentation wiki, I would think; maybe after "examples"
<pablo_escoberg> Or "Articles and Essays"
<abu[7]> In general the Wiki should be a litte re-ordered to make figding things easir
<pablo_escoberg> yeah, it's kind of a mess.  I need to update my sql article too.
<abu[7]> sfinding
<abu[7]> *finding
<abu[7]> (grr)
<pablo_escoberg> :)
hrberg has quit [Ping timeout: 255 seconds]
hrberg has joined #picolisp
msavoritias has quit [Remote host closed the connection]
msavoritias has joined #picolisp
beneroth has quit [Remote host closed the connection]
beneroth has joined #picolisp
seninha has quit [Ping timeout: 248 seconds]
razzy has quit [Quit: leaving]
msavoritias has quit [Ping timeout: 255 seconds]
seninha has joined #picolisp
seninha has quit [Ping timeout: 240 seconds]
seninha has joined #picolisp