News for hackers. Stuff that matters.
Re:Welcome to OpenGL by jokoon on Sunday June 21, 2015 @06:16AM (#9752854)
If only it was not awful javascript.

Also, I've come into many situations where webgl doesn't work in some particular situations, would it be a a combination of OS, webgl driver support or web browser.

I guess it should work and will as time passes, but as long as there is nothing else than javascript, I won't bother.

Re:Welcome to OpenGL by greggman on Sunday June 21, 2015 @09:08AM (#9753265)
As someone that's written C++ for 15 years and C for 30 I hated JS too. Now after several years of JS I can't stand C++. Things that I can do in 3 lines of JS take 100-300 in C++

Just one example: http://twgljs.org

Re:Welcome to OpenGL by kevingadd on Sunday June 21, 2015 @12:54PM (#9754051)
It's hard for me to think of a language that doesn't feel preferable to C++. C included. JS is still a really poor competitor in this space; almost everything I've used scores higher in my personal ranking - even VB6.
Re:Welcome to OpenGL by bla2 on Sunday June 21, 2015 @12:03PM (#9753890)
There are many languages that compile to JavaScript (TypeScript, Dart, CoffeeScript, ...). You don't have to use JavaScript.
Re:Welcome to OpenGL by jokoon on Sunday June 21, 2015 @01:55PM (#9754284)
They all end with script
Re:Welcome to OpenGL by TazeTSchnitzel on Sunday June 21, 2015 @09:53AM (#9753430)
> If only it was not awful javascript.

JavaScript, for all its flaws, is far less painful to use than C for this.

Re:Welcome to OpenGL by jokoon on Sunday June 21, 2015 @10:01AM (#9753463)
The javascript flaws make it painful enough for me.
Re:Welcome to OpenGL by TazeTSchnitzel on Sunday June 21, 2015 @10:34AM (#9753586)
Have you tried strict mode?
Re:Welcome to OpenGL by jokoon on Sunday June 21, 2015 @04:07PM (#9754796)
no, what is it ?
Re:Welcome to OpenGL by TazeTSchnitzel on Sunday June 21, 2015 @11:00PM (#9755938)
Re:Welcome to OpenGL by jokoon on Monday June 22, 2015 @09:07AM (#9757997)
Mmh it's not so good good because browser who don't support that mode won't execute js the same way, so it's breaking.

If there is a need to break compatibility, I think it's an opportunity to provide access to a standardized browser vm or a new language. If google or mozilla do and attract developers, it would be a nice thing: make it so it can attract users to use firefox, while making it open so that apple and google can implement it.

It could happen if it could be included inside mozilla nightly, but unless there is wide acceptance developers might not choose it, so it's an eternal chicken egg problem.

To me, there are sane alternative to js that are compatible with all platforms, only that it's very cumbersome. Js is just easy to deploy, but that's its only advantage. I don't think I should use a shitty language just because OS developers refuse to deliver and support better tools. I don't think I should give up all the existing C and C++ libs because they don't work anymore on android/iOS.

Re:Welcome to OpenGL by TazeTSchnitzel on Monday June 22, 2015 @10:16AM (#9758447)
> Mmh it's not so good good because browser who don't support that mode won't execute js the same way, so it's breaking.

There are some differences, yes. Writing code in the subset that works in both non-strict and strict modes is easy, however. And old browsers aren't a big problem.