Yuta Saito (kateinoigakukun) Interview
host Yukihiro Matsumoto
Yes, then let’s start the interview.
Probably we met for the first time
I saw your videos and presentations, but probably I met you in the first time in the face and even online.
May I ask you a few questions. So, first of all could you introduce yourself briefly?
Sure, nice to meet you. My name is Maxime Chevalier-Boisvert. I am working as a compiler engineer at Shopify, working on the YJIT compiler projects, which is just in time compiler for the Ruby programming language.
Tell, tell us how you come across programming. How did you start programming?
Sure, I think I first started programming when I was 10 years old. I had DOS386 computer with QBasic on it.
But at the time, I couldn’t read English. So I had access to all the help files, but I had a lot of difficulty making sense of it. So I couldn’t get very far. I think it’s only when I was 16 when I got access to the internet at home. And then on the internet, I could find many learning resources. And then I started learning C++.
So you started in Q basic, then C++.
Do you remember your first program?
Well, when I was a kid, when I was 10, I would write just like simple animations, just plotting some lines and having loops with that sort of thing.
So the then you majored in the Computer Science in the university? Right?
Yes, I did. I went to McGill University, and studied Computer Science.
Oh, so did you have any plan to have programming as an occupation when you were in high school?
I think I wasn’t exactly sure what I would do when I was in high school, I thought I would either go into programming or maybe computer engineering.
So, how did you come across Ruby?
I think the first time I came across Ruby was when I was maybe 20, or 21 years old. And I wanted to create a website with a forum. And Ruby on Rails was the best web framework at the time. That’s the first time I came across Ruby.
That I’ve heard your PhD thesis was based on the topic of the JIT compiler, similar to the YJIT currently you’re working on. So, how did you pick that theme for the PhD thesis?
Right? Well, I think I became very interested in programming when I did my undergrad. And I found I really loved programming. So I got interested in compilers, because I wanted to have a deeper understanding, you know, because if you can create a compiler, you can create a programming language.
So the how did you come to apply for Shopify?
Did they find you to do work on the JIT compiler?
Yeah, they did.
I got an invitation from Chris Eaton to discuss research, and potential job opportunities. And I decided to take the job, and I joined the Ruby and Rails infrastructure group at Shopify.
And then in that group, there’s many people working on optimizing the Ruby VM.
Yeah. So how big is the team?
I think the Ruby and Rails infrastructure team, the broader team in total is about 100 people, I believe, I could be mistaken. People who are specifically working on the Ruby VM, is probably on the order of 10 to 12 people, directly or indirectly. I hope I’m not quoting the wrong numbers. I apologize to my managers, if I am. (laughs)
That’s okay. That’s okay. (laughs)
And otherwise, for the project right now, we’re six people.
Thank you. Our core team is now really big. Shopify’s team is almost as big as us.
So there’re probably those in the audience who might not know about the JIT compiler. Could you briefly explain how JIT compiler works and, how it boosts the performance of the virtual machine?
I know, it’s pretty complicated.
Right. Well, so where should I start?
Typically, most dynamic languages are interpreted, or at least they have an interpreter. And the interpreter will kind of execute the code, basically, one line at a time, more or less, one instruction at a time and there’s a loop that goes over the instructions in the program and just executes them.
The way that JIT compiler works is, it takes those instructions, and it turns them into machine code. And it removes the need to loop over the instructions. And it also allows to eliminate a lot of the conditional checks that happen inside of an interpreter, to make the code more streamlined so that the CPU can execute it faster.
Could you explain about that trade off to the to the JIT compiler compared to the interpreter?
Yes. I think there’s multiple tradeoffs.
One of the tradeoffs is that when an interpreter you can have very fast startup time.
Because compiling the programs to machine code takes a certain amount of time.
So that’s one trade off the potential slightly slower startup.
There can also be like an increase in the complexity of the code. Because often, when you have a JIT compiler, you have multiple levels of optimization. You can have an interpreter, a baseline JIT, and sometimes one or two more levels of JIT on top of that.
And then there’s also memory usage. JIT compilers typically store some auxiliary data, along with the generated code to keep track of the assumptions that are made to the optimized code. And that takes a certain amount of memory as well.
Thank you, the JIT compiler seems to be pretty promising in the improving the Ruby performance. Do you have any future plan on the improving the YJIT?
Yeah, we have. We have many future plans.
One of the things that we want to do this year is that we want to add an ARM backend because right now we only support x86-64. We’d like to add a 64 bit ARM back end. So we can support ARM M1, and also Raspberry Pi, etc.
We want to, at the same time add a new intermediate representation for our backend so that we can have some optimization passes of the machine code to generate better quality machine code.
Yeah, that pretty exciting. Do you have any other plan?
Yes, well, I think I think one day I’d like to maybe create a programming language on my own one day, maybe.
I think it will be fun.
Yes. It also seems like a very scary project. A lot of work.
Creating a programming language is pretty exciting. And it could be a lifelong project.
I really encourage you to do that someday in the future.
If I do, I think I will start small.
Yeah. Yeah. Start small. Even I started small.
It seems you are very enthusiastic about programming. Your Twitter account is @Love2Code.
Could you tell us about the your, love and passion for programming?
Yeah, sure. I think, when I was a kid, I grew up poor.
My mother was on welfare. I was raised by a single mom. I was very passionate about machines and electronics. But the problem is, especially at the time, electronic parts were very, very expensive. And when you want to do electronics, you always need to buy new parts. So it was the kind of hobby that was not very accessible. But eventually, I discovered computers, and it was like the ultimate machine.
Because you can write code, the only limit is your imagination. You don’t need any parts. You just need, time and focus and there’s no limit to what you can create with quick codes.
Yes, it’s as you say. As a child, I thought it was magic. I used to wonder if I could do with my imagination. Programming made it possible.
I used to think the same in high school. Probably some people listening to this interview, who want to become programmers, working on the core of the system. Do you have any words of advice for them?
First, well, I guess it depends where you are, but I think if you want to learn programming, I would encourage you to start learning on your own. It doesn’t matter how old you are.
Just if you’re curious about programming, you know, do some internet searches, find some tutorials online, maybe download Ruby and start reading some codes starts playing with it experiments don’t be afraid of failure, just keep trying. And the more you do it, the better you’ll get.
Yeah, you know, good things is that you know, you usually don’t burn the computer, whatever you pronounce.
In electronics craft you put to big a current and you know, you you will burn the circuit. But yeah, programming is much, much safer.
It’s hard to know what to say without the audience being there but follow your passion. Have fun.
Yeah, indeed. The last question is what makes you a great programmer?
I think attention to detail.
I think programming is a form of communication. And as with other forms of communication, it’s good to write your code in a way that’s easy to read. To put yourself into in the users’ shoes. When people run your program what is their experience going to be like? What are the things that could be not obvious to them? And how can you make the user experience better?
As your programming grows, the community is formed around the project and that is the community is based on the communication there. The communication is very crucial to the programming.
That, I think that’s all so that yeah, thank you for the time and thank you for
being with us. And that congratulation to the getting the Ruby prize.
Thank you very much. Very nice to meet you today.