Re: Database tutorial

2021-03-04 Thread Mike
March 2, 2021 7:13 PM, "Todd Roth" wrote: > Hello, > The tutorial on the docs page use to have a nice section on database > functionality and a brief > intro to pilog. This is not tutorial, but you could try to read existent code in repos: https://git.envs.net/mpech/tankf33der

Re: Database tutorial

2021-03-03 Thread Todd Roth
Thanks Alex. Looks like plenty of other db docs/tutorials on the website - will have a look at those. > On Mar 2, 2021, at 2:44 PM, Alexander Burger wrote: > > Hi Todd, > >> The tutorial on the docs page use to have a nice section on database >> functionality and a brief intro to pilog. Are

Re: Database tutorial

2021-03-02 Thread Alexander Burger
Hi Todd, > The tutorial on the docs page use to have a nice section on database > functionality and a brief intro to pilog. Are those docs still available > somewhere on the picolisp site? Can’t seem to locate. Right, they do not exist any more in the pil21 release :( The reason is that they

Re: Database file format

2019-05-28 Thread C K Kashyap
Thank you Guido and Andreas. Regards, Kashyap On Tue, May 28, 2019 at 4:43 PM wrote: > Hi Kashyap > > > Is there documentation about the file format of the database file > > See file @doc64/structures within the picolisp directory. > There are the picolisp VM internals described, including

Re: Database file format

2019-05-28 Thread George Orais
Hi Kashyap, Does picoLisp\doc64\structures help? It contains some illustration about the Database file. BR, geo > On May 29, 2019, at 5:41 AM, C K Kashyap wrote: > > Hi, > Is there documentation about the file format of the database file in PicoLisp? > I am looking at the possibility of

Re: Database file format

2019-05-28 Thread andreas
Hi Kashyap Is there documentation about the file format of the database file See file @doc64/structures within the picolisp directory. There are the picolisp VM internals described, including Database file format. Like every database binary file format, it is based on fixed blocks (block

Re: Database file format

2019-05-28 Thread Guido Stepken
Alex Burgers PicoLisp DB tutorial describes indirecty the underlying format: http://software-lab.de/doc/tut.html#db "block size of 256 Bytes", talking of a CAR and a CDR which indicates, that it is kind of "functional database", comparable to ultra expensive DATOMIC. Alex also writes about kind

Re: Database question

2019-04-17 Thread C K Kashyap
I was going over https://software-lab.de/doc/tut.html#db and looks like I should just go with the Entity/Relation model. Thanks Alex. On Tue, Apr 16, 2019 at 10:15 PM Alexander Burger wrote: > On Tue, Apr 16, 2019 at 03:57:14PM -0700, C K Kashyap wrote: > > Thanks Joh-Tob, > > I think

Re: Database question

2019-04-16 Thread Alexander Burger
On Tue, Apr 16, 2019 at 03:57:14PM -0700, C K Kashyap wrote: > Thanks Joh-Tob, > I think properties work for me. I was thinking that symbol would map to > "key" but that need not be the case. My goal is to figure out a way to > store records that are 4 tuple - "Entity name", "Attribute", "Value",

Re: Database question

2019-04-16 Thread Alexander Burger
Hi Kashyap, > I tried to implement key-value store/get. I am > not sure how to enumerate all the keys though. A key/value storage can be done very easily. > (pool "test.db") You store values under keys directly in the DB root object by passing NIL as the tree: (store NIL "KEY" "VALUE")

Re: Database question

2019-04-16 Thread C K Kashyap
> > > > > > Ursprüngliche Nachricht > > > > Von: ckkash...@gmail.com > Gesendet: 16. April 2019 16:42 > An: picolisp@software-lab.de > Antworten: picolisp@software-lab.de > Betreff: Re: Database question > > > Hi Alex, > > >

Re: Database question

2019-04-16 Thread Joh-Tob Schäg
;Root" ? If you want to get the complete property list of any symbol (internal or in the DB) just call 'getl on it   Ursprüngliche Nachricht   Von: ckkash...@gmail.com Gesendet: 16. April 2019 16:42 An: picolisp@software-lab.de Antworten: picolisp@software-lab.de Betreff: Re

Re: Database question

2019-04-16 Thread C K Kashyap
Hi Alex, Does this look reasonable? I tried to implement key-value store/get. I am not sure how to enumerate all the keys though. (pool "test.db") (set *DB "ROOT") (de kv-add (k v) (let nv (new T) (set nv v) (put *DB k nv)

Re: Database question

2019-04-14 Thread Alexander Burger
On Sun, Apr 14, 2019 at 12:54:19PM -0700, C K Kashyap wrote: > Is the builtin database in picolisp tied to OOP? The documentation seems to > indicate it. Not necessarily. The DB consists of three independent layers. Persistent "external" symbols are the base. They are directly in the core

Re: database setup in language learning

2014-07-23 Thread Alexander Burger
Hi Steven, I have decided that man's best friend is 1) a dog, 2) hexdump. ;) Indeed! Though in this case, when exploring the structure of a PicoLisp database, I would recommend 'show' and 'edit'. Perhaps you already found http://picolisp.com/wiki/?usingedit;? It explains this specifically in

Re: database setup in language learning

2014-07-22 Thread Alexander Burger
Hi Steven, Hello marmorine, Ummm... Steven. ;) Oops! Sorry :) Tried all sorts of size combinations, found one that is more compact, to use (0 +Wrds) instead of the block size 1 for it. But then I guess you should take a look with size to make sure you are not cutting things to close?

Re: database setup in language learning

2014-07-22 Thread steven
Hi Alex, I have decided that man's best friend is 1) a dog, 2) hexdump. ;) What I did was try out the various prefix classes you mentioned with the +List, +Ref, +String etc. in different combinations, and just went and looked at them. More on that below. Exactly. But this may not be a good

Re: database setup in language learning

2014-07-21 Thread steven
On Thu, 17 Jul 2014 09:13:38 +0200 Alexander Burger a...@software-lab.de wrote: Hello marmorine, Ummm... Steven. ;) A few minor notes: No quoting for local transient symbols, the the (use (G N) has also been corrected. These are small things, but very useful for me. You may be able

Re: database setup in language learning

2014-07-17 Thread Alexander Burger
Hello marmorine, (note: a bit long being a first post) No problem :) post a first attempt to check form and convention and company, so here the latest variant (working): ... Fine. That looks good. A few minor notes: 1. As ___ is a local transient symbol, the single quote is not really

Re: Database object Init Function

2012-03-21 Thread Alexander Burger
Hi Konrad, I'm trying to write a newX function for a +Entity subclass and its behaving rather strangly. The code is as follows: (de newAdversary (Nm Tp Abs Spd Ht Def Arm) ... : (show '{2}) {2} (+Adversary) armour 0 This looks all right (at least on the first glance). however the

Re: Database object Init Function

2012-03-21 Thread Alexander Burger
Hi Konrad, ah, now I know! On Wed, Mar 21, 2012 at 12:19:07PM +0100, Alexander Burger wrote: I'm trying to write a newX function for a +Entity subclass and its behaving rather strangly. The code is as follows: (de newAdversary (Nm Tp Abs Spd Ht Def Arm) ... : (show '{2}) {2}

Re: Database

2010-11-19 Thread Alexander Burger
Hi David, I'm fumbling through some tests trying to get an understanding of how to insert and retrieve database objects: Good! :) (class +Cls +Entity) (rel id (+Need +Key +String)) (rel val (+Need +String)) (dm T () (=: id (pack (in /dev/urandom (rd 5 (=: val *Val) ) Using

Re: Database introspection

2009-08-19 Thread Alexander Burger
Hi Henrik, (class +WordCount +Entity) # (rel word (+Aux +Ref +Link) (article) NIL (+Aword)) # (rel article (+Ref +Link) NIL (+Article)) # (rel count (+Number)) (dbs ... (4 +WordCount +Similarity) # 6 --- This looks good. All '+WordCount' objects

Re: Database introspection

2009-08-19 Thread Henrik Sarvell
- Did you call 'pool' with '*Dbs'? - Are you sure you started with an empty database after you changed 'dbs'= ? Yes on both accounts, strange, I will do some isolated tests today, ie not use my normal import functions but instead simply insert some test data into an empty database and then see

Re: Database introspection

2009-08-19 Thread Alexander Burger
On Wed, Aug 19, 2009 at 10:08:03AM +0200, Henrik Sarvell wrote: Note that the tree root nodes (e.g. {2}) above are always created in file= #1. What exactly do you mean by this? There are external symbols in the DB which are neither entity objects nor btree nodes. They are not under the

Re: Database introspection

2009-08-19 Thread Henrik Sarvell
Ah sorry, didn't look hard enough at your example, OK seems like it works like it's supposed to for you. The objects end up in #2 like you want. I'll get back after stepping through my #6 and #12 and doing some basic inserts. If I still have problems I'll post a runnable file. Thanks for the

Re: Database introspection

2009-08-18 Thread Henrik Sarvell
Thanks for that, will try it out tonight! /Henrik On Tue, Aug 18, 2009 at 7:21 AM, Alexander Burgera...@software-lab.de wrot= e: Hi Henrik, I've just used dbs to split my database into several files which seems to be working but if I recall correctly the catch all will be file no 1 and

Re: Database introspection

2009-08-18 Thread Henrik Sarvell
I almost forgot, I think I am seeing +Aux relations in no 1 too, fairly long lists of dotted pairs smells like it. I suppose my dbs example in the prior post won't take care of them properly, ie putting them in their own files? /Henrik On Tue, Aug 18, 2009 at 8:49 PM, Henrik

Re: Database introspection

2009-08-17 Thread Alexander Burger
Hi Henrik, I've just used dbs to split my database into several files which seems to be working but if I recall correctly the catch all will be file no 1 and it's growing out of proportion very rapidly when I import my data. Out of proportion with regards to what I believe should be in it

Re: Database cleaning

2009-07-21 Thread Henrik Sarvell
I'm going to look into this too but what I had in mind was some kind of maintenance you were running at one of your clients or something like that. /Henrik On Tue, Jul 21, 2009 at 7:42 AM, Alexander Burgera...@software-lab.de wrot= e: Hi Henrik, I vaguely remember a discussion approaches

Re: Database cleaning

2009-07-21 Thread Alexander Burger
On Tue, Jul 21, 2009 at 09:19:59AM +0200, Henrik Sarvell wrote: of maintenance you were running at one of your clients or something like that. I cannot find a posting about that, but there is 'dbCheck' in lib/too.l wich I use frequently. The runtime monitoring with (heartbeat) and

Re: Database cleaning

2009-07-21 Thread Henrik Sarvell
That's it, dbgc and cron jobs, that rings a bell. Can you post an example usage of dbgc? /Henrik On Tue, Jul 21, 2009 at 9:55 AM, Alexander Burgera...@software-lab.de wrote: On Tue, Jul 21, 2009 at 09:43:46AM +0200, Alexander Burger wrote: I cannot find a posting about that, but there is

Re: Database cleaning

2009-07-21 Thread Alexander Burger
On Tue, Jul 21, 2009 at 10:07:38AM +0200, Henrik Sarvell wrote: That's it, dbgc and cron jobs, that rings a bell. Can you post an example usage of dbgc? Sure. Usually I have a crontab entry for that application's user. It calls a nightly backup routine, e.g. at 1:12 o'clock: 12 1 * * * ./p

Re: Database cleaning

2009-07-21 Thread Henrik Sarvell
Thought it would be a good thing to post the IRC follow up: (16.15.20) hsarvell: What exactly happens when dbgc is run, what garbage is cleaned? (16.16.10) hsarvell: Is there garbage on disc? (16.21.40) Regenaxer: Well, all objects which are not references by any other object can safely be

Re: Database cleaning

2009-07-21 Thread Alexander Burger
On Tue, Jul 21, 2009 at 05:34:28PM +0200, Henrik Sarvell wrote: Thought it would be a good thing to post the IRC follow up: Great idea! Thanks, Henrik! Cheers, - Alex -- UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Re: Database cleaning

2009-07-20 Thread Alexander Burger
Hi Henrik, I vaguely remember a discussion approaches to cleaning or optimizing databases, I searched the mailing list however without success. I'm not sure. There was a response (to some questions by Tomas) in http://www.mail-archive.com/picolisp@software-lab.de/msg00073.html What are

Re: database contest article

2008-12-05 Thread Alexander Burger
Hi Tomas, I just tried to roughly benchmark the forking server and I do not think it is a limiting factor. With the following code That's right. For a database benchmark it is not a limiting factor, this will be more on the db side. However, if I try a non-forking server

Re: database contest article

2008-12-04 Thread Henrik Sarvell
Wasn't it somebody else? Randall maybe... /Henrik On Thu, Dec 4, 2008 at 11:09 PM, Tomas Hlavaty [EMAIL PROTECTED] wrote: Hi Henrik, Well Thomas, I see that they used PHP in that test which means they're using the beloved Apache probably. which I think you have bashed earlier for its

Re: database contest article

2008-12-04 Thread Alexander Burger
On Thu, Dec 04, 2008 at 11:40:29PM +0700, Henrik Sarvell wrote: Wasn't it somebody else? Randall maybe... I believe to remember it was Konrad ;-) Cheers, - Alex -- UNSUBSCRIBE: mailto:[EMAIL PROTECTED]

Re: database contest article

2008-12-04 Thread Alexander Burger
Hi Tomas, Have you tried to rerun your solution and what improvement (trans/min) did you achieve? Unfortunately not ... Actually, my compagnon Josef Bartl wrote it initially. He urged that we participate. I did some tuning then, and he did the testing. After that, both of us were busy, so we

Re: database contest article

2008-12-04 Thread Randall Dow
Hey, this is getting to be fun! Alex, thanks for stopping and having a beer! Till next time! Cheers! - Rand On Thu, Dec 4, 2008 at 6:56 PM, Alexander Burger [EMAIL PROTECTED]wrote: On Thu, Dec 04, 2008 at 05:06:39PM +, Tomas Hlavaty wrote: are we officially adopting blame culture? ;-)