[REBOL] Re: DyBASE test

2003-12-28 Thread Konstantin Knizhnik
Hello Graham, Sunday, December 28, 2003, 10:18:05 PM, you wrote: GC> Re: Re: DyBASE test >> New version 0.18 of DyBASE Rebol API is available. GC> Hi Konstantin, GC> Can you make it is so that attempting to close a database GC> twice results in an error rather than a crash? ok, will be fixed

[REBOL] Re: DyBASE test

2003-12-28 Thread Konstantin Knizhnik
New version 0.18 of DyBASE Rebol API is available. Now it is not necessary to specify prototype object: DyBASE is able to fetch object with arbitrary set of fields. It is possible because now fetching of object is done in three steps: 1. Fetch object fields into the block 2. Create object using co

[REBOL] Re: DyBASE test

2003-12-28 Thread Konstantin Knizhnik
Hello SunandaDH, Sunday, December 28, 2003, 1:18:52 AM, you wrote: Sac> Konstantin: >> And once object >> is created it is not possible to add fields to it (very strange >> restriction for such flexible and dynamic language as Rebol). Sac> In simple cases (if the object is not yet referenced

[REBOL] Re: DyBASE test

2003-12-27 Thread Konstantin Knizhnik
Hello Robert, Saturday, December 27, 2003, 1:36:17 PM, you wrote: RMM> On Thu, 25 Dec 2003 20:25:14 +0300, Konstantin Knizhnik RMM> <[EMAIL PROTECTED]> wrote: >> Certainly it should be possible to use any word as object field. >> As I understand from your mail, the p

[REBOL] Re: DyBASE test

2003-12-25 Thread Konstantin Knizhnik
pdated version 0.17 at my site. Thursday, December 25, 2003, 6:57:08 PM, you wrote: RMM> On Tue, 23 Dec 2003 21:54:19 +0300, Konstantin Knizhnik RMM> <[EMAIL PROTECTED]> wrote: >> New version of DyBASe 0.17 is available at my site. RMM> Hi, the db/close bug id gone but I still have

[REBOL] Re: DyBASE test

2003-12-24 Thread Konstantin Knizhnik
Hello Robert, Wednesday, December 24, 2003, 2:02:11 PM, you wrote: RMM> On Tue, 23 Dec 2003 21:54:19 +0300, Konstantin Knizhnik RMM> <[EMAIL PROTECTED]> wrote: >> Sorry, stupid bug in storage close method ("func" keyword was missed) >> cause that problem: da

[REBOL] Re: DyBASE test

2003-12-23 Thread Konstantin Knizhnik
Hello Robert, Sorry, stupid bug in storage close method ("func" keyword was missed) cause that problem: database was not closed and so could not be reopened. The language constructions should be more protected from errors:) New version of DyBASe 0.17 is available at my site. I has changed (once

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-21 Thread Konstantin Knizhnik
but in general ration of performance of different languages is the same. Sunday, December 21, 2003, 4:41:53 PM, you wrote: RMM> On Sat, 20 Dec 2003 21:16:01 +0300, Konstantin Knizhnik RMM> <[EMAIL PROTECTED]> wrote: >> I thought, that once objet is created using prototype object, t

[REBOL] Re: Optimized version of Rebol ASPI to DyBASE

2003-12-20 Thread Konstantin Knizhnik
Hello Konstantin, Saturday, December 20, 2003, 9:28:25 PM, you wrote: KK> Hello Robert, KK> Saturday, December 20, 2003, 5:47:51 PM, you wrote: RMM>> On Fri, 19 Dec 2003 13:49:40 +0300, Konstantin Knizhnik RMM>> <[EMAIL PROTECTED]> wrote: >>> New optimiz

[REBOL] Re: Optimized version of Rebol ASPI to DyBASE

2003-12-20 Thread Konstantin Knizhnik
Hello Robert, Saturday, December 20, 2003, 5:47:51 PM, you wrote: RMM> On Fri, 19 Dec 2003 13:49:40 +0300, Konstantin Knizhnik RMM> <[EMAIL PROTECTED]> wrote: >> New optimized version of Rebol API to DyBASE is available at >> http://www.garret.ru/~knizhnik/dybase.

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-20 Thread Konstantin Knizhnik
Hello Gregg, Saturday, December 20, 2003, 8:02:18 PM, you wrote: GI> Hi Konstantin, GI> Thanks for your continued efforts! Thanks to your code, and Romano's GI> detective work, it seems a bug in CLEAR with hash! values may have GI> been found, which is great! GI> Also, some of us have talked

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-20 Thread Konstantin Knizhnik
Hello Robert, With the help of Rebol mail list members, I was able to significantly improve performance of Rebol API. Now the difference with for example Python, is not so high. I do not believe that it is possible to do something more in improving performance. Certainly it is possible to speed u

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-19 Thread Konstantin Knizhnik
Hello Romano, Friday, December 19, 2003, 2:51:19 PM, you wrote: RPT> Hi, RPT> Just seem that clear waste hash table, perhaps this is a bug in clear. Yes, I already noticed it. So it is much cheaper to create new object than clean existed. RPT> These are my tests: >>> i: 10 loop 5 [recy

[REBOL] Optimized version of Rebol ASPI to DyBASE

2003-12-19 Thread Konstantin Knizhnik
New optimized version of Rebol API to DyBASE is available at http://www.garret.ru/~knizhnik/dybase.html I was managed to increase speed of testindex.r example 4 times by optimizing work with hash tables. Unfortunately, the problem is not completely solved and for large number of cached objects, p

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-18 Thread Konstantin Knizhnik
I improve my own "record". Looks like the best solution (not only for this example) is: n: 20 h: make hash! 101 cache-size: 101 cache-used: 0 start: now/time/precise repeat i n [ oid: random n obj: select h oid if none? obj [ obj: make object! [__oid__: oid] if cac

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-18 Thread Konstantin Knizhnik
Hello Gregg, I was able to isolate the problem. The following script shows almost the same time as testindex.r searching for 20 objects. n: 20 h: make hash! n start: now/time/precise repeat i n [ oid: random n obj: select h oid if none? obj [ obj: make object! [__oid

[REBOL] Profiling Rebol API to DyBASE

2003-12-18 Thread Konstantin Knizhnik
Hello Konstantin, Looks there is no profiler in Rebol:( So, I have to do profiling myself using now/time/precise. I got the following results which seems to be interesting: Elapsed time for inserting 10 records: 0:01:01 Elapsed time for performing 20 index searches: 0:02:06 Time spent in

[REBOL] Re: Rebol API to DyBASE

2003-12-18 Thread Konstantin Knizhnik
Thank you very much to all who helps me to improve Rebol API to DyBASE. I am sorry that somebody treat my concerns about hash tables in Rebol as criticism of this language. I already understand that "make hash! 10" is much more efficient than "make hash! []" and "loop N" is faster than "for 1

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
Hello Tim, Wednesday, December 17, 2003, 8:01:14 PM, you wrote: TJ> * Konstantin Knizhnik <[EMAIL PROTECTED]> [031217 07:26]: >> >> >> Rebol has awful implementation of hash tables. >> First of all, it is very inconvenient that there are normal set/g

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
Hello Christian, Wednesday, December 17, 2003, 7:48:54 PM, you wrote: >> Compare the following results: >> Rebol: 18 seconds CL> h: make hash! 10 CL> start: now/time/precise CL> for i 1 10 1 [ insert tail h i ] CL> now/time/precise - start CL> == 0:00:00.25 O, shame on me - I have t

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
Hello Gregg, Wednesday, December 17, 2003, 7:26:41 PM, you wrote: GI> Hi Konstantin, GI> First, thanks for completing the REBOL interface to DyBase! GI> Now, if all the source to it is available, any good folks here who GI> want to take a crack at improving can do so, right? Hopefully, we can

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
Hello Konstantin, Wednesday, December 17, 2003, 7:14:02 PM, you wrote: KK> Hello Cyphre, KK> Wednesday, December 17, 2003, 6:40:03 PM, you wrote: C>> Hi, C>> I just had a quick look at C>> http://www.garret.ru/~knizhnik/dybase/doc/dybase.html#comparison . Is Rebol C>> really so slow or it i

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
i in range(0,10): d[i] = i print 'Elapsed time: ', time.time() - start, ' seconds' PHP: 1 seconds (rounded) C> regards C> Cyphre C> - Original Message - C> From: "Konstantin Knizhnik" <[EMAIL PROTECTED]> C>

[REBOL] Re: Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
ented database, such inefficient implementation of hash table leads to poor performance of Rebol DyBASE API. C> regards C> Cyphre C> - Original Message - C> From: "Konstantin Knizhnik" <[EMAIL PROTECTED]> C> To: <[EMAIL PROTECTED]> C> Sent: Wedne

[REBOL] Rebol API to DyBASE

2003-12-17 Thread Konstantin Knizhnik
Hello all, First version of Rebol API to my object-oriented database DyBASE is ready. It can be downloaded from my site: http://www.garret.ru/~knizhnik/dybase.html DyBASE is embedded object oriented database for languages with dynamic type checking. Rebol is fourth language for which DyBASE API

[REBOL] Re: Hashes in Rebol

2003-12-09 Thread Konstantin Knizhnik
Hello Christian, Tuesday, December 9, 2003, 10:33:44 PM, you wrote: >> == make hash! [1 "one" 2 "two"] h select 1 CL> select h 1 O, sorry - such stupid mistyping:( I was confused, because h select "1" doesn't report any error and returns none... -- Best regards, Konstantin

[REBOL] Re: Hashes in Rebol

2003-12-09 Thread Konstantin Knizhnik
Hello Gregg, Thank you very much for explanation. Certainly it is very universal approach to treat everything as series. But as all universal solutions is is not always convenient to use:). If I remove exactly one element from the hash - what will be result of such operation... But actually I n

[REBOL] Re: Hashes in Rebol

2003-12-09 Thread Konstantin Knizhnik
Hello Andreas, Tuesday, December 9, 2003, 5:59:27 PM, you wrote: AB> Tuesday, December 9, 2003, 12:47:53 PM, Konstantin wrote: >> Once again sorry for question which may be obvious for experienced >> Rebol programmers, but how can I >> 1. Remove pair from hash AB> remove/part find hash key

[REBOL] Hashes in Rebol

2003-12-09 Thread Konstantin Knizhnik
Sorry, I am trying to implement Rebol API to my OO database DyBASE and not yet familiar with Rebol. I completely confused by lack of normal associative arrays or hashes. Yes - in Rebol there is hash! type and "select" function makes it possible to extract values from hash. But I also want to remov

[REBOL] Re: Storing/loading object functions

2003-12-07 Thread Konstantin Knizhnik
ject mapping. Thanks in advance Konstantin Sunday, December 7, 2003, 12:10:56 AM, you wrote: VN> Am Samstag 06 Dezember 2003 19:20 schrieb Konstantin Knizhnik: >> GI> Hi Konstantin, >> >> KK>> I am developer of object oriented database for dynamic languages >&g

[REBOL] Storing/loading object functions

2003-12-06 Thread Konstantin Knizhnik
GI> Hi Konstantin, KK>> I am developer of object oriented database for dynamic languages KK>> (www.garret.ru/~knizhnik/dybase.html) KK>> Currently it supports PHP, Python and Ruby. Now I am going to develop KK>> Rebol API for DyBASE. GI> That's great! I think someone mentioned DyBase here not

[REBOL] Re: Creation of object with unknown structure

2003-12-06 Thread Konstantin Knizhnik
Hello Christian, Thank you very much! "to-set-word" - is what I have missed. And "prepare" function is exactly what I need. Saturday, December 6, 2003, 6:37:09 PM, you wrote: >> I am developer of object oriented database for dynamic languages >> (www.garret.ru/~knizhnik/dybase.html) >> Curre

[REBOL] Creation of object with unknown structure

2003-12-06 Thread Konstantin Knizhnik
Hello, I am developer of object oriented database for dynamic languages (www.garret.ru/~knizhnik/dybase.html) Currently it supports PHP, Python and Ruby. Now I am going to develop Rebol API for DyBASE. I read Rebol manual but some questions are still not clear for me. Can some Rebol guru suggest