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

World: r4wp

[#Red] Red language group

DocKimbel
11-Mar-2013
[6240]
Can't you just return unset! from an undefined path, like for an 
undefined word?

I will give it a try.
Pekr
11-Mar-2013
[6241]
Nenad - Happy Birthday to you, and so to your brain-child - Red :-)
DocKimbel
11-Mar-2013
[6242]
Thanks Peter! :-)
Gregg
11-Mar-2013
[6243]
If it's Doc's birthday, we should give him a present and donate to 
his child's future. 

Happy Birthday Doc.
Henrik
11-Mar-2013
[6244]
HBD, doc. :-)
DocKimbel
11-Mar-2013
[6245]
Thanks guys! :-)
NickA
11-Mar-2013
[6246]
Made a little donation - happy birthday!
Pekr
11-Mar-2013
[6247]
I will donate in few days, once my salary arrives :-)
Gregg
11-Mar-2013
[6248]
Remember, I'm matching donations, birthday or not, until the end 
of the month, so Doc gets double presents.
DocKimbel
11-Mar-2013
[6249]
Nick: got it, thank you very much!
Endo
11-Mar-2013
[6250]
Happy Birthday Doc!
Kaj
11-Mar-2013
[6251]
I thought it was last month, Doc, but if it was today, happy birthday!
DocKimbel
11-Mar-2013
[6252]
Thanks!
Kaj
11-Mar-2013
[6253x4]
With the latest version, I still get
red>> do [z:]
== 
*** Runtime Error 1: access violation
*** at: 0851C0F3h
That's in console-pro. Oddly, in your console, it indeed gives the 
action error
Would it be hard to have the undefined warnings print the name of 
the undefined word/path?
DocKimbel
11-Mar-2013
[6257x2]
Actually, that's part of error! handling, I can't do it right now 
it would delay the release too much...
I can have a quick look at it though, if it's just a few lines of 
code, I'll add it.
BrianH
11-Mar-2013
[6259]
Doc, what is your opinion about what FOR and FOREACH should do for 
the obviously never advancing case? Error triggered or nothing done?
DocKimbel
11-Mar-2013
[6260x2]
Is there a CC ticket about that?
At first look, I'd say nothing done as it can be useful to disable 
a code block in a loop passing 0 as looping number (or empty block 
in case of FOREACH).
Kaj
11-Mar-2013
[6262]
Are we talking about never advancing or never executing?
BrianH
11-Mar-2013
[6263x2]
Never executing. Never advancing means executing endlessly.
That method of disabling a loop block would be in addition to passing 
none as the data (for foreach)?
Kaj
11-Mar-2013
[6265x2]
In that case, it seems obvious to me to do nothing. That's a regular 
construct in programs
red>> do *
Error: feature not implemented yet!
bash-4.0#
DocKimbel
12-Mar-2013
[6267x2]
I tried avoiding the error propagatin, but it's too complex, so it 
will stay as is until error! is implemeted.
The changes I made in the interpreter for not exiting the console 
on errors have a very bad side-effect: some errors are passing silently 
through the unit tests and are not reported! :-/
Kaj
12-Mar-2013
[6269]
Hm, well, I suppose it's good practice for implementing error! ;-)
DocKimbel
12-Mar-2013
[6270x2]
I can't on error! until next week, my planning is full.
<work>
Kaj
12-Mar-2013
[6272x2]
This one has an assortment of effects:
red>> do [z:]
== 
*** Runtime Error 23: illegal operand
*** at: 09DB50F2h
DocKimbel
12-Mar-2013
[6274]
I simply get an "*** Script error: action..." message here.
Kaj
12-Mar-2013
[6275x3]
Again, in console-pro
red>> load x 
*** Error: word has no value!

*** Runtime Error 1: access violation
*** at: 08079DD7h
red>> load x/y
*** Error: word in path has no value!

*** Runtime Error 1: access violation
*** at: 08079DD7h
DocKimbel
12-Mar-2013
[6278x3]
Kaj, I'm really don't see this approach working. The HALTs in the 
runtime code *do* have a purpose, they protect the user from running 
its code after an error that sets the stack in an undetermined state. 
It's a (temporary) protection barrier until we have proper error 
handling. Removing them will just make me chase false errors.  I 
can't patch the whole runtime code to make it look like it has error 
recovering while it has not...
I told you that the cleaner option would be: write a input data validation 
routine to, at least, catch those undefined words.
I think I'll put the HALT back to avoid making the runtime code unstable 
(and avoid those nasty silent errors in unit tests).
Kaj
12-Mar-2013
[6281x3]
I have no idea what you're talking about. What approach? What HALTS? 
What input validation?
I'm just reporting crashes that I observe
Is there any point to continuing testing at the moment? I'm not sure 
now what reports you want
DocKimbel
12-Mar-2013
[6284]
My point is: an undefined word error is a user error, and exiting 
the interpreter with an error message is currently the best thing 
to do. I've removed the exit points after such errors because you've 
asked me to for making your demos run without exiting. But I shouldn't 
have done that.
Kaj
12-Mar-2013
[6285]
I don't really understand. The interpreter never halted on undefined 
words, only undefined paths
DocKimbel
12-Mar-2013
[6286x2]
Same thing.
Paths error out because there's an undefined word in them.
Kaj
12-Mar-2013
[6288]
I know, but you didn't remove a HALT from word evaluation because 
I asked
DocKimbel
12-Mar-2013
[6289]
Well, actually, I did. :)