mudasobwa
Creator of Cure
Blog post, announcing Pyc package. It allows transparent validation across inserted data with Exvalibur, chaining functions in a monadic-like way, and exposes all the keys as local variables inside methods declared with defmethod (without compilation warnings.)
It also reasonably implements Access behaviour for wrapped structs and Collectable protocol with validation.
Trending in Announcing
Hey everyone!
Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application.
This library uses Erlang esaml to provide
plug enabl...
New
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
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
Hi all!
I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas.
You...
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
This showed up on my feed.. anyone heard of it? Just hype?
Ox Alpha is a reasoning model designed for coding, sustained ag...
New
It’s not that it’s vocabulary is too advanced. It’s something worse.
I get lost trying to follow even a paragraph written by Claude. It’...
New
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New
Introductory paragraph
I’ll be looking for a keen junior or someone that has a couple of years experience in the real world (so you’ve be...
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
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
OvermindDL1
Yeah, I tend to use the shorter_maps library for that but even it can still get very long and the formatter breaks things up very weird at times… >.>
You can just do
quote generated: true doto silence most warnings (though not variable unused I think?), or in that case can transform the body to add hoisted versions. Even then that won’t work if you need to pass in 2 of that struct in the same head.You really should look at all of expede’s packages on hex.pm. I use a few of them pretty excessively… >.>
And reason this is a string instead of just:
Since the
usecan be a macro anyway, so it can read it straight?Looks like an interesting library overall though.
benwilson512
Hey @mudasobwa. It’s always great to see people take on problems.
There’s a few thing about these libraries that would make them more likely to be used by others. The first big one for Exvalibur is making the source code more readily available. The hexdocs don’t link to any source code, and I couldn’t find it with some cursory googling either. I had to create a project, add it as a dep, and then open the deps directory to get a look at it.
The code contains a LOT of
Code.function calls. This is almost always a sign that things aren’t quite right. A lot of it is to support the strings which, as @OvermindDL1 notes, is completely unnecessary because of Elixir’s built in macro support.mudasobwa
I doubt I understand. Hexdocs have a built-in support for links to the source and docs are indeed linked to the code.
Also, I would be grateful to see how to use macros to avoid strings there.
benwilson512
Ah, that’s my mistake, the Exvalibur — exvalibur v0.10.0 page looked like the top module doc and I looked for </> and didn’t see it. I see the code now, I wonder why it wasn’t higher on google.
As far as the macros go, it’s a pretty large topic. I’d consider the guides, and the Metaprogramming Elixir book. I’m a little short on time at the moment but I may be able to comment later with more details. The short version is that your Code.string_to_quoted is what the compiler already does. Try using just
is_map(val)and see what the input to your function is.The functions inside Code should basically never be called at runtime. They’re not optimized for it and can lead to a variety of issues.
mudasobwa
This is how
Exvaliburworks nowI do not remember why exactly I went with binaries, but I am pretty sure it was because I wanted things TBD and I failed to do it properly.
mudasobwa
Sure. The users of this package put guards in their
config.exsfiles though.mudasobwa
Recalled. To be used in
config.exs. Also, I should support plain guards, thanks.