Asynchronous Tasks with Elixir
In this article, I’ll show you how easy is to convert a sequential program written in Elixir into a concurrent one using the Task module.
#TIL: `handle_info(_, state), do: {:noreply, state}` is a Pokemon clause
Today I learned, that handle_info(_, state), do: {:noreply, state} is a Pokemon clause, because:
Gotta catch em all.
Gravity - Elixir client for the Gravatar API
gravity is an Elixir client for the Gravatar API.
iex> Gravity.image("yosriady@gmail.com")
"https://www.gravatar.com/avatar/1b0ab2500efc1b91424fb49045312929"
IntelliJ Elixir v4.3.0
README changes
Completion
Aliases and Modules
When you start typing an Alias, completion will look in three locations:
-
aliasaliased names in the current file a.Suffixforalias Prefix.Suffixb.MultipleAliasAorMultipleAliasBforalias Prefix.{MultipleAliasA, MultipleAliasB}c.Asforalias Prefix.Suffix, as: As -
Indexed module names (as available from Go To Symbol)
a.
Prefix.Suffixfromdefmodule Prefix.Suffixb.MyProtocolfromdefprotocol MyProtocolc.MyProtocol.MyStructi.defimpl MyProtocol, for: MyStructii.defimpl MyProtocolnested underdefmodule MyStruct -
Nested modules under aliased names
a.
Suffix.Nestedforalias Prefix.SuffixwherePrefix.Suffix.Nestedis an indexed module, implementation or protocol name. b.MultipleAliasA.Nestedforalias Prefix.{MultipleAliasA, MultipleAliasB}wherePrefix.MultipleAliasA.Nestedalias Prefix.{MultipleAliasA, MultipleAliasB}is an indexed module, implementation or protocol name. c.As.Nestedforalias Prefix.Suffix, as: AswherePrefix.Suffix.Nestedis an indexed module, implementation, or protocol name.
Go To Declaration
Go To Declaration is a feature of JetBrains IDEs that allows you to jump from the usage of a symbol, such as a Module
Alias, to its declaration, such as the defmodule call.
Alias
-
Place the cursor over an Alias with an aliased name setup by
aliasa.Suffixifalias Prefix.Suffixcalled b.MultipleAliasAifalias Prefix.{MultipleAliasA, MultipleAliasB}called c.Asifalias Prefix.Suffix, as: As -
Activate the Go To Declaration action with one of the following:
a.
Cmd+Bb. Select Navigate > Declaration from the menu. c.Cmd+Click -
A Go To Declaration lookup menu will appear, allowing you to jump either the
aliasthat setup the aliased name or jumping directly todefmoduleof the unaliased name. Select which declaration you want a. Use arrow keys to select and hitEnterb.Click
Elixir Hunt - Find your next Elixir Job
What ?
I hunt for Elixir Jobs so you don’t have to!
Why ?
I got bored to go every day around internet (angel.co, indeed, elixir-jobs, workwithelixir, …) to find my next job. I think it should be easy to see the available Elixir positions … so I made it !
Where ?
Website:http://www.elixirhunt.com/
Twitter:https://twitter.com/elixirhunt
Hope it helps :)
Deploying Elixir to AWS Elastic Beanstalk
I’m trying to find some tutorial or resource that helps me deploy a Phoenix app to AWS Elastic Beanstalk, without using Docker.
Anyone would like to share something?
How Elixir helped us scale our Video User Profile Service for the Olympics
In this article, I did a quick look at our rewrite of a Ruby on Rails Service to an Elixir version, to met 2016 Olympics throughput increase.
Feedbacks are welcome.
Paasaa: natural language detection
Paasaa is a simple library for natural (human) language detection:
iex> Paasaa.detect "Detect this!"
"eng"
Impressions From My First ElixirConf
This week I attended the Elixir & Phoenix Conference with about 540 other people. It was the first time that I ever attended Elixir Conf. I wrote up some thoughts & impressions from an older and sometimes grouchy developer who has a lot of experience in .Net and almost no experience in Ruby.
River, an HTTP/2 Client for Elixir
River is an HTTP/2 client for Elixir. It’s very much a beta and under active development, but I intend to have full HTTP/2 & HTTP/1.x support. In short, River should eventually be the HTTP client you can use for any http use case, even if you’re not calling an HTTP/2 server.
Give it a look, and let me know what you think!
Documented example of using Cowboy in Elixir
When I was new to Elixir, I found the docs for NineNines’ Cowboy web server totally incomprehensible - even with experience they’re still obtuse. So I made this heavily documented example of using Cowboy to serve static assets, dynamic requests, and websockets in Elixir. Updated today for Elixir 1.3 with fixed links and more docco. Hopefully it’ll save you the day I wasted puzzling it out!
exfacebook
Few months ago I did the migration from Ruby to Elixir in one of my home project musicfeed. Elixir app is working as aggregator of facebook music feeds. As result of the migration I did the library for Facebook API that’s supporting pagination, batch requests, image and video uploads. I hope it could be helpful for someone as well.
Load your aliases when starting IEx
When working on a phoenix project, you often need to load add aliases once you fire up your IEx shell.
You can set them on IEx startup usingn a .iex.exs file:
Develop from anywhere in a browser with the intellij IDE
Applications are dockerized, docker-compose used to link containers. No client install needed. https://github.com/StefanHoutzager/elixir-dev-anywhere-docker Enjoy.
Generate Your Phoenix Project Documentation with ex_doc
ExDoc generates web documentation for any elixir project and that includes your phoenix applications! See how it works, what comes out, and pick up some tips.
How B/R trains Elixir devs
Learn how Bleacher Report has trained all of our Ruby devs to be Elixir devs. If you’re considering adopting Elixir or wondering how to get started with Elixir, this article will help get you started.
ElixirWeekly late this week due to ElixirConf
You will have to wait 24-48 hours longer for this week’s ElixirWeekly, since I am attending ElixirConf and will try to include some first impressions during the conference!
If you are here as well, be sure to say “Hi!”.
Feature Flags in Phoenix Projects Using Laboratory
Laboratory is an Elixir plug that allows developers to turn feature flags on/off in Phoenix or any plug-based web app. This article walks through how to set up feature flags in a Phoenix project using laboratory.
Kane: a Google Pub/Sub client for Elixir
Kane is a simple library for using Google’s Pub/Sub service in your Elixir app. It has support for both publishing and subscribing, and has a straightforward API that’s easy to use. Give it a try and let me know what you think!
Define Dynamic Functions with Dynamic Arguments (Arity) using Elixir Macros
There are two ways of dynamic function creation with arity using Elixir Macros. For both of the ways, the first thing is creating dynamic args.
