World: r3wp
[!REBOL3-OLD1]
older newer | first last |
BrianH 6-May-2009 [13990] | Henrik, I'd be happy if the wiki were updated with the alpha 51 semantics, but if you want to aim higher, go ahead :) |
Steeve 6-May-2009 [13991] | But we could have some vector maths innside Rebol too ie. V + 15, could add 15 to all the cells inside a vector. Currently math operations are not allowed with vectors... why ? |
Henrik 6-May-2009 [13992] | BrianH, I can't aim at all. I've never worked with vectors before, which is why I asked. If there was a small practical example, say for loading an AIFF file into a vector! array, Carl could mention it in his blog. |
BrianH 6-May-2009 [13993] | Why not math? Because all of the alpha 51 changes were implemented in one night (afaIct), and because noone has suggested it yet. |
Steeve 6-May-2009 [13994x2] | i don't ask for matrix operations currently (like adding or multiplying 2 vectors). I just wonder why simple tricks like adding or multiplyings all the cells with a scalar is not allowed |
ok, then i ask for it | |
BrianH 6-May-2009 [13996] | You'll have to wait for multiple-dimension vectors before we do matrix operations :) |
Steeve 6-May-2009 [13997] | add/skip or multiply/skip not enough ? Lol |
BrianH 6-May-2009 [13998] | And asking for it here doesn't help. Put in a CureCode ticket with proposed semantics (equivalent REBOL code is fine). |
Steeve 6-May-2009 [13999x3] | You know me,i'm bas with your language (even if we |
*bad | |
i know more or less 30% of the English words come from the Frensh (thanks to the Normands) but it doesn't help me | |
BrianH 6-May-2009 [14002] | Well, I don't have the time to write CureCode tickets :( |
Steeve 6-May-2009 [14003] | so i keep the tuples to do vector operations. 1.2.3 * 5 = 5.10.15 but it's quite limited |
Henrik 6-May-2009 [14004] | is it appropriate to specify which part you want to perform the operation on? |
Steeve 6-May-2009 [14005] | like what ? |
BrianH 6-May-2009 [14006] | Can you do scalar math with vectors with the restriction that the vector is only on the left side of the equation? Does the math work? |
Steeve 6-May-2009 [14007] | i don't see your point guys |
Henrik 6-May-2009 [14008] | Forget what I said. :-) |
BrianH 6-May-2009 [14009] | My point is that it is much more likely to get implemented as an action!, and actions dispatch based on the type of their first argument. |
Steeve 6-May-2009 [14010] | sometimes i use a second tuple using it as a mask: 1.2.3 * 5 * 1.0.1 = 5.0.15 |
BrianH 6-May-2009 [14011x2] | Double dispatch could do the work in most cases, I suppose. |
Can that be expressed as 1.2.3 * 1.0.1 * 5? | |
Steeve 6-May-2009 [14013x2] | yep |
it works too, in any direction | |
BrianH 6-May-2009 [14015x2] | That's what I mean. It's an implementation detail, but it could be the difference between having this feature and not having it. We'll see. |
Basic math operations are polymorphic, but dispatch based on the type of the first argument. | |
Rebolek 6-May-2009 [14017] | I didn't know about +/- to word change. Thanks. |
Steeve 6-May-2009 [14018] | if vectors could work that way. Less the limit of 0-255 range Less the limit of no negative values in a tuple |
Rebolek 6-May-2009 [14019x2] | Henrik in fact there are small practical examples, say for loading AIFF file into a vector! array, see files area in R3-alpha world. |
They're for some older alpha though, I have to rewrite them. | |
BrianH 6-May-2009 [14021] | Bolek, it's mentioned in a comment in the CureCode ticket which thought '- referred to unsigned (probably the motivation for the change). It's otherwise undocumented as of yet. |
Rebolek 6-May-2009 [14022] | Why not math? ...noone has suggested it yet. Not true also. |
Steeve 6-May-2009 [14023] | vectors with scalar maths operations would allow super fast modifications in images. For example: gama corrections or quantization without the need to use loops |
BrianH 6-May-2009 [14024] | If it's not in a CureCode ticket, the sggestion doesn't count. |
Steeve 6-May-2009 [14025] | i know most of this tricks can be performes with the effect or draw dialect, but sometimes we need more accurate operations |
BrianH 6-May-2009 [14026] | Steeve, the basic math operations generate new values, they don't modify in place. This cold cause a lot of memory overhead. Modifying operations might be better to do as functions, perhaps even native functions loaded in plugins. |
Rebolek 6-May-2009 [14027x2] | I must admit I haven't used CureCode for about 3 months I think. And my vector! document on R3-alpha precedes CureCore for about a year. Because no one but me payed attention to vectors for so long I never cared about rewritting those requests to CureCode. |
But it's nice to see some progress in this area, I'd like to experiment with vectors bit more and post some new tickets to CureCode :) | |
BrianH 6-May-2009 [14029] | Most of the vector! bug tickets fixed in alpha 51 were migrated from the R3-Alpha tracker. |
Pekr 6-May-2009 [14030] | Steve - how could vector help to speed operations on images, if image is separate datatype? |
Rebolek 6-May-2009 [14031x2] | Yes, I know those bugs very well ;) |
I like how vector is molded now. No need for my vector-format function now. | |
Pekr 6-May-2009 [14033] | Steve - isn't convolution (where you set matrix too) enough for image manipulation type you mention? |
Steeve 6-May-2009 [14034x2] | That's the point Pekr, If we can't convert vectors to binaries (and the reverse) it's useless |
image/rgb returns a binary serie | |
BrianH 6-May-2009 [14036] | Bolek, there is one bug in how vectors are molded (#756), but otherwise it's nice :) |
Rebolek 6-May-2009 [14037] | Steeve I wrote some conversion functions for vector<->binary, if you've got access to R3-alpha, you can find it there. |
Steeve 6-May-2009 [14038] | you mean the Altme world ? |
Rebolek 6-May-2009 [14039] | yes |
older newer | first last |