From mevenson at common-lisp.net Mon Oct 1 06:28:12 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 30 Sep 2012 23:28:12 -0700 Subject: [armedbear-cvs] r14160 - trunk/abcl/doc/design/pathnames Message-ID: Author: mevenson Date: Sun Sep 30 23:28:11 2012 New Revision: 14160 Log: doc: MERGE-PATHNAMES issue fragments. Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown ============================================================================== --- trunk/abcl/doc/design/pathnames/merging-defaults.markdown Sun Sep 30 10:15:05 2012 (r14159) +++ trunk/abcl/doc/design/pathnames/merging-defaults.markdown Sun Sep 30 23:28:11 2012 (r14160) @@ -11,8 +11,23 @@ will fail. + +## Questions + +### 19.2.3 Merging Pathnames + +Except as explicitly specified otherwise, for functions that +manipulate or inquire about files in the file system, the pathname +argument to such a function is merged with *default-pathname-defaults* +before accessing the file system (as if by merge-pathnames). + +Q: Does this mean that the arguments to PARSE-NAMESTRING should not be +merged? + ## Other implementations +What is the "default" host for #p"/"? + ### SBCL A host nonce which appears in the reader as @@ -33,12 +48,9 @@ HOST is NIL. - - - ### Colophon Mark Created: 01-SEP-2012 -Revised: 30-SEP-2012 +Revised: 01-OCT-2012 From ehuelsmann at common-lisp.net Wed Oct 3 20:55:08 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Wed, 03 Oct 2012 13:55:08 -0700 Subject: [armedbear-cvs] r14161 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Wed Oct 3 13:55:07 2012 New Revision: 14161 Log: Fix CLICKR system load regressions caused by stricter DEFSTRUCT redefinition checks. Modified: trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Modified: trunk/abcl/src/org/armedbear/lisp/defstruct.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Sun Sep 30 23:28:11 2012 (r14160) +++ trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Wed Oct 3 13:55:07 2012 (r14161) @@ -545,10 +545,12 @@ ;; names are equal, because it produces the same end result ;; when they are. (string= (aref old 1) (aref description 1)) - (dotimes (index 13 t) - (when (not (equalp (aref old (+ 2 index)) - (aref description (+ 2 index)))) - (return nil)))) + (equalp (aref old 5) (aref description 5)) + (equalp (aref old 6) (aref description 6)) + (equalp (aref old 7) (aref description 7)) + (equalp (aref old 8) (aref description 8)) + (equalp (aref old 12) (aref description 12)) + (equalp (aref old 13) (aref description 13))) (error 'program-error :format-control "Structure redefinition not supported ~ in DEFSTRUCT for ~A" From ehuelsmann at common-lisp.net Wed Oct 3 21:28:11 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Wed, 03 Oct 2012 14:28:11 -0700 Subject: [armedbear-cvs] r14162 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Wed Oct 3 14:28:11 2012 New Revision: 14162 Log: Fix PAIPROLOG and UNIFGRAM regressions caused by stricter DEFSTRUCT redefinition checks. Modified: trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Modified: trunk/abcl/src/org/armedbear/lisp/defstruct.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Wed Oct 3 13:55:07 2012 (r14161) +++ trunk/abcl/src/org/armedbear/lisp/defstruct.lisp Wed Oct 3 14:28:11 2012 (r14162) @@ -549,8 +549,13 @@ (equalp (aref old 6) (aref description 6)) (equalp (aref old 7) (aref description 7)) (equalp (aref old 8) (aref description 8)) - (equalp (aref old 12) (aref description 12)) - (equalp (aref old 13) (aref description 13))) + (every (lambda (x y) + (and (equalp (dsd-name x) (dsd-name y)) + (equalp (dsd-index x) (dsd-index y)) + (equalp (dsd-type x) (dsd-type y)))) + (append (aref old 12) (aref old 13)) + (append (aref description 12) + (aref description 13)))) (error 'program-error :format-control "Structure redefinition not supported ~ in DEFSTRUCT for ~A" From ehuelsmann at common-lisp.net Wed Oct 3 22:01:47 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Wed, 03 Oct 2012 15:01:47 -0700 Subject: [armedbear-cvs] r14163 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Wed Oct 3 15:01:47 2012 New Revision: 14163 Log: Fix LML load regression. Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Wed Oct 3 14:28:11 2012 (r14162) +++ trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Wed Oct 3 15:01:47 2012 (r14163) @@ -287,7 +287,8 @@ (declaim (ftype (function (t t t) t) process-toplevel-export)) (defun process-toplevel-export (form stream compile-time-too) - (when (eq (car (second form)) 'QUOTE) ;; constant export list + (when (and (listp (second form)) + (eq (car (second form)) 'QUOTE)) ;; constant export list (let ((sym-or-syms (second (second form)))) (setf *toplevel-exports* (append *toplevel-exports* (if (listp sym-or-syms) From ehuelsmann at common-lisp.net Thu Oct 4 18:57:55 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Thu, 04 Oct 2012 11:57:55 -0700 Subject: [armedbear-cvs] r14164 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Thu Oct 4 11:57:54 2012 New Revision: 14164 Log: Fix CL-ROUTES (ROUTES system) regression by fixing DEFMETHOD &AUX parameters to be no longer ignored. Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp Modified: trunk/abcl/src/org/armedbear/lisp/clos.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/clos.lisp Wed Oct 3 15:01:47 2012 (r14163) +++ trunk/abcl/src/org/armedbear/lisp/clos.lisp Thu Oct 4 11:57:54 2012 (r14164) @@ -1983,7 +1983,7 @@ (setq allow-other-keys 't)) (&aux ;; &aux comes last; any other previous state is fine - (setq state :parsing-aux))) + (setq state '&aux))) (case state (:required (push-on-end arg required-args) From mevenson at common-lisp.net Fri Oct 5 15:20:59 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 05 Oct 2012 08:20:59 -0700 Subject: [armedbear-cvs] r14165 - trunk/abcl Message-ID: Author: mevenson Date: Fri Oct 5 08:20:57 2012 New Revision: 14165 Log: Ant target to 'abcl.compile.lisp.debug' via JDWP. With this target, he Lisp compilation is invoked with the contents of the JVM property "abcl.compile.lisp.debug.jvmarg". The default value of this property suspends the JVM at the start of the compilation, listening on port 6789. Modified: trunk/abcl/abcl.properties.in trunk/abcl/build.xml Modified: trunk/abcl/abcl.properties.in ============================================================================== --- trunk/abcl/abcl.properties.in Thu Oct 4 11:57:54 2012 (r14164) +++ trunk/abcl/abcl.properties.in Fri Oct 5 08:20:57 2012 (r14165) @@ -2,23 +2,19 @@ # XXX should be called 'build.properties' but this collides with its usage by the Eclipe IDE -# Template for settings the Ant based build process. - +# Template for Ant based build process settings. # Attempt to perform incremental compilation? #abcl.build.incremental=true -# skips the compilation of Lisp sources in Netbeans -# (for debugging compiler-pass1.lisp and subsequent passes) -#abcl.compile.lisp.skip=true +# Additional site specific startup code to be merged in 'system.lisp' at build time +#abcl.startup.file=${basedir}/startup.lisp # java.options sets the Java options in the abcl wrapper scripts # # See # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html -# for options for the Oracle HotSpot JVM - -# HotSpot Examples: +# for options for the Oracle HotSpot JVM. # Java7 on 64bit optimizations #java.options=-d64 -Xmx16g -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=2g @@ -26,7 +22,7 @@ # Set the JVM to use a maximum of 1GB of RAM (only works for 64bit JVMs) #java.options=-d64 -Xmx1g -# Use the G1 garbage collector stablized with jdk1.7.0_04 +# Use the G1 garbage collector stablized with jdk1.7.0_04, printing GC details #java.options=-d64 -Xmx4g -XX:+PrintGCDetails -XX:+UseG1GC # Use a separate concurrent GC thread (java-1.6_14 or later) @@ -43,5 +39,13 @@ # Enable assertions specified via the JVM contract #java.options=-ea -# Additional site specific startup code to be merged in 'system.lisp' at build time -#abcl.startup.file=${basedir}/startup.lisp +## ABCL Development + +# skips the compilation of Lisp sources in Netbeans +# (for debugging compiler-pass1.lisp and subsequent passes) +#abcl.compile.lisp.skip=true + +# JVM option to execute when debugging the Lisp compilation via 'abcl.compile.lisp.debug' +#abcl.compile.lisp.debug.jvmarg=-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y + + Modified: trunk/abcl/build.xml ============================================================================== --- trunk/abcl/build.xml Thu Oct 4 11:57:54 2012 (r14164) +++ trunk/abcl/build.xml Fri Oct 5 08:20:57 2012 (r14165) @@ -81,7 +81,7 @@ - + @@ -232,11 +232,17 @@ - + - + + + + + + + Compiling Lisp system from ${abcl.home.dir} to ${abcl.lisp.output} @@ -252,6 +258,7 @@ classname="org.armedbear.lisp.Main"> + @@ -260,6 +267,20 @@ + + + + + + Debugging with jvmarg ${abcl.compile.lisp.debug.jvmarg} + + + + + Author: mevenson Date: Fri Oct 5 23:26:41 2012 New Revision: 14166 Log: Update to asdf-2.25. Note that ASDF no longer exports symbols that are now exported by ASDF-UTILS, which is available via Quicklisp. ASDF-ABCL has been adjusted for this, but there may be other problems lurking. Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp trunk/abcl/src/org/armedbear/lisp/asdf.lisp Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Fri Oct 5 08:20:57 2012 (r14165) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Fri Oct 5 23:26:41 2012 (r14166) @@ -47,8 +47,8 @@ Returns the path of the Maven executable or nil if none are found." - (let ((m2-home (asdf:getenv "M2_HOME")) - (m2 (asdf:getenv "M2")) + (let ((m2-home (ext:getenv "M2_HOME")) + (m2 (ext:getenv "M2")) (mvn-executable (if (find :unix *features*) "mvn" "mvn.bat"))) Modified: trunk/abcl/src/org/armedbear/lisp/asdf.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/asdf.lisp Fri Oct 5 08:20:57 2012 (r14165) +++ trunk/abcl/src/org/armedbear/lisp/asdf.lisp Fri Oct 5 23:26:41 2012 (r14166) @@ -1,5 +1,5 @@ ;;; -*- mode: Common-Lisp; Base: 10 ; Syntax: ANSI-Common-Lisp ; coding: utf-8 -*- -;;; This is ASDF 2.24: Another System Definition Facility. +;;; This is ASDF 2.25: Another System Definition Facility. ;;; ;;; Feedback, bug reports, and patches are all welcome: ;;; please mail to . @@ -118,7 +118,7 @@ ;; "2.345.6" would be a development version in the official upstream ;; "2.345.0.7" would be your seventh local modification of official release 2.345 ;; "2.345.6.7" would be your seventh local modification of development version 2.345.6 - (asdf-version "2.24") + (asdf-version "2.25") (existing-asdf (find-class 'component nil)) (existing-version *asdf-version*) (already-there (equal asdf-version existing-version))) @@ -364,9 +364,10 @@ #:user-source-registry-directory #:system-source-registry-directory - ;; Utilities + ;; Utilities: please use asdf-utils instead + #| ;; #:aif #:it - #:appendf #:orf + ;; #:appendf #:orf #:length=n-p #:remove-keys #:remove-keyword #:first-char #:last-char #:string-suffix-p @@ -389,7 +390,7 @@ #:while-collecting #:*wild* #:*wild-file* #:*wild-directory* #:*wild-inferiors* #:*wild-path* #:wilden - #:directorize-pathname-host-device + #:directorize-pathname-host-device|# ))) #+genera (import 'scl:boolean :asdf) (setf *asdf-version* asdf-version @@ -462,6 +463,7 @@ (progn (deftype logical-pathname () nil) (defun make-broadcast-stream () *error-output*) + (defun translate-logical-pathname (x) x) (defun file-namestring (p) (setf p (pathname p)) (format nil "~@[~A~]~@[.~A~]" (pathname-name p) (pathname-type p)))) @@ -3321,8 +3323,9 @@ (defun* user-homedir () (truenamize (pathname-directory-pathname + #+cormanlisp (ensure-directory-pathname (user-homedir-pathname)) #+mcl (current-user-homedir-pathname) - #-mcl (user-homedir-pathname)))) + #-(or cormanlisp mcl) (user-homedir-pathname)))) (defun* ensure-pathname* (x want-absolute want-directory fmt &rest args) (when (plusp (length x)) @@ -3356,11 +3359,13 @@ (loop :for dir :in (getenv-absolute-directories "XDG_CONFIG_DIRS") :collect (subpathname* dir "common-lisp/")))) ,@(when (os-windows-p) - `(,(subpathname* (or #+lispworks (sys:get-folder-path :local-appdata) + `(,(subpathname* (or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :local-appdata) (getenv-absolute-directory "LOCALAPPDATA")) "common-lisp/config/") ;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\AppData - ,(subpathname* (or #+lispworks (sys:get-folder-path :appdata) + ,(subpathname* (or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :appdata) (getenv-absolute-directory "APPDATA")) "common-lisp/config/"))) ,(subpathname (user-homedir) ".config/common-lisp/")))) @@ -3373,7 +3378,8 @@ ((os-windows-p) (aif ;; read-windows-registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Common AppData - (subpathname* (or #+lispworks (sys:get-folder-path :common-appdata) + (subpathname* (or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :common-appdata) (getenv-absolute-directory "ALLUSERSAPPDATA") (subpathname* (getenv-absolute-directory "ALLUSERSPROFILE") "Application Data/")) "common-lisp/config/") @@ -3501,9 +3507,11 @@ (or (try (getenv-absolute-directory "XDG_CACHE_HOME") "common-lisp" :implementation) (when (os-windows-p) - (try (or #+lispworks (sys:get-folder-path :local-appdata) + (try (or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :local-appdata) (getenv-absolute-directory "LOCALAPPDATA") - #+lispworks (sys:get-folder-path :appdata) + #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :appdata) (getenv-absolute-directory "APPDATA")) "common-lisp" "cache" :implementation)) '(:home ".cache" "common-lisp" :implementation)))) @@ -4242,11 +4250,14 @@ ,@(or (getenv-absolute-directories "XDG_DATA_DIRS") '("/usr/local/share" "/usr/share")))) ,@(when (os-windows-p) - `(,(or #+lispworks (sys:get-folder-path :local-appdata) + `(,(or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :local-appdata) (getenv-absolute-directory "LOCALAPPDATA")) - ,(or #+lispworks (sys:get-folder-path :appdata) + ,(or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :appdata) (getenv-absolute-directory "APPDATA")) - ,(or #+lispworks (sys:get-folder-path :common-appdata) + ,(or #+(and lispworks (not lispworks-personal-edition)) + (sys:get-folder-path :common-appdata) (getenv-absolute-directory "ALLUSERSAPPDATA") (subpathname* (getenv-absolute-directory "ALLUSERSPROFILE") "Application Data/"))))) :collect `(:directory ,(subpathname* dir "common-lisp/systems/")) From mevenson at common-lisp.net Sun Oct 7 08:14:28 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 07 Oct 2012 01:14:28 -0700 Subject: [armedbear-cvs] r14167 - trunk/abcl Message-ID: Author: mevenson Date: Sun Oct 7 01:14:24 2012 New Revision: 14167 Log: Be more aggressive in the default build options. Copy 'abcl.properties.in' to have these defaults kick in during ABCL runtime builds. Always perform incremental compilations of the ABCL runtime. Optimize runtime wrappers for contemporary 64bit ORCL Hotspot JVM implementations. Modified: trunk/abcl/abcl.properties.in Modified: trunk/abcl/abcl.properties.in ============================================================================== --- trunk/abcl/abcl.properties.in Fri Oct 5 23:26:41 2012 (r14166) +++ trunk/abcl/abcl.properties.in Sun Oct 7 01:14:24 2012 (r14167) @@ -1,17 +1,23 @@ # $Id$ -# XXX should be called 'build.properties' but this collides with its usage by the Eclipe IDE +# XXX should be called 'build.properties' but this collides with its +# usage by the Eclipe IDE # Template for Ant based build process settings. +# Copy to 'abcl.properties' to set options to local builds. + # Attempt to perform incremental compilation? -#abcl.build.incremental=true +abcl.build.incremental=true # Additional site specific startup code to be merged in 'system.lisp' at build time #abcl.startup.file=${basedir}/startup.lisp -# java.options sets the Java options in the abcl wrapper scripts -# +## java.options sets the Java options in the abcl wrapper scripts + +# Reasonable defaults for circa-2012, ORCL JVM implementations +java.options=-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g + # See # http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html # for options for the Oracle HotSpot JVM. @@ -37,6 +43,7 @@ #java.options=-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g # Enable assertions specified via the JVM contract +# TODO move all use of org.armedbear.lisp.Debug assertions to this interface. #java.options=-ea ## ABCL Development @@ -46,6 +53,7 @@ #abcl.compile.lisp.skip=true # JVM option to execute when debugging the Lisp compilation via 'abcl.compile.lisp.debug' +# Debug the compilation by connecting a JVM debugger to localhost:6789 via JDWP. #abcl.compile.lisp.debug.jvmarg=-agentlib:jdwp=transport=dt_socket,server=y,address=6789,suspend=y From mevenson at common-lisp.net Mon Oct 8 18:06:55 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 11:06:55 -0700 Subject: [armedbear-cvs] r14168 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Mon Oct 8 11:06:53 2012 New Revision: 14168 Log: Fix ENSURE-REMOTE-REPOSITORY method declaration. Use the MavenServiceLocator as opposed to DefaultServiceLocator which seems to help out quite a bit. Add :FORCE keyword options to assist debugging problems. Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Sun Oct 7 01:14:24 2012 (r14167) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Mon Oct 8 11:06:53 2012 (r14168) @@ -5,7 +5,8 @@ # Implementation -Not multi-threaded safe, and unclear how much work that would be. +Not necessarily multi-threaded safe, and unclear how much work that +would be, as it is unknown how the Maven implementation behaves. ## Installing Maven http://maven.apache.org/download.html @@ -22,7 +23,8 @@ |# -;;; N.b. evaluated *after* we load the ABCL specific modifications of ASDF in abcl-asdf.lisp +;;; N.b. evaluated *after* we load the ABCL specific modifications of +;;; ASDF in abcl-asdf.lisp (in-package :abcl-asdf) @@ -157,7 +159,7 @@ "org.apache.maven.wagon.providers.http.LightweightHttpWagon") "A list of possible candidate implementations that provide access to http and https resources. -Supposedly configurable with the java.net.protocols (c.f. reference maso2000 in the Manual.") +Supposedly configurable with the java.net.protocols (c.f. reference maso2000 in the Manual.)") (defun make-wagon-provider () "Returns an implementation of the org.sonatype.aether.connector.wagon.WagonProvider contract. @@ -184,26 +186,25 @@ (defun make-repository-system () (unless *init* (init)) (let ((locator - (java:jnew "org.apache.maven.repository.internal.DefaultServiceLocator")) - (repository-connector-factory-class - (java:jclass "org.sonatype.aether.spi.connector.RepositoryConnectorFactory")) - (wagon-repository-connector-factory-class - (java:jclass "org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory")) + (java:jnew "org.apache.maven.repository.internal.MavenServiceLocator")) (wagon-provider-class (java:jclass "org.sonatype.aether.connector.wagon.WagonProvider")) + (wagon-repository-connector-factory-class + (java:jclass "org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory")) + (repository-connector-factory-class + (java:jclass "org.sonatype.aether.spi.connector.RepositoryConnectorFactory")) (repository-system-class (java:jclass "org.sonatype.aether.RepositorySystem"))) - (#"addService" locator - repository-connector-factory-class - wagon-repository-connector-factory-class) (#"setServices" locator wagon-provider-class - (java:jnew-array-from-list - "org.sonatype.aether.connector.wagon.WagonProvider" - (list - (make-wagon-provider)))) - (#"getService" locator - repository-system-class))) + (java:jarray-from-list + (list (make-wagon-provider)))) + (#"addService" locator + repository-connector-factory-class + wagon-repository-connector-factory-class) + (values (#"getService" locator + repository-system-class) + locator))) (defun make-session (repository-system) "Construct a new org.sonatype.aether.RepositorySystemSession from REPOSITORY-SYSTEM" @@ -215,7 +216,8 @@ (user-homedir-pathname)))))) (#"setLocalRepositoryManager" session - (#"newLocalRepositoryManager" repository-system local-repository)))) + (#"newLocalRepositoryManager" repository-system + local-repository)))) (defparameter *maven-http-proxy* nil "A string containing the URI of an http proxy for Maven to use.") @@ -240,19 +242,19 @@ (defparameter *repository-system* nil "The org.sonatype.aether.RepositorySystem used by the Maeven Aether connector.") -(defun ensure-repository-system () - (unless *repository-system* +(defun ensure-repository-system (&key (force nil)) + (when (or force (not *repository-system*)) (setf *repository-system* (make-repository-system))) *repository-system*) (defparameter *session* nil "Reference to the Maven RepositorySystemSession") -(defun ensure-session () +(defun ensure-session (&key (force nil)) "Ensure that the RepositorySystemSession has been created. If *MAVEN-HTTP-PROXY* is non-nil, parse its value as the http proxy." - (unless *session* - (ensure-repository-system) + (when (or force (not *session*)) + (ensure-repository-system :force force) (setf *session* (make-session *repository-system*)) (#"setRepositoryListener" *session* (make-repository-listener)) (when *maven-http-proxy* @@ -297,10 +299,13 @@ (defparameter *maven-remote-repository* nil "The remote repository used by the Maven Aether embedder.") -(defun ensure-remote-repository (&key repository *default-repository* repository-p) +(defun ensure-remote-repository (&key + (force nil) + (repository *default-repository* repository-p)) (unless *init* (init)) - (unless (or repository-p - *maven-remote-repository*) + (when (or force + repository-p + (not *maven-remote-repository*)) (let ((r (make-remote-repository "central" "default" repository))) (when *maven-http-proxy* (#"setProxy" r (make-proxy))) From mevenson at common-lisp.net Mon Oct 8 18:06:56 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 11:06:56 -0700 Subject: [armedbear-cvs] r14169 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Mon Oct 8 11:06:55 2012 New Revision: 14169 Log: Fix ABCL-ASDF's ability to find Maven under Windows. Since the JVM process is a Windows process, even when the implementation is invoked under Cygwin, the "mvn" Bash wrapper can't be successfully invoked. Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Mon Oct 8 11:06:53 2012 (r14168) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Mon Oct 8 11:06:55 2012 (r14169) @@ -41,7 +41,10 @@ (defparameter *maven-verbose* t "Stream to send output from the Maven Aether subsystem to, or NIL to muffle output") -(defvar *mavens* '("/opt/local/bin/mvn3" "mvn3" "mvn" "mvn3.bat" "mvn.bat") +(defparameter *mavens* + (if (find :windows *features*) + '("mvn.bat" "mvn3.bat") + '("/opt/local/bin/mvn3" "mvn3" "mvn")) "Locations to search for the Maven executable.") (defun find-mvn () From mevenson at common-lisp.net Mon Oct 8 18:06:58 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 11:06:58 -0700 Subject: [armedbear-cvs] r14170 - in trunk/abcl: contrib/abcl-asdf contrib/jss contrib/mvn src/org/armedbear/lisp Message-ID: Author: mevenson Date: Mon Oct 8 11:06:57 2012 New Revision: 14170 Log: Fix the broken require contracts in ABCL-CONTRIB. CL:REQUIRE now calls PROVIDE with module names when successful (as opposed to relying in the loaded code to do this explicity). Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp trunk/abcl/contrib/jss/jss.asd trunk/abcl/contrib/mvn/jna.asd trunk/abcl/src/org/armedbear/lisp/require.lisp Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Mon Oct 8 11:06:55 2012 (r14169) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Mon Oct 8 11:06:57 2012 (r14170) @@ -1,7 +1,6 @@ ;;;; -*- Mode: LISP -*- -(in-package :asdf) -(defsystem :abcl-asdf +(asdf:defsystem :abcl-asdf :author "Mark Evenson" :version "0.8.0" :depends-on (jss) @@ -18,7 +17,7 @@ :depends-on ("abcl-asdf" "asdf-jar"))) :depends-on (packages)))) -(defsystem :abcl-asdf-test +(asdf:defsystem :abcl-asdf-test :author "Mark Evenson" :depends-on (abcl-asdf) :components Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Mon Oct 8 11:06:55 2012 (r14169) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Mon Oct 8 11:06:57 2012 (r14170) @@ -421,3 +421,6 @@ (with-slots (asdf::group-id asdf::artifact-id asdf::version) (asdf:ensure-parsed-mvn mvn) (resolve-dependencies (format nil "~A:~A:~A" asdf::group-id asdf::artifact-id asdf::version)))) + +;;; Currently the last file listed in ASDF +(provide 'abcl-asdf) Modified: trunk/abcl/contrib/jss/jss.asd ============================================================================== --- trunk/abcl/contrib/jss/jss.asd Mon Oct 8 11:06:55 2012 (r14169) +++ trunk/abcl/contrib/jss/jss.asd Mon Oct 8 11:06:57 2012 (r14170) @@ -1,7 +1,5 @@ ;;;; -*- Mode: LISP -*- -(in-package :asdf) - -(defsystem :jss +(asdf:defsystem :jss :author "Alan Ruttenberg, Mark Evenson" :version "3.0.3" :components Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Mon Oct 8 11:06:55 2012 (r14169) +++ trunk/abcl/contrib/mvn/jna.asd Mon Oct 8 11:06:57 2012 (r14170) @@ -2,8 +2,7 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. ;;; XXX jna-3.4.0 seems much more capable, but doesn't have a resolvable pom.xml from Maven central -(require :asdf) (asdf:defsystem :jna :version "3.0.9" - :defsystem-depends-on (abcl-asdf) ;;; XXX not working in the bowels of ASDF + :defsystem-depends-on (abcl-asdf) :components ((:mvn "com.sun.jna/jna/3.0.9"))) Modified: trunk/abcl/src/org/armedbear/lisp/require.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/require.lisp Mon Oct 8 11:06:55 2012 (r14169) +++ trunk/abcl/src/org/armedbear/lisp/require.lisp Mon Oct 8 11:06:57 2012 (r14170) @@ -38,8 +38,10 @@ (defun module-provide-system (module) (let ((*readtable* (copy-readtable nil))) - (handler-case - (load-system-file (string-downcase (string module))) + (handler-case + (progn + (load-system-file (string-downcase (string module))) + (provide module)) (t (e) (unless (and (typep e 'error) (search "Failed to find loadable system file" @@ -57,11 +59,13 @@ (cond (pathnames (unless (listp pathnames) (setf pathnames (list pathnames))) (dolist (x pathnames) - (load x))) + (load x)) + (provide module-name)) (t - (unless (some (lambda (p) (funcall p module-name)) + (if (some (lambda (p) (funcall p module-name)) (append (list #'module-provide-system) sys::*module-provider-functions*)) - (error "Don't know how to ~S ~A." 'require module-name)))) + (provide module-name) ;; Shouldn't hurt + (error "Don't know how to ~S ~A." 'require module-name)))) (set-difference *modules* saved-modules)))) From mevenson at common-lisp.net Mon Oct 8 18:07:00 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 11:07:00 -0700 Subject: [armedbear-cvs] r14171 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Mon Oct 8 11:06:59 2012 New Revision: 14171 Log: Update JNA to use the jna-3.4.0 artifact. Sufficient jna-3.0.9 metadata is no longer present in the default central repository. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Mon Oct 8 11:06:57 2012 (r14170) +++ trunk/abcl/contrib/mvn/jna.asd Mon Oct 8 11:06:59 2012 (r14171) @@ -1,8 +1,7 @@ ;;;; -*- Mode: LISP -*- ;;;; Need to have jna.jar present for CFFI to have a chance of working. -;;; XXX jna-3.4.0 seems much more capable, but doesn't have a resolvable pom.xml from Maven central (asdf:defsystem :jna - :version "3.0.9" + :version "3.4.0" :defsystem-depends-on (abcl-asdf) - :components ((:mvn "com.sun.jna/jna/3.0.9"))) + :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) From mevenson at common-lisp.net Mon Oct 8 18:07:01 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 11:07:01 -0700 Subject: [armedbear-cvs] r14172 - trunk/abcl/doc/design/pathnames Message-ID: Author: mevenson Date: Mon Oct 8 11:07:00 2012 New Revision: 14172 Log: Document current plans for resolution of issues involving the merging with JAR-PATHNAME defaults. Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown ============================================================================== --- trunk/abcl/doc/design/pathnames/merging-defaults.markdown Mon Oct 8 11:06:59 2012 (r14171) +++ trunk/abcl/doc/design/pathnames/merging-defaults.markdown Mon Oct 8 11:07:00 2012 (r14172) @@ -1,32 +1,73 @@ -# ISSUE MERGE-PATHNAMES with specialization of JAR-PATHNAME and URL-PATHNAME +# ISSUE MERGE-PATHNAMES with specialization of JAR-PATHNAME -## UC0 Loading jna.jar for CFFI via Quicklisp +We wish to resolve the following issues. -This happens in loading systems via ASDF recursively in jars (abcl-contrib.jar) +## UC0 Loading jna.jar for CFFI via Quicklisp -## UC1 -If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands like +This happens in loading systems via ASDF recursively in jars, most +importantly for those packaged in 'abcl-contrib.jar', which prevents +CFFI from loading the necessary JNA code. + +## UC1.1 +If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, commands that would +normally be expected to work such as - CL-USER: (probe-file #"/") + CL-USER> (probe-file #p"/") will fail. +### UC1.2 + +If *DEFAULT-PATHNAME-DEFAULTS* is a JAR-PATHNAME, COMPILE-FILE +operations specifying an OUTPUT-FILE with a NIL DEVICE will fail, as +COMPILE-FILE-PATHNAME is required to merge its arguments with the +defaults. -## Questions +## CLHS Citations + +Some especially relevant portions of the CLHS for consideration. ### 19.2.3 Merging Pathnames +http://www.lispworks.com/documentation/HyperSpec/Body/19_bc.htm -Except as explicitly specified otherwise, for functions that +"Except as explicitly specified otherwise, for functions that manipulate or inquire about files in the file system, the pathname argument to such a function is merged with *default-pathname-defaults* -before accessing the file system (as if by merge-pathnames). +before accessing the file system (as if by merge-pathnames)." + +Note that this implies that the arguments to PARSE-NAMESTRING--which +is what the SHARSIGN-P reader macro correpsponds to--should not be +merged. + + +## 19.2.2.2.3 :UNSPECIFIC as a Component Value +http://www.lispworks.com/documentation/HyperSpec/Body/19_bbbc.htm + +"If :unspecific is the value of a pathname component, the component is +considered to be ``absent'' or to ``have no meaning'' in the filename +being represented by the pathname." + +Having an :UNSPECIFIC DEVICE when a PATHNAME refers to a file would +address problems when merging when the defaults contains a JAR-PATHNAME. + +### MERGE-PATHNAMES +http://www.lispworks.com/documentation/HyperSpec/Body/f_merge_.htm + +"If pathname explicitly specifies a host and not a device, and if the +host component of default-pathname matches the host component of +pathname, then the device is taken from the default-pathname; +otherwise the device will be the default file device for that host. If +pathname does not specify a host, device, directory, name, or type, +each such component is copied from default-pathname." -Q: Does this mean that the arguments to PARSE-NAMESTRING should not be -merged? +This suggests that the contents HOST should be considered as an +additional axis of type for PATHNAME, so that when PATHNAMES of +differing types get merged, a DEVICE which has no meaning for a given +type does not get inserted. ## Other implementations -What is the "default" host for #p"/"? +A survey of the the "default" host for #p"/" on startup. ### SBCL @@ -38,19 +79,37 @@ HOST is NIL. - ### CCL HOST is :UNSPECIFIC. - ### ECL HOST is NIL. -### Colophon +## Implementation + +### TRUENAME sets DEVICE to :UNSPECIFIC + +TRUENAME sets DEVICE to :UNSPECIFIC running on non-Windows when +resolving a path to a plain file. + +### Use an implicit type for merging + +In the case for which a merge occurs when DEFAULT-PATHNAME +is a JAR-PATHNAME and the following conditions hold: + +1. HOST and DEVICE of the PATHNAME are NIL + +2. The DIRECTORY of the PATHNAME represents an absolute path. + +3. We are not on Windows. + +we set the DEVICE to be :UNSPECIFIC. + +### COLOPHON Mark Created: 01-SEP-2012 -Revised: 01-OCT-2012 +Revised: 08-OCT-2012 From mevenson at common-lisp.net Mon Oct 8 20:05:04 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 13:05:04 -0700 Subject: [armedbear-cvs] r14173 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Mon Oct 8 13:05:03 2012 New Revision: 14173 Log: Fix CL-TEST::ENSURE-DIRECTORIES-EXIST.8. Restore default as to not be verbose about directory creation. Modified: trunk/abcl/src/org/armedbear/lisp/ensure-directories-exist.lisp Modified: trunk/abcl/src/org/armedbear/lisp/ensure-directories-exist.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/ensure-directories-exist.lisp Mon Oct 8 11:07:00 2012 (r14172) +++ trunk/abcl/src/org/armedbear/lisp/ensure-directories-exist.lisp Mon Oct 8 13:05:03 2012 (r14173) @@ -33,7 +33,7 @@ (in-package "SYSTEM") -(defun ensure-directories-exist (pathspec &key (verbose t)) ;; DEBUG +(defun ensure-directories-exist (pathspec &key (verbose nil)) (let ((pathname (pathname pathspec)) (created-p nil)) ;;; CLHS: Function ENSURE-DIRECTORIES-EXIST "An error of type From mevenson at common-lisp.net Tue Oct 9 05:09:54 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 08 Oct 2012 22:09:54 -0700 Subject: [armedbear-cvs] r14174 - trunk/abcl/doc/design/pathnames Message-ID: Author: mevenson Date: Mon Oct 8 22:09:53 2012 New Revision: 14174 Log: Note why Windows doesn't need the proposed merge PATHNAME changes. Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown Modified: trunk/abcl/doc/design/pathnames/merging-defaults.markdown ============================================================================== --- trunk/abcl/doc/design/pathnames/merging-defaults.markdown Mon Oct 8 13:05:03 2012 (r14173) +++ trunk/abcl/doc/design/pathnames/merging-defaults.markdown Mon Oct 8 22:09:53 2012 (r14174) @@ -4,7 +4,7 @@ ## UC0 Loading jna.jar for CFFI via Quicklisp -This happens in loading systems via ASDF recursively in jars, most +Currently we cannount load systems via ASDF recursively in jars, most importantly for those packaged in 'abcl-contrib.jar', which prevents CFFI from loading the necessary JNA code. @@ -89,6 +89,11 @@ ## Implementation +Since Windows systems do have a default DEVICE for a normal file +PATHNAME, namely the current "drive letter" of the process, the +implementation changes will be mostly wrapped in runtime conditionals +for non-Windows systems. + ### TRUENAME sets DEVICE to :UNSPECIFIC TRUENAME sets DEVICE to :UNSPECIFIC running on non-Windows when @@ -111,5 +116,5 @@ Mark Created: 01-SEP-2012 -Revised: 08-OCT-2012 +Revised: 09-OCT-2012 From mevenson at common-lisp.net Wed Oct 10 14:17:14 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Wed, 10 Oct 2012 07:17:14 -0700 Subject: [armedbear-cvs] r14175 - in trunk/abcl: doc/manual src/org/armedbear/lisp Message-ID: Author: mevenson Date: Wed Oct 10 07:17:11 2012 New Revision: 14175 Log: Reading a Lisp name for \uNNNN works for non-zero padded forms less than 0x1000. Modified: trunk/abcl/doc/manual/abcl.tex trunk/abcl/src/org/armedbear/lisp/LispCharacter.java Modified: trunk/abcl/doc/manual/abcl.tex ============================================================================== --- trunk/abcl/doc/manual/abcl.tex Mon Oct 8 22:09:53 2012 (r14174) +++ trunk/abcl/doc/manual/abcl.tex Wed Oct 10 07:17:11 2012 (r14175) @@ -979,16 +979,16 @@ \section{Extensions to the Reader} -We implement a special hexadecimal escape sequence for specifying -characters to the Lisp reader, namely we allow a sequences of the form -\# \textbackslash Uxxxx to be processed by the reader as character -whose code is specified by the hexadecimal digits ``xxxx''. The -hexadecimal sequence must be exactly four digits long \footnote{This - represents a compromise with contemporary in 2011 32bit hosting - architecures for which we wish to make text processing efficient. - Should the User require more control over UNICODE processing we - recommend Edi Weisz' excellent work with FLEXI-STREAMS which we - fully support}, padded by leading zeros for values less than 0x1000. +We implement a special hexadecimal escape sequence for specifying 32 +bit characters to the Lisp reader\footnote{This represents a + compromise with contemporary in 2011 32bit hosting architecures for + which we wish to make text processing efficient. Should the User + require more control over UNICODE processing we recommend Edi Weisz' + excellent work with FLEXI-STREAMS which we fully support}, namely we +allow a sequences of the form \# \textbackslash Uxxxx to be processed +by the reader as character whose code is specified by the hexadecimal +digits ``xxxx''. The hexadecimal sequence may be one to four digits +long. Note that this sequence is never output by the implementation. Instead, the corresponding Unicode character is output for characters whose Modified: trunk/abcl/src/org/armedbear/lisp/LispCharacter.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/LispCharacter.java Mon Oct 8 22:09:53 2012 (r14174) +++ trunk/abcl/src/org/armedbear/lisp/LispCharacter.java Wed Oct 10 07:17:11 2012 (r14175) @@ -556,7 +556,7 @@ if (lower.length() == 5 && lower.startsWith("u")) { try { - int i = Integer.parseInt(lower.substring(1, 5), 16); + final int i = Integer.parseInt(lower.substring(1, 5), 16); return i; } catch (NumberFormatException e) {}; } @@ -585,6 +585,17 @@ return ' '; if (lower.equals("rubout")) return 127; + if (lower.startsWith("u")) { + int length = lower.length(); + if (length > 1 && length < 5) { + try { + final int i = Integer.parseInt(lower.substring(1), 16); + return i; + } catch (NumberFormatException e) {}; + // fall through + } + } + // Unknown. return -1; } From mevenson at common-lisp.net Thu Oct 11 11:33:20 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 04:33:20 -0700 Subject: [armedbear-cvs] r14176 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Thu Oct 11 04:33:19 2012 New Revision: 14176 Log: Refactor PATHNAME implementation details to tighten existing semantics. None of this should change the behavior of CL:PATHNAME, but it prepares for that in subsequent patches to address problems in merging when the defaults points to a JAR-PATHNAME. Fix COMPILE-FILE to work with source located in jar archive. Moved Utilities.getFile() to instance method of Pathname which makes more logical sense. Moved Utilities.getPathnameDirectory() to static instance classes. These functions no longer merge their argument with *DEFAULT-PATHNAME-DEFAULTS*, as this should be done explictly at a higher level in the Lisp calling into Java abstraction. RENAME-FILE no longer on namestrings, but instead use the result of TRUENAME invocation, as namestrings will not always roundtrip exactly back to PATHNAMES. POPULATE-ZIP-FASL no longer forms its argumentes by merging paths, instead using MAKE-PATHNAME with controlled defaults. SYSTEM:NEXT-CLASSFILE-NAME and SYSTEM:COMPUTE-CLASSFILE-NAME changed to NEXT-CLASSFILE and COMPUTE-CLASSFILE returning PATHNAME objects rather than namestrings. Compiler now dumps pathname in alternate form that preserves DEVICE :UNSPECIFIC. Modified: trunk/abcl/src/org/armedbear/lisp/Load.java trunk/abcl/src/org/armedbear/lisp/Pathname.java trunk/abcl/src/org/armedbear/lisp/Utilities.java trunk/abcl/src/org/armedbear/lisp/compile-file.lisp trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp trunk/abcl/src/org/armedbear/lisp/directory.lisp trunk/abcl/src/org/armedbear/lisp/dump-form.lisp trunk/abcl/src/org/armedbear/lisp/file_write_date.java trunk/abcl/src/org/armedbear/lisp/probe_file.java trunk/abcl/src/org/armedbear/lisp/zip.java Modified: trunk/abcl/src/org/armedbear/lisp/Load.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Load.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/Load.java Thu Oct 11 04:33:19 2012 (r14176) @@ -140,8 +140,8 @@ = coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue()); mergedPathname = Pathname.mergePathnames(pathname, pathnameDefaults); } - - Pathname truename = findLoadableFile(mergedPathname != null ? mergedPathname : pathname); + Pathname loadableFile = findLoadableFile(mergedPathname != null ? mergedPathname : pathname); + Pathname truename = coercePathnameOrNull(Pathname.truename(loadableFile)); if (truename == null || truename.equals(NIL)) { if (ifDoesNotExist) { @@ -193,8 +193,8 @@ } } truename = (Pathname)initTruename; - } - + } + InputStream in = truename.getInputStream(); Debug.assertTrue(in != null); @@ -249,6 +249,20 @@ private static final Symbol FASL_LOADER = PACKAGE_SYS.intern("*FASL-LOADER*"); static final LispObject COMPILE_FILE_INIT_FASL_TYPE = new SimpleString("_"); + private static final Pathname coercePathnameOrNull(LispObject p) { + if (p == null) { + return null; + } + Pathname result = null; + try { + result = (Pathname)p; + } catch (Throwable t) { // XXX narrow me! + return null; + } + return result; + } + + public static final LispObject loadSystemFile(final String filename, boolean verbose, boolean print, @@ -267,8 +281,12 @@ mergedPathname = pathname; } URL url = null; - truename = findLoadableFile(mergedPathname); - final String COMPILE_FILE_TYPE = Lisp._COMPILE_FILE_TYPE_.symbolValue().getStringValue(); + Pathname loadableFile = findLoadableFile(mergedPathname); + truename = coercePathnameOrNull(Pathname.truename(loadableFile)); + + final String COMPILE_FILE_TYPE + = Lisp._COMPILE_FILE_TYPE_.symbolValue().getStringValue(); + if (truename == null || truename.equals(NIL) || bootPath.equals(NIL)) { // Make an attempt to use the boot classpath String path = pathname.asEntryPath(); @@ -286,7 +304,8 @@ } if (!bootPath.equals(NIL)) { Pathname urlPathname = new Pathname(url); - truename = findLoadableFile(urlPathname); + loadableFile = findLoadableFile(urlPathname); + truename = (Pathname)Pathname.truename(loadableFile); if (truename == null) { return error(new LispError("Failed to find loadable system file in boot classpath " + "'" + url + "'")); @@ -481,7 +500,13 @@ // Lisp.readFunctionBytes(). Pathname truePathname = null; if (!truename.equals(NIL)) { - truePathname = new Pathname(((Pathname)truename).getNamestring()); + if (truename instanceof Pathname) { + truePathname = new Pathname((Pathname)truename); + } else if (truename instanceof AbstractString) { + truePathname = new Pathname(truename.getStringValue()); + } else { + Debug.assertTrue(false); + } String type = truePathname.type.getStringValue(); if (type.equals(Lisp._COMPILE_FILE_TYPE_.symbolValue(thread).getStringValue()) || type.equals(COMPILE_FILE_INIT_FASL_TYPE.toString())) { Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Pathname.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Thu Oct 11 04:33:19 2012 (r14176) @@ -1,4 +1,4 @@ -/* +/* * Pathname.java * * Copyright (C) 2003-2007 Peter Graves @@ -1639,7 +1639,7 @@ Pathname p; if (file.isDirectory()) { if (arg2 != NIL) { - p = Utilities.getDirectoryPathname(file); + p = Pathname.getDirectoryPathname(file); } else { p = new Pathname(file.getAbsolutePath()); } @@ -1915,7 +1915,7 @@ } } - private static final Primitive MERGE_PATHNAMES = new pf_merge_pathnames(); + static final Primitive MERGE_PATHNAMES = new pf_merge_pathnames(); @DocString(name="merge-pathnames", args="pathname &optional default-pathname default-version", returns="pathname", @@ -2114,6 +2114,7 @@ return dir; } + public static final LispObject truename(Pathname pathname) { return truename(pathname, false); } @@ -2134,6 +2135,15 @@ public static final LispObject truename(Pathname pathname, boolean errorIfDoesNotExist) { + if (pathname == null || pathname.equals(NIL)) { // XXX duplicates code at the end of this longish function: figure out proper nesting of labels. + if (errorIfDoesNotExist) { + StringBuilder sb = new StringBuilder("The file "); + sb.append(pathname.princToString()); + sb.append(" does not exist."); + return error(new FileError(sb.toString(), pathname)); + } + return NIL; + } if (pathname instanceof LogicalPathname) { pathname = LogicalPathname.translateLogicalPathname((LogicalPathname) pathname); } @@ -2142,27 +2152,22 @@ pathname)); } if (!(pathname.isJar() || pathname.isURL())) { - pathname + Pathname result = mergePathnames(pathname, coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue()), NIL); - final String namestring = pathname.getNamestring(); - if (namestring == null) { - return error(new FileError("Pathname has no namestring: " - + pathname.princToString(), - pathname)); - } - - final File file = new File(namestring); - if (file.isDirectory()) { - return Utilities.getDirectoryPathname(file); - } + final File file = result.getFile(); if (file.exists()) { - try { - return new Pathname(file.getCanonicalPath()); - } catch (IOException e) { - return error(new FileError(e.getMessage(), pathname)); + if (file.isDirectory()) { + result = Pathname.getDirectoryPathname(file); + } else { + try { + result = new Pathname(file.getCanonicalPath()); + } catch (IOException e) { + return error(new FileError(e.getMessage(), pathname)); + } } + return result; } } else if (pathname.isURL()) { if (pathname.getInputStream() != null) { @@ -2343,7 +2348,7 @@ + ": " + e); } } else { - File file = Utilities.getFile(this); + File file = getFile(); try { result = new FileInputStream(file); } catch (IOException e) { @@ -2360,7 +2365,7 @@ */ public long getLastModified() { if (!(isJar() || isURL())) { - File f = Utilities.getFile(this); + File f = getFile(); return f.lastModified(); } @@ -2452,7 +2457,7 @@ defaultedPathname); } - File file = Utilities.getFile(defaultedPathname); + File file = defaultedPathname.getFile(); return file.mkdir() ? T : NIL; } } @@ -2461,57 +2466,66 @@ @DocString(name="rename-file", args="filespec new-name", returns="defaulted-new-name, old-truename, new-truename", - doc="rename-file modifies the file system in such a way that the file indicated by FILESPEC is renamed to DEFAULTED-NEW-NAME.") + doc = "Modifies the file system in such a way that the file indicated by FILESPEC is renamed to DEFAULTED-NEW-NAME.\n" + + "\n" + + "Returns three values if successful. The primary value, DEFAULTED-NEW-NAME, is \n" + + "the resulting name which is composed of NEW-NAME with any missing components filled in by \n" + + "performing a merge-pathnames operation using filespec as the defaults. The secondary \n" + + "value, OLD-TRUENAME, is the truename of the file before it was renamed. The tertiary \n" + + "value, NEW-TRUENAME, is the truename of the file after it was renamed.\n") private static class pf_rename_file extends Primitive { pf_rename_file() { super("rename-file", "filespec new-name"); } @Override public LispObject execute(LispObject first, LispObject second) { - final Pathname original = (Pathname) truename(first, true); - final String originalNamestring = original.getNamestring(); + Pathname oldPathname = coerceToPathname(first); + Pathname oldTruename = (Pathname) truename(oldPathname, true); Pathname newName = coerceToPathname(second); if (newName.isWild()) { error(new FileError("Bad place for a wild pathname.", newName)); } - if (original.isJar()) { - error(new FileError("Bad place for a jar pathname.", original)); + if (oldTruename.isJar()) { + error(new FileError("Bad place for a jar pathname.", oldTruename)); } if (newName.isJar()) { error(new FileError("Bad place for a jar pathname.", newName)); } - if (original.isURL()) { - error(new FileError("Bad place for a URL pathname.", original)); + if (oldTruename.isURL()) { + error(new FileError("Bad place for a URL pathname.", oldTruename)); } if (newName.isURL()) { error(new FileError("Bad place for a jar pathname.", newName)); } - newName = mergePathnames(newName, original, NIL); - final String newNamestring; - if (newName instanceof LogicalPathname) { - newNamestring = LogicalPathname.translateLogicalPathname((LogicalPathname) newName).getNamestring(); - } else { - newNamestring = newName.getNamestring(); - } - if (originalNamestring != null && newNamestring != null) { - final File source = new File(originalNamestring); - final File destination = new File(newNamestring); - if (Utilities.isPlatformWindows) { - if (destination.isFile()) { - ZipCache.remove(destination); - destination.delete(); - } - } - if (source.renameTo(destination)) { // Success! - return LispThread.currentThread().setValues(newName, original, - truename(newName, true)); - } + Pathname defaultedNewName = mergePathnames(newName, oldTruename, NIL); + + File source = oldTruename.getFile(); + File destination = null; + if (defaultedNewName instanceof LogicalPathname) { + destination = LogicalPathname.translateLogicalPathname((LogicalPathname)defaultedNewName) + .getFile(); + } else { + destination = defaultedNewName.getFile(); + } + // By default, MSDOG doesn't allow one to remove files that are open. + if (Utilities.isPlatformWindows) { + if (destination.isFile()) { + ZipCache.remove(destination); + destination.delete(); + } + } + if (source.renameTo(destination)) { // Success! + Pathname newTruename = (Pathname)truename(defaultedNewName, true); + return LispThread.currentThread().setValues(defaultedNewName, + oldTruename, + newTruename); } return error(new FileError("Unable to rename " - + original.princToString() + + oldTruename.princToString() + " to " + newName.princToString() - + ".")); + + ".", + oldTruename)); } } @@ -2655,5 +2669,33 @@ } return null; // Error } + + + File getFile() { + String namestring = getNamestring(); // XXX UNC pathnames currently have no namestring + if (namestring != null) { + return new File(namestring); + } + error(new FileError("Pathname has no namestring: " + princToString(), + this)); + // Not reached. + return null; + } + public static Pathname getDirectoryPathname(File file) { + try { + String namestring = file.getCanonicalPath(); + if (namestring != null && namestring.length() > 0) { + if (namestring.charAt(namestring.length() - 1) != File.separatorChar) { + namestring = namestring.concat(File.separator); + } + } + return new Pathname(namestring); + } catch (IOException e) { + error(new LispError(e.getMessage())); + // Not reached. + return null; + } + } + } Modified: trunk/abcl/src/org/armedbear/lisp/Utilities.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Utilities.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/Utilities.java Thu Oct 11 04:33:19 2012 (r14176) @@ -90,44 +90,6 @@ return false; } - public static File getFile(Pathname pathname) - { - return getFile(pathname, - coerceToPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.symbolValue())); - } - - public static File getFile(Pathname pathname, Pathname defaultPathname) - - { - Pathname merged = - Pathname.mergePathnames(pathname, defaultPathname, NIL); - String namestring = merged.getNamestring(); - if (namestring != null) - return new File(namestring); - error(new FileError("Pathname has no namestring: " + merged.princToString(), - merged)); - // Not reached. - return null; - } - - public static Pathname getDirectoryPathname(File file) - - { - try { - String namestring = file.getCanonicalPath(); - if (namestring != null && namestring.length() > 0) { - if (namestring.charAt(namestring.length() - 1) != File.separatorChar) - namestring = namestring.concat(File.separator); - } - return new Pathname(namestring); - } - catch (IOException e) { - error(new LispError(e.getMessage())); - // Not reached. - return null; - } - } - public static ZipInputStream getZipInputStream(ZipFile zipfile, String entryName) { return Utilities.getZipInputStream(zipfile, entryName, false); Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Thu Oct 11 04:33:19 2012 (r14176) @@ -1,3 +1,4 @@ + ;;; compile-file.lisp ;;; ;;; Copyright (C) 2004-2006 Peter Graves @@ -53,15 +54,15 @@ (defun fasl-loader-classname (&optional (output-file-pathname *output-file-pathname*)) (%format nil "~A_0" (base-classname output-file-pathname))) -(declaim (ftype (function (t) t) compute-classfile-name)) -(defun compute-classfile-name (n &optional (output-file-pathname +(declaim (ftype (function (t) t) compute-classfile)) +(defun compute-classfile (n &optional (output-file-pathname *output-file-pathname*)) - "Computes the name of the class file associated with number `n'." + "Computes the pathname of the class file associated with number `n'." (let ((name (sanitize-class-name (%format nil "~A_~D" (pathname-name output-file-pathname) n)))) - (namestring (merge-pathnames (make-pathname :name name :type *compile-file-class-extension*) - output-file-pathname)))) + (merge-pathnames (make-pathname :name name :type *compile-file-class-extension*) + output-file-pathname))) (defun sanitize-class-name (name) (let ((name (copy-seq name))) @@ -74,9 +75,9 @@ name)) -(declaim (ftype (function () t) next-classfile-name)) -(defun next-classfile-name () - (compute-classfile-name (incf *class-number*))) +(declaim (ftype (function () t) next-classfile)) +(defun next-classfile () + (compute-classfile (incf *class-number*))) (defmacro report-error (&rest forms) `(handler-case (progn , at forms) @@ -185,7 +186,7 @@ (let* ((toplevel-form (third form)) (expr `(lambda () ,form)) (saved-class-number *class-number*) - (classfile (next-classfile-name)) + (classfile (next-classfile)) (result (with-open-file (f classfile @@ -307,7 +308,7 @@ (let ((lambda-expression (cadr function-form))) (jvm::with-saved-compiler-policy (let* ((saved-class-number *class-number*) - (classfile (next-classfile-name)) + (classfile (next-classfile)) (result (with-open-file (f classfile @@ -450,7 +451,7 @@ (push name *toplevel-macros*) (let* ((expr (function-lambda-expression (macro-function name))) (saved-class-number *class-number*) - (classfile (next-classfile-name))) + (classfile (next-classfile))) (with-open-file (f classfile :direction :output @@ -490,7 +491,7 @@ (let* ((expr `(lambda ,lambda-list , at decls (block ,block-name , at body))) (saved-class-number *class-number*) - (classfile (next-classfile-name)) + (classfile (next-classfile)) (internal-compiler-errors nil) (result (with-open-file (f classfile @@ -636,21 +637,25 @@ (eval form)))) (defun populate-zip-fasl (output-file) - (let* ((type ;; Don't use ".zip", it'll result in an extension - ;; with a dot, which is rejected by NAMESTRING + (let* ((type ;; Don't use ".zip", it'll result in an extension with + ;; a dot, which is rejected by NAMESTRING (%format nil "~A~A" (pathname-type output-file) "-zip")) - (zipfile (namestring - (merge-pathnames (make-pathname :type type) - output-file))) + (output-file (if (logical-pathname-p output-file) + (translate-logical-pathname output-file) + output-file)) + (zipfile + (if (find :windows *features*) + (make-pathname :defaults output-file :type type) + (make-pathname :defaults output-file :type type + :device :unspecific))) (pathnames nil) - (fasl-loader (namestring (merge-pathnames - (make-pathname :name (fasl-loader-classname) - :type *compile-file-class-extension*) - output-file)))) + (fasl-loader (make-pathname :defaults output-file + :name (fasl-loader-classname) + :type *compile-file-class-extension*))) (when (probe-file fasl-loader) (push fasl-loader pathnames)) (dotimes (i *class-number*) - (let ((truename (probe-file (compute-classfile-name (1+ i))))) + (let ((truename (probe-file (compute-classfile (1+ i))))) (when truename (push truename pathnames) ;;; XXX it would be better to just use the recorded number @@ -668,8 +673,8 @@ :defaults truename))) (push resource pathnames)))))) (setf pathnames (nreverse (remove nil pathnames))) - (let ((load-file (merge-pathnames (make-pathname :type "_") - output-file))) + (let ((load-file (make-pathname :defaults output-file + :type "_"))) (rename-file output-file load-file) (push load-file pathnames)) (zip zipfile pathnames) @@ -710,6 +715,7 @@ (defvar *forms-for-output* nil) (defvar *fasl-stream* nil) +(defvar *debug-compile-from-stream* nil) (defun compile-from-stream (in output-file temp-file temp-file2 extract-toplevel-funcs-and-macros functions-file macros-file exports-file) @@ -722,6 +728,9 @@ (namestring (namestring *compile-file-truename*)) (start (get-internal-real-time)) *fasl-uninterned-symbols*) + (setf *debug-compile-from-stream* + (list :in in + :compile-file-pathname *compile-file-pathname*)) (when *compile-verbose* (format t "; Compiling ~A ...~%" namestring)) (with-compilation-unit () @@ -848,7 +857,8 @@ while (not (eq line :eof)) do (write-line line out))))) (delete-file temp-file) - (remove-zip-cache-entry output-file) ;; Necessary under windows + (when (find :windows *features*) + (remove-zip-cache-entry output-file)) (rename-file temp-file2 output-file) (when *compile-file-zip* @@ -870,8 +880,7 @@ (flet ((pathname-with-type (pathname type &optional suffix) (when suffix (setq type (concatenate 'string type suffix))) - (merge-pathnames (make-pathname :type type) - pathname))) + (make-pathname :type type :defaults pathname))) (unless (or (and (probe-file input-file) (not (file-directory-p input-file))) (pathname-type input-file)) Modified: trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/compiler-pass2.lisp Thu Oct 11 04:33:19 2012 (r14176) @@ -7555,7 +7555,7 @@ (defmacro with-file-compilation (&body body) `(let ((*file-compilation* t) - (*pathnames-generator* #'sys::next-classfile-name)) + (*pathnames-generator* #'sys::next-classfile)) , at body)) Modified: trunk/abcl/src/org/armedbear/lisp/directory.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/directory.lisp Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/directory.lisp Thu Oct 11 04:33:19 2012 (r14176) @@ -117,9 +117,9 @@ (dolist (entry entries) (cond ((file-directory-p entry) (when (pathname-match-p (file-namestring (pathname-as-file entry)) (file-namestring pathname)) - (push entry matching-entries))) + (push (truename entry) matching-entries))) ((pathname-match-p (or (file-namestring entry) "") (file-namestring pathname)) - (push entry matching-entries)))) + (push (truename entry) matching-entries)))) matching-entries)))) ;; Not wild. (let ((truename (probe-file pathname))) Modified: trunk/abcl/src/org/armedbear/lisp/dump-form.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/dump-form.lisp Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/dump-form.lisp Thu Oct 11 04:33:19 2012 (r14176) @@ -175,6 +175,23 @@ (acons symbol index *fasl-uninterned-symbols*))) index)) +(declaim (ftype (function (pathname stream) t) dump-pathname)) +(defun dump-pathname (pathname stream) + (write-string "#P(" stream) + (write-string ":HOST " stream) + (dump-form (pathname-host pathname) stream) + (write-string " :DEVICE " stream) + (dump-form (pathname-device pathname) stream) + (write-string " :DIRECTORY " stream) + (dump-form (pathname-directory pathname) stream) + (write-string " :NAME " stream) + (dump-form (pathname-name pathname) stream) + (write-string " :TYPE " stream) + (dump-form (pathname-type pathname) stream) + (write-string " :VERSION " stream) + (dump-form (pathname-version pathname) stream) + (write-string ")" stream)) + (declaim (ftype (function (t stream) t) dump-object)) (defun dump-object (object stream) (unless (df-handle-circularity object stream nil) @@ -182,6 +199,8 @@ (dump-cons object stream)) ((stringp object) (%stream-output-object object stream)) + ((pathnamep object) + (dump-pathname object stream)) ((bit-vector-p object) (%stream-output-object object stream)) ((vectorp object) Modified: trunk/abcl/src/org/armedbear/lisp/file_write_date.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/file_write_date.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/file_write_date.java Thu Oct 11 04:33:19 2012 (r14176) @@ -51,7 +51,8 @@ Pathname pathname = coerceToPathname(arg); if (pathname.isWild()) error(new FileError("Bad place for a wild pathname.", pathname)); - long lastModified = pathname.getLastModified(); + Pathname defaultedPathname = (Pathname) Pathname.MERGE_PATHNAMES.execute(pathname); + long lastModified = defaultedPathname.getLastModified(); if (lastModified == 0) return NIL; return number(lastModified / 1000 + 2208988800L); Modified: trunk/abcl/src/org/armedbear/lisp/probe_file.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/probe_file.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/probe_file.java Thu Oct 11 04:33:19 2012 (r14176) @@ -74,8 +74,9 @@ Pathname pathname = coerceToPathname(arg); if (pathname.isWild()) error(new FileError("Bad place for a wild pathname.", pathname)); - File file = Utilities.getFile(pathname); - return file.isDirectory() ? Utilities.getDirectoryPathname(file) : NIL; + Pathname defaultedPathname = (Pathname)Pathname.MERGE_PATHNAMES.execute(pathname); + File file = defaultedPathname.getFile(); + return file.isDirectory() ? Pathname.getDirectoryPathname(file) : NIL; } }; @@ -85,12 +86,12 @@ new Primitive("file-directory-p", PACKAGE_EXT, true) { @Override - public LispObject execute(LispObject arg) + public LispObject execute(LispObject arg) // XXX Should this merge with defaults? { Pathname pathname = coerceToPathname(arg); if (pathname.isWild()) error(new FileError("Bad place for a wild pathname.", pathname)); - File file = Utilities.getFile(pathname); + File file = pathname.getFile(); return file.isDirectory() ? T : NIL; } }; Modified: trunk/abcl/src/org/armedbear/lisp/zip.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/zip.java Wed Oct 10 07:17:11 2012 (r14175) +++ trunk/abcl/src/org/armedbear/lisp/zip.java Thu Oct 11 04:33:19 2012 (r14176) @@ -215,7 +215,7 @@ final Pathname source = Lisp.coerceToPathname(key); final Pathname destination = Lisp.coerceToPathname(value); - final File file = Utilities.getFile(source); + final File file = source.getFile(); try { String jarEntry = destination.getNamestring(); if (jarEntry.startsWith("/")) { From mevenson at common-lisp.net Thu Oct 11 11:33:22 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 04:33:22 -0700 Subject: [armedbear-cvs] r14177 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Thu Oct 11 04:33:22 2012 New Revision: 14177 Log: TRUENAME now sets DEVICE to :UNSPECIFIC from NIL on non-MSDOG. Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Pathname.java Thu Oct 11 04:33:19 2012 (r14176) +++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Thu Oct 11 04:33:22 2012 (r14177) @@ -2167,6 +2167,9 @@ return error(new FileError(e.getMessage(), pathname)); } } + if (Utilities.isPlatformUnix) { + result.device = Keyword.UNSPECIFIC; + } return result; } } else if (pathname.isURL()) { From mevenson at common-lisp.net Thu Oct 11 11:33:25 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 04:33:25 -0700 Subject: [armedbear-cvs] r14178 - in trunk/abcl: doc/manual src/org/armedbear/lisp Message-ID: Author: mevenson Date: Thu Oct 11 04:33:24 2012 New Revision: 14178 Log: Merging a "plain file" path on non-Windows gets an :UNSPECIFIC DEVICE. If the defaults contain a JAR-PATHNAME, and the pathname to be be merged does not have a specified DEVICE, a specified HOST, and doesn't contain a relative DIRECTORY, then on non-MSDOG, set its device to :UNSPECIFIC. Modified: trunk/abcl/doc/manual/abcl.tex trunk/abcl/src/org/armedbear/lisp/Pathname.java Modified: trunk/abcl/doc/manual/abcl.tex ============================================================================== --- trunk/abcl/doc/manual/abcl.tex Thu Oct 11 04:33:22 2012 (r14177) +++ trunk/abcl/doc/manual/abcl.tex Thu Oct 11 04:33:24 2012 (r14178) @@ -51,6 +51,20 @@ do not match the specification. \item The \code{TIME} form does not return a proper \code{VALUES} environment to its caller. +\item When merging pathnames and the defaults point to a \code{JAR-PATHNAME}, + we set the \code{DEVICE} of the result to \code{:UNSPECIFIC} if the pathname to be + be merged does not contain a specified \code{DEVICE}, does not contain a + specified \code{HOST}, does contain a relative \code{DIRECTORY}, and we are + not running on a \textsc{MSFT} Windows platform.\footnote{The intent of this + rather arcane sounding deviation from conformance is so that the + result of a merge won't fill in a DEVICE with the wrong "default + device for the host" in the sense of the fourth paragraph in the + [CLHS description of MERGE-PATHNAMES][2] (the paragraph beginning + "If the PATHNAME explicitly specifies a host and not a device?"). + A future version of the implementation may return to conformance + by using the \code{HOST} value to reflect the type explicitly. + } + \end{itemize} Somewhat confusingly, this statement of non-conformance in the Modified: trunk/abcl/src/org/armedbear/lisp/Pathname.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Pathname.java Thu Oct 11 04:33:22 2012 (r14177) +++ trunk/abcl/src/org/armedbear/lisp/Pathname.java Thu Oct 11 04:33:24 2012 (r14178) @@ -1985,7 +1985,24 @@ result.device = p.device; } else { if (!p.isURL()) { - result.device = d.device; + // If the defaults contain a JAR-PATHNAME, and the + // pathname to be be merged does not have a specified + // DEVICE, a specified HOST, and doesn't contain a + // relative DIRECTORY, then on non-MSDOG, set its + // device to :UNSPECIFIC. + if (pathname.host == NIL + && pathname.device == NIL + && d.isJar() + && !Utilities.isPlatformWindows) { + if (pathname.directory != NIL + && pathname.directory.car() == Keyword.ABSOLUTE) { + result.device = Keyword.UNSPECIFIC; + } else { + result.device = d.device; + } + } else { + result.device = d.device; + } } } From mevenson at common-lisp.net Thu Oct 11 11:33:27 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 04:33:27 -0700 Subject: [armedbear-cvs] r14179 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Thu Oct 11 04:33:26 2012 New Revision: 14179 Log: Fix ASDF loading recursively from JAR-PATHNAME. With this patch, JNA should (finally) load again. The problem manifested itself when recursive loads of ASDF systems are triggered for which the systems are stored in a jar archive but it could also be triggered by setting *DEFAULT-PATHNAME-DEFAULTS* to a JAR-PATHNAME. Modified: trunk/abcl/src/org/armedbear/lisp/asdf.lisp Modified: trunk/abcl/src/org/armedbear/lisp/asdf.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/asdf.lisp Thu Oct 11 04:33:24 2012 (r14178) +++ trunk/abcl/src/org/armedbear/lisp/asdf.lisp Thu Oct 11 04:33:26 2012 (r14179) @@ -3961,19 +3961,38 @@ (setf output-truename nil failure-p t))) (values output-truename warnings-p failure-p)))) -#+abcl +#+abcl (defun* translate-jar-pathname (source wildcard) (declare (ignore wildcard)) - (let* ((p (pathname (first (pathname-device source)))) - (root (format nil "/___jar___file___root___/~@[~A/~]" - (and (find :windows *features*) - (pathname-device p))))) - (apply-output-translations - (merge-pathnames* - (relativize-pathname-directory source) - (merge-pathnames* - (relativize-pathname-directory (ensure-directory-pathname p)) - root))))) + (let* ((jar + (pathname (first (pathname-device source)))) + (target-root-directory-namestring + (format nil "/___jar___file___root___/~@[~A/~]" + (and (find :windows *features*) + (pathname-device jar)))) + (relative-source + (relativize-pathname-directory source)) + (relative-jar + (relativize-pathname-directory (ensure-directory-pathname jar))) + (target-root-directory + (if (find :windows *features*) + (make-pathname :name nil + :type nil + :version nil + :defaults (parse-namestring target-root-directory-namestring)) + (make-pathname :device :unspecific + :name nil + :type nil + :version nil + :defaults (parse-namestring target-root-directory-namestring)))) + (target-root + (merge-pathnames* relative-jar target-root-directory)) + (target + (merge-pathnames* relative-source target-root))) + (if (find :windows *features*) + (apply-output-translations target) + (make-pathname :defaults (apply-output-translations target) + :device :unspecific)))) ;;;; ----------------------------------------------------------------- ;;;; Compatibility mode for ASDF-Binary-Locations From mevenson at common-lisp.net Thu Oct 11 11:33:28 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 04:33:28 -0700 Subject: [armedbear-cvs] r14180 - trunk/abcl/test/lisp/ansi Message-ID: Author: mevenson Date: Thu Oct 11 04:33:27 2012 New Revision: 14180 Log: Invoke ANSI-TESTS:DO-TESTS-MATCHING in proper directory. Modified: trunk/abcl/test/lisp/ansi/abcl-ansi.lisp Modified: trunk/abcl/test/lisp/ansi/abcl-ansi.lisp ============================================================================== --- trunk/abcl/test/lisp/ansi/abcl-ansi.lisp Thu Oct 11 04:33:26 2012 (r14179) +++ trunk/abcl/test/lisp/ansi/abcl-ansi.lisp Thu Oct 11 04:33:27 2012 (r14180) @@ -80,7 +80,8 @@ "Run all tests in suite whose symbol contains MATCH in a case-insensitive manner." (setf *last-run-matching* match) (let* ((matching (string-upcase match)) - (count 0)) + (count 0) + (*default-pathname-defaults* *ansi-tests-directory*)) (mapcar (lambda (entry) (if (search matching (symbol-name (rt::name entry))) (setf (rt::pend entry) t From mevenson at common-lisp.net Thu Oct 11 22:33:03 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 11 Oct 2012 15:33:03 -0700 Subject: [armedbear-cvs] r14181 - trunk/abcl/contrib Message-ID: Author: mevenson Date: Thu Oct 11 15:33:03 2012 New Revision: 14181 Log: abcl-contrib: Note the update to the jna-3.4.0.jar binary jvm artifact. Modified: trunk/abcl/contrib/README.markdown Modified: trunk/abcl/contrib/README.markdown ============================================================================== --- trunk/abcl/contrib/README.markdown Thu Oct 11 04:33:27 2012 (r14180) +++ trunk/abcl/contrib/README.markdown Thu Oct 11 15:33:03 2012 (r14181) @@ -37,12 +37,12 @@ mvn --- -A collection of various useful JVM artifacts downloaded and cached -by the Aether Maven connector. Requires the maven-3.0.4 executable -"mvn" (or "mvn.bat') to be in the current processes's path. +A collection of various useful JVM artifacts downloaded and cached by +the Aether Maven connector. Requires the maven-3.0.4 executable "mvn" +(or "mvn.bat" under MSFT Windows) to be in the current processes's path. jna - Cache, from the network if necessary, the jna-3.0.9.jar in + Cache, from the network if necessary, the jna-3.4.0.jar in the current JVM process, allowing the bootstrapping of dynamically linking to shared executables on the host platform. @@ -56,7 +56,7 @@ Deprecated, use Quicklisp from the REPL via - CL-USER> (load "http://beta.quicklisp.org/quicklisp.lisp") + CL-USER> (load "https://beta.quicklisp.org/quicklisp.lisp") instead. @@ -64,6 +64,7 @@ Mark Created: 2011-09-11 -Revised: 2012-08-04 +Revised: 2012-10-12 + From mevenson at common-lisp.net Fri Oct 12 10:47:27 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 03:47:27 -0700 Subject: [armedbear-cvs] r14182 - trunk/abcl Message-ID: Author: mevenson Date: Fri Oct 12 03:47:26 2012 New Revision: 14182 Log: abcl.clean.application.fasls: ant target to remove application SLIME and Quicklisp fasls. N.b. this causes other local users of SLIME and Quicklisp to recompile their fasls on the next invocation of a given Lisp implementation. Some compilers may trade compile for run time. The Bear can be currently be quite subjectively slow as it's "just Java". Modified: trunk/abcl/build.xml Modified: trunk/abcl/build.xml ============================================================================== --- trunk/abcl/build.xml Thu Oct 11 15:33:03 2012 (r14181) +++ trunk/abcl/build.xml Fri Oct 12 03:47:26 2012 (r14182) @@ -604,11 +604,27 @@ + + + + WARNING: This target is removing local application inter-Lisp fasls, forcing recompilation. + + Deleting local SLIME fasls under ${slime.fasls} + + Deleting local Quicklisp fasls under ${quicklisp.common-lisp.fasls} + + + + + + From mevenson at common-lisp.net Fri Oct 12 10:47:29 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 03:47:29 -0700 Subject: [armedbear-cvs] r14183 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Fri Oct 12 03:47:28 2012 New Revision: 14183 Log: Diagnostic: return something meaningful at Stas' breakage. Status: currently cannot duplicate. Building Ubuntu testing image. Modified: trunk/abcl/src/org/armedbear/lisp/Load.java Modified: trunk/abcl/src/org/armedbear/lisp/Load.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Load.java Fri Oct 12 03:47:26 2012 (r14182) +++ trunk/abcl/src/org/armedbear/lisp/Load.java Fri Oct 12 03:47:28 2012 (r14183) @@ -38,6 +38,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URL; +import java.text.MessageFormat; /* This file holds ABCL's (FASL and non-FASL) loading behaviours. * @@ -165,7 +166,10 @@ n = "jar:file:" + Pathname.uriEncode(n) + "!/" + name + "." + COMPILE_FILE_INIT_FASL_TYPE; } - mergedPathname = new Pathname(n); + if (!((mergedPathname = new Pathname(n)) instanceof Pathname)) { + return error(new FileError((MessageFormat.format("Failed to address JAR-PATHNAME truename {0} for name {1}", truename.princToString(), name)), truename)); + } + LispObject initTruename = Pathname.truename(mergedPathname); if (initTruename == null || initTruename.equals(NIL)) { // Maybe the enclosing JAR has been renamed? From mevenson at common-lisp.net Fri Oct 12 11:04:27 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 04:04:27 -0700 Subject: [armedbear-cvs] r14184 - trunk/abcl Message-ID: Author: mevenson Date: Fri Oct 12 04:04:26 2012 New Revision: 14184 Log: Fix SLIME fasl location Modified: trunk/abcl/build.xml Modified: trunk/abcl/build.xml ============================================================================== --- trunk/abcl/build.xml Fri Oct 12 03:47:28 2012 (r14183) +++ trunk/abcl/build.xml Fri Oct 12 04:04:26 2012 (r14184) @@ -612,7 +612,7 @@ WARNING: This target is removing local application inter-Lisp fasls, forcing recompilation. Deleting local SLIME fasls under ${slime.fasls} - + Deleting local Quicklisp fasls under ${quicklisp.common-lisp.fasls} From mevenson at common-lisp.net Fri Oct 12 11:33:58 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 04:33:58 -0700 Subject: [armedbear-cvs] r14185 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Fri Oct 12 04:33:58 2012 New Revision: 14185 Log: abcl-asdf-test: require ABCL-ASDF for ASDF:DEFSYSTEM. Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Fri Oct 12 04:04:26 2012 (r14184) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Fri Oct 12 04:33:58 2012 (r14185) @@ -19,7 +19,7 @@ (asdf:defsystem :abcl-asdf-test :author "Mark Evenson" - :depends-on (abcl-asdf) + :defsystem-depends-on (abcl-asdf) :components ((:module tests :serial t :components ((:file "example") From mevenson at common-lisp.net Fri Oct 12 11:35:25 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 04:35:25 -0700 Subject: [armedbear-cvs] r14186 - trunk/abcl/src/org/armedbear/lisp/protocol Message-ID: Author: mevenson Date: Fri Oct 12 04:35:25 2012 New Revision: 14186 Log: Java type marker for CL:PATHNAME. Added: trunk/abcl/src/org/armedbear/lisp/protocol/Pathname.java Added: trunk/abcl/src/org/armedbear/lisp/protocol/Pathname.java ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/abcl/src/org/armedbear/lisp/protocol/Pathname.java Fri Oct 12 04:35:25 2012 (r14186) @@ -0,0 +1,9 @@ +package org.armedbear.lisp.protocol; + +// TODO: transcribe CL:PATHNAME, hook org.armedbear.lisp.Pathname up to use a proxied version of the ANSI contract. +/** Mark object as implementing the Hashtable protocol. */ +public interface Pathname + extends org.armedbear.lisp.protocol.LispObject +{ + public Pathname coerce(); +} From mevenson at common-lisp.net Fri Oct 12 12:04:34 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 05:04:34 -0700 Subject: [armedbear-cvs] r14187 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Fri Oct 12 05:04:34 2012 New Revision: 14187 Log: Fallback to reliable JNA loading for CFFI. Implemented by moving JNA loading "down" an abstraction to ABCL-ASDF primitive until we establish better handlers in the ABCL-ASDF:MVN loading semantics. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 04:35:25 2012 (r14186) +++ trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:04:34 2012 (r14187) @@ -3,5 +3,11 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. (asdf:defsystem :jna :version "3.4.0" - :defsystem-depends-on (abcl-asdf) - :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) + :defsystem-depends-on (abcl-asdf)) +;; FIXME: install a better handler in abcl-asdf :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) + +(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) + ;; Theoretically this should be the same thing as the MVN component. + (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0"))) + + From mevenson at common-lisp.net Fri Oct 12 12:35:37 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 05:35:37 -0700 Subject: [armedbear-cvs] r14188 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Fri Oct 12 05:35:37 2012 New Revision: 14188 Log: jna.jar: Try harder by introspecting the classpath. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:04:34 2012 (r14187) +++ trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:35:37 2012 (r14188) @@ -8,6 +8,23 @@ (defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) ;; Theoretically this should be the same thing as the MVN component. - (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0"))) + (handler-case + (unless + (flet ((match-jna-jar (p) + "Match `jna.jar`,`jna-3.0.9.jar`, or `jna-3.4.0.jar`." + (and (pathnamep p) + (equal (pathname-type p) "jar") + (java:jstatic "matches" + "java.util.regex.Pattern" + "jna(-[0-9]\\.[0-9]\\.[0-9](-.+)?)?" + (pathname-name p)) + p))) + (dolist (loader (java:dump-classpath)) + (let ((jna-jar (some #'match-jna-jar loader))) + (when jna-jar + (return abcl-jar))))) + (java:add-to-classpath (abcl-asdf:resolve + "net.java.dev.jna:jna:3.4.0"))) + (t (e) (error "Failed to resolve 'jna.jar' because~&~A." e)))) From mevenson at common-lisp.net Fri Oct 12 12:52:58 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 05:52:58 -0700 Subject: [armedbear-cvs] r14189 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Fri Oct 12 05:52:58 2012 New Revision: 14189 Log: jna: introspect classpath for com.sun.jna.Native as per Anton's suggestion. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:35:37 2012 (r14188) +++ trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:52:58 2012 (r14189) @@ -25,6 +25,9 @@ (return abcl-jar))))) (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0"))) - (t (e) (error "Failed to resolve 'jna.jar' because~&~A." e)))) + (t (e) + (progn + (unless (jss:find-java-class "com.sun.jna.Native") + (error "Failed to resolve 'jna.jar' because~&~A." e)))))) From mevenson at common-lisp.net Fri Oct 12 13:18:12 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 12 Oct 2012 06:18:12 -0700 Subject: [armedbear-cvs] r14190 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Fri Oct 12 06:18:12 2012 New Revision: 14190 Log: The Bear gets medieval with JNA. If jna.jar is in your path, we should count as having required. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 05:52:58 2012 (r14189) +++ trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 06:18:12 2012 (r14190) @@ -3,31 +3,36 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. (asdf:defsystem :jna :version "3.4.0" - :defsystem-depends-on (abcl-asdf)) + :defsystem-depends-on (jss abcl-asdf)) ;; FIXME: install a better handler in abcl-asdf :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) (defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) + (when (jss:find-java-class "com.sun.jna.Native") + (provide :jna))) + +(defmethod asdf:perform :before ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) ;; Theoretically this should be the same thing as the MVN component. (handler-case - (unless - (flet ((match-jna-jar (p) - "Match `jna.jar`,`jna-3.0.9.jar`, or `jna-3.4.0.jar`." - (and (pathnamep p) - (equal (pathname-type p) "jar") - (java:jstatic "matches" - "java.util.regex.Pattern" - "jna(-[0-9]\\.[0-9]\\.[0-9](-.+)?)?" - (pathname-name p)) - p))) - (dolist (loader (java:dump-classpath)) - (let ((jna-jar (some #'match-jna-jar loader))) - (when jna-jar - (return abcl-jar))))) - (java:add-to-classpath (abcl-asdf:resolve - "net.java.dev.jna:jna:3.4.0"))) + (unless (jss:find-java-class "com.sun.jna.Native") + (unless + (flet ((match-jna-jar (p) + "Match `jna.jar`,`jna-3.0.9.jar`, or `jna-3.4.0.jar`." + (and (pathnamep p) + (equal (pathname-type p) "jar") + (java:jstatic "matches" + "java.util.regex.Pattern" + "jna(-[0-9]\\.[0-9]\\.[0-9](-.+)?)?" + (pathname-name p)) + p))) + (dolist (loader (java:dump-classpath)) + (let ((jna-jar (some #'match-jna-jar loader))) + (when jna-jar + (return abcl-jar))))) + (unless + (java:add-to-classpath (abcl-asdf:resolve + "net.java.dev.jna:jna:3.4.0")) + (java:add-to-classpath "http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")))) (t (e) - (progn - (unless (jss:find-java-class "com.sun.jna.Native") - (error "Failed to resolve 'jna.jar' because~&~A." e)))))) + (error "Failed to resolve 'jna.jar' because~&~A." e)))) From mevenson at common-lisp.net Sat Oct 13 09:12:37 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 13 Oct 2012 02:12:37 -0700 Subject: [armedbear-cvs] r14192 - in trunk/abcl/contrib: abcl-asdf mvn Message-ID: Author: mevenson Date: Sat Oct 13 02:12:36 2012 New Revision: 14192 Log: abcl-asdf: special case handling for finding com.sun.jna.Native et. al. Fallback to finding 'jna.jar' via Maven is to download it ourselves. Undefined what having a URI in your classpath means to your local JVM implementation. Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 02:12:34 2012 (r14191) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 02:12:36 2012 (r14192) @@ -100,10 +100,20 @@ (defmethod resolve ((mvn-component asdf::mvn)) "Resolve all runtime dependencies of MVN-COMPONENT. -Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string." - - (with-slots (asdf::group-id asdf::artifact-id asdf::version) mvn-component - (resolve-dependencies asdf::group-id asdf::artifact-id asdf::version))) +Returns a string in JVM CLASSPATH format as entries delimited by +classpath separator string. Can possibly be a single entry denoting a +remote binary artifact." + (let ((name (asdf::component-name mvn-component))) + (if (find-mvn) + (with-slots (asdf::group-id asdf::artifact-id asdf::version) mvn-component + (resolve-dependencies asdf::group-id asdf::artifact-id asdf::version)) + (cond + ((string= name + "net.java.dev.jna/jna/3.4.0" + (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")) + (values (namestring uri) uri)))) + (t + (error "Failed to resolve MVN component name ~A." name)))))) (defun as-classpath (classpath) "Break apart the JVM CLASSPATH string into a list of its consituents." Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Sat Oct 13 02:12:34 2012 (r14191) +++ trunk/abcl/contrib/mvn/jna.asd Sat Oct 13 02:12:36 2012 (r14192) @@ -3,20 +3,30 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. (asdf:defsystem :jna :version "3.4.0" - :defsystem-depends-on (jss abcl-asdf)) -;; FIXME: install a better handler in abcl-asdf :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) + :defsystem-depends-on (jss abcl-asdf) +;; FIXME: + :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) -(defmethod asdf:perform :after ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) +(in-package :asdf) +(defmethod perform :after ((o load-op) (c (eql (find-system :jna)))) (when (jss:find-java-class "com.sun.jna.Native") (provide :jna))) -(defmethod asdf:perform :before ((o asdf:load-op) (c (eql (asdf:find-system :jna)))) +;;; After ASDF performs COMPILE-OP, one expects that the JNA Java +;;; classes can be instantiated. If not, execute various loading strategies. +(defmethod perform ((o compile-op) (c (eql (find-system :jna)))) ;; Theoretically this should be the same thing as the MVN component. + (format *debug-io* "~&Attemping to locate jvm binary artifacts for JNA...~&") (handler-case - (unless (jss:find-java-class "com.sun.jna.Native") - (unless (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0")) - (java:add-to-classpath "http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"))) + (jss:find-java-class "com.sun.jna.Native") + (java:java-exception (e) + (unless + (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0")) + (unless + (java:add-to-classpath #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar") + (error "Failed to load jna-3.4.0.jar from the network via URI.")) + (error "Failed to load jna.jar via ABCL-ASDF."))) (t (e) - (error "Failed to resolve 'jna.jar' because~&~A." e)))) + (error "Failed to resolve 'jna.jar' because~&~A.~&" e)))) From mevenson at common-lisp.net Sat Oct 13 09:12:37 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 13 Oct 2012 02:12:37 -0700 Subject: [armedbear-cvs] r14191 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Sat Oct 13 02:12:34 2012 New Revision: 14191 Log: Cut the crap. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Fri Oct 12 06:18:12 2012 (r14190) +++ trunk/abcl/contrib/mvn/jna.asd Sat Oct 13 02:12:34 2012 (r14191) @@ -14,24 +14,8 @@ ;; Theoretically this should be the same thing as the MVN component. (handler-case (unless (jss:find-java-class "com.sun.jna.Native") - (unless - (flet ((match-jna-jar (p) - "Match `jna.jar`,`jna-3.0.9.jar`, or `jna-3.4.0.jar`." - (and (pathnamep p) - (equal (pathname-type p) "jar") - (java:jstatic "matches" - "java.util.regex.Pattern" - "jna(-[0-9]\\.[0-9]\\.[0-9](-.+)?)?" - (pathname-name p)) - p))) - (dolist (loader (java:dump-classpath)) - (let ((jna-jar (some #'match-jna-jar loader))) - (when jna-jar - (return abcl-jar))))) - (unless - (java:add-to-classpath (abcl-asdf:resolve - "net.java.dev.jna:jna:3.4.0")) - (java:add-to-classpath "http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")))) + (unless (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0")) + (java:add-to-classpath "http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"))) (t (e) (error "Failed to resolve 'jna.jar' because~&~A." e)))) From mevenson at common-lisp.net Sat Oct 13 10:09:09 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 13 Oct 2012 03:09:09 -0700 Subject: [armedbear-cvs] r14193 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Sat Oct 13 03:09:08 2012 New Revision: 14193 Log: abcl-asdf: make 'com.sun.jna:jna' a synonym for a known, good jna mvn URI. Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 02:12:36 2012 (r14192) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 03:09:08 2012 (r14193) @@ -103,17 +103,16 @@ Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string. Can possibly be a single entry denoting a remote binary artifact." - (let ((name (asdf::component-name mvn-component))) + (with-slots (name group-id artifact-id version) mvn-component (if (find-mvn) - (with-slots (asdf::group-id asdf::artifact-id asdf::version) mvn-component - (resolve-dependencies asdf::group-id asdf::artifact-id asdf::version)) - (cond + (resolve-dependencies group-id artifact-id version)) + (cond ((string= name "net.java.dev.jna/jna/3.4.0" (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")) (values (namestring uri) uri)))) (t - (error "Failed to resolve MVN component name ~A." name)))))) + (error "Failed to resolve MVN component name ~A." name))))) (defun as-classpath (classpath) "Break apart the JVM CLASSPATH string into a list of its consituents." Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Sat Oct 13 02:12:36 2012 (r14192) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Sat Oct 13 03:09:08 2012 (r14193) @@ -413,6 +413,8 @@ (cond ((= (length result) 3) (resolve-dependencies (first result) (second result) (third result))) + ((string= string "com.sun.jna:jna") + (resolve-dependencies "net.java.dev.jna" "jna" "3.4.0")) (t (apply #'resolve-dependencies result))))) From mevenson at common-lisp.net Sat Oct 13 13:20:50 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 13 Oct 2012 06:20:50 -0700 Subject: [armedbear-cvs] r14194 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sat Oct 13 06:20:48 2012 New Revision: 14194 Log: Possible fix for #249. Modified: trunk/abcl/src/org/armedbear/lisp/Load.java Modified: trunk/abcl/src/org/armedbear/lisp/Load.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Load.java Sat Oct 13 03:09:08 2012 (r14193) +++ trunk/abcl/src/org/armedbear/lisp/Load.java Sat Oct 13 06:20:48 2012 (r14194) @@ -170,7 +170,7 @@ return error(new FileError((MessageFormat.format("Failed to address JAR-PATHNAME truename {0} for name {1}", truename.princToString(), name)), truename)); } - LispObject initTruename = Pathname.truename(mergedPathname); + LispObject initTruename = coercePathnameOrNull(Pathname.truename(mergedPathname)); if (initTruename == null || initTruename.equals(NIL)) { // Maybe the enclosing JAR has been renamed? Pathname p = new Pathname(mergedPathname); From mevenson at common-lisp.net Sat Oct 13 15:19:21 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 13 Oct 2012 08:19:21 -0700 Subject: [armedbear-cvs] r14195 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Sat Oct 13 08:19:20 2012 New Revision: 14195 Log: abcl-asdf-0.9.0: patching to greater global stability of distributed references. Bump version to indicate that we have greater faith of the stability of the interface. N.b. seems to break [Jeannie](http://bitbucket.org/easye/jeannie/). Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Sat Oct 13 06:20:48 2012 (r14194) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.asd Sat Oct 13 08:19:20 2012 (r14195) @@ -2,7 +2,7 @@ (asdf:defsystem :abcl-asdf :author "Mark Evenson" - :version "0.8.0" + :version "0.9.0" :depends-on (jss) :components ((:module packages :pathname "" Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 06:20:48 2012 (r14194) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Sat Oct 13 08:19:20 2012 (r14195) @@ -103,17 +103,30 @@ Returns a string in JVM CLASSPATH format as entries delimited by classpath separator string. Can possibly be a single entry denoting a remote binary artifact." - (with-slots (name group-id artifact-id version) mvn-component - (if (find-mvn) - (resolve-dependencies group-id artifact-id version)) - (cond - ((string= name - "net.java.dev.jna/jna/3.4.0" - (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")) - (values (namestring uri) uri)))) - (t - (error "Failed to resolve MVN component name ~A." name))))) - + (macrolet ((aif (something consequence alternative)) + `(let ((it ,(something))) + (if it + consequence + alternative))) + (let ((name (slot-value mvn-component 'asdf::name)) + (group-id (slot-value mvn-component 'asdf::group-id)) + (artifact-id (slot-value mvn-component 'asdf::artifact-id)) + (version (let ((it (slot-value mvn-component 'asdf::version))) + (cond + ((not it) + it) + (t + "LATEST"))))) + (if (find-mvn) + (resolve-dependencies group-id artifact-id version) + (cond + ((string= name + "net.java.dev.jna/jna/3.4.0" + (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")) + (values (namestring uri) uri)))) + (t + (error "Failed to resolve MVN component name ~A." name))))))) + (defun as-classpath (classpath) "Break apart the JVM CLASSPATH string into a list of its consituents." (split-string classpath From mevenson at common-lisp.net Sun Oct 14 10:54:06 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 14 Oct 2012 03:54:06 -0700 Subject: [armedbear-cvs] r14196 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sun Oct 14 03:54:05 2012 New Revision: 14196 Log: SYS:SHA256 efficiently computes cryptographic hashs on pathnames. Added: trunk/abcl/src/org/armedbear/lisp/digest.lisp Modified: trunk/abcl/src/org/armedbear/lisp/compile-system.lisp Modified: trunk/abcl/src/org/armedbear/lisp/compile-system.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/compile-system.lisp Sat Oct 13 08:19:20 2012 (r14195) +++ trunk/abcl/src/org/armedbear/lisp/compile-system.lisp Sun Oct 14 03:54:05 2012 (r14196) @@ -325,6 +325,7 @@ "copy-seq.lisp" "copy-symbol.lisp" "count.lisp" + "digest.lisp" "debug.lisp" "define-modify-macro.lisp" "define-symbol-macro.lisp" Added: trunk/abcl/src/org/armedbear/lisp/digest.lisp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 03:54:05 2012 (r14196) @@ -0,0 +1,103 @@ +;;; require.lisp +;;; +;;; Copyright (C) 2012 Mark Evenson +;;; $Id$ + +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License +;;; as published by the Free Software Foundation; either version 2 +;;; of the License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program; if not, write to the Free Software +;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +;;; +;;; As a special exception, the copyright holders of this library give you +;;; permission to link this library with independent modules to produce an +;;; executable, regardless of the license terms of these independent +;;; modules, and to copy and distribute the resulting executable under +;;; terms of your choice, provided that you also meet, for each linked +;;; independent module, the terms and conditions of the license of that +;;; module. An independent module is a module which is not derived from +;;; or based on this library. If you modify this library, you may extend +;;; this exception to your version of the library, but you are not +;;; obligated to do so. If you do not wish to do so, delete this +;;; exception statement from your version. + +(require :java) +(in-package :system) + +(defun ascii-digest (digest) + (format nil "~{~X~}" + (mapcar (lambda (b) (if (< b 0) (+ 256 b) b)) + (java::list-from-jarray digest)))) +(export 'sha256 :system) +(defun sha256 (&rest paths-or-strings) + (format *debug-io* "~&Args: ~S~&" paths-or-strings) + (cond + ((= 1 (length paths-or-strings)) + (typecase paths-or-strings + (pathname + (ascii-digest (digest (first paths) 'nio))) + (string + + ((consp paths) + (concatenate 'string + (append + (mapcar #'ascii-digest + (mapcar (lambda (p) + (funcall #'digest p 'nio)) + paths))))) + ((null paths) + nil))) + + +(defgeneric digest (url algorithim &optional (digest 'sha-256)) + (:documentation "Digest byte based resource at URL with ALGORITHIM.")) +(defun digest-path (path) (ascii-digest (digest path 'nio 'sha-256))) + +(defvar *digest-types* + '((sha-1 . "SHA-1") + (sha-256 . "SHA-256") + (sha-512 . "SHA-512")) + "Normalization of cryptographic digest naming.") + +;;; Implementation +(defconstant +byte-buffer-rewind+ + (java:jmethod "java.nio.ByteBuffer" "rewind")) +(defconstant +byte-buffer-get+ + (java:jmethod "java.nio.ByteBuffer" "get" "[B" "int" "int")) +(defconstant +digest-update+ + (java:jmethod "java.security.MessageDigest" "update" "[B" "int" "int")) + +(defmethod digest ((url t) (algorithim (eql 'nio)) &optional (digest 'sha-256)) + "Calculate digest with default of :SHA-256 pathname specified by URL. +Returns an array of JVM primitive signed 8-bit bytes. + +*DIGEST-TYPES* controls the allowable digest types." + + (let* ((digest-type (cdr (assoc digest *digest-types*))) + (digest (java:jstatic "getInstance" "java.security.MessageDigest" digest-type)) + (namestring (if (pathnamep url) (namestring url) url)) + (file-input-stream (java:jnew "java.io.FileInputStream" namestring)) + (channel (java:jcall "getChannel" file-input-stream)) + (length 8192) + (buffer (java:jstatic "allocateDirect" "java.nio.ByteBuffer" length)) + (array (java:jnew-array "byte" length))) + (do ((read (java:jcall "read" channel buffer) + (java:jcall "read" channel buffer))) + ((not (> read 0))) + (java:jcall +byte-buffer-rewind+ buffer) + (java:jcall +byte-buffer-get+ buffer array 0 read) + (java:jcall +byte-buffer-rewind+ buffer) + (java:jcall +digest-update+ digest array 0 read)) + (java:jcall "digest" digest))) + +;;(defmethod digest ((s string) (algorithim (eql 'nio)) &optional (digest 'sha-256)) +;; (warn "Unimplemented.")) +;; (let ((input-stream ( From mevenson at common-lisp.net Sun Oct 14 10:54:08 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 14 Oct 2012 03:54:08 -0700 Subject: [armedbear-cvs] r14197 - trunk/abcl/contrib/abcl-asdf/tests Message-ID: Author: mevenson Date: Sun Oct 14 03:54:07 2012 New Revision: 14197 Log: Fix ABCL-ASDF-TEST. Added: trunk/abcl/contrib/abcl-asdf/tests/test.lisp Added: trunk/abcl/contrib/abcl-asdf/tests/test.lisp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/abcl/contrib/abcl-asdf/tests/test.lisp Sun Oct 14 03:54:07 2012 (r14197) @@ -0,0 +1,6 @@ +(in-package :abcl-asdf-test) + +(defun run (&rest args) + (abcl-rt:do-test 'test-log4j.2)) + + From mevenson at common-lisp.net Sun Oct 14 10:55:12 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 14 Oct 2012 03:55:12 -0700 Subject: [armedbear-cvs] r14198 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sun Oct 14 03:55:11 2012 New Revision: 14198 Log: Restore build. Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 03:54:07 2012 (r14197) +++ trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 03:55:11 2012 (r14198) @@ -54,7 +54,7 @@ (funcall #'digest p 'nio)) paths))))) ((null paths) - nil))) + nil))))) (defgeneric digest (url algorithim &optional (digest 'sha-256)) From rschlatte at common-lisp.net Sun Oct 14 18:43:25 2012 From: rschlatte at common-lisp.net (rschlatte at common-lisp.net) Date: Sun, 14 Oct 2012 11:43:25 -0700 Subject: [armedbear-cvs] r14199 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: rschlatte Date: Sun Oct 14 11:43:24 2012 New Revision: 14199 Log: Restore build harder. - sha256 was corrupted (truncated line in typecase form), kludged into compiling without trying to guess what the form was supposed to be Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 03:55:11 2012 (r14198) +++ trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 11:43:24 2012 (r14199) @@ -38,23 +38,22 @@ (java::list-from-jarray digest)))) (export 'sha256 :system) (defun sha256 (&rest paths-or-strings) - (format *debug-io* "~&Args: ~S~&" paths-or-strings) (cond ((= 1 (length paths-or-strings)) (typecase paths-or-strings (pathname - (ascii-digest (digest (first paths) 'nio))) - (string + (ascii-digest (digest (first paths-or-strings) 'nio))) + (string (error "Somebody implement me please")))) ; FIXME - ((consp paths) + ((consp paths-or-strings) (concatenate 'string (append (mapcar #'ascii-digest (mapcar (lambda (p) (funcall #'digest p 'nio)) - paths))))) - ((null paths) - nil))))) + paths-or-strings))))) + ((null paths-or-strings) + nil))) (defgeneric digest (url algorithim &optional (digest 'sha-256)) From mevenson at common-lisp.net Mon Oct 15 08:45:06 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 15 Oct 2012 01:45:06 -0700 Subject: [armedbear-cvs] r14200 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Mon Oct 15 01:45:04 2012 New Revision: 14200 Log: digest: simplify API. SHA256 only working for PATHNAME objects at the moment. Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/digest.lisp Sun Oct 14 11:43:24 2012 (r14199) +++ trunk/abcl/src/org/armedbear/lisp/digest.lisp Mon Oct 15 01:45:04 2012 (r14200) @@ -1,4 +1,4 @@ -;;; require.lisp +;;; digest.lisp ;;; ;;; Copyright (C) 2012 Mark Evenson ;;; $Id$ @@ -32,33 +32,51 @@ (require :java) (in-package :system) -(defun ascii-digest (digest) +(defun asciify-digest (digest) (format nil "~{~X~}" (mapcar (lambda (b) (if (< b 0) (+ 256 b) b)) (java::list-from-jarray digest)))) -(export 'sha256 :system) + + +;;;; Really needs to concatenate all input into a single source of +;;;; bytes, running digest over that concatentation (defun sha256 (&rest paths-or-strings) - (cond - ((= 1 (length paths-or-strings)) - (typecase paths-or-strings - (pathname - (ascii-digest (digest (first paths-or-strings) 'nio))) - (string (error "Somebody implement me please")))) ; FIXME - - ((consp paths-or-strings) - (concatenate 'string - (append - (mapcar #'ascii-digest - (mapcar (lambda (p) - (funcall #'digest p 'nio)) - paths-or-strings))))) - ((null paths-or-strings) - nil))) - + "Returned ASCIIfied representation of SHA256 digest of byte-based resource at PATHS-OR-STRINGs." + (let ((first (first paths-or-strings)) + (rest (rest paths-or-strings))) + (concatenate 'string + (when first + (asciify-digest + (typecase first + (pathname (digest first)) + (string (digest first)) + (null) + (list + (concatenate 'string + (sha256 (first first)) + (sha256 (rest first))))))) + (when rest + (sha256 rest))))) + +#+nil ;; Bugs out the compiler +(defun sha256 (paths-or-strings) + (labels ((walk (p-or-s) + ((atom p-or-s) + (typecase p-or-s + (pathname + (digest-path p-or-s)) + (string + (error "Somebody implement me please")))) + ((cons p-or-s) + (walk (first p-or-s) + (rest p-or-s))))) + (concatenate 'string + (walk paths-or-strings)))) + -(defgeneric digest (url algorithim &optional (digest 'sha-256)) - (:documentation "Digest byte based resource at URL with ALGORITHIM.")) -(defun digest-path (path) (ascii-digest (digest path 'nio 'sha-256))) +(defgeneric digest (resource &key (digest 'sha-256)) + (:documentation "Digest byte based resource at RESOURCE.")) +(defun digest-path (path) (asciify-digest (digest path 'nio 'sha-256))) (defvar *digest-types* '((sha-1 . "SHA-1") @@ -74,11 +92,14 @@ (defconstant +digest-update+ (java:jmethod "java.security.MessageDigest" "update" "[B" "int" "int")) -(defmethod digest ((url t) (algorithim (eql 'nio)) &optional (digest 'sha-256)) +(defmethod digest ((url pathname) &key (digest 'sha-256)) "Calculate digest with default of :SHA-256 pathname specified by URL. Returns an array of JVM primitive signed 8-bit bytes. +Uses \"New I/O\" in JVM \"worse named API of all time\". + *DIGEST-TYPES* controls the allowable digest types." + (format *debug-io* "~&pathname: ~S" url) (let* ((digest-type (cdr (assoc digest *digest-types*))) (digest (java:jstatic "getInstance" "java.security.MessageDigest" digest-type)) @@ -97,6 +118,11 @@ (java:jcall +digest-update+ digest array 0 read)) (java:jcall "digest" digest))) -;;(defmethod digest ((s string) (algorithim (eql 'nio)) &optional (digest 'sha-256)) -;; (warn "Unimplemented.")) -;; (let ((input-stream ( +(defmethod digest ((source string) &key (digest 'sha-256)) + (declare (ignorable source digest)) + (warn "Umimplemented.") + "deadbeef") + + + +(export 'sha256 :system) From mevenson at common-lisp.net Mon Oct 15 16:08:08 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 15 Oct 2012 09:08:08 -0700 Subject: [armedbear-cvs] r14201 - trunk/abcl/doc/manual Message-ID: Author: mevenson Date: Mon Oct 15 09:08:06 2012 New Revision: 14201 Log: manual: update for abcl-1.1.0. Modified: trunk/abcl/doc/manual/abcl.tex Modified: trunk/abcl/doc/manual/abcl.tex ============================================================================== --- trunk/abcl/doc/manual/abcl.tex Mon Oct 15 01:45:04 2012 (r14200) +++ trunk/abcl/doc/manual/abcl.tex Mon Oct 15 09:08:06 2012 (r14201) @@ -8,9 +8,9 @@ \begin{document} \title{Armed Bear Common Lisp User Manual} -\date{Version 1.1.0-dev\\ +\date{Version 1.1.0\\ \smallskip -May 14, 2012} +October 15, 2012} \author{Mark Evenson \and Erik H\"{u}lsmann \and Rudolf Schlatte \and Alessio Stalla \and Ville Voutilainen} @@ -18,6 +18,9 @@ \tableofcontents +%%\chapter{Preface} +%%Preface to the second edition, abcl-1.1.0. + \chapter{Introduction} Armed Bear Common Lisp (ABCL) is an implementation of Common Lisp that @@ -856,8 +859,6 @@ \cite{evenson2011} for the draft of the publication of the technical details}. - - \end{itemize} The implementation of \code{EXT:URL-PATHNAME} allows the \textsc{ABCL} @@ -871,6 +872,15 @@ will load and execute the Quicklisp setup code. +The implementation currently breaks ANSI conformance by allowing the +types able to be READ for the DEVICE to return a possible CONS of +PATHNAME objects. %% citation from CLHS needed. + +In order to ``smooth over'' the bit about types being READ from +PATHNAME components, we extend the semantics for the usual PATHNAME +merge semantics when *DEFAULT-PATHNAME-DEFAULTS* contains a +\code{JAR-PATHNAME}. + %See \ref{_:quicklisp} on page \pageref{_:quicklisp}. \subsubsection{Implementation} @@ -1002,7 +1012,7 @@ allow a sequences of the form \# \textbackslash Uxxxx to be processed by the reader as character whose code is specified by the hexadecimal digits ``xxxx''. The hexadecimal sequence may be one to four digits -long. +long. % Why doesn't ALEXANDRIA work? Note that this sequence is never output by the implementation. Instead, the corresponding Unicode character is output for characters whose @@ -1036,7 +1046,7 @@ \item \code{mvn} These systems name common JVM artifacts from the distributed pom.xml graph of Maven Aether: \begin{enumerate} - \item \code{jna} Dynamically load 'jna.jar' version 3.0.9 from the network. + \item \code{jna} Dynamically load 'jna.jar' version 3.4.0 from the network. \end{enumerate} \item \code{quicklisp-abcl} (Not working) boot a local Quicklisp installation via the ASDF:IRI type introduced bia ABCL-ASDF. @@ -1059,7 +1069,7 @@ \section{ASDF} -asdf-2.019 (see \cite{asdf}) is packaged as core component of ABCL, +asdf-2.25 (see \cite{asdf}) is packaged as core component of ABCL, but not initialized by default, as it relies on the CLOS subsystem which can take a bit of time to start \footnote{While this time is ``merely'' on the order of seconds for contemporary 2011 machines, @@ -1240,6 +1250,9 @@ released abcl-1.0.0. We released abcl-1.0.1 as a maintainence release on January 10, 2012. +In October 2012, we revised the implementation with the release of +abcl-1.1.0 and accumulated changes to this manual. + \bibliography{abcl} \bibliographystyle{alpha} From mevenson at common-lisp.net Tue Oct 16 08:54:43 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Tue, 16 Oct 2012 01:54:43 -0700 Subject: [armedbear-cvs] r14202 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Tue Oct 16 01:54:42 2012 New Revision: 14202 Log: SYS:SHA256 now hashes strings passed its way. TODO: develop a "lazy serialization" so that all of the arguments of SHA256 will have the underlying java.nio.Channel objects ready t obe run through the digest function. Enough for an implementation of renaming dynamic callbacks. Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp Modified: trunk/abcl/src/org/armedbear/lisp/digest.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/digest.lisp Mon Oct 15 09:08:06 2012 (r14201) +++ trunk/abcl/src/org/armedbear/lisp/digest.lisp Tue Oct 16 01:54:42 2012 (r14202) @@ -32,7 +32,7 @@ (require :java) (in-package :system) -(defun asciify-digest (digest) +(defun asciify (digest) (format nil "~{~X~}" (mapcar (lambda (b) (if (< b 0) (+ 256 b) b)) (java::list-from-jarray digest)))) @@ -40,13 +40,13 @@ ;;;; Really needs to concatenate all input into a single source of ;;;; bytes, running digest over that concatentation -(defun sha256 (&rest paths-or-strings) +(defun sha256 (&rest paths-or-strings) ;;; XXX more than one arg is very broken. "Returned ASCIIfied representation of SHA256 digest of byte-based resource at PATHS-OR-STRINGs." (let ((first (first paths-or-strings)) (rest (rest paths-or-strings))) (concatenate 'string (when first - (asciify-digest + (asciify (typecase first (pathname (digest first)) (string (digest first)) @@ -93,23 +93,31 @@ (java:jmethod "java.security.MessageDigest" "update" "[B" "int" "int")) (defmethod digest ((url pathname) &key (digest 'sha-256)) + (digest-nio url :digest digest)) + +(defun digest-nio (source &key (digest 'sha-256)) "Calculate digest with default of :SHA-256 pathname specified by URL. Returns an array of JVM primitive signed 8-bit bytes. Uses \"New I/O\" in JVM \"worse named API of all time\". *DIGEST-TYPES* controls the allowable digest types." - (format *debug-io* "~&pathname: ~S" url) - - (let* ((digest-type (cdr (assoc digest *digest-types*))) - (digest (java:jstatic "getInstance" "java.security.MessageDigest" digest-type)) - (namestring (if (pathnamep url) (namestring url) url)) - (file-input-stream (java:jnew "java.io.FileInputStream" namestring)) - (channel (java:jcall "getChannel" file-input-stream)) - (length 8192) - (buffer (java:jstatic "allocateDirect" "java.nio.ByteBuffer" length)) - (array (java:jnew-array "byte" length))) - (do ((read (java:jcall "read" channel buffer) + (let* + ((channel (typecase source + (pathname + (java:jcall "getChannel" (java:jnew "java.io.FileInputStream" + (namestring source)))) + (string + (java:jstatic "newChannel" "java.nio.channels.Channels" + (java:jnew "java.io.ByteArrayInputStream" + (java:jcall "getBytes" source)))) + (error "Typecase failed of object of type ~S." source))) + (digest-type (cdr (assoc digest *digest-types*))) + (digest (java:jstatic "getInstance" "java.security.MessageDigest" digest-type)) + (length 8192) + (buffer (java:jstatic "allocateDirect" "java.nio.ByteBuffer" length)) + (array (java:jnew-array "byte" length))) + (do ((read (java:jcall "read" channel buffer) (java:jcall "read" channel buffer))) ((not (> read 0))) (java:jcall +byte-buffer-rewind+ buffer) @@ -119,10 +127,6 @@ (java:jcall "digest" digest))) (defmethod digest ((source string) &key (digest 'sha-256)) - (declare (ignorable source digest)) - (warn "Umimplemented.") - "deadbeef") - - + (digest-nio source :digest digest)) (export 'sha256 :system) From mevenson at common-lisp.net Wed Oct 17 06:51:59 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Tue, 16 Oct 2012 23:51:59 -0700 Subject: [armedbear-cvs] r14203 - trunk/abcl Message-ID: Author: mevenson Date: Tue Oct 16 23:51:58 2012 New Revision: 14203 Log: abcl.asdf: Add ASDF-CONTRIB system definition. FIXME: Currently need to force load via: (asdf:load-system :abcl-contrib :force t) Modified: trunk/abcl/abcl.asd Modified: trunk/abcl/abcl.asd ============================================================================== --- trunk/abcl/abcl.asd Tue Oct 16 01:54:42 2012 (r14202) +++ trunk/abcl/abcl.asd Tue Oct 16 23:51:58 2012 (r14203) @@ -146,5 +146,14 @@ ((:file "build-abcl") (:file "customizations" :depends-on ("build-abcl")))))) +(defsystem :abcl-contrib + ;; :version "1.1" + :components ((:static-file "README"))) + ;; #+nil ((:module source :pathname "src/org/armedbear/lisp/" :components + ;; ((:file "abcl-contrib") + ;; #+nil::needs-abcl-asdf (:iri "jar-file:dist/abcl-contrib.jar")))) +;; XXX Currently need to force load via (asdf:load-system :abcl-contrib :force t) +(defmethod perform ((o load-op) (c (eql (find-system :abcl-contrib)))) + (require :abcl-contrib)) From mevenson at common-lisp.net Wed Oct 17 06:52:00 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Tue, 16 Oct 2012 23:52:00 -0700 Subject: [armedbear-cvs] r14204 - trunk/abcl/contrib/quicklisp Message-ID: Author: mevenson Date: Tue Oct 16 23:51:59 2012 New Revision: 14204 Log: Complete runtime chain to installing Quicklisp. ABCL-ASDF now knows how to load a locally installed Quicklisp. To download and install Quicklisp from a clean REPL: CL-USER> (require :abcl)(require :abcl-contrib)(require :quicklisp-abcl) Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd ============================================================================== --- trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Tue Oct 16 23:51:58 2012 (r14203) +++ trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Tue Oct 16 23:51:59 2012 (r14204) @@ -1,12 +1,26 @@ ;;;; -*- Mode: LISP -*- (require :asdf) +(require :abcl-contrib) (require :abcl-asdf) +(in-package :asdf) ;; Quicklisp defines: ;;(defvar *setup-url* "http://beta.quicklisp.org/quickstart/setup.lisp") -(asdf:defsystem :quicklisp-abcl - :version "0.1.0" - :components ((:iri "http://beta.quicklisp.org/quicklisp.lisp")) - #+nil ;;; FIXME tickle the internal Quicklisp setup - :in-order-to ((asdf:compile-op (ql::install)))) - +(defsystem :quicklisp-abcl + :version "0.2.0" + :description "Convenience stubs to load locally installed Quicklisp." +;; #+nil::defsystem-depends-on (abcl-asdf) + :components nil) +;; #+nil::needs-abcl-asdf((:iri "http://beta.quicklisp.org/quicklisp.lisp")) +;; #+nil::in-order-to ((asdf:compile-op (ql::install))) ;;; FIXME tickle the internal Quicklisp setup + +(defmethod perform ((o load-op) (c (eql (find-system 'quicklisp-abcl)))) + ;;; Load local Quicklisp if it has been an installed + (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" + (user-homedir-pathname)))) + (handler-case + (when (probe-file quicklisp-init) + (load quicklisp-init)) + (t (e) (load "https://beta.quicklisp.org/quickstart/setup.lisp"))))) + + From mevenson at common-lisp.net Fri Oct 19 06:43:15 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Thu, 18 Oct 2012 23:43:15 -0700 Subject: [armedbear-cvs] r14205 - trunk/abcl/contrib/abcl-asdf Message-ID: Author: mevenson Date: Thu Oct 18 23:43:14 2012 New Revision: 14205 Log: abcl-asdf: Patch to fix obvious mistakes (stas). Fix logic for working around a missing Maven. ABCL-ASDF:RESOLVE had a broken conditional. Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Modified: trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Tue Oct 16 23:51:59 2012 (r14204) +++ trunk/abcl/contrib/abcl-asdf/abcl-asdf.lisp Thu Oct 18 23:43:14 2012 (r14205) @@ -120,10 +120,9 @@ (if (find-mvn) (resolve-dependencies group-id artifact-id version) (cond - ((string= name - "net.java.dev.jna/jna/3.4.0" - (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar")) - (values (namestring uri) uri)))) + ((string= name "net.java.dev.jna/jna/3.4.0") + (let ((uri #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar"))) + (values (namestring uri) uri)) (t (error "Failed to resolve MVN component name ~A." name))))))) Modified: trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp ============================================================================== --- trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Tue Oct 16 23:51:59 2012 (r14204) +++ trunk/abcl/contrib/abcl-asdf/maven-embedder.lisp Thu Oct 18 23:43:14 2012 (r14205) @@ -146,14 +146,14 @@ (defparameter *init* nil) (defun init (&optional &key (force nil)) - "Run the initialization strategy to bootstrap a Maven dependency node." - (unless (or force *mvn-libs-directory*) - (setf *mvn-libs-directory* (find-mvn-libs))) - (unless (probe-file *mvn-libs-directory*) - (error "You must download maven-3.0.4 or later from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately.")) - (unless (ensure-mvn-version) - (error "We need maven-3.0.4 or later.")) - (add-directory-jars-to-class-path *mvn-libs-directory* nil) + "Run the initialization strategy to bootstrap a Maven dependency node." + (unless (or force *mvn-libs-directory*) + (setf *mvn-libs-directory* (find-mvn-libs))) + (unless (and *mvn-libs-directory* + (probe-file *mvn-libs-directory*)) + (error "You must download maven-3.0.4 or later from http://maven.apache.org/download.html, then set ABCL-ASDF:*MVN-DIRECTORY* appropiately.")) + (unless (ensure-mvn-version) + (error "We need maven-3.0.4 or later.")) (add-directory-jars-to-class-path *mvn-libs-directory* nil) (setf *init* t)) (defparameter *http-wagon-implementations* From rschlatte at common-lisp.net Sat Oct 20 09:44:55 2012 From: rschlatte at common-lisp.net (rschlatte at common-lisp.net) Date: Sat, 20 Oct 2012 02:44:55 -0700 Subject: [armedbear-cvs] r14206 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: rschlatte Date: Sat Oct 20 02:44:54 2012 New Revision: 14206 Log: Use correct slot name to get at the discriminating function. - we used cl:function as slot name, which is not ANSI-compliant. Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Profiler.java Thu Oct 18 23:43:14 2012 (r14205) +++ trunk/abcl/src/org/armedbear/lisp/Profiler.java Sat Oct 20 02:44:54 2012 (r14206) @@ -83,7 +83,7 @@ LispObject maybeMethod = methods.car(); if (maybeMethod instanceof StandardObject) { StandardObject method = (StandardObject) maybeMethod; - LispObject function = method.getInstanceSlotValue(Symbol.FUNCTION); + LispObject function = method.getInstanceSlotValue(Symbol._FUNCTION); function.setCallCount(0); function.setHotCount(0); methods = methods.cdr(); From rschlatte at common-lisp.net Sat Oct 20 10:39:04 2012 From: rschlatte at common-lisp.net (rschlatte at common-lisp.net) Date: Sat, 20 Oct 2012 03:39:04 -0700 Subject: [armedbear-cvs] r14207 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: rschlatte Date: Sat Oct 20 03:39:03 2012 New Revision: 14207 Log: Call method-function instead of directly accessing a slot. Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java trunk/abcl/src/org/armedbear/lisp/Symbol.java Modified: trunk/abcl/src/org/armedbear/lisp/Profiler.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Profiler.java Sat Oct 20 02:44:54 2012 (r14206) +++ trunk/abcl/src/org/armedbear/lisp/Profiler.java Sat Oct 20 03:39:03 2012 (r14207) @@ -76,17 +76,14 @@ methods = Symbol.GENERIC_FUNCTION_METHODS.execute(object); } - // TODO: extract methods from non-standard - // generic functions here once they are - // implemented while (methods != null && methods != NIL) { - LispObject maybeMethod = methods.car(); - if (maybeMethod instanceof StandardObject) { - StandardObject method = (StandardObject) maybeMethod; - LispObject function = method.getInstanceSlotValue(Symbol._FUNCTION); - function.setCallCount(0); - function.setHotCount(0); - methods = methods.cdr(); + LispObject method = methods.car(); + LispObject function = + Symbol.METHOD_FUNCTION.execute(method); + if (function != NIL) { + function.setCallCount(0); + function.setHotCount(0); + methods = methods.cdr(); } } } Modified: trunk/abcl/src/org/armedbear/lisp/Symbol.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Symbol.java Sat Oct 20 02:44:54 2012 (r14206) +++ trunk/abcl/src/org/armedbear/lisp/Symbol.java Sat Oct 20 03:39:03 2012 (r14207) @@ -2986,6 +2986,8 @@ PACKAGE_MOP.addExternalSymbol("GENERIC-FUNCTION-METHODS"); public static final Symbol METAOBJECT = PACKAGE_MOP.addExternalSymbol("METAOBJECT"); + public static final Symbol METHOD_FUNCTION = + PACKAGE_MOP.addExternalSymbol("METHOD-FUNCTION"); public static final Symbol SPECIALIZER = PACKAGE_MOP.addExternalSymbol("SPECIALIZER"); public static final Symbol STANDARD_ACCESSOR_METHOD = From ehuelsmann at common-lisp.net Sun Oct 21 13:41:31 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sun, 21 Oct 2012 06:41:31 -0700 Subject: [armedbear-cvs] r14208 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Sun Oct 21 06:40:48 2012 New Revision: 14208 Log: Re #253: BABEL-TESTS fail to compile; make ABCL understand the MOD type spec. Modified: trunk/abcl/src/org/armedbear/lisp/typep.lisp Modified: trunk/abcl/src/org/armedbear/lisp/typep.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/typep.lisp Sat Oct 20 03:39:03 2012 (r14207) +++ trunk/abcl/src/org/armedbear/lisp/typep.lisp Sun Oct 21 06:40:48 2012 (r14208) @@ -177,6 +177,11 @@ (and (simple-typep object 'nil-vector) (or (endp i) (eql (%car i) (length object))))) + (MOD + (and (integerp object) + (or (zerop object) + (and (plusp object) + (< object (second type)))))) ((FUNCTION VALUES) (error 'simple-error :format-control "~S types are not a legal argument to TYPEP: ~S" From ehuelsmann at common-lisp.net Sun Oct 21 16:09:55 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sun, 21 Oct 2012 09:09:55 -0700 Subject: [armedbear-cvs] r14209 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Sun Oct 21 09:09:53 2012 New Revision: 14209 Log: Re #253: BABEL-TESTS fails to compile; Fix character being discarded due to not being unread into underlying stream. Modified: trunk/abcl/src/org/armedbear/lisp/ConcatenatedStream.java Modified: trunk/abcl/src/org/armedbear/lisp/ConcatenatedStream.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/ConcatenatedStream.java Sun Oct 21 06:40:48 2012 (r14208) +++ trunk/abcl/src/org/armedbear/lisp/ConcatenatedStream.java Sun Oct 21 09:09:53 2012 (r14209) @@ -127,29 +127,17 @@ @Override public LispObject listen() { - if (unreadChar >= 0) - return T; if (streams == NIL) return NIL; - LispObject obj = readCharNoHang(false, this); - if (obj == this) - return NIL; - unreadChar = ((LispCharacter)obj).getValue(); - return T; + Stream stream = (Stream)streams.car(); + return stream.listen(); } - private int unreadChar = -1; - // Returns -1 at end of file. @Override protected int _readChar() throws java.io.IOException { int n; - if (unreadChar >= 0) { - n = unreadChar; - unreadChar = -1; - return n; - } if (streams == NIL) return -1; Stream stream = (Stream) streams.car(); @@ -161,18 +149,18 @@ } @Override - protected void _unreadChar(int n) + protected void _unreadChar(int n) throws java.io.IOException { - if (unreadChar >= 0) - error(new StreamError(this, "UNREAD-CHAR was invoked twice consecutively without an intervening call to READ-CHAR.")); - unreadChar = n; + if (streams == NIL) + error(new StreamError(this, "UNREAD-CHAR was invoked without a stream to unread into.")); + Stream stream = (Stream)streams.car(); + + stream._unreadChar(n); } @Override protected boolean _charReady() throws java.io.IOException { - if (unreadChar >= 0) - return true; if (streams == NIL) return false; Stream stream = (Stream) streams.car(); From mevenson at common-lisp.net Sun Oct 21 16:50:19 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 21 Oct 2012 09:50:19 -0700 Subject: [armedbear-cvs] r14210 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sun Oct 21 09:50:18 2012 New Revision: 14210 Log: Fixes #254 so that systems in jar archives with ASDF-BINARY-LOCATIONS enabled now work. Modified: trunk/abcl/src/org/armedbear/lisp/asdf.lisp Modified: trunk/abcl/src/org/armedbear/lisp/asdf.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/asdf.lisp Sun Oct 21 09:09:53 2012 (r14209) +++ trunk/abcl/src/org/armedbear/lisp/asdf.lisp Sun Oct 21 09:50:18 2012 (r14210) @@ -4033,6 +4033,8 @@ (initialize-output-translations `(:output-translations , at source-to-target-mappings + #+abcl (#p"jar:file:/**/*.jar!/**/*.*" (:function translate-jar-pathname)) + #+abcl (#p"/___jar___file___root___/**/*.*" (, at destination-directory)) ((:root ,*wild-inferiors* ,mapped-files) (, at destination-directory ,mapped-files)) (t t) From ehuelsmann at common-lisp.net Sun Oct 21 18:18:20 2012 From: ehuelsmann at common-lisp.net (ehuelsmann at common-lisp.net) Date: Sun, 21 Oct 2012 11:18:20 -0700 Subject: [armedbear-cvs] r14211 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: ehuelsmann Date: Sun Oct 21 11:18:20 2012 New Revision: 14211 Log: Re #253: Prevent unreading eofValue if eofValue happens to be a LispCharacter. Modified: trunk/abcl/src/org/armedbear/lisp/peek_char.java Modified: trunk/abcl/src/org/armedbear/lisp/peek_char.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/peek_char.java Sun Oct 21 09:50:18 2012 (r14210) +++ trunk/abcl/src/org/armedbear/lisp/peek_char.java Sun Oct 21 11:18:20 2012 (r14211) @@ -38,6 +38,8 @@ // ### peek-char public final class peek_char extends Primitive { + private static LispObject internalEOF = new LispObject(); + private peek_char() { super("peek-char", @@ -68,7 +70,9 @@ in = ((EchoStream)stream).getInputStream(); else in = stream; - final LispObject result = in.readChar(eofError, eofValue); + final LispObject result = in.readChar(eofError, internalEOF); + if (result == internalEOF) + return eofValue; if (result instanceof LispCharacter) in.unreadChar((LispCharacter)result); return result; @@ -79,7 +83,10 @@ // operation on the next character." Readtable rt = currentReadtable(); while (true) { - LispObject result = stream.readChar(eofError, eofValue); + LispObject result = stream.readChar(eofError, internalEOF); + if (result == internalEOF) + return eofValue; + if (result instanceof LispCharacter) { char c = ((LispCharacter)result).value; if (!rt.isWhitespace(c)) { @@ -96,7 +103,10 @@ // found; that character is left in INPUT-STREAM." char c = ((LispCharacter)peekType).value; while (true) { - LispObject result = stream.readChar(eofError, eofValue); + LispObject result = stream.readChar(eofError, internalEOF); + if (result == internalEOF) + return eofValue; + if (result instanceof LispCharacter) { if (((LispCharacter)result).value == c) { stream.unreadChar((LispCharacter)result); From mevenson at common-lisp.net Sun Oct 21 19:17:46 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 21 Oct 2012 12:17:46 -0700 Subject: [armedbear-cvs] r14212 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sun Oct 21 12:17:45 2012 New Revision: 14212 Log: Fixes #255 so that COMPILE-FILE now handles :EXTERNAL-FORMAT correctly. Remove debugging code from previous work. Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Modified: trunk/abcl/src/org/armedbear/lisp/compile-file.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Sun Oct 21 11:18:20 2012 (r14211) +++ trunk/abcl/src/org/armedbear/lisp/compile-file.lisp Sun Oct 21 12:17:45 2012 (r14212) @@ -715,7 +715,6 @@ (defvar *forms-for-output* nil) (defvar *fasl-stream* nil) -(defvar *debug-compile-from-stream* nil) (defun compile-from-stream (in output-file temp-file temp-file2 extract-toplevel-funcs-and-macros functions-file macros-file exports-file) @@ -728,9 +727,6 @@ (namestring (namestring *compile-file-truename*)) (start (get-internal-real-time)) *fasl-uninterned-symbols*) - (setf *debug-compile-from-stream* - (list :in in - :compile-file-pathname *compile-file-pathname*)) (when *compile-verbose* (format t "; Compiling ~A ...~%" namestring)) (with-compilation-unit () @@ -814,10 +810,11 @@ :if-exists :supersede) (let ((*package* (find-package :keyword))) (write *toplevel-exports* :stream e-out))))) - (with-open-file (in temp-file :direction :input) + (with-open-file (in temp-file :direction :input :external-format *fasl-external-format*) (with-open-file (out temp-file2 :direction :output :if-does-not-exist :create - :if-exists :supersede) + :if-exists :supersede + :external-format *fasl-external-format*) (let ((*package* (find-package '#:cl)) (*print-fasl* t) (*print-array* t) @@ -875,8 +872,7 @@ ((:verbose *compile-verbose*) *compile-verbose*) ((:print *compile-print*) *compile-print*) (extract-toplevel-funcs-and-macros nil) - external-format) - (declare (ignore external-format)) ; FIXME + (external-format :utf-8)) (flet ((pathname-with-type (pathname type &optional suffix) (when suffix (setq type (concatenate 'string type suffix))) @@ -906,7 +902,7 @@ *toplevel-exports* (warnings-p nil) (failure-p nil)) - (with-open-file (in input-file :direction :input) + (with-open-file (in input-file :direction :input :external-format external-format) (compile-from-stream in output-file temp-file temp-file2 extract-toplevel-funcs-and-macros functions-file macros-file exports-file)) From mevenson at common-lisp.net Tue Oct 23 11:48:45 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Tue, 23 Oct 2012 04:48:45 -0700 Subject: [armedbear-cvs] r14213 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Tue Oct 23 04:48:44 2012 New Revision: 14213 Log: Implementation of EXT:READ-TIMEOUT for sockets. Added docstrings for socket API as exported by EXTENSIONS. Modified: trunk/abcl/src/org/armedbear/lisp/socket.lisp Modified: trunk/abcl/src/org/armedbear/lisp/socket.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/socket.lisp Sun Oct 21 12:17:45 2012 (r14212) +++ trunk/abcl/src/org/armedbear/lisp/socket.lisp Tue Oct 23 04:48:44 2012 (r14213) @@ -33,7 +33,8 @@ (export '(make-socket make-server-socket server-socket-close socket-accept socket-close get-socket-stream socket-peer-port socket-local-port - socket-local-address socket-peer-address)) + socket-local-address socket-peer-address + read-timeout write-timeout)) (defun get-socket-stream (socket &key (element-type 'character) (external-format :default)) @@ -50,41 +51,62 @@ (sys::%socket-stream socket element-type external-format)) (defun make-socket (host port) + "Create a TCP socket for client communication to HOST on PORT." (sys::%make-socket host port)) (defun make-server-socket (port) + "Create a TCP server socket listening for clients on PORT." (sys::%make-server-socket port)) (defun socket-accept (socket) + "Block until able to return a new socket for handling a incoming request to the specified server SOCKET." (sys::%socket-accept socket)) (defun socket-close (socket) + "Close the client SOCKET." (sys::%socket-close socket)) (defun server-socket-close (socket) + "Close the server SOCKET." (sys::%server-socket-close socket)) (declaim (inline %socket-address %socket-port)) -(defun %socket-address (socket addressName) - (java:jcall "getHostAddress" (java:jcall-raw addressName socket))) - -(defun %socket-port (socket portName) - (java:jcall portName socket)) +(defun %socket-address (socket address-name) + "Return the underlying ADDRESS-NAME for SOCKET." + (java:jcall "getHostAddress" (java:jcall-raw address-name socket))) + +(defun %socket-port (socket port-name) + "Return the PORT-NAME of SOCKET." + (java:jcall port-name socket)) (defun socket-local-address (socket) - "Returns the local address of the given socket as a dotted quad string." + "Returns the local address of the SOCKET as a dotted quad string." (%socket-address socket "getLocalAddress")) (defun socket-peer-address (socket) - "Returns the peer address of the given socket as a dotted quad string." + "Returns the peer address of the SOCKET as a dotted quad string." (%socket-address socket "getInetAddress")) (defun socket-local-port (socket) - "Returns the local port number of the given socket." + "Returns the local port number of the SOCKET." (%socket-port socket "getLocalPort")) (defun socket-peer-port (socket) - "Returns the peer port number of the given socket." + "Returns the peer port number of the given SOCKET." (%socket-port socket "getPort")) +(defun read-timeout (socket seconds) + "Time in SECONDS to set local implementation of 'SO_RCVTIMEO' on SOCKET." + (java:jcall (java:jmethod "java.net.Socket" "setSoTimeout" "int") + socket + (/ seconds 1000))) + +(defun write-timeout (socket seconds) + "No-op setting of write timeout to SECONDS on SOCKET." + (declare (ignore socket seconds)) + (warn "Unimplemented. + +Timeouts for writes should be implemented by spawning a guardian +to the thread perfoming the socket write")) + (provide '#:socket) From mevenson at common-lisp.net Wed Oct 24 17:34:19 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Wed, 24 Oct 2012 10:34:19 -0700 Subject: [armedbear-cvs] r14214 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Wed Oct 24 10:34:18 2012 New Revision: 14214 Log: EXT:READ-TIMEOUT Fix conversion of time to underlying api. Modified: trunk/abcl/src/org/armedbear/lisp/socket.lisp Modified: trunk/abcl/src/org/armedbear/lisp/socket.lisp ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/socket.lisp Tue Oct 23 04:48:44 2012 (r14213) +++ trunk/abcl/src/org/armedbear/lisp/socket.lisp Wed Oct 24 10:34:18 2012 (r14214) @@ -99,7 +99,7 @@ "Time in SECONDS to set local implementation of 'SO_RCVTIMEO' on SOCKET." (java:jcall (java:jmethod "java.net.Socket" "setSoTimeout" "int") socket - (/ seconds 1000))) + (* seconds 1000))) ;; underlying API in ms. (defun write-timeout (socket seconds) "No-op setting of write timeout to SECONDS on SOCKET." From mevenson at common-lisp.net Wed Oct 24 18:49:47 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Wed, 24 Oct 2012 11:49:47 -0700 Subject: [armedbear-cvs] r14215 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Wed Oct 24 11:49:47 2012 New Revision: 14215 Log: LISP-IMPLEMENTATION-VERSION returns executing JVM as second value. Modified: trunk/abcl/src/org/armedbear/lisp/Primitives.java trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Modified: trunk/abcl/src/org/armedbear/lisp/Primitives.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Primitives.java Wed Oct 24 10:34:18 2012 (r14214) +++ trunk/abcl/src/org/armedbear/lisp/Primitives.java Wed Oct 24 11:49:47 2012 (r14215) @@ -407,7 +407,7 @@ }; // ### values - private static final Primitive VALUES = new pf_values(); + public static final Primitive VALUES = new pf_values(); private static final class pf_values extends Primitive { pf_values() { super(Symbol.VALUES, "&rest object"); Modified: trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Wed Oct 24 10:34:18 2012 (r14214) +++ trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Wed Oct 24 11:49:47 2012 (r14215) @@ -34,6 +34,7 @@ package org.armedbear.lisp; import java.math.BigInteger; +import java.text.MessageFormat; // ### lisp_implementation_version // lisp_implementation_version => description @@ -47,7 +48,14 @@ @Override public LispObject execute() { - return new SimpleString(Version.getVersion()); + String vendor = System.getProperty("java.vendor"); + vendor = vendor.replace(" ", "_"); + String jdkVersion = MessageFormat.format("{0}-{1}-{2})", + vendor, + System.getProperty("os.arch"), + System.getProperty("java.runtime.version")); + return Primitives.VALUES.execute(new SimpleString(Version.getVersion()), + new SimpleString(jdkVersion)); } private static final lisp_implementation_version LISP_IMPLEMENTATION_VERSION = From mevenson at common-lisp.net Thu Oct 25 05:31:22 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Wed, 24 Oct 2012 22:31:22 -0700 Subject: [armedbear-cvs] r14216 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Wed Oct 24 22:31:21 2012 New Revision: 14216 Log: Choose (hopefully) more informative return values for LISP-IMPLEMENTATION-VERSION. The use of "-" as a separator for fields in imitation of GNU configure would probably be better replaced with returning proper lists. Modified: trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Modified: trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Wed Oct 24 11:49:47 2012 (r14215) +++ trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Wed Oct 24 22:31:21 2012 (r14216) @@ -48,14 +48,20 @@ @Override public LispObject execute() { - String vendor = System.getProperty("java.vendor"); - vendor = vendor.replace(" ", "_"); String jdkVersion = MessageFormat.format("{0}-{1}-{2})", - vendor, - System.getProperty("os.arch"), - System.getProperty("java.runtime.version")); + System.getProperty("java.vm.name"), + System.getProperty("java.vm.vendor"), + System.getProperty("java.runtime.version")) + .replace(" ", "_"); + String osVersion = MessageFormat.format("{0}-{1}-{2})", + System.getProperty("os.arch"), + System.getProperty("os.name"), + System.getProperty("os.version")) + .replace(" ", "_"); + return Primitives.VALUES.execute(new SimpleString(Version.getVersion()), - new SimpleString(jdkVersion)); + new SimpleString(jdkVersion), + new SimpleString(osVersion)); } private static final lisp_implementation_version LISP_IMPLEMENTATION_VERSION = From mevenson at common-lisp.net Sat Oct 27 06:40:55 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Fri, 26 Oct 2012 23:40:55 -0700 Subject: [armedbear-cvs] r14217 - in trunk/abcl: contrib/mvn nbproject Message-ID: Author: mevenson Date: Fri Oct 26 23:40:54 2012 New Revision: 14217 Log: Update to explicitly using jna-3.5.0.jar. Modified: trunk/abcl/contrib/mvn/jna.asd trunk/abcl/nbproject/build-impl.xml trunk/abcl/nbproject/genfiles.properties Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Wed Oct 24 22:31:21 2012 (r14216) +++ trunk/abcl/contrib/mvn/jna.asd Fri Oct 26 23:40:54 2012 (r14217) @@ -2,10 +2,10 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. (asdf:defsystem :jna - :version "3.4.0" + :version "3.5.0" :defsystem-depends-on (jss abcl-asdf) -;; FIXME: - :components ((:mvn "net.java.dev.jna/jna/3.4.0"))) +;; FIXME: always seems to be resolving the LATEST maven artifact. + :components ((:mvn "net.java.dev.jna/jna/3.5.0"))) (in-package :asdf) (defmethod perform :after ((o load-op) (c (eql (find-system :jna)))) @@ -23,8 +23,9 @@ (unless (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0")) (unless - (java:add-to-classpath #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.4.0/jna-3.4.0.jar") - (error "Failed to load jna-3.4.0.jar from the network via URI.")) + ;; Might want to download to local filesystem, then place in classpath + (java:add-to-classpath #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.5.0/jna-3.5.0.jar") + (error "Failed to load jna-3.5.0.jar from the network via URI.")) (error "Failed to load jna.jar via ABCL-ASDF."))) (t (e) (error "Failed to resolve 'jna.jar' because~&~A.~&" e)))) Modified: trunk/abcl/nbproject/build-impl.xml ============================================================================== --- trunk/abcl/nbproject/build-impl.xml Wed Oct 24 22:31:21 2012 (r14216) +++ trunk/abcl/nbproject/build-impl.xml Fri Oct 26 23:40:54 2012 (r14217) @@ -12,18 +12,18 @@ - execution - debugging - javadoc - - junit compilation - - junit execution - - junit debugging + - test compilation + - test execution + - test debugging - applet - cleanup --> - + - + @@ -156,6 +156,7 @@ + @@ -198,7 +199,29 @@ + + + + + + + + + + + + + + + + + + + + + + @@ -331,11 +354,52 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -344,32 +408,270 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -384,6 +686,7 @@ + @@ -400,10 +703,13 @@ - + Must set JVM to use for profiling in profiler.info.jvm Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + @@ -461,6 +767,7 @@ + @@ -477,6 +784,7 @@ + @@ -484,6 +792,7 @@ + @@ -510,11 +819,14 @@ + + + - + @@ -555,7 +867,7 @@ - + - + + + This target only works when run from inside the NetBeans IDE. @@ -779,8 +1095,9 @@ - + Must select one file in the IDE or set profile.class + This target only works when run from inside the NetBeans IDE. @@ -788,12 +1105,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -805,12 +1118,8 @@ - - + + This target only works when run from inside the NetBeans IDE. @@ -833,12 +1142,56 @@ + + + + + + + + + + + + + + Must select one file in the IDE or set run.class + + + + + + Must select some files in the IDE or set test.includes + + + + + Must select one file in the IDE or set run.class + + + + + Must select one file in the IDE or set applet.url + + + + + + + + + + + + @@ -850,6 +1203,7 @@ + @@ -866,7 +1220,7 @@ @@ -909,14 +1263,14 @@ - + Some tests failed; see details above. @@ -929,39 +1283,40 @@ Must select some files in the IDE or set test.includes - + Some tests failed; see details above. + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + - + Must select one file in the IDE or set test.class - - - - - - - - - - - - - - - + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + @@ -1026,9 +1381,12 @@ - - - + + + + + + Modified: trunk/abcl/nbproject/genfiles.properties ============================================================================== --- trunk/abcl/nbproject/genfiles.properties Wed Oct 24 22:31:21 2012 (r14216) +++ trunk/abcl/nbproject/genfiles.properties Fri Oct 26 23:40:54 2012 (r14217) @@ -4,8 +4,8 @@ # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. nbproject/build-impl.xml.data.CRC32=742204ce -nbproject/build-impl.xml.script.CRC32=36361450 -nbproject/build-impl.xml.stylesheet.CRC32=0ae3a408 at 1.44.1.45 +nbproject/build-impl.xml.script.CRC32=1dc32654 +nbproject/build-impl.xml.stylesheet.CRC32=6ddba6b6 at 1.53.1.46 nbproject/profiler-build-impl.xml.data.CRC32=71623fcd nbproject/profiler-build-impl.xml.script.CRC32=abda56ed nbproject/profiler-build-impl.xml.stylesheet.CRC32=42cb6bcf From mevenson at common-lisp.net Sat Oct 27 08:50:31 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sat, 27 Oct 2012 01:50:31 -0700 Subject: [armedbear-cvs] r14218 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: mevenson Date: Sat Oct 27 01:50:30 2012 New Revision: 14218 Log: Always bypass method access checks for JSTATIC. Enables a (to be released) patched CFFI to actually use callbacks. Modified: trunk/abcl/src/org/armedbear/lisp/Java.java Modified: trunk/abcl/src/org/armedbear/lisp/Java.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/Java.java Fri Oct 26 23:40:54 2012 (r14217) +++ trunk/abcl/src/org/armedbear/lisp/Java.java Sat Oct 27 01:50:30 2012 (r14218) @@ -472,6 +472,7 @@ else methodArgs[i-2] = arg.javaInstance(argTypes[i-2]); } + m.setAccessible(true); Object result = m.invoke(null, methodArgs); return JavaObject.getInstance(result, translate, m.getReturnType()); } From mevenson at common-lisp.net Sun Oct 28 08:50:43 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 28 Oct 2012 01:50:43 -0700 Subject: [armedbear-cvs] r14219 - public_html Message-ID: Author: mevenson Date: Sun Oct 28 01:50:41 2012 New Revision: 14219 Log: Updated FAQ. Embiggened statement of conformance. Now using two (!) CSS counters to mark sections. Use a sans-serif font by default. Modified: public_html/faq-style.css public_html/faq.shtml Modified: public_html/faq-style.css ============================================================================== --- public_html/faq-style.css Sat Oct 27 01:50:30 2012 (r14218) +++ public_html/faq-style.css Sun Oct 28 01:50:41 2012 (r14219) @@ -1,23 +1,51 @@ +body { + font-family: sans-serif; +} /* Use CSS2 to automatically number the FAQ questions and answer */ +ol#toc, div#general { + counter-reset: topic; +} ol#toc { + border-style: solid; +} +ol#toc li.topic, div#general h2.topic { + list-style: none; counter-reset: question; } -ol#toc li { +div#general h2.topic { + margin-left: -4em; +} +ol#toc li.topic:before, div#general h2.topic:before { + content: counter(topic) ". "; + counter-increment: topic; +} +ol#toc li.question { list-style: none; } -ol#toc > li li:before { - content: counter(question) ". "; +ol#toc li.question:before, div#general h3.question:before { + content: counter(topic) "." counter(question) ". "; counter-increment: question; } - -div#general { - counter-reset: answer; -} -div#general h3:before { - content: counter(answer) ". "; - counter-increment: answer +div#general h3.question { + margin-left: -2em; } -ol#toc li li { - margin-left: 1em; -} \ No newline at end of file + + + + + + + + + + + + + + + + + + + Modified: public_html/faq.shtml ============================================================================== --- public_html/faq.shtml Sat Oct 27 01:50:30 2012 (r14218) +++ public_html/faq.shtml Sun Oct 28 01:50:41 2012 (r14219) @@ -19,65 +19,63 @@

Index

    -
  1. General -
      -
    1. What is ABCL?
    2. -
    3. What license is used for ABCL?
    4. -
    5. How/Where should I report bugs?
    6. -
    7. Is ABCL faster or slower than implementation XYZ?
    8. -
    9. What is the quality of the implementation? How can you tell?
    10. -
    11. Where is ABCL's source code repository?
    12. -
    13. Where is ABCL's documentation?
    14. -
    -
  2. +
  3. General Questions about ABCL +
      +
    1. What is ABCL?
    2. +
    3. What license is used for ABCL?
    4. +
    5. How/Where should I report bugs?
    6. +
    7. Is ABCL faster or slower than implementation XYZ?
    8. +
    9. What is the quality of the implementation? How can you tell?
    10. +
    11. Where is ABCL's source code repository?
    12. +
    13. Where is ABCL's documentation?
    14. +
    +
  4. -
  5. Building -
      -
    1. The Ant build process seems to recompile from scratch each time. How do I avoid this?
    2. -
    +
  6. Questions about Building ABCL +
      +
    1. The Ant build process seems to recompile from scratch each time. How do I avoid this?
    2. +
  7. -
  8. Running +
  9. Questions about Running ABCL
      -
    1. +
    2. Java is running out of memory with an error reporting something about "java.lang.OutOfMemoryError: PermGen space". What can I do?
    3. -
    4. - What's the name of the startup configuration file? +
    5. + What's the name of the startup configuration file?
    6. -
-
-

General

+

General

-

What is ABCL?

-

ABCL is an implementation of the full Common Lisp specification, with -the exception of the implementation of the long form of -DEFINE-METHOD-COMBINATION.

+

What is ABCL?

+

ABCL stands for Armed Bear Common Lisp. ABCL is an implementation +of Common Lisp hosted on the Java Virtual Machine. With the release of abcl-1.0, +Armed Bear Common Lisp is a conforming implementation of the +ANSI Common Lisp specification. The required statement of conformance +is included in the User Manual.

-Unfortunately, the CLOS implementation is not fully completely through -a MOP (MetaObject Protocol). Perhaps roughly a third of the -functionality defined by AMOP is present. Any -contributions in this area would be greatly appreciated, of course. +With abcl-1.1.0-dev (aka "ABCL trunk"), now contains a complete +implementation of the AMOP.

-

What license is used for ABCL?

+

What license is used for ABCL?

-

ABCL is distributed under the GNU General Public License with ABCL is distributed under the GNU General Public License with Classpath exception. This is the same license as used for JAVA SE and GNU Classpath.

@@ -102,7 +100,7 @@
-

How/Where should I report bugs?

+

How/Where should I report bugs?

The current state of issues can be found in the

-

Is ABCL faster or slower than implementation XYZ?

+

Is ABCL faster or slower than implementation XYZ?

General comparisons are hard to make, the relative speeds depend on a lot of factors. For example timing outcomes of specific bits @@ -155,7 +153,7 @@

-

What is the quality of the implementation? How can you tell?

+

What is the quality of the implementation? How can you tell?

The project recognizes there are several dimensions to quality:

    @@ -188,26 +186,32 @@
-

Where is ABCL's source code repository?

+

Where is ABCL's source code repository?

+ +

The source code may be viewed with a web browser by visiting http://trac.common-lisp.net/armedbear/browser/trunk/abcl/. +

-

If you want to build the latest (unstable) ABCL code, -you can check out through -svn://common-lisp.net/project/armedbear/svn/trunk/abcl.

+

If you want to build the source, ABCL trunk, +can be checked out via Subversion (aka "svn") from +the URI +svn://common-lisp.net/project/armedbear/svn/trunk/abcl/.

-This repository is also exported read-only via HTTP at +This ABCL source repository is also exported read-only via HTTP at http://svn.common-lisp.net/armedbear/trunk/abcl

-

Where is ABCL's documentation?

+

Where is ABCL's documentation?

Documentation on ABCL can be found in several places, depending on the kind of documentation you're looking for.

    -
  1. Users of the system are invited to start with the Armed Bear Common Lisp User Manual
  2. +
  3. Users of the system are invited to start with the Armed Bear Common Lisp User Manual
  4. Our wiki
  5. The source code (JavaDoc and general comments)
  6. @@ -219,10 +223,10 @@
-

Building

+

Building

-

The Ant build process seems to recompile from scratch each time. How do I avoid this?

+

The Ant build process seems to recompile from scratch each time. How do I avoid this?

If the JVM system property abcl.build.incremental is set, @@ -237,10 +241,10 @@

-

Running

+

Running

-

Java is running out of memory with an error reporting something +

Java is running out of memory with an error reporting something about "java.lang.OutOfMemoryError: PermGen space". What can I do?

@@ -273,8 +277,8 @@ 'java.options' variable is set to the desired options.

-
-

Is there a file that customizes the startup of the ABCL process?

+
+

Is there a file that customizes the startup of the ABCL process?

The file ~/.abclrc is loaded by the implementation if the --noinit flag is not specified. From mevenson at common-lisp.net Sun Oct 28 08:58:14 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 28 Oct 2012 01:58:14 -0700 Subject: [armedbear-cvs] r14220 - public_html Message-ID: Author: mevenson Date: Sun Oct 28 01:58:12 2012 New Revision: 14220 Log: FAQ: Correct grammar and add link to AMOP status. Modified: public_html/faq.shtml Modified: public_html/faq.shtml ============================================================================== --- public_html/faq.shtml Sun Oct 28 01:50:41 2012 (r14219) +++ public_html/faq.shtml Sun Oct 28 01:58:12 2012 (r14220) @@ -65,9 +65,10 @@ is included in the User Manual.

-With abcl-1.1.0-dev (aka "ABCL trunk"), now contains a complete +The development version of ABCL, abcl-1.1.0-dev (aka "ABCL trunk"), contains a complete implementation of the AMOP. +href="http://www.lisp.org/mop/index.html">AMOP that is being +extensively tested for release with abcl-1.1.0.

From mevenson at common-lisp.net Sun Oct 28 09:01:17 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 28 Oct 2012 02:01:17 -0700 Subject: [armedbear-cvs] r14221 - public_html Message-ID: Author: mevenson Date: Sun Oct 28 02:01:16 2012 New Revision: 14221 Log: FAQ: Allow the index to breathe a bit. Modified: public_html/faq-style.css public_html/faq.shtml Modified: public_html/faq-style.css ============================================================================== --- public_html/faq-style.css Sun Oct 28 01:58:12 2012 (r14220) +++ public_html/faq-style.css Sun Oct 28 02:01:16 2012 (r14221) @@ -7,6 +7,7 @@ } ol#toc { border-style: solid; + padding: 1cm; } ol#toc li.topic, div#general h2.topic { list-style: none; Modified: public_html/faq.shtml ============================================================================== --- public_html/faq.shtml Sun Oct 28 01:58:12 2012 (r14220) +++ public_html/faq.shtml Sun Oct 28 02:01:16 2012 (r14221) @@ -17,7 +17,7 @@
-

Index

+

Frequently Asked Questions about Armed Bear Common Lisp

  1. General Questions about ABCL
      From mevenson at common-lisp.net Sun Oct 28 09:15:27 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Sun, 28 Oct 2012 02:15:27 -0700 Subject: [armedbear-cvs] r14222 - public_html Message-ID: Author: mevenson Date: Sun Oct 28 02:15:26 2012 New Revision: 14222 Log: Soften the corners on the home page. Move more of the CSS into the style sheet. Modified: public_html/index.shtml public_html/style.css Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml Sun Oct 28 02:01:16 2012 (r14221) +++ public_html/index.shtml Sun Oct 28 02:15:26 2012 (r14222) @@ -6,28 +6,6 @@ Armed Bear Common Lisp (ABCL) - Common Lisp on the JVM - @@ -36,7 +14,6 @@
      -
      Downloads
      Modified: public_html/style.css ============================================================================== --- public_html/style.css Sun Oct 28 02:01:16 2012 (r14221) +++ public_html/style.css Sun Oct 28 02:15:26 2012 (r14222) @@ -91,4 +91,35 @@ margin-top: 1em; margin-bottom: 1em; } + +td { font-size: 90%; padding: 0 5px 0 5px } +dt { font-weight: bold } +dd dt { font-weight: bold; font-style: italic } + +table.downloads { + color: black; + font-weight: bold; + font-size: larger; +} + +table.downloads a { + font-weight: normal; + font-size:smaller; +} + +table.downloads a.asc { + font-size: smaller; +} + +td ul { + margin:0; +} +td.summary-header { + padding: .3em; + border-radius: .3em; +} + +td.summary-header a:link, td.summary-header a:visited { + color: white; +} From mevenson at common-lisp.net Mon Oct 29 09:25:47 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 29 Oct 2012 02:25:47 -0700 Subject: [armedbear-cvs] r14223 - trunk/abcl/contrib/quicklisp Message-ID: Author: mevenson Date: Mon Oct 29 02:25:45 2012 New Revision: 14223 Log: quicklisp-abcl: use http://beta.quicklisp.org/quicklisp.lisp as the bootstrap URI. THe JVM seems confused with the AMS CloudFront certificate wildcards as to whether 'https://beta.quicklisp.org' is valid or not, so switch to using "https". N.b. ASDF loading of QUICKLISP-ABCL currently doesn't trigger the load-op, probably because we have no declared artifacts, so this contrib cannot be considered as "working" yet. But if the ASDF:PERFORM *were* to get called, things should work. Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd ============================================================================== --- trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Sun Oct 28 02:15:26 2012 (r14222) +++ trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Mon Oct 29 02:25:45 2012 (r14223) @@ -17,10 +17,13 @@ ;;; Load local Quicklisp if it has been an installed (let ((quicklisp-init (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) - (handler-case - (when (probe-file quicklisp-init) - (load quicklisp-init)) - (t (e) (load "https://beta.quicklisp.org/quickstart/setup.lisp"))))) + (if (probe-file quicklisp-init) + (load quicklisp-init) + (progn + (load "http://beta.quicklisp.org/quicklisp.lisp") + (funcall (intern "install" "QUICKLISP-QUICKSTART")))))) + + From mevenson at common-lisp.net Mon Oct 29 09:28:28 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 29 Oct 2012 02:28:28 -0700 Subject: [armedbear-cvs] r14224 - trunk/abcl/contrib/quicklisp Message-ID: Author: mevenson Date: Mon Oct 29 02:28:27 2012 New Revision: 14224 Log: quicklisp-abcl: missed this change in the last commit. Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Modified: trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd ============================================================================== --- trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Mon Oct 29 02:25:45 2012 (r14223) +++ trunk/abcl/contrib/quicklisp/quicklisp-abcl.asd Mon Oct 29 02:28:27 2012 (r14224) @@ -21,7 +21,7 @@ (load quicklisp-init) (progn (load "http://beta.quicklisp.org/quicklisp.lisp") - (funcall (intern "install" "QUICKLISP-QUICKSTART")))))) + (funcall (intern "INSTALL" "QUICKLISP-QUICKSTART")))))) From mevenson at common-lisp.net Mon Oct 29 09:30:16 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Mon, 29 Oct 2012 02:30:16 -0700 Subject: [armedbear-cvs] r14225 - trunk/abcl/contrib/mvn Message-ID: Author: mevenson Date: Mon Oct 29 02:30:15 2012 New Revision: 14225 Log: jna: Update to jna-3.5.1. Modified: trunk/abcl/contrib/mvn/jna.asd Modified: trunk/abcl/contrib/mvn/jna.asd ============================================================================== --- trunk/abcl/contrib/mvn/jna.asd Mon Oct 29 02:28:27 2012 (r14224) +++ trunk/abcl/contrib/mvn/jna.asd Mon Oct 29 02:30:15 2012 (r14225) @@ -2,10 +2,10 @@ ;;;; Need to have jna.jar present for CFFI to have a chance of working. (asdf:defsystem :jna - :version "3.5.0" + :version "3.5.1" :defsystem-depends-on (jss abcl-asdf) ;; FIXME: always seems to be resolving the LATEST maven artifact. - :components ((:mvn "net.java.dev.jna/jna/3.5.0"))) + :components ((:mvn "net.java.dev.jna/jna/3.5.1"))) (in-package :asdf) (defmethod perform :after ((o load-op) (c (eql (find-system :jna)))) @@ -21,10 +21,10 @@ (jss:find-java-class "com.sun.jna.Native") (java:java-exception (e) (unless - (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.4.0")) + (java:add-to-classpath (abcl-asdf:resolve "net.java.dev.jna:jna:3.5.1")) (unless ;; Might want to download to local filesystem, then place in classpath - (java:add-to-classpath #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.5.0/jna-3.5.0.jar") + (java:add-to-classpath #p"http://repo1.maven.org/maven2/net/java/dev/jna/jna/3.5.1/jna-3.5.1.jar") (error "Failed to load jna-3.5.0.jar from the network via URI.")) (error "Failed to load jna.jar via ABCL-ASDF."))) (t (e) From mevenson at common-lisp.net Tue Oct 30 12:07:04 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Tue, 30 Oct 2012 05:07:04 -0700 Subject: [armedbear-cvs] r14226 - trunk/abcl/contrib/jss Message-ID: Author: mevenson Date: Tue Oct 30 05:07:03 2012 New Revision: 14226 Log: Re #259: fix JSS:JLIST-TO-LIST. This fixes the immediate problem, but leave the ticket open as far as I can tell the following code fails in ABCL, but succeeds in the equivalent Java code indicating we need to fix Java.isApplicableMethod(): (jstatic "asList" "java.util.Arrays" (java:jnew-array (jclass "int") 1)) Modified: trunk/abcl/contrib/jss/invoke.lisp Modified: trunk/abcl/contrib/jss/invoke.lisp ============================================================================== --- trunk/abcl/contrib/jss/invoke.lisp Mon Oct 29 02:30:15 2012 (r14225) +++ trunk/abcl/contrib/jss/invoke.lisp Tue Oct 30 05:07:03 2012 (r14226) @@ -533,8 +533,8 @@ (defun jarray-to-list (jarray) "Convert the Java array named by JARRARY into a Lisp list." (declare (optimize (speed 3) (safety 0))) - (jlist-to-list - (jstatic "asList" "java.util.Arrays" jarray))) + (loop :for i :from 0 :below (jarray-length jarray) + :collecting (jarray-ref jarray i))) ;;; Deprecated ;;; From rschlatte at common-lisp.net Wed Oct 31 09:08:33 2012 From: rschlatte at common-lisp.net (rschlatte at common-lisp.net) Date: Wed, 31 Oct 2012 02:08:33 -0700 Subject: [armedbear-cvs] r14227 - trunk/abcl/src/org/armedbear/lisp Message-ID: Author: rschlatte Date: Wed Oct 31 02:08:33 2012 New Revision: 14227 Log: Remove stray closing paren from (lisp-implementation-version) results - Followup to #14216 Modified: trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Modified: trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java ============================================================================== --- trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Tue Oct 30 05:07:03 2012 (r14226) +++ trunk/abcl/src/org/armedbear/lisp/lisp_implementation_version.java Wed Oct 31 02:08:33 2012 (r14227) @@ -48,12 +48,12 @@ @Override public LispObject execute() { - String jdkVersion = MessageFormat.format("{0}-{1}-{2})", + String jdkVersion = MessageFormat.format("{0}-{1}-{2}", System.getProperty("java.vm.name"), System.getProperty("java.vm.vendor"), System.getProperty("java.runtime.version")) .replace(" ", "_"); - String osVersion = MessageFormat.format("{0}-{1}-{2})", + String osVersion = MessageFormat.format("{0}-{1}-{2}", System.getProperty("os.arch"), System.getProperty("os.name"), System.getProperty("os.version")) From mevenson at common-lisp.net Wed Oct 31 13:13:04 2012 From: mevenson at common-lisp.net (mevenson at common-lisp.net) Date: Wed, 31 Oct 2012 06:13:04 -0700 Subject: [armedbear-cvs] r14228 - public_html Message-ID: Author: mevenson Date: Wed Oct 31 06:13:02 2012 New Revision: 14228 Log: website: Give the CSS some love. Avoid using explicit line breaks. Move more of the CSS into separate files. Move to using rounded corners everywhere. Still could use some work. Modified: public_html/faq-style.css public_html/index.shtml public_html/left-menu public_html/style.css Modified: public_html/faq-style.css ============================================================================== --- public_html/faq-style.css Wed Oct 31 02:08:33 2012 (r14227) +++ public_html/faq-style.css Wed Oct 31 06:13:02 2012 (r14228) @@ -6,6 +6,7 @@ counter-reset: topic; } ol#toc { + border-radius: 1em; border-style: solid; padding: 1cm; } Modified: public_html/index.shtml ============================================================================== --- public_html/index.shtml Wed Oct 31 02:08:33 2012 (r14227) +++ public_html/index.shtml Wed Oct 31 06:13:02 2012 (r14228) @@ -1,164 +1,187 @@ +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - - Armed Bear Common Lisp (ABCL) - Common Lisp on the JVM - - - - - - - -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      Downloads
      - - - - - - - - - - - - - - -
      Binary - abcl-bin-1.0.1.tar.gz - (pgp) - - abcl-bin-1.0.1.zip - (pgp) - - abcl-contrib-1.0.1.jar - (pgp) -
      Source - abcl-src-1.0.1.tar.gz - (pgp) - - abcl-src-1.0.1.zip - (pgp) - - - abcl-contrib source - -
      -
      ABCL — Common Lisp on the JVM
      -

      - Armed Bear Common Lisp (ABCL) is a full implementation of the Common Lisp - language featuring both an interpreter and a compiler, - running in the JVM. Originally started to be a scripting - language for the J editor, it now supports JSR-223 (Java - scripting API): it can be a scripting engine in any Java - application. Additionally, it can be used to implement (parts of) - the application using Java to Lisp integration APIs. -

      -
      Users - (development with ABCL)Developers - (development of ABCL)
      - - - -
      System requirements (Users)System requirements (Developers)
      -
        -
      • JRE 1.5.0 (any patch level), or
      • -
      • JRE 1.6.0 (patch level 10 or higher)
      • -
      • One of the explicitly supported platforms:
        - Windows, Linux, MacOS X, OpenBSD, NetBSD,
        - FreeBSD or Google App Engine
      • -
      -
      - -
      Licensing
      - -

      -ABCL is covered by the -GNU General Public License with Classpath exception, -meaning that you can use ABCL in your application without the -requirement to open the sources to your application. -

      - -
      - -
      - -
      -
      -

      Back to Common-lisp.net.

      - - -
      $Id$
      -
      - + + Armed Bear Common Lisp (ABCL) - Common Lisp on the JVM + + + + + + +
      +

      Armed Bear Common Lisp (ABCL)

      +
      +
      + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      Downloads
      + + + + + + + + + + + + + + +
      Binary + abcl-bin-1.0.1.tar.gz + (pgp) + + abcl-bin-1.0.1.zip + (pgp) + + abcl-contrib-1.0.1.jar + (pgp) +
      Source + abcl-src-1.0.1.tar.gz + (pgp) + + abcl-src-1.0.1.zip + (pgp) + + + abcl-contrib source + +
      +
      ABCL — Common Lisp on the JVM
      +

      + Armed Bear Common Lisp (ABCL) is a full implementation of the Common Lisp + language featuring both an interpreter and a compiler, + running in the JVM. Originally started to be a scripting + language for the J editor, it now supports JSR-223 (Java + scripting API): it can be a scripting engine in any Java + application. Additionally, it can be used to implement (parts of) + the application using Java to Lisp integration APIs. +

      +
      Users + (development with ABCL)Developers + (development of ABCL)
      + + + +
      System requirements (Users)System requirements (Developers)
      +

      + One of the following +

      + +

      + Running on one of the explictly supported platforms: + Windows, Linux, MacOS X, OpenBSD, + NetBSD, + FreeBSD, Solaris or Google App Engine +

      +
      +

      One of the following

      + +

      And either

      +
        +
      • Ant version 1.7.1 or higher, or
      • +
      • A Lisp to run the lisp-based build system
      • +
      +
      Licensing
      + +

      + ABCL is covered by the + GNU General Public License with Classpath exception, + meaning that you can use ABCL in your application without the + requirement to open the sources to your application. +

      + +
      +
      +
      + +
      +
      +

      Back to Common-lisp.net.

      + + +
      $Id$
      +
      + Modified: public_html/left-menu ============================================================================== --- public_html/left-menu Wed Oct 31 02:08:33 2012 (r14227) +++ public_html/left-menu Wed Oct 31 06:13:02 2012 (r14228) @@ -1,21 +1,31 @@ - +
      + + + + +
      + + +
      Modified: public_html/style.css ============================================================================== --- public_html/style.css Wed Oct 31 02:08:33 2012 (r14227) +++ public_html/style.css Wed Oct 31 06:13:02 2012 (r14228) @@ -1,120 +1,141 @@ +body { + font-family: sans-serif; +} + +div#main { + margin-left:auto; + margin-right:auto; + width: 80%; + max-width: 20cm; +} .header { - font-size: medium; - background-color:#336699; - color:#ffffff; - border-style:solid; - border-width: 5px; - border-color:#002244; - padding: 1mm 1mm 1mm 5mm; + text-align: center; + font-size: medium; + background-color: #3366ff; + color: #ffffff; + border-radius: 1em; + border-width: 5px; + border-color:#002244; + padding: 1mm 1mm 1mm 5mm; + paddingleft: 10%; } .footer { - font-size: small; - font-style: italic; - text-align: right; - background-color:#336699; - color:#ffffff; - border-style:solid; - border-width: 2px; - border-color:#002244; - padding: 1mm 1mm 1mm 1mm; -} - -.footer a:link { - font-weight:bold; - color:#ffffff; - text-decoration:underline; -} - -.footer a:visited { - font-weight:bold; - color:#ffffff; - text-decoration:underline; + font-size: small; + font-style: italic; + text-align: right; + background-color:#3366ff; + color: #ffffff; + border-radius: 1em; + border-width: 2px; + border-color:#002244; + padding: 1mm 1mm 1mm 1mm; +} + +.footer a:link, .footer a:visited { + font-weight: bold; + color: #ffffff; + text-decoration: underline; } .footer a:hover { - font-weight:bold; - color:#002244; - text-decoration:underline; } - -.check {font-size: x-small; - text-align:right;} - -.check a:link { font-weight:bold; - color:#a0a0ff; - text-decoration:underline; } - -.check a:visited { font-weight:bold; - color:#a0a0ff; - text-decoration:underline; } - -.check a:hover { font-weight:bold; - color:#000000; - text-decoration:underline; } + font-weight:bold; + color:#002244; + text-decoration:underline; +} + +.check { + font-size: x-small; + text-align:right; +} + +.check a:link { + font-weight:bold; + color:#a0a0ff; + text-decoration:underline; +} + +.check a:visited { + font-weight:bold; + color:#a0a0ff; + text-decoration:underline; +} + +.check a:hover { + font-weight:bold; + color:#000000; + text-decoration:underline; +} .summary-header { font-size: 120%; font-weight: bold; color: white; - background-color: #369; - text-align: center } + background-color: #3366ff; + text-align: center +} .summary-header span { font-weight: normal; font-size: 80%; } +/* "rn" meaning release notes */ div.rn { - float: left; - width: 20cm; - margin-top: 1cm; - margin-bottom: 1cm; + float: left; + width: 20cm; + margin-top: 1cm; + margin-bottom: 1cm; } - div.rn dl { - width: 20cm; + width: 20cm; } - div.rn dl dt { - font-family: sans-serif; - font-weight: bold; - margin-top: 1cm; - background: #369; - color: #fff; - padding-left: 2ex; - padding-top: 0.2em; - padding-bottom: 0.2em; + border-radius: 1em; + font-family: sans-serif; + font-weight: bold; + margin: 1cm; + background: #3366ff; + color: #fff; + padding-left: 1em; + padding-top: 0.3em; + padding-bottom: 0.3em; } - div.rn dl dd { margin-top: 1em; margin-bottom: 1em; } -td { font-size: 90%; padding: 0 5px 0 5px } -dt { font-weight: bold } -dd dt { font-weight: bold; font-style: italic } +td { + font-size: 85%; +} +dt { + font-weight: bold +} +dd dt { + font-weight: bold; font-style: italic +} table.downloads { - color: black; - font-weight: bold; - font-size: larger; + color: black; + font-weight: bold; + font-size: larger; } table.downloads a { - font-weight: normal; - font-size:smaller; + font-weight: normal; + font-size:smaller; } table.downloads a.asc { - font-size: smaller; + font-size: smaller; } td ul { - margin:0; + margin:0; } - + td.summary-header { padding: .3em; border-radius: .3em; @@ -123,3 +144,29 @@ td.summary-header a:link, td.summary-header a:visited { color: white; } + +div#left-menu { + border-radius: 1em; + border-style: solid; + border-color: #999999; + float: left; + width: 10%; + background-color: #6699ff; + font-family: sans-serif; + font-size: 12px; +} + +ul.menu-list { + list-style: none; +} + +ul.menu-list a:link, ul.menu-list a:visited { + font-weight: bold; + color: #ffffff; + text-decoration: underline; +} + +ul.menu-list li { + padding: .3em; + margin-left: -20%; +} \ No newline at end of file