HN user

pornel

24,120 karma

https://kornel.ski

@mastodon.social/@kornel

Posts34
Comments4,779
View on HN
mozillagfx.wordpress.com 8d ago

HDR video in Firefox for Windows tech retrospective

pornel
1pts0
seri.tools 6mo ago

Rust9x update: Rust 1.93.0-beta

pornel
5pts0
datatracker.ietf.org 1y ago

Shared Brotli Compressed Data Format (multi-file archive format)

pornel
2pts1
tmpvar.com 2y ago

Radiance Cascades PoC

pornel
2pts1
quuxplusone.github.io 2y ago

Escape analysis hates copy elision (2021)

pornel
122pts53
davidlattimore.github.io 2y ago

Making Rust supply chain attacks harder with Cackle

pornel
3pts0
gpuopen.com 2y ago

Developer Updates on AMD FidelityFX Super Resolution 3

pornel
1pts0
danakj.github.io 3y ago

Why Subspace (an experimental, safer, simpler C++ standard library)

pornel
2pts0
www.propublica.org 3y ago

Porn, Piracy, Fraud: What Lurks Inside Google’s Black Box Ad Empire

pornel
11pts0
pcwalton.github.io 3y ago

`Cxx-Async`

pornel
2pts0
krebsonsecurity.com 4y ago

Who Wrote the Alphv/BlackCat Ransomware Strain?

pornel
1pts0
blog.sunfishcode.online 4y ago

Rust programs written entirely in Rust

pornel
159pts56
quuxplusone.github.io 5y ago

Escape analysis hates copy elision (2021)

pornel
1pts0
www.wired.com 5y ago

How Google Influences the Conversation in Washington

pornel
12pts2
cor3ntin.github.io 6y ago

The Day the Standard Library Died

pornel
2pts0
matklad.github.io 6y ago

Why Is Rust the Most Loved Programming Language?

pornel
3pts0
fosdem.org 6y ago

Modern Database Engineering with Io_uring

pornel
48pts0
www.ralfj.de 7y ago

“What the Hardware Does” Is Not What Your Program Does: Uninitialized Memory

pornel
124pts169
vorner.github.io 7y ago

Rust in Avast

pornel
4pts0
donationsfrom.tech 8y ago

Tech company PAC donations

pornel
1pts1
github.com 8y ago

A foreign function interface for bash

pornel
1pts0
timkadlec.com 8y ago

How Fast Is Amp Really?

pornel
5pts1
www.chiark.greenend.org.uk 8y ago

The advantages of the PuTTY key format

pornel
2pts0
boats.gitlab.io 8y ago

What I would mean when I say “Rust is explicit”

pornel
5pts0
liberapay.com 8y ago

Liberapay recurrent donations platform

pornel
3pts0
www.blog.google 8y ago

Dynamic Hybrid-SMR: an OCP proposal to improve data center disk drives

pornel
1pts0
gitlab.com 9y ago

PHP7 to ES7 syntax translator

pornel
2pts0
www.engadget.com 9y ago

Google's next trick for Android is 'copyless pasting'

pornel
2pts0
everyweeks.com 9y ago

SUPER SCATTERBRAINED ELYSIAN WRITEUP 9000 (making of a 56KB Demo)

pornel
2pts0
blog.golang.org 10y ago

Language and Locale Matching in Go

pornel
1pts0

Heck yes!

I don't get why USA wants to keep losing money on sustaining failed uncompetitive zombie companies. The companies that decided to lose long term competence for short-term gains need to go bankrupt (you've had EV-1, but decided to drill, baby, drill). The greedy shareholders that rewarded destructive value extraction need to lose money, instead of getting a soft exit at taxpayer's expense.

If you want to give a subsidy, give it to something that will modernize and expand manufacturing, not to prolong death of companies whose entire R&D strategy is inventing new subscriptions for old car components.

I think legislation could quite sensibly require OSes and browsers to have easy to enable well-integrated parental controls (which mostly already exists). Browsers could voluntarily send "I'm a child" flag, if you want to make it every website's problem.

But the current legislation is stupid. Treating toddlers like hackers, and forcing every website to deanonymize users. It is so backwards, that it's hard to believe it's not done on purpose as the first step to ban anonymity and strictly control all online access. In the UK of course they're already talking about having a VPN ban, because the hacker toddlers are learning how to mask their IP addresses.

But that's the thing - people can live with the contradictions. You can find people at a gas station who will totally agree that air pollution and CO2 emissions are killing people, but still fill up the tank.

I get that it makes less efficient resistive heating more economical, but the tank size seems like a red herring. If you go for a heat pump you can have a larger tank anyway, and heat it during the solar peak too. A larger tank will allow you to store water at a lower temperature (instead of hotter water to be diluted). Smaller delta makes heat pump more efficient and heat loss slower.

And prove you're not a child by handing over your ID or selfie to a company that Values Your Privacy according to their price list.

Microsoft will snitch your Windows install GUID when you connect through a VPN.

If you make your connection too anonymous, Google's recaptcha will not let your through until you use your mobile phone to prove your humanity, which knows your phone number (which in many countries can't be obtained anonymously, you burner-phone terrorist).

Use cargo tree to understand Rust/Cargo deps.

The lock format is a multi-line TOML, with a varying number of lines per dep due to redundantly listing deps-of-deps, so a naive line count massively overstates the number.

Cargo.lock contains many unused dependencies, because it's a superset of all combinations of all optional/disabled features of all transitive deps across all possible platforms (so that the deps don't reshuffle even if you enable/disable feature flags or compile on another platform). But that means Cargo.lock is going to have 3 async runtimes even if you use one. It's going to have syscall definitions for RedoxOS and wrappers for WASM, because some dep of dep is compatible with those platforms. But these deps won't even be downloaded if you don't build for these platforms.

The number you got presented is not representing the unit you're insinuating. A crate in Rust is a compilation unit. It's common for projects to ship as a collection of many crates. It's a smaller unit than what C counts as one dependency, and slightly coarser than an .o file. I don't see people freaking out by how many .o files their projects have, including all transitive ones from deps like openssl or curl.

I suspect we'll move away from pull requests, because in the LLM world they're the worst way of accepting a contribution.

Verbose slop is painful to review, and it's dangerous to accept unreviewed code from a stranger.

For a maintainer it's way easier to tell their own agent to reimplement the same idea. It's still slop, but done their way, under their supervision.

For popular projects agent-made pull requests become a DoS attack. I wouldn't be surprised if projects start refusing to accept unsolicited PRs and switch to "don't call us, we'll call you". You could have an agent scanning forks of your projects to find what bugs users are fixing and what features they're adding, and use it as a roadmap, without the pressure of accepting any particular commit as-is.

I'd also like to move away from a binary merged-not-merged divide. Projects may have a stable manually-reviewed core that should be protected from agents messing it up, while allowing the sloppy parts to churn however LLMs like it.

Now you have to take your eyes off the road and look through three screens to find a new icon that showed up somewhere. Then keep not looking at the road and tap though multiple layers of settings screens to dismiss the false positive.

Car makers are chronically awful at making software, and regulations that force them to write more such software are doomed to suck.

Everything you can capture with Flipper has off-the-shelf cheap simple components you can find in your DIY electronics/maker store: IR leds, 433Mhz antennas. Seeed xiao is also small enough that you can stuff it and a relay into appliances and simulate button presses.

LLM agents have plenty of "bad habits" that are impossible to get rid of. I suspect they're a side effect of reinforcement learning. Training objective rewards fewer tokens, so the results just need to be good enough most of the time while cutting as many corners as possible.

Similarly, I'm trying to stop agents "gracefully" handling errors by stuffing results with empty junk and continuing (get_list_of_problems().unwrap_or_default() -> "no problems found!"). I've filled AGENTS.md with "fail closed", "extremely strict error handling", "no fallbacks", "don't use sentinel values", and hundreds of variations of these, but they work about as well as "do not hallucinate". I get "You're absolutely right, this will cause problems!" and the fix is "changed to Err(_) => String::new()", I suspect it's another case of gaming RL - failing early and loudly increases the chance of failing and being penalized. So fudging data, ignoring errors, and presenting a barely-working result is a better strategy overall. When it fails, it fails anyway, but as long as it stumbles to the finish line it has a non-zero chance of getting accepted by the RL judge.

Apple used to know this. They've had animations after items were dismissed, but avoided animations before showing an item.

Old Apple understood design is more than making things pretty. The glassy Apple is all about how it looks in a demo.

But you can just use very similar structures yourself in C programs! You can prevent problems in C as well by construction, even when the compiler does not enforce it.

Enforcement is the point. Otherwise you're just saying people should be writing bug-free programs. "By construction" doesn't mean it's possible to construct a program satisfying a requirement, but that the compiler ensures it's impossible to violate it.

Even for a hypothetical perfectly diligent flawlessly executing programmer it's a time saver. If you want to run a 3rd party function across threads: in Rust, the compiler tells you if it's thread-safe or not, tracing through all dependencies, callbacks, checking data structures, mutexes, ref counts, etc.

And it works the other way, if I change a function that used to be thread-safe to do something unsynchronised, it won't compile any more in users' multi-threaded programs, instead of silently screwing them. Their code may have been perfectly correct before the change, and I couldn't feasibly track down everyone using my function before making a change, but having invariants in the type system automates this checking and communication.

Just look at some of the bugs found in Rust, it is just the same old nonsense as everywhere

You're comparing your perfect self who writes flawless C on the first try with some random guy's library.

Properly designed Rust written by flawless Rust programmers is also bug-free.

Language safety is a human problem (exists to catch mistakes), and it's hard to sensibly argue whether your imaginary average C programmer is better than mine.

Rust's claims aren't absolute, so aren't disproven by a single counter-example (https://infosec.exchange/@littlealex/116838684458539473)

It's better to look at broader data, e.g. https://github.com/rust-fuzz/trophy-case - look how much lower typical severity is there.

And you can look at data from Google where they track drop in defect density in Android as it gets rewritten in Rust. I know all these top engineering companies just aren't as flawless as you are, and that's okay, Rust is for the rest of us.

Thinking that C's lax null handling is fine because it traps misses the entire angle of preventing problems by construction, making invalid states unrepresentable.

Having a program potentially crash is very weak compared to eliminating the crashing code path entirely, guaranteed statically. This matters more and more as the programs grow, because series of 99% correct components will take correctness towards zero (failure probability mulitplies), while 100% correct scales.

Non-nullable types not groundbreaking. I'm just using this example, because it's basic enough that C has a relatable counterpart. Although some values are truly optional and Rust still has to deal with those, having &/&mut references that are never-ever NULL (and never dangling, never uninit, never misaligned, never unexpectedly mutated) makes this problem go away for all the code paths using them (which is the majority in practice).

But C completely lacks the real good stuff in Rust, like Send/Sync. You can shake some bugs with tsan, and have a static analyzer try to figure out effects and propagate them across functions, but like all analysis in C, it's hampered by lack of explicit info in the code (heuristics causing false positives), difficulty of performing true whole-program analysis, and dynamic code being a dead-end (unlike Rust where the traits are part of function types). Until you try it, you won't know how awesome it is to write thousands of lines of pervasively multi-threaded code, and have it work on the first try, without a single UAF or data race (and before you say what about deadlocks and higher-level logical races - there are library building blocks which usually prevent these too).

people think C is much worse than it is because they do not understand what can be achieved.

I've been writing for ~25 years, from microcontrollers to compilers. Rust for 11. I think I have very good understanding of what is possible. C is stuck in 1970s. Rust at least advanced us to 1990's :)

I think it's much more common for people to not grasp how far Rust is ahead, and think it's merely a slight refinement of "be careful, use tooling" approach in C, rather than a shift towards a level correctness never seen in C.

Depends how you define "can", because you can invent your own conventions not checked by the compiler, or even make a compile-to-C language.

But more directly, C barely lets you define non-NULL pointers. It doesn't have pointers that guarantee the data behind them is initialized, it doesn't have never-leaves-this-thread data types. Const merely guarantees that you can't (strongly shouldn't) mutate data, not that it definitely won't be mutated by any thread.

It's not switching costs, but trust.

There's no congress. There's no policy (they've been making noises about not allowing AI regulation and now they're not-regulating it like a child paying with an on/off switch). The law is whatever Dear Leader's mood is today. It overrides any contract you sign with private companies, and they roll over and take it, because that's how oligarchies work.

Technically, absolutely.

Whether it would suit you, depends if you can learn to like Rust's approach of moving more work to the type system. In Rust you do certain things the Rust's way, period. Programmers used to C being unopinionated about everything find that objectionable.

I was interested in Quake only because of the breakthrough 3D graphics, architecturally stunning levels, and later QuakeC.

I don't care for the story, and I wouldn't play Doom++. Electric polar bears and some Shrub lava mule, whatever. But swimming in deep underwater ruins with full 3-axis freedom was awesome.

I couldn't play multiplayer back then. Dialup sucked and was more expensive than AI tokens. Ethernet was still rare. Lugging a CRT monitor to friend's house was a chore reserved for a once-a-year LAN party.