Pharo / J - Integration

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

Pharo / J - Integration

Torsten Bergmann
Stef wrote:
>Hi Martin
>
>I imagine that you know the OOPAL paper showing APL + Objects because it
>would be cool to have it for Pharo :).

Hi Stef,

do you know:  http://astares.blogspot.de/2014/10/apl-concepts-in-pharo.html

Bye
T.

Reply | Threaded
Open this post in threaded view
|

Re: Pharo / J - Integration

Martin Saurer
Hi Stef

Sorry, I didn't know the OOPAL paper until this evening :)

I read through it very quickly, and I think it's a somewhat different approach I have to
think about.
To me the OOPAL concept looks like a smalltalk language extension, but with smalltalk
oriented syntax, that is able to handle arrays in an easy and efficient way (without loops).
The current Pharo/J integration is some sort of regular expression for math and array
handling and manipulation from within Pharo.
Personally I think the very compact (and sometimes cryptic) syntax of J is one of it's
biggest advantages. It's not as easy to read and understand like smalltalk, but very
efficient if you got some experience (like regex for strings).
In my opinion, the OOPAL approach would be a set of smalltalk classes and methods
which accesses an underlying array engine (like J). Please correct me, if I'm wrong.

Currently, I'm unsure which approach is better. From a smalltalk point of view, the OOPAL
approach is clearer. If you know both Pharo and J, it doesn't really matter. You can program
all the enclosing stuff of a desktop- or web-application in Pharo, and just hack the number-
crunching part (if there is one) in J.

But again, I have to re-think about it ...

Martin

> Hi martin
>
> I imagine that you know the OOPAL paper showing APL + Objects because it
> would be cool to have it for Pharo :).
>
> Stef


Reply | Threaded
Open this post in threaded view
|

Re: Pharo / J - Integration

Martin Saurer
In reply to this post by Torsten Bergmann
Hi Torsten

To re-implement APL or J capabilities in pure smalltalk is an interesting approach.
The problem I see currently is the performance when handling large arrays with
thousands or millions of rows and/or columns.

During some performance tests I saw that for arrays with a few hundred rows/cols, the
calculation speed of Pharo and J is nearly the same.
When handling arrays with thousands or a few millions of rows/cols, J is 7-10 times faster
than Pharo.

During the last decades, J has been optimized explicitly to handle (very) large arrays.
In my opinion, it would be difficult to get the same processing speed in pure smalltalk.
That's not a disadvantage of smalltalk, it's simply the nature of different languages.

Martin 

> Stef wrote:
>> Hi Martin
>>
>> I imagine that you know the OOPAL paper showing APL + Objects because it
>> would be cool to have it for Pharo :).
>
> Hi Stef,
>
> do you know:  http://astares.blogspot.de/2014/10/apl-concepts-in-pharo.html
>
> Bye
> T.