ityonemo

ityonemo

Julia + elixir

Spinning this off in a new thread because I think it’s interesting and merits its own discussion. Agree with @hauleth that the basis should be spinning up a c-node inside of julia, but it’s going to need a bit more than that. A few questions:

  • How to manage Julia versions to run on
  • Julia has a --worker node setting, should we use that?
  • How do you load up the correct dependencies? Also, julia annoyingly uses global dependencies, more like python than elixir, which has project-level dependencies.
  • Is there something really high performance that one could do like memmapping memory segments and passing data across that way? How do you detect if that capability exists? (windows? Linux? MacOS? etc)

Separately, would anybody be interested in doing a collab on this for SpawnFest 2020?

Most Liked

hcs42

hcs42

We use Erlang+Julia in production.

We use Julia’s package compiler to create shared object files that contain the compiled version of our Julia code, its dependencies, and the Julia runtime itself. Then in Erlang we start a new operating system process (erlang:open_port/2) and run our Julia code. Our Julia code is listening for requests on its standard input and sends the responses to its standard output. (This part was inspired by https://github.com/hdima/erlport.) We plan to modify our code to use sockets instead of standard IO.

ityonemo

ityonemo

OK, I’m slightly biased because I came to Elixir directly from Julia because I didn’t think Julia had a “deploying real user-facing things” story despite being 1.0… maybe I’m the only one, ha.

Julia matches extremely well with the academic mindset and the mindset of machine learning professionals (even though some of them don’t know it yet), which is why it’s in the beginning stages of blowing up in that field. It also meshes really well with elixir in terms of its programming paradigms (functional, escape hatches for statefulness, capitalized modules, secretly a lisp). I think stronger julia ↔ elixir interop is a thing that could be really amazing, and is currently an unsolved problem. I also know that there have been lots of rumblings in the elixir community about wanting this…

dokie

dokie

Joining this discussion late on but wanted to say that we are using both Elixir and Julia in production in a kubernetes cluster communicating back and forth over HTTP api’s. By adopting a functional approach in Julia with no state management we are able to have acceptable performance.

Last Post!

Changxin

Changxin

Oh, Thanks!

I’ve been working on a reasoning system using Elixir/OTP (I’m really enjoy it !!!). The system should have been connected to the robot hardware, but for testing purposes a simulated environment Webots was chosen.

Unfortunately, webots doesn‘t have a language interface for Elixir. So, I use Julia call its dll and transfer robot status to Elixir by Socket.

Well, the status information also includes camera images, so msgpack may be a good choice, just like what AirSim does. But the images are represented by String and its resolution is relative small, so JSON is used by the system. :joy:

I want a good interoperability between Julia and Elixir, both are great programming languages! However, now, Socket + JSON or MsgPack may be more realistic.

Where Next?

Popular in Discussions Top

jesse
Hi everyone, I hesitated to post this here because I don’t want you to think I’m spamming, but I’ve been working on a Platform-as-a-Serv...
New
PragTob
Hey everyone, this has been brewing in my head some time and it came up again while reading Adopting Elixir. GenServers, supervisors et...
New
PragTob
Hello everyone, I know we had quite some threads (read through lots of them) about background job processing but it remains a hotly deba...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
eteeselink
Hi all, In the last days, two things happened: A blog post titled “They might never tell you it’s broken” made the rounds. It’s about ...
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
paulanthonywilson
I like Umbrella projects and pretty much always use them for personal Elixir stuff, especially Nerves things. But I don’t think this is ...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement