From jewel at subvert-the-dominant-paradigm.net Wed Jun 14 12:32:15 2006 From: jewel at subvert-the-dominant-paradigm.net (John Leuner) Date: Wed, 14 Jun 2006 19:32:15 +0700 Subject: [cl-unification-devel] Problems compiling code use #T template Message-ID: <1150288335.11197.30.camel@localhost.localdomain> When I compile the following code in SBCL (using C-c C-k in Slime), (in-package :cl-user) (defun check-recipient () (unify:unify #T(list ?a ?b ?c) '(1 2 3))) I get this error report: ; file: /home/jbominji/jbominji/extra.lisp ; in: DEFUN CHECK-RECIPIENT ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3)) ; ==> ; #T(LIST ?A ?B ?C) ; ; caught ERROR: ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM method called). ; ; note: The first argument never returns a value. ; '(1 2 3) ; ; note: deleting unreachable code ; ; compilation unit finished ; caught 1 ERROR condition ; printed 2 notes ; /home/jbominji/jbominji/extra.fasl written ; compilation finished in 0:00:00 STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN This code works when the compiler does not have to write a fasl file. What should I be doing to allow make-load-form to succeed? Thanks John Leuner From marcoxa at cs.nyu.edu Fri Jun 16 13:57:52 2006 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Fri, 16 Jun 2006 15:57:52 +0200 Subject: [cl-unification-devel] Re: cl-unification library fails In-Reply-To: <1150463540.11197.69.camel@localhost.localdomain> References: <1150463540.11197.69.camel@localhost.localdomain> Message-ID: <52fa30bab94cbd62f6fcd263dc3aeaf0@cs.nyu.edu> Hi John I saw your message today on the CL-UNIFICATION mailing list and I answered there. As I said, it looks to me a problem with Slime + Reader Macros. The #T(...) reader macro expands into a template instance. Maybe that is the problem. Marco On Jun 16, 2006, at 3:12 PM, John Leuner wrote: > Hi Marco > > ... > > I am trying to use the cl-unification library. > > When I compile the following code in SBCL (using C-c C-k in Slime), > > (in-package :cl-user) > > (defun check-recipient () > (unify:unify #T(list ?a ?b ?c) '(1 2 3))) > > I get an error report about writing this object #T(...) to the fasl > file. > > If I compile the method alone (C-c C-c) no errors are reported. > > Can anyone tell me what I am doing wrong or what I should do to get > this > to work? I emailed the cl-unification development list but got no > response, I'm hoping someone can point out what's wrong with my usage > or > with the library. > > ; > file: /home/jbominji/jbominji/extra.lisp > ; in: DEFUN > CHECK-RECIPIENT > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 > 3)) > ; > ==> > ; > #T(LIST ?A ?B ?C) > ; > ; caught > ERROR: > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > method > called). > ; > ; note: The first argument never returns a > value. > > ; '(1 2 > 3) > ; > ; note: deleting unreachable > code > ; > ; compilation unit > finished > ; caught 1 ERROR > condition > ; printed 2 > notes > > ; /home/jbominji/jbominji/extra.fasl > written > ; compilation finished in > 0:00:00 > STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN > > > John Leuner > > -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. From marcoxa at cs.nyu.edu Fri Jun 16 13:33:52 2006 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Fri, 16 Jun 2006 15:33:52 +0200 Subject: [cl-unification-devel] Problems compiling code use #T template In-Reply-To: <1150288335.11197.30.camel@localhost.localdomain> References: <1150288335.11197.30.camel@localhost.localdomain> Message-ID: <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> Hi I do not know if this is a problem with CL-UNIFICATION or SLIME. It seems it is something to do with SLIME. What happened if you try to COMPILE-FILE the code? Cheers -- Marco On Jun 14, 2006, at 2:32 PM, John Leuner wrote: > When I compile the following code in SBCL (using C-c C-k in Slime), > > (in-package :cl-user) > > (defun check-recipient () > (unify:unify #T(list ?a ?b ?c) '(1 2 3))) > > I get this error report: > > > ; > file: /home/jbominji/jbominji/extra.lisp > ; in: DEFUN > CHECK-RECIPIENT > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 > 3)) > ; > ==> > ; > #T(LIST ?A ?B ?C) > ; > ; caught > ERROR: > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > method > called). > ; > ; note: The first argument never returns a > value. > > ; '(1 2 > 3) > ; > ; note: deleting unreachable > code > ; > ; compilation unit > finished > ; caught 1 ERROR > condition > ; printed 2 > notes > > ; /home/jbominji/jbominji/extra.fasl > written > ; compilation finished in > 0:00:00 > STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN > > This code works when the compiler does not have to write a fasl file. > > What should I be doing to allow make-load-form to succeed? > > Thanks > John Leuner > > > _______________________________________________ > cl-unification-devel site list > cl-unification-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-unification-devel > -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. From jewel at subvert-the-dominant-paradigm.net Fri Jun 16 15:51:39 2006 From: jewel at subvert-the-dominant-paradigm.net (John Leuner) Date: Fri, 16 Jun 2006 22:51:39 +0700 Subject: [cl-unification-devel] Problems compiling code use #T template In-Reply-To: <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> References: <1150288335.11197.30.camel@localhost.localdomain> <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> Message-ID: <1150473099.11197.75.camel@localhost.localdomain> Someone on #lisp told me that it wasn't a problem with the reader macro, at least he said that the problem is that SBCL can't write this object to the fasl file. So I tried it with SBCL without loading SLIME: * (asdf:oos 'asdf:load-op 'unification) ; loading system definition from /home/jbominji/.sbcl/systems/unification.asd * (compile-file "extra.lisp") ; compiling file "/home/jbominji/jbominji/extra.lisp" (written 16 JUN 2006 10:43:55 PM): ; compiling (IN-PACKAGE :CL-USER); in: ; LAMBDA (#:G14 #:G15 ; #:G16 ; #:G17 ; #:G18 ; #:G19 ; #:G20 ; #:G21 ; #:G22 ; #:G23 ; #:G24 ; #:G25 ; ...) ; (TYPEP SB-PCL::.ARG1. 'CONS) ; --> CONSP ; ==> ; SB-PCL::.ARG1. ; ; note: deleting unreachable code ; (TYPEP SB-PCL::.ARG1. 'SYMBOL) ; --> SYMBOLP ; ==> ; SB-PCL::.ARG1. ; ; note: deleting unreachable code ; ; note: deleting unreachable code ; compiling (DEFUN CHECK-RECIPIENT ...) ; file: /home/jbominji/jbominji/extra.lisp ; in: DEFUN CHECK-RECIPIENT ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3)) ; ==> ; #T(LIST ?A ?B ?C) ; ; caught ERROR: ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM method called). ; ; note: The first argument never returns a value. ; '(1 2 3) ; ; note: deleting unreachable code ; ; compilation unit finished ; caught 1 ERROR condition ; printed 5 notes ; /home/jbominji/jbominji/extra.fasl written ; compilation finished in 0:00:01 #P"/home/jbominji/jbominji/extra.fasl" T where extra.lisp has: (defun check-recipient () (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 3)))) Does that help? Since coming across this problem I've done some reading about reader macros, it seems simple in principle but I don't understand the relationships between what reader macros are installed at compile-time when compiling which packages etc. John On Fri, 2006-06-16 at 15:33 +0200, Marco Antoniotti wrote: > Hi > > I do not know if this is a problem with CL-UNIFICATION or SLIME. It > seems it is something to do with SLIME. What happened if you try to > COMPILE-FILE the code? > > Cheers > -- > Marco > > > > > > > On Jun 14, 2006, at 2:32 PM, John Leuner wrote: > > > When I compile the following code in SBCL (using C-c C-k in Slime), > > > > (in-package :cl-user) > > > > (defun check-recipient () > > (unify:unify #T(list ?a ?b ?c) '(1 2 3))) > > > > I get this error report: > > > > > > ; > > file: /home/jbominji/jbominji/extra.lisp > > ; in: DEFUN > > CHECK-RECIPIENT > > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 > > 3)) > > ; > > ==> > > ; > > #T(LIST ?A ?B ?C) > > ; > > ; caught > > ERROR: > > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > > method > > called). > > ; > > ; note: The first argument never returns a > > value. > > > > ; '(1 2 > > 3) > > ; > > ; note: deleting unreachable > > code > > ; > > ; compilation unit > > finished > > ; caught 1 ERROR > > condition > > ; printed 2 > > notes > > > > ; /home/jbominji/jbominji/extra.fasl > > written > > ; compilation finished in > > 0:00:00 > > STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN > > > > This code works when the compiler does not have to write a fasl file. > > > > What should I be doing to allow make-load-form to succeed? > > > > Thanks > > John Leuner > > > > > > _______________________________________________ > > cl-unification-devel site list > > cl-unification-devel at common-lisp.net > > http://common-lisp.net/mailman/listinfo/cl-unification-devel > > > -- > Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa > NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 > 715 Broadway 10th FL fax. +1 - 212 - 998 3484 > New York, NY, 10003, U.S.A. > > _______________________________________________ > cl-unification-devel site list > cl-unification-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-unification-devel From marcoxa at cs.nyu.edu Sat Jun 17 14:39:06 2006 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Sat, 17 Jun 2006 16:39:06 +0200 Subject: [cl-unification-devel] Problems compiling code use #T template In-Reply-To: <1150473099.11197.75.camel@localhost.localdomain> References: <1150288335.11197.30.camel@localhost.localdomain> <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> <1150473099.11197.75.camel@localhost.localdomain> Message-ID: Now that I think about it It may be a problem with the template implementation. Does any other Lisp have the problem other than SBCL? If so I think I know what is going on. Cheers Marco On Jun 16, 2006, at 5:51 PM, John Leuner wrote: > Someone on #lisp told me that it wasn't a problem with the reader > macro, > at least he said that the problem is that SBCL can't write this object > to the fasl file. > > So I tried it with SBCL without loading SLIME: > > * (asdf:oos 'asdf:load-op 'unification) > > ; loading system definition > from /home/jbominji/.sbcl/systems/unification.asd > > * (compile-file "extra.lisp") > > ; compiling file "/home/jbominji/jbominji/extra.lisp" (written 16 JUN > 2006 10:43:55 PM): > ; compiling (IN-PACKAGE :CL-USER); in: > ; LAMBDA (#:G14 #:G15 > ; #:G16 > ; #:G17 > ; #:G18 > ; #:G19 > ; #:G20 > ; #:G21 > ; #:G22 > ; #:G23 > ; #:G24 > ; #:G25 > ; ...) > ; (TYPEP SB-PCL::.ARG1. 'CONS) > ; --> CONSP > ; ==> > ; SB-PCL::.ARG1. > ; > ; note: deleting unreachable code > > ; (TYPEP SB-PCL::.ARG1. 'SYMBOL) > ; --> SYMBOLP > ; ==> > ; SB-PCL::.ARG1. > ; > ; note: deleting unreachable code > ; > ; note: deleting unreachable code > > ; compiling (DEFUN CHECK-RECIPIENT ...) > ; file: /home/jbominji/jbominji/extra.lisp > ; in: DEFUN CHECK-RECIPIENT > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3)) > ; ==> > ; #T(LIST ?A ?B ?C) > ; > ; caught ERROR: > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > method called). > ; > ; note: The first argument never returns a value. > > ; '(1 2 3) > ; > ; note: deleting unreachable code > ; > ; compilation unit finished > ; caught 1 ERROR condition > ; printed 5 notes > > > ; /home/jbominji/jbominji/extra.fasl written > ; compilation finished in 0:00:01 > #P"/home/jbominji/jbominji/extra.fasl" > T > > where extra.lisp has: > > (defun check-recipient () > (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 > 3)))) > > Does that help? Since coming across this problem I've done some reading > about reader macros, it seems simple in principle but I don't > understand > the relationships between what reader macros are installed at > compile-time when compiling which packages etc. > > John > > > On Fri, 2006-06-16 at 15:33 +0200, Marco Antoniotti wrote: >> Hi >> >> I do not know if this is a problem with CL-UNIFICATION or SLIME. It >> seems it is something to do with SLIME. What happened if you try to >> COMPILE-FILE the code? >> >> Cheers >> -- >> Marco >> >> >> >> >> >> >> On Jun 14, 2006, at 2:32 PM, John Leuner wrote: >> >>> When I compile the following code in SBCL (using C-c C-k in Slime), >>> >>> (in-package :cl-user) >>> >>> (defun check-recipient () >>> (unify:unify #T(list ?a ?b ?c) '(1 2 3))) >>> >>> I get this error report: >>> >>> >>> ; >>> file: /home/jbominji/jbominji/extra.lisp >>> ; in: DEFUN >>> CHECK-RECIPIENT >>> ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 >>> 3)) >>> ; >>> ==> >>> ; >>> #T(LIST ?A ?B ?C) >>> ; >>> ; caught >>> ERROR: >>> ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM >>> method >>> called). >>> ; >>> ; note: The first argument never returns a >>> value. >>> >>> ; '(1 2 >>> 3) >>> ; >>> ; note: deleting unreachable >>> code >>> ; >>> ; compilation unit >>> finished >>> ; caught 1 ERROR >>> condition >>> ; printed 2 >>> notes >>> >>> ; /home/jbominji/jbominji/extra.fasl >>> written >>> ; compilation finished in >>> 0:00:00 >>> STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN >>> >>> This code works when the compiler does not have to write a fasl file. >>> >>> What should I be doing to allow make-load-form to succeed? >>> >>> Thanks >>> John Leuner >>> >>> >>> _______________________________________________ >>> cl-unification-devel site list >>> cl-unification-devel at common-lisp.net >>> http://common-lisp.net/mailman/listinfo/cl-unification-devel >>> >> -- >> Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa >> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 >> 715 Broadway 10th FL fax. +1 - 212 - 998 3484 >> New York, NY, 10003, U.S.A. >> >> _______________________________________________ >> cl-unification-devel site list >> cl-unification-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/cl-unification-devel > > _______________________________________________ > cl-unification-devel site list > cl-unification-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-unification-devel > -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A. From jewel at subvert-the-dominant-paradigm.net Sun Jun 18 14:38:53 2006 From: jewel at subvert-the-dominant-paradigm.net (John Leuner) Date: Sun, 18 Jun 2006 21:38:53 +0700 Subject: [cl-unification-devel] Problems compiling code use #T template In-Reply-To: References: <1150288335.11197.30.camel@localhost.localdomain> <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> <1150473099.11197.75.camel@localhost.localdomain> Message-ID: <1150641533.24454.6.camel@localhost.localdomain> I tried it on clisp, here it works: [1]> (asdf:oos 'asdf:load-op 'unification) ; loading system definition from /usr/share/common-lisp/systems/unification.asd into # ;; Loading file /usr/share/common-lisp/systems/unification.asd ... ; registering # as UNIFICATION ;; Loaded file /usr/share/common-lisp/systems/unification.asd ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/unification-package.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/unification-package.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/variables.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/variables.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/substitutions.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/substitutions.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/lambda-list-parsing.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/lambda-list-parsing.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/templates-hierarchy.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/templates-hierarchy.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/unifier.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/unifier.fas ;; Loading file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/match-block.fas ... ;; Loaded file /var/cache/common-lisp-controller/1003/clisp/local/home/jewel/.sbcl/site/cl-unification/match-block.fas 0 errors, 0 warnings NIL [2]> (compile-file "extra.lisp") ;; Compiling file /home/jbominji/jbominji/extra.lisp ... ;; Wrote file /home/jbominji/jbominji/extra.fas 0 errors, 0 warnings #P"/home/jbominji/jbominji/extra.fas" ; NIL ; NIL [3]> (load "extra.fas") ;; Loading file extra.fas ... ;; Loaded file extra.fas T [4]> (check-recipient) 1 ; T where extra.lisp is: (in-package :cl-user) (defun check-recipient () (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 3)))) So maybe it is an SBCL bug? John On Sat, 2006-06-17 at 16:39 +0200, Marco Antoniotti wrote: > Now that I think about it It may be a problem with the template > implementation. > > Does any other Lisp have the problem other than SBCL? If so I think I > know what is going on. > > Cheers > > Marco > > > > > On Jun 16, 2006, at 5:51 PM, John Leuner wrote: > > > Someone on #lisp told me that it wasn't a problem with the reader > > macro, > > at least he said that the problem is that SBCL can't write this object > > to the fasl file. > > > > So I tried it with SBCL without loading SLIME: > > > > * (asdf:oos 'asdf:load-op 'unification) > > > > ; loading system definition > > from /home/jbominji/.sbcl/systems/unification.asd > > > > * (compile-file "extra.lisp") > > > > ; compiling file "/home/jbominji/jbominji/extra.lisp" (written 16 JUN > > 2006 10:43:55 PM): > > ; compiling (IN-PACKAGE :CL-USER); in: > > ; LAMBDA (#:G14 #:G15 > > ; #:G16 > > ; #:G17 > > ; #:G18 > > ; #:G19 > > ; #:G20 > > ; #:G21 > > ; #:G22 > > ; #:G23 > > ; #:G24 > > ; #:G25 > > ; ...) > > ; (TYPEP SB-PCL::.ARG1. 'CONS) > > ; --> CONSP > > ; ==> > > ; SB-PCL::.ARG1. > > ; > > ; note: deleting unreachable code > > > > ; (TYPEP SB-PCL::.ARG1. 'SYMBOL) > > ; --> SYMBOLP > > ; ==> > > ; SB-PCL::.ARG1. > > ; > > ; note: deleting unreachable code > > ; > > ; note: deleting unreachable code > > > > ; compiling (DEFUN CHECK-RECIPIENT ...) > > ; file: /home/jbominji/jbominji/extra.lisp > > ; in: DEFUN CHECK-RECIPIENT > > ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3)) > > ; ==> > > ; #T(LIST ?A ?B ?C) > > ; > > ; caught ERROR: > > ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > > method called). > > ; > > ; note: The first argument never returns a value. > > > > ; '(1 2 3) > > ; > > ; note: deleting unreachable code > > ; > > ; compilation unit finished > > ; caught 1 ERROR condition > > ; printed 5 notes > > > > > > ; /home/jbominji/jbominji/extra.fasl written > > ; compilation finished in 0:00:01 > > #P"/home/jbominji/jbominji/extra.fasl" > > T > > > > where extra.lisp has: > > > > (defun check-recipient () > > (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 > > 3)))) > > > > Does that help? Since coming across this problem I've done some reading > > about reader macros, it seems simple in principle but I don't > > understand > > the relationships between what reader macros are installed at > > compile-time when compiling which packages etc. > > > > John > > > > > > On Fri, 2006-06-16 at 15:33 +0200, Marco Antoniotti wrote: > >> Hi > >> > >> I do not know if this is a problem with CL-UNIFICATION or SLIME. It > >> seems it is something to do with SLIME. What happened if you try to > >> COMPILE-FILE the code? > >> > >> Cheers > >> -- > >> Marco > >> > >> > >> > >> > >> > >> > >> On Jun 14, 2006, at 2:32 PM, John Leuner wrote: > >> > >>> When I compile the following code in SBCL (using C-c C-k in Slime), > >>> > >>> (in-package :cl-user) > >>> > >>> (defun check-recipient () > >>> (unify:unify #T(list ?a ?b ?c) '(1 2 3))) > >>> > >>> I get this error report: > >>> > >>> > >>> ; > >>> file: /home/jbominji/jbominji/extra.lisp > >>> ; in: DEFUN > >>> CHECK-RECIPIENT > >>> ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 > >>> 3)) > >>> ; > >>> ==> > >>> ; > >>> #T(LIST ?A ?B ?C) > >>> ; > >>> ; caught > >>> ERROR: > >>> ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM > >>> method > >>> called). > >>> ; > >>> ; note: The first argument never returns a > >>> value. > >>> > >>> ; '(1 2 > >>> 3) > >>> ; > >>> ; note: deleting unreachable > >>> code > >>> ; > >>> ; compilation unit > >>> finished > >>> ; caught 1 ERROR > >>> condition > >>> ; printed 2 > >>> notes > >>> > >>> ; /home/jbominji/jbominji/extra.fasl > >>> written > >>> ; compilation finished in > >>> 0:00:00 > >>> STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN > >>> > >>> This code works when the compiler does not have to write a fasl file. > >>> > >>> What should I be doing to allow make-load-form to succeed? > >>> > >>> Thanks > >>> John Leuner > >>> > >>> > >>> _______________________________________________ > >>> cl-unification-devel site list > >>> cl-unification-devel at common-lisp.net > >>> http://common-lisp.net/mailman/listinfo/cl-unification-devel > >>> > >> -- > >> Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa > >> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 > >> 715 Broadway 10th FL fax. +1 - 212 - 998 3484 > >> New York, NY, 10003, U.S.A. > >> > >> _______________________________________________ > >> cl-unification-devel site list > >> cl-unification-devel at common-lisp.net > >> http://common-lisp.net/mailman/listinfo/cl-unification-devel > > > > _______________________________________________ > > cl-unification-devel site list > > cl-unification-devel at common-lisp.net > > http://common-lisp.net/mailman/listinfo/cl-unification-devel > > > -- > Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa > NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 > 715 Broadway 10th FL fax. +1 - 212 - 998 3484 > New York, NY, 10003, U.S.A. > > _______________________________________________ > cl-unification-devel site list > cl-unification-devel at common-lisp.net > http://common-lisp.net/mailman/listinfo/cl-unification-devel From marcoxa at cs.nyu.edu Mon Jun 19 21:04:09 2006 From: marcoxa at cs.nyu.edu (Marco Antoniotti) Date: Mon, 19 Jun 2006 23:04:09 +0200 Subject: [cl-unification-devel] Problems compiling code use #T template In-Reply-To: <1150641533.24454.6.camel@localhost.localdomain> References: <1150288335.11197.30.camel@localhost.localdomain> <13e2f930db84c40ef473a34eb493a197@cs.nyu.edu> <1150473099.11197.75.camel@localhost.localdomain> <1150641533.24454.6.camel@localhost.localdomain> Message-ID: <07b9ab3f048f2105ce7b1c16a3715f7e@cs.nyu.edu> On Jun 18, 2006, at 4:38 PM, John Leuner wrote: > I tried it on clisp, here it works: > ... > where extra.lisp is: > > (in-package :cl-user) > > (defun check-recipient () > > (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 > 3)))) > > So maybe it is an SBCL bug? Not necessarily. Maybe it is still a CL-UNIFICATION bug. The problem is that the reader macro returns an object. Maybe it's be better for it to just expand in the correct call. I'll have more time to look into it in a couple of days. Cheers marco > > John > > > > On Sat, 2006-06-17 at 16:39 +0200, Marco Antoniotti wrote: >> Now that I think about it It may be a problem with the template >> implementation. >> >> Does any other Lisp have the problem other than SBCL? If so I think I >> know what is going on. >> >> Cheers >> >> Marco >> >> >> >> >> On Jun 16, 2006, at 5:51 PM, John Leuner wrote: >> >>> Someone on #lisp told me that it wasn't a problem with the reader >>> macro, >>> at least he said that the problem is that SBCL can't write this >>> object >>> to the fasl file. >>> >>> So I tried it with SBCL without loading SLIME: >>> >>> * (asdf:oos 'asdf:load-op 'unification) >>> >>> ; loading system definition >>> from /home/jbominji/.sbcl/systems/unification.asd >>> >>> * (compile-file "extra.lisp") >>> >>> ; compiling file "/home/jbominji/jbominji/extra.lisp" (written 16 JUN >>> 2006 10:43:55 PM): >>> ; compiling (IN-PACKAGE :CL-USER); in: >>> ; LAMBDA (#:G14 #:G15 >>> ; #:G16 >>> ; #:G17 >>> ; #:G18 >>> ; #:G19 >>> ; #:G20 >>> ; #:G21 >>> ; #:G22 >>> ; #:G23 >>> ; #:G24 >>> ; #:G25 >>> ; ...) >>> ; (TYPEP SB-PCL::.ARG1. 'CONS) >>> ; --> CONSP >>> ; ==> >>> ; SB-PCL::.ARG1. >>> ; >>> ; note: deleting unreachable code >>> >>> ; (TYPEP SB-PCL::.ARG1. 'SYMBOL) >>> ; --> SYMBOLP >>> ; ==> >>> ; SB-PCL::.ARG1. >>> ; >>> ; note: deleting unreachable code >>> ; >>> ; note: deleting unreachable code >>> >>> ; compiling (DEFUN CHECK-RECIPIENT ...) >>> ; file: /home/jbominji/jbominji/extra.lisp >>> ; in: DEFUN CHECK-RECIPIENT >>> ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 3)) >>> ; ==> >>> ; #T(LIST ?A ?B ?C) >>> ; >>> ; caught ERROR: >>> ; don't know how to dump #T(LIST ?A ?B ?C) (default MAKE-LOAD-FORM >>> method called). >>> ; >>> ; note: The first argument never returns a value. >>> >>> ; '(1 2 3) >>> ; >>> ; note: deleting unreachable code >>> ; >>> ; compilation unit finished >>> ; caught 1 ERROR condition >>> ; printed 5 notes >>> >>> >>> ; /home/jbominji/jbominji/extra.fasl written >>> ; compilation finished in 0:00:01 >>> #P"/home/jbominji/jbominji/extra.fasl" >>> T >>> >>> where extra.lisp has: >>> >>> (defun check-recipient () >>> (unify:find-variable-value '?a (unify:unify #T(list ?a ?b ?c) '(1 2 >>> 3)))) >>> >>> Does that help? Since coming across this problem I've done some >>> reading >>> about reader macros, it seems simple in principle but I don't >>> understand >>> the relationships between what reader macros are installed at >>> compile-time when compiling which packages etc. >>> >>> John >>> >>> >>> On Fri, 2006-06-16 at 15:33 +0200, Marco Antoniotti wrote: >>>> Hi >>>> >>>> I do not know if this is a problem with CL-UNIFICATION or SLIME. It >>>> seems it is something to do with SLIME. What happened if you try to >>>> COMPILE-FILE the code? >>>> >>>> Cheers >>>> -- >>>> Marco >>>> >>>> >>>> >>>> >>>> >>>> >>>> On Jun 14, 2006, at 2:32 PM, John Leuner wrote: >>>> >>>>> When I compile the following code in SBCL (using C-c C-k in Slime), >>>>> >>>>> (in-package :cl-user) >>>>> >>>>> (defun check-recipient () >>>>> (unify:unify #T(list ?a ?b ?c) '(1 2 3))) >>>>> >>>>> I get this error report: >>>>> >>>>> >>>>> ; >>>>> file: /home/jbominji/jbominji/extra.lisp >>>>> ; in: DEFUN >>>>> CHECK-RECIPIENT >>>>> ; (CL.EXT.DACF.UNIFICATION:UNIFY #T(LIST ?A ?B ?C) '(1 2 >>>>> 3)) >>>>> ; >>>>> ==> >>>>> ; >>>>> #T(LIST ?A ?B ?C) >>>>> ; >>>>> ; caught >>>>> ERROR: >>>>> ; don't know how to dump #T(LIST ?A ?B ?C) (default >>>>> MAKE-LOAD-FORM >>>>> method >>>>> called). >>>>> ; >>>>> ; note: The first argument never returns a >>>>> value. >>>>> >>>>> ; '(1 2 >>>>> 3) >>>>> ; >>>>> ; note: deleting unreachable >>>>> code >>>>> ; >>>>> ; compilation unit >>>>> finished >>>>> ; caught 1 ERROR >>>>> condition >>>>> ; printed 2 >>>>> notes >>>>> >>>>> ; /home/jbominji/jbominji/extra.fasl >>>>> written >>>>> ; compilation finished in >>>>> 0:00:00 >>>>> STYLE-WARNING: redefining CHECK-RECIPIENT in DEFUN >>>>> >>>>> This code works when the compiler does not have to write a fasl >>>>> file. >>>>> >>>>> What should I be doing to allow make-load-form to succeed? >>>>> >>>>> Thanks >>>>> John Leuner >>>>> >>>>> >>>>> _______________________________________________ >>>>> cl-unification-devel site list >>>>> cl-unification-devel at common-lisp.net >>>>> http://common-lisp.net/mailman/listinfo/cl-unification-devel >>>>> >>>> -- >>>> Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa >>>> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 >>>> 715 Broadway 10th FL fax. +1 - 212 - 998 3484 >>>> New York, NY, 10003, U.S.A. >>>> >>>> _______________________________________________ >>>> cl-unification-devel site list >>>> cl-unification-devel at common-lisp.net >>>> http://common-lisp.net/mailman/listinfo/cl-unification-devel >>> >>> _______________________________________________ >>> cl-unification-devel site list >>> cl-unification-devel at common-lisp.net >>> http://common-lisp.net/mailman/listinfo/cl-unification-devel >>> >> -- >> Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa >> NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 >> 715 Broadway 10th FL fax. +1 - 212 - 998 3484 >> New York, NY, 10003, U.S.A. >> >> _______________________________________________ >> cl-unification-devel site list >> cl-unification-devel at common-lisp.net >> http://common-lisp.net/mailman/listinfo/cl-unification-devel >> -- Marco Antoniotti http://bioinformatics.nyu.edu/~marcoxa NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A.