3 ms·
I have a project where one function (reading metadata from an Icecast stream [0]) was causing a memory leak and ultimately consuming all of it. I don't remembe
by conradfr 2y ago
I have a project where one function (reading metadata from an Icecast stream [0]) was causing a memory leak and ultimately consuming all of it.
I don't remember all the details but I've still not be able to find the bug.
But this being in Elixir I "fixed it" with Task, TaskSupervisor and try/catch/rescue.
Not really a win but it is still running fine to this day.
[0] https://github.com/conradfr/ProgRadio/blob/1fa12ca73a40aedb949635dcaa3a486f432d0cb9/progradio_api/lib/progradio_api/song_provider/icecast.ex#L48 https://github.com/conradfr/ProgRadio/blob/1fa12ca73a40aedb9...
- cpursley 2y agoHalf of hn posts are people showing off things where they spent a herculean amount of effort reinventing something that elixir/erlang has had solved 30+ years already.
- nesarkvechnep 2y agoSome are even proud of their ignorance and belittle Erlang and Elixir.
- rikthevik 2y agoI'm fine with it. If people want to belittle something, either we aren't trying to solve the same problem (sure) or they're actively turning people away from what could be a serious advantage (more for me!) If the cost of switching wasn't so high, I'd love to write Elixir all day. It's a joy.