Our great sponsors
-
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.
-
janet-benchmarksgame
Versions of the "Computer Language Benchmarks Game" benchmarks for the Janet language.
So "cons", and the associated "car" and "cdr" functions are innately the "thing" that needs to be garbage collected in Lisp-like languages.
So I immediately went to the manual, and CTRL+F'd for cons. Carp has the following restriction: https://github.com/carp-lang/Carp/blob/master/docs/Manual.md
> If you're calling a dynamic function (something defined with defndynamic, or a built in command) it will be executed right away. This works very much like a classic, dynamically typed Lisp interpreter. The dynamic functions are not available in compiled code! Their main usage is in macros and to programatically control your build settings.
cons, car, and cdr are all "Dynamic" functions that can only run _DURING COMPILE TIME_. Which means the GC is not needed during runtime: all garbage-collection occurs in the compiler.
That's a Lisp preprocessor for a non-Lisp language.
If you program in C using the Common Lisp c-mera preprocessor, or any of the other similar systems, it's the same thing.
You're writing everything in S-exps, and the expansions use conses, but the output is C; so that of course cannot call cons at run time.
Aha, thanks for the info. Then I believe Janet could fill a similar role. What little profiling I've seen puts them in a similar category: https://github.com/MikeBeller/janet-benchmarksgame/blob/mast...
Though I imagine it's hard to say without actually trying it.
Related posts
- Carp: A statically typed Lisp, without a GC, for real-time applications
- Ask HN: Looking for statically typed, No-GC and compiled Lisp/scheme
- NASA just sent a software update to a spacecraft 12B miles away
- Carp
- Yet nobody questions ABAP, Lua, Julia, Groovy or Scala, both of them are under Lisp in TIOBE Index