Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
qalmakka
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
21 ms
·
271.
▲
by
qalmakka
3y ago
It's terrible, and we IMHO owe that to some introductory university courses to Java (plus some Win32 veterans). I got very close to being rejected by a professor that was obstinately convinced that Unicode "characters" were 2
272.
▲
by
qalmakka
3y ago
> my pretty up-to-date compilers > testing Debian bookworm Debian and up to date compilers - pick one. <format> support comes with GCC 13.x, which has been released more than 3 months ago. MSVC has had it for years now, LLVM is
273.
▲
by
qalmakka
3y ago
iostream _sucks_, I had to implement an iostream for zlib + DEFLATE in order to play ball with an iostream-based library, and I had to sweat blood and tears in order to make it work right when a simple loop and a bit of templated code would
274.
▲
by
qalmakka
3y ago
This. I have corrected uncountable lines of code where people just used "%d" for everything, potentially opening a massive can of worms. `inttypes.h` is what you should be using 99% of the time, but that makes for very ugly format
275.
▲
by
qalmakka
3y ago
Again, you're mixing functions up. `std::print` is the equivalent to "std::fprintf", the one you want to write on random buffers is `std::format_to_n`, which IS a strictly better version of `snprintf`.
276.
▲
by
qalmakka
3y ago
> std::format returns std::string. Won't use just use `std::format_to_t` then and format to whatever your heart desires, without ever allocating once: std::array<char, 256> buf{}; std::format_to_n(data(buf), size(bu
277.
▲
by
qalmakka
3y ago
I think spez completely forgot about the fact they had a way to export data as JSON everywhere. That's basically 80% of what a reddit client needs and basically all an LLM model needs for training.
278.
▲
by
qalmakka
3y ago
If we were set on banning all of the features C++ abused from new languages, we would probably end up writing just empty brackets.
279.
▲
by
qalmakka
3y ago
BS. I thought that Java already demonstrated to the world how dumb it is to disallow operator overloading altogether. Allowing ANY operator to be overloaded was dumb, like C++ did, where you could do batshit crazy stuff like overloading una
280.
▲
by
qalmakka
3y ago
... Except the fact that printf/scanf use variadics, and the only reason why it stopped being a constant source of crash is the fact that compilers started recognizing it and validating format strings/complaining when you pass a n
281.
▲
by
qalmakka
3y ago
Deref for Vec<T> and String is fine because they are owning containers that decay to their "view" types (slices). Strings and vectors own memory, while views borrow it and can be used to operate on them without reallocating
282.
▲
by
qalmakka
3y ago
I've been playing this ( https://wheretakenusa.teuteuf.fr/ ) for a while now, it's nice albeit a bit hard at times. There's also a worldwide version.
283.
▲
by
qalmakka
3y ago
> unless we have a new C++ front made in zig Writing a C++ compiler is several order of magnitude more complicated than writing a C, Java, Go or Zig compiler. There's a very good reason there are only 3 in existence despite how ubiq
284.
▲
by
qalmakka
3y ago
This comment makes me think you haven't used a modern Linux DE in a while. TDE is not, by design, one. IMHO GNOME looks more modern and refreshing (and definitely more innovative) than macOS or Windows. Sure, its UX is debatable, but n
285.
▲
by
qalmakka
3y ago
It's probably to avoid conflicting with potentially existing user-defined groups. The underscore in the C/UNIX world has an intrinsic meaning of "implementation reserved", so it's your fault if the new group conflic
286.
▲
by
qalmakka
3y ago
I think Apple would never tolerate that. I can see them lobbying political parties in order to sabotage EU cohesion if that gets proposed.
287.
▲
by
qalmakka
3y ago
> so that the programmer deals with characters instead of bytes This is a broken approach and a broken mindset. Modern languages like Rust (Python is not modern anymore, it is ATM 33 years old which is older than C was in 1990) reverted
288.
▲
by
qalmakka
3y ago
This. Medium scale is what Python excels at - the sweet spot is IMHO between 3K-10K lines. Above that and you start running into sore points (performance, no parallelism, too much dynamic typing, ...) and you maybe start looking into writin
289.
▲
by
qalmakka
3y ago
I don't know, the more time passes the more I convince myself that the net benefits of antivirus software do not (an maybe never) exceed their downsides. In decades I've heard so many stories about AV software behaving suspiciousl
290.
▲
by
qalmakka
3y ago
> your ad hoc script has to become a full-fledged program The very second a quick and dirty script grows into a full-fledged program, it immediately becomes technical debt.
291.
▲
by
qalmakka
3y ago
> pipes In Perl you can just run commands using backticks or qx// and get their output, and so you can pipe them in any way you want: my @a = map { chomp; $_ } `ls -1 | sort | uniq` You can otherwise use `open` to spaw
292.
▲
by
qalmakka
3y ago
Nobody cares about them, I am afraid. Most people _really_ can't accept that you can't work on Unicode like you did with ASCII, and do not want to let go of their old C habits (like iterating char by char and doing something).
293.
▲
by
qalmakka
3y ago
Python and Perl areas of strength do not overlap, IMHO. Python is great to write well structured programs with modules, well defined classes, etc. Perl is great to glue stuff together in place of shell scripts. I see way too often people at
294.
▲
by
qalmakka
3y ago
> how would I properly iterate through Unicode? Either you use a (big, complex) library like ICU or you just don't. People have been thought for too long that strings are arrays of characters - they are not, they are array of bytes,
295.
▲
by
qalmakka
3y ago
wchar_t is a massive mistake that came from an era (the '90s) where people wanted to delude themselves they could keep ASCII-like code ergonomics (iterating, random access, ...) by just changing character types. It was a stupid mistake
296.
▲
by
qalmakka
3y ago
This is ALWAYS broken on unicode. It only makes sense in ASCII and with alphabets similar to the Latin alphabet.
297.
▲
by
qalmakka
3y ago
The gist of unicode is that code like const char *const end = str + strlen(str); for (const char *it = str; it < end; ++i) { .. } is almost always wrong unless your locale is C and you explicitly say you only work with ASCII.
298.
▲
by
qalmakka
3y ago
I have a strong suspicion you are using hardware acceleration for H264, while the VPx codecs are all being encoded in software. IMHO the most pressing issue I have with h264 is that it creates files that are almost always larger than HEVC (
299.
▲
by
qalmakka
3y ago
As much as I try understanding it, I don't see the point of this standard honestly. It sounds like some weird fanfiction made by delusional people who think SQL is actually a single language and not a hodgepodge of incompatible dialect
300.
▲
by
qalmakka
3y ago
The reports of Pirate Bay's death have been grossly exaggerated.
More ›