status of runtime-class.lisp?

5 messages Options
Embed this post
Permalink
Alan Ruttenberg-2

status of runtime-class.lisp?

Reply Threaded More More options
Print post
Permalink
I was interested in using this facility, but it doesn't seem to work.
Does anyone know that it still should?
AFAIK it needs the asm 1.5.3 jars. Here's the invocation I did:

java -cp ./abcl.jar:asm-1.5.3.jar:asm-analysis-1.5.3.jar:asm-attrs-1.5.3.jar:asm-tree-1.5.3.jar:asm-util-1.5.3.jar:asm-xml-1.5.3.jar:kasm-1.5.3.jar
org.armedbear.lisp.Main

(java:jnew-runtime-class "TestClass" "java.lang.Object" nil '((nil
(lambda(&rest ignore)))) `(("test" "int" nil ,#'(lambda (&rest ignore)
1 )))

I get "evalutation aborted" or "too many nested errors" when I try this.

-Alan

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Russell McManus

Re: status of runtime-class.lisp?

Reply Threaded More More options
Print post
Permalink

I have a patch ready that gets things working with asm3.1

I would be happy to do the final bits of work to get the patch applied, assuming the maintainers are ok with it.

Let me know if you're interested.

-russ




----- Original Message ----

> From: Alan Ruttenberg <[hidden email]>
> To: armedbear-j-devel <[hidden email]>
> Sent: Thursday, May 21, 2009 12:30:34 PM
> Subject: [j-devel] status of runtime-class.lisp?
>
> I was interested in using this facility, but it doesn't seem to work.
> Does anyone know that it still should?
> AFAIK it needs the asm 1.5.3 jars. Here's the invocation I did:
>
> java -cp
> ./abcl.jar:asm-1.5.3.jar:asm-analysis-1.5.3.jar:asm-attrs-1.5.3.jar:asm-tree-1.5.3.jar:asm-util-1.5.3.jar:asm-xml-1.5.3.jar:kasm-1.5.3.jar
> org.armedbear.lisp.Main
>
> (java:jnew-runtime-class "TestClass" "java.lang.Object" nil '((nil
> (lambda(&rest ignore)))) `(("test" "int" nil ,#'(lambda (&rest ignore)
> 1 )))
>
> I get "evalutation aborted" or "too many nested errors" when I try this.
>
> -Alan
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals. Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
> _______________________________________________
> armedbear-j-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Ville Voutilainen

Re: status of runtime-class.lisp?

Reply Threaded More More options
Print post
Permalink
On Thu, May 21, 2009 at 9:00 PM, Russell McManus
<[hidden email]> wrote:
> I have a patch ready that gets things working with asm3.1
> I would be happy to do the final bits of work to get the patch applied, assuming the maintainers are ok with it.
> Let me know if you're interested.

Definitely, I think it's a nice bit of functionality. I am certainly
looking forward to having&using it.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Erik Huelsmann

Re: status of runtime-class.lisp?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Alan Ruttenberg-2
On Thu, May 21, 2009 at 7:30 PM, Alan Ruttenberg
<[hidden email]> wrote:

> I was interested in using this facility, but it doesn't seem to work.
> Does anyone know that it still should?
> AFAIK it needs the asm 1.5.3 jars. Here's the invocation I did:
>
> java -cp ./abcl.jar:asm-1.5.3.jar:asm-analysis-1.5.3.jar:asm-attrs-1.5.3.jar:asm-tree-1.5.3.jar:asm-util-1.5.3.jar:asm-xml-1.5.3.jar:kasm-1.5.3.jar
> org.armedbear.lisp.Main
>
> (java:jnew-runtime-class "TestClass" "java.lang.Object" nil '((nil
> (lambda(&rest ignore)))) `(("test" "int" nil ,#'(lambda (&rest ignore)
> 1 )))
>
> I get "evalutation aborted" or "too many nested errors" when I try this.

Hi Alan,

I don't know which revision ABCL you used and whether the
jnew-runtime-class "thing" uses our compiler, but loading the COMPILE
function was broken for about 2 or 3 days last week. I understand the
autoloader better now and I fixed it again.

Maybe that explains part of your issues?

Bye,

Erik.

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel
Alan Ruttenberg-2

Re: status of runtime-class.lisp?

Reply Threaded More More options
Print post
Permalink
In reply to this post by Ville Voutilainen
There is an issue in that if one tries to create a runtime class that is not in a package, it causes an error. I don't know why, nor does Russel, so until we do I suggest we add the following at the entry to jnew-runtime-class

(assert (find #\. class-name :test 'char=) (class-name)
 "Runtime classes need to be in some package and '~a' isn't" class-name)

-Alan

On Fri, May 22, 2009 at 9:11 AM, Russell McManus <[hidden email]> wrote:
OK, here's the patch.  The simplest test case that I have works, but some of the more
complicated test cases that I have for this code are not presently working because of
recent abcl changes.

You need asm3.1 in class path for this.

I have another patch somewhere, not included here, that allows you to redefine
java classes on the fly. This is necessary if you really want to work in a lispy
style, changing things at will.  I'll try to dig this up and submit it as well.

You have to manually load src/org/armedbear/lisp/runtime-class.lisp.

Here is the simplest case:

(jnew-runtime-class
 "FOO.Bar3" "java.lang.Object"
 nil     ;;interfaces
 nil     ;;constructors
 `(("a_method"  ;;name
   "int"       ;;return type
   ("int" "int")                               ;;argument types
   (lambda (x y &optional this)
     (+ x y))  ;;the method itself
   "public"))
 ;;methods
 nil                  ;;fields
 "/tmp/Bar.class"     ;; this is optional
 )

(let ((bar (jnew (jconstructor "FOO.Bar3"))))
 (jcall (jmethod "FOO.Bar3" "a_method" "int" "int") bar 1 2))

-russ


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com 
_______________________________________________
armedbear-j-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/armedbear-j-devel