frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Introduction – Rust for Python Programmers

https://microsoft.github.io/RustTraining/python-book/
31•linhns•3h ago

Comments

Tiberium•1h ago
The whole "book" seems to be AI-generated, or at least very heavily AI-edited. Would at this point it not be easier to just tell developers to use their LLM of choice to achieve the same (or, likely, better) result?

Random chapter so you can judge the quality for yourself: https://microsoft.github.io/RustTraining/python-book/ch09-er...

And the non-stop bullet list slop just looks horrible: https://microsoft.github.io/RustTraining/python-book/ch01-in...

Seems like this isn't limited to the Python book though, and others have the same issues: https://github.com/microsoft/RustTraining/issues/14

onlyrealcuzzo•1h ago
I can't recommend Rust enough. It has such a bad reputation, but it isn't that hard. I truly think it's easier than many languages with much less-intimidating reputations.

That said, one of the places Rust loses people pretty early on is an example they have early in this intro:

```rust

let parts: Vec<&str> = "a,b,c".split(',').collect(); // Vec<&str>

```

I never understood why Rust didn't / couldn't make functions able to return different outputs depending on context. If you chain `.split()` to something else that can take an iterator, you want to pass an iterator. If you don't, ~99% of people would probably rather have a collected array. And if you want an `it`, you could just do `.it()` or this is when type inference could be overloaded and you could do:

```rust

let it: Split<'_, char> = "a,b,c".split(',');

```

I think Rust should've put more effort into making the thing newbs want to do the default, and easy ways to get the most efficient thing for experts.

```rust

let parts = "a,b,c".split(); // Gives an Array/Vec

let count = "a,b,c".split().count(); // Optimized stream, no array allocation

```

It could work like that, and I think almost everyone would be happy. But it doesn't.

Instead, they've created a language that I think could have been nearly as easy as a scripting language, but isn't.

It obviously isn't only collection iterators this applies to. There's dozens of very small places that add up and make what - I believe - is an otherwise relatively easy and sensible language feel too far out of reach for too many people.

`Option<T>`, `Result<T, E>`, `Future<T>` all impact linguistically how you can interact with a Type. I think the impacts of this don't make sense to people who've never encountered this before. `Arc<T>`, `Rc<T>`, `Mutex<T>`, and `RwLock<T>`, etc also have similar consequences.

Not only do people just not get it. But also, the type system quickly becomes "scary". To do pretty basic concurrency, you need to build a pretty "scary" looking type if you come from Python.

Which is why I'm a psychopath and attempting to create a language where it defaults to the things most people want, and it's very easy for experts to override.

mightyham•1h ago
Having the result type of a function change based on context sounds like a horrible idea because it would introduce tons of unnecessary ambiguity. If it's an issue that you have to chain one extra collect call, just write a helper function for splitting that returns a vec.
onlyrealcuzzo•1h ago
> Having the result type of a function change based on context sounds like a horrible idea because it would introduce tons of unnecessary ambiguity.

I think you're assuming the language won't warn you if you're doing something cost ineffective, and that there aren't modes to compilation which will make you make things explicit whenever its ambiguous.

For a person to get started, they should be able to compile in `easy` mode and do things that make sense to them, and the compiler should only bitch at you to be pedantic when you ask for that.

Especially because an LLM can probably do that pedantic part for you.

You: write code almost as high level as a scripting language, it works, turn on strict mode, most of the time you get auto-fix solutions/options from the compiler.

That's my opinion anyhow. I assume most Rust people won't like it. That's fine. You already have your language!

I'm not trying to make a slightly different Rust for Rust people...

I'm trying to make Rust more accessible to everyone else.

embedding-shape•1h ago
> I never understood why Rust didn't / couldn't make functions able to return different outputs depending on context

Referential transparency probably being the first reason I could see. Having the behaviour of a callee sounds horrible and something we usually try to actively work against, you want to be able to look at the function in isolation and be able to understand how it works and what values it gives back, without jumping around and seeing where it's being called.

And yes, I'd agree with your last part, you do sound a bit like a psychopath ;) With that said, the world needs those too, so I hope your experiment is fun and brings you lots of learnings, enjoy! :)

iloveoof•1h ago
This tutorial is very bad, and the time estimates are pretty absurd.

The explanations are extremely short and I imagine a new Rust dev would not understand what is going on.

The Brown tutorial is far better, compare its section on mutables and ownership to this.

And yes, this entirely thing is AI generated. Why was this created?

embedding-shape•1h ago
> and the time estimates are pretty absurd.

I wonder when LLMs will catch up with the new timelines, they frequently cite days/weeks of worth, then you say "Ok, implement that" and 30 minutes later everything been implemented. But seems they themselves is stuck not realizing they're not estimating for human timeframes anymore.

onlyrealcuzzo•1h ago
Link to the Brown tutorial: https://rust-book.cs.brown.edu/
pie_flavor•16m ago
In my experience working with newbies, the alterations Brown makes to the chapters on borrowing are strictly worse. It is entirely focused on ramming the difference between the stack and the heap down your throat, which has nothing to do with ownership and borrowing, and newbies will frequently say that they are extremely confused by the chapter, then sigh in relief upon reading the original version. Just use the official guide, nobody has improved upon it yet. https://doc.rust-lang.org/book
Quothling•27m ago
> Cargo vs pip/Poetry

I know this section is really just a comparrison of pyproject.toml and cargo.toml, but who on earth would use pip instead of UV as a drop-in replacement in 2026? Though calling it a comparrison is a bit of a stretch considering there is no text.

On top of that, I imagine that a lot of Python programmers who actually do use pip would also use requirements.txt and not pyproject.toml

sgeisenh•21m ago
This closely resembles implicit conversion from C++ and in many serious codebases it is considered poor practice because it leads to a lot of hidden control flow.

I think Rust strikes a nice balance but there’s enough magic that some people still get frustrated. Following traits can get tedious at times.

pie_flavor•9m ago
You may notice no language on the planet does this. That is because it is bad. Type guesstimation is a great way of ensuring random problems crop up in random places where they aren't expected and of making the typechecker much slower and more prone to unresolvability (see Swift's multi-minute compiles). All to save you from having to learn what an iterator is, in case you come from a language where lists are more common than iterators; the experience of being scared by a type, and then discovering that the type is not scary in chapter 13.2, is not actually worth making the simple type system instead staggeringly complicated.

How LLMs work

https://www.0xkato.xyz/how-llms-actually-work/
509•0xkato•2d ago•155 comments

Pokemon Emerald Ported to WebAssembly (100k FPS)

https://pokeemerald.com/
40•tripplyons•2h ago•16 comments

The new bibliomaniacs

https://engelsbergideas.com/notebook/the-new-bibliomaniacs/
17•RickJWagner•1h ago•12 comments

S&P 500 rejects SpaceX, also blocking entry for OpenAI and Anthropic

https://arstechnica.com/tech-policy/2026/06/sp-500-blocks-fast-spacex-entry-wont-waive-rule-for-u...
811•maltalex•9h ago•268 comments

The intracies of modern camera lens repair (2024)

https://salvagedcircuitry.com/sigma-45mm.html
198•transistor-man•13h ago•68 comments

New method turns ocean water into drinking water, without waste

https://www.rochester.edu/newscenter/what-is-desalination-definition-ocean-water-704732/
429•speckx•22h ago•176 comments

Building Rust Procedural Macros from the Grounds Up

https://www.learnix-os.com/ch02-03-implementing-the-bitfields-proc-macro.html
7•Sagi21805•5d ago•1 comments

Ask HN: What was your "oh shit" moment with GenAI?

408•andrehacker•1d ago•735 comments

Pre-Modern Armies for Worldbuilders, Part I: Why They Fight

https://acoup.blog/2026/06/05/collections-pre-modern-armies-for-worldbuilders-part-i-why-they-fight/
109•gostsamo•10h ago•37 comments

Mbodi AI (YC P25) Is Hiring Founding Machine Learning Engineer (Robotics)

https://www.ycombinator.com/companies/mbodi-ai/jobs/WYAcNkX-founding-machine-learning-engineer
1•chitianhao•2h ago

Astronauts told to return to ISS after sheltering over air leak repairs

https://www.bbc.com/news/live/c4g44ew3g1kt
408•janpot•23h ago•253 comments

pg_durable: Microsoft open sources in-database durable execution

https://github.com/microsoft/pg_durable
427•coffeemug•22h ago•93 comments

Social Cache Busting

https://www.autodidacts.io/social-cache-busting/
70•surprisetalk•4d ago•16 comments

Introduction – Rust for Python Programmers

https://microsoft.github.io/RustTraining/python-book/
34•linhns•3h ago•12 comments

Did Claude increase bugs in rsync?

https://alexispurslane.github.io/rsync-analysis/
457•logicprog•1d ago•461 comments

Google will pay SpaceX $920M per month for compute

https://techcrunch.com/2026/06/05/google-will-pay-spacex-920m-per-month-for-compute/
111•ramanan•2h ago•125 comments

Gemma 4 QAT models: Optimizing compression for mobile and laptop efficiency

https://blog.google/innovation-and-ai/technology/developers-tools/quantization-aware-training-gem...
366•theanonymousone•21h ago•110 comments

Azure Linux Desktop

https://www.boxofcables.dev/azure-linux-desktop-a-build-2026-mashup-of-wslc-winui-reactor-and-azu...
36•haydenbarnes•6h ago•16 comments

Mouseless – keyboard-driven control of macOS/Linux/Windows

https://mouseless.click
546•riddley•3d ago•222 comments

The Smart TV in Your LivingRoom Is a Node in the AIScraping Economy

https://blog.includesecurity.com/2026/06/the-smart-tv-in-your-livingroom-is-a-node-in-the-aiscrap...
110•nikcub•4h ago•26 comments

HISE – Toolkit for building VST plugins

https://hise.dev
11•hyperific•2d ago•2 comments

The back cover of C++: The Language raises questions not answered by front cover

https://devblogs.microsoft.com/oldnewthing/20260605-01/?p=112391
119•paulmooreparks•10h ago•40 comments

My Agent Skill for Test-Driven Development

https://www.saturnci.com/my-agent-skill-for-test-driven-development.html
205•laxmena•1d ago•88 comments

Nvidia is proposing a beast of a CPU system for Windows PCs

https://twitter.com/lemire/status/2062880075117113739
33•tosh•1h ago•55 comments

Zig Zen Update

https://codeberg.org/ziglang/zig/commit/621844bde551ee1a9b8142d7d146d1fa804247a2
105•tosh•5h ago•40 comments

Meta Keeps Delaying the Release of Its New AI Model to Developers

https://www.wsj.com/tech/ai/meta-keeps-delaying-the-release-of-its-new-ai-model-to-developers-f85...
12•mekpro•1h ago•0 comments

Ten Years of Franz

https://meetfranz.com/blog/ten-years-of-franz
47•tosh•3d ago•26 comments

Gov.uk has replaced Stripe with Dutch provider Adyen

https://www.theregister.com/public-sector/2026/06/04/govuk-goes-dutch-on-payments-as-it-dumps-str...
504•toomuchtodo•21h ago•194 comments

Lockdown Mode

https://help.openai.com/en/articles/20001061-lockdown-mode
74•berlianta•10h ago•32 comments

Conventional Commits encourages focus on the wrong things

https://sumnerevans.com/posts/software-engineering/stop-using-conventional-commits/
335•jsve•22h ago•239 comments