Try the new try.haxe
21–30 of 36 posts
Re: Try the new try.haxe
#22It seems a bit disconcerting that the hello world JS example has code for an array iterator in the output, despite never using arrays. Any idea why that is?
Re: Try the new try.haxe
#23If you’re curious about successful projects built with Haxe, Google “Friday Night Funkin”! It’s a delightful Flash game revival that combines elements of DDR and PaRappa the Rapper. It’s open source and has been blowing up lately.
I believe Dead Cells is written in Haxe: https://heaps.io/about.html
Switch is a constrained console and Haxe is dynamically typed. DC is a real world product with a long life (many updates and DLC). Any information about limitation/workaround it had to do would be very interesting to hear.
Aside, DC is a very interesting game.
Re: Try the new try.haxe
#24There's this Window Manager called Awesome, which is scripted with Lua/LuaJIT. It features an extensive library of objects for use in user scripts.
There's a lot to like about Lua, but it's designed as an embedded scripting language and it gets harder to use the more code you have. Extremely dynamic nature coupled with lack of good tooling makes it really hard to explore the codebases above a certain level of complexity.
Enter Haxe, which has Lua as one of its targets. It gives you static typing (with local type inference), good LSP support for navigating the codebase, some nice libraries and utilities (Tinkerbell) that Lua lacks, macros, exceptions, modules, basically everything you'd need to work with a large codebase. Everything Lua does is still accessible, so for example coroutines and tail call elimination are still working, but you get a lot of tools on top of that.
I think LuaJIT + Haxe is a very powerful combination, which gives you great performance, rapid prototyping, and tools for programming in the large at the same time. The experience of writing a few kloc of Lua scripts for Awesome was not the most pleasant, but when I added Haxe to the mix, it became a real pleasure to work with. It's worth considering if you find yourself in a similar situation (a lot of things are scripted with Lua, after all.)
Re: Try the new try.haxe
#25Not a comment about try.haxe, but Haxe in general: There's this Window Manager called Awesome, which is scripted with Lua/LuaJIT. It features an extensive library of objects for use in user scripts. There's a lot to like about Lua, but it's designed as an embedded scripting language and it gets harder to use the more code you have. Extremely dynamic nature coupled with lack of good tooling makes it really hard to exp…
Thank you!!
Re: Try the new try.haxe
#26Earlier quoted context omitted.
I believe Dead Cells is written in Haxe: https://heaps.io/about.html
It's interesting how DC goes from average performance on Switch to smooth 60 fps. I always wondered if it was related to Haxe and if it had home made Haxe optimization (Haxe dev is one of the original DC devs). Switch is a constrained console and Haxe is dynamically typed. DC is a real world product with a long life (many updates and DLC). Any information about limitation/workaround it had to do would be very interes…
For switch it uses Hashlink/C code generation so it's native C that is compiled on the console.
Re: Try the new try.haxe
#27Not a comment about try.haxe, but Haxe in general: There's this Window Manager called Awesome, which is scripted with Lua/LuaJIT. It features an extensive library of objects for use in user scripts. There's a lot to like about Lua, but it's designed as an embedded scripting language and it gets harder to use the more code you have. Extremely dynamic nature coupled with lack of good tooling makes it really hard to exp…
Re: Try the new try.haxe
#28Not a comment about try.haxe, but Haxe in general: There's this Window Manager called Awesome, which is scripted with Lua/LuaJIT. It features an extensive library of objects for use in user scripts. There's a lot to like about Lua, but it's designed as an embedded scripting language and it gets harder to use the more code you have. Extremely dynamic nature coupled with lack of good tooling makes it really hard to exp…
Wow, I feel like somehow the universe directed me to this comment. I've been using Awesome for almost a year now, but with mostly default settings because writing Lua is such a chore. I'm gonna look into this right now, and appreciate any more information you're willing to share about your setup. Thank you!!
If you want to set up something similar, you can start with haxeshigh/Makefile[1] and haxeshigh/bin/build (it's a shell script). In the haxeshigh/src/ there are implementations of three widgets: battery, brightness, and taglist[2]. The last one is the most complex as it uses coroutines to animate (slide in/out) the widget on screen. The rest of src/ are wrappers/type definitions for objects from Awesome, plus some macros/helpers for working with Lua tables (which are both arrays and hash tables at the same time, Haxe doesn't like this).
I found some bugs in the Lua part of the Haxe compiler (genlua.ml), but it was a long time ago, so they are probably fixed already. I don't remember the details, but the fix was trivial... I'll try to look for the issue and see if it's already fixed later.
[0] https://github.com/piotrklibert/awesome-config
[1] https://github.com/piotrklibert/awesome-config/blob/master/h...
[2] https://github.com/piotrklibert/awesome-config/blob/master/h...
Re: Try the new try.haxe
#29Earlier quoted context omitted.
Yup! With its JavaScript and JVM targets, it simultaneously manages to be a better TypeScript than TypeScript and a better Kotlin than Kotlin.
> better Kotlin than Kotlin Kotlin has JVM, Native and JS targets. And as a language it is much better than Haxe, I would be careful about such statements.
You cannot just pick a random Java library, even if pure logic code, one of the Kotlin FFI selling points and use it with Kotlin/Native, if it wasn't originally written with Kotlin/Native memory model in mind.
Re: Try the new try.haxe
#30So if I understand the appeal of Haxe, it's basically a high level language that compiles down to other languages?
The multiple targets is certainly a big appeal, but the biggest for me is it's just a nice language to work in, so I often prefer it over whatever domain's native language I'm working with For example, when I do web frontend work I often use it over TypeScript - I broke down why earlier https://news.ycombinator.com/item?id=26084187 Same story for say, writing blender plugins; personally I find prefer if I can use a s…