Skip to content

Instantly share code, notes, and snippets.

View phaller's full-sized avatar

Philipp Haller phaller

View GitHub Profile
// Cells that depend on their handler context.
object HandlerCtx {
def apply(): HandlerCtx = {
new HandlerCtx
}
}
import lacasa.{LaCasaApp, Box, CanAccess}
import Box._ // imports `mkBox`
import scala.spores._
class Test {
var arr: Array[Int] = _
}
import lacasa.{Box, CanAccess, Actor, ActorRef, LaCasaApp, LaCasa, doNothing}
import Box._ // import `mkBox`
class Words {
var list: List[String] = List()
}
class ActorA extends Actor[Words] {
override def receive(box: Box[Words])
(implicit acc: CanAccess { type C = box.C }) {
@phaller
phaller / gist:9ba933efe826a78809b8
Last active August 29, 2015 14:24
Pickling java.nio.ByteBuffer #345
import java.nio.ByteBuffer
import scala.pickling.pickler.PrimitiveArrayPicklers
trait JavaByteBufferPicklers extends PrimitiveArrayPicklers {
import scala.pickling.{Pickler, Unpickler, FastTypeTag,
PBuilder, PReader, PicklingException}
implicit val javaByteBufferPickler: Pickler[ByteBuffer] with Unpickler[ByteBuffer] =
new Pickler[ByteBuffer] with Unpickler[ByteBuffer] {
# Day 1
Scala Introduction and First Steps:
https://www.dropbox.com/s/hggo70f3th1o16o/scala-akka-workshop.zip
Scala Workshop Slides:
https://www.dropbox.com/s/ylmqm9p35ux56dd/scala-workshop-slides.zip
scala-train.zip:
https://www.dropbox.com/s/um3005xqm2dzqbg/scala-train.zip
@phaller
phaller / gist:7010157
Last active December 25, 2015 16:59
Akka and Scala Links
Links
=====
"Principles of Reactive Programming" Coursera class:
https://www.coursera.org/course/reactive
Akka Dispatchers Scalability: Fork-Join Pool vs. ThreadPoolExecutor:
http://letitcrash.com/post/17607272336/scalability-of-fork-join-pool
Scala Async:
@phaller
phaller / gist:6549614
Last active December 22, 2015 23:49
Akka Links
Thanks again for participating in our Akka course. It was a lot of fun, and I hope it was helpful to you!
Feedback:
I would appreciate it if you would fill out our very short online survey:
https://www.surveymonkey.com/s/20130912-suwas-ti_m-phaller
As a "thank you" for filling out the survey, you will receive a free copy of Derek Wyatt's book "Akka Concurrency"!
Akka Team Blog:
package com.typesafe.training.hakkyhour
import akka.actor.{ Actor, ActorRef, ActorSystem, Props }
import akka.pattern.{ ask, pipe }
import akka.util.Timeout
import scala.concurrent.{ Future, Await }
import scala.concurrent.duration._
case class DoTask(num: Int)
Akka Cluster Specification:
http://doc.akka.io/docs/akka/snapshot/cluster/cluster.html
Talk on Correctly and Efficiently Combining Concurrency Abstractions (Video coming soon!):
http://skillsmatter.com/podcast/scala/correctly-and-efficiently-combining-concurrency-abstractions
How to combine actors, futures, threads, blocking APIs, shared-memory data structures etc. safely and efficiently.
@phaller
phaller / gist:3908692
Created October 17, 2012 22:17
Scala and Akka Training Oct 16-19
Futures and Promises in Scala 2.10:
https://speakerdeck.com/u/heathermiller/p/futures-and-promises-in-scala-2-dot-10
Akka Cluster Specification:
http://doc.akka.io/docs/akka/snapshot/cluster/cluster.html
NEW! Typesafe Console Announcement:
http://blog.typesafe.com/typesafe-console-becomes-part-of-the-stack-87576