From 412ec6e231bb33f4a1109a367ed1a5017b286972 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Wed, 3 Jul 2024 00:33:48 +0000 Subject: [PATCH] Add Coding environment --- Coding-environment.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Coding-environment.md diff --git a/Coding-environment.md b/Coding-environment.md new file mode 100644 index 0000000..e9e5ba8 --- /dev/null +++ b/Coding-environment.md @@ -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/) +