AbelianGrape

joined 2 years ago
[–] AbelianGrape 1 points 1 week ago (1 children)

"quantum teleportation" is the correct technical term. The problem is articles being written by people who don't realize this is a technical term that needs explanation.

[–] AbelianGrape 1 points 1 week ago* (last edited 1 week ago)

I use vim, or spacemacs with evil mode (emacs distribution with sensible shortcuts and vim emulation). Or VSCode with spacemacs emulation.

You will pass your current productivity in less than a month. All of the things you describe are easily done in VSCode with vim emulation (I prefer the full spacemacs emulation but it's not actually a huge difference). You won't have to move your hands away from the normal typing spot on your keyboard -- no home and end, just 0 and $. No control+arrow keys, just w and b (or e or even more motion options). Highlighting is as easy as v and then motion commands. And there are so many more useful things that vim (and vim emulation) make simple and fast. Orthogonal VSCode features like multi cursors still work.

[–] AbelianGrape 8 points 2 weeks ago

The appropriate comparison is to hate speech -- speech which is never tolerable. The kinds of things I wouldn't say in this comment. Some racial slurs might qualify, in my opinion, but it would be particular phrases using them and not necessarily the slur itself. The N word is obviously not hate speech when certain people say it, otherwise lots of rap music would be illegal. But there are certainly hate speech phrases that use it that are just as bad as a Nazi salute.

Freedom of speech, like any tolerance, needs to have limits and this is a very reasonable one.

[–] AbelianGrape 13 points 3 months ago (1 children)

Because lots of people I talk to where I live (eastern Canada) don't seem to realize this: the forcible "transfer" (i.e. deportation) of children is an act of genocide according to international law.

[–] AbelianGrape 1 points 4 months ago

You have to be explicit about which module you're using at all times, even though 99% of the time only one could apply. When the type class resolution is unique, but complicated, there's no mental overhead for the Haskell programmer but getting all the right modules is a lot of overhead for the OCaml programmer. It also lets us write functions that are polymorphic under a class constraint. In OCaml you have to explicitly take a module argument to do this. If you want to start composing such functions, it gets tedious extremely fast.

And then even once you're using a module, you can't overload a function name. See: + vs +.. Basically modules and type classes solve different problems. You can do some things with modules that you cannot ergonomically do with type classes, for example. create a bit-set representation of sets of integers, and a balanced search tree for sets of other types, and expose that interface uniformly from the same module functor. But Haskell has other ways to achieve that same functionality and more.

OCaml's type system cannot replicate the things you can do with Haskell's higher kinded types, type families, or data kinds at all (except for a fraction of Haskell's GADTs).

[–] AbelianGrape 1 points 4 months ago (3 children)

Largely reasonable?

Haskell is not good for systems programming which sums up about 60-70% of that post. Laziness is lovely in theory but many industry uses of Haskell use stricthaskell for all or most of their code, so I certainly agree with that part too.

Their largest complaint about using Haskell for small non-systems programs seems to be the mental overhead induced by laziness. But for me, for small programs where performance isn't a huge concern (think Advent of code or a script for daily life) laziness reduces my mental overhead. I think that author is just especially concerned about having a deep understanding of their programs' performance because of their systems background. I worry about performance when it becomes relevant. Debugging Haskell performance issues is certainly harder than strict languages but still totally doable.

The lack of type classes or other form of ergonomic overloading in OCaml is easily the single "feature" most responsible for the language never taking off.

[–] AbelianGrape 2 points 4 months ago* (last edited 4 months ago) (5 children)

As a Haskell programmer, "OCaml has the nicest type features" hurts just a little bit.

I sometimes teach a course in OCaml. The students who are very engaged inevitably ask me about Haskell, I encourage them to try it, and then they spend the rest of the semester wondering why the course is taught in OCaml. Bizarre how different that is from when colleagues in industry want to try Haskell.

[–] AbelianGrape 1 points 4 months ago (1 children)

Is Printf.printf not a good generic print function? It's even variadic!

[–] AbelianGrape 4 points 4 months ago

Yeah, I like subleq.

  • compiler is extremely fast, faster even than tinycc
  • strongly statically typed: all values are ints. Since it's all of them, you don't even need to write it!
  • memory safe: the entire (virtual) address space is guaranteed to be accessible at all times so there's no way to leak any of it (can't release it anyway) or to segfault (it's all accessible).

Subleq is the obvious winner in my mind.

[–] AbelianGrape 3 points 4 months ago

There is no official definition, in part because there isn't any formal way to define the term that satisfies our intuition.

Most treatments will handle "transpiling" as a special case of "compiling" and some will even handle decompilation as a special case where the object language is higher level than the source. Of course, even defining "higher level" can be quite hard.

Plenty of languages "compile to C" and I see no issue with saying something "compiles to js," especially given that js mostly lacks features of purescript rather than the other way around.

[–] AbelianGrape 2 points 5 months ago* (last edited 5 months ago) (3 children)

"Monadic type" has something like three meanings depending on context, and it's not clear which one you mean. One of them is common in math, but not so common in programming, so probably not that. But neither "parametric types with a single argument" nor "types that encode a category-theoretic monad" have the property you say, as far as I know.

I imagine you're probably referring to the latter, since the optional monad exists. That's very different from returning null. The inhabitants of Integer in Java, for example, are the boxed machine ints and null. The inhabitants of Optional[Integer] (it won't let me use angle brackets here) are Optional.of(i) for each machine int i, Optional.empty(), and null.

Optional.empty() is not null and should not be called a "Null object." It's also not of type Integer, so you're not even allowed to return it unless the function type explicitly says so. Writing such function types is pretty uncommon to do in java programs but it's more normal in kotlin. In languages like Haskell, which don't have null at all, this is idiomatic.

[–] AbelianGrape 10 points 5 months ago

Which, to be fair, is also derived from a word which would be most accurately (with English vowels) pronounced as mah-nuh. Although at this point "manna" is definitively also a word of English whose correct pronunciation is with /æ/.

 

Up front: obviously, major spoilers, so if you care about spoilers for how the master sword makes its appearance in Tears of the Kingdom, do not watch!

Normally I don't post things like this on Reddit, but I figure Lemmy needs users who actually post content, so, let's do this :)

I've been working on routing and running this category for a couple of weeks now. This is maybe the 6th or 7th iteration of the route, and this run was sort of a "route test" as much as a run, so I can do even better.

Most of the TOTK speedrunning community has been laser-focused on any% since the game came out. They've done some really impressive stuff and I'm excited to see what they do. There's also some interest in All Dungeons, which I'll probably take my own stab at soon. However, there doesn't seem to be much interest yet for this category, which was a real gem in Breath of the Wild speedrunning for several years.

To avoid spoilers, I won't give the exact rules here, but I can put them in a comment or something if that seems safe.

view more: next ›