JNIPort preview for Pharo available on SqueakSource

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

JNIPort preview for Pharo available on SqueakSource

Joachim Geidel
JNIPort preview for Pharo available on SqueakSource I have made a preview release of JNIPort for Pharo/Squeak available on SqueakSource:
    http://www.squeaksource.com/JNIPort.html

JNIPort is a Smalltalk  library which allows Java code to be invoked from Smalltalk. It acts as a bridge between the world of Smalltalk objects and a Java Virtual Machine (JVM) where Java code is executing.

If you want to know what can be done with JNIPort, see
    http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
for an example.

Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ for more information about JNIPort.

The current state of the Pharo/Squeak version of JNIPort (as of 7 June 2010):
  • Callbacks from Java to Smalltalk are not yet supported.
  • In contrast to VisualWorks and Dolphin, JNIPort does not create ghost classes as wrappers for Java classes, but creates “real” classes which can be seen in the system browser. It also does not copy prototypes of CompiledMethods when a wrapper class or a Java class is created, because this causes VM failures in Pharo 1.0. Instead, methods are compiled from source code. This has a performance impact, of course.
  • Another difference from the VisualWorks and Dolphin versions is that wrappers for Java methods without arguments don’t have selectors ending with an awkward “_null” suffix.
  • JNIPort has been developed and tested with Pharo 1.0 on Mac OS X 10.6.3. If it works in Squeak and on other operating systems has yet to be tested.
  • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but this needed some manual modifications of Alien – without them Alien causes problems in Pharo 1.1.
  • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in Pharo 1.0. I don’t know yet why.
  • I don’t have a Metacello configuration yet.

The next steps will be:
  • Adding support for callbacks from Java to Smalltalk.
  • Testing it on more platforms.
  • Reorganization of the documentation on the JNIPort wiki, and addition of Pharo/Squeak specific documentation similar to the documentation for the VisualWorks version.
  • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when everything is stable. This will be after the release of Pharo 1.1.

If it works in Squeak 4.1 or on Linux or Windows, please let me know, especially if you had to do something which might be worth mentioning in the installation instructions.

Have fun with JNIPort, and let me know if it works!

Joachim Geidel

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

Mariano Martinez Peck
great work. Congratulations. I cc'ed pharo mailing list.

cheers

mariano

On Mon, Jun 7, 2010 at 7:07 PM, Joachim Geidel <[hidden email]> wrote:
I have made a preview release of JNIPort for Pharo/Squeak available on SqueakSource:
    http://www.squeaksource.com/JNIPort.html

JNIPort is a Smalltalk  library which allows Java code to be invoked from Smalltalk. It acts as a bridge between the world of Smalltalk objects and a Java Virtual Machine (JVM) where Java code is executing.

If you want to know what can be done with JNIPort, see
    http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
for an example.

Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ for more information about JNIPort.

The current state of the Pharo/Squeak version of JNIPort (as of 7 June 2010):
  • Callbacks from Java to Smalltalk are not yet supported.
  • In contrast to VisualWorks and Dolphin, JNIPort does not create ghost classes as wrappers for Java classes, but creates “real” classes which can be seen in the system browser. It also does not copy prototypes of CompiledMethods when a wrapper class or a Java class is created, because this causes VM failures in Pharo 1.0. Instead, methods are compiled from source code. This has a performance impact, of course.
  • Another difference from the VisualWorks and Dolphin versions is that wrappers for Java methods without arguments don’t have selectors ending with an awkward “_null” suffix.
  • JNIPort has been developed and tested with Pharo 1.0 on Mac OS X 10.6.3. If it works in Squeak and on other operating systems has yet to be tested.
  • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but this needed some manual modifications of Alien – without them Alien causes problems in Pharo 1.1.
  • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in Pharo 1.0. I don’t know yet why.
  • I don’t have a Metacello configuration yet.

The next steps will be:
  • Adding support for callbacks from Java to Smalltalk.
  • Testing it on more platforms.
  • Reorganization of the documentation on the JNIPort wiki, and addition of Pharo/Squeak specific documentation similar to the documentation for the VisualWorks version.
  • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when everything is stable. This will be after the release of Pharo 1.1.

If it works in Squeak 4.1 or on Linux or Windows, please let me know, especially if you had to do something which might be worth mentioning in the installation instructions.

Have fun with JNIPort, and let me know if it works!

Joachim Geidel

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users



_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

Stéphane Ducasse
In reply to this post by Joachim Geidel
Cool we are really busy but really interested.
We want to connect moose to java.... so what you are doing and also johan is key for us.

On Jun 7, 2010, at 7:07 PM, Joachim Geidel wrote:

> I have made a preview release of JNIPort for Pharo/Squeak available on SqueakSource:
>     http://www.squeaksource.com/JNIPort.html
>
> JNIPort is a Smalltalk  library which allows Java code to be invoked from Smalltalk. It acts as a bridge between the world of Smalltalk objects and a Java Virtual Machine (JVM) where Java code is executing.
>
> If you want to know what can be done with JNIPort, see
>     http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
> for an example.
>
> Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ for more information about JNIPort.
>
> The current state of the Pharo/Squeak version of JNIPort (as of 7 June 2010):
> • Callbacks from Java to Smalltalk are not yet supported.
> • In contrast to VisualWorks and Dolphin, JNIPort does not create ghost classes as wrappers for Java classes, but creates “real” classes which can be seen in the system browser. It also does not copy prototypes of CompiledMethods when a wrapper class or a Java class is created, because this causes VM failures in Pharo 1.0. Instead, methods are compiled from source code. This has a performance impact, of course.
> • Another difference from the VisualWorks and Dolphin versions is that wrappers for Java methods without arguments don’t have selectors ending with an awkward “_null” suffix.
> • JNIPort has been developed and tested with Pharo 1.0 on Mac OS X 10.6.3. If it works in Squeak and on other operating systems has yet to be tested.
> • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but this needed some manual modifications of Alien – without them Alien causes problems in Pharo 1.1.
> • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in Pharo 1.0. I don’t know yet why.
> • I don’t have a Metacello configuration yet.
>
> The next steps will be:
> • Adding support for callbacks from Java to Smalltalk.
> • Testing it on more platforms.
> • Reorganization of the documentation on the JNIPort wiki, and addition of Pharo/Squeak specific documentation similar to the documentation for the VisualWorks version.
> • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when everything is stable. This will be after the release of Pharo 1.1.
>
> If it works in Squeak 4.1 or on Linux or Windows, please let me know, especially if you had to do something which might be worth mentioning in the installation instructions.
>
> Have fun with JNIPort, and let me know if it works!
>
> Joachim Geidel
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

Tudor Girba
Indeed, we are very much interested in all this work!

Doru


On 8 Jun 2010, at 17:13, Stéphane Ducasse wrote:

> Cool we are really busy but really interested.
> We want to connect moose to java.... so what you are doing and also  
> johan is key for us.
>
> On Jun 7, 2010, at 7:07 PM, Joachim Geidel wrote:
>
>> I have made a preview release of JNIPort for Pharo/Squeak available  
>> on SqueakSource:
>>    http://www.squeaksource.com/JNIPort.html
>>
>> JNIPort is a Smalltalk  library which allows Java code to be  
>> invoked from Smalltalk. It acts as a bridge between the world of  
>> Smalltalk objects and a Java Virtual Machine (JVM) where Java code  
>> is executing.
>>
>> If you want to know what can be done with JNIPort, see
>>    http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
>> for an example.
>>
>> Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ 
>>  for more information about JNIPort.
>>
>> The current state of the Pharo/Squeak version of JNIPort (as of 7  
>> June 2010):
>> • Callbacks from Java to Smalltalk are not yet supported.
>> • In contrast to VisualWorks and Dolphin, JNIPort does not create  
>> ghost classes as wrappers for Java classes, but creates “real”  
>> classes which can be seen in the system browser. It also does not  
>> copy prototypes of CompiledMethods when a wrapper class or a Java  
>> class is created, because this causes VM failures in Pharo 1.0.  
>> Instead, methods are compiled from source code. This has a  
>> performance impact, of course.
>> • Another difference from the VisualWorks and Dolphin versions is  
>> that wrappers for Java methods without arguments don’t have  
>> selectors ending with an awkward “_null” suffix.
>> • JNIPort has been developed and tested with Pharo 1.0 on Mac OS X  
>> 10.6.3. If it works in Squeak and on other operating systems has  
>> yet to be tested.
>> • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but  
>> this needed some manual modifications of Alien – without them Alien  
>> causes problems in Pharo 1.1.
>> • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in  
>> Pharo 1.0. I don’t know yet why.
>> • I don’t have a Metacello configuration yet.
>>
>> The next steps will be:
>> • Adding support for callbacks from Java to Smalltalk.
>> • Testing it on more platforms.
>> • Reorganization of the documentation on the JNIPort wiki, and  
>> addition of Pharo/Squeak specific documentation similar to the  
>> documentation for the VisualWorks version.
>> • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when  
>> everything is stable. This will be after the release of Pharo 1.1.
>>
>> If it works in Squeak 4.1 or on Linux or Windows, please let me  
>> know, especially if you had to do something which might be worth  
>> mentioning in the installation instructions.
>>
>> Have fun with JNIPort, and let me know if it works!
>>
>> Joachim Geidel
>> _______________________________________________
>> Pharo-users mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

--
www.tudorgirba.com

"Not knowing how to do something is not an argument for how it cannot  
be done."


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

jfabry
In reply to this post by Stéphane Ducasse

The problem with the Moose and reasoning about Java thing (I think this is what you are thinking about) is to keep the importer maintained, as Doru convinced me. In the end the infusion way works OK for me, so right now I am not looking for another solution. If one presents itself I am happy to give it a try :-)

On 08 Jun 2010, at 11:13, Stéphane Ducasse wrote:

> Cool we are really busy but really interested.
> We want to connect moose to java.... so what you are doing and also johan is key for us.
>
> On Jun 7, 2010, at 7:07 PM, Joachim Geidel wrote:
>
>> I have made a preview release of JNIPort for Pharo/Squeak available on SqueakSource:
>>    http://www.squeaksource.com/JNIPort.html
>>
>> JNIPort is a Smalltalk  library which allows Java code to be invoked from Smalltalk. It acts as a bridge between the world of Smalltalk objects and a Java Virtual Machine (JVM) where Java code is executing.
>>
>> If you want to know what can be done with JNIPort, see
>>    http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
>> for an example.
>>
>> Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ for more information about JNIPort.
>>
>> The current state of the Pharo/Squeak version of JNIPort (as of 7 June 2010):
>> • Callbacks from Java to Smalltalk are not yet supported.
>> • In contrast to VisualWorks and Dolphin, JNIPort does not create ghost classes as wrappers for Java classes, but creates “real” classes which can be seen in the system browser. It also does not copy prototypes of CompiledMethods when a wrapper class or a Java class is created, because this causes VM failures in Pharo 1.0. Instead, methods are compiled from source code. This has a performance impact, of course.
>> • Another difference from the VisualWorks and Dolphin versions is that wrappers for Java methods without arguments don’t have selectors ending with an awkward “_null” suffix.
>> • JNIPort has been developed and tested with Pharo 1.0 on Mac OS X 10.6.3. If it works in Squeak and on other operating systems has yet to be tested.
>> • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but this needed some manual modifications of Alien – without them Alien causes problems in Pharo 1.1.
>> • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in Pharo 1.0. I don’t know yet why.
>> • I don’t have a Metacello configuration yet.
>>
>> The next steps will be:
>> • Adding support for callbacks from Java to Smalltalk.
>> • Testing it on more platforms.
>> • Reorganization of the documentation on the JNIPort wiki, and addition of Pharo/Squeak specific documentation similar to the documentation for the VisualWorks version.
>> • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when everything is stable. This will be after the release of Pharo 1.1.
>>
>> If it works in Squeak 4.1 or on Linux or Windows, please let me know, especially if you had to do something which might be worth mentioning in the installation instructions.
>>
>> Have fun with JNIPort, and let me know if it works!
>>
>> Joachim Geidel
>> _______________________________________________
>> Pharo-users mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

Tudor Girba
Hi Johan,

It is not only reasoning about Java. A connection to Java is very  
useful to communicate with Java libraries (for example, graph  
libraries).

Also, what Johan Brichau did in VW was to directly query Eclipse for  
reasoning about Java. Pretty cool :)

Cheers,
Doru


On 8 Jun 2010, at 23:27, Johan Fabry wrote:

>
> The problem with the Moose and reasoning about Java thing (I think  
> this is what you are thinking about) is to keep the importer  
> maintained, as Doru convinced me. In the end the infusion way works  
> OK for me, so right now I am not looking for another solution. If  
> one presents itself I am happy to give it a try :-)
>
> On 08 Jun 2010, at 11:13, Stéphane Ducasse wrote:
>
>> Cool we are really busy but really interested.
>> We want to connect moose to java.... so what you are doing and also  
>> johan is key for us.
>>
>> On Jun 7, 2010, at 7:07 PM, Joachim Geidel wrote:
>>
>>> I have made a preview release of JNIPort for Pharo/Squeak  
>>> available on SqueakSource:
>>>   http://www.squeaksource.com/JNIPort.html
>>>
>>> JNIPort is a Smalltalk  library which allows Java code to be  
>>> invoked from Smalltalk. It acts as a bridge between the world of  
>>> Smalltalk objects and a Java Virtual Machine (JVM) where Java code  
>>> is executing.
>>>
>>> If you want to know what can be done with JNIPort, see
>>>   http://philemonworks.wordpress.com/2010/04/29/google-api-access-from-smalltalk-using-jniport/
>>> for an example.
>>>
>>> Installation instructions are on the Wiki at SqueakSource. See http://jniport.wikispaces.com/ 
>>>  for more information about JNIPort.
>>>
>>> The current state of the Pharo/Squeak version of JNIPort (as of 7  
>>> June 2010):
>>> • Callbacks from Java to Smalltalk are not yet supported.
>>> • In contrast to VisualWorks and Dolphin, JNIPort does not create  
>>> ghost classes as wrappers for Java classes, but creates “real”  
>>> classes which can be seen in the system browser. It also does not  
>>> copy prototypes of CompiledMethods when a wrapper class or a Java  
>>> class is created, because this causes VM failures in Pharo 1.0.  
>>> Instead, methods are compiled from source code. This has a  
>>> performance impact, of course.
>>> • Another difference from the VisualWorks and Dolphin versions is  
>>> that wrappers for Java methods without arguments don’t have  
>>> selectors ending with an awkward “_null” suffix.
>>> • JNIPort has been developed and tested with Pharo 1.0 on Mac OS  
>>> X 10.6.3. If it works in Squeak and on other operating systems has  
>>> yet to be tested.
>>> • I have briefly tested JNIPort with Pharo 1.1 beta 11367, but  
>>> this needed some manual modifications of Alien – without them  
>>> Alien causes problems in Pharo 1.1.
>>> • In Pharo 1.1, starting a JVM needs 11 seconds vs. 4 seconds in  
>>> Pharo 1.0. I don’t know yet why.
>>> • I don’t have a Metacello configuration yet.
>>>
>>> The next steps will be:
>>> • Adding support for callbacks from Java to Smalltalk.
>>> • Testing it on more platforms.
>>> • Reorganization of the documentation on the JNIPort wiki, and  
>>> addition of Pharo/Squeak specific documentation similar to the  
>>> documentation for the VisualWorks version.
>>> • Release of JNIPort 2.0 for VisualWorks and Pharo/Squeak when  
>>> everything is stable. This will be after the release of Pharo 1.1.
>>>
>>> If it works in Squeak 4.1 or on Linux or Windows, please let me  
>>> know, especially if you had to do something which might be worth  
>>> mentioning in the installation instructions.
>>>
>>> Have fun with JNIPort, and let me know if it works!
>>>
>>> Joachim Geidel
>>> _______________________________________________
>>> Pharo-users mailing list
>>> [hidden email]
>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>>
>>
>> _______________________________________________
>> Pharo-users mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
>
> --
> Johan Fabry
> [hidden email] - http://dcc.uchile.cl/~jfabry
> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
>
>
>
>
> _______________________________________________
> Pharo-users mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users

--
www.tudorgirba.com

"Reasonable is what we are accustomed with."


_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

Stéphane Ducasse

On Jun 9, 2010, at 7:35 AM, Tudor Girba wrote:

> Hi Johan,
>
> It is not only reasoning about Java. A connection to Java is very useful to communicate with Java libraries (for example, graph libraries).
+1
such as a PHP parser
> Also, what Johan Brichau did in VW was to directly query Eclipse for reasoning about Java. Pretty cool :)
>
> Cheers,
> Doru
>
>

_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
Reply | Threaded
Open this post in threaded view
|

Re: JNIPort preview for Pharo available on SqueakSource

jfabry
In reply to this post by Tudor Girba

On 09 Jun 2010, at 01:35, Tudor Girba wrote:

> Hi Johan,
>
> It is not only reasoning about Java. A connection to Java is very useful to communicate with Java libraries (for example, graph libraries).

True, I was just considering my point of view because my name propped up :-)

> Also, what Johan Brichau did in VW was to directly query Eclipse for reasoning about Java. Pretty cool :)


Yes, penumbra is very cool. We used it in the first version of AspectMaps built on VW. Penumbra is what I wanted Irish to be in my time, but at that time Eclipse did not have sub-method granularity for the Java code. The difficulties with the penumbra way is that Eclipse is a horrible beast to work on because of its complexity (I have some nice plugin horror stories). So Respect to JohanB for getting it working in the first place, and I understand why there is nothing like this for Pharo (yet).

--
Johan Fabry  
[hidden email] - http://dcc.uchile.cl/~jfabry
PLEIAD Lab - Computer Science Department (DCC) - University of Chile




_______________________________________________
Pharo-users mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users