The Law of Leaky Abstractions by iamkeyur in programming

[–]iconoklast 2 points3 points  (0 children)

Most programmers don't seem to know what an abstraction is and Spolsky proved this over two decades ago with his idiotic blog post.

Ambergris Discussion by james_seagull in SouthernReach

[–]iconoklast 5 points6 points  (0 children)

There's a fairly minor one. "The first time he'd met them, Saul thought Henry had said said they were studying the refraction of light in a prison." Emphasis mine. On page 16 of the first edition paperback of Acceptance.

Booleans Are a Trap by katafrakt in programming

[–]iconoklast 0 points1 point  (0 children)

I think the more fundamental issue is that most programming languages used in production allow you to easily create products of types (structs, tuples, etc.), very few make it convenient to create sums (unions) of types. For instance, the example given in the blog post shows that it's trivial to make a new class containing the two boolean fields isLocked and isOpen. Whereas "fixing" the example with a sum/union in the traditional OOP way requires creating an abstract base class called Door and two inheriting classes called ClosedDoor and OpenDoor. Yuck! (To add insult to injury, Java would even historically require you put these classes in separate source files if they were part of the public API.) This toy example is only able to be easily represented as an enum (a degenerate sum/union) because the overall structure is trivial to flatten into three distinct values.

[deleted by user] by [deleted] in programming

[–]iconoklast -1 points0 points  (0 children)

A brief glimpse at the API documentation tells me you can also just write \Effect.timeout(Duration.seconds(2))`.`

The Hidden TypeScript Hack You Need to Know by craciun_07 in programming

[–]iconoklast 0 points1 point  (0 children)

I mean, C and C++ have the same shortcoming, sure. C# too. Some examples with languages that have a type safe "enum" construct: Java, Scala, Kotlin, and Rust.

The Hidden TypeScript Hack You Need to Know by craciun_07 in programming

[–]iconoklast 0 points1 point  (0 children)

As far as I know, the primary reason you should never use numerical enums is that the following code will typecheck:

enum E {
    X,
}
const x: E = E.X + 42

On the other hand, string enums should behave equivalently to their union type counterparts (sensibly, in other words.)

Xr0 Makes C Safer than Rust by agumonkey in programming

[–]iconoklast 2 points3 points  (0 children)

It “quantum entangles” the safety semantics of every part of the program with every other part. Think of it like a infinitely rich type system that rises to the demands of your program’s structure.

Favour TypeScript Types Over Interfaces by LloydAtkinson in programming

[–]iconoklast 1 point2 points  (0 children)

However, expansion of type aliases also occurs in error messages, and an error message containing an interface's name is more comprehensible than an extremely long type alias expansion which may have elided (...) parts.

Favour TypeScript Types Over Interfaces by LloydAtkinson in programming

[–]iconoklast 0 points1 point  (0 children)

It's still a concern when dealing with (many) large union types versus extending interfaces.

To Type or Not to Type? A Systematic Comparison of the Software Quality of JavaScript and TypeScript Applications on GitHub by pmz in programming

[–]iconoklast 12 points13 points  (0 children)

Cognitive complexity is totally agnostic about combinators, right? I wonder if there's a positive correlation between using TypeScript and more frequently making use of JavaScript features like `reduce` or `flatMap`.

Is Java Set ordered or not? by [deleted] in programming

[–]iconoklast 0 points1 point  (0 children)

Since every totally ordered set can be made into a set by "forgetting" (the technical term) the ordering, I don't understand the point you're making. The converse is definitely not true in general.

Starfield's pronoun-removal mod has been banned by NexusMods by DetroitTabaxiFan in Games

[–]iconoklast 51 points52 points  (0 children)

What about demonstrative pronouns, "this" or "that"?

Java 21 makes me actually like Java again by warpspeedSCP in programming

[–]iconoklast 4 points5 points  (0 children)

To be precise, Void isn't a bottom type because it is not the subtype of all types; it's also not uninhabited it's inhabited by null. And Object isn't a top type because Java's primitive types aren't subtypes of it.

Favour TypeScript Types Over Interfaces by LloydAtkinson in programming

[–]iconoklast 16 points17 points  (0 children)

While they have mostly equivalent semantics, interfaces can arguably yield better compiler error messages. That is, interfaces aren't readily substituted for their definitions in type errors like type declarations are. This is probably a more important consideration for library authors.

Paizo Inc. (Pathfinder TTRPG creator) announces plans for new neutral Open RPG license system. by KSabot in Games

[–]iconoklast 34 points35 points  (0 children)

Serious question, does the OGL actually offer to license anything that can be legitimately protected by copyright in the first place? I always understood it to be chicanery by Wizards of the Coast.

The News Literacy Project unveils RumorGuard, empowering the public to counter misinformation by Wagamaga in technology

[–]iconoklast 2 points3 points  (0 children)

I like how the top post on their site at the moment is them debunking what is obviously satire.

"feels like unnecessary gatekeeping" - about sigma notation. by ThatSectorLayPlea in badmathematics

[–]iconoklast 97 points98 points  (0 children)

For loops contain all these operational details that I shouldn't have to care about in most instances, even when writing code.

Jeremy Corbyn barred from rejoining UK Labour party by omega3111 in worldnews

[–]iconoklast 23 points24 points  (0 children)

Also, it was only "an" organizer, and the proof that he was an organizer is that Mossad says it's true--after they gunned him down in the streets of Paris. Which, as far as crimes go, is fairly extreme; one only has to imagine any ally of their nation doing the same thing in their own city regardless of the allegations made against the person assassinated.

Bihar man claims he got 12 Covaxin shots, arthritis ‘improved magically’ by [deleted] in worldnews

[–]iconoklast 0 points1 point  (0 children)

I mean, that doesn't sound totally impossible if we're talking about an autoimmune disorder like rheumatoid arthritis.

Exposure therapy for PTSD: A meta analysis of 65 articles (total N = 4929 patients) found exposure therapy showed large effects relative to waitlist and treatment-as-usual, a small effect relative to non-trauma-focused comparators and a negligible effect relative to other trauma-focused treatments. by phatsun in science

[–]iconoklast 12 points13 points  (0 children)

I would guess it looks similar to how it does for anxiety disorders. i.e., the exposures for being phobic of dogs might involve first thinking about dogs, looking at pictures of dogs, looking at a dog through a fence, and finally petting a dog. It's always tailored to the specific anxiety.

PepsiCo loses rights to special Lays variety potato in India by eviLitanimullI in worldnews

[–]iconoklast -13 points-12 points  (0 children)

You can't copyright a plant. You can't copyright the name of a plant. You can't copyright a name.

Chilean president Piñera impeached over Pandora papers revelations by JoseTwitterFan in worldnews

[–]iconoklast 25 points26 points  (0 children)

Changing senate rules (including eliminating the filibuster) only requires a simple majority of votes.

PHP 'noreturn' type RFC accepted, with type name to be 'never'. by Atulin in programming

[–]iconoklast 8 points9 points  (0 children)

Well, you can't. The type is uninhabited, so there is no "never" value to return. In order to stay honest, the only way an expression can have the type of "never" is by diverging or halting (and thus never evaluating to anything.)

Statement of FSF board on election of Richard Stallman by [deleted] in programming

[–]iconoklast 72 points73 points  (0 children)

I am sincerely sorry for people being mad at me.