• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp4382
r3wp44224
total:48606

results window for this page: [start: 34601 end: 34700]

world-name: r3wp

Group: Core ... Discuss core issues [web-public]
Steeve:
7-May-2010
ouch, don't think so...
Actually maybe your real key is the value and not the key.
Terry:
7-May-2010
after some testing strings as keys and values are the way to go.. 
slightly faster ( to-binary? overhead?) and when you write the db 
to file, the strings are half the size
BrianH:
9-May-2010
Use SORT/compare with an integer argument for the index of the records 
you want compared, and don't forget /skip for the record length. 
Like this:
>> sort/skip/compare [1 5 2 4 3 3 4 2 5 1] 2 2
== [5 1 4 2 3 3 2 4 1 5]
Sunanda:
9-May-2010
You mean using /skip and /compare to sort a series in sets?
s: [1 2 8 a   1 2 6 b   1 2 7 c]    ;; three sets of four items
sort/skip/compare s 4 [3]        ;; sort on the third item
== [1 2 6 b 1 2 7 c 1 2 8 a]
Graham:
9-May-2010
And when we get the permissions to do so, we can then
Ladislav:
9-May-2010
re "ask in chat or CC" - I asked in chat, privately, but do not see 
any reaction yet, and I added a comment to CC #1571
Maxim:
10-May-2010
tuple aren't immutable in R2 OR R3

>> a: 1.2.34
== 1.2.34
>> a/2: 33
== 33
>> a
== 1.33.34

this works in both R2 and R3
Maxim:
11-May-2010
btw return is never required at the end of a func .. and slows down 
rebol A LOT in tight loops.
amacleod:
11-May-2010
example" 


sorting a list of first and last names first on last then on first 
in case of same last names
BrianH:
13-May-2010
Practically speaking, there are probably over a hundred different 
FTP server platforms, and the R2 parsing code only supports (hopefully) 
most of them.
Maxim:
13-May-2010
I've had issues where paths misaligned between list, read and write 
ops !
Maxim:
13-May-2010
one of the problem is the ftp RFC which changed too many times and 
some older servers which forked between those changes.
Gabriele:
16-May-2010
(and, for compatibility with all clients, MIME-Version: "1.0")
Henrik:
16-May-2010
well, there are no docs for async-http.r so I can't tell at all how 
to use it and atcp-protocol.r is too low level. I'll have to rely 
on synced http.
Terry:
17-May-2010
How about this one.. 
Determine the first decimal place of  decimal
dec: 209.648
and I want to return the 6
Terry:
17-May-2010
ok, one last one for my rusty rebol

FINDing the index of all occurences of an integer in a series ie:
blk: [ 239 4545 23 655 23 656[
search for 23 and return [3 5]

(not using foreach)
Terry:
17-May-2010
and my gut says parse is worse than foreach, no?
Terry:
17-May-2010
FIND, SELECT and PICK are blazing.. foreach is a game killer. Need 
to work out a way to FIND all values
Graham:
17-May-2010
1 1 value means to run the rule once and only once where value is 
the rule
Graham:
17-May-2010
Remember that we are paying R2 customers .. and R3 is not going to 
be usable for a few more years
Pekr:
17-May-2010
If you would not use GUI, what exactly would be holding you back? 
You created even basic networking schemes? As for me, I miss fixed 
'call - it is still hugely crippled and absolutly useless ...
Pekr:
17-May-2010
e.g. for me, RebGUI is a dead end. I talked to Bobik, and he is back 
to VID for simple stuff. There were many changes lately, and some 
things got broken, and it does not seem to be supported anymore. 
As for GUI, I believe that in 2-3 months, you will be able to talk 
otherwise, as Robert wants to move his tools to R3 definitely ...
Pekr:
17-May-2010
I don't care about the stickers. Someone said it is alpha, so tell 
to your brain, that it is a beta, and you are OK, easy as that :-) 
I use products according to functionality, not its official alpha/beta/theta 
status ...
Pekr:
17-May-2010
I used Mozilla since 0.96 and it worked for me :-)
Terry:
17-May-2010
Still this is too slow.. it's fine for 1M data, but 10M and it grinds 
hard.

.. there must be a faster way to find integers in a block (or hash) 
using SELECT, FIND or INDEX?
Maxim:
17-May-2010
the problem is that with hash! find will return both keys and data 
though.
Maxim:
17-May-2010
in your tests, this causes your loops to slow down a lot:

result: make series 0

you should:

result: make series length? series. 


because when appending, you will be re-allocating the result over 
and over... and the GC is the loop killer in every single big dataset 
tests I've done.  not because its bad, per se, but because you are 
forcing it to operate.
Gregg:
17-May-2010
You may need to move beyond brute force Terry, and set up a data 
structure to optimize the searching.
Terry:
17-May-2010
There must be a way.

An index is a symbol that represents some value. What I need is to 
add some metadata to that index, and make that searchable.
Terry:
17-May-2010
and i don't think you can search keys in hash or map! without using 
foreach?
Terry:
17-May-2010
I'm thinking 10,000,000 values min, and preferably to max memory
Maxim:
17-May-2010
plus record-size is variable, and is supplied as a parameter to the 
function.
Terry:
17-May-2010
and especially pattern matching of some sort?
Maxim:
17-May-2010
if you look at the speeds,  cycling through two items at a time should 
give roughly twice the ops/second.


when you look at the results... blocks end up being faster than this, 
and strings are less than this.
Andreas:
17-May-2010
that's your above find, stripped of the record-length stuff, and 
returning indices instead of the actual values
Maxim:
17-May-2010
I've just finished my tests... I've got a keyed search func which 
returns the exact same results as feach but  20 times faster!

I'll put the whole script in the profiling group... it  has several 
dataset creations for comparison and includes a clean run-time printout.
Ladislav:
18-May-2010
Terry: "foreach is the winner speed wise.. as a bonus, If i use foreach, 
I don't need the index?" - unbelievable, how you compare apples and 
oranges without noticing
Terry:
18-May-2010
I was debating the merits of Rebol to the Redis group, and they said 
the same thing.. I said "Rebol + Cheyenne" is so much faster than 
Redis + PHP + Apache.. and they said "I'm comparing apples to oranges"

What? Apples? Oranges?  It's the RESULT i'm interested in. In that 
case it's was Redis pulling 7200 values from 100,000 keys per second 
vs Rebol pulling millions per second.
Pekr:
18-May-2010
btw - will there be any difference between: 

result: make block! length? series
and
result: make series 0


I mean - e.g. not prealocating large enough series (make series 0) 
will be slowed down by GC constantly increasing the size?
Maxim:
18-May-2010
so far, preallocating too large buffer takes much more time... but 
look at my funcs... I do even better  :-)

result: clear []


which re-uses the same block over and over, unless ladislav knows 
otherwise, the memory for that block isn't released by clear, only 
its internal size is reset to 0  which is why clear is so fast AFAIK.
Maxim:
18-May-2010
so it will grow to match the needs of the dataset, optimising itself 
in size within a few searches and then not re-allocating itself too 
often.
Maxim:
18-May-2010
with 10 million records, I estimated my dense datasets at about 120000 
records and did a few tests, they wher MUCH slower than using 
result: clear [ ]
Maxim:
18-May-2010
thing is many times, if not most of the times, you don't need to 
copy the result as a new block, and that also saves A LOT of ram 
in my tests...


overall, about 500MB of RAM where saved by not pre-allocating large 
buffers
Maxim:
18-May-2010
for searches its usually ok... since the result is often used only 
to cycle over and create other data.
Maxim:
18-May-2010
and in any case, you can copy the result of the search, at which 
point you have a perfect size and as little wasted RAM as possible.
Maxim:
18-May-2010
look in profiling, there is a full script with verbose printing and 
everything you need, just replace the loop in one of the funcs  :-)
Maxim:
18-May-2010
you can easily compare your results with the current best ... I'll 
be happy if you can beat the ultimate-find and give the exact same 
feature...

searching on any field of a record and return the whole record.
Henrik:
18-May-2010
overall, about 500MB of RAM where saved by not pre-allocating large 
buffers

 <- hmm... I thought the allocation did not necessarily mean usage, 
 only that GC is simpler, or is it different under Unix and Windows?.
Maxim:
18-May-2010
I use windows task manager to look at ram use... the peak was 900MB 
and average was 700MB... removing pre-allocation it went down to 
350 with peaks of  ~ 500  IIRC
Henrik:
18-May-2010
because if Windows only reports allocation and not actual use, then 
the task manager doesn't report true usage.
Maxim:
18-May-2010
the process manager reports  a few different values, current, swapped, 
peak, and some more obscure ones.
Maxim:
18-May-2010
if an application allocates and reserves 2GB I really don't care 
if its only using 10mb of it... my system is clogged and its not 
the OS's fault.
Maxim:
18-May-2010
though I did a special of XP install which forces the OS NEVER to 
swap... and XP tends to be MUCH smoother because of it.
Tomc:
20-May-2010
ahh party moved to profileing and it has all been done
Henrik:
24-May-2010
dialects and selection
Pekr:
24-May-2010
yes, and the code readability maybe - ie2/("a") vs ie2/a
Geomol:
24-May-2010
Steeve, no, doesn't work with strings:

>> switch s/1 ["A" [print "A"] "a" [print "a"]]
== none

s/1 is a char! And SWITCH won't find it with a string.
Geomol:
24-May-2010
Yes, I need to test on chars in a string, and #"a" should be different 
from #"A".
Geomol:
24-May-2010
The only way using SWITCH, I see, is to operate with ascii values, 
and that isn't good.
Andreas:
24-May-2010
And the SWITCH behaviour is just consistent with that.
Izkata:
25-May-2010
/case would be more consistent with 'find, 'parse, and 'select than 
/strictly would
Geomol:
25-May-2010
The char! datatype has many similarities to numbers. The following 
is from R3 and looks strange to me:

>> var - 32 = var
== true


What variable is equal to it's original value, even if you subtract 
32 from it?

>> var: #"a"
== #"a"
>> var - 32 = var
== true


A bit strange. I would prefer SWITCH to distinguish between #"a" 
and #"A".
Gregg:
25-May-2010
I think the var - 32 scenario is fine as well. It's all about context, 
and by making it work the other way, you're just shifting the problem, 
not really solving it. That is, something becomes easier, but something 
else becomes harder.
Geomol:
26-May-2010
Gregg, are you really sure, you mean this? As I see it, the life 
would be much easier, if "a" equals "A", but #"a" didn't equal #"A". 
As it is now, it's really problematic testing for different characters 
in a string using SWITCH. Cases where "a" and "A" should be handled 
as the same is ok, but cases where they should be different is the 
problem. If #"a" was made to not be the same as #"A", then both situations 
could be coped with easily.
PeterWood:
26-May-2010
At the moment Switch is consistent with Equal?. Surely, it would 
be better to retain that consistency and have a /strict refinement 
for switch which perfomed consistently with strict-equal? ?
Geomol:
26-May-2010
Peter, the equal thing is correct for R3, not R2, which we still 
get updates for now and then.
Gregg:
26-May-2010
First, it should be consistent between R2 and R3 if at all possible. 
For SWITCH, I think the solution is to add a refinement if people 
think it's needed. If the new native SWITCH is still based on SELECT, 
adding a /CASE refinement shouldn't be hard.


For the more general case of char case-sensitivity, we have ==/strict-equal?
amacleod:
26-May-2010
I was using versizon google and another host...all the same prob...
Terry:
27-May-2010
ie:  [a ["one"] b ["two"] c ["three"]]

Q: best way to remove b and it's block ["two"] ?
Terry:
27-May-2010
another question.. 


if i have a blk: [] and i want to add a 'word and and a block with 
a pair.. ie: [ word [1x2]] 

i typically would append the word, then append/only the pair, but 
that seems barbaric?
amacleod:
28-May-2010
What is the advantage of using the "/only" refinement when sending 
multiple emails?


And is there a limit to the number of addresses yo can include in 
a bulk mailing?
amacleod:
28-May-2010
What about the "to:" in the header? 

When using /only is here a way to get the email to show the single 
address of the recipiant and not say a list of all address sent to?
amacleod:
28-May-2010
looks like my host cutsoff at 10 addresses.when not using /only refinement


using /only I can't test because I only have 4 address to test send 
to and it seems to strip out duplicate addresses whcih is how I tested 
above
BrianH:
8-Jun-2010
CALL does the TO-LOCAL-FILE itself, and wraps with double quotes 
automatically.
Maxim:
8-Jun-2010
(and why I made that distinction explicit  ;-)   even I almost missed 
that "detail"
BrianH:
8-Jun-2010
Yeah, and the R3 CALL doesn't do anything like that yet. Time to 
edit the host code?
Graham:
9-Jun-2010
I've been playing a little with Gabriele's async http, and I note 
that the subport only sends back close and error events to the main 
awake handler.
Graham:
9-Jun-2010
If you want to do a progress meter, you'll need the read and write 
events as well.  Easy enough to add back in.  I wonder if this shouldn't 
be improved so that we can use it as standard in core 2.7.8.
Graham:
10-Jun-2010
Gab, this is a quick demo with the reinstated write event

http://rebol.wik.is/Protocols/Test-async-http.r


I downloaded a 16mb file, and it updates the bytes downloaded, and 
the progress bar... .and I can still type while it is downloading.
Maxim:
10-Jun-2010
I used it and modified it too a few years ago... I have 5 simultaneous 
feeds of different types (rss, search engines, xml-web-app) with 
updates and animation.

it was pretty stable once I wrapped an attempt around every close 
port in the source.... otherwise, for some reason it would crash 
rebol arbitrarily .
Graham:
10-Jun-2010
but yes, all those other things such as fixed call, dll interface, 
and DB protocols ...
Pekr:
10-Jun-2010
Maybe Ladislav or someone else could took over the improved DLL interface 
in the form of extension? There's still 450 USD floating, and Max 
did not deliver yet :-) ... and although having dyncall would be 
nice, having simpler but improved DLL interface might be still helpful 
:-)
Izkata:
10-Jun-2010
It's possible, although certainly rare.  I've accidentally made files 
with newlines in the filename.  And I just checked - the quote mark 
is also valid (on linux)
Maxim:
10-Jun-2010
yeah, I guess you're right... I didn't think about it this way.


its the purpose of a word to evaluate its content, and get-words 
to return them un-evaluated.


still, this specific case isn't very obvious.  guess I put my "newbie 
hat" for a few minutes there  ;-)
Maxim:
10-Jun-2010
but lit words are a datatype.   when such a lit word is encountered 
in a do block and evaluated, it is reduced to a word.  that is ok.


but when it is *stored* AS as a lit-word, it should not be evaluated. 
 remember that words may contain words, which will be evaluated.


so why should lit-words be evaluated too?  the basic word containing 
a word already does that.
Maxim:
10-Jun-2010
the specific is that 

a: 'z      and     a: to-lit-word 'z

are not equal expressions.

so why should evaluating a also evaluate z in the second form.
Henrik:
12-Jun-2010
Is there a good method to conditionally remove a char in a string 
without having to manage the string? That is: Find char X at location 
Y and remove it if it's there, otherwise just return the string as 
is.
Henrik:
13-Jun-2010
ascii: charset [#"^(00)" - #"^(7F)"]

ascii-rule: [
      copy transfer [ascii some ascii] ( ; <- problem
        head insert tail output-string transfer
      )
    ]


This rule does not look correct. I replaced [ascii some ascii] with 
[some ascii] and now it works.
Graham:
14-Jun-2010
I was having problems with beer being disconnected while doing any 
significant http work, and using Gab's async http seems to have solved 
it for me.
Graham:
14-Jun-2010
In the handler, there should be a check to see if the event is an 
error ...and then close the port
Graham:
14-Jun-2010
What's needed to support redirects?  Grab the new url and open that 
instead?
Graham:
14-Jun-2010
Perhaps close the sub-port and re-open using the redirected url?
Oldes:
14-Jun-2010
Graham, Gab.: you are right, never checked that MOLD works like that 
on longer strings. I will remember that now.

But anyway... when you need to do call on unknown files, you should 
use more soficticated way.
Using just:
	rejoin [{"} to-local-file file {"}]

I consider as as security thread and I would never used it like that. 
And it does not metter if using MOLD or not.
Reichart:
14-Jun-2010
Not to sound doom and gloom, but I see little evidence that we will 
get a single platform we can all write to so we can focus on a free 
market war of "best products" as opposed to a private war between 
the biggest companies (Apple, Microsoft, etc.).

We are pawns in THEIR game until we have standards enforced.
Graham:
14-Jun-2010
I look at the file extensions and create the batch file based on 
that .. .so nothing nasty is going to happen :)
Graham:
15-Jun-2010
It seems to me we need a contingency plan for the possible failure 
of R3 ( all IT projects have high failure rates and R3 is no different 
).  And so we need to develop R2 as much as we can.
Henrik:
15-Jun-2010
But, in the case of a lack of documentation: I'm in a hurry, more 
often than I want to be, having to implement something that needs 
to be used in a few hours, and so I don't want to spend hours studying 
the source code, no matter how self-explanatory, the author claims 
the software is.
DideC:
15-Jun-2010
To use async on R2, I used to use Uniserve engine.

Once upon a time, France used a Web forum that had an XMLRPC interface 
and I coded a Rebol client that was able to monitor activity and 
send post on the forum asynchronously. It was a happy time...
Maxim:
15-Jun-2010
and why doesn't it work anymore?
Gabriele:
15-Jun-2010
Oldes, indeed, one should pass CALL a block and let it do the conversion 
(because it is platform dependent) - though right now I don't think 
it does much more than to-local-file and adding quotes.
34601 / 4860612345...345346[347] 348349...483484485486487