alisinabh
Hi everyone.
A few days ago i was developing a JSON API on phoenix which receives users phone number from client and starts sending messages to that phone number. There was a little problem in production however.
The problem was some people used Arabic or Persian keyboards to enter their phone number. And the phone number was not passed correctly into sending message API. So i’ve developed a micro library called Numero to tackle this problem in elixir.
Here is Numero: https://hex.pm/packages/numero
Currently it supports Persian, Arabic and NKO digits.
Trending in Announcing
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries.
offset-based pagination with...
New
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
I released Doggo, a collection of unstyled Phoenix components.
https://github.com/woylie/doggo
Features
Unstyled Phoenix components....
New
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hello
Published a new library - ProcessHub!
ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
Hey folks,
I just published a post about Hologram’s funding and where the project goes next - the short version:
Curiosum as Main Spons...
New
:microphone: ElixirConf 2026 - Call for Talks is open!
We’re heading to Chicago :united_states:
:round_pushpin: In person + virtual
:d...
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
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex











Showing Posts 1 to 9- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
alisinabh
Numero 0.2.0 is released.
Hi everyone. Numero 0.2.0 is released.
In this version i have added two new functions.
is_digit_only?/1which checks if all of a string is numerical chars.remove_non_digits/2which removes all non numerical chars form a given string with ability to have exceptions for some chars (optional).I hope it will be useful for you guys.
Thanks.
Eiji
@alisinabh: Here are my ideas:
For example:
alisinabh
Thank you @Eiji for reminding me my problem with function naming. I should remove
is_from next minor version.This example looks nice and clean but the reason i’ve done it with char list was so that i could determine utf-8 digits too (but now that is see my code i just forgotten to support utf-8 numbers
). like “۱” which is 1 in Farsi.
Dealing with binary operations is a UTF-8 string is a bit hard. and maybe ugly.
For example if i wanted to do as you did on numbers i should have done this:
Which i think may lead to some unwanted exceptions.
Any ideas on how to deal with them?
NobbZ
I’d not use that guarded version at all… Unicode has a lot of possible digits:
One doesn’t really have to iterate that list over and over again when using
when char in @digits. Instead it should roughly like this:alisinabh
Thank you very much.
This is so helpful. I will try that soon.
alisinabh
Hey @NobbZ
I’ve been working on numero today and i did as you said and i have to say It was a significant improvement in performance and it resulted in a more beautiful code.
I tested the old version (with iteration solution) with a very long string and it took 1948ms and your suggestion made it possible to normalize the same string in only 5ms. Wow…
I knew binary pattern matching is fast in elixir but i did’t think it could improve performance this much!
So thank you for your suggestion and teaching me.
Anyways, i’d be really thankful if you can look at this code and tell me
Enum.each/2or using multiple ones are ok?https://github.com/alisinabh/Numero/blob/fix-iteration/lib/numero.ex
Thank you
NobbZ
I do think, you are talking about those lines:
https://github.com/alisinabh/Numero/blob/fix-iteration/lib/numero.ex#L135-L158
Since they all generate clauses for different function you have to separate them.
alisinabh
Thanks @NobbZ
I will release this version after doing some more tests on it.
alisinabh
Numero 0.3.0 released
Hi everyone.
I’ve released Numero v0.3.0 which is much faster than 0.2.0 thanks to binary pattern matching and preventing a conversion back and forth with charlists. (Which @NobbZ suggested)
You can read release notes here if you are interested.
Thanks.
P.S the reason i changed the minor version was that there were two slight incompatibilities with previous version in Numero API.