SlideShare a Scribd company logo
1 of 32
Download to read offline
The Crystal language
*recently* updates
@karupanerura
Ruby Kaigi 2016 LT
How about me
• @karupanerura (Twitter/Github/etc..)
• Perl/Python/Go/Crystal/Swift/ES2016/etc..
• Maintener of mRuby.pm (mruby Perl binding)
• Director of Japan Perl Association
• Of cause, I like Perl and Ruby also :)
Well..
This talk’s topic is
the Crystal language
Do you know about
the Crystal language?
The Crystal language is …
• Ruby like syntax and APIs
• static typing & union type & type inference
• nil safe
• self hosting compiler (using llvm)
• SEE ALSO: https://crystal-lang.org/
It works
# A very basic HTTP server
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
# Copied from: https://crystal-lang.org/
It works
# A very basic HTTP server
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
# Copied from: https://crystal-lang.org/
Load module (at compile time)
It works
# A very basic HTTP server
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
# Copied from: https://crystal-lang.org/
type inference as HTTP::Server
It works
# A very basic HTTP server
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
# Copied from: https://crystal-lang.org/
type inference as HTTP::Server::Context
It works
# A very basic HTTP server
require "http/server"
server = HTTP::Server.new(8080) do |context|
context.response.content_type = "text/plain"
context.response.print "Hello world"
end
puts "Listening on http://0.0.0.0:8080"
server.listen
# Copied from: https://crystal-lang.org/
yield code block
type inference in arguments
# https://github.com/crystal-lang/
crystal/blob/master/src/io.cr#L262
module IO
def <<(obj) : self
obj.to_s self
self
end
end
type inference in arguments
# https://github.com/crystal-lang/
crystal/blob/master/src/io.cr#L262
module IO
def <<(obj) : self
obj.to_s self
self
end
end
type inference as Class having #to_s
(using union type: String|Integer|etc..)
language updates
YOU SHOULD READ IT
https://github.com/crystal-
lang/crystal/blob/master/
CHANGELOG.md
It’s kidding :p
but, you can do that :)
Release dates
• 0.19.0 (2016-09-02)
• 0.18.0 (2016-06-14)
• 0.17.0 (2016-05-17)
• 0.16.0 (2016-05-05)
• 0.15.0 (2016-03-31)
• 0.14.0 (2016-03-21)
• 0.13.0 (2016-03-07)
• 0.12.0 (2016-02-16)
• 0.11.0 (2016-01-23)
• 0.10.0 (2015-12-23)
• 0.9.0 (2015-10-16)
• 0.8.0 (2015-09-19)
Release times
• 0.19.0 (2016-09-02)
• 0.18.0 (2016-06-14)
• 0.17.0 (2016-05-17)
• 0.16.0 (2016-05-05)
• 0.15.0 (2016-03-31)
• 0.14.0 (2016-03-21)
• 0.13.0 (2016-03-07)
• 0.12.0 (2016-02-16)
• 0.11.0 (2016-01-23)
• 0.10.0 (2015-12-23)
• 0.9.0 (2015-10-16)
• 0.8.0 (2015-09-19)
12 minor version up releases in a year
Summary of changes in a year
• 12 minor version up releases
• 72 breaking changes
• 200+ methods/macros are added
• Some methods/macros are removed/renamed
• Many bug fixes and some micro-optimizations
(My) Featured new features
`crystal play` sub-command
`crystal tool format`
sub-command
✨✨✨✨✨✨✨✨✨
✨✨✨✨✨✨✨✨✨
✨✨✨✨✨✨✨✨✨
✨✨✨✨✨✨✨✨✨
✨✨✨✨✨✨✨✨✨
$global variable is removed
👍👍👍👍👍👍👍👍👍👍
👍👍👍👍👍👍👍👍👍👍
👍👍👍👍👍👍👍👍👍👍
👍👍👍👍👍👍👍👍👍👍
👍👍👍👍👍👍👍👍👍👍
👍👍👍👍👍👍👍👍👍👍
Int#to_s(Int)
255.to_s(2) # => "11111111"
255.to_s(8) # => "377"
255.to_s(10) # => "255"
255.to_s(16) # => "ff"
Updated syntax (before)
class Foo
getter foo :: Int32
getter bar :: String
def initialize(@foo, @bar)
end
end
pp Foo.new(1, "matz")
Updated syntax (after)
class Foo
getter foo : Int32
getter bar : String
def initialize(@foo, @bar)
end
end
pp Foo.new(1, "matz")
and more…
Conclusion
Conclusion
• Crystal is still improved
• updating the syntaxes/APIs
• self hosting compiler is stable (I think)
• Join to Crystal JP (Crystal UG in Japan)
• http://crystal.connpass.org/
Let’s enjoy Crystal!
Thank you
🍺🍣🍶

More Related Content

What's hot

What's node.js all about
What's node.js all aboutWhat's node.js all about
What's node.js all aboutniallo
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smellolegshpynov
 
Crystal - Statically Typed Ruby
Crystal - Statically Typed RubyCrystal - Statically Typed Ruby
Crystal - Statically Typed RubyVagmi Mudumbai
 
Node.js Patterns and Opinions
Node.js Patterns and OpinionsNode.js Patterns and Opinions
Node.js Patterns and OpinionsIsaacSchlueter
 
The Ruby Racer: under the hood
The Ruby Racer: under the hoodThe Ruby Racer: under the hood
The Ruby Racer: under the hoodcowboyd
 
Medepia ABAP JSON Library ZCL_MDP_JSON
Medepia ABAP JSON Library ZCL_MDP_JSONMedepia ABAP JSON Library ZCL_MDP_JSON
Medepia ABAP JSON Library ZCL_MDP_JSONFatih Pense
 
RingoJS: Server-Side Javascript When Only Java Will Do
RingoJS:  Server-Side Javascript When Only Java Will DoRingoJS:  Server-Side Javascript When Only Java Will Do
RingoJS: Server-Side Javascript When Only Java Will DoDarren Cruse
 
Dmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesDmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesLogeekNightUkraine
 
Intoduction to React
Intoduction to ReactIntoduction to React
Intoduction to ReactRubizza
 
Cassandra: Not Just NoSQL, It's MoSQL
Cassandra: Not Just NoSQL, It's MoSQLCassandra: Not Just NoSQL, It's MoSQL
Cassandra: Not Just NoSQL, It's MoSQLEric Evans
 
Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Michał Konarski
 
5 Ways to Build Better Web APIs with Ruby and Rails
5 Ways to Build Better Web APIs with Ruby and Rails5 Ways to Build Better Web APIs with Ruby and Rails
5 Ways to Build Better Web APIs with Ruby and RailsLaunchAny
 
Why and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsWhy and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsBrainhub
 
Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Ben Evans
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend toolingpksjce
 
When Javascript isn't Javascript
When Javascript isn't Javascript When Javascript isn't Javascript
When Javascript isn't Javascript Tristan Gomez
 
Java Closures
Java ClosuresJava Closures
Java ClosuresBen Evans
 

What's hot (20)

What's node.js all about
What's node.js all aboutWhat's node.js all about
What's node.js all about
 
Ruby hellug
Ruby hellugRuby hellug
Ruby hellug
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
 
Children of Ruby
Children of RubyChildren of Ruby
Children of Ruby
 
rubyonrails
rubyonrailsrubyonrails
rubyonrails
 
Crystal - Statically Typed Ruby
Crystal - Statically Typed RubyCrystal - Statically Typed Ruby
Crystal - Statically Typed Ruby
 
Node.js Patterns and Opinions
Node.js Patterns and OpinionsNode.js Patterns and Opinions
Node.js Patterns and Opinions
 
The Ruby Racer: under the hood
The Ruby Racer: under the hoodThe Ruby Racer: under the hood
The Ruby Racer: under the hood
 
Medepia ABAP JSON Library ZCL_MDP_JSON
Medepia ABAP JSON Library ZCL_MDP_JSONMedepia ABAP JSON Library ZCL_MDP_JSON
Medepia ABAP JSON Library ZCL_MDP_JSON
 
RingoJS: Server-Side Javascript When Only Java Will Do
RingoJS:  Server-Side Javascript When Only Java Will DoRingoJS:  Server-Side Javascript When Only Java Will Do
RingoJS: Server-Side Javascript When Only Java Will Do
 
Dmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesDmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script Technologies
 
Intoduction to React
Intoduction to ReactIntoduction to React
Intoduction to React
 
Cassandra: Not Just NoSQL, It's MoSQL
Cassandra: Not Just NoSQL, It's MoSQLCassandra: Not Just NoSQL, It's MoSQL
Cassandra: Not Just NoSQL, It's MoSQL
 
Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?
 
5 Ways to Build Better Web APIs with Ruby and Rails
5 Ways to Build Better Web APIs with Ruby and Rails5 Ways to Build Better Web APIs with Ruby and Rails
5 Ways to Build Better Web APIs with Ruby and Rails
 
Why and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.jsWhy and How You Should Move from PHP to Node.js
Why and How You Should Move from PHP to Node.js
 
Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)Perl On The JVM (London.pm Talk 2009-04)
Perl On The JVM (London.pm Talk 2009-04)
 
Next generation frontend tooling
Next generation frontend toolingNext generation frontend tooling
Next generation frontend tooling
 
When Javascript isn't Javascript
When Javascript isn't Javascript When Javascript isn't Javascript
When Javascript isn't Javascript
 
Java Closures
Java ClosuresJava Closures
Java Closures
 

Viewers also liked

The plan of Aniki 2.0
The plan of Aniki 2.0The plan of Aniki 2.0
The plan of Aniki 2.0karupanerura
 
TIme::Moment+Time::Strptime=
TIme::Moment+Time::Strptime=TIme::Moment+Time::Strptime=
TIme::Moment+Time::Strptime=karupanerura
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freakskarupanerura
 

Viewers also liked (7)

DateTimeX::Moment
DateTimeX::MomentDateTimeX::Moment
DateTimeX::Moment
 
Aniki::Internal
Aniki::InternalAniki::Internal
Aniki::Internal
 
The plan of Aniki 2.0
The plan of Aniki 2.0The plan of Aniki 2.0
The plan of Aniki 2.0
 
router-simple.cr
router-simple.crrouter-simple.cr
router-simple.cr
 
TIme::Moment+Time::Strptime=
TIme::Moment+Time::Strptime=TIme::Moment+Time::Strptime=
TIme::Moment+Time::Strptime=
 
Aniki has come
Aniki has comeAniki has come
Aniki has come
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaks
 

Similar to The Crystal language *recently* update

萬國之津梁
萬國之津梁萬國之津梁
萬國之津梁charsbar
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHiroshi SHIBATA
 
JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)Teppei Sato
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6Nobuo Danjou
 
Why I will never write JavaScript ever again*
Why I will never write JavaScript ever again*Why I will never write JavaScript ever again*
Why I will never write JavaScript ever again*The Wolff
 
How to Write the Fastest JSON Parser/Writer in the World
How to Write the Fastest JSON Parser/Writer in the WorldHow to Write the Fastest JSON Parser/Writer in the World
How to Write the Fastest JSON Parser/Writer in the WorldMilo Yip
 
Akka-chan's Survival Guide for the Streaming World
Akka-chan's Survival Guide for the Streaming WorldAkka-chan's Survival Guide for the Streaming World
Akka-chan's Survival Guide for the Streaming WorldKonrad Malawski
 
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar BatsovRuby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar BatsovMichael Kimathi
 
The story of language development
The story of language developmentThe story of language development
The story of language developmentHiroshi SHIBATA
 
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutUpgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutChristian Heilmann
 
TechDays - IronRuby
TechDays - IronRubyTechDays - IronRuby
TechDays - IronRubyBen Hall
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVMJung Kim
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Ary Borenszweig
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Ary Borenszweig
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)Crystal Language
 
Of Owls and IO Objects
Of Owls and IO ObjectsOf Owls and IO Objects
Of Owls and IO ObjectsFelix Morgner
 
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Etiene Dalcol
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015rvagg
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Junichi Ishida
 

Similar to The Crystal language *recently* update (20)

萬國之津梁
萬國之津梁萬國之津梁
萬國之津梁
 
How to Begin to Develop Ruby Core
How to Begin to Develop Ruby CoreHow to Begin to Develop Ruby Core
How to Begin to Develop Ruby Core
 
JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)JavaScript Language Update 2016 (LLoT)
JavaScript Language Update 2016 (LLoT)
 
plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6plackdo, plack-like web interface on perl6
plackdo, plack-like web interface on perl6
 
Why I will never write JavaScript ever again*
Why I will never write JavaScript ever again*Why I will never write JavaScript ever again*
Why I will never write JavaScript ever again*
 
How to Write the Fastest JSON Parser/Writer in the World
How to Write the Fastest JSON Parser/Writer in the WorldHow to Write the Fastest JSON Parser/Writer in the World
How to Write the Fastest JSON Parser/Writer in the World
 
Akka-chan's Survival Guide for the Streaming World
Akka-chan's Survival Guide for the Streaming WorldAkka-chan's Survival Guide for the Streaming World
Akka-chan's Survival Guide for the Streaming World
 
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar BatsovRuby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
Ruby 4.0 To Infinity and Beyond at Ruby Conference Kenya 2017 by Bozhidar Batsov
 
The story of language development
The story of language developmentThe story of language development
The story of language development
 
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcutUpgrading JavaScript to ES6 and using TypeScript as a shortcut
Upgrading JavaScript to ES6 and using TypeScript as a shortcut
 
TechDays - IronRuby
TechDays - IronRubyTechDays - IronRuby
TechDays - IronRuby
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Of Owls and IO Objects
Of Owls and IO ObjectsOf Owls and IO Objects
Of Owls and IO Objects
 
Angular2
Angular2Angular2
Angular2
 
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
Web development with Lua: Introducing Sailor an MVC web framework @ CodingSer...
 
The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015The Future of Node - @rvagg - NodeConf Christchurch 2015
The Future of Node - @rvagg - NodeConf Christchurch 2015
 
Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.Great Tools Heavily Used In Japan, You Don't Know.
Great Tools Heavily Used In Japan, You Don't Know.
 

More from karupanerura

コンテキストと仲良く
コンテキストと仲良くコンテキストと仲良く
コンテキストと仲良くkarupanerura
 
Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術karupanerura
 
Why we use mruby with Perl5?
Why we use mruby with Perl5?Why we use mruby with Perl5?
Why we use mruby with Perl5?karupanerura
 
Perlにおけるclass実装パターン
Perlにおけるclass実装パターンPerlにおけるclass実装パターン
Perlにおけるclass実装パターンkarupanerura
 
モジュール開発におけるぼくの試行錯誤
モジュール開発におけるぼくの試行錯誤モジュール開発におけるぼくの試行錯誤
モジュール開発におけるぼくの試行錯誤karupanerura
 
Aniki - The ORM as our great brother.
Aniki - The ORM as our great brother.Aniki - The ORM as our great brother.
Aniki - The ORM as our great brother.karupanerura
 
Perl5 meta programming
Perl5 meta programmingPerl5 meta programming
Perl5 meta programmingkarupanerura
 
mysqlcasual6-next-key-lock
mysqlcasual6-next-key-lockmysqlcasual6-next-key-lock
mysqlcasual6-next-key-lockkarupanerura
 
若手Itエンジニア飲み会-LT
若手Itエンジニア飲み会-LT若手Itエンジニア飲み会-LT
若手Itエンジニア飲み会-LTkarupanerura
 
perl5の日付時刻処理とか
perl5の日付時刻処理とかperl5の日付時刻処理とか
perl5の日付時刻処理とかkarupanerura
 
Yapc asia-2012-lt-thon
Yapc asia-2012-lt-thonYapc asia-2012-lt-thon
Yapc asia-2012-lt-thonkarupanerura
 

More from karupanerura (20)

Perl5 VS JSON
Perl5 VS JSONPerl5 VS JSON
Perl5 VS JSON
 
コンテキストと仲良く
コンテキストと仲良くコンテキストと仲良く
コンテキストと仲良く
 
KOWAZA for mackerel
KOWAZA for mackerelKOWAZA for mackerel
KOWAZA for mackerel
 
Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術Technology for reduce of mistakes - うっかりをなくす技術
Technology for reduce of mistakes - うっかりをなくす技術
 
Why we use mruby with Perl5?
Why we use mruby with Perl5?Why we use mruby with Perl5?
Why we use mruby with Perl5?
 
はかたの塩
はかたの塩はかたの塩
はかたの塩
 
Gotanda.pmの紹介
Gotanda.pmの紹介Gotanda.pmの紹介
Gotanda.pmの紹介
 
すいすいSwift
すいすいSwiftすいすいSwift
すいすいSwift
 
Perlにおけるclass実装パターン
Perlにおけるclass実装パターンPerlにおけるclass実装パターン
Perlにおけるclass実装パターン
 
モジュール開発におけるぼくの試行錯誤
モジュール開発におけるぼくの試行錯誤モジュール開発におけるぼくの試行錯誤
モジュール開発におけるぼくの試行錯誤
 
Aniki - The ORM as our great brother.
Aniki - The ORM as our great brother.Aniki - The ORM as our great brother.
Aniki - The ORM as our great brother.
 
Perl5 meta programming
Perl5 meta programmingPerl5 meta programming
Perl5 meta programming
 
mysqlcasual6-next-key-lock
mysqlcasual6-next-key-lockmysqlcasual6-next-key-lock
mysqlcasual6-next-key-lock
 
dwangocpp1-lt
dwangocpp1-ltdwangocpp1-lt
dwangocpp1-lt
 
engineer-life
engineer-lifeengineer-life
engineer-life
 
若手Itエンジニア飲み会-LT
若手Itエンジニア飲み会-LT若手Itエンジニア飲み会-LT
若手Itエンジニア飲み会-LT
 
Hachioji.pm #40
Hachioji.pm #40Hachioji.pm #40
Hachioji.pm #40
 
Hachioji.pm #39
Hachioji.pm #39Hachioji.pm #39
Hachioji.pm #39
 
perl5の日付時刻処理とか
perl5の日付時刻処理とかperl5の日付時刻処理とか
perl5の日付時刻処理とか
 
Yapc asia-2012-lt-thon
Yapc asia-2012-lt-thonYapc asia-2012-lt-thon
Yapc asia-2012-lt-thon
 

Recently uploaded

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 

Recently uploaded (20)

VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 

The Crystal language *recently* update

  • 1. The Crystal language *recently* updates @karupanerura Ruby Kaigi 2016 LT
  • 2. How about me • @karupanerura (Twitter/Github/etc..) • Perl/Python/Go/Crystal/Swift/ES2016/etc.. • Maintener of mRuby.pm (mruby Perl binding) • Director of Japan Perl Association • Of cause, I like Perl and Ruby also :)
  • 3.
  • 5. This talk’s topic is the Crystal language
  • 6. Do you know about the Crystal language?
  • 7. The Crystal language is … • Ruby like syntax and APIs • static typing & union type & type inference • nil safe • self hosting compiler (using llvm) • SEE ALSO: https://crystal-lang.org/
  • 8. It works # A very basic HTTP server require "http/server" server = HTTP::Server.new(8080) do |context| context.response.content_type = "text/plain" context.response.print "Hello world" end puts "Listening on http://0.0.0.0:8080" server.listen # Copied from: https://crystal-lang.org/
  • 9. It works # A very basic HTTP server require "http/server" server = HTTP::Server.new(8080) do |context| context.response.content_type = "text/plain" context.response.print "Hello world" end puts "Listening on http://0.0.0.0:8080" server.listen # Copied from: https://crystal-lang.org/ Load module (at compile time)
  • 10. It works # A very basic HTTP server require "http/server" server = HTTP::Server.new(8080) do |context| context.response.content_type = "text/plain" context.response.print "Hello world" end puts "Listening on http://0.0.0.0:8080" server.listen # Copied from: https://crystal-lang.org/ type inference as HTTP::Server
  • 11. It works # A very basic HTTP server require "http/server" server = HTTP::Server.new(8080) do |context| context.response.content_type = "text/plain" context.response.print "Hello world" end puts "Listening on http://0.0.0.0:8080" server.listen # Copied from: https://crystal-lang.org/ type inference as HTTP::Server::Context
  • 12. It works # A very basic HTTP server require "http/server" server = HTTP::Server.new(8080) do |context| context.response.content_type = "text/plain" context.response.print "Hello world" end puts "Listening on http://0.0.0.0:8080" server.listen # Copied from: https://crystal-lang.org/ yield code block
  • 13. type inference in arguments # https://github.com/crystal-lang/ crystal/blob/master/src/io.cr#L262 module IO def <<(obj) : self obj.to_s self self end end
  • 14. type inference in arguments # https://github.com/crystal-lang/ crystal/blob/master/src/io.cr#L262 module IO def <<(obj) : self obj.to_s self self end end type inference as Class having #to_s (using union type: String|Integer|etc..)
  • 16. YOU SHOULD READ IT https://github.com/crystal- lang/crystal/blob/master/ CHANGELOG.md
  • 17. It’s kidding :p but, you can do that :)
  • 18. Release dates • 0.19.0 (2016-09-02) • 0.18.0 (2016-06-14) • 0.17.0 (2016-05-17) • 0.16.0 (2016-05-05) • 0.15.0 (2016-03-31) • 0.14.0 (2016-03-21) • 0.13.0 (2016-03-07) • 0.12.0 (2016-02-16) • 0.11.0 (2016-01-23) • 0.10.0 (2015-12-23) • 0.9.0 (2015-10-16) • 0.8.0 (2015-09-19)
  • 19. Release times • 0.19.0 (2016-09-02) • 0.18.0 (2016-06-14) • 0.17.0 (2016-05-17) • 0.16.0 (2016-05-05) • 0.15.0 (2016-03-31) • 0.14.0 (2016-03-21) • 0.13.0 (2016-03-07) • 0.12.0 (2016-02-16) • 0.11.0 (2016-01-23) • 0.10.0 (2015-12-23) • 0.9.0 (2015-10-16) • 0.8.0 (2015-09-19) 12 minor version up releases in a year
  • 20. Summary of changes in a year • 12 minor version up releases • 72 breaking changes • 200+ methods/macros are added • Some methods/macros are removed/renamed • Many bug fixes and some micro-optimizations
  • 21. (My) Featured new features
  • 24. $global variable is removed 👍👍👍👍👍👍👍👍👍👍 👍👍👍👍👍👍👍👍👍👍 👍👍👍👍👍👍👍👍👍👍 👍👍👍👍👍👍👍👍👍👍 👍👍👍👍👍👍👍👍👍👍 👍👍👍👍👍👍👍👍👍👍
  • 25. Int#to_s(Int) 255.to_s(2) # => "11111111" 255.to_s(8) # => "377" 255.to_s(10) # => "255" 255.to_s(16) # => "ff"
  • 26. Updated syntax (before) class Foo getter foo :: Int32 getter bar :: String def initialize(@foo, @bar) end end pp Foo.new(1, "matz")
  • 27. Updated syntax (after) class Foo getter foo : Int32 getter bar : String def initialize(@foo, @bar) end end pp Foo.new(1, "matz")
  • 30. Conclusion • Crystal is still improved • updating the syntaxes/APIs • self hosting compiler is stable (I think) • Join to Crystal JP (Crystal UG in Japan) • http://crystal.connpass.org/