[REBOL] Re: REBOL/View 1.3 - invalid word datatype

2003-12-18 Thread Gabriele Santilli
Hi rebOldes, On Tuesday, December 16, 2003, 6:09:34 PM, you wrote: r I can, but it's much more slower and it would mean to make it r completely again. Maybe I could use load/next but how to convert r invalid word to word? to word! whatever you wish == whatever you wish to word! 1,4 == 1,4

[REBOL] Re: a new switch-like flow-control function

2003-12-18 Thread Gabriele Santilli
Hi Anton, On Wednesday, December 17, 2003, 3:00:06 PM, you wrote: AR do select reduce [ AR event/shift [...] AR event/control [...] AR true [...] ; default AR ] true any [ if event/shift [... true] if event/control [... true] (...)

[REBOL] Re: What does REBOL fix?

2003-12-18 Thread Gabriele Santilli
Hi Jason, On Wednesday, December 17, 2003, 3:19:18 PM, you wrote: JC Simple includes not having to write the book first or explain it to anyone. [...] Don't confuse simple with easy! And, of course, most times one is going to do what's easier, not what's simpler... but that doesn't mean

[REBOL] Re: REBOL/View 1.3 - invalid word datatype

2003-12-18 Thread Carl Read
On 18-Dec-03, Gabriele Santilli wrote: Hi rebOldes, On Tuesday, December 16, 2003, 6:09:34 PM, you wrote: I can, but it's much more slower and it would mean to make it completely again. Maybe I could use load/next but how to convert invalid word to word? to word! whatever you wish ==

[REBOL] Re: Rebol API to DyBASE

2003-12-18 Thread Gabriele Santilli
Hi Konstantin, On Wednesday, December 17, 2003, 5:14:02 PM, you wrote: KK Rebol: 18 seconds KK h: make hash! [] KK start: now/time KK n: 10 KK for i 1 n 1 [ KK append h i KK ] KK print [Elapsed time for n records (now/time - start)] h: make hash! 12 == make hash! [] start:

[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 N 1.

[REBOL] Re: Newbie Mailing List Questions

2003-12-18 Thread Joel Neely
Hi, Stan, Welcome to the list! Stan Silver wrote: Greetings, 1. Are mail list threads determined only by the subject? In other words, can I add my two cents to an existing topic just by typing in the correct subject? Or do I have to reply to an existing email? Does Re: matter in the

[REBOL] Hash: Re: Rebol API to DyBASE

2003-12-18 Thread Frank Sievertsen
Maybe you will want to use this. You can add /case to the find to make it faster for strings. ; -- script: %hash.r REBOL [ title: hash author: Frank Sievertsen ; version: 1.0.0 purpose: { Hash-Test - hash! -

[REBOL] Re: a new switch-like flow-control function

2003-12-18 Thread Anton Rolls
Thanks Joel, I think this is just what I need. I don't think pif is a good name for it, though, it reminds me of obscure unix commands, not very rebolish. But what is a good name? Perhaps something like reselect (because it's a bit like a select reduce, but since that's not strictly true, then

[REBOL] Re: What does REBOL fix?

2003-12-18 Thread Jason Cunliffe
REBOL: others define code, rebol expresses it hmm... I like it Can you explain the difference between 'define' and 'express' please? - Jason -- To unsubscribe from this list, just send an email to [EMAIL PROTECTED] with unsubscribe as the subject.

[REBOL] Re: Rebol API to DyBASE

2003-12-18 Thread Gregg Irwin
Hi Konstantin, KK I am sorry that somebody treat my concerns about hash tables KK in Rebol as criticism of this language. Not to worry. We've been through many of these discussions before ourselves. I'll second what Gabriele said. -- Gregg -- To unsubscribe from this

[REBOL] Re: msg files with rebol

2003-12-18 Thread Gregg Irwin
Hi Bryan, b I'm wondering if anyone has done anything with parsing .msg files with b Rebol. b Instead of using Parse I was thinking (this probably sounds crazy) that b it might be possible to open a port and feed it .msg files, perhaps b inheriting Rebol's normal understanding of smtp.

[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

[REBOL] Re: Rebol API to DyBASE

2003-12-18 Thread Graham Chiu
On Thu, 18 Dec 2003 14:37:03 +0300 Konstantin Knizhnik [EMAIL PROTECTED] wrote: That is why I need to profile the execution of the program. Hi Konstantin, This is great work that you're doing. We shouldn't look a gift horse in the mouth! Unfortunately I had no profiler, because I have no

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-18 Thread Gregg Irwin
Hi Konstantin, KK So, during index search 1.5 minutes from 2 were spent in lookup KK function. And 14 seconds takes searching index itself. KK From these 1.5 minutes most of the time was spent in this line: KK obj: select obj-by-oid-map oid A quick test seems to show that the SELECT part

[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!

[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

[REBOL] Newbie Learning Exercise

2003-12-18 Thread Stan Silver
Greetings, Thank you for the quick replies to my mailing list questions. Here is my attempt at a dictionary/hash table. It has already gone through one cleanup after looking at a similar hash table somewhere (??? maybe in one of the Rebol libraries) so some of the ideas are not mine. And I'm

[REBOL] Re: Profiling Rebol API to DyBASE

2003-12-18 Thread Romano Paolo Tenca
Hi, 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!

[REBOL] Re: Rebol API to DyBASE

2003-12-18 Thread Ladislav Mecir
Hi Joel, I think, that: 1) Konstantin tries to use an Associative Array. I doubt, that the suggested implementation is the best one. INSERTs into a fresh hash (created each time with MAKE HASH! []): Appears to be increasing faster than quadratically! # eltsseconds ratio quad