Building a webserver in Elixir. - Peter Saxton
http://crowdhailer.me/talks/2017-04-29/building-a-webserver-in-elixir/
Talk given at the London Meetup group. First introducing the awesome, that is processes in Elixir. Second how to coordinate them and build web-server.
Elixir deployments: our data on what the community needs
I previously wrote up of a simple Elixir deployment method for AWS. At the same time as this, I asked the community at large to fill in a short survey around what they look for with deployments.
I’ve written up some conclusions from this, and linked the data for others to see, in this post:
https://medium.com/mint-digital/elixir-deployments-our-data-on-what-the-community-needs-cdc053a4285b
MBU: Mix Build Utilities
I published my first package, a collection of utilities for writing Mix build tasks: https://hex.pm/packages/mbu
Docs: https://hexdocs.pm/mbu/readme.html
tl;dr Logging, dependencies, watch support and utility functions for Mix tasks.
More info about my motivations: https://blog.nytsoi.net/2017/03/24/fbu-frontend-build-utilities
Subscribe to messages with pattern matching
I wrote a blog post about how to save a pattern to be used later in pattern matching.
My use case was publish/subscribe, where I needed to subscribe to terms with a pattern instead of a topic.
https://medium.com/@lasseebert/subscribe-to-messages-with-pattern-matching-8723f5121135
ex_lcd updated to v0.4.0
I have updated ex_lcd to better handle external dependencies. No new functionality is included in this release.
Released v0.4 of phone
Just released v0.4 for phone, a parser to extract information from telephone numbers without consulting any external source.
This release improves performance a lot, going from 1ms in worst cases to 10µs. This performance gain is due to some complexity in the lib, so expect a long compilation time.
In this release was added too a valid?/1 function, to verify if its a valid telephone number without parsing.
hex
github
Benchmarking Elixir Benchmarking Tools
In my latest blog post I compare three well-known benchmarking libraries available for Elixir, focusing on their pros and cons with some sample codes to help in understanding. https://blog.digitalnatives.hu/benchmarking-elixir-benchmarking-tools/
ShorterMaps 2.0 released: ES6 map shorthand for Elixir
Tired of the duplication in writing code like %{id: id, first_name: first_name, last_name: last_name}? Dry it up with ~M{id, first_name, last_name}.
Here are the syntactic variants the macro exposes:
-
Atom keys:
~M{a, b}=>%{a: a, b: b} -
String keys:
~m{a, b}=>%{“a” => a, “b” => b} -
Structs:
~M{%Person id, name}=>%Person{id: id, name: name} -
Pinned variables:
~M{^a, b}=>%{a: ^a, b: b} -
Ignore matching:
~M{_a, b}=>%{a: _a, b: b} -
Map update:
~M{old|a, b, c}=>%{old|a: a, b: b, c: c} -
Mixed mode:
~M{a, b: b_alt}=>%{a: a, b: b_alt}
~M and ~m (atom vs. string keys) can be used to replace maps anywhere in your code: creating maps from existing variables, creating new variables while destructuring maps, pattern matching in lambdas, function heads or case statements.
See it on Github. Get it with {:shorter_maps, “~> 2.0”},
Phoenix and Elm, a real use case (pt. 6)
Here is the last part of my series about Phoenix and Elm, where we cover communication through WebSockets.
http://codeloveandboards.com/blog/2017/03/19/phoenix-and-elm-a-real-use-case-pt-6/
Little things that saves time in Elixir Coding....
Some interesting things that saves time while coding in elixir…
https://medium.com/@blackode/little-things-that-saves-time-in-elixir-109d0662fc55
This list grows in number…
Highlights
- Clear Explanation with two ways of doing things
- 7 Interesting things to be cared
Happy Coding
Elixir Math Tips
I share some of the interesting stuff I’ve learned about working with math in Elixir: http://awochna.com/2017/04/02/elixir-math.html
CookieJar is here to store your cookies
https://hex.pm/packages/cookie_jar
This lib helps with hacking around (building clients/bots to access) websites that rely on cookies to store user status, e.g. auth, page history, etc. It has httpoison and httpotion integration builtin.
Check the docs and source code.
Difference between views and templates in Phoenix
Normally in MVC frameworks, the view and the template are essentially the same thing. But in the case of Phoenix Framework, they refer to different components…Phoenix templates are compiled to rendering functions and are placed in the corresponding view modules…
https://samueltthomas.com/difference-between-views-and-templates-in-phoenix
GenStage for continuous job processing
Continuously polling AWS SQS for messages and processing them with GenStage. Production application experience from @uSwitchEng.
https://labs.uswitch.com/genstage-for-continuous-job-processing/
ex_lcd updated to 0.3.2
I updated the ex_lcd hex package to 0.3.2 to resolve a dependency issue. ExLCD is a library to easily use character matrix LCD displays in your Elixir nerves projects.
How to Test Shared Behavior in Elixir
Implementing functionality similar to RSpec’s shared examples using ExUnit, by a Rubyist.
https://blog.codeminer42.com/how-to-test-shared-behavior-in-elixir-3ea3ebb92b64
[Ann] Elixirocks Conference @ Denver CO Nov 9-10 2017
All,
Announcing an all things Elixir conference in Denver CO on Nov 9-10 2017.
Please check out Elixirocks and follow us on twitter @exr
We hope you will join us!
Thank you!
A lot of Piping involved
Let’s learn how to use the pipe operator. With a real world example and how to debug it.
http://www.littlealchemist.io/2017-03-28-A-lot-of-piping-involved/
ETag tracking and Elixir
I’m playing with Elixir and abusing ETag (caching mechanism built into HTTP protocol) to track users.
http://blog.sundaycoding.com/blog/2017/03/28/etag-tracking-and-elixir/
Develop data driven SPAs with Elixir, Cowboy and React
This is an example application built from scratch that shows how to use Elixir, Cowboy and Ecto in conjunction with React, Redux and Redux Saga to create data driven Single Page Applications.
