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
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
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...
New
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
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
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
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
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

Elixir Forum

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews