HNHacker News
TopNewBestAskShowJobs

mkeeter

7,006 karma · joined December 12, 2014

Electrical engineering and DIY CAD/CAM

https://mattkeeter.com

submissionscomments
mkeeter··on The Handwavy Technobabble Nothingburger of Crypto
It's even funnier than that – back in 2019, Adjoint was bragging about "delivering blockchain technology built specifically for the needs of the financial industry" [1]

No idea if they pivoted away from blockchain or just stopped saying it on their website, but it makes me take this with several grains of salt.

[1] https://web.archive.org/web/20190502154457/https://www.adjoi...

mkeeter··on Facebook Downtime Counter
I deployed http://www.fboutagecost.com at exactly the same time as Facebook came back up – you're all welcome, I guess?

(It was previously counting up at $3855/second, but is now stopped)

mkeeter··on Computers should expose their internal workings as a 6th sense
One fun example is the "malloc Geiger counter", which clicks whenever memory is allocated: https://www.youtube.com/watch?v=7vn6aGgLKfQ

(Previous HN discussion: https://news.ycombinator.com/item?id=24303832)

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
As a matter of fact, I also wrote a SIGGRAPH paper on GPU-based f-rep rendering that was discussed on HN two days ago!

https://www.mattkeeter.com/research/mpr/

https://news.ycombinator.com/item?id=26873691

There's also a good Twitter thread here:

https://twitter.com/CasualEffects/status/1385389913881858054

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
Guile supports custom readers through read-hash-extend [1]: this lets you associate specific syntax with a custom reader, triggered by a '#' character. For example, this is how comments are implemented with #! ...multiline comment... !#: the first "#!" triggers a custom reader which reads until the termination.

libfive installs custom readers for #0, #1, #2, and so on, which all do the same thing: store the syntax position (row/column/span), then create a free variable with a particular id that's associated with that syntax position.

When pushing and pulling on the surface, it's solving for free variables values that put the surface at your mouse cursor's position. Then, it can splice those values back into the original script using the row/column/span data from before.

Python does the same thing with a magic `var(...)` function, which is used as the target for an AST transform here:

https://github.com/libfive/libfive/blob/master/libfive/bind/...

[1] http://www.gnu.org/software/guile/manual/guile.html#Reader-E...

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
I appreciate you downloading it and testing it out!

This sounds like a bug, please open a Github issue and I'll investigate.

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
Check out Q8/9/10 in the MPL FAQ: https://www.mozilla.org/en-US/MPL/2.0/FAQ/

I don't believe the MPL requires the ability to re-link; this is one of the reasons I chose it over the LGPL.

(My intentions are to promote development of the libfive by require changes to the library itself to be shared, while not limiting commercial use / distribution / embedding into a larger application; there is at least one commercial CAD company using libfive as a component in their application)

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
Surprise! :D

Yes, these are now part of libfive's core – Python is an important-enough language that having canonical, first-party bindings seems important.

There was a bunch of infrastructure work to get to this point: the standard library was ported from Scheme to C++, so the shape bindings are now autogenerated for both target languages and use FFI to call into a dynamic library (with a C API).

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
libfive is unusual in the SDF space in that it doesn't assume Euclidean space, or even Lipshitz continuity! It uses interval arithmetic, so its evaluation is conservative by construction; shapes with weird SDFs may evaluate more slowly, but they won't be wrong.

This means that you can go wild with geometric and coordinate transformations – even weird things like twisting or attract/repel will work fine.

(the only requirement is C0 continuity, which is the bare minimum; otherwise, a point could be both inside and outside the shape depending on which direction you approach it from)

mkeeter··on Libfive: Solid modeling (CAD) library/tools with Scheme/Python bindings and GUI
I'm the main author of libfive, happy to answer any questions.

The site isn't totally up to date – the Python bindings + API are brand new, and need some examples, but they work great if you know how to use them!

mkeeter··on Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces (2020)
I'm not familiar with cone tracing, but [1] indicates that it's a variation of sphere tracing.

The downside to sphere tracing and similar is that it limits the input model: you have to guarantee that evaluating the model at [x, y, z] gives you a result that's less-than-or-equal to the true (Euclidean) distance to the shape's surface.

(or a distance adjusted by some constant scaling factor, i.e. Lipshitz continuity [2])

This is a relatively fragile property, and really limits what kinds of shapes and transformations you can use when modeling.

Using interval arithmetic is more robust against arbitrary models, at the cost of being less efficient when models are well-behaved.

I don't know much about state-of-the-art fractal rendering! I'd imagine that the fixed (original) tape in MPR would be a limitation here, because you may want to terminate conditionally, rather than evaluating a fixed expression.

[1] http://www.fulcrum-demo.org/wp-content/uploads/2012/04/Cone_...

[2] https://en.wikipedia.org/wiki/Lipschitz_continuity

mkeeter··on Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces (2020)
Being able to do very basic JITting on the GPU would be a great first step – load/store operations when evaluating the tapes are terrible for memory access, since they use global memory rather than registers.

In another project [1], I found a 2-6x speedup in going from an interpreter to a fully-compiled shader, so this can make a huge difference!

[1] https://www.mattkeeter.com/projects/rayray/

mkeeter··on Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces (2020)
Author here, I'm glad to have finally figured out why a bunch of people followed me on Twitter this morning!

If you enjoyed this paper, there's a companion blog post about the actual process of writing it: https://www.mattkeeter.com/projects/siggraph/

(and I'm happy to answer questions, of course)

mkeeter··on Massively Parallel Rendering of Complex Closed-Form Implicit Surfaces (2020)
Check out section 4.2 of the paper: 3D is very similar to 2D, using the same strategy of big regions -> small regions -> voxels.

(There's also a bit of extra logic to skip regions which are occluded in Z, plus a final pass to render normals using automatic differentiation)

mkeeter··on It Can Happen to You
It's self-reported by the logging system after glfwShowWindow() returns for the first time, so probably not 100% accurate, but reasonably close.

A truly fancy system would be something like Tristan Hume's keyboard-to-photon latency system: https://thume.ca/2020/05/20/making-a-latency-tester/

mkeeter··on It Can Happen to You
I was trusting the compiler on this one, but after someone asked this question on Twitter, I doubled-checked: https://cppx.godbolt.org/z/fhTGcx

Sure enough, it compiles down to "add rax, 7"

mkeeter··on It Can Happen to You
Hey RK! Thanks for the kind words – hopefully I'll see you again, once we're back to holding in-person events!
mkeeter··on It Can Happen to You
Touché – after all, disk-to-RAM is hundreds of MB/s, and faster if it's cached!

In practice, I'm racing mesh loading against "how long does the OS take to give you an OpenGL context", which is rarely below 160 ms (longer if it has to switch from integrated to discrete GPU).

mkeeter··on It Can Happen to You
Blog author here! Thanks to HN for warning me about sscanf at exactly the right time – within a day of me trying to load some ASCII STLs and noticing it was slow...

Linked deep in the Twitter replies [1], there's an open glibc issue about this, dating back to 2014:

https://sourceware.org/bugzilla/show_bug.cgi?id=17577

C doesn't have any requirements on the complexity of sscanf, so it might not be a bug per se, but it's certainly... a pitfall.

[1] https://twitter.com/impraxical/status/1367194430835425283

mkeeter··on Smooth Voxel Terrain, Part 2 (2012)
Isosurface extraction is a fascinating rabbit hole to go down (speaking as someone that's deep underground).

There's a long list of properties that you want your algorithm to have:

- Meshes should be watertight

- Meshes should be manifold

- There should be no self-intersections

- Sharp features (edges and corners) should be reproduced accurately, rather than blurred or bevelled

- Thin features should be preserved (which makes it tricky to sample on a regular grid!)

- The mesh should be adaptive, i.e. having fewer triangles in flat areas

It's relatively easy to get ~3 of these properties, and (last time I checked) nigh impossible to get 5 or 6 in the general case.

If you'd like to read more, Doug Moen has a comprehensive overview of the literature: https://github.com/curv3d/curv/blob/master/ideas/v-rep/To_Me...

I've also written up a 2D study of Marching Cubes (Squares) vs Dual Contouring: https://www.mattkeeter.com/projects/contours/

And a deep dive into the math that lets you precisely position vertexes in dual contouring: https://www.mattkeeter.com/projects/qef

mkeeter··on Slack Running Slow / Hanging?
Yes, and Twitter confirms that a ton of people are seeing this.
mkeeter··on Zig in 30 Minutes
I wrote a shader preview GUI using Zig, Neovim, and WebGPU (basically a desktop Shadertoy).

It's named "Futureproof": https://www.mattkeeter.com/projects/futureproof/

mkeeter··on [dead]
Similarly, "DXF has an architecture similar to a dice base of drawings"

Perhaps they meant "database"?

Anyways, this article is basically content-free, so if you've come to the comments first, I wouldn't recommend it!

mkeeter··on Advent of Code 2020
Advent of Code is a huge amount of fun!

One of my favorite problems from last year involved programming a robot to traverse an obstacle course (https://adventofcode.com/2019/day/21).

Interestingly, the space of potential programs was small enough (105 bits) that you could smash an SMT solver into it and solve for a correct, minimal program, given the shape of your obstacle course: https://www.mattkeeter.com/projects/synthesis/

mkeeter··on Domains for the Rest of Us
waferpunk.com: DIY semiconductor fabrication
mkeeter··on To the future occupants of my office at the MIT Media Lab
Sounds like something coming out of the Responsive Environments group (https://resenv.media.mit.edu/).
mkeeter··on On Using Twitter
SIGGRAPH switched from single-blind (reviewers know the authors but not vice versa) to double-blind, starting in the 2019 conference:

https://blog.siggraph.org/2018/10/the-magic-of-technical-pap...

mkeeter··on Why I still use an old PowerPC Mac
Have you seen the MNT Reform?

https://mntre.com/media/reform_md/2020-05-08-the-much-more-p...

It's not as powerful as most modern laptops (uses an iMX8 SOM, rather than an x86 CPU), but it's got a full keyboard, trackball (!), replaceable batteries, etc.

mkeeter··on A multiplayer board game in Rust and WebAssembly
I'm glad that your wife enjoys the game! At the end of the day, it's meant to be played and shared, rather than just existing as an interesting software artifact.

The rooms persist as long as there's at least one connected player in them. Exiting + rejoining a room under the same name will let you continue to accumulate points under that name.

(Rejoining isn't perfectly seamless: you won't necessarily be dealt the exact same hand, and if you exit + rejoin while it's your turn, your turn will be skipped)

mkeeter··on A multiplayer board game in Rust and WebAssembly
Original author here, happy to answer any questions.

I also appreciate the load testing! For the curious, we're at 30 open rooms, and I'm seeing:

- 0.0 server load

- 2.6 MB of RAM used by nginx + its worker process

- 4 MB used by pont-server

← PreviousPage 4 of 6Next →