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•3h 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: I built a sub-500ms latency voice agent from scratch

https://www.ntik.me/posts/voice-agent
144•nicktikhonov•4h ago•38 comments

Show HN: Govbase – Follow a bill from source text to news bias to social posts

https://govbase.com
153•foxfoxx•8h ago•68 comments

Show HN: PHP 8 disable_functions bypass PoC

https://github.com/m0x41nos/TimeAfterFree
3•m0x41nos•22m ago•0 comments

Show HN: Visual Lambda Calculus – a thesis project (2008) revived for the web

https://github.com/bntre/visual-lambda
16•bntr•2d ago•4 comments

Show HN: Pianoterm – Run shell commands from your Piano. A Linux CLI tool

https://github.com/vustagc/pianoterm
38•vustagc•4h ago•15 comments

Show HN: uBlock filter list to blur all Instagram Reels

https://gist.github.com/shraiwi/009c652da6ce8c99a6e1e0c86fe66886
98•shraiwi•5h ago•25 comments

Show HN: Omni – Open-source workplace search and chat, built on Postgres

https://github.com/getomnico/omni
147•prvnsmpth•16h ago•41 comments

Show HN: Open-Source Postman for MCP

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

Show HN: Timber – Ollama for classical ML models, 336x faster than Python

https://github.com/kossisoroyce/timber
181•kossisoroyce•1d ago•30 comments

Show HN: Web Audio Studio – A Visual Debugger for Web Audio API Graphs

https://webaudio.studio/
58•alexgriss•13h ago•5 comments

Show HN: We filed 99 patents for deterministic AI governance(Prior Art vs. RLHF)

2•genesalvatore•2h ago•0 comments

Show HN: Gapless.js – gapless web audio playback

https://github.com/RelistenNet/gapless.js
27•switz•6h ago•7 comments

Show HN: Try Archetype 360 – AI‑powered personality test, 3× deeper than MBTI

https://archetype360.app/
8•ddesposito•9h ago•4 comments

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

3•fuelingcurious•3h ago•0 comments

Show HN: Agd – a content-addressed DAG for tracking what AI agents do

https://github.com/frontman-ai/agd
3•BlueHotDog2•3h ago•0 comments

Show HN: Punch card simulator and Fortran IV interpreter

https://punch.ehrlich.dev/
3•behrlich•7h ago•0 comments

Show HN: CrowPay – add x402 in a few lines, let AI agents pay per request

https://www.crowpay.ai/
2•ssistilli•5h ago•0 comments

Show HN: Writing App for Novelist

https://novelos.studio/
5•oknoorap•5h ago•2 comments

Show HN: Watchtower – see every API call Claude Code and Codex CLI make

https://github.com/fahd09/watchtower
2•fahd09•5h ago•1 comments

Show HN: I spent a billion tokens bridging Elixir and WebAssembly

https://yev.bar/firebird
2•yevbar•6h ago•1 comments

Show HN: Smart-commit-rs – A zero-dependency Git commit tool in Rust

https://github.com/gtkacz/smart-commit-rs
2•gtkacz•6h ago•0 comments

Show HN: Valkey-powered semantic memory for Claude Code sessions

2•kaliades•7h ago•0 comments

Show HN: I built a zero-browser, pure-JS typesetting engine for bit-perfect PDFs

https://github.com/cosmiciron/vmprint
74•cosmiciron•1d ago•52 comments

Show HN: Zi2zi-JIT – Generate Chinese font in one hour

https://github.com/kaonashi-tyc/zi2zi-JiT
4•zi2zi-jit•2h ago•0 comments

Show HN: Logira – eBPF runtime auditing for AI agent runs

https://github.com/melonattacker/logira
24•melonattacker•1d ago•3 comments

Show HN: Audio Toolkit for Agents

https://github.com/shiehn/sas-audio-processor
57•stevehiehn•1d ago•9 comments

Show HN: Prvctice,A personal OS I built solo that generates its own apps

https://github.com/prvctice/prvctice
2•prvctice•8h ago•0 comments

Show HN: Ledge - Policy layer for AI agent payments (prevents unauthorized txns)

https://github.com/Devendra116/ledge
2•devendra116•9h ago•0 comments

Show HN: Clean Express – a native NNTP/Usenet client for iOS/macOS/visionOS

https://testflight.apple.com/join/DmBXsPhU
4•jim180•9h ago•0 comments

Show HN: MoodJot – Mood tracker mobile app with community feed, built with KMP

https://moodjot.app
3•appmuzzik•9h ago•0 comments