World: r3wp
[Core] Discuss core issues
older newer | first last |
Oldes 4-Dec-2008 [11387] | while waiting on port without system/options/quiet |
Robert 4-Dec-2008 [11388x2] | Ah, thanks. |
Never heard about this. | |
Dockimbel 4-Dec-2008 [11390] | http://www.rebol.com/docs/core23/rebolcore-18.html#section-4 |
Robert 4-Dec-2008 [11391] | And never read about it ;-) |
Henrik 4-Dec-2008 [11392] | http://www.hmkdesign.dk/rebol/files/category--macosx.html<-- perhaps this is relevant for OSX Tiger users regarding the spinning cursor. |
Chris 4-Dec-2008 [11393] | Robert: the -q argument should squash it too... |
Graham 4-Dec-2008 [11394] | REBOL used to have a graphical network indicator ... pity that is not controllable in this way too. |
james_nak 5-Dec-2008 [11395] | Anyone know of good ways to setup an email header so that spam scores are as low as possible? This is for legit emails I am sending via rebol. Perhaps you've never noticed it before but one I sent yesterday to myself ended up in the "junk" box. Anyway, you guys are smart. |
Tomc 5-Dec-2008 [11396] | dont sort by name to don't try to be efficent and send to multiple names in the same domain as the same time don't send spamy content |
james_nak 5-Dec-2008 [11397] | Yeah, these are separate emails only sent to one person at a time. And the content is just simple words (these are tests) and no symbols. |
Will 8-Dec-2008 [11398x5] | I thought select/skip to be faster than select, it isn't, why so? |
btw,I'm using a hash! , is there a faster way? | |
ok, looks like using 2 blocks, one for keys, one for values and using "pick values index? find keys key" is more than 20% faster | |
forget comment above, bed testing on my part, select on hash! is faster, but still, why is select/skip so slow on hash! ? | |
c: make hash! [] repeat n 10000 [append c reduce [n "abc"]] timer[loop 1000000 [select c 4000]] ; 0:00:00.350739 timer[loop 1000000 [select/skip c 4000 2]] ; 0:00:04.675077 | |
Steeve 8-Dec-2008 [11403x2] | whar are you storing as key in your hash! ? |
integers like in your example ? | |
[unknown: 5] 8-Dec-2008 [11405x2] | What is the easiest way to convert larger numbers so that they are stored as integers in binary. Such that they can be read directly and converted such as: to-integer #{3030ABCD1020} I keep getting the wrong result of that operation and I know it is because the binary information contains the wrong data. |
I'm hoping to avoid converting to string first which I know would then be easy. | |
Chris 8-Dec-2008 [11407] | to-hex <-> to-integer, except that's issue, not binary : ( |
[unknown: 5] 8-Dec-2008 [11408x2] | Hmmm.. seems not an easy way to do that? |
for example the actual binary representaton for the number 256 is #{0100} But I can't get that output by doing: >> to-binary [256] == #{00} See that result is incorrect. I'm assuming there is an easier way to do this. | |
Steeve 8-Dec-2008 [11410x3] | i do this: debase/base to-hex 256 16 |
== #{00000100} | |
>>to integer! #{00000100} == 256 | |
[unknown: 5] 8-Dec-2008 [11413x2] | yeah but you get that extra bits I would have to go back and trim off the first two bytes. |
But that would work - thanks Steeve. | |
Chris 8-Dec-2008 [11415] | You could shorten it with parse? |
Steeve 8-Dec-2008 [11416] | ah you want a 16 bit integer ? |
Chris 8-Dec-2008 [11417x2] | How is that different to converting to string? |
hoping to avoid converting to string | |
[unknown: 5] 8-Dec-2008 [11419x2] | yeah true Chris. |
debase uses string data | |
Steeve 8-Dec-2008 [11421] | >> debase/base skip to-hex 256 4 16 == #{0100} |
[unknown: 5] 8-Dec-2008 [11422] | think that will be more overhead than just storing the string representation? |
Steeve 8-Dec-2008 [11423] | you mean time consumming ? |
[unknown: 5] 8-Dec-2008 [11424] | performance wise - yes |
Steeve 8-Dec-2008 [11425] | i'm using a preconstructed struct! [] to do the conversion (i don't use debase) , it's fast enough. |
[unknown: 5] 8-Dec-2008 [11426] | Give me an example. |
Steeve 8-Dec-2008 [11427x2] | bin: make struct! [int [integer!]] [0] >> bin/int: 256 >>third bin == #{00010000} |
then , the reverse: >> change third bin #{00010000} >>bin/int == 256 | |
[unknown: 5] 8-Dec-2008 [11429] | Yeah I'm going to have to make a function it seems. |
Steeve 8-Dec-2008 [11430x2] | just to know that with struct! the integer is stored in little endian format (reverse order) |
so you can do that too: >> to integer! reverse #{00010000} == 256 | |
[unknown: 5] 8-Dec-2008 [11432x2] | my issue is a bit more complicated. |
I'll come up with a solution - thanks Steeve, you still may have helped me out. | |
PeterWood 8-Dec-2008 [11434] | No all Rebol platforms store integers in little endian format. |
[unknown: 5] 8-Dec-2008 [11435] | Steeve thanks for the help, I think I can get bye with the debase/base to-hex 256 16 |
Steeve 8-Dec-2008 [11436] | Peter, no one says the opposite |
older newer | first last |