World: r3wp
[Core] Discuss core issues
older newer | first last |
Maxim 17-Oct-2009 [14857] | specifically *ignores* word |
Steeve 17-Oct-2009 [14858] | I don't see your point, what you say seems wrong, can you give us an example ? |
Maxim 17-Oct-2009 [14859x2] | in my code, I was getting different results for some keywords. any is bound to global, but some isn't anything in rebol. |
so since I can't create my rules using to-block (cause the parse rule is actully changing itself, using pre-bound rules... I'm stuck. | |
Steeve 17-Oct-2009 [14861x2] | well, just bind yout rules in a specific context. con: context [ any: 'any some: 'some opt: 'op ... ] |
redefines the parse keywords as you want | |
Maxim 17-Oct-2009 [14863x2] | so what I'll do is follow parse's functioning. if a word maps to a function or a native, ignore it... I know my rules don't bind functions, cause they'd fail anyways. |
yeah that would work too. | |
BrianH 17-Oct-2009 [14865] | Maxim, BOUND? doesn't bind words to the global context - that was done by LOAD. Try this: >> bound? first to-block "a" == none |
Maxim 17-Oct-2009 [14866] | yes yes... that was understood later on. |
BrianH 17-Oct-2009 [14867] | I'm trying to hack up an UNBIND backport to R2/Forward though. |
Maxim 17-Oct-2009 [14868] | load is the core culprit here. I didn't realize that all my rules where being bound at application load time, since every word is created by load initially. |
BrianH 17-Oct-2009 [14869] | That was one of the first things changed in R3. If need be you write your own loader for R2 that uses TO-BLOCK and then does the binding itself - LOAD in R3 is a mezzanine that does the same. |
Graham 23-Oct-2009 [14870x3] | >> d: now/time == 17:11:08 >> d/1 == 17 >> d/2 == 11 >> d/3 == 8.0 >> d/3: 0 == 0 >> d == 17:11 >> d: now == 23-Oct-2009/17:11:37+13:00 >> d/4 == 17:11:37 >> d/4/3 == 37.0 >> d/4/3: 0 == 0 >> d == 23-Oct-2009/17:11:37+13:00 >> t: d/time == 17:11:37 >> t/3: 0 == 0 >> d/time: t == 17:11 >> d == 23-Oct-2009/17:11+13:00 |
I can change the second component of a time! but now when it is part of date! ??? | |
but not ... | |
Maxim 23-Oct-2009 [14873x3] | date doesn't have accessors for individual time values... |
once you use d/time, its a new value of type time! | |
you have to use d/time: t in order to push it back into the date. | |
Graham 23-Oct-2009 [14876] | inconsistent |
Maxim 23-Oct-2009 [14877] | I would have tought R3 would have addressed this, but it hasn't :-( ... I just checked |
Graham 23-Oct-2009 [14878x3] | >> date: now == 23-Oct-2009/19:31:27+13:00 >> type? date/time == time! >> date/time/3 == 27.0 >> date/time/3: 0 == 0 >> date == 23-Oct-2009/19:31:27+13:00 |
What exactly is the explanation here?? | |
I'm accessing a time value .. not a date value | |
Maxim 23-Oct-2009 [14881x2] | date is a point in time... time is an amount of time... they aren't the same thing. you can have time values with 50 hours in them, but you can't have 50 hour days. |
but I would like to be able to interact with the time within a date directly anyways myself. | |
Graham 23-Oct-2009 [14883] | Lets put it in curecode |
Maxim 23-Oct-2009 [14884x2] | yep. it might already be there as a request. |
the issue probably is that if you did date/hours: 50 its a logic error. so how is it resolved? ... an error... add two days, two hours? | |
Graham 23-Oct-2009 [14886] | You can alter the day, month, year and zone ... just not the time |
Maxim 23-Oct-2009 [14887x4] | there is a bug in any case!!! >> t: 50:00 == 50:00 >> d: now == 23-Oct-2009/2:40:09-4:00 >> d/time: t == 50:00 >> d == 25-Oct-2009/2:00-4:00 |
here it seems it added two days ... but didn't add the 2 extra hours !! | |
so, I guess the handling wasn't speicifically designed by the date object, and is simply a side effect of its internals. | |
(thats in R2 A90) | |
Graham 23-Oct-2009 [14891] | actually all i wanted to do was to round the time off to remove all the seconds |
Maxim 23-Oct-2009 [14892] | *R3* |
Graham 23-Oct-2009 [14893] | but I have to extract the time, round it off and then set the date time value back :( |
Maxim 23-Oct-2009 [14894] | put it into curecode and add the above bug within the report... it will add to its relevance (and priority) within the post. |
Graham 23-Oct-2009 [14895] | I don't hve the link close to hand ... |
Maxim 23-Oct-2009 [14896] | google rebol curecode... first link |
Graham 23-Oct-2009 [14897x3] | Not for me .. I get vid extension kit! |
nope .. not in google on those parameters | |
Let me try google.ca | |
Maxim 23-Oct-2009 [14900] | I get the rebol doc base page for R3 |
Graham 23-Oct-2009 [14901] | Hmm... perhaps I need to remove "google" from the search!! |
Maxim 23-Oct-2009 [14902] | hahahahha |
Graham 23-Oct-2009 [14903] | I pass ... |
Maxim 23-Oct-2009 [14904] | hum... that can take different meanings... hehe http://curecode.org/rebol3/ |
Graham 23-Oct-2009 [14905] | I don't wish to create an account ... |
Sunanda 23-Oct-2009 [14906] | Then you'll only ever see other people's bugs fixed :) |
older newer | first last |