CS470/570 Introduction to AI, Fall 2016
|
![]() |
Drew McDermott.
Office: 508 Watson. Phone 432-1284
Office hours by arrangement. I'm
best contacted by e-mail as
drew.mcdermott@yale.edu
.
None this term
Download Scala here: You have several choices of how to proceed. Pick option 1 (command-line tools) or option 3 (one of the IDEs). (Option 2 is the "Lightbend Activator," which appears to be a commercial product of some kind.) (MacPorts is a convenient way to install all sorts of open-source software; you can get the latest version of Scala there, too.)
See the Scala documentation page for links to tutorials, cheat sheets, and places to buy books. One useful tutorial is "A Tour of Scala". The book Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition, by Odersky and Spoon, is the most authoritative source. Scala for the Impatient, by Cay S. Horstmann, is a terrific book for Java programmers. For Python lovers, this Python to Scala guide looks good, but I'm no expert.Love
The Scala API is documented in exhaustive if somewhat bewildering detail in the Scaladoc output for the built-in class library. The packages are listed in lexicographic order down the left of the web page; within each package the classes and traits are listed alphabetically. For each class or trait there is a little "o" and a little c (white font on a green circle) to its left (the "o", or, more rarely, the "c," may be missing). Click on the "c" and the class and its members will be displayed; "value members" are the methods in the API for that class. Click on the "o" and the companion object for the class will be displayed.
Before you panic, try reading
the
Scala Collections Framework, which describes with reasonable
clarity
many of the packages and classes we will be depending on.
But when you need to flip through a list of methods looking for one to
do a job you have in mind, you may find yourself ready for
the Scaladocumentation of
package scala.collection.immutable
.
The simplest way to proceed is to use the command-line tools
scalac
and scala
plus a text editor such
as emacs
or vim
.
(There are a zillion
editors oriented around programming, so it's hard to recommend one.)
However, many people like integrated development environments (IDEs)
such as Eclipse. Most of their
bells and whistles will be wasted on us, but these are probably
popular in industry, and Scala is rapidly gaining popularity, so
perhaps it's useful training.
If you don't have a Zoo account, and would like one, apply here.
Note Love
I am not a Python lover myself. I wrote one python script (the
word "program" seems too strong) and that was enough. The language
had (and may still have as far as I know) at least two fatal flaws: