frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

AI tooling must be disclosed for contributions

https://github.com/ghostty-org/ghostty/pull/8289
213•freetonik•1h ago•86 comments

How does the US use water?

https://www.construction-physics.com/p/how-does-the-us-use-water
26•juliangamble•7h ago•3 comments

Building AI products in the probabilistic era

https://giansegato.com/essays/probabilistic-era
37•sdan•1h ago•8 comments

Beyond sensor data: Foundation models of behavioral data from wearables

https://arxiv.org/abs/2507.00191
168•brandonb•5h ago•36 comments

An interactive guide to SVG paths

https://www.joshwcomeau.com/svg/interactive-guide-to-paths/
93•joshwcomeau•3d ago•10 comments

Miles from the ocean, there's diving beneath the streets of Budapest

https://www.cnn.com/2025/08/18/travel/budapest-diving-molnar-janos-cave
44•thm•3d ago•4 comments

DeepSeek-v3.1 Release

https://api-docs.deepseek.com/news/news250821
64•wertyk•1h ago•4 comments

Weaponizing image scaling against production AI systems

https://blog.trailofbits.com/2025/08/21/weaponizing-image-scaling-against-production-ai-systems/
265•tatersolid•7h ago•66 comments

My other email client is a daemon

https://feyor.sh/blog/my-other-email-client-is-a-mail-daemon/
40•aebtebeten•11h ago•11 comments

D4D4

https://www.nmichaels.org/musings/d4d4/d4d4/
405•csense•4d ago•46 comments

Using Podman, Compose and BuildKit

https://emersion.fr/blog/2025/using-podman-compose-and-buildkit/
211•LaSombra•9h ago•59 comments

Cua (YC X25) is hiring design engineers in SF

https://www.ycombinator.com/companies/cua/jobs/a6UbTvG-founding-engineer-ux-design
1•frabonacci•3h ago

The power of two random choices

https://brooker.co.za/blog/2012/01/17/two-random.html
19•signa11•3d ago•2 comments

Crimes with Python's Pattern Matching (2022)

https://www.hillelwayne.com/post/python-abc/
3•agluszak•28m ago•0 comments

The contrarian physics podcast subculture

https://timothynguyen.org/2025/08/21/physics-grifters-eric-weinstein-sabine-hossenfelder-and-a-crisis-of-credibility/
103•Emerson1•3h ago•102 comments

Show HN: OS X Mavericks Forever

https://mavericksforever.com/
243•Wowfunhappy•3d ago•98 comments

Launch HN: Skope (YC S25) – Outcome-based pricing for software products

29•benjsm•5h ago•26 comments

The Core of Rust

https://jyn.dev/the-core-of-rust/
96•zdw•3h ago•56 comments

Adding my home electricity uptime to status.href.cat

https://aggressivelyparaphrasing.me/2025/08/21/adding-my-home-electricity-uptime-to-status-href-cat/
27•todsacerdoti•4h ago•22 comments

Unity reintroduces the Runtime Fee through its Industry license

https://unity.com/products/unity-industry
175•finnsquared•5h ago•85 comments

Mark Zuckerberg freezes AI hiring amid bubble fears

https://www.telegraph.co.uk/business/2025/08/21/zuckerberg-freezes-ai-hiring-amid-bubble-fears/
565•pera•9h ago•528 comments

The unbearable slowness of AI coding

https://joshuavaldez.com/the-unbearable-slowness-of-ai-coding/
52•aymandfire•1h ago•27 comments

Show HN: ChartDB Cloud – Visualize and Share Database Diagrams

https://app.chartdb.io
70•Jonathanfishner•7h ago•9 comments

Why is D3 so Verbose?

https://theheasman.com/short_stories/why-is-d3-code-so-long-and-complicated-or-why-is-it-so-verbose/
79•TheHeasman•10h ago•48 comments

Show HN: Using Common Lisp from Inside the Browser

https://turtleware.eu/posts/Using-Common-Lisp-from-inside-the-Browser.html
85•jackdaniel•8h ago•21 comments

You Should Add Debug Views to Your DB

https://chrispenner.ca/posts/views-for-debugging
60•ezekg•4d ago•18 comments

A summary of recent AI research (2016)

https://blog.plan99.net/the-science-of-westworld-ec624585e47
19•mike_hearn•4h ago•0 comments

Unmasking the Privacy Risks of Apple Intelligence

https://www.lumia.security/blog/applestorm
78•mroi•4h ago•17 comments

Margin debt surges to record high

https://www.advisorperspectives.com/dshort/updates/2025/07/23/margin-debt-surges-record-high-june-2025
182•pera•8h ago•229 comments

Bank forced to rehire workers after lying about chatbot productivity, union says

https://arstechnica.com/tech-policy/2025/08/bank-forced-to-rehire-workers-after-lying-about-chatbot-productivity-union-says/
233•ndsipa_pomu•4h ago•89 comments
Open in hackernews

The Core of Rust

https://jyn.dev/the-core-of-rust/
94•zdw•3h ago

Comments

khuey•1h ago
Ironically the "simple" JS program has a bug in it. The documentation for fs.watch is very explicit that the filename in the callback can be null and that you need to check for that. In Rust that fact would be encoded in the type system and the programmer would be forced to handle it, but in JS it's easier to just write bad code.

https://nodejs.org/api/fs.html#filename-argument

sestep•1h ago
True, but also the loop syntax is simply incorrect, which would have been caught by running it; so probably a better interpretation is simply that the author didn't spend much time thinking about that JavaScript code because it didn't matter for their point.
masklinn•1h ago
> it didn't matter for their point.

Which is mostly a lie, since at least half the concepts they gripe about in rust are in the js snippet.

sestep•40m ago
Yep fair. I'm not sure why they didn't spend more effort on the JS part, just saying they didn't.
serial_dev•2m ago
But isn’t it at least part of the problem? The JavaScript code looks completely fine, until the HN comment section finds various subtle bugs that sometimes not even TS can protect you against?
jynelson•46s ago
no. the JS program has obvious syntax bugs that TS wouldn't compile. commentors above are right that I was just lazy (ty for the callout, I have since fixed the JS program).
Waterluvian•1h ago
Typescript would require you to check for null before use, which I think makes this a good example of how TS is oftentimes a fairly gentle step up from JS. Or, at least, closer to the correctness of Rust without all the heavy stuff.
quotemstr•1h ago
But you don't get manual memory management then. No GC, safety, and simplicity: pick any two
Waterluvian•1h ago
That’s true, two different tools have different pros and cons.
ori_b•1h ago
Sure, but GC's not the only upside.
TylerE•48m ago
For a large number of people including myself, manual memory management is a huge con, not a pro.
ameliaquining•41m ago
Yes, but there are use cases where it's a hard requirement.
koakuma-chan•21m ago
Do you manually manage memory in Rust? Because I just write Vec::new or vec![], just like how I would write new ArrayList in Java.
Aurornis•5m ago
You manually manage memory via ownership rules and lifetimes.

You can allocate memory for a Vec with Vec::new. Dropping it deallocates. When and where it's dropped is important. Passing ownership around is important. These are parts of managing the memory.

If you need something to be on the heap, you use Box. If you need something to be shared, you use something like Arc or Rc.

Rust makes it nice to implicitly handle the common cases so you don't feel like you're doing manual memory management, but you're making decisions about that memory management at every step of the way.

marcianx•1h ago
There are further bugs:

`for path in paths`

should be

`for (const path of paths)`

JS will immediately error on the lack of parens, but the `in` vs `of` iterates over indexes, not values, and those indexes are unfortunately converted to strings (since `for-in` is object field-name iteration). So even TypeScript would not have caught it when the (stringified) index is used as the first argument of `fs.watch()`.

andrewmcwatters•1h ago
A smaller Rust just sounds spiritually like Zig to me. Like C++ to C.
bonzini•1h ago
Rust without safety-by-default, and hence without the borrow checker, is not Rust. A smaller Rust should either remove unsafe constructs (and then you get something more like a new Java/Scala/Kotlin except with aliasing XOR mutability) or keep the pointer/reference distinction (which Zig doesn't have).

Zig is more like a smaller C++ than a smaller Rust.

hamaluik•1h ago
This feels like a fairly uncharitable take. The author conveniently left out all of the things needed to understand that JavaScript version, including async/await, promises, modules, string interpolation, lambda syntax, not to mention the runtime that is running this, etc.

You also don’t have to start with a program that invokes 20 concepts at once, every one of those rust concepts can have its own hello world, introducing one concept at a time. Frankly several of them are just fundamental CS concepts.

masklinn•1h ago
> The author conveniently left out all of the things needed to understand that JavaScript version, including async/await, promises, modules, string interpolation, lambda syntax, not to mention the runtime that is running this, etc.

And iterators.

loevborg•1h ago
And "for of" vs "for in" (the latter typically shouldn't be used)
cratermoon•1h ago
As I read it, the author is making a point about explicit vs implicit knowledge. In the Rust version the compiler will ~yell at you~ politely point out where your code won't work, while the js version will ... just run, but maybe not work?
Spivak•1h ago
I mean both languages (and programs) have modules, string interpolation, lambda syntax, and a compiler/interpreter. The only thing they really left out is Promises. And you're iterating over an array so there's no understanding of iterators needed. You can write Python for a long time without ever learning about __iter__. In the example Rust program the iterator is exposed. I think if the Rust version only used the for syntax you could say you don't need to know about iterators.
IshKebab•1h ago
The closest thing I've seen to "simple Rust" I've seen is Gleam: https://tour.gleam.run/

It's clearly very heavily inspired by Rust.

raphinou•1h ago
I encourage you to take a look at fsharp if interested in another 'simple rust'
akkad33•1h ago
> It's clearly very heavily inspired by Rust

The creator has said it's not. It's compiler is in rust though. But Gleam is an entirety different language in terms of paradigms and target runtimes. It can't really replace rust

IshKebab•53m ago
> The creator has said it's not.

Well that seems highly unlikely given the huge number of similarities.

koito17•1h ago
Minor nitpick

  println can only print things that implement the traits Display or Debug. As a result, Paths cannot be printed directly.
Not all OSes store paths compatible with UTF-8. In Rust, all strings are UTF-8 encoded. Thus printing a Path is a lossy operation (i.e. cannot safely be round-tripped). Path exposes a `display` method returning a type that implements Display. This is a fact Rust is encoding in its type system, whereas in JavaScript (and TypeScript), it's not really possible to state "strings internally are UTF-16 and you may need to invoke TextEncoder / TextDecoder to safely deal with paths that are not Unicode". If you fetch from a server sending Shift_JIS text and invoke `response.text()`, you get an empty string at runtime (in my experience). If you aren't experienced in dealing with text encoding issues, I can see this becoming a lengthy debugging session.

As others have noted, the JavaScript program has a bug not present in the Rust program, and a syntax error (should probably use for..of, not for..in). The example definitely uses more concepts than "first-class functions". You still have to understand iterators, just like in Rust, and it uses CommonJS instead of ES Modules, but I digress. The usage of async/await and Promises is another concept to teach, and the usage of top-level await is specifically something that wasn't supported in some runtimes (e.g. Node) until recently. It still isn't supported in the latest version of some mainstream JS engines (e.g. Hermes, which is used in React Native)

tracker1•1h ago
I find that understanding thenables/Promises and async-await in JS/TS is emphatically not something a lot of devs really understand. It really shows when you see something like...

    var fn = async (param) => new Promise((res, rej) => {
      ...
      fooLibraryCall(param).then(res).catch(rej);
    });
I've literally seen similar to this... where devs see wrappers for the callback syntax, then apply the same to thenables and use manual Promises inside an async labelled function. It makes my mind bleed to see it, and I've seen it a few places.

Then, of course, there's dealing with module imports and async import() methods and how they operate or get transpiled or split, etc.

tomjakubowski•35m ago
Sometimes you still need to work with promises even inside an async context. Imagine an async function which needs to `await Promise.all([...])`. In this case, `then()` can be a useful tool to make new promises from an async call.
tracker1•18m ago
Of course.. I was referring to having an async function, but having it create a "new Promise" that in and of itself is just calling a method that already returns a promise... it's creating extra closures and overhead that aren't necessary at all.

Sometimes I'll add a `.catch(() => null)` or similar for manipulating a specific call with `.then`, if I want to manipulate something out of flow. Such as a convenience method to normalize api fetch calls, etc. That's just useful functionality, not making literally wrappers for no benefit or reason.

petcat•1h ago
I often encounter people that want to learn a programming language and ask if they should pick Rust as their first language. My answer is universally: NO.

Learning a first programming language is hard. And Rust will only make it harder since all you're going to do is debug compiler errors all day and never even see your program actually run until it's "perfect". This will be incredibly frustrating and you'll give up.

I always tell people to start with Python, JavaScript, or Lua. You can make something fun and interesting for yourself, like a game, and get immediate feedback and you can iterate quickly.

tracker1•56m ago
I would suggest Python or Lua before JS if you want to learn formally, such as following a book/series/class. JS (and TS) just have so much flexibility and many functionalities have been enhanced over the years that depend on the runtime context and build tooling in some cases.

Don't get me wrong, I love JS/TS since before the "Good Parts" book ever came out. The only advantage it has as a first language is you can start tinkering directly in the browser... Which is something I use to this day... the debug console in the browser, I can exercise a generated API client before the UI features are flushed out.

If you want to learn with the intent of "I want to build $THING." then JS/TS is probably a great language to start with... you will probably want to read something like a for dummies book to start, then bootstrap with a coding ai... and tinker until it works. Note: don't do this for anything security critical when starting out.

tucnak•35m ago
To be fair, Rust is genuinely just as _hard_ in 10th language capacity.
baq•2m ago
I agree.

Rust wouldn't be a bad language if humans were able to take it in all at once. The problem is, nobody learns like that and Rust is very hard to iterate on if you don't know a lot of the key concepts.

The problem with this is you'll necessarily have to unlearn something or be frustrated when you achieve some level of proficiency in other languages since it still requires all those concepts which don't exist anywhere else.

nromiun•1h ago
> There’s a famous quote by Bjarne Strousup that goes “Within C++, there is a much smaller and cleaner language struggling to get out.” Within Rust, too, there is a much smaller and cleaner language struggling to get out: one with a clear vision, goals, focus. One that is coherent, because its features cohere. This post is about that language.

The problem is that using this "core" of a language never works. Either you need a feature or a library that touch the bad parts you are trying to ignore.

procaryote•1h ago
also, at least for C++, different people have incompatible ideas of what that core is
akkad33•1h ago
Another post about how Rust is not to their liking because it has things there familiar language does not have. For example the author says exceptions are somehow "simpler" than Result types and it's a downside Rust does not allow you to get a value without checked for error. And complains about ? operator. I think just because you are more familiar with exception style programming does not make it simpler.
swiftcoder•1h ago
I think you misunderstand the direction the author is coming from - Jynn is definitely not a newcomer to Rust who doesn't understand why things in Rust are the way they are
estebank•12m ago
To drive the point home: https://github.com/rust-lang/rust/pulls?q=is%3Apr+author%3Aj...
tracker1•36m ago
I didn't read the article as being particularly critical of Rust at all, only demonstrating that it has a lot of concepts that you need to know in a coupled way in order to do most functional things in the language. It just means it's a slightly harder language to learn.

I've experienced this myself when starting out and just wanting to make $THING in Rust. A lot of looking things up... then trying it out... then seeing the compiler errors.. then looking up WTF they mean when you don't have solid grasp on X, Y and Z in Rust. Then going down the rabbit hole of mut and clone in order to do what you want... often just cloning because it's easier, even if less performant, only later to understand (a)rc etc.

In another language, you may well get something to run, even if not correct, which can be far more satisfying to correct an incorrect behavior/bug then to have the compiler yelling at you from the start (slowly)... it's a slower and more painful feedback loop to work with. It isn't bad so much as different. That doesn't mean it isn't real, or that I or TFA are bashing Rust.

tracker1•1h ago
Anyone else get completely side tracked as soon as you saw the shebang (self-executing rust scripts)? MY mind kind of exploded in a similar fashion to when I discovered Go could do the same. It's definitely a nifty feature and can see it getting a lot of basic usage. I've seen a couple projects that do similar with rust to control build and testing pipelines, this could be a good alternative in those cases.

That said, I mostly just use Deno + TS for my shell script needs beyond simple bash. Mostly in that JS is hands down the language I know the best (28 years), close would be C# (24 years) for me. I was also an early adopter of Node. I also think that dealing with shared/centralized packages is an easier option for Deno than Node, Python or other languages/environments. The cargo front-matter here seems to work similarly.

TylerE•47m ago
That’s just a basic Unix thing.

Any file starting #!/some/path just means for the shell to invoke that command and pass the contents of the file on stdin.

ameliaquining•33m ago
Most languages currently do not support this in a way that lets you specify dependencies from a package manager. And some don't support it at all; most C and C++ toolchains, for example, don't have a way to compile and run a single source file in a single command.
tracker1•28m ago
Exactly, that alone makes it far more useful/portable in practice than a lot of other languages for this type of thing. A python file can have a shebang, but it'll need a bunch of other files around it for module references, etc. Not to mention initialization/setup, etc.

The fact that dependencies are referenced in the file and automatically handled at runtime (first or repeated) is a really nice feature to have... it's expressly why I started using Deno over other options for this.

tracker1•32m ago
I know this... my point was in that Rust didn't have this feature 5-8 years ago when I first started reading/learning about it. A lot of languages haven't had an active scripting-capable usage that can do this until fairly recently. C# even has it in .Net 10, though I'm not sure about dependency handling in that case.

I like and was commenting that rust has the cargo frontmatter instead of a separate cargo file, same for deno in that it can reference the repo/url directly instead of requiring a separate modules file/folder (like node package.json/node_modules) or even with python. You can reference the modules you need directly.

ameliaquining•8m ago
A bunch of third-party Python package manager clients, most famously uv, support this now. They all use the same front-matter format (PEP 723). Unfortunately, pip (the first-party package manager client that's usually distributed with Python) doesn't support it yet: https://github.com/pypa/pip/issues/12891
tracker1•23m ago
Just to add, I literally meant sidetracked... started searching for the "-Zscript" feature in cargo, apparently in progress since 2023 with an open issue that's close to complete. Along with looking back into ZomboDB's repo, where I saw Rust being used for the build pipeline stuff, not that I completely understand it in context.

Not to mention how useful the cargo front-matter handling is in terms of portability for these kinds of scripts... one file to share, and no extra "install/init" step to bring in dependencies (such as with say Python or Node.js).

t8sr•58m ago
I've taught programming to some people who had no previous experience with it, and I can tell you that the list of concepts you have to learn at once is basically as long for Python, the quintessential "beginner" language.

The author's argument feels intellectually dishonest for that reason. Especially glaring is the comparison to JavaScript. The latter has an insane amount of concepts to deal with to do anything, including some truly bizarre ones, like prototypes.

Rust is hard to learn, IMO, for precisely two reasons:

1) The borrow checker is in an uncomfortable place, where it's dumb enough that it rejects perfectly valid code, but smart enough that it's hard to understand how it works.

2) As the author points out, there are a lot of levers available for low-level control, precise allocation, etc.

With respect to the second point, the author describes a language he'd like to see: green threads, compiler deciding on allocation, fewer choices and thread safety by default.

This language already exists (minus algebraic types). It's called Go. It's perfectly fine, well-designed and good for beginners. Some people don't like its aesthetics, but that's not reason enough to invent it again, only with Rust-inspired syntax.

TylerE•44m ago
The venue bigger issue with rust as that the compiler is so bitchy it is actively hostile to incremental add-a-line-at-a-time incremental development.

Especially unused variables being a hard compilation error, not a warning.

estebank•20m ago
Unused variables are a warning:

https://play.rust-lang.org/?version=stable&mode=debug&editio...

J_Shelby_J•23m ago
> the list of concepts you have to learn at once is basically as long for Python, the quintessential "beginner" language

IMO, Python is great. But deploying Python is more work than learning Rust, oh and the tooling is something that requires continual education: I hear UV is what all the serious python teams are using now. Better learn it or be left behind!

Meanwhile, vanilla Rust has everything you need. I'm glad I understood sunk cost fallacy and got out of Python after many months of coming up to speed with it.

baq•5m ago
that's very unfair towards the both uv (uv is great) and the absolutely atrocious state of Python tooling until basically 2025 (slow and brittle, if it was even installed - hello, debian derivatives). uv is the cargo of Python we've been waiting for and it is expected you won't need to learn anything else for a long time.
sarmadgulzar•48m ago
I know I'm biased, but Rust is the closest thing we have to a perfect programming language. Is the borrow checker a pain in the ass? Yeah. But is it necessary? Absolutely. Imagine writing the same buggy program in C, deploying it, and then it blows up at runtime—you still have to fix it, right? A bug is a bug, and it needs fixing. The difference is Rust forces you to deal with it before you even get a binary, while with C you might get a 3 a.m. wake-up call trying to figure out what went wrong. So it’s not that Rust is harder, it’s just different. It takes a paradigm shift in how we think about writing safe and secure code. Change is uncomfortable in general for humans and that paradigm shift is precisely why most (I hope not) people feel this way about Rust.
tucnak•40m ago
> Is the borrow checker a pain in the ass? Yeah. But is it necessary?

You've missed the primary point of the post entirely. Borrow checker per se is not the problem; it's the sheer amount of everything. There's multiple ideas of perfection. Those of us to have very much enjoyed ostensibly imperfect Rust of 2018 find this particular, current flavour unappealing. It may as well be capable tool in deft hand, however, as-is the case with everything in life, you cannot help but ask yourself THE question; is it worth my effort? For me personally, if I were looking for better C/C++ in 2025, I would choose Zig before Rust any day of the week (one exception being Postgres stuff, pgrx ecosystem that is really special!)

But then again, anything beats writing C for a living.

hedgehog•48m ago
Having written a moderate amount of both Rust and TypeScript they seem different but I wouldn't say projects in one are significantly simpler than projects in the other. Rust itself feels a little more complicated than TypeScript, but more carefully thought out. TypeScript has more cruft and legacy footguns. Rust tooling is much better (and faster). For cranking out web front end code TypeScript will get the job done faster, most other needs I run into are easier solved using either Rust or Python when starting fresh is an option.
aeldidi•17m ago
I find it kind of hard to take this seriously since the JS snippet has a glaringly obvious syntax error and two glaringly obvious bugs which demonstrate that the author didn’t really think too hard about the point they’re trying to make.

I understand the point they’re trying to make, that being that rust forces you to explicitly deal with the complexity of the problem rather than implicitly. It’s just that they conveniently ignore that the JavaScript version requires the programmer to understand things like how async await works, iterators (which they use incorrectly), string interpolation, etc. Just using typescript type annotations alone already gives the js version nearly all the explicitness of rust.