AstonJ

AstonJ

How has Elixir blown (or expanded!) your mind? Please tell us here!

Can be something that’s unique to Elixir, or just something that it introduced to you. Can be something you discovered a while ago.. or something you just come across - whatever it is, please share :023:

Showing Posts 1 to 10

AstonJ

AstonJ OP

Well it was mind blowing enough when I first came across recursive functions, but I’m just reading Learn Functional Programming with Elixir (Pragprog) and I’ve just met a recursive function …inside a recursive function :icon_eek: :003: :lol:

Crowdhailer

Crowdhailer

Creator of Raxx

This might be a little bit tangential. Finding this in the OTP source really blew my mind. Make me realise even the most impressive software is made by normal people

https://github.com/erlang/otp/blob/52c11d5afd18405eaa293bb881eddf23f408850f/lib/stdlib/src/gen.erl#L240-L243

brightball

brightball

Completely changed the way I think about code…which is kind of a pain when I have to use other languages…

19
Post #3
voger

voger

Things that I had heard of but I was scared to try. Recursive functions. Enum.reduce and Enum.map functions. I have seen those in javascript but I was avoiding them over for loops.

kylethebaker

kylethebaker

This talk by Saša Juric is one of my go-to’s when trying to get people interested in Elixir. Being able to attach a REPL to a running production system and having all of these introspection capabilities at your disposal is something I don’t think any other runtime offers (or if they do it likely isn’t as deeply integrated with the runtime as you get with elixir/erlang).

15
Post #5
JoshHadik96

JoshHadik96

This is a simple one but my mind was blown when I first saw this line of code:

“def calculate(arr) when length(arr) <= 1 do”

I’ve never seen conditional declaration of functions before. Still haven’t gotten over how cool it is

idi527

idi527

def calculate(arr) when length(arr) <= 1, do: # ...

could be expressed as

def calculate([]), do: # ...
def calculate([elem]), do: # ...

which is a bit easier to understand (at least for me, since I can’t think of a function which would handle both an empty list and a list with a single element in it the same way), and probably slightly faster.

andre1sk

andre1sk

Not specifically Elixir but BEAM’s preemptive scheduler especially after working a lot with Node is truly mind blowing.

oldpond

oldpond

I am constantly blown away by how so much is achieved by so little code. Thank you, thank you, thank you!

JoshHadik96

JoshHadik96

Haha new to the forum so I’m not used to where everything is and I definitely thought your username was the opening to your comment for a second or two :joy:

Where Next? Top

Trending in Discussions Top

AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4663 61218 595
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
515 12931 101
New
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
raa-ziq
Hi everyone :waving_hand: I wanted to share something I’ve been building — NowBlind, a random chat app designed to help people discover ...
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
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
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
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
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
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

Latest on Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews