This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed trait HardCore extends Core[Nothing] | |
object HardCore { | |
case class Super(i: Int) extends HardCore | |
case class Slot(i: Int) extends HardCore | |
case class LitInt(i: Int) extends HardCore | |
case class LitInt64(l: Long) extends HardCore | |
case class LitByte(b: Byte) extends HardCore | |
case class LitShort(s: Short) extends HardCore | |
case class LitString(s: String) extends HardCore | |
case class LitChar(c: Char) extends HardCore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Smokescreen" by Desperate Bicycles | |
please send corrections to seth@tisue.net | |
bringing good news on a fast train | |
bringing fast news on a goods train | |
they're running (?) sometime after midnight (somebody?) | |
all covered in dirt | |
and I had nothing but a good deal | |
and I had a good deal full of nothing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Welcome to Scala version 2.10.2 | |
scala> val x: Any = "foo" | |
x: Any = foo | |
scala> val y: String = x.asInstanceOf | |
java.lang.ClassCastException: java.lang.String cannot be cast to scala.runtime.Nothing$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This holly | |
Faces blank in focus | |
Center of attention | |
Displacement of the dance | |
Fog in the square | |
Did anybody notice | |
The houses on the outside | |
Bruised (?) from abutment | |
There are houses on the inside | |
Sink in a cushion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the people have spoken | |
45-minute talks: | |
- Heather Miller, “Academese to English: Scala's Type System, Dependent Types and What It Means To You” | |
- Daniel Spiewak, “May Your Data Ever Be Coherent” | |
- Eugene Burmako & Lars Hupel, “Macros vs. Types” | |
30-minute talks: | |
- Eugene Yokota, “Learning Scalaz” | |
- P. Oscar Boykin, “Summingbird: a streaming map-reduce API for Storm, Hadoop and more” |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// `lazy val` inside `implicit class` | |
implicit class RichStream[T](s: Stream[T]) { | |
lazy val circular: Stream[T] = | |
s #::: circular | |
} | |
// in order to make this work with `extends AnyVal`, you have to make the | |
// lazy val local, as follows: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Journal of Artificial Societies and Social Simulation | |
Volume 17, Number 1, January 2014 | |
Agent-Based Simulation of Pedestrian Behaviour in Closed Spaces: A Museum Case Study | |
http://jasss.soc.surrey.ac.uk/17/1/16.html | |
"Both the code and the interface of our model have been originally developed by us within the NetLogo software environment" | |
Agent-Based Simulation of the Search Behavior in China's Resale Housing Market: Evidence from Beijing | |
http://jasss.soc.surrey.ac.uk/17/1/18.html | |
"NetLogo requires less computational power and offers multiple visible extensions (Wilensky 1999), so we develop our housing market simulation model based on NetLogo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to-report add [a b] | |
reset-timer | |
wait a | |
wait b | |
report timer | |
end | |
observer> show add 2 2 | |
observer: 4 | |
observer> show add 2 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pseudo-Scala with nonexistent "yield" in while | |
val generator = | |
while(true) { | |
val in = readLine() | |
if (in == null) | |
break | |
yield in | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% cd /usr/local/nescala | |
% echo full details at nescala.org (mobile-friendly) | |
zsh: number expected | |
% scala | |
Welcome to Scala | |
scala> :power | |
** Power User mode enabled | |
scala> ^Z | |
zsh: suspended scala |