Re: Problems with +Blob

2009-09-04 Thread Tomas Hlavaty
Hi Henrik Randall, I just went and read that too - links per inode would include both directories or files or a mix of both. I checked the filesystem code for this, the ext3 inode is limited by a 16bit links_count. Under linux (UNIX) a directory simply contains a list of names and their

Re: Problems with +Blob

2009-08-17 Thread Alexander Burger
Hi Henrik, It seems to me that the 64bit version will be completely incompatible with the old 32bit databases/blobs. Yes. Though they are completely compatible on the Lisp source level, a database file itself cannot be exchanged between the two versions (and a 32-bit app and a 64-bit app

Re: Problems with +Blob

2009-08-17 Thread Alexander Burger
On Mon, Aug 17, 2009 at 10:45:08AM +0200, Henrik Sarvell wrote: But for new projects you will use the 64bit version, I mean if not then why bother with creating it? I'm not sure yet. Let's see how it works out, and wait until it is all bug-free ;-) In fact, in the long range I believe that

Re: Problems with +Blob

2009-08-16 Thread Henrik Sarvell
Works, but I can't pretend to understand how the folder and file naming wor= ks. I just checked the ext3 limits on wikipedia, apparently it can't handle more than roughly 32000 sub folders inside a folder, it's unclear whether that applies to files too or not. Anyway, how does it work, could

Re: Problems with +Blob

2009-08-16 Thread randall . dow
Hi Henrik, I just went and read that too - links per inode would include both directories or files or a mix of both. I checked the filesystem code for this, the ext3 inode is limited by a 16bit links_count. Under linux (UNIX) a directory simply contains a list of names and their inodes (a link) -

Re: Problems with +Blob

2009-08-16 Thread Alexander Burger
On Sun, Aug 16, 2009 at 07:11:43PM +0200, Henrik Sarvell wrote: I just checked the ext3 limits on wikipedia, apparently it can't handle more than roughly 32000 sub folders inside a folder, it's No problem. There are never more than 64 subdirectories or files in a blob-directory. As always in

Re: Problems with +Blob

2009-08-16 Thread Tomas Hlavaty
Hi Henrik Randal, Alex, can that number of db files be reached (likely, not probable, impossible)??? Works, but I can't pretend to understand how the folder and file naming wor= ks. Anyway, how does it work, could this level be reached or is there a stopper somewhere? as far as I can

Re: Problems with +Blob

2009-08-16 Thread Alexander Burger
Hi Randall, Alex, can that number of db files be reached (likely, not probable, impossible)??? No need to worry (I just wrote another mail, answering Henrik's question). In addition to those explanations, let me shortly show how this will look in 64-bit picoLisp. The internal representation

Re: Problems with +Blob

2009-08-16 Thread Alexander Burger
Hi Tomas, bingo! As ever, you are very right :-) as far as I can tell, it is almost impossible because the directory structure for blobs is not flat but it is a tree instead. It looks like the names of persistent symbols are represented as 'fmt64' or so, and the (sub)directories and each

Re: Problems with +Blob

2009-08-16 Thread Alexander Burger
On Sun, Aug 16, 2009 at 08:20:31PM +0200, Alexander Burger wrote: from the letters A .. O. With that, an object might look like {1}, {123}, {A45}, {CDE7654321} and so on. Oops, I forgot the point I actually wanted to explain ;-) With the above naming scheme, the splitting in directories for

Re: Problems with +Blob

2009-08-16 Thread Tomas Hlavaty
Hi Alex, bingo! As ever, you are very right :-) not always, I am a human too, see bellow:-D Why do you think 56 istead of 64? 64 makes sense! Surprisingly in my database which is a few levels deep, has 56 directories and some top level subdirectories are still missing. Not sure why.

Re: Problems with +Blob

2009-08-16 Thread Tomas Hlavaty
Hi Alex, database file number is encoded in a kind of hexadecimal number, which uses @, A, B .. O instead of 0, 1, 2, .. F. The object ID is encoded in octal. This has the advantage that the dash '-' as a separator is not needed any more, because the file number digits 0 .. 7 are different

Re: Problems with +Blob

2009-08-16 Thread Henrik Sarvell
It seems to me that the 64bit version will be completely incompatible with the old 32bit databases/blobs. Alex how will you go about migrating all the old databases? /Henrik On Sun, Aug 16, 2009 at 9:10 PM, Tomas Hlavatyt...@logand.com wrote: Hi Alex, database file number is encoded in a

Problems with +Blob

2009-08-15 Thread Henrik Sarvell
I'm having problems putting text in a +Blob when I try to emulate how it's done in the demo application. In the top section of my main I have this: (setq *Blob (pack *BP blob/)) where *BP is my base path. This is the point at which my code diverges from all the example code I've seen so far.

Re: Problems with +Blob

2009-08-15 Thread Tomas Hlavaty
Hi Henrik, To me it seems you need to pass some kind of file name, for instance in the app/item.l form, the name of the tempfile. And then the file is opened and copied to the blobfile. yes, a blob is a file. I think it is stored as a flag indicating it's presence. If it is present, the

Re: Problems with +Blob

2009-08-15 Thread Alexander Burger
Hi Henrik, In the top section of my main I have this: (setq *Blob (pack *BP blob/)) where *BP is my base path. OK. I've seen so far. Code which is using +BlobField or blob! To me it seems you need to pass some kind of file name, for instance in the ... However I simply want to do like

Re: Problems with +Blob

2009-08-15 Thread Alexander Burger
Hi Tomas, using temporary files is fine. If you operate on the lower level of 'put!', you could even write the blob file directly. I think the initial worry of Henrik was how to avoid writing a temp file first, and then using 'blob!'. As I wrote in my answer, the correct and simple way is