

Scala school - swah
http://twitter.github.com/scala_school/

======
frisco
This is awesome, but I just want to point out one thing: twitter.util and
Finagle are traps. Twitter's libraries are awesome, but won't build on scala
1.9 (or even 1.8.2), yet, and it's not clear if they will anytime soon. This
rules out Akka >1.0, and 1.0 is pretty old and sometimes just broken. I just
spent a couple weeks rewriting a ton of code to get myself out of this hole
after starting with the awesome scala-bootstrap, and I can tell you it's no
fun. So, if you want to be able to use Akka, or at least keep up with other
developments in the Scala world, avoid the temptation of pretty Finagle and
com.twitter.util!

Also, the sbt they use in the tutorial is an old version; the community is
going through a big shift to sbt 0.10 now, which is a totally different
system. Very different, and often outright weird to the uninitiated, but worth
learning if you're starting new projects.

This tutorial is for Scala 1.8.1, and 1.9.1 is available now and considered
stable. Use it!

~~~
rue
You mean Scala 2.8.2 and 2.9.1, respectively.

~~~
frisco
Yes, my mistake.

------
danieldk
Hmmm, lots of REPL input/output, nearly no informative descriptions. Besides
that some descriptions are wrong or inaccurate, three randomly picked examples
(and I am not a Scala programmer):

* "compose calls the second function and then the first function."

* "Maps - It can hold basic datatypes."

* "foldRight Is the same as foldLeft except it runs in the opposite direction."

I'd recommend friends to buy a good, well-edited book.

~~~
thomaslangston
For the sake of the ignorant, could you expound on why these examples are
wrong or inaccurate?

~~~
danieldk
1\. 'compose f g' doesn't call g and then f, but it constructs a new function
of the form \x -> f (g x).

2\. Maps store mappings between keys and values.

3\. Left and right folds both process a list recursively from start to end.
However, left folds apply the given function first and then recurse. Right
folds recurse first and then apply. As a result, in right folds the given
function is applied to the last element first.

~~~
fhars
Also, right folds preserve the structure of the datatype folded over. If you
fold right over a list with the empty list as the start value and cons (or
(_::_) in scala) as the operation, you get the original list back (i.e. same
value, not same object). A left fold on the other hand is just some arbitrary
looping constuct.

------
SkyMarshal
Good stuff, really useful to see what Twitter considers to be 'Scala: the Good
Parts'.

But no mention of Actors or Akka in the concurrency section? Why not, out of
curiosity? Actor model doesn't fit your use cases?

~~~
cachemoney
Actors had a memory leak when a lot of the formative Twitter Scala stuff
happened. This lead to more usage of java concurrency primitives, which
snowballed within the culture.

There's some people at Twitter who truly love and grok Scala and Scala idioms
inside out, and there's some people who look at Scala as a more functional,
less verbose Java.

~~~
SkyMarshal
Interesting form of technical debt. I hear Akka is replacing Scala's actors
lib in 3.1 or thereabouts. Any talk about adopting it?

 _> There's some people at Twitter who truly love and grok Scala and Scala
idioms inside out, and there's some people who look at Scala as a more
functional, less verbose Java._

I'm a full card-carrying member of exactly _both_ groups, but if all Scala
does is succeed b/c of the latter, it will have served a wonderful purpose in
displacing Java.

------
urschrei
You attempt to explain partial function application and currying on page 1.
Using opaque examples.

This makes no sense; people who have experience with FP concepts don't need to
know that, and those who don't won't be able to understand what you're talking
about. Saying things like "I promise, this will get easier over time" isn't
actually helpful.

Also, the text is low-contrast and difficult to read.

~~~
SkyMarshal
Fwiw, best explanation I've found of currying and partial functions is in
_Learn You a Haskell_ (Chp. 5) by Miran Lipovaca. He's one of those writers
that is exceptionally good at explaining technical concepts.

------
ilcavero
for those looking for free reference, this is the best I have found:
<http://ofps.oreilly.com/titles/9780596155957/index.html> not a great book but
if complemented with blog posts here and there and the exercises from
<http://aperiodic.net/phil/scala/s-99/> you can get started.

~~~
DannoHung
What I really want is a book dedicated to type-level wankery in Scala. That's
the part of the language that's not easy and requires a lot of trial and error
to figure out on your own.

~~~
spacemanaki
This is EXACTLY how I feel. I don't need a lot of introductory chapters
dedicated to first-class functions, closures, and higher order functions like
map/fold & friends. So much Scala material is clearly targeted at Java
programmers and leads with something like "look no semicolons!" I want
something like "Scala for Lispers". (or even "Scala for Ruby programmers")

~~~
eweise
I've found "Scala in Depth" to be really good for learning more about the type
system <http://www.manning.com/suereth/>

------
akx
I'm finding the light gray on white text pretty hard to read.

EDIT: Not to mention there are places that could use some copy editing...

