Angry at vertex, shaders and floats


Sure, that’s why AIR, because you’ve to create 100 vertex and shader buffers mutually and send them to render queue back when developing a 3D model editor in Stage3D! E.g., you’re sticking a sphere or using pen points and it suddenly creates 100+ buffer objects at few times.

But not web, because you don’t have to create 100 vertex and shader buffers mutually and send them to a render queue back when developing a 3D model editor in WebGL! E.g., you’re sticking a sphere or using pen points and it regularly immediately renders the re-structured sphere and pen points.


Tl; dr.

AIR = slow
Web = nearly fast (inclusively supports floats thanks to WASM)

**admin:** **you have hijacked a post with your own personal rants** **so we moved all that into its own post**

Why Adobe AIR ? Let me tell you why

you kind of missed the point L.O.L

you have your head so much up your ass narrow focused on your own problems
that you’re thinking that everyone else have the very same problems

you have to create 100s of vertex and shaders
not me
not 100s of other devs

not everyone is doing what you do
not all app have to deal with 3D and vertex and shaders



you have to create 100s of vertex and shaders
not me
not 100s of other devs

Exactly. I’ve to create 100s of vertex and shaders because AIR’s API isn’t enough to render/output pixels to GPU immediately when you have to do dynamic and efficient 3D manipulations, re-scalling and so on. The unique way to do it is by sending new buffer objects. Object is memory consumpting, and it’s always stored in heap by the dumb AVM2’s interpreter.

This scripting newbie doesn’t even understand the simple ES3 scope chain concept and doesn’t understand why eval works differently than your RedTamarin’s Runtime.eval(). You simply don’t read what I write. You start to think I’m a beginner when writting English, which isn’t my primary language, but truly I’m someone who easily learned ECMA-standardized programming/scripting in 3.5 years.

You’re afraid of the new things going on. Doesn’t even understand Rust.

@zwetan You didn’t read the e.g.: when parts of my earlier post.

Wow… This person is disappointing. Goodbye, I’m coming to rustup and wasm.


please pull off the head out of your ass for 2 seconds

you’re talking about very specific 3D thing when Adobe AIR is a general platform to build many type of things

again, not everyone need to build stuff in 3D, your anger towards AIR and AVM2 is wayyyyy out of place

Now I would say, if some people were able to use CrossBridge to run Epic Citadel in Flash

the tech has enough oomph to be able to do that, but yeah if you want perf you gonna have to get your hands dirty with C++

hey look kiddo if you need to blow off some steam why don’t you go out a little?

I understand that you may be quite frustrated about some stuff but this is not a place to express your anger willy-nilly based on absolutely nothing.

I just said you do 3D and not everyone is doing that.

How is that related to anything in this post?
Where did I mention Rust anywhere here?


@zwetan @hydroper-v3

It reminds me of the quote:

There are 2 types of programming languages: language that nobody is using, and language that people always complaining about



Well this one must be proved via benchmark for fair.


It’s not due to people I use a language, but due to the language implementation. ZzZzZzZzZzZzZzZz.


Keep complaining, you are likely an asshole chasing perfection in this imperfect programming world :stuck_out_tongue:

You better create your own programming language then.


It is a very long debate and honestly there is no ultimate good answer that can reveal the truth,
simply because it is different for everyone and other differences of interaction with people and languages etc.

So I just gonna write a little tidbits of personal opinion and point at few examples.

For each developers you gonna see a curve with high and low,
based on age and maturity, center of interests and experience, number of projects under his/her belt,
position and/or job title (junior, senior, lead, etc.), amount of people working
on those projects (solo, small indie teams 4-8 , medium teams 10-30 , big teams 50+),
type of projects, type of companies, and a lot of other closely or loosely connected parameters.

Maybe something like that

or something like this

Very rarely you will see two developers having the exact very same experience.

But eventually, with time, the more a developer keep at it, thoses experiences
should teach him/her that the more he/she develop stuff the less he/she knows about stuff.

That’s the very nature of programming, you can not know it all, not in your lifetime,
not even over 10 lifetime, it just never stops as there is always something new to learn.

So yeah you can play the blame game: it’s not my fault it is the programming language fault
because X or Y, it is the vendor fault because other stuff, it is the team fault because this or that,
it’s the computer and/or server fault because it’s too slow to compile that or to run this,
or any other kind of scape goat.

Some developers at some stage in their programing life will find themselves very confident
and super smart on how they solve problem.

Look at Donald Knuth’s lifework about The Art of Computer Programming,
everyone agree that it is brilliant work but nobody really read it, and Knuth will probably not have enough time to finish everything.

Personally I don’t care how anyone think how smart they are about programming

there is always someone standing on a higher mountain than you and that will be able to point out how stupid your code is, how inefficient your algorithms are, how inexperienced and dumb your solutions are, etc.

But that does not really matters, I mostly say this for the programmers (often guys) who just like to “compare the size of their dick”.

Some will even be quite arrogant about it, that’s the syndrome of “I’m doing that shit for few years now, and I think I know everything”, but eventually then they hit a wall, something so big that even their preferred framework or programming language can not solve for them, something like a bug that keep resisting them and make them realise that finally, maybe …, just maybe …, they don’t know everything.

Once you acquire a certain maturity, you will just accept that there is nothing perfect.

I don’t quite know how to put this, but
our entire field is bad at what we do,
and if you rely on us, everyone will die.

It’s funny because it’s true :smile:

There is nothing that works, everything is broken, it is how it is.

You can blame nothing, there is no escape or excuses, there are just little pros and cons.

Maybe something work better for you in your particular situation, maybe you had bad experiences in the past with something else, maybe you just “gave up” and want to copy what others are doing because it seems to work for them.

There is no good answer.

Whatever programming language, platform or ecosystem you are choosing for yourself,
there is always gonna be someone else to criticise it at great length.

See this little story about functional programmers being arrogant.

Programming language bashing is part of our larger community of developers, you use N then someone using X will bash N, or all those stories about “why I moved from Y to X”, “how we rewrite our app in N and got a much better app than with X”, “from A to B and then back to A because B is shit”, etc.

See also All your Programming language sucks and Your Programming language sucks.

So when I answered someone missed the point, let me be clearer

maybe for you, not for me, not for my specific apps, not for my specific situation
in my case AIR is pretty damn fast, but that’s just me

who cares? not me
I mean that’s where you missed the point
the whole post is about how AIR is a damn good tech to publish cross-platform on desktop and mobile

I could not care less about publishing on the web
so whatever the web is nearly as fast because of WASM or whatever
OK, good for you, useless for me

Simply put, you’re telling me my language sucks
and I’m telling you: no, your language sucks

and we are both right, or both wrong

We are certainly not developers that are sharing the same experience,
and we are certainly not building the same kind of applications


@ZacharyIndy @zwetan

I’m NOT comparing scripting or programming languages, but comparing language implementations.

When I said float in WASM case I meant Adobe could have thought of mostly using float (f32) types within Stage3D’s X/Y/Z coordinates and etc. in API. A double (Number, f64) consumes the double memory of a float. -.-

Float64 is faster in x64 archs, but Float32 is guaranteed to be smaller in bytes.


You do have access to Float32 and Float64 using fast-memory opcodes

Also, Adobe did plan to enable 2 new native types float and float4

    <desc> Enables the types 'float' and 'float4' in the VM. </desc>
    <name> AVMFEATURE_FLOAT  </name>
    <requires> AVMFEATURE_SWF16 </requires>
    <defines> VMCFG_FLOAT  </defines>
    <defines> VMCFG_GENERIC_FLOAT4 </defines>
    <build-flags type="boolean"> -config CONFIG::VMCFG_FLOAT </build-flags>
    <build-flags type="onoff"> -abcfuture </build-flags>
    <precludes> AVMFEATURE_AOT </precludes> <!-- AOT + float doesn't work yet -->

My guess is they didn’t released publicly because either fast-memory opcodes or CrossBridge or ANE
were giving better results, or maybe they were afraid to create incompatibilities and/or confuse dev

anyway, having or not having a type float in the language does not make a big difference

and that does not really matters

what’s your point ?


Again, you didn’t understand what I said. I said that the Stage3D API is mostly composed of Numbers (f64 values). No matter what, these Numbers will consume more memory within the API. E.g., vertex buffers use Number x/y/z coordinates and you send them to the GPU the way they’re are. Each of these Numbers will certainly not be stored as 32 bits in the memory (as for a float planned type), but as 64 bits.

So, after all, I didn’t talk about languages, but the API and implementation.

what’s your point ?

My point was to explain why we choose Adobe AIR.


Here what I understand

  • renaming the topic to “Vagina scaled up to x1.000”
  • editing an admin comment to “me, donkey called, ‘zwetan’, separated this post and fucked a bit on with my penninsula”
  • and the previous highjacking of the topic with your own personal rants,
    which is why all this was moved to its own thread

got you blocked, eg. you can’t post or start topics.

Now for what you don’t understand

you’re confusing everything

the Number type do not use more memory because of the underlying 64-bit system

see for yourself with getSize() in the flash.sampler package
eg. public function getSize(o:*):Number

Returns the size in memory of a specified object when used with the Flash Player or later debugger version. If used with a Flash Player that is not the debugger version, this method returns 0.

see How Big Is That Class?
where you will see how much bytes each types take

spoiler alert the Number type takes 8 bytes in memory wether the system is 32-bit or 64-bit

again, you’re confusing stuff

check the SWF file format spec, read about Basic Data Types

then go check the doc about Number and understand that

The Number data type adheres to the double-precision IEEE-754 standard.

and then keep reading about IEEE Standard for Floating-Point Arithmetic (IEEE 754)
in particular the Double-precision floating-point format (binary64)

and if you’re really courageous read some more about Decimal Arithmetic Encodings

now continue reading the AS3 doc for Number which indicates

The Number data type is useful when you need to use floating-point values. Flash runtimes handle int and uint data types more efficiently than Number, but Number is useful in situations where the range of values required exceeds the valid range of the int and uint data types. The Number class can be used to represent integer values well beyond the valid range of the int and uint data types. The Number data type can use up to 53 bits to represent integer values, compared to the 32 bits available to int and uint. The default value of a variable typed as Number is NaN (Not a Number).

It does not matters if your system is 32-bit or 64-bit, because the type Number implementation follow the IEEE 754 standard which define a Basic and interchange formats

when it comes to binary64 or Double-precision floating-point format

Double-precision binary floating-point is a commonly used format on PCs, due to its wider range over single-precision floating point, in spite of its performance and bandwidth cost. As with single-precision floating-point format, it lacks precision on integer numbers when compared with an integer format of the same size. It is commonly known simply as double. The IEEE 754 standard specifies a binary64 as having:

  • Sign bit: 1 bit
  • Exponent: 11 bits
  • Significand precision: 53 bits (52 explicitly stored)


The format is written with the significand having an implicit integer bit of value 1 (except for special data, see the exponent encoding below). With the 52 bits of the fraction significand appearing in the memory format, the total precision is therefore 53 bits (approximately 16 decimal digits, 53 log10(2) ≈ 15.955). The bits are laid out as follows:

that’s 64 bits of data that are encoded in 8 bytes

see what I mentioned earlier with getSize()

spoiler alert the Number type takes 8 bytes in memory wether the system is 32-bit or 64-bit

and here the funny part, it is implemented like that because JavaScript was designed like that
eg. JavaScript stores numbers in double-precision 64-bit binary format IEEE 754.

Complaining about bouhouhou Stage3D X/Y/Z are stored with the Number types so it take 24 bytes of memory (3x 8 bytes) is useless really.


[quote]you’re confusing everything
the Number type do not use more memory because of the underlying 64-bit system
see for yourself with getSize() in the flash.sampler package
eg. public function getSize(o:*):Number

Creature, I didn’t say Number uses more memory due to the target platform/arch, but due to being 64-bits. I didn’t say Number is an object, I already know it’s immutable, a struct-like thing which only contains a floating-point, a primitive type. I know Number is a double-precision floating-pointing number.

I know Number is a class exposed in the unnamed package and blah and blah. I know AS3. Since English isn’t my primary language, people tend to judge me.

The rest of what your reply is saying is all bullshit for me, since I’ve already read about f32 and f64 in Wikipédia.

Complaining about bouhouhou Stage3D X/Y/Z are stored with the Number types so it take 24 bytes of memory (3x 8 bytes) is useless really.

Float32 takes less memory and is just a bit slower. Float64 takes more and is faster. And OpenGL uses Float32s in API, what means Float64 has to be cast to Float32. Don’t know if they do it at compile-time specially, too, but know the semantically default is the run-time.


You do realise I never, even once, mentioned your English language skills.

do tell me how do you plan to achieve double precision over 32bit of data?
really I’m curious

oh I do think I already answered that

you are here complaining and ranting about your own little problem, you are very narrow focused

I already told you that not everyone need to do what you do, not everyone build the same kind of app as you, but that’s going way above your head, you don’t register that at all.

The only way where I could see using Float32/Float64 instead of Number (Double) as a big improvement would be if you’re doing 3D (a game for example) and you publish on mobile on ARM CPU, all the other case it does not matters.

I remember I also said that nothing works and everything is broken, oh let me be even clearer.

As a developer, it is your fucking job to solve the problems, complaining about this or that, about how “they should have implemented Stage 3D X/Y/Z with Float because …”, is utterly useless and a huge waste of time.

There is always a way to cheat, to optimise, to fit data into the constraints etc.
that’s the job, that’s why programming is hard in some case

You are focusing on stupid shit instead of writing code and solving problems.

Here a bit of reading Float or double?

Why not always store everything with double?
If you have plenty of RAM and neither execution speed nor battery drainage is an issue then you can stop reading now and just use double. Good bye and have a nice day!

I’m personally done with the subject.

closed #17

archived #18