World: r3wp
[Core] Discuss core issues
older newer | first last |
Volker 26-Jun-2006 [4971x4] | because it does not try to parse it. it has already. |
'load does the parsing. after load has finished, all datatypes are in an optimized form. | |
if load cant handle something, it is helpless. it does not know something is inside a try-block. it only knows it has loaded a lot of words already and the followingtext is not right. | |
that means the error happens when the sourcecode with the try is laoded, before try as any achance to be executed. | |
Pekr 26-Jun-2006 [4975] | then maybe there could be two phases of load .... parse form, not the value first :-) 999.999.999 for a valid tuple! datatype. It is too strict, in opposite to: >> email? to-email "nonsense" == true |
Henrik 26-Jun-2006 [4976] | that's why we have the term "loadable", right? Carl talks about this when parsing. Otherwise this wouldn't be a problem. |
Volker 26-Jun-2006 [4977x3] | maybe some datatype "weird" with the original string and a type-suggestion? but then you get problems with ambiguities. |
what is a typo, what ignored? 6-pfu-206 ? | |
maybe i amn to conservative, used to compilers which tell me each bug, instead of fixin it. always fearing a misunderstanding when the compiler would try toguess itself. if it could reliable guess, thatwould be cool :) | |
Henrik 26-Jun-2006 [4980] | as long as there are no dead ends with truly unrecoverable errors... |
Pekr 26-Jun-2006 [4981x2] | Volker - but how does it know of 29-Feb-2006? Under some condition, it is valid date ... imo already higher level logic is applied here, no? |
- btw - from my pov, regard this discussion academic .... I don't understand compilers, interpreters, just speculating here :-) | |
Graham 26-Jun-2006 [4983x3] | quick question ... I have a number of simple objects that I create on the web server and then send back to client in molded format. |
how does one restore them back to objects? | |
If I load them, I just get a block | |
Volker 26-Jun-2006 [4986x2] | mold/all |
uses some extra syntax. | |
Graham 26-Jun-2006 [4988] | ok, let me try :) |
Volker 26-Jun-2006 [4989] | Pekr, the only thing to know is that all code is loaded and checked for syntax, and then executed. and before execution 'try has no real meaning, it could be"the" 'try, or a local or style or something. when 'do does the code it does no longer know the original source. So 'load has to report errors on its own. |
Graham 26-Jun-2006 [4990x2] | page: read http://www.compkarori.com/cgi-local/show-templates.r |
parse page [ thru <templates> copy code to </templates> ] | |
Volker 26-Jun-2006 [4992] | Btw rebol cheats and uses a calendar ;)>> 29-feb-2004 == 29-Feb-2004 >> 29-feb-2005 ** Syntax Error: Invalid date -- 29-feb-2005 ** Near: (line 1) 29-feb-2005 |
Graham 26-Jun-2006 [4993x2] | seems to work ... |
thanks. | |
Volker 26-Jun-2006 [4995] | np. the "#[object! [" does the magic. |
Pekr 26-Jun-2006 [4996] | Volker - isn't checking against the calendar too preliminary during the state of code load? :-) |
Volker 26-Jun-2006 [4997] | No, thats the basic equpment of a god loader. pda and such ;) |
Pekr 26-Jun-2006 [4998x3] | :-) |
even a cell phone? probably so :-) | |
in the case of tuple, is that kind of binary given, that the value can't be larger than 255? | |
Volker 26-Jun-2006 [5001x3] | *riing* "Hi" - "This isnt a date, you know?" :) |
Yes. | |
upto 12 bytes out the 16 AFAIK. | |
Pekr 26-Jun-2006 [5004] | so tuples can't be used for things like coordinaty space? |
Volker 26-Jun-2006 [5005x3] | No. |
Coimplex things need objects. | |
Until Carl finds a clever magic new way to keep performance. :) | |
Pekr 26-Jun-2006 [5008x2] | hmm, we have pair for such things ... |
I wonder if tuples should allow rotation? | |
Volker 26-Jun-2006 [5010x2] | the advantage is, the memory-layout is known, so the interpreter has an easier job. |
Hmm, shifting would be nice. I use them for version-numbers and colors, so i dont need rotation. but getting at thepart with the os would help. What usage benefits from rotation? | |
Pekr 26-Jun-2006 [5012] | dunno, but I saw someone mentioning the need for it already ... |
DideC 26-Jun-2006 [5013x2] | A language is not there to solve any particular needs, but to solve the needs of most of us Not the original sentence, but Carl said something like that, one day (maybe in a blog, or what is Altme?). |
As a comment, try "29/02/2006" in Excel and it will give you a nice "text" value, not a date value. Don't expect 'load to make this kind of choice ! | |
Gabriele 26-Jun-2006 [5015x2] | Petr, it's not "non recoverable", it's perfectly recoverable, you're just trying to recover when it is too late. |
load must make sure that the date is correct, because it must convert it to the internal format. 29-Feb-2006 simply cannot be converted and thus cannot be loaded. | |
Ladislav 26-Jun-2006 [5017] | Pekr: "I am not talking about string..." - Wrong! You are talking about string but refuse to admit it. Every source code is a string before LOAD transforms it to a block. (see my articles on this) |
Edgar 26-Jun-2006 [5018] | Like Pekr, I am confused here. It would seem that if the loader cannot convert a value into the internal format, then it should have a fall back of loading it as a string. Other values that Rebol can't convert to an internal datatype should convert it to a string to be consistent. |
Anton 26-Jun-2006 [5019x2] | That would cause rather strange bugs. Quite often, you wouldn't notice that you had made a syntax error. How would you know whether a string was an incorrectly written date or just some other string ? eg: How could you tell whether "jan 12" was intended to be a date! or not ? Maybe it's somebody's name and age in a string. |
I am completely happy with the way load works in this regard. A given date string must comply with the rebol syntax and have valid sub-values otherwise I don't want it. If messy data is coming in, just catch errors loading it from a string. Simple. | |
older newer | first last |