Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

See also webghc which has an alternative strategy to writing a new RTS and code generator. They are cross compiling to wasm via llvm. https://webghc.github.io/2019/01/18/state-of-webghc-january-...


I expect that relying on LLVM going forward will be the popular approach for Haskell and other languages (there's so much momentum behind LLVM and it's made to be built upon), it's fantastic to see people entering this space.

Despite the amount of derision Javascript and the web-as-a-platform idea is met with, the amount of innovation is undeniable. I personally think the web is the best platform (at the very least, it's the devil almost everyone knows) -- it's already ubiquitous, has more-than-good-enough solutions for most things and is supported by very huge companies and open source naturally. One of the main hangups for those who dislike the web-as-a-platform idea spreading usually call out the terribleness of Javascript the language -- and though I think transpiled solutions like Typescript[0] and Elm[1]/Purescript[2] fix this issue, the introduction of WASM will finally completely obliterate this long-standing hangup. You want to write some other language for your JS frontend? Soon you'll be able to.

JavaFX/QT/GTK/WxWidgets/etc people you had your chance (in the last decade or two) to create simple, cross-platform yet sufficiently feature full implementations and people are choosing bundling an entire browser to get away from the tools you're giving them. If someone develops a sufficient stripped down browser rendering interface or if projects like ion[3] take off, even more people (with relatively simple apps to write) will use the web platform I think.

As WASM gets better, the "native UI & speed" island is going to continue to shrink, in my estimation. Of course you've also got approaches like Flutter out there trying to render every single pixel (!), with enough weight to actually make it happen and provide full sets of widgets and even work on a desktop embedder[4] (shame about the only viable language being dart though...).

[0]: https://www.typescriptlang.org/

[1]: http://elm-lang.org/

[2]: http://www.purescript.org/

[3]: https://github.com/justinmichaud/ion

[4]: https://github.com/Drakirus/go-flutter-desktop-embedder


> I expect that relying on LLVM going forward will be the popular approach for Haskell and other languages

My vague understanding that might be outdated by a few years is that LLVM isn't a very nice target for garbage collected languages. It does have support for GC hooks, stack maps etc., but somehow people are (were?) struggling to make it all work efficiently in the real world.

There must be other factors as well, as a Haskell LLVM backend has existed for years. Here's a list of problems with LLVM for this use case pointed out two years ago: https://ghc.haskell.org/trac/ghc/wiki/ImprovedLLVMBackend


I'll add a fifth link since Google is actually working on a desktop embedder for Flutter themselves.

[5]: https://github.com/google/flutter-desktop-embedding


More precisely, someone who works at Google is working on that:

This is not an officially supported Google product. This is an exploratory effort, and is not part of the Flutter project.

It being under the google GitHub organization doesn't mean much about the backing, since Google demands copyright for all kinds of things their employees do.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: