frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Getting AI to write good SQL

https://cloud.google.com/blog/products/databases/techniques-for-improving-text-to-sql
214•richards•7h ago•112 comments

Wow@Home – Network of Amateur Radio Telescopes

https://phl.upr.edu/wow/outreach
28•visviva•2h ago•0 comments

Thoughts on thinking

https://dcurt.is/thinking
325•bradgessler•9h ago•221 comments

Show HN: KVSplit – Run 2-3x longer contexts on Apple Silicon

https://github.com/dipampaul17/KVSplit
206•dipampaul17•8h ago•31 comments

Postman for MCP

https://usetexture.com/##
16•andes314•1h ago•2 comments

XTool – Cross-platform Xcode replacement

https://github.com/xtool-org/xtool
26•TheWiggles•2h ago•11 comments

A Research Preview of Codex

https://openai.com/index/introducing-codex/
389•meetpateltech•13h ago•310 comments

Rustls Server-Side Performance

https://www.memorysafety.org/blog/rustls-server-perf/
70•jaas•3d ago•10 comments

MIT asks arXiv to withdraw preprint of paper on AI and scientific discovery

https://economics.mit.edu/news/assuring-accurate-research-record
262•carabiner•13h ago•142 comments

Coding agent in 94 lines of Ruby

https://radanskoric.com/articles/coding-agent-in-ruby
68•radanskoric•2d ago•21 comments

ClojureScript 1.12.42

https://clojurescript.org/news/2025-05-16-release
109•Borkdude•7h ago•20 comments

WebGL Gray-Scott Explorer (2012)

http://www.mrob.com/pub/comp/xmorphia/ogl/index.html
16•joebig•3h ago•1 comments

I'm Peter Roberts, immigration attorney, who does work for YC and startups. AMA

190•proberts•13h ago•355 comments

Show HN: Visual flow-based programming for Erlang, inspired by Node-RED

https://github.com/gorenje/erlang-red
205•Towaway69•13h ago•89 comments

X X^t can be faster

https://arxiv.org/abs/2505.09814
165•robinhouston•12h ago•47 comments

MCP: An in-depth introduction

https://www.speakeasy.com/mcp/mcp-tutorial
34•ritzaco•3d ago•10 comments

A Linux kernel developer plays with Home Assistant: general impressions

https://lwn.net/SubscriberLink/1017720/7155ecb9602e9ef2/
3•pabs3•1h ago•0 comments

They Were Identical 'Twinnies' Who Charmed Orwell, Camus and More

https://www.nytimes.com/2025/05/04/books/review/the-dazzling-paget-sisters-ariane-bankes.html
20•lermontov•4h ago•4 comments

Will AI systems perform poorly due to AI-generated material in training data?

https://cacm.acm.org/news/the-collapse-of-gpt/
65•pseudolus•4h ago•68 comments

New high-quality hash measures 71GB/s on M4

https://github.com/Nicoshev/rapidhash
15•nicoshev11•2d ago•4 comments

Show HN: Roast My Dish – AI roasts your food photos with brutal honesty

https://www.roastmydish.online/
12•romeumaleiane•3h ago•6 comments

Behind Silicon Valley and the GOP’s campaign to ban state AI laws

https://www.bloodinthemachine.com/p/de-democratizing-ai
16•spenvo•1h ago•1 comments

Java at 30: Interview with James Gosling

https://thenewstack.io/java-at-30-the-genius-behind-the-code-that-changed-tech/
170•chhum•15h ago•250 comments

Show HN: Solidis – Tiny TS Redis client, no deps, for serverless

https://github.com/vcms-io/solidis
38•jayl-e-e•6h ago•2 comments

The first year of free-threaded Python

https://labs.quansight.org/blog/free-threaded-one-year-recap
249•rbanffy•18h ago•251 comments

Material 3 Expressive

https://design.google/library/expressive-material-design-google-research
330•meetpateltech•3d ago•513 comments

The Magic Hours: The Films and Hidden Life of Terrence Malick

https://www.lrb.co.uk/the-paper/v47/n09/david-thomson/cool-tricking
53•mitchbob•9h ago•31 comments

Foundry (YC F24) Is Hiring – Founding Engineer (ML × SWE)

https://www.ycombinator.com/companies/foundry/jobs/uwi8b6I-founding-engineer-ml-x-swe
1•lakabimanil•11h ago

Returning to My Roots in Hardware

https://dancrimp.nz/2025/03/31/hardware/
68•dcrimp•3d ago•11 comments

Methodical Banality

https://aeon.co/essays/who-needs-ai-text-generation-when-theres-erasmus-of-rotterdam
33•CharlesW•7h ago•11 comments
Open in hackernews

Evolution of Rust Compiler Errors

https://kobzol.github.io/rust/rustc/2025/05/16/evolution-of-rustc-errors.html
137•ingve•14h ago

Comments

swsieber•13h ago
The wrong field error message change in 1.87 really is brilliant. Instead of just pointing out the correct field, it actually points out the spelling change needed to get to that field.
estebank•10h ago
That was done by @compiler-errors, as part of an improvement to make some of the suggestions I introduced easier to read.
01HNNWZ0MV43FF•11h ago
I'm surprised 1.0 didn't have the error codes. Error codes should be table stakes for anything that produces errors, really (Looking at you, proprietary codebases where I was putting in error codes while other people were writing the C++ equivalent of `.expect("the value to be right")`)
steveklabnik•11h ago
I was a big advocate of adding error codes. I don't remember specifically the timeline, but we had so much stuff to do for 1.0, it doesn't surprise me that it got pushed back a bit.

At the time, I was thinking about the big old chunky Visual Basic manuals I used to own, and how useful those were.

EDIT: okay, so I'm doing some digging: error codes were added before 1.0... https://github.com/rust-lang/rust/commit/0e80dbe59ea986ea53c...

> This implements the minimal scaffolding that allows mapping diagnostic messages to alpha-numeric codes, which could improve the searchability of errors. In addition, there's a new compiler option, `--explain {code}` which takes an error code and prints out a somewhat detailed explanation of the error.

committed on Jul 10, 2014

I think I've figured out what happened here: the particular error that was chosen didn't have a code until 1.2. The example from this commit does show a code on Rust 1.0.0: https://godbolt.org/z/14hcb3ETG

pcwalton•10h ago
My recollection is that Brian Anderson, who came from the C# world, was an early advocate of the easily-googlable error codes that Microsoft compilers use a lot, and pushed to get them in. That was a good call. (In general Brian had a lot of behind-the-scenes positive influence on Rust: my favorite brson-ism is "if the code doesn't have a test it doesn't exist".)
steveklabnik•10h ago
Yeah this PR cites it as explicitly a continuation of Bryan’s work. I never did any implementation work on errors, I was just a big fan of the codes concept.
IshKebab•11h ago
This is surprisingly cool. Now I want to see it for GCC (and mark the point where Clang was released!).
kstrauser•11h ago
A million thanks to everyone who’s worked on those error messages. More than any other language I’ve ever used, Rust goes to great lengths to explain exactly you did wrong, with enough context to demonstrate it, and an explanation of why it’s wrong, pointers of where to learn more about it, and how to fix it.

Yes, Rust has some inherently tricky parts that require programmers to really understand them before they can write it effectively. However, it goes out of its way to teach those concepts more than I realized it was possible for a compiler to do.

steveklabnik•11h ago
This reminds me of http://brson.github.io/archaea/, which is a really fantastic project by Brian Anderson. It shows iterations of Rust's test files over the years, so you can see what older Rust syntax looked like.

Regardless, very cool!

whytevuhuni•10h ago
Wow, you're right. Apparently this was Rust in 2010-06-23:

    io fn starve_main(chan[int] alive) {
      log "signalling main";
      alive <| 1;
      log "starving main";
      let int i = 0;
      while (true) {
        i += 1;
      }
    }
steveklabnik•10h ago
Yep! Some interesting things in here:

`io fn`, there were three effects: io, state, and unsafe. There was also pure, for functions with no effect.

chan for channels. <| was a "semi-synchronous message send," it blocked if the queue was full.

square brackets for generics

int was two's compliment signed integer with machine dependent size

log for printing to the screen

kaycebasques•11h ago
Effective error messages are one of my platonic ideals about how documentation is supposed to work. The docs shouldn't be shoved off to the side. They should appear just-in-time, when you need them. If you can fix the error within the product (e.g. when Rust tells you exactly how to fix the typo), just do it there. Otherwise link off to the full docs when it's too much content.

The general platonic ideal is "have the product automatically fix the issue" => "provide short documentation within the product if the problem can be explained with just a paragraph or two of content" => "link to a targeted doc that deals with this exact problem if it takes more than a few paragraphs to explain"

A lot of time, my work as a technical writer is advocating to update the product (or updating the product myself) to do the first two steps, rather than just jumping immediately to the last step. Startup people often refer to this as "the perfect product requires 0 documentation." When teams always resort to fixing product issues with docs, your docs start to get huge and complicated. We technical writers often refer to this as "putting docs lipstick on the product pig."

tialaramex•10h ago
Yes, the article goes to some length to mention this but it's worth re-stating, this is all real work, people spent a bunch of effort improving Rust's diagnostics, it's not the case that somehow the errors magically get better as the compiler's optimisations improve or something, if you did X and that can't work but the compiler said how about Y, that probably means a person like you had a similar situation and they put work into modifying the diagnostics when you can't do X so that it realises it should suggest Y.

My tiny contribution is that when you write say '$' (the dollar symbol as a Unicode char) in a context where you needed a single byte, now rustc will suggest prefixing with a b to make b'$' (the ASCII code of a dollar as a single byte) rather than just telling you that's the wrong type, and yet if you write '€' (the Euro symbol as a Unicode char) it will not suggest b'€' because that's not a thing, the Euro isn't a single byte in ASCII

[Yes in some modern 8-bit encodings € exists but those encodings aren't used in Rust, which favours UTF-8, so b'€' wouldn't make sense, in UTF-8 this symbol is 3 bytes]

epage•8h ago
> The general platonic ideal is "have the product automatically fix the issue"

`cargo fix` will apply programmatic suggestions from rustc. We are very conservative of which suggestions we apply but will expand it when we add an interactive mode.

estebank•8h ago
This is an approach that I really like because of some not necessarily obvious properties: the behavior of the code as written is easily predictable, while still getting the benefits of a compiler's help. The suggestions can be more aggressive than automatic changes, because a human is in the loop and they can apply judgement of whether a certain strategy is beneficial or not.
epage•7h ago
We can also offer more precise choices: say you have an ambiguous `Deref`, instead of saying `T` in the turbofish (for brevity), we could let the user select from the different available `Deref` impls what should be inserted.
90s_dev•10h ago
This visualization is breathtaking, thanks for making it.

Sometimes I want an excuse to write some Rust. I think I'll make one in my upcoming web app, since it already uses web workers. I guess the side effect is that wasm (and therefore Rust) will become a first class citizen in my app? Neat.

nfriedly•10h ago
The helpful error messages are one of the reasons I love rust. Perhaps even the top reason.
estebank•9h ago
This is something that I never get tired to hear. I'm really glad that you've found them helpful.
pcwalton•10h ago
When I was first developing early versions of rustc I was really fascinated with Clang's effort at good error messages, which was helping it gain traction vs. GCC at the time, and I tried to start the Rust compiler project off on the right foot. I'm really glad that the Rust compiler dev community has continued to value great error messages: they're the UX of a compiler, and are every bit as important as UX of any other app.
mynameisash•10h ago
I don't remember where, but I once heard someone talk about "error-message-driven-development" in Rust -- that is, using the error messages provided by rustc to guide you in your development process by way of fixing bugs in naively-written code. I even did a talk to several dozen engineers in my previous group about how fantastic it is: a newbie can write what they think is reasonable code, the compiler will reject the program but provide useful information, and the user can iteratively apply changes to the point where you can almost get things exactly as you want it. A lot of people who knew nothing about Rust were super impressed by the messages reported.

Many thanks to you and others that have toiled at this incredible UX!

estebank•9h ago
When an error happens it's the best time to teach the user something. If you can figure it what they were trying to do something, you can tell them why what they tried to do doesn't work, and what to try instead.
tough•9h ago
With LLM's And Reason-Act agents on the table, this is more higher stakes than ever, AI has no issues on reading stack traces or verbose error logs where a human might have overlooked before, and it creates a really nice loop if the AI can reason with new context provider by the error messages
mahirsaid•8h ago
Interesting enough i still hear people say the error messages from rust is confusing and none informative. I wouldn't say that i am proficient in Rust but i know enough about it and it;s tooling to distinguish the difference between different (LV " Low Level " ) languages. When you get a grasp of the Rust lang then you will know how helpful the compiler is in Rust compared to other languages. Highlighting the progress of the Rust lang compiler messages in this post really Depicts the refinement of their ( Rust lang team ) compiler messages.
estebank•7h ago
When maintaining a project, one gets exposed to the worst parts of it at an elevated rate. This makes maintainers be more critical than most, as we have an skewed view of the projects faults. So I can absolutely understand when someone claims that rustc has bad errors. I've seen them. But for most people most of the time the output is actually quite good. That shouldn't stop us from being better. I'm thankful for the OP because it does show that we do improve over time.

I keep saying that the most effective thing we can do to help someone learning the language is to tell them to try in 6 months (as we expect it'll be better then).

badmonster•7h ago
This was a fantastic read — thanks for putting in the work to script and visualize the evolution of Rust's compiler errors
artemonster•6h ago
I really wish there would be rust version with optional borrow checker :) I want to have a modern "C" with such good error messages. Idk why gcc spits out incomprehensible garbage if you forgot a semicolon
dangoodmanUT•5h ago
this was cool, this should be a standard way to show various kinds of diffs
feznyng•3h ago
If you're doing language implementation work in Rust, an excellent crate to get similar diagnostic layouts to the Rust compiler is Ariadne[0].

[0] https://github.com/zesterer/ariadne

ori_b•2h ago
I find that I like the errors from 1.12 to 1.14 the most. 1.12 shows where things happened during the expansion of macros, which can be useful, but 1.14 tends to be a bit terser and cleaner.

The newest errors tend to be noisy for my taste, and I have to tune out the advice to see the error.