World: r3wp
[Core] Discuss core issues
older newer | first last |
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 :) |
Graham 23-Oct-2009 [14907] | I'm not using R3 at present |
Maxim 23-Oct-2009 [14908x3] | I'm creating a ticket... I also found a rebol crash! (even in A92) >> d: now >> d/6: 5 >> print d **CRASH** |
curecode is also for wishes... so if you want R3 to be what you want it to, you have to speak... and curecode is that place... many blog posts where originated from good curecode reports/suggestions. | |
ticket 1292 | |
Henrik 23-Oct-2009 [14911x3] | Actually some bugs are fixed the same day as they are posted. |
The entire date handling system in R3 was rewritten a while ago, AFAIK. | |
And I have had one date related issue fixed. | |
Maxim 23-Oct-2009 [14914] | (going to R3) |
Gabriele 23-Oct-2009 [14915] | Graham, the explanation is that dates are not really mutable (or more precisely, are always passed by value and not reference). the date/anything: is a hack. (I sometimes think that, no matter how useful they are, those hacks only hurt a language in the end...) |
Graham 23-Oct-2009 [14916x2] | That makes sense. |
But pragmatism usually outweighs purity in the real world :) | |
Henrik 23-Oct-2009 [14918x2] | how about: to-object now = make object! [ year: 2009 month: 10 etc... ] |
I'm going to write it up as a wish to be implemented after the crash is fixed :-) | |
Geomol 23-Oct-2009 [14920x2] | REDUCE can be used to reduce blocks, and by that evaluate parens within blocks: >> reduce [(1 + 2)] == [3] But REDUCE won't evaluate parens themselves: >> reduce first [(1 + 2)] == (1 + 2) Is that a bug? (Same in R3.) |
I also find this a bit strange: >> do first [(1 + 2)] == 3 >> do to paren! "1 + 2" ** Script Error: + word has no context ** Near: 1 + 2 | |
Steeve 23-Oct-2009 [14922] | I see no bugs. REDUCE, acts on blocks, nothing else. TO-PAREN and TO-BLOCK on strings, act like LOAD, but don't bound the result in any context. Both of them have well known behavior. It's perhaps a lack of good documentation but no bugs. |
older newer | first last |