Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
maleldil
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
54 ms
·
1081.
▲
by
maleldil
5y ago
Type hints just make everything so much easier. When you're writing a function, you _know_ that parameter is an int, or float, or something you can use a list comprehension on (iterable). Why not just say it right there in the function
1082.
▲
by
maleldil
5y ago
What's the use case for Attrs in a post-dataclasses world? I use dataclasses all the time, and I've never felt the need to reach for Attrs. What am I missing out on?
1083.
▲
by
maleldil
5y ago
To be fair, people don't often challenge that. I usually say "It's how I'm used to doing it, but I'd be happy to hear a better alternative". I don't think anyone ever offered one.
1084.
▲
by
maleldil
5y ago
You completely missed my point. Both my examples were when a function returned an object, and the caller has no idea whether that object ever null. It has nothing to do with parameters. For what it's worth, I completely disagree with y
1085.
▲
by
maleldil
5y ago
The int example was a bit misguided, seeing as int is a primitive type in Go, different from pointer types. In Python, both are references. Basically, it's the difference between returning None from a function `def f() -> MyClass` i
1086.
▲
by
maleldil
5y ago
C++11 was a huge shift in how C++ is written, and term coined for "code written using the new techniques" was "Modern C++". Whether you think that term should instead mean "the latest C++ version" is a differen
1087.
▲
by
maleldil
5y ago
I don't see how that's any different from normal method calls, though. If you don't know what `a + b` does for an arbitrary type, why would you know what `a.add(b)` does? Overloaded operators and methods are all just operatio
1088.
▲
by
maleldil
5y ago
amedvednikov only sounds heroic if this is first time you've heard about him or the criticisms towards him over the years. To those who've heard of him before, he's just a conman. Make no mistake, this is just one of his many
1089.
▲
by
maleldil
5y ago
It doesn't appear to have a CLI, which is the whole point of jq
1090.
▲
by
maleldil
5y ago
`man entr` has an example for dealing with new files using the `-d` option: $ while true; do ls src/*.rb | entr -d make; done
1091.
▲
by
maleldil
5y ago
If you have A -> B -> C -> A, then you need all three of A, B and C to be defined if you're going to use any one of those modules. When that's the case, the only thing you're gaining by using modules is the organisat
1092.
▲
by
maleldil
5y ago
Why create a venv and then run poetry install? Poetry already manages virtual environments.
1093.
▲
by
maleldil
5y ago
> Where C++ gives you many slightly different takes on the same concept (e.g. unique_ptr, shared_ptr and raw pointers), C gives you one way to go and that one has a conveniently compact notation (such as float ). You use unique_ptr and s
1094.
▲
by
maleldil
5y ago
It does, though. Well, hypomania at least; I've never experienced mania. Don't get me wrong, I wouldn't have a single day of hypomania for the rest of my life if I could help it, but it _does_ make you more productive for a s
1095.
▲
by
maleldil
5y ago
I don't think so. It's based on argparse, while Click uses optparse. Gooey works with Fire, though.
1096.
▲
by
maleldil
5y ago
I think you're confusing things. A difference between the number of written characters and the number of phonemes doesn't make a language "non-phonetic" if you mean consistency between spelling and pronunciation. What ma
1097.
▲
by
maleldil
5y ago
> I write most often in english because nobody reads french compared to english The irony.
1098.
▲
by
maleldil
5y ago
If you need to stay away from the GC because of some practical reason, you can always write C/C++/Rust. You implied that this is a frequent situation when it isn't. Your example of "anything with a UI" was quite a b
1099.
▲
by
maleldil
5y ago
How does that matter? You said "game development", not "writing a game engine". You said "data analysis", not "writing linalg algorithms", in which case we'd all have to bow to Fortran anyway. Yo
1100.
▲
by
maleldil
5y ago
> not only well designed JS, and its multitude of foot-guns, is not something I would call 'well designed'.
1101.
▲
by
maleldil
5y ago
It's an introductory course. The goal isn't to train students to be able to do all those things. I'd wager most professional programmers aren't able to do more than a couple of them well. There's more to front-end&#
1102.
▲
by
maleldil
6y ago
Parent referred to int64. BigInt and int64 are not the same thing. JS doesn't have integers; all numbers are represented as doubles. One of the reasons having actual integers is important is performance, as integer operations are often