Hacker News new | ask | show | jobs
by danneu 4936 days ago
Just talking aloud, here. Sorta frustrated.

I recently dove into Scala for fun and I enjoy its terse syntax (often more terse than Ruby's!) and principles. I was really excited about it at first.

But the excitement went away pretty quickly last weekend when I actually tried building things with it.

Setting up a Sinatra app in Ruby is a matter of 'gem install sinatra', a 'require "sinatra"', and you're ready to roll.

Meanwhile setting up a Scalatra app in Scala was a far more involved process, every tutorial getting me to use a tool called 'giter8' just to copy down app boilerplate from github. I also ran into general difficulties just setting up IntelliJ/Eclipse, falling back to Vim which makes compilation errors feel like runtime errors since I had to go back to the terminal to see that my program didn't even compile.

I pine for a world where I can just `scale install scalatra` (or pop it into my Scalefile), `$ vim app.scala`, and begin coding.

I still plan on writing some "Scala for Rubyists"-type blog posts, but it's a shame I couldn't figure out and enjoy the actual workflow. I'd have more patience coming from an ecosystem that didn't make things as easy as Ruby's does, but I've realized that tools/workflow/environment are showstoppers no matter how much you enjoy a language.

4 comments

You are not alone in this. Scala has had ecosystem problems for a long time and because of the community status, that's unlikely to get much better anytime soon.

One of the reasons I've been preferring haskell and clojure for my work is because scala's toolchain abused me so badly.

As I've just scratched Scala's surface, I don't get what you meant by the community status. Considering how important the ecosystem is, could you point some resource to understand ? Thanks
I went through the exact same experience.

Fortunately, I had Clojure to fall back on already from Scala.

Leiningen single-handedly embarrasses the current state of the Scala community and it does SO much more but so effortlessly.

Can/did you try http://www.playframework.org/

It's more like a Rails framework for Scala.

libraryDependencies ++= Seq( "org.scalatra" %% "scalatra" % "2.0.4", "org.scalatra" %% "scalatra-scalate" % "2.0.4", "org.scalatra" %% "scalatra-specs2" % "2.0.4" % "test", "ch.qos.logback" % "logback-classic" % "1.0.0" % "runtime", "org.eclipse.jetty" % "jetty-webapp" % "7.6.0.v20120127" % "container", "javax.servlet" % "servlet-api" % "2.5" % "provided" )

in your build.sbt too difficult? Admittedly a bit longer than bundling/gem installing, but not too difficult?

(Although I haven't had to use scalatra personally in a project so there might be hackery I'm missing)

You just copy and pasted the output of giter8's black magic* and asked me if I think the resulting magical incantation is too difficult? Look at Scalatra's installation steps: http://www.scalatra.org/getting-started/installation.html. They don't even give you the sbt dependency. They just direct you to the tool that generates it for you. -- A tool that's only used for a couple other dozen projects: https://github.com/n8han/giter8/wiki/giter8-templates.

Even if you typed that in by hand, you sure took a big detour on your journey of simply declaring "I just want the latest version of Scalatra that works so I can begin coding" by having to go specify Jetty version 7.6.0.v2012012759 and friends.

I don't find it "too difficult". Rather, it's just confusing, nontrivial, and it obstructed my progress with Scala.

*I know g8 just copies down a project from Github like https://github.com/scalatra/scalatra-sbt.g8/blob/master/src/..., but having tools that generate input for other build tools is along my point.

Is Maven too complicated for you or something?

Those are just the latest version of the various libs.