- The Scala Programming Language
- 開発元はLightbend 社 と EPFL(Odersky先生がいるスイスの大学)
- 2019/05 現在、最新バージョンは 2.12
- Dottyと呼ばれる新しいScalaコンパイラが開発されている
- Scala3
- 2019/05 現在0.15.0-RC1
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
plugins { | |
id 'org.springframework.boot' version '2.1.9.RELEASE' | |
id 'io.spring.dependency-management' version '1.0.8.RELEASE' | |
id 'java' | |
} | |
group = 'com.example' | |
version = '0.0.1-SNAPSHOT' | |
sourceCompatibility = '11' |
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
object FizzBuzz extends App { | |
val result = (1 to 100).map { | |
case x if x % 3 == 0 && x % 5 == 0 => "FizzBuzz" | |
case x if x % 3 == 0 => "Fizz" | |
case x if x % 5 == 0 => "Buzz" | |
case x => x | |
} | |
result.foreach(println) |
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
% sbt (git)-[develop] | |
ERROR: transport error 202: bind failed: Address already in use | |
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) | |
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] | |
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) | |
/usr/local/Cellar/sbt/1.1.6/libexec/bin/sbt-launch-lib.bash: 58 行: 1934 Abort trap: 6 "$@" |
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
play.api.UnexpectedException: Unexpected exception[CreationException: Unable to create injector, see the following errors: | |
1) Error injecting constructor, java.lang.NoSuchMethodError: scalikejdbc.NamedDB$.apply$default$2()Lscalikejdbc/SettingsProvider; | |
at scalikejdbc.PlayFixture.<init>(PlayFixtureModule.scala:38) | |
at scalikejdbc.PlayFixtureModule.bindings(PlayFixtureModule.scala:29): | |
Binding(class scalikejdbc.PlayFixture to self eagerly) (via modules: com.google.inject.util.Modules$OverrideModule -> play.api.inject.guice.GuiceableModuleConversions$$anon$1) | |
while locating scalikejdbc.PlayFixture | |
1 error] | |
at play.core.server.DevServerStart$$anonfun$mainDev$1$$anon$1$$anonfun$get$1$$anonfun$apply$1$$anonfun$1.apply(DevServerStart.scala:170) |
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
[info] hello-scalikejdbc:hello-scalikejdbc_2.11:0.1 [S] | |
[info] +-com.github.tototoshi:play-json4s-native_2.11:0.5.0 [S] | |
[info] | +-com.github.tototoshi:play-json4s-api_2.11:0.5.0 [S] | |
[info] | | +-org.json4s:json4s-core_2.11:3.3.0 [S] | |
[info] | | +-com.thoughtworks.paranamer:paranamer:2.8 | |
[info] | | +-org.json4s:json4s-ast_2.11:3.3.0 [S] | |
[info] | | +-org.json4s:json4s-scalap_2.11:3.3.0 [S] | |
[info] | | +-org.scala-lang.modules:scala-xml_2.11:1.0.5 [S] | |
[info] | | | |
[info] | +-com.github.tototoshi:play-json4s-core_2.11:0.5.0 [S] |
- Abe Asami “きの子”
- フリーランスエンジニア (7年目)
- http://nocono.net/
- Scala、Android(Java/Kotlin)
- Scala関西というコミュニティもやっています
- Scala・PlayFramework関西勉強会 - connpass https://connpass.com/series/515/
- Scala関西Summit 2017 - 関西のScala大規模イベント9/9(土)開催 http://summit.scala-kansai.org/
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 scala.annotation.tailrec | |
import scala.collection.immutable.TreeMap | |
val lines = List( | |
"- 2018年02月08日 木曜日 20:51", | |
"今日は仕事をしました", | |
"お昼にパスタをつくりました", | |
"- 2018年02月09日 金曜日 20:51", | |
"お出かけしました" | |
) |
- Abe Asami “きの子 ”
- フリーランスプログラマ
- http://nocono.net/
- @aa7th
- Scala、Andorid(Java/Kotlin)
NewerOlder