Earlier quoted context omitted.
There's no magic. It's functionality that's made possible by the BEAM. It's just one of those things that came out of realizing how powerful the runtime was for handling certain types of problems. When you combine a couple of those bits together, you end up with this. The only modern web problem that Elixir isn't ideally suited for is heavy number crunching. Otherwise it gives this amazing balance of efficiency, scal…
I'm of a similar view to them, this felt like lots of magic or at least lots of gotchas I can see myself hitting. I saw two function definition types (def and defp), pattern matching input then requiring a caret for the variable name (?), passing in "assigns" but then referring directly to other variable names, pipes, etc. There's a lot there compared to when I've worked in Erlang.
Build a real-time Twitter clone with LiveView and Phoenix 1.5
191–200 of 249 posts
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#192I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…
How’s the speed? Is it as performant as technologies like Django / Ruby?
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#193Earlier quoted context omitted.
> When I say perfect, I mean, there has been never once in my career where I hit a roadblock due to the language's limitation or complexity or flawed assumption. I faced this with other languages, but not Elixir. This is pretty amazing praise! Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot f…
> Are many of the other languages you've used strongly typed? That's the thing that gives me pause - I feel like I rely on the compiler a lot in languages where it can do a lot for me, and that I'd be really frustrated managing a large project without it. As someone who has been writing Elixir professionally for 4-ish years, and who is otherwise about as big of a proponent of static types as is possible, this is simu…
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#194Earlier quoted context omitted.
One of the things I like about Guards is that you can enforce/match against types as needed.
Guards are nice, but compared to static typing, they a run time check whereas static typing alerts you to errors at compile time.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#195Earlier quoted context omitted.
I'm the author of Gleam, a statically typed language on the BEAM. What you've said matches my findings. Messages can be typed, however hot code upgrades cannot be. For Gleam we've sacrified hot code loading in exchange for types, which I think is a good trade for most use cases.
Hi, thank you for contributing! I have gotten into the functional programming paradigm conceptually from working with react/redux. We do all of our development work using TypeScript, rather than JavaScript. Typescript isn’t really static typing, but more like type assertions on top of a dynamic language, but hot reloading works fine and is a core component of the workflow, especially with the ability to maintain stat…
We could probably do hot loading in development using type assertions fairly happily.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#196Earlier quoted context omitted.
Seriously. I would love to work at this level of abstraction in Clojure, but to do something that is trivial in Rails with something like Devise is a chore in Clojure, and you have to put it all together yourself. Of course this makes it excellent for learning, but not so great for deadlines. More and more I think I might've made a mistake trying to do basic CRUD web stuff in Clojure for my current project.
Interestingly one of the creators of Devise is the creator of Elixr
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#197Earlier quoted context omitted.
To add to this, it's worth noting that Elixir would have difficulty _ever_ becoming statically typed because of how message-passing works. For example, if you look at Gleam [0] -- the recent project that's trying to create a statically typed language for the BEAM -- it can't handle message-passing [1]. And I totally agree with you here: > I've found that it's possible to pretend it is a statically typed language if y…
Hi, I'm the author of Gleam. We have fully type safe message passing, we just don't have any special syntax for it. I'll update the documentation to make this clearer.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#198Lack of built in user authentication kills this project for me, that's just something I don't want to deal with building my own anymore after django.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#199I was a Rails user for almost a decade. I switched to Phoenix/Elixir 3 years ago. Elixir is a super simple language. It has no OO concepts and everything is functions first. In fact, it's so good that I started teaching it for universities. All my production web applications are now fully on Elixir. Elixir is one of those languages where everything has been done perfectly as of the time of this comment. When I say pe…
Wait, for loops and nested conditions is an OO concept? What does Elixir do instead?
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#200Looks interesting but I am not interested in making timelines .. is this Phoenix framework general enough to make arbitrary real time web apps?
Yes, think of it like Rails for the Elixir language. Phoenix -> Elixir Rails -> Ruby