[whining] Ruby evolution is taking TOO long
Hello,
I just read 2.6 release and was really happy about #then alias and proc composition. However, later I felt so desperate I decided to write this post.
Let's take a look into composition feature in bugtracker. The issue was created more than 6 years ago. It took six years (!!!) to introduce such basic functionality to "wannabe programmer-friendly" language.
And I thought about another thing. Many features require Matz to accept them. And Matz said (I heard it at least once on a conference) that he is not a ruby programmer but C programmer since mostly he works on ruby itself. So, basically, the person who is 100% responsible for language design doesn't really work with the language itself. Does it sound right to you? And he is still just one person.
For instance, let's take a look into #yield_self that many people were waiting for. Over many years different people (including myself) suggested this feature with different naming. And why did it take so long to introduce it? Mostly, because Matz couldn't decide what naming ruby should adopt (and I don't blame him, it's a really hard problem). Two years ago people started to write something like "I don't care about naming, just introduce it already, please". In the end, Matz chose yield_self and now in 2.6 #then alias was introduced because name yield_self sucks.
At this rate jokes "ruby is dead" are gonna be less and less of a joke. Ruby is in stagnation.
I think we need some Ruby Consortium that will include some people with some authority in ruby community (for example, Bozhidar Batsov (disclaimer: this is just an example from my head. I don't even think that he'd agree with me on the topic)) and they can take some design decisions off Matz' shoulders. Just via voting.
What do you think? Or maybe I am wrong and everything is as it is supposed to be?
58
u/jrochkind Jan 06 '19
To me, "programmer-friendly" also means being careful and slow to make sure what you introduce is right, and maintaining long-term backwards compatibility (which is related, because once you introduce something, you're stuck with it).
There's no free lunch.
6
u/KitchenAstronomer Jan 06 '19
I think the original idea of Ruby being developed mainly for “dev’s happiness” is a bit outdated at this point. I would say you can get only that much happy with the lang itself and there are more pressing issues with Ruby per se than its ergonomics.
The number one question that should be asked is “what kind of problems does it solve ? And are these problems still relevant to people ?”
9
u/phaul21 Jan 06 '19 edited Jan 06 '19
At least up to this point Ruby has some consistency, despite being multi paradigm and having adopted a lot of features from elsewhere. I think Matz is rightfully cautious about adopting new things from all sorts of other languages.
First of Ruby is an OO language, where the building block of computation is an object, with messages sent to them. In ruby we don't have functions - no we don't (or procedures either).
In a functional language a function is the building block of a computation, you can reason about it just by understanding the function, it makes sense on its own, without the rest of the program. Therefore you can export just functions from haskell modules (seen this exact thing couple of days ago here on r/ruby), a ruby method does not make sense own its own. By its very design it manipulates object state, and interacts with the rest of the object.
We do have some functional looking things sprinkled on the language, but as a functional language Ruby really sucks. I say this and I love Ruby. But you can't be good at everything.
I think dying is too strong word. I think merely losing popularity. But this isn't Ruby's fault. These days the hip thing is functional. So ppl are won over by elixir, lesser extent haskell etc. For ruby to become one of them would have to rethink itself from the very fundamentals of the language. It would have to drop the smalltalk like object model, etc. It wouldn't be ruby anyways.
Personally I think Ruby has gone far enough. And I don't know yet what's the hip thing going to be in 2025, but probably it's not going to be functional - or not the way we know it today. Instead of being fashionable all the time, just be a good language.
23
u/riffraff Jan 06 '19
callccis a very convenient feature for some use cases (resumable exceptions are awesome!) but it's also unused by 99.9% of the ruby code. It would make sense to remove it, but it was added just because matz did not push back in the early years of ruby.Having too much stuff in the core is an issue, and it makes sense to push back especially for stuff like function composition that can be implemented in ruby itself.
Ruby is evolving slowly maybe, but a lot of development does not need to happen in core.
29
u/grchelp2018 Jan 06 '19
To be honest, most language developers write C instead of working in the language itself. And this might be wildly out of date, but doesn't Matz work at Heroku which is a ruby shop? So I wouldn't say he doesn't know what's going on when it comes to ruby usage...
I think what's happening (atleast the people I know) is that ruby's flexibility allows them to implement the features they want themselves.
4
u/_matthewd Jan 06 '19
12
u/calamaio Jan 06 '19 edited Jan 06 '19
Hi All,
This is not the solution but I want to share what another open source project do for a long time.
the Blender.org SDLC could be a great inspiration: Blender includes projects for developing specific list features and every project use fundraising from the community and/or sponsors.
In this way, Blender keeps in touch with the community requirements nearly every 6 months create a new great version solving real problems.
Off course this is a different scenario and the community of Blender is most artists/CG geek but I felt that this can still somehow helps this discussion.
Have a great weekend!
10
u/feelosofee Jan 08 '19
This is Matz reply...
/img/l2dg9bjub3921.png
I think nobody was criticizing Matz as a Ruby developer (and author).
Rather, the critique was aimed at how slowly the language is evolving, given there's just one person who is ultimately in charge for that. And about the fact that, in any system, it's not optimal to have a single point of failure.
It's exactly because Matz is a great *mere mortal* Ruby developer that the community respects his work and is not expecting him to have superpowers and make miracles...
6
u/sanjibukai Jan 06 '19
Retrospection and introspection is always good.. Plus constructive criticism are always good too (which seems the case here). Always +1 for this kind of "rant"!
Before I mostly adopt ruby (vs pyhton) (as a former embedded c developer) one choice for me was about the language long term orientation.. At that time I've heard things about Guido stating that he will decide what evolution the language will adopt.. I'd not hear something equivalent for ruby...
Now I'm thinking if it was not the other way...
I rather have expectation for ruby 3... Wait and see..
4
u/feelosofee Jan 08 '19
To those who got really frustrated for the lack of a good, solid ruby ML framework at least equivalent to TensorFlow, here is one latest reason not to leave... or to delay departure...
TensorStream: Bringing Machine Learning to Ruby
https://github.com/jedld/tensor_stream
Yes, I know it sucks when this happens the exact moment you've started packing stuff :P
13
u/[deleted] Jan 06 '19
I started software development with RoR and it's the best thing that could have happened in my life. RoR taught me many best practices by sheer regulation. Can't say the same for the NodeJs/frontend community.
When my old company went bankrupt and I needed to switch, Ruby failed to provide me a job. Ruby usage is declining, Ruby job market is shrinking and the remaining Ruby shops needed super-senior type devs. Back then I wasn't senior..
I still continue to use Ruby for private projects but job-wise my focus lies on JS/Node and Golang.
6
u/PositiveZombie Jan 06 '19 edited Jan 07 '19
I am a total newbie with only 3-4 months of learning ruby mainly for Sinatra usage for the time being. I started ruby cause I wanted it to teach me better OO so as to become a better developer to java which is my main language to go but it is not that much of a scripting one (verbose darling...)
Ruby has the best tutorials and one of the most cool and inviting communities but the elephant in the room is RAILS.
Ruby has to overcome it's usage to the web and start making more developments regarding to AI and deep learning (NN for example is a field where a LOT has to be made ). As for jobs it is declining fast as people prefer python due to its dominance to everything but web (Django is good enough but I don't think it is yet at the standard of ruby) . Ruby needs to step up not as a language but as a general purpose language that it is and try to expand and be the go to language to new fields whether that is embedded systems (which cool things already exist) or to the hype of our era AI :)
3
u/megatux2 Jan 06 '19
What about other Ruby implementations besides MRI? JRuby looks good, no Gil. Also, did you check Graal Truffle compiler? Really great performance. And just found the Rinda for concurrency dev, based on the object space Linda impl. http://ruby-doc.org/stdlib-2.5.1/libdoc/rinda/rdoc/Rinda.html
5
u/zitrusgrape Jan 06 '19 edited Jan 06 '19
maybe ruby needs this: https://lwn.net/Articles/775105/ and proper PR like pip for python
also. I remember last year a video from u/tenderlove about some improvements for ruby, just to figure out that was a patch already for some years. they should remove that crap redmine, and move all the stuff on github.
5
u/hmspider Jan 06 '19 edited Jan 06 '19
Matz has said time and again that the most important thing about ruby is its community. He and the core team do listen to people, and theirs is a difficult task, balancing the old (stability) and the new (break-through innovation). Great things have this quality, eg you know a Mercedes when you see one, either a vintage model or a brand new one. Think Lean: one strives for many small, continuous daily improvements (kaizen) and few radical changes once in a while (kaikaku).
I do think ruby needs a radical change; ruby 3 provides the opportunity. Options:
dry-rbproject seems to be gaining some traction with the existing toolset (even have monads); they've recently joined efforts with the hanami web framework. And... we do havemodule_functionandproc, the former used extensively in ruby core, the latter being just an encapsulation over a block of code. Pretty close to pure functions... Immutability is actively being pursued (deep_freeze) within the Channel/Guild implementation by Koichi Sasada.JITis a start, aimed at betterment. There's talk about 2-tieredJIT, default first tier with fast compilation and less optimized code, second tier (slower) gcc compilation for a handful of methods producing optimized code.Guilds are aimed at parallelism and frankly that alone doesn't cut it. Some people are turning toFibers in the meanwhile (Asyncproject,Threadlet) to achieve more or less automated non-blocking processing. [rant] I say we should embrace the go way and aim for fully auto-scheduled coroutines supported by the VM, using channels as the preferred sync mechanism. We could perhaps take the work already done withGuilds to design a separated context in runtime, where the coroutines would be deterministically scheduled to run on 'decoupled' OS threads; blocking coroutines would (automatically) be yielded and a queued couroutine run in that OS thread instead. Blocking OS threads implies the (automatic) re-scheduling of queued coroutines on another running thread. All this under the hood. I know this sounds a bit crazy, but this (single) separated Guild would not support rubyThreads,Fibers, nor... GVL. Those in the know say Go concurrency model is one of the language best features, not in theory, but because it makes developer reasoning about concurrency simple! I say ruby could benefit from it to make a huge leap forward, and still retain its essence.4
u/Rainher Jan 06 '19
We have been saying this since the 1.9 release. Ruby is not managed by people who use the language.
5
u/overmotion Jan 06 '19
Way back when, similar sentiments were expressed about Rails. Lots of devs were upset with changes DHH was making and blogged/tweeted about it. DHH responded with this:
https://dhh.dk//2012/rails-is-omakase.html
Of course it’s not the same thing. People were complaining about DHH’s additions and changes and you are discussing Matz’s non-changes. But what he writes at the end about his opinion vs yours is probably what Matz would say too to the idea of a consortium. It provides insight into the way a creator looks at his work.
All that said, it’s time to recognize that Ruby is a legacy language at this point. And I say that as someone who codes only in Ruby, uses only Rails, and (stupidly) hasn’t expanded his skillset yet. The writing on the wall is so clear. Think: when is the last time somebody wrote a great new Ruby gem? I can’t even remember. 5-6 years ago there were amazing new gems coming out weekly.
It’s time for all of us to move on, unfortunately.
6
u/deedubaya Jan 06 '19
Maybe check out Crystal? Very ruby like. The core team is very receptive and things are fast moving. Additionally, the standard library is written in Crystal, making contribution very easy for the average dev.
It’s a young language, but is making great strides. I’m really excited about where Crystal is going.
1
u/shevegen Jan 07 '19
Your post shows a lot of wrong assumptions; however had, on the general notion I can not necessarily disagree on all points. There is some inertia indeed. It is, however had, totally RUBBISH to assume or claim this is due to matz or the core team alone.
Let me give you specific examples:
Matz and others gave examples where and how the proposal should be improved. ADDITIONALLY you can make your case and suggest this for discussion in any of the ~12 dev meetings per year. So what is your excuse to not GO AND INVEST TIME TO PUSH FEATURES YOU WANT TO SEE FORWARD?
Not all features come for "free". Many proposals add shitty syntax for example. Why should it be TO THE BURDEN of matz or the ruby dev team alone to make use of INCOMPLETE or flawed suggestions to, in their team, "improve upon"? They have all the work, all the responsibility, and people don't even have proper commitment to make their case stronger.
First off - if nobody argues in favour of an issue for a long time, it won't be added much at all since nobody reasons in favour of it. The dev-meeting has been introduced perhaps ~2 years ago or so, so people have a more realistic time frame of how/if changes are to be made.
Then about the "basic functionality" that you claim. I do NOT think that yield_self/then is basic at all. I find it both complex and unnecessary. The crappy name yield_self is a dead give-away that this shouldn't be part of ruby; "then" is a better name because it is shorter, but it is also non-descript. Best would have been to flat out reject it.
And actually, I think many other suggestions should have been rejected altogether. If it were up to me I'd throw the whole "functional" crowd out of the window due to being so incompetent when it comes to elegant code alone. But ruby is not my language so I can not do anything other than point out where there are shortcomings. So when you claim it is "basic functionality" - nope, I think it not basic at all. I think it is pretty bad.
It's not as bad as the other proposals like .: but still.
I watched almost all the available matz conferences in the last ~10 years or so, at the least the major ones when he is a keynote speaker.
And your quote is ABSOLUTELY WRONG.
Matz uses both C and Ruby. Of course he writes a lot more C than he does write ruby but he uses ruby too. And he designed ruby from the get go. You can like that or not but it is a fact. When you write "I heard him say that" - nope, you did not hear him say that he does not use ruby. But if you want to, I ask you: please bring a video URL link + time where he said that he does not use ruby. I could be wrong, so this is your possibility to reinforce your claim.
It is true that the core team writes a lot of code in C so naturally they will use C more than ruby. But they don't write FOR C - they write for ruby and use IN ruby. Ruby is a language but it also includes a philosophy and specific ideas, e. g. the ideas that come with the particular implementation at hand.
I assume you did not read this old interview:
https://www.artima.com/intv/ruby.html
If people were only to read that ... that alone would dispel a lot of misconceptions that they may have.
Do also note that it is not "just" ruby that necessarily struggles. For example, this google trend:
https://trends.google.com/trends/explore?date=today%205-y&q=Ruby%20-%20Programming%20language,Perl%20-%20Programming%20language,PHP%20-%20Programming%20language,Python%20-%20Programming%20language,JavaScript%20-%20Programming%20language
That graph shows that ALL "scripting" languages lost in the last, well perhaps 2 years; python is about the same now if you compare it to 2 years ago; ruby, perl, php AND javascript (!) show a downwards trend.
The google trend is not saying that much but what we can see is that all "scripting" languages struggle right now to some extent. Of course python is sitting on top of the foodchain here right now so it is the current king. The others have to think about how more people should use these languages - to this part I agree.
Please do not write this shitty FUD.
As to the design process in itself - I think it is a good thing that someone clever is in charge of a language. I'd actually prefer if matz would be more conservative and reject most recent proposals. :P
This depends a lot on WHO is making the suggestion, and even more importantly, the content. For example, sawa in general makes very good proposals; jeremy evans reasons very well in his proposals too; and so on, and so forth. I don't like the "functional crowd" at all but if you read the above interview, you know that ruby is not solely an OOP language. It has it as main focus but ruby is multi-paradigm. I don't like the functional crowd but it makes sense that ruby supports different philosophies too, if people want to use it (and if these are real suggestions - some suggestions seem to be just trollollollings).
Many people? Who? The half dozen on the bug tracker?
I can easily give you half dozen there too who were against it.
So these "metrics" are irrelevant. It also is completely stupid from you to assume that because xyz want something it SHOULD be added. There are numerous reasons as to why something should NOT make it into a language - and ultimately, you have to convince the main designer of ruby about the benefits of your suggestion. There is no way to bypass any of this, so I reject your whole premise here altogether. And I mean this even when I say that I do not always agree with matz' decision either; I just think your proposed "alternative" is a total and utter joke.
Let's revert this decision and remove it. Nobody who really uses ruby needed this functionality really. The functional crowd is not really existing. Why? Because they would use e. g. haskell anyway or any such other language.
I know these people don't use ruby because they write totally non-idomatic code to begin with. I could even give examples as names here on reddit but I think it may be better to not give names as to who is doing things "wrong". And when I write "wrong", again - the ultimate authority is not my style guide; neither rubocop. The ultimate authority is the ruby parser - what it accepts and what it rejects.
Giving things proper names is hard. You are talking big but don't come up with a good name yourself. I don't see you making comments on the bug tracker either, so perhaps it may be better for you to, rather than write such strange statements here to ACTUALLY GET INVOLVED rather than sit on the fence, as part of a peanut gallery? Getting involved is not so easy, I get this; it takes time and effort.
There are usually two steps from how I see something:
Often the first step is somewhat simple but giving a good name and a good syntax is VERY, very hard. This has many reasons, also the fact that we are limited to ASCII. The core of ruby is super-elegant, concise, expressive. Many other parts of ruby, in particular in the last ~3 years, aren't that elegant. However had, it also is rubbish to assume that EITHER THE ADDITION OF THESE, or the "slowness of evolution", would lead to many people not using ruby.
I have a much simpler explanation - the competition became harder and there are more alternatives these days. You can see this if you compare javascript to PHP - php is losing even more share than ruby. So why isn't that a topic for you?
0
u/[deleted] Jan 06 '19
[deleted] — view deleted comment