I made a flow chart illustrating the LiveView life cycle
If you want to get the mermaid diagram code to modify for any reason, itās available at:
I made a flow chart illustrating the LiveView life cycle
If you want to get the mermaid diagram code to modify for any reason, itās available at:
Wrote a blog post about how to customise the phx.new generator to include Oban (just an example and you can apply the same principles for any other changes to the generator).
You could add a box for patching to the current liveview.
I wrote a blog post on how I built an MVP (using Elixir/Phoenix/LiveView) in 3 months whilst having a full time job.
Thatās a good call. I updated it to this, but I donāt know if I love the placement.
patch isnāt quite a callback, itās the result of a callback. But it can also happen from the client with <.link>
navigation, so I put it on Continuous Connection.
In Postgres, if you search for users named āJoseā, you would expect to see our beloved JosĆ©, no?
You wonāt.
You first need to āunaccentā words with special characters for this to work.
This post explains how
Iāve seen a lot of people express interest in Machine Learning in Elixir but were unsure of what the ecosystem has to offer, so I wrote a blog post to go over most of the prominent Elixir ML libraries and relate then to their Python alternatives. It includes a nice table at the bottom for quick reference. I even go into a bit of history of the ML development since I find it quite interesting how it sprung up.
New Blog Post Alarm
Learn how to animate a side drawer using LiveView.JS
New Blog Post
Hope this helps!
My first Elixir blog in English!
please please donāt make it 2.0 yet! Iām still in the learning phase with the language itself! too overwhelming!
If you need i18n or i10n in an Elixir project youāll most likely use Gettext.
The provided macros and functions have their own benefits and downsides. But there is a way to combine them and get the best of both worlds.
I was recently looking at a front-end video by FreeCodeCamp where they introduced the site https://codewars.com. I was surprised to see that they had some Elixir problems, but this post is not about one you can solve using Elixir on that site (at least not yet). Instead, it is about a JavaScript problem on that site that I had difficulty translating into Elixir code. This is because the problem (or, at the very least, the naive solution) requires in-place modification of a few variables within a loop. If you would like to see the problem, its statement, and how I came up with a naive Elixir solution using ETS tables, feel free to check it out here: https://danieljaouendevelopment.com/2023/09/09/elixir-codewars-problem/
Thanks for reading!
As a side note, I have been using GitHub Copilot for a few months now and am amazed at how well it knows how to extend my code. I was typing up the solution not using ETS a moment ago, and it knew to filter out the nil
s from my Enum.with_index
. Amazing!
Interesting that you consider using ETS the naive solution. I would use recursion or reduce for this type of thing.
I think ETS is a serious overcomplication. It should be possible to solve it in a go with Enum.scan
. Nice post though!
I tried to solve it with parsing combinators in another language and I like how simple it came out to be. Sadly Iām not accustomed with NimbleParsecās API so if anyone could post an Elixir solution with parsing combinators it would be awesome.
Interesting post, and thanks for sharing.
Although, I think the normal ānaiveā way to do this in Elixir would be to use a function from Enum
module, or plain recursive functions like
defmodule Challenge do
def solution(string) do
squeeze(string, [])
end
defp squeeze(<<>>, acc), do: Enum.reverse(acc)
defp squeeze(<<c, rest::binary>>, [c | _] = acc), do: squeeze(rest, acc)
defp squeeze(<<c, rest::binary>>, acc), do: squeeze(rest, [c | acc])
end
Thanks to the mods for moving my post to this thread.
NimbleOptions is a small but very powerful library that I think everyone should be aware of. It allows you to define powerful validation definitions to use with Keyword List options, and I have found it to be great!
Check out my latest blog post, where I share some advanced techniques that helped me when writing EXGBoost!