Giter VIP home page Giter VIP logo

programming-scala-book-code-examples's Introduction

"Programming Scala, 3rd Edition" Code Examples

Join the chat at https://gitter.im/deanwampler/programming-scala-book-code-examples Scala Steward badge

This repo contains all the code examples in O'Reilly's Programming Scala, Third Edition. (The second edition is available here.) There are also many code files in this distribution that aren't included in the book.

The master branch and the 3.X.Y tag releases are for the third edition. The code examples for the second edition are still available. Download the release tagged 2.1.0 or check out the release-2.1.0 branch. While the second edition was published for 2.11. The latest 2.1.0 release and release-2.1.0 are updated for 2.12 and 2.13. (No more release-2.X.Y releases are planned.)

TIP: Several sections offer troubleshooting tips if you encounter problems.

How the Code Is Used in the Book

In the book's text, when an example corresponds to a file in this distribution, the listing begins with a path in a comment with the following format:

// src/main/scala/progscala3/.../FooBar.scala

Following the usual conventions, tests are in src/test/....

Use these comments to find the corresponding source file. This archive also contains MUnit and ScalaCheck unit tests to validate some of the code.

Naming Conventions

The examples include "scripts" that are intended for interactive use in the scala command-line "REPL" (read, eval, print loop), for example using sbt console (where sbt is the de facto build tool for Scala that I use). Other files are compiled.

To keep these different kinds of files straight and to support building with sbt, the following conventions are used for the files:

  • src/main/scala/.../*.scala - All Scala 3 source files built with sbt.
  • src/test/.../*.scala - All Scala 3 test source files built and executed with sbt.
  • src/script/.../*.scala - "Script" files that won't compile with scalac, but can be interpreted with the scala REPL or used as a worksheet (see below).
  • src/*/scala-2/.../*.scala - Some Scala 2 source files that won't compile with Scala 3. They are not built with sbt.

Other Notes about the Code

You won't find many comments in the code, except of the form // <1>, which get converted into markers corresponding to notes in the book. All the descriptions of the code are in the book, so they aren't repeated as code comments.

Some files have sections marked like this:

// tag::section1[]
// end::section1[]

These are used to mark sections that are selectively included in the book. Sometimes the whole file is included in sections, while other times the file has extra bonus content that doesn't appear in the book.

Required and Optional Tools

To build and run the examples, all you need is a recent version of the the JDK and sbt. When you run sbt, it will bootstrap itself with the correct version of its jar file, Scala, and project dependencies, which are specified in the build.sbt file in the root directory and other build files in the project directory.

Follow these sbt installation instructions.

If you want to install Scala separately and Scala's Scaladocs, go to the scala-lang.org Getting Started guide for details. However, this isn't required.

If you want to play with the Spark example, src/script/scala-2/progscala3/bigdata/SparkWordCount.scala, you'll need to download a Spark distribution from https://spark.apache.org. Assuming that $SPARK_HOME refers to the root directory of your Spark installation, run the following command in the root directory of this project:

$ $SPARK_HOME/bin/spark-shell
...
scala>

Then copy and paste the content of src/script/scala-2/progscala3/bigdata/SparkWordCount.scala at the prompt. After it runs, there will be a new directory, README.md.wordcount with the partition files of the output.

Tip: For more on Spark, see my free tutorial on GitHub, spark-scala-tutorial.

Editors, IntelliJ, Visual Studio Code, and Other IDEs

NOTE: Support for Scala 3 may be limited for a while in the following tools.

Most editors and IDEs now have some sort of Scala support:

For other IDEs and text editors, try Scala Metals first (I've used it with Sublime Text, for example) or the older ENSIME project. You may also need additional, third-party tools for syntax highlighting, etc.

After installing the required plugins, load this project in your IDE, which should detect and use the sbt project automatically. For eclipse, run the sbt eclipse task to generate project files, then import them.

Troubleshooting with IntelliJ

One reader reported a problem when trying to run examples in IntelliJ: scalac: Flag -encoding set repeatedly. I could confirm this problem and I fixed it as follows:

  1. Open the preferences ("cmd-," on MacOS)
  2. Search for "scala"
  3. Select "Build, Execution, Deployment > Compiler > Scala Compiler"
  4. Select the "sbt" configuration in the list of Scala build configurations.
  5. Select "Additional compiler options:".
  6. Remove -encoding utf-8 from the text, since it is already in the build.sbt file.

After that, you should be able to select a type with a main and run it.

The same reader also reported errors where multiple occurrences of the same name in a @targetName annotation collided. I believe this happens if you use sbt in a terminal to compile and then allow IntelliJ to do its own build. There are probably two copies of the class files on the resulting runtime classpath. For example, I saw this error when attempting to run sbt console in IntelliJ's sbt shell, but not when I used sbt in a terminal window.

So, what worked for me was to only use the terminal to run sbt clean, then let IntelliJ build the software itself, but when I need to use sbt console, I use a terminal window.

Using Scala Worksheets

If you like working with Scala worksheets in your IDE or editor, you may be able to load any of the REPL "script" files under src/script as a worksheet. If your environment is more restrictive, for example about the file extension used, then run the included bash script ./make-worksheets.sh to copy all the REPL "script" examples to worksheet files. This command copies the tree src/script to src/worksheet and changes the .scala extension for all the files to .worksheet.sc, the VSCode convention. These behaviors are configurable. Use the --help option to see the details. If you are using Windows and you don't have bash available, e.g., through the Linux subsystem, then modify individual files as you see fit.

See this Dotty documentation page for more information about worksheets.

Building the Code Examples

After installing sbt, open a command/terminal window and run the sbt test command.

You'll see lots of output as it downloads all the dependencies, compiles the code and runs the tests. You should see [success] messages at the end.

sbt is discussed in more detail in the book and the sbt website, but a few useful commands are worth mentioning here.

If you start sbt without any arguments, it puts you into an interactive mode where you can type commands. Use control-D to exit this mode. Once at the sbt prompt (sbt:programming-scala-3rd-ed-code-examples>), try the following commands, where each # starts a comment; don't type those!

help       # help on tasks and settings
clean      # delete all build outputs
compile    # compile the source, but not test code
test       # compile source and test code, if necessary and run the tests.
~test      # continuously compile and test when source changes are saved.
console    # run the Scala REPL; dependencies and code are on the CLASSPATH
tasks      # show the most common tasks (commands).
tasks -V   # REALLY show ALL tasks

The ~ prefix causes the task to be run continuously each time source code changes are saved. This promotes continuous TDD (test-driven development) and is one of my favorite features!

Outside of sbt, you could, in principle, run the REPL and load the script files manually at the prompt:

$ scala
scala> :load src/script/scala/.../Foo.scala

However, it's easier to run most of the scripts using sbt console, because sbt will configure the CLASSPATH with the third-party libraries and compiled code examples that a script file might use.

Also, new for the Scala 3 REPL, for those src/main/... files that define one (and only one) entry point, meaning a main method (Scala 2 compatible) or annotated with @main (new Scala 3 technique), you can compile and run them in one step:

$ scala src/main/scala/progscala3/introscala/UpperMain2.scala Hello World!
HELLO WORLD!
$

Feedback

I welcome feedback on the Book and these examples. Please post comments, corrections, etc. to one of the following places:

There is also my dedicated site for the book where occasional updates, clarifications, corrections, and lame excuses will be posted: programming-scala.org.

A Little History

Key Dates Description
August 11, 2014 2nd edition examples
May 27, 2019 Updated for Scala 2.12 and 2.13
June 18, 2019 New support for Maven builds, courtesy of oldbig
October 12, 2019 Updated for Scala 2.13.1, sbt 1.3.2, and other dependencies. Also now compiles with JDK 11
October 13, 2019 Renamed the repo from prog-scala-2nd-ed-code-examples to programming-scala-book-code-examples
December 31, 2019 Renamed the progscala2 package to progscala3 and reworked most of the *.sc scripts for better testability and other improvements
March 1, 2020 Completed conversion to Scala 3
March 20, 2020 Started incorporating new Scala 3 syntax, idioms
May 15, 2021 Scala 3.0.0 final updates. Almost done!
May 22, 2021 Final updates for Programming Scala, Third Edition!
July 24, 2021 Scala 3.0.1. Notes on using IntelliJ.
November 6, 2021 Scala 3.1.0 and a fix for locale settings (PR 42).

programming-scala-book-code-examples's People

Contributors

apolunin avatar benjamintanweihao avatar chicagoscala avatar deanwampler avatar erikogan avatar gitter-badger avatar krzesii avatar mkloeckner avatar mwkang avatar oldbig avatar scala-steward avatar sethtisue avatar shapelesscat avatar sounie avatar sslavic avatar yaojingguo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

programming-scala-book-code-examples's Issues

for-validations-good.sc should add import scalaz.Validation.FlatMap._

code in // src/main/scala/progscala2/forcomps/for-validations-good.sc

when i ran this script,my console told me "value flatMap is not a member of scalaz.Validation[List[String],Int]", and i checked ur sbt.build,and i found the scalazs version is 7.27 and i checked the scalaz source code,i found this : /** Import this if you wish to use flatMap */
object FlatMap {
@inline implicit def ValidationFlatMapRequested[E, A](d: Validation[E, A]): ValidationFlatMap[E, A] =
new ValidationFlatMap(d)
}`
so i just add add import scalaz.Validation.FlatMap._ and finally i ran script sucessfully

how to run code?

I am trying to run the shapes code, but I can't figure out where to start sbt. If I start it at the book folder level, then sbt can't find the shapes code (it only sees the first level scripts). If I go all the way down to the shapes folder, then it can't find all the imports for akka. Can you please clarify? Thx!

Partial Functions example typo

This code snippet

scala> val pfunc: PartialFunction[Message, String] =
     |   case Exit => "Got Exit"
     |   case Draw(shape) => s"Got Draw($shape)"
     |   case Response(str) => s"Got Response($str)"
val pfunc: PartialFunction[...shapes.Message, String] = <function1>

should be

scala> val pfunc: PartialFunction[Message, String] = message => message match
     |   case Exit => "Got Exit"
     |   case Draw(shape) => s"Got Draw($shape)"
     |   case Response(str) => s"Got Response($str)"
val pfunc: PartialFunction[...shapes.Message, String] = <function1>

IntelliJ Build Issue With Compiler Flags Settings

I get the following build error when I try to run any of the introscala examples (and I assume any of the examples):

scalac: Flag -encoding set repeatedly

I'm attempting to run by simply selecting one of the main methods and electing "run XYZ" in the popup menu with the default scala compiler options in the IDE. I also tried commenting out the "-encoding", "utf-8" scalac option in build.sbt but got the same result.

compilation errors in eclipse

sbt ran OK.

my eclipse-lune ide (scala 2.11.4) (Java 8), had an error in the test SMapTest.java (package declaration is wrong).

But I also have errors are in metaprogramming package, something about macros.

So I deleted the package meanwhile (and it's tests).

Thanks.

Rename repo to "prog-scala-2nd-3rd-ed-code-examples"

The repo master branch has been tracking Scala 2.13 and library changes. The book-compatible versions of the repo are tagged. Hence, I don't see any reason not to continue using this repo for the forthcoming 3rd edition. Hence, renaming would make that clear.

parallel.sc should bu updated

source in // src/main/scala/progscala2/collections/parallel.sc
should add 'import scala.collection.parallel.CollectionConverters._',see it in scala-parallel-collections,
and when i import this in parallel.sc and run it, it says
'error: value par is not a member of scala.collection.immutable.Range.Inclusive
did you mean map, max, or span?
'
and i change it to *.scala and add main function,it runs sucessful, and i dont know why

scala.Tuple2 doesn't exist

Hello,

I have downloaded the code examples, SBT 0.13.9 and Scala 2.11.6. Both of them have been installed separately in a Windows 10 machine. After downloading the dependencies, which seem to be correct I get these errors:

C:\home\aall\projects\scala-examples>sbt test
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
[info] Loading project definition from C:\home\aall\projects\scala-examples\project
[info] Set current project to Programming Scala, Second Edition - Code examples (in build file:/C:/home/aall/projects/scala-examples/)
[info] Compiling 70 Scala sources and 4 Java sources to C:\home\aall\projects\scala-examples\target\scala-2.11\classes...
[error] C:\home\aall\projects\scala-examples\src\main\java\progscala2\javainterop\ScalaTuples.java:3: error: package scala does not exist
[error] import scala.Tuple2;
[error]             ^
[error] C:\home\aall\projects\scala-examples\src\main\java\progscala2\javainterop\ScalaTuples.java:7: error: cannot find symbol
[error]     Tuple2<String,Integer> stringInteger = new Tuple2<String,Integer>("one", 2);
[error]     ^
[error]   symbol:   class Tuple2
[error]   location: class ScalaTuples
[error] C:\home\aall\projects\scala-examples\src\main\java\progscala2\javainterop\ScalaTuples.java:7: error: cannot find symbol
[error]     Tuple2<String,Integer> stringInteger = new Tuple2<String,Integer>("one", 2);
[error]                                                ^
[error]   symbol:   class Tuple2
[error]   location: class ScalaTuples
[error] 3 errors
[error] (compile:compile) javac returned nonzero exit code
[error] Total time: 16 s, completed 04-ene-2016 23:15:37

It cannot find scala.Tuple2 class... At least in the latest API docs (Scala 2.11.7) the class appears:

http://www.scala-lang.org/api/current/index.html#scala.Tuple2

After this, I uninstalled the separated Scala package and removed .sbt and .ivy2 in my Windows home directory. Furthermore, I rebooted the system and executed sbt test again...the result was the same.

Maybe I have a problem with my home folder: C:\Users\Álvaro\.ivy2 (note the Á)
What can I do?

Thanks in advance.

`scala test` fails

I'm mostly unfamiliar with Maven. Does this mean this version of the Scala compiler is no longer available?

The first time I ran sbt test I got this:

Getting org.scala-sbt sbt 0.13.7 ...
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/sbt/0.13.7/jars/sbt.jar ...
    [SUCCESSFUL ] org.scala-sbt#sbt;0.13.7!sbt.jar (1536ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.10.4/scala-library-2.10.4.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-library;2.10.4!scala-library.jar (2968ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main/0.13.7/jars/main.jar ...
    [SUCCESSFUL ] org.scala-sbt#main;0.13.7!main.jar (2842ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-bin.jar ...
    [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-bin.jar (2214ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-interface/0.13.7/jars/compiler-interface-src.jar ...
    [SUCCESSFUL ] org.scala-sbt#compiler-interface;0.13.7!compiler-interface-src.jar (1586ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_8_2/0.13.7/jars/compiler-interface-bin.jar ...
    [SUCCESSFUL ] org.scala-sbt#precompiled-2_8_2;0.13.7!compiler-interface-bin.jar (1930ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_2/0.13.7/jars/compiler-interface-bin.jar ...
    [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_2;0.13.7!compiler-interface-bin.jar (1990ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/precompiled-2_9_3/0.13.7/jars/compiler-interface-bin.jar ...
    [SUCCESSFUL ] org.scala-sbt#precompiled-2_9_3;0.13.7!compiler-interface-bin.jar (1986ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/actions/0.13.7/jars/actions.jar ...
    [SUCCESSFUL ] org.scala-sbt#actions;0.13.7!actions.jar (2109ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/main-settings/0.13.7/jars/main-settings.jar ...
    [SUCCESSFUL ] org.scala-sbt#main-settings;0.13.7!main-settings.jar (2216ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/interface/0.13.7/jars/interface.jar ...
    [SUCCESSFUL ] org.scala-sbt#interface;0.13.7!interface.jar (1725ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/io/0.13.7/jars/io.jar ...
    [SUCCESSFUL ] org.scala-sbt#io;0.13.7!io.jar (2212ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/ivy/0.13.7/jars/ivy.jar ...
    [SUCCESSFUL ] org.scala-sbt#ivy;0.13.7!ivy.jar (2955ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/launcher-interface/0.13.7/jars/launcher-interface.jar ...
    [SUCCESSFUL ] org.scala-sbt#launcher-interface;0.13.7!launcher-interface.jar (1983ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logging/0.13.7/jars/logging.jar ...
    [SUCCESSFUL ] org.scala-sbt#logging;0.13.7!logging.jar (1913ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/logic/0.13.7/jars/logic.jar ...
    [SUCCESSFUL ] org.scala-sbt#logic;0.13.7!logic.jar (1727ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/process/0.13.7/jars/process.jar ...
    [SUCCESSFUL ] org.scala-sbt#process;0.13.7!process.jar (1825ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/run/0.13.7/jars/run.jar ...
    [SUCCESSFUL ] org.scala-sbt#run;0.13.7!run.jar (1854ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/command/0.13.7/jars/command.jar ...
    [SUCCESSFUL ] org.scala-sbt#command;0.13.7!command.jar (2176ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classpath/0.13.7/jars/classpath.jar ...
    [SUCCESSFUL ] org.scala-sbt#classpath;0.13.7!classpath.jar (1758ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/completion/0.13.7/jars/completion.jar ...
    [SUCCESSFUL ] org.scala-sbt#completion;0.13.7!completion.jar (2040ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/api/0.13.7/jars/api.jar ...
    [SUCCESSFUL ] org.scala-sbt#api;0.13.7!api.jar (2003ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-integration/0.13.7/jars/compiler-integration.jar ...
    [SUCCESSFUL ] org.scala-sbt#compiler-integration;0.13.7!compiler-integration.jar (1718ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compiler-ivy-integration/0.13.7/jars/compiler-ivy-integration.jar ...
    [SUCCESSFUL ] org.scala-sbt#compiler-ivy-integration;0.13.7!compiler-ivy-integration.jar (1563ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/relation/0.13.7/jars/relation.jar ...
    [SUCCESSFUL ] org.scala-sbt#relation;0.13.7!relation.jar (1602ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/task-system/0.13.7/jars/task-system.jar ...
    [SUCCESSFUL ] org.scala-sbt#task-system;0.13.7!task-system.jar (1811ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tasks/0.13.7/jars/tasks.jar ...
    [SUCCESSFUL ] org.scala-sbt#tasks;0.13.7!tasks.jar (1772ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/tracking/0.13.7/jars/tracking.jar ...
    [SUCCESSFUL ] org.scala-sbt#tracking;0.13.7!tracking.jar (1634ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/testing/0.13.7/jars/testing.jar ...
    [SUCCESSFUL ] org.scala-sbt#testing;0.13.7!testing.jar (1772ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.10.4/scala-reflect-2.10.4.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-reflect;2.10.4!scala-reflect.jar (1552ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/control/0.13.7/jars/control.jar ...
    [SUCCESSFUL ] org.scala-sbt#control;0.13.7!control.jar (1485ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/collections/0.13.7/jars/collections.jar ...
    [SUCCESSFUL ] org.scala-sbt#collections;0.13.7!collections.jar (2160ms)
downloading https://repo1.maven.org/maven2/jline/jline/2.11/jline-2.11.jar ...
    [SUCCESSFUL ] jline#jline;2.11!jline.jar (337ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/incremental-compiler/0.13.7/jars/incremental-compiler.jar ...
    [SUCCESSFUL ] org.scala-sbt#incremental-compiler;0.13.7!incremental-compiler.jar (1990ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/compile/0.13.7/jars/compile.jar ...
    [SUCCESSFUL ] org.scala-sbt#compile;0.13.7!compile.jar (1764ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/persist/0.13.7/jars/persist.jar ...
    [SUCCESSFUL ] org.scala-sbt#persist;0.13.7!persist.jar (1976ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/classfile/0.13.7/jars/classfile.jar ...
    [SUCCESSFUL ] org.scala-sbt#classfile;0.13.7!classfile.jar (1749ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-tools.sbinary/sbinary_2.10/0.4.2/jars/sbinary_2.10.jar ...
    [SUCCESSFUL ] org.scala-tools.sbinary#sbinary_2.10;0.4.2!sbinary_2.10.jar (1828ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cross/0.13.7/jars/cross.jar ...
    [SUCCESSFUL ] org.scala-sbt#cross;0.13.7!cross.jar (1481ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt.ivy/ivy/2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f/jars/ivy.jar ...
    [SUCCESSFUL ] org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae28f!ivy.jar (2414ms)
downloading https://repo1.maven.org/maven2/com/jcraft/jsch/0.1.46/jsch-0.1.46.jar ...
    [SUCCESSFUL ] com.jcraft#jsch;0.1.46!jsch.jar (496ms)
downloading https://repo1.maven.org/maven2/org/json4s/json4s-native_2.10/3.2.10/json4s-native_2.10-3.2.10.jar ...
    [SUCCESSFUL ] org.json4s#json4s-native_2.10;3.2.10!json4s-native_2.10.jar (302ms)
downloading https://repo1.maven.org/maven2/org/spire-math/jawn-parser_2.10/0.6.0/jawn-parser_2.10-0.6.0.jar ...
    [SUCCESSFUL ] org.spire-math#jawn-parser_2.10;0.6.0!jawn-parser_2.10.jar (377ms)
downloading https://repo1.maven.org/maven2/org/spire-math/json4s-support_2.10/0.6.0/json4s-support_2.10-0.6.0.jar ...
    [SUCCESSFUL ] org.spire-math#json4s-support_2.10;0.6.0!json4s-support_2.10.jar (329ms)
downloading https://repo1.maven.org/maven2/org/json4s/json4s-core_2.10/3.2.10/json4s-core_2.10-3.2.10.jar ...
    [SUCCESSFUL ] org.json4s#json4s-core_2.10;3.2.10!json4s-core_2.10.jar (475ms)
downloading https://repo1.maven.org/maven2/org/json4s/json4s-ast_2.10/3.2.10/json4s-ast_2.10-3.2.10.jar ...
    [SUCCESSFUL ] org.json4s#json4s-ast_2.10;3.2.10!json4s-ast_2.10.jar (338ms)
downloading https://repo1.maven.org/maven2/com/thoughtworks/paranamer/paranamer/2.6/paranamer-2.6.jar ...
    [SUCCESSFUL ] com.thoughtworks.paranamer#paranamer;2.6!paranamer.jar (293ms)
downloading https://repo1.maven.org/maven2/org/scala-lang/scalap/2.10.0/scalap-2.10.0.jar ...
    [SUCCESSFUL ] org.scala-lang#scalap;2.10.0!scalap.jar (533ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/cache/0.13.7/jars/cache.jar ...
    [SUCCESSFUL ] org.scala-sbt#cache;0.13.7!cache.jar (1802ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/test-agent/0.13.7/jars/test-agent.jar ...
    [SUCCESSFUL ] org.scala-sbt#test-agent;0.13.7!test-agent.jar (1535ms)
downloading https://repo1.maven.org/maven2/org/scala-sbt/test-interface/1.0/test-interface-1.0.jar ...
    [SUCCESSFUL ] org.scala-sbt#test-interface;1.0!test-interface.jar (271ms)
downloading https://repo.typesafe.com/typesafe/ivy-releases/org.scala-sbt/apply-macro/0.13.7/jars/apply-macro.jar ...
    [SUCCESSFUL ] org.scala-sbt#apply-macro;0.13.7!apply-macro.jar (2007ms)

:: problems summary ::
:::: WARNINGS
        [FAILED     ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar: Tag mismatch! (1557ms)

        [FAILED     ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar: Tag mismatch! (1557ms)

    ==== Maven Central: tried

      https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::              FAILED DOWNLOADS            ::

        :: ^ see resolution messages for details  ^ ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar

        ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
download failed: org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar
Error during sbt execution: Error retrieving required libraries
  (see /home/gaustin/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.7

Tried to run it again and got some different errors:

Getting org.scala-sbt sbt 0.13.7 ...
downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.10.4/scala-compiler-2.10.4.jar ...
    [SUCCESSFUL ] org.scala-lang#scala-compiler;2.10.4!scala-compiler.jar (8510ms)
:: retrieving :: org.scala-sbt#boot-app
    confs: [default]
    51 artifacts copied, 0 already retrieved (15709kB/48ms)
Getting Scala 2.10.4 (for sbt)...
downloading https://repo1.maven.org/maven2/org/scala-lang/jline/2.10.4/jline-2.10.4.jar ...
    [SUCCESSFUL ] org.scala-lang#jline;2.10.4!jline.jar (434ms)
downloading https://repo1.maven.org/maven2/org/fusesource/jansi/jansi/1.4/jansi-1.4.jar ...
    [SUCCESSFUL ] org.fusesource.jansi#jansi;1.4!jansi.jar (338ms)
:: retrieving :: org.scala-sbt#boot-scala
    confs: [default]
    5 artifacts copied, 0 already retrieved (24459kB/28ms)
[info] Loading project definition from /home/gaustin/learning/scala/prog-scala-2nd-ed-code-examples/project
[info] Updating {file:/home/gaustin/learning/scala/prog-scala-2nd-ed-code-examples/project/}prog-scala-2nd-ed-code-examples-build...
[info] Resolving org.scala-sbt.ivy#ivy;2.3.0-sbt-fccfbd44c9f64523b61398a0155784dcbaeae[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse-plugin/scala_2.10/sbt_0.13/2.4.0/jars/sbteclipse-plugin.jar ...
[info]  [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-plugin;2.4.0!sbteclipse-plugin.jar (1501ms)
[info] downloading https://repo.typesafe.com/typesafe/ivy-releases/com.typesafe.sbteclipse/sbteclipse-core/scala_2.10/sbt_0.13/2.4.0/jars/sbteclipse-core.jar ...
[info]  [SUCCESSFUL ] com.typesafe.sbteclipse#sbteclipse-core;2.4.0!sbteclipse-core.jar (2137ms)
[info] downloading https://repo1.maven.org/maven2/org/scalaz/scalaz-core_2.10/7.0.2/scalaz-core_2.10-7.0.2.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-core_2.10;7.0.2!scalaz-core_2.10.jar(bundle) (7081ms)
[info] downloading https://repo1.maven.org/maven2/org/scalaz/scalaz-effect_2.10/7.0.2/scalaz-effect_2.10-7.0.2.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-effect_2.10;7.0.2!scalaz-effect_2.10.jar(bundle) (773ms)
[info] Done updating.
[info] Set current project to Programming Scala, Second Edition - Code examples (in build file:/home/gaustin/learning/scala/prog-scala-2nd-ed-code-examples/)
[info] Updating {file:/home/gaustin/learning/scala/prog-scala-2nd-ed-code-examples/}prog-scala-2nd-ed-code-examples...
[info] Resolving org.sonatype.oss#oss-parent;7 ...
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-library/2.11.6/scala-library-2.11.6.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-library;2.11.6!scala-library.jar (2121ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-async_2.11/0.9.2/scala-async_2.11-0.9.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-async_2.11;0.9.2!scala-async_2.11.jar(bundle) (441ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.2/scala-parser-combinators_2.11-1.0.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.2!scala-parser-combinators_2.11.jar(bundle) (434ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.2/scala-xml_2.11-1.0.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.2!scala-xml_2.11.jar(bundle) (481ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.2/scala-reflect-2.11.2.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-reflect;2.11.2!scala-reflect.jar (1677ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-actor_2.11/2.3.4/akka-actor_2.11-2.3.4.jar ...
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-actor_2.11;2.3.4!akka-actor_2.11.jar (1089ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/akka/akka-slf4j_2.11/2.3.4/akka-slf4j_2.11-2.3.4.jar ...
[info]  [SUCCESSFUL ] com.typesafe.akka#akka-slf4j_2.11;2.3.4!akka-slf4j_2.11.jar (288ms)
[info] downloading https://repo1.maven.org/maven2/ch/qos/logback/logback-classic/1.1.2/logback-classic-1.1.2.jar ...
[info]  [SUCCESSFUL ] ch.qos.logback#logback-classic;1.1.2!logback-classic.jar (392ms)
[info] downloading https://repo1.maven.org/maven2/org/scalaz/scalaz-core_2.11/7.1.0/scalaz-core_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-core_2.11;7.1.0!scalaz-core_2.11.jar(bundle) (3086ms)
[info] downloading https://repo1.maven.org/maven2/com/typesafe/config/1.2.1/config-1.2.1.jar ...
[info]  [SUCCESSFUL ] com.typesafe#config;1.2.1!config.jar(bundle) (381ms)
[info] downloading https://repo1.maven.org/maven2/ch/qos/logback/logback-core/1.1.2/logback-core-1.1.2.jar ...
[info]  [SUCCESSFUL ] ch.qos.logback#logback-core;1.1.2!logback-core.jar (402ms)
[info] downloading https://repo1.maven.org/maven2/org/slf4j/slf4j-api/1.7.6/slf4j-api-1.7.6.jar ...
[info]  [SUCCESSFUL ] org.slf4j#slf4j-api;1.7.6!slf4j-api.jar (283ms)
[info] downloading https://repo1.maven.org/maven2/org/scalacheck/scalacheck_2.11/1.11.5/scalacheck_2.11-1.11.5.jar ...
[info]  [SUCCESSFUL ] org.scalacheck#scalacheck_2.11;1.11.5!scalacheck_2.11.jar (548ms)
[info] downloading https://repo1.maven.org/maven2/org/scalatest/scalatest_2.11/2.2.1/scalatest_2.11-2.2.1.jar ...
[info]  [SUCCESSFUL ] org.scalatest#scalatest_2.11;2.2.1!scalatest_2.11.jar(bundle) (2531ms)
[info] downloading https://repo1.maven.org/maven2/org/specs2/specs2_2.11/2.4/specs2_2.11-2.4.jar ...
[warn]  [FAILED     ] org.specs2#specs2_2.11;2.4!specs2_2.11.jar: Tag mismatch! (2637ms)
[warn]  [FAILED     ] org.specs2#specs2_2.11;2.4!specs2_2.11.jar: Tag mismatch! (2637ms)
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/specs2/specs2_2.11/2.4/specs2_2.11-2.4.jar
[info] downloading https://repo1.maven.org/maven2/junit/junit-dep/4.10/junit-dep-4.10.jar ...
[info]  [SUCCESSFUL ] junit#junit-dep;4.10!junit-dep.jar (774ms)
[info] downloading https://repo1.maven.org/maven2/com/novocode/junit-interface/0.10/junit-interface-0.10.jar ...
[info]  [SUCCESSFUL ] com.novocode#junit-interface;0.10!junit-interface.jar (334ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.2/scala-compiler-2.11.2.jar ...
[warn]  [FAILED     ] org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar: Tag mismatch! (1128ms)
[warn]  [FAILED     ] org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar: Tag mismatch! (1128ms)
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.2/scala-compiler-2.11.2.jar
[info] downloading https://repo1.maven.org/maven2/org/pegdown/pegdown/1.2.1/pegdown-1.2.1.jar ...
[info]  [SUCCESSFUL ] org.pegdown#pegdown;1.2.1!pegdown.jar (427ms)
[info] downloading https://repo1.maven.org/maven2/org/scalaz/scalaz-concurrent_2.11/7.1.0/scalaz-concurrent_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-concurrent_2.11;7.1.0!scalaz-concurrent_2.11.jar(bundle) (550ms)
[info] downloading https://repo1.maven.org/maven2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar ...
[info]  [SUCCESSFUL ] org.hamcrest#hamcrest-core;1.3!hamcrest-core.jar (282ms)
[info] downloading https://repo1.maven.org/maven2/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.jar ...
[info]  [SUCCESSFUL ] org.mockito#mockito-core;1.9.5!mockito-core.jar (837ms)
[info] downloading https://repo1.maven.org/maven2/junit/junit/4.11/junit-4.11.jar ...
[info]  [SUCCESSFUL ] junit#junit;4.11!junit.jar (608ms)
[info] downloading https://repo1.maven.org/maven2/org/specs2/classycle/1.4.3/classycle-1.4.3.jar ...
[info]  [SUCCESSFUL ] org.specs2#classycle;1.4.3!classycle.jar (335ms)
[info] downloading https://repo1.maven.org/maven2/org/parboiled/parboiled-java/1.1.4/parboiled-java-1.1.4.jar ...
[info]  [SUCCESSFUL ] org.parboiled#parboiled-java;1.1.4!parboiled-java.jar (300ms)
[info] downloading https://repo1.maven.org/maven2/org/parboiled/parboiled-core/1.1.4/parboiled-core-1.1.4.jar ...
[info]  [SUCCESSFUL ] org.parboiled#parboiled-core;1.1.4!parboiled-core.jar (347ms)
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm/4.1/asm-4.1.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm;4.1!asm.jar (283ms)
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-tree/4.1/asm-tree-4.1.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm-tree;4.1!asm-tree.jar (269ms)
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-analysis/4.1/asm-analysis-4.1.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm-analysis;4.1!asm-analysis.jar (276ms)
[info] downloading https://repo1.maven.org/maven2/org/ow2/asm/asm-util/4.1/asm-util-4.1.jar ...
[info]  [SUCCESSFUL ] org.ow2.asm#asm-util;4.1!asm-util.jar (279ms)
[info] downloading https://repo1.maven.org/maven2/org/scalaz/scalaz-effect_2.11/7.1.0/scalaz-effect_2.11-7.1.0.jar ...
[info]  [SUCCESSFUL ] org.scalaz#scalaz-effect_2.11;7.1.0!scalaz-effect_2.11.jar(bundle) (403ms)
[info] downloading https://repo1.maven.org/maven2/org/objenesis/objenesis/1.0/objenesis-1.0.jar ...
[info]  [SUCCESSFUL ] org.objenesis#objenesis;1.0!objenesis.jar (289ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-tools/testing/test-interface/0.5/test-interface-0.5.jar ...
[info]  [SUCCESSFUL ] org.scala-tools.testing#test-interface;0.5!test-interface.jar (275ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.11.6/scala-compiler-2.11.6.jar ...
[info]  [SUCCESSFUL ] org.scala-lang#scala-compiler;2.11.6!scala-compiler.jar (4781ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.6/scala-reflect-2.11.6.jar ...
[warn]  [FAILED     ] org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar: Tag mismatch! (334ms)
[warn]  [FAILED     ] org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar: Tag mismatch! (334ms)
[warn] ==== public: tried
[warn]   https://repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.11.6/scala-reflect-2.11.6.jar
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.3/scala-xml_2.11-1.0.3.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-xml_2.11;1.0.3!scala-xml_2.11.jar(bundle) (737ms)
[info] downloading https://repo1.maven.org/maven2/org/scala-lang/modules/scala-parser-combinators_2.11/1.0.3/scala-parser-combinators_2.11-1.0.3.jar ...
[info]  [SUCCESSFUL ] org.scala-lang.modules#scala-parser-combinators_2.11;1.0.3!scala-parser-combinators_2.11.jar(bundle) (412ms)
[info] downloading https://repo1.maven.org/maven2/jline/jline/2.12.1/jline-2.12.1.jar ...
[info]  [SUCCESSFUL ] jline#jline;2.12.1!jline.jar (353ms)
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::              FAILED DOWNLOADS            ::
[warn]  :: ^ see resolution messages for details  ^ ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.specs2#specs2_2.11;2.4!specs2_2.11.jar
[warn]  :: org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar
[warn]  :: org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: download failed: org.specs2#specs2_2.11;2.4!specs2_2.11.jar
download failed: org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar
download failed: org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:278)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:175)
    at sbt.IvyActions$$anonfun$updateEither$1.apply(IvyActions.scala:157)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:151)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:128)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:56)
    at sbt.IvySbt$$anon$4.call(Ivy.scala:64)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:93)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:78)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:97)
    at xsbt.boot.Using$.withResource(Using.scala:10)
    at xsbt.boot.Using$.apply(Using.scala:9)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:58)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:48)
    at xsbt.boot.Locks$.apply0(Locks.scala:31)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:64)
    at sbt.IvySbt.withIvy(Ivy.scala:123)
    at sbt.IvySbt.withIvy(Ivy.scala:120)
    at sbt.IvySbt$Module.withModule(Ivy.scala:151)
    at sbt.IvyActions$.updateEither(IvyActions.scala:157)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1318)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1315)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1345)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$85.apply(Defaults.scala:1343)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1348)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1342)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1360)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1300)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1275)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
    at sbt.std.Transform$$anon$4.work(System.scala:63)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
    at sbt.Execute.work(Execute.scala:235)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: download failed: org.specs2#specs2_2.11;2.4!specs2_2.11.jar
[error] download failed: org.scala-lang#scala-compiler;2.11.2!scala-compiler.jar
[error] download failed: org.scala-lang#scala-reflect;2.11.6!scala-reflect.jar
[error] Total time: 55 s, completed May 30, 2015 2:06:56 AM

I'm not really sure where to start in diagnosing this. Any help would be greatly appreciated.

`sbt test` returned failed tests: RemoveBlanksSuite and FoldRegexPatternsSuite

Hi! A scala beginner here.

Based on the suggestion in page 4 of Chapter 1, I've executed sbt test under git-cloned programming-scala-book-code-examples/ directory.

I got the following errors. Does anyone have an idea on why it is returning errors?

 programming-scala-book-code-examples (master) $ sbt test
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[info] welcome to sbt 1.5.5 (Homebrew Java 11.0.12)
[info] loading settings for project programming-scala-book-code-examples-build from plugins.sbt ...
[info] loading project definition from /Users/PCUser/dev/scala/programming-scala-book-code-examples/project
[info] loading settings for project root from build.sbt ...
[info] set current project to programming-scala-3rd-ed-code-examples (in build file:/Users/PCUser/dev/scala/programming-scala-book-code-examples/)
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
[info] + ZipCode.succeeds with zip integers between 1-99999 and extensions between 0-9999: OK, passed 100 tests.
[info] + ZipCode.succeeds with zip integers between 1-99999 and extension 0: OK, passed 100 tests.
[info] + ZipCode.succeeds with zip integers between 1-99999 and no extension: OK, passed 100 tests.
[info] + ZipCode.succeeds with zip string between 1-99999 and extensions between 0-9999: OK, passed 100 tests.
[info] + ZipCode.succeeds with zip string between 1-99999 and extension "0": OK, passed 100 tests.
[info] + ZipCode.succeeds with zip string between 1-99999 and extension "": OK, passed 100 tests.
[info] + ZipCode.succeeds with zip string between 1-99999 and no extension: OK, passed 100 tests.

...

progscala3.forcomps.RemoveBlanksSuite:
==> X progscala3.forcomps.RemoveBlanksSuite.RemoveBlanks removes blank lines in text  0.049s munit.FailException: /Users/PCUser/dev/scala/programming-scala-book-code-examples/src/test/scala/progscala3/forcomps/RemoveBlanksSuite.scala:13 assertion failed
12:      """  This is a       small
13:        |test   file""".stripMargin)
14:  }
    at munit.FunSuite.assert(FunSuite.scala:11)
    at progscala3.forcomps.RemoveBlanksSuite.$init$$$anonfun$1(RemoveBlanksSuite.scala:13)
==> X progscala3.forcomps.RemoveBlanksSuite.RemoveBlanks optionally compresses whitespace in text  0.002s munit.FailException: /Users/PCUser/dev/scala/programming-scala-book-code-examples/src/test/scala/progscala3/forcomps/RemoveBlanksSuite.scala:20 assertion failed
19:      """This is a small
20:        |test file""".stripMargin)
21:  }
    at munit.FunSuite.assert(FunSuite.scala:11)
    at progscala3.forcomps.RemoveBlanksSuite.$init$$$anonfun$2(RemoveBlanksSuite.scala:20)
==> X progscala3.forcomps.RemoveBlanksSuite.RemoveBlanks optionally prints line numbers from the original text  0.003s munit.FailException: /Users/PCUser/dev/scala/programming-scala-book-code-examples/src/test/scala/progscala3/forcomps/RemoveBlanksSuite.scala:27
26:      """   1: This is a small
27:        |   3: test file""".stripMargin, lines.mkString("\n"))
28:  }
   1: This is a small
   3: test file
    at munit.FunSuite.assert(FunSuite.scala:11)
    at progscala3.forcomps.RemoveBlanksSuite.$init$$$anonfun$3(RemoveBlanksSuite.scala:27)

progscala3.fp.datastructs.FoldRegexPatternsSuite:
==> X progscala3.fp.datastructs.FoldRegexPatternsSuite.Regex pattern matching used in a foldLeft  0.004s munit.FailException: /Users/PCUser/dev/scala/programming-scala-book-code-examples/src/test/scala/progscala3/fp/datastructs/FoldRegexPatternsSuite.scala:40 assertion failed
39:      Right("book.publisher" -> "O'Reilly"),
40:      Right("book.publication-year" -> "2021")))
41:  }
    at munit.FunSuite.assert(FunSuite.scala:11)
    at progscala3.fp.datastructs.FoldRegexPatternsSuite.$init$$$anonfun$1(FoldRegexPatternsSuite.scala:40)

...

[error] Failed: Total 233, Failed 4, Errors 0, Passed 229
[error] Failed tests:
[error]         progscala3.forcomps.RemoveBlanksSuite
[error]         progscala3.fp.datastructs.FoldRegexPatternsSuite
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 4 s, completed Feb 21, 2022, 4:40:42 PM

I'm using MacBook (Monterey 12.1) and here are my environment:

sbt --version
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
sbt version in this project: 1.5.5
sbt script version: 1.6.2

sbt:programming-scala-3rd-ed-code-examples> console
Welcome to Scala 3.1.0 (11.0.12, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

PayrollParser parseAll returning RuntimeException

Hello,

I have run the PayrollUseCases example ("The Parthenon Architecture" section).
However, the toDeduction method throws a

java.lang.RuntimeException: No result when parsing failed

I suspect it could be due to the locale on my computer (ES, Spanish), as the decimal places are separated with a comma, not a point. The rule String passed to the toDeduction method is:

biweekly {
      federal tax          20,000000  percent,
      state tax            5,000000  percent,
      insurance premiums   200,000000  dollars,
      retirement savings   5,000000  percent
    }

So the parseAll method does not retrieve anything at all. The full stack trace:

java.lang.RuntimeException: No result when parsing failed at scala.sys.package$.error(package.scala:27) at scala.util.parsing.combinator.Parsers$NoSuccess.get(Parsers.scala:176) at scala.util.parsing.combinator.Parsers$NoSuccess.get(Parsers.scala:162) at progscala2.appdesign.parthenon.PayrollParthenon$.progscala2$appdesign$parthenon$PayrollParthenon$$toDeduction(PayrollUseCases.scala:33) at progscala2.appdesign.parthenon.PayrollParthenon$$anonfun$processRules$2.apply(PayrollUseCases.scala:42) at progscala2.appdesign.parthenon.PayrollParthenon$$anonfun$processRules$2.apply(PayrollUseCases.scala:41) at scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:728) at scala.collection.Iterator$class.foreach(Iterator.scala:742) at scala.collection.AbstractIterator.foreach(Iterator.scala:1194) at scala.collection.IterableLike$class.foreach(IterableLike.scala:72) at scala.collection.AbstractIterable.foreach(Iterable.scala:54) at scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:727) at progscala2.appdesign.parthenon.PayrollParthenon$.processRules(PayrollUseCases.scala:41) at progscala2.appdesign.parthenon.PayrollParthenon$.main(PayrollUseCases.scala:72) at progscala2.appdesign.parthenon.PayrollParthenon.main(PayrollUseCases.scala) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) [trace] Stack trace suppressed: run last compile:runMain for the full output.

Regards,

Álvaro López

not found type Breed

// src/main/scala/progscala2/rounding/enumeration.sc

object Breed extends Enumeration {
  type Breed = Value
  val doberman = Value("Doberman Pinscher")
  val yorkie   = Value("Yorkshire Terrier")
  val scottie  = Value("Scottish Terrier")
  val dane     = Value("Great Dane")
  val portie   = Value("Portuguese Water Dog")
}

import Breed._

// print a list of breeds and their IDs
println("ID\tBreed")
for (breed <- Breed.values) println(s"${breed.id}\t$breed")

// print a list of Terrier breeds
println("\nJust Terriers:")
Breed.values filter (_.toString.endsWith("Terrier")) foreach println

def isTerrier(b: Breed) = b.toString.endsWith("Terrier")
//
//println("\nTerriers Again??")
//Breed.values filter isTerrier foreach println

when run def isTerrier(b: Breed) = b.toString.endsWith("Terrier") , I get an error, it shows :

Error:(50, 92) not found: type Breed
println("isTerrier: " + MacroPrinter211.printGeneric({import inst$A$A._ ;def isTerrier(b: Breed) = b.toString.endsWith("Terrier") }).replace("inst$A$A.", ""))
                                                                                         

sbt test Compilation failed: Suspicious synchronized call on boxed class

Hello all,

Im following along Chapter 1 page 4 and I am attempting to execute sbt test under a git-cloned programming-scala-book-code-examples/ directory.

I got the following compilation failure error. Does anyone have an idea on how to fix this?

(base) programming-scala-book-code-examples % sbt test
[info] welcome to sbt 1.9.8 (Eclipse Adoptium Java 21.0.2)
[info] loading settings for project programming-scala-book-code-examples-build from plugins.sbt ...
[info] loading project definition from /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/project
[info] loading settings for project root from build.sbt ...
[info] set current project to programming-scala-3rd-ed-code-examples (in build file:/Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/)
[info] compiling 139 Scala sources and 4 Java sources to /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/target/scala-3.4.0/classes ...
[error] -- [E187] Potential Issue Error: /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/src/main/scala/progscala3/traits/ui/ButtonCountObserver.scala:8:10 
[error] 8 |    count.synchronized { count += 1 }
[error]   |    ^^^^^^^^^^^^^^^^^^
[error]   |    Suspicious synchronized call on boxed class
[error]   |-----------------------------------------------------------------------------
[error]   | Explanation (enabled by `-explain`)
[error]   |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]   | You called the synchronized method on a boxed primitive. This might not be what
[error]   | you intended.
[error]    -----------------------------------------------------------------------------
[error] -- [E187] Potential Issue Error: /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/src/main/scala/progscala3/traits/ui2/CountObserver.scala:7:48 
[error] 7 |  def receiveUpdate(state: State): Unit = count.synchronized { count += 1 }
[error]   |                                          ^^^^^^^^^^^^^^^^^^
[error]   |                               Suspicious synchronized call on boxed class
[error]   |-----------------------------------------------------------------------------
[error]   | Explanation (enabled by `-explain`)
[error]   |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]   | You called the synchronized method on a boxed primitive. This might not be what
[error]   | you intended.
[error]    -----------------------------------------------------------------------------
[error] -- [E187] Potential Issue Error: /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/src/main/scala/progscala3/traits/ui2/VetoableClicks.scala:8:10 
[error] 8 |    count.synchronized { count += 1 }
[error]   |    ^^^^^^^^^^^^^^^^^^
[error]   |    Suspicious synchronized call on boxed class
[error]   |-----------------------------------------------------------------------------
[error]   | Explanation (enabled by `-explain`)
[error]   |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]   | You called the synchronized method on a boxed primitive. This might not be what
[error]   | you intended.
[error]    -----------------------------------------------------------------------------
[error] -- [E187] Potential Issue Error: /Users/mvenetos/Documents/GitHub/programming-scala-book-code-examples/src/main/scala/progscala3/traits/ui2/VetoableClicks.scala:14:33 
[error] 14 |  def resetCount(): Unit = count.synchronized { count = 0 }          // <4>
[error]    |                           ^^^^^^^^^^^^^^^^^^
[error]    |                           Suspicious synchronized call on boxed class
[error]    |----------------------------------------------------------------------------
[error]    | Explanation (enabled by `-explain`)
[error]    |- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
[error]    | You called the synchronized method on a boxed primitive. This might not be what
[error]    | you intended.
[error]     ----------------------------------------------------------------------------
[error] four errors found
[error] (Compile / compileIncremental) Compilation failed

I am using a MacBook (Sonoma 14.2) with sbt version 1.9.8, Java version 21.0.2, and scala version 3.3.1

Unresolved dependency when 'sbt test'

Hi all, just started reading the book, did the sbt test as you suggested but get this. Apparently all dependencies download was successful. I'm running Oracle's JDK 1.8.0_102-b14. Thanks.

[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.scala-lang#scala-library;2.10.4: configuration not found in org.scala-lang#scala-library;2.10.4: 'compile'. It was required from default#prog-scala-2nd-ed-code-examples-master-build;0.1-SNAPSHOT provided
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.4: configuration not found in org.scala-lang#scala-library;2.10.4: 'compile'. It was required from default#prog-scala-2nd-ed-code-examples-master-build;0.1-SNAPSHOT provided
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:213)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:121)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$Module$$anonfun$withModule$1.apply(Ivy.scala:116)
    at sbt.IvySbt$$anonfun$withIvy$1.apply(Ivy.scala:104)
    at sbt.IvySbt.sbt$IvySbt$$action$1(Ivy.scala:51)
    at sbt.IvySbt$$anon$3.call(Ivy.scala:60)
    at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:98)
    at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:81)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:102)
    at xsbt.boot.Using$.withResource(Using.scala:11)
    at xsbt.boot.Using$.apply(Using.scala:10)
    at xsbt.boot.Locks$GlobalLock.withFileLock(Locks.scala:102)
    at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:62)
    at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:52)
    at xsbt.boot.Locks$.apply0(Locks.scala:38)
    at xsbt.boot.Locks$.apply(Locks.scala:28)
    at sbt.IvySbt.withDefaultLogger(Ivy.scala:60)
    at sbt.IvySbt.withIvy(Ivy.scala:101)
    at sbt.IvySbt.withIvy(Ivy.scala:97)
    at sbt.IvySbt$Module.withModule(Ivy.scala:116)
    at sbt.IvyActions$.update(IvyActions.scala:121)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1161)
    at sbt.Classpaths$$anonfun$sbt$Classpaths$$work$1$1.apply(Defaults.scala:1159)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1182)
    at sbt.Classpaths$$anonfun$doWork$1$1$$anonfun$73.apply(Defaults.scala:1180)
    at sbt.Tracked$$anonfun$lastOutput$1.apply(Tracked.scala:35)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1184)
    at sbt.Classpaths$$anonfun$doWork$1$1.apply(Defaults.scala:1179)
    at sbt.Tracked$$anonfun$inputChanged$1.apply(Tracked.scala:45)
    at sbt.Classpaths$.cachedUpdate(Defaults.scala:1187)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1152)
    at sbt.Classpaths$$anonfun$updateTask$1.apply(Defaults.scala:1130)
    at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
    at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:42)
    at sbt.std.Transform$$anon$4.work(System.scala:64)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:237)
    at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18)
    at sbt.Execute.work(Execute.scala:244)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:237)
    at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:160)
    at sbt.CompletionService$$anon$2.call(CompletionService.scala:30)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.scala-lang#scala-library;2.10.4: configuration not found in org.scala-lang#scala-library;2.10.4: 'compile'. It was required from default#prog-scala-2nd-ed-code-examples-master-build;0.1-SNAPSHOT provided
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? 

"A Taste of Concurrency", first example

In the book (PDF version bought and downloaded from O'Reilly on Aug 5th 2016) the source for the first code example in "A Taste of Concurrency" section of chapter 1 shows as its first line:

// src/main/scala/progscala2/introscala/shapes/Shapes.scala

but the file in this repository is called shapes.scala, with a lowercase 's'.

Implicits conversions resolution

Hello,

In the Implicits chapter it is detailed that: [...] "implicit methods are considered an optional feature as of Scala 2.10, so you should enable the feature explicitly with the import statement,
import scala.language.implicitConversions, or with the global -language:implicitConversions compiler option.

Using the latest sources for Scala 2.11.7 I found that the import in the src files it is not working:

scala> :load src/main/scala/progscala2/implicits/implicit-conversions-resolution.sc
Loading src\main\scala\progscala2\implicits\implicit-conversions-resolution.sc...
import scala.language.implicitConversions
defined class Foo
<console>:15: error: Foo.type does not take parameters
     implicit def fromString(s: String): Foo = Foo(s)
                                                  ^
<console>:16: error: type mismatch;
 found   : String
 required: Foo
         def m(s: String) = m1(s)
                           ^

scala> :load src/main/scala/progscala2/implicits/implicit-conversions-resolution2.sc
Loading src\main\scala\progscala2\implicits\implicit-conversions-resolution2.sc...
import scala.language.implicitConversions
defined class Foo
<console>:16: error: Foo.type does not take parameters
         implicit def fromString(s: String): Foo = Foo(s)
                                                  ^
    overridingConversion: (s: String)Foo
    defined class O

In case of adding the option to build.sbtfile, should the global compiler option added here: scalacOptions ++= Seq(...)

Thanks,
Álvaro

“futures.sc” value onSuccess is not a member of scala.concurrent.Future[Int]

script's location is .\src\main\scala\progscala2\typelessdomore/futures.sc

when i load the script ,its console print 'error: value onSuccess is not a member of scala.concurrent.Future[Int]'

and i use
future onComplete { case Success(x) => println(s"success and return is $x") case Failure(t) => println(s"An error has occured: $t" ) }
to replace it,its run sucessful,and i dont know why
i use scala 2.13.1

sbt test fails for wrong LANG

Hi :-)
in the very beginning of the book (3rd edition), Chapter 1, Building the Code Examples, the recommended sbt test fails in case you have the wrong LANG set. In my case it was set to "de_DE.UTF-8" and the tests failed with:

[info] Passed: Total 7, Failed 0, Errors 0, Passed 7
[error] Failed: Total 233, Failed 7, Errors 0, Passed 226
[error] Failed tests:
[error]         progscala3.fp.combinators.PayrollSuite
[error]         progscala3.fp.curry.TupledFuncSuite
[error]         progscala3.dsls.payroll.PayrollSuite
[error] (Test / test) sbt.TestsFailedException: Tests unsuccessful
[error] Total time: 2 s, completed 31.07.2021, 16:56:39

After changing it with
export LANG="en_US.UTF-8"

the tests run successfull.
Would be nice to have this mentioned in a short note, because it took me a few hours to find the reason.

Greetings
Grisuji

[error] -- Error: D:\ScalaProject\programming-scala-book-code-examples\src\main\scala\progscala3\typesystem\bounds\list\AbbrevList.scala:36:17

sbt:programming-scala-3rd-ed-code-examples> run hello world
[info] compiling 136 Scala sources and 4 Java sources to D:\ScalaProject\programming-scala-book-code-examples\target\scala-3.1.2\classes ...
[error] -- Error: D:\ScalaProject\programming-scala-book-code-examples\src\main\scala\progscala3\typesystem\bounds\list\AbbrevList.scala:36:17
[error] 35 |@TargetNAME("AbbrevListCons")
[error] 36 |final case class ::[B](private var hd: B,
[error] |^
[error] |@TargetNAME annotation "AbbrevListCons" clashes with other definition in same scope
[error] 37 | private[list] var tl: AbbrevList[B]) extends AbbrevList[B]:
[error] 38 | override def isEmpty: Boolean = false
[error] 39 | def head : B = hd
[error] 40 | def tail : AbbrevList[B] = tl
[error] one error found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 11 s, completed Aug 5, 2022 10:24:43 AM

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.