frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

RustGPT: A pure-Rust transformer LLM built from scratch

https://github.com/tekaratzas/RustGPT
135•amazonhut•2h ago•49 comments

Removing newlines in FASTA file increases ZSTD compression ratio by 10x

https://log.bede.im/2025/09/12/zstandard-long-range-genomes.html
65•bede•2d ago•25 comments

Folks, we have the best π

https://lcamtuf.substack.com/p/folks-we-have-the-best
128•fratellobigio•5h ago•43 comments

Language Models Pack Billions of Concepts into 12k Dimensions

https://nickyoder.com/johnson-lindenstrauss/
223•lawrenceyan•8h ago•73 comments

Betty Crocker broke recipes by shrinking boxes

https://www.cubbyathome.com/boxed-cake-mix-sizes-have-shrunk-80045058
424•Avshalom•14h ago•492 comments

PythonBPF – Writing eBPF Programs in Pure Python

https://xeon.me/gnome/pythonbpf/
74•JNRowe•3d ago•13 comments

Celestia – Real-time 3D visualization of space

https://celestiaproject.space/
83•LordNibbler•6h ago•16 comments

Human writers have always used the em dash

https://www.theringer.com/2025/08/20/pop-culture/em-dash-use-ai-artificial-intelligence-chatgpt-g...
24•FromTheArchives•2d ago•6 comments

Grapevine canes can be converted into plastic-like material that will decompose

https://www.sdstate.edu/news/2025/08/can-grapevines-help-slow-plastic-waste-problem
344•westurner•14h ago•265 comments

Which colours dominate movie posters and why?

https://stephenfollows.com/p/which-colours-dominate-movie-posters-and-why
134•FromTheArchives•2d ago•21 comments

NASA's Guardian Tsunami Detection Tech Catches Wave in Real Time

https://www.jpl.nasa.gov/news/nasas-guardian-tsunami-detection-tech-catches-wave-in-real-time/
41•geox•2d ago•6 comments

Sandboxing Browser AI Agents

https://www.earlence.com/blog.html#/post/cellmate
25•earlence•3d ago•0 comments

The $10 Payment That Cost Me $43.95 – The Madness of SaaS Chargebacks

https://medium.com/@citizenblr/the-10-payment-that-cost-me-43-95-the-madness-of-saas-chargebacks-...
21•evermike•44m ago•23 comments

For Good First Issue – A repository of social impact and open source projects

https://forgoodfirstissue.github.com/
65•Brysonbw•10h ago•11 comments

Which NPM package has the largest version number?

https://adamhl.dev/blog/largest-number-in-npm-package/
108•genshii•9h ago•46 comments

Omarchy on CachyOS

https://github.com/mroboff/omarchy-on-cachyos
49•theYipster•7h ago•30 comments

Analyzing the memory ordering models of the Apple M1

https://www.sciencedirect.com/science/article/pii/S1383762124000390
97•charles_irl•3d ago•40 comments

A qualitative analysis of pig-butchering scams

https://arxiv.org/abs/2503.20821
121•stmw•8h ago•55 comments

You’re a slow thinker. Now what?

https://chillphysicsenjoyer.substack.com/p/youre-a-slow-thinker-now-what
445•sebg•4d ago•174 comments

Death to Type Classes

https://jappie.me/death-to-type-classes.html
40•zeepthee•3d ago•25 comments

Titania Programming Language

https://github.com/gingerBill/titania
93•MaximilianEmel•13h ago•41 comments

Learning Lens Blur Fields

https://blur-fields.github.io/
47•bookofjoe•3d ago•11 comments

A set of smooth, fzf-powered shell aliases&functions for systemctl

https://silverrainz.me/blog/2025-09-systemd-fzf-aliases.html
12•SilverRainZ•2d ago•5 comments

Why We Spiral

https://behavioralscientist.org/why-we-spiral/
320•gmays•21h ago•87 comments

OCSP Service Has Reached End of Life

https://letsencrypt.org/2025/08/06/ocsp-service-has-reached-end-of-life
195•pfexec•16h ago•61 comments

Writing an operating system kernel from scratch

https://popovicu.com/posts/writing-an-operating-system-kernel-from-scratch/
304•Bogdanp•20h ago•58 comments

Page Object (2013)

https://martinfowler.com/bliki/PageObject.html
30•adityaathalye•4d ago•20 comments

Introduction to GrapheneOS

https://dataswamp.org/~solene/2025-01-12-intro-to-grapheneos.html
204•renehsz•4d ago•198 comments

Trigger Crossbar

https://serd.es/2025/09/14/Trigger-crossbar.html
76•zdw•14h ago•11 comments

AMD Turin PSP binaries analysis from open-source firmware perspective

https://blog.3mdeb.com/2025/2025-09-11-gigabyte-mz33-ar1-blob-analysis/
65•pietrushnic•14h ago•12 comments
Open in hackernews

RustGPT: A pure-Rust transformer LLM built from scratch

https://github.com/tekaratzas/RustGPT
135•amazonhut•2h ago

Comments

techsystems•2h ago
> ndarray = "0.16.1" rand = "0.9.0" rand_distr = "0.5.0"

Looking good!

kachapopopow•2h ago
I was slightly curious: cargo tree llm v0.1.0 (RustGPT) ├── ndarray v0.16.1 │ ├── matrixmultiply v0.3.9 │ │ └── rawpointer v0.2.1 │ │ [build-dependencies] │ │ └── autocfg v1.4.0 │ ├── num-complex v0.4.6 │ │ └── num-traits v0.2.19 │ │ └── libm v0.2.15 │ │ [build-dependencies] │ │ └── autocfg v1.4.0 │ ├── num-integer v0.1.46 │ │ └── num-traits v0.2.19 () │ ├── num-traits v0.2.19 () │ └── rawpointer v0.2.1 ├── rand v0.9.0 │ ├── rand_chacha v0.9.0 │ │ ├── ppv-lite86 v0.2.20 │ │ │ └── zerocopy v0.7.35 │ │ │ ├── byteorder v1.5.0 │ │ │ └── zerocopy-derive v0.7.35 (proc-macro) │ │ │ ├── proc-macro2 v1.0.94 │ │ │ │ └── unicode-ident v1.0.18 │ │ │ ├── quote v1.0.39 │ │ │ │ └── proc-macro2 v1.0.94 () │ │ │ └── syn v2.0.99 │ │ │ ├── proc-macro2 v1.0.94 () │ │ │ ├── quote v1.0.39 () │ │ │ └── unicode-ident v1.0.18 │ │ └── rand_core v0.9.3 │ │ └── getrandom v0.3.1 │ │ ├── cfg-if v1.0.0 │ │ └── libc v0.2.170 │ ├── rand_core v0.9.3 () │ └── zerocopy v0.8.23 └── rand_distr v0.5.1 ├── num-traits v0.2.19 () └── rand v0.9.0 ()

yep, still looks relatively good.

cmrdporcupine•1h ago
linking both rand-core 0.9.0 and rand-core 0.9.3 which the project could maybe avoid by just specifying 0.9 for its own dep on it
tonyhart7•1h ago
is this satire or does I must know context behind this comment???
stevedonovan•1h ago
These are a few well-chosen dependencies for a serious project.

Rust projects can really go bananas on dependencies, partly because it's so easy to include them

obsoleszenz•1h ago
The project only has 3 dependencies which i interpret as a sign of quality
Charon77•2h ago
Absolutely love how readable the entire project is
yieldcrv•2h ago
Never knew Rust could be that readable. Makes me think other Rust engineers are stuck in a masochistic ego driven contest, which would explain everything else I've encountered about the Rust community and recruiting on that side.
jmaker•1h ago
Not sure what you’re alluding to but that’s just ordinary Rust without performance or async IO concerns.
GardenLetter27•46m ago
Most Rust code looks like this - only generic library code goes crazy with all the generics and lifetimes, due to the need to avoid unnecessary mallocs and also provide a flexible API to users.

But most people aren't writing libraries.

emporas•1h ago
It is very procedural/object oriented. This is not considered good Rust practice. Iterators make it more functional, which is better, more succinct that is, and enums more algebraic. But it's totally fine for a thought experiment.
koakuma-chan•1h ago
It's AI generated
Revisional_Sin•1h ago
How do you know? The over-commenting?
koakuma-chan•54m ago
I know because this is how an AI generated project looks. Clearly AI generated README, "clean" code, the way files are named, etc.
cmrdporcupine•51m ago
To me it looks like LLM generated README, but not necessarily the source (or at least not all of it).

Or there's been a cleaning pass done over it.

koakuma-chan•46m ago
I think pretty clearly the source is also at least partially generated. None the less, just a README like that already sends a strong signal to stop looking and not trust anything written there.
magackame•46m ago
Not sure myself. Commit messages look pretty human. But the emojis in readme and comments like "// Re-export key structs for easier access", "# Add any test-specific dependencies here if needed" are sus indeed.
GardenLetter27•48m ago
The repeated Impls are strange.
magackame•41m ago
Where? Don't see any on latest main (685467e).
yahoozoo•11m ago
`llm.rs` has many `impl LLM` blocks
ndai•1h ago
I’m curious where you got your training data? I will look myself, but saw this and thought I’d ask. I have a CPU-first, no-backprop architecture that works very well on classification datasets. It can do single‑example incremental updates which might be useful for continuous learning. I made a toy demo to train on tiny.txt and it can predict next characters, but I’ve never tried to make an LLM before. I think my architecture might work well as an on-device assistant or for on-premises needs, but I want to work with it more before I embarrass myself. Any open-source LLM training datasets you would recommend?
kachapopopow•1h ago
huggingface has plenty of openai and antrophic user to assistant chains, beware there are dragons (hallucinations), but good enough for instruction training. I actually recommend distilling kimi k2 instead for instruction following capabilities.
electroglyph•1h ago
https://huggingface.co/datasets/NousResearch/Hermes-3-Datase...
Snuggly73•44m ago
To my untrained eye, this looks more like an instruct dataset.

For just plain text, I really like this one - https://huggingface.co/datasets/roneneldan/TinyStories

kachapopopow•1h ago
This looks rather similar to when I asked an AI to implement a basic xor problem solver I guess fundementally there's really only a very limited amount of ways to implement this.
Goto80•1h ago
Nice. Mind to put a license on that?
thomask1995•37m ago
License added! Good catch
untrimmed•1h ago
As someone who has spent days wrestling with Python dependency hell just to get a model running, a simple cargo run feels like a dream. But I'm wondering, what was the most painful part of NOT having a framework? I'm betting my coffee money it was debugging the backpropagation logic.
taminka•1h ago
lowkey ppl who praise cargo seem to have no idea of the tradeoffs involved in dependency management

the difficulty of including a dependency should be proportional to the risk you're taking on, meaning it shouldn't be as difficult as it in, say, C where every other library is continually reinventing the same 5 utilities, but also not as easy as it is with npm or cargo, because you get insane dependency clutter, and all the related issues like security, build times, etc

how good a build system isn't equivalent of how easy it is include a dependency, while modern languages should have a consistent build system, but having a centralised package repository that anyone freely pull to/from, and having those dependencies freely take on any number of other dependencies is a bad way to handle dependencies

itsibitzi•52m ago
What tool or ecosystem does this well, in your opinion?
quantumspandex•51m ago
Security is another problem, and should be tackled systematically. Artificially making dependency inclusion hard is not it and is detrimental to the more casual use cases.
jokethrowaway•37m ago
Is your argument that python's package management & ecosystem is bad by design - to increase security?

In my experience it's just bugs and poor decision making on the maintainers (eg. pytorch dropping support for intel mac, leftpad in node) or on the language and package manager developers side (py2->3, commonjs, esm, go not having a package manager, etc).

Cargo has less friction than pypi and npm. npm has less friction than pypi.

And yet, you just need to compromise one lone, unpaid maintainer to wreck the security of the ecosystem.

dev_l1x_be•34m ago
> lowkey ppl who praise cargo seem to have no idea

Way to go on insulting people on HN. Cargo is literally the reason why people coming to Rust from languages like C++ where the lack of standardized tooling is giant glaring bomb crater that poses burden on people every single time they need to do some basic things (like for example version upgrades).

Example:

https://github.com/facebook/folly/blob/main/build.sh

IshKebab•26m ago
This is the weirdest excuse for Python's terrible tooling that I've ever heard.

"It's deliberately shit so that people won't use it unless they really have to."

codetiger•1h ago
I guess, resource utilization like GPU, etc
ricardobeat•49m ago
Have you tried uv [1]? It has removed 90% of the pain of running python projects for me.

[1] https://github.com/astral-sh/uv

DiabloD3•25m ago
uv is great, but I think the real fix is just abandoning Python.

The culture that language maintains is rather hostile to maintainable development, easier to just switch to Rust and just write better code by default.

airza•20m ago
There's not really another game in town if you want to do fast ML development :/
DiabloD3•4m ago
Dunno, almost all of the people I know anywhere in the ML space are on the C and Rust end of the spectrum.

Lack of types, lack of static analysis, lack of ... well, lack of everything Python doesn't provide and fights users on costs too much developer time. It is a net negative to continue pouring time and money into anything Python-based.

The sole exclusion I've seen to my social circle is those working at companies that don't directly do ML, but provide drivers/hardware/supporting software to ML people in academia, and have to try to fix their cursed shit for them.

Also, fwiw, there is no reason why Triton is Python. I dislike Triton for a lot of reasons, but its just a matmul kernel DSL, there is nothing inherent in it that has to be, or benefits from, being Python.... it takes DSL in, outputs shader text out, then has the vendor's API run it (ie, CUDA, ROCm, etc). It, too, would benefit from becoming Rust.

trklausss•16m ago
Every tool for the right job. If you are doing tons of scripting (for e.g. tests on platforms different than Rust), Python can be a solid valid alternative.

Also, tons of CAE platforms have Python bindings, so you are "forced" to work on Python. Sometimes the solution is not just "abandoning a language".

If it fits your purpose, knock yourself out, for others that may be reading: uv is great for Python dependency management on development, I still have to test it for deployment :)

Galanwe•16m ago
> spent days wrestling with Python dependency hell

I mean I would understand that comment in 2010, but in 2025 it's grossly ridiculous.

enricozb•1h ago
I did this [0] (gpt in rust) with picogpt, following the great blog by jaykmody [1].

[0]: https://github.com/enricozb/picogpt-rust [1]: https://jaykmody.com/blog/gpt-from-scratch/

bigmuzzy•1h ago
nice
abricq•1h ago
This is great ! Congratulations. I really like your project, especially I like how easily it is to peak at.

Do you plan on moving forward with this project ? I seem to understand that all the training is done on the CPU, and that you have next steps regarding optimizing that. Do you consider GPU accelerations ?

Also, do you have any benchmarks on known hardware ? Eg, how long would it take to train on a macbook latest gen or your own computer ?

ramon156•56m ago
Cool stuff! I can see some GPT comments that can be removed

// Increased for better learning

this doesn't tell me anything

// Use the constants from lib.rs

const MAX_SEQ_LEN: usize = 80;

const EMBEDDING_DIM: usize = 128;

const HIDDEN_DIM: usize = 256;

these are already defined in lib.rs, why not use them (as the comment suggests)

jlmcgraw•48m ago
Some commentary from the author here: https://www.reddit.com/r/rust/comments/1nguv1a/i_built_an_ll...
Snuggly73•47m ago
Congrats - there is a very small problem with the LLM - its reusing transformer blocks and you want to use different instances of them.

Its a very cool excercise, I did the same with Zig and MLX a while back, so I can get a nice foundation, but since then as I got hooked and kept adding stuff to it, switched to Pytorch/Transformers.

icemanx•44m ago
correction: It's a cool exercise if you write it yourself and not use GPT
Snuggly73•39m ago
well, hopefully the author did learn something or at least enjoyed the process :)

(the code looks like a very junior or a non-dev wrote it tbh).