Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.

Here is a extensive list about NLP in ruby: https://github.com/arbox/nlp-with-ruby.

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.


15 years ago I made the choice between Python and Ruby.

Without a doubt, choosing python was the correct move.

I can't imagine with the current trajectory, Ruby will be better.


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)


Yeah, I'm avoiding Python when I can over the syntax, but I can't always and that's ok - I've used far worse over the years.


I tried both and Python was an absolute disaster in comparison, but I suppose that depends on what you’re trying to build and who you’re working with.


You can explore Rubys ecosystem at ruby-toolbox.com

I’d say Ruby is a joy to use, there is this gem (package) for gui development called glimmer, you shoukd check it out.

Though, if you are going to focus on the scientific field, I think Python is more suitable.


Ruby is only relevant because of Rails, and if those two things are your use-cases then you’ll be better off with Python


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.


So tell us what are top 5 and why.


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.


Ruby is an excellent language/platform and you can do a lot more than using Rails. But yes I don't know for NLP.


There is an enormous Ruby ecosystem completely outside of Rails.


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.


And also YJIT has landed, which should help.


Performance is worth infinitely less than the sheer developer productivity of Ruby, at least when used by experienced engineers capable of restraint.


I was only extremely productive with it after adopting Sorbet, but still got by without it at first.


So it's the people not the programming language?


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: