iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💎

RubyKaigi 2024

に公開

RubyKaigi 2024 was held in Okinawa from May 15-17, and I went there. Here's my record of the event. I finished writing this within the month. Good job, me!

Day 0

I used to travel all over the country for business, so I've been to Okinawa about four times before. This was my first visit in 12 years. I have memories of going out for drinks after work, wandering around, and finishing with a steak at around 5 AM...

However, Okinawa is far. Lately, I don't go on business trips at all—in fact, I hardly ever leave the house—so it feels even further. It took about six and a half hours from my place.

Took the Yui Rail from Naha Airport. Speaking of the Yui Rail, I actually rode it on its second day of operation. Back then, it would stop out of alignment with the platform, and the driving was pretty rough. Naturally, that's not the case anymore. It's convenient that Suica is now supported.

Went to the venue, "Naha Cultural Arts Theater NAHArt," for pre-registration.

ESM Night Cruise at RubyKaigi 2024

https://esminc.doorkeeper.jp/events/171826

After checking into the hotel, I went on the night cruise.

I knew that Eiwa-san's RubyKaigi night cruise was also held in Fukuoka in 2019, but I couldn't board back then, so this was my first time.
The weather wasn't the best, but as a resident of a landlocked prefecture, just seeing the ocean gets me excited. It was wonderful.


Day 1

Writing Weird Code

https://rubykaigi.org/2024/presentations/tompng.html

Keynote.

At RubyKaigi, there are occasionally presentations of strange code called TRICK. The last one was probably in 2022.
TRICK 2022 (Returns) - RubyKaigi 2022

This keynote was a one-man TRICK. It was amazing. He was a technical wizard (in a good way).
The recording should be released eventually, so I want even people not interested in Ruby to see this.

It seems TRICK will be held next year. Looking forward to it.

Namespace, What and Why

https://rubykaigi.org/2024/presentations/tagomoris.html

This is about introducing namespaces to Ruby to allow using different classes or modules with the same name within a single program. Extension libraries will also be supported.
It looks like we'll be able to mix multiple versions of the same library, or mix completely different libraries that happen to have the same name.

I think one reason there are many libraries with strange names in Ruby is that there's only one namespace, so I'm imagining that if name overlaps become okay, we might see more libraries with common names.

Wonderful. It's full of potential. Looking forward to it.

An adventure of Happy Eyeballs

https://rubykaigi.org/2024/presentations/coe401_.html

This is about making Ruby's Socket.tcp compatible with RFC 8305 - Happy Eyeballs Version 2: Better Connectivity Using Concurrency.

Happy Eyeballs is a mechanism where, when hostname resolution returns both DNS A (IPv4) and AAAA (IPv6) records or multiple records, it attempts connections in parallel and adopts the first one that connects, closing the others.

I quite like this kind of approach where a problem is clearly defined and solved straightforwardly.

It was implemented using threads, but I was a bit concerned about resource consumption. I wonder if it couldn't be implemented with Fibers? Though I don't know much about Fibers.

RubyKaigi 2024 Official Party

https://ti.to/rubykaigi/2024-party

In the evening, there was an official party at a venue by the sea. As a resident of a landlocked prefecture, just being by the sea... (etc.)



Day 2

RuboCop: LSP and Prism

https://rubykaigi.org/2024/presentations/koic.html

I use rubocop --lsp. It's super convenient.

Good first issues of TypeProf

https://rubykaigi.org/2024/presentations/mametter.html

A tool to make Ruby more convenient with a VSCode extension.
I wasn't sure about something that only makes VSCode more convenient, but since it seemed to be using LSP, it might be useful in Emacs as well.

Running Optcarrot (faster) on my own Ruby.

https://rubykaigi.org/2024/presentations/s_isshiki1969.html

A talk about implementing Ruby in Rust.

Leaner YAKINIKU Party at RubyKaigi 2024

https://leanertechnologies.connpass.com/event/313568/

In the evening, I attended Leaner's party.

Day 3

Ruby Committers and the World

https://rubykaigi.org/2024/presentations/rubylangorg.html

frozen string literal

There was a talk about string literals becoming frozen by default in the future (Ruby 4?).
Up until now, writing "hoge" was the same as +"hoge", but it will become like -"hoge".
This seems beneficial for YJIT and Ractor.

Well, I don't really mind either way, but I understand the sentiment that having to explicitly write +"..." is a bit uncool.

Also, I feel the behavior in Ruby 3.4 is a bit ambiguous.

s = "hoge"
s.frozen?  #=> true
s.upcase!  #=> warning: literal string will be frozen in the future

The state where it is "frozen but still modifiable" feels half-baked.

Type Specification via Comments

The reason I haven't quite embraced RBS is that it's in a separate file.
I tend to write types in YARD format, so I'd be happy if those could be checked statically—preferably in a format that's also easy for humans to read.

Is GVL Necessary?

If the GVL were removed from Ruby, I suspect a lot of code would stop working in multi-threaded environments.

async / await

I think async/await was a syntax introduced in JavaScript as a workaround to escape callback hell because it couldn't handle parallel processing, so I don't really feel the need for it in Ruby.
If you want to do concurrent processing on a single thread, we already have Fibers.

Speeding up Instance Variables with Red-Black Trees

https://rubykaigi.org/2024/presentations/tenderlove.html

I only know Red-Black Trees from a brief glance at algorithm studies, so I didn't quite follow the details.

ERB, ancient and future

https://rubykaigi.org/2024/presentations/m_seki.html

A talk about ERB. I feel like I heard a similar talk in Matsue as well.
As a fan of Seki-san, I could listen to it any number of times.

Using Ruby in the browser is wonderful.

https://rubykaigi.org/2024/presentations/ledsun.html

A talk about ruby.wasm.

It's great that require_relative will become available. Until now, if you wanted to load something other than pre-bundled .rb files, you had to use <script type="text/ruby" src="..."> in HTML. Being able to use require_relative makes it feel much more like writing standard Ruby.

Recently, for my private projects, I've been writing even the browser-side code entirely in ruby.wasm instead of JavaScript, so I hope it continues to get even better.

Matz Keynote

https://rubykaigi.org/2024/presentations/yukihiro_matz.html

Performance is important x 4

Apparently, most of the features envisioned for the language "Ruby2" (not 2.0) have now been implemented in the current Ruby.

I think he mentioned that once Namespaces are in good shape, it might be time to move to Ruby 4.

Closing

The next one will be in Matsuyama, Ehime. That's far again. It looks like it'll take about 6 hours from my place even by plane.



RubyKaigi 2024 After Party sponsored by mov

https://connpass.com/event/313947/

The After Party was held at "Noren-gai," a building filled with various shops that was reserved entirely for the event.

Remembering last year's After Party in Matsumoto which had a similar concept, I wondered if it would be so packed that moving would be impossible, but it was actually quite spacious, and I was glad I could find a seat.

Day 4

I booked a late flight, so I spent some time wandering around Naha on my own.

The flight was scheduled such that if it had been even slightly delayed, I wouldn't have made the last train home. I'm glad I made it, but I should have booked a flight with a bit more buffer from the start.

Had a late breakfast at "Tamagusuku Tofu no Misoshiru-ya" after checking out of the hotel.

There was a huge tree in a nearby park. It felt quite exotic.

Walked to the sea. I thought it would have a great view, but there was a road crossing the line of sight, which was a bit disappointing. The water was beautiful.

Visited Shuri Castle for the first time in 12 years. Apparently, the reconstruction is set to be completed in 2026, so I'd like to go back after that.





Others

I got a tin badge at the SMS booth. It's nice because it seems usable even after RubyKaigi.

https://x.com/BM_SMS_Tech/status/1783752214235975850

I was tending our company booth on the morning of Day 2, but since I was free, I walked around other booths and won something that looked expensive at the mybest booth.

https://x.com/tmtms/status/1790932182158266752

I asked my family about it, but only one person (living separately) knew its value, so I decided to give it to them.

On Day 3, I finally got my hands on a bento and Blue Seal ice cream.


Around Day 3, my throat started hurting. I thought it was from talking too much, but from Day 4, I had a cough. On the night of Day 6, I had a slight fever of about 37.4°C. However, it went back to normal the next day.
Well, with over 1,000 people gathered in one place and drinking parties every night, it's no wonder one would catch something.
The symptoms were like a mild cold, but looking at other people's tweets, it might have been COVID-19.
Stay safe, everyone.

This was the third RubyKaigi where the company I belong to was a sponsor, with over a dozen employees participating and setting up a booth to have fun together, but I still find myself not quite used to it.

Discussion