Morphix v0.1.1 released, now with partiphification!
Morphix is a small library of convenience methods for manipulating Enums, including flattening lists and tuples, converting strings to atoms, and odder things.
The new partiphify method divides a list into k balanced sublists, such that:
> Morphix.partiphify!([:a,:b,:c,:d,:e,:f,:g,:h,:i,:j], 4)
[[:e, :f], [:g, :h], [:i, :a, :b], [:j, :c, :d]]
The difference between Morphix.partiphify and Enum.chunk is twofold: first, you always get k sublists, even if one or more are empty, and second, the output list sizes are balanced. The use case it was designed for was dividing a list of inputs across a fixed number of workers.
code and documentation
Use the 1.6 code formatter in your browser
We built an in-browser Elixir formatter so everyone can use the new formatter today without installing 1.6-dev.
Using constant pools to speed up your Elixir code
A brief introduction to module constant pools, colloquially known as the ‘compile module hack’, to increase read throughput and alleviate memory pressure.
https://medium.com/@jacob.lerche/using-constant-pools-to-speed-up-your-elixir-code-c527d533c941
Partial Templates with Phoenix
In the latest episode or ElixirCasts we explore using partial templates in Phoenix.
Watch it here: https://elixircasts.io/partial-templates-with-phoenix
ExVenture Updates for November 2017
Recent updates for ExVenture, a MUD written in elixir. Highlights include having NPCs fight back now.
Brewing Elixir - Distribute Elixir Programs Using Homebrew on OSX
Elixir is mostly used for writing server-based software, but there’s no reason that has to be the case. It’s useful for quick user-scripts too. Here’s a blog post documenting the steps required to distribute your new Elixir script via Homebrew. Enjoy!
Announcing Phoenix in Action from Manning Publications!
The new book Phoenix in Action has been released in Manning’s MEAP. Through Nov 28, use the code mllessel to get 50% off.
Ebert for Elixir/Phoenix - First Steps
Let Ebert code review service help you write better code. Here’s how to get started.
https://medium.com/@kimlindholm/ebert-for-elixir-phoenix-530768b07dbd
Elixir for Java Developers, Episode III
After covering some of the basics comparisons about Elixir and Java, it’s time to compare more advanced topics. Here we’ll talk about things like polymorphism, inheritance and composition.
Check it out: https://medium.com/@dojusa/elixir-for-java-developers-episode-iii-e2257c2da17f
Now with @rvirding, @spawnfest's panel of judges (http://spawnfest.github.io/judges) is complete!
You can totally write your projects in #LFE, #erlang, #elixirlang or any other flavor of #Beam. Register your team for FREE and win important prizes
Yet another telegram bot
Recently I got an opportunity to write a simple Telegram bot. The purpose of this bot is very simple: it has to send random quotes of Victor Pelevin for any user interaction. I decided to write this bot in Elixir. So in this post I will try describe the bot’s implementation.
http://www.badykov.com/elixir/2017/11/26/simple-telegram-bot/
Using Minio as an Object Store with Arc.
While working on http://app.twch.at/, I needed a way to store arbitrary files (e-mail bodies, images, etc) with Arc. However, I didn’t see a point in using S3 immediately, especially because I wanted tests to run against an actual instance in integration without incurring (negligible) fees.
I wrote about this here: https://jacky.wtf/weblog/arc-minio/
Elixir web development 101
Part 1: Elixir web development 101: introduction & toolchain setup
Part 2: Elixir web development 101: collaborative todolist with realtime updates
This two-part serie started as a brain dump of my first steps in Elixir & Phoenix web development and ended as a small tutorial on how to build a collaborative todo app with realtime updates using websockets. Hope it helps to get you started!
The code is available on Github.
When ecto associations conflict with phoenix context boundries
If neither belongs_to nor has_one/has_many seem to fit your use case maybe take a look at ectos abstract tables.
https://medium.com/@lostkobrakai/phoenix-contexts-and-ecto-abstract-tables-e6b4de93edf
5 reasons you should use Phoenix instead of Rails in your next project
This post is about the 5 reasons that made me switch and why you should consider using Phoenix instead of Rails in your next project • http://elviovicosa.com/blog/2017/11/23/5-reasons-to-use-phoenix-instead-of-rails.html
Elixir is now an official backend for RealWorld.io!
Our project has just been accepted by RealWorld.io and is now on their backend ranking.
-> https://github.com/gothinkster/elixir-phoenix-realworld-example-app
Me and many other contributors of the (amazing) elixir community have created this Elixir + Phoenix project which implements the RealWorld.io specs.
If you’re in the competitive spirit, the ranking is ordered by GitHub stars, so star the above repo so we can get to the podium!
Currently: #1 Node/Express with 605, #2 Laravel with 359 and #3 Django with 224
A big thank you to all who have contributed so far! And of course, contributions are still very much welcome!
Idiomatic function memoization in Elixir
I have written a blog post showing how to memoize functions in Elixir and providing the scaffold for the Memoize module that could be used as
use Memoized, name: FortyTwo, fun: fn -> Process.sleep(1_000); 42 end
Testing Individual Elixir Doctests
I’ve written a blog post on how I test a specific doctest. Useful when you want to zero-in on a failing test.
Refactoring Composable Queries with Ecto
I expand and refactor my approach in part 2 of my article on Composable Queries with Ecto. Bringing a modular approach to how we craft queries make complex requests simple. https://blog.echobind.com/composable-queries-with-ecto-part-2-e590af56d741
plymio_ast_vorm v0.1.0
More metaprogramming mayhem from me with the first release of plymio_ast_vorm, a toolkit for managing a collection of Quoted Forms (Asts).
