Ruby always seems so appealing. Can anybody tell me how the Ruby ecosystem looks like w.r.t.
- (Desktop) GUI
- Natural language processing
I would really like to learn Ruby, but I can only justify the effort if I can use its ecosystems for some private projects, and I often have been burned by languages not offering too much in those two areas.
And speed-wise, as I understand, Ruby is the same ball-park as Python?
Glimmer is a award winning GUI Toolkit for ruby which supports every major platform (gtk, qt, wxwidgets, swt, swing, java fx, etc), it can also output as SVG or CSS: https://github.com/AndyObtiva/glimmer
Glimmer has been around for a while and is in active development.
If you want a fast running and fast starting GUI you should take a look at GraalVM from oracle and its Ruby implementation called TruffleRuby, it translates Ruby code to native code and optimizes C and Ruby code at compile and runtime to make it faster: https://www.graalvm.org/ruby/
I've been using a few NLP libs in ruby lately and it seems they're mostly all dead - at least the ones I've seen. I feel like everyone gave up and just moved on to python - or deep learning or something else more interesting.
Not saying they don't work, but if you click on a few from that last you'll mostly see last commit >5 years ago - in my experience.
As usual language and implementations aren't the same thing.
While Ruby community has pursuded many implementations in regards to JIT, the reference implementation even has two currently, on the Python side outside PyPy, nothing else has actually got any community support.
Only now thanks to the pressure of Python being the "2nd coming of Lisp for AI", but without its native code generation, there is some real pressure that actually writing C,C++,Fortran and calling it "Python" isn't that practical and a JIT on CPython would be welcomed.
On the other hand, those native libraries can be equally called from Ruby.
I made the opposite choice 20 years ago, and could say the same about my choice. But I wouldn't because realistically language choice is largely about what makes you happy. A good dev needs to be a polyglot anyway.
And I chose Ruby about the same amount of time ago, spent 18 years or so writing that professionally, and now write Python for a living. They’re not that dissimilar, if you can use Ruby you’ll pick up Python pretty quickly. (You will however swear profusely now and again as you encounter another incredibly clunky bit of syntax)
Rails is hardly what I would call Ruby’s selling point. Not even the top 5.
Unfortunately the ecosystem suffers from rot because it was a language for trend-followers at one point. But it is still a better developer experience than just about everything else I’ve worked with.
GUI stuff with Python sucks just as much as it does with Ruby. I.e. if you want to do GUI, don't choose either of these languages.
GUI kind of works best with whatever language the platform for the GUI toolkit wants you to use, but a lot of the time C++ will be that language, competing with JavaScript. Every other language, almost always will end up having bindings, or some other sort of outsourcing mechanism to connect its runtime to either C++ or JavaScript. If you want to just deal with one language when working on a GUI project, it's best to just go with the one the target platform wants you to use.
I would argue that the main selling point of using Ruby is Rails, for sure there are a lot of things you do in Ruby, but for sure in 2024 there are more performant alternatives.
One of the central arguments for Ruby is that performance is not everything (it was always slow compared to other programming languages) but programmer satisfaction is more important.
I'd say Ruby is the programming language I want to program in but Rails pays the bills.
As someone who has worked in Rails performance for quite a long time now I suggest that Rails performance is largely fine. Most Rails performance problems are database and/or architecture issues and not with the language or framework.
I've written Ruby commercially for about for 20 years, and dislike Rails. Pretty much none of my use have involved it. That includes web dev. Use of Ruby outside of Rails is more low key, but it's out there. My last project involved Sinatra for our web app and financially modelling and simulations for a VC fund in Ruby.
For NLP you will have less choice than for Python, but worst case you can bridge to Python code.
- (Desktop) GUI
- Natural language processing
I would really like to learn Ruby, but I can only justify the effort if I can use its ecosystems for some private projects, and I often have been burned by languages not offering too much in those two areas. And speed-wise, as I understand, Ruby is the same ball-park as Python?