News for hackers. Stuff that matters.
Re:Clang runs in the browser and compiles C++ to WebAssembly by qwerty456127 on Tuesday January 02, 2018 @01:32AM (#16050293)
> HTML is a pain for things that aren't documents.

Indeed it is but there seem to be no relevant alternative. The only thing that is better [for apps] is XAML (WPF) but it is Windows-only.

Re:Clang runs in the browser and compiles C++ to WebAssembly by javajosh on Tuesday January 02, 2018 @01:43AM (#16050332)
SVG + JS is really quite good. You will need a few abstractions to work comfortably with the SVG DOM, but you can easily write these as you need them.
Re:Clang runs in the browser and compiles C++ to WebAssembly by qwerty456127 on Tuesday January 02, 2018 @02:30AM (#16050466)
Sounds reasonable. Why don't people use it then? Are there any frameworks already available so one won't have to invent a GUI toolkit from scratch?
Re:Clang runs in the browser and compiles C++ to WebAssembly by Someone on Tuesday January 02, 2018 @03:24AM (#16050652)
One of the “few abstractions to work comfortably with the SVG DOM” that “you can easily write […] as you need them” would be a layout engine. You need one to adjust your UI to the user’s screen size.

Another, I think, is that, to add scroll bars to a view, you have to write SVG scroll bars, make them respond to the mouse scroll wheel, be accessible, etc.

Even if we will get them, eventually, it won’t be “easily”.

I think it is easier to use HTML for layout, and SVG (or canvas) for those views that need it. You can do that now.

Re:Clang runs in the browser and compiles C++ to WebAssembly by javajosh on Tuesday January 02, 2018 @12:34PM (#16053486)
>layout engine

Absolute positioning gets a bad rap! And yes, if you want widgets then you have a lot of work ahead of you. But it's a lot of fun to just work with the primitives - don't believe them when they tell you always need a GUI toolkit!

Re:Clang runs in the browser and compiles C++ to WebAssembly by pjmlp on Tuesday January 02, 2018 @11:29AM (#16052881)
No, there are other XAML variants, like Avalon and Xamarin.Forms.

JavaFX also follows the same design ideas.

And there is QML as well.

Re:Clang runs in the browser and compiles C++ to WebAssembly by qwerty456127 on Thursday January 04, 2018 @12:34AM (#16068287)
Xamarin.Forms is cool but still doesn't work on Linux so it seems the same story as XAML to me - cool but of little use, unlike to HTML which is less cool but absolutely useful as it works everywhere. JavaFX - doesn't work on mobiles/tablets (there was a prototype in 2011, seemingly abandoned), sadly it seems to be about as dead as Flash and Silverlight now. As for QML - search results suggest it works everywhere but still hardly a popular choice for some reason, worth taking a closer look perhaps (but I still doubt it can compare to HTML as using Qt means producing binary builds for every platform to support AFAIK).
Re:Clang runs in the browser and compiles C++ to WebAssembly by pjmlp on Thursday January 04, 2018 @03:26AM (#16068777)
Avalonia (which I mistyped as Avalon) works in Linux, so XAML works on Linux.

JavaFX surely works on mobile.

http://gluonhq.com/

HTML is useless without a binary build of a running browser, that doesn't expose platform specific APIs.

Re:Clang runs in the browser and compiles C++ to WebAssembly by fastball on Tuesday January 02, 2018 @08:16AM (#16051652)
Why not use something like Pug[0], which compiles to HTML?

[0] - https://pugjs.org/api/getting-started.html