Live data from Hacker News

Show HN: Simulating 20M Particles in JavaScript

dgerrells.com

21–30 of 73 posts

Re: Show HN: Simulating 20M Particles in JavaScript

#21
post #20
post #8

so when do we get WebBLAS and WebFORTRAN? kinda joking, kinda not.

Actively in-progress, actually. [0] Since about 2016. [0] https://gws.phd/posts/fortran_wasm/

there's also numpy and scipy in the webassembly python distro (pyodide). but the "kinda not" part more refers to first class scientific/numerical computing support. it's possible, but the libraries are all disjoint or are webassembly ports, etc.

Re: Show HN: Simulating 20M Particles in JavaScript

#24
post #2

Nice! I'd suggest embedding the simulation in the blog. I had to scroll up and down for a while before finding a link to the actual simulation. (You might want to pick a value that runs reasonably well on old phones, or have it adjust based on frame rate. Alternatively just put a some links at the top of the article.) See https://ciechanow.ski/ (very popular on this website) for a world-class example of just how cool…

"Skip to the end to play around with the final app."

Re: Show HN: Simulating 20M Particles in JavaScript

#25
post #13

Might want a strobe warning. At least for Firefox and Chromium in Linux on a desktop it strobes heavily in the starting state.

It depends on the display type. When run on something with low per pixel lighting it can flicker a bit due to how quickly the average light changes frame to frame. Anything with local dim zones may struggle. I looked at ways to fix this but could not come up anything other than running a blur filter which ends up looking terrible.

"When run on something with low per pixel lighting it can flicker a bit due to how quickly the average light changes frame to frame"

Not sure I understand. The flicker is not due to sometimes the screen drawn with white(like I assumed) and just because of my mobiles light settings?

Other simulations similar to this, don't have this flicker on my devive.

(still impressive work, genuine question to avoid this effect in my experiements)

And no matter the technical reasons, for some people this might be a serious health issue, so a warming might make sense in the current state.

Re: Show HN: Simulating 20M Particles in JavaScript

#27
post #19

Earlier quoted context omitted.

That's one of the best examples of an explanatory blog that I've ever seen. I wish that this would become the standard of which information was shared - if it's worth sharing, it's worth making it easy to understand.

I have done a few blog posts with interactive doodads like this. It takes a lot (like really a _lot_) more time to do, but I think it's the right way to go. There is so much noise on the internet caused by people casting their 2 cents into the void. Interactive thingywotsits may slow down individuals making posts, but there are a lot of individuals out there.

Not being a frontend dev, I have no idea how to even start making something like that.

Are there some frameworks that make interactive simulations like that easier to make, or do you just do it the hard way?

Re: Show HN: Simulating 20M Particles in JavaScript

#29
post #2

Nice! I'd suggest embedding the simulation in the blog. I had to scroll up and down for a while before finding a link to the actual simulation. (You might want to pick a value that runs reasonably well on old phones, or have it adjust based on frame rate. Alternatively just put a some links at the top of the article.) See https://ciechanow.ski/ (very popular on this website) for a world-class example of just how cool…

wow, that fluid sim is astounding
Post reply on HN