Alex Mizrahi | 27 Aug 16:21

important areas

helo

what's about assembling a list of areas in which
ABCL needs to be improved? few i've noticed:

 * compiler and lexical/special variables -- 
   last time i've checked even relatively
   simple stuff like:

   (loop for i from 1 to 10
         collecting (let ((i i))
                      (lambda () i)))

   did not work well. and that's quite idiomatic
   thing..

 * CLOS/MOP stuff -- some important stuff is
   missing

 * Unicode support -- ABCL does not actually
   support unicode, but at least it does not
   forbid using Java APIs to read Unicode
   strings.

 * multithread safety -- while perhaps not
   thoroughly checked, most stuff behaves
   fine with multiple threads, at least
   i don't remember having problems with it.

   but CLOS *has* problems when it is worked
(Continue reading)

Mark Evenson | 27 Aug 12:22

Making BUILD-ABCL an ASDF package (plus draft changes)

Attached please find patches to ABCL for the Lisp build system that I 
find quite useful (I don't really use the Ant build system, but maybe I 
am atypical).

This change:

   o  Provides an ASDF description for BUILD-ABCL, to make building
      ABCL easier from other Lisps (sbcl, clisp tested) and ABCL itself. 
  Use of ASDF is used to provide location for components in BUILD-ABCL.

   o  a new special BUILD-ABCL::*ADDITIONAL-JARS* which contains a list 
of pathnames to include on the CLASSPATH when using the UNIX 'abcl' 
shell script entry point (BUILD-ABCL::MAKE-LAUNCH-SCRIPT).  This does 
not work under WIN32 currently.  An example of loading Alan Ruttenburg's 
JSS (aka 'invoke.lisp') is included.

   o  Reorders 'build-abcl.lisp' to get all the special variables 
declared before attempting to load BUILD-ABCL::*CUSTOMIZATIONS-FILE*

   o  The default launch script no longer includes the ABCL 'src' 
directory, relying purely on the stuff in 'abcl.jar'.  This seems to 
provide a two order of magnitude speed-up on ABCL boot time once the JAR 
gets mapped into memory.

I am not fully happy with the code, mainly with how much I changed 
BUILD-ABCL wrt. to arguments (I had a lot of useless and tricky 
&optional forms that should be gone now, but I need to review.)

Comments welcome,
Mark <evenson <at> panix.com>
(Continue reading)

Daniel White | 17 Aug 02:08

Line ending changes in recent commits.

Looks like the changes in 11286 and 11284 have been overshadowed by a
change in the line endings from cr to crlf.

--

-- 
Daniel White

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Blake McBride | 16 Aug 18:44

Load should intelligently load .abcl files


If I compile a files named ttt.lisp I get another file named ttt.abcl.  If I then type:

(load "ttt")

abcl loads "ttt.lisp".  As in many other lisps, it would be nice if load used the following algorithm:

1.  If a file extension is explicitly named, use it.  i.e.

    (load "ttt.lisp")
         or
    (load "ttt.abcl")

2.  If the user types:

    (load "ttt")

and there is only ttt.lisp OR ttt.abcl (but not both) load the one it finds.

3.  If both exist, load the one with the latest modification date.



This would allow code or users to load files (without the extension) and always (and automatically) get the correct one.

Thanks.

Blake McBride

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
armedbear-j-devel mailing list
armedbear-j-devel <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Russ McManus | 16 Aug 02:44

improved swank browsing for java objects


I got frustrated that I couldn't arbitrarily inspect java classes,
methods, and objects, and came up with the following.

Please give it a try and let me know what you think.

Note that I tried to implement this with EQL specializers and
DEFMETHOD, but apparently this is presently beyond the capability of
ABCL's CLOS implementation.

-russ

(defmethod swank:emacs-inspect ((java-object java-object))
  (emacs-inspect-java java-object))

(defun swank-backend::emacs-inspect-java-class (jclass)
  (flet ((jclass->name (jclass)
           (let* ((s (jclass-name jclass))
                  (prefix "java.lang.")
                  (lang-pos (search prefix s)))
             (if lang-pos
                 (subseq s (+ lang-pos (length prefix)))
                 s))))
    (append 
     `("Java Class: " ,(princ-to-string jclass) (:newline))
     `("Methods" (:newline))
     (loop for method across (jclass-methods jclass)
        for i = 0 then (1+ i)
        append (let ((args (mapcar #'jclass->name (coerce (jmethod-params method) 'list))))
                 `(,(format nil "[~2D] ~A ~A(~{~A~^,~}): ~40T" 
                            i 
                            (jclass->name (jmethod-return-type method))
                            (jmethod-name method)
                            args)
                    (:value ,method)
                    (:newline)))))))

(defun swank-backend::emacs-inspect-java-object (jobject)
  (let* ((jclass (jobject-class jobject))
         (fields (coerce (jclass-fields jclass) 'list)))
    (append 
     `("Java Object" ":" ,(princ-to-string jobject) (:newline))
     `("Java Class" ":" ,(jclass-name jclass)  " " (:value ,jclass) (:newline))
     `("Fields" (:newline))
     (loop for field in fields 
        for i = 0 then (1+ i)
        append `(,(format nil "[~2D] ~20A : " i (jfield-name field)) 
                  (:value ,(jcall (jmethod (jclass "java.lang.reflect.Field")
                                           "get"
                                           (jclass "java.lang.Object"))
                                  field
                                  jobject))
                  (:newline))))))

(defun swank-backend::emacs-inspect-java-method (jmethod)
  (let ((return-type (jcall (jmethod (jclass "java.lang.reflect.Method") "getReturnType") jmethod))
        (args (coerce (jmethod-params jmethod) 'list)))
    (setf args
          (mapcar (lambda (arg)
                    (jclass-name arg))
                  args))
    (append 
     `("Java Method: " ,(jmethod-name jmethod) (:newline))
     `("Return Type: " ,(jclass-name return-type) ": " (:value ,return-type) (:newline))
     (if args
         (append `("Arguments" (:newline))
                 (loop for arg in args
                    for i = 0 then (1+ i)
                    append `(,(format nil "[~2D] ~20A : " i arg) (:value ,arg) (:newline))))
         `("Arguments: none" (:newline))))))

(defun swank-backend::emacs-inspect-java (java-object)
  (flet ((is-a (class-name)
           (jinstance-of-p java-object (jclass class-name))))
    (cond ((is-a "java.lang.Class") 
           (swank-backend::emacs-inspect-java-class java-object))
          ((is-a "java.lang.reflect.Method")
           (swank-backend::emacs-inspect-java-method java-object))
          (t 
           (swank-backend::emacs-inspect-java-object java-object)))))

(defmethod swank:emacs-inspect ((java-object java-object))
  (swank-backend::emacs-inspect-java java-object))

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Russell McManus | 14 Aug 19:53

some pathname wildcard code


Something like the following might be useful in implementing support
for wild pathnames in DIRECTORY in abcl.

One issue that I aware of but did not address is that I used
STRING-EQUAL in a couple of places that might be incorrect on Windows
and/or OSX.

-russ

(defpackage :abcl-hacks
  (:use :common-lisp :java))

(in-package :abcl-hacks)

(defun make-name-and-type-matcher (pathname)
  (let ((name1 (pathname-name pathname))
        (type1 (pathname-type pathname)))
    (flet ((to-string (jstring)
             (jcall (jmethod (jclass "java.lang.String") "toString") jstring))
           (split-path-and-type (s)
             (let ((dot-pos (position #\. s)))
               (if dot-pos
                   (values (subseq s 0 dot-pos) (subseq s (1+ dot-pos)))
                   (values s "")))))
      (cond ((and (eql :wild name1)
                  (eql :wild type1))
             (lambda (jstring) 
               (declare (ignore jstring))
               t))
            ((eql :wild name1)
             (lambda (jstring)
               (multiple-value-bind (name2 type2) 
                   (split-path-and-type (to-string jstring))
                 (string-equal type1 type2))))
            ((eql :wild type1)
             (lambda (jstring)
               (multiple-value-bind (name2 type2) 
                   (split-path-and-type (to-string jstring))
                 (string-equal name1 name2))))
            (t 
             (lambda (jstring)
               (multiple-value-bind (name2 type2) 
                   (split-path-and-type (to-string jstring))
                 (and 
                  (string-equal type1 type2)
                  (string-equal name1 name2)))))))))

(defun find-matching-files (pathname)
  (let ((jfile-class (jclass "java.io.File"))
        (name-and-type-matcher (make-name-and-type-matcher pathname))
        (matches nil))
    (flet ((make-child (jfile child)
             (jnew (jconstructor jfile-class "java.io.File" "java.lang.String")
                   jfile child))
           (is-dir (jfile)
             (jcall (jmethod jfile-class "isDirectory") jfile))
           (is-file (jfile)
             (jcall (jmethod jfile-class "isFile") jfile))
           (children (jfile)
             (jcall (jmethod jfile-class "list") jfile)))
      (labels ((traverse (left-jfile subdirs)
                 (cond ((null subdirs)
                        (loop for jstring across (children left-jfile)
                             when (and (is-file (make-child left-jfile jstring))
                                       (funcall name-and-type-matcher jstring))
                             do (push (make-child left-jfile jstring) matches)))
                       ((eql :wild (car subdirs))
                        (let ((children (loop for jstring across (children left-jfile)
                                           collect (make-child left-jfile jstring))))
                          (mapc (lambda (child) (traverse child (cdr subdirs)))
                                (remove-if-not #'is-dir children))))
                       (t (traverse (make-child left-jfile (car subdirs))
                                    (cdr subdirs))))))
        (traverse (jnew (jconstructor jfile-class "java.lang.String")
                        (namestring (make-pathname :defaults pathname
                                                   :directory (list :absolute)
                                                   :name nil
                                                   :type nil)))
                  (cdr (pathname-directory pathname)))
        (mapcar (lambda (jfile)
                  (parse-namestring
                   (jcall (jmethod jfile-class "toString") jfile)))
                matches)))))

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Erik Huelsmann | 14 Aug 17:35

Re: New maintainer structure for ABCL

On Wed, Aug 13, 2008 at 4:24 AM, Blake McBride <blake <at> mcbride.name> wrote:
>
> Meta classes don't seem to work in ABCL.  For example:
>
> CL-USER(1): (defclass meta-class1 (standard-class) (cv1 cv2 cv3) (:metaclass
> standard-class))
> #<STANDARD-CLASS META-CLASS1 {75A744}>
> CL-USER(2): (defclass class1 (standard-object) (iv1 iv2 iv3) (:metaclass
> meta-class1))
> #<STANDARD-CLASS CLASS1 {4134E0}>
> CL-USER(3):
>
> The second return should have been:
> #<META-CLASS1 CLASS1 {4134E0}>
>
> I think ABCL is ignoring the :metaclass option.  Without the :metaclass
> option ABCL CLOS is very weak.

Right. When trying to run the ansi tests, it turned out that the long
form of DEFINE-METHOD-COMBINATION is also not implemented. That should
probably be considered a weak spot too.

Bye,

Erik.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Alan Ruttenberg | 14 Aug 16:53

feature request

Since there's some activity. I'd really like the ability to pop an  
asdf central registry directory into the abcl jar and have abcl be  
able to asdf load from there. Would really simplify packaging apps  
based on abcl.

-Alan

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Russ McManus | 14 Aug 16:28

behavior of DIRECTORY with wild pathnames


I have added a function of my own devising to
asdf:*system-definition-search-functions* that relies on DIRECTORY
doing something smart with wild pathnames.

I have no idea whether this is standard or not.  However I have
certainly noticed a difference between the behavior of abcl and sbcl
in this case.

In abcl on my system I get this:

CL-USER> (directory #P"/home/users/russm/work/lisp/*/*.asd")
NIL

But in sbcl on my system I get this:

CL-USER> (directory #P"/home/users/russm/work/lisp/*/*.asd")
(#P"/home/users/russm/work/lisp/asdf/cclan.asd"
 #P"/home/users/russm/work/lisp/cl-containers/cl-containers-test.asd"
 #P"/home/users/russm/work/lisp/cl-containers/cl-containers.asd"
 #P"/home/users/russm/work/lisp/cl-ppcre-1.3.2/cl-ppcre-test.asd"
 #P"/home/users/russm/work/lisp/cl-ppcre-1.3.2/cl-ppcre.asd"
 #P"/home/users/russm/work/lisp/cl-who-0.11.0/cl-who.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-aodbc.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-db2.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-mysql.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-odbc.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-oracle.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-postgresql-socket.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-postgresql.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-sqlite.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-sqlite3.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-tests.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql-uffi.asd"
 #P"/home/users/russm/work/lisp/clsql-4.0.3/clsql.asd"
 #P"/home/users/russm/work/lisp/flexi-streams-0.14.0/flexi-streams.asd"
 #P"/home/users/russm/work/lisp/iterate-1.4.3/iterate.asd"
 #P"/home/users/russm/work/lisp/ltk-0.91/ltk-mw.asd"
 #P"/home/users/russm/work/lisp/ltk-0.91/ltk-remote.asd"
 #P"/home/users/russm/work/lisp/ltk-0.91/ltk.asd"
 #P"/home/users/russm/work/lisp/metatilities/metatilities.asd"
 #P"/home/users/russm/work/lisp/slime/swank.asd"
 #P"/home/users/russm/work/lisp/trivial-gray-streams-2006-09-16/trivial-gray-streams.asd"
 #P"/home/users/russm/work/lisp/uffi-1.6.0/uffi-tests.asd"
 #P"/home/users/russm/work/lisp/uffi-1.6.0/uffi.asd")
CL-USER> 

Am I relying on non-standard behavior?  If not, perhaps I'll try to
fix abcl's DIRECTORY implementation.  If so, does anyone know how to
achieve something similar with abcl?

Thanks,

-russ

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Erik Huelsmann | 14 Aug 16:11

ArmedBear status with ANSI tests

Well, it looks like 3 conformance tests have been fixed since the last
update of the ABCL webpages on armedbear.org:

we're now at 64 failures only. This is the output:

64 out of 21702 total tests failed: LAMBDA.54, SYMBOL-MACROLET.ERROR.1,
   PSETQ.7, PSETF.7, DEFINE-SETF-EXPANDER.1, DEFINE-SETF-EXPANDER.6,
   DEFINE-SETF-EXPANDER.7, DEFUN.5, FLET.64, FLET.67, LABELS.43,
   LABELS.46, LABELS.47, MULTIPLE-VALUE-SETQ.5, MULTIPLE-VALUE-SETQ.8,
   REINITIALIZE-INSTANCE.ERROR.1, SHARED-INITIALIZE.ERROR.4,
   CHANGE-CLASS.1.11, CHANGE-CLASS.ERROR.4, MAKE-INSTANCE.ERROR.3,
   MAKE-INSTANCE.ERROR.4, DEFGENERIC.ERROR.20, DEFGENERIC.ERROR.21,
   DEFGENERIC.30, CALL-NEXT-METHOD.ERROR.1, CALL-NEXT-METHOD.ERROR.2,
   DEFMETHOD.ERROR.14, DEFMETHOD.ERROR.15, HANDLER-CASE.29,
   RESTART-CASE.29, RESTART-CASE.30, RESTART-CASE.31, RESTART-CASE.36,
   MAKE-CONDITION.3, MAKE-CONDITION.4, PUSH.5, POP.3, PUSHNEW.21,
   DELETE-PACKAGE.5, DELETE-PACKAGE.6, DO-ALL-SYMBOLS.6,
   DO-ALL-SYMBOLS.9, DO-ALL-SYMBOLS.12, IMPORT.ERROR.4, IMPORT.ERROR.5,
   MAP.48, MAP.SPECIALIZED-STRING.3, TYPE-OF.1, WITH-OUTPUT-TO-STRING.8,
   PRINT.RANDOM-STATE.1, PPRINT-FILL.14, PPRINT-FILL.15,
   PPRINT-LINEAR.14, PPRINT-TABULAR.13, PPRINT-LOGICAL-BLOCK.17,
   PPRINT-POP.7, PPRINT-POP.8, FORMAT.C.4A, FORMATTER.C.4A,
   FORMAT.LOGICAL-BLOCK.CIRCLE.1, FORMAT.LOGICAL-BLOCK.CIRCLE.2,
   FORMAT.LOGICAL-BLOCK.CIRCLE.3, COMPILE-FILE.17, COMPILE-FILE.18.
691.62 seconds real time
20145221 cons cells

And, ofcourse, any help on trying to fix them will be welcome!

Bye,

Erik.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Erik Huelsmann | 14 Aug 12:16

Migration to Subversion completed

The migration to subversion has completed: the CVS repository as per
last night has been loaded and the Code menu in the project pages has
been adjusted. The subversion repository can be checked out using the
subversion command

 $  svn co https://armedbear-j.svn.sourceforge.net/svnroot/armedbear-j/trunk/j
armedbear-j

Although the CVS menu item is no longer available, the old repository
is still there. Development efforts will be continued in the
Subversion repository however.

Bye,

Erik.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane