4 ms·
Last year I did all problems in Scala, focusing on using pure fp, scalaz and cats. This year I wanted to bolster my Go and Ruby skills since I'm now working on
by justinhj 8y ago
Last year I did all problems in Scala, focusing on using pure fp, scalaz and cats. This year I wanted to bolster my Go and Ruby skills since I'm now working on a project that uses both. I found that Ruby was more fun to work with, so much more fun than Go that I only did one solution in Go. Many solutions I found could be solved in an elegant way just as I would have done in Scala or Clojure, but I found some rough edges in Ruby which were partly due to my ignorance of the language and partly because there are some inconsistencies in the collections api. I had to revisit more puzzles for performance improvements than in Scala. For example one puzzle required random access and insert and delete on a very large array which was incredibly slow in Ruby, but would have been acceptable in Scala or Clojure using the Vector collection. Rewriting as a double linked list improved runtime 1000x.