Smart Software Podcast - Dave Lucia on Rustler
New episode! Dave Lucia on Rustler. We talked with Dave about Rust and Elixir, how he got involved in open source, and his tips for folks who are wanting to contribute.
10 Killer Elixir Tips — #9
https://medium.com/blackode/10-killer-elixir-tips-9-7155532befd7
Escalate your Elixir with these Collection of Coding Tips
For better & productive lines of code always find an alternative.
It is a great pleasure to come up with another set of tips that you may or many not know.
Releasing an Elixir Umbrella App with Mix Release and Config
Haven’t had a chance to play around with Elixir’s new release tooling? Learn how to configure your umbrella app for release without Distillery by using mix release, the new Config module with runtime configuration specifications and Docker. https://elixirschool.com/blog/releasing-an-umbrella-app-with-docker-and-mix-release/
Converting to LiveView -- Step By Step (video and article)
Phoenix LiveView was undoubtedly the star of ElixirConf 2019. On the back of that excitement, I recently gave a meetup talk where I converted a traditional controller-driven application to a LiveView app – live! Now I’ve taken that talk and written a blog post describing how easy it is to do this on your own – step by step. The talk video is in the post as well!
https://geoffreylessel.com/2019/converting-to-phoenix-liveview/
Archivist: Plain-Text Blogging with Arcdown and Markdown
Hey all! FunctionHaus and myself have just released version 0.3.1 of Archivist, a plain-text blogging engine similar to Nabo that parses articles as Arcdown by default and uses Earmark to parse content as Markdown.
Archivist takes a similar approach to Nabo, but with some key differences:
-
Articles are formatted in
Arcdownformat by default, allowing for more robust articles and article features. -
Content parsing and sorting mechanisms are exposed as anonymous functions, easiliy exposing custom functionality.
-
Articles can be organized into nested topic directories for better organization. Topics are parsed in a hierarchical structure.
-
Use of an “intermediate library pattern” is supported, allowing content and articles to be stored in a dedicated library and separate repository.
-
Default attributes are included for both author names and email addresses
-
created_atandpublished_attimestamps are permitted -
Flexible tags can be applied as desired to any article
-
Custom content constraints throw warnings during compilation if violated
-
Slug uniqueness is enforced by default and triggers compile-time warnings
-
Image files can be stored alongside articles, and accessed with helpers
Archivist is under active development and will continue to be improved as it is deployed into production in multiple contexts. Issues are being actively tracked and addressed at the Archivist issue tracker on GitHub.
Please feel free to provide feedback and questions regarding the platform and its usage and we’ll do our best to assist.
Current packages for both Archivist and Arcdown are published to hex.pm.
ElixirMix Podcast 070: Home Automation Using Radio Frequencies with Jon Carstens
In this episode of ElixirMix, we talk with Jon Carstens about using Nerves Project, radio controllers and ingenuity for hacking the home. We also cover NervesHub’s new IEx shell, how it was built, what SmartRent.com does and much more!
Creating a Rate Limiter – Live Stream Archive
Eric’s Elixir live stream is back! Here’s the archive from yesterday’s session, where he added a rate limiter to the message sending part of Grapevine.
Sharing Phoenix templates across controllers & views
I published a new tutorial: https://alchemist.camp/articles/shared-phoenix-templates
Whenever you use Phoenix’s generators to create a full HTML scaffold, you’ll see that in the template directory, there’s a form.html.eex “partial” or sub-template that’s used inside of both the new.html.eex and the edit.html.eex.
The entire form is embedded inside those new and action templates with just this single line:
<%= render “form.html”, Map.put(assigns, :action, Routes.article_path(@conn, :create)) %>
You can use the same pattern to embed any eex template into another in the same directory. But some templates are things you’d want to render from any template. An email list sign-up form, for example, might appear within a blog post, an about page and many other parts of the site.
This tutorial goes through how to make a clean setup for these “shared templates” so it’s just as easy to create and use them as any other template.
IntelliJ Elixir v11.1.0
Enhancements
-
Update gradle plugins
-
gradle-intellij-plugin(org.jetbrains.intellij) to0.4.10 -
org.jetbrains.kotlin.jvmto1.3.50 -
de.undercrouch.downloadto4.0.0
-
-
Update IDEA version in builds
-
2019.2->2019.2.2
-
Bug Fixes
-
Don’t log if partial or no header typeID is read. It happens too often due to
.beamfiles being written partially to disk during the build process. They will be re-indexed when they are complete. -
Update gradle intellij plugin to fix
runIdeon newer macOS. -
Fix
ConcurrentModificationExceptionin Structure ViewJava 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in
HashMapwherecomputeIfAbsentdid not check for concurrent modifications, and it turns out thatTreeElementListwas using concurrent modifications, so it was now broke. Fixed by usegetorputif it is absent, so thatputNewcan ensure that theCallDefinitionis in theTreeElementListbefore it is added to theMutableList<TreeElement>, which was the original reason why there was aputinside ofcomputeIfAbsent, which would haveputwhen the function returned anyway.
On the Utility of Phoenix LiveView
Brief post documenting why I think LiveView is such a big deal: https://jclem.net/posts/on-the-utility-of-phoenix-liveview
Web UI for SMS Messaging using Phoenix channels.
Web UI for SMS Messaging using Phoenix channels.
Ecron- A lightweight/efficient cron-like job scheduling library.
Ecron is very simple and small, but it’s designed to be so, keeping lightweight and fully customizable.
- Both cron-like scheduling and interval-based scheduling.
-
Well tested by
PropTest100% coverage. -
Use
receive afterat any given time (rather than reevaluating upcoming jobs every second/minute). - Minimal overhead. ecron aims to keep its code base small.
Cowboy architecture and execution flow
A little in-depth blog post about cowboy and ranch OTP architecture. I tried to explain how cowboy handles requests and sends the responses.
Application Layering - A Pattern for Extensible Elixir Application Design
An in-depth walkthrough of Application Layering, a design technique for building maintainable, adaptable and flexible large-scale Elixir codebases.
Up And Running With Faktory In Elixir
This post covers how to get an Elixir application set up with Faktory to allow us to process jobs in the background of our applications and take full advantages of the many features Faktory has on offer.
Oban Recipes Part 5: Batch Jobs
In the fifth Oban recipe we consider monitoring jobs as a group with the power of pattern matching and queue introspection.
LazyFor → Kernel.SpecialForms.for/1 but returning stream
The stream-based implementation of Kernel.SpecialForms.for/1.
Allows the same syntax as for and acts the same way. This is an initial release. It does not yet support :into, :uniq and :reduce options and bitstring comprehensions.
Everything else is supported.
Gearbox - A functional state machine with an easy-to-use API, inspired by both Fsm and Machinery
Gearbox focuses on doing one thing and doing one thing right – state transitions. No surprise callbacks, no process management overhead, just pure functional state transitions.
Read more about the description/rationale behind the project over at GitHub!
