6
u/Probotect0r Jul 15 '20
I am working my way through Elixir in Action, after being sold by Sasa's talk "Soul of Erlang and Elixir", and am currently at panel 3. It's so different from traditional languages, but so awesome.
3
u/marth141 Jul 15 '20
Elixir in action comes so highly recommended! I strongly encourage to go with it because the results I have seen from friends who have dove deep into it are extraordinary. Fucking slay it man!
4
u/kickinespresso Jul 15 '20
Woah. Now I'm trying to figure out how to work ETS into my next project.
4
u/marth141 Jul 15 '20 edited Jul 15 '20
So far, I'm using ETS to cache data from a "Salesforce" like CRM that doesn't have enough reporting capability.
The Elixir application is using a Task Async Stream to paginate it's way through the CRMs records, and ETS behaves as a storage. GenServers that are "Collectors" for the CRMs record types handle initializing the ETS tables, then get the records, then inserts into ETS.
The GenServers then use ex2ms to help build queries for ETS match specifications.
Then, I'm using ETS to store the values of particular metrics that are being reported on. This way when someone is requesting the web page that is displaying those metrics, they're already calculated and stored in ETS and not being calculated when the page is loading. Makes for very quick page load times.
0
Jul 18 '20
[deleted]
1
u/marth141 Jul 18 '20
Yeah ETS is an in memory database that only exists while Elixir is running. Evadne Wu expressed that she felt like ETS is an escape hatch from the immutable nature of Elixir.
You have to load things into ETS like { id, thing_to_store }
And it can have any number of things to store. But it must have an id of some sort.
2
u/qqwy Jul 15 '20
You're missing a final one at the bottom with "writing macros that erite macros that write macros that write... " :D
3
u/marth141 Jul 15 '20
Dave Thomas said, "Never use a macro where you could have used a function!" Or something like that haha.
but you got me gotta make a macro
2
u/noscreenname Jul 15 '20
Then learning that the ecosystem is ... Inexistent 😰
1
u/marth141 Jul 15 '20
I have plans to make some learning stuff on YouTube once I'm much more seasoned.
Until then, I found a major amount of help with https://codestool.coding-gnome.com/courses/elixir-for-programmers
https://online.pragmaticstudio.com/ has some good material as well!
Check out discords and slacks as well :)!
5
u/nathan_long Jul 16 '20
the ecosystem is ... Inexistent
I'm not sure what you mean there. I see:
11k packages on Hex.pm
Multiple annual conferences around the world, including several regional ones in the U.S.
An active forum and Slack instance and Discord instance
Multiple books, screencasts, online courses, and other learning resources listed https://elixir-lang.org/learning.html
A weekly newsletter and job board
Multiple podcasts - Elixir Wizards, Thinking Elixir, Elixir Outlaws, Elixir Mix, Elixir Talk, Elixir Fountain, all by different entities
A listing of 500+ companies using Elixir (which I know to be incomplete)
A core language repo with 998 contributors and more than 6k pull requests, only one (!) of which is currently open because they respond so quickly
And that doesn't even cover everything.
What do you feel is missing?
3
u/noscreenname Jul 16 '20
I'm running elixir in production since 3 years, so I'm probably one of the 500+ companies. What I mean, is most of the external libs are outdated and have very few commiters.
61
u/Schrockwell Jul 15 '20
wishing you had the pipe operator in every language
19
u/mypetocean Jul 15 '20
Ehem — the pipe operator, pattern matching, and the guard clause syntax (if not function overloading).
5
5
6
u/willhig Jul 15 '20
I had to go back to typescript for a gig and kept having moments like “okay, then pipe this into… wait… dammit…”
3
5
2
2
2
u/Embarrassed-Box-3380 Jan 05 '25
This is real, i literally just completed the full cycle like 2 days ago.
2
u/3dB Jul 15 '20
I'm currently at the third panel. Decided I wanted to learn the language and started doing some crypto challenges in it. I was having a difficult time with it until I learned the details of pattern matching against binaries. Now I'm hooked for life.
5
1
9
u/BigBeruboy Jul 15 '20
I’m a bit confused on the purpose of ETS. I just started to learn about Elixir, and I’m struggling to understand why it’s such a nice feature. Nowadays, we can just whip up a reddis store with docker and make it work. Could someone help me understand why it’s such a nice thing to have?