asdf

example of using external libraries or packages in Common Lisp

喜欢而已 提交于 2021-02-18 16:54:49
问题 In Common Lisp, quicklisp is a popular library management tool. I'm going to use that tool and I'm going to try and use CL-WHO. I use the SBCL 1.0.57 implementation. I'm going to answer my own question below. As a beginner, it's not clear how ASDF and quicklisp actually work together. And so it's not clear how to actually use packages or libraries that you've downloaded through quicklisp in an external source file. The quicklisp FAQ, at least at this moment, does not help. In python, it's

Common lisp — why isn't this symbol external?

半城伤御伤魂 提交于 2020-03-22 09:23:05
问题 I'm trying to run tests in ASDF, which looks like this: ;;;; foo.asd (defsystem "foo/tests" :depends-on ("foo" "fiveam") :components ((:module "tests" :components ((:file "main")))) :perform (test-op (op c) (symbol-call :fiveam '#:run! 'foo/tests:all-tests)) And my tests/main.lisp file starts off like this: ;;;; tests/main.lisp (defpackage foo/tests (:use :cl :foo :fiveam) (:export :#run! :#all-tests)) (in-package :foo/tests) When I run (asdf:test-system 'foo) in my REPL, I get dropped into

How do I manage common lisp dependencies?

一个人想着一个人 提交于 2020-01-02 03:17:17
问题 What's the lisp equivalent of a pip requirement file, ruby gemfile, node package.json, etc? I'm not entirely sure how asdf and quicklisp relate if those are the proper things to use. 回答1: A .asd file is a requirements file. Use quicklisp to install requirements. Use ASDF to define a "system". Create a my-system.asd file. (asdf:defsystem #:my-system :serial t :description "Describe my-system here" :author "My Name <my.name@example.com>" :license "Specify license here" :depends-on (#

ASDF output redirection

血红的双手。 提交于 2019-12-14 02:38:53
问题 I would like to set directory where ASDF stores compiled files. I prefer to do it from a shell script. According to this page, one should define environment variable ASDF_OUTPUT_TRANSLATIONS . OK, here it is: $ export ASDF_OUTPUT_TRANSLATIONS="$HOME/.cache/common-lisp/my-dir/" But when I try to test the configuration, it does not work: $ clisp -x "(asdf:compile-system :my-system)" Output: ;; Loading file /home/mark/.clisprc.lisp ... ;; Loading file /home/mark/quicklisp/setup.lisp ... *** -

Problems with ltk (common lisp)

巧了我就是萌 提交于 2019-12-12 10:38:59
问题 I installed ltk to Steel Bank Common Lisp with asdf-install, but I can't even start using it V_V. The code below is the simplest example in the documentation, and is copied almost verbatim. (asdf:operate 'asdf:load-op :ltk) (defun hello-1() (with-ltk () (let ((b (make-instance 'button :master nil :text "Press Me" :command (lambda () (format t "Hello World!~&"))))) (pack b)))) (hello-1) This is the error message I get from sbcl: > ; in: LAMBDA NIL ; (PACK B) ; ; caught STYLE-WARNING: ;

Updating to ASDF 3.x in CLISP

限于喜欢 提交于 2019-12-07 10:16:58
问题 I am trying to update ASDF in CLISP 2.49 (on Mac OS Sierra) to version 3.x. I have now version 2.26 of ASDF. I have tried everything I found online: I downloaded the latest version of ASDF as indicated in https://common-lisp.net/project/asdf/ but then when I eval (require "asdf") , as indicated in the manual (https://common-lisp.net/project/asdf/asdf.html#Upgrading-ASDF) nothing happens, I still have version 2.26. The manual also tells to load the file asdf.lisp , but the file is missing from

Common Lisp, asdf, tests, compile system with different optimization levels

不羁岁月 提交于 2019-12-07 08:57:19
问题 What I really want is the in-source tests definitions: Let's suppose I have an asdf system: (defsystem simple-system :serial t :components ((:module "src" :components ((:file "0-package") (:file "1-tests-stubs") (:file "2-code") ...)))) And another system to test the first: (defsystem simple-system-tests :serial t :components ((:module "src" :components ((:file "0-package") (:file "1-tests-real") (:file "2-code") ...)))) The only difference between them is that in the simple-system I have 1

Updating to ASDF 3.x in CLISP

别等时光非礼了梦想. 提交于 2019-12-05 15:30:19
I am trying to update ASDF in CLISP 2.49 (on Mac OS Sierra) to version 3.x. I have now version 2.26 of ASDF. I have tried everything I found online: I downloaded the latest version of ASDF as indicated in https://common-lisp.net/project/asdf/ but then when I eval (require "asdf") , as indicated in the manual ( https://common-lisp.net/project/asdf/asdf.html#Upgrading-ASDF ) nothing happens, I still have version 2.26. The manual also tells to load the file asdf.lisp , but the file is missing from the new version folder. I discovered that quicklisp had its own version of asdf.lisp and asdf.fas ,

Common Lisp, asdf, tests, compile system with different optimization levels

感情迁移 提交于 2019-12-05 14:42:14
What I really want is the in-source tests definitions: Let's suppose I have an asdf system: (defsystem simple-system :serial t :components ((:module "src" :components ((:file "0-package") (:file "1-tests-stubs") (:file "2-code") ...)))) And another system to test the first: (defsystem simple-system-tests :serial t :components ((:module "src" :components ((:file "0-package") (:file "1-tests-real") (:file "2-code") ...)))) The only difference between them is that in the simple-system I have 1-tests-stubs where in the simple-system-tests I have 1-tests-real . In 1-tests-stubs I define a macro

How do I manage common lisp dependencies?

≡放荡痞女 提交于 2019-12-05 08:19:54
What's the lisp equivalent of a pip requirement file, ruby gemfile, node package.json, etc? I'm not entirely sure how asdf and quicklisp relate if those are the proper things to use. A .asd file is a requirements file. Use quicklisp to install requirements. Use ASDF to define a "system". Create a my-system.asd file. (asdf:defsystem #:my-system :serial t :description "Describe my-system here" :author "My Name <my.name@example.com>" :license "Specify license here" :depends-on (#:hunchentoot #:cl-who) :components ((:file "package") (:file "dispatch"))) This creates the system named #:my-system. I