Great, then why not replace ASDF's function user-homedir into this one:
(defun* user-homedir () #+mcl (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType) #-mcl (truenamize (pathname-directory-pathname (user-homedir-pathname))))
I've made a patch (in attach), include above new definition and some notes. I hope Faré could merge it.
We still love MCL even though it has so much difference from other modern CL platforms.
--binghe
在 2011-5-19,07:05, Terje Norderhaug 写道:
On May 17, 2011, at 10:26 PM, Chun Tian (binghe) wrote:
Some time ago I can use ASDF with Macintosh Common Lisp, but recently I can't any more.
I found a workaround for myself:
(in-package :asdf)
(defun user-homedir () #P"Macintosh HD:Users:binghe:")
with above code loaded as a ASDF patch, I can load other packages well.
Alternatively, when using ASDF with MCL, bind ccl::*user-homedir-pathname* to the pathname for the ~/ home directory of the current user:
(ccl::findfolder #$kuserdomain #$kCurrentUserFolderType)
The ccl::user-homedir-pathname function returns the value of ccl::*user-homedir-pathname* when called with no arguments.
I have made a note about it in the ASDF section of http://code.google.com/p/mcl/wiki/Portability.
-- Terje Norderhaug terje@in-progress.com
2011/5/18 Chun Tian (binghe) binghe.lisp@gmail.com:
Great, then why not replace ASDF's function user-homedir into this one:
(defun* user-homedir () #+mcl (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType) #-mcl (truenamize (pathname-directory-pathname (user-homedir-pathname))))
I've made a patch (in attach), include above new definition and some notes. I hope Faré could merge it.
I'd do it, except the page you cite in your message suggests setting the binding for ccl::*user-homedir-pathname* instead. Shouldn't we do that instead? Or does any code rely on that file being the MCL path? Is the MCL path saved anywhere else? Note that user-homedir usually returns a truename, which translations depend upon to work properly. If you're hacking user-homedir instead of the global variable, shouldn't the conditional be inside the truename? http://code.google.com/p/mcl/wiki/Portability
Since you seem to be the one main user of MCL and ASDF, why don't you decide what it should be in the end? I'll release a 2.015.4 for you after you've made your mind.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Speed has always been important otherwise one wouldn't need the computer. —Seymour Cray
Hi, Faré
I think the "binding ccl::*user-homedir-pathname*" suggestion by Terje was based on "not touching ASDF source code itself". With this approach, people could use
(let ((ccl::*user-homedir-pathname* (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType))) (asdf:load-system ...))
to make ASDF work on MCL.
For your question about why not the conditional be inside the truename, i think it's because MCL's result are already a truename:
? (in-package :asdf) #<Package "ASDF"> ? (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType) #P"Macintosh HD:Users:binghe:" ? (pathname-directory-pathname *) #P"Macintosh HD:Users:binghe:" ? (truenamize *) #P"Macintosh HD:Users:binghe:"
MCL doesn't support UNIX-like pathname (i.e. "/Users/binghe"), so above is just the final truename.
I'm not sure if it's good to consider using a MCL patch to change the return value of (user-homedir-pathname), because Common Lisp standard never say what exactly the "user's home directory" means when the optional host arguments not given [1]. I guess MCL designers may thought that MCL application itself is living in a separate "host", apart from the Macintosh OS (as another host), this is a common approach in old Lisp systems like Symbolics Lisp Machine as I can see.
(when I'm still writing this mail, Terje already showed another viewpoint: the patch may conflict with legacy code)
Any way, as a MCL & ASDF user, I suggest using my previous patch, and I don't disagree following form:
(defun* user-homedir () (truenamize (pathname-directory-pathname #-mcl (user-homedir-pathname) #+mcl (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType))))
Regards,
Chun Tian (binghe)
[1] http://www.lispworks.com/documentation/HyperSpec/Body/f_user_h.htm#user-home...
在 2011-5-19,10:58, Faré 写道:
2011/5/18 Chun Tian (binghe) binghe.lisp@gmail.com:
Great, then why not replace ASDF's function user-homedir into this one:
(defun* user-homedir () #+mcl (ccl::findfolder #$kuserdomain #$kCurrentUserFolderType) #-mcl (truenamize (pathname-directory-pathname (user-homedir-pathname))))
I've made a patch (in attach), include above new definition and some notes. I hope Faré could merge it.
I'd do it, except the page you cite in your message suggests setting the binding for ccl::*user-homedir-pathname* instead. Shouldn't we do that instead? Or does any code rely on that file being the MCL path? Is the MCL path saved anywhere else? Note that user-homedir usually returns a truename, which translations depend upon to work properly. If you're hacking user-homedir instead of the global variable, shouldn't the conditional be inside the truename? http://code.google.com/p/mcl/wiki/Portability
Since you seem to be the one main user of MCL and ASDF, why don't you decide what it should be in the end? I'll release a 2.015.4 for you after you've made your mind.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org Speed has always been important otherwise one wouldn't need the computer. —Seymour Cray
I think the "binding ccl::*user-homedir-pathname*" suggestion by Terje was based on "not touching ASDF source code itself". With this approach, people could use
Please try ASDF 2.015.4 with MCL.
NB: It also includes a patch for ECL.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org How do you know that what you call ``blue'' is the same as what someone else calls ``blue''? What if someone else's feelings for red and blue are interverted as compared to yours? These questions are irrelevant, because the meaning of things doesn't lie in an unobservable intrinsic nature, but precisely in their observable external behavior. There is no achievable objectivity beyond the union of all possible intersubjectivities.
Hi, Faré
Thanks for your work, and I've tested 2.015.4, systems loading works fine. I didn't realized that MCL #$ read macro bring you so much trouble, sorry for that.
--binghe
在 2011-5-19,22:39, Faré 写道:
I think the "binding ccl::*user-homedir-pathname*" suggestion by Terje was based on "not touching ASDF source code itself". With this approach, people could use
Please try ASDF 2.015.4 with MCL.
NB: It also includes a patch for ECL.
—♯ƒ • François-René ÐVB Rideau •Reflection&Cybernethics• http://fare.tunes.org How do you know that what you call ``blue'' is the same as what someone else calls ``blue''? What if someone else's feelings for red and blue are interverted as compared to yours? These questions are irrelevant, because the meaning of things doesn't lie in an unobservable intrinsic nature, but precisely in their observable external behavior. There is no achievable objectivity beyond the union of all possible intersubjectivities.