Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
o11c
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
27 ms
·
391.
▲
by
o11c
1y ago
Cancellation is just an exception, so destructors work automatically . Any implementation of a language that uses RAII without integrating cancellation into it is fundamentally broken and should be avoided at all costs. `pthread_cleanup_pu
392.
▲
by
o11c
1y ago
Ah yes, the old "just write non-buggy code, or at least code whose bugs are deterministic". My solution just silently sits in the background for unexpected , unpredictable bugs.
393.
▲
by
o11c
1y ago
It's standard, it's persistent, and it automatically handled by well-formed code. What's missing?
394.
▲
by
o11c
1y ago
For the (brief) C comparison, I'm really not sure why this talks about `pthread_kill` but not `pthread_cancel` ...
395.
▲
by
o11c
1y ago
I actually tried rewriting this in Python, but gave up since Python's startup latency is atrocious if you have even a few imports (and using a socket to a pre-existing server is fundamentally unable to preserve enough process context
396.
▲
by
o11c
1y ago
FWIW, I've grown the following which handles a few more cases. For some reason I wasn't aware of `caller` ... set -e is-oil() { test -n "$OIL_VERSION" } set -E || is-oil trap 'ec
397.
▲
by
o11c
1y ago
I didn't mention "porn", and there's a reason I included domestic violence simulations in list of specific things they're targeting; when phrased like that it sounds like a reasonable category to ban. I haven't
398.
▲
by
o11c
1y ago
Honestly, just `:set cursorcolumn` is far more useful. Less distractions at the moment of change, but still visible if you alt-tab back.
399.
▲
by
o11c
1y ago
Are they actually banning "everything" though? From what I can see, that's entirely clickbait fraud.
400.
▲
by
o11c
1y ago
There's a lot of dishonesty relating to this. This really isn't about Puritanism, unless you're redefining Puritanism to mean having any morality at all. Do you really want to compel selling access to pedo games? Do you r
401.
▲
by
o11c
1y ago
Every repo that tries that ends up broken. I've looked at a lot of them. Also, any use of hard tabs breaks diffs, which should make tabs a non-starter.
402.
▲
by
o11c
1y ago
There absolutely is a consensus: a hard tab is defined as 8 spaces in numerous standards (obviously this only applies to monospace fonts). The fact that people choose to reject this does not change the reality.
403.
▲
by
o11c
1y ago
`SIGCHLD` is extremely unreliable in a lot of ways, `pidfd` is better (but Linux-specific), though it doesn't handle the case of wanting to be notified of all grandchildren 's terminations after the direct child dies early.
404.
▲
by
o11c
1y ago
That's `sysconf(_SC_OPEN_MAX)`, but it is always an bug to close FDs you don't know the origin of. You should be specifying `O_CLOEXEC` by default if you want FDs closed automatically.
405.
▲
by
o11c
1y ago
It is always a bug to call `closerange` since you never know if a parent process has deliberately left a file descriptor open for some kind of tracing. If the parent does not want this, it must use `O_CLOEXEC`. Maybe if you clear th
406.
▲
by
o11c
1y ago
And X11 is all the better now that fewer people are working on it. I don't need new features in my windowing system, I just need it to stay out of my way.
407.
▲
by
o11c
1y ago
It's called a minimal example. You can easily get nontrivial real-world versions, such as "All vowels or all uppercase" or "Three letters, at least two of which are A's". It is not reasonable to expect the user
408.
▲
by
o11c
1y ago
Well, technically ... if your dialect supports capturing groups, there's technically a non-commutativity anyway. Assuming input is "ab", /(a)b|a(b)/ produces \1=a, \2=<missing> /a(b)|(a)b/ prod
409.
▲
by
o11c
1y ago
Does this apply even for iframes, or not?
410.
▲
by
o11c
1y ago
The main disadvantage of this is that most encryption libraries don't support serializing their state.
411.
▲
by
o11c
1y ago
Checklists are usually for repeatable activities (or at least similar-enough ones).
412.
▲
by
o11c
1y ago
People keep saying this, yet infinite real-world experience shows that systems perform far better if the OOM Killer actually gets to kill something, which is only possible with swap disabled. In my experience, the OOM killer picks the rig
413.
▲
by
o11c
1y ago
Note that I'm only talking about package-building itself here, not the practical distributions built thereupon; if that is considered, the tradeoffs are quite different. IMO the deb-using world is more useful than the rpm-using world,
414.
▲
by
o11c
1y ago
An ivory tower answer. All those arguments would be useful if we somehow could avoid the fact that the system will use it as "emergency memory" and become unresponsive. The kernel's OOM killer is broken for this, and user
415.
▲
by
o11c
1y ago
The native Debian package tooling is very far from sane, even compared to other distros - and they actively refuse to make it saner (instead just adding layers of cruft without addressing the core problems). You're probably best off us
416.
▲
by
o11c
1y ago
That actually is a pretty big difference. Assuming you're sane and have swap disabled (since there is no way to have a stable system with swap enabled), a program that tries to allocate all memory will quickly get OOM killed and the sy
417.
▲
by
o11c
1y ago
Then just use an rpath with `${ORIGIN}` and ship your .so files along with your binary. The only time where you shouldn't do this is if your executable requires setuid or similar permission bits, but those generally can only reasonably
418.
▲
by
o11c
1y ago
Hm, this made me wonder about the use of XXX as a label for alcohol bottles in cartoons. It turns out it refers to "moonshine that has been distilled 3 times, reaching very high alcohol content".
419.
▲
by
o11c
1y ago
Counterpoint: if you detect a human accountant doing this, you can take action against the human. Computers will never meaningfully take the blame, and unfortunately usually mean not blaming any human either.
420.
▲
by
o11c
1y ago
It could also be to prevent overstimulation; "maximize energy" is not really the goal. A lot of plants can die from too much Sun unless their other inputs are just right (plenty of water, etc.).
More ›