Live data from Hacker News

Carp: a statically typed lisp, without a GC, for high performance applications

github.com

1–10 of 71 posts

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#3
Hmm I actually like the fact that the arguments of a function are defined using square brackets. It just reminds me of Clojure, especially the "defn" macro, which sounds pleasant to me.

I wonder what Lispers would say about that since I heard that not having a homoiconic syntax might cause some troubles at metaprogramming(macro) level.

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#5
Is there an explanation of the memory allocation used? There seem to be a GC (https://github.com/eriksvedang/Carp/blob/master/src/gc.c), maybe used in the compiler only, coupled with lifetime analysis (https://github.com/eriksvedang/Carp/blob/8665a7f9a19d9347cc0...), which as far as I know is used once (https://github.com/eriksvedang/Carp/blob/6107e619d4f632acace...) in the compiler. This analysis seems tied to the manual "reset!" special form which apparently frees any existing data bound to a symbol. So, what happens when lifetime analysis cannot determine lifetime? what about stack-allocation? What should I worry about when programming in Carp w.r.t. memory?

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#6
post #3

Hmm I actually like the fact that the arguments of a function are defined using square brackets. It just reminds me of Clojure, especially the "defn" macro, which sounds pleasant to me. I wonder what Lispers would say about that since I heard that not having a homoiconic syntax might cause some troubles at metaprogramming(macro) level.

It is homoiconic, because the data structures used to describe code are also data structure provided by the language. However, brackets mean that you pass arguments as arrays instead of lists: there is little reason except aesthetics to have this distinction in source code. I prefer parenthesis everywhere, but some people really dislike that.

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#7
I understand this is marked as "a research project", so any answer here is possible and must be accepted; that said I'd really love to learn at least about plans with respect to the following questions:

• Regarding FFI, is it possible to pass pointers to carp functions/closures as arguments to external dynamically loaded functions? are those features available in REPL?

• What's the story/approach regarding structs inheritance vs. composition? also custom types and implicit type casting?

• What are the plans regarding multithreading/parallelism? Esp. interesting with respect to memory handling.

At its current state of claims, the language sounds awesomely close to the "holy grail" for me at first glance — though with a fair bit of vagueness and uncertainty.

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#8
post #3

Hmm I actually like the fact that the arguments of a function are defined using square brackets. It just reminds me of Clojure, especially the "defn" macro, which sounds pleasant to me. I wonder what Lispers would say about that since I heard that not having a homoiconic syntax might cause some troubles at metaprogramming(macro) level.

[deleted]

Re: Carp: a statically typed lisp, without a GC, for high performance applications

#10
Are all those round brackets necessary? I understand the goal is Lisp like syntax. But while reading the OpenGL sample, I found the enclosing brackets quite unintuitive. Since this is still supposed to be new language may be "statically typed Lisp with python-like blocks" will appeal to a larger audience?
Post reply on HN