Scalaé¢è¥¿Summit 2019 ã®ç»å£è³æã§ãã å¤æ´å±¥æ´ v1.0.0 v0.1.1 - init
Sparkã®æ¦è¦ Apache Spark ã¯å¤§è¦æ¨¡ãªãã¼ã¿å¦çã®ããã®çµ±ååæã¨ã³ã¸ã³ã§ããJava, Scale, Pythonããã³Rã®é«ã¬ãã«ã®AIPãæä¾ããä¸è¬çãªå®è¡ã°ã©ãããµãã¼ãããæé©åãããã¨ã³ã¸ã³ãæä¾ãã¾ããã¾ããSQLããã³æ§é åãã¼ã¿å¦çã®ããã®Spark SQLãæ©æ¢°å¦ç¿ã®ããã®MLlibãã°ã©ãå¦çã®ããã®GraphXãé次è¨ç®ããã³ã¹ããªã¼ã å¦çã®ããã®æ§é åã¹ããªã¼ãã³ã°ãå«ãé«ã¬ãã«ã®ãã¼ã«ã®å å®ããã»ããããµãã¼ããã¾ãã ãã¦ã³ãã¼ã ããã¸ã§ã¯ãã®webãµã¤ãã® ãã¦ã³ãã¼ããã¼ã¸ ããSparkãåå¾ãã¾ãããã®ããã¥ã¡ã³ãã¯Spark ãã¼ã¸ã§ã³3.2.1ã®ãã®ã§ããSparkã¯HDFSããã³YARNã®ããã«Hadoopã®ã¯ã©ã¤ã¢ã³ãã©ã¤ãã©ãªã使ç¨ãã¾ãããã¦ã³ãã¼ãã¯å°æ°ã®ä¸è¬çãªHadoopãã¼ã¸ã§ã³ã®ããã«ãããããããã±ã¼ã¸åãã
ãã®ãã³ã¯ScalaMatsuriã®ã»ãã·ã§ã³ã«æ票ãã¦ããã ãããããã¨ããããã¾ããã ä»åã¯ãã®ScalaMatsuriã®ã»ãã·ã§ã³ã§çºè¡¨äºå®ã®å 容ã®ä¸ã¤ã§ãããã¯ã³ã´ç§èµã®ãã©ã³ã¶ã¯ã·ã§ã³ã¢ããã«ã¤ãã¦è§£èª¬ãããã¨æãã¾ãã ãã®ãã©ã³ã¶ã¯ã·ã§ã³ã¢ããã¯åºæ¬çãªæ©è½ã ããªã30è¡ã»ã©ã®çãã³ã¼ãã§è¨è¿°ã§ãã¦ãã¾ãã®ã§ããããªããªã説æãé£ãã代ç©ã§ãã¦ã ScalaMatsuriã®èªåã®çºè¡¨æéå ã«è´è¡ã®ã¿ãªããã«ç解ãã¦ããã ãã®ã¯é£ããã ããã¨ãããã¨ã§ãå ã«è§£èª¬è¨äºãæ¸ããã¨ã«ãã¾ããã ãã®ãã©ã³ã¶ã¯ã·ã§ã³ã¢ããã¯ä½è ã®ååããé称Fujitaskã¨å¼ã°ãã¦ããã®ã§ãããä½è ã®æ¹ã¯å¨ãããã天æãã¨è¨ããã¦ã¾ãã¦ãå½¼ã¯å¸¸äººãæãã¤ããªããããªã³ã¼ããæ¸ããããã§ããã Fujitaskã¯çããªããããã¢ããã¨ããµãã¿ã¤ãã³ã°(å¤ä½æå®)ã¨ãã¢ãããã¯ããªã¢ã¼ãã£ãºã ã®ä¸ã¤ã®
Scala2.8ãããPredefã«<:<ã¨ã=:=ã¨ããå®ç¾©ããã¦ãã¦ããããªãã ã?ã¨ãã¼ã£ã¨çåã ã£ã訳ã§ãããã§ãã¤ãã£ãã¼ã§è³ªåæãã¦ãããã£ã¨ç解ã§ãã¾ããã æãã¦é ãã @ScalaTohoku ããã@okomok ããã@tioa ãããæãé£ããããã¾ãã! "generalized type constraints"ã¨ããã¤ãã§ãåãã©ã¡ã¼ã¿ã«ä¸ããããåããç¹å®ã®æ¡ä»¶ãæºããå ´åã«ã®ã¿å¼ã³åºããã¡ã½ãããå®ç¾©ã§ããã¨ãããã®ã§ãããããã³ã³ãã¤ã«æã«éçã«ãã§ãã¯ããã!! ããã¯ã¹ã´ã!! What do <:<, <%<, and =:= mean in Scala 2.8, and where are they documented? - Stack Overflow =:=ã<:<ã<%<ã§ç¹å®ã®åã®ã¿å¼ã³åºããã¡ã½ãããå®ç¾©ãã å ·ä½çãªä¾ã§èª¬æãã¾ãã
çµã¿åãããã¨ã¯ã¤ã¾ãã¢ã¬ã®ãã¨ãæ¸ãã®ã§ãããä¸å¿ããã»ã©åæç¥èç¡ãã¦ãç解ã§ããããã«æ¸ãã¦ã¿ã¾ãããã¦ããªããããªãEitherã¨Futureãï¼ã¨ãã㨠play2ã¨ã使ã£ã¦ãã¨ãFutureãããåºã¦ãã Futureããããä¸ã§AwaitãããFuture使ãæå³ããªãã®ã§ãFuture[A]ãmapãflatMapãªã©ã§ã©ãã©ãé£éããã¦ãã¡ã½ããã®åã«Futureã大éã«åºç¾ï¼ Futureã¯éåæã«è¡ãããå¦çã§ãããããã§ä¾å¤çºçãããããã®ä¸ã«ä¾å¤ãå«ããããªã(åç´ã«ä¾å¤æããããã«ã¯ãããªãã¨ãããä¸å¯è½) Scalaæ¨æºã©ã¤ãã©ãªã®Futureã¯ãThrowableåã§ä¾å¤ãä¿æã§ããããã«ãªã£ã¦ã éã«ããã¨ãThrowableã§ããä¿æã§ããªã ä¾å¤ã®ç¨®é¡ãå¤ããªã£ã¦ãã¦ãããã°ã©ã ãè¤éã«ãªã£ãå ´åãThrowableã§ã¯ãªããã£ã¨éå®ãããç¬èªã®ã¨ã©ã¼
以ä¸ã®2ã¤ã®ç¶ã Scalaã§Futureã¨Eitherãçµã¿åãããã¨ãã«ç¶ºéºã«æ¸ãæ¹æ³ Futureã¨Eitherã®è©±ã®ç¶ã(Applicativeã¨Monadã®éã) ä¸è¨ã®2ã¤(ç¹ã«æåã®æ¹)ãèªãã ãã¨ãåæã§æ¸ãã®ã§ãèªãã§ãªã人ã¯å ã«ãã¡ããèªã¿ã¾ãããã ãªãã ãå°ãé¢é£ãã話(?)ã§çãä¸ãã£ã¦ãã¦ãæ¸ããªãã¨ãããªãæ°ããã¦ããã®ã§ éåæããã°ã©ãã³ã°ã®é£ããã¨Scalaã®Future ãã®togetterã®è°è«ã«ã¤ãã¦è²ã æ¸ããããã¨*1ãããã¾ãããããã¯ç½®ãã¦ããã表é¡ã®ãã¢ããã«ããåæ/éåæããã°ã©ãã³ã°ã®æ½è±¡åãã«ã¤ãã¦æ¸ãã¾ããã¨ãããã(éåæããã°ã©ãã³ã°ã®è©±ãã)便ä¹ãã¦ã¢ããã¨ã¢ãããã©ã³ã¹ãã©ã¼ãã¼ã®ä¾¿å©ãã話ãããã ãããããã¾ãã(?) åå2ã¤ã¯ãFuture使ã£ã¦éåæã«ãã¦ããã ãããé¢æ°ã®æ¬ä½åãã§ãããããã¨ãããã¨ãæ¸ãã¾ãã
ä»æ¥ Functional Programming Principles in Scala ã§èãã話ãé£ããã£ãã®ã§ã¡ã¢ã Subtype æ¸ãæ¹ã¨ã㦠A <: B ã¨æ¸ãã° A 㯠B ã® subtype ã§ãããã¨ã示ãã A >: B ã¨æ¸ãã° A 㯠B ã® supertypeãè¨ãæããã° B 㯠A ã® subtype ã§ãããã¨ã示ãã Subtype ã¨ã¯ä½ãï¼ã¨ããã®ã¯ Liskov substitution principle ã¨ããã®ã§å®ç¾©ããã¦ããã ãA <: B ã§ããã°ãBåã®å¤ã«å¯¾ãã¦åºæ¥ããã¨ãªããªãã§ãAåã®å¤ã«å¯¾ãã¦åºæ¥ããã¨ãããã¨ãããã ã¯ã©ã¹é層ã§è¨ãã°ã A <: B ã¨ããã®ã¯ A ã B ã® subclass ã¾ã㯠A == B ã£ã¦ãã¨ã Subtype ã®æ¦å¿µã¯ã¯ã©ã¹é層ã«ã¨ã©ã¾ããªãã ãããªåãå®ç¾©ããã¦ãããã class
æ°ããè¨èªãããã£ããã¨ããããã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ãããã! Scalaã§ãµã¤ãã«ã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ããã®ã¯ãã¾ãã«ç°¡å*1ãªã®ã§, åã¬ãã«ã§ãã£ã¦ã¿ã. ã¾ãããªè©±ããã¦ããã¨, C++ã®ãã³ãã¬ã¼ãããã¥ã¼ãªã³ã°å®å ¨ãªã®ã¯æåãªè©±ã ãã©, Scalaã§ã¯ã©ããªã®ãæ°ã«ãªã£ã. 以åC++ã®ãã³ãã¬ã¼ãã§ã©ã ãè¨ç®ã®ã¤ã³ã¿ããªã¿ãå®è£ ããã®ã¨åæ§ã®ãã¨ãã§ãããæèå®é¨ãã¦ã¿ãã¨, ã ãããã§ãããã«æããã®ã§ãã£ã¦ã¿ã. ã§ãããã® ä¾ import lambda._ case class Equals[A >: B <: B, B]() // åã¬ãã«ã®åå¤æ§ãã§ãã¯ç¨ type S = x ->: y ->: z ->: ( x @@ z @@ (y @@ z) ) type K = x ->: y ->: x type result = ( S @@ K
ãããã¯ãããã éå¤(Invariant) å ±å¤(Covariant) åå¤(Contravariant) ã¨å¼ã°ãã. Covariant å ±å¤ãªåãã©ã¡ã¼ã¿ããã¤åã¨ãã¦ListãOptionããã. å ±å¤ãæå®ããåãã©ã¡ã¼ã¿ã«ã¯ãµãã¿ã¤ããä»£å ¥ãããã¨ãã§ãã.
ãã®è¨äºã¯Scala Advent Calendar 2014ã®20æ¥ç®ã§ãã ãããããé¡ããã¾ãã ã¯ããã« latencyãçãããã¤å¤§è¦æ¨¡ã¢ã¯ã»ã¹ã«ãèãããããµã¼ãã¼ç°å¢ã®æ§ç¯ãå¿ è¦ã«ãªãå ´åãããã¾ãã ä¾ãã°ãåºåç³»ã®ã·ã¹ãã ã ã¨å ¥æ/å¿æãããããªãµã¼ãã¼ã§ã¯100msã¨ã50msã¨ã以å ã«ã¬ã¹ãã³ã¹ãè¿ããªããã°ããã¾ããã ãã®ãããªãµã¼ãã¼ãæ¸ãããã«ãScalaã§ã¯ããã¤ãé¸æè¢ããããã¨æãã¾ãã èªåã®ä¼ç¤¾ã§ã¯ããã®ä¸ã§Finagleã使ã£ã¦AdServerãæ¸ãã¦ãã¾ãã ãã®è¨äºã§ã¯Finagleã®ç°¡åãªç´¹ä»ã¨ãFinagleããµã¼ãã¼ãã©ã®ããã«åããã¦ããã®ãã«ã¤ãã¦æ¸ãããã¨æãã¾ãã
(12æ5æ¥ è¿½è¨) æå¾ã®ãã¾ãã®ãã¼ã¸ã«ããDottyã¯ã¾ã ã³ã³ãã¤ã©ã¨ãã¦ã®æ©è½ãä¸è¶³ãã¦ããããã³ããã¼ã¯ã®å¯¾è±¡ã¨ããã«ã¯ã¾ã ä¸é©åãªæãã§ããã調æ»ä¸è¶³ãªå 容ãå ¬éãã¦ãã¾ãç³ãåãããã¾ããã§ãã(´ã»Ïã»ï½) VOYAGE GROUPã§è¡ãªããã社å LT大ä¼ã®çºè¡¨è³æã§ãã Scala Compilerã®ãã³ããã¼ã¯ãã¨ã£ã¦ã¿ã¾ããã ä½æ¥ã«ä½¿ã£ããã¡ã¤ã«ã¯ãã¡ã => https://github.com/kiris/scalac-benchmarksRead less
2011-04-23 Akka ã®ä½è ã¨ãã¦çã 注ç®ãéãã¦ãã Jonas Bonér ã 2008å¹´ã«æ¸ãã âReal-World Scala: Dependency Injection (DI)â ã翻訳ãã¾ããã翻訳ã®å ¬éã¯æ¬äººãã許諾æ¸ã¿ã§ãã翻訳ã®ééãçãããã°é æ ®ãªããææãã ããã 2008å¹´10æ6æ¥ Jonas Bonér è 2011å¹´4æ22æ¥ eed3si9n 訳 ãã¦ãå®æ¦ã§ã® Scala ã·ãªã¼ãºç¬¬äºå¼¾ã®ä»åã¯ãScala ãç¨ãã Depenency Injection (DI) ã®å®è£ ãã¿ã¦ãããããScala ã¯ãåãã£ã¦ããè¨èªæ©æ§ã ããç¨ãã¦ãä½éããã® DI ãå®ç¾ã§ããé常ã«è±ãã§ãã£ã¼ããªè¨èªã ããå¿ è¦ã«å¿ãã¦æ¢åã® Java DI ãã¬ã¼ã ã¯ã¼ã¯ã使ããã¨ãã§ããã Triental ã§ã¯ãä¸ã¤ã®æ¦ç¥ã«è½ã¡çãã¾ã§ä¸ã¤ã®ç°ãªãæ¹æ³ã試ãã
以åãæãScalaãã®ã¨ãã«ç´¹ä»ããããã«ããã§ã«ä»ã®äººãä½ã£ãã¯ã©ã¹å³ãåå¨ããã http://leifwarner.net/scalaz.svg ã¾ããèªåã§çæãããã¯ã©ã¹å³ã®ãµã¤ãããªãæã«ä½ã£ããã¨ãããã¾ãã http://class-diagrams.herokuapp.com/scalaz.MonadPlus.svg https://github.com/xuwei-k/heroku-class-diagrams ã¾ãå¥ã®ãã®ä½ãã¾ããã ç¶æ¿é¢ä¿ãç·ã§çµãã§è¡¨ãã®ããããã©ãããããããã³å³(Venn diagram)ãã¨ããã è«çåã¨ãè«çç©ã表ãã¨ãã«ãã使ããããããªãåãéãªã£ã¦ãã¦éåã®é¢ä¿ããããããããã¤ä½¿ã£ããã©ãããªï¼ã¨æã£ã¦ãsvg-editã¨ãããªã³ã©ã¤ã³ã®SVGã¨ãã£ã¿ä½¿ã£ã¦ãå°å³ã«ä½ã£ã¦ããçµæ§æéããã£ã(ãªãã¦æ人ãªã®ã§ããããã»ã»ã»)
Play frameworkã®èæ¯ã¨æ´å² Ruby on Railsã人æ°ã¨ãªãããã以å¤ã«ãããããã¨è»½éãã¬ã¼ã ã¯ã¼ã¯ãåºã¦ãã2009å¹´ãããJavaã®ãã«ã¹ã¿ãã¯ãã¬ã¼ã ã¯ã¼ã¯ã§ãããPlay frameworkãã®1.0ï¼ä»¥ä¸ããPlay 1.0ãï¼ããªãªã¼ã¹ããã¾ããã ãã®ãããã使ç¨ããã¦ããï¼ãã¾ã§ãååãã使ç¨ããã¦ãã¾ããï¼Javaãã¬ã¼ã ã¯ã¼ã¯ã¯ãSpringãSeasar2ãªã©ã®DIã³ã³ããã¨ãããã«ä»éããORãããã¼ï¼Spring DataãS2JDBCï¼ãMVCã®ãã¬ã¼ã ã¯ã¼ã¯ï¼Spring MVCãS2Strutsï¼ã§ããããããã®ãã¬ã¼ã ã¯ã¼ã¯ã¯ããããååãªæ©è½ã¨å®ç¸¾ããããç¾å¨ã§ãJavaã§Webã¢ããªã±ã¼ã·ã§ã³ãéçºããéã«ã¯ãã¾ã£å ã«æ¡ç¨åè£ã«æããã¨æãã¾ãã ãããããããã®ãã¬ã¼ã ã¯ã¼ã¯ã¯åºæ¬çã«Java EEã§ã®éçºç¨ãã¬ã¼ã ã¯ã¼ã¯ãªã®ã§
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}