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

World: r4wp

[#Red] Red language group

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
[6289x4]
Well, actually, I did. :)
But I will them all back, user errors should make the app exit, currently 
it's the best way.
That's why I told you before to validate the user input in order 
to avoid errors as much as possible.
(Until we can catch them properly with TRY)
Kaj
12-Mar-2013
[6293]
I don't remember you saying that, but I'm looking into it
DocKimbel
12-Mar-2013
[6294]
But it seems we misunderstood each other. :)
Kaj
12-Mar-2013
[6295]
Obviously
DocKimbel
12-Mar-2013
[6296]
See my post on Sun 23:49
Kaj
12-Mar-2013
[6297]
Oh, I see, you were going to implement VALUE? for validation. I just 
didn't think you meant checking the entire input; I thought you were 
talking about the result
DocKimbel
12-Mar-2013
[6298x2]
I meant the whole user input, mainly for catching undefined words/paths 
and hanlding the error out of DO.
Maybe I will do it myself in the console script...
Kaj
12-Mar-2013
[6300x8]
Thinking about it, that would reject any user code that uses words 
as symbols, wouldn't it?
I have a loop written that does the evaluation, even without VALUE? 
but it doesn't seem like a good idea to me
red>> x: load "view button" forall x [print unset? get x/1]      
     
false
true
Undefined single words were never a problem in the interpreter before. 
That's why I could write Redpages with a header:
Red []
They were simply ignored. After I requested the warning message, 
the Red word produces such a warning, so for now I write:
'Red []
By the way, are get-paths supposed to work?
DocKimbel
12-Mar-2013
[6308x3]
Nope, not yet.
DO doesn't support a Red header yet.
You should strip it from a LOADed block before passing it to DO.
Kaj
12-Mar-2013
[6311]
I know, but it worked
DocKimbel
12-Mar-2013
[6312x3]
I need to fix some interpreter issues revealed by Peter's port of 
~2500 tests to the interpreter. There's about a dozen failing tests 
to fix.
Once that done, I will have a look again at those error reporting 
issues.
I agree that it is not yet possible to deeply validate user input. 
I'll see if I can find a cheap workaround for the release.
Kaj
12-Mar-2013
[6315]
OK, thanks
DocKimbel
12-Mar-2013
[6316]
7 failing tests to go until complete equivalence between Red compiler 
and interpreter. :-)
GrahamC
12-Mar-2013
[6317]
nice progress
Bo
12-Mar-2013
[6318]
Great!
Maarten
13-Mar-2013
[6319]
Nice!
Kaj
13-Mar-2013
[6320x12]
I'm getting a weird crash if I load the following in the GTK-browser:
function [] [
	[text]
]
bash-4.0# ./GTK-browser test.red 

*** Runtime Error 1: access violation
*** at: 08063687h
It doesn't happen if I load it in the console
This fixes it:
function [] [
	text: ""
	[text]
]
But this doesn't:
function [] [
	text: none
	[text]
]
Actually, it crashes by just loading:
none
Sorry, strike that last one
I've put it in the tracker
Paul
13-Mar-2013
[6332]
Great stuff guys,  been taking a bit more time to get to know RED. 
 Great work Doc, Kaj, Peter, and the rest of the testers and submitters.
Kaj
13-Mar-2013
[6333]
Thanks, glad you like it :-)