Justin

Justin

I finished working thru “Programming Elixir 1.3”. It was theoretically interesting, but I’m left wondering how to use it to accomplish real world tasks.

I’ve been a developer for a long time. My background is in imperative procedural languages, focusing on back end apps that are highly DB, and moderately computationally, intensive.

Am I just overlooking the obvious?

Showing Posts 1 to 10

AstonJ

AstonJ

Programming Elixir teaches you the language - how you apply it is either down to you (based on your experience, perhaps specifically, in designing concurrent/parallel systems) or, based on what you learn next. Luckily, there’s a lot of material on the latter!

I have currently read/done:

And loved every single one of them (check out my reviews in their respective threads). Dave’s course shows you how to apply Elixir - and it is one of the best programming courses I have ever done!

There are other books and courses that show you how to ‘think’ in or get the most out of Elixir too, have a look through our Learning Resources > Books and Learning Resources > Courses sections :023:

michallepicki

michallepicki

You’re saying that you have imperative/procedural background. I can recommend reading this article on What’s Functional All About?.

My two cents: Not every problem should be solved in a functional way. Sometimes it is not convenient. But maybe we can locate the parts of the solution that need to store state, produce side-effects or do other non-functional stuff, isolate these parts and write functional code around them? If the answer is yes, then I’d say we can have much more readable, maintainable and testable code. And, often, more parallelizable.

To add to the resources @AstonJ mentioned, I’d like to suggest trying out Phoenix if you want to build a web thing, or Nerves if you want to build an embedded thing.

gon782

gon782

I think we’ve all been there with different languages and technologies. I’m sorry to hear that “Programming Elixir” didn’t teach you how to approach problem solving in Elixir. When I read it I had gone through the “Getting Started” + “Mix and OTP” series on elixir-lang.org and after those two I felt like I was properly prepared to put together solutions in Elixir. Obviously, your mileage may vary and we’re not all the same.

Do you feel comfortable with working with OTP and do you recognize what it is about and why it’s a good thing to have? Does the Zen of Erlang resonate with you yet? I think those two questions are central to solving problems on the BEAM.

On a practical note, have you (already done or) considered solving a toy problem like writing a (distributed?) logging server using Elixir? You could write a daemon that takes logging requests for different files/topics that it then stores in-memory and periodically persists to disk, and can be queried for the logs of a certain file/topic. This can start super small (only storing the given log for a topic in-memory and not persisting it at all) and not even using UDP/TCP from the beginning, maybe ending up doing a whole high-performance UDP server that uses ETS to store logs, etc..

It’s obviously hard to appreciate someone’s arbitrary suggestion for a project, but I think this is at least a problem that fits the platform and language.

Luckily, your user profile of “back end apps that are highly DB and moderately computationally intensive” is exactly what Erlang/Elixir is about, so once your thinking fits the platform you’re exactly the type of user that will love it and get the most out of it.

dokuzbir

dokuzbir

Eixir in action is really good book. Maybe best in elixir world

DevotionGeo

DevotionGeo

Try to develop something very simple, like an Encryptor.

Give a read to this tutorial which teaches you, how to develop an Encryptor in Ruby. Then do the same in Elixir. That’s how I practice Elxir.
Try to use IEx helper h() as much as possible.

BTW, what do you wanna use Elixir for, primarily?

gon782

gon782

One issue with this model of learning Elixir is that you won’t necessarily learn about working on the BEAM. Ruby doesn’t allow for the same kind of development and architecture that you use on the BEAM, so there is a whole world of things out there that you might not learn about when doing this.

For sequential code that has a one to one mapping to other libraries on other platforms, I agree that it’s good to pick something you know from elsewhere and implement it, but it won’t introduce the concepts and thinking that are specific to platforms like the BEAM.

If you have something made in Smalltalk and want to implement the architecture from there that might actually transfer much better, but I doubt that applies to a lot of people.

DevotionGeo

DevotionGeo

Yes, you’re right.
I suggested this method only because the title says “Getting things done with Elixir?” and he said that his “background is in imperative procedural languages”.
He has to learn how the OTP and it’s actor model work and other stuff, once he learns how to implement the basic stuff he learnt by using “Programming Elixir”.
And BTW he can also develop that Encrypter in a distributed way. :slight_smile:

Anyway Thank You for reminding me not to forget I’m in an environment and paradigm which is stronger than Ruby’s, and develop things that way.

Justin

Justin OP

I’m hearing, “hang in there”. :smile:

I got “Programming Phoenix” at the same time as “Programming Elixir”, and I just started Phoenix. Most of my “web” work I’ve done is limited to wrapping webservices around existing methods.

Elixir isn’t supported, so I can’t even dabble with it professionally. I’m still trying to conceive how it would handle my real work.

Thanks

bbense

bbense

I think this pretty much describes where Elixir starts to make sense: http://bholley.net/images/posts/thistall.jpg

Try to write something in your current language that will use threads to use all the cores available on a typical developer laptop. Now imagine attempting to port that app to something with 128 or 256 cores. With the BEAM that scaling comes almost for free, you can just throw hardware at your code and it will work.

OvermindDL1

OvermindDL1

Not entirely free, you still have to make enough processes and split up your calculations enough that concurrent work can be done. That is pretty trivially easy to emulate in C++ even, you just don’t have the same reliability there. :slight_smile:

Where Next? Top

Trending in Questions Top

Blokh
Hey guys, I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly Do you guys have any suggestions what is the best prac...
New
kszambelanczyk
Hello! Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app. I creat...
New
Onor.io
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
Trolleger
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
matt-savvy
Anyone here using Honeybadger? My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of Bandit.HTTPError...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews