Code Monkey home page Code Monkey logo

scala_school's Introduction

This is Scala School - a set of lessons covering the Scala programming language.

We use jekyll to generate the site. In order to build it, you must first install it:

$ gem install jekyll

should do. Now, build the site with make. This will create a copy of the lessons in the web.out folder.

For development, you'll also need to install RedCloth.

$ gem install RedCloth
$ gem install jekyll-textile-converter

Then make serve will launch jekyll in serving mode: a web server will be launched on port 4000, and changing files will automatically rebuild the site.

To publish to https://twitter.github.io/scala_school:

$ make publish

scala_school's People

Contributors

adam-singer avatar alanbato avatar benpence avatar bobrik avatar bowmanb avatar csaltos avatar enshahar avatar erilyth avatar evnm avatar garciparedes avatar isaias avatar jasonqu avatar jowens avatar juliaferraioli avatar kevinoliver avatar kvnol avatar lahosken avatar lambdaterm avatar m4jing avatar mariusae avatar mdaniel avatar nelsonblaha avatar nerro avatar s4nk avatar simeonf avatar sprsquish avatar tipabu avatar trustin avatar vivekjain10 avatar voyageth 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  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

scala_school's Issues

Letter case of "HP" in calculator examples

First of all: thank you for providing this tutorial! :)

In the calculator example presented in the "Basics" lesson, an example value for brand is "HP".

In the next lesson, "Basics continued," the calculator example is revisited, but the example value for brand is "hp".

I realize that this difference doesn't affect the effectiveness of the lesson, but I would suggest using "HP" in "Basics continued," for consistency.

Turkish translation

Hi,

I would like to work on Turkish translation as far as I can.

If there is someone else who are interested in Turkish translation please drop a comment on this issue.

Methods vs functions on Basics page

On the Basics page, we have this section:

Functions

You can create functions with def.

scala> def addOne(m: Int): Int = m + 1
addOne: (m: Int)Int

...

You can leave off parens on functions with no arguments.

scala> def three() = 1 + 2
three: ()Int

scala> three()
res2: Int = 3

scala> three
res3: Int = 3

Perhaps this could be titled "Methods", and refer to methods instead of functions? You can leave off parens on methods with no arguments, but you can't leave off parens on functions with no arguments. E.g. this will not evaluate the function:

scala> val f = () => 1
f: () => Int = <function0>

scala> f
res19: () => Int = <function0>

The aside further down is helpful, but it seems to take the approach that the difference between functions and methods is very complicated and is best left to language experts. This doesn't necessarily need to be the case (IMO), and a brief explanation of the following shouldn't be too terrifying:

  1. Functions are objects

    val threeFunction = () => 1 + 2
    
  2. Methods are not functions (and hence not objects)

    def threeMethod: Int = 1 + 2
    
  3. This is okay, because in most cases, a method is automatically wrapped in a new function if you try to treat it as one

    val threeFunction = threeMethod
    

basics2 "object FooMaker" example before we intro "object"

The apply() section has a factory object. That makes some sense, since that's a common idiom that uses apply().

But we don't intro "object" until the next section, whoopsie.

Mmmaybe reorder sections. Mmmaybe replace "object FooMaker" example with text blurb saying something like "One of the main uses of .apply is a factory object, as shown in the next section." Or maybe some much more brilliant idea.

https://twitter.github.io/scala_school/ lost its styling

#202 was recently merged, after which I pulled from master and ran make publish, as the readme says. This deployed the latest version of the site except it lost all its styling in production.

Steps to reproduce:

  • request write access to this repository
  • clone master and ensure the dependencies listed in the readme are installed
  • run make serve to see the local site with the proper styling
  • run make publish to see the production site without the styling

twitter.github.com/scala_school is broken.

Describe the bug
twitter.github.com/scala_school is broken.
Returns 404

To Reproduce
Steps to reproduce the behavior:

  1. Go to twitter.github.com/scala_school

Expected behavior
A clear and concise description of what you expected to happen.
image

Screenshots
If applicable, add screenshots to help explain your problem.
image

Suggested Fix
Replace mentions of twitter.github.com around this repository to twitter.github.io

Korean translation

Hello

My name is Jungbu Yoon and I am living in South Korea.
I am working in the IT industry so, I heard your site that is interesting programs.

I would like to your "Scala school site" translate by Korean to share more Koreans.

When you accept this, I want show a localized source in any way to your approve of this.

My email address is [email protected]
I am waiting your answer and appreciate it.

Thank you

Overloading methods example raises exception using scala 2.9.1

Using scala 2.9.1 and sbt 0.11.2, the example with the title 'Overloading methods' on basics section does not work as documented.

scala> class ScientificCalculator(brand: String) extends Calculator(brand) {
     |   def log(m: Double, base: Double) = math.log(m) / math.log(base)
     | }
defined class ScientificCalculator

scala> class EvenMoreScientificCalculator(brand: String) extends ScientificCalculator(brand) {
     |   def log(m: Int) = log(m, math.exp(1))
     | }
<console>:10: error: overloaded method log needs result type
         def log(m: Int) = log(m, math.exp(1))

Unresolved dependency

Hello I having the following problem when running sbt or sbt update when following the https://twitter.github.io/scala_school/searchbird.html

[info] Updating plugins...
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.jar
[info] You probably access the destination server through a proxy server that is not well configured.
[warn] module not found: com.twitter#sbt-thrift;1.3.4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/com.twitter/sbt-thrift/1.3.4/ivys/ivy.xml
[warn] -- artifact com.twitter#sbt-thrift;1.3.4!sbt-thrift.jar:
[warn] /Users/camol/.ivy2/local/com.twitter/sbt-thrift/1.3.4/jars/sbt-thrift.jar
[warn] ==== twitter.artifactory: tried
[warn] http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.pom
[warn] -- artifact com.twitter#sbt-thrift;1.3.4!sbt-thrift.jar:
[warn] http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.jar
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.pom
[info] You probably access the destination server through a proxy server that is not well configured.
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.jar
[info] You probably access the destination server through a proxy server that is not well configured.
[warn] module not found: com.twitter#standard-project;0.11.4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/com.twitter/standard-project/0.11.4/ivys/ivy.xml
[warn] -- artifact com.twitter#standard-project;0.11.4!standard-project.jar:
[warn] /Users/camol/.ivy2/local/com.twitter/standard-project/0.11.4/jars/standard-project.jar
[warn] ==== twitter.artifactory: tried
[warn] http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.pom
[warn] -- artifact com.twitter#standard-project;0.11.4!standard-project.jar:
[warn] http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.twitter#sbt-thrift;1.3.4: not found
[warn] :: com.twitter#standard-project;0.11.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.pom
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.jar
[warn] module not found: com.twitter#sbt-thrift;1.3.4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/com.twitter/sbt-thrift/1.3.4/ivys/ivy.xml
[warn] -- artifact com.twitter#sbt-thrift;1.3.4!sbt-thrift.jar:
[warn] /Users/camol/.ivy2/local/com.twitter/sbt-thrift/1.3.4/jars/sbt-thrift.jar
[warn] ==== twitter.artifactory: tried
[warn] http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.pom
[warn] -- artifact com.twitter#sbt-thrift;1.3.4!sbt-thrift.jar:
[warn] http://artifactory.local.twitter.com/repo/com/twitter/sbt-thrift/1.3.4/sbt-thrift-1.3.4.jar
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.pom
[warn] Host artifactory.local.twitter.com not found. url=http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.jar
[warn] module not found: com.twitter#standard-project;0.11.4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/com.twitter/standard-project/0.11.4/ivys/ivy.xml
[warn] -- artifact com.twitter#standard-project;0.11.4!standard-project.jar:
[warn] /Users/camol/.ivy2/local/com.twitter/standard-project/0.11.4/jars/standard-project.jar
[warn] ==== twitter.artifactory: tried
[warn] http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.pom
[warn] -- artifact com.twitter#standard-project;0.11.4!standard-project.jar:
[warn] http://artifactory.local.twitter.com/repo/com/twitter/standard-project/0.11.4/standard-project-0.11.4.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.twitter#sbt-thrift;1.3.4: not found
[warn] :: com.twitter#standard-project;0.11.4: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] sbt.ResolveException: unresolved dependency: com.twitter#sbt-thrift;1.3.4: not found
[error] unresolved dependency: com.twitter#standard-project;0.11.4: not found
sbt.ResolveException: unresolved dependency: com.twitter#sbt-thrift;1.3.4: not found
unresolved dependency: com.twitter#standard-project;0.11.4: not found

When I change the Plugins.scala code to:

import sbt._

class Plugins(info: ProjectInfo) extends PluginDefinition(info) {
import scala.collection.jcl
val environment = jcl.Map(System.getenv())
def isSBTOpenTwitter = environment.get("SBT_OPEN_TWITTER").isDefined
def isSBTTwitter = environment.get("SBT_TWITTER").isDefined

override def repositories = if (isSBTOpenTwitter) {
Set("twitter.artifactory" at "http://artifactory.local.twitter.com/open-source/")
} else if (isSBTTwitter) {
Set("twitter.artifactory" at "http://artifactory.local.twitter.com/repo/")
} else {
super.repositories ++ Set(
"twitter.com" at "http://maven.twttr.com/",
"scala-tools" at "http://scala-tools.org/repo-releases/",
"freemarker" at "http://freemarker.sourceforge.net/maven2/"
)
}
override def ivyRepositories = Seq(Resolver.defaultLocal(None)) ++ repositories

val standardProject = "com.twitter" % "standard-project" % "0.12.7"
val sbtThrift = "com.twitter" % "sbt-thrift" % "1.4.4"
}

I get another set of errors:

[info] Recompiling plugin definition...
[info] Source analysis: 1 new/modified, 0 indirectly invalidated, 0 removed.
[info]
[info] Updating plugins...
[warn] module not found: org.jruby#jruby-complete;1.6.0.RC2
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.jruby/jruby-complete/1.6.0.RC2/ivys/ivy.xml
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] /Users/camol/.ivy2/local/org.jruby/jruby-complete/1.6.0.RC2/jars/jruby-complete.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://maven.twttr.com/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://scala-tools.org/repo-releases/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] module not found: org.markdownj#markdownj;0.3.0-1.0.2b4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.markdownj/markdownj/0.3.0-1.0.2b4/ivys/ivy.xml
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] /Users/camol/.ivy2/local/org.markdownj/markdownj/0.3.0-1.0.2b4/jars/markdownj.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://maven.twttr.com/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://scala-tools.org/repo-releases/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] module not found: org.freemarker#freemarker;2.3.16
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.freemarker/freemarker/2.3.16/ivys/ivy.xml
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] /Users/camol/.ivy2/local/org.freemarker/freemarker/2.3.16/jars/freemarker.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://maven.twttr.com/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://scala-tools.org/repo-releases/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[info] downloading http://maven.twttr.com/com/twitter/sbt-thrift/1.4.4/sbt-thrift-1.4.4.jar ...
[info] [SUCCESSFUL ] com.twitter#sbt-thrift;1.4.4!sbt-thrift.jar (4938ms)
[info] downloading http://maven.twttr.com/com/twitter/standard-project/0.12.7/standard-project-0.12.7.jar ...
[info] [SUCCESSFUL ] com.twitter#standard-project;0.12.7!standard-project.jar (586ms)
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.jruby#jruby-complete;1.6.0.RC2: not found
[warn] :: org.markdownj#markdownj;0.3.0-1.0.2b4: not found
[warn] :: org.freemarker#freemarker;2.3.16: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[warn] :: problems summary ::
[warn] :::: WARNINGS
[warn] module not found: org.jruby#jruby-complete;1.6.0.RC2
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.jruby/jruby-complete/1.6.0.RC2/ivys/ivy.xml
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] /Users/camol/.ivy2/local/org.jruby/jruby-complete/1.6.0.RC2/jars/jruby-complete.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://maven.twttr.com/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://scala-tools.org/repo-releases/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.pom
[warn] -- artifact org.jruby#jruby-complete;1.6.0.RC2!jruby-complete.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/jruby/jruby-complete/1.6.0.RC2/jruby-complete-1.6.0.RC2.jar
[warn] module not found: org.markdownj#markdownj;0.3.0-1.0.2b4
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.markdownj/markdownj/0.3.0-1.0.2b4/ivys/ivy.xml
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] /Users/camol/.ivy2/local/org.markdownj/markdownj/0.3.0-1.0.2b4/jars/markdownj.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://maven.twttr.com/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://scala-tools.org/repo-releases/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.pom
[warn] -- artifact org.markdownj#markdownj;0.3.0-1.0.2b4!markdownj.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/markdownj/markdownj/0.3.0-1.0.2b4/markdownj-0.3.0-1.0.2b4.jar
[warn] module not found: org.freemarker#freemarker;2.3.16
[warn] ==== local: tried
[warn] /Users/camol/.ivy2/local/org.freemarker/freemarker/2.3.16/ivys/ivy.xml
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] /Users/camol/.ivy2/local/org.freemarker/freemarker/2.3.16/jars/freemarker.jar
[warn] ==== twitter.com: tried
[warn] http://maven.twttr.com/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://maven.twttr.com/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[warn] ==== scala-tools: tried
[warn] http://scala-tools.org/repo-releases/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://scala-tools.org/repo-releases/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[warn] ==== freemarker: tried
[warn] http://freemarker.sourceforge.net/maven2/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.pom
[warn] -- artifact org.freemarker#freemarker;2.3.16!freemarker.jar:
[warn] http://freemarker.sourceforge.net/maven2/org/freemarker/freemarker/2.3.16/freemarker-2.3.16.jar
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.jruby#jruby-complete;1.6.0.RC2: not found
[warn] :: org.markdownj#markdownj;0.3.0-1.0.2b4: not found
[warn] :: org.freemarker#freemarker;2.3.16: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[info]
[info] :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
[error] sbt.ResolveException: unresolved dependency: org.jruby#jruby-complete;1.6.0.RC2: not found
[error] unresolved dependency: org.markdownj#markdownj;0.3.0-1.0.2b4: not found
[error] unresolved dependency: org.freemarker#freemarker;2.3.16: not found
sbt.ResolveException: unresolved dependency: org.jruby#jruby-complete;1.6.0.RC2: not found
unresolved dependency: org.markdownj#markdownj;0.3.0-1.0.2b4: not found
unresolved dependency: org.freemarker#freemarker;2.3.16: not found

Basics Lesson 1 does not include Try Catch Finally

Basics lesson 1 shows the following as included in the lesson:

values
expressions
functions
classes
methods
basic inheritance
try-catch-finally

However, try-catch-finally is not included in this lesson, but in the next, basics2 lesson.

Russian translation

Hi, I want to make tutorial translation into Russian. What is best choice do this? Can I do the translation like in Effective Scala using my translation files and adding a link in the original?

Double-check clarity on some Finagle, SearchBird items

I just watched @jdowens present about Finagle to TwitterFolks. They had some questions. The presentation wasn't the same material as Scala School, but questions can point out confusing topics. At some point I should take time to ponder these (and maybe turn some of them into their own individual issues). But I should at least note them down in an issue instead of in a little text file on my laptop:

  • In Finagle design, why would you ever want to support RPCs methods other than HTTP-RESTful?
  • If your service is a long-running thing, you might worry about:
    If your service is basically a filter and if your code thus "stops running" while waiting for the asynchronous stuff upstream from you to finish--do you need to worry that you'll get garbage-collected?
    (Involved question from same guy that I barely understood, but the answer was:) Use FuturePool
  • Why does .map return a Future[thingy] instead of a thingy? You said "synchronous", doesn't that mean that the .map will block?
  • The Future isBanned example would be better if there was some asynchrony in the isBanned function itself.
  • Why do we humans have to choose between map and flatMap? Couldn't some Scala type-magic figure out to use flatMap if it sees nested Future types?
  • We only showed a small part of the searchbird example, didn't show any exception handling. Folks wanted to know good place in which to "bump the error count".
  • This timeout filter example: is this how all timeouts work in (some context)? Answer: no.
  • If your service throws, does it throw then-and-there? Or does it wrap the exception in a Future and send it down the line?
  • Example client, server say things like .name("excellentClient") What is that name used for?
  • The .within example might be old?

Finagle: show how to set up a server that has a filter

I have a service that should only be available to auth'd users. When I read Scala School's Finagle page, I'm pretty sure I want to put together my service, some ServiceBuilder code, and a filter, uhm, somehow. I can figure it out if I re-read carefully while thinking really hard. But thinking is for chumps. We probably either want to copy-from and/or link-to an example like

https://github.com/twitter/finagle/blob/master/README.md#Building%20a%20Robust%20Server

searchbird creation output on searchbird page does not match new sbt

Also:

  • not clear what -p does as a scala-bootstrapper argument
  • scala-bootstrapper shows running "sbt update test" after running scala-bootstrapper

Here's my script of running the instructions that are currently on the webpage:

[tw-mbp13-jowens workspace]$ mkdir searchbird;cd searchbird
[tw-mbp13-jowens searchbird]$ scala-bootstrapper -p searchbird
writing build.sbt
writing config/development.scala
writing config/production.scala
writing config/staging.scala
writing config/test.scala
writing console
writing Gemfile
writing project/plugins.sbt
writing README.md
writing src/main/scala/com/twitter/searchbird/SearchbirdConsoleClient.scala
writing src/main/scala/com/twitter/searchbird/SearchbirdServiceImpl.scala
writing src/main/scala/com/twitter/searchbird/config/SearchbirdServiceConfig.scala
writing src/main/scala/com/twitter/searchbird/Main.scala
writing src/main/thrift/searchbird.thrift
writing src/scripts/searchbird.sh
writing src/scripts/config.sh
writing src/scripts/devel.sh
writing src/scripts/server.sh
writing src/scripts/service.sh
writing src/test/scala/com/twitter/searchbird/AbstractSpec.scala
writing src/test/scala/com/twitter/searchbird/SearchbirdServiceSpec.scala
writing TUTORIAL.md
[tw-mbp13-jowens searchbird]$ find . -type f
./build.sbt
./config/development.scala
./config/production.scala
./config/staging.scala
./config/test.scala
./console
./Gemfile
./project/plugins.sbt
./README.md
./src/main/scala/com/twitter/searchbird/config/SearchbirdServiceConfig.scala
./src/main/scala/com/twitter/searchbird/Main.scala
./src/main/scala/com/twitter/searchbird/SearchbirdConsoleClient.scala
./src/main/scala/com/twitter/searchbird/SearchbirdServiceImpl.scala
./src/main/thrift/searchbird.thrift
./src/scripts/config.sh
./src/scripts/devel.sh
./src/scripts/searchbird.sh
./src/scripts/server.sh
./src/scripts/service.sh
./src/test/scala/com/twitter/searchbird/AbstractSpec.scala
./src/test/scala/com/twitter/searchbird/SearchbirdServiceSpec.scala
./TUTORIAL.md

There's a mistake in the documentation near Service[AuthHttpReq, HttpRep]

It says:

This example shows how you might provide authentication (via an
authentication service) in order to convert a Service[AuthHttpReq,
HttpRep] into Service[HttpReq, HttpRep].

I think it should be:

This example shows how you might provide authentication (via an
authentication service) in order to convert a Service[HttpReq,
HttpRep] into Service[AuthHttpReq, HttpRep].

Can I submit a pull request to fix it?

Last example in 'Curried functions' doesn't compile

I'm following the basic lesson and the last example in the section 'Curried functions' doesn't compile. When I try this

multiplyThenFilter { m: Int =>
  m * 2
} { n: Int =>
  n < 5
}

The output is

<console>:8: error: not found: value multiplyThenFilter
          multiplyThenFilter { m: Int =>

view bounds examples don't work:

Regular

Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_21).
Type in expressions to have them evaluated.
Type :help for more information.

scala> implicit def strToInt(x:String) = x.toInt
warning: there were 1 feature warning(s); re-run with -feature for details
strToInt: (x: String)Int

scala> class C[A](v:A){def a(implicit ev:A=>Int)=123+ev(v)}
defined class C

scala> class D[A](v:A){def a[A<%Int]=123+v}
<console>:8: error: overloaded method value + with alternatives:
  (x: Double)Double <and>
  (x: Float)Float <and>
  (x: Long)Long <and>
  (x: Int)Int <and>
  (x: Char)Int <and>
  (x: Short)Int <and>
  (x: Byte)Int <and>
  (x: String)String
 cannot be applied to (A)
       class D[A](v:A){def a[A<%Int]=123+v}
                                        ^

scala> class E[A](v:A){def a(implicit ev:A<%<Int)=123+v}
<console>:8: error: not found: type <%<
       class E[A](v:A){def a(implicit ev:A<%<Int)=123+v}
                                          ^
<console>:8: error: overloaded method value + with alternatives:
  (x: Double)Double <and>
  (x: Float)Float <and>
  (x: Long)Long <and>
  (x: Int)Int <and>
  (x: Char)Int <and>
  (x: Short)Int <and>
  (x: Byte)Int <and>
  (x: String)String
 cannot be applied to (A)
       class E[A](v:A){def a(implicit ev:A<%<Int)=123+v}

Example of function composition doesn's work

using scala 2.9.1

scala> val ahemThenUmm = addAhem().andThen(addUmm ())
:9: error: missing parameter type for expanded function ((x$1) => addAhem(x$1).andThen(((x$2) => addUmm(x$2))))
val ahemThenUmm = addAhem().andThen(addUmm ())
^
:9: error: type mismatch;
found : Char
required: String
val ahemThenUmm = addAhem().andThen(addUmm ())

trait vs abstract class

In a live intro-to-scala class, students wanted a rule of thumb: when defining an interface-ish thing, when do you use a trait vs an abstract class?

scala-bootstrapper no longer generates a Client()

Also filed at https://github.com/twitter/scala-bootstrapper/issues/20 - not sure if it's a scala-bootstrapper issue or a scala_school issue.

For the instructions here:

http://twitter.github.com/scala_school/searchbird.html

"We’ve also written a simple client library that you can run from the sbt console" indicates running:

scala> import com.twitter.searchbird.Client
import com.twitter.searchbird.Client

However, this doesn't appear to be present with the latest build of scala-bootstrapper; there's no Client() available. There's a SearchbirdConsoleClient() only, which requires configuration through args.

关于偏函数概念的一些疑惑

对给定的输入参数类型,偏函数只能接受该类型的某些特定的值。一个定义为(Int) => String 的偏函数可能不能接受所有Int值为输入。

对于不能接受所有Int值的输入这句话不是太理解,网上搜了很多关于偏函数的资料没有找到能够印证这句话的代码。能举一个例子吗?非常感谢!

Site cannot be served

I downloaded the repo and ran "make" and then "make serve"

I can connect to the webserver on port 4000 and see the main page but none of the linked pages can be accessed. I just see, for example "`/basics.html' not found." when going to "http://localhost:4000/basics.html"

Mistake in Testing with specs?

The Mocks section in Testing with specs contain the code

import org.specs.Specification
import org.specs.mock.Mockito

class Foo[T] {
  def get(i: Int): T
}

which will result in

<console>:16: error: class Foo needs to be abstract, since method get is not defined
       class Foo[T] {
             ^

improve the UI

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
it should have a dark mode and light mode toggle

Describe alternatives you've considered
use other libraries like antd

Additional context
Add any other context or screenshots about the feature request here.

GitHub Pages deprecated subdomains of `github.com`

Describe the bug

The https://twitter.github.io/scala_school/ page contains some links to deprecated subdomains of GH Pages in github.com. This causes a 404 error when an user try to click in one of these links.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://twitter.github.io/scala_school/
  2. Click on "Effective Scala" in "Also" section
  3. See error

Expected behavior

We expect that the link described above has as target the page: https://twitter.github.io/effectivescala/

Screenshots
If applicable, add screenshots to help explain your problem.

Environment

Any browser

Additional context

https://github.blog/changelog/2021-01-29-github-pages-will-stop-redirecting-pages-sites-from-github-com-after-april-15-2021/

method vs function

They're not quite the same. But the difference can trip you up.

The difference is subtle; I don't think a tutorial's a great place to explain it. I watched a bunch of n00bs try to learn this in a live class and get confused. I'm a n00b myself, and when I tried to apply the method-vs-fn things I learned in that class I discovered that, uhm, I hadn't understood the explanation so well myself.

So maybe say: there's a difference, but most of the time you don't care. Here are some situations where it matters; if you're confused and you're in one of these situations and you're using a [function|method] try using "the other one".

And we can link to a longer explanation for folks who really want it.

Possible sample code to show differences

class C {
var acc = 0
def inc = { acc += 1 }
val finc = { () => acc += 1 }
def invoke(f: () => Unit) { f() }
}

c invoke c.inc // fail
c invoke c.finc // triumph

c inc // calls c.inc()
c finc // the function c.finc

Function0 trait have been left out

The tutorial states that "There is Function1 through 22." whereas it is in fact the case that "There is Function0 through 22.".

The text is at line 102 in scala_school/web/basics2.textile

German translation

I would be interested in working through Scala School by translating it into German (native speaker). Would there be any interest in this field?

Portuguese translation

Hi, I'll start to translate to portuguese-br.
If anyone would like to help, drop a comment bellow.

`make` fails with "undefined method `highlighter_prefix' for Jekyll::Converters::Textile:Class"

I'm trying to publish the site since it looks to me like there's a small rendering error in the "Futures" section here: https://twitter.github.io/scala_school/finagle.html. I'm following the README. Here are the commands I've run and their output.

$ gem install jekyll
Fetching: blankslate-2.1.2.4.gem (100%)
Successfully installed blankslate-2.1.2.4
Fetching: parslet-1.5.0.gem (100%)
Successfully installed parslet-1.5.0
Fetching: toml-0.1.0.gem (100%)
Successfully installed toml-0.1.0
Fetching: redcarpet-2.3.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed redcarpet-2.3.0
Fetching: colorator-0.1.gem (100%)
Successfully installed colorator-0.1
Fetching: safe_yaml-0.9.7.gem (100%)
Successfully installed safe_yaml-0.9.7
Fetching: highline-1.6.21.gem (100%)
Successfully installed highline-1.6.21
Fetching: commander-4.1.5.gem (100%)
Successfully installed commander-4.1.5
Fetching: posix-spawn-0.3.8.gem (100%)
Building native extensions.  This could take a while...
Successfully installed posix-spawn-0.3.8
Fetching: yajl-ruby-1.1.0.1.gem (100%)
Building native extensions.  This could take a while...
Successfully installed yajl-ruby-1.1.0.1
Fetching: pygments.rb-0.5.4.gem (100%)
Successfully installed pygments.rb-0.5.4
Fetching: maruku-0.7.1.gem (100%)
Successfully installed maruku-0.7.1
Fetching: rb-kqueue-0.2.3.gem (100%)
Successfully installed rb-kqueue-0.2.3
Fetching: listen-1.3.1.gem (100%)
Successfully installed listen-1.3.1
Fetching: fast-stemmer-1.0.2.gem (100%)
Building native extensions.  This could take a while...
Successfully installed fast-stemmer-1.0.2
Fetching: classifier-1.3.3.gem (100%)
Successfully installed classifier-1.3.3
Fetching: liquid-2.5.4.gem (100%)
Successfully installed liquid-2.5.4
Fetching: jekyll-1.4.2.gem (100%)
Successfully installed jekyll-1.4.2
Parsing documentation for blankslate-2.1.2.4
Installing ri documentation for blankslate-2.1.2.4
Parsing documentation for parslet-1.5.0
Installing ri documentation for parslet-1.5.0
Parsing documentation for toml-0.1.0
Installing ri documentation for toml-0.1.0
Parsing documentation for redcarpet-2.3.0
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Users/slance/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-16/2.0.0/redcarpet-2.3.0/redcarpet.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/redcarpet.bundle, skipping
Installing ri documentation for redcarpet-2.3.0
Parsing documentation for colorator-0.1
Installing ri documentation for colorator-0.1
Parsing documentation for safe_yaml-0.9.7
Installing ri documentation for safe_yaml-0.9.7
Parsing documentation for highline-1.6.21
Installing ri documentation for highline-1.6.21
Parsing documentation for commander-4.1.5
Installing ri documentation for commander-4.1.5
Parsing documentation for posix-spawn-0.3.8
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Users/slance/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-16/2.0.0/posix-spawn-0.3.8/posix_spawn_ext.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/posix_spawn_ext.bundle, skipping
Installing ri documentation for posix-spawn-0.3.8
Parsing documentation for yajl-ruby-1.1.0.1
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Users/slance/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-16/2.0.0/yajl-ruby-1.1.0.1/yajl/yajl.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/yajl/yajl.bundle, skipping
Installing ri documentation for yajl-ruby-1.1.0.1
Parsing documentation for pygments.rb-0.5.4
Installing ri documentation for pygments.rb-0.5.4
gems:
- jekyll-textile-converter
permalink: none
lessons:
  -
    title: Basics
    title_ko: 기초
    title_ru: Основы
    title_zh_cn: 基础
    url: basics.html
    desc: Values, functions, classes, methods, inheritance, try-catch-finally. Expression-oriented programming
    desc_ko: 값, 함수, 클래스, 메소드, 상속, try-catch-finally. 식 중심의 프로그래밍
    desc_ru: Переменные, функции, классы, методы, наследование, try-catch-finally. Программирование ориентированное на выражения
    desc_zh_cn: 值,函数,类,方法,继承,try-catch-finally。面向表达式编程
  -
    title: Basics continued
    title_ko: 기초(계속)
    title_ru: Основы языка. Продолжение
    title_zh_cn: 基础知识(续)
    url: basics2.html
    desc: Case classes, objects, packages, apply, update, Functions are Objects (uniform access principle), pattern matching.
    desc_ko: 케이스 클래스, 객체, 패키지, apply, update, 함수는 객체이다(동일한 억세스 원칙), 패턴 매치
    desc_ru: Case классы, объекты, пакеты, apply, update, Функции как Объекты (единый принцип доступа), сопоставление с образцом.
    desc_zh_cn: 样本类,对象,包,应用,更新,函数即对象(统一访问原则),模式匹配。
  -
    title: Collections
    title_ko: 컬렉션
    title_ru: Коллекции
    title_zh_cn: 集合
    url: collections.html
    desc: Lists, Maps, functional combinators (map, foreach, filter, zip, folds)
    desc_ko: 리스트, 맵, 함수 콤비네이터(map, foreach, filter, zip, fold들)
    desc_ru: Списки, Карты, функциональные комбинаторы (map, foreach, filter, zip, folds)
    desc_zh_cn: 列表,映射,功能组合(map, foreach, filter, zip, folds)
  -
    title: Pattern matching & functional composition
    title_ko: 패턴 매치와 함수 합성
    title_ru: Сопоставление с образцом и функкциональная композиция
    title_zh_cn: 模式匹配与函数组合
    url: pattern-matching-and-functional-composition.html
    desc: More functions! PartialFunctions, more Pattern Matching
    desc_ko: 함수에 대한 추가 설명, 부분함수, 패턴 매치에 대한 설명
    desc_ru: Еще больше функций! Частичные функции, еще больше сопоставления с образцом
    desc_zh_cn: 更多函数!偏函数,更多模式匹配
  -
    title: Type & polymorphism basics
    title_ko: 타입과 다형성의 기초
    title_ru: Основы типов и полиморфизма
    title_zh_cn: 类型和多态基础
    url: type-basics.html
    desc: Basic Types and type polymorphism, type inference, variance, bounds, quantification
    desc_ko: 기본 타입, 타입 다형성, 타입 추론, 공변성, 바운드, 한정하기
    desc_ru: Основные типы и полиморфизм типов, вывод типов, изменчивость, пределы, квантификация
    desc_zh_cn: 基本类型和类型多态性,类型推断,变性,边界,量化
  -
    title: Advanced types
    title_ko: 타입(고급 주제)
    title_ru: Дополнительные типы
    title_zh_cn: 高级类型
    url: advanced-types.html
    desc: Advanced Types, view bounds, higher-kinded types, recursive types, structural types
    desc_ko: 타입에 대한 추가 설명, 뷰 바운드, 상류 타입, 재귀적 타입, 구조적 타입
    desc_ru: Дополнительные типы, видимое ограничение, типы высшего порядка, рекурсивные типы, структурные типы
    desc_zh_cn: 高级类型,视界,更高级多态性类型,递归类型,结构类型
Parsing documentation for maruku-0.7.1
Installing ri documentation for maruku-0.7.1
Parsing documentation for rb-kqueue-0.2.3
Installing ri documentation for rb-kqueue-0.2.3
Parsing documentation for listen-1.3.1
Installing ri documentation for listen-1.3.1
Parsing documentation for fast-stemmer-1.0.2
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Users/slance/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-16/2.0.0/fast-stemmer-1.0.2/stemmer.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/stemmer.bundle, skipping
Installing ri documentation for fast-stemmer-1.0.2
Parsing documentation for classifier-1.3.3
Installing ri documentation for classifier-1.3.3
Parsing documentation for liquid-2.5.4
Installing ri documentation for liquid-2.5.4
Parsing documentation for jekyll-1.4.2
Installing ri documentation for jekyll-1.4.2
18 gems installed
$ gem install RedCloth
Fetching: RedCloth-4.2.9.gem (100%)
Building native extensions.  This could take a while...
Successfully installed RedCloth-4.2.9
Parsing documentation for RedCloth-4.2.9
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for /Users/slance/.rvm/gems/ruby-2.0.0-p648/extensions/x86_64-darwin-16/2.0.0/RedCloth-4.2.9/redcloth_scan.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth_attributes.o, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth_inline.o, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth_scan.bundle, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for ext/redcloth_scan/redcloth_scan.o, skipping
unable to convert "\xCF" from ASCII-8BIT to UTF-8 for lib/redcloth_scan.bundle, skipping
Installing ri documentation for RedCloth-4.2.9
1 gem installed
$ gem install jekyll-textile-converter
Fetching: jekyll-textile-converter-0.1.0.gem (100%)
Successfully installed jekyll-textile-converter-0.1.0
Parsing documentation for jekyll-textile-converter-0.1.0
Installing ri documentation for jekyll-textile-converter-0.1.0
1 gem installed
$ make serve
jekyll serve --watch -s web -d web.out
Configuration file: web/_config.yml
error: undefined method `highlighter_prefix' for Jekyll::Converters::Textile:Class. Use --trace to view backtrace
make: *** [serve] Error 1

I searched for a few minutes and nothing useful turned up. Any ideas? If this is just a weird ruby config problem specific to my machine, someone else can publish the site and this ticket can be closed.

'<%<' does not work for Scala 2.10

I've tried the following statement but an error occurred in REPL for 2.10. The statement is from 'Advance Types' - 'Other type bounds'.

class Container[A](value: A) { def addIt(implicit evidence: A <%< Int) = 123 + value }

The operator '<%<' does not seem to work, at least for Scala 2.10.

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.