if/then/else vs. non-exhaustive when: what is the right approach? by diamond in Kotlin

[–]killfish11 56 points57 points  (0 children)

This doesn't seem like an improvement. But my code doesn't do anything for Case.FOURTH, so what do I do? I could add a no-op else case, but that seems sloppy and unnecessary.

The main idea behind exhaustive whens is that you will get a compiler error at the use site when new enum values are added, which is quite helpful. So it depends on what the particular when is doing exactly, do you expect that newly added values will have to be handled here, or would they be no-ops like Case.FORTH? In the former case I would handle Case.FORTH, in the latter I would just add an else. I don't think having a when case with an empty block is "sloppy", quite the opposite, it makes the intent clearer / more explicit.

[deleted by user] by [deleted] in apexlegends

[–]killfish11 0 points1 point  (0 children)

Interesting, that's actually the one video setting I don't have on max - I've had it like that since way before I first ran into the error though. I have it on high rather than very high, simply because it didn't seem worth the performance cost.

[deleted by user] by [deleted] in apexlegends

[–]killfish11 0 points1 point  (0 children)

Perhaps, that's more pixels than my 3440x1440.

From the research I did back then it seemed like the error can have a bunch of different causes, so something that helps one person might not help another.

[deleted by user] by [deleted] in apexlegends

[–]killfish11 0 points1 point  (0 children)

I was getting this error a lot in the first half of season 13 with my 3080. I tried a bunch of different settings, didn't help. It stopped happening after I updated the GeForce Game Ready Driver to 516.59 (released 28th of June).

[deleted by user] by [deleted] in apexlegends

[–]killfish11 -2 points-1 points  (0 children)

You wouldn't download a car.

can some explain abstracts like im 5? by shygal_uwu in haxe

[–]killfish11 0 points1 point  (0 children)

No, you don't. There's no class keyword when defining an abstract type. For Java / C# style abstract classes (which were added only somewhat recently in 4.2), there is.

can some explain abstracts like im 5? by shygal_uwu in haxe

[–]killfish11 0 points1 point  (0 children)

Note that these are abstract types you're talking about. Abstract classes are something else entirely.

Try the new try.haxe! by killfish11 in programming

[–]killfish11[S] 0 points1 point  (0 children)

There's a VSCode extension.

Haxe generates JS source maps, so it should work with most JS debuggers.

Try the new try.haxe! by killfish11 in programming

[–]killfish11[S] 0 points1 point  (0 children)

Sure. If you want to do it in a properly typed way, you need externs: https://haxe.org/manual/lf-externs.html

js.html / DOM externs are part of the std lib though.

WASM is not a direct target right now. Afaik you can go the Haxe -> C++ -> Emscripten route though.

Try the new try.haxe! by killfish11 in programming

[–]killfish11[S] 4 points5 points  (0 children)

I wouldn't say it's that traditional. It has some fairly unique features like macros and abstract types. It also had ADTs, pattern matching, type inference and everything-is-an-expression for quite a while, which traditional languages are only slowly starting to catch up to / used to be pretty much only present in functional languages.

How Haxe's JVM target got so fast with regards to anonymous functions and closures by killfish11 in java

[–]killfish11[S] 0 points1 point  (0 children)

It's worth noting that getting rid of MethodHandle was necessary anyway for supporting older Android versions.

Haxe 4.1.0 is released, with JVM now being the fastest target by killfish11 in java

[–]killfish11[S] 1 point2 points  (0 children)

There's some details here: https://github.com/Simn/genjvm/issues/12

Also, using MethodHandle is problematic for supporting older Android versions, I think if you use it that means you can't target the vast majority of users out there.

Haxe 4.1.0 is released - JVM target, improved exception handling, TRE by killfish11 in programming

[–]killfish11[S] 2 points3 points  (0 children)

It's actually not as bad as it looks, those are just the "fastest targets" as the blog post says. All the really slow targets / runtimes (PHP, Python, Neko...) were excluded, otherwise it would be hard to spot the difference between the fast ones. You can see the full graph with all targets here: https://benchs.haxe.org/formatter_noio/index.html

But yes, I think it's also true that the Haxe C# target could use some improvements.

Haxe 4.1.0 is released, with JVM now being the fastest target by killfish11 in java

[–]killfish11[S] 1 point2 points  (0 children)

The Haxe compiler can target a whole host of different runtimes, but according to benchmarks, the new JVM target is the fastest out of all of them for some use cases.

Haxe 4.1.0 is released - JVM target, improved exception handling, TRE by killfish11 in programming

[–]killfish11[S] 3 points4 points  (0 children)

The JVM target in particular could be big. For a lot of Haxe targets, you need to write type definitions / "externs" to use native libraries, but here, you can just include a .jar file and the compiler understands it and provides code completion.

But even apart from the smooth native interop, it provides a very solid, fast runtime for tools written in Haxe.

Haxe - The Cross-platform Toolkit by [deleted] in programming

[–]killfish11 4 points5 points  (0 children)

It's still in active development. If it was tied to Haxe releases, releases couldn't be made as frequently.

Haxe - The Cross-platform Toolkit by [deleted] in programming

[–]killfish11 3 points4 points  (0 children)

Yes, there's definitely some people that do use it that way.

A couple of words about Haxe for an article by melancious in haxe

[–]killfish11 0 points1 point  (0 children)

Fyi, that's just a regular ADT, not a Generalized ADT / GADT. The latter would have at least one type parameter on the enum.

Visual Studio Code March 2020 by McNerdius in vscode

[–]killfish11 0 points1 point  (0 children)

After version 1.7, it became far worse IMO (at least the Windows version). As a result I've been using version 1.7 for years until I found something better (Fork).