Hacker Newsnew | past | comments | ask | show | jobs | submit | graphpilled's commentslogin

Hi HN, I've been obsessed with the idea of visual ML model building since mid-2024. I experimented with a bunch of approaches: Three.js to PyTorch, a Three.js to OCaml compiler with a custom Lisp-inspired IR targeting CUDA. None of them felt right, so I paused to work on other projects. In December I rethought the whole approach. Instead of targeting CUDA (which requires a server), I asked: what if the entire compiler ran in the browser? WebGPU had matured enough that it seemed possible. So I built this. ReScript compiles to JavaScript and generates WGSL compute shaders. I defined 208 operations as algebraic types, wrote a shape inference engine with broadcasting and convolution rules, and built a codegen module (3500+ lines) that emits optimized WGSL for every op. The compiler handles topological sorting, buffer allocation, and dispatch scheduling. Autograd generates backward kernels for each differentiable operation. No server, no ONNX runtime—just your browser and GPU. The demo is a 3D block builder where you drag layers onto a canvas and watch four code views update live: the high-level nn.js API, the ReScript compiler graph, the raw WGSL shaders, and the dispatch table. You can load preset architectures (CNN, Transformer, Autoencoder, LSTM) or build your own. What I'm most pleased with is the INT4 quantized matmul—column-major weight layout for coalesced reads, vec4 dot products, per-group dequantization. I got Qwen 2.5 7B running entirely in-browser at decent speed even on my crappy used ThinkPad. Source: https://github.com/graphpilled/visual-web-ai Try it out and tell me what you think.


That's wild. Hard to say for sure—could be that your scenario's structure pattern-matched something in Qwen's training data, or it picked up on implicit episodic cues in your writing. The base model has seen a lot of serialized content. What was the original scenario about?


Interesting use case. I don't have a public API yet, but it's something I'd consider if there's demand. What kind of integration are you imagining—feeding prompts in and getting branches back, or something else?


Enthusiastic amateur here. I have no film school or real writing experience.

I’d use it to explore branching first. My system has a rich knowledge tree and could write some very detailed prompts. We would discuss the results and integrate them into our tree.

I want to have that visual graph representation for myself as well, but it seems like my text repo really needs some structural formality.

I also think your system would be a good consultant for mine. We have questions about story writing, you have an endpoint for that.

My current story is being written for the page, no film contemplated yet, so I haven’t thought about access your screenplay tools yet.


That's a cool setup. An API that returns the branching structure as JSON would fit your use case well—you'd feed in a prompt, get back the graph, and integrate it into your knowledge tree however you want.

I'll keep this in mind as I plan the API. If you want to stay in touch, I just created an X account—it's on my HN profile.


The Oblique Strategies comparison is exactly the vibe I was going for—generative constraints that open up possibilities rather than closing them down. Node editing is the top priority right now. You're right that the loop isn't complete without it.


so great to see Oblique Strategies by Eno surviving in minds of 2026


Good point—you're right, there should be a way to mark a branch as an endpoint instead of forcing more branches. Adding that to the list. Thanks.


Not yet, but both are on the roadmap. Manual node editing is the next priority—letting you tweak branches or add your own directions.

The script evaluation idea is interesting—you're not the first to suggest it. The extraction pipeline already identifies structural elements like scene mirroring and character arc inversions, so exposing that as an analysis tool isn't a huge leap. Definitely something I want to explore.


Thanks for flagging that—the node overlap issue is a known bug when the graph gets dense. I'm working on better auto-layout. Appreciate the report.


There's a demo on the landing page that walks through it. Basically you input any idea—no matter how vague—and the system generates branching directions you could take it. You explore the branches, and when you're satisfied you can export and the system generates a technical screenplay based on your choices. There's no "right" first prompt—I've thrown some of my dumbest ideas at it just to see where the system takes me. That's kind of the point. Regarding adding your own branches—yes, that's on my roadmap. Letting users create their own options and shape the graph more directly. Still a work in progress!


Thanks! Here's the full list: 2001: A Space Odyssey, 8½, Aguirre the Wrath of God, Ali: Fear Eats the Soul, All That Heaven Allows, Apocalypse Now, Ashes and Diamonds, A Woman Under the Influence, Barry Lyndon, Bicycle Thieves, Breathless, Casablanca, Céline and Julie Go Boating, Chinatown, Chinese Roulette, Citizen Kane, City Lights, City of Pirates, Contempt, Daisies, Damnation, Dishonored, Earth, Electra My Love, El Topo, Eraserhead, Eyes Wide Shut, Film Socialisme, Fitzcarraldo, Fuego en Castilla, Hiroshima Mon Amour, Holy Motors, Inauguration of the Pleasure Dome, In a Year with 13 Moons, India Song, Inland Empire, Irma Vep, Koyaanisqatsi, La Dolce Vita, La Jetée, Late Spring, L'Eau de la Seine, Le Voyage dans la Lune, Lolita, Los Olvidados, Lost Highway, Lucifer Rising, Man with a Movie Camera, Metropolis, Mirror, Mulholland Drive, Night Music, Ordet, Orpheus, Persona, Pickpocket, Playtime, Psycho, Rebecca, Rosemary's Baby, Rumble Fish, Scarface, Seven Samurai, Sherlock Jr., Singin' in the Rain, Stalker, Sunset Boulevard, Taste of Cherry, Taxi Driver, Testament of Orpheus, The 400 Blows, The Blood of a Poet, The Cabinet of Dr. Caligari, The Color of Pomegranates, The Green Ray, The Holy Mountain, The Isle, The Lady from Shanghai, The Night of the Hunter, The Passion of Joan of Arc, The Seventh Seal, The Spirit of the Beehive, The Tales of Hoffmann, The Tree of Life, The Turin Horse, Time of the Gypsies, Tokyo Story, Touch of Evil, Trans-Europ-Express, Ugetsu, Un Chien Andalou, Uncle Boonmee Who Can Recall His Past Lives, Vampyr, Videodrome, Wavelength, Werckmeister Harmonies, Wild Strawberries, Moonlight Sonata, Stellar, The Haunted House Biased toward European art cinema, experimental work, and directors who broke conventional narrative rules.


Good point! Here's a quick demo showing how it works: https://www.youtube.com/watch?v=b66ZHznBvEM


Is that issue not immediately apparent to you? Your splash page says literally nothing. Why can't you put even a tiny example of what this is all about? You can't expect people to hand over personal information to hear an elevator pitch.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: