Setting up Ecto in an Elixir Application

I setup Ecto within my Domain Scrapper application. See what I learned.

http://learningelixir.joekain.com/setting-up-ecto-in-elixir/

Lego robot powered by Elixir has a mind of its own

Yesterday was part 3 of a series on Elixir and Robotics at the Portland (Maine) Erlang & Elixir meetup.

I demoed a mobile Lego Mindstorms robot running an Elixir implementation of a home-brewed “model of the mind”. The robot in turn foraged, roamed and panicked as it reacted to changes in its situation.

See my latest post.

This week's scalesmall post packs more Elixir goodies and less theory (by @dbeck74)

This post puts emphasis on being useful outside the scalesmall experiment and shows examples about embedding ranch into my supervision tree, and a bit of UDP multicast:

http://dbeck.github.io/Scalesmall-W5-UDP-Multicast-Mixed-With-TCP/

Hope you find this useful.

Ecto v1.1 released and Ecto v2.0 plans

Ecto 1.1 has been released, and José Valim wrote a blog post about it and also about what you can expect from Ecto 2.0.

One of the interesting news about Ecto is that Ecto.Model is being deprecated. Read the blog post and discover why.

Small Pusher.com replacement

In Part 2 of my series about “Ex Pusher Lite” I finish my small system that can be used to replace simple use cases of Pusher.com in your own environment. There is the obligatory real-time chat over a Rails app that I deployed on Heroku if you want to see it in action here. Of course, this is not full featured yet, but the core works. Follow this series to know when I add new features.

Credo has its own Style Guide

If you wanna know about Credo’s Style Guide, this is intended for some light reading on the weekend: http://trivelop.de/2015/12/11/writing-a-style-guide

Track the ISS using the Open Notify API

A small wrapper for the open notify api that allows you to get the ISS’s current location, crew, and when it will pass over certain coordinates

https://github.com/cryptobird/ex_iss

Finalized the group membership message contents of scalesmall during the 4th week (@dbeck74)

After having spent so much time with planning, I finalized part of the scalesmall design and implemented it together with the unit tests:

http://dbeck.github.io/Scalesmall-W4-Message-Contents-Finalized/

(This is an open source Elixir project on github. References are in the blog post.)

Populating database tables from a CSV in Elixir

For my current project, I had to populate my database with data from a CSV file. It was a nice experiment that I documented in the following blog post:

http://www.rymai.me/2015/12/08/populating-database-tables-from-a-csv-in-elixir/

Idiomatic Elixir

A discussion on Idiomatic Elixir and an announcement for a new book.

http://learningelixir.joekain.com/idiomatic-elixir/

Credo 0.2.0 released!

This update adds Error Codes for CI and 10+ new checks!

GitHub: https://github.com/rrrene/credo (CHANGELOG)

Using C from Elixir with NIFs

I wrote a hopefully comprehensive article about using NIFs in Elixir :)

http://andrealeopardi.com/posts/using-c-from-elixir-with-nifs/

RangeExtras: O(1) set operations and random sampling for ranges

RangeExtras gives you fast set operations and random sampling:

iex> RangeExtras.union(1..4, 3..5)
[1..5]

iex> RangeExtras.difference(8..1, 4..4)
[8..5, 3..1]

iex> RangeExtras.intersection(8..1, -4..0)
[]

iex> RangeExtras.random(1..1_000_000)
166577

RangeExtras.random/1 benchmarked against Enum.random/1:

RangeExtras.random(1..1000)         0.89 µs/op
Enum.random(1..1000)                375.37 µs/op

RangeExtras.random(1..1_000_000)    0.90 µs/op
Enum.random(1..1_000_000)           385288.60 µs/op

I hope you find this useful! Grab it from Hex.

Released Mandrake v0.0.4: https://hex.pm/packages/mandrake

Mandrake is a functional programming library that bring something else magic in elixir.

Github: https://github.com/mbasso/mandrake

Hope you find this useful.

How to support do/else/after blocks in your own Elixir functions

I blogged about Elixir’s block keywords.

The blog post explains how they work and implements a silly macro to print a random animal:

MyMacro.pick do
  IO.write "dog"
else
  IO.write "cat"
after
  IO.puts "!"
end

The BEAM Toolbox (categorized Hex packages)

Use The BEAM Toolbox to browse Elixir and Erlang packages.

You can also help out by categorizing a few packages – you learn things, and it’s strangely addictive…

Ex Manga Downloadr - Part 4: Learning through Refactoring

Yesterday I just posted Part 3 of my Manga downloader exercise and now it was time for a cleaning up and refactoring to make the code more presentable. And this is Part 4 where I finally explore a bit more of Elixir’s macros.

How I added custom predicate guards w/ macros in scalesmall (@dbeck74)

3 weeks has passed with the experiment and finally I decided what to implement from my too many ideas. This post is about a small implementation detail that enables tight predicate checking with custom guards on functions:

http://dbeck.github.io/Scalesmall-W3-Elixir-Macro-Guards/

Hope you find this useful.

The Obligatory "Flame War" Phoenix vs Node.js

I don’t usually like flame wars, but I just couldn’t help myself here. This is my biased, unfair take on Phoenix vs Node.js in a very simple and unfair synthetic benchmark. Viewer discretion is advised.

Ex Manga Downloadr Series

In my endeavor to learn Elixir I built a simple and effective tool to scrap the MangaReader.net website in order to build PDF files of my favorite mangas for my Kindle reading pleasure. I had a similar tool written in Ruby before and I ported it to Elixir in Part 1 and I fixed concurrency pooling in Part 2. And now, I decided that I wanted a few mangas from another source: Mangafox! And this is exactly what I built in Part 3. Still a work in progress but already a very useful tool for manga “otakus” (enthusiasts).

Previous page Next page