5 ms·
Anyone who had used or tried Carp and Janet (that was on frontpage the other day)? What are some strong points on Carp vs. Janet?
by fuzzythinker 5y ago
Anyone who had used or tried Carp and Janet (that was on frontpage the other day)?
What are some strong points on Carp vs. Janet?
- pgt 5y agoJanet is dynamic with a garbage collector. Carp is a GC-less static Lisp with deterministic memory allocation via a Rust-like borrow checker. I only wish Carp had stayed nearer Clojure's syntax. A more familiar syntax would make it more accessible.
- rcarmo 5y agoI've been reading through the examples and it's readable enough. What is it that you find odd?
- kbd 5y agoAs someone who doesn’t know any lisp well, it’s odd to hear you highlighting significant differences in syntax between them. I thought the character of a lisp is that it doesn’t have much syntax. I’d be interested in an example.
- pjmlp 5y agoClojure adds [], {} and #{} as additional syntax for arrays, hashmaps and sets.
- lf-non 5y agoI 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.
- saikyun 5y agoLast time I checked, Carp doesn't have a REPL that can interact with a running process. In Janet you can do things like change functions during runtime.
- yellowapple 5y agoImportantly: has anyone tried embedding Janet in Carp to get the best of both worlds?