Hi Alessio, thanks for your reply.
Alessio Stalla alessiostalla@gmail.com wrote:
1/ Is it possible to create standalone ABCL executables and how ?
I'd say no, but it really depends on what you mean. You can't create standalone executables in Java, the equivalent is a bunch of Jar files (for console or GUI applications). It is possible to package ABCL + your software as a bunch of Jar files, but ABCL doesn't provide facilities of its own for that, though it's not hard to do (you can look at ABCL's own build script to get an idea). ABCL has no facilities for dumping a memory image, either (memory being controlled by the JVM makes this hard).
OK, so here's where I am right now: Clon is a command-line option parser library so it's essentially targetted at standalone executables. However, I see that you can do something like that:
java -jar myapp.jar --myapp-opt-1 --myapp-other-opt ...
and get the command-line arguments from *command-line-argument-list* so it probably still makes sense to port Clon to ABCL. The next question is: how do I hook an initial "main" function into myapp.jar. I seem to remember that you need a Main class in Java, but I'm not sure about the Lisp level.
2/ ABCL doesn't seem to provide a [set|put]env function.
I'd say yes, it's correct. But what are you trying to achieve? If you want to provide an environment for a subprocess, the ProcessBuilder class supports it. If you want to modify your own environment, you can't (without resorting to FFI, as far as I know), but why do you want to do that?
In Clon, command-line options may be associated with environment variables providing implicit values. In case such a variable contains a typo (for instance DEBUG=ys instead of DEBUG=yes), Clon provides a restart for fixing that interactively, which can benefit to the current process but also subsequent ones launched from the same terminal. I guess I can just disable this restart in the ABCL version.
3/ It seems that ABCL does not have a complete MOP.
It doesn't have a complete MOP. I think that validation is performed on an ad-hoc basis (e.g. you can't extend structure classes), so every other case is implicitly validated.
OK.
4/ There is a place where I need to access low-level information about a stream
I don't know. ABCL streams wrap java.io streams and readers/writers and I don't think there's a mean of accessing their low-level implementation. Perhaps with a dedicated library that uses JNI/JNA and provides custom streams, but I don't know any. Terminal handling is not common in Java (as most OS-specific stuff).
OK :-/
Thanks again.