World: r3wp
[Core] Discuss core issues
older newer | first last |
Terry 12-May-2007 [7896x2] | sigh alright |
somewhat tom | |
Tomc 12-May-2007 [7898] | knowing more about how it will be accesses inser delete moce selecr would help choose a stratagey |
Terry 12-May-2007 [7899x2] | if everytime you do a 'write' you need to sort 400mb file.. i would say yeah |
Ok.. it's like this.. | |
Tomc 12-May-2007 [7901] | sorted keys you could binary seatch to avoid linear scan |
btiffin 12-May-2007 [7902x2] | Terry; Go back to the QRAM days, segment everything. :) It only adds an order of magnitude in complexity. :) Love Wintel... |
Sorry. I shut up now. | |
Terry 12-May-2007 [7904x2] | My data is structured using a semantic network model.. entites.. ie: tweety isa canary canary isa bird |
bird haspart feathers bird haspart beak | |
Tomc 12-May-2007 [7906] | so you have seperate hashees of different relationship types |
Terry 12-May-2007 [7907] | so currently its stored as entity - attribute - value in a single db table using 3 cols |
Tomc 12-May-2007 [7908] | isa hash and partof hash |
Terry 12-May-2007 [7909] | (lots of arguments out there regarding EAV as DB model... most say it cant be done.. I say rubish.. works beautifully on a university project currently at 3 million rows of data) |
Tomc 12-May-2007 [7910] | it does work very well |
Terry 12-May-2007 [7911] | It just seems that relation db is overkill all i need is key/values ... something like this.. n: [ tweety [ isa "canary" hascolor "yellow"] canary [ isa "bird" haspart "beak"]] |
Tomc 12-May-2007 [7912] | I am wondering if you have a smallish number of relationship types if splitting into EA tables getes you anything |
Terry 12-May-2007 [7913x2] | the attributes are smallish |
Brian, I believe words in blocks are limited as well | |
btiffin 12-May-2007 [7915] | I do REBOL with pretty small datasets. Could be I just did a test of 1'020'000, but I was inserting the same word with a number...not unique words. |
Terry 12-May-2007 [7916] | yeah.. unique is the key .. i need unique |
Chris 12-May-2007 [7917] | Is there a need to maintain three columns, over say -- (bird [haspart feathers]) or (bird haspart/feathers) |
Terry 12-May-2007 [7918] | (moving to DB Chat) |
Chris 12-May-2007 [7919x2] | Brian, try -- repeat x 10000 [unless attempt [to-word join "w" x][break/return x]] |
Warning: this will inhibit your ability to make new words in your console session. | |
Terry 13-May-2007 [7921] | any benchmark docs comparing certain functions with others? ie: foreach [ a b c ] n.. vs forskip n 3 ? |
Henrik 13-May-2007 [7922] | well, forskip is a mezzanine. you'd want fast loops to be done with natives like foreach |
Tomc 13-May-2007 [7923] | Joel Needly et .al. used to bench mark all sorts of things on the mail list a few years back .tthe benchmarks would likely need to be redone with current versions of rebol |
Ladislav 13-May-2007 [7924x3] | benchmarking: my site contains a very accurate block execution time measurement function |
(and I have got a benchmark there measuring overall speed using a couple of algorithms - they are derived from a Byte benchmark published in june 1988) - we are quite a bit faster than the C language was on an average computer back then :-p) | |
btw, accurate measurement shows, that the high resolution timer is not very accurate | |
Pekr 13-May-2007 [7927] | Ladislav - so we exchanged dynamic nature of language and sacrificed speed by doing the step 20 years back :-) |
btiffin 13-May-2007 [7928] | Ladislav; I hope you don't mind, but I put a link to %timblk.r in a lot of the rebol.org timing script documents. Check http://www.rebol.org/cgi-bin/cgiwrap/rebol/documentation.r?script=timeit.r#toc-4 for a sample. |
Terry 14-May-2007 [7929x2] | Any ideas on the best way to escape javascript as a Rebol string.. It's not uncommon to have double quotes, single quotes and curly braces in a single line ie: <a href="" onclick="$('mydiv').alpha({transparency:50%});"> Fade</a> |
FYI .. built a block with 1 million (random 1000000) integers then ran a forskip myblock 3 vs foreach[ a b c ] myblock forskip time: 0:00:02.828 foreach time: 0:00:00.046 | |
Tomc 14-May-2007 [7931x2] | time the while loop while you are at it (db chat sat 8:58) |
closer to the forskip time I would imagine | |
Volker 14-May-2007 [7933] | and a parse-rule. |
Anton 14-May-2007 [7934] | Terry, the reason is foreach is native and forskip is a somewhat heavier mezzanine which calls WHILE to do its work. See Henrik's comment above. |
Gregg 14-May-2007 [7935] | Can't you just put curly braces around the string Terry? |
Terry 14-May-2007 [7936] | um I can ;) didnt' realize you could nest curly braces |
BrianH 14-May-2007 [7937x2] | Keep your { and } balanced in your Javascript snippets. You can't escape { in strings, so you might need to have parts of your code in "" or use ^(7B) instead. |
Not being able to escape { in strings is a bug, by the way. | |
Volker 14-May-2007 [7939x2] | actually its possible from files, only console is broken >> load "{escape ^^{ please }" == "escape { please " |
a ^{ is enough of course, but must be escaped for the "" | |
Terry 15-May-2007 [7941x2] | ok.. so you store it using ^{ and ^} but how do you filter out the ^ later on? |
Using html special characters would make sense (or unicode) given the content is primarily web centric ie:{"hello" {world}} Then convert for rebol based string manipulation >> replace/all ie "{" "^(7B)" == {"hello" ^{world}} | |
Volker 15-May-2007 [7943x2] | The ^ is filtert out by the loader, in the string is only a { |
>> head insert/dup "" "{" 64 == {^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^{^... :) | |
Terry 15-May-2007 [7945] | yeah, but what happens when you send that to a web page? |
older newer | first last |