frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Vanilla JavaScript refinery simulator built to explain job to my kids

3•fuelingcurious•1h ago
Hi HN, I’m a chemical engineer and I manage logistics at a refinery down in Texas. Whenever I try to explain downstream operations to people outside the industry (including my kids), I usually get blank stares. I wanted to build something that visualizes the concepts and chemistry of a plant without completely dumbing down the science, so I put together this 5-minute browser game.

I am not a software developer by trade, so I relied heavily on LLMs (Claude, Copilot, Gemini) to help write the code. What started as a simple concept turned into a 9,000-line single-page app built with vanilla HTML, CSS, and JavaScript. I used Matter.js for the 2D physics minigames.

A few technical takeaways from building this as a non-dev: * Managing the LLM workflow: Once the script.js file got large, letting the models output full file rewrites was a disaster (truncations, hallucinations, invisible curly-quote replacements that broke the JS). I started forcing them to act like patch files, strictly outputting "Find this exact block" and "Replace with this exact block." This was the only way to maintain improvements without breaking existing logic.

* Mapping physics to CSS: I wanted the minigames to visually sit inside circular CSS containers (border-radius: 50%). Matter.js doesn't natively care about your CSS. Getting the rigid body physics to respect a dynamic, responsive DOM boundary across different screen sizes required running an elliptical boundary equation (dx * dx) / (rx * rx) + (dy * dy) / (ry * ry) > 1 on every single frame. Maybe this was overkill to try to handle the resizing between phones and PCs.

* Mobile browser events: Forcing iOS Safari to ignore its default behaviors (double-tap zoom, swipe-to-scroll) while still allowing the user to tap and drag Matter.js objects required a ridiculous amount of custom event listener management and CSS (touch-action: manipulation; user-select: none;). I also learned that these actions very easily kill the mouse scroll making it very frustrating for PC users. I am hoping I hit a good middle ground.

* State management: Since I didn't use React or any frameworks, I had to rely on a global state object. Because the game jumps between different phases/minigames, I ran into massive memory leaks from old setInterval loops and Matter.js bodies stacking up. I had to build strict teardown functions to wipe the slate clean on every map transition.

The game walks through electrostatic desalting, fractional distillation, hydrotreating, catalytic cracking, and gasoline blending (hitting specific Octane and RVP specs).

It’s completely free, runs client-side, and has zero ads or sign-ups. I'd appreciate any feedback on the mechanics, or let me know if you manage to break the physics engine. Happy to answer any questions about the chemical engineering side of things as well.

For some reason the URL box is not getting recognized, maybe someone can help me feel less dumb there too. www.fuelingcuriosity.com/game

Show HN: BridgeBase – one control plane for TigerBeetle,Redis,MySQL,ClickHouse

https://bridgebase.dev
1•amustaque97•1m ago•0 comments

Guidelines for Writing Cryptography Specifications

https://cfrg.github.io/draft-irtf-cfrg-cryptography-specification/draft-irtf-cfrg-cryptography-sp...
1•themaxdavitt•2m ago•0 comments

AI is creeping into election campaigns. NZ's rules aren't ready

https://www.rnz.co.nz/news/political/588398/ai-is-already-creeping-into-election-campaigns-nz-s-r...
3•billybuckwheat•3m ago•0 comments

White House stalls release of approved US science budgets

https://www.nature.com/articles/d41586-026-00601-0
5•bryanrasmussen•5m ago•0 comments

Show HN: Open-Source Postman for MCP

https://github.com/baristaGeek/open-source-postman-for-mcp
1•baristaGeek•6m ago•0 comments

" I've got the guns," is a wild government argument for tech pundits to support

https://birchtree.me/blog/what-are-you-going-to-do-stop-me-ive-got-the-guns-is-a-wild-govargument...
1•alsetmusic•6m ago•1 comments

Cavaro – One platform for design docs and architecture diagrams

https://www.cavaro.io
1•curiouscharan•11m ago•1 comments

Astro and Svelte: Why I believe they're the future of web development

https://xergioalex.com/blog/astro-and-svelte-the-future-of-web-development/
1•xergioalex•13m ago•0 comments

Bounded Plasticity Simulation

https://github.com/Relational-Relativity-Corporation/bounded-plasticity-simulation
1•Oberon245•14m ago•0 comments

Clueless cops post seized crypto wallet password. $5M quickly stolen

https://arstechnica.com/tech-policy/2026/03/oops-south-korean-cops-lost-5m-in-seized-crypto-after...
2•donutshop•16m ago•0 comments

AI First Application Development

https://benkaiser.dev/ai-first-software-development/
1•benkaiser•18m ago•1 comments

The world wants to ban children from social media with grave consequences

https://www.theguardian.com/commentisfree/2026/mar/02/ban-children-social-media-biometic-data-sur...
2•doener•19m ago•0 comments

Show HN: WaitQ – queue management and waitlist system

https://waitq.app
1•azorstudio•21m ago•0 comments

How to Build Your Own Quantum Computer

https://physics.aps.org/articles/v19/24
1•tzury•23m ago•0 comments

AI Architecture Pattern Manager – Togaf ABB/SBB/PBC with Neo4J

https://github.com/azaddjan/aipatternmanager
1•azaddjan•25m ago•1 comments

Slop Definitions Were My Final Straw with Google Search

https://zsrobinson.com/posts/slop-definitions-were-my-final-straw-with-google-search/
2•zsrobinson•26m ago•1 comments

Vouch

https://vouch.sh
2•jplock•27m ago•0 comments

Musk's fossil data centres are undoing Tesla's climate benefit

https://ketanjoshi.co/2026/03/02/musks-fossil-data-centres-are-undoing-teslas-climate-benefit/
3•xvxvx•28m ago•0 comments

Exploiting Iran: A Political Timeline

https://github.com/thinkhuman/iranwest/blob/main/exploitingiran.md
1•jamesgill•29m ago•0 comments

Poll: Which VCs Are Tier 1?

https://vc-compare.vercel.app/
2•nezaj•29m ago•1 comments

Nobody ever got fired for using a struct

https://www.feldera.com/blog/nobody-ever-got-fired-for-using-a-struct
3•gz09•30m ago•0 comments

Origin of the Abbreviation i18n

http://www.i18nguy.com/origini18n.html
1•ethanpil•31m ago•0 comments

Fast Biology Bounties

https://nikomc.com/2026/03/02/bounties/
1•mailyk•32m ago•0 comments

Vibe Theory: Mathematical Derivation of Aesthetic Vibe from Text

https://github.com/xraymemory/vibetheory
1•idempotent_•32m ago•0 comments

2x Qwen 3.5 on M1 Mac: 9B builds a bot, 0.8B runs it

https://advanced-stack.com/fields-notes/qwen35-opencode-lm-studio-agentic-coding-on-m1.html
2•advanced-stack•36m ago•0 comments

Five People in Their 60s, 70s, and 80s Share How They Plan to Age at Home

https://www.nytimes.com/wirecutter/reviews/seniors-share-aging-in-place-plans/
6•bookofjoe•37m ago•1 comments

Show HN: AgentBrowser Token-efficient browser for AI agents via ASCII wireframes

https://github.com/agent-browser-io/browser
1•dokdev•39m ago•1 comments

Microsoft Creative Writer (1993)

https://classicreload.com/play/win3x-creative-writer.html
3•bikeshaving•40m ago•1 comments

Show HN: Parallax – Coordinate adversarial AI agents over durable streams

https://github.com/s2-streamstore/parallax
1•infiniteregrets•42m ago•0 comments

Closure of the Weatherradio Service in Canada

https://www.rac.ca/rac-responds-to-the-closure-of-the-weatherradio-service-in-canada/
17•da768•42m ago•9 comments