mudasobwa
Creator of Cure
Exvalibur is the generator for blazingly fast validators of maps based on sets of predefined rules.
Under the hood, it generates a module with many different clauses of the same valid?/1 function with explicitly hardcoded pattern matches and guards on the input.
Here is the blog post shedding a light on what goodness it provides and h)ow is it implemented β https://dev.to/mudasobwa/--smart-validation-in-elixir-4bcm
Trending in Announcing
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API Β· GitHub.
Docs are at OpenaiEx User Gu...
New
WebAuthnLiveComponent WebAuthnComponents
See this post about renaming the package.
Passwordless authentication for Phoenix LiveView app...
New
I fully migrated to my own harness from Anthropic/Gemini and I think itβs time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
Castle is a package I put together to assist with building Elixir releases capable of being live-upgraded via the βofficialβ release hand...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Emily is an Elixir library that runs Nx computations on Appleβs MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
In 2021 I started a new library called Tempo with the objective of modelling time as a set of intervals - not as instants. In 2022 I gave...
New
Other Trending Topics
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. Iβm finding it pretty diff...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so hereβs yet another one for...
New
I love Elixir. Itβs one of 2 programming languages Iβve ever fallen in love with.
But I donβt use it anymore.
Serverless was the promis...
New
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, Iβm not sure which exactly)
AI dream has many faces, but general...
New
What IDE or editor are you using for Elixir development?
Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #ai
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixirconf-us
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
mudasobwa
As I continue working on
Exvalibur, I have implemented custom guards and pattern matching of values.I just blogged about how I used custom sigils to allow quoted expressions in the rules.
OvermindDL1
Heh, interesting idea there!
mudasobwa
Where exactly? Do you mean a validator module generation? If yes, I can assure you it is worth it: we use it in production for several months and it shows itself
Depending on input, it runs 10β1000 times faster than standard validations.
mudasobwa
Starting with
v0.8.0Exvaliburaccepts module-based validatiors:fuelen
I tend to think that there is a convention that functions with
?should return boolean typemudasobwa
True that, but I struggled to find a better name to be short and self-explanatory. OTOH, I do not want to miss the opportunity to return what was indeed validated on success.
Maybe I should go with
validate/1to return whatvalid?/1currently returns andvalid?/1to return boolean.david_ex
For what itβs worth, hereβs the convention about trailing question marks and boolean return values: https://hexdocs.pm/elixir/master/naming-conventions.html#trailing-question-mark-foo
Qqwy
This is of course subjective, but personally I think that proposal is indeed more self-evident.
mudasobwa
It surely is. The only thing that prevents me of doing it straight away is itβs breaking change. I probably will go with deprecation warnings and
validate/1doing exactly whatvalid?/1does now and change the behaviour ofvalid?/1to return boolean as ofv1.0.0.mudasobwa
β
v0.9.0.