Earlier quoted context omitted.
I’ve invested a lot of time into both Go and Elixir. I like both languages a lot. My anecdotal view of the marketplace is that Elixir recruitment emails tend to come from startups looking for their 2nd or 3rd dev, usually full stack, and the salaries are nothing special. Go recruitment emails tend to come from bigger companies looking for backend devs, often hoping for kubernetes experience too, and the pay is higher…
what would you say are the benefits of using LiveView over react?
Build a real-time Twitter clone with LiveView and Phoenix 1.5
221–230 of 249 posts
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#222That being said why would I pick this over go or scala for example ?
I’m having a hard time finding a decent argument in the thread bedside syntax.
Can someone elaborate?
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#223Earlier quoted context omitted.
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…
The hot loading of code we're talking about is mutating of running code in production, and it involves running multiple different versions of the same code at the same time in order to do a clean and incremental migration to the new version while continuing to serve traffic. It's a different set of constraints to hot loading JavaScript style and very difficult to get right. The nation problem is that you don't have a…
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#224I might be too greedy, but if there could be a solid JavaSript support Elixir/Phoenix just like ClojureScript that would be perfect. Phoenix and Liveview are great, but I really hope it can extend its reach to React Native and Electron so that we don't have to write too many extra things for those platforms.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#225Earlier 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
#226Earlier quoted context omitted.
The hot loading of code we're talking about is mutating of running code in production, and it involves running multiple different versions of the same code at the same time in order to do a clean and incremental migration to the new version while continuing to serve traffic. It's a different set of constraints to hot loading JavaScript style and very difficult to get right. The nation problem is that you don't have a…
I see, thank you for the response. I haven’t ever heard of something like this being possible in production. We typically have to do phased rollouts at a different level of the stack, it’s not something supported by the runtime!
Quite an interesting set of constraints!
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#227This is excellent and I’d love to look into this . That being said why would I pick this over go or scala for example ? I’m having a hard time finding a decent argument in the thread bedside syntax. Can someone elaborate?
Can you rebuild this demo in Go or Scala in 15 mins or in 1 hour, correctly push any updates to the client while maintaining the robustness and sharding across the cluster? Writing stateful services correctly is very hard using an average web framework.
I need at least 1 day to implement the same in Go or Scala, only the functionality but neither the clustering nor the optimization. And I'm considering I myself a functional programmer that is very familiar with Scala.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#228Earlier 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…
Before Elixir, I considered Scala because static typing was a strict requirement for me. After I tried Elixir, I found out that good, reliable and maintainable code doesn't have to be necessarily static typed.
My other huge gripe about Elixir when I worked on it last year was lack of IDE autocompletion. This to me is a the #1 dealbreaker in working with dynamically typed languages. Im a horrible speller and having to run my program every time just to find out that I missed a capital letter somewhere in my code is infuriating.
Has Dialyzer and IDEs (VSCode I assume) gotten good enough yet to have decent autocomplete support? When I was using Elixir with WebStorm the experience was less than optimal.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#229Earlier quoted context omitted.
I actually agree with every pain point that Dave Thomas described in his talk[1] and is outlined in the Component github repo[2]. Sadly, it's unclear to me if anyone else is as passionate and willing to continue the effort. Nonetheless, it put to words exactly what I hated about genservers and such. [1]: https://www.youtube.com/watch?v=6U7cLUygMeI [2]: https://github.com/pragdave/component
I loved his complaints about genservers (and his complaints about nomenclature), and it made me settle on my own genserver structure. I think the hard thing about dave thomas' component is that it just doesn't have enough buyin in the community to make it "its own thing". I wish it did though. But on the other hand, if elixir had diverged too much from erlang it would have made people angry...
I remember thinking, "This feels messy..." but not really knowing why. And I was brand new and barely a developer!
But I think you nailed it. It's because of the Erlang continuity.
Re: Build a real-time Twitter clone with LiveView and Phoenix 1.5
#230Earlier quoted context omitted.
Before Elixir, I considered Scala because static typing was a strict requirement for me. After I tried Elixir, I found out that good, reliable and maintainable code doesn't have to be necessarily static typed.
For me static typing is essential not when I am writing a new application from scratch, but when I am coming into huge old legacy code projects. For example, I am currently working on a messy and old Swift / Objective C application and having first class IDE support for things like calling hierarchies is pretty amazing to unwind spaghetti code. Also, it's a good feeling to be able to delete a big chunk of code and be…
That said, I'm head-over-heels for Elixir. As for autocomplete and such, there's a pretty good project for vscode called something like "Elixir LSP (fork)". Be sure to use the fork version, it's a continuation of the old stale original extension.
In more general terms, the `elixir-lsp` project is pretty solid (and lies underneath the VSCode extension, FWIW), and I've had good luck with it so far in neovim with CoC + coc-elixir.