r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

BrianH
2-May-2006
[846]
Henrik, try to implement your ideas in REBOL code. Post it to AltME 
if you need help. Let us hash out the details, improve it. If it 
turns out well, it could become a mezzanine function.
Henrik
2-May-2006
[847]
alrighty then
BrianH
2-May-2006
[848]
Someone mentioned Ladislav's build dialect, and look what happened 
to it... ;-)
Henrik
2-May-2006
[849]
haven't even followed it, but it seems that Carl likes it
Gabriele
2-May-2006
[850]
noone remembers my nforeach function? :)
BrianH
2-May-2006
[851]
I think Carl was talking about his Include. I meant Ladislav mentioning 
the build dialect yesterday in this group and me suggesting bug fixes 
immediately. It's a little better than it was before as a result. 
Sometimes it seems that the best REBOL optimizer is its community 
showing off.
Henrik
2-May-2006
[852]
explain?
BrianH
2-May-2006
[853]
Yes, demonstrate?
Gabriele
2-May-2006
[854x3]
well, anyway, carl's foreach already does what henrik is asking for.
my nforeach took a different approach, that is   nforeach [c1 a c2 
b] [...]
r3's one will probably be   foreach [[c1] [c2]] [a b]  [...]
Henrik
2-May-2006
[857]
Carl's foreach
 as in the one in R3? surely not the one in R2
Gabriele
2-May-2006
[858]
yes, r3
Henrik
2-May-2006
[859x2]
that's good!
I won't waste my time then :-)
Gabriele
2-May-2006
[861x2]
i don't know if we're going to have your suggested loop or pad refiniments
but, note that it is very likely that foreach will be a mezz, so 
we you can improve on it :)
Henrik
2-May-2006
[863]
pad and loop are sort of gimmicks anyway. I think the multiple block 
part is the important thing.
Gabriele
2-May-2006
[864]
funny, i thought i was the only one wanting multiple blocks.
Henrik
2-May-2006
[865x2]
I really miss it alot
such a construct would make certain loops much simpler
BrianH
2-May-2006
[867]
When you combine this with the word, set-word trick, this could make 
for some interesting structure matching.
Gabriele
2-May-2006
[868]
ah, about structure matching... let me switch to another group
BrianH
2-May-2006
[869]
Sure, as long as it's fast, make it a mezz and let it evolve.
Ladislav
2-May-2006
[870x3]
Someone mentioned Ladislav's build dialect, and look what happened 
to it... ;-)

 - it was me who mentioned it, but this is about the third time I 
 mentioned it here as well as on the ML, so it is not as efficient 
 as Brian suggests :-)
I posted a comment to hash that contains the reason why Carl is reconsidering 
the HASH! datatype
re the BUILD issue - it has been used quite regularly, although not 
for lit-paths, because they are "rare" in a sense
BrianH
2-May-2006
[873]
Well I was joking, but yeah, the community-as-optimization does depend 
on the community having time and attention to spare...
Ladislav
3-May-2006
[874]
Brian, you mentioned the usage of HASH! as an index. That is exactly 
the case (IMO) when HASH! is better than associative array. Are you 
using that often?
BrianH
3-May-2006
[875x4]
Sometimes I return a hash index as a query result set, for database-like 
functions. If I had to use an assoc instead I'm sure it would be 
fine as long as select was still O(1) like a hash.
Most of the time I use it like an assoc, or like a fully indexed 
table.
The main advantage a hash has over an assoc is that you aren't limited 
to simple key-value records, you can use longer records.
I would want an assoc to be able to have any string type as a key 
and words as well, at least.
Ladislav
3-May-2006
[879x2]
The main advantage a hash has over an assoc is that you aren't limited 
to simple key-value records, you can use longer records.
 - yes, that is the domain where hash! should be better
(especially if you want to use more keys than one)
BrianH
3-May-2006
[881x3]
Plus you can use more interesting dialected records that are type-delimited 
rather than fixed length - all the tricks that blocks can do.
Still, if assocs are drastically faster it would be worth it. I could 
use blocks or lists and assoc indexes if I need them.
Assoc indexes to lists would be useful, as useful as I've found hash 
indexes to lists to be. I'd use hashes and lists more often if block 
parsing worked on them.
Ladislav
3-May-2006
[884x2]
drastically faster

 - I think, that REMOVE and INSERT can be made faster by not "shuffling" 
 data as often
...as useful as I've found hash indexes to lists to be
 - do you have a short sample code you can post?
Volker
3-May-2006
[886x2]
Insert tail
 should be not slow?
for remove, dont use it, clear the values instead. and have some 
way to recycle them.
BrianH
3-May-2006
[888x2]
Mostly adhoc database stuff that could be replaced by RebDB. I really 
can't post most of it (work for hire).
I've been wanting to look at the source of RebDB to see if there 
is anything about it I could improve.
Ladislav
3-May-2006
[890]
right, Volker, that may be the way but if you need such tricks to 
just obtain the functionality you want, don't you think it may be 
better to get the necessary functionality natively?
BrianH
3-May-2006
[891]
I guess RebDB doesn't use indexes as much now, but I'm sure there 
are some ways it could be helped.
JaimeVargas
3-May-2006
[892]
I also would like to see an example fo "hash indexes to lists". So 
far I have not yet see a situation where this is better than just 
a single key value mapping.
Ladislav
3-May-2006
[893]
it is clear that if you want to use at least two different keys to 
access the values, then it is better to use hash!
Volker
3-May-2006
[894x2]
if i loose the block-functionality i even prefer such hacks. and 
i never needed that remove-tuning, only figured it out for some benchmark. 
Where it paid of only with large data. And with large data, maybe 
i want the hash on disk anyway?
related: will we get a native 'append ? If such speed-isues are now 
important, we should notstick with that important thing as meazzine?