Our great sponsors
-
terra
Terra is a low-level system programming language that is embedded in and meta-programmed by the Lua programming language.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
What level of simulation are you thinking? If it's low-level (rigid body physics, soft body physics, fluid, etc.) there's (taichi)[https://github.com/taichi-dev/taichi], which turns (a subset of) Python into high perf gpu code.
I agree with the other comment about Julia, that seems like a good match. However, there are other options that give you more power/control over memory if you're willing to go off the beaten path a bit. Take a look at multi-stage programming in Terra (use a modified LuaJIT with a DSL to program LLVM) or in Scopes (use a Lisp-like language with macros to program LLVM). In both of them, you use the programming language to generate code which can then be dumped to a compiled object file that can be linked to an executable. Or you can just JIT it and run immediately.
Its likely not what you want, but is very close by. Halide is basically a language that lives in C++, but allows you to change your data layouts for better performance.
I've not used either of them myself, but I think they fit some of your requirements (simple programs, efficient, events, no memory management). There seem to be libraries for constraint programming. It does run on a VM with a GC though. And while programs can be compiled to binaries, they're not tiny.
I stopped working on it in 2012, but people have continued working on it since then. The current repository is at https://github.com/kframework/c-semantics, but it includes stuff in addition to C; people have started adding C++ semantics as well.