World: r3wp
[!REBOL3-OLD1]
older newer | first last |
Henrik 11-Apr-2006 [376] | well, it would also eliminate the performance advantage that ordinals apparently give |
Pekr 11-Apr-2006 [377] | then we need some flag to be settable for none? strict? none? blk/3 |
Graham 11-Apr-2006 [378x2] | Perhaps we need a way to configure the behaviour we want? |
if your data doesn't have none, then you can accept none for a range error. | |
Pekr 11-Apr-2006 [380] | I thought about it too :-) e.g. copy-by-default: true, etc. :-) |
Graham 11-Apr-2006 [381x2] | I suspect it was a mistake to allow an out of range to return none. |
Too late now though .. | |
Geomol 11-Apr-2006 [383x5] | Regarding pair and decimals; would it make sense to generalize pair further into a new vector datatype, that can be any dimension more than one? Examples: 2.4x8.0x5.5 would be a 3D vector with coords (2.4; 8.0; 5.5). Like the same idea with tuples, which can be 3 or more bytes separated by dots: 255.255.255, 255.255.255.255,... etc. |
Or should that be handles with user-defined datatypes? | |
*handled* | |
And going further, if we take the vector road, what about matrices? | |
Support for multi-dimensional vectors and matrices in rebcode might lead to something really interesting. ;-) | |
Graham 11-Apr-2006 [388x2] | I think it should be handled natively |
but it could get ugly quickly. | |
Geomol 11-Apr-2006 [390x3] | The alternative, doing vector- and matrix-math just using decimals, can easily be ever uglier. |
Imagine having a matrix! datatype: m: make matrix! 4x4 Then you could find the determinant like for example: m/determinant That would be a miracle! :-) | |
Suddently complicated math can be made very simple. | |
Henrik 11-Apr-2006 [393] | it would also be a miracle to be able to have a complex! datatype. I think electronic engineers would appreciate that |
Graham 11-Apr-2006 [394] | How to submit a suggestion to Carl? |
Pekr 11-Apr-2006 [395] | feedback or comment on blog? |
Henrik 11-Apr-2006 [396x3] | or rambo? |
geomol, I once had the idea that you could define ISO units as kind of datatypes and do scientific calculations on them | |
my calculator can do that, so why not have it in rebol? | |
Geomol 11-Apr-2006 [399] | Henrik, give an example! |
Graham 11-Apr-2006 [400] | Geomol, Rambo the suggestion for a vector datatype. |
Rebolek 11-Apr-2006 [401] | and what about interval computations? :) |
Graham 11-Apr-2006 [402] | Let's stick with 3 dimensions. |
Henrik 11-Apr-2006 [403x2] | well, I'm really not sure about the notation as I haven't given it too much thought, so I can't give a valid example, but if you could say: >> 6 / 2 == 3 >> 6 [m] / 2 [cm] == 300 [cm] |
this is no good, but some method to attach units to numbers and variables and make REBOL aware of them during calculations | |
Graham 11-Apr-2006 [405] | >> $5.00 / 20 == $0.25 |
Geomol 11-Apr-2006 [406] | Henrik, ah ok. Yes, good idea! |
Graham 11-Apr-2006 [407] | so we can do mixed imperial and si calculations ?? |
Geomol 11-Apr-2006 [408] | Something like: ISOm6 / ISOcm2 |
Henrik 11-Apr-2006 [409x3] | sure, my HP48 can do that easily |
as long there is some definable way to convert between them or make some sense from it | |
the acceleration of gravity would be 9.82 [m/s/s] so units themselves are math expressions | |
PeterWood 11-Apr-2006 [412] | It that something for a dialect rather then to be inlcuded in the core langauge? |
Henrik 11-Apr-2006 [413] | peterwood, quite possibly |
Graham 11-Apr-2006 [414x2] | we already have money datatypes |
why not ones for mensuration | |
Henrik 11-Apr-2006 [416] | I think it's worth making a concept dialect for scientific math with units |
Geomol 11-Apr-2006 [417] | Hmm, funny idea. To add 6 meters and 2 UK foot: SIm6 + UKfoot2 Looks weird. :-) |
Henrik 11-Apr-2006 [418] | actually, it would be good to make a ctx-unit to handle units exactly like the hp48 does |
Graham 11-Apr-2006 [419] | I often have to calculate BMIs .. and most people know their height in feet and inches, but their weight in kgs :( |
Henrik 11-Apr-2006 [420x3] | the hp48 uses an underscore to attach the number to a unit: 6_m / 23_cm |
http://www.apple.com/downloads/macosx/math_science/eurekalc.html <-- I think that could be done with a dialect... | |
so many things to do! | |
Graham 11-Apr-2006 [423] | that calculator needs a spell checker as well! |
Henrik 11-Apr-2006 [424] | well, kintetic energy is that new thing, you know... |
Geomol 11-Apr-2006 [425] | Graham, I've made a RAMBO proposal for vector and matrix. |
older newer | first last |