TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Carp lang: statically typed Lisp, no GC

237 pointsby fbn79about 2 years ago

13 comments

philboabout 2 years ago
Found this page to be a nice intro to the syntax and semantics:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;LanguageGuide.md">https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;LanguageG...</a><p>This part hits a real sweet spot for me:<p>&gt; Carp borrows its looks from Clojure but the runtime semantics are much closer to those of ML or Rust.<p>One of my current side-projects is a little Civ-style game I&#x27;m working on in Racket, which I decided to start coding in on a whim. Will see how it goes moving pieces of it across to Carp.
评论 #35092666 未加载
评论 #35092636 未加载
评论 #35093699 未加载
kristiandupontabout 2 years ago
To me, the most interesting aspect of S-expression programming languages is that they are very well suited for other editors than the text editor. I know of a number of experiments in this regard but I have yet to see anything quite as ground breaking as what I can imagine is possible.<p>How come we don&#x27;t have Google Maps-like zooming with LOD mapping to abstractions at different levels?
评论 #35094426 未加载
评论 #35095583 未加载
评论 #35099847 未加载
评论 #35096422 未加载
评论 #35095211 未加载
评论 #35094328 未加载
评论 #35095247 未加载
评论 #35101002 未加载
评论 #35094883 未加载
LispSporks22about 2 years ago
I tried it out months ago. It has a really limiting REPL if you’re coming from other lisps like Common Lisp or even Clojure. If your bag is interactive development, then that might be a bummer. <a href="https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;Manual.md#differences-compared-to-repls-in-other-lisps">https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;Manual.md...</a>
seabass-labraxabout 2 years ago
I&#x27;m excited about Carp&#x27;s comprehensive and well documented[1] interoperability with C, which unlocks lots of potential for interfacing with existing libraries.<p>Tim Dévé has even created a game for the Nintendo Game Boy Advance by using Carp&#x27;s C interoperability; you can play an emulated version online[2].<p>[1]: <a href="https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;CInterop.md">https:&#x2F;&#x2F;github.com&#x2F;carp-lang&#x2F;Carp&#x2F;blob&#x2F;master&#x2F;docs&#x2F;CInterop....</a><p>[2]: <a href="https:&#x2F;&#x2F;radicorn.do.timdeve.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;radicorn.do.timdeve.com&#x2F;</a>
heinrichhartmanabout 2 years ago
The project compiles LISP to C (with Haskell code-base) and relies on a C compiler to generate executables. This means you will have to get your C dependencies in-place to work with carp.<p>I was trying this from `nix-shell -p carp` and immediately ran into issue with this when building the hello world example from the README. (Package sdl2 was not found).<p>Not sure how to fix this just adding `- p SDL` to the nix-shell prompt does not help, as the invoked compiler does not know where to look.<p>Any recommendations here? I want to avoid using a global clang&#x2F;gcc installation for various reasons. Is running this under `nix` a good idea? Should I move this into a container?
评论 #35092565 未加载
评论 #35092466 未加载
评论 #35093262 未加载
schemescapeabout 2 years ago
Sounds similar to Cakelisp. Has anyone tried both and is able to contrast them?<p>The author of Cakelisp notes that Carp requires writing bindings, but Cakelisp apparently does not:<p><a href="https:&#x2F;&#x2F;macoy.me&#x2F;code&#x2F;macoy&#x2F;cakelisp&#x2F;src&#x2F;branch&#x2F;master&#x2F;doc&#x2F;VsOtherLanguages.org" rel="nofollow">https:&#x2F;&#x2F;macoy.me&#x2F;code&#x2F;macoy&#x2F;cakelisp&#x2F;src&#x2F;branch&#x2F;master&#x2F;doc&#x2F;V...</a><p>Edit: I think Cakelisp has you explicitly generate C code, and maybe Carp does it behind the scenes?
评论 #35098001 未加载
bandramiabout 2 years ago
I only read the front page, but I can&#x27;t figure out what &quot;statically typed&quot; even means in the context of lisp. If it isn&#x27;t doing manifest value typing it&#x27;s hard for me to call whatever it is &quot;lisp&quot;; it&#x27;s something else with a lot of parentheses. Does it just mean once a symbol has taken a value of one type it can&#x27;t ever take a value of another? What would the point of that limitation be?
评论 #35093640 未加载
评论 #35094401 未加载
评论 #35094045 未加载
Konohamaruabout 2 years ago
Dynamic typing and garbage collection are kind of inherent to being a lisp. Without those you just have C or Java but with sexprs.
评论 #35097778 未加载
v3ss0nabout 2 years ago
Why Lisp people keep making lisp after lisp alternatives and pretty much almost all of them have no users except Scalar.
评论 #35102856 未加载
评论 #35102858 未加载
timdeveabout 2 years ago
Don&#x27;t get too hung up on the &quot;lisp&quot; in that title. I think the language would better be described as statically typed, with s-expr syntax, inspired by Clojure|Rust|ML and with a lispy language accessible for use in macros. But that&#x27;s less catchy.<p>Source: I contribute to the language.
评论 #35102899 未加载
tazjinabout 2 years ago
Wasn&#x27;t this at some point written in Rust? What prompted the Haskell rewrite? I tried looking through the issue tracker but didn&#x27;t find anything, just curious.
评论 #35092792 未加载
layer8about 2 years ago
Having used <a href="https:&#x2F;&#x2F;perldoc.perl.org&#x2F;Carp" rel="nofollow">https:&#x2F;&#x2F;perldoc.perl.org&#x2F;Carp</a> in the past, I always have to remind myself that this is the noun, not the verb.
registerabout 2 years ago
A looked at it a couple of years ago. It didn&#x27;t have a Lisp like repl in the sense that it was not possible to recompile running code. I don&#x27;t know if that has changed in the meantime.