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

World: r3wp

[Core] Discuss core issues

Carl
19-Sep-2005
[2153x3]
Romano, yes, it is a monster!
Neg for negate may be simplest. We already have abs for absolute.
And, it seems that there are people pushing for sin (sine), cos (cosine), 
tan, etc.
Romano
19-Sep-2005
[2156]
I should remember that the doc of the original functions are in source-destination 
order, so for me is a good idea to make the same in Rebol,  there 
a direct map of OS function and OS doc on rebol functions
Geomol
19-Sep-2005
[2157]
Yeah, I should probably keep the order of the arguments, as they 
are in the Amiga version, so it'll be recognizable. Thanks! :-)
Graham
19-Sep-2005
[2158x7]
The word browser is nice, but I spend most of my time in the console. 
 How about a man command that looks up the manual pages on the net, 
and dumps them to the console?
And since the console responds to escape sequences, we could even 
have some formatting ?
I thought tags were a special form of strings ...
However, this appears not to be the case ...

>> probe rejoin [ "<html>" "testing" "</html>" ]
<html>testing</html>
== "<html>testing</html>"
>> probe rejoin [ <html> "testing" </html> ]
<htmltesting</html>>
== <htmltesting</html>>
>> html: ""
== ""
>> repend html [ <html> "testing" </html> ]
== "<html>testing</html>"
Is 'rejoin trying to do some datatype conversion?
>> rejoin [ "" <html> "testing" </html> ]
== "<html>testing</html>"

Guess it must be.
Tomc
19-Sep-2005
[2165]
they take the first item's datatype
Ashley
19-Sep-2005
[2166]
re: negate. If "10 + neg 5" was the functional equivalent of the 
unary minus example, and its a known performance exception, then 
I for one would vote for it's removal. I, and I suspect many others, 
didn't even realize REBOL supported this (I use the 'negate function 
instead quite often).
Sunanda
20-Sep-2005
[2167]
<<How about a man command that looks up the manual pages on the net, 
and dumps them to the console?>>

It wouldn't be that hard to adapt the existing code for other purposes 
too.

Like, it'd be good  if someone extended it to emit MakeDoc codes. 
Those files could then go straight up on the web -- instant searchable 
ocumentation.

I get the impression that Carl would be happy for people to volunteer 
to extend the project.
Ladislav
20-Sep-2005
[2168]
Ashley: I am supporting the same as long as we get a reasonably short 
and readable name (like Neg)
Geomol
20-Sep-2005
[2169]
Ashley, you've got my support aswell, at least to hear Carl on this. 
Maybe the performance issure is very small, and if many programs/scripts 
will break, it probably shouldn't be changed. But otherwise yes! 
We like fast code! :-)

The asm dialect of REBOL, "rebcode", might change the situation. 
If removing unary minus is a problem, and we don't have it in rebcode 
(and rebcode will boost performance a lot of course, as it will), 
then it maybe shouldn't be changed.
Ladislav
20-Sep-2005
[2170x2]
there may be other influences IMO
(like readability,debuggability, ...)
Geomol
20-Sep-2005
[2172x2]
I agree, readability is very important! (Many forget that though.)
Why did he put unary minus in in the first place!?? ;-)
We want the full story!
Ladislav
20-Sep-2005
[2174]
to comfort the ones who would miss it above all, I think
Romano
20-Sep-2005
[2175]
The performance issue depends from the fact that Rebol must understand 
from the context what is the the meaning of "-": it can be one of 
three (see before). While all other op can work as action! or op! 
(+ 2 3 or 2 + 3) , minus can work in three different modes (2 different 
actions: negate and subtract and an op! 2 - 3). I would remove not 
the unary minus but the fact that any op! can work like an action 
(+ for add, * for multiply) this would make the evaluation loop a 
little more fast.
Benjamin
21-Sep-2005
[2176]
read/skip never work's will this bug ever be fixed ?
Henrik
21-Sep-2005
[2177]
benjamin, are you using the latest core with the /seek refinement?
Graham
21-Sep-2005
[2178]
see http://www.rebol.net/article/0199.htmlregarding seek.
Benjamin
22-Sep-2005
[2179]
seems to work ok, but i think the original purpose was a simple line 
of code to make the seek  with a simple read, any whay this works 
ok to me many thanks
Ingo
22-Sep-2005
[2180x2]
Why do I get an error "invalid argument" here?


>>       comp-length: func [a b][compare (length? a/2) (length? b/2)]
>>       sort/skip/compare files 2 :comp-length
** Script Error: Invalid argument: 2
** Near: sort/skip/compare files 2 :comp-length
>> source compare
compare: func [

    {compares to values, and returns -1 / 0 / 1 for values a<b / a=b 
    / a>b}
    a b
    /local return
][
    case [
        a > b [-1]
        a < b [1]
        true [0]
    ]
]

REBOL/View 1.3.1.3.1
files is somthing like [%abc [%a/ %xx/] %def [%xyz/] ...]
Sunanda
22-Sep-2005
[2182]
Add /all to the sort:
sort/all/skip/compare files 2 :comp-length
Ingo
22-Sep-2005
[2183]
That still doesn't work, I just checked wether I had accidentally 
overwritten 'sort, but no ...
Sunanda
22-Sep-2005
[2184]
It works for me:
files: copy  [%abc [%a/ %xx/] %def [%xyz/]]
compare: func [

        {compares to values, and returns -1 / 0 / 1 for values a<b / a=b 
        / a>b}
        a b
        /local return
    ][
        case [
                a > b [-1]
                a < b [1]
                true [0]
            ]
    ]


print system/version
sort/compare/all/skip files  :compare 2
probe files

1.3.1.3.1
== [%def [%xyz/] %abc [%a/ %xx/]]
Graham
24-Sep-2005
[2185]
not core .. but I wonder what RT has to do to make use of dual core 
CPUs.  Is this an OS, or an application thing?
Henrik
24-Sep-2005
[2186]
that's an OS thing for now. I don't think programs can be threaded 
across multiple CPU's yet and since REBOL still doesn't have real 
threading, it doesn't matter anyway.
Graham
24-Sep-2005
[2187x2]
I was thinking more of running more rebol instances than threads
for example running more IOS servers and the like
Sunanda
24-Sep-2005
[2189]
It'll depend on how the OS does it. Expect them to start primitive 
and slowly improve

*probably* any started task can be dispatched on any spare CPU. And, 
after any suspension, it'll get restarted on any spare CPU.
*probably* (as Henrik says) subtasks will run on the same CPU.

In many people's cases all their spyware and viruses will hog one 
CPU. leaving the other free for productive work.


Separate instances will *probably* run on separate CPUs, leaving 
serialisation and such an issue as now. If they need to talk, a tcp/ip 
pipe may be easiest (as now).
Graham
24-Sep-2005
[2190]
I wonder then what localhost will refer to ...
Henrik
24-Sep-2005
[2191]
OSX I believe, starts new tasks on additional CPUs if a current program 
hogs the currently used CPU. So yes two instances of REBOL would 
run on each CPU, but only if CPU utilization is "correct".
Graham
26-Sep-2005
[2192]
Is it inconsistent that with an object, you can do

first object
pick object 1

but  not 

object/1 ?
Pekr
26-Sep-2005
[2193x2]
imo paths are inconsistent on more places ... we just recently got 
block/(compute value) functionality and block/4: "text" etc. to simply 
change value directly ...
why not block/"my string"? I know it looks terrible, but .... and 
also, if block/literal-value: assigned-value works, but when you 
use block/numeric-value, it means its position, while in the case 
of literal value, it performs seek ...
Anton
26-Sep-2005
[2195]
Graham, you may also ask if it is inconsistent that objects and functions 
respond differently to FIRST SECOND etc. That is what causes the 
problem, I think.
Pekr
26-Sep-2005
[2196]
that is probably true, Anton, have not thought about it that way 
...
Volker
26-Sep-2005
[2197]
Pekr, if ugly is ok, try this: block/("my string") ;)
Pekr
26-Sep-2005
[2198]
:-)
Allen
3-Oct-2005
[2199]
GMail's not letting me post at the moment. Can someone post this 
reply for me


Jeff Kries, did a zine article called "Dining with Dynamic Interpreters"

http://www.rebolforces.com/zine/rzine-1-02/#sect5.which covers some 
of the same ground.

--Allen K

on 10/4/05, Glenn M. Lewis <[glenn-:-hometot-:-com]> wrote:

Hi all!

       Has anyone done anything like this for REBOL:
http://www.rubyquiz.com/quiz49.html

       If so, I would love to hear about it!  Thanks!
-- Glenn
Tomc
3-Oct-2005
[2200]
I got that email om my gmail account  an hour ago
Izkata
3-Oct-2005
[2201]
I got that already, too... Gmail must just not be telling you it 
sent  =P
Allen
4-Oct-2005
[2202]
in that case, you might get it a few times.. It kept giving me a 
javascript alert saying it was unable to send