00:00:20.119
uh good morning people in Singapore and other country including
00:00:26.320
Japan uh having a English Keynote is always make me nervous and
00:00:33.360
uh yeah why don't you guys understand
00:00:40.120
Japanese yeah it's a it's a quite easy
00:00:45.600
language yeah especially those who understand the Chinese characters Kani okay H today I'm
00:00:54.280
going to talk about uh the past and the future of the Ruby programming language and the the title of this keynote is a
00:01:02.920
super dry Ruby it should
00:01:09.680
work uh when I visit the United States I saw the some kind of the the the fashion
00:01:18.200
store Fashion Store says it's super dry and uh look at that that place it is the
00:01:25.119
Japanese words uh it says
00:01:31.759
that means that become extremely dried that means
00:01:38.759
nothing this totally meaningless Japanese phrase but uh today I'm going
00:01:45.119
to talk about the being super dry with somewhat meanings but first let let me
00:01:52.360
talk about the uh history in the
00:02:04.159
young uh few years before that that picture was taken I started programming
00:02:11.800
with this kind of computer this was the the pocket computer so uh first in this in the
00:02:20.760
market in 79 I guess and it is a 4 bit
00:02:26.879
CPU with the 400 steps or lines of basic programming and it is very restricted
00:02:34.599
Bas basic interpreter in it and the every
00:02:39.879
variable uh has a length of one you mean the uh variable a variable B and the 26
00:02:47.959
variables that's all and this it was horrible it was
00:02:54.159
horrible as a programming environment but you know as a junior high school student I I only knew that environment
00:03:03.040
so I I didn't I didn't feel you know
00:03:08.440
that I felt it was natural I felt it was natural so I programming in the very
00:03:16.680
restricted uh small environment at the beginning so so I have notice the
00:03:24.480
Restriction just because you know it's I'm living within that kind of restriction you know that so know fish
00:03:31.480
does not feel the water because uh they are living in inside of water we don't
00:03:38.799
feel air usually just because we are in the in the air surrounded by air so but
00:03:48.280
uh later on I've heard about the other programming languages so I read the
00:03:54.480
computer programming uh magazines and books so I've heard the uh
00:04:01.560
uh you know the the programming language in the galaxy far far away like a pascal
00:04:09.040
which in that time it was pretty popular and C lisp and small talk and then in
00:04:16.600
the local bookstore I was living in the very uh Countryside of Japan so there
00:04:22.160
was no other friends uh playing with computers but in a local bookstore I
00:04:28.600
found the book uh described uh explained about uh Pascal so then I read through
00:04:36.400
the book I studied Pascal programming language only through the book just just
00:04:41.840
because you know at the at the time in the early 80 and early 80s so we don't
00:04:49.400
have the Pascal compiler at hand so it's too expensive for high school students
00:04:55.080
you know the it was the uh two 200 2,000
00:05:01.720
2,000 bucks 2,000 US dollar for uh obtaining uh Pascal compiler for PC so
00:05:09.360
it is too expensive for for high school students so I cannot uh compile my
00:05:16.160
programs but uh I only read the book and studied about the programming language
00:05:22.280
so the Pascal is pretty impressive for
00:05:27.520
me just because it has the something named the local variables what is local
00:05:32.759
variables variables is variable variables you can access variable from everywhere but it says there's two kind
00:05:41.280
of variables one is global variable what is global variable local variable then
00:05:47.880
it is the the user defined functions functions we only have the line numbers
00:05:53.720
and go go sub where's go to
00:06:00.840
and it is something in the recursion recursion
00:06:06.039
cause uh the function that Calla itself
00:06:12.160
so for the young high school student it is some something mysterious things and
00:06:19.960
and it has the user user defined data structures so it is whole lot of the
00:06:25.520
language uh features that is the uh break the Restriction of the ver uh
00:06:34.319
basic I was using so after realized that the those
00:06:41.160
language features I felt kind of like a heaven so there is so there is a room
00:06:49.199
for those great language feature in the programming world I didn't notice that
00:06:55.520
it's kind of like a heaven so at the time I got some kind of the
00:07:03.280
Enlightenment so there is programming languages there are many programming
00:07:10.039
language in the world and then they are all designed by
00:07:17.160
intentions and all language features was designed created invented by
00:07:24.919
intentions of human so
00:07:30.080
that the enlightenment for to me was uh why not me so the the other guys so
00:07:39.759
could create a programming language so I
00:07:44.879
can in theory I can design and create my
00:07:49.960
own programming language you Rec so that's where I started in high
00:07:56.599
school age but you know the back in time there's no open source no internet I can
00:08:04.319
only learn through books and I only had a this tiny computers which only 400
00:08:11.599
lines of code so I cannot Implement any a compiler at that time I have no
00:08:17.639
knowledge I had no skills I have no uh en uh no computers no real computers but
00:08:25.400
uh so I designed a language on a notebook paper notebook I
00:08:31.039
mean so I write the the programs in my ideal uh programming language then
00:08:39.560
without any compiler any interpreter any vertual machine it's I call it a paper
00:08:45.080
protyping or programming language and then I after that I entered
00:08:50.720
the the university university UHA University in in uh in Japan and I
00:08:56.760
majored in computers computer science and I studied a lot about programming languages like aisp small talk Pascal
00:09:03.839
lisp those uh famous programming language and then those INF famous
00:09:09.000
programming language clue logo icon and then python back then in in early 90s uh
00:09:15.440
P was very INF famous programming language then I studied a lot then 10
00:09:21.480
years later I grew
00:09:27.079
up uh I I haven't changed that much anyway uh I was in I was age 20 27 in
00:09:35.920
1992 so the year later I was working as a professional
00:09:42.440
programmer in the software company in Japan but in Japan in early 90s the
00:09:49.079
bubble economy was crashed so my project was
00:09:54.480
cancelled so the team was scattered among the team so so then I left behind
00:10:01.600
to maintain the product we already created but I prohibited to develop the
00:10:07.720
F uh product so I was in the maintenance mode so the every once in a while the I
00:10:16.480
got a phone call that okay your product doesn't work well on the my on my
00:10:21.519
computer so I replied okay to boot reboot your
00:10:27.760
computer thank you you so I was
00:10:35.160
boring it then you know it was left
00:10:41.200
behind I was we are I I was left behind and uh you know I I had my managers but
00:10:50.000
my manager also had a the the money earning project so his eye on that
00:10:57.120
project I I wasn't super at all so I have time I have I Haven controlled by
00:11:03.560
anyone so I have time I I have a computer on my desktop so it's a I thought it's about a time to do
00:11:10.440
something so so I just remembered my the high school time
00:11:17.120
dream uh creating programming language so that was my primary
00:11:22.760
motivation unlike other programming language I did not have any particular problem to solve by new programming
00:11:29.480
language I just wanted to create my own programming language I just wanted to
00:11:34.560
create my own programming language to Amusement entertain me and then and that
00:11:41.839
that programming language that which enhanced my programming Joy so I love to
00:11:47.639
program so I love to program I uh ever since I started programming in early
00:11:55.560
early 80s on this time computers so but you know the
00:12:03.440
programming task has uh fun fun aspect
00:12:09.079
and then the boring or the traveling aspect so I wanted to focus on the fun
00:12:17.320
part of the programming so so I worked yeah the
00:12:23.120
designing the ideal programming language was pretty fun and implementing it pretty enjoyable and then in
00:12:29.720
1995 I uh put it put it in the open source I we actually we didn't have the
00:12:35.800
term open source we call them the free software back then so
00:12:42.160
so but in that time I couldn't explain what makes
00:12:47.440
Joy so in 95 so I had a big idea about
00:12:54.959
the something that makes uh programming enjoy able and the keeping away from the
00:13:01.279
traveling part of the programming but actually I didn't fully understand
00:13:08.680
the nature of programming Joy but uh you know it's it's kind of
00:13:15.920
philosophical term so but uh we had
00:13:22.199
rescue we we met actually we met virtually on the
00:13:29.320
and the internet those two guys they are program programmers the guy in the
00:13:37.040
left this is Andy hand and the guy in the right is a Dave
00:13:42.720
Thomas the those two guys who wrote the book named the program programmatic
00:13:48.199
programmers uh find Ruby on the internet and then as a as a nature of the
00:13:56.519
programmers they tends to uh love uh study new programming language
00:14:03.279
appears once once in a while so and then the Dave Thomas found the Ruby and
00:14:09.440
introduced it to the Andy hand and then they played it a lot and
00:14:15.720
then and uh you know the most of us has have experience about the finding new
00:14:22.279
programming language I play a little and then just and then this it that's fine
00:14:28.320
and then few days later so they threw away the pring language and go to the next one but for
00:14:38.480
Ruby I don't know the reason but the Dave Thomas loved it very much and and
00:14:44.360
hand agreed and the they started wrote a book
00:14:50.199
on the on the language they found on the
00:14:55.360
internet so in year 2000 right after the uh the Y2K problem so
00:15:02.959
they wrote a they published a book named the programming Ruby or peax book just because we we have pickaxe on on the
00:15:10.000
front page and then man I I got a mails from Dave Thomas about questioning about
00:15:17.399
the Ruby's feature design reason or something like that I got a the hundreds
00:15:22.959
of males and I have to reply that yeah yeah that is that is terrific and then
00:15:30.519
he he finished the book in I don't know six months in that take
00:15:37.839
book and it was quite uh amazing job and then this day
00:15:46.120
thas um yeah size of the grass
00:15:57.600
body anyway he had a two con he introduced
00:16:02.759
two two New Concept to the programming which is the doct typing and the dry uh duck typing is like
00:16:15.480
this no du typ is like this okay uh no
00:16:20.519
matter what inside the something that works like a d that qus like a d that is
00:16:27.079
I we consider it as a d okay so it's a
00:16:35.279
dark so the doc typing is a con the
00:16:40.759
fundamental concept of the object oriented programming especially in the dynamic typing object oriented
00:16:47.639
programming okay we do not classify object we just care uh we we we do not
00:16:57.959
classify we okay usually we tends to classify
00:17:04.039
everything so in the explanation of the object oriented programming we use uh we often use the the examples like okay
00:17:11.520
there's animals the part of the the animal inherit inherited by mamals the mamal
00:17:18.319
inherited by human or something like that so that the attribute was inherited like that this and that but the you know
00:17:27.160
it is the concept of inheritance but it's not that important in the dynamic
00:17:32.880
type object oriented programming so we do not check
00:17:38.120
types so we just ask we just call methods on it so if the object do not
00:17:47.400
respond to the method it it just goes error so we don't care about inheritance
00:17:54.520
uh we don't care about the internal structure of the object we just care about how it behaves what method that uh
00:18:03.480
do do they have so so we can ignore the
00:18:09.080
inside detail and then focus on the the outside interface of the of the objects
00:18:16.480
so that is the the fundamental concept of objectoriented programming
00:18:22.679
so so that we can as computers dispatch so without this concept or the concept
00:18:29.679
of the dynamic dispatch we have to uh the write write down the if this me uh
00:18:37.559
the method type of the object is this this type or we can do this this this
00:18:42.919
this this and this and the otherwise we if the object type is that we have to do
00:18:50.440
this and this on that that class of object so we can ask computers do that
00:18:57.919
that TD uh the traveling uh paperworks
00:19:03.039
or bookkeeping so so that we don't have to
00:19:08.520
work just because we are lazy or or as a programmer we must be
00:19:15.880
lazy we should not work too hard because we are
00:19:22.559
human we are master of computers right we're not slaves of
00:19:28.559
computers we are masters of computers so
00:19:34.360
the in this is called the majime which is
00:19:40.919
the term to describe the the person who is very uh diligent and
00:19:48.320
serious and then often so we Japanese call ourself majime and then the we
00:19:57.080
proud we sometimes proud of oursel being majime and then we are keen and diligent
00:20:04.559
hardworking and we consider those aspect those attribute as a good as a good part
00:20:13.520
of the the Japanese people but uh
00:20:19.200
uh but sometimes the being maim is not good so the opposite of maim is fim
00:20:29.679
not not uh who means not as in ch as in Chinese uh it it is translated by the
00:20:38.640
lack of sincerity according to google
00:20:43.840
translation so which you prefer the being majime or being from
00:20:50.320
majime uh as a programmer I take lazy way I'd like to
00:20:55.840
be aim I'd like to be a lazy and then it is the spirit of doct typing
00:21:02.480
you know the I I don't want I do not want to work uh work heard so I want computers
00:21:11.919
work hard so and uh this is the uh you
00:21:18.120
know this is the simple explanation of dark typing okay the second concept
00:21:23.799
introduced by uh Dave thas is dry dry stands for the don't repeat yourself and
00:21:30.799
it's often called as a the one of the best attribute of the Rails framework
00:21:36.679
rubyan rails framework so it is the concept to avoid duplicates or concept
00:21:43.880
about the redundancy and avoid copy and
00:21:49.000
paste in the past in uh in Japan at least in Japan the
00:21:56.440
Enterprise soft development uh is measured by the lines of cod they they
00:22:02.760
produced so they often copies and copied and paste the code to to enhance their
00:22:16.120
accomplishment you know the all the this easy step the clicking the selecting
00:22:23.960
copying pasting okay you are accomplished dou
00:22:30.080
old but you know we do not do that no
00:22:36.720
longer I hope but because it's bad the the
00:22:44.120
copying and past copying and pasting is pretty bad you spread the bugs all over
00:22:50.240
you know copying pasting not only copy the code and not but that copies bugs as
00:22:56.840
well so the the pro software full of the copying
00:23:02.679
pasting so the is the cop the full of the bugs copied that's a kindy nightmare
00:23:10.360
besid that so we are lazy so we are too lazy to maintain
00:23:17.240
duplicates so in summary doct typing and oh excuse me do typing and dry and the
00:23:25.240
is the supported by the Spirit of laziness so
00:23:32.960
the maybe I believe Dave Thomas is a
00:23:38.080
lazy guy so am I so so we have been working so hard in
00:23:46.480
the in the past 20 20 years we are working as a rubby team that we are
00:23:52.880
working so hard for last 20 years to
00:23:58.240
reduce our burden in the programming and then to become more lazy so we work so
00:24:05.520
hard to be able to be lazy and then 20 years
00:24:13.799
later I was in ag47 I wrote a book about the the future of cold I unfortunately
00:24:20.400
it's not uh translated but you know time flies 20 years has passed the situation has
00:24:28.919
change and then in 1993 when I started Ruby it is the the
00:24:37.399
world is much more simpler the the Ruby is used for used
00:24:42.440
for scripting and tends to be the Ruby programs are very small maybe 10 10
00:24:49.000
lines 100 lines or and then the computers back then has only one CPU per
00:24:57.120
computers and then it's the in that age that we
00:25:02.799
are moving from procedural programming toward the grad into the objectoriented
00:25:09.559
programming so it's quite simple but in year 20 2015 right
00:25:18.440
now we have the web applications so we have huge programs we have the the web
00:25:27.320
application with thousands of lines of code tens of thousands of code and and uh the
00:25:33.720
computers has the M multi CPU in a in one computer and then we have the high
00:25:40.640
traffic uh web services and then uh the programming trends will moving gradually
00:25:47.000
from objectoriented programming toward functional programming so it I you as an old guy so
00:25:55.440
I miss those simple days scripting small programs single CPU procedures and you
00:26:02.640
know Ruby was created in that age so the the the early Ruby was uh optimized to
00:26:10.480
those environment so I regret I inherited too much from
00:26:16.799
Pearl anyway so according to theory of evolution we have to adapt to the
00:26:23.080
surrounding environment or we will be extinct so you know the we have a lot of
00:26:30.840
other programming language like a JavaScript typescript closures and scalar or whatever so we have tons of
00:26:38.159
new programming language arising and you know the those guys uh very excited
00:26:44.960
about the new new new languages and then saying okay
00:26:51.279
Ruby is out of date or something like that okay that's that's okay but we have
00:26:56.799
to we as a Community we have to move on to avoid uh Extinction or to survive so
00:27:05.320
for we have adapting New Concept coming around web applications we are using
00:27:11.760
objectoriented programming or meta programming or the DSA concept of DSL
00:27:17.039
domain speciic language to adapt the web applications so back in 90s uh when I
00:27:26.520
uh when I created Ruby so the many people
00:27:32.080
complained about the Ruby being objectoriented programming language so
00:27:37.360
they said okay we don't need any objects in the scripting language or or they
00:27:43.399
said okay Ruby is too good to be scripting language so we don't need
00:27:49.159
object uh object systems in scripting language so we you have to go to the
00:27:56.120
other regions other than scripting or something like that but the few years later the web
00:28:03.240
came in the web application is very easily become complex and the object
00:28:09.840
works very good at uh web programming so you know so the pro become object
00:28:17.960
oriented the python has object oriented feature introduce later on and then the
00:28:23.960
Ruby the everyone started pring Ruby being objectoriented scripting language
00:28:31.440
or meta programming so the meta programming is the very long history
00:28:36.760
inside the luik I mean Lis Community but you know the many people claim that okay
00:28:43.760
you we we meta programming is pretty interesting in theory but there's no
00:28:49.880
real world use case in the scripting language but the the the many people
00:28:56.720
including uh dhh in know proves proven uh the they are wrong so there's
00:29:05.000
very many real world use case in of meta programming especially the uh the system
00:29:13.720
should have to be uh flexible and the the you know self modifying and self
00:29:20.360
adapting to the new environment so so for meta programming ask power
00:29:25.519
there and the DSL concept of DSL
00:29:30.679
the also de thas once told me about the the programming the most of the
00:29:36.399
programming is the process of Designing domain specific language for that
00:29:41.559
applications we we design classes we we design methods so this is kind of
00:29:48.080
process of designing your own DSL for your applications so the Frameworks like
00:29:55.320
rails or Sinatra is is kind of like a providing DSL to to the application so the rails
00:30:03.799
and Sinatra can can be considered as a domain specific language for web
00:30:10.600
applications so those concept help to uh
00:30:15.679
help Ruby to adapt in the web application and a huge programs so
00:30:24.440
the in the past there was a the programming language named the tle TCL
00:30:30.039
tool command line command language and then the original author considered
00:30:36.120
tickle as to to be used in a very small programming like a 100 lines of code but
00:30:43.720
uh soon after that the many people started using tickle and they started
00:30:49.519
writing huge tickle programming like 5 thousands of lines called or the maybe
00:30:55.120
the tens of thousands of lines called and then Tio lacks the the the language
00:31:00.720
features to for mod the programming modularity and then there this is kind
00:31:06.159
of hell so the lessons learn learn there is that every a programming language
00:31:15.039
will have the the the huge programming
00:31:20.480
to unexpected by the original designer so
00:31:27.039
uh uh just it's it's just like that in Ruby
00:31:32.519
as well so in Ruby there is there are so many huge Ruby programs
00:31:40.320
like you some of you might uh struggling with the rails application with uh tens
00:31:47.039
of lines of tens of thousands of lines of code and rails itself is growing this
00:31:52.559
is that is huge uh web framework and then
00:31:59.000
the those features of object oriented programming or meta programming or the domain the concept of the domain
00:32:04.760
specific language is also serves to maintain that kind of huge programs and
00:32:11.000
then the multicores uh yeah multicore is the kind of uh traveling problem and I will
00:32:19.399
explain it later but we moved on to the native threads in Ruby One n and we have
00:32:25.559
we now have the J Ruby and Ruby that locks of the the giant locks so that can use the multi uh multi CPU multi cores
00:32:35.600
in without uh huning and and then we have the library Nam the event machine
00:32:41.840
and cool iio which is the the event driven based programming to support so
00:32:48.360
we and uh we are still working on to to utilize the multicore the high traffics
00:32:54.519
we have the fire fibers or the asynchronus uh IO and then we have the
00:33:02.960
the mod M and the engine x m which is uh higher the embeds the Ruby
00:33:10.000
interpreter in a web server so that we you you don't have to kick the the other
00:33:15.480
proc other Ruby process and uh in this conference there is the a real world use
00:33:22.559
case of the uh these MB embedded web servers by about some okay functional
00:33:29.360
programming uh we have the enumer enumerators and the lazy enumerators and
00:33:35.840
then we we have been added some functional methods inspired by the functional
00:33:42.000
programming so so we are in 2015 we are here in the
00:33:51.200
process of uh Evolution so what are we heading next first of all we are going
00:33:57.519
to Beyond web so Ruby might be used in
00:34:03.159
embedding by uh what research Computing or maybe in the the server side and
00:34:10.079
client s so for MB so I will the we will
00:34:15.800
have the session explaining m m and engine MB I have to explain about the MB
00:34:21.919
MB is a uh the auton of implementation of Ruby programming language which is uh
00:34:28.040
which is focus on the providing uh embeddable apis and the the smaller
00:34:35.760
footprint and uh it was it was designed by designed and
00:34:44.240
implemented by myself and uh you know those recently I have been working as a
00:34:51.280
designer of Ru programming language so I made a decision about that that I picked this this language feature I reject this
00:34:58.200
language feature or something that and that is the my work as a designer but
00:35:04.280
but uh you know we have the Ruby core team which is the smarter programmer than
00:35:10.079
myself so that I just have to ask them to okay I design it you you implement
00:35:17.200
it that's easy part but you know I with the I was born to program so I need to
00:35:27.040
program so I I'm a the I spent half of
00:35:32.119
my time spending uh implementing coding
00:35:38.480
MB anyway so and then next step is concurrency so the huge theme is the Glo
00:35:47.240
removing the global interpreter lock it's so Ruby the virtual machine is not
00:35:53.040
threat safe it is quite difficult to make it threat safe
00:35:58.760
so we try to make it R safe by using the fine grain lock so lock
00:36:06.400
everywhere I put we put a lock everywhere but it slows down The Interpreter of huge amount so so we
00:36:16.599
cannot use that you know the the most most of the Ruby programs are single
00:36:21.920
threaded not concurrence so the I we don't want to throw down those uh thing
00:36:28.520
red programs so we just abandoned adding uh adding fine grain lock so that's
00:36:35.440
that's why we choose the global interpreter lock and
00:36:41.000
uh very interestingly so many people press the node.js which is the event
00:36:47.400
driven server side JavaScript uh JavaScript implementation and then uh
00:36:53.720
yeah in fact V8 is which is the core of the node.js is brilliantly fast uh
00:37:01.240
JavaScript virsion machine but at the same time the nodejs is single readed so
00:37:09.560
very few people complained about that that's that's that's so funny but
00:37:18.200
that that tells me that tells me if the virtual machine is fast enough very few
00:37:23.520
people complain about that
00:37:28.560
anyway uh so but uh I we have to do
00:37:33.760
something so my okay this is the my tweet in 2014 August uh the my big plan
00:37:41.800
to for Ruby jail is at more abstraction cency is for example acus and add
00:37:49.000
warning when using threat directory then remove deal so we want to move on to the more abstra
00:37:56.720
ract more higher level uh concurrency model so the key point is what is the
00:38:05.000
abstract conen model in the future of Ruby maybe Ruby 3.0 so maybe it actors actors introduced
00:38:13.720
by the the or so the act so we you
00:38:19.520
create the actors which is the the execution body kind of like a threads
00:38:25.359
but the those actors do not share data so they only communicate between the
00:38:31.400
message passing so it's kind of like a go SCH routine and the channel so this that is
00:38:39.280
active and then and kichi which is uh the guy
00:38:45.760
behind the virtual machine who who in charge of the virtual machine is the experimenting of the share borrow model
00:38:52.160
it's kind of like a rust memory model so the the problem is we in thread thread
00:38:59.200
programming we often share the the object as object or programming it's
00:39:05.359
quite easy to to two threads referring to the single object but if one thread
00:39:13.480
modifies the object so it could uh affect the behavior of the the other
00:39:20.920
threats and then they affect other threats uh in determin ially that is the
00:39:27.800
problem so the kich is uh the idea is that when you pass the
00:39:35.599
object to the uh the other threats so you have to
00:39:42.480
uh the the the object the the ownership of the object is
00:39:50.040
borrowed from uh that object to the Past object so the only the object only
00:39:57.839
threads it's it's kind of confusing it the threads with ownership only threads
00:40:04.040
with ownership can modify the object so that only one object one thread can
00:40:09.599
modify so in that in that way so we can avoid that uh data
00:40:18.240
confliction without having uh uh mut the
00:40:23.640
fine grain rock or and then that might works but we are
00:40:30.280
experimenting on it and uh my myself is experimenting the other ideas like a
00:40:36.079
stream or pipeline based uh concurrency so I as experiment
00:40:42.079
experimentation so I designed a new programming language named stream so it's experimental language
00:40:49.599
and the experiment for future will be concurrency model if the the concept of
00:40:55.760
the language stream works well so that will gradually merge into the Ruby 3.0
00:41:02.560
so I I'm not sure which one to actor model or sharing borrowing model or the
00:41:10.680
stream based model will win but uh at least we can we can say we experimenting
00:41:19.760
considering and seriously about the adding con new better concurrency model
00:41:25.960
in the Ruby 3.0 so let me explain a little bit about the Stream So stream is
00:41:31.800
a language to build up this the pipeline in the in the program so this is the simple
00:41:40.160
cat programs so read from the standard in to standard out this is kind of like
00:41:45.760
a shell but the the the program line itself only creates the pipeline now at
00:41:54.240
the at the end of the program the event uh event Loop started then event Loop
00:42:00.400
read from standard in then write data to the standard out or something the the
00:42:08.160
other example is a little bit more complicated this is a simple Echo server in stream so this is the this round
00:42:16.119
thing is the function so the TCP server
00:42:21.680
creates the the server socket so that gener accepted the client
00:42:28.520
socket then the the data is when data is pipeline to
00:42:35.920
the the function the function is called for each data is is generate this
00:42:44.480
PA it each data passed so it accept the
00:42:50.200
client socket then uh connect the client soet as a input and the clients get as a
00:42:57.640
output this means Echo
00:43:02.680
so running this programs creates a simple Echo server in three lines of
00:43:08.960
code no TD she programming no programming
00:43:14.119
just just that so that that is a kind of experiment I
00:43:22.559
I'm doing so maybe maybe with other you know the pipe
00:43:28.200
is used in Ruby as a you know the bitwise operator so we might not be we
00:43:35.079
we might not be able to use uh the the bar as a as a pipeline connection but uh
00:43:43.640
maybe in the future this model can be introduced in Ruby
00:43:49.200
3.0 the next next field we are going to the m machine
00:43:54.839
collaboration so so the tomorrow I I think it's tomorrow but
00:44:00.760
the N Nishan will uh explain about did you mean Jem
00:44:07.480
so this gem does the when you mistype the variables or class modules so the
00:44:16.000
the Ruby interpreter the look for the the similar words and then it it says
00:44:22.119
that okay you said f but uh
00:44:27.160
uh did did you mean not food this but uh food one or
00:44:34.200
something so they uh what advise you to to fix the typo or
00:44:43.200
something so I was inspired by uh this feature so I I'd love to uh into uh I
00:44:51.920
mean bundle this gem into the into the standard distribution and and I was
00:44:59.160
inspired by the this ding Gem and making a some kind of the Proactive
00:45:07.040
or noisy warning so the there is the the gem and the tool named the rubber cop
00:45:14.720
which is check your the styles of the Ruby programs that it is very noisy but
00:45:22.960
you that teaches you uh the good style of your programs so the proactive
00:45:30.640
warning is kind of like that so you uh when turned off turned on this
00:45:38.599
productive warning so you will be warned and advised to a lot of advice to to make
00:45:46.200
your program better so it's kind of like
00:45:52.040
a the communication between compiler and the programmers to to make the software
00:46:00.000
better so it is of course it is optional it is
00:46:06.240
too noisy for daily use but sometimes that would be very very useful so that
00:46:13.520
might be coming to the Ruby 3.0 and the soft typing so we are thinking about the
00:46:21.119
soft typing the soft typing is different from the gradual typing no optional
00:46:26.680
typing we have three concepts the optional typing and the gradual typing is almost same concept and the soft
00:46:33.200
typing is not the optional typing or gradual typing is the you can specify
00:46:40.599
the spe static type of the the the uh
00:46:45.880
expression so for example the adding static typing to JavaScript
00:46:53.599
uh makes typescript which is the static type JavaScript fundamentally and then
00:47:00.160
it is pretty interesting okay I I knew very much about the benefit of static
00:47:05.839
typing you can find the type errors in compile time statically so so that you
00:47:12.520
can find the many bus in in compile time without running without testing so and
00:47:19.960
uh it is quite beneficial beneficial but uh but but uh at the same
00:47:29.040
time I'm so dry so when we see the T the
00:47:34.880
software with static typing it works of course and then then we remove the every
00:47:41.760
type information from the code if the the the language is a dynamically typed
00:47:48.800
it still works in that way the type information is
00:47:54.359
redundant so as a con as by following the principle of dry so it should be
00:48:02.599
removed so sof typing is a type inference so the we can sometimes uh
00:48:10.760
know the which variable has which type for example a we when we see the
00:48:18.440
assignment says a equal one so it means that the variable a is integer
00:48:26.920
so the Gathering those kinds of
00:48:32.880
informations and then adding some kind the Assumption or restriction so you can
00:48:38.720
have the 50 to 80% type saved programs
00:48:43.880
so if you don't don't have enough information about the the types so it's
00:48:49.799
just four bus to the dynamic typing so that is soft typing so the it's kind of
00:48:54.880
the best effort for soft typing so so I am adding some kind of
00:49:01.920
the soft uh stating type checking into Ruby 3.0 if possible but I'm not going
00:49:10.119
to add a type declaration type annotation to the to Ruby language just
00:49:16.599
because of the it's against the concept of dry so we wanted this the super
00:49:23.280
dry uh to confess I don't like
00:49:31.960
testing I I do but I don't like testing just because because it's
00:49:38.799
redundant if we are smart enough if our program write down run
00:49:46.280
correctly we don't have to
00:49:51.319
test but but I have no idea yet to remove the test Maybe maybe the sometimes the the the theor proof Theory
00:50:00.400
can be used by for that one but this is my ultimate goal to write down a program
00:50:07.799
it should run run correctly at the first hand or you can H communicate with the
00:50:13.280
computer to fix that one with the writing test this is my ultimate goal
00:50:18.480
but I I don't have no idea yet so if you have any idea to to to step forward to
00:50:24.680
that to that ultimate goal so please tell me help us so okay we will seek
00:50:32.559
driveway anyway so why do we do all those
00:50:38.200
stuffs what last 20 years we we have we
00:50:43.559
we have put all the effort so many times so many uh work hours so many ideas so
00:50:51.119
many knowledge into the the Ruby programming language Ruby community and building up the Ruby application R
00:50:59.079
Frameworks why do we do all those stuff because we are lazy we are so lazy
00:51:07.480
so we work hard to be more lazy because we love
00:51:14.520
Ruby because we love joy given from Ruby because we love power given from
00:51:22.040
zby so I promise I'll do everything everything diligently
00:51:29.720
seriously to AIT extension to make us more
00:51:36.079
powerful to make us more lazy happy hacking thank
00:51:51.240
you thank you so much mattz I'm sure you guys have lots of questions questions uh
00:51:56.440
if you would like to ask him anything we have mic set up on both sides of the auditorium so uh please make your way to
00:52:03.359
either one of those um we can also bring a mic to
00:52:11.760
you yes
00:52:17.160
okay hey matz hey so I think that recently we see The Old Pro the old
00:52:23.960
programming ideas being popular again for example we have closure which
00:52:29.480
implements lisp we have uh Elixir which takes ideas from erlang do you think
00:52:36.400
that the current implementation of Ruby can survive the next 20 years or maybe
00:52:42.359
we will we will need another language that will take the ideas from Ruby but
00:52:47.760
will get rid of all the Legacy features and it will be basically something new it will give Ruby a new life but it will
00:52:54.559
not be the same language what's your opinion Ah that's a good question but it's you
00:53:03.440
know the it's it's kind of like evolving
00:53:09.920
selection so the the language comes goes but you know as a ruby designer the
00:53:17.599
extension the Ruby is not really very bad for me so I try everything to
00:53:23.920
survive no I want okay thank
00:53:34.839
you do we have any more
00:53:43.599
questions um hi um of the new breed of programming languages that are coming
00:53:49.440
out Ras Scala goang uh what features do you find most exciting there that you'd
00:53:55.359
like to take and bring into Ruby excited I recently I had excited
00:54:03.640
about the the concept of the goal with the concept of goal routine and channel and the concept of the the structur sub
00:54:11.200
typing and the uh you know
00:54:17.119
the those simple static static type uh language of go being well yeah I was
00:54:26.079
I was pretty much inspired by go but I don't think we can steal something from
00:54:31.280
go but so in that sense
00:54:39.760
what I don't know and then
00:54:45.440
I'm I'm excited I'm also excited about the recent uh Evolution around the we
00:54:51.520
see in JavaScript ecosystem like having the typescript or do or some some kind
00:54:58.319
of those kind of uh the client side
00:55:07.720
systems are there any other questions for
00:55:13.799
Matt yes
00:55:21.079
okay hi mats um so you talked a little bit about about how you go about
00:55:27.440
designing um new implementations and things that you're adding to Ruby as it grows and evolves what's your process
00:55:34.640
when you sit down to design something new or add something new um whether it's
00:55:39.960
something you're coming up with or something you saw in another language how do you go about designing
00:55:45.520
that uh so the let's separate the topic
00:55:51.359
with between that designing Ruby or designing other programming language so so in designing of Ruby so it's the the
00:55:59.559
basic part of Ruby is the is kind of almost done so we had the we can't add a
00:56:06.359
very teeny features we are only able to add add a teeny features so the most of them are
00:56:13.240
are proposal based on proposals like uh the people in the community come up with
00:56:18.839
the ideas the and then uh how about adding this feature or that the we see
00:56:25.599
that that other language or something like that so the most of them uh we I we
00:56:31.200
have to reject most of them just because uh we have to keep compatibility but
00:56:37.599
sometimes uh we see the very brilliant idea so we we can introduce them and
00:56:43.839
then we also talked about uh those bigger feature like I I experiment uh
00:56:50.799
explained about the concurrency so the and then and the design and process of
00:56:57.200
Ruby itself is going like that so we are very small room to for change so since
00:57:03.000
the literally millions of people using Ruby right now so we cannot break anything in existing so the there are
00:57:10.440
little room to to change in the Ruby then
00:57:16.000
uh in contrast so designing for example the early stage of Ruby when no one was
00:57:23.240
using Ruby and or for the designing other programming language that that just started so we think we think of the
00:57:32.079
uh the usage and then we focus on I
00:57:37.119
focus on what's it the how I feel thing when
00:57:44.680
we code in that language so so the when designing API the syntax the language
00:57:51.920
features so I imagine how I feel how how use how you the a user feel when using
00:58:00.799
that particular features thank
00:58:11.760
you hello hello uh I'm wondering about is MRI can I ask you a question
00:58:22.440
yes just kidding goad you can ask tomorrow my talks tomorrow uh I'm
00:58:27.960
wondering is is MRI ever going to get a jit what are we ever going to get a just and time compiler
00:58:34.599
uh that and what do you think about the memory tradeoffs of using having a
00:58:39.960
Justin Time compiler yeah we have we have two concerns the as as so the jet
00:58:46.839
fundamentally is not portable so this is is that particular with the
00:58:53.319
that that particular CPU the architecture or maybe
00:58:59.480
we can rely on the the other the jet framework like lvm but uh there a the
00:59:07.280
long the the open source software with long history so we don't want to rely on
00:59:12.640
the the out the the huge other software uh exist outside of our not controlled
00:59:21.039
by our project just because you know the the open source software comes and goal so if we rely on the the lvm so when
00:59:30.440
something happened the the we we cannot when we cannot use the DAT longer so we
00:59:39.400
have we will meet a serious problem so
00:59:44.920
the the we when we have to rely on the other outside project it should be
00:59:52.839
optional or maybe it should should be maintained by ourself so this is one
00:59:59.039
problem the the second one is the memory consumption so the when wej just in time
01:00:04.880
compile everything so we have we consumed a lot of memory the compiled software and then in many cases the
01:00:13.160
memory is the the tightest uh resource in in the in the environment especially
01:00:19.480
in the serice side so so in that sense we are very concerned about jet so the
01:00:26.079
of course we are discussing about adding jet once in a while and uh for those
01:00:31.359
reasons we are very uh slow to start the
01:00:37.200
creating jet thank you yeah and help
01:00:43.839
wanted hey M but I think kind of related to eron's questions like uh because for
01:00:50.240
example uh compared to other languages for example like python it's being uh
01:00:55.720
like funded by Google and they're focusing on making it very fast like even there's talk about making it as
01:01:02.119
fast as C so I think for example what everyon was asking like uh the what is
01:01:09.559
the direction or what is the uh the the your view on that where there's a focus
01:01:17.119
on making uh Ruby uh running faster I know that there's a lot of features that
01:01:23.280
uh you have considered uh putting into Ruby to make everyone's life uh better
01:01:29.400
but yeah what is your view on that uh in terms of speed uh of the
01:01:36.079
language well the I don't I don't know the no one
01:01:41.280
complain about the faster Ruby so we are working on the making it runs faster and
01:01:46.440
consumes less memory that we so recent years last last two three years the the
01:01:53.079
the performance and the memory concern assumption is the uh our
01:01:58.920
Focus rather than adding new features so we introduced the new garbage collector
01:02:04.079
to the game performance and we uh changed the internal structure a lot to
01:02:09.520
reduce the memory so those two feature is the has been our primary uh Focus to
01:02:17.680
to improve the performance and then we we are keeping we we will keep doing
01:02:25.920
that for coming two two years or one one or two years
01:02:32.880
thanks okay thank you so much matz for joining us uh Matts is going to be back again later this afternoon we're gonna
01:02:38.960
have a panel with all the Ruby committers who are here in Singapore at four o'clock so you'll have time to ask them more questions um so start to think
01:02:53.359
much