Live data from Hacker News

A success story for Haxe

nadako.tumblr.com

61–67 of 67 posts

Re: A success story for Haxe

#61

Earlier quoted context omitted.

Respectfully, it is important to understand whether sort stability is as bug or not. Particularly since you seem to have experienced exceptions on Android, and assuming that the problem was in the sort stability may have mislead you.

It's still reproducible just by substituting the top function for the stable alternative we use: http://pastebin.com/D3S6SYBM . Haxe 3.1.3 on OSX.

Do you have the same problem with a deterministic comparison function?

I'm not dismissing the existence of a bug just because of this (although the issue may be related to it), but non-deterministic comparison functions are problematic with many sort _algorithms_. You might experience (other) problems when using implementation independent "sort" APIs, since many algorithms need to rerun the comparison function several times and expect consistent behaviour; I would expect certain algorithms to, for instance, never complete.

Re: A success story for Haxe

#62

Earlier quoted context omitted.

It's still reproducible just by substituting the top function for the stable alternative we use: http://pastebin.com/D3S6SYBM . Haxe 3.1.3 on OSX.

Do you have the same problem with a deterministic comparison function? I'm not dismissing the existence of a bug just because of this (although the issue may be related to it), but non-deterministic comparison functions are problematic with many sort _algorithms_. You might experience (other) problems when using implementation independent "sort" APIs, since many algorithms need to rerun the comparison function severa…

The haxe people are the ones you need to discuss it further with. My pastebin expires in a week so you might want to clone it before you link to it.

Re: A success story for Haxe

#63

Earlier quoted context omitted.

Do you have the same problem with a deterministic comparison function? I'm not dismissing the existence of a bug just because of this (although the issue may be related to it), but non-deterministic comparison functions are problematic with many sort _algorithms_. You might experience (other) problems when using implementation independent "sort" APIs, since many algorithms need to rerun the comparison function severa…

The haxe people are the ones you need to discuss it further with. My pastebin expires in a week so you might want to clone it before you link to it.

Hm... No.

Re: A success story for Haxe

#65

Earlier quoted context omitted.

The haxe people are the ones you need to discuss it further with. My pastebin expires in a week so you might want to clone it before you link to it.

Hm... No.

I don't want to attach myself to further discussion of it, but it is still a crash reasonably isolated to their standard library and I took the time to document it so that my feedback could be helpful. If you don't pass it on they will miss this opportunity to improve their platform.

Re: A success story for Haxe

#66
post #51

I'm in the process of learning Haxe. I hope it becomes more popular since you can have macros, static type-checking and a shared code-base with one language. You can have all these things with Javascript but not at the same time (that I know of). Here's a port of the jQuery TodoMVC for anyone wanting a quick example of what a web-target would look like. https://github.com/explorigin/todomvc-haxe

When you write Javascript, do you mean TypeScript, AtScript, something else? There's no type checking in JS, and there is no metaprogramming support in JS, let alone of the quality it can be found in Haxe. Besides that, the type system of Haxe is far more expressive than those of most languages that also compile to JS. Ocaml, Scala and Haskell are the better known languages that are actual competitors in that regard.

Yes. "With Javascript" I mean via Typescript or Flow, you can have some static type-checking. You can use Sweet.js for macros with Javascript, but you can't use both of these tools together.

I'm unfamiliar with Ocaml, Scala and Haskell but OK.

Re: A success story for Haxe

#67
post #44

The sample program on the Haxe main page demonstrates a complete misunderstanding of the value of dictionaries. Not exactly inspiring one to learn more. class Test { static function main() { var people = [ "Elizabeth" => "Programming", "Joel" => "Design" ]; for (name in people.keys()) { var job = people[name]; trace('$name does $job for a living!'); } } }

Haha, I was the one that wrote that example for the homepage. It was never meant to be a comment on the ideal data structures for different use cases. Rather it's just there to give developers a taste of the syntax: there's more semicolons and brackets than Python, less explicit typing than Java. If you have an example of a better code sample for introducing language syntax, I'd love to see it so I can learn from it.

My point is that if you're going to iterate through the entire dictionary, there should be a way to get full key-value pairs, so you don't have to look up the value for each key. There's no need to change the entire example. Something like this:

        for ((name, job) in people) {
          trace('$name does $job for a living!');
        }
Post reply on HN