stefanchrobot | 4 years ago | on: Ruby vs. Python comes down to the for loop
stefanchrobot's comments
stefanchrobot | 4 years ago | on: Ask HN: Are you satisfied with Elixir or do you regret choosing Elixir?
The popular packages are top-notch, but as others have said - there might be issues finding what you need. My personal experience seems to be the opposite though - when going from Elixir to Ruby, it turned out that some of the gems were really, really far from perfect.
In terms of deployment, my take is that the community has finally figured it out. Elixir is a compiled language, so there is a build-time configuration and runtime configuration and I think it's best to keep the two separate, which is now well supported by the new runtime config (Elixir >= 1.11). Mix releases + runtime.exs + Docker works for me perfectly.
If you're coming from RoR, you'll be able to pick up Phoenix really quickly. It draws a pretty clear line between your web layer and your business/app layer though. Writing controllers and views should be similar, but I'd suggest spending some time on Ecto - it's quite different from ActiveRecord (in a good way, IMO).
One thing I'm missing in Elixir is optional static typing akin of TypeScript, but that's not coming anywhere soon. Other than that, no regrets.
I got introduced to Elixir in 2015 and was trying to work with it full-time since then. I was able to get a full-time Elixir job and I'm really happy about that. If you're looking for opportunities, I'd suggest attending ElixirConf or ElixirConf EU - last year I got 5 interesting job opportunities from ElixirConf EU alone (it was a virtual event, so the ticket was cheap).
stefanchrobot | 5 years ago | on: All C++20 core language features with examples
stefanchrobot | 5 years ago | on: Pharo Smalltalk Overview
[0] https://erlang.org/doc/apps/observer/observer_ug.html
[1] https://github.com/zhongwencool/observer_cli
[2] https://github.com/phoenixframework/phoenix_live_dashboard
stefanchrobot | 5 years ago | on: Why Go's Error Handling Is Awesome
case some_operation() do
{:ok, result} -> # do something with result
{:error, error} -> # handle the error
endstefanchrobot | 5 years ago | on: Entr: Rerun your build when files change
stefanchrobot | 5 years ago | on: OpenDiablo2
stefanchrobot | 5 years ago | on: Should I Use Threads?
stefanchrobot | 5 years ago | on: Should I Use Threads?
stefanchrobot | 5 years ago | on: Rules of thumb for a 1x developer
> When to use Python or Ruby
> Python and Ruby seem to me to be pretty similar in that they’re scripting languages and dynamically typed and seemed like the greatest thing in the 00’s. You use them when speed is more important than legibility or debugging.
I'd say you pick them when productivity and time to market is important. I personally find dynamic languages far more legible (unless you're doing metaprogramming-heavy stuff).
> Haskell or Erlang maybe I would use if I were doing something that required a very elegant or mathematical functional approach without a lot of business logic.
I think it's a mistake to throw these two into the same bag. I'd say Haskell is functional and comes from academia. Erlang is concurrent (with functional aspects) and comes from engineering background. You'd want to pick Erlang if you want to build scalable backend systems.
> my guidelines for JS are:
> Try to push as much logic as possible to the server. If the front end weren’t super complex, I would consider something like Phoenix instead which actually pushes everything to the server.
Phoenix is a web framework for Elixir and Elixir is a Ruby-like syntax on top of the amazing Erlang VM, so this kind of contradicts the suggestion above. Either way, Phoenix LiveView might be a game changer when it's applicable and for people who don't find the whole JS thing very exciting.
stefanchrobot | 6 years ago | on: Gleam: A statically typed language for the Erlang VM
pub fn any(tree: Tree(a), check: fn(a) -> Bool) -> Bool
I'd really prefer something like this (preferably with a syntax highlighter that would grey out the types): fn(Tree(a), fn(a) -> Bool) -> Bool
pub fn any(tree, check)
For some people, including myself, type annotations in Python are killing the spirit of the language. For me, there's no way to format those declarations to look reasonable, except for doing it like in Haskell or Elixir (@type).stefanchrobot | 6 years ago | on: Advent of Code 2019
If you want to stay competitive, you've got to invest some time right before Christmas, so I gave up on that pretty quickly. Instead I did the puzzles at my on pace and spent some extra time playing with the puzzles that I found especially fun:
https://twitter.com/StefanChrobot/status/1080574491535781899
https://twitter.com/StefanChrobot/status/1078448111041892352
As a bonus, you get something to show whenever you're asked to share some code when applying for a job!
And then there's the learning factor - the puzzles are progressively more difficult, but I guess still doable for the average programmer. At some point some of them start to feel repetitive, but that's great if you get a good hold on processing data in your language of choice.
stefanchrobot | 6 years ago | on: PostgREST
stefanchrobot | 8 years ago | on: Proposal: Non-cooperative goroutine preemption
stefanchrobot | 8 years ago | on: CSS: The bad bits and how to avoid them
stefanchrobot | 8 years ago | on: Grammarly shared its tokens with all websites
stefanchrobot | 8 years ago | on: Elixir 1.5 released
stefanchrobot | 8 years ago | on: Elixir 1.5 released