I implemented the Random Cut Forest anomaly detection algorithm in Elixir this weekend, using Nx and ExZipper. There’s definitely a lot of room for optimizing performance (in Elixir or through a NIF), but I was impressed with how easy it was to work with Nx tensors and recreate results from the research paper.
There’s a livebook in the post, in case anyone wants to run it at home!
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).
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.
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.
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/
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 nils from my Enum.with_index. Amazing!
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.