Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
devit
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
14 ms
·
571.
▲
by
devit
6y ago
You can use the kcmp system call with KCMP_FILE argument to find out if two fds point to the same files structure (of course you must use this as the custom comparison function of a sort algorithm so you don't end up with quadratic run
572.
▲
by
devit
6y ago
You can do most or all of that by reading /proc/<pid>/fdinfo/<fd> and /proc/<pid>/fd/<fd> or by making system calls on the affected fds (which you can do e.g. by injecting code
573.
▲
by
devit
6y ago
That doesn't work with non-copyable types.
574.
▲
by
devit
6y ago
It's wrong because it's useless: you can use inline styles instead (and if you gzip the html it's probably going to be smaller as long as you factor in the framework, since essentially you are using numeric LZ backreferences
575.
▲
by
devit
6y ago
The "absolute risk reduction" and NNT numbers seem pretty useless, since they are in a context where people are trying their best to avoid getting infected with isolation, masks, distancing, etc. Once the vaccine rolls out, people
576.
▲
by
devit
6y ago
Nice, maybe we can start embracing more sensible ways of feeding people that the ridiculously inefficient restaurant model with cooks, servers, individual food choice and individual tables.
577.
▲
by
devit
6y ago
How about making a browser in addition to a "rendering engine for embedding in other applications", in the form of a standalone program and/or a Firefox (desktop and mobile) fork that can use Servo as well as Gecko? You could
578.
▲
by
devit
6y ago
It might be time to introduce a protocol that allows networks to display authentication prompts without needing to MITM HTTP connections. It's not even hard, all that's needed is to add an "authentication URL" field to D
579.
▲
by
devit
6y ago
You can use Firefox mobile and the "Video Background Play Fix" addon to disable the browser APIs that allow the background play blocking antifeature. Alternatively, the NewPipe app available on F-Droid can be used to both play vid
580.
▲
by
devit
6y ago
The alternative is a high chance of becoming ill with COVID, which according to the data available so far is much riskier than the vaccine (1-2% hospitalization risk even for healthy young adults, evidence of long term issues at least in so
581.
▲
by
devit
6y ago
This seems like a feature, not a bug.
582.
▲
by
devit
6y ago
I would expect vaccination to be fully booked for a while, since it's going to be the most important thing in life to do for anyone not suffering from other serious issues and without anti-vaccination beliefs.
583.
▲
by
devit
6y ago
If the author is the sole contributor or asks contributors for copyright assignments, then they can offer a paid license as well for "commercial use".
584.
▲
by
devit
6y ago
The proper solution is using well-designed GraphQL-to-PostgreSQL software like Hasura or PostGraphile. There's no reason to use Rails for that (or, well, use it for anything at all, given the terrible language it's based on and it
585.
▲
by
devit
6y ago
Do you know of any ANC solution that works well (i.e. should be much better than foam earplugs, and preferably remove all sound no matter what) and is usable for sleeping?
586.
▲
by
devit
6y ago
Classical computers can emulate quantum computers, so the title is obviously false.
587.
▲
by
devit
6y ago
The simplest would be to weight one's vote by some non-decreasing function of the number of people who live in the same conurbation. That would partially achieve the outcome and also makes sense, because if someone wants to live in iso
588.
▲
by
devit
6y ago
It's pretty remarkable though that almost half of the US voted for someone who is clearly unsuitable to be president based on his first term. It might be time to consider letting go of the democratic ideal that every person's vote
589.
▲
by
devit
6y ago
That doesn't work because async functions need to be compiled for minimal stack usage (i.e. segmented stacks, packed variables), while non-async functions need to be compiled for minimal CPU usage (i.e. no stack checking or allocation,
590.
▲
by
devit
6y ago
The real issue is the lack of dependent types in Haskell (and unfortunately Rust and all languages with a vast ecosystem). With dependent types, you can just include a type-level proof that x <= 5 in the integer wrapper type, which then
591.
▲
by
devit
6y ago
This is just a tooling problem that can be solved trivially by having release builds build multiple binaries by default, for all the major extension profiles.
592.
▲
by
devit
6y ago
Yes, except for array bounds checking when it cannot be elided by compiler optimizations.
593.
▲
by
devit
6y ago
The best choice is Rust: as fast and efficient as C++, and more expressive than Java.
594.
▲
by
devit
6y ago
The basic difference is that free software is made by people who strive to write perfect software, while non-free software is made by people who strive to continue receiving a wire transfer at the end of the month by people who strive to be
595.
▲
by
devit
6y ago
If you have to drive despite this, you probably should ensure to have a supply of caffeine in the car (e.g. caffeine gums, instant coffee, maybe energy drinks) and take a sufficient dose before driving [ https://www.psychologicals
596.
▲
by
devit
6y ago
Pretty sure that either the user is not aware at all of the scraping, or anyway the scraping is not done in the user's interest and the user is not in a position to fully understand the implications, so it is a clearly malicious operat
597.
▲
by
devit
6y ago
No, Visual Basic 6 can only place controls by X/Y position, has no databinding and no VDOM or way to create controls other than placing them in the designer or manually creating and destroying them in code. It's pretty terrible un
598.
▲
by
devit
6y ago
LLVM undef does not mean "undefined behavior", it means that it's OK to transform any use of it into the use of an arbitrary value (potentially different, unless the freeze instruction is used). To get undefined behavior, you
599.
▲
by
devit
6y ago
I mean taxes on all carbon emissions should be raised (if airlines already pay them, otherwise airlines should pay them - also "taxes" can be replaced with a cap-and-trade scheme).
600.
▲
by
devit
6y ago
Often plane tickets are cheaper than any other means of transportation, even if you ignore travel time and convenience. If such a carbon reduction is desirable, then taxes on air travel need to be raised.
More ›