What is the plan for Julia 1.0 and Python 3.X? In particular Conda?
My company uses Conda, and I want to introduce Julia for core algorithms. So, I want to make Julia invisible to most developers, and not require them to use one of the PyJulia workarounds.
As far as I know, pyjulia is currently the only method for calling Julia from Python. What issues/workarounds are you having trouble with?
As far as plans, there has been some discussion, but no real progress. Unfortunately, bindings from external languages arenāt the most popular thing for people to voluntarily work on, since āpeople who like to write Julia codeā donāt directly benefit themselves from that work (whereas bindings to external languages can still be useful, i.e. PyCall is handy for when there is no existing Julia library). I would guess that this is probably going to require someone to contribute either effort or money to make it happen.
OK. Sounds like I should should volunteer, except I am new to Julia
I am hoping that Julia can be a bridge from Research to Product in my company. Researchers all use Python/Jupyter, and the product is completely Javaā¦ and Python and Java do not play nice together.
Since Julia can talk to both, and is a superior way to develop machine learning, I would like to use it to develop the core code common to both Research and the Product.
I have already succeeded with a Julia via JNI interface for the Java product, now I am thinking about Python research code.
Itās not clear what workarounds you are talking about. Are you referring to python-jl? If your coworkers only/primary use Jupyter, one easy trick you can do is to setup kernel.json for them so that they can use PyJulia without them noticing they are using a workaround. PyCall.jl should also be configured to use their conda installation in this case.
I would suggest starting with pyjulia: look into how it works, and ask for suggestions on here, Slack or the issue threads,
Unfortunately writing cross-language bindings is far from easy: you need to learn a lot about the internals of two different languages then make them do things they werenāt designed to do, such as getting reference counters to play nice with garbage collectors. But it can also be a great way to learn!
There is no issue with PyJulia-- it works as documented (very nice)
I want to sell Julia into a Python/Conda organization, so integration is a central issue, and telling everyone that they need to run this āspecialā Python interpreter (python-jl) is obviously a big negative.
However, reading a bit deeper, this is a problem with Python/Conda not Julia. There may be no fix at this end.
But thank you for making Julia āplay niceā with other languages
P
Iām curious what you are referring to. Conda is reasonably language-agnostic, so distributing wrapped Julia code should be a lot simpler than any potential pyjulia issues.
As I understand it, Conda installs a statically linked Python interpreter. PyJulia requires the Python core to be a dynamically linked library, so it can call it.
I am guessing that trying to access the internals of a statically linked executable is very hard, and likely to break.
If you want to avoid PyCall/PyJulia issues at all cost, you can use libjulia through ctypes (or cffi) after compiling your Julia code using PyackageCompiler. Here is an example using ctypes: AOT compiling using PackageCompiler - #8 by tkf
But I imagine it requires a lot of boilerplate code since you have to bridge two GCāed languages manually and the values have to be passed around through C-compatible types (like int, double, pointers, etc.).