ouerghi01

ouerghi01

Hello Elixirists! :waving_hand:

I’ve been diving deeper into problem-solving using Elixir and its functional programming paradigm. From string manipulations to complex algorithms, Elixir provides a unique way of thinking about solutions.

I’d like to start a discussion where we can:

  1. Share interesting problems you’ve solved using Elixir.
  2. Discuss idiomatic patterns for common challenges (e.g., recursion, data transformation).
  3. Explore different ways to optimize solutions for performance and readability.

For example, I recently solved a problem involving:

  • Splitting a string into parts based on specific characters.
  • Performing transformations like mapping characters to values.
  • Reducing a list of values to find a maximum

Showing Posts 1 to 10

dimitarvp

dimitarvp

Just to put this on your radar: What Elixir related stuff are you doing? (800+ replies)

Additionally, maybe the algorithm tag would be of interest.

Also you might want to check out the Advent of Code threads, we have separate topics for each AoC day for several years now.

Finally, Exercism’s Elixir track was very interesting to me back then.

stevensonmt

stevensonmt

Just to piggy back the above, tehre’s also LeetCode which has support for Elixir solutions on many problems. It’s been fun to solve them in Elixir and other languages to see how the language influences the mindset.

ouerghi01

ouerghi01 OP

This is the link to my GitHub repository where I’m solving the 99 problems in Elixir:
Elixir-99-Functional-Mastery.

Everyone is welcome to contribute to this repository!

D4no0

D4no0

What is the goal of that repo? I’ve took a look at a few problems and they are solved by skewing the language onto the imperative solution that was initially designed.

ouerghi01

ouerghi01 OP

The repo is for learning purposes. I’m not really sure if my solutions work properly, but by tackling each problem, I will definitely learn something. Of course, if you see any implementation I did, it’s probably not the most optimized solution.

ouerghi01

ouerghi01 OP

I am learning the language by solving data structure problems and would love to engage with others who are on a similar journey. I’m also interested in building new projects or contributing to open-source initiatives.

dimitarvp

dimitarvp

Engagement provided: I eye-balled your List_processing.ex and… using length and Enum.at are basically anti-patterns. They have O(n) complexity and should be avoided at all costs – which is possible most of the time. You could do the Exercism list exercises and you have mentors there; they can steer you in the right direction.

And why does your file have a capital letter in its name when f.ex. macOS makes no difference between List_processing.ex and list_processing.ex (or at least that used to be the case before, nowadays I am no longer sure) but Linux does make that difference – you are setting yourself up for a hard-to-track disaster. Just don’t. Always use lower-cased file names.

So, maybe those two tidbits could be a start.

D4no0

D4no0

Thank you very much for the observation, that was exactly my comment, but oriented towards professionals in the domain (maybe in the not most constructive way).

dimitarvp

dimitarvp

It could be a constructive way to engage IMO, because many people latch onto appeals to authority and they want to emulate what they perceive to be a better / bigger talent than theirs. Sometimes they are even right.

…But I personally would find that argument unconvincing; to me the highest levels in any creative / engineering profession are characterized by the simple saying of:

Learn all the rules so you can break them.

That’s why I said that length and Enum.at are an anti-pattern… most of the time.

From my very limited interactions with language and/or high-profile library maintainers, they actually respect people who are not dazzled by their work and engage better with you when you attack their decision in an informed and critically thinking manner.

ouerghi01

ouerghi01 OP

I will follow your best practices, and thank you.

Where Next? Top

Trending in Discussions Top

wmnnd
Hey folks, I wanted to share with you a project I’ve been working on for a while: It’s an Open Source (AGPLv3) newsletter tool. Think Ma...
New
axelson
Hi there! :wave: @frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
Ganna
Hi everyone, I have 8 years of production experience with Erlang/OTP and I’m just starting to get to know Elixir. What would you learn f...
New
johnkirkham
A note on form. Joe Armstrong, co-creator of the Erlang programming language, died in April 2019. What follows is a work of narrative non...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews