frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Start all of your commands with a comma (2009)

https://rhodesmill.org/brandon/2009/commands-with-comma/
233•theblazehen•2d ago•68 comments

OpenCiv3: Open-source, cross-platform reimagining of Civilization III

https://openciv3.org/
694•klaussilveira•15h ago•206 comments

Hoot: Scheme on WebAssembly

https://www.spritely.institute/hoot/
6•AlexeyBrin•1h ago•0 comments

The Waymo World Model

https://waymo.com/blog/2026/02/the-waymo-world-model-a-new-frontier-for-autonomous-driving-simula...
962•xnx•20h ago•555 comments

How we made geo joins 400× faster with H3 indexes

https://floedb.ai/blog/how-we-made-geo-joins-400-faster-with-h3-indexes
130•matheusalmeida•2d ago•35 comments

Unseen Footage of Atari Battlezone Arcade Cabinet Production

https://arcadeblogger.com/2026/02/02/unseen-footage-of-atari-battlezone-cabinet-production/
67•videotopia•4d ago•6 comments

Vocal Guide – belt sing without killing yourself

https://jesperordrup.github.io/vocal-guide/
54•jesperordrup•5h ago•24 comments

Jeffrey Snover: "Welcome to the Room"

https://www.jsnover.com/blog/2026/02/01/welcome-to-the-room/
37•kaonwarb•3d ago•27 comments

ga68, the GNU Algol 68 Compiler – FOSDEM 2026 [video]

https://fosdem.org/2026/schedule/event/PEXRTN-ga68-intro/
10•matt_d•3d ago•2 comments

Show HN: Look Ma, No Linux: Shell, App Installer, Vi, Cc on ESP32-S3 / BreezyBox

https://github.com/valdanylchuk/breezydemo
236•isitcontent•15h ago•26 comments

Monty: A minimal, secure Python interpreter written in Rust for use by AI

https://github.com/pydantic/monty
233•dmpetrov•16h ago•125 comments

Where did all the starships go?

https://www.datawrapper.de/blog/science-fiction-decline
32•speckx•3d ago•21 comments

UK infants ill after drinking contaminated baby formula of Nestle and Danone

https://www.bbc.com/news/articles/c931rxnwn3lo
11•__natty__•3h ago•0 comments

Show HN: I spent 4 years building a UI design tool with only the features I use

https://vecti.com
335•vecti•17h ago•147 comments

Hackers (1995) Animated Experience

https://hackers-1995.vercel.app/
502•todsacerdoti•23h ago•244 comments

Sheldon Brown's Bicycle Technical Info

https://www.sheldonbrown.com/
386•ostacke•21h ago•97 comments

Show HN: If you lose your memory, how to regain access to your computer?

https://eljojo.github.io/rememory/
300•eljojo•18h ago•186 comments

Microsoft open-sources LiteBox, a security-focused library OS

https://github.com/microsoft/litebox
361•aktau•22h ago•185 comments

An Update on Heroku

https://www.heroku.com/blog/an-update-on-heroku/
425•lstoll•21h ago•282 comments

PC Floppy Copy Protection: Vault Prolok

https://martypc.blogspot.com/2024/09/pc-floppy-copy-protection-vault-prolok.html
68•kmm•5d ago•10 comments

Dark Alley Mathematics

https://blog.szczepan.org/blog/three-points/
96•quibono•4d ago•22 comments

Was Benoit Mandelbrot a hedgehog or a fox?

https://arxiv.org/abs/2602.01122
21•bikenaga•3d ago•11 comments

The AI boom is causing shortages everywhere else

https://www.washingtonpost.com/technology/2026/02/07/ai-spending-economy-shortages/
19•1vuio0pswjnm7•1h ago•5 comments

How to effectively write quality code with AI

https://heidenstedt.org/posts/2026/how-to-effectively-write-quality-code-with-ai/
265•i5heu•18h ago•216 comments

Delimited Continuations vs. Lwt for Threads

https://mirageos.org/blog/delimcc-vs-lwt
33•romes•4d ago•3 comments

Introducing the Developer Knowledge API and MCP Server

https://developers.googleblog.com/introducing-the-developer-knowledge-api-and-mcp-server/
64•gfortaine•13h ago•28 comments

I now assume that all ads on Apple news are scams

https://kirkville.com/i-now-assume-that-all-ads-on-apple-news-are-scams/
1076•cdrnsf•1d ago•460 comments

Female Asian Elephant Calf Born at the Smithsonian National Zoo

https://www.si.edu/newsdesk/releases/female-asian-elephant-calf-born-smithsonians-national-zoo-an...
39•gmays•10h ago•13 comments

Understanding Neural Network, Visually

https://visualrambling.space/neural-network/
298•surprisetalk•3d ago•44 comments

I spent 5 years in DevOps – Solutions engineering gave me what I was missing

https://infisical.com/blog/devops-to-solutions-engineering
154•vmatsiiako•20h ago•72 comments
Open in hackernews

Rust and WASM for Form Validation

https://sebastian.lauwe.rs/blog/rust-wasm-form-validation/
60•slau•7mo ago

Comments

reactordev•7mo ago
Oh dear god no. Form Validation is what JavaScript was meant for. Do we really need to download >1MB wasm module so you can do a regex?

WASM should be left to things like IPC/Canvas/WebGPU stuff, not things easily done with document.querySelector

No offense, but this is using a bomb to kill a fly.

I know it says this is just a demo but people will find this and do this thinking it’s normal.

milliams•7mo ago
I just compiled the code provided in the article and the compiled WASM module is 22kb. Not saying that it makes it the right solution, but a 45× difference is not insignificant.
remram•7mo ago
But the example code doesn't do much validation. If you did want to use a regex, you would have to compile and bundle the regex crate...
littlestymaar•7mo ago
And what kind of form validation are you going to do with a regular expression? E-mail addresses like every other fool? (This is a the best to reject perfectly valid addresses because you baked unjustified assumptions in you regex)
porridgeraisin•7mo ago
For what it's worth, the inbuilt HTML5 validation that implementw input type=email does have a regex in the spec.

https://html.spec.whatwg.org/#email-state-(type=email)

  /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/

But it is true that you can implement it with a FSM(which is what firefox does). Webkit uses a regex as well I think.
drowsspa•7mo ago
Yeah, for all intents and purposes that's the spec for emails now
littlestymaar•7mo ago
TIL thanks.
zoechi•7mo ago
The bigger and more complex the application, the less is the effect of this.
remram•7mo ago
Me? None. I'm not the one proposing the use of Rust and WASM for form validation.

What kind of validation are you going to do without a regular expression?

littlestymaar•7mo ago
> What kind of validation are you going to do without a regular expression?

Actual form validation… I can't even think of a single kind of form validation where a regex would help…

01HNNWZ0MV43FF•7mo ago
With `regex-lite` I got under 100,000 bytes on the email regex in the sibling comment.

Not great, not terrible.

qoez•7mo ago
Once you compile it to wasm and dead code analysis is applied and notices that only a fraction of whatever libraries you're using is necessary for form validation the code tends to be a lot less than what you'd have if you used non dead code analyzed pure JS.
graypegg•7mo ago
Well, if we were implementing the equivalent in JS, we'd also use https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputEl... just like this. I think it would maybe be a few lines of javascript at most to do exactly what this is doing. 400ish bytes?

Of course there's always the argument that you'd add more javascript to "framework-ize" this a bit more, but the rust code is just targeting the DOM with IDs, so I don't think it's fair to compare it to any "framework-y" solution.

madduci•7mo ago
Same with some JavaScript frameworks. I need to download 700kb+ JS files just to perform some fancy stuff.
timeon•7mo ago
Also Tailwind. Obese HTML just to avoid css.
jpdenford•7mo ago
The author said the following

> I’m using form validation as a placeholder. It shows all the crucial aspects to use WASM instead of JS, like wiring up DOM events to Rust functions, and then reacting to those events.

_mlbt•7mo ago
You can actually do a lot of form validation without even using JavaScript. HTML and CSS are capable of handling many common form validation needs...

https://developer.mozilla.org/en-US/docs/Learn_web_developme...

jedisct1•7mo ago
Learn JavaScript.
chamomeal•7mo ago
Learn html!!
neoneye2•7mo ago
I have done the same, using same rust code for frontend/backend.

The UI is here https://loda-lang.org/edit/?oeis=2487

It can run from commandline for mining.

Implementation https://github.com/loda-lang/loda-rust

zoechi•7mo ago
Dioxus 0.7 comes with a set of components that cover even most of interaction with the JS side. There are great times ahead. What seems to be missing is modularizing and lazy loading of the WASM moduls to reduce initial download size (I saw some experiments). I immensely enjoy being able to use a sane language+tools for backend and frontend.
weinzierl•7mo ago
Direct DOM access is missing. Until that WASM will always be only a second class citizen
chamomeal•7mo ago
Will that ever be supported? I google it every six months or so and don’t see any promising news
weinzierl•7mo ago
Same. It does not help that the whole thing also changes name all the time, so even finding out about the current state is a challenge.
sjoedev•7mo ago
WASM does not need to access the DOM to be extremely useful. JS is already very effective and ridiculously fast for updating the DOM.

WASM is to offload computationally expensive workloads that JS is not so good for (perhaps some sort of computer vision, for example). It passes the result back to JS to update the DOM.

weinzierl•7mo ago
Everyone says that and it makes sense, so I don't criticize this opinion.

And yet you have articles like OP, where someone finds WASM useful for form validation which is clearly not in the "offload computationally expensive workloads" category and would profit from a direct integration.

tcfhgj•7mo ago
According to the developer of Leptos direct Dom access is barely relevant with respect to WASM webapps
afiori•7mo ago
The cost of not having direct dom access is that of a minimal js wrapper glue which is negligible,
wasmperson•7mo ago
> Obviously, the sample code above unwraps to high heaven, and that’s nothing something I would condone in actual production code—please do use proper error handling.

Everywhere the author used `unwrap` is a place where I would expect the program to crash if the operation fails, so I'm not sure what they imagine "proper error handling" in this case would look like. Take this snippet for example:

  let doc = window().unwrap().document().unwrap();
  let form = doc
      .get_element_by_id("login")
      .unwrap()
      .dyn_into::<HtmlFormElement>()
      .unwrap();
In javascript that looks like this:

  // or you could write nothing.  `login` is already a global variable
  let form = document.getElementById('login');
At a glance, the web-sys docs don't say, but I assume the error conditions that would trigger those `unwrap`s are:

- The `window` global is missing or the code is running outside of the browser

- The `document` global is missing

- The page has no form element with an id of "login"

I don't see a reasonable thing to do in those cases except crash.

A more general point: I find WebAssembly works best when:

- Interfacing with the DOM and web APIs is still mostly done in javascript

- The wasm binary has a narrow interface consisting of a handful of functions with careful calling conventions

- The wasm binary avoids dependencies on either third-party packages or the standard library (e.g. rust's "no_std")

- The compiled code generously uses mutable "global" variables (note: local to the wasm module instance)

The rust + wasm-bindgen + web-sys strategy feels like the exact opposite of this, which doesn't strike me as very useful unless you just want to avoid writing javascript entirely.