Live data from Hacker News

27.5KB language-agnostic WebGPU syntax highlighter

gpu-lexer.vercel.app

31–39 of 39 posts

Re: 27.5KB language-agnostic WebGPU syntax highlighter

#31
The size discipline here is lovely. Curious about the same trade-off I keep hitting with browser-only tools: what's the cold-start cost of the WebGPU pipeline compile on first paint?

I've been shipping WASM in the browser and the download size is almost never the real cost — it's compile/instantiate latency and, weirdly, a strict CSP silently refusing to compile it at all unless you allow wasm-unsafe-eval.

Does WebGPU shader compilation hit any similar CSP surface?

Re: 27.5KB language-agnostic WebGPU syntax highlighter

#32

Years ago, long before the current "AI"/LLM-craze, I've heard someone saying that in the future programming will have less fixed, deterministic algorithms and more statistical/ML algorithms, because even in the case when writing a deterministic algorithm is possible , it is sometimes easier to collect training data and train a tiny model, then to write and maintain large codebase that does the same thing, but determi…

yes, it's easier to build something that doesn't work. More news at 11.

Re: 27.5KB language-agnostic WebGPU syntax highlighter

#33
post #13

If anyone can get in contact with Shu, please let them know I'd really like to speak with them. I have a deterministic rendering / colorizing system in three dimensions instead of two for arbitrary UTF8 text written that is explicitly GPU bound and currently testing the last Rust + Mojo pair port, and I'd like to share some ideas. I have about 95 million glyphs rendering (monospace, atm) in a little under a second wi…

g@shud.in was listed as contact email on his older portfolio

Thank you! I'll hope they don't mind a random email drop there, heh.

Re: 27.5KB language-agnostic WebGPU syntax highlighter

#35

Years ago, long before the current "AI"/LLM-craze, I've heard someone saying that in the future programming will have less fixed, deterministic algorithms and more statistical/ML algorithms, because even in the case when writing a deterministic algorithm is possible , it is sometimes easier to collect training data and train a tiny model, then to write and maintain large codebase that does the same thing, but determi…

> What if in the future it will be easier (and maybe even more natural) to ask an LLM to "imagine" tons of possible inputs and correct outputs for a tool that you are making and then train a tiny model, without writing or generating any code?

This seems to assume you're okay with whatever you're building being a black box that will break in the future and require you to re-train the model for every scenario that comes up. I can't think of a problem I've solved recently where that would pass the bar for me. Maybe for one-off problems like 'I have all this data and I want to classify it' where you could hand-classify say 5-10% of your dataset and train a model to deal with the rest of it?

Re: 27.5KB language-agnostic WebGPU syntax highlighter

#36
The bootstrap.css example shows a lot of very random highlighting around numbers (some are blue, others black) and rule names (some are purple, others black).

While the premise is neat (syntaxes and tokenizers are pretty similar, how much diversity can humans possibly come up with??), this does not inspire much confidence in the accuracy.

Post reply on HN