3 ms·
I have to port an app I've written in Rust to Elixir. [1] It is Sunday and I have to force myself not to open Emacs today. That's the best of both worlds: a re
by sph 4y ago
I have to port an app I've written in Rust to Elixir. [1] It is Sunday and I have to force myself not to open Emacs today.
That's the best of both worlds: a reimplementation of an existing project. You have all the freedom of a greenfield project, and you don't suffer from the "blank page syndrome" or writer's block the author talks about. Port the tests over, then rewrite everything, this time with a better architecture. [2]
--
1: Since someone is bound to ask, I am incorporating a Rust standalone app into a larger Elixir monolith. Because while static typing is nice, turning a Rust app into a highly-concurrent and highly resilient with native OS primitive (threads & co.) or, yikes, async, is masochistic when I have the power of the BEAM at my disposal.
2: Tongue-in-cheek here, I am well aware of https://en.wikipedia.org/wiki/Second-system_effect https://en.wikipedia.org/wiki/Second-system_effect
- sodapopcan 4y agoI'm currently working on a greenfield project that is a rewrite of a smaller portion of a larger app I worked on several years ago. Normally I wouldn't advocate for a rewrite, but the business has since been re-imagined and vastly simplified. Incidentally, I'm also doing it in Elixir. Not only do you not suffer from the "blank page", you can are privy to all the mistakes made before. Of course, you're now open to make a bunch of new mistakes, but that's ok—there's still the benefit of tons of knowledge from the original project. Furthermore, the Elixir ecosystem really helps mitigate that "too many tools" feeling.
- benzible 4y agoI've done a lot of greenfield web application projects and my current stack of choice is also Elixir / Phoenix / LiveView. An opinionated stack solves a lot of the issues the author mentions. He also seems to be mixing in product / UX concerns with implementation concerns.
- sodapopcan 4y agoIt does make life so much easier. My whole stack is Elixir, Postgres, a bit of Vanilla JS, Tailwind (which isn’t strictly needed but I love it), and libvips (we do lots of stuff with images). Esbuild is in the mix for assets but no npm! And no web API!
- sph 4y agoSame stack here, I just use Stimulus instead of Vanilla JS because it pairs well with Live View, it is sane and simple. Put everything in a container, stick it in a dedicated server at Hetzner, and Bob's your uncle.
- sodapopcan 4y agoI gotta look into Hetzner. Their servers are in the EU no? Or are they viable for an NA app? I know I can google this stuff but just interested in your high level experience since you have the same stack.
- sph 4y agoThey're German but AFAIK they recently opened a datacenter in the US East and one in US West. They're much cheaper than the other offerings. I pay €35/mo for a 32GB RAM, 8-core, 2x SSD dedicated server with unlimited traffic. Elixir flies on that.
- sodapopcan 4y agoAwesome, thanks for the info!
- intelVISA 4y agoKinda expensive when I checked their offerings. They charge €40pcm for an i7-4770, 32GB RAM, 2x SSD which can be bought for around €100 from any IT surplus (given it's around a decade old) and thrown in a libre/GPL colo at your local hacker space for single digits pcm.