Lesson 12 Constructing bitmap files with Elixir
youtu.be/9o5bDiCiJ90
Let’s take advantage of Elixir’s built-in binary handling and construct Win2.x bitmap files! No external dependencies needed. #nostalgia
EventBus v0.8.0 released
Your favorite event delivery library has a new version with new features. https://github.com/mustafaturan/event_bus
[0.8.0] - 2018-01-06
Added
-
Register/unregister topics on-demand (
EventBus.register_topic/1andEventBus.unregister/1) -
Add block/yield builder for Event with auto
initialized_atandoccurred_atattribute assignments - Add block/yield notifier for delivering/notifying events creation with same benefits of build block
- Add samples to README
- Add CHANGELOG file
Elixir Wants to Change the Way You Think About Programming
A look at how we think about code at 10,000ft and how learning Elixir has made me see programming differently through three key languages features: immutability, data transformations, and syntactic expressiveness.
Nerves Project January Update
See what the Nerves core team and community have been working on recently and where you can learn more about Nerves at upcoming training events - http://embedded-elixir.com/post/2018-01-02-nerves-update/
Logging from headless Nerves machines to Papertrail
I wrote a little how-to on setting up logging to Papertrail from a headless Raspberry Pi running Nerves.
https://timgilbert.wordpress.com/2017/12/31/logging-from-headless-nerves-machines-to-papertrail/
AC8: Creating a DSL for our router
Building the http://Alchemist.Camp website, Part 8.
Let’s write some macros and make a nice router DSL like Phoenix has!
What I Learned During the Advent of Code
I learned quite a bit after completing this year’s Advent of Code challenges with Elixir. Check it out!
Pattern matcher for Protocols
Just blogged about how one could pattern match function clauses against the implementations of the protocol.
http://rocket-science.ru/hacking/2018/01/03/pattern-matcher-for-protocols
AC7: Creating controllers for a Cowboy web server
Building the http://Alchemist.Camp website, Part 7. It’s time to make controllers.
Our router was starting to look like a kitchen sink so we factored a controller out of the app and started pulling some code into a framework. This required the use of simple macros.
Elasticsearch
Elasticsearch is a new Elixir library for interacting with Elasticsearch. Highlights include:
-
No DSLs. Interact directly with the
ElasticsearchJSON API through simpleget/put/post/deletefunctions. - Zero-downtime index (re)building. Via an included mix task.
- Dev Tools. Helpers for running Elasticsearch as part of your supervision tree during development.
It’s based on protocols and behaviours, so it’s both simple and flexible.
Cloak v0.4.0 Released!
Cloak makes it easy to encrypt data in your Ecto schemas. This new release adds several new features, including support for AES.GCM encryption.
https://github.com/danielberkompas/cloak/releases/tag/v0.4.0
IntelliJ Elixir v7.2.0
Enhancements
-
mixruns will be faster as they will no longer check to see if the SDK is updated.
Bug Fixes
- Avoid problems with read and write locks when updating Elixir SDK on-demand by instead updating them when any project is open using a project converter.
-
JetBrains/intellij-community@9adbba0 added
@NotNulltoOrderRootType.getOrderRootType, whichJavaDocRootType.getInstancecalls, which means any Small IDE usingintellij-communitysince 4 months ago, including the newest CLion cannot haveJavadocOrderRootType.getInstancesafely called. -
Path changes were not being written back to disk because the
projectSdksModel.apply()was being called before theeditor.apply(), which would have copied to theeditor’s path changes to theprojectSdksModel.
Winners for @spawnfest were announced!
Check it out: https://spawnfest.github.io/winners/ Congratulation @micmus, @bondalex & @andrewdryga!! You won, big time!
IntelliJ Elixir v7.1.0
Enhancements
-
Elixir Facet in Small IDEs
- Preferences > Languages & Frameworks > Elixir can set the Elixir Facet SDK for the Project Module used in Small IDEs as a per-project settings.
- Preferences > Languages & Frameworks > Elixir> SDKs can add, delete, and configure Elixir SDKs as per-application settings.
- Preferences > Languages * Frameworks > Elixir > Internal SDKs can add, delete, and configure Erlang SDK for Elixir SDKs as per-application settings.
-
Configure SDK before running
mixwhen importing mix projects, so that themixpath does not need to be configured separately from the SDK path.-
The
mixpath no longer needs to be setup independently from the Elixir SDK.
-
The
-
Add Local shared
credoinspection, so the thecredoinspection works for Code > Code Cleanup.-
Show Mix ExUnit in context menu in Elixir Facets, so that
- Run ‘Mix ExUnit …’
- Debug ‘Mix ExUnit …’
- “Create “Mix ExUnit …’”
testdirectory and it is Marked as a Test Sources Root. It will appear green in Rubymine if already marked. To mark it, do the following:-
Right-Click
testdirectory - Select “Mark Directory as > Test Sources Root”
-
Show Mix ExUnit in context menu in Elixir Facets, so that
Bug Fixes
-
Protect access to
JavadocOrderRootType.getInstance()so that it doesn’t cause an error in Small IDEs where its Extension Point is not defined. - If the explanation tooltip is empty, fallback to the message for the credo annotator instead.
-
Check if
SdkAdditionalDataisnullbefore gettingErlangSDKas it can benullin certain scenarios in Rubymine. -
Fix
isConfigurationFromContext, so that it works on Mix ExUnit Run Configurations generated from directories. Check if theprogramParametersandworkingDirectorymatch by just generating another configuration from the context as this ensures the logic matches and includes support forPsiDirectory.
Elixir Users' Survey 2017
I’ve just published this year’s Elixir Users’ Survey. If you’d visit this link and fill it out for me I would sincerely appreciate it! :)
Raxx 1.0.0-rc.2 released
https://hex.pm/packages/raxx/1.0.0-rc.2
Raxx is a simple, functional foundation for web applications. It’s role is as an alternative to plug.
This release adds typespecs throughout to work with dialyzer.
.iex.exs to the rescue
Blogged about .iex.exs file tuning and project-specific iex configurations goodness.
— http://rocket-science.ru/hacking/2017/12/29/iex.exs-to-the-rescue
Unit Testing Phoenix Controllers with Mox
Here’s a walkthrough for unit testing Phoenix controllers using Mox, from installation to basic mocking strategies
https://spin.atomicobject.com/2017/12/27/elixir-mox-introduction/
[pt-br] Elixir practice: encontrando todos os anos bissextos do século 20
Elixir practice: encontrando todos os anos bissextos do século 20 com Elixir.
