What did not you build with Elixir(and why)?

Hi guys, The main goal of this topic is share knowledge and learn what is good to build with Elixir/Phoenix and what’s not.

Most of the topic’s is about “what you love in elixir” or “Elixir is suitable for?” or “What Elixir project are you working on”

Here you can post what you are building(or have done) with Elixir and (most important) What not.

My turn:

I do build with Elixir/Phoenix a personal dashboard to save some important .PDF to aws and some pages to control my finances.

I do not build with Elixir the .PDF reader, because the libraries .PDF sucks(and erl/elixir didn’t have something buildin). I’m evaluating some external lib to read the content.

7 Likes

I use Elixir for all things that are long-lived, I don’t use it for one-off scripts and things like that - I still prefer Ruby there.

8 Likes

For things that need to use headless chrome extensively it’s Node because of

3 Likes

I would say that in some cases having access to erlang/elixir’s abstractions for managing processes is far more important than having the easiness of the puppeteer api. Granted, if you’re doing automated testing or generic scrapping puppeteer can cut down on required time by providing that api and all the helpers to manage the browser interaction, still, some cases benefit from using the raw devtools protocol (which is just json) and having access to much better ways of managing multiple processes and communicating between them at the cost of a bit more complex initial setup.

3 Likes

True and obviously totally dependent on a given use case.

1 Like

After I do at least one Elixir app, I’m hoping to use it wherever I might have otherwise used Rails - so the same applies (purely static websites etc).

Probably most notably is where you don’t have a choice - such as native iOS apps.

Same here - although that’s mainly because I have more experience in Ruby …so things might change in future (I’m hoping they will because I would prefer to stick to one language if it all possible - just a bit easier on the brain :lol:)

1 Like

If it is long-lived I use the BEAM in some way.

For speed I use OCaml or C++ depending on the specific work.

For embedded chips I try to use C++ if possible, but with many I end up having to do assembly.

Web work is OCaml lately (javascript before that, ew).

WebAssembly now seems pretty generically available (sans IE, but who cares about that when writing computationally complex things) so might do some C++ or Rust to that (and OCaml once it gets a back-end for it).

Little scripts are (generally in this order depending on the little script complexity and what libraries are immediately available) bash/zsh, ocaml, python, or perl.

Etc… it all depends on the purpose.

7 Likes

But Elixir is server side, we actually use it with iOS (as well as Android and web) frontends via Phoenix channels, works fine.

Other interesting use case is the Telegram bot that does a lot of work for us internally.

3 Likes

Yup :slight_smile:

Other languages do have options there tho, like Ruby with RubyMotion which compiles to Objective-C and so can be used to make fully native apps. (I actually used MacRuby - which RubyMotion is based on - to make an OSX app once :003:)

2 Likes

We use react native for that and it works fine, RubyMotion looks cool though, thanks for the link. I wish there were something like that for elixir :slight_smile:

2 Likes

well you can try elixir script with react native :slight_smile:

3 Likes

That’d be way too much indirection :smiley:

2 Likes

Python, Scala or C++ for deep learning projects. There just aren’t high-level bindings for Elixir yet. http://mxnet.incubator.apache.org/ supports high-level bindings for a number of languages. I’d definitely be interested in Elixir support. All these bindings delegate to a C++ layer anyway, so Elixir wouldn’t be doing the heavy lifting. Some strong NIF skills would be required though (I assume).

In the meantime, I’ll use Elixir as a common IO and process orchestration language to drive things written in other languages. Low overhead, good IO support, and app stability are larger drivers for me than raw latency.

Edit:

tl;dr – Nice things might actually be closer than I thought.

It would appear that MXNet leverages the LLVM compiler chain to provide its C++ bindings to other front-end languages. There’s even a JavaScript generator. https://github.com/dmlc/mxnet.js/ I did some quick Googling but it wasn’t clear what the current state of LLVM on Beam/Hipe is. Seems like Erlang has back-end LLVM support. Not clear on front-end.

Edit 2: Also this http://www.swig.org/index.php

2 Likes

I started on a wrapper for tensorflow here: https://github.com/baldmountain/ex_tensorflow Didn’t get very far. I just don’t know how the C API works well enough to make it work. (Yeah, I guess I could look at the Python wrapper but have to may other things to distract me.)

4 Likes

We started using node for a lot here at work but ran into limitations. We are replacing all of it with either Elixir or Clojure. We use datomic which (mostly) requires using Clojure since the best supported peer library is the Clojure one. So, Clojure for anything that is a datomic peer, Elixir for everything else.

2 Likes

Yea. Although based on my research, the Python or XYZ front-end language wrapper for many of these C/C++ projects appears to be generated. That’s why I’d be interested in the status of LLVM, Swig, etc for Elixir/Erlang/Beam/Hipe.

It may be easier to generate code for languages with OS native threading schemes. Erlang’s process system is fantastic in some ways but could make interop harder. But who knows, generating NIFs with best practices built in should be possible. Leveraging the dirty scheduler should be possible. Dunno. The point is that I don’t think folks are writing their big AI projects in C, then hand rolling support for another 10 langs. For most cases, I doubt we should be forced to do that either. Let the compiler guys figure out a way to allow us to participate in these ecosystems without being both subject matter experts and low-level VM experts.

1 Like

You or someone know if OTP team is working in something like that? I search for this in google and found only experimental stuff and that HIPE/BEAM will continue as it is…

1 Like

A post was merged into an existing topic: What do you think is missing or needs improving in Elixir?