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

World: r3wp

[!REBOL3]

Maxim
13-May-2010
[3037x2]
that first line is all I can say that that's related to R3, from 
the batcave. 


I *might* have some very exciting news late june, regarding something 
unrelated to R3 though  ;-)
the command! rewrite was exposed by Carl a while back, Brian can 
probably give more precise details.
BrianH
13-May-2010
[3039]
PeterWood, when ++ and -- were originally proposed, I called them 
INC and DEC. They changed to the C-like naming later. The behavior 
is good, but the names confuse the very C programmers they were supposed 
to be a shout-out to.
Maxim
13-May-2010
[3040x2]
I still prefer INC & DEC
(for that very reason.  It creates assumptions, which cannot hold 
because of the semantic differences between REBOL & C).
BrianH
13-May-2010
[3042]
Same here. Especially since the other half of my proposal was INCREMENT 
and DECREMENT functions that did the a: a + x operation. But that 
ended up being too many characters for something so simple.
Maxim
13-May-2010
[3043]
brian, do you think it would be possible to have postix operators 
in REBOL's do dialect?
Ladislav
13-May-2010
[3044x2]
yes
...but only taking one argument
Maxim
13-May-2010
[3046]
ok, since post fix are usually unary operations I don't see that 
as a limitation.
Ladislav
13-May-2010
[3047]
nevertheless, it is not worth the mess
Maxim
13-May-2010
[3048]
I agree, I was just wondering.
BrianH
13-May-2010
[3049x2]
You could have an op! that ignores and passes back its second argument, 
if any. It would be tricky, and destroy the evaluation of the argument 
following it.
Any other solution would require changing the DO evaluation rules.
Maxim
13-May-2010
[3051]
yes I can see that there would require a little change in the op! 
datatype to let do know how to handle values before & after, but 
the dialect itself isn't limited in the sense that it couldn't be 
modified...  just being curious for discussion's sake... not a request
BrianH
13-May-2010
[3052]
All ops take two arguments, according to the evaluation rules. In 
theory, the evaluation rules could be changed to allow an op to take 
one argument, the left one. Or maybe that would already work - we 
have to wait for user-defined ops to be sure either way.
Pekr
13-May-2010
[3053]
Maxim - if your news is not related to R3, what is it related to 
then? :-)
Maxim
13-May-2010
[3054]
a special use of R3 ;-)
BrianH
13-May-2010
[3055]
Brian can probably give more precise details.
 - No, but perhaps a more precise guess.


Currently a command! contains a reference to a dispatcher (handle 
to the extension, which contains an RX_Call function) and a selector 
(an integer). In theory, the implementation of a command! could include 
(or be) a bit of native code - that is generated at command! creation 
time - to call the dispatcher with the selector, and the address 
of that native code could be provided to an external native function 
for the native function to call. The native code inside a command! 
or its dispatcher would need some kind of synchronization stuff too, 
to manage the transition from external to internal process models. 
Or we could get a callback! type, which would have a GC-safe reference 
to that native code and the dispatcher. Either as the standard command! 
type or as a callback! type, when used as a callback the function 
would need to be GC-safe because external native code doesn't track 
REBOL heap references.

Or we could end up with something completely different :)
shadwolf
13-May-2010
[3056]
Peterwood not only C/C++ the ++ operand exists in most of the languages 
now in days compiled or interpreted... (python, perl, tcl/tk, ruby, 
java, etc...)

most people want i++, instead of i= i + 1 but i always thought the 
right operand instead of "++" should be "=+"  somthing like i=+ is 
in my opinion more explicit...


Pekr; some time the Carl says things we can't understand and mainly 
cause we don't have a full view on the source code he is talking 
about...

modular coding is obvious but  you have several ways to realise it... 
puting preporcesor flag to include or not part of the code when you 
compile is one solution

having them indeferent folders and binaries or libraries is another.. 
And that was always one of my  biggest comment rebol wants to do 
all every where so it ends being

weak every where and doing incompletly most of the things it pretends 
to do ...
Graham
14-May-2010
[3057]
http://eclectic-pencil.blogspot.com/2010/02/rebol-3.html
Pekr
14-May-2010
[3058x2]
Nice :-)
He is still less desperate, than some of us :-)
Graham
14-May-2010
[3060x2]
he can read the chat thru a browser .. no need to fire up r3
or can we script the login, and download of new messages :)
Pekr
14-May-2010
[3062]
Can we? Does R3 chat have an API? I mean - there are commands, but 
can we script it? Dunno how ...
Graham
14-May-2010
[3063x5]
http://www.rebol.com/r3/chat.r
Hmm... Script Error: This script needs View 2.100.28 or better to 
run correctly
So, why does a console app need view ?
auto-login: func [/force] [
            all [
                any [force prefs/auto-login]
                prefs/user
                prefs/pass
                attempt [login-serve prefs/user prefs/pass]
                true
            ]
        ]
Should be able to modify chat to autologin, check for new messages 
and then quit.
I wonder what sort of flood protection there is ...
Pekr
14-May-2010
[3068]
Hmm, so we can only have 255 Windows?I thought I will make small 
stress-test one day, opening 10K Windows under Vista :-) IIRC, my 
friends did something like that with AmigaOS, and it still worked 
:-) http://curecode.org/rebol3/ticket.rsp?id=1610&cursor=1... anyway 
... this is imo unnecessary limitation ....
BrianH
14-May-2010
[3069x2]
Graham:

If I want to set something to the index of a series, or something 
else if it's not there I have to do this

b: either a: find series var [
	index? a
][ 	default ]

when I'd rather do

 b: any [ index? find series var default ]

So how about letting index? also take none as an argument ?
Interesting idea, Graham. It's not that dissimilar to the recent 
proposal that EMPTY? take none. CureCode it :)
Maxim
14-May-2010
[3071]
index? none 

+1

 :-)
Graham
14-May-2010
[3072]
http://www.curecode.org/rebol3/ticket.rsp?id=1611

Done
BrianH
14-May-2010
[3073x2]
Cool, thanks! We can post a comment to the EMPTY? none blog mentioning 
this ticket as well :)
Done. Also tweaked the ticket to be more specific, and added a comment 
in favor of it.
Steeve
14-May-2010
[3075]
I can make a prediction, Gradually, other functions will

be modified to propagate the value # none instead of returning an 
error.
This is only the beginning.
BrianH
14-May-2010
[3076]
Seriously people, get to know and love ASSERT. You are going to miss 
those errors someday, to help you track down and prevent data corruption.
Graham
14-May-2010
[3077]
Steeve are you against the idea?
Steeve
14-May-2010
[3078]
On the contrary, I''ve always been for :)
Graham
14-May-2010
[3079]
hard to tell :)
BrianH
14-May-2010
[3080]
My comment also showed the downside: You will no longer be able to 
rely on INDEX? returning an integer. Though in balance I am in favor.
Steeve
14-May-2010
[3081]
I dislike useless error bombing, as I already said
Graham
14-May-2010
[3082x2]
I want to write simpler code too
I hate having to trap for errors when I always have a default behaviour
Steeve
14-May-2010
[3084]
#none is the ideal pass-true value. All your codes would be delighted 
by such feature
BrianH
14-May-2010
[3085]
I also dislike useless error bombing. Though I am in favor of *useful* 
error bombing; not the case here though.
Steeve
14-May-2010
[3086]
*pass-thru