Ruby Programming

Summarized using AI

Transcendental Programming in Ruby

Yusuke Endoh • November 28, 2018 • Earth

In this presentation titled "Transcendental Programming in Ruby," delivered by Yusuke Endoh at the Keep Ruby Weird 2018 event, the concept of "transcendental programming" is introduced. This unique approach emphasizes programming for joy rather than practical applications, inviting programmers to explore the creative aspects of coding. The talk highlights Endoh's background as a Ruby committer and his current work at Cookpad, a company that supports multiple languages and operates in various countries.

Key points from the presentation include:
- Definition of Transcendental Programming: Endoh defines transcendental programming as the enjoyment of programming for its own sake, encouraging participants to appreciate the inherent creativity in coding.
- Demonstration of Useless Programs: Through simple examples, such as a basic "Hello World" program, Endoh showcases how simple codes can bring joy without the pressure of functionality.
- Encoding/Decoding Techniques: Endoh introduces an intriguing method where Ruby programs can be encoded and decoded into hexadecimal, demonstrating the playful side of programming.
- Interactive QR Code: Attendees are encouraged to scan a QR code that links to a Ruby program, emphasizing hands-on participation. This unique program illustrates the relationship between the code and its output, showcasing creativity in programming.
- Artistic Programming: Several examples highlight the fusion of programming with visual art and sound, including programs that produce animations and music, illustrating how coding can yield aesthetically pleasing results.
- Final Thoughts: Endoh concludes by urging programmers to embrace the joy of coding, whether for fun or practical purposes, and encourages exploration of creative programming approaches while inviting interest in career opportunities at Cookpad.

Overall, Yusuke Endoh presents a compelling case for transcendental programming, emphasizing that coding can be a joyful pursuit apart from utility, ultimately aiming to inspire programmers to explore the artistic dimensions of Ruby.

Transcendental Programming in Ruby
Yusuke Endoh • November 28, 2018 • Earth

Keep Ruby Weird 2018 - Transcendental Programming in Ruby by Yusuke Endoh

'A MRI committer at Cookpad Inc. He is an advocate of "transcendental programming" that creates a useless program like this bio (^_^)'.sub(?^){eval$_=%q{puts"'#$`^_#$''.sub(?^){eval$_=%q{#$_}}"}}

Keep Ruby Weird 2018

00:00:09.679 Hello! Yes, I bought this; I'm enjoying it.
00:00:17.580 I'm from Austin. First, I'm Yusuke Endoh, and my Twitter account is a bit meta.
00:00:26.189 I've been a Ruby committer since 2008.
00:00:32.940 Some of my main contributions to Ruby include the implementation of keyword arguments.
00:00:38.430 I just implemented the design, and I also worked on the Ruby itself and a design and implementation coverage measurement library.
00:00:49.590 That's a back-end tool that helps create benchmarks for Ruby. Last year, I joined Cookpad as a three-time Ruby committer. My current job is to develop Ruby's safety.
00:01:05.670 But now, let me share some information about Cookpad.
00:01:11.840 Currently, Cookpad supports 22 languages and operates in 68 countries. We aim to be number one in 100 countries, and to maintain such a high-intensity service, we need many great engineers.
00:01:28.460 So if you are interested in working at Cookpad, please let me know.
00:01:39.630 The reason why I am here today is not just because I'm a good Ruby committer, but also because I'm one of the most peculiar Ruby programmers.
00:02:00.828 Today's topic is transcendental programming. I guess few people have heard of transcendental programming because I created this name.
00:02:13.900 By this term, I mean the act of enjoying programming regardless of practicality. I'm sure many of you enjoy programming, but most of you likely have practical objectives, like creating a useful web application or tool.
00:02:35.500 That’s great, but sometimes you may miss the pure joy of programming itself. We can enjoy programming without focusing solely on its practical uses.
00:02:51.190 In this talk, I want to explore the essence and joy of programming. We can utilize a powerful programming language like Ruby to write completely useless programs.
00:03:13.019 Today, I will demonstrate some of the useless programs that I have created in the spirit of transcendental programming.
00:03:36.870 Let me show you the first program. This is a simple Ruby program that prints "Hello, Hiro." It’s just a basic "Hello World" example.
00:04:02.260 Yes, it’s a "Hello World" program written in Ruby. As you can see, it’s a straightforward program, and everyone knows the phrase. It is the most famous program, but do you need anything more complex?
00:04:49.470 Next, I will show you a technique to encode and decode any given string, in this case, a Ruby program, into a natural number and vice versa.
00:05:18.990 There are many approaches to encoding and decoding, but in this case, we hold fragments of data that relate to encoding and decoding, respectively.
00:05:43.310 I will show you how to encode and decode a Ruby program into hexadecimal. This encoded format allows us to execute the Ruby program.
00:06:00.240 After this, all you need to do is process the generation. For instance, we can take a number and decode it to yield the original code.
00:06:30.979 Then, you can pass the decoded code to execute it again. However, it still won't work without defining certain constants.
00:07:00.850 Next, here's a little trick: we need to ensure all parts of the code have been defined properly, or else the code will not execute correctly.
00:07:22.840 I made a gem available for this, and the next part involves a QR code that you can scan.
00:07:53.210 If you have a smartphone, please try to read the QR code I've provided. It might be difficult to scan correctly, but don’t worry!
00:08:24.300 The next step is to ensure your device can read the QR code correctly. If it works, you'll receive a simple Ruby program.
00:09:12.500 This QR code contains a Ruby program that executes properly. Let me show you the inner workings of this program.
00:09:39.310 The program utilizes three parts: a QR encoder, a pink generator, and an analysis module that reads each part of the code.
00:10:24.500 The essence of this program is that it generates output that represents itself. It's fascinating how simple it is.
00:10:41.860 For instance, by adding a few lines of code, we can transform it significantly to create fun output.
00:11:24.760 We can create various outputs based on what we want. The ultimate goal is to show how creative programming can take shape.
00:12:17.360 Next, I'll talk about another example, which is much like the core idea of transcendental programming.
00:12:45.800 This involves taking a simple program and turning it into a piece that generates interesting outcomes using animations.
00:13:44.020 The following program represents a blend of traditional programming with visual outputs.
00:14:26.740 The program features animated outputs, showcasing how programming can also convey images and delightful experiences.
00:15:05.180 Next, I will demonstrate a musical theme combined with animations. This particular program is simple yet expresses joy.
00:15:34.310 With the musical aspect, you can create many genres of sound. Adjust the pattern, and you can play any song you desire!
00:16:38.450 It's important to see how animation and sound synthesis can work together to create a joyful experience.
00:17:00.030 Now, allow me to present one last program that combines many of the concepts we've discussed, evolving the idea of a simple QR code.
00:17:41.300 This program will showcase how we can take traditional concepts of programming and make them interesting and engaging.
00:18:10.230 We can also see designs merging programming logic with visual outcomes.
00:18:33.180 Let’s explore how enjoyable programming can be when combined with artistry.
00:19:06.880 I hope you've been entertained so far and that this illustration gives a glimpse into the kind of joy programming can bring.
00:19:28.230 Thank you for attending, and I invite you to explore the world of transcendental programming.
00:19:43.510 Remember, programming can be fun even without focusing solely on practical outcomes.
00:20:22.400 If you're interested in practical tasks, consider joining Cookpad, where there are plenty more opportunities.
00:20:43.800 In closing, continue to embrace the joy of programming and keep exploring interesting codes!
00:21:03.520 One more thing: this last program demonstrates the number of ways Ruby can create intriguing output.
00:21:40.530 This program exemplifies the relationship between data and programming to challenge traditional programming paradigms.
00:22:10.120 If you're interested, I have a book discussing more artistic programming examples. It illustrates how to push the boundaries of creativity with Ruby.
00:22:55.400 Thanks for joining me today, and I hope you enjoyed this presentation of transcendental programming.
00:23:40.560 Keep exploring the artistic side of programming, and take care!
Explore all talks recorded at Keep Ruby Weird 2018
+4