I love Elixir but I'm curious about your question: why not use Erlang for this? What would using Elixir do for this that can't be achieved with Erlang?
I am literally debugging an issue with our OpenAI client in our Elixir app due to connections mysteriously timing out and closing, and I think this sort of library might be really good for enabling more widespread use of OpenAI stuff in our app.
But since it's Erlang, I hesitate to add this since I don't want to now start debugging stuff in Erlang. And I've coded full-time with Elixir since 2016/2017 time frame.
So I'm biased here, but I definitely would try this out if it were Elixir, but the Erlang gives me pause since it still is a pretty different language, and I'd have a hard time debugging any issues.
Learning Erlang and understanding it is an important skill for any serious Elixir developer. Erlang has been around longer and has a larger set of available tools, it's what Elixir piggybacks on, and we can't just rewrite everything in Elixir.
I’ve never needed to use erlang in all these years. I have to imagine I’m not alone in finding erlang’s syntax more cryptic, given that erlang hit a limit and elixir broke through to a much wider audience. I don’t know what would make me a more “serious” developer though, having successfully built a few mission critical apps with elixir.
I have built one supervision tree and built GenServers, but I haven’t done much more OTP or cluster and node communications, if that’s what you meant. I’m genuinely curious about what you mean by serious elixir developer.
Well you yourself mentioned being hesitant to add a library that could likely help you solely based on it being in Erlang.
Erlang has many useful libraries, it's been around far longer. If everything has to be wrapped by Elixir to be useful, well that seems like a pretty significant limitation.
I didn’t say it has to be wrapped by elixir to be “useful”, but after having been in debugging hell with an erlang OIDC library a couple years ago, I’ve been burned and won’t touch native erlang libraries unless there’s no other choice.
That’s not a criticism of erlang. That’s a comment on my personal limitations of time.
To be fair, I want to clarify this is an experimental repo. It would be a dream to eventually properly structure and deploy this in such a way its usable for all downstream consumers, Erlang, Elixir, maybe even weird COBOL RPC (joking)
I posted this because I got some funny outputs (read: deep research quality from gpt-4o over 37 minutes) with a derived repo using this repo, so I figured it was usable enough for others in this immediate space.
If you have any desired functionality, or you want to contribute, please file issues + file pull requests.
Assuming you want people to adopt and grow it? Elixir seems a better choice. on the other hand if you start with erlang I think you get elixir interop with little to no effort, whereas the reverse is not as true.
Regardless I agree with others saying beam sounds great for agents, a perfect fit
> I guess bias towards the language, its design and syntax.
Ok, but the way the question is framed ("why not use Elixir for this?") presents it like some kind of an universal obvious choice. But I (and I guess the gp poster) don't see the "obviousness" of it so to speak.
It's kind of like commenting on every single C or C++ code link, "why not use Rust for this?" or "why not use Zig?".
I think it's about the same level of effort when it's not followed by specific suggestions or pointers about what's better for this project, what modules functions might disappear with improved abstractions with a different language etc.
Interoperability makes them very companionable so it’s not really a rewrite situation. Whichever you have I bet you can code generate your way almost all the way to a fairly complete wrapper of the other. Way simpler than most stuff like FFI, although I’m not aware of all the details of any type conversion gotchas or similar. I’ve never been lucky enough to actually work on this stuff professionally
but rather than a rewrite I think it’s more a question of which representation is first, primary, or at the bottom of the stack. Would be nice to hear more from an expert though
The syntax is different, but they can call libraries from other each. I guess are you thinking from the perspective of someone using this library in their code? Well, that argues for writing it in Erlang, since it is simpler to use Erlang from Elixir than vice-versa.
But since it's Erlang, I hesitate to add this since I don't want to now start debugging stuff in Erlang. And I've coded full-time with Elixir since 2016/2017 time frame.
So I'm biased here, but I definitely would try this out if it were Elixir, but the Erlang gives me pause since it still is a pretty different language, and I'd have a hard time debugging any issues.