第2å ããããKotlinåå¼·ä¼ #jkug ã§LTãã¦ãã
7/4ã«éå¬ãããã第2å ããããKotlinåå¼·ä¼ãã§ã人çåã®LTããã¦ãã¾ããã
第2回 かわいいKotlin勉強会 #jkug on Zusaar
å½æ¥ã¯ãKotlinã®Eclipseãã©ã°ã¤ã³ã«ã¤ãã¦è©±ãã¦ãã¾ããã
Kotlin Eclipse Plugin
ãããªãã¿ã§å¤§ä¸å¤«ããªâ¦â¦ã¨ããä¸å®ãçºè¡¨ãè¿ã¥ãã«é£ãã¦è¨ããã§ãã¦æåã¯ã©ãããããã¨æã£ã¦ããã©ãEmacsç¨ã®kotlin-modeãä½ã£ã¦çºè¡¨ãã¦ãæ¹ããã¦ãIntelliJ IDEA以å¤ã®ç°å¢ã§Kotlinãåããããã¨ããéè¦ã¯ä¸å®æ°ããã¿ããããã®ãã¿ã§æã£ã¦ãã£ãæå³ã¯ãã£ããããªã®ã§å°ãå®å¿ãã¾ãããã¦ã±ãåãããã
ä¼å ´ã¯ãªã¯ã«ã¼ããã¼ã±ãã£ã³ã°ãã¼ããã¼ãºããã®ã¨ããã ã£ããããæãã®é°å²æ°ã®ä¼å ´ã§ãã½ãã¡ã¼ã¨ããã£ã¦ãªã©ãã¯ã¹ã§ããã社å ã«ãããªã¹ãã¼ã¹ãããè·å ´ãç¾å®ã«åå¨ããã®ãâ¦â¦ã£ã¦æã£ã¦ãã
ããããã°ç¬¬1åã¯ã¹ã¼ãã®äººããã£ã±ãããã£ã¦è©±ãèãã¦ãã¿ããªãããªæãããªã¨æã£ã¦è¡ã£ããã»ã¼ã¿ããªç§æã§ãã¹ã¼ãã¯èªåå«ãã¦3,4人ãããããã ã£ãã¨æãã
LTç«¥è²æ¨ã¦ãããKotlinã®ã¹ããã«ã¼ããã£ãããæ親ä¼ã§Kotlinã®è©±ã¨ããSwiftã®éã®è©±ã¨ããAndroidã®è©±ã¨ããGoogleIOã®è©±ã§çãä¸ãã£ãããå å®ããåå¼·ä¼ã ã£ãã
å½æ¥ã®ä»ã«çºè¡¨ãããæ¹ã®ã¹ã©ã¤ãã¯ãã¡ãã
Kotlinã¦ã©ã¼ã¯ã¹ã«ã¼
Kotlinã§Androidã¢ããªã±ã¼ã·ã§ã³ãä½ã£ã¦ã¿ã2014åå¤
ææ¥ããã¡ãã£ã¨Kotlinã¦ãAndroidããæ¸ããããªããããããªãï¼ SAMå¤æã¨æ¡å¼µé¢æ°
å½æ¥ã®çºè¡¨ã®æ§åãYouTubeã«ä¸ãã£ã¦ã¾ãã
HabitBrowserã«ã¹ã¿ãã¤ãºãããã¯ã¦ããæã£ã
ã¯ã¦ãã¢ããªä½¿ãã¥ãã
ã¯ã¦ãããã¥ã¼ãã¦ãã3,4ã¶æãªãã ãã©ãã©ããAndroidã®ã¯ã¦ãªããã¯ãã¼ã¯ã¯å¾®å¦ã«ä½¿ãã¥ããããã¼ã¸ã®æç»é¨åã®ä½¿ãåæããã¤ãã®ãã©ã¦ã¶ã¨å¤ãã£ã¦ãã¾ãã®ãé£ç¹ãæåãµã¤ãºãå¤ããããªãã£ãããUAå¤æ´ãããã¨ãã§ããªããâ¦â¦ã
ãããªãã¨ãããã¨ã§ãè¨å®ã§ãå¤é¨ãã©ã¦ã¶ã§éãããæå¹ã«ãã¦ã¿ããã©ãããã¯ãã¼ã¯ãã¿ã³ã¯å½ç¶å¤é¨ãã©ã¦ã¶ã«ã¯ç¡ãããã§ãããã¯ããã§ä½¿ãã«ããã
ããã§ãAndroid4.xç³»ã«ãã¦ãã使ã£ã¦ãããHabitBrowserããã«ã¹ã¿ãã¤ãºããããã ãã¶ä½¿ãããããªã£ãã®ã§ãè¨å®æ¹æ³ãã¡ã¢ãã¦ããã
å®ç¾ã§ãããã¨
- ã¯ã¦ãã¢ããªã§æ°ç&人æ°ã¨ã³ããªã¼ã®ä¸è¦§ãéã
- èªã¿ããè¨äºãã¿ãããã¦ãã¤ãã®ãã©ã¦ã¶ã§è¨äºãèªã
- ãã¤ãã®ãã©ã¦ã¶ãã1ãã¿ã³ã§ç´æ¥ã¯ã¦ãã¢ããªã®ãã¯ãç»é¢ã«é£ã¶
è¨å®æ¹æ³
ãããã®
- Android4.0以ä¸ã®ç«¯æ«
- HabitBrower
- ã¯ã¦ãªããã¯ãã¼ã¯
ã¯ã¦ãªããã¯ãã¼ã¯å´ã®è¨å®
- ã¡ãã¥ã¼âè¨å®âå¤é¨ãã©ã¦ã¶ã«ãã§ãã¯
HabitBrowserã®è¨å®
è¨å®ã§ããå ´æå¤ãããã®ã§ãã¨ããããç»é¢ä¸é¨ã®ã¢ã¯ã·ã§ã³ãã¼ã«ãã¼ã¸ã®è¨å®ã ãã
- è¨å®â詳細âã¢ã¯ã·ã§ã³ãã¼ã«ãã¼
- ãï¼ããã¿ã³ãæ¼ãã¦ãã¢ã¯ã·ã§ã³è¨å®ç»é¢ãéã
- ãâ¡ ãªãããæ¼ãâã¢ããªãå®è¡ããâå ±æããâã¯ã¦ãªããã¯ãã¼ã¯ã§éã
- ã¯ã¦ãã¢ããªèµ·åãè¨å®ããã«ã¯3.ã®"å ±æãã"ã®ä»£ããã«"ã¢ããªã±ã¼ã·ã§ã³"ãé¸æ
èªåã¯å·¦ç«¯ã®ã¹ã¯ãªã¼ã³ã·ã§ããã®è¨å®ã«ãã¦ãã
ä»ã«è¨å®ã§ããå ´æ
è¨å®æ¹æ³ã¯åèªã§ä½ã¨ããã¦ãã ããã
- ã¢ãã¬ã¹ãã¼ã®ãµã¤ããã¿ã³
- ã¡ãã¥ã¼
- ã¹ãã¼ããã¤ã¤ã«
- ã¸ã§ã¹ãã£ã¼
- ã¯ã¤ãã¯ã¡ãã¥ã¼
è¨å®ããçµæ
ã¯ã¦ãªããã¯ãã¼ã¯ã®å èµãã©ã¦ã¶ã§è¡¨ç¤ºãããã®ã¨ãHabitBrowserï¼èªå好ã¿ã®è¨å®ã§è¡¨ç¤ºãããã®ãæ¯ã¹ã¦ã¿ãã
å人çã«ã¯æåãå°ããã®ã»ããèªã¿ãããããç»é¢å ã«åã¾ãæç« éãå¤ãã»ããè¨äºå ¨ä½ã®æµããææ¡ã»ç解ããããã®ã§ããã®æ¹æ³ã使ã£ã¦ãã
ããã¨ãã¯ã¦ãã¢ããªããéããè¨äºãããªãã¦ããTwitterã®TLã«æµãã¦ããURLãéãâãã¯ãã¨ããã°ã°ã£ã¦éãããã¼ã¸ããã¯ãããã¨ãããããã£ãæä½ãã¹ã ã¼ãºã«ãªã£ãã
ããã«ä»åã®è¨å®ã¯å¥ã«ã¯ã¦ãã«éãããªãã§ãå¿ç¨ã§ããã®ã§ãPocketãEvernoteã«ã¶ã¡è¾¼ãã¨ããTwitterã¸ã®Postã¨ãããã使ãæä½ãç»é²ãã¦ããã°ã1ã¹ãããã®æä½ã§æ¸ãããã«ãªãã
ã¯ãã¹Ãã¬ã¬ãªã¢ å¸è¡å§«ã®è·ããã
ã¯ãã¹Ãã¬ã¬ãªã¢ å¸è¡å§«ã®è·ããã (è§å·ã¹ãã¼ã«ã¼æ庫)
- ä½è : ä¸ç°èª ,ãã¼ãã
- åºç社/ã¡ã¼ã«ã¼: KADOKAWA / è§å·æ¸åº
- çºå£²æ¥: 2012/10/17
- ã¡ãã£ã¢: Kindleç
- ãã®ååãå«ãããã° (1件) ãè¦ã
Kindleã§èªã¿ã¾ããããªããAmazonã§Kindleè§å·æ¸åºã»ã¼ã«ãã£ã¦ã¦ãã£ã¡ãå®ããªã£ã¦ãã£ã¦è©±ãèãã¦ããªããããã¾ã§éåã§ããªããã£ãè¯ãã¦ãããããã®ããã°èªã¿ãããªã¼ã£ã¦æã£ã¦æ¢ãã¦ã¦ãä¸ç°èª ãªãè¯ãããã¨æã£ã¦è²·ã£ãã
é«æ ¡çã§ããã£ã¼ã¬ã¼ãããã¦ããæè¦é¦³éããä¸è¯è¡ã®è·¯å°è£ã§åãã¦ãã"鬼ä»"ã®ãã¿ãæ¾ã£ã¦ãå¸è¡é¬¼å´ã®é¢åäºã«å·»ãè¾¼ã¾ããã£ã¦ãã話ãå ¨ä½çã«ã¯ãã¼ã¤ãã¼ãã¬ã¼ã«Ãä¸è¯ã£ã½ãå¸è¡é¬¼çãªä½ãÃããã«ã¿ãããªæãã
ä¸ç°èª ã¯ä»¥åã«èªãã ã¤ã¹ã«ãªãªãã好ãã§ãããã¯ãªãã ãç¬ã£ã¡ãããããå¨äºèãæãã ã£ãã®ãããã£ã¡ã®ã¯ãã¹Ãã¬ã¬ãªã¢ã¯ããã¾ã§ã§ããªãã§ããä»ã®èªåã«ã¯ãããåã£ã¦ãã
馳éã®æ®æ®µããæ ¼å¥½ããã£ã¦ãããããªããã©ã¡ããã¨èªåãªãã®ä¿¡å¿µãæã£ã¦ãã¨ããã¯å®å¿ãã¦è¦ã¦ãããããèªåã®æã«ä½ããã®ã«æå°ã§ãæµããããã¤ãã«ã¯èªåã®é¸æã§ãããæã«ããã¨ããã¯ãã£ã±ãæ ¼å¥½è¯ãã£ãã§ãã
ãã¨ãã¿ãããããããä½ä¸å¹´ãçãã¦ããã®ã§é観ããæãã®ç©è¨ããªããã«ããããªãä¸ç®æãã ããå¶æã«çæ¿ãã¦é¦³éã®åã«åºã¦ããã·ã¼ã³ãªãããããããã¨ããããã£ã¦ããã©ããããã£ãã
é¢ç½ãã£ãã§ããä¸æ°ã«èªãã§ãã¾ã£ããKindleã§6å·»ã¾ã§å ¨é¨è²·ã£ãã®ã§ãç¶ããã©ãã©ãèªããã¨æãã
2013å¹´ä¸åæã©ã¤ãããã«ãã¤ãã¿ã¼æ¯ã«æ票ãã¾ãã
ãã£ãã¾ã§ãã£ããå¿ãã¦ã¦å±ãªãã£ããã¾ã éã«åãã®ã§æ票å¿ãã¦ã人ã¯ãã¾ãã@ranotwiã«æ票ä½åããªãã©ã¤ï¼
2013年下半期ライトノベルツイッター杯 概要説明 - ライトノベルツイッター杯
ä¸åææ票ããä½åã¨ãã¤ãã§ã«ä»å¹´èªãã æ¬ã¾ã¨ãã¿ãããªã®æ¸ãã¾ãã
æ¢å
楽èå°å¥³ (4) (é»ææ庫)
- ä½è : æäºå ,岸ç°ã¡ã«
- åºç社/ã¡ã¼ã«ã¼: ã¢ã¹ãã¼ã»ã¡ãã£ã¢ã¯ã¼ã¯ã¹
- çºå£²æ¥: 2013/11/09
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (4件) ãè¦ã
ãã°ãã©ã§ç ã (4) (é»ææ庫)
- ä½è : æ¯ååç ,é島ãããã
- åºç社/ã¡ã¼ã«ã¼: ã¢ã¹ãã¼ã»ã¡ãã£ã¢ã¯ã¼ã¯ã¹
- çºå£²æ¥: 2013/09/10
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (9件) ãè¦ã
ã¾ããã®è¾ºãã¯ãªãã ããã è¨ã£ã¦ãã£ã±ãæ¯åãããããã®ã§è¯ãæãã2ä½ã¨ãã«ãã®èª¿åã§é·ãç¶ãã¦ãããã¨ãããªã¼ã
æ°è¦
ããããã«ã«ããã! 1 (ãªã¼ãã¼ã©ããæ庫)
- ä½è : éæ©æ°å¤¢,DSãã¤ã«
- åºç社/ã¡ã¼ã«ã¼: ãªã¼ãã¼ã©ãã
- çºå£²æ¥: 2013/12/21
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (6件) ãè¦ã
- ä½è : æäºå
- åºç社/ã¡ã¼ã«ã¼: éè±ç¤¾
- çºå£²æ¥: 2013/07/26
- ã¡ãã£ã¢: åè¡æ¬ï¼ã½ããã«ãã¼ï¼
- ãã®ååãå«ãããã° (9件) ãè¦ã
ç°ä¸çå æã®ãã©ããã¼ã° 1 (ãªã¼ãã¼ã©ããæ庫)
- ä½è : 姫ãæ¨ãã,ã«ã°ã¦ã
- åºç社/ã¡ã¼ã«ã¼: ãªã¼ãã¼ã©ãã
- çºå£²æ¥: 2013/09/21
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (1件) ãè¦ã
ã´ã¡ã³ãã¤ã¢ã»ãµãã¼ã¿ã¤ã (ãã¡ãéæ庫)
- ä½è : ç³å·åå,å符
- åºç社/ã¡ã¼ã«ã¼: ã¨ã³ã¿ã¼ãã¬ã¤ã³
- çºå£²æ¥: 2013/07/29
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (23件) ãè¦ã
å¾å®®æ¥½åçå ´ ãã¬ã ãªã¼ã°ã»ãã¼ã¹ãã¼ã« (éè±ç¤¾ã¹ã¼ãã¼ããã·ã¥æ庫)
- ä½è : ç³å·åå,wingheart
- åºç社/ã¡ã¼ã«ã¼: éè±ç¤¾
- çºå£²æ¥: 2013/12/25
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (13件) ãè¦ã
ãç¥æ²ãããã¥ã¼ãµã¼ãã¯ã©ãããï¼ã£ã¦è©±ããããã ãã©ãä¸»äººå ¬ã®å¹´é½¢ãã¡ãã£ã¨é«ãã ãã§ã»ã¼ã©ããã ã£ããããã¨æ£ç´ãªã¨ããä»å¹´ã¯ã©ã¹ãã§ç³å·ååãå ¨é¨æã£ã¦ãã£ãæãããã
ã¨ã¯ããç¹çãã¹ãã¯å¾ æã®å§«ãæ¨ããã©ããããã¥ã¼ã§ããã£ã¦ã¨ããã§ãããã¨ã¯å¼·èª¿ãã¦ããããï¼2å·»ãã¨ã¦ãå¾ ã¡é ããã§ãã
æ¢å
- ä½è : æé¨æ²¢æµä¸,é»æç´ ç½
- åºç社/ã¡ã¼ã«ã¼: ã¢ã¹ãã¼ã»ã¡ãã£ã¢ã¯ã¼ã¯ã¹
- çºå£²æ¥: 2013/05/10
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (13件) ãè¦ã
çå¾ä¼æ¢åµããªã«4 (è¬è«ç¤¾ã©ããæ庫)
- ä½è : æäºå ,ã½ããã8
- åºç社/ã¡ã¼ã«ã¼: è¬è«ç¤¾
- çºå£²æ¥: 2013/06/07
- ã¡ãã£ã¢: æ庫
- ãã®ååãå«ãããã° (10件) ãè¦ã
ä¸åæä½åãªã®ã§ãã¡ããæ票ãã¦ããªããã ãã©ä»å¹´èªãã ãã®ã¨ãã¦ã¯ãã¨ã¯ãã®2ä½ã
ããªã«ãæè¿4åå ¨é¨ä¸æ°ã«èªãã ã4å·»ããããé¢ç½ãã£ããé¸æ宣èªã·ã¼ã³ãä¹ ã ã«æé«ã«ãã£ãããã¨æããã·ã¼ã³ãã©ããã§è¦ãæ°ããããããããè¨èã§å§åããã®ã£ã¦ãå²ã¨æäºå ã®å¾æåéã ããã
ãã¨ä¸ã¤ã®å¤§é¸ã®ç©èªã¯5æã«èªãã ãã ãã©ããããã®è¡¨ç´ãããã¦ææ ¨æ·±ããä»ã¾ã§ã®ã·ãªã¼ãºãã£ã©å ¨å¡ã§ããããæ¾é¡ããã¾ããã£ã¦æãã§ã¨ã¦ããããããã£ãã
ã¨ããããã§
ä»å¹´ã¯ãããªæãã§ããã2013å¹´ã¯17åããèªãã§ãªãã®ã§ãä»å¹´ã¯ããã¡ãã£ã¨å¢ãããããªã
2013å¹´ã¨2014å¹´
2013å¹´ã®ãã¨
1ã¯ã¼ã«ç®
- ã©ãã©ã¤ãï¼
- å ¥ç±ãå©¿å ¥ããªã®ã§ã妻ã®å°å ã®çºå½¹å ´ã¸å©å§»å±ãæåºã帰ãã«ææå¤ãã®è¨é²ç大å¯æ³¢ã«è¦èããã大éªã§æ°å¹¹ç·ã¨å¨æ¥ç·ãæ¢ã¾ãä¸12æéããã¦å¸°ãã
- 西æ°å®¿ã®Javaæ¡ä»¶ããå¤ãã¦èªç¤¾ã«æ»ããä»æãã°ãããä¸çªã¾ã¨ãã ã£ããããããªããJava7使ã£ã¦ãããèªç¤¾ã§ã¯æ°äººã®androidã¢ããªéçºã®ç ä¿®æ å½ã¿ãããªãã¨ããã£ã¦ãã
2ã¯ã¼ã«ç®
- ããå¼ã«æããã
- æ°å± ã«å¼ã£è¶ãã
- æè¡ç³»AdventCalendarã®åå¨ãç¥ã£ã¦ãJavaã¨ãAndroidã®ãèªã¿æ¼ãã
- μ's 3rd Anniversary LoveLive!ã§ä¼èª¬ãç®æã
3ã¯ã¼ã«ç®
- 7æãããããä¸éã®J2SE1.4çä¸æ¡ä»¶ã«æ¾ãè¾¼ã¾ããã
- çµå©å¼ãBGMã§ããããæ¾é¡ããã
- è¦ããã«ãããã3ã¶æã§é£½ããã
- C84ãæºåã§ãã¦ãªãã¦å¤æ¹ã«è¿·æãããã¤ã¤ããªãã¨ãã©ãããªãå¹¹äºãããªãã
- JVMç³»ã®é¢æ°åè¨èªï¼Groovy, Scala, Kotlinï¼ã«æãåºãã
æçµã¯ã¼ã«
- Kotlin触ã£ã¦ããProject Euler解ãããã¨ãã
- ã¯ã¦ããæ´»ç¨ãå§ããã
- ã¯ã¦ãªããã°ã«ãã¦ããããã°ãã¾ã¨ãã«æ¸ãå§ããï¼æ°ãããï¼ã
- æ´æµ·ã®ææã«åºåãã»ãã¥ãªãã£å³ãéãã¦ã¤ã³ãã©å ããç¹ããããªãã
- JJUG CCC 2013 Fallã§ãæè¡ç³»ã¤ãã³ãç«¥è²ãæ¨ã¦ãã
- ã³ãã±ä¸åå ã§çµ¶æã®å¹´æ«ãéãããã©ãããªã2åç®ã
ã¾ã¨ã
- ã©ãã©ã¤ãï¼
- çµå©ãã
- ããå¼ã«æããã
- ããã°ã©ãã³ã°ã趣å³ã¨ãã¦ç®è¦ãã
2014å¹´ã®ãã¨
Input / Outputå¢ãããã
æè¡ç³»ãåå¼·ä¼ã¨ããã¤ãã³ãã«ç©æ¥µçã«åå ãã¦ããããã
ããã¨å¹´å§ã«æ¥çµã½ããã¦ã§ã¢åãã¦è²·ã£ã¦èªãã§ã¿ããã©é¢ç½ãã£ãã®ã§ãWEB+DB PRESSã¨ããSoftware Designã¨ããèªãã§ã¿ããããªãã¨æãã¾ããã
ãã¨ã¤ãã³ãã§LTåå ãã¦ã¿ããããããçæ°å³ãªã®ã§ã¡ãã£ã¨æããã©ã
ããã°ã©ãã³ã°è¨èªã¨ã
JVMç³»ã¯Kotlinãé å¼µãã¤ã¤ãç¾æ®µéã§å®ç¨çãªè¨èªã§ããScalaãããæãã§ãæè¿JavaScriptã好ããªã®ã§ãã£ã¡ãããã¡ããJavaãã
ãã¨ãææ³ãJavaã£ã½ããªãè¨èªã£ã¦ãã¢ã»ã³ããªè¨èªä»¥å¤è§¦ã£ããã¨ãªãã®ã§ã触ã£ã¦ã¿ãããªãLISPã¨ããHaskellã¨ããããããã¤ã
æ¬èªããã¼ã¹ã¨ã
ã©ããã¯æè¿ä½å®¶åºå®ã«ãªã£ã¦ãã¦ãèªãã ãã¨ãªãä½å®¶ã¨ãæ°äººã«æã伸ã³ãªãæããããããããå»å¹´ã¯çµããã®ã¯ããã¯ã«ã¨ããæè¿ã¦ã£ã¶ã¼ãºã»ãã¬ã¤ã³ã«æãåºãã¦ã¿ãããã¦æ¢åèªãã®ã«å¿ãããªã£ã¦ããã
ã§ãã©ããã¯æ¢åæ°ååããã¦æã«7åãããèªããã°ããã¨æè¡ç³»ã®æ¬ã¨ãéèªã¨ãåããã¦10åãããã«ãªãã°ã¡ããã©è¯ãããªï¼
ã©ãã©ã¤ãï¼
2æé ã«SSA4thã©ã¤ãã4æã«ã¢ãã¡ã§çµãã£ããã¾ãã©ã¤ãããã¨æããä»å¹´ãã©ãã©ã¤ãï¼ã®1å¹´ã«ãªãããã
2013å¹´å¬ã©ãããªãã¬ãã¼ã
ããã¾ãã¦ããã§ã¨ããããã¾ãã
ä»åã¯ã³ãã±ã«è¡ããªãã£ãã®ã§ããã¶ãæ°ã®æããå¹´æ«ã§ãããå®å®¶ã§ã ãã ãã¨ãæ£æã¯å¦»ã®å®å®¶ã§ã ãã ãã¨ã
ã©ãããªããã½
ããå»å¹´ã«ãªã£ã¦ãã¾ãã¾ããã2013/12/29(æ¥)ã«ãæ¯ã³ãã±æä¾ã®ã©ãããªããéå¬ãã¾ãããå»å¹´ã®å¬ã«å¹¹äºãå¼éããå¹³åãã(id:kim-peace)ããå¹¹äºãå¼ãç¶ãã§ã2åç®ã®ã©ãããªãã§ãããååå²ã¨ãã ãã ã ã£ãã®ãä½ã¨ãããããªãã¨æã£ã¦ãããå¤ã«ç·å¼µãã¦éå§ç´å¾ã¯èä¸çããªã£ã¦ã¾ããã
åå 人æ°ã¨ãã¦ã¯ã ããã50人åå¾ã1人ããã¿ãã£ã³ãªãã¦è¯ãã£ããã ãã©ã人æ°ç¢ºå®å¾ã«10人ãããå¢ããã®ã§ã飯ã足ããªããªã£ã¦ãã¾ã£ãæãã
ã©ãããªãã§ã¯ãèªç±åå ã®ä¼ç»ã¨ãã¦ãæè¿èªãã§é¢ç½ãã£ãã©ããã¢ã³ã±ã¼ãããæ¯åãã£ã¦ããã®ã§ãããä»åã¯ããã«å ãã¦ãã¾ãã¯ãªã¹ãã¹ãè¿ãã£ããã¨ããããã©ããéå®ãã¬ã¼ã³ã交æä¼ããããã¾ããã
ã©ãããã¬ã¼ã³ã交æä¼ã«ã¤ãã¦
ããã¬ã¼ã³ã交æä¼ãªããããã¨ãããããã£ã¦ã©ãããªãç³ãè¾¼ã¿ãã©ã¼ã ã®åçã«æ¸ããã¦ã¦ããããã¯ãªã¹ãã¹ãè¿ãããã£ã¦ã¿ã¾ããã¼ã£ã¦æãã§ã
交æä¼ã§ã¯ã ããã30人ãããã®äººãåå ãã¦ããã¾ãããæå¤ã«è¢«ããå°ãªãã£ãã§ãããTKGã¨ãã1åã§æ¸ãã§è¯ãã£ãâ¦â¦ã¨ããããã¿æ¬ã®éããªããªãã¡ããã©è¯ãã£ãã®ã§ã¯ã
交æä¼ã®ããæ¹ã¨ãã¦ã¯ããå¼ãæ¹å¼ã§ããã¾ãããåä»æã«é ãã£ãæ¬ã«ç´ãã¯ããã§ããã®åå¸çãªãã®ãåå è ã«æã£ã¦ãããã交æä¼éå§æã«æ½é¸ç®±ã«åå¸ãå ¥ãã¦ããã£ã¦ãåå¸ãããå¼ãæµãã
ãã¾ããã³ãè¯ãå¼ãã¦ãããæãã«æµãã¦ãããã ãããã£ã¦ä¸å®ã«æã£ã¦ããã ãã©ãã¿ãªããåæã«ã»ãã»ã箱渡ãã¦å¼ãã¦ã£ã¦ãããã®ã§å©ããã¾ãããã¡ãªã¿ã«äº¤æä¼ã®ããå¼ãæ¹å¼ã¨ç´ãç¨æãã¦ãããã®ã¯ãµãå¹¹äºã§ãããã¡ã®å¦»ã§ãã
åã£ã¦ãããã¨
ãã£ã±ãå¹¹äºã¨ãããã¨ãããä¼è©±ã®æéã¯å¤ãåããªãã£ãããã©ããã¤ãæè¿ãå¾å®®æ¥½åçå ´ ãã¬ã ãªã¼ã°ã»ãã¼ã¹ãã¼ã«ããçºå£²ãããç³å·ååã«ã¤ãã¦ã¯éå®åä½ã£ã¦å ååããã®ã§è¯ãã£ãããªãåããã欲ãå¤å°ççºãéãããããããªãâ¦â¦ã
ããã¨ããã¯äºæ¬¡ä¼ã§ãªãã ãã©ãæè¿èªãã çå¾ä¼æ¢åµããªã«ã®4å·»ã«ã¤ãã¦ãåããã®ãè¯ãã£ãããã®4å·»ã¯ãã£ã±ããããããªã¼ã£ã¦ã
ãã¨ä¹¾æ¯ã®æã®æ¨æ¶ã§WHITE ALBUM 2ã®è©±ãããã£ã¦è¨ã£ãã®ã«è©±ãã¾ããã£ã¦è¨ããã¦ãã£ã±ã話ãã¡ãã£ããã ãã©æªãã®ã¯ç§ã§ã¯ãªãã¯ãã
ã©ãããªãã®ä»å¾
ã©ãããªãããããªãããã£ã¦ãã¨ã§ä»å¾ãåå ã®æ·å± ãä½ããã¦ãã£ã¦ãããããç¹ã«ååå ã®äººãã©ãã©ãæè¿ãã¦ããããã
ãã£ã±ãä¸çªã§ããã®ã¯éå¬æéã¨åå è²»ãã©ããããã£ã¦è©±ãªãã ãã©ã3500å以ä¸ã¯å人çã«ãé«ãã¨æããåé¢ã2æéã ã¨çãã®ããªãã¨ãããã¨ã¯ããã©ããäºæ¬¡ä¼è¡ã人ã¯è¡ãã2æéã§ãå åãªã®ã§ã¯ï¼ã¿ãããªè©±ãããã
ããã«é¢ãã¦ã¯å²ã¨ã¿ããªã®æè¦ãèãããã§ãããã¨ãã®ä¼å ´å²ã¨å®ãã®ã§ãããããã¨ãããæ å ±ããã£ããæãã¦ãããã¨å¬ããã§ãããã¡ããä»åã®ãããªãããªä¼ç»ããããæ¡ãã次å以éãåå è ã®æè¦ãåãå ¥ãã¤ã¤ãã£ã¦ããã¾ãã
å人çãªæ¬¡ã®ç®æ¨ã¨ãã¦ã¯ããã¤ã¯ã®ä½¿ãæ¹ããªâ¦â¦ããããªããä¹¾æ¯çµãã£ãæç¹ã§å£°æ¯ãã¦æ±ã ãã ã£ããã§ããã©ãçµãã£ããã¨ã«ãããªã«å«ã°ãªãã¦ããã¤ã¯èããããã¼ã£ã¦ã¢ããã¤ã¹é ããã®ã§æ¬¡å以éã«åæ ãã¦ãããããããããã¯æ¬å½ã«ãããã¨ããããã¾ãã
ã¨ããããã§
2013å¹´å¬ã³ãåããã©ãããªããåå ãã¦ããã ããçãããããã¨ããããã¾ããï¼
KAnnotatorã§Javaã©ã¤ãã©ãªã§ãNull-Safetyæ©è½ã使ã #Kotlin
Kotlin Advent Calendar 2013 22æ¥ç®ã®ã¨ã³ããªã§ãã
Javaã®ã©ã¤ãã©ãªä½¿ããã
Kotlin使ã£ã¦ã¦æ®éã«ãµã¼ããã¼ãã£è£½ã®ã©ã¤ãã©ãªä½¿ãã¾ããããä¾ãã°Joda-Time使ã£ã¦ãããªæãã§ã
fun main(args: Array<String>) { val today = LocalDate.now() val first = today!!.dayOfMonth()!!.withMinimumValue() println(first!!.toString("mm/dd")) }
ãããå¢ãããæï¼ï¼
fun main(args: Array<String>) { val today = LocalDate.now() val first = today?.dayOfMonth()?.withMinimumValue() println(first?.toString("mm/dd")) }
ãããçåããæï¼
便å©ãªæ©è½ã§ããã¯ãã®Kotlinã®Null-Safetyæ©è½ã§ãããJavaã©ã¤ãã©ãªã§ã¡ã½ãããã§ã¼ã³ãããã¨ããªããã¯ãã©ããã¦ãå¾®å¦ãªæãã«ãªãã¾ãããã®ã¡ã½ãã絶対nullè¿ããªãããï¼ã£ã¦è¨ããããªãããªãããã£ã¡ãnullä¸å®ãªäººã®ã³ã¼ãã¿ããã空æ°èªãã§æ¬²ããã§ãããã
External Annotations
ããã解決ããæ段ã¨ãã¦ãJetBrainsãç¨æãã¦ããåã¢ããã¼ã·ã§ã³ãããã¾ããJavaå´ã®ã³ã¼ãã§@NotNull*1ã@Nullable*2ãä»ãã¦ããã¨ãKotlinã§ã¯ãããNull-Safetyæ©è½ã¨ãã¦è§£éãã¦ããã¾ãã*3
ãã ãã ããã¨è¨ã£ã¦Joda-Timeã¨ãæ¢åã©ã¤ãã©ãªããã£ã¦@NotNullä»ãã¦ä½¿ããã¨è¨ãããã°ããããªããã©ããããã¨æ¯åãã£ã¦ãã大å¤ã ããâ¦â¦ã£ã¦ã¨ããã§ç»å ´ããã®ããExternal Annotationsãã§ãã
External Annotationsã¯ãã©ã¤ãã©ãªãæ¹å¤ããã«XMLã§ããã®ã¡ã½ããã«å¯¾ãã¦ãã®ã¢ããã¼ã·ã§ã³ãä»ãããã¿ãããªæãã§ã¢ããã¼ã·ã§ã³ãå¤é¨å®ç¾©ã§ãã¾ããIntelliJ IDEAã®æ©è½ã®1ã¤ã§ãã*4
Joda-Timeã®nowã¡ã½ããã¾ã§ç§»åãã¦ãããããã«Alt+Enterãæ¼ãã¾ãã
ãªããããã£ã½ãã®åºã¾ããããAnnotate method 'now' as @NotNullããé¸æãã¾ãããã¶ãååã¯External Annotationsã®XMLãä¿åããå ´æãèãããã®ã§ãé©å½ã«é¸ã³ã¾ãããã
é¸æãããã£ã¬ã¯ããªã®ä¸ã«ããã±ã¼ã¸æ§æåã®ãã£ã¬ã¯ããªãåºæ¥ã¦ãã¾ããããã«annotations.xmlã¨ãããã¡ã¤ã«ããã£ã¦ãä¸èº«ã¯ãããªæãã«ãªã£ã¦ããã¯ãã
<root> <item name='org.joda.time.LocalDate org.joda.time.LocalDate now()'> <annotation name='org.jetbrains.annotations.NotNull'/> </item> </root>
å ã®ã³ã¼ãã«æ»ãã¨ãè¦ååºã¦ã¾ããã
ããã§ãJoda-Timeã«ã¯ä½ä¸ã¤æãå ãããã¨ãªããã¡ã½ããã«@NotNullã¢ããã¼ã·ã§ã³ãä»ãã¦ãKotlinå´ãããnowã¡ã½ããã®æ»ãå¤ã¯Null-Safeåã§æ±ããããã«ãªãã¾ããã
ã§ãããdayOfMonthãwithMinimumValueãããã«ä»ã®ã¡ã½ãããå ¨é¨åããã¨ãããã£ã¦è¨ãããã°ããããªããã©ããããã¨ãã£ã¦ãããªãããã
KAnnotator
External Annotations便å©ãªãã§ããããããä¸ã¤ä¸ã¤ããã®ã¯ãããã«çæ°ã®æ²æ±°ã§ããããã@NotNullã@Nullableã®ã¢ããã¼ã·ã§ã³ãé¸æããã®ã¯èªåãªã®ã§ããã¹ãå¯è½æ§ãããã¾ããããã§ãKAnnotatorãã®ç»å ´ã§ãã
KAnnotator㯠任æã®ã©ã¤ãã©ãªã«å«ã¾ããå ¨ã¡ã½ããã®ä¸èº«ãæ¨è«ããExternal Annotationsãçæãã IntelliJ IDEAã®ãã©ã°ã¤ã³ã§ããGitHubã§ç®¡çããã¦ãã¦ãIntelliJ IDEAã®ãã©ã°ã¤ã³ãªãã¸ããªããã¤ã³ã¹ãã¼ã«ã§ãã¾ãã
æ°è¦ãã©ã°ã¤ã³ã¤ã³ã¹ãã¼ã«ã§æ¤ç´¢ããã¯ã¹ã«"Kotlin"ã¨å ¥åãã*5ã¨KAnnotatorãåºç¾ããã®ã§ãã¤ã³ã¹ãã¼ã«ãã¾ãã
ã¡ãªã¿ã«ãããã¨ã³ããªæ¸ãã¦ãæç¹ã§ã§Kotlinã®Downdowdæ°ã26000ãããã«å¯¾ãã¦KAnnotatorã1650件ãããã§ããããã¾ãç¥ããã¦ãªãï¼
ã¤ã³ã¹ãã¼ã«ãçµãã£ã¦åèµ·åããããã¡ãã¥ã¼ã®Analyzeã«ãAnnotate Jar Files...ãã£ã¦é ç®ã追å ããã¦ãã®ã§é¸æãã¾ãã
ã¡ãã£ã¨å å·¥ãã¦ã¾ãããããªæãã®ã¦ã£ã³ãã¦ãåºã¦ããã®ã§ãJoda-Timeã®ã©ã¤ãã©ãªã«ãã§ãã¯ãå ¥ãã¦ãOKæ¼ãã¾ãããããªã«å¾ ããã«External Annotationsã®çæãå®äºãã¾ãã
çæããXMLãè¦ã¦ã¿ãã¨ã大éã®ã¡ã½ããã«å¯¾ãã¦@NotNullã®External Annotationså®ç¾©ãæ¸ããã¦ãã¾ãã@Nullableã®External Annotationsã¯ããããå®ç¾©ãã¦ããªãããã§ãã*6
å度ã³ã¼ããè¦ã¦ã¿ãã¨ãä»ã®å®å ¨å¼ã³åºãã«ãè¦åãåºã¦ãã¾ãã
ã¨ããããã§ãããã§Kotlinã¯ç©ºæ°ãèªãããããªãã¾ããï¼ãã£ãã¼ï¼
KAnnotator / External Annotations ã®ãããã¨ãã
- Javaã©ã¤ãã©ãªã§Null-Safetyæ©è½ãç°¡åã«ä½¿ããï¼ï¼ï¼
- ã©ã¤ãã©ãªå´ã®å¯¾å¿ãå¾ ããã«ã@NotNull, @Nullableã¢ããã¼ã·ã§ã³ã使ãã
- åã¢ããã¼ã·ã§ã³ã大éã§ã³ã¼ãããã¡ããã¡ãï¼ã¿ãããªæãã«ãªããªã
- ã©ã¤ãã©ãªå´ã§External Annotationsãæä¾ããã°Kotlinå´ã§ä½ã®éåæããªã使ãã
- Kotlinï¼External Annotationsã§Javaå´ããã¯åã¢ããã¼ã·ã§ã³ã¤ãã¦ãããã«è¦ãã
ä»å¾Java8ãæ£å¼ãªãªã¼ã¹ããã¦ãKotlinã§ã¯ãªãã¨ãåã¢ããã¼ã·ã§ã³ãæ´»ç¨ããã·ã¼ã³ã¯ããããå¢ãã¦ããã¨æãã®ã§ãããããå ´åãç°¡åã«å¯¾å¿ã§ããããªã®ãããã§ãããJetBrainsã®å ¬å¼ã§ããAnnotate The Worldããªãã¦è¨ã£ã¦ã¾ããã
ç¾ç¶KAnnotatorã¯Nullabilityã¢ããã¼ã·ã§ã³ãã対å¿ãã¦ããªãã¿ããã§ãããä»å¾ã¯@Mutable, @ReadOnlyãªã©ã®ä»ã¢ããã¼ã·ã§ã³ã¸ã®å¯¾å¿ãã@NonNullã¨@NotNullã®éãã®å¸åã¨ãããã®ã¸ãã対å¿ãã¦ã»ããï¼
Javaã®æ¨æºã©ã¤ãã©ãªã®External Annotations
ãã®ã¨ã³ããªãæ¸ãããã«IntelliJ IDEAã»ããã¢ãããã¦ã¦ä»æ´æ°ã¥ãããã§ããã©*7ãæ¨æºã©ã¤ãã©ãªã£ã¦nullãè¿ããªãã¡ã½ããã¯Null-Safeåãè¿ãããã«ãªã£ã¦ããã§ããã
ãã¨ãã°ãããªã³ã¼ãã¨ãã
fun main(args: Array<String>) { val cal = Calendar.getInstance(); cal.set(Calendar.DATE, cal.getActualMinimum(Calendar.DATE)) println("${cal.get(Calendar.MONTH) + 1}/${cal.get(Calendar.DATE)}") }
å¤æ°calããå¼ã³åºãã¦ãã¡ã½ããã®åã«ã¯?ãããã¯ãããããExternal Annotationsã§ãã£ã¦ã¾ããã
Project Structureéãã¦âPlatform Settingsã®SDKsâAnnotationsã¿ããéãã¨ãIntellij IDEAå´ã§æã£ã¦ãJDKã®External Annotationsã¨ãKotlinã®External Annotationsãã¤ã³ãã¼ãããã¦ã¾ãã
ã¡ãªã¿ã«ãããFiles.get(String, String...)ã@NotNullãããªãã£ã½ããã§ããã©ãããã£ã¦nullè¿ãå¯è½æ§ãããã ã£ãããªâ¦â¦ï¼
ã¾ã¨ã
Kotlinã§Javaã©ã¤ãã©ãªä½¿ããªãKAnnotator使ããªãçç±ãªãæ°ããã¦ããï¼è©¦ãã¦ãªããã©AndroidSDKã®ã©ã¤ãã©ãªã対å¿ã§ãããã
ä»å試ããã³ã¼ãGitHubã«ãããã®ã§URLè²¼ã£ã¦ããã¾ã https://github.com/clomie/KotlinKAnnotatorTest
å人çã«ã¯ãã³ã¼ããããã·ã³ãã«ã«æ¸ããã¯ãã®Kotlinã§ãè¨èªæ©è½ã®å£²ãã§ããNull-Safetyæ©è½ãJavaã©ã¤ãã©ãªã§å¾®å¦ãªæãã«ãªã£ã¦ãã¾ãã®ãKotlinã®æ®å¿µãªé¨åã ã¨æã£ã¦ããã®ã§ãããã解決ã§ããä»Kotlinæå¼·ãªããããªããã¨æã£ã¦ãã¾ããã
Kotlinæå¼·ï¼Kotlinããããï¼ï¼¼ï¾ï¾ï½¶ï¾ï½¬ï½°ï¾ï¼
ãã¨ãããªã«é·ãã¨ã³ããªæ¸ããã®ä¹ ã ãªã®ã§ã¡ãã£ã¨ç²ãã¾ããã
åèURL
Using External Annotations | Project Kotlin
Kotlin M4 is Out! | Project Kotlin
*1:org.jetbrains.annotations.NotNull
*2:org.jetbrains.annotations.Nullable
*3:以åããããæ©è½ããã°ããã®ã«ã¿ãããªè©±ããã¦ããã§ãããå®ã¯M3ãããããåºæ¥ãããã«ãªã£ã¦ãããã
*4:ãã¶ã
*5:KAnnotatorã§ãOK
*6:ãã¶ãâ¦â¦
*7:ã ãããããã®ã¨ã³ããªæ¸ãã¦ã