Introduction to GraalVM and Native ImageKoichi Sakata
2019/08/23 JVM Language Summit Report Event at KanJava JUG
https://kanjava.connpass.com/event/139770/
This slide is about GraalVM, especially SubstrateVM that is able to generate native images.
Introduction to GraalVM and Native ImageKoichi Sakata
2019/08/23 JVM Language Summit Report Event at KanJava JUG
https://kanjava.connpass.com/event/139770/
This slide is about GraalVM, especially SubstrateVM that is able to generate native images.
This document discusses the Crystal programming language and compares it to Ruby. Crystal is a compiled, statically typed language that is inspired by Ruby. It aims to provide Ruby-like syntax and semantics but with better performance due to being compiled ahead of time. The document provides examples of Crystal code and demonstrates how Crystal is faster than Ruby for the Fibonacci number problem due to being compiled. It also highlights some key differences between Crystal and Ruby like static typing, overloading, and macros.
The document is a presentation in Japanese about character sets and collations in MySQL. It discusses how MySQL treats emoji characters like sushi and beer the same by default, but PostgreSQL does not. It explains that MySQL has both a character set (which defines how characters are encoded as bytes) and collation (which defines the sorting rules). For the UTF-8 character set, it shows the different collation options and how they treat letters, emojis, hiragana/katakana, and case sensitivity differently. It expresses a need for a Japanese-specific collation that properly distinguishes Japanese characters.
18. TCPサーバー
require 'socket'
Socket.tcp_server_loop(9999) do |sock|
Thread.new sock do |s|
s.each do |line|
puts line
end
end
end
17/55
Ruby紹介 Powered by Rabbit 0.6.5
19. HTTP GET
require 'open-uri'
open('http://nseg.jp').read
18/55
Ruby紹介 Powered by Rabbit 0.6.5
37. 再定義も可
class Fixnum
def +(a)
self * a
end
end
123+456 #=> 56088
36/55
Ruby紹介 Powered by Rabbit 0.6.5
38. 特異メソッド
特定のオブジェクトだけメソッド追加
obj = Hoge.new
def obj.hoge
...
end
37/55
Ruby紹介 Powered by Rabbit 0.6.5
39. モジュール
オブジェクトを持たないクラスのような
もの
名前空間をわけたり
module MyProject
class Hoge
end
end
38/55
Ruby紹介 Powered by Rabbit 0.6.5
40. モジュール
メソッド定義しておいて、他のクラスに
組み込んだり(Mix-in)
module Abc
def xyz
...
end
end
class Hoge
include Abc
# xyz メソッドが使えるようになる
end
39/55
Ruby紹介 Powered by Rabbit 0.6.5