asdf-从命令行安装库

发布于 2024-07-11 16:36:09 字数 165 浏览 10 评论 0原文

来自 Perl 背景,我不得不说我更喜欢 cpan Foo::Bar 而不是必须启动 sbcl、(require :asdf-install) 以及最后的 (asdf-install:安装:foo-bar)。 周围还有比这更方便的吗?

Coming from a Perl background, I have to say I prefer cpan Foo::Bar to the having to start sbcl, (require :asdf-install) and finally (asdf-install:install :foo-bar). Is there anything more convenient than this around?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

趁微风不噪 2024-07-18 16:36:09

有 clbuild:

http://common-lisp.net/project/clbuild/

但我将其添加到我的 .bashrc 中:

function asdf_install {
    sbcl --eval "(asdf:operate 'asdf:load-op :asdf-install)" --eval "(asdf-install:install :$1)" --eval "(quit)"
}

function asdf_oos {
    rlwrap sbcl --eval "(asdf:operate 'asdf:$2 :$1)"
}

There is clbuild:

http://common-lisp.net/project/clbuild/

But I add this to my .bashrc:

function asdf_install {
    sbcl --eval "(asdf:operate 'asdf:load-op :asdf-install)" --eval "(asdf-install:install :$1)" --eval "(quit)"
}

function asdf_oos {
    rlwrap sbcl --eval "(asdf:operate 'asdf:$2 :$1)"
}
一枫情书 2024-07-18 16:36:09

Common Lisp 可能很冗长; 然而,大多数(全部?)实现都支持 Lisp 启动文件,该文件定义/加载您喜欢的任何内容来个性化您的开发环境。

另外,请查看Mudballs

Common Lisp can be verbose; however most (all?) implementations support a Lisp startup file that defines/loads whatever you like to personalize your development environment.

Also, check out Mudballs.

友欢 2024-07-18 16:36:09

您可以查看 http://www.quicklisp.org/ - 它安装起来又快又容易,然后下载、安装和加载系统:

(ql:quickload :cxml)

要转换为 Perl,这就像(shell)cpanm cxml 和(在 Perl 内部)use cxml 合二为一。

您也可以搜索系统; 例如列出所有:

(ql:system-apropos "xml")

通常你会运行一个 lisp 进程并直接给它这些命令,但如果你更喜欢从 shell 进行安装等,你可以定义别名(正如你在答案 < a href="https://stackoverflow.com/a/427333/17221">https://stackoverflow.com/a/427333/17221):

function ql_install {
    sbcl --eval "(ql:quickload :$1)" --eval "(quit)"
}

function ql_apropos {
    sbcl --eval "(ql:system-apropos \"$1\")" --eval "(quit)"
}

You might check out http://www.quicklisp.org/ - it's quick and easy to install, then to download, install, and load systems:

(ql:quickload :cxml)

To translate to Perl, this is like (shell) cpanm cxml and (inside Perl) use cxml all in one.

You can search for systems as well; for instance to list all the :

(ql:system-apropos "xml")

Commonly you'd be running a lisp process and giving it these commands directly, but if you prefer to do your installation and so on from the shell, you could define aliases (as you have in the answer https://stackoverflow.com/a/427333/17221):

function ql_install {
    sbcl --eval "(ql:quickload :$1)" --eval "(quit)"
}

function ql_apropos {
    sbcl --eval "(ql:system-apropos \"$1\")" --eval "(quit)"
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文