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

We use the WASM build of DuckDB quite extensively at Count (https://count.co - 2-3m queries per month). There are a couple of bugs we've noticed, but given that it's pretty much maintained by a single person seems impressively reliable!


Looking at your insane pricing page I have to assume that you are sponsoring that single person?


I'm confused, nothing about their pricing looks that weird. Businesses don't typically have large BI teams so you can ride that $199/mo $2400/year for a long time which is so small most SMBs can probably expense it without approval.


You're focussing on the wrong part


Gotta love being downvoted for daring to suggest a company should sponsor the sole open source dev making their whole product possible.


Wow! I just checked your CV (we were at Cambridge at the same time :) ), and I will never dismiss a Geography degree again!


Honestly... it turned out alright but I wish I had done something more rigorous in undergrad. I had to do a lot of math self-teaching to catch up for grad school. The most useful stuff I learned at Cambridge was from the caving club and from my mathmo / compsci housemates.

Also, thanks for the reminder to update my cv X-D


Too late.


Hey, if you click through to one of the example simulations you'll be able to change the visualization from waves to time-averaged power density, which should be closer to what you're looking for.


Thanks! If you navigate to one of the example simulations, you'll be able to change the instantaneous field visualisation to one of time-averaged power density, which sounds closer to what you're looking for.

The cool thing about the speed of WebGPU is that you can drag things around and watch changes in real-time, even if you have to average lots of simulation steps per rendered frame.


Ah yes, I've found it -- changing "Signal" from "EM field" to "Power". That is fascinating to look at.

Is there a way to move the router around to see how the field changes in response?

As far as I can tell you can do that in the paid version, and I totally understand gating that for people modeling their own home/office layout. But it would be pretty cool as a free educational demo if you could move the router in the otherwise fixed example.


Interesting! I have a desktop 3070 and hear the same. I don't hear anything on a Mac M1 though.


Definitely the vibe I'm going for!


Good question! This is actually a numerical solver for a few coupled partial differential equations - the method in this context (electromagnetism) is called FDTD. It's implemented as a WebGPU compute shader.

You absolutely could do this using WebGL2 compute shaders too, but I thought it would be fun to try this newer API.


Annoyingly WebGL2 doesn't have compute shaders even though GLES3.x that it is based on does.


Thank Google for that, as they dropped Intel contribution to WebGL Compute, with the reasoning WebGPU would be good enough.


I don't understand what other type of solution is there to render on a gpu other than a numeric one?

Here is a very basic shader for what you want:

  float freq1 = 2.0;
  float freq2 = 3.0;
  float amp = 0.5;

  pos.z += sin(pos.x * freq1 + uTime) * amp;
  pos.z += cos(pos.y * freq2 + uTime) * amp;

  gl_Position = projectionMatrix * modelViewMatrix * vec4(pos, 1.0);


That's no solver, it just displays a sine wave pattern.


Did ChatGPT write that for you because it has missed the mark by 500 metres.


It's a sin + cos function.. you need an AI for that?


The point was that the implementation of this tool is not a sin+cos function. It's more like

  let newEz = Ez0[me] +  calcEzDiff(vec2u(id.x, id.y), dx, dy, aspect);

  let newEzAbove = Ez0[above] +  calcEzDiff(vec2u(id.x, id.y + 1), dx, dy, aspect);
  let newEzRight = Ez0[right] +  calcEzDiff(vec2u(id.x + 1, id.y), dx, dy, aspect);

  Hx1[me] = Hx0[me] - (uniforms.dt/mu0)*(newEzAbove - newEz) / dy;
  Hy1[me] = Hy0[me] + (uniforms.dt/mu0)*(newEzRight - newEz) / dx;

  Ez1[me] = newEz;

  let localDelta = delta[me];
  let fac = 1 + uniforms.omega * uniforms.dt * (delta[me] / eps[me] / 2);
  Ez1[me] = Ez1[me] / fac;
  Hx1[me] = Hx1[me] / fac;
  Hy1[me] = Hy1[me] / fac;
and then a bunch of other GPU code. You can find this with little effort from the bundle, if you care, by base64-decoding the Pt("xxx") parts.

Though I do imagine it indeed could be implementable with WebGL shaders, but I also wouldn't start a new compute-based on it, unless I had a particular need to support older systems. And this I say as a Firefox user..


Agreed! Though support should be coming soon it seems. As a complete WebGPU novice I was really impressed with how quick it was to get going.


See also the blog post here discussing this project:

https://jasmcole.com/2024/10/18/a-decade-of-wifi/


Author here - amazing how this old post comes back around! I know this book is a bit divisive with the big time jump, but you can't argue with the opening line.

Shameless plug - I've become a better engineer since then, and if you'd like to work with me check out this role I'm hiring for:

https://jobs.ashbyhq.com/count/d49bdc38-96ea-4dbd-9ab5-ae4f5...


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

Search: