World: r3wp
[Core] Discuss core issues
older newer | first last |
Volker 26-Jun-2006 [4961x2] | Thats why ladislav puts the date in a string. compiled later. |
how should it work instead? | |
Pekr 26-Jun-2006 [4963x3] | ok, can we meet with state, where your app returns directly such invalid date? e.g. mentioned link to sqlite date field? |
how would it work? dunno? a bit more relaxed evaluation? interpreter finding string 29-Feb-2006 - it is valid format, not just valid value. Under some condition it could be even valid date (leap year). I would expect even such error to be catchable ... | |
ok, so I will have to trust gurus the fact, that technically it can't be fixed :-) | |
Henrik 26-Jun-2006 [4966] | how does Rebol not know how to handle 29-feb-2006 as a date! ? I'm not sure I understand this, because how then is the unrecoverable error generated? from what I see, you'll always need to wrap some precautionary measures around handling dates to avoid this. that's not good design. |
Volker 26-Jun-2006 [4967] | internal its not a string, but a number. you would get 29-feb-2006 as 1-mar-2006. would that be ok? |
Pekr 26-Jun-2006 [4968] | anyway ... I don't like current state, that is all. I even don't know consequences, just a feeling :-) Maybe Carl could give us his opinion, if it is bug or not, and if not, if this is desirable behavior ... |
Volker 26-Jun-2006 [4969] | maybe a hook in 'load, whcih can do some spellchecking? |
Pekr 26-Jun-2006 [4970] | hmm, help me to imagine, how does interpreter internally works? So let's simplify it - it reaches 280.250.250 tuple. It tries to parse it. It eventually recognises it as a tupple, otherwise it would not return "Invalid tuple", no? But then it finds invalid values ... why just doesn't it recognise, it is part of 'try block and does not throw error, which would be catchable? |
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 [5010] | the advantage is, the memory-layout is known, so the interpreter has an easier job. |
older newer | first last |