[GSoC 2014] Implementing a Python package so that calling Julia from Python is possible

259 views
Skip to first unread message

Z.Hang Chen

unread,
Mar 7, 2014, 12:14:35 AM3/7/14
to juli...@googlegroups.com
Hi, my name is Zihang Chen, a 3rd year undergraduate student from China. I first get to know Julia is last year when I was learning digital watermarks. (I was trying to find a substitution for Matlab which often leads to nasty code and lacks lots of dynamic programming features). I find Julia an ideal programming language for scientific computing.

Though I can code in Julia (with the help of documentation), I use Python heavily (3 years). And I have the experience of writing a C extension for Python to accelerate the calculation of AES (https://github.com/mad4alcohol/py-maes). I think it would be great if calling Julia from Python is possible so that Python users can take advantage of the professionality of Julia in scientific computing. Though there exists several packages (NumPy etc.), this proposal is still meaningful due to certain reasons (e.g. NumPy is just a package so there's no JIT acceleration etc.)

Additionally if there's enough time, I'd also like to implement a Ruby package which supports calling Julia from Ruby.

Looking forward to your comments. Thanks.

Qiang Kou

unread,
Mar 7, 2014, 10:20:27 AM3/7/14
to juli...@googlegroups.com
Hi, Chen,

I am also a newbie in Julia. My only advice is you should provide English document for your project, since most people on this list cannot read Chinese like us.

Best,

Qiang
--
Bueno es hablar, pero mejor es callar

Jiahao Chen

unread,
Mar 7, 2014, 12:02:10 PM3/7/14
to juli...@googlegroups.com
> I think it would be great if calling Julia from Python is possible so that Python users can take advantage of the professionality of Julia in scientific computing.

You may be interested in contributing to pyjulia:

https://github.com/jakebolewski/pyjulia

We suggested this as a GSoC project on our page:

http://julialang.org/gsoc/2014/#Project:.Calling.Julia.from.Python

If you are interested in this project, I would encourage you to start
playing around with ccall, which allows you to call C libraries from
Julia, and also with PyCall.jl, which implements the ability to call
Python from Julia. In your application, show us code that does
something interesting with ccall, Python and PyCall.jl. Your
application should demonstrate to us that you have the potential to
impress us with the final results.

Thanks,

Jiahao Chen, PhD
Staff Research Scientist
MIT Computer Science and Artificial Intelligence Laboratory

Jake Bolewski

unread,
Mar 7, 2014, 1:13:51 PM3/7/14
to juli...@googlegroups.com
Zihang Chen more than willing to help you get started with any specific questions you may have.  I unfortunately haven't had much time lately to work on this but I'm always willing to help out others.

Best, 
Jake

Steven G. Johnson

unread,
Mar 7, 2014, 1:36:42 PM3/7/14
to juli...@googlegroups.com
I can help mentor this project as well.

(Zihang, I wrote the PyCall package for calling Python from Julia.  Calling Julia from Python also uses PyCall to translate between Julia objects and Python objects... that way, all translation is done on the Julia side and only needs to be implemented once.)

Jiahao Chen

unread,
Mar 7, 2014, 2:18:32 PM3/7/14
to juli...@googlegroups.com
Zihang,

I notice that your implementation of AES in py-maes uses lookup tables
quite extensively, including tables for multiplying by 2, 3, 4, etc.
mod 256:

https://github.com/mad4alcohol/py-maes/blob/master/src/tables.c#L3

Is it really that much faster to store the precomputed values in these
arrays rather than to compute them as needed?
Thanks,

Jiahao Chen, PhD
Staff Research Scientist
MIT Computer Science and Artificial Intelligence Laboratory


On Fri, Mar 7, 2014 at 12:14 AM, Z.Hang Chen <chsc...@gmail.com> wrote:

Z.Hang Chen

unread,
Mar 8, 2014, 3:32:06 AM3/8/14
to juli...@googlegroups.com


在 2014年3月8日星期六UTC+8上午1时02分10秒,Jiahao Chen写道:
> I think it would be great if calling Julia from Python is possible so that Python users can take advantage of the professionality of Julia in scientific computing.

You may be interested in contributing to pyjulia:

https://github.com/jakebolewski/pyjulia

We suggested this as a GSoC project on our page:

http://julialang.org/gsoc/2014/#Project:.Calling.Julia.from.Python

If you are interested in this project, I would encourage you to start
playing around with ccall, which allows you to call C libraries from
Julia, and also with PyCall.jl, which implements the ability to call
Python from Julia. In your application, show us code that does
something interesting with ccall, Python and PyCall.jl. Your
application should demonstrate to us that you have the potential to
impress us with the final results.

Thanks for the suggestions. I'll try my best. 

Jiahao Chen

unread,
Mar 20, 2014, 11:53:33 PM3/20/14
to juli...@googlegroups.com
Please note that submissions close tomorrow, Friday, March 21 at 19:00
UTC and we cannot accept applications after that deadline.

If you would like to take up this project, I would encourage you to
send in an application based on your email as soon as possible to the
GSoC website (if you haven't done so already), taking into account
our suggested guidelines:

http://julialang.org/gsoc/guidelines/
Reply all
Reply to author
Forward
0 new messages