Earlier quoted context omitted.
I work on a lot of 'glue' issues, often with languages like Perl, PHP, and Erlang (and a bit of Javascript here and there). Specifying types all over the place in languages like C, C++, Java, and Rust feels like it gets in the way and limits more than it helps. (feelings more than data here, of course) Sure, at boundaries between teams, you need to specify the data in some way. That could be a type, but for me, often…
You can absolutely create a dumpster fire in any language. Putting the fire out in an untyped language is a Herculean effort.
Elixir and Rust is a good mix
91–100 of 165 posts
Re: Elixir and Rust is a good mix
#92Earlier quoted context omitted.
I work on a lot of 'glue' issues, often with languages like Perl, PHP, and Erlang (and a bit of Javascript here and there). Specifying types all over the place in languages like C, C++, Java, and Rust feels like it gets in the way and limits more than it helps. (feelings more than data here, of course) Sure, at boundaries between teams, you need to specify the data in some way. That could be a type, but for me, often…
You can absolutely create a dumpster fire in any language. Putting the fire out in an untyped language is a Herculean effort.
That said, a dumpster fire usually has no or little tests, so maybe we're arguing non-existent hypotheticals :|
Re: Elixir and Rust is a good mix
#93This makes me think of DotCloud, the precursor to Docker Inc. The idea that you can run anything has been around for a while. I don't see how Fly.io is especially good for Elixir. It seems to be about delivering reliable resources for each service, and it works no matter the web framework, as long as you have a PaaS that's geared towards running arbitrary OCI images. These posts seem a lot like the content on the Dig…
One of the interesting bits about Fly is we have our own servers distributed globally and connected via wireguard. Which makes it is trivial to setup Elixir/Erlang distribution globally, and most importantly, close to your customers. While its not a magic bullet it is pretty amazing to type a few commands have a globally deployed and directly distributed application. Further Fly builds its Dashboard internally with P…
I remember when Fly.io used to tout Firecracker but that is just a KVM engine, along with QEMU used on a zillion hosts.
What I'd like to see are customer success stories.
Edit: looks like you have to set up your own cross-region links on DigitalOcean and Vultr. So that interests me somewhat. :)
Re: Elixir and Rust is a good mix
#94I used to use Elixir, but the lack of static types got to me (especially since I prefer the type-driven development methodology). Using Rust afterwards was great, plus it was faster than the BEAM. I guess, why not use Rust entirely instead of as a FFI into Elixir or other backend language? I've been using Axum and it works pretty well. The only time I had to do FFI with Rust was with Flutter via flutter_rust_bridge,…
I'm in the same boat with Elixir. I love many aspects of the language, but it borrows the fast-and-loose type ecosystem of ruby. nil is an especially big problem. Any value could be nil, and this will absolutely bite you over and over. nil even allows you to use square brackets for some reason (some_nil_value[:some_key]) which is a great way to disguise the actual issue. There is optional type checking with Dialyzer,…
That access acts on nil is unfortunate, but it's necessary for things like get_in.
Re: Elixir and Rust is a good mix
#95Earlier quoted context omitted.
> Using Ecto as the main way of interacting with the database was a miserable experience. Ecto is prolly one of the best ways to interact with db. Genuinely curious, what other ORMs have you used?
I usually just write the SQL, honestly. For the last 6ish years of my career I've mainly been in the Golang world, so the closest I've gotten to an ORM is a utility to scan rows into structs.
Re: Elixir and Rust is a good mix
#96Re: Elixir and Rust is a good mix
#97I admit for a long time this was my primary motivation to learn Rust, but, sadly, I haven't come across problems in years that were CPU bound/where I needed something like Rust... Rustler still looks like a great fit if needed, but, depending on the use case, if I were CPU bound and needed to write my own code/not just use a Rust library, I'd be as or more likely to look at using Zig and Zigler[0], for much faster le…
This is where Rust falls short of C#: scaling to the issue at hand. C# can build you a beautiful app at a high-level but also lets you dick with pointers and assembly at a low level. Rust insists on defaulting to pass-by-move and an arcane trait system that hold it back from being usable in large projects.
Re: Elixir and Rust is a good mix
#98Shameless plug & also a point of support for the article: I used that same stack to build https://regex.help/ (more details here https://maciej.gryka.net/building-regex-help )
Github link for others: https://github.com/maciejgryka/regex_help
Re: Elixir and Rust is a good mix
#99Earlier quoted context omitted.
Is any of this needed though? For some use cases yes, but for many no. It's possible the parent has no practical use for these capabilities.
[flagged]
Re: Elixir and Rust is a good mix
#100Earlier quoted context omitted.
NIFs are dangerous, ports are not. Basically a NIF runs in the same memory space as the BEAM, so misbehavior of the NIF can crash the entire application. On the other hand, they have wildly better performance than ports, which have to operate through STDI/O. The Rust / BEAM memory sharing problem does exist, but it's not nearly as bad as in more traditional C NIFs, because almost all C programs leak memory due to bad…
I personally include port drivers in with ports, which gives you the same level of shared runtime environment as NIFs, with the benefits and drawbacks. Sometimes it makes more sense to interface as a port rather than as a function. Of course, sometimes it makes more sense to interface as a C-node rather than either; then you can be on a totally isolated machine, and the C-node can even crash or otherwise disable the…