TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: A Lisp with Cargo/NPM like build system?

3 点作者 nate-sys大约 1 年前
I love lisps, and have played with a bunch of lisps, and schemes. My biggest pain point so far is that almost none of them have a Cargo-like package manager and build system, where packages are installed locally (as in within the project itself), and the project has a predetermined directory structure and entry point.<p>I understand that one of the biggest things most people love about lisp is how much control you have over every single aspect of it and that contributes to most lisps not having a Cargo, per se. The user crafting their own build system __is__ part of the intended experience.<p>But, sometimes I just want to `lisp create my-project` and `cd my-project &amp;&amp; lisp repl`. Most importantly, I want to `lisp add a-dependency` without it going to some global directory where conflicts can happen.<p>I am intentionally not mentioning Clojure here because I have been playing with it for a long time and have found that it&#x27;s not exactly what i&#x27;m looking for. Mainly because of how there is more than 1 way of structuring your project (namely leiningen, deps.edn, and friends), and even if you get past that point, i find it difficult to enjoy the command line arguments of these tools (notice how the java creeps into the experience when you `-A:test -Spath`.<p>What I want is a lisp with a compiler&#x2F;interpreter, and a package manager&#x2F;build system that makes use of said compiler&#x2F;interpreter to work on a project using a standardized project structure.<p>Anyway, I want to know if what I&#x27;m looking for exists, or if i&#x27;m misunderstanding the beauty in the way things are.

4 条评论

skydhash大约 1 年前
There&#x27;s ASDF [0] and Quicklisp [1], but nothing so rigid as NPM. It&#x27;s more like the old C configuration, when you install stuff with a package manager or download DLL and headers. But Lips is not like JavaScript or Rust where you code, then you compile&#x2F;build and have a program. It&#x27;s more like an OS that you boot and then interact with it, adding code and data. Quicklisp is more akin to a package manager than a dependency system and ASDF is more like Ansible. The Lisp code you write are equivalent to shell script to get the program to a particular state. You can save an image of the program somewhere so you don&#x27;t have to reload everything from scratch and then your code is more like a documentation at this point.<p>My whole workflow with Common Lisp is playing around with the interpreter in search of a solution, then write down that solution in code. Quicklisp is more than enough for that. If I need to pin down a library, I&#x27;d just download it and vendor it in the project. And most people don&#x27;t need that much libraries as the language is quite flexible and you can get it very close to the problem domain.<p>&gt; What I want is a lisp with a compiler&#x2F;interpreter, and a package manager&#x2F;build system that makes use of said compiler&#x2F;interpreter to work on a project using a standardized project structure.<p>What you&#x27;re asking is the same as Docker for Linux, but if Linux was more homogeneous and running a single program. Docker wouldn&#x27;t be so useful and people would just distribute VM snapshots or Ansible scripts. Which you do in Lisp.<p>[0]: <a href="https:&#x2F;&#x2F;asdf.common-lisp.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;asdf.common-lisp.dev&#x2F;</a><p>[1]: <a href="https:&#x2F;&#x2F;www.quicklisp.org&#x2F;beta&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.quicklisp.org&#x2F;beta&#x2F;</a>
i_don_t_know大约 1 年前
Racket maybe?<p><a href="https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;pkg&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;pkg&#x2F;index.html</a><p><a href="https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;raco&#x2F;index.html" rel="nofollow">https:&#x2F;&#x2F;docs.racket-lang.org&#x2F;raco&#x2F;index.html</a>
dghaehre大约 1 年前
You might be looking for: <a href="https:&#x2F;&#x2F;janet-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;janet-lang.org&#x2F;</a><p>It comes with a build tool `jpm` which installs dependencies globally by default, but you can have it be installed in your project folder as well.
para_parolu大约 1 年前
Maybe Clojure+Leiningen<p><a href="https:&#x2F;&#x2F;leiningen.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;leiningen.org&#x2F;</a>