TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Lovely Week with Elixir

262 pointsby sgadimbayliabout 5 years ago

20 comments

biggestlouabout 5 years ago
I 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&#x27;s primarily worked in Go and Java in the past and has also been learning Rust I don&#x27;t super love the optional typing thing, and I end up missing higher-level data constructs like interfaces and traits.<p>But there are some great language features, like guards and pattern matching, that are hard to give up when you go back to other languages.<p>Plus it&#x27;s great to have OTP goodies like GenServer at your fingertips if you run into performance bottlenecks (which you may not!). The OTP APIs are a bit weird coming from other languages but not too bad.<p>Other things I&#x27;ve liked:<p>1. Ecto is simply the best DB library I&#x27;ve encountered in any language. I&#x27;d almost recommend learning Elixir just to be able to use Ecto.<p>2. Plug provides great HTTP ergonomics highly reminiscent of Go&#x27;s context-based middleware approach. Having direct access to the full request&#x2F;response lifecycle is a win.<p>3. Phoenix is nice because it&#x27;s essentially just Plug with some convenient helpers on top. Strikes a really nice balance between configuration and convention by letting you use only what you need. Haven&#x27;t tried LiveView as I&#x27;d prefer to handcraft my own JS but probably worth a shot.<p>4. Absinthe is the best GraphQL framework I&#x27;ve encountered after many others in other languages left me completely cold.
评论 #23250655 未加载
评论 #23250475 未加载
评论 #23251715 未加载
评论 #23250800 未加载
评论 #23251416 未加载
评论 #23251258 未加载
评论 #23250962 未加载
ashton314about 5 years ago
The BEAM is a huge win: having lightweight threads means you can often do away with things like Redis for job queues and PubSub stuff. I love this answer on StackOverflow by Elixir&#x27;s creator:<p><a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32085258&#x2F;how-can-i-schedule-code-to-run-every-few-hours-in-elixir-or-phoenix-framework?rq=1" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;32085258&#x2F;how-can-i-sched...</a><p>So simple. Something that would require a job queue and a job runner fades away into a piece of the OTP application tree. When it crashes, it will even come right back up!<p>Phoenix feels a little too heavyweight for really small projects—maybe I&#x27;m spoiled having used Mojolicious&#x27;s [0] single-file web servers. (Example on the linked page.) But for anything slightly larger, Phoenix scales <i>really</i> well. I work on a decently-large application in Phoenix for work and it&#x27;s been an absolute joy to work with this langauge.<p>Typing could be better. Though, Dialyzer does a decent job of catching type errors. That&#x27;s saved my neck on more than one occasion.<p>[0]: <a href="https:&#x2F;&#x2F;mojolicious.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;mojolicious.org&#x2F;</a>
评论 #23251162 未加载
评论 #23251270 未加载
评论 #23252564 未加载
ninjakeyboardabout 5 years ago
Elixir is decent and I&#x27;ve worked with it a fair amount in production systems... Mostly Rubyists seem to really click with it. And ruby idioms are all over it - you can taste its history and proximity to ruby&#x27;s ecosystem. As a scala dev that ended up working with elixir for a couple years, my opinion is that a typesafe elixir-like language would really bring BEAM back into the mainstream. Akka is alright but it&#x27;s shoehorned onto the JVM. BEAM is good as long as you don&#x27;t need to do heavy computation, but lack of type-safety (need to use dialyzer?) means that shit breaks in prod that the compiler would have caught. And yes, you can mitigate this with boatloads of testing and data-validations with ecto or whatever. But every time we broke shit that a compiler would have caught I cringed.<p>It&#x27;s a great path for rubyists to move to Elixir&#x2F;BEAM and every rubyist should give it a whirl! I&#x27;m back working on scala and akka.
评论 #23250431 未加载
评论 #23250498 未加载
评论 #23250257 未加载
评论 #23251066 未加载
评论 #23251046 未加载
nameloswabout 5 years ago
Elixir and Phoenix are living proof that functional programming can be easy - most of the time you just play with struct and functions, that&#x27;s basically it. No need to pay attention to monads and type classes.<p>On the other hand, it also reflects functional programming is also more straightforward than Object-oriented programming because it&#x27;s more objective to just model the data, than modeling the data and procedures at the same time. If you have two people writing the same thing, there&#x27;s a much larger chance they&#x27;ll yield similar or identical results.
mostlysimilarabout 5 years ago
I love Elixir. Phoenix makes web development a pleasure and LiveView is even more exciting.<p>I would love to find a job doing it.
评论 #23250143 未加载
评论 #23253387 未加载
评论 #23252681 未加载
评论 #23251061 未加载
crussoabout 5 years ago
If you&#x27;re interested in using Elixir, jump right into Phoenix with LiveView. It is fantastic for prototyping new tools. Once you learn the basics of LiveView, it&#x27;s ridiculously easy to create the web UI that interacts with your Elixir back-end.<p>For a while I was using Phoenix&lt;&gt;Elm as my stack and I enjoy programming in Elm. But there&#x27;s a lot of boilerplate you have to tediously connect for every input and output on both sides of the server and client.<p>LiveView eliminates all that boilerplate by letting you write templates in Elixir that are macro-compiled to javascript. Getting rid of that boilerplate eliminates time writing it as well as time debugging the extra complexity that boilerplate introduces.
评论 #23250898 未加载
ketzoabout 5 years ago
Started a little CRUD-app project in Phoenix (Ruby on Rails to Elixir&#x27;s Ruby), and my expectations have been totally surpassed. It&#x27;s pretty amazing.<p>Working with Elixir is really cool, too, coming from C++ &amp; JS backgrounds. Pattern matching feels like a programming technique from the future.
adamzapasnikabout 5 years ago
Another person who liked Elixir, cool :)<p>Btw. If anyone is interested, I&#x27;m working on prettier plugin for html l?eex files. Probably gonna publish it next week.
评论 #23251191 未加载
fredwuabout 5 years ago
I wrote two blog posts before on Elixir:<p>The first piece is longer, on my journey learning Elixir and building machine learning libraries.<p><a href="https:&#x2F;&#x2F;fredwu.me&#x2F;blog&#x2F;2016-07-24-i-accidentally-some-machine-learning-my-story-of&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fredwu.me&#x2F;blog&#x2F;2016-07-24-i-accidentally-some-machin...</a><p>The second piece is shorter, on Elixir’s functional aspect and how doctest changes the way I code.<p><a href="https:&#x2F;&#x2F;fredwu.me&#x2F;blog&#x2F;2017-08-07-elixir-and-doctest-help-writing-better-programs&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fredwu.me&#x2F;blog&#x2F;2017-08-07-elixir-and-doctest-help-wr...</a>
aloukissasabout 5 years ago
The only downside I&#x27;ve found with Elixir is that because of the language and runtime internals, it doesn&#x27;t really lend itself to power serverless&#x2F;lambda functions (like Python, Ruby, Go, etc).
lddabout 5 years ago
I had an excellent week with Elixir building a really silly game:<p><a href="https:&#x2F;&#x2F;hn.lddstudios.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;hn.lddstudios.com&#x2F;</a><p>MIT Licensed. Source:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ldd&#x2F;hn_comments_game" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ldd&#x2F;hn_comments_game</a>
评论 #23256891 未加载
aloukissasabout 5 years ago
Welcome to the λ-side! We&#x27;ve been using Elixir and loving it for 3+ years.
peruvianabout 5 years ago
I really like Elixir and Phoenix. I just wish I had more reasons to use them!
sjmabout 5 years ago
I built the API for a side project in Elixir&#x2F;Phoenix a couple years ago making use of Phoenix WebSockets, and it was truly mindblowing how much you could get done with such a little amount of code.
jonnycatabout 5 years ago
Like the author, I&#x27;m really truly loving Elixir. I recently wrote up some of my experiences with Elixir&#x2F;Phoenix coming from a Ruby&#x2F;Rails perspective - <a href="https:&#x2F;&#x2F;medium.com&#x2F;swlh&#x2F;3-months-with-elixir-phoenix-2810f653f887" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;swlh&#x2F;3-months-with-elixir-phoenix-2810f65...</a>.<p>Curiously, unlike most others here, I&#x27;m not completely loving Ecto. I appreciate the philosophy and get changesets, but I&#x27;m finding the query syntax clumsy.
jetpackjoeabout 5 years ago
I got really excited about discovering a new progamming language, Phyton, for a second... but after some searching, I think that&#x27;s just a typo
评论 #23255993 未加载
pmarreckabout 5 years ago
Elixir: So good that your team simply won’t believe your claims<p><a href="https:&#x2F;&#x2F;ekarak.com&#x2F;2020&#x2F;05&#x2F;16&#x2F;of-elixir-phoenix-and-analogies-to-the-prime-directive&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ekarak.com&#x2F;2020&#x2F;05&#x2F;16&#x2F;of-elixir-phoenix-and-analogie...</a>
throwaway286about 5 years ago
The job market for Elixir is pretty small. Sure, there are a couple of people here responding with specific listings, but still. I was hoping it would have ramped up by now but it seems that it&#x27;s going to stay a niche player.
评论 #23258338 未加载
flowers111about 5 years ago
Looks like elixir is gaining more and more traction :)
Thaxllabout 5 years ago
The fact that it&#x27;s a dynamic language make problems similar to Node &#x2F; Python, can&#x27;t dev serious backend services without a strongly type language. Not saying you can&#x27;t, but you will have a lot of issues overtime that would have been catch at compile time.
评论 #23250816 未加载
评论 #23250409 未加载
评论 #23252383 未加载
评论 #23250425 未加载
评论 #23250282 未加载