This video contains 2 individual talks

Ruby Hack Challenge
+9
See all speakers
See all 9 speakers

Sections in this recording

Summarized using AI

Ruby Hack Challenge

Koichi Sasada, Aaron Patterson, Yukihiro "Matz" Matsumoto, John Hawthorn, Eileen M. Uchitelle, Peter Zhu, Alan Wu, Yusuke Endoh, and Akira Matsuda • November 14, 2024 • Chicago, IL • Talk

Ruby Hack Challenge Workshop Summary

In the workshop titled Ruby Hack Challenge, presented at RubyConf 2024, the Ruby Core Team, led by Koichi Sasada, invited participants to learn how to hack the Ruby MRI (Matz's Ruby Interpreter). This session aimed to enhance the understanding of the Ruby interpreter's internals and explore the development of new features ahead of the forthcoming Ruby 3.4 release.

Key Points Discussed:

  • Introduction to Ruby MRI: The workshop began with an overview of the Ruby interpreter, emphasizing that it operates at a low level mainly written in C, contrasting with user-level Ruby commands that developers commonly use.

  • Workshop Goals:

    • Attendees were encouraged to modify the Ruby interpreter and experiment with features in the upcoming Ruby version.
    • Participants were to change the version string of Ruby and customize their interpreters with simple modifications.
  • Practical Exercises:

    • The initial exercise involved altering the Ruby version string in a creative way.
    • Attendees could explore various modification exercises laid out in preparatory documents shared prior to the workshop.
  • Interaction with Core Developers:

    • An Ask Ruby Core Developers session encouraged attendees to engage directly with core team members, highlighting the importance of community feedback on Ruby features and bugs. Topics discussed included new methods for garbage collection and visualizing VM internals.
  • Open Forum: Various ideas related to Ruby internals were proposed, including:

    • Implementing Python source code execution in Ruby through here documents.
    • Sound effects in Ruby conditions based on program execution flow, showcasing the creative potential of Ruby hacking.
  • Project Collaboration and Development: Attendees learned about collaboration practices within the Ruby community, including weekly meetings and the importance of managing development goals and project priorities. The Ruby core team members shared their insights into improving Ruby and handling issues like performance optimization and memory usage.

Conclusions and Takeaways:

  • The workshop not only provided a platform for hands-on experience with Ruby internals but also emphasized the collaborative spirit of the Ruby community. Participants left with:
    • A better understanding of Ruby MRI
    • Practical skills in modifying the interpreter
    • Connections with Ruby core contributors for further collaboration and inquiry about Ruby’s future.

Ruby Hack Challenge
Koichi Sasada, Aaron Patterson, Yukihiro "Matz" Matsumoto, John Hawthorn, Eileen M. Uchitelle, Peter Zhu, Alan Wu, Yusuke Endoh, and Akira Matsuda • November 14, 2024 • Chicago, IL • Talk

Come try your own internal hacking on the Ruby MRI!

This workshop introduces how to hack the Ruby interpreter with the text
https://github.com/ko1/rubyhackchallenge/tree/master and Ruby core committers.

We welcome you If you have
* interest how to work the Ruby interpreter
* questions about Ruby interpreter
* ideas to improve Ruby interpreter
* tickets you issued on our Redmine

Also we held "Ask Ruby core developers" session (12:00-13:30) so you can ask anything you want to ask.

RubyConf 2024

00:00:15.519 uh thank you for introduction so uh today I we held the Ruby hack challenge
00:00:22.320 so Ruby hack challenge is a uh the the hacking the MRI so Luby M Luby
00:00:31.800 interpr interpreter or implementation so little in see so maybe
00:00:38.879 in at the other rooms maybe they loot Ruby but in this room you need to like C
00:00:47.879 C language so maybe maybe most of people
00:00:53.399 using Luby interpreter so the small letter small four letters Ruby command
00:00:59.239 so Ruby command is uh L in C and maybe
00:01:04.720 you are using and you have some interest about that the this in software so I
00:01:11.880 want to we want to guide to hack The Interpreter
00:01:17.880 itself so the goal of this Workshop is
00:01:24.920 hack uh Luby interpreter with your faite modification or try recent features so
00:01:33.720 Ruby 3.4 will be released soon and the Ruby master branch has many new features
00:01:41.280 so please try on your laptop such a new
00:01:47.079 features and if you have any issues or
00:01:52.320 any requests so maybe M will be this a
00:01:58.560 maybe one uh later so you can discuss so
00:02:04.079 I don't like this feature or something like so you can ask him directory and the uh the quiz will be
00:02:14.280 more easier I think anyway so uh I want to I want to show
00:02:20.599 some the ground of the Luby interpreter so Luby interpreter is the B so usually
00:02:29.040 your application excuse
00:02:43.400 me usually you are liting application with many gems so such as Lu l or
00:02:50.599 something like that and the Luby interpreter is based based at the lowest
00:02:57.440 lower uh lowest level of the the software stock however the from the
00:03:04.480 Ruby interpreter perspective all of Ruby James your applications
00:03:10.440 Ru softwares or something like that everything are Ruby script and they are
00:03:17.239 pass to the abstract syntax 3 and compile it to the Ruby bite code and
00:03:23.239 Ruby uh interpret by the the interpreters so
00:03:30.680 in this Workshop uh we will uh modify this area so Li interpret
00:03:41.040 internals so we have some steps so uh we we
00:03:49.280 prepare uh uh the document maybe you can sh you already know the website about
00:03:56.400 the Ruby hack Challenge and you can read every every document so the at first the first exercise is to
00:04:06.159 change the version string so Ruby Ruby Das Bui shows the Ruby version string so
00:04:13.599 you can modify anything you want for example your name is Ruby
00:04:19.759 or python or power or something like that so anything you can you can change
00:04:26.400 the verion string maybe it is very easy step but better it's your own
00:04:32.720 interpreter so please try make to make your own Lu
00:04:38.560 interpreter and after that so please enjoy the leing the documents and try
00:04:45.080 the exercise in the documents or if you have any interest uh about to introduce
00:04:52.720 a new features such as a make a new method or making a new mechanism for
00:04:59.360 example in virtual machine garbage corlection or something like that maybe there are many experts in this room so
00:05:06.280 you can ask then to how to how to make it or something or or uh try the newer
00:05:15.479 newest Ruby interpreter so the priorities of Ruby 3.4 and so
00:05:30.720 idea so if you have the the favorite features so there is no problem so
00:05:37.800 please try to implement that or fix a bug so you can find the bug report or
00:05:45.680 feature request reports on the uh this website so bugs L all issues so many
00:05:55.160 people report to the uh new issues on this side so please check this one and
00:06:03.520 uh check check the uh feature request or bug report and for example so on The Bu report so
00:06:12.319 reproducing process is very important for us so for example so checking the uh
00:06:20.240 the reproducible code or something like that and the uh report new report so I
00:06:27.120 can also uh reproduce this issue or something like
00:06:32.160 that uh another idea is another strange idea is uh so for example we have a here
00:06:40.639 documents in Luby so here document we can write uh any text so we can write
00:06:48.160 the C source code R source code or python source code anything anything and
00:06:54.759 how about to run the here document with the for example the uh
00:07:02.120 python interpreter so this is one uh simple idea or another weird idea is to
00:07:09.039 sound the high tone at the if the so
00:07:15.759 modify the vir machine and the sound uh sound High tone when the if statement
00:07:24.800 the condition was true p and
00:07:30.759 low tone B at the condition was forse so
00:07:37.720 the program will uh sound strange music or uh so this is where idea but
00:07:46.360 the so this idea is from the students so high school students and they they can
00:07:53.159 uh sound great music with some applications or uh we so for example if
00:08:00.000 you have interest about uh about uh uh
00:08:06.120 mechanism of v machine so visualize the internal stack machine Stacks oh sorry v
00:08:12.280 machine stacks and shows the many stack
00:08:17.800 growing and growing and so on is a very
00:08:23.400 uh uh easy to see the the what the B Machine interpret that is
00:08:32.000 doing so this is only idea so you can you can make your own
00:08:39.240 idea so lecture materials is here and the schedule is here so you
00:08:47.839 can so this guide only uh 10 minutes and
00:08:55.000 after that so you please enjoy your Ruby uh hacking sorry Ruby hacking Ruby
00:09:03.519 interpret hacking on yourself and please ask us for uh if you have any
00:09:12.800 trouble of course this uh this room only
00:09:18.040 has a few tables so of course you can go out
00:09:23.680 to hug there with your laptop uh outside of this room or in your uh hotel room or
00:09:33.720 anywhere and the the I want to emphasize that uh from
00:09:39.560 the TW 12 at noon so we have uh we have
00:09:44.720 make we will make ask Ruby core developer session so please raise your
00:09:50.720 hand you you Ruby core developer so so many Ruby developers so
00:09:58.640 uh thank you so much so they can stand or sit down around there so
00:10:05.880 you can ask anything uh with uh uh to
00:10:12.640 us so after that ah
00:10:18.279 so I want to ask that to prepare this uh ask uh am session so please write your
00:10:27.040 question on the this H MD page your question to this uh page so
00:10:33.680 any anyone can write the the hugd page so please uh play please write
00:10:42.160 your questions and we can manage these questions and after lunch so please uh
00:10:50.839 continue your uh interpret hacking and after that so at the uh
00:10:59.360 last of this Workshop so maybe someone have your achievements so
00:11:07.000 please please talk your achievement at this
00:11:13.440 stage okay this is uh everything about this Workshop
00:11:20.399 so again could you so Rubik Comm please come here and
00:11:28.959 uh could you introduce yourself with one
00:11:41.519 message so you so you can you can uh
00:11:46.959 memorize the name the PA and
00:11:53.000 name this is my face my name is Eileen uh or Eileen
00:11:58.920 codes on the internet so I don't know you
00:12:05.120 next hi my name's Aaron um I like I like I like hacking on Ruby so if
00:12:12.560 you have any questions about hacking on Ruby core stuff please come say hello and I will help
00:12:20.240 you uh I'm John Hawthorne or Jay Hawthorne looking forward to
00:12:28.000 hacking uh I'm Peter zoo I work at Shopify on
00:12:33.720 Ruby GC yeah specifically
00:12:39.199 GC I'm Allan I work on wedget stuff at Shopify I'm friendly but maybe I lack
00:12:47.199 interpersonal skills compared to some of the rest of these guys so don't read too
00:12:52.279 much into my behavior and and come come ask me if you have any questions
00:13:02.279 hi I'm from Japan I I I'm a rails guy actually but I run a conference in Japan
00:13:10.160 called Ruby Ki I hope to see you all there in Japan next year thank
00:13:18.279 you I'm yke uh my uh account name is
00:13:23.560 Mame M and you may uh see my name in the
00:13:29.320 B tra of duby and so I think I have the uh the least
00:13:36.079 communication skill because I am very I am very poor in English but I will give
00:13:42.079 it TR so please uh ask anything thank
00:13:52.720 you thank you so much so the Okay so the guidance is over so
00:14:03.279 please enjoy your uh interpret hacking
00:14:14.519 enjoy uh please join the uh this slug channel on the this
00:14:21.560 conference Workshop Ruby hug CH oh yeah we don't
00:14:26.920 need all right let's do this I
00:14:33.440 guess all right Ruby core team please come up here to the stage we're going to
00:14:39.240 do Q&A now this is so this is your opportunity
00:14:46.959 to ask the Ruby core team questions air
00:14:53.720 grievances maybe get Matts to commit your favorite feature to the language
00:15:04.720 so we've got um I don't know if you all saw the the hackmd thing in the in the slack uh but we
00:15:12.480 have um we have a hackmd where you can add add some stuff to it we're just going to go through all these and
00:15:17.880 discuss discuss them uh this is a bit of a like this particular format here is a
00:15:24.160 bit of a tradition that we have at uh Ruby kige and we're bringing it here to ruon so only in a little bit smaller
00:15:31.839 format there are a few there are a few more Ruby core team members in Japan
00:15:37.600 than there are here a few just a few all right um let's see so we did we did the
00:15:44.199 hack challenge we're going to do some stuff here so we got a question our first question is I'm put it I put them
00:15:52.040 up here on the board but I I'm going to read it aloud for you all uh Matts you
00:15:57.160 published that Ruby 4 will be shipped with annotation features at Euro
00:16:04.199 2024 could you could you elaborate more kichi is asking what what is do we have
00:16:10.399 another mic ah thank you
00:16:16.199 so matx what is The annotation what is that what does that mean annotation
00:16:21.880 feature yeah I'll try to kill some more time
00:16:27.880 while we wait for the it's okay
00:16:36.279 testing yeah okay great I have another one too that yeah sure please great I'll
00:16:41.920 be right back the The annotation is kind of the the the adding meta information to the
00:16:49.600 code like a you know it's kind
00:16:54.839 of kind of similar to the for example the Cs the attribute or the the python
00:17:01.839 declaration or something like that but the the python declaration is to close
00:17:07.520 to the code so the the think about the Cs that attribute is the kind of close
00:17:13.000 thing so the uh The Meta programming code can uh retrieve the meta
00:17:18.919 information uh added by The annotation so that uh we uh add the modify the code
00:17:27.480 according to the the Val of the attribute that's but uh I have no
00:17:32.919 concrete plan yet so that it's just a vague idea so what does The annotation
00:17:38.240 look like is it going to be part of the language like
00:17:49.919 like that I haven't decided decided the any appearance yet for example the uh in
00:17:56.280 some language we uh they use the the double square bracket but it it has
00:18:11.919 open where do I put it
00:18:17.159 yeah yeah double bracket double brackets before the death before the death ah
00:18:23.960 okay okay okay so like um uh square bracket square bracket
00:18:30.320 to open open too open ah okay I see sorry like that then
00:18:39.400 something yeah or say read only or something ah okay
00:18:45.880 okay like yeah like that but double braet itself has the the
00:18:54.000 you know to proper meaning in Ruby already so that we we cannot use that but but kind of like that okay
00:19:03.799 okay you don't show The annotation talk at this R keynote yeah because it's too
00:19:12.640 big to explain in the public I
00:19:18.400 see okay uh usually I put some kind of the you know the very early ideas into
00:19:24.960 the keynote traditionally so that uh when
00:19:33.240 I UNC counted the the ideas in the the Recon Keynotes it was the uh only 70% of
00:19:42.640 the these vague ideas are implemented in the that Canon Ruby okay I'm not sure
00:19:49.200 The annotation will be which which category you know not implemented or
00:19:57.400 implemented okay should we move on to our next
00:20:03.120 question Matt's feature 2025 was merged uh in the other hands there are
00:20:09.400 some reports which show many warnings do you want to continue it what is 2025 let's take a
00:20:22.360 there we go Frozen string literal by ah I'll
00:20:37.640 this because go of the performance yes and I like it and I and I don't I hate
00:20:43.799 putting that comment because we put the comment we have to put that comment
00:20:50.520 everywhere and too many people like copy like files and like don't actually
00:20:56.760 fix stuff so it's all messed up they don't know what they're doing so just get rid of that comment I hate it yeah
00:21:03.720 we should we should make a default so we don't have to do this comment you mean a magic comment
00:21:10.679 yeah this com this like okay how many people in here
00:21:16.360 do you put this at the top of all your files yeah does it suck you have to put
00:21:21.880 this yes
00:21:34.159 yeah but this this feature so this if I remember correctly this feature it doesn't break anything right now it just
00:21:39.799 warns you that you could be mutating it and it gives you the opportunity for you to put this comment but you put you can
00:21:46.880 specify false here so you if you don't want to change your code you can just say I I do not want Frozen string
00:21:54.080 literals
00:21:59.320 yeah if if you really if you really need you can also run the whole interpreter
00:22:04.600 with uh disable Frozen string literal so if if you have some Legacy application
00:22:10.240 and don't have the ability to go through and fix everything you should still even when this becomes default someday you
00:22:15.600 should be able to turn it off all right so to be honest I'm not a
00:22:21.679 fan of this change and I think uh Ruby is free so Ruby sing also free for
00:22:30.360 modification by default so I don't like this change I think uh M was wrong about
00:22:51.400 this what yeah so just now we have a warning
00:22:58.640 for the uh modification to the literal just now and there are some reports
00:23:05.360 there oh so many such a warning so so act at from actual application I'm not
00:23:12.480 sure but so with this report you don't change your mind just now not yet
00:23:22.240 be yeah mostly because of the so many people already use the the magic comment
00:23:28.039 true so the use the string Frozen string literals and the second things is that
00:23:33.919 we still expecting the performance Improvement by the uh the the Frozen
00:23:41.200 string lead oops uh actually the the when I got this idea first I expecting
00:23:49.440 the the much more uh performance Improvement because of the uh the the
00:23:56.200 lower GC pressure for string or something like that but in reality this
00:24:01.880 is not that much yet so that yeah I
00:24:08.240 hope I still hope that still we still have the room to improve the
00:24:29.840 that's Lake test task adding DW atically
00:24:35.240 oh does it h I think we shut it off in rails I'm pretty
00:24:40.360 sure don't we I don't think so you don't think so no like the default like I think the default test tasks don't run
00:24:46.520 with dasw it does it oh good only on c not
00:24:54.720 oh only on CI apparently but no that's true for rails
00:25:03.200 itself but rails apps I don't think it runs with d yeah I don't think that runs
00:25:08.559 with DW I think I think it does does it does anyone
00:25:15.799 know okay uh oh this is my secret branch
00:25:30.919 yeah don't get too excited please let's
00:25:37.720 see how do I make a new app bundle EXA
00:25:56.360 ties sure oh we got to do Dash Dev
00:26:07.039 okay oh this is going to take
00:26:13.440 forever let's go back to the this guy all right so what do what do we
00:26:18.960 think here Matts we're going to keep this yes
00:26:26.440 yes yeah yeah under current situation yes but okay
00:26:32.240 yeah I'm not fully satisfied though but yes uh all right our next question here
00:26:39.360 is from koichi it says to Shopify Ruby core team I guess that's the four of
00:26:46.039 us these three plus me um how how to
00:26:51.240 communicate with each other and how frequent do you share the details of each other's projects
00:26:57.240 um very should I answer that you guys care you guys want to comment you
00:27:05.919 comment is that on now okay uh we have like two three meetings a week sometimes
00:27:12.840 it's too many but we talk about that and then we have a little geekbot thing that
00:27:18.840 asks us about our project and then if we need more meetings we have more meetings so like I would say communicate a lot
00:27:26.399 about our projects
00:27:32.279 we have we have weekly weekly meetings between all teams do you make a a big
00:27:38.399 goal for for some period for example a one year goal or half year goal or
00:27:46.720 quarter goal or something like that our
00:27:54.000 process somewhat gets contaminated by The Wider project management process I Shopify so
00:28:03.279 uh we do the longer term planning through that I'm not I I can't go into the
00:28:09.840 details because it's it's the side by the higher ups they kind of come down do this sort
00:28:17.720 of planning and there like set dates and whatever but also at a lower at the team
00:28:23.080 level we have our own internal GitHub board where we prioritized that
00:28:32.000 way so I also want to add that uh each of us as individuals have a lot of
00:28:37.440 autonomy on what we do and for example um when when I have ideas for new
00:28:44.080 projects I do prototypes and MVPs for a couple of days maybe a week um to
00:28:50.279 demonstrate the feasibility and the benefits that we get and um and and once
00:28:57.279 we demonst rate that we can propose those as projects to to our leadership
00:29:02.360 to to our management um and they formally become projects depending on um
00:29:09.240 our capacity as like you know how many projects we have going on at the same time um and and based on priority um so
00:29:18.080 you know some examples of this is work that I've done in the past with uh memory management inside of Ruby such as
00:29:24.960 the Ruby M Che gem or the Ruby fre at exit feature that was introduced in uh
00:29:30.360 Ruby 3.3 to um make tools like valind or asan address sanitizers by Google uh
00:29:38.000 those tools to work on Ruby so you can find memory leaks inside of Ruby or in Native gems such as
00:29:44.519 noiri um and whatnot and uh those were features that that you know I had an
00:29:51.640 idea my mind and they weren't in any sort of formal uh planning but uh we we
00:29:58.159 worked on those uh because uh like people on the team like demonstrated
00:30:05.120 that these features uh are are useful and they can be implemented within a few
00:30:10.720 months see thank we're blessed with great
00:30:16.440 managers I see like goof so the background of this question
00:30:22.000 is that the Ruby is open source software and there are no managers
00:30:28.640 so maybe this is the first time to uh get such a sophisticated work row so I I
00:30:35.840 want to ask us how to do that so this this was background thank
00:30:41.519 you okay let's move on to the next question what is your development
00:30:46.799 environment coichi asks you are using sir
00:30:53.039 ma no I prefer Linux Linux or
00:30:58.799 what were you using lenux I'm MAC Osos but have access to those Cloud things
00:31:06.960 for Linux I I use a mix of Mac OS and Linux I have a Mac OS machine but it's
00:31:12.760 kind of like a my dumb terminal I'm usually that's aent to Linux machine but then if I'm on an airplane I'm
00:31:19.600 developing on Mac OS so both and and Vim
00:31:25.679 yeah Vim everyone use
00:31:30.840 beam no no what do you what do you
00:31:45.480 use I I use a mix of Mac OS and Linux
00:31:50.679 2 um my because work supplies me with
00:31:56.519 the laptop and I like the immediacy of the the responsiveness of typing straight into
00:32:04.080 the laptop I use maos but for some
00:32:09.639 Advanced tools like RR which allows for time traveling debugging those are only
00:32:15.039 available on metal machines on Linux so even with like if you rent a VM with AWS
00:32:22.840 for example that wouldn't even work so for for specific tasks like say you get
00:32:29.039 a bug report that's Linux specific you have to use Linux it's always
00:32:40.279 mix Maco is an envm nice
00:32:47.440 yes I think I am only one uh oh okay too
00:32:52.639 uh I I I use uh windows and uh but
00:32:58.519 uh Native Windows is not uh for me so I'm using vir machine called
00:33:06.039 WS2 and as I edor uh I I was long fan of V
00:33:13.480 but recently I use uh V code okay I also
00:33:18.919 use a wl2 on Windows and they're using the uh emo Chrome editor nobody use the
00:33:27.080 XY Z that's
00:33:39.360 Linux and then my desktop is Linux and I use
00:33:46.679 emx I use emx I use emx okay we have one emac user
00:33:54.080 oh me uh I use I use Mac OS and Linux but I use
00:34:01.000 um what what questions should we do here I feel like we should take some from the
00:34:06.440 audience should we do this one yumian let's do this one how do we make
00:34:14.000 strings faster in MRI any ideas
00:34:29.800 the one the one idea is the for the very big and long strings that we can use the
00:34:35.119 data structure named rope but uh I have no other idea
00:34:52.320 ticket the string adoption yeah string adoption uh uh how do I search this
00:34:59.960 thing yeah I didn't write I haven't write the answer yet to the that issue
00:35:05.359 but I don't like the name adopt
00:35:28.800 where is it a do I don't see his ticket lat issues latest issues
00:35:41.280 okay oh
00:35:55.119 okay no
00:36:00.400 no uh adopt
00:36:06.560 okay thank you
00:36:11.920 20878 there we go okay so I'll I'll describe this for
00:36:18.440 everybody here in the audience what this is is a c API that creates a string
00:36:24.240 object uh given so you you give it a uh list of characters in C and it
00:36:31.520 creates a new string object with that the difference between this API and our current API cap API is that when you say
00:36:37.760 hey make a new string for me please and C it'll take that string it'll mem copy it into its a buffer that it owns in
00:36:44.200 this case we're saying Hey I want you to make a string object but I want you to take ownership I want you to take ownership of these bytes so the idea
00:36:51.319 behind this is that like say we read something off of the network uh every time we want to make a new Ruby string
00:36:56.760 we have to copy all the btes that we read off the network in this case we're saying hey I don't want you to copy those bytes I just want you to own them
00:37:03.119 now so it allows us to create new Ruby strings without doing a bunch of mem copies so that's one
00:37:10.720 idea but apparently Matts doesn't like the name adopt so but you're not against the
00:37:18.240 feature in general yeah
00:37:24.839 okay all right let's pick another another
00:37:30.040 issue uh sure yeah let's do okay yesterday you
00:37:38.160 touched on autot typing being introduced to Ruby what would that look like and what does it mean for
00:37:44.880 RBS uh the r RBS is the part of the technology that forms the the automatic
00:37:50.880 typing probably okay so it'll help with autot typing
00:37:57.160 okay
00:38:03.680 uh any plans for better rust extension support EG official bindings and the
00:38:11.079 like I think the answer is
00:38:16.880 no uh do Alan do you want to comment I have strong opinions about
00:38:22.800 this because in the company we have a bunch of people writing Russ extensions
00:38:28.599 and have Labor under the the false assumption that they're safe and usually
00:38:37.680 when it it's a big red flag because they we we've ship rust extensions to
00:38:44.680 production and they've fallen over multiple times and it's in and the
00:38:51.000 categories of bugs in there are the type of bugs that you would think rust solves
00:39:00.040 so I'm I'm biased against more rust extensions and the the worst part is the
00:39:07.599 the people riding the the Russ extensions don't have the rec of
00:39:14.000 knowledge debug those problems and the production debugging ends up falling
00:39:26.599 so I would pref for uh at least at least not in the
00:39:33.160 current shape of the the rest extension landscape that we add official support I
00:39:39.079 think if we want to a lot more work needs to be done in that
00:39:47.119 area oh yeah sorry said
00:39:58.839 so Ruby right now Ruby's API is a c
00:40:04.880 API and and C++ too but mainly C and the C++ part was added less recently too so
00:40:14.720 as soon as you switch into rust you've given
00:40:20.560 away your the ability to get first party support from Ruby Corp because from our
00:40:26.920 perspective Ive we're supporting the Capi
00:40:32.160 and you know so you're sort of a tear down anymore like whatever support you
00:40:38.520 get is filtered through a third party whoever is maintaining the infrastructure that's doing the C to
00:40:45.040 rust translation and in that
00:40:51.119 process bugs are introduced um because because the
00:40:57.760 the capis they have contracts sometimes they don't get transferred over to the r side correctly
00:41:05.400 but the contracts are contracts if you break them unknowingly your whole app
00:41:10.960 will fall over so that I think that's part of the
00:41:16.800 reason why the rest extensions haven't been of great quality of the the ones
00:41:22.240 I've seen
00:41:27.480 um they fall over due to like cod process crashes memory
00:41:33.079 corruption um concurrency issues like uh there's there's like a very sharp API
00:41:40.440 where you could release the global interpreter lock and if they don't use that properly you get heart to debug
00:41:46.319 action at a distance bugs that sort of things so one of the things that Russ
00:41:53.520 guarantees is that uh it frees all of your memory for you using the borrow Checker so it knows when things go out
00:41:59.760 of context it knows so then that memory can be released back to the system and one of the things that uh it's very hard
00:42:07.640 to um think about in Ruby are uh exceptions so you use exceptions in Ruby
00:42:14.640 you raise it and and you know everything seems easy but in the Capi that's
00:42:20.160 actually it it it's it's actually very hard to reason about how exceptions work because how exceptions work under the
00:42:27.559 hood in Ruby is that when an exception happens it does what's called a long jump to the um next Ruby frame to the to
00:42:36.640 the bottommost Ruby frame and uh that means that it skips a whole lot of um of
00:42:43.319 native frames that you have either in C or in rust or in C++ or whatever and that circumvents all of the
00:42:50.760 borrow Checker stuff so everything that you've allocated will not get
00:42:56.160 deallocated and because it will immediately jump to the last frame the
00:43:01.200 last uh C frame in that corresponds to a ruby frame inside of Ruby and so if you
00:43:09.119 use anything inside of Ruby that could possibly raise an exception uh or or raise an exception yourself um then uh
00:43:17.359 you have to make sure that everything that that the borrow Checker had that
00:43:23.079 that that that uh every memory that you've allocated within all of those frame games will have to be free or
00:43:28.880 otherwise it will just leak and so those are guarantees that you think you have
00:43:35.000 because you're using rust but because you are using that as a c as a ruby extension you actually do not have any
00:43:41.720 of those guarantees yeah it's also true for C++
00:43:46.760 and it's also a problem for C programs because it could still long jump and you could you could leak memory so it's a
00:43:53.119 problem for everything but uh at least in see your you're a lot less confident
00:43:58.520 because you don't have these guarantees but in Rust you feel like you have these guarantees but you really don't yeah I
00:44:03.880 think I think the problem is with rust extensions it's the like you have a false sense of security that rust is
00:44:09.559 going to deal with all this stuff for you but you actually have the same foot guns and gachas in Rust when dealing
00:44:22.800 so okay let's do another anyway I don't know so to answer this
00:44:31.680 question do we have plans no I don't think there's any plans Matts are there
00:44:36.920 plans for better rust extension support uh yeah the few uh few of us use Ras as
00:44:45.880 a primary language so that we knew little about the Russ uh in
00:44:51.319 interoperation between C and C and and rust so that means
00:44:57.880 the we we cannot provide the better r support from from us so that if someone
00:45:05.280 contribute the ideas or the implementation for the r integration to the Ruby so that that I'm not against
00:45:13.200 about integrating them but uh I I don't think we can provide by ourselves so
00:45:20.000 that the better rust uh extension support the in my opinion so that uh if
00:45:29.359 we can uh to provide the r feature to Ruby you mean that if rust extension
00:45:36.319 call back to the the ru VM does not call back to the ru VM there's easy way to
00:45:42.680 integrate rust extension but if the the rust extension tries to the interact to
00:45:50.960 the RM back and force it is far more difficult due to the the issues just
00:45:58.559 just Alan then
00:46:05.280 explained all right yeah and exception of
00:46:11.319 course oh ropes simd support ah
00:46:17.319 oo oh this is a good idea yes simd
00:46:22.760 support uh so simd simd stands for single instruction
00:46:28.760 multiple data yeah right so it's basically like one instruction that lets you do things it's a type of parallel
00:46:35.040 Computing that you can do so you can do stuff faster basically so I guess we
00:46:41.000 might use this for code ranges yeah analyzing
00:46:47.640 strings um let's pick what should we pick
00:46:55.680 oh oh wait what is this what is this one did we do this
00:47:00.760 one how about this feature sure let's read it 2087 I have it
00:47:10.720 memorized Atomic initialization for rapor local storage I don't know this
00:47:16.559 ticket yeah it's all up to you so I I asked uh so in advance I
00:47:23.559 asked about this feature yeah in the last you don't like this name maybe or
00:47:31.359 is it acceptable you rename the local variable
00:47:36.440 to Stage right local storage in it yeah yeah yeah local it much better
00:47:46.280 acceptable yeah and yeah it's okay but uh but uh but the
00:47:55.480 the term in it has the you know several meaning could have several meaning like
00:48:02.240 initializing or your assignments or something like
00:48:07.599 that yeah the does in it only is
00:48:15.200 oh or
00:48:21.359 something so this this is how to implement so maybe usage is so
00:48:27.440 doize this one what is this
00:48:34.480 for what explain the background so this method uh so we we have a left local
00:48:41.680 storage and we can get and uh lead the uh from the uh local stage already we we
00:48:50.319 have already feature but we do we don't have a uh way to set the the initialize
00:48:58.480 atomically so for example uh on RoR we can run the multiple threads and so the
00:49:06.400 many St can uh can initialize one local
00:49:11.480 uh stage so it is a problem and there is no way to prevent such a situation so
00:49:19.240 this method is uh provide for this uh to
00:49:24.480 initialize uh the some data in atomic in
00:49:29.760 uh in atomic car so for example so we don't need to
00:49:35.079 this feature for the uh the without rure
00:49:40.520 because we we we can initial at the requireed
00:49:45.680 timing but if we want to uh initialize laily so after after
00:49:54.319 require so the any any SL can initialize this data uh so this kind
00:50:01.760 of data so we need to make a way to initialize only once so this is same as
00:50:10.160 a regular Expressions once
00:50:18.599 option every time in the Inc stands for
00:50:24.520 increment method Cod yes the it tries to call the local
00:50:31.760 storage in it m and uh what once if we
00:50:37.960 don't have the local storage named MTX MTX then in uh
00:50:45.559 initialize with block but if we if we already have the local uh storage named
00:50:52.880 MTX the the block is simply ignored you the MTX
00:51:03.280 data right I I can understand your intention and then then the local Str
00:51:17.200 named then Co synchronize to the return value
00:51:37.680 so you have two local storage named MTX and the count yes but uh uh you only
00:51:47.480 call the local storage in it to the MTX because it should
00:51:54.520 be I don't know atomic or something so the count also initialized
00:52:01.319 at the beginning in this
00:52:13.160 case yes so that's the begin begin so
00:52:18.200 the larg begin you may you Capital begin and there uh maybe so so it shows that
00:52:25.040 there uh uh uh every RoR run this uh begin block for
00:52:36.240 example for yeah uh if it is needed so begin uh forc
00:52:45.200 to run every uh RoR but in this
00:52:50.240 case well we can we can initialize very easy
00:52:56.839 so to for me to understand now I understand the
00:53:04.079 intention but uh I don't think the name the provide enough information for
00:53:11.920 the behavior because the the you only provide the name in it stands for
00:53:17.240 initialize but it has the some kind of the the conditional check if the uh the
00:53:24.200 the storage name is already initial ized or not that would be that would be you
00:53:32.240 know not intuitive name for the behavior I think because of the you know the inet
00:53:41.799 usually stands for initialize but uh this one you know initialize that but uh
00:53:49.839 in addition if the the the strage is already initialized it just ignore them
00:53:57.640 so that that that conditional is not included in the name that is kind of
00:54:03.160 problem I think do you have a good name of I'm not sure yet I see I see all
00:54:08.839 right so the P so the it is not accepted yet I understand the behavior and the
00:54:15.640 requirements but I don't agree with the name all right so the naming issue naming issue okay and hi
00:54:33.960 exactly yeah probably he wants to be a some kind of the lazy initialization so that if we don't call
00:54:41.760 the if we don't call the say the ink method the ink method at all so that we don't
00:54:49.440 initialize the MTX at all so that that's what he that's what he needed I and once
00:54:57.599 is another terminology I agree that in this case so anyway so concl we have
00:55:05.640 conclusion about that so name is not okay is anyone putting this in in hackmd
00:55:10.839 I'm not it's thank you it's it's it's kind of like a div was meeting yeah yeah so
00:55:17.640 okay uh we held a developers meeting uh in the month one once a month so and we
00:55:27.480 discuss each features and there so mosa and other developers discussing
00:55:34.720 features and names and so like like this time so there are many name is not
00:55:44.319 satisfied I don't like the name okay anyway I like this question
00:55:50.920 other than Ruby what is your what is your favorite language
00:56:01.480 I can't uh pick one list
00:56:07.559 them I know many yeah I have uh I have
00:56:15.119 wrot I have written qu in many languages
00:56:20.480 and 128 langages but so I can't pick one
00:56:31.760 I'll skip this question x86
00:56:39.119 64 ideally with avx2 AVX 512 support
00:56:44.480 anyone no uh controversial but I actually kind
00:56:53.200 of really enjoy Java there's a lot of there's a lot of very nice things a lot of very good Tooling in Java but it
00:57:00.760 works the the the typing system makes sense and what is well thought out looks
00:57:09.160 elegant sorb uh and uh and and yeah but you know there's
00:57:16.760 a lot of a lot of downside of java but so does any other
00:57:24.119 language oh I don't I don't no I don't write a lot of other
00:57:30.119 languages like see I was going to joke that it's like
00:57:35.799 uh whatever you write make files in since I spent so much time doing that I'm like now a make File Expert it's not
00:57:47.480 in uh I earnestly see uh I really like it uh but I can't defend that choice
00:58:00.119 I I also like C because it is easy to understand what there become to the
00:58:09.319 machage Matt as a programmer I like c as a
00:58:14.839 language designer I like L
00:58:20.280 mod me I like me I like Zig yeah
00:58:26.839 because I'm a hipster why do you like huh why do you like Zig why do I like Zig uh it's
00:58:34.119 it's nice like it's easy it's easy to write and it's less like the I feel like
00:58:40.039 if I try to use it's like using rust but the compiler doesn't complain all the
00:58:45.520 time yeah much simpler and then the more closer
00:58:51.039 integration to c c yeah yeah it's what I really really like about it is I can use so I can use zig and call into C
00:58:57.039 libraries but I don't have to use like bind gen or anything it just it just works see H oh it even catches cbgs yeah
00:59:06.240 I so I compiled I compiled prism with zigg and then zigg caught a bug in prism
00:59:13.240 so I was able to fix I was able to fix that so zig's compiler is C compiler is really
00:59:19.240 cool I can easily Crose compile
00:59:24.640 everything okay that's all of us uh let's do next question Matt yes uh you
00:59:34.119 misunderstood the behavior of Colonel sleep in the game show how about changing the
00:59:40.359 Behavior Uh yeah
00:59:46.799 uh the the behavior is the the the
00:59:53.319 in sleep Returns the the seconds
00:59:59.359 slipped as a return value the the point is I thought the integer to float
01:00:06.760 conversion is the normal casting like a cut off but actually it rounded okay
01:00:13.119 okay okay yeah that's my misunderstanding uh actually the
01:00:18.920 original version of the sleeve the which I wrote was the uh the used the plain
01:00:26.000 sleep Library fun C library function which returns a second so that the unit
01:00:31.079 is the integer then later the someone I
01:00:36.240 don't remember who but someone extended to the the to accept the float value as
01:00:42.960 a you know the more precise time and then at
01:00:48.680 then we kept the the return value as a integer as a some kind of the contract
01:00:55.400 signature so then in that that's what I remember but I I don't remember how to
01:01:02.280 convert the flo to integer like I thought it is cast cast the cut off and
01:01:15.760 arounded okay so are we going to change the behavior no uh yeah momy is talking
01:01:22.760 about that all right Let's see we have more
01:01:27.920 questions at the bottom but I'm going to be really selfish right now and do this one uh because this is my my
01:01:35.720 question um so I filed this feature to add an environment variable for changing
01:01:42.640 the thread Quantum this is this is the ticket so
01:01:50.079 basically um I'll do a really quick I'll do a very very short presentation uh who here so who here
01:01:57.200 went to Evo's talk or to koichi's talk okay a few people all right yeah
01:02:04.079 you went to your own talk great so we have a we have an issue like
01:02:09.359 if you have two threads like T1 um and T2 and they're running at the
01:02:15.039 same time but we don't actually run at the same time because we have a gvl so we can only get CPU e either one of
01:02:21.200 these threads can only control the CPU one at a time but we have a certain thing where you can do like IO so let's
01:02:27.760 say T1 is doing IO for amount an amount of time uh while it's doing IO we allow
01:02:34.359 T2 to execute so T2 is allowed to do CPU time here CPU so it can run but we have
01:02:41.039 an issue where uh when we switch between threads we switch on a Quantum which is 100 milliseconds so let's say T1 is
01:02:47.680 doing CPU time it's allowed to do that CPU time for 100 milliseconds before we switch to T2 now the issue is if we have
01:02:55.559 two things running truly in parallel here like IO and CPU let's say this CPU time here starts right here and it's 100
01:03:06.039 milliseconds for our Quantum now this IO time we're not allowed to switch back to T1 until this
01:03:13.079 Quantum finishes here so the amount of time we get to come back return to T1 is
01:03:18.680 actually um IO time plus
01:03:24.240 Quantum yeah so
01:03:29.599 my problem is that I think 100 milliseconds is too long so I want to shorten that and I
01:03:37.079 want to do it with a environment variable and that is what this is about yeah
01:03:43.200 okay so I we can merge this so so uh we
01:03:48.760 have uh the current 100 millisecond time Quantum is not has no strong opinion uh
01:03:58.440 so there is no uh strong reason to pick to determine this uh number so I I we no
01:04:07.559 maybe nobody again to introduce this environment VAR I think okay so anyway
01:04:14.119 anyway anyway anyway you you you uh your sample program is not doesn't make sense
01:04:21.880 to show their the problem so yes I want yeah Evo so Evo made a
01:04:28.720 comment showing the showing the actual problem so if you see yeah I
01:04:33.960 understand uh uh problem but uh you you
01:04:39.760 it doesn't make sense sorry I emphasize jeez
01:04:48.440 okay and also we need to discuss more about the name of enable oh my gosh okay
01:04:56.359 the name of the environment all right maybe we can we can uh accept that all right okay uh I'm not strongly against
01:05:06.680 uh this proposal but I'm a bit afraid that uh uh of the overhead uh because Too
01:05:16.440 Short uh St cor May because uh overhead
01:05:21.520 so did you uh perform uh performance evaluation uh we haven't we haven't
01:05:28.319 tried performance evaluation on this yet I think it is needed first I
01:05:38.680 think so that yes the question is could it be available but 100 by default that's what this patch is is it doesn't
01:05:45.000 change the default so it's always the
01:05:51.520 same that was the idea is we default to 100 and then and people can tweak it
01:05:56.960 depending on what their application does because the problem is the it depends on what your app is
01:06:03.440 actually
01:06:09.559 doing okay all right so yes we can merge this
01:06:17.279 but with a different name yeah we usually use the say
01:06:23.400 something limit or as but as a name of the parameter like
01:06:29.680 environment variable but you know I'm I'm not sure the the quantum is problem
01:06:35.359 not okay yeah 100 millisecond is the the the
01:06:41.799 ancient the Linux contact switch timing I don't I think that it isn't anymore
01:06:47.400 yeah it's it's it's no more it's a yeah I think it's dynamic or or something
01:06:52.440 yeah I understand I think theuer also changed with within the last year again so I have no idea yeah I have no idea
01:06:59.559 too but it you know it's originally taken from the theux process Contex
01:07:05.200 switching timing okay all right I'll propose a few other names and then add
01:07:10.880 it to the dev meeting thank you all right um this is a good question
01:07:16.520 how everyone how did you end up building programming
01:07:21.799 languages I think Matt should start with this one how did you how did you start building programming languages uh I want
01:07:28.240 just wanted you know you know for most of the
01:07:33.520 people that language uh programming language is given so that you learn the existing programming language and write
01:07:40.160 programs like games applications and something but uh for me I I want to
01:07:45.799 design the interaction between computer and human this is so that to to
01:07:54.039 accomplish that purpose of the design designing interaction so that I I like to design my own programming language
01:08:01.039 that's the whole purpose and then then uh why I wanted that
01:08:09.720 that's for
01:08:15.719 Joy no I think you should go kigi yeah uh when I was a uh University
01:08:24.600 student I went to academic uh uh academic
01:08:30.199 lecture course about garbage collection yeah and I sit down at the table and the
01:08:48.480 there that's all that's all yeah I recruited
01:08:56.799 the reason uh why I I was uh involved in
01:09:02.000 uh rby development uh is because Ruby was buggy
01:09:07.520 so especially when I uh was I became
01:09:13.040 a y y interpr was introduced to Ruby master
01:09:20.640 branch and it was very buggy so I was enjoyed
01:09:26.000 I I was uh enjoying the Kings and uh I became a
01:09:34.319 commit well I was just say reals developer but luckily I I was born in
01:09:41.120 Japan I lived in Japan so I could see and directly talk to the language
01:09:48.120 creators I love that experience and I'm still in love with that experience I
01:09:53.199 can't quit and that's what I'm
01:09:58.320 doing uh not really a language builder um I got my start building a compiler
01:10:05.520 but I didn't really design the language it's more a clone
01:10:11.280 of things I already thought I was mainly interested in the the
01:10:18.480 mechanism inside of the compiler more than coming up with language constructs
01:10:24.840 that people my own M like I don't particularly have many opinions in that
01:10:31.280 area and um once I got started at
01:10:37.440 work we had a bunch of Ruby crashes on Mac OS and I sort of felt this
01:10:45.040 indignation that why would it be crashing like it's so simple just go fix
01:10:50.640 the bug and that's sort of how I started
01:10:57.640 I'm also not really a language builder I mean I just make the language faster but
01:11:03.199 uh I was originally just a a rails Dev um and then four and a half years ago I
01:11:08.920 joined this team at Shopify where they were like make Ruby faster with this
01:11:15.800 idea and I was just a little intern and I was like what uh and um and uh you
01:11:25.000 know for the fear of not losing my job as an intern um I I learned how to do
01:11:40.920 am yeah the person who assigned my work is sitting right
01:11:46.679 here uh I would say in my case it's Aaron's fault um cuz he I found a bug in
01:11:54.480 reals and he he was like why don't they fix that so we ended up pairing on it and
01:12:00.639 then uh and then he pushed all of the stuff he didn't want to work on onto my
01:12:05.840 plate and here we are um similar for me I think I I wrote
01:12:13.760 Ruby for 10 years before getting involved in improving the language and I think I just didn't realize that it was
01:12:22.040 possible until then so which is also aon's fault thank you uh did thank really all right
01:12:31.360 I feel like I've cursed you more than um I'm I also don't consider myself
01:12:37.040 to be really a a like a programming language builder I just was really interested in how Ruby itself worked
01:12:44.000 dove into the code and like tried to improve it I mean I just like basically I learned the language I
01:12:50.639 fell in love with being a Ruby programmer I learned rails I fell I really enjoyed building websites and
01:12:56.280 stuff with ra building applications with rails but I wanted to know like I'm just very curious and I want to keep like
01:13:02.159 going deeper into how does this thing work and then like okay well now I understand that well how does like how
01:13:08.040 does the thing below that work and then I just keep going deeper until I
01:13:13.080 understand as much as I can so I did say in my talk that learning sucks but that's not true I'd actually like
01:13:21.040 learn uh let's see uh everyone how much time do you spend building non-trivial code with languages besides Ruby and C
01:13:28.960 or rust for Ruby Dev and how does that affect your language design and direction of Ruby oh my
01:13:34.600 goodness wow mattx do you build any applications with languages besides Ruby or
01:13:43.120 C uh some years ago
01:13:50.040 I I wanted to switch to the G Gmail when Gmail introduced in 20 four or something
01:13:56.560 but uh at that time I we we didn't have the some kind the universal internet
01:14:03.239 access so that uh during on the plane or maybe in the in in the in the mo you
01:14:11.239 know in the transit so that I we didn't have the the internet access at the time
01:14:17.600 at the moment so that I decided to write so my
01:14:23.000 own mail reader to work just like a uh the Gmail like a
01:14:29.920 you know no no folders no uh no classification just a full Tex search
01:14:37.440 then things then I wrote the back and the in Ruby but uh it's I wrote its
01:14:44.840 front end the interface in emox
01:14:50.120 list and I still use it so that oh the old the all my email is uh handled by
01:15:09.840 as a main reader but uh when I write replies I use
01:15:23.639 build anything with besides do you use any languages besides Ruby or C so the uh so recently I made a
01:15:32.360 deug so deak of Ruby in Ruby so I feel that so Ruby is very fantastic language
01:15:42.000 fantastic language so very easy to write yeah yeah I agree and we can find the many many
01:15:49.920 things we need to uh Implement for to uh in in C
01:15:55.480 to support
01:16:05.040 de not Ruby not hor Ruby yeah uh uh in my hobby time uh I uh enjoy uh
01:16:16.560 development uh web front end so I uh enjoy typescript and JavaScript but uh
01:16:24.480 to be honest I'm not sure it how it affects the design decision of
01:16:43.360 game mind sweeper I don't know where it is this
01:17:03.840 I think yes that this is a Min swe G but uh it is uh
01:17:12.440 automatically uh selected by AI so uh please uh pick any s yeah and uh yes
01:17:26.840 so you you can so just uh like testing
01:17:34.639 so brain testing part is automatically done by Ai and you can just enjoy luck
01:17:43.880 testing Pi picking random s by your
01:17:52.120 Ro so this is one of the my uh joke
01:18:07.840 project I don't know I'm trying to do everything with
01:18:14.719 Ruby uh similar to the emac list situation I use neim which uh comes with
01:18:24.080 lu script um and also it interacts with wind
01:18:30.239 script I do some of that um and also with Lua I use this window
01:18:36.600 management Window Manager for uh xor called awesome
01:18:43.560 WM it's scriptable in Lua and you could do whatever you want with the windows on
01:18:50.199 screen like say you want to have some presets or whatever the way windows lay down you deal that DOA so um and then
01:18:59.639 when it comes to how how it how it impacts my language design skills not
01:19:06.920 very much if anything it makes me appreciate the the myriads of batteries
01:19:13.280 that come with Ruby uh I Lua is very
01:19:19.320 it's a very simple scripting language in in the sense that there aren't that many moving parts so you don't get the
01:19:26.280 batteries filed in I often find myself wanting something that would be in Ruby
01:19:32.120 but need to look around to figure out how to do the same thing in bua but um I
01:19:39.639 appreciate the Simplicity of the language similar to
01:19:47.199 how every mostly everything in Ruby could be explained by Method calls
01:19:55.880 I like that part of FL so there is this one game that we
01:20:03.080 allowed to expense at work it's c factorio and a couple of weeks ago I
01:20:08.560 decided that I was bored and I was going to get it and let's just say it has become my second full-time
01:20:22.000 pay me and and uh so it how it affects my design
01:20:30.360 and direction of Ruby well definitely in a negative
01:20:37.360 way uh I don't remember the last time I worked on something that wasn't C Ruby
01:20:44.880 or RS uh one time I wrote a apple shortcut
01:20:50.280 to scrape pelaton site to put it in a spreadsheet so I knew what I workout so I was going
01:20:55.960 to do that week but I haven't used it in a while and that required me to write some JavaScript which I did not enjoy
01:21:04.760 so yeah similar stuck with try to do as
01:21:11.840 much as Ruby as possible oh I'll go okay uh let's see
01:21:18.400 I'm been trying to write stuff in R like whenever I need to do graph graphs I'll use R um I wrote a I'm very proud of
01:21:41.120 something this it's a Vim plugin that converts
01:21:48.280 your code to RTF so basically like you highlight the code and then you
01:21:55.800 do two RTF on it and then you can paste the code into keynote and it is syntax
01:22:04.199 highlighted for you so and you can like highlight stuff
01:22:10.199 and then copy it as RTF and then um paste that into keynote and it is all it
01:22:16.760 just works so this is my very first non-trivial Vim Vim script plugin and
01:22:23.199 I'll tell you working with Vim script makes me realize how bad of a language it is it's really bad and I love Ruby so
01:22:31.120 much so yes
01:22:36.760 yes oh with neovim it comes with scripting support for including Ruby too
01:22:43.560 so you could put all your wi script to Ruby if you really want V Vim you can
01:22:49.159 you can also do Ruby from Vim but it's like the it's just bad it's not good
01:22:55.440 all right uh next question everyone what's the largest in terms of memory usage Ruby application you've ever seen
01:23:01.880 does anyone run Ruby with with 10 gigabyte plus heaps
01:23:07.159 successfully what Peter uh I mean it's probably shop by
01:23:14.199 core maybe not I don't know our monolith I don't know is it it's not even that big how many G how many gigabytes do we
01:23:21.719 use do you know I think only like two or three gigs of memory like I don't think we use that
01:23:29.040 much the the our test Suite uses in that ballp part like seven gigs
01:23:36.320 10 gigs and sometimes it runs out so it's like it's a pretty tight bound um
01:23:44.040 and also Peter you must be familiar with what happens when you run Ruby with
01:23:50.159 asan balloons the memory um so yeah yeah if that
01:24:02.880 counts when maybe 10 years ago 10 more more years ago so the big data was Buzz
01:24:13.360 was so I bought uh
01:24:18.800 20050 uh about two 250 gigabyte machine to try the Ruby
01:24:27.960 with the hug memory consumption so making the many dummy data on the such a
01:24:36.080 machine so and we I found find out that the the termination of the Ruby
01:24:43.840 interpreter is very very slow on such a case so maybe there are many many uh
01:24:50.480 inefficient uh uh algorithm in that will be interpret with big data
01:24:58.239 so so I so I don't have actual application but maybe 100 gab Ruby
01:25:06.560 application has many issues I think it
01:25:15.360 comment well there has to be a production like fluent z uh
01:25:22.400 server production I guess I haven't seen myself but
01:25:34.520 yes uh at work we run a a simly large like 1.5 gig maybe at at the largest
01:25:41.239 size so not not dis similar at work is at GitHub um so so similar to Shopify
01:25:47.040 model it sounds like a little smaller um sometimes I I have a tool that analyzes
01:25:53.159 the Heap dumps from that so since it has to have several objects for every object the main application
01:25:59.360 has in memory that definitely gets to 10 gigs plus all
01:26:06.719 right uh Aaron how close is your rapor friendly rails Branch not at all
01:26:14.800 um basically kichu kichu is saying like oh we can't we can't run rails with
01:26:21.800 rators and I want to know like why specifically because I don't know the reason why so I started like trying to
01:26:29.719 run rails with reactors to see what we have to change to fix to fix it either change rails or change rators somehow to
01:26:37.119 try and investigate what the deal is um but it's not close at
01:26:44.080 all yeah eager booting so I was trying to eager boot eager boot the rails application make the like do make
01:26:51.520 sharable on The Rails app itself and then see what crash or like what blows up and then try to figure out like why
01:26:58.280 it seems like we have a lot of lambdas or something that can't be made sharable but I'm not sure why we can't fix that
01:27:06.639 so I'm investigating yeah clo like I'm not sure
01:27:14.119 why we can't use closures maybe kichi can tell
01:27:20.800 us the closure is modifiable yeah the exteral Contex can well it
01:27:29.040 references like it references it has references to external data yeah that
01:27:34.719 can be to be to be sharable the the object
01:27:40.440 should be recursively unmodifiable what can you modify in a
01:27:46.440 Lambda like I don't get it
01:27:52.320 Alan we had to take so I think right now the makes sharable operation on Lambda
01:27:58.679 is sort of a syntactic operation a part of it is in that if it
01:28:04.400 it's if it sees you writing a local variable to anything external to the Lambda it's whel rejected even though
01:28:12.880 that might be saved so we actually had a bug report recently where if they just change it so that the the access is to a
01:28:20.920 constant instead of a constant local variable and that it's not changed that
01:28:26.000 their program would have worked but the airor message there was somewhat confusing and they assumed that uh what
01:28:33.000 they wanted to do was impossible when all they had to do was change the
01:28:38.119 syntactic like jigle their what they wrote basically what it can you give me
01:28:43.840 an example what that is like a local variable write uh read even read even a read yeah I
01:28:50.880 think like this yeah so uh do it and then pass the uh the the lamb that to
01:29:03.119 exception like this yeah I'll fix it I
01:29:25.520 X to be a constant it should
01:29:39.080 not let's make this smaller
01:29:44.719 oh yeah it complains about the cell uh self right right right okay so
01:29:50.639 if we did like uh could do the stabby Lambda
01:30:15.560 situation yeah yeah
01:30:21.440 no why
01:30:28.159 why uh during the block the self is the OU ah the outer self okay okay okay uh
01:30:36.480 okay
01:30:41.760 um let's see right right
01:31:02.280 there we go there we go but if we do like if we do like
01:31:27.880 why does that work the block is off the block is Orphan so if I do can I do like xals 1 2
01:31:43.800 okay yeah so I think maybe what's missing is uh more documentation or some
01:31:51.880 sort of guide yeah it's pretty new yeah so it's because in this case
01:31:59.719 it's because we're mutating the outer we can mutate the outer environment right got it yeah the the problem you ran into
01:32:07.400 while typing out the program is also a usability issue right like accidentally
01:32:13.320 capturing self not sure about yeah yeah okay all right
01:32:27.440 I'm suffering through my my test okay did we hit all the questions I think we
01:32:32.840 did anyone have any more questions in the audience should we wrap this
01:32:39.520 up anything nothing okay oh wait no we got
01:32:47.000 some
01:32:52.239 you yes I happy to help you out of course yes another question over here
01:33:05.480 yes wait what is the
01:33:12.920 question ah do any of you use llms question was has anybody reap any
01:33:18.840 benefit from using LMS like chat UT or CLA or
01:33:26.560 copy yes I'll go first like it's
01:33:32.920 so it I've used chat GPT for like I used
01:33:38.920 chat GPT when I started when I was getting started with Zig and it helped out a lot especially because I as a very
01:33:46.360 very very much beginner but then the problem was like as I got a little bit
01:33:52.040 better uh the helpfulness completely dropped off and it was like wrong most
01:33:57.080 of the time so as my as my questions got more sophisticated its answers got
01:34:04.960 worse um I don't really like how AI mansplains code to me like I can get
01:34:11.679 that elsewhere so but I I do sometimes use it to rewrite text that I've written
01:34:19.320 uh fuga is going to find out that I fed my performance review into it and told
01:34:24.360 it to help me talk about leadership skills and then I rewrote it so it didn't sound insane uh
01:34:35.000 basically that's fine it went well I mean I didn't it didn't write it
01:34:40.320 for me I wrote it and it goite better and then like maybe I need it right now
01:34:46.239 to help me answer this question it's a lot of pressure having your manager in the audience
01:34:58.880 yes all right if there's no more questions let's wrap it up thank you all so much we'll come around to help you
Explore all talks recorded at RubyConf 2024
+64