Talks

I quit my job to write my own language: Goby

RubyKaigi2017
http://rubykaigi.org/2017/presentations/_st0012.html

That day, for no particular reason, I decided to write my own language. So I followed a book and wrote the monkey. And when I wrote monkey, I thought maybe I'd create my own language. And when I created it, I thought maybe I'd just make it more like Ruby. And I figured, since I've spent so many time, maybe I'd just make it a VM-based language. And that's what I did. I wrote VM and compiler just like Ruby did in version 1.9. For no particular reason I just kept on going. I created file and http library. And when I made them, I figured, since I'd gone this far, I might as well add a web server. When I created the web server, I figured, since I'd gone this far, I might just quit my job and make it my own programming language: Goby

For leanring more about Goby, please also checkout our Gitbook (constantly updated!)

RubyKaigi 2017

00:00:00 The next speaker is Stan, who will be discussing his journey in creating a programming language.
00:00:06 His title is 'I quit my job to write my own language.'
00:00:44 I understand that many of you are from Taiwan, which is wonderful. I love being here, and I appreciate every part of this opportunity. I don't have an English name yet, and when I started speaking, I realized how much my life has changed.
00:01:20 I've been on a journey with programming. Just yesterday, as I was pondering my path, I thought about how I would share my experiences. I want to show you all how I have developed my language, Goby.
00:01:31 This journey has helped me to think critically about the language development process. I find the title of this talk very meaningful because not many people can call themselves language developers. My hope is to inspire others to explore this field.
00:01:48 So, what is Goby? How many of you know about it? I will try to explain the essence of Goby. Firstly, Goby inherits much from Ruby, and it is neutral, meaning it is intended to be versatile. We have built the Goby sample site using Goby itself, which showcases its capabilities.
00:03:06 The libraries in Goby are built to have unique personalities, just like Ruby. I encourage you to check out our repository for more information. Next, I want to introduce one of the key features of Goby: the plugin system.
00:04:04 The plugin system allows you to extend Goby with Go programs. Goby provides two methods for using plugins. The first is a simple flat approach where you can augment existing code. The second is a generator that creates customized plugins.
00:04:30 In the Goby program, you can use plugins to call content from the Go program. Internally, Goby compiles your program, generates a shared object file, and utilizes the plugin package to open this shared object and execute functions accordingly.
00:06:06 Let’s have a closer look at the generation process. The plugin generator is a bit more complex, as it produces both standard and custom packages. Using a function tied to the plugin structure, Goby can process defined instructions effectively. The compiler is designed to handle the intricacies of these operations intelligently.
00:07:15 I want to emphasize the usage of unused expressions and how they can be optimized. For instance, if a variable is defined but not used, Goby’s compiler can recognize this and eliminate unnecessary instructions, thus optimizing efficiency.
00:09:08 This brings us to the topic of expressions in programming languages and their significance in Goby. Statements and expressions are vital, and understanding how they interact can greatly affect how a program runs.
00:10:08 For example, if an assignment is made without considering its use, it could lead to inefficiencies. Through my experiences with Goby, I found that ensuring clarity in code can prevent such pitfalls.
00:12:00 Further, I'd like to point out how Goby's compiler is not merely a traditional compiler; it adapts based on context. It ensures that the necessary values are maintained and returns are handled correctly.
00:12:45 This adaptability is critical in creating a dynamic programming environment. The features of Goby aim to make programming not just a task, but a creative process.
00:13:50 Why did I quit my job to focus on Goby? It was my passion for language development and the desire to learn more about compilers and virtual machines. I wanted to bring something new into the programming community.
00:15:12 I learned invaluable lessons through my experiences that shaped Goby, and today, I hope to share that knowledge with all of you.
00:16:10 As I continue to develop Goby, I'm constantly thinking of ways to improve its functionality while maintaining its foundational principles.
00:17:04 I want to express my gratitude to everyone involved in this project: those who have contributed code, provided feedback, or supported the project in any capacity. Without the community's support, Goby would not be what it is today.
00:19:00 If you're interested in exploring Goby further or want to engage in discussions about language development, I encourage you to reach out or join us on our communication platforms.
00:20:00 As I wrap up my talk, I'd like to extend my thanks to the sponsors and the community for empowering this project. I appreciate your time and interest.
00:25:35 Lastly, I would be happy to answer any questions you have regarding Goby, its features, or my experience developing it. Please feel free to ask about anything!