To set locale for Tool mode you need to add --set-locale
option and locale name just before your main operation, as in example below:
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
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 2K bytes over 1 Gbps network 20,000 ns | |
Read 1 MB sequentially from memory 250,000 ns | |
Round trip within same datacenter 500,000 ns | |
Disk seek 10,000,000 ns |
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
// Reduction: We can sum all the elements | |
// with the usual recursive schema | |
def sum(xs: List[Int]): Int = xs match { | |
case Nil => 0 | |
case y :: ys => y + sum(ys) | |
} | |
// But this can be abstracted out using 'reduceLeft' | |
// That will perform these operations LINKING to the left | |
def sum(xs: List[Int]) = (0 :: xs) reduceLeft ((x, y) = x + y) |
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
class A | |
class A2 extends A | |
class B | |
trait M[X] | |
// | |
// Upper Type Bound | |
// | |
def upperTypeBound[AA <: A](x: AA): A = x |
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
POST /rest/login HTTP/1.1 | |
Content-Type: application/x-www-form-urlencoded | |
User-Agent: Jersey/2.13 (HttpUrlConnection 1.7.0_79) | |
Host: localhost:8085 | |
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2 | |
Connection: keep-alive | |
Content-Length: 41 | |
j_username=superuser&j_password=superuserGET /rest_v2/users HTTP/1.1 | |
Accept: application/json |
##Reactive System Design Links
#Articles and Papers
- The Reactive Manifesto: http://www.reactivemanifesto.org/
- https://en.wikipedia.org/wiki/Reactive_programming
- https://en.wikipedia.org/wiki/Functional_reactive_programming
- Design Methods for Reactive Systems book slides: http://booksite.elsevier.com/9781558607552/slides/slides.pdf
- Programming without a callstack Event Driven Architectures By G Hohpe: http://www.eaipatterns.com/docs/EDA.pdf
- On Distributed Memory Systems: http://blog.paralleluniverse.co/2012/07/10/on-distributed-memory/
- Disruptor source code, papers and articles: https://lmax-exchange.github.io/disruptor/
scalac -Xshow-phases
phase name id description
---------- -- -----------
parser 1 parse source into ASTs, perform simple desugaring
namer 2 resolve names, attach symbols to named trees
packageobjects 3 load package objects
typer 4 the meat and potatoes: type the trees
patmat 5 translate match expressions
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
def f[A: B, C](a: A) | |
class B |
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
// From Spray Framework | |
implicit def fromStatusObject[T](tuple: (StatusCode, T))(implicit ev: Marshaller[T]) = ??? | |
implicit def fromStatusObject[T: Marshaller](tuple: (StatusCode, T)) = ??? |
OlderNewer