Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
pornel
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
25 ms
·
271.
▲
by
pornel
1y ago
Apple already has excellent x86 emulation. But Apple has locked-down GPU with a proprietary API that adds another unnecessary translation layer where it hurts more.
272.
▲
by
pornel
1y ago
Compilers inline everything they can. Partly it's due to lack of better ideas for effective inter-procedural analysis and specialization, but it could also be a symptom of working around the cost of ABIs.
273.
▲
by
pornel
1y ago
It's even worse with The Matrix where nobody is even sure any more how it was supposed to look, except definitely not as green as the DVD release. Noodle made a charming video about going mad researching this: https://www.yo
274.
▲
by
pornel
1y ago
1. Amdahl's law 2. That's a language feature too. Writing non-trivial multi-core programs in C or C++ takes a lot of effort and diligence. It's risky, and subtle mistakes can make programs chronically unstable, so we've
275.
▲
by
pornel
1y ago
If you're a junior now, and think your code is worth stealing, it's probably only a matter of time before you gain more experience, and instead feel sorry for everyone who copied your earlier code (please don't take it person
276.
▲
by
pornel
1y ago
Fil-C uses `free()` to mark memory as no longer valid, so it is important to keep using manual memory management to let Fil-C catch UAF bugs (which are likely symptoms of logic bugs, so you'd want to catch them anyway). The whole point
277.
▲
by
pornel
1y ago
Fil-C will crash on memory corruption too. In fact, its main advantage is crashing sooner . All the quick fixes for C that don't require code rewrites boil down to crashing. They don't make your C code less reliable, they just ma
278.
▲
by
pornel
1y ago
It depends how much the C software is "done" vs being updated and extended. Some legacy projects need a rewrite/rearchitecting anyway (even well-written battle-tested code may stop meeting requirements simply due to the world
279.
▲
by
pornel
1y ago
Lack of DC fast charging makes the range even more limiting. It takes 2.7 hours to add another 150 miles. Modern EVs can add 150 miles of range in 10-15 minutes.
280.
▲
by
pornel
1y ago
Debian's tooling for packaging Cargo probably got better, so this isn't as daunting as it used to be. Another likely thing is understanding that the unit of "package" is different in Rust/Cargo than traditionally in
281.
▲
by
pornel
1y ago
The GCC backend makes Rust for Dreamcast work: https://www.dreamcast.rs/ (not relevant to Debian, but cool that it's already possible)
282.
▲
by
pornel
1y ago
You don't really need 8K for gaming, but upscaling and frame generation have made game rendering resolution and display resolution almost independent.
283.
▲
by
pornel
1y ago
Extra "wasted" capacity has many benefits for EV battery packs. It allows distributing load across more cells. It allows using cells with a lower C-rating, which typically have better energy density, and longer lifespan. Distribut
284.
▲
by
pornel
1y ago
The code needs to pass integrity checks of the safe Rust subset, which is a different challenge than writing dangerous code without feedback.
285.
▲
by
pornel
1y ago
Nothing in the C standard requires bytes to have 8 bits either. There's a massive gap between what C allows, and what real C codebases can tolerate. In practice, you don't have room to store lengths along pointers without disturbi
286.
▲
by
pornel
1y ago
Note that Fil-C is a garbage-collected language that is significantly slower than C. It's not a target for writing new code (you'd be better off with C# or golang), but something like sandboxing with WASM, except that Fil-C crashe
287.
▲
by
pornel
1y ago
You seem to think of "rust enthusiasts" as some organized group with a goal of writing Rust for the sake of it. Rust is long past such extremely early adopter phase. What you're seeing now is developers who are interested in
288.
▲
by
pornel
1y ago
That's non-sequitur. The problem here is that C is too basic, dated, with inadequate higher-level abstractions, which makes writing robust and secure software extra difficult and laborious. "Learning underlying hardware" does
289.
▲
by
pornel
1y ago
It's not a single return type T that is a sum type. It's two control flow paths returning one type each, and that's a major difference, because the types and control flow are complected together in a way that poorly interacts
290.
▲
by
pornel
1y ago
Either is another name for a Result type. Either works, but now you have two ways of returning errors, and they aren't even mutually exclusive (Either-retuning function can still throw). Catch-and-wrap doesn't compose in generic c
291.
▲
by
pornel
1y ago
You've discarded the error type, which trivialised the example. Rust's error propagation keeps the error value (or converts it to the target type). The difference is that Result is a value, which can be stored and operated on lik
292.
▲
by
pornel
1y ago
For Turing Complete languages everything is just a syntactical issue (Turing Tarpit).
293.
▲
by
pornel
1y ago
https://xkcd.com/1987/
294.
▲
by
pornel
1y ago
That would be true if the society was already perfectly fair and neutral (which some people believe). However, there is racism and sexism in the world (it's systemic , in a sense it's not about one person not liking another perso
295.
▲
by
pornel
1y ago
OTOH Leaf is a proof that old batteries can be replaced and upgrade an old car. Original Leafs were sold with a 24kWh capacity. Current ones have 48kWh for the same price, and 64kWh replacement batteries are available. So you can go from
296.
▲
by
pornel
1y ago
It's functionally tolerable when you disable transparency and increase contrast in accessibility settings. Of course it makes everything look dull and primitive. Crammed and misaligned controls are even more obvious when elements have
297.
▲
by
pornel
1y ago
It would be a waste of effort to adopt Liquid Glass now. Even Apple hasn't figured it out yet. The new UI breaks existing conventions, and isn't even self-consistent. You're not helping users by jumping into that chaos.
298.
▲
by
pornel
1y ago
Advancements in lighting can help all games, not just AAA ones. For example, Tiny Glade and Teardown have ray traced global illumination, which makes them look great with their own art style, rather than expensive hyper-realism. But current
299.
▲
by
pornel
1y ago
It's also a communication problem, because labels like "100-year/1000-year event" are easily misunderstood. * they're derived from an estimated probability of the event (independently) happening each year. It does
300.
▲
by
pornel
1y ago
reserve() reallocates by at least doubling the capacity. reserve_exact() reallocates by exactly what you ask for. If you reserve() space for 1 more element a 1000 times, you will get ~30 reallocations, not 1000. This inexact nature is usefu
More ›