I hereby claim:
- I am kpfell on github.
- I am kf (https://keybase.io/kf) on keybase.
- I have a public key whose fingerprint is A1E2 130C 2CE8 255F A4DC AE97 1824 8A69 242F 9DA6
To claim this, I am signing this object:
[info] Compiling 1 Scala source to /Users/katherinefellows/src/dynamite/dynamite-controller/target/scala-2.10/classes... | |
[error] /Users/katherinefellows/src/dynamite/dynamite-controller/src/main/scala/controller.scala:76: type mismatch; | |
[error] found : Unit | |
[error] required: String | |
[error] println(hashRing.getValue(tokens(1)).toString) | |
[error] ^ | |
[error] one error found | |
[error] (compile:compile) Compilation failed | |
[error] Total time: 6 s, completed Aug 9, 2013 5:01:48 PM |
Last login: Sat Aug 10 14:57:23 on ttys000 | |
Katherines-MacBook-Air:~ katherinefellows$ scala | |
Welcome to Scala version 2.10.2 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_25). | |
Type in expressions to have them evaluated. | |
Type :help for more information. | |
scala> Option(3) | |
res0: Option[Int] = Some(3) | |
scala> val nothing = None |
Katherines-MacBook-Air:dynamite-controller katherinefellows$ sbt compile | |
[info] Set current project to dynamite-controller (in build file:/Users/katherinefellows/src/dynamite/dynamite-controller/) | |
[info] Compiling 1 Scala source to /Users/katherinefellows/src/dynamite/dynamite-controller/target/scala-2.10/classes... | |
[error] /Users/katherinefellows/src/dynamite/dynamite-controller/src/main/scala/controller.scala:63: type mismatch; | |
[error] found : String("addServer") | |
[error] required: Char | |
[error] case "addServer" :: port :: Nil => hashRing.addServerToRing(port).toString | |
[error] ^ | |
[error] /Users/katherinefellows/src/dynamite/dynamite-controller/src/main/scala/controller.scala:63: type mismatch; | |
[error] found : Char |
[info] Compiling 1 Scala source to /Users/katherinefellows/src/dynamite/dynamite-controller/target/scala-2.10/classes... | |
[error] /Users/katherinefellows/src/dynamite/dynamite-controller/src/main/scala/controller.scala:104: type mismatch; | |
[error] found : Server | |
[error] required: controller.Server | |
[error] val response = serverSwitchboard(server, splitRequest(request)) | |
[error] ^ | |
[error] one error found | |
[error] (compile:compile) Compilation failed | |
[error] Total time: 7 s, completed Aug 13, 2013 3:37:17 PM |
import akka.actor.ActorDSL._ | |
import akka.actor.ActorSystem | |
import collection.mutable | |
import java.net.{ ServerSocket, Socket } | |
import java.io.{ BufferedReader, InputStreamReader, PrintStream } | |
// import ExecutionContext.Implicits.global | |
import java.util.TreeMap |
/* Book is talking about replacing iterators in a functional style. | |
* Gives a few examples of aspects of functional programming. | |
*/ | |
// Says to do this in Scala | |
def sumSequence(sequence: Seq[Int]): Int = | |
if (sequence.isEmpty) 0 else sequence.reduce((acc, curr) => acc + curr) | |
// When you can just do something like this | |
def sumSequence(sequnce: Seq[Int]): Int = |
### Keybase proof | |
I hereby claim: | |
* I am kpfell on github. | |
* I am kf (https://keybase.io/kf) on keybase. | |
* I have a public key whose fingerprint is E387 3F5B 2473 9CCC B137 8E65 EC71 F6D4 2948 F178 | |
To claim this, I am signing this object: |
W-Fi Network: Embassy-MTG | |
Day 1 Wi-Fi Password: 2015pdx | |
Day 2 Wi-Fi Password: 2015cog | |
Download http://cdn.cognitect.com/training/clojure-lab.zip | |
Unzip | |
cd clojure-lab | |
java -jar target/clojure-lab-0.1.0-SNAPSHOT-standalone.jar | |
open http://127.0.0.1:55555/worksheet.html?filename=src/cljlab/start.clj |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object: