Using LiveView and GenServers to track BTC price
Short tutorial on how to use Elixir to track BTC prices: https://cmdarek.com/pages/using-liveview-and-genservers-to-track-btc-price.html
12th episode - Autostarting trading strategy ROUND 2 - crypto trading in Elixir
12th video in the series about building cryptocurrency trading bot in Elixir - this time we will focus on leveraging the Task
abstraction to simplify the autostarting and supervision tree of the Naive application. We will look into how we could stop tracking the trading symbols and drop the Naive.Server
altogether.
Link: https://www.youtube.com/watch?v=2_HIohZPT_Q&list=PLxsE19GnjC5Nv1CbeKOiS5YqGqw35aZFJ&index=12
Frontend setup with Vite.js for Phoenix + Liveview
In this post: https://mindreframer.com/posts/js-bundling-with-instant-live-reload-for-phoenix-and-liveview/ I outline required steps to make Vite.js work properly with Phoenix. This helps greatly during local development, because it applies changes directly in the browser, without going through the JS re-bundling step.
The resulting code is here: https://github.com/mindreframer/phx-vite-demo. I am mostly interested in feedback and ideas how to make it more approachable and convenient.
Hope you enjoy it!
Backend Engineer (Elixir) at Fresha
Come and work as an Elixir Back-End Engineer in the Engineering team at Fresha! We’re a fast-growing global platform that is revolutionizing the beauty and wellness industry. Fresha has quickly become a game-changing industry leader which is transforming how beauty and wellness owners run their businesses and how consumers find and consume their products and services.
All over the world, our customers book over 10 million appointments every month, with thousands of partner businesses worldwide (currently 45,000 and growing every day). We recently passed a significant business milestone of having processed $10B of bookings with our platform.
Given our scale, and our continued growth, we are looking to find the best engineers to come and join us on our mission.
Phoenix scaffolding generator which uses Tailwind CSS
I published a Phoenix scaffold generator which doesn’t use the default Milligram CSS but Tailwind CSS. https://github.com/wintermeyer/phx_tailwind_generators
Should be very interesting for everybody who is boarding the PETAL train.
Elixir Wizards S5E9 Brian Cardarella on Adopting Elixir
Latest episode of Elixir Wizards is out today! Check it out here: https://smartlogic.io/podcast/elixir-wizards/s5e9-cardarella/
Senior Backend (Elixir) position at Remote
Hey there! Remote is THE global platform that enables companies to employ people anywhere in the world, taking away all legal and compliance complexities. We do this using our own SaaS platform created on Elixir and Phoenix. We’re fully remote, we work asynchronously and use a simple approach to productivity and task management. We live our values and you can see exactly how we are in our public handbook. We’re growing and we need to expand our engineering team. If you have 2+ years of working experience with Elixir, why not consider joining us? Thank you!
ThinkingElixir 032: Circuit Breaker and Elixir Patterns with Allan MacGregor
In episode 32 of Thinking Elixir, we talk with Allan MacGregor about implementing the Circuit Breaker pattern in Elixir and compare that to just using a job library. We get into a fun discussion about design patterns in Elixir and designing for failure. Allan is creating a project called Site Guardian using the PETAL stack and shares his experiences with it and much more!
ex_check v0.14: new automations & curated tools to supercharge your Elixir workflow
Just released v0.14 of ex_check - a single task that runs all analysis & testing tools in Elixir projects. It comes with a load of new features that build upon ex_check’s “drop in solution” design to bring in even more time-saving automation so you can spend more time coding & less time waiting for CI to spit out issues.
-
Fix mode resolves issues automatically for tools that provide the fix command - useful on local machines for checking & fixing in one-shot and on CI for committing automatic fixes
-
Automatic toggling of retry mode when previous run resulted in failures allows to simply call task again after failures to do a faster check focused only on tools with issues
-
Capability to run only failed tests for tools themselves complements the retry mode and further optimizes the issue fixing workflow by re-checking only what has failed
-
Doctor tool ensures that the project documentation is healthy by validating the presence of module docs, functions docs, typespecs and struct typespecs
…and a few smaller improvements. Enjoy!
IntelliJ Elixir v11.9.2
Changelog
Bug Fixes
-
Protect from nested heredocs in documentation from stopping documentation’s heredoc as happens in
Module
andEcto.Query
.-
Use
~S
for@moduledoc
too, in addition to@doc
. -
Check if the documentation contains
“””
or‘’’
and use the opposite one as the promoter/terminator.-
If neither is used, use
“””
. -
If both are used, use
“””
, but then escape“””
as\”\”\”
.
-
If neither is used, use
- Trim trailing whitespace from documentation lines to match formatter output.
-
Use
-
Set
runIde
maxHeapSize
to7g
- Set to the same I run my own IDE at, so the debugged instance isn’t any slower than the normal IDE when I need to do extended all day testing to trigger bugs.
-
Test that all
FormattingTest
files can be parsed. -
YYINITIAL
is special - wrappers of the lexer assume that if inYYINITIAL
, it is safe to shift the lexer over when there is an error, having{OPENING_CURLY}
pushAndBegin(YYINITIAL)
when it was either inYYINITIAL
orINTERPOLATION
means that the lexer looked like it was restartable when it really wasn’t. This code has been in the lexer for 6 years.-
When in
YYINITIAL
,{
no longer recurses intoYYINITIAL
as}
does not need to be counted to determine if it is closing an interpolation. -
When in
INTERPOLATION
,{
entersINTERPOLATION_CURLY
to allow counting and matching of}
until it can exit and go back toINTERPOLATION
, where}
will exit the interpolation. -
When in
INTERPOLATION_CURLY
,{
enters another level ofINTERPOLATION_CURLY
to allow counting and matching of}
until it can exit and go up a level.
-
When in
-
The
}
inYYINITIAL
didyybegin(ADDITION_OR_SUBTRACTION_MAYBE)
, but it should have beenpushAndBegin(ADDITION_OR_SUBTRACTION)
asADDITION_OR_SUBTRACTION_MAYBE
or its following states all exit withhandleInLastState()
orpopAndBegin()
. This was not caught in #1859 because the extraYYINITIAL
frompushAndBegin(YYINTIAL)
hid the bug. -
Prevent nested
YYINITIAL
bugs in the future by erroring-
If trying to
pushAndBegin(YYINITIAL)
. -
If trying to
push(YYINITIAL)
and the state stack is not empty
-
If trying to
-
Clear the state Stack when
ElixirFlexLexer#reset
is called, as at the level of typing and pasting, theElixirFlexLexer
is wrapped in many layers of lexers includingLexerEditorHighlighter
where theElixirFlexLexer
is no longer re-instantiated when there is no text, but instead,ElixirFlexLexer#reset
is only called. This has always been an invariant violation since the stack state was added 7 years ago. It likely only became more apparent with the changes to +/- parsing in #1859 that made return-to-YYINITIAL
less likely.-
Since this
stack.clear()
has to be manually added toElixirFlexLexer.java
, which is generated fromElixir.flex
,ResetTest
is added to check that the code is still there.
-
Since this
-
For a reason I haven’t been able to explain, the
LexerEditorHighlighter
stops working after:
is typed at the start of an atom in certain situations, such as before)
inside a function call, like when adding an argument. In this case, the old version of the lexer would mark)
as aBAD_CHARACTER
and continue to do so until an expected atom start of [a-zA-Z_],‘
,“
, or an operator occurred. Now, if an invalid atom start is matched, theATOM_START
state ends and the previous state handles the text, which in the function case mean)
is parsed asCLOSING_PARENTHESIS
. This change allows the highlighting to continue. I do not know if returningBAD_CHARACTER
will always break theLexerEditorHighlighter
, but I don’t think, so since theGroovyLexer
inintellij-community
returns it, but it may be the case that it isn’t actually returned ever when users are typing and only handled by the lexer for completeness. Installation Instructions
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!