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

World: r3wp

[Core] Discuss core issues

Sunanda
30-Dec-2004
[2]
Best way? I don't know.

Assuming only a single letter followed by an integer, I'd do this:
 print mold sort/compare [ A14 A2 B300] func [a b][
       return (to-integer next form a) < to-integer next form b]
eFishAnt
30-Dec-2004
[3x2]
cool, thanks.  I was thinking there might be some way to keep each 
as a word and do some subparse...but I think there is only a way 
to convert the words to something else and split them apart.
parse handles a literal word indivisibly
Sunanda
30-Dec-2004
[5]
You'd probably need parse if the item was more complex.
I think parse would be overkil here.
Gregg
30-Dec-2004
[6x2]
And if there are a lot of items, be aware that those transformations 
will occur on every compare, so it could be *verrrrry* slow; a lot 
of churning in there.
If there are a significant number of items, do the transform once 
and build yourself a structure with the numbers in place so you can 
just sort on them.
eFishAnt
30-Dec-2004
[8]
OK, thanks for the optimization tips.  Nice to have gurus inside 
my CRT!
Volker
30-Dec-2004
[9x2]
blk: head reverse [ A14 A2 B300]
out: copy[]
foreach w blk[repend out [to-integer next form w  w]]
probe extract next sort/skip out 2 2
if you really need that ;)
eFishAnt
30-Dec-2004
[11]
>> max  "1000" "999"
== "999"
Sunanda
30-Dec-2004
[12]
string comparisons are, in effect, right padded, to equal length 
before comparing.
The comparison is really
max "1000" "999*"

   where "*" is whatever the pad character is (probably a binary zero)
Tomc
30-Dec-2004
[13]
for dictionary sorting it is sufficent that first "1000"  is less 
than first "99"
eFishAnt
30-Dec-2004
[14]
thanks...got all that working (did a parse after all, mold/only the 
block of words to strings before parsing.
shadwolf
31-Dec-2004
[15]
hello every body On rebolfrance Forum we have a guy who wants to 
load a library DLL he have done most part of the work but he can't 
find how to convert in his rebol cloned struct! the int intpointer[4] 
from C language to an equivalent type of rebol. Can you enlight us 
please (you can respond directly to shadwolf)
Ladislav
31-Dec-2004
[16]
is http://www.compkarori.com/vanilla/display/peek_and_poke.rof any 
use for the purpose?
Ammon
4-Jan-2005
[17]
If you have ever tried APPENDing a Block to a Block as a Block (ie. 
append ["a"] to [] and have it be [["a"]])  Then you prolly know 
that you have to jump through a couple of hoops to do it.  The same 
goes to append a string to a string.  Now there are a lot of times 
that I need to append one series to another as a "sub-series" it 
seems to me that this should be much simpler to do, maybe a refinement 
to APPEND.  Any thoughts?
Graham
4-Jan-2005
[18]
append/only
Ryan
4-Jan-2005
[19]
["a" []] = append/only ["a"] []  ;like this?
Ammon
4-Jan-2005
[20x2]
You're kidding me?
that's funny.  I've always used compose/deep [[()]]
Graham
4-Jan-2005
[22]
also, repend/only ...
Ryan
4-Jan-2005
[23]
REBOL lets you get along any old way.
Ammon
4-Jan-2005
[24]
Well, that will make my scripts shorter. ;-)
Ryan
4-Jan-2005
[25x5]
Look at desk-calc.r for some shrinking tricks.
or mini-calc.r
I was thinking of making up and compiling some function libraries 
based on other languages. People coming from these languages can 
adapt quickly, and some have cool functions.
I may use these to help sell programming firms on REBOL.
Submissions and your own compiliations are welcome of course.
ICarii
6-Jan-2005
[30x4]
Latest Core Alpha on Debian Woody hangs at this stage:
Component: "REBOL Mezzanine Extensions" 1.2.0 (1-Aug-2004/22:34:12)

Component: "REBOL Internet Protocols" 1.71.0 (4-Nov-2004/21:08:24)
Finger protocol loaded
Whois protocol loaded
Daytime protocol loaded
SMTP protocol loaded
POP protocol loaded
IMAP protocol loaded
HTTP protocol loaded
FTP protocol loaded
NNTP protocol loaded
Component: "Command Shell Access" 1.9.0 (3-Jan-2005/21:08:57)
Component: "System Port" 1.4.0 (1-Aug-2004/18:58:28)
..
Tried on two slightly differently configured machines - same result
PeterWood
6-Jan-2005
[34]
Have you reported via Feedback or Rambo?
ICarii
6-Jan-2005
[35x2]
not yet - in the middle of an alpha test - no time for thinking even 
:(
i'd want to spend a little more tie testing - im trying it on fedora 
core 2 in another few hours as our linux servers go live
Volker
6-Jan-2005
[37]
Can you look in rambo-group? noted such problems with older knoppix 
(=debian) there. you see cursor, then nothing happens?
rolf
7-Jan-2005
[38]
I do not understand this:
>> x: to-set-word 'y
== y:
>> x 'z
== z
>> probe y
** Script Error: y has no value
** Near: probe y

can somebody explain or point me at some docs?
Ladislav
7-Jan-2005
[39]
your trouble is, that the evaluation of X doesn't have the same effect 
as if you replace X by its value. The evaluation of X only yields 
a set-word instead of setting anything. If you really want to set 
a word 'y, then there are two ways:

set x 'z

do compose [(x) 'z]
rolf
7-Jan-2005
[40]
OK thanks,  I understand.  'set is simple.  I did not try  'do compose' 
until  now.  II tried 'do' and 'do reduce' without succes.
Ryan
7-Jan-2005
[41x2]
How about this one:
>> dir? http:/www.google.com/
** Access Error: Cannot connect to mail.pacific.net
** Where: open-proto
** Near: dir? http:/www.google.com/
Ammon
7-Jan-2005
[43]
Hm...  I think you got something stuck in your event system somewhere...

>> dir? http://www.google.com
connecting to: www.google.com
== false
Ryan
7-Jan-2005
[44x3]
Your right...
>> system/version
== 1.2.57.3.1
(you were right about the editor too, 1 night was too little)
Gabriele
8-Jan-2005
[47]
http:// not http:/
Ryan
8-Jan-2005
[48x2]
>> dir? http://www.google.com/
== false
The devils are in the details!
Scott
8-Jan-2005
[50]
Ryan: What are you trying to achieve?  (Or is it humor that has eluded 
me?)
Ryan
8-Jan-2005
[51]
Just curious if it looked up the site for a directory. part of my 
rebol editor I am working on.