5 ms·
Has anyone used Carp? What is your experience with it? I looked at it a few times over the years and the domain (statically typed language with Rust-esque life
by chc4 7y ago
Has anyone used Carp? What is your experience with it?
I looked at it a few times over the years and the domain (statically typed language with Rust-esque lifetimes for no GC) is exactly what I've wanted a few times, but there isn't any mention of embeding Carp in a program, only using it standalone. Targetting e.g. video games with low latency is fine, but I'd rather write an engine (or use an existing one!) and use Carp for scripting than be locked into solely Carp.
- OliverM 7y agoI've not used it, but https://github.com/carp-lang/Carp/blob/master/docs/Manual.md https://github.com/carp-lang/Carp/blob/master/docs/Manual.md seems to have details on integrating with C codebases, including exporting your code as a dylib.
- voidhorse 7y agoI’ve played with Carp a bit and have made minor contributions to the language. I’m not sure if there’s been any investigation into using it as an embedded scripting language yet, but there are definitely folks using it for embedded programming based on the community chats. I think someone has used it for programming modular synthesizers (or something like that)? At any rate, Carp definitely supports interfacing with C libs and you can choose to disinclude the standard library which is useful when you have limited space. More generally, the language is a blast to use! IMO it grants one the fluidity and expression of lisp with the confidence one gets from a Haskellesque type system. If you have any questions, the community on Gitter is very helpful.
- dmix 7y agoIt's always interesting to see who adopts the languages first and what they build with it. A non-GC statically typed language seems to be the future a lot of people are looking for.
- NikkiA 7y agoIt's a lot like programming haskell (which is not surprising given that carp is written in haskell, and utilises haskell's type system to achieve some things), in that you'll find something is going fine for a while, then suddenly you hit a wall where you're not sure why the type system is rejecting what you want to do and suddenly you feel out of your depth. For example, trying to parse command line arguments ends up a bit weird because there's no 'return the command line arguments as a list/array' function, but you have to use Array.copy-map to run System.get-arg on each element of an array created by `(Array.range 0 (- @(System.get-args-len) 1))` and inferring the @s in there (a syntactic sugar for `(copy ...)` is a little confusing.