I've never used abcl; I'm an ACL user for over 20 years.
I'm running abcl 1.3.1 on Max OS 10.7.5 (java "1.7.0_45"). My problem is I can't seem to define macros in a package other than cl-user.
bash-3.2$ java -jar /usr/local/abcl-bin-1.3.1/abcl.jar Armed Bear Common Lisp 1.3.1 Java 1.7.0_45 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.35 seconds. Startup completed in 1.556 seconds. Type ":help" for a list of available commands. CL-USER(1): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) COMMON-LISP::MAKE-PIPE CL-USER(2): (make-package "foo") #<PACKAGE foo> CL-USER(3): (in-package "foo") #<PACKAGE foo> foo(4): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) #<THREAD "interpreter" {7DA47A7D}>: Debugger invoked on condition of type UNBOUND-VARIABLE The variable COMMON-LISP::MAKE-PIPE is unbound. Restarts: 0: TOP-LEVEL Return to top level. [1] foo(5):
Is there some package trick I should know about? Thanks, Pete
_______________________________________________ Armedbear-devel mailing list Armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
bonasso bonasso@traclabs.com writes:
I've never used abcl; I'm an ACL user for over 20 years.
I'm running abcl 1.3.1 on Max OS 10.7.5 (java "1.7.0_45"). My problem is I can't seem to define macros in a package other than cl-user.
bash-3.2$ java -jar /usr/local/abcl-bin-1.3.1/abcl.jar Armed Bear Common Lisp 1.3.1 Java 1.7.0_45 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.35 seconds. Startup completed in 1.556 seconds. Type ":help" for a list of available commands. CL-USER(1): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) COMMON-LISP::MAKE-PIPE CL-USER(2): (make-package "foo") #<PACKAGE foo> CL-USER(3): (in-package "foo") #<PACKAGE foo> foo(4): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) #<THREAD "interpreter" {7DA47A7D}>: Debugger invoked on condition of type UNBOUND-VARIABLE The variable COMMON-LISP::MAKE-PIPE is unbound. Restarts: 0: TOP-LEVEL Return to top level. [1] foo(5):
Is there some package trick I should know about?
There is, your package doesn't use the CL package, hence nothing from CL works, including defmacro.
Stas, Thanks, I had previously tried (use-package "COMMON-LISP") as well as (use-package "COMMON-LISP"). Just now I did (use-package "CL") and that worked. Thanks, Pete
bonasso bonasso@traclabs.com writes:
I've never used abcl; I'm an ACL user for over 20 years.
I'm running abcl 1.3.1 on Max OS 10.7.5 (java "1.7.0_45"). My problem is I can't seem to define macros in a package other than cl-user.
bash-3.2$ java -jar /usr/local/abcl-bin-1.3.1/abcl.jar Armed Bear Common Lisp 1.3.1 Java 1.7.0_45 Oracle Corporation Java HotSpot(TM) 64-Bit Server VM Low-level initialization completed in 0.35 seconds. Startup completed in 1.556 seconds. Type ":help" for a list of available commands. CL-USER(1): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) COMMON-LISP::MAKE-PIPE CL-USER(2): (make-package "foo") #<PACKAGE foo> CL-USER(3): (in-package "foo") #<PACKAGE foo> foo(4): (defmacro common-lisp::make-pipe (head tail) "create a pipe by eval'ing head and delaying tail." `(cons ,head #'(lambda () ,tail))) #<THREAD "interpreter" {7DA47A7D}>: Debugger invoked on condition of type UNBOUND-VARIABLE The variable COMMON-LISP::MAKE-PIPE is unbound. Restarts: 0: TOP-LEVEL Return to top level. [1] foo(5):
Is there some package trick I should know about?
There is, your package doesn't use the CL package, hence nothing from CL works, including defmacro.
_______________________________________________ Armedbear-devel mailing list Armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
bonasso bonasso@traclabs.com writes:
Stas, Thanks, I had previously tried (use-package "COMMON-LISP") as well as (use-package "COMMON-LISP"). Just now I did (use-package "CL") and that worked.
Those are all the same, but when your package doesn't use CL in the first place, you can't call USE-PACKAGE like that. What you need to do, though, is (make-package :foo :use '(:cl)) or normally: (defpackage :foo (:use :cl))
Right. The default :use list is implementation dependent and I'm so used to ACL (which includes CL and CL-USER), I just didn't think it through.
bonasso bonasso@traclabs.com writes:
Stas, Thanks, I had previously tried (use-package "COMMON-LISP") as well as (use-package "COMMON-LISP"). Just now I did (use-package "CL") and that worked.
Those are all the same, but when your package doesn't use CL in the first place, you can't call USE-PACKAGE like that. What you need to do, though, is (make-package :foo :use '(:cl)) or normally: (defpackage :foo (:use :cl))
_______________________________________________ Armedbear-devel mailing list Armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
_______________________________________________ Armedbear-devel mailing list Armedbear-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/armedbear-devel
bonasso bonasso@traclabs.com writes:
In Common Lisp, I believe defpackage is to either define or *redefine* a package.
You're believing falsehoods. I'll leave it up to you to draw the conclusions that should be drawn…
I've found that in abcl if the package is already defined, defpackage won't redefine it (apparently).
This is conforming.
Is this a bug?
It is not.
You could use this implementation of defpackage: https://gitorious.org/com-informatimago/com-informatimago/source/2b229c2b45c... https://gitorious.org/com-informatimago/com-informatimago/source/2b229c2b45c... instead of cl:defpackage (but you'd have to extract it from there).
armedbear-devel@common-lisp.net