Earlier quoted context omitted.
https://trends.google.com/trends/explore?date=all&q=%2Fm%2F0...
Do you reckon Ubuntu is used by fewer people than it was 20 years ago? https://trends.google.com/trends/explore?q=ubuntu&date=all
Ruby 3.4.0
81–90 of 282 posts
Re: Ruby 3.4.0
#82Re: Ruby 3.4.0
#83What does ruby do well that other languages don't? What is the niche it's trying to fill?
Being concise and pleasant to work with. I wouldn't have had this much control of my own environment with another language, so that all of these are pure Ruby: - My window manager - My shell - My terminal, including the font renderer. - My editor - My desktop manager That's less than 10k lines of code. I've taken it a bit to the extreme, but I wouldn't have had the time to if I had to fight a more verbose language.
Re: Ruby 3.4.0
#84Shopify strategy aka the story of YJIT If I cannot refactor my services, I shall refactor Ruby instead.
During their black friday / cyber monday load peak, Shopify averaged between ~0.85 and ~1.94 back-to-back RPS per CPU core. Take from that what you will. Reference: https://x.com/ShopifyEng/status/1863953413559472291
Re: Ruby 3.4.0
#85Earlier quoted context omitted.
Being concise and pleasant to work with. I wouldn't have had this much control of my own environment with another language, so that all of these are pure Ruby: - My window manager - My shell - My terminal, including the font renderer. - My editor - My desktop manager That's less than 10k lines of code. I've taken it a bit to the extreme, but I wouldn't have had the time to if I had to fight a more verbose language.
huh. I'm not sure if I understood you right, do you script and configure those in ruby, or have you written them in ruby from scratch? Are the sources available to read/learn from?
https://github.com/vidarh/rubywm
Beware that one of the joys of writing these for my own use is that I've only added the features I use, and fixed bugs that matter to me, and "clean enough to be readable for me" is very different from best practice for a bigger project.
I'm slowly extracting the things I'm willing to more generally support into gems, though.
Re: Ruby 3.4.0
#86Earlier quoted context omitted.
Ruby has the nicest object-oriented design (everything is an object) outside of smalltalk (IMHO). In contrast to the mess that is Python. For instance, in Ruby it is natural that each or map are methods of Array or Hash rather than global functions which receive an Array or Hash argument. This goes as far as having the not operator '!' as a method on booleans: false.! == true Once you have understood it, it is a very…
It's very powerful though which is a bit terrifying. You can literally monkey patch Object at runtime and add methods to every single instantiated object! (I believe this is how rspec works..) Awesome, but with great power come great responsibility ;)
Re: Ruby 3.4.0
#87Why did NodeJS take off on the backend while Rails was still popular? I'll never understand it.
Re: Ruby 3.4.0
#88Earlier quoted context omitted.
Rails has some very, very good features that make standing up a CRUD app with an administrative backend _very easy_. It's also got a bunch of semi-functional-programming paradigms throughout that make life quite a bit easier when you get used to using them. Honestly, if it had types by default and across all / most of its packages easily (no. Sorbet + Rails is pain, or at least was last I tried), I'd probably recomme…
I love Rails and spent a good chunk of my career using it - and I'd recommend it more if only the frontend story wasn't that bumpy over the years with all the variations of asset pipelines. I wish the TypeScript/React integration was easier. Say what you will but there's no way you can achieve interactivity and convenience of React (et al) UIs with Turbo/Hotwire in a meaningful time.
Have you tried either Inertia (https://github.com/inertiajs/inertia-rails) or vite-ruby (https://vite-ruby.netlify.app/)? Both look very promising.
Re: Ruby 3.4.0
#89Shopify strategy aka the story of YJIT If I cannot refactor my services, I shall refactor Ruby instead.
During their black friday / cyber monday load peak, Shopify averaged between ~0.85 and ~1.94 back-to-back RPS per CPU core. Take from that what you will. Reference: https://x.com/ShopifyEng/status/1863953413559472291
[1] https://shopify.engineering/running-apache-kafka-on-kubernet...
[2] https://shopify.engineering/lessons-learned-apache-airflow-s...
Re: Ruby 3.4.0
#90I am most excited about the parser change, previously discussed here: https://news.ycombinator.com/item?id=36310130 - Rewriting the Ruby parser (2023-06-13, 176 comments) I remember being taught to use yacc in our compiler course because "writing it by hand is too hard". But looks like Ruby joins the growing list of languages that have hand-written parsers, apparently working with generated parsers turned out to be e…
I've been writing parsers for simple (and sometimes not so simple) languages ever since i was in middle school and learned about recursive descent parsing from a book (i didn't knew it was called like that back then, the book had a section on writing an expression parser and i just kept adding stuff) - that was in the 90s.
I wonder why yacc, etc were made in the first place since to me they always felt more complicated and awkward to work with than writing a simple recursive descent parser that works with the parsed text or builds whatever structure you want.
Was it resource constraints that by the 90s didn't really exist anymore but their need in previous decades ended up shaping how parsers were meant to be written?