r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!REBOL3-OLD1]

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
Steeve
6-May-2009
[14040]
don't have
BrianH
6-May-2009
[14041]
Has anyone tried to-binary of a vector! in alpha 51 yet? Don't knock 
it until you've tried it.
Steeve
6-May-2009
[14042]
anyway, i'm asking for fast natives convertion functions here, not 
for mezzanines, if so, i can do them myself
Rebolek
6-May-2009
[14043]
I've got error on to binary! vector. Also WHY? function tries to 
open non-existing page.
BrianH
6-May-2009
[14044]
Bolek, R3-alpha has been retired. Post the files elsewhere before 
the server for the world goes away.
Steeve
6-May-2009
[14045]
BrianH, yes it's the first thing i tried, it doesn't work
BrianH
6-May-2009
[14046]
Write it up :)