The Living Thing / Notebooks :

Julia interoperation and IO

Usefulness: πŸ”§ πŸ”§ πŸ”§
Novelty: πŸ’‘
Uncertainty: πŸ€ͺ πŸ€ͺ
Incompleteness: 🚧 🚧

IO and interoperation for Julia. Closely related: Julia GUIs and networking.

API, FFIs

See the API list

C

Sort of easy, but there is a tedious need to define the call signature at call time. Survivable.

R

XRJulia:

This package provides an interface from R to Julia, based on the XR structure, as implemented in the XR package, in this repository.

RJulia:

rJulia provides an interface between R and Julia. It allows a user to run a script in Julia from R, and maps objects between the two languages.

Python

tl;dr: For fish

conda create -n conda_jl python nomkl
conda activate conda_jl
env CONDA_JL_HOME="$HOME/miniconda3/envs/conda_jl" \
    CONDA_JL_VERSION=3 \
    PYTHON=(which python) \
    JUPYTER=(which jupyter) \
    julia
using Pkg
Pkg.add("IJulia")
Pkg.resolve()
Pkg.build()

For bash

conda create -n conda_jl python nomkl
conda activate conda_jl
CONDA_JL_HOME="$HOME/miniconda3/envs/conda_jl" \
    CONDA_JL_VERSION=3 \
    PYTHON=`which python` \
    JUPYTER=`which jupyter` \
    julia
using Pkg
Pkg.add("IJulia")
Pkg.resolve()
Pkg.build()

Taking that apart:

PyCall.jl invokes python. Per default it installs yet another conda python, via Conda.jl, and defaults to the elderly python 2.7. This is irritating for various reasons, such as being ancient, and eating your diskspace with yet more versions of the same stuff that you already have installed in even more decrepit a state.

Here is how to use an existing version:

env PYTHON=(which python3) \
    julia
Pkg.build("PyCall")

Here is how you use Conda, but with python 3:

ENV["CONDA_JL_VERSION"] = "3"
Pkg.build("Conda")

Here is how you use an existing environment

conda create -n conda_jl python
export CONDA_JL_HOME=~/miniconda3/envs/conda_jl
julia -e 'Pkg.build("Conda")'

Either way you should regularly run conda clean to stop your disk filling up with obsolete versions of obscure dependencies for that package you tried out that one time as per standard practice.

conda clean -pt

Data loading/saving/exchange

The names are nearly all self explaining