Uses for Elixir Programming

I’ve come to realize that I hate web programming (front and back end), but a large amount of jobs I see, although it may say Python Developer or Software Eng, it could just as well say web developer, very rarely have I seen a position for Python developer and it had nothing to do with web development.

That being said according to wiki, Elixir is a functional, concurrent, general-purpose programming language. Is it safe to assume Elixir is not just for web development, you can use it to create just about anything? Much like C# or Java (I understand those are OOP languages, but you can use them to create desktop utilities that don’t touch the web at all). In other words, it would be wrong to say or even think that all Elixir is good for is web development, correct?

I wouldn’t say Elixir is only good for web programming, like I wouldn’t say Python is only good for web programming (it’s used for many other things). For an example of something in Elixir that’s not web related, check out https://nerves-project.org/ (Elixir for embedded basically).

I think just currently the web side is pulling so many developers and is the biggest area in software development (in my understanding at least), so that’s why most job ads are for web programmers.

3 Likes

I guess that depends on your definition of “web development”.

If you just mean websites, Elixir is capable of much more than that.

If you also include things that talk over the network, then that is mostly the BEAM’s sweet spot. Erlang was originally created to program telephone switches. And if I’m not mistaken, it is still the main language used today in those switches (I do not currently have a link to back that up).

See GUI programming in Elixir? and Why would I choose Elixir as a general purpose programming language? - #11 by Qqwy - i.e desktop GUI apps are rare

While it’s not directly web related, IoT is likely the most relevant aspect commercially speaking.

The other thing is that BEAM languages will most likely be used to implement distributed systems - which will most likely use something like JSON-over-HTTP for communicating between parts of the system which aren’t geographically co-located or have to cross some other type of “trust boundary”.

Maybe it’s more productive to explore what particular aspects of “web programming” you “hate”.

2 Likes

What I mean is, when wiki says it’s a general purpose language, it means I can create an application to read a file, sort the values, maybe do some quick calculations and output it to another file. Now, I understand that you don’t need Elixir to do this, if you have Windows, Powershell or C# can do that, or on Linux, Bash, Python, Perl are more than capable.

My point is, web development aside (including talking over a network), I can use Elixir for pretty any task I can think of, correct? I understand depending on the operating system, it maybe best to use the built-in language, if the tasks is operating system dependent, for example a trivial task for Powershell, might not be so easy for Python or Elixir because you need it to access the .Net Framework.

All that being said, Elixir is exactly as wiki said, a general purpose language. Any task I have in mind, web development or not, I can do with Elixir?

Riak is a distributed database that was written in erlang, so elixir could be used for similar applications (the storage engine is leveldb which is C++ but that’s neither here nor there).

edit: honestly elixir would be great for any sort of distributed application, but most people that are using elixir are coming from ruby on rails so their primary use case is web app development. From what I’ve seen, the primary use from companies that use erlang/elixir in a major way is for chatting functionality. Whatsapp, facebook (until they switched to c++), Riot/League of Legends, discord, etc.

1 Like

Correct, though it’s best domain is most things related to highly concurrent and parallel I/O work.

Like I’ve written an IRC/Discord bot in it, which is a good use-case for it.

I’ve written game server, management software, and embedded server management services in the Erlang side of things over the years, as well as more.

I have also written a lot of web things in it too though (mostly Erlang, but my Elixir code is catching up).

I use the term “hate” a little too quickly here. What I mean is, I was researching what skills are necessary for back end development. As you might guess, Algorithms & Data Structures was a topic that came up. I don’t possess a CS degree and to me anyways, it seems quiet difficult. I don’t mind making the effort and learning DS&A, but I don’t want to learn a language that’s only good for one purpose, I want a language that’s flexible. For example, I learned Python on my own, and given enough time, I can build a decent desktop application for simple tasks. No need for DS&A, even though Python is sometimes used for back end development where that topic is relevant. Currently Python is my go to language for any task not OS dependent.

Same goes for front end development, although it’s a small part of it, I lack creativity, and I can’t create appealing websites. I understand front end web development is more than just creativity, but a lot of job postings that ask for front end development also asks for skills in Photoshop, and other editing software.

I just don’t like web development, but if I had to choose, back end development is the place I want to end up.

That’s why I don’t want to learn Elixir if all it’s good for is web development, I want more out of any language I learn. I want to make sure when it says it’s a general purpose language, it really means it. In other words, I can build and use Elixir applications that never touch the web, much like C# or Python.

I think that’s a misconception. Data structures and Algorithms are at the core of “programming”. For example: Elements of Programming Interviews in Python.

A Common-Sense Guide to Data Structures and Algorithms (amazon.com reviews) uses JavaScript, Python, and Ruby to cover some of the basics.

Personally I think those languages are less than ideal for the task - something in the vein of HtDP2e would be more useful - but most people are more utilitarian in their choice of programming languages and I’m not aware that there is any commercial viability to Racket right now.

I just don’t like web development, but if I had to choose, back end development is the place I want to end up.

Unfortunately there is the whole (mythical) fullstack developer thing going on - so in many cases there is some interaction with the web - so “web avoidance” is likely going to make matters more difficult for you. Mobile-first web apps are encroaching on native apps, Electron-based desktop GUIs, etc.

2 Likes

I think that’s a misconception. Data structures and Algorithms are at the core of “programming”. For example: Elements of Programming Interviews in Python

For more complex tasks, then a solid understanding of DS&A is necessary if you intend to implement your own DS. I never said it wasn’t important, or that it was unnecessary, just that for simple applications a List or Dictionary might be enough, I don’t have to worry about how it was implemented, just how to use it.

1 Like

3 posts were split to a new topic: Mythical Full Stack Developer

Am I out of touch?

I certainly won’t say you’re out of touch.

I just wanted to know if Elixir can be used for desktop development like C#/Python can, without touching the web (for example, can I create a GUI utility to read a file and preform calculations and save that file?). However, I realized that my question is misguided because I didn’t really understand Elixir and its user cases.

Sorry, my post was a bit off topic and more a reply to a reply rather than an answer to your question. :smiley:

You can, but GUI applications are probably not the most common use case. Elixir comes with Wx bindings but the API is a bit clunky. The built-in ‘observer’ application for example is done with Wx.

The problem with GUI is that most underlying libraries are C++ ones and being very object oriented. Hence the discomfort to use these in beam languages.

I don’t think it is. A lot of info you see on the web in relation to elixir is about web applications and phoenix.

1 Like

The BEAM/Erlang was primarily designed to run unattended systems in a fault tolerant manner; concurrency and distribution were implemented in the service of fault tolerance. So working with Elixir(OTP) is quite a bit different than with mainstream desktop applications:

Designing for Scalability with Erlang/OTP Chapter 8: Supervisors - OTP Supervisors p.175:

2 Likes

3 posts were merged into an existing topic: Mythical Full Stack Developer

Elixir is pretty capable in many areas (as is Erlang). Me and others had private projects that do all sorts of other stuff – web crawlers, report generators, game bots – and Elixir has been very adequate.

That being said, Erlang / Elixir are very realistic about their use cases; if you want to do heavy number crunching and need every last penny out of your hardware, definitely do not go with them. If you need to code stuff like a DB index – which requires big and mutable data structures residing in fixed memory areas – then they might be a poor fit as well.

Outside of those scenarios though, Erlang / Elixir are very capable in almost whatever. Especially in the realm of distributed task orchestration, or transparently distributing work among all CPU cores, you will be very hard pressed to actually find something that is so good like Elixir.

(I’ve been voluntarily working on report generators in the last few months and the code that transparently distributes work among all CPU cores was 5 lines long… while the corresponding Java and Ruby sources were 30 - 100 lines long… and still didn’t get the job done well.)

A language’s “web popularity” is simply an artifact of what’s most sought after by the business people. The languages themselves remain quite flexible and able to do a lot regardless of what’s in popular demand.

You can achieve a lot in Elixir, as long as you don’t seek to replace C++ or Go or Rust with it.

2 Likes