Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
CL-USER> (dolist (f *features*) (print f))
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
Thanks
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
On 5 Jun 2019, at 10:53, Marco Antoniotti wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
CL-USER> (dolist (f *features*) (print f))
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
Thanks
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
Robert P. Goldman Research Fellow Smart Information Flow Technologies (d/b/a SIFT, LLC)
319 N. First Ave., Suite 400 Minneapolis, MN 55401
Voice: (612) 326-3934 Email: rpgoldman@SIFT.net
Sorry about the last -- user error.
I believe you can use the standard `UIOP` OS detection functions, instead of features (and I *think* UIOP may populate `*features*` with standardized -- implementation independent -- features on load).
On 5 Jun 2019, at 10:53, Marco Antoniotti wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
CL-USER> (dolist (f *features*) (print f))
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
Thanks
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
Hi
I don’t want to assume UIOP. All other CL implementations have some functions for this. Plus how would UIOP define its portability layer on top of ABCL?
Cheers
MA
On Jun 5, 2019, at 21:09 , Robert Goldman rpgoldman@sift.net wrote:
Sorry about the last -- user error.
I believe you can use the standard UIOP OS detection functions, instead of features (and I think UIOP may populate *features* with standardized -- implementation independent -- features on load).
On 5 Jun 2019, at 10:53, Marco Antoniotti wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
CL-USER> (dolist (f *features*) (print f))
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
Thanks
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
On Jun 5, 2019, at 21:27, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Hi
I don’t want to assume UIOP. All other CL implementations have some functions for this. Plus how would UIOP define its portability layer on top of ABCL?
Since ASDF is included with ABCL, UIOP will always be present, so there is no reason not to use UIOP when appropiate.
UIOP defines its portablity layer by conditionalizing code for ABCL like every other implementation. Or maybe I misunderstand your objection.
Hi
On Jun 11, 2019, at 11:36 , Mark Evenson evenson@panix.com wrote:
On Jun 5, 2019, at 21:27, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Hi
I don’t want to assume UIOP. All other CL implementations have some functions for this. Plus how would UIOP define its portability layer on top of ABCL?
Since ASDF is included with ABCL, UIOP will always be present, so there is no reason not to use UIOP when appropiate.
UIOP defines its portablity layer by conditionalizing code for ABCL like every other implementation. Or maybe I misunderstand your objection.
No. You did not misunderstand anything. You are just grossly underestimating the severity of my NIH syndrome :) :) :)
Cheers
Marco
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
Is the variable *default-pathname-defaults* related to this? (http://www.lispworks.com/documentation/HyperSpec/Body/v_defaul.htm)
Kind regards,
Gunter.
To some extent. There is no necessary relationship between the notion of "current working directory" and `*default-pathname-defaults*`, although making them correspond is common in modern implementations.
At the time that the ANSI CL standard was written, there were still platforms (operating systems) to which "current working directory" did not apply.
On 13 Jun 2019, at 8:52, Gunter Königsmann wrote:
Is the variable *default-pathname-defaults* related to this? (http://www.lispworks.com/documentation/HyperSpec/Body/v_defaul.htm)
Kind regards,
Gunter.
On Jun 5, 2019, at 17:53, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Unfortunately, the JVM doesn’t have a [standard interface to change the working directory][1] there is no direct method to setting the current working directory. The JVM gets a copy of the system environment variables including the current working directory
[1]: https://stackoverflow.com/questions/840190/changing-the-current-working-dire...
It would help to know more specifically what you wish to do after changing the directory, but here’s a guess at what you may wish to do:
If you wish invoke purely Lisp-side functionality, then use the value of CL:*DEFAULT-PATHNAMES-DEFAULTS*, which is what UIOP/OS:GETCWD returns.
If you wish to fork processes in another directory then the specify the relavant argument to UIOP/RUN-PROGRAM:RUN-PROGRAM.
In very pathlogical cases you may have to write a script that ensures the JVM hosting ABCL is started in the directory you wish to have as the current directory. I had to do this in order to get a Minecraft server to run under ABCL.
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
The code which sets platform features is the [best source of what keywords identify which plaform features][2]. Additionaly, there is (incomplete) support for identifying the JVM version by the use of the :java-1.6, :java-1.7, and :java—1.8 keywords. Again, it would be helpful to know what sort of platform features you wish to detect.
[2]: https://abcl.org/trac/browser/trunk/abcl/src/org/armedbear/lisp/Lisp.java#L2...
Hi
On Jun 11, 2019, at 11:33 , Mark Evenson evenson@panix.com wrote:
On Jun 5, 2019, at 17:53, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
Unfortunately, the JVM doesn’t have a [standard interface to change the working directory][1] there is no direct method to setting the current working directory. The JVM gets a copy of the system environment variables including the current working directory
Ok. Thanks. Understood. So this is a Java “feature”.
It would help to know more specifically what you wish to do after changing the directory, but here’s a guess at what you may wish to do:
If you wish invoke purely Lisp-side functionality, then use the value of CL:*DEFAULT-PATHNAMES-DEFAULTS*, which is what UIOP/OS:GETCWD returns.
That is what I fall back to. I was just wondering if there was a “to-the-file-system” primitive. *D-P-D* munging will do.
If you wish to fork processes in another directory then the specify the relavant argument to UIOP/RUN-PROGRAM:RUN-PROGRAM.
In very pathlogical cases you may have to write a script that ensures the JVM hosting ABCL is started in the directory you wish to have as the current directory. I had to do this in order to get a Minecraft server to run under ABCL.
Ok. Nothing of the kind is really needed.
Also, what is the set of features that ABCL uses to identify the platform? On a Mac OSX I see (at a minimum):
:SWANK :X86-64 :UNIX :DARWIN :ARMEDBEAR :ABCL :COMMON-LISP :ANSI-CL :CDR6 :MOP :PACKAGE-LOCAL-NICKNAMES NIL
The code which sets platform features is the [best source of what keywords identify which plaform features][2]. Additionaly, there is (incomplete) support for identifying the JVM version by the use of the :java-1.6, :java-1.7, and :java—1.8 keywords. Again, it would be helpful to know what sort of platform features you wish to detect.
Thanks. I just wanted to know what set of features I can use to know that I am running on a Mac OS X or, say, a Windows 10. It looks like that (and :UNIX :DARWIN) is what I need for Mac OS X and WINDOWS for all Windows.
Thanks
Marco
-- Marco Antoniotti, Associate Professor tel. +39 - 02 64 48 79 01 DISCo, Università Milano Bicocca U14 2043 http://bimib.disco.unimib.it Viale Sarca 336 I-20126 Milan (MI) ITALY
Please check: http://cdac2019.lakecomoschool.org Please check: http://troncopackage.org Please check: https://www.frontiersin.org/research-topics/7394/network-bioscience
Please note that I am not checking my Spam-box anymore. Please do not forward this email without asking me first (cum grano salis).
On Jun 12, 2019, at 08:28, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Hi
On Jun 11, 2019, at 11:33 , Mark Evenson evenson@panix.com wrote:
On Jun 5, 2019, at 17:53, Marco Antoniotti marco.antoniotti@unimib.it wrote:
Dear all,
I have been looking at the ABCL manual and packages and I was not able (my fault!) to find functions like CURRENT-DIRECTORY and/or CHANGE-DIRECTORY (or CHDIR).
Could you tell me how to get to this functionality?
[…]
If you wish invoke purely Lisp-side functionality, then use the value of CL:*DEFAULT-PATHNAMES-DEFAULTS*, which is what UIOP/OS:GETCWD returns.
That is what I fall back to. I was just wondering if there was a “to-the-file-system” primitive. *D-P-D* munging will do.
The ultimate “to-the-file-system” primitive is to construct a CL:PATHNAME object via a uri with the “file" scheme, e.g: #p"file:///var/tmp/“ or #p”file:///Users/Kilroy/Downloads/movie.mov”. You can then apply CL:DIRECTORY and CL:TRUENAME to your heart’s content to manipulate things.
The code which sets platform features is the [best source of what keywords identify which plaform features][2]. Additionaly, there is (incomplete) support for identifying the JVM version by the use of the :java-1.6, :java-1.7, and :java—1.8 keywords. Again, it would be helpful to know what sort of platform features you wish to detect.
Thanks. I just wanted to know what set of features I can use to know that I am running on a Mac OS X or, say, a Windows 10. It looks like that (and :UNIX :DARWIN) is what I need for Mac OS X and WINDOWS for all Windows.
Yep, that’s correct.
armedbear-devel@common-lisp.net