This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
import sbt._ | |
import Keys._ | |
object Blah extends Build { | |
val mySettings = Project.defaultSettings ++ Seq[Setting[_]]( | |
crossScalaVersions := Seq("2.9.2", "2.10.4") | |
) | |
val moreSettings: Seq[Setting[_]] = (mySettings filter { setting: Setting[_] => | |
setting != (crossScalaVersions := Seq("2.9.2", "2.10.4")) |
trait Iface { | |
def abyssTweet(tweet: Tweet): Future[Unit] | |
} | |
val instance: Iface | |
val abyssSvc: Service[Tweet, Unit] = Service.mk { tweet: Tweet => instance.abyssTweet(tweet) } | |
val timeoutFilter: TimeoutFilter[Tweet, Unit] | |
val retryingFilter: RetryingFilter[Tweet, Unit] | |
val filteredSvc: Service[Tweet, Unit] = retryingFilter andThen timeoutFilter andThen abyssSvc |
class Mult[A, B](val l: A, val r: B) { | |
def commute: Mult[B, A] = new Mult[B, A](r, l) | |
def associate[C, D](implicit ev: B <:< Mult[C, D]): Mult[Mult[A, C], D] = | |
new Mult[Mult[A, C], D](new Mult(l, r.l), r.r) | |
def left[C](fn: A => C): Mult[C, B] = new Mult(fn(l), r) | |
def right[C](fn: B => C): Mult[A, C] = new Mult(l, fn(r)) | |
} | |
class Div[A, B](val l: A, val r: B) { |
import scala.language.implicitConversions | |
class Mult[A, B] { | |
def commute: Mult[B, A] = new Mult[B, A] | |
def associate[C, D](implicit ev: B =:= Mult[C, D]): Mult[Mult[A, C], D] = new Mult[Mult[A, C], D] | |
} | |
object Simplify { | |
implicit def commute[A, B, M <% Mult[A, B]](m: M): Mult[B, A] = m.commute | |
implicit def associate[A, B, C, M <% Mult[A, Mult[B, C]]](m: M): Mult[Mult[A, B], C] = m.associate |
ruby-1.9.2-p290 - install | |
Remote file does not exist http://jruby.org.s3.amazonaws.com/downloads/ruby-1.9.2-p290.tar.bz2 | |
Remote file does not exist https://rvm.io/binaries/osx/10.8/x86_64/ruby-1.9.2-p290.tar.bz2 | |
rvm_remote_server_url2 not found | |
No remote file name found | |
No binary rubies available for: downloads/ruby-1.9.2-p290. | |
Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. | |
Libyaml already installed | |
__rvm_update_configure_env(1):CFLAGS=-I/Users/moses/.rvm/usr/include: | |
__rvm_update_configure_env(1):LDFLAGS=-L/Users/moses/.rvm/usr/lib: |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer