Elixir Icon

Elixir

Elixir is a dynamic, functional language designed for building scalable and maintainable applications.
37 Stories
All Topics

Rust blog.discordapp.com

Using Rust to scale Elixir for 11 million concurrent users

The Discord team bumped up against some limitations of the BEAM (Erlang’s virtual machine) when dealing with rather large data structures: The double-edged sword of immutable data structures is that mutations are modeled by taking an existing data structure and an operation and creating a brand new data structure that is the result of applying that operation to the existing data structure. This meant that when someone joined a server — internally referred to as guilds — with a Member List of 100,000 members, we would have to build a new list with 100,001 members in it. You’ll want to click through and read all of the data structures they tried to fix this problem. It’s some seriously solid engineering and I love how they continued to measure and push themselves further. Finally, they reached for Rust thanks to BEAM’s NIF feature and really scaled up the speed.

read more

José Valim elixir-lang.org

The Elixir language is now "feature complete"

José Valim, announcing the just-released Elixir v1.9: … releases was the last planned feature for Elixir. We don’t have any major user-facing feature in the works nor planned. I know for certain some will consider this fact the most excing part of this announcement! This doesn’t mean the language will stop moving forward, but you’ll have to read the full announcement to get the full picture. The Releases feature looks shiny, for sure. Congrats to all involved for yet another awesome milestone!

read more

Devon C. Estes devonestes.herokuapp.com

A proposal for some new rules for Phoenix contexts

Phoenix 1.3 introduced the idea of Contexts, which I’m generally very much in favor of. However, I wish there was a little bit more structure to the idea. It’s so open ended that I’ve found deciding where best to put a function kind of tricky, and then I frequently end up with duplicate behavior across contexts or have a hard time finding functions later on because the module they’re in made sense at the time, but it doesn’t make as much sense now. So, I’m proposing the idea of a Primary Context and a Secondary Context. I’ve also struggled to determine just how to use Contexts to my benefit. It seems that Devon is trying an add more structure approach whereas I have (so far) gone with a YAGNI approach.

read more

Elixir fullstackradio.com

🎧 Jerod talks Elixir and Phoenix on Full Stack Radio

Adam Wathan was gracious enough to invite me on Full Stack Radio to discuss why and how we built this very platform that I’m using to write and you’re using to read. Most of the show focuses on Elixir itself, with topics ranging from pattern matching and immutability to the pipe operator and deployment. Adam also got me to confess a dirty little secret… I still don’t really know what GenServers are! 😱

read more

Parker Selbert github.com

Reliable and observable job processing in Elixir via Postgres

Oban’s primary goals are reliability, consistency and observability. It is fundamentally different from other background job processing tools because it retains job data for historic metrics and inspection. You can leave your application running indefinitely without worrying about jobs being lost or orphaned due to crashes.

read more

Sergiy Kukunin habr.com

The pros and cons of Elixir

In this short Q&A, Sergiy Kukunin, an Elixir expert, shares his thoughts on why Elixir is becoming so popular, its core advantages, and its drawbacks. Sergiy also shared this as a takeaway to getting started with Elixir. …the syntax of Elixir has some things in common with Ruby. The languages are entirely different, but it is always good to see symbols and elements you are used to. The simplest thing is to use some of the new Elixir-compatible web-development frameworks. The most popular web framework for Elixir is Phoenix. You should definitely give it a try, especially if you are used to using Ruby on Rails. This will simplify development while still making the app faster and more reliable.

read more

Elixir github.com

Would you still pick Elixir in 2019?

The dwyl team went “all-in” on Elixir back in 2016 and are often asked if they would make the same choice again. Here’s the TLDR of their answer: The question of “Which Programming Language” is one we ask ourselves fairly regularly, and is the reason that lead us to discover and decide on using Elixir in 2016. We periodically survey the “up-and-coming” languages like Kotlin, Julia, Lua, etc. and keep concluding that our choice of Elixir is the one we would make again right now. Elixir is the “full package” from idea to deployment! Click through for their full reasoning, which includes why they switched from Node.js to Elixir in the first place, Elixir’s pros/cons they’ve learned along the way, and a list of other languages they would choose given different use cases.

read more

Elixir elixir-lang.org

Mint – a new HTTP client for Elixir

Mint is a new low-level HTTP client that aims to provide a small and functional core that others can build on top. Mint is connection based: each connection is a single struct with an associated socket belonging to the process that started the connection. This looks like an excellent base layer for the Elixir community to build HTTP clients upon. Take note: The core Elixir team is so good at laying foundations like this. Plug, for example, is a near-perfect base layer for HTTP servers.

read more

Dave Thomas pragdave.me

Small is beautiful—the Component library

Dave Thomas: For a while now I’ve been doing my Cassandra impersonation, telling everyone who’ll listen (and quite a few folks who won’t) that we need to be writing code in smaller chunks. I know what happens when we don’t, as I was the author of one of the largest early Rails applications (65kloc), and it became a nightmare to work with. He doesn’t want the same thing to happen in Elixirland, so he’s released Component, which is “an attempt to make it so easy to write trivial standalone servers that people will just naturally split their applications up that way.”

read more

Ruby github.com

Elixir/Unix style pipe operations in Ruby

This is a proof of concept, but oh what a concept! I freakin’ 💚 Elixir’s pipe operator, hope they’ll add it to JavaScript, and would trade half my kingdom to have it in Ruby. "https://api.github.com/repos/ruby/ruby".pipe do URI.parse Net::HTTP.get JSON.parse.fetch("stargazers_count") yield_self { |n| "Ruby has #{n} stars" } Kernel.puts end #=> Ruby has 15120 stars

read more

Chris McCord dockyard.com

An update on the progress of Phoenix.LiveView

As a reminder, LiveView is an in-development feature of the Phoenix web framework that helps you create rich, interactive experiences while writing very little (ostensibly, zero) JavaScript. In Chris’ words: Phoenix LiveView is an exciting new library which enables rich, real-time user experiences with server-rendered HTML. LiveView powered applications are stateful on the server with bidrectional communication via WebSockets, offering a vastly simplified programming model compared to JavaScript alternatives. In the linked post, Chris shows a lot of examples of LiveView in action, demonstrating what it’s capable of. Here’s a feature-complete snake game, in 330 LOC, which requires zero user-land JavaScript. Impressive!

read more

German Velasco Thoughtbot

Is Elixir a scripting language?

Finally, an article that breaks Betteridge’s law of headlines! Elixir is known for being a language made for building distributed applications that scale, are massively concurrent, and have self-healing properties. All of these adjectives paint Elixir in a grandiose light. And for good reasons! But is Elixir also a language that can be used for the more mundane tasks of this world like scripting? I think the answer is a definite yes. I’ve been writing Elixir for a few years now, but when it comes time to script something I still reach for Ruby. Case in point, our data import routines for changelog.com (which y’all know is an Elixir app) are written in Ruby. Why do I do this? Familiarity plays a big part. Also I find Ruby to be highly ergonomic for such tasks. Having said that, this article will make me consider trying Elixir for my next script.

read more

Phoenix shift.infinite.red

Phoenix’s LiveView: client-side Elixir at last?

Darin Wilson: In his keynote at ElixirConf last week, Chris McCord announced a new feature for the Phoenix web framework that caused many jaws to hit the floor, and had the hall buzzing when the talk was over. The new feature, tentatively called “LiveView”, allows developers to add dynamic, client-side interactions to web pages, using code that runs in Elixir on the server. What exactly is a LiveView, though? We don’t really know yet as this is an ongoing project and no code has been released yet. But as near as I can tell, a LiveView is lot like a React component running in a GenServer – it even has a render function! And with the EEx sigil (which I didn’t know was a thing) the code feels a lot like JSX I am unreasonably excited to see what becomes of this. 

read more

Rémi Prévost accent.reviews

Accent — a developer-oriented translation tool

Rémi Prévost: Accent is an internal tool we built to help us manage translations for the applications we develop at Mirego. We used Elixir (Phoenix and Absinthe) and Ember.js and just a few weeks ago we open-sourced the project so we could share it with the community since there are not a lot of fully-working open-source Web applications for both of these technologies. Very cool. I’ve been toying with the idea of a GraphQL API around our news and podcasts. I should 👀 under the covers and see how Accent’s is built.

read more

Elm teamgaslight.com

Elm, Elixir, and Phoenix: Reflecting on a functional full-stack project

Zack Kayser built a Texas Hold ‘Em app with the EEP (?) stack and wrote up his findings. He calls Elm and Elixir “a match made in Functional Heaven”, but the endeavor wasn’t without its challenges: I personally struggled with 1) how to organize my code, especially with larger modules, 2) figuring out how to make the UI more interactive, and 3) sharing code across modules. There’s a lot to learn from Zack’s experience. Both the Elm front-end and Phoenix back-end are open source. ✊

read more

0:00 / 0:00