Home > hano

hano

Hano is a project mainly written in Scala, it's free.

Reactive Sequence Combinators in Scala

hano 0.1.0

hano is a reactive sequence combinator library:

val mouse = hano.Swing.Mouse(jl)
mouse.Pressed.onEach { p =>
    println("pressed at: " + (p.getX, p.getY))
    mouse.Dragged.stepFor {
        100
    } takeUntil {
        mouse.Released
    } onEach { d =>
        println("dragging at: " + (d.getX, d.getY))
    } onExit { _ =>
        println("released")
    } start
} start

If you are familliar with Reactive Extensions, see Hano vs Rx Method Table.

Rationale

  • Minimal locks
  • Everything is sequence.
  • Continuations plugin is elective.

Reactive Sequence

hano.Seq is essentially built upon the famous method foreach:

package hano

trait Seq[+A] {
    def foreach(f: A => Unit): Unit

    // map, filter etc
}

Unlike scala.collection.Traversable, this foreach is allowed to be asynchronous.

Setup Dependencies for sbt

Append this in your project definition:

val hano = "com.github.okomok" % "hano_2.9.0" % "0.1.0"
val okomokReleases = "okomok releases" at "http://okomok.github.com/maven-repo/releases"

Links

  • ARM in Java
  • Reactive Extensions
  • scala-arm
  • scala.react
  • Browse Source
  • Browse Test Source
  • The Scala Programming Language

Shunsuke Sogame <[email protected]>

Previous:sysadmin