3 ms·
I have not used carp, and janet only briefly. However, other than both using lisp syntax, there are very little similarities between the two. Janet has a garba
by lf-non 5y ago
I have not used carp, and janet only briefly. However, other than both using lisp syntax, there are very little similarities between the two.
Janet has a garbage collector, no static types, no ownership tracking - the perf. is similar to lua, so is not be ideal for low-level/realtime systems, which carp is targeting.
- fuzzythinker 5y agoThank you and @pgt. I thought Janet compiles to C or native bytecode due to its strong interop with C.
- shakna 5y ago> the perf. is similar to lua, so is not be ideal for low-level/realtime systems Lua runs on a bunch of low level systems, and not just for hobbyists (it's at the core of VxWorks, for example). Can you expand on why you think the language doesn't meet your performance criteria?
- m12k 5y agoI think generally Lua is considered a scripting language - it is suited for gluing together performance critical components built in faster languages like C, C++ or Rust - the kinds of GC-less languages you can make a VM, game engine or OS in. So Carp is intended to join that list of fast GC-less languages that you make the fast foundation that others then call from scripts using languages like Lua.
- saikyun 5y agoI think this is LuaJIT, or? Iiuc Janet is comparable to non-JITed Lua. But I actually have no clue.
- shakna 5y agoLuaJIT is x86, ARM, PPC and MIPS only. However, Lua itself can run on anything with the C stdlib and a C99 compiler. Which means for realtime systems you're not generally going to be talking about LuaJIT. The speed of Lua will depend on the GC in use. Whilst that is an incremental one be default, Lua is designed to allow you to disable it altogether, use the older reference counting one, replace it entirely with your own allocation system, and so on, so that it can meet hard realtime requirements.
- saikyun 5y agoAha, 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/master/benchmark_runs/summary.ipynb https://github.com/MikeBeller/janet-benchmarksgame/blob/mast... Though I imagine it's hard to say without actually trying it.
- lf-non 5y agoNot familiar with VxWorks, but I have mostly seen lua being used as a plugin/extension language around a core implemented in native code.