Add Coding environment

Glen Whitney 2024-07-03 00:33:48 +00:00
parent 6f6468d217
commit 412ec6e231

12
Coding-environment.md Normal file

@ -0,0 +1,12 @@
The current proposal for an implementation language is Nim, which has a well-developed static type system, with generic functions and operator overloading, and a clean mostly brace-free syntax. It compiles to C, C++, and JavaScript, and has foreign function interfaces for all three. There is a third-party direct-to-WebAssembly compiler using LLVM that was active not too long ago. So this seems like a promising choice and likely to be the way to go unless some issue or better alternative pops up.
However, a single program cannot call both C/C++ and JavaScript. Dyna3 might consist of multiple programs, though, that somehow call each other, so it might be possible to use both external JavaScript and C++ libraries in the overall project -- I am not sure.
One early question is: how might we present 3D scenes of constructions to people using Dyna3 and allow them to interact with the constructions? Some possibilities include:
* Three.js
* Ganja.js
* direct WebGL, either through a Javascript interface or an [emscripten C/C++ interface](https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html)
* [threepp](https://github.com/markaren/threepp), a C++ port of three.js, in case we decide that C++ is our target and it's hard to mix and therefore we need to be using a C++ graphical library
* Or various other C++ graphics libraries if we need to go there for the same reason, e.g. [Magnum](https://magnum.graphics/)