Building a Functional Core in Elixir
I recently read through “Designing Elixir Systems with OTP” and thoroughly enjoyed it. I’ve had an idea for a project in my head for a while now, so I decided to try and apply some of the advice in the book to my project.
In this blog post I talk about the “Building a Functional Core” part of the book and how I applied it to my project and how layering things this way actually makes writing code fun.
Two days left on the Joe Armstrong tribute: Prolog
The on-line subscription-based version of Seven Languages in Seven Weeks is in full swing. We’re working through Prolog, Elixir, and OTP for the next three languages. You can see the chapter for free for two more days at http://grox.io/language/prolog
After this chapter, we’ll do eight-queens and sudoku next, and chase those chapters with some scheduling and graph algorithms in Prolog. Learn Joe’s favorite language before Erlang. Join us.
A layered object store design in Elixir (Part II): FileStore
In part-2 of our blog series on developing an object store, we will work on our first layer, the FileStore. This layer is responsible for actually storing the file in our object store. At this level, we are not concerned about what kind of file it is (image, video, document, or whatever else), nor do we have any notion of security. We just store whatever input path is given to us.
https://nitingupta.dev/post/a-layered-object-store-design-in-elixir-part2/
Generate API Docs Effortlessly from your Phoenix code
We’re going to use phoenix_swagger library to generate swagger spec file directly from our controllers. Then we’re going to use library called bureaucrat that consumes that swagger file, runs your controller tests and generates a markdown file containing information from both (macros + tests). Finally we’re going to use slate, which is a static API documentation renderer, feed it with a generated markdown file and generate a beautiful HTML documentation from it. This is Part 1 from 3 part series.
Got a kick-start on elixir and phoenix (1.2) by building a discussion web app through a udemy course
Got a kick-start on elixir and phoenix (1.2) by building a discussion web app through a udemy course https://github.com/geoffsan/discussion
Writing - and testing! - custom Credo checks
I’ve previously written about why one might want to write custom Credo checks, but I didn’t talk about the way I actually like to go about doing it in that post, so today I’m going to break down my workflow for writing custom Credo checks. A really important part of this is the testing, and luckily there is an awesome way you can easily test these checks which really helps with the development as well.
http://www.devonestes.com/writing-and-testing-a-custom-credo-check
A layered object store design in Elixir
This is a blog post series describing design of an object store from scratch in Elixir. We follow a layered design approach which helps breaks down the problem in small, simple to understand modules.
Here is Part-I of the series, introducing the overall design:
https://nitingupta.dev/post/a-layered-object-store-design-in-elixir-part1/
Ecto Tips: DB UUIDs, Composable Changesets, and boilerplates
Here are some helpful techniques I’ve learned with Ecto over the last several months:
- You can interpolate into @doc. This is really helpful for documenting defaulted, required, and optional fields on changeset docs.
- How to get DB-generated UUIDs with Ecto.
- How to compose changesets together.
Hungarian/Munkres in Elixir
My Hungarian/Munkres algorithm implementation in Elixir
https://gist.github.com/atomkirk/a4ac4c3d6ef964eaab4b7f55ef045f83
next Paris Erlang & Elixir meetup will happen on next tuesday. See you there!
for french speaking people in Paris, next Tuesday we have a new meetup: https://www.meetup.com/Erlang-Paris/events/267270583/ see you there!
Elixir Wizards S3E8: Bruce and Maggie Tate from Groxio on Training
Episode 8 of Elixir Wizards out today! Check it out:
Our Elixir vs. Ruby Guide
At my company we’ve been using Elixir for the past 24 months, so we decided to put together a guide that compares Elixir with Ruby.
We detail why we prefer Elixir to Ruby and we included several case studies and resources we used along the way.
If you want to have a look, here’s the link: https://foxbox.com/blog/elixir-vs-ruby/
Elixir Web Console is launched
We are happy to announce the release of the Elixir Web Console! 🎉
This website is a place where people can try the Elixir language without the need to leave the browser or installing it on their computers. We hope this is a contribution to the effort to promote the language, providing a convenient way to assess the capabilities of this technology.
This is just the beginning of the journey. We are aware that only a portion of the language is available in this online console at the moment, but we plan to extend its capabilities.
In addition, we hope to keep adding more features to have a UI experience similar to iex
. In particular, we are lacking a way to write multiline Elixir code, but we expect to address it shortly.
You can read more about this project and all the security concerns about it (I bet you are thinking about that, after all, running foreign Elixir code in a server is kind of crazy!) in the Readme of the project.
Here is the site: https://elixirconsole.wyeworks.com/
Learn Elixir - From Zero To A Testing Hero
Becoming a Testing Hero will not need a spider bite or a pocket full of kryptonite. How to become one? Discover and master the set of Testing Best Practices (TDD). It’s like approaching the next level of every game - from a random user who just plays a game to a Pro who creates the reality.
Read the article here: https://selleo.com/blog/learn-elixir-from-zero-to-a-testing-hero
When Elixir's Performance Becomes Rust-y
In this post Nick explores how we can delegate to Rust when we need more compute power in our Elixir app.
https://www.theguild.nl/when-elixirs-performance-becomes-rust-y/
Phoenix Refactoring: One LiveView to many small LiveComponents
Recently I wanted to clean up a large LiveView that had too many responsibilities. I used LiveComponents to break apart to the view into smaller bits that are mostly self-contained. The pattern ended up feeling pretty similar to work I’ve previously done in React and Redux using a one way data flow.
Apologies, after making this video I learned that one way data flow was inspired by Elm.
Elixir Wizards S3E7: Dan Ivovich from SmartLogic on Hiring and Training
Latest episode of Elixir Wizards was released yesterday! Check it out:
The reason for Vapor
Loading dynamic configuration is still challenging. In this post, I try to make a case for why we shouldn’t be using Application
or config/*.exs
for managing configuration and demonstrate alternative patterns using Vapor.
Ecto & Multi-tenancy - Prefixes
The third and final part of the saga. This is what I ended up doing for my multi-tenant application using Ecto prefixes and PostgreSQL schema as a simpler alternative to dynamic repos.
https://underjord.io/ecto-multi-tenancy-prefixes-part-3.html