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

World: r3wp

[Core] Discuss core issues

Graham
12-Mar-2009
[12936]
I mean supercede their OS
Maxim
12-Mar-2009
[12937x2]
if you search the net, you will quickly find the direct download 
link for that file from MS servers, without the need for WGA   :-)
got it my first search IIRC
Gabriele
13-Mar-2009
[12939x3]
So, Brian, the wiki is going to be ignored?
Brian, how do you do this: nforeach [a block1 b block2] [...]   without 
do/next or reduce?
it could as well be nforeach [a join block1 block2 b block3] [...]
Geomol
13-Mar-2009
[12942]
I came across some code:

>> o: load {#[object! [a: 1]]}
>> source o
o: make object! [
    a: 1
]


Is this way of making objects documents somewhere? Does it work with 
other datatypes?
BrianH
13-Mar-2009
[12943]
Gabriele, I don't think the wiki will be ignored. It's just that 
a wiki and an official manual are different things. Noone would sensibly 
expect a wiki that can be edited by anyone to be authoritative. But 
a wiki can fill in the blanks.
Pekr
13-Mar-2009
[12944]
Wiki is becoming a "more organised mess", thanks to Kr. Bacon :-)
BrianH
13-Mar-2009
[12945x5]
As for nforeach, you didn't catch that the first thing I would change 
would be to have the words and data in separate blocks, to make generation 
of the data and pipelining easier. The words are an artifact of the 
call to nforeach, not part of the data. You need DO/next to implement 
the old version, not a version that I was talking about. Any REDUCE 
would be outside the function.
Geomol, yes, but not all datatypes, and expect binding issues with 
object! and function types.
Pekr, Bacon has been doing good work, and the wiki is getting prettier 
:)  But there have been a few factual errors on those pages...
NFOREACH would take 3 arguments, not 2, just like FOREACH.
I'm not sure about the name though.
Pekr
13-Mar-2009
[12950x2]
BrianH: I don't agree. While he is doing really a good work, he also 
completly ruined some stuff. He restructured Carl's docs so that 
they don't make much sense and he intermixed it with Gab's former 
VID docs, not understanding VID3 and VID 3.4 are different things. 
That fact alone is totally confusing ...
I can help him to point out few things, but dunno how to contact 
him ....
BrianH
13-Mar-2009
[12952x2]
I'm not assuming it's a him until I see a full name. The factual 
errors can be cleaned up as the GUI design progresses, no worries. 
In the meanwhile we have a new doc structure and examples of formatting 
to copy, so I'm grateful. This does illustrate my point about the 
difference between a wiki and a manual though.
Factual fixes I can handle (with available time). Formatting fixes 
are much more difficult - don't know Wikimedia. Not the docs guy 
though.
Gabriele
14-Mar-2009
[12954x2]
Brian: i was not comparing wiki to docs. I was comparing wiki to 
chat. If i need to restate do in chat, why is the wiki there?
Brian: I don't like it that way as then you have to keep in your 
mind the relationship between words and blocks; furthermore, please 
name me one case where you wouldn't need reduce. A function that 
*always* needs reduce is badly designed. :P
BrianH
14-Mar-2009
[12956x3]
Gab, sorry, I thought you were talking about DocBase (as others were) 
rather than the parse proposals. The reason I mentioned the chat 
is because you keep bringing up the DO operation as if you are trying 
to convince us of its importance, but we all agree with you so it 
doesn't help. I was trying to point you to a forum where trying to 
convince someone about a parse proposal would have some effect.
As for the Parse Proposals wiki, I'm afraid it will need some cleaning 
down. I kept trying to tell Peta the rules Carl set up, but Peta 
kept ignoring them and going into great detail about parse theory 
and such. Half of the contents of that page are going to have to 
be moved to other pages, and I'm probably going to have to summarize 
the best of the proposals to Carl if we want to convince him to implement 
them.
You have a good point about the nforeach reduce thing, but I am not 
convinced that giving up the ability to generate the data in other 
functions is worth it. I usually don't like to see DO/next in mezzanine 
code anyway: DO/next is usually a sign of a function that doesn't 
work in a REBOL-like way and has too much overhead to use. However, 
I still want Carl to fix DO/next in R3 - it doesn't work at all at 
the moment, and there are some proposed functions that can't be implemented 
without it.
Gabriele
15-Mar-2009
[12959x2]
to me do/next is just a sign of a dialect :-)
maybe too many dialects is bad, but i personally think it's worth 
trying.
Chris
15-Mar-2009
[12961x2]
I have a 'case like function that uses 'do/next
Like case, but inverted (performs the block if the result is false). 
 It'd be easier to implement using [block block] or [paren block] 
pairs, but would not be as readable - imagine the same with 'case 
?
BrianH
15-Mar-2009
[12963]
Chris, that sounds like a good job for DO/next. It also sounds like 
a function that would be replaced by CASE [NOT ... when the code 
is being optimized. REBOL programmers can be pretty ruthless when 
it comes to hand-optimization, so one of the goals of R3 is to make 
the mezzanine functions powerful and efficient enough that they will 
actually get used rather than optimized away, and to make native 
the functions that need to be. The hope is that the users of REBOL 
can just use functions and trust that they will be efficient, rather 
than having to manually inline code all of the time.
Chris
15-Mar-2009
[12964]
Yey to that!
Graham
19-Mar-2009
[12965]
Is there a script around that decodes entities such as & etc 
?
btiffin
19-Mar-2009
[12966]
rebol.org   web-to-plain.r  handles a lot of them.
Oldes
19-Mar-2009
[12967x2]
http://box.lebeda.ws/~hmm/rebol/htmlentities_latest.r
(converts to utf8)
Graham
20-Mar-2009
[12969]
thanks.
Geomol
21-Mar-2009
[12970]
Is this logical behaviour? (Has it been discussed before?)

>> #"a" = 97
== true
>> switch #"a" [97 [print "found!"]]
== none
Chris
21-Mar-2009
[12971]
Inconsistent, perhaps.  Perhaps the first case shouldn't be, but 
can be extra useful (as can #'a" + 5)
PeterWood
21-Mar-2009
[12972x2]
I'm not sure about you're example but this would definitely seem 
to be a bug:

>> #"a" == 97
== true
The R3 behaviour is: 

>> #"a" == 97
== false


>> #"a" = 97

== true
Chris
21-Mar-2009
[12974]
I get:

>>  #"a" == 97
== false

in R2...
PeterWood
21-Mar-2009
[12975x3]
The implicit type convesion in evaluating #"a" = 97 is consistent 
with the help text :

>> ?
 =
USAGE
:
    value1 = value2
 

DESCRIPTION:

     Returns TRUE if the values are equal
. 
    = is an op value
.

ARGUMENTS:

     value1 -- (Type: any)

     value2 -- (Type: any)
I forgot that I was running 2.5.6 :-)
However I would ask why there is not an imiplicit type conversion 
in 

>> #"a" = "a" 
   
== false
Chris
21-Mar-2009
[12978x2]
Likely as char! is not a series type?
Seems a stretch as to-char "a" works, and to-char "ab" returns an 
error...
PeterWood
21-Mar-2009
[12980x2]
The implicit type conversion needed would be to change the char! 
to string! so as not just to compare the first element in the string!.


It would be a nice feature, but not essential. What would be helpful 
would be haivng the implicit type conversions doucmented.
It seems that there mat be a bug in R3:chat 

>> to char! "ab"

== #"a"
Geomol
22-Mar-2009
[12982x2]
Would it make sense to let this return true?
1
 = 1

There is a trap here, because we easily run in circles with char, 
string and integer. There are some special rules about char!, and 
it's probably hard to deside the best design.
In other words, would it make sense to compare apples and pears? 
We kinda do that with char and integer now.
PeterWood
22-Mar-2009
[12984x2]
I'm not sure that comparing char! and integer! is comparing apples 
and pears. Given that Rebol is written in C, it is most likley that 
internally it is stored as a char which is simply a single byte integer.
As for  "1" = 1 returning true, there is a case for implicit type 
conversions. Perhaps not a strong one, but the help text for = does 
imply that test is for equality regardless if type.

The implicit type conversion would need to be:

>> "1" = to String! 1

== true