World: r3wp
[Core] Discuss core issues
older newer | first last |
Gregg 24-Nov-2010 [548] | I believe the share has to be a mapped drive to show up that way. I don't recall every enumerating shares this way, but maybe someone else has. |
Izkata 24-Nov-2010 [549] | I think I remember seeing something of the sort with: read%// But I'm not on Windows right now, so I can't check |
Oldes 25-Nov-2010 [550x2] | Do you think that this is correct? >> integer? round 232.2 == true I was somehow expecting that the number is still decimal = 232.0 |
Ah.. now I see that R3 works as I expect. | |
Gregg 1-Dec-2010 [552] | ROUND under R2 was a mezzanine, and was designed so the result would be an integer when possible, for use as a loop counter. It's no longer a mezzanine under R3. I don't remember if it was mentioned that it was an intentional change. |
BrianH 1-Dec-2010 [553] | And we don't need to use integers for loop counters anymore. |
GrahamC 1-Dec-2010 [554] | we can use real numbers? |
BrianH 1-Dec-2010 [555] | In R3, yes. There is an implicit to-integer. |
Oldes 3-Dec-2010 [556x2] | Is it possible to change file-modes of directory? This doe not work: >> get-modes %/f/dir/ 'creation-date == 26-Oct-2010/16:55:30+1:00 >> set-modes %/f/dir/ compose [creation-date: (now)] ** Access Error: Cannot open /f/dir/ ** Near: set-modes %/f/dir/ compose [creation-date: (now)] |
What is the best way to form decimal and avoid the E notation? >> form .02 == "2E-2" | |
GrahamC 3-Dec-2010 [558] | form-decimal ... Gabriele has a version around |
Steeve 3-Dec-2010 [559] | Nice challenge. To find the smallest mezz to do so |
GrahamC 3-Dec-2010 [560x3] | Is there a sql like dialect ( selects ) for rebol blocks in memory ( not disc based ) |
I am thinking of coverting a simple read only database to ram based for speed ... | |
I thought I read of one once .. but maybe I am wrong. | |
Steeve 3-Dec-2010 [563] | I know a good one, it's called PARSE IIRC |
GrahamC 3-Dec-2010 [564] | so I can just change the scheme from odbc to ram or whatever |
BrianH 3-Dec-2010 [565] | EXTRACT works well for that, and maybe MAP-EACH too if you do nested blocks. |
GrahamC 3-Dec-2010 [566] | No joins involved |
BrianH 3-Dec-2010 [567x2] | There are some databases that are RAM-based already and have SQL. |
For that matter, RebDB is SQL-like and RAM-based, iirc. | |
GrahamC 3-Dec-2010 [569x2] | Ah.. I can look at rebdb then |
my queries are currently taking 2 seconds and I need subsecond performance | |
BrianH 3-Dec-2010 [571] | You might look at EXTRACT or MAP-EACH then. For simple queries with no joins, SQL is overrated. |
Steeve 3-Dec-2010 [572x2] | If you give us your actual script we can find some improvment rooms. Despite beeing lazy, we are not bad at such game. |
(if it's not a bloated one) | |
GrahamC 3-Dec-2010 [574] | I'm hacking into FreeDiams .. a free French drug interaction database :) |
Steeve 3-Dec-2010 [575] | Don't trust French commercials |
GrahamC 3-Dec-2010 [576] | It's a GPL app to do drug prescribing and drug interactions .. I am just using their database |
BrianH 3-Dec-2010 [577] | Once the database is in memory you don't necessarily need to do set operations (SQL select). You can do iterative operations much more quickly. |
GrahamC 3-Dec-2010 [578] | source is here https://fd.cloud-ehr.net/drugreactions.txt |
Steeve 3-Dec-2010 [579x2] | huge ! |
/me dazzled ! | |
BrianH 3-Dec-2010 [581] | It looks like you are using the iterative approach anyways, on the results of the SQL queries. If you cache the data in RAM you can do iterative stuff with FIND and loops, or even maps in R3 if you want real speed. |
GrahamC 3-Dec-2010 [582] | This is a RSP app .. we've already had the discussion why Cheyenne is not ported to R3 :) |
BrianH 3-Dec-2010 [583] | Hashes then :) |
GrahamC 3-Dec-2010 [584] | huge? Only 250 lines where a line is 2-3 rebol words :) |
Steeve 3-Dec-2010 [585] | It's late here, and if see more than a dozen of lines, I could die |
GrahamC 3-Dec-2010 [586x6] | there is probably a better method than the one I use to generate the permutations |
sorry , combinations | |
we have something like this drug1 [ id1 id2 id3 .. ] drug2 [ id1 id5 id6 .. ] drug3 [ id4 id7 .. ] | |
I have to generate all the possible combinations of each drug id with all the others but not with those in the same set | |
so at present I think I generate all possible combinations and check to see if they're in the same set and if not do the sql query | |
that's my contribution to lazy programming :) | |
Steeve 3-Dec-2010 [592] | Would you kind enough and give us the expecting output from the input. I can't read all your lines currently. drug1 [ id1 id2 id3 .. ] drug2 [ id1 id5 id6 .. ] drug3 [ id4 id7 .. ] --> |
GrahamC 3-Dec-2010 [593x4] | combinations = pairs |
If you use these 855348 211885 541713 849339 108911 | |
as input to this page https://fd.cloud-ehr.net/drugrx.rsp | |
you'll see the output of the original script which produces html and not json | |
Steeve 3-Dec-2010 [597] | Well I was doing reference to this input -> drug1 [ id1 id2 id3 .. ] drug2 [ id1 id5 id6 .. ] drug3 [ id4 id7 .. ] |
older newer | first last |