We're starting to coordinate [discussion of project that ABCL developers wish to mentor][1] for the Summer of the Bear 2011.
Drop by on IRC via [#summeroflisp][] or [#abcl][] for ideas or feedback.
[1]: http://trac.common-lisp.net/armedbear/wiki/GSoC2011
[#summeroflisp]: http://webchat.freenode.net/
[#abcl]: http://webchat.freenode.net/
Wednesday, February 16, 2011
Tuesday, February 15, 2011
CLOS work on trunk
Over the past few days, work has been going on with respect to our CLOS implementation again. There were a few outstanding issues - some of them rather long already.
One of such longer standing issues was the performance of object instantiation. In the CLHS there's a specific section about the validity of initialization arguments (initargs) and which ones are to be considered valid. A number of improvements have been committed to trunk:
1. The check has been generalized to support all four cases of that specific section of the CLHS.
2. The checks done during object instantiation have been a performance bottleneck ever since they were implemented; as an improvement, a cache has been implemented, speeding up object instantiation significantly: the performance has been doubled (ie the same amount of time now allows creation of twice as many objects).
On a completely different subject (within CLOS), we had an issue where instantiation of an object depending on a forward referenced class caused evaluation to be aborted, without useful feedback. While fixing this issue could have been done quickly and completely unrelated to other changes, I decided to change the behaviour of some of the functions involved according to the AMOP class finalization specification.
So we have taken some small steps on the long (and hard) road toward a performant CLOS/AMOP implementation on the JVM again!
One of such longer standing issues was the performance of object instantiation. In the CLHS there's a specific section about the validity of initialization arguments (initargs) and which ones are to be considered valid. A number of improvements have been committed to trunk:
1. The check has been generalized to support all four cases of that specific section of the CLHS.
2. The checks done during object instantiation have been a performance bottleneck ever since they were implemented; as an improvement, a cache has been implemented, speeding up object instantiation significantly: the performance has been doubled (ie the same amount of time now allows creation of twice as many objects).
On a completely different subject (within CLOS), we had an issue where instantiation of an object depending on a forward referenced class caused evaluation to be aborted, without useful feedback. While fixing this issue could have been done quickly and completely unrelated to other changes, I decided to change the behaviour of some of the functions involved according to the AMOP class finalization specification.
So we have taken some small steps on the long (and hard) road toward a performant CLOS/AMOP implementation on the JVM again!
Sunday, January 23, 2011
ABCL stand alone (nearly) executables
Didier Verna describes his efforts to port CLON to ABCL to create stand alone (nearly) executables in his latest blog entry here: http://www.didierverna.com/sciblog/index.php?post/2011/01/22/Towards-ABCL-Standalone-Executables
Saturday, January 22, 2011
ABCL 0.24.0 released
This release features - among lots of other things - improved embedding support through elimination of System.exit() calls and fixes a regression causing FASLs to be limited in the number of functions they can contain.
You can find the full release notes at:
http://common-lisp.net/project/armedbear/release-notes-0.24.shtml
and the list of changes at:
http://trac.common-lisp.net/armedbear/browser/trunk/abcl/CHANGES
If you have questions regarding use or licensing, or you find issues, please report back to the development list:
armedbear-devel at common-lisp dot net
Source distribution archives can be downloaded in ZIP or gzipped tar form:
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-src-0.24.0.tar.gz
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-src-0.24.0.zip
Signatures are available under:
http://common-lisp.net/project/armedbear/0.24.0/releases/abcl-src-0.24.0.tar.gz.asc
http://common-lisp.net/project/armedbear/0.24.0/releases/abcl-src-0.24.0.zip.asc
In addition, binaries are also available:
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-bin-0.24.0.tar.gz
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-bin-0.24.0.zip
With associated signatures:
http://common-lisp.net/project/armedbear/releases/abcl-bin-0.24.0.tar.gz.asc
http://common-lisp.net/project/armedbear/releases/abcl-bin-0.24.0.zip.asc
You can find the full release notes at:
http://common-lisp.net/project/armedbear/release-notes-0.24.shtml
and the list of changes at:
http://trac.common-lisp.net/armedbear/browser/trunk/abcl/CHANGES
If you have questions regarding use or licensing, or you find issues, please report back to the development list:
armedbear-devel at common-lisp dot net
Source distribution archives can be downloaded in ZIP or gzipped tar form:
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-src-0.24.0.tar.gz
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-src-0.24.0.zip
Signatures are available under:
http://common-lisp.net/project/armedbear/0.24.0/releases/abcl-src-0.24.0.tar.gz.asc
http://common-lisp.net/project/armedbear/0.24.0/releases/abcl-src-0.24.0.zip.asc
In addition, binaries are also available:
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-bin-0.24.0.tar.gz
http://common-lisp.net/project/armedbear/releases/0.24.0/abcl-bin-0.24.0.zip
With associated signatures:
http://common-lisp.net/project/armedbear/releases/abcl-bin-0.24.0.tar.gz.asc
http://common-lisp.net/project/armedbear/releases/abcl-bin-0.24.0.zip.asc
Saturday, December 18, 2010
Integrating ABCL with Ant - the second step
While working to extend the ABCL integration into the ABCL-web Ant-based build - the project that I started in my previous post - I spent a lot of time trying to find a way to calculate the output paths, based on the names of the input paths.
Given the lisp way of 1-to-1 correspondence between a lisp file and a fasl, I expected this to be a trivial task to be done at the build system level. So, I kept searching for a solution in Ant (using standard components only). Surely I found the pathconvert and mapper building blocks, however, neither really seemed to work as the latter turned out not to be a generic mechanism but to be supported only by specific tasks (such as apply) and the former converts its output to a string instead of a set of paths.
Realizing that the issue of mapping source paths to output paths was left to the individual tasks, I turned to abcl to solve the problem as part of the compilation script. The final script between the CDATA tags as presented in the previous post looks like this:
It's based on 2 properties having been defined: "build.src.dir" and "build.dst.dir". In addition, it wants a set of paths (fileset or path set) to be defined called "lisp-files". Iterating over the set of source files, it calculates the output file by replacing a path prefix and the file extension.
In my NetBeans project settings, I had to exclude "**/*.lisp" from packaging in the destination JAR file.
Now the JAR contains the fasl instead of the source file!
Do you have useful or resourceful ABCL based scripts plugged into Ant? Let me know and post a reaction.
Given the lisp way of 1-to-1 correspondence between a lisp file and a fasl, I expected this to be a trivial task to be done at the build system level. So, I kept searching for a solution in Ant (using standard components only). Surely I found the pathconvert and mapper building blocks, however, neither really seemed to work as the latter turned out not to be a generic mechanism but to be supported only by specific tasks (such as apply) and the former converts its output to a string instead of a set of paths.
Realizing that the issue of mapping source paths to output paths was left to the individual tasks, I turned to abcl to solve the problem as part of the compilation script. The final script between the CDATA tags as presented in the previous post looks like this:
(let* ((the-project (jcall "getProject" self))
(src-iterator (jcall (jmethod "org.apache.tools.ant.types.Path" "iterator")
(jcall "getReference" the-project "lisp-files")))
(src-wildcard (pathname (format nil "~A**/*.lisp" (jcall "getProperty" the-project "build.src.dir"))))
(dst-wildcard (pathname (format nil "~A**/*.abcl" (jcall "getProperty" the-project "build.dst.dir")))))
(when (and (jcall "hasNext" src-iterator))
(loop
for src-path = (pathname (jcall (jmethod "java.lang.Object" "toString")
(jcall "next" src-iterator)))
for dst-path = (translate-pathname src-path src-wildcard dst-wildcard)
do (compile-file src-path :output-file dst-path)
while (and (jcall "hasNext" src-iterator)))))It's based on 2 properties having been defined: "build.src.dir" and "build.dst.dir". In addition, it wants a set of paths (fileset or path set) to be defined called "lisp-files". Iterating over the set of source files, it calculates the output file by replacing a path prefix and the file extension.
In my NetBeans project settings, I had to exclude "**/*.lisp" from packaging in the destination JAR file.
Now the JAR contains the fasl instead of the source file!
Do you have useful or resourceful ABCL based scripts plugged into Ant? Let me know and post a reaction.
Sunday, December 12, 2010
Integrating ABCL with Ant
While working with ABCL embedded in Java applications, you typically have java and lisp source files. Whenever I'm in that situaition, I find that I want to be able to build all sources from the same build mechanism.
Last week, Alex Mizrahi and I started to work on reviving ABCL-web (a project to create Java Servlets backed by Common Lisp code running in ABCL). That's when I found myself in need of a solution to this problem again: the project would greatly benefit from having a way to build lisp files for inclusion in the resulting JAR file.
Looking around, I found there are three options to achieve this goal:
Last week, Alex Mizrahi and I started to work on reviving ABCL-web (a project to create Java Servlets backed by Common Lisp code running in ABCL). That's when I found myself in need of a solution to this problem again: the project would greatly benefit from having a way to build lisp files for inclusion in the resulting JAR file.
Looking around, I found there are three options to achieve this goal:
- Create a custom Ant task
- Implement a command line switch to create fasls from the ABCL command line
- Use our JSR-223 support to write in-line Lisp in build files
While option (1) looked very attractive at first, it means one of two things: (1) adding an additional dependency for creation of our jar for distribution, or (2) creation of a separate jar file with only this task in it. In all cases, it adds a dependency to our release build. Because our current release build doesn't require Ant (you can build our release using the lisp-based build), I wasn't ready to accept this solution yet.
Option (2) looked very attractive, because it would not only integrate with Ant, but with build systems in general. This option became less attractive when I found that the standard Ant project doesn't have any helpers for iterating sets. The thing that I had been thinking about was to implement the basics first, ie working the way gcc is used in most projects: 1 invocation per source file. So, in order to support the scheme that Ant does allow, the parameters ABCL would have to support became a lot more complex, needing to support file-sets to be compiled.
Then, I found the 'script' tag, which serves to integrate JSR-223 (Java scripting languages) into Ant build files. As we support JSR-223, I thought I'd give it a try! (So far I hadn't used it yet, I embed ABCL directly in my applications.) This solution -if it works out- is really great: no additional dependencies and no hacks [in our own build system, we feed the lisp that we want evaluated to ABCL through standard input.]
So, I gave it a try and within minutes, I was in business! I'm using a NetBeans generated project, so there's a "-post-compile" target which gets invoked after the "compile" target completes succesfully.
<target name="-post-compile" description="lisp file compilation">
<script language="ABCL" classpath="lib/abcl.jar">
<![CDATA[
(let* ((the-project (jcall "getProject" self))
(the-fileset (jcall "getReference" the-project "lisp-files"))
(files-iterator
(jcall (jmethod "org.apache.tools.ant.types.Path"
"iterator")
the-fileset)))
(loop while (jcall "hasNext" files-iterator)
do (print (jcall "next" files-iterator))))
]]>
</script>
</target>
The snippet basically retrieves a path-set with the ID "lisp-files" defined elsewhere in the project file. Then, it continues to print all the (Java) objects it retrieves from the iterator. The next step is to replace the (print ...) form with a (compile-file ) form, retrieving the path string from the Path object and making a lisp pathname of it. Want to signal failed build? Just do what a real Task implementation would have done: throw a BuildException.
Concluding: while adding command line options may still be a desirable path to pursue, Ant integration is here for anybody embedding ABCL in a broader Java context.
Thursday, December 2, 2010
ABCL 0.23.1 released: fix for loading from path with spaces
The ABCL community released version 0.23.1 of its lisp-on-the-jvm. This release fixes the ability to run ABCL from paths with one or more spaces in them.
Source distribution archives can be downloaded in ZIP or gzipped tar form:
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-src-0.23.1.tar.gz
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-src-0.23.1.zip
Signatures are available under:
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-src-0.23.1.tar.gz.asc
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-src-0.23.1.zip.asc
In addition, binaries are also available:
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-bin-0.23.1.tar.gz
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-bin-0.23.1.zip
With associated signatures:
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-bin-0.23.1.tar.gz.asc
http://common-lisp.net/project/armedbear/releases/0.23.1/abcl-bin-0.23.1.zip.asc
Subscribe to:
Posts (Atom)