Understanding the Tradeoffs with Elixir Typespecs and Dialyzer
In today’s post I want to start a conversation around the tradeoffs of using Typespecs and Dialyzer use in your Elixir code.
Early access for Testing LiveView is open! 🥳
The course focuses on mastering LiveView’s new testing tools as well as learning the thought process behind writing effective LiveView tests so they’re fast, robust, and easy to maintain.
Elixir Wizards S5E8 Matt Nowack and Jake Heinz on Elixir and Discord; Bonus: Arthi Radhakrishnan, Community.com
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s5e8-nowack-heinz/
The best books to start, or improve your Elixir career
When you start your adventure with Elixir, you may wonder where to get the knowledge. In this article, I have prepared a list of books that may help you to become an Elixir programmer, or improve your career.
https://bartoszgorka.com/the-best-books-to-start-or-improve-your-Elixir-career
ElixirCasts 129: Phoenix LiveView LiveComponents
Get an introduction to LiveView LiveComponents and how you can use them in your Phoenix apps.
Crafting Beautiful Emails in Elixir Using MJML
Learn how to compile your MJML email templates into EEx templates at build time and send them out using Swoosh. Also learn how to edit the Phx.Gen.Auth scaffolding in order to send out these MJML emails when users register.
https://akoutmos.com/post/mjml-template-compliation/
phx_gen_auth and OAuth
Integrating phx_gen_auth and OAuth for a Phoenix LiveView app https://iacobson.medium.com/phx-gen-auth-and-oauth-for-a-phoenix-liveview-app-a19a27e6befa
Have you heard the good news about Elixir? (Why we chose Elixir for our MMO game server)
A look at the requirements and goals that pushed us to choose Elixir for our massive multiplayer game server, plus a post-mortem of the pros & cons of Elixir that we ran into during the implementation.
https://developer.x-plane.com/2021/01/have-you-heard-the-good-news-about-elixir/
elixir/nerves based LoRaWAN gateway server and client
finally my employer http://pmr-rnd.de published the web pages on our elixir/nerves programmable LoRaWAN gateway server http://pmr-rnd.de/lora-gateway/ and the wip page for our LoRa client http://pmr-rnd.de/lora-client/
ThinkingElixir 031: Crawling the Web using Elixir with Oleg Tarasenko and Tze Yiing
In episode 31 of Thinking Elixir, we talk with Oleg Tarasenko and Tze Yiing about crawling the web using Elixir. Oleg created the crawly project to help solve this problem and Tze Yiing joined him as a contributor and maintainer. We cover how Elixir is well suited to orchestrate crawling projects, how to deal with login pages, understanding the legal concerns, building a codeless scraper and much more!
How Absinthe Uses Compilation Callbacks for Schema Validation in Elixir
Let’s look closely at how Absinthe uses some metaprograming tricks and module attributes to provide compile-time schema validation for us.
Create a crypto bot in Elixir ebook updated (early alpha 2)
https://leanpub.com/create-a-cryptocurrency-trading-bot-in-elixir/
4 new chapters, All code starting from chapter 2 got refreshed, logs improved and many descriptions rephrased.
Surpassed 100 pages 🍾 Enjoy ❤️
Getting started with PETAL
As a follow-up to my post about the PETAL stack on the Changelog.com blog I put together this getting-started-guide for anyone wanting to try it out. Hope it helps: https://underjord.io/getting-started-with-petal.html
Open-source Deep Dive: Hound
Started a new blog series - Open-source Deep Dive - where I dissect an open-source project and try to understand the project and the underlying technologies that power it!
The project to kick start this series is Hound - an Elixir library for browser automation and integration testing!
For this project, I explored how browser automation works and looked at how Hound takes fundamental principles of Elixir to build a robust library for writing integration tests with browser automation. I tried to focus on keeping the explanations clear and simple for even beginners to understand!
The post can be found here: https://woojiahao.github.io/blog/posts/2021-01-10-Open-source Deep Dive: Hound
IntelliJ Elixir v11.9.1
Changelog
v11.9.1
Bug Fixes
-
Fix syntax highlighting stopping due to decompiling of
Kernelfailing caused by bugs introduced in #1834. Syntax highlighting could fail part way through a file whenKernelneeded to be decompiled to resolve parts of the syntax. This would lead to the file to be colored above a certain point, but then the default gray after that point.-
Connect compiled stubs to decompiled source by name/arity.
Previously, when the decompiler didn’t use the
Docs, it was guaranteed that thePsiCompiledstubs would correlate, in-order, with the decompiled source call definitions, and so mirrors could be set by matching up the list of them in order. Since theDocsdoesn’t have to correspond to and doesn’t correspond to the binary precisely for some BEAMs, most importantly,Elixir.Kernel.beam, the PsiCompiled stub and decompiled source is now matched by name and arity. This means some mirrors are missed, but no errors are produced. -
Allow decompile source to map to entire arity range
Since the decompile source from
Docscan have default arguments the call definition clauses can have an arity range and not just a fixed arity, so all arities in the range need to be mappable toPsiCompiledfunctions. -
Use correct macro for signature from
Docs. Ensures that defmacro is used for macros instead of hard-codingdefas in #1834. -
Use
~S”””for docs fromDocschunk. The docs from theDocschunk may contain interpolation in the code samples or#{in regex examples, but these should not be treated as an interpolation start as theDocsformat does not support interpolation. Anything that looks like interpolation in the docs text was actually escaped in the original docs, so also escape it here by usingS”””, which turns off interpolation. -
Log an error if
Codefunction can’t be matched to decompiled source. Unlike the oldInvalidMirrorException, this won’t be an exception and the binary <-> decompile will still work for the other functions/macros in the file, so it will be a more graceful degradation.
-
Connect compiled stubs to decompiled source by name/arity.
Previously, when the decompiler didn’t use the
-
Fix missed references to
DepsWatcheras project componentDepsWatcherwas converted to a Project Listener in #1844 to support installing the plugin from the Marketplace without reloading, but some references toDepsWatcherwere still trying to get its instance for project usingproject.getComponent(), which would now returnnull. -
Target Java 1.8 for JPS compatibility. JPS (JetBrains Project System) is the API used to allow External Builders, like
mixto build projects. -
Fix matching
unquote(ATOM)call definitions to compiled function by using the argument tounquotewhen calculating the name of the call definition clause if possible. Needed to match anonymous function names that areunquoted because they contain/to separate the outer function name from the anonymous function naming convention. -
Don’t use
Docssignature forMacroNameAritythat is an operator orunquoted The signatures for operators andunquoted don’t produce valid code that can be parsed. -
Don’t use signatures for
__struct__functions. The signatures for the__struct__functions are like%Module{}, but that’s not parseable, so bypass the signatures with a specializedSignatureOverridedecompiler that matches the actual code indefstruct. -
Don’t indent empty lines from
Docsfor@moduledocand@docto match the formatter output. -
Fix capitalization of
Docs@moduledoc@moduleDoc->@moduledoc
A hook for handling very large lists with Phoenix Live View
How to stream very large lists to improve page load & rendering time.
Elixir Wizards S5E7 Jason Axelson on the Elixir Language Server
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s5e7-axelson/
RakNet game networking protocol in Elixir
We’ve open-sourced the most important component of the massive multiplayer server we use for the X-Plane flight simulator: an implementation of the RakNet protocol.
You can find it on GitHub, under the MIT license: https://github.com/X-Plane/elixir-raknet
A bit of background:
RakNet is a popular C++ library for doing game networking. It provides things like stateful connections, client clock synchronization (the bane of every network game programmers’ existence), and both reliable and unreliable UDP transmissions, so you can choose how much latency your packets can handle.
This is pretty niche stuff, but maybe it’ll be useful for someone else. Reverse-engineering this stuff from the RakNet source was, uh, a bit of a pain. 😄
EctoExtras - simple helper functions missing from the default Ecto implementation
EctoExtras is a set of simple helper functions for Ecto.Repo and Ecto.Query that I find missing from the default implementation. https://github.com/pawurb/ecto_extras
