When to use Elixir language?

I have been asked multiple times recently questions about Elixir and if it’s a good fit for different projects. Let’s try clearing a few things out

ElixirCasts: Ecto Virtual Attributes

In episode #46 we’ll look at how we can use virtual attributes in Ecto to create fields in a schema that we don’t want persisted to the database.

https://elixircasts.io/ecto-virtual-attributes

External Service Testing in Phoenix

How to mock external service in test

https://thefirstapril.com/2018/05/14/External-service-testing-in-Phoenix/

Odometex, simple distance comparisons

Just published Odometex v0.1.0, simple distance comparisons for Elixir! 🌍🚶‍♂️🏃‍♀️

iex> Odometex.compare(7000)
# => [
  %Odometex.Result{label: "Central Park, New York", meters: 4000, times: 1.75},
  %Odometex.Result{
    label: "Champs-Élysées, Paris",
    meters: 1910,
    times: 3.664921
  },
  %Odometex.Result{
    label: "Passeig de Gràcia, Barcelona",
    meters: 1300,
    times: 5.384615
  },
  %Odometex.Result{label: "Football pitch", meters: 105, times: 66.666667},
  %Odometex.Result{label: "Basketball court", meters: 28, times: 250.0}
]

Any feedback or distance request is more than welcome!

How to implement your own :timer.sleep in Elixir

https://minhajuddin.com/2018/05/11/how-to-implement-your-own-timer-sleep-in-elixir/ a small fun exercise.

Juice - Reduce in memory data structures using a lightweight query language

https://github.com/rupurt/juice

Juice can collect and reject string or atom keys from an Elixir Map or List.

Given the map

iex> fruit_basket = %{
    apples: {
        granny_smith: 10,
        golden_delicious: 3
    },
    "oranges" => 5,
    plums: 6,
    "mangos" => 2,
    recipients: [:steph, "michael", :lebron, "charles"]
}

Return everything with a wildcard *

iex> Juice.squeeze(fruit_basket, "*") == %{
    apples: {
        granny_smith: 10,
        golden_delicious: 3
    },
    "oranges" => 5,
    plums: 6,
    "mangos" => 2,
    recipients: [:steph, "michael", :lebron, "charles"]
}

Remove plums and mangos

iex> Juice.squeeze(fruit_basket, "* -plums -mangos") == %{
    apples: {
        granny_smith: 10,
        golden_delicious: 3
    },
    "oranges" => 5,
    recipients: [:steph, "michael", :lebron, "charles"]
}

Only collect granny_smith apples and oranges with nested . notation

iex> Juice.squeeze(fruit_basket, "apples.granny_smith oranges") == %{
    apples: {
        granny_smith: 10,
    },
    "oranges" => 5
}

Collect plums and mangos for charles

iex> Juice.squeeze(fruit_basket, "plums mangos recipients.charles") == %{
    plums: 6,
    "mangos" => 2,
    recipients: ["charles"]
}

Setting up Brotli on Nginx or Phoenix

Brotli is a relatively new compression format that has two big advantages over gzip. It’s faster at compressing things and it compresses them down to nearly ~25% smaller files!

Let’s set up our Nginx server to serve brotli compressed HTML, CSS, JS and JSON assets! If you’re running Phoenix, Rails, Django, Node or anything else behind an Nginx proxy, this setup should work for you.

A basic strategy is also covered for serving brotli compressed assets from a Phoenix server running directly on the server without anything proxying in front of it.

Elixir Protocols: a gentle introduction

https://youtu.be/NB58aFTZmrE

Protocols are one of the more important but less publicized features of Elixir.

That’s why this lesson focuses on them directly rather than being part of a larger project. It explores defprotocol, fallback_to_any, defdelegate and working with structs.

Reversing BIP-39 and the Power of Property Testing

While building and testing a decoder to go along with the Bitcoin BIP-39 encoder we wrote a few weeks back, a simple property test uncovered a bug in our original implementation that I never would have caught through manual testing.

I’m blown away.

Check out the full article for a rundown on my property testing experience, and the full implementation of the decoder: Reversing BIP-39 and the Power of Property Testing.

Ethereum's Recursive Length Prefix encoding in Elixir

Ethereum’s Recursive Length Prefix encoding in Elixir Implementing RLP with recursive protocols

https://www.badykov.com/elixir/2018/05/06/rlp/

AlloyCI v0.6.0 released!

AlloyCI v0.6.0 has been released. The biggest change since last release is that it now supports any S3 compatible storage service, in order to store any build artifacts generated by your project. Check it out! https://github.com/AlloyCI/alloy_ci/releases/tag/v0.6.0

Plugs demystified

An entry-level introduction to Plug - build a simple website without using Phoenix.

https://www.pompecki.com/post/plugs-demystified/

New version of ElixirJobs with redesign and Telegram channel

New version of ElixirJobs has just been released, including a brand new design, easier offer posting and push of new offers to a dedicated Telegram channel.

Source code updates can be found as usual on GitHub and contributions are welcome!

Learn @elixirphoenix by rebuilding a mini-version of it. 16:00 GMT on 15th May. PM to register.

The first online class on rebuilding Phoenix will be on 15th May, 2018. Considering 16:00 GMT on 15th May (http://everytimezone.com/#2018-5-15,240 ). This session is free or pay what you want. Limited to 16 people. PM to register.

Why I'm co-organizing The Big Elixir Conference

https://medium.com/the-big-elixir/why-im-co-organizing-the-big-elixir-5700e63e1b06

New book: "Phoenix Web Development" is out now!

Hello Twitter! I am proud to announce that my first programming book on #elixir and @elixirphoenix has finally been released to the world! If you like my tutorial series on @Medium this will be right up your alley! https://www.packtpub.com/web-development/phoenix-web-development!

Troubleshooting On Running System By observer_cli

observer_cli inspired by erlang in anger and recon. It is mainly to find abnormality in the production system in a very simple and clear way.

StrawHat.Review: Review System.

Repo: https://github.com/straw-hat-team/straw_hat_review

We try to put together a review system analyzing some systems out there like Fiverr, Amazon, Google, Lyft and Uber.

Features

Review: it allow you to have multiple aspects with an score, imagine how many businesses like Fiverr have some features of the review you want to score independently.

Aspects: are like featured skills in the review that you would like to score: like good_communicator, nice_music or whatever comes to your businesses model.

Reactions: you can react to comments or reviews on the systems. You can use reactions as you please, maybe a like and dislike reaction, or funny or whatever makes sense to your business.

Comments: are just what you expect, you have a thread of comments for specific Review

Future Ideas

We want to add some soft of AI analytics that you could do, we could send the review to some Google services for example and then tag back the review. We are not planing to add this in the near future because we need to focus on making money so we can continue improving and creating free and open source code, but we are more than welcome to help you out in the process.

Also the ability to track directly the IPs and flag untrusted reviews and so on.

Benchee 0.13.1 with memory measurement fixes released

After our friend Michal Muskala tried out memory measurements in a benchmark and broke them (thank you!) we went to work and fixed them. Enjoy new and improved memory measurements in benchee 0.13.1 Changelog

Paseto (A better JWT) v0.3.0 release

This is marking the first release of an Elixir implementation of the Paseto (Platform-Agnostic SEcurity TOkens) specification. Unlike JSON Web Tokens (JWT), which gives developers more than enough rope with which to hang themselves, Paseto only allows secure operations.

Github: https://github.com/GrappigPanda/Paseto More info about Paseto: https://paseto.io RFC Draft: https://datatracker.ietf.org/doc/draft-paragon-paseto-rfc/

Previous page Next page