- 2014/07/13 Scalaz勉強会
- @gakuzzzz
- 中村 学
- 株式会社Tech to Value
- play2-auth が scala-awesomeに載りました
This file contains hidden or 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
package sample | |
import akka.actor._ | |
object Main{ | |
def main (args: Array[String]) { | |
val system = ActorSystem("aaa") | |
system.eventStream.subscribe(system.actorOf(Props[DeadLetterLogger]), classOf[DeadLetter]) | |
val a = system.actorOf(Props[Parent], "parent") | |
Thread.sleep(3000) |
This file contains hidden or 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
import javafx.application.Application | |
import javafx.event.EventHandler | |
import javafx.scene.input.MouseEvent | |
import javafx.stage.Stage | |
import javafx.scene.{Scene, Group} | |
import javafx.scene.control.Button | |
import scalaz.concurrent.Future | |
class GUI extends Application { |
This file contains hidden or 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
package com.example | |
case class Foo[F[_], A](step: F[Foo.Step[A]]) | |
object Foo { | |
class Step[A] | |
object Done { | |
def unapply[A](a: Step[A]): Boolean = true | |
} | |
} |
This file contains hidden or 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
package p | |
/** Super basic map/flatMap fusion ADT. | |
*/ | |
sealed trait View[A] { | |
def map[B](f: A => B): View[B] = CView(this, Mapped(f)) | |
def flatMap[B](f: A => View[B]): View[B] = CView(this, FlatMap(f)) | |
def foreach(f: A => Unit): Unit = this match { | |
case IdView(xs) => xs foreach f |
- 自分がインストールしたとき (2022年9月) の参考用のメモです。
(情報が古くなっている可能性があります)
- MSYS2 のページ
https://msys2.github.io/
から、MSYS2 のインストーラ ( msys2-x86_64-20220904.exe ) を取得して実行します。
(注意:32bit 版のインストーラは、提供されなくなりました。
This file contains hidden or 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() { | |
init { | |
val s: String = getStr() | |
println("${s.length}") // java.lang.NullPointerException | |
} | |
fun getStr(): String { | |
return str | |
} | |
This file contains hidden or 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 TC[A](val x: String) | |
object TC { | |
def getX[A: TC](a: A): String = implicitly[TC[A]].x | |
implicit def anyTC[A]: TC[A] = new TC[A]("*") | |
implicit val stringTC: TC[String] = new TC[String]("String") | |
} | |
object Example { |
この記事は Scala Advent Calendar 2016(Adventar) 10日目の記事です。
今は 12/10 の 625時です。年明けなんて無かった。いいね?
さてさて、sbt の依存jarのダウンロードが遅い、というのは割とよく言われる事であります。
で、この原因の一旦に、sbtが Apache Ivy を使っている、という点があります。