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/
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!
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
published_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.
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.
Update gradle plugins
Update IDEA version in builds
- 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.
ConcurrentModificationExceptionin Structure View
Java 9 fixed a bug (https://bugs.openjdk.java.net/browse/JDK-8071667) in
computeIfAbsentdid not check for concurrent modifications, and it turns out that
TreeElementListwas using concurrent modifications, so it was now broke.
Fixed by use
putif it is absent, so that
putNewcan ensure that the
CallDefinitionis in the
TreeElementListbefore it is added to the
MutableList<TreeElement>, which was the original reason why there was a
computeIfAbsent, which would have
putwhen the function returned anyway.
Brief post documenting why I think LiveView is such a big deal: https://jclem.net/posts/on-the-utility-of-phoenix-liveview
ElixirWeekly: The Elixir Community Newsletter, covering community news you easily miss, shared on ElixirStatus and the web, in one email every Thursday.
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
receive afterat any given time (rather than reevaluating upcoming jobs every second/minute).
- Minimal overhead. ecron aims to keep its code base small.
A little in-depth blog post about cowboy and ranch OTP architecture. I tried to explain how cowboy handles requests and sends the responses.
An in-depth walkthrough of Application Layering, a design technique for building maintainable, adaptable and flexible large-scale Elixir codebases.
The stream-based implementation of
Allows the same syntax as
for and acts the same way. This is an initial release. It does not yet support
:reduce options and bitstring comprehensions.
Everything else is supported.
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!
Together with @danschultzer I wrote a guide on doing password validation rules in Pow based on the NIST SP800-63b recommendations. https://powauth.com/guides/2019-09-14-password-breach-lookup-and-other-password-validation-rules.html