mudasobwa
Creator of Cure
Tyyppi — bringing erlang typespecs to runtime
Last week I have been playing a lot with specs and types and as homework I created Tyyppi library that allows dealing with types in runtime. It’s currently in a kindergarten, but it already might provide some goodness, including but not limited to:
- runtime check if this term is of that type with
Tyyppi.of?/2, e. g.Tyyppi.of?(GenServer.on_start(), :ok)(it’s apparently not
) - apply the function providing its spec so that it returns
{:ok, result}if and only if all the arguments and the result meet the specs, and{:error, {:arity | :args | :result, value}}otherwise - create a typed struct with generated complete detailed
t() :: %...{...}type definition, type checks on upserts, and a possibility to cast values on upserts to the expected type (TBD).
I am aware of great TypeCheck library by @Qqwy but my main goal was to stay as close to standard specs as possible. Tyyppi does by no means compete with TypeCheck.
Popular in Libraries
Hey everyone,
I just released WebSockex which is a Elixir WebSocket client.
WebSockex strives to work as a OTP special process, be RFC6...
New
Hey everyone
i’ve developed a library for Jalaali calendar for elixir which supports converting Gregorian dates to Jalaali and vice vers...
New
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library.
The progre...
New
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
After just over two years in development, this latest version of Pigeon is what I finally consider done in regards to my original vision ...
New
Hello :wave:
Allow me to introduce you to Tz, an alternative time zone database support to Tzdata.
Why another library?
First and fore...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
Presenting Aviacommerce, open source e-commerce platform in Elixir
Aviacommerce is an open source e-commerce platform in Elixir. We at...
New
Hi, I just published version 0.23.0 of Elixirscript.
Most of the changes are around JavaScript interop now that Elixirscript uses the ...
New
With HEEX released we decided to start a components library using Tailwind CSS - check it out here: Petal Components.
We also have a boi...
New
Other popular topics
Hi,
I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
I have an umbrella app.
Some of the apps inside depend on other apps in the umbrella, unsurprisingly.
I'm writing a test for one of t...
New
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
If I have a string “1000 cfu/ml” . I want to remove the characters and / and space . So the string is like this
"1000"
What is the ...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New







