Live data from Hacker News

Haxe 4.2

community.haxe.org

21–30 of 105 posts

Re: Haxe 4.2

#21

Does anyone have any real world experiences with Haxe? I've been hearing about it for years and generally thought "wow, that's neat!" but that's been it. Does it actually achieve what it aims for?

Some not-so-tiny games as cited in sibling comments. Also some web applications; I've been pushing some to production for 6 years now.

Other random uses:

- lua target for a pokemon game, probably for scripting (no word from devs, just saw the licences)

- a video player made by feds to catch pedocriminals a couple years ago

- livejasmin (warning: NSFW!) is using it for its frontend (via docler holding) on a top 50 website

Re: Haxe 4.2

#22

Does anyone have any real world experiences with Haxe? I've been hearing about it for years and generally thought "wow, that's neat!" but that's been it. Does it actually achieve what it aims for?

TiVo used it to reimplement their UI after moving away from Flash. No experience programming it, but it seems like a mature product.

Re: Haxe 4.2

#23

This looks pretty neat. How does this work, do you code and specify a target output? Curious if there is a link somewhere that shows the output files ... I like learned on the front-page example a multi-state (?) switch statement. What is this called and any other languages support this? switch [playerA.move, playerB.move] { case [Rock, Scissors] | [Paper, Rock] | [Scissors, Paper]: Winner(playerA); ...

That's not pattern matching, it's just switching on arbitrary values. You can do the same thing in d, which doesn't have pattern matching. Pattern matching is something like this:

  switch [playerA.move, playerB.move]
          case [x, x]: Tied()
          case [Rock, x]: Winner(if x == Scissors then playerA else playerB)

Re: Haxe 4.2

#24

This looks pretty neat. How does this work, do you code and specify a target output? Curious if there is a link somewhere that shows the output files ... I like learned on the front-page example a multi-state (?) switch statement. What is this called and any other languages support this? switch [playerA.move, playerB.move] { case [Rock, Scissors] | [Paper, Rock] | [Scissors, Paper]: Winner(playerA); ...

That's not pattern matching, it's just switching on arbitrary values. You can do the same thing in d, which doesn't have pattern matching. Pattern matching is something like this: switch [playerA.move, playerB.move] case [x, x]: Tied() case [Rock, x]: Winner(if x == Scissors then playerA else playerB)

It is pattern matching, the semantics are an OCaml/ML family `match` expression.

Re: Haxe 4.2

#25
post #2

I remember thinking that this was a MUCH better language than AS3 for Flash & Flex development. Now, 10 years later, I'm honestly surprised that it still exists and is being maintained. I'm curious how popular it is at this point? Is there a big benefit over something like Typescript now?

TypeScript makes a number of compromises to achieve optimal JS compatibility. Haxe doesn't have this goal since JS is just one of its many targets, and this shows in a number of design decisions (everything-is-an-expression, ADTs and pattern matching, etc).

Re: Haxe 4.2

#26

Does anyone have any real world experiences with Haxe? I've been hearing about it for years and generally thought "wow, that's neat!" but that's been it. Does it actually achieve what it aims for?

Yeah i have used it to make some, small but not trivial games. I really enjoy it. I mostly just target the HashLink vm as its met all of my needs.

The actual language is great. I am a long time ago former flash developer, and heaps.io and haxe has captured a lot of the enjoyment I used to have making games for newgrounds

Re: Haxe 4.2

#27
Can someone explain me how debugging such a language works with so many cross-compilation targets? What if I want to set a breakpoint somewhere in the code, a) what changes depending on the target (compiled code, interpreter, vm) b) how debug adapters should work with all that zoo? Or maybe there are no? Or maybe a major question: how do you write a complicitaed piece of software in a "different" language with poor tool support? You rely on something else?

Re: Haxe 4.2

#28
post #10

looks better than typescript at first glance

Well yes but it's not the same thing at all. Ecma / JavaScript -> Typescript Ecma / ActionScript -> Haxe Haxe is truly fascinating and Neko is a great engine as far as I could test. But the language suffers from global scale adoption, not due for the quality but due to the lack of big names representing, I feel.

Fyi, at this point the Neko VM has more or less been replaced by its spiritual successor HashLink (used by games such as Northgard and Dead Cells). It achieves better performance by being a strictly typed VM. It also has better tooling (breakpoint debugging in VSCode, profiling).

https://hashlink.haxe.org/

Re: Haxe 4.2

#29
We used this for a client game project - a Candy Crush clone, about 4 or 5 years ago successfully. The client wanted the game to run on browsers (HTML & Flash for older browsers), iOS and Android, with a fairly tight budget. Having done a lot of AS3, the learning curve was pretty low.

There were a reasonable number of specific things to learn about compilation, packaging and handling things like device rotation, viewport sizes, etc. along the way. But we had a cleanish single codebase for all targets.

Documentation and real world examples were fairly slim on the ground at that point, but it certainly worked and ran well to very well across all devices. It certainly offered a pretty consistent experience across all the targets and ran at a decent framerate on everything we tested against. We couldn't really find much to fault it on once we had everything up and running. I seem to remember compilation times being incredibly fast.

I'm kind of surprised it's still a thing - it brings back some good memories & makes me want to have a go with it again as it was an enjoyable way of working for that type of 2D game project.

Re: Haxe 4.2

#30

Can someone explain me how debugging such a language works with so many cross-compilation targets? What if I want to set a breakpoint somewhere in the code, a) what changes depending on the target (compiled code, interpreter, vm) b) how debug adapters should work with all that zoo? Or maybe there are no? Or maybe a major question: how do you write a complicitaed piece of software in a "different" language with poor t…

For 5 of the targets, debugging directly within the Haxe sources is supported with different VSCode debug adapters (well, JS just uses source maps). If your code is written in a target-agnostic way, you can even switch to a different target with better debugging support temporarily.

https://github.com/vshaxe/vshaxe/wiki/Debugging

Other than that, if really you need to debug some target-specific issue on a target without debugging support, there's usually still the option of debugging the generated code.

Post reply on HN