Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
leni536
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
40 ms
·
601.
▲
by
leni536
4y ago
While it is cool and useful, it is unsound. https://mypy-play.net/?mypy=latest&python=3.10&flags=strict&... https://www.online-python.com/V5YRZJAWlk
602.
▲
by
leni536
4y ago
Honestly, for a brand new name service I would just stick to ASCII to sidestep the whole issue.
603.
▲
by
leni536
4y ago
I do prefer references, because they can't be null. It is less state to worry about. I agree that not having explicit out-parameters makes this a trade-off. It is possible to use an out-parameter wrapper type to get the best of both wo
604.
▲
by
leni536
4y ago
I would advice against using __COUNTER__ or macros based on that in header files. It's an ODR-violation footgun.
605.
▲
by
leni536
4y ago
Many standard containers don't have noexcept move operations in Microsoft's implementation. It is conforming. Having a throwing move doesn't mean that you can't have exception guarantees. Just do the throwing operations
606.
▲
by
leni536
4y ago
const-by-default is definitely nice. Does this extend to both sides of a pointer type? Does int * refer to int const * const? There is nothing wrong with [&] for short-lifetime lambdas. Lambdas passed to std algorithms or immediately in
607.
▲
by
leni536
4y ago
I don't get it, just use `list<person>`. The prev and next pointers live next to the person objects right in the same node, no need for intrusive pointer. edit: The author assesses that this is somehow bad for person objects that
608.
▲
by
leni536
4y ago
Funny you mention quicksort, as qsort in libc is not guaranteed to be implemented by quicksort. So that's an other poor naming.
609.
▲
by
leni536
4y ago
AFAIK it's newer android storage API limitations that they did't work around yet.
610.
▲
by
leni536
4y ago
> Basically measure testosterone levels of out door laborers and indoor laborers. This is very susceptible to various biases.
611.
▲
by
leni536
4y ago
As far as I remember, I signed up without a phone number, and got immediately locked out. I could get access back by providing my number. I wrote to support that I would rather not use Twitter than giving my number. They unlocked my account
612.
▲
by
leni536
4y ago
> Imagine if an airline overbooked/cancelled on you and just said fuck off, find a new flight, here's your credit. You don't have to imagine. This happens quite regularly with Wizzair nowadays.
613.
▲
by
leni536
4y ago
Sorry, it was meant as an example for that, not as a counterpoint. I did solve the field without guessing, so it wasn't a problem.
614.
▲
by
leni536
4y ago
Once I had a field where the last place to uncover was completely surrounded by mines, revealing the digit 8 underneath.
615.
▲
by
leni536
4y ago
I also prefer Linux, but Windows ships ssh nowadays. Even ssh server, but arguably that's way less useful than an ssh server on any other OS.
616.
▲
by
leni536
4y ago
Last I checked, you can't do that on more recent models, can you?
617.
▲
by
leni536
4y ago
Sometimes (definitely not always) you can use std::function instead for dynamic polymorphism.
618.
▲
by
leni536
4y ago
Looks like a good way to drift from the clock and eventually skip frames.
619.
▲
by
leni536
4y ago
Ah, I thought it was line-buffered, but apparently I was wrong.
620.
▲
by
leni536
4y ago
cerr should flush on \n too by default, AFAIK.
621.
▲
by
leni536
4y ago
> This is the only UB here. That's debateable. 1. new[] doesn't return a pointer that is suitable for storage for the objects. Yes the objects are empty (only contain padding), but that doesn't absolve from UB. 2. "&q
622.
▲
by
leni536
4y ago
Yes, dereferencing past the end is not fine, but the address itself is.
623.
▲
by
leni536
4y ago
Nit: one past end of an array is actually fine as an address.
624.
▲
by
leni536
4y ago
""[1] is not the termination byte, it's the byte after that. Its address is taken there with &, which yields a const char*. The (char *) cast is only there to cast away const.
625.
▲
by
leni536
4y ago
This program is undefined, so no, except maybe if you can make the compiler itself to crash.
626.
▲
by
leni536
4y ago
No, it's the address past the end of the array {'\0'}.
627.
▲
by
leni536
4y ago
I get how this works, but this has undefined behaviour at multiple places.
628.
▲
by
leni536
4y ago
Wasn't xmpp support dropped years ago?
629.
▲
by
leni536
4y ago
> Maybe what they need to do is scrap the existing disparate cancer screening databases and create a new centralised one. Like they did for covid. The hard part is probably migrating all the existing data. It'smuch easier if you can
630.
▲
by
leni536
4y ago
Add a new account, set protocol to "None (SMTP only)", set it up.
More ›