sorted by: new top controversial old
[-] qwertyasdef@programming.dev 8 points 10 months ago

Hey, I like checked exceptions too! I honestly think it's one of Javas's best features but it's hindered by the fact that try-catch is so verbose, libraries aren't always sensible about what exceptions they throw, and methods aren't exception-polymorphic for stuff like the Stream API. Which is to say, checked exceptions are a pain but that's the fault of the rest of the language around them and not the checked exceptions per se.

[-] qwertyasdef@programming.dev 19 points 10 months ago

That texture healing looks super nice. Is that something fonts can just do or does it require special editor support?

[-] qwertyasdef@programming.dev 8 points 11 months ago

If you don't need to reuse the collection or access its items out of order, you can also use Iterable which accepts even more inputs like generators.

[-] qwertyasdef@programming.dev 85 points 1 year ago

...What are they actually launching though? I mean I love the payment scheme but I can't get excited over this without an actual good product being sold.

[-] qwertyasdef@programming.dev 5 points 1 year ago

The one case where I prefer video is when I know next to nothing about the topic and the other choice is mediocre to low-quality writing. Most people aren't great technical writers, and it's easy to skip over steps either because the writer assumes too much prior knowledge or simply because it takes effort to put that information in. On the other hand, videos are the opposite where it takes effort to cut stuff out, so you usually get all the steps which is what I need when I don't know anything.

If I have the option of a well-written, step-by-step tutorial though, or if I already know the topic and have a vague idea of what I'm looking for, then text is much better for being able to search/skim/go back and forth at my own pace.

[-] qwertyasdef@programming.dev 3 points 1 year ago

I guess it depends on what you mean by using monads, but you can have a monadic result type without introducing a concrete monad abstraction that it implements.

[-] qwertyasdef@programming.dev 4 points 1 year ago

At a library level, couldn't you have an opaque sum type where the only thing you can do with it is call a match method that requires a function pointer for each possible variant of the sum type? It'd be pretty cursed to use but at least it wouldn't require compiler plugins.

[-] qwertyasdef@programming.dev 0 points 1 year ago

Really? I would argue that pocket calculators are AI

[-] qwertyasdef@programming.dev 8 points 1 year ago

The behavior is defined; the behavior is whatever the processor does when you read memory from address 0.

If that were true, there would be no problem. Unfortunately, what actually happens is that compilers use the undefined behavior as an excuse to mangle your program far beyond what mere variation in processor behavior could cause, in the name of optimization. In the kernel bug, the issue wasn't that the null pointer dereference was undefined per se, the real issue was that the subsequent null check got optimized out because of the previous undefined behavior.

[-] qwertyasdef@programming.dev 2 points 1 year ago

My main point is that PRQL makes no distinction. If you didn’t inspect that SQL output and already know about the difference between WHERE and HAVING, you would have no idea, because in PRQL they’re both just “filter”.

Hmm, I have to disagree here. PRQL has no distinction in keyword, but it does have a distinction in where the filter goes relative to the aggregation. Given that the literal distinction being made is whether the filter happens before or after the aggregation, PRQL's position-based distinction seems a lot clearer than SQL's keyword-based distinction. Instead seeing two different keywords, remembering that one happens before the aggregation and the other after, then deducing the performance impacts from that, you just immediately see that one comes before the aggregation and the other after then deduce the performance impacts.

As far as removing arbitrary SQL features, I agree that that is it’s main advantage. However, I think either the developers or else the users of PRQL will discover that far fewer of SQL’s complexities are arbitrary than you might first assume.

That's fair, I was just thinking of things that frustrate me with SQL, but I admittedly haven't thought too hard about why things are that way.

[-] qwertyasdef@programming.dev 1 points 1 year ago

What are the implications of WHERE vs HAVING? I thought the only primary difference was that one happens before the aggregation and the other happens after, and all the other implications stem from that fact. PRQL's simplification, rather than obscuring, seems like a more clear and reasonable way to express that distinction.

I don't know if PRQL supports all SQL features, but I think it could while being less complex than SQL by removing arbitrary SQL complications like different keywords for WHERE vs HAVING, only being able to use column aliases in certain places, needing to recompute a transformation to use it in multiple clauses, not forcing queries to be in SELECT... FROM... WHERE... order, etc.

[-] qwertyasdef@programming.dev 2 points 1 year ago

Why would you need to know the eccentricities of SQL? Shouldn't it be enough to just know PRQL? The generated SQL should have the same semantics as the PRQL source, unless the transpiler is buggy.

view more: next ›

qwertyasdef

joined 1 year ago