Earlier quoted context omitted.
The Kotlin KTOR framework is the most promising new web stack I’ve seen. It doesn’t have the higher level runtime features of Erlang but it checks most of your other boxes.
I like Kotlin but I'd say a strength of BEAM is that it doesn't allow for infinite loops, which means coroutines can't block others. This is a fundamental strength. It allows the runtime to schedule coroutines effectively - they can't block for more than a function call (recursion is how you do "infinite" loops). I think a future competitor to BEAM languages would need this feature.
Lovely Week with Elixir
101–110 of 139 posts
Re: Lovely Week with Elixir
#102Earlier quoted context omitted.
Dude, LiveView is wild . It feels kind of magical, and I think people are gonna start adopting slowly, then all at once. There's an awesome blog post on their website. where Chris McCord, creator of Phoenix, builds a real-time Twitter clone in 15 minutes. https://www.phoenixframework.org/blog/build-a-real-time-twit...
Controversial opinion: the "magic" is why I'm staying away. It's the same reason I stopped coding in Ruby/Rails: too much magic. But I'm also a full-stack developer and I'm not afraid to write JavaScript. I realize not everyone is on the same boat, and LiveView might cater to them.
The value of LiveView is not having to write javascript but the only way to preserve any non-complicated state in LiveView when the web socket disappears is to write javascript. It is only recently that LiveView added support to automatically preserve form input values across a state crash. [https://github.com/phoenixframework/phoenix_live_view/blob/m... | Recovery form input data automatically on disconnects or crash recovery] Prior, to 0.7.0 if the web socket died while you were typing input values in a form then the page would reload and all your input into the form would be wiped out.
Re: Lovely Week with Elixir
#103Earlier quoted context omitted.
Isn't that the basis/point of the actor model? Actors can message each other and processing the message can trigger state mutation of the recipient, but they can't directly mutate each other.
All data is immutable on the BEAM with a few exceptions, so no mutation within actors.
Re: Lovely Week with Elixir
#104Earlier quoted context omitted.
God I hope so. I loved Erlang and OTP when I tried it back in the late 00s and it never really caught on, despite many of its strong points being what most websites would look for. Hopefully with the focus on the web and the fresh coat of paint Elixir has given the ecosystem it will eventually gain more adoption. But I still have my doubts because despite looking more mainstream than Erlang, it's still kind of a "fun…
Yeah, it does have that stigma. It certainly did for me; "Why the hell are there colons before these variables..?" It's funny how much the first languages you learn (for lots of people, Java/C/JS) have such an impact on what "feels weird," when every programming language is basically magic anyway.
Re: Lovely Week with Elixir
#105Curiously, unlike most others here, I'm not completely loving Ecto. I appreciate the philosophy and get changesets, but I'm finding the query syntax clumsy.
Re: Lovely Week with Elixir
#106Earlier quoted context omitted.
LiveView will take some time to really get general acceptance and will probably always be somewhat controversial. Both for server roundtrips and because it is so oddly specific and doesn't have a comparable solution in most other languages. But it is fantastic where it fits, truly.
https://news.ycombinator.com/item?id=20383814 exists, so I'd expect it to catch on in other languages if it really is a killer app. I don't know how well such a thing would work without OTP though.
Re: Lovely Week with Elixir
#107Re: Lovely Week with Elixir
#108Earlier quoted context omitted.
I would argue that if you're looking for a simpler way to build CRUD apps, just skip the middleman and use postgREST. I've been playing with Elixir and Phoenix, and while they're pretty great I like postgREST much better. You eliminate an unnecessary (in most cases) abstraction and backing onto the grown up postgresql authorization and authentication is invaluable for securing your app. For non webapp stuff I've been…
I'd love to hear your opinion on liveview if you've played with it at all. The two ways forward for the industry I see are something like hasura/postgrest with heavy js in the frontend, or something like liveview/blazor. I'd expect the more decoupled approach to win long term, but demos like this: https://github.com/moomerman/flappy-phoenix are extremely impressive.
[0]:https://hn.lddstudios.com/ [1]:https://github.com/ldd/hn_comments_game/
Not to share my views or anything, and I have nothing to sell about it, but I thought I would share it with people anyways
Re: Lovely Week with Elixir
#109I learned Elixir a few weeks ago as a quarantine self-improvement project and pretty much loved it. There are some warts, as in any language. As someone who's primarily worked in Go and Java in the past and has also been learning Rust I don't super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits. But there are some great language features, like guards and p…
> 1. Ecto is simply the best DB library I've encountered in any language. I'd almost recommend learning Elixir just to be able to use Ecto. It's interesting, people always talk about Phoenix, which is nice, but Ecto is really special. I often recommend it to anyone who is feeling burned by Active Record implementations.
(assoc-in changeset [:children 1 :title] "New title")Re: Lovely Week with Elixir
#110Earlier quoted context omitted.
That’s all true, but I think a Typescript-like system would work really well here. Typescript is very tolerant of the data being different than the type definition, and it doesn’t know or care if your data actually matches the type definition at runtime. It would be up to the developer to account for different versions of the data when writing out type definitions, and the worst case is that you try to access a prope…
I mean, that's already what Erlang/Elixir has, in the form of Dialyzer, a runtime "type linter" (which is what the typespecs in the article feed into.) It's static typing that Erlang can't complete-the-triangle on; not typing generally. The only problem is that "offline" type-checking like this does nothing to solve one of the main use-cases/pain-points where Erlangers want types (or, at least, think they want types)…
I miss Joe quite a bit. Such a keen mind with seemingly infinite curiosity.