Hacker News new | ask | show | jobs
by stew-j 1405 days ago
> we're working on the clean API problem developing what we calling the Modular Object-Oriented Solidity Engine (MOOSE)

MOOSE meet Tovero the horse.

I guess everybody's gone from this post, but for posterity, it might be worth looking more closely at the source for Tovero, since we had to work around the lack of a formal C API when wrapping BRL-CAD with C++. In retrospect, I probably wouldn't even have chosen C++, but just done a C API which would be easier to use with the FFI of many languages like Python, Julia, or Common Lisp--and eliminated the need for SWIG. At least think about putting a C API on top of the OO of MOOSE, if you intend it to be accessed by other languages.

For an intelligent way of putting a C API over a C++ OO design see:

https://www.libfive.com

This project also demonstrates F-rep, a technique for modeling geometry with implicit functions and SDF, and Tovero 2.0 used it as an external dependency for its geometry kernel.