ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Picolisp latest found at http://www.software-lab.de/down.html | check also http://www.picolisp.com for more information
karswell has joined #picolisp
pierpal has joined #picolisp
pierpal has quit [Ping timeout: 240 seconds]
pierpal has joined #picolisp
aw- has joined #picolisp
jibanes has quit [Ping timeout: 276 seconds]
jibanes has joined #picolisp
orivej has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
<aw-> hi all
<aw-> Regenaxer: here?
<Regenaxer> Hi aw-
<aw-> hi
<aw-> i'm looking at pilDB, i don't understand what ({2-M} {2-L} {2-E}) means
<aw-> what am I supposed to do with that?
<Regenaxer> It is a list of external symbols
<Regenaxer> You can do anything what you can do with symbols
<Regenaxer> These are still pil32
<Regenaxer> On pil64 they look different
<aw-> (collect 'dat '+Person (date 1982 1 1) (date 1988 12 31))
<aw-> -> ({A30} {A27} {A20})
<aw-> so from the example, how would I obtain a list of pairs such as '((nm . job) .. )
<Regenaxer> mapcar
<Regenaxer> (mapcar '((This) (cons (: nm) (: job))) (collect ...
<aw-> doesn't work
<aw-> (mapcar '((N) (cons (; N 1) (; N 2))) (collect 'dat '+Person (date 1982 1 1) (date 1988 12 31)))
<aw-> -> ((NIL) (NIL) (NIL))
<aw-> maybe my (collect) is wrong
<aw-> oh wait
<aw-> ok
<aw-> works
<aw-> i used your example haha
<aw-> i never used (This) and (: X) not sure how it works
<Regenaxer> Like always ;)
<aw-> why using (This) ?
<Regenaxer> What is (; N 1) ? It is (car N)
<aw-> right
<Regenaxer> So makes no sense for a date
<Regenaxer> 'This' is often used
<aw-> because we have object with properties
<Regenaxer> (doc 'This)
<Regenaxer> I'm surprised you don't know 'This'!
<aw-> it's not used in any of the documentation
<aw-> how can I know?
<Regenaxer> It is used in the sources everywhere
<aw-> i've mentioned this problem repeatedly. The docs __do not__ help discover useful functions and features of PicoLisp
<Regenaxer> exactly
<Regenaxer> You must look at the sources
<aw-> i don't have time to read source code, this should be in documentation
<Regenaxer> OK, then write it!
<aw-> it's on my TODO list ;)
<Regenaxer> Cool ;)
<aw-> but i don't have time to write it
<aw-> ahahahaha
<Regenaxer> yeah
<aw-> ok ok anyways, i will look into This
<aw-> thanks
<Regenaxer> I did not mean really to read all sourcess
<Regenaxer> but the best way is to look at examples
<aw-> yes I agree, ideally* that's would everyone should do
<Regenaxer> fgrep This app/*.l
<aw-> can you tell me how to perform that same (mapcar) using '((N) ... ?
<Regenaxer> What do you want in the result list?
<aw-> 'nm
<aw-> and 'job
<Regenaxer> Doesn't my above proposal work?
<aw-> yes
<Regenaxer> (mapcar '((This) (cons (: nm) (: job))) (collect ...
<aw-> it does
<aw-> i want to know how to do it without This
<aw-> just curious
<Regenaxer> ah
<Regenaxer> (mapcar '((Obj) (cons (; Obj nm) (; Obj job))) (collect ...
<Regenaxer> or even:
<Regenaxer> (mapcar '((This) (cons (; This nm) (; This job))) (collect ...
<aw-> oh
<aw-> ok ok i get it
<aw-> oh yeah This would great simplify a lot of my code
<Regenaxer> : is just a short form of ;
<Regenaxer> With '((This) ..) you save a 'with'
<Regenaxer> '((Obj) (with Obj ...
<Regenaxer> 'with' does nothing more than bind 'This' implicitly
<Regenaxer> (just for the records)
<aw-> yeah I just read that
<aw-> brilliant
<aw-> it seems there's a lot of hype nowadays regarding GraphQL, a crappy implementation of graph database - with limited functionality and horrible syntax.
<aw-> maybe beneroth can comment on it
<aw-> i'll stick to PilDB, much more powerful
<Regenaxer> yeah, I don't know GraphQL at all
<aw-> Regenaxer: when did you implement Pilog for picolisp DB?
<aw-> was it at the same time when you first started picolisp? or many years later?
<Regenaxer> It was much later. In the second version, a complete re-write, which started around 1999.
<aw-> there's no need to know GraphQL. Just imagine a much worse way of doing half of what PicoLisp+DB does
<Regenaxer> Ok :)
<aw-> wow, 1999!
<aw-> i graduated high school then ;) haha
<Regenaxer> :)
orivej has quit [Ping timeout: 276 seconds]
<Regenaxer> So I graduated high school around the time you were born
<Regenaxer> hmm, no
<aw-> 82
<Regenaxer> I finished Uni at that time
<Regenaxer> High school 73
<aw-> hmm yeah quite a difference
rob_w has joined #picolisp
rob_w has quit [Remote host closed the connection]
rob_w has joined #picolisp
andyjpb has joined #picolisp
<aw-> Regenaxer: is the db file stored on disk in PLIO format?
<Regenaxer> Yes, correct
mikeyhc has joined #picolisp
<aw-> (chdir (in "family/A" (rd)))
<aw-> why it returns NIL ?
<aw-> oops
<Regenaxer> The file is organized in blouks. The first block is a header block which in fact does not contain PLIO
<aw-> (in "family/A" (rd))
<Regenaxer> The other blocks also have meta data
<aw-> oh
<Regenaxer> see doc64/structures
<Regenaxer> The PLIO data are nested within control data
<Regenaxer> see below "### Database file ###"
<aw-> oh yeah i see it
<aw-> thanks!
<Regenaxer> The 'blk' function can directly read block (pil64 only)
<Regenaxer> I mean directly read the PLIO from a block
<aw-> have you ever encountered a corrupt db file?
<Regenaxer> yes
<Regenaxer> In the beginning
<Regenaxer> Normally the file itself is never corrupt
<Regenaxer> But the higher levels can be easily made inconsistent
<Regenaxer> indexes
<aw-> how to avoid that?
<Regenaxer> eg by circumventing the E/R mechanisms and storing things at the lower level
<aw-> E/R?
<Regenaxer> Always use put!> etc
<Regenaxer> and make a correct DB model
<aw-> oh ok, so ensuring transactions are used
<aw-> and dbSync if there's children
<Regenaxer> yes
<Regenaxer> right, that too
<aw-> well the ! functions do it automatically
<Regenaxer> if there are siblings rather
<Regenaxer> T
<Regenaxer> But if you 'put' instead of 'put> you can mess up things
<aw-> you mean put!> ?
<Regenaxer> put!> is just the dbSync'ed version of 'put>'
<Regenaxer> Same as (dbSync) (put> ..) (commit 'upd)
<aw-> oh ok
<Regenaxer> ie a single-transaction
andyjpb has quit [Ping timeout: 244 seconds]
freemint has joined #picolisp
freemint has quit [Ping timeout: 248 seconds]
beneroth has joined #picolisp
<beneroth> hi all
<Regenaxer> Hi beneroth!
<aw-> hi beneroth
orivej has joined #picolisp
styx has joined #picolisp
andyjpb has joined #picolisp
andyjpb has quit [Ping timeout: 268 seconds]
andyjpb has joined #picolisp
karswell has quit [Remote host closed the connection]
karswell has joined #picolisp
f8l has quit [Remote host closed the connection]
f8l has joined #picolisp
rob_w has quit [Quit: Leaving]
sriram has joined #picolisp
karswell has quit [Ping timeout: 260 seconds]
styx has quit [Ping timeout: 264 seconds]
michelp has quit [Ping timeout: 256 seconds]
michelp has joined #picolisp
orivej has quit [Ping timeout: 268 seconds]
alexshendi has joined #picolisp
jzp has quit [Ping timeout: 268 seconds]
jzp has joined #picolisp
andyjpb has quit [Ping timeout: 264 seconds]
orivej has joined #picolisp
stix has joined #picolisp
stix has quit [Quit: stix]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
sriram has quit [Ping timeout: 252 seconds]
orivej has quit [Ping timeout: 264 seconds]
pierpal has quit [Quit: Poof]
pierpal has joined #picolisp
xificurC has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
xificurC has joined #picolisp
alexshendi has quit [Read error: Connection reset by peer]
pierpal has quit [Ping timeout: 256 seconds]