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 :)
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..)
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
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/