On 9/28/2010 4:56 PM, Alberto Bacchelli wrote:
Hi,

 Is there any way to make Pharo and Python communicate?

Thanks,
 Alberto
On 28 September 2010 20:10, Alexandre Bergel <alexandre@bergel.eu> wrote:
> Hi!
>
> Is there a statistic library in Pharo?
> Computing the correlation, linear regression, ...
>
> Cheers,
Hi Alexandre,

 My question about a connection between Pharo and Python [1] is
related to the issue you are reporting.
In Python, they have numpy [2], which offers almost anything one would
need for statistics, algebra, ...
Instead of re-implementing everything in Pharo (aka re-inventing the wheel),
imho, it would be much better to be able to exploit the good work
already done by these smart people.

My interest to Alien FFI is also related: Instead of using numpy, one
could use the external interface offered by MATLAB [3] (in the form of
C APIs) to let it do the number crunching. Even though the MATLAB
external interface is very simple and clean, I have not being able to
use it from Pharo, yet, because I cannot make Alien work under Linux
(where my MATLAB resides). I have also tried nativeboost, but I am
still not able to create the VM with the necessary plugin to make it
work.
It is very frustrating: Even if I am working with Fernando (who knows
Alien very good), in three days we have not reach any target.

It would be awesome if someone else wanted to give me a hand with this task:
I believe It would be of interest for many of us.

Cheers,
 Alberto

Hello Alberto,

I have been much in the same situation. I am developing a financial technical analysis application in Pharo. Part of my requirements are the use of a Windows COM dll. I do not have the ability to use that dll from within Pharo. (My skills are too limited)  I have written the front end/back end of my application in Python interfacing the dll and the financial server. I am writing the middle part of the application in Pharo using Seaside. My Python app will call my Seaside app with the necessary data and my Seaside app will provide the Python app the necessary actions. This also enables me to provide a web interface to my application.

Numpy is an attractive option. I have been a long time Squeak (and now Pharo) user. I much prefer Pharo to Python. With my learning about the Matrix class I wasn't as dependent on Numpy. I switched to Pharo. Presently I am providing my own calculations and formulas and wasn't dependent on the statistics in Numpy.

I would love to drop the Python dependency completely. Hopefully in time that will come.

Any way, that is how I am using Python and Pharo.

Jimmie