🇺🇦 пан zverok у ЗСУ Profile picture
Feb 25, 2021 37 tweets 6 min read Read on X
1. A long rant about Ruby, its value, its innovations, and its (sad) fate. Should've probably been a blogpost, but let it be just some random tweets.
2. I do believe that Ruby is an important language, as a milestone/inspiration/step in history. And not because of Rails (despite of it, actually). But what's so important about Ruby?
3. In other words, what's Ruby's selling point, as a language? Or, as @avdi once asked, what's its legacy (avdi.codes/what-is-the-ru…)? →
4. If you try to tell somebody "what's Ruby about", how would that sound? "Well, it is scripting dynamically typed OO language, with a sprinkle of functional and..." and what else? How many languages can be described this way? What's unique, or at least interesting, about Ruby?
(..and that's the reputation it mostly has in the "outside world": just a regular mainstream language, losing popularity. Oh, and "with some weird metaprogramming magic which makes it unreliable", maybe.)
5. I strongly believe that the unique (or at least outstanding) idea behind Ruby exists. Nobody just bothered to name it a "paradigm", to claim the cultural territory. Well, other than the famous "designed for developer's happiness".
6. But "designed for developer's happiness", unfortunately, is not perceived as a substantial claim. From inside the community, it reads as "well, this <gestures broadly at everything> that we love", from outside it reads as "well, that <frowns> that those fanboy hipsters 'love'"
7. Though actually, "designed for developer's happiness" has a substance, and important one, too. In my head, I tend to call it "phrase-oriented programming": the language is thoroughly designed the way that each particular phrase would be clear to write and read.
8. That's actually hard to reason about, without appeal to "feelings", but Ruby's novelty lies exactly here: allow to write the "phrase" (expression) describing complicated concepts, with every element meaningful, necessary, and unambiguous.
9. Obviously, I don't know what exactly @yukihiro_matz thought on all design stages, but my guess is it all started with Enumerable: the amount of "design elements" which made `for` obsolete is surprisingly low, but their mix is "just right".
10. Ruby actually introduced a lot of small (phrase-level!) innovations like this. I want to remind you that at the moment of the Ruby unexpected ascend, passing around functions in most of mainstream languages was as tedious as map(function(x) { return x**x; })
(Maybe it is a stretch, but I believe that "shorter" lambdas like map(x => x**x), or Swift "tail lambdas", or Rust blocks, were largely brought forward of Ruby alumni or at least Ruby-curious people.)
11. I would go so far as to suspect that the classic OO part was somewhat "accidental": that's what was mainstream at that point, and Ruby was pronouncedly non-esoteric language: just your regular class/method/if/return/math, but with critical attention to the phrase level.
12. Phrase-level expressiveness requires clarity of each element. In Ruby (almost) everything is an object or its method, and `self` is always implied and clear. Syntax variability is not a toy: it allows lower the number of concepts, so we don't need separate "attributes".
13. ...and most of what looks like keywords can also successfully be method calls: like attr_accessor, private, raise (but Ruby is demonstratively non-esoteric, so it doesn't sacrifice `if`s, like Smalltalk did).
14. ...and whatever you need is typically a method of the current context or object you want to do something with, discoverable and guessable (I still remember my post-C++ fascination when I first blindly tried 1.3.floor and it just worked as expected)
15. Low amount of base concepts + rich dictionary + flexibility of syntax + design of core classes might make you think about problems in a completely new way. "Phrase-based" or "phrase-oriented", as I've said.
16. It goes like "I'd _like_ the final solution of this problem to be _spelled_ this way. It is a correct Ruby code. So let's design a few classes/objects/methods so this would become possible". And repeat, all the way in those classes/objects.
(One might notice that it resembles some of BDD concepts! And for a reason. I'll talk about it down the thread.)
17. Well, Ruby's initial design was not ideal (as somebody working with it since Ruby 1.6 I can tell). The Module ambiguity (mixin/namespace), text-based `require`s, weird convention of `Array()` and alike method-like-classes... But most of it hit a very sweet spot.
18. But what Ruby lacked was a "killer app": some critical mass of code that would demonstrate how it allows thinking differently. For me, this "killer app" was the language itself: I always wanted to design my code the way Ruby's core designed.
19. But typically that's not enough. And even Ruby's core library was not a good candidate for the showcase (Net::HTTP anyone?..)
20. OK, by this point everybody knows what we are talking about next: Rails!
And here we come.

Let's put it simply: Rails is not, and never was, the "showcase killer-app of Ruby's coolness".
21. Why is it so?
Ruby's unique proposal: find the way your ideas is expressed the best way, design your dictionary, combine it in different ways, see where the combinations lead you. It is the proposal of a modelling clay: you have it as a material, and go wherever you want.
22. Rails' unique proposal: somebody took the modelling clay, created a language in a shape that was natural to them, and gave it to you as a ready-made (baked) _frame_ with small holes you now can fill.
23. When somebody says "but Rails popularized Ruby!", the only thing I can answer: no, it did not. The way for Rails to popularize Ruby was by saying "Look, we described in Ruby how we saw _our_ app! Let it be an example of _any_ design describable naturally"
24. As we all know, that's not what happened. I have huge respect for Rails' initial authors as people, businesspeople, and thinkers, but what happened with Ruby being "popularized" by Rails is downright tragic.
25. Another "tragedy", of a smaller scale, happened with RSpec. RSpec was—still is!—a much better "killer app" for Ruby's expressiveness; the whole bunch of ideas for _one-line specification of expected behavior_, combinable with any third-party matchers is aligned with Ruby way.
26. But slowly-yet-steadily RSpec's preferred ways (even by its current maintainers—counting from the removal of its() statement) shifted from phrase-level expressiveness to "frameworkness", which should be filled with "simple" code.
(I ranted about it some time ago: zverok.github.io/blog/2017-11-0…)
27. It is perfectly understandable that most of us who stayed are primarily maintaining Rails codebases (or—codebases in alternative frameworks, with the same "frameworky" approach, but allegedly better designed).
28. Obviously in those conditions "phrase-level expressiveness" (especially it doesn't even have a catchy industry-approved moniker!) is long out of focus of the community.
29. New language features towards expressiveness are now met with hostility or indifference. "Ruby-the-language good enough for me, now I want those tests to run 10% faster". We are all pragmatic product engineers, no offense.
(I still believe—and, kinda, paid for doing so—that short-and-expressive code has a business value, and the time spent trying to understand "how to say those 30 lines in one obvious phrase" is not a time wasted, but that's a personal trait, not a merit.)
30. What makes me sad is that the usages of Ruby where it could've shine, are mostly out of question now. I could be a perfect modelling clay for teaching, experimentation, trying new areas. Let those clay models, once proven good, be repeated in more steely languages, so what?
31. But alas, Ruby as a tool for thinking new thoughts is mostly off the road of IT culture and history. It is hard to bring "in Ruby, we discovered this! wanna try too?" into the general discussion in 2021.
32. Sometimes I wish that the Rails "hype" died to the ground, and for a few years, people stopped to try building water towers of modelling clay, and let it became half-forgotten and then, once, rediscovered for its true value. But that's just old and grumpy me.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with 🇺🇦 пан zverok у ЗСУ

🇺🇦 пан zverok у ЗСУ Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @zverok

Oct 26, 2022
I just watched videos from the recent @euruko which is The European Ruby Conference.
It had a beautiful lineup, inspiring keynotes, and deep thoughts!
You know what it didn't have? Any mention of a genocidal war currently happening in the middle of that same Europe.
I mean, literally none. Not even a passing remark, let alone some more significant signs of support.
(Other than the pitch for Lviv as a place for the next EuRuKo, which was met with a warm welcome and very few votes, ofc.
Didn't watch all talks yet, might've missed something.)
I mean, poignant and timely @andycroll's presentation, dedicated to minorities in tech, literally had this slide.
But, you know, like, literal mass killing amidst your cozy Europe is not something that is worth any recognition, it is not even "politics," right?
Read 4 tweets
Aug 20, 2022
Поділитися однією особистою штукою.
У 2018 році я написав роман про видуману родину українських емігрантів в Америці—усі 27 глав один з них, Джонатан (або «Йона») розповідає автору (=мені) про їх минуле.
Одна з глав — про Крим. Ось вона: zverok.space/writing/old/jo…
Герої-американські українці тут на початку 90х потрапляють у Крим і спілкуються з кримскими татарами, які щойно повернулися.
Мабуть, я багато чого написав глупого (я намагався хоч трохи більше дізнатися про киримли перш ніж писати, втім гугл — то така собі заміна досвіду), але
я намагався писати з повагою і ніжністью.
Не знаю, чи це вдалося.
Read 4 tweets
May 26, 2021
Some of the hardest problems to bring in the software development ecosystem are those that "intuitively" have an easy answer.
My favorite one is about common sense knowledge.

1/Thread →
(Those are hard because before starting to discuss possible solutions, you need to persuade people it is something non-trivial and worth thinking of. And after they understood, they become sad and don't want to think about it either. I saw it discussing the spellcheckers) 2/
Anyways, about the common-sense data/knowledge. How many people live in Albania? What's the title of Game of Thrones S05E07? What books had Tove Jansson written? When Google was incepted?

How'd one answer those today? 3/
Read 36 tweets
May 20, 2021
Just stumbled upon @hillelogram's new take on APL's unprecedented game of life solution: buttondown.email/hillelwayne/ar… — and remembered I had some experience trying to wrap my head about APL's lessons last year. 1/N (N > 10, probably)
2. I always was a programming languages geek, interested in "how they do it", but for quite some time APL seemed like some "curiosity from the old age", too obscure to even try to understand (I never tried too hard, TBH).
3. Then, a year ago, I've seen this article from @arcfide: sacrideo.us/is-apl-dead/ (funny thing, just notice it is also inspired by @hillelogram, would you believe it?), and it made me super-curious. Because it sounded like something that I'd liked to be said... but not about APL
Read 27 tweets
Apr 1, 2021
1/N. I recently mentioned @wikidata in a discussion with some colleagues, and once again understood people frequently either unaware of its existence or consider it as a "side-project" (merely curious, mostly for data geeks). Which is somewhat understandable but oh so wrong
2/N. My take on it is that Wikidata is the most important project of the @Wikimedia foundation to the day. It is not yet to full possible capacity, but it is incredibly significant. Explanations (sorry if it is obvious for some):
3/N: Wikipedia itself is one of the most outstanding civilization projects of the XXI century. By the complex set of circumstances, the almost impossible object appeared: open, independent, constantly updated table of contents to the entirety of the human knowledge.
Read 22 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(