News for hackers. Stuff that matters.
Re:Ion: Cross-platform OpenGL library from Google by pierrec on Tuesday February 09, 2016 @09:50PM (#11070452)
Neat. This and Oryol [1] appear to have similar goals, I think this already calls for a more in-depth comparison... Either way, this kind of technology could end up being a better choice than the node-webkit / electron paradigm, for many projects that want to target in-browser and native platforms.

I've been planning a project like that using raw GL, but with these frameworks popping up, the concept might go from experimental to very robust.

The native version is inherently lightweight and the emscripten/browser version could also be very lightweight and efficient, depending on how much attention they pay to that target while developing the framework. Looking forward to see how this plays out.

[1]: http://floooh.github.io/oryol/

Re:Ion: Cross-platform OpenGL library from Google by ricardobeat on Wednesday February 10, 2016 @03:40PM (#11075804)
The main advantages of electron are html, css and javascript. This is not going to be an alternative to it unless you implement a browser engine on top of it, going full circle...

On the other hand, something like react-native for desktop, coupled with a nice GUI library, could be very interesting.

Re:Ion: Cross-platform OpenGL library from Google by pierrec on Wednesday February 10, 2016 @09:51PM (#11077940)
Sure, this will never be a 100% alternative to electron. People who derive pleasure from writing HTML, Javascript, and CSS whenever possible will never stray from that kind of framework. As you say, some also choose these frameworks because of the extensive browser API features. However, some people who don't particularly appreciate these languages and API still use electron because it allows them to target browser and native with a single code base. This is where things might change.

The sad fact is that most electron applications only use a small fraction of the massive featureset provided by a full browser, and whenever a tiny GUI application gets forcibly bundled with 70+MB of browser runtime, a cute fluffy animal dies. I think this new kind of framework has the potential to save some cute fluffy animals in the long term, though certainly not all of them.

Re:Ion: Cross-platform OpenGL library from Google by num3ric on Tuesday February 09, 2016 @08:57PM (#11070281)
I get "ERROR: gyp returned non-zero" while building. Missing dependencies? (Win10.)
Re:Ion: Cross-platform OpenGL library from Google by tylocook on Wednesday February 10, 2016 @01:51AM (#11071143)
I get the same error. Earlier in the error message it says generate_ninja_environment.gyp not found

It does not appear to be in the file system.

Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Wednesday February 10, 2016 @02:07AM (#11071191)
Looks quite nice.

Since it is also from Google, even though not officially, maybe the Android NDK team could learn a few things about C++ code quality.

Ion's code looks so much nicer than any these APIs

https://developer.android.com/ndk/reference/index.html

Re:Ion: Cross-platform OpenGL library from Google by james4k on Wednesday February 10, 2016 @03:54AM (#11071487)
The NDK for me is an island of sanity when it comes to dealing with mobile SDKs.
Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Wednesday February 10, 2016 @04:00AM (#11071508)
Not when compared to tooling offered by iOS and WP SDKs for C++ developers.
Re:Ion: Cross-platform OpenGL library from Google by RamshackleJ on Tuesday February 09, 2016 @07:57PM (#11070067)
Uhh so how do I use this? the readme makes it sound great but doesn't really give me any instructions
Re:Ion: Cross-platform OpenGL library from Google by voltagex_ on Tuesday February 09, 2016 @08:21PM (#11070162)
Re:Ion: Cross-platform OpenGL library from Google by axefrog on Tuesday February 09, 2016 @08:00PM (#11070081)
Looks pretty good, but would like to see more than just a features list. Some documentation? An issues list? A way to discuss the project with the developers and other users? (e.g. via Gitter or a Google Group)
Re:Ion: Cross-platform OpenGL library from Google by z3t4 on Wednesday February 10, 2016 @03:26AM (#11071396)
This might be what I need, but it needs guides and tutorials ... Basically what I'm looking for is a thin client that can render a canvas, or image, and get keyboard/mouse inputs. And if possible use the HTML Canvas API, and run JavaScript. Basically something like nw.js or Electron, but with only a canvas. With cross platform support.
Re:Ion: Cross-platform OpenGL library from Google by giancarlostoro on Tuesday February 09, 2016 @07:30PM (#11069968)
It would be nice to see screenshots at some point, other than that, maybe incorporate any / all requirements for building the project if any.
Re:Ion: Cross-platform OpenGL library from Google by aledalgrande on Wednesday February 10, 2016 @09:54PM (#11077949)
Wish there was something cross-platform like this, but with the syntax, tooling, performance and compute shaders of Metal.
Re:Ion: Cross-platform OpenGL library from Google by kengonakajima on Wednesday February 10, 2016 @04:22AM (#11071570)
Build fails in Yosemite inside zlib. I forked it and trying to fix it.. Anyone did?
Re:Ion: Cross-platform OpenGL library from Google by joeld42 on Friday February 12, 2016 @02:03AM (#11085724)
I don't really understand their build system so not sure how to fix this cleanly but I added:

#define NOCRYPT (1) #define NOUNCRYPT (1) at the top of ./third_party/zlib/src/contrib/minizip/zip.c and unzip.c

And that got past the zlib errors on yosemite and built some of the demos (I will post some screenshots on twitter @joeld42, but it's just boxes and stuff). However, there was a linker error later with some json parser (maybe it was in the tests? I can't even tell) that I didn't figure out yet.

I also had to install "ninja" because apparently it needs like six different build systems.

The "ios" targets build... but I don't know what to do with them. I ended up with a directory full of .app files. Maybe zip them and rename them ipa?

Anyways, it looks like there's some cool stuff in there but there's a ton of dependencies and it doesn't really feel "lightweight". I'll definitely keep an eye on this one but it really could use more documentation for people not familiar with google's ecosystem.

Re:Ion: Cross-platform OpenGL library from Google by mrpippy on Tuesday February 09, 2016 @07:40PM (#11070007)
Putting the project name/author in the title would probably draw more attention (i.e. "Google's Ion: cross-platform C++ OpenGL application framework")
Re:Ion: Cross-platform OpenGL library from Google by ZenPsycho on Tuesday February 09, 2016 @08:11PM (#11070127)
"not an official google product"
Re:Ion: Cross-platform OpenGL library from Google by robotresearcher on Tuesday February 09, 2016 @09:29PM (#11070384)
"Used by many teams across Google, running on billions of devices through multiple Google products"
Re:Ion: Cross-platform OpenGL library from Google by ZenPsycho on Tuesday February 09, 2016 @10:51PM (#11070644)
still not appropriate to refer to it as "Google Ion" or even "Google's Ion"
Re:Ion: Cross-platform OpenGL library from Google by microcolonel on Tuesday February 09, 2016 @11:09PM (#11070709)
"Copyright 2016 Google Inc. All Rights Reserved." Is in all of the files. It's hardly imprudent to call it Google's.

If it's not Google's, it's nobody's.

Could go for "Google publishes Ion, a cross-platform OpenGL abstraction."

Re:Ion: Cross-platform OpenGL library from Google by ZenPsycho on Tuesday February 09, 2016 @11:16PM (#11070733)
There is a subtle and nuanced difference between simply owning the IP for something, and endorsing it as an officially supported product.
Re:Ion: Cross-platform OpenGL library from Google by robotresearcher on Tuesday February 09, 2016 @11:24PM (#11070755)
That's right. But 'Google's' covers both cases. Evidence:

case a: Bernie Sanders' socks.

case b: Bernie Sanders' campaign promises.

You weren't confused by the nuanced difference in ownership and endorsement, but you learned more about the socks - and may be more interested in them - than if the name was omitted.

Re:Ion: Cross-platform OpenGL library from Google by mpweiher on Wednesday February 10, 2016 @06:03AM (#11071886)
Dunno, these two seem different to me:

"Google Ion" -- officially endorsed project

"Google's Ion" -- something owned/done by Google

Re:Ion: Cross-platform OpenGL library from Google by ilaksh on Wednesday February 10, 2016 @12:21AM (#11070900)
This illustrates one of the serious issues with C++: numerous code files in a project authored relatively recently that are dedicated to basic application plumbing such as memory allocation/tracking and concurrency.

Its 2016. There are a number of performant cross-platform systems/languages that have good built-in facilities for these basic plumbing problems.

C++ is an outdated language, and the entire mindset and ecosystem is wasteful and constantly reinventing the wheel. C++ was still sort of relevant when I was playing with it in High School in 1994, but even then it was dated in most ways.

These are some very poor software engineering choices.

Educate yourselves about the Nim programming language.

Re:Ion: Cross-platform OpenGL library from Google by pcwalton on Wednesday February 10, 2016 @12:38AM (#11070950)
I'm not exactly a fan of C++, but this isn't fair. What you're describing is more of a problem with this project's coding style than the language. Most of https://github.com/google/ion/tree/master/ion/base is covered either by the STL or Boost; most of what the C++ committee has been doing lately consists of trying to encourage people to not do what this project is doing (by improving the breadth of the standard library).
Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Wednesday February 10, 2016 @03:40AM (#11071440)
I have seen the C sub-community of C++ obsessed with things like what makes the compiler generate more optimized code, i++ or i = i + 1.

This goes for every code line that one writes, most of the time backed up by urban legends and popular beliefs instead of profiling the code.

Whereas other programming languages cultures, tend have a more meaningful approach to optimizing software.

Re:Ion: Cross-platform OpenGL library from Google by autoreleasepool on Wednesday February 10, 2016 @05:16PM (#11076552)
I know a guy who works at an airline company. He's porting all the C++ and assembly code to 64 bit architecture. He genuinely did not know C++ was a seperate language from C.

To be fair, he shamelessly bragged about getting the job through nepotism.

Re:Ion: Cross-platform OpenGL library from Google by ilaksh on Wednesday February 10, 2016 @01:54AM (#11071150)
Should be covered by core aspects of the language, and like you said its most. Its 2016, the standard library and language should handle concurrency and memory allocation which all programs have to do.
Re:Ion: Cross-platform OpenGL library from Google by pcwalton on Wednesday February 10, 2016 @02:05AM (#11071186)
It is completely legitimate to have important features in the standard library as opposed to baked into the language itself.
Re:Ion: Cross-platform OpenGL library from Google by fsloth on Wednesday February 10, 2016 @12:57AM (#11071002)
"one of the serious issues with C++: numerous code files in a project authored relatively recently that are dedicated to basic application plumbing such as memory allocation/tracking and concurrency."

For some applications, manually tending to the basic plumbing is a necessity and not a burden. I.e high performance applications tend to be memory bouns.

I agree that C++ is not a right tool for every job and that as a language it has issues. But those issues are not about verbosity nor about manual memory management - the latter is rather a feature.

Re:Ion: Cross-platform OpenGL library from Google by ilaksh on Wednesday February 10, 2016 @01:55AM (#11071152)
After decades we should have good performant ways to do those things by now, without these guys having to reinvent it.
Re:Ion: Cross-platform OpenGL library from Google by fsloth on Wednesday February 10, 2016 @02:51AM (#11071306)
I suppose one would need a theory encompassing most of high performance applications to achieve that.

Also, that library seems to run on a quite large subset of common platforms. I don't think there is a high level language with as painless integration to as many platforms as C++ does.

The thing with multiple platform support is that it's a really dirty realworld-bound problem. That is, no matter what one does, there will be incompatibilities and unexpected bugs. The best anyone can do, is to pick a platform with as wide userbase on the platforms one wants to support and use that if one wants to minimize headache caused by problems between third party components.

There is no joy in high level abstractions if the execution stalls on implementation related bugs.

Re:Ion: Cross-platform OpenGL library from Google by autoreleasepool on Wednesday February 10, 2016 @05:12PM (#11076514)
> Educate yourselves about the nim programming language

It's hilarious that nobody recognizes blatant trolling on HN

Re:Ion: Cross-platform OpenGL library from Google by imron on Wednesday February 10, 2016 @12:56AM (#11070998)
To provide performance improvements that you don't get using the built in facilities.

You don't have to write these things yourself, but if you're trying to eke out every last drop of performance (either at runtime or build time) then you have the option to do so.

Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Wednesday February 10, 2016 @03:37AM (#11071425)
Many times it is to get the performance improvements you think you should need, but actually never will.

Having been coding since the days of Assembly being a normal language for business applications, I never seen a programming community so obsessed with micro-optimizations per code line, (without using profilers, because programmer knows best), like the C one.

And by correlation the C sub-communities from C++ and Objective-C ones.

Other communities think first into getting their data-structures and algorithms right, use the profiler and then optimize.

Re:Ion: Cross-platform OpenGL library from Google by imron on Thursday February 11, 2016 @03:28AM (#11078956)
I agree that micro-optimization obsession is a problem in the C++ community, but sometimes it is useful and then it's nice to have the option.

Personally, I have my own custom hashmap which provides a 10%-15% performance improvement over the std one for my use case, and I also have custom mutex/thread code similar to the one listed in this library because it provides better performance when no other thread has the lock, and avoids needing to compile/link against the boost equivalent which adds seconds of compile time to any file that includes it.

These are all optimisations that I have tested and profiled though.

Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Thursday February 11, 2016 @03:56AM (#11079046)
Which is all fine if you are coding for scenarios where every ms counts like you say.

The problem I see is when doing applications where doing the work in 100ms or 1s doesn't matter at all.

Yet one will be discussing about bounds checking impact, if i++ or i = i + 1 generate the same code and many other micro-optimizations.

For the type of work I do, I always embraced the STL and never though a second about those issues, yet I was able to fulfill the expectations.

Re:Ion: Cross-platform OpenGL library from Google by ilaksh on Wednesday February 10, 2016 @01:53AM (#11071146)
Half of C or C++ projects have code for these types of plumbing. That's a lot of re-implementation on behalf of 'eking out performance'.
Re:Ion: Cross-platform OpenGL library from Google by doboo on Wednesday February 10, 2016 @11:48AM (#11074013)
Nim is really the way to go, I don't understand why people still spend time learning slow languages with poor engineering design and concepts. Just learn NIM!

I has been written with so solving so many concepts everyone is trying to solve, but don't solve at ALL.

Just open your eyes the solution is right under your nose.

Re:Ion: Cross-platform OpenGL library from Google by JoeAltmaier on Wednesday February 10, 2016 @12:31AM (#11070927)
Curious notion. C++ has perhaps the richest library set in the world.
Re:Ion: Cross-platform OpenGL library from Google by alblue on Wednesday February 10, 2016 @03:13AM (#11071365)
Only if you've never seen libraries for other languages: there are an order of magnitude more for the JVM or JavaScript, to name two.
Re:Ion: Cross-platform OpenGL library from Google by JoeAltmaier on Wednesday February 10, 2016 @10:39AM (#11073416)
I suppose in a particular area - web e-commerce and the like.

Stats for SourceForge (maybe out of date): http://www.statisticbrain.com/computer-programming-language-...

Re:Ion: Cross-platform OpenGL library from Google by pjmlp on Wednesday February 10, 2016 @11:45AM (#11073977)
Outside performance critical areas, where shaving off KB and ms really counts, C++ has become an infrastructure language with others taking most of the work.
Re:Ion: Cross-platform OpenGL library from Google by pixelp3 on Wednesday February 10, 2016 @03:55AM (#11071492)
C++ is not relevant? What world do you work in?