3 ms·
Looking forward to trying this release out soon. I'm not sure I quite grok streams yet (I understand the use case, but not the implementation). Verified routes
by Rodeoclash 4y ago
Looking forward to trying this release out soon. I'm not sure I quite grok streams yet (I understand the use case, but not the implementation). Verified routes aren't a game changer but certainly having more things use the compiler to verify themselves is welcome!
I've been a Rails/Ruby developer for close to 10 years now I think and while I haven't used Phoenix/Elixir professionally, it's been my go to for a ton of side projects (The backend for my esports annotation tool, https://vodon.gg/ https://vodon.gg/ and its companion app for schlepping large video files to coaches, https://www.fileyeet.io/ https://www.fileyeet.io/).
The best way to sum it up would be slightly less magic then Rails, 3rd party libs might take a bit more work / copy and pasting code to integrate them into your existing codebase. You'll likely write a few more lines of code to achieve the same thing in Ruby, but the ability to use the Beam VM, tooling like LiveView more than make up for the lack of magic. Even better, you'll soon appreciate the lack of magic as refactoring Elixir programs is a dream. It basically just boils down to separating out large functions into smaller composable functions.
I also must add, the community is also awesome.
- cassepipe 4y agoI have no exxperience with Phoenix but I have started learning Elixir on exercism and used the Getting Started page alongside and it made for an enjoyable experience. After reading the previous chapters, I found Streams to be quite clear : https://elixir-lang.org/getting-started/enumerables-and-streams.html https://elixir-lang.org/getting-started/enumerables-and-stre... You are basically stacking functions (your pipeline) next to some data until it's consumed (i.e. the data goes into the pipeline). So I don't know about the implementation but it can't be that mysterious.
- di4na 4y agoIt is a different "stream". The OP means the Phoenix Liveview new "stream" feature that allows you to efficiently update a list of HTML components without having to keep the whole list in memory, but only explaining the changes you want to do. The double sense of that name will trip some newcomers for sure. Happy that you like it though!
- cassepipe 4y agoThanks for the precision
- josevalim 4y agoHere is more context on streams in case you haven't seen Chris' post: https://fly.io/phoenix-files/phoenix-dev-blog-streams/ https://fly.io/phoenix-files/phoenix-dev-blog-streams/
- deskamess 4y ago"Streams"... such an overloaded term in tech. A low level abstract concept prefixed to a term describing a comparatively complex domains.
- sph 4y agoIn Elixir they have a specific meaning: a lazy iterator/generator. https://hexdocs.pm/elixir/1.14.3/Stream.html https://hexdocs.pm/elixir/1.14.3/Stream.html