Add Toaster in Phoenix LiveView application
This blog demostrate how to add Toaster message in Phoenix LiveView application.
https://abulasar.com/adding-toaster-message-in-phoenix-liveview
Avoid test setup pollution (and 4 problems it creates)
I’m not big fan of using shared setups in Elixir such as setup [:create_user]. I often feel that it adds more problems at the cost of a somewhat debatable convenience.
For example, it sometimes creates unused data or introduces mystery guests, or the data created needs to be updated anyway. Or it simply obscures the test by separating the context in which the test runs from the exercise and verification.
I wrote a bit about that in a post.
https://www.germanvelasco.com/blog/avoid-test-setup-pollution-and-four-problems-it-creates
ThinkingElixir 104: Exploring Our Data with Chris Grainger
In episode 104 of Thinking Elixir, Chris Grainger explains Explorer, Nx’s recent addition. It’s a “Data Frame” library which sounds far more nebulous than it is. It lets us explore and manipulate two-dimensional data like we already do with DB tables, spreadsheets, CSV files, etc. Only this works in memory, is faster, and has predefined functions that make it very powerful. Explorer fills an important slot in the overall pie for data science and ML in Elixir. However, Explorer is also one of the tools that “regular” Elixir devs can take advantage of today.
IntelliJ Elixir 13.1.1
Changelog
Bug Fixes
-
Fix Project Initialization Failed from New > Project > Elixir
-
Catch and log
IOExceptions swallowed by Project Initialization Failed. -
Recursively delete project directory before running
mix new. Previously, the directory was only deleted if empty, but whether the.ideadirectory is written whensetupProjectis called differs between IDE versions, so to be safe, recursively delete.
-
Catch and log
-
Fix Go To Definition for function in compiled modules.
When switching over to delayed decompilation,
ModuleImpldid not haveprocessDeclarationoverloadded, so thePsiScopeProcessorwas never called on it and so theCallDefinitionClausescope processor did not check theModuleImpl#callDefinitons. - Implement Deprecated metadata handling for docs from BEAM files.
-
Don’t assume Elixir
SDKsdkAdditionalDatais non-null. -
Don’t restrict Run Configurations to Run in Modules to Elixir modules.
The docs for
ModuleTypesay the concept is meant to be deprecated, so don’t enforce it and trying to loadElixirModuleTypein RubyMine breaks as it tries to loadElixirModuleBuilderand thereforeJavaModuleBuilder, which only works in IntelliJ. - Add the facet in a write action in addition to setting the SDK.
-
Increase
SUSPECT_NAME_SET_SIZEto20. Increased to cover the15impls ofString.Charsin thegeohex package. -
Log if
erlbinary is not found when trying to runmix format. Log instead of letting it throw up the stack and cause an error report since the SDK not being set will be very common.
Poznań Elixir Meetup #14
The long awaited Poznan Elixir meet-up, vol.14
We’ll be covering trending Elixir topics, with industry experts sharing their knowledge & opening the floor for discussion. BBQ / grill & beer will be catered for🔥🍻
3rd part of an (opinionated) Elixir styleguide
Another set of Elixir best practices in day-to-day development: https://k.lelonek.me/elixir-best-practices
BrightPi 1.0.0 released
Today, BrightPi 1.0.0 got released. It is a library to talk to the Pi Supply Bright Pi board featuring 4 white LEDs and 4 pairs of two infrared LEDs.
- Hex: https://hex.pm/packages/bright_pi
- Documentation: https://hexdocs.pm/bright_pi
- GitHub: https://github.com/PhillippOhlandt/bright_pi
Ten years of Elixir! And OTP/Elixir release bonanza! 2022 edition
Let’s celebrate Elixir’s 10th anniversary. Robert will facilitate an interactive session where we share some stories about our Elixir journeys. Then a Livebook going over the latest in OTP and Elixir releases.
Testing in Phoenix LiveView - A Beginner's Guide (By a Beginner) - @dino_coder
As someone relatively new to the world of LiveView, testing highly interactive applications has been somewhat of an enigma. This talk will give a broad overview of just how simple it can be to use the LiveViewTest module for writing a range of different tests, as well as tips for avoiding brittle or flaky tests.
Creating Note taking app using LiveView and GenServer
In this blog I have demonstrated how to create a Note taking app (similar to MacOS) using GenServer and LiveView. https://abulasar.com/creating-note-taking-app-using-liveview-and-genserver-part-1
Highlighting the current page link in the Navbar menu in Phoenix LiveView
How to highlight the current menu in navbar in LiveView? https://abulasar.com/highlighting-the-current-page-link-in-the-navbar-menu-in-phoenix-liveview
Adding Infinite scroll in Phoenix LiveView App
How easily we can achieve Infinite scrolling in Liveview with Javascript Hooks. https://abulasar.com/adding-infinite-scroll-in-phoenix-liveview-app
Fetching data from external Graphql API service in Phoenix LiveView
This blog post is about querying and fetching data from external graphql api in phoenix liveview. https://abulasar.com/fetching-data-from-external-graphql-api-service-in-phoenix-liveview
5 Questions to 9 Elixir Developers for the 10th Anniversary of Elixir Language
On May 24, we all celebrated the 10th anniversary of Elixir!
It was on this occasion that we asked our Elixir developers about how they started their adventure with Elixir language, how long it took to learn Elixir to feel confident in this language, what advice that they would give to developers who want to learn the Language, and what sources they use for learning Elixir and everyday work.
If you’re curious about how #CuriousPeople do it, check out this blog post!
https://curiosum.com/blog/questions-to-elixir-developers-10th-anniversary-of-elixir-language
Elixir Meetup #6 ▶ hosted by Curiosum ▶ Gustavo Oliveira & Adolfo Neto
6th Elixir Meetup hosted by Curiosum ▶ http://curiosum.com
We discussed 2 presentations of our Elixir experts:
-
Gustavo Oliveira: TDD with Liveview simpler than you imagine! Description: We have been discussing TDD for over 10 years ago, and how good amazing is this tool for companies and developers. In this presentation, you will learn how to use TDD with Liveview and how easy, simple, fast and reliable you can build your apps using simple techniques.
-
Adolfo Neto: Learning Erlang and Elixir through Exercism and Advent of Code Description: There are numerous authorization libraries for Phoenix Framework - I will show you why none of those does it right and how we’re crafting the ecosystem’s first access control library that integrates seamlessly with both Plug and LiveView and perhaps more than that.
Lazy Sequences in Elixir and Erlang
In the article, we demonstrate and compare standard primitives for working with lazy sequences in Elixir and Erlang. While Elixir’s ones seem pretty well known, the ones from Erlang seem a bit underrated.
https://dev.to/savonarola/lazy-sequences-in-elixir-and-erlang-3mne
How LiveView got rid of dangling processes in tests – and how we can do the same
Before LiveView 0.13, testing LiveViews with database operations sometimes resulted in a big wall of red text. Then in LiveView 0.13 they were gone. I always wondered how that was fixed. I finally took a deep dive to find out.
https://germanvelasco.com/blog/how-live-view-got-rid-of-dangling-processes-in-tests
ThinkingElixir 103: Vaxine.io and CRDT DBs with James Arthur
In episode 103 of Thinking Elixir, James Arthur shares his project Vaxine.io, an Elixir layer built on top of a CRDT based distributed Erlang database called Antidote DB. We cover what CRDTs are and introduce how they work. We learn more about Antidote DB, the CURE protocol and especially the Vaxine.io project that adds Ecto types and makes it more approachable to Elixir applications. As applications become more global, the need for strongly consistent distributed writes is more important.
A Guide to Phoenix LiveView Assigns
Let’s demistify LiveView assigns and see how they work in practice. https://blog.appsignal.com/2022/06/14/a-guide-to-phoenix-liveview-assigns.html
OLEDVirtual 1.0.0 released
Today, OLEDVirtual 1.0.0 got released. It is a library to mock the oled library for local development.
Now you can code interactions with an OLED screen without building a Nerves firmware and deploying it into the device for each change.
It also comes with a MultiDisplay module to power both the real OLED screen and the virtual display at the same time, which is great if you want to keep a display preview in your web interface using e.g. Phoenix LiveView (guide included).
- Hex: https://hex.pm/packages/oled_virtual
- Documentation: https://hexdocs.pm/oled_virtual/
- GitHub: https://github.com/pappersverk/oled_virtual
