 I bought this. I'm enjoying Austin, Texas. Okay, let's start. I'm Yusuke Endo. My Twitter account is Mametta. I'm a MRI from Ruby, C-Ruby Committer since 2008. My main contributions for Ruby includes implementation of weird keyword arguments. Okay, let me excuse. I just implemented. The design was down by maths. And I implemented test seats of Ruby itself and design and implementation of coverage measurement library. That serves as a backend of, you know, simple curve. Also, I created a benchmark program for Ruby 3x3 called Opticalut. Last year, I joined Cookebot as a full-time Ruby committer. So my current job is to develop Ruby itself. Cookebot now employs two full-time Ruby committers. Cookebot is a less-specialized platform service. Currently, Cookebot supports 22 languages and services at 68 countries. This service is still growing to aim to be number one in 100 countries. To maintain this high-intensity service, we need many great engineers. So we are hiring. I'm working in Japan, but Cookebot headquarters in Bristol, United Kingdom. So if you are interested in, please let me know. Okay, I did that job. The reason why I'm here today is not because I'm a full-time Ruby committer, but because I'm one of the most weird, weirdest Ruby programmers. So today's topic, transcendental programming. I guess few people have here transcendental programming because I created this name. By this word, I mean, act to enjoy programming regardless of practicality. I think all of you here enjoy programming, but almost all of you have a practical objective, such as to create a useful web application or a tool to make your life or your customer's life easier. That's great, of course. However, you may miss some aspects of programming. Programming is joy itself. We can enjoy programming without practicality. As one way to enjoy the essence of the joy of programming, we can have useful programming language like Ruby to write completely useless, but funny program. Today, I demonstrate some of weirdest Ruby programs I created. I have created in the act of transcendental programming. I show the first program. Yes, this is a program between Ruby. Zoom up the first few lines. You see, as usual, require a method, but do you like asking it for us? Again, this is a Ruby program, so let's learn. This is a program. Hello, hello. This is a program that brings hello, hello, so that's just a hello world program between Ruby. I believe all people know hello world, so it is the most famous program. Do you need more explanation? Okay, I explain it's internal. The program is based on gather numbering. It is a technique to encode and decode any given string. In this case, a Ruby program takes to a natural number and by speedster. There are many approaches to do it to gather numbering, but in this case, these two code fragments serve as encoding and decoding respectively. And then it encodes and decodes the number to double helix-style program that is executable Ruby program. To encode the number to double helix, each first converts the number in binary notation and split into two each digits. And then each transfers each two digits to AT or CG or GCO or TA and rearrange them to double helix-style. And finally, we could get the double helix program. And to decode the double helix to original code, you can use const misting to hook the bare axis of undefined constants. After that, all you need to do is the reverse process of generation. So gather them, restore the number, decode it to the original code, and then you can pass the decoded code to even method. However, it does not work correctly yet. We need one metric. Can you tell what is missing? Okay. The answer is remove const. This is a pretty tiny constant, so we cannot hook it as is. By removing this constant, it works finally. Okay. Next. Sorry. For those who want to enjoy this double helix, I made a gem available. So please install by gem install double helix. Okay. Next. This is a QR code, two-dimensional barcode. If you have a smartphone, please try to read this. I wait 10 minutes. This is called very big, so it might be difficult to scan correctly depending upon your barcode reader. Okay. Okay. Could read this? Okay. Okay. This is a scan result. If you could read the previous QR code correctly, you will see this code. As you see, this is a Ruby program. So let's learn. Okay. This is the code and line. Oops. Okay. This is the binary of ping image. So if you scan this QR code, you get this Ruby program. And then this is executed to put the QR code in ping style. So this is a QR code that has a Ruby program that generates it as a ping format. Okay. Let me show the internal. The program has three features, QR encoder and ping generator and a coin. I colored each part of code. The blue and cyan parts are QR encoder. And the red part is ping generator. But the essence of this program is so-called coin. Coin is a program that outputs itself. We can write a very simple coin in Ruby like this. It is difficult for me to explain how it works, but it works in two steps. The first step is reconstruct itself as a string. In this case, blue part does so by using inspect method. And the second step is to print out the string, generated string. So coin is interesting itself, but the structure is so simple. We can easily add some additional steps to make the exact coin more funny, funnier. In this case, for the QR code case, I added two steps. This is a normal original coin code. And I added encoded QR encoder and ping generator. Instead of printing the string as is. So I after I implemented these two methods, I could get QR code program. The last program that I will show in this talk are related to coin. Transcendental programming is not equal to coin, but coin is one of the most suitable themes because coin is interesting but completely useless. Next, what is this? This is a clock. Yeah, so let's run. Okay, the program and run it. Yeah, 7, 13, 21 seconds. And the output is executable, of course, so we can run it like this. Yeah, yeah. Okay, so this is a so-called coin, a coin clock or clock. That tells time as a code that tells the time as a code that tells the time, blah, blah, blah. Yeah. Okay, in turn. I briefly showed in turn. This is a coin, too, but instead of printing itself as is, it will format the code to ask it of current time. For sake, I use two additional techniques, font data embedding and executable as yet. They are really interesting, I think, but there's no time to explain them, so please watch the video of my Ravecon talk last year. Okay, next, this is a coin, too. Okay, let's run. Okay, this is a program and run it. Okay. As you see, this is a coin that output itself with spider animation. So this is a combination of coin and animation. Animation by Dan, by using terminal escape sequence, as Will said. And so this program uses a terminal escape sequence to move the castle. It uses four types of escape sequences to move castle up, down, right and left. This program prints one of these escape sequences after it returns. As a result, the output of this program contains many escape sequences. So let me show. This file is created by, like this, but it takes a few minutes, so I save the file. Yes, it is binary, like this. It has many escape sequences. So some of you may think that this program is not a valid coin because the output is not the original code. So you are right. However, surprisingly, this file, this binary file, can be interpreted as a valid Ruby code, executable with script. Like this. Yeah. So this output is carefully designed as a valid Ruby code, even if it includes many escape sequences. Okay, next. This is a music box coin. Okay. This is a code. Okay. This is also a simple coin, but with playing a music of this joy of man's desire. This program contains two parts. The head part, whose form is a musical note, is a coin and a sound wave synthesizer. And the long tail part is music seed data. So if you realize that music test, it can play any music you like. The head part leads the tail part and generates sound waves and sends them to the sound driver. Okay. I played just a video. This is a combination of animation and music synthesizer. This is a program called Meric Coin Man. Okay, this is also coins. Thank you. And this is the final last program in this talk. I call the program coin. This is a lot different than the previous coins I have shown so far. Okay, let's run. This is just normal coin. Here, imagine one letter is removed from the world. Consider we lose A, character A for example. So remove all the occurrences of A by using set. The original program is exact square, but the output program is not exact, no longer exact square. So actually this program has no character A, but not found. So this file is broken, you may think, but it works with no exception. And the output is the same. Did you understand? So the program is a word game to write a paragraph in which a particular letter is avoided. The program coin is a coin that works even if any one letter is completely removed. In this case, we removed character A, but we can remove any one character instead of A. You can remove B or C or any character. And I briefly show its internal. This code shows core code trick. This code contains a string literal, and followed code 2. And code 1 is included as a string literal, so this code executes code 2. But if A is removed, this part now becomes a string interpolation. So code 1 is executed. Code 1 is followed by exit method, so this Ruby process terminates before executing code 2. So in other words, we can use this trick to check if a letter A is deleted or not. So cascading this trick, we can detect if any of the set of letters is deleted or not. So this code executes the letter path by default. If A or B or C are removed, some letters in this line are removed, the form of path. This path is executed. The remaining task is to write this and this code. We need to do this path of code by avoiding any of the letters set. But it is not easy, but it is possible. Yeah, okay. That's all. I just showed a handful of programs I have ever written. If you want to see more weird programs, please buy my book, Aaron introduced. The world of sophisticated asterisk artistic programming. It contains about 40 programs like this. Unfortunately, Aaron said it is written in asterisk Japanese, but you can understand the program because they are written in... Many programs are written in Ruby, or C that you know. Alternatively, you may want to see a trick, a programming contest that I have heard three times. The two programs I showed in this talk, Spiral Coin and Music Box Coin are the winners of this contest trick. You can read and enjoy the previous winners, other than mine, at this URL. I conclude this talk. Ruby is so powerful and weird enough, I think. Actually, we are better than you know. We don't have to keep it weirder. I don't know. What I want to demonstrate in this talk is Ruby programming is a real fun. It is true even without practicality. But anyway, if you are interested in only practical programming, please join QuickPath. There are many practical tasks which we must address in Ruby. Okay, one more thing. Thank you. This is a client created for cheap Ruby wires. This program depends on the platform, so I'd like to play a video. Okay, let's start. This is the program. That's all. Thank you.