SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
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
🍺🍣🍶

Weitere ähnliche Inhalte

Was ist angesagt?

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
 

Was ist angesagt? (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
 

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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.
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
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
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
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
 
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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
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
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
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
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 

Kürzlich hochgeladen (20)

MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
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...
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
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...
 
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
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
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
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
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
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
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...
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 

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/