5 ms·
> the other comparatively-unpleasant language > one that lacks the elegance and consistency upvoted for perfectly concise description of that language. it is
by peoplefromibiza 4y ago
> the other comparatively-unpleasant language
> one that lacks the elegance and consistency
upvoted for perfectly concise description of that language.
it is even more sad knowing that high quality alternatives for the most popular libraries exist, but inertia is simply too high.
@work I've tried to introduce Ruby to my colleagues that are very bad at programming, but good at science. They ditched it with reasons like "I don't like it" or "it's too slow" without even measuring (it is not! Shopify would have died by now). I'm still using it without them knowing and it's the reason why I'm 10x faster than everybody else to build solutions.
The other language it's the only one they "learned" at uni and keep using it for everything, even when it's the worst possible choice, management doesn't care and doesn't know the difference.
software engineering is still not engineering, unfortunately.
- pelasaco 4y agothe "too slow argument" is normally based on old internet opinions and benchmarks.. ruby today is pretty fast. In the company that I work, we do a lot of system programming using ruby, web development, etc.. It came to substitute perl around 2005, and we still using it successfully today. When we need something really, really fast, specially including parallel processing and etc, we just use jruby.
- dragonwriter 4y ago> ruby today is pretty fast Ruby today is slow as hell, but not as much as slower than other slow as hell languages as Ruby used to be.
- pelasaco 4y agodid you benchmark Jruby or TruffleRuby? Did you compile c-ruby with jemalloc? Normally the "ruby is slow" argument, is based on not being involved with ruby and solving real problems with it. Some people will just LOL this argument even harder if you add development time and code maintenance costs on that equation.
- vidarh 4y agoAlso premature optimisation. I did image manipulation and statistical analysis of images using predominantly Ruby for my MSc thesis work 15 years ago, and it took rewriting a couple of dozen lines of code with RubyInline (to use C) to remove the bottlenecks. Using pure Ruby to prototype and rewriting just the maths heavy code to C when I knew it worked and knew where the bottlenecks were saved me massive amounts of time. I've done map rendering in Ruby for similar reasons - outside of specific niches, it's rare for the speed of Ruby to be an issue.
- pelasaco 4y agoOne funny anecdote (and unfair one) is that what Twitter wasn't able to do (rails scale), Mastodon did.
- vidarh 4y agoI recall several discussions of it at the time, and I don't think it's so much that they weren't able to, as that they'd made lots of disastrous architecture decisions (building it around a monolithic database etc.) that required a rewrite, and whomever doing it used it as an opportunity to blame it on Rails as an excuse to switch to their preferred stack. After all, sharding message distribution via federation (even if you hide the federation behind a veneer of a global userid -> shard mapping) was a well understood long before Twitter even launched (e-mail... reflectors...), so it was a rather embarrassing architectural decision to not even try to account for it. Heck, I co-founded a webmail provider in '99, and one of the first things we did was implement ways to map user ids to a distributed set of backends and support for migrating accounts between backends, because we knew it'd be necessary to be able to shard smtp servers, frontends, and storage separately. That wasn't in Ruby, but the architectural pattern is so obvious. The language change may or may not have made sense for them at the time (after all Ruby was much slower then, and they by then had the size where a rewrite of core parts to cut hosting costs might have been worth it), but that they blamed their architectural failures on Rails was a cheap shot.
- 4y ago
- mtrower 4y agoTo think I'd live to see the day the JVM is regarded as "really, really fast". Ruby is not "pretty fast". The hardware you run it on is insanely, mind bogglingly, out of this world fast and so people don't notice the way that they used to. ...which is fine, you don't always need to be fast. Just be wary of misattribution.
- pelasaco 4y agoThe java based ruby, removes the GIL, which provides us real multithreading. Truffleruby is "A high performance implementation of the Ruby programming language, built on GraalVM." If you prefer there is even a rust based ruby https://github.com/artichoke/artichoke https://github.com/artichoke/artichoke again, IMO, the microbenchmark, doesn't matter. What matters is the problem domain, whole stack and the whole "speed", including development, deployment and etc, and for some domains, ruby is the best and fast choice.
- Alifatisk 4y agoWell, Ruby 3 has Ractors which is still in experimental stage but offers true multicore processing. It's quiet fun to play around with actually, to see all your cores being utilized.
- jrockway 4y agoHow is "I don't like it" not a good reason for not using something? Ruby in science is the path of most resistance; if your work isn't already hard enough, here's a way to make it harder. That's because everyone is using Python. Think of it like writing scientific papers in English even though you like Esperanto better. Everyone uses English, so you have to too. That's Python's current state.
- peoplefromibiza 4y ago> How is "I don't like it" not a good reason for not using something? Don't ask me... > Ruby in science is the path of most resistance; if your work isn't already hard enough It actually isn't that hard, honestly. Very few people do cutting edge work that requires analyzing massive amounts of data and, from my experience, other languages are not much better. They still rely on C (or Rust) bindings, because they aren't adequate per se for the task. > That's because everyone is using Python Yep, the aforementioned inertia. But, IMO, as a programming languages nerd, some syntax are worse than others and I have to review many Python programs that conceptually read like someone speaking a foreign language without knowing the rules, like "I go make shoppings". That code wasn't "created" but simply copy/pasted from somewhere else and then adapted because some concepts don't require understanding, just tinkering. Python it's not easier than Ruby, shooting yourself in the foot with Python it's easier than in Ruby and yet, here we are. At least in the diatribe C vs Rust, C is actually simpler than Rust as a language and programmers have to learn fewer concepts, even though Rust is better as a language/ecosystem overall. > Everyone uses English, so you have to too That's exactly the point, the most spoken language in the World is English spoken by non native speakers. Like me. It's not British English or American English (in Europe is Russian, anyway, and Chinese and Spanish would like to have a word with you). So it is people's Esperanto, which is kinda of an abomination linguistically, but language evolve naturally it does not need a compiler or an interpreter to work. When I am abroad for holidays or conferences, I can perfectly understand what people mean when they speak "Engrish", native speakers often don't. A recent submission about it https://news.ycombinator.com/item?id=25784683 https://news.ycombinator.com/item?id=25784683 But in programming the concepts are the same in every language, so it's not like learning Finnish if you are Egyptian, it's more like learning to ride a motorbike if you can ride a bicycle. People learn Pandas and Numpy and Scikit-learn, not Python, when I learned how they worked porting the examples to Axon[1] wasn't hard. I managed to do it with the help of a colleague whose versed in learning programming and he thought Axon was more readable than Python. But then again, people usually think they know X better, feel more confident in X and will keep making the same mistakes over and over, because they don't know what they don't know and their salary do not depend on it. They have people like us fixing their code. Their salary depend on writing "I know X" on their CV, which usually is just not entirely true. Ruby just got out of fashion, but it isn't inferior to any other language out there and its ecosystem is completely fine. Reminder: TruffleRuby exists. [1] https://github.com/elixir-nx/axon https://github.com/elixir-nx/axon edit: formatting
- adammarples 4y agoIn what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice? Unless you're doing some clever ruby metaprogramming type stuff which is totally impossible in python.
- peoplefromibiza 4y ago> In what situation is python the worst possible choice, while ruby which is very similar to it is the best possible choice? in no particular order, on top of my mind (there are many more): - mixed environments when you can't compartmentalize Python in a container. Python package management is one of the best examples of "poor implementation" - mixed environments, when both Python 2.x and 3.x are present. Migration to Python 3.x is the textbook example of "badly executed". And we are still not entirely there 10 years after. - prototyping web apps, in the same time spent configuring Python venv, you have a perfectly functioning Ruby prototype - writing web apps, in the same time you understand how to make a custom sql query in Django, you're already selling your first product in Ruby and the website won't be ugly as hell by default. Rails is the killer app, nobody can deny it. My biggest gripe with Python is that many times when I have to deploy Python, I discover an issue and ask the author(s), I'm back to "but It works on my computer" times, like when I started, in the 90s of previous century. Yes, Python is used to write beautiful things such as youtube-dl and Sublime Text (porting Sublime to Python 3 is one of the reasons why Sublime is almost dead). However, given the fact that in Sublime plugins are written in Python, people flocked to (even!) Atom, because they could use other languages, not inherently better, but with less issues connected to the language used. I lost count of how many times Sublime died on me and stopped working spouting Python errors that I had no time nor will to fix. Disclaimer: I am a paying customer of Sublime 2 and 3. Edit: lots of Pythonists triggered for no reason apparently. Don't take it personally, if you have counter opinions, express them. Downvoting is not an opinion, it's a passive aggressive way to show disagreement, which frankly is the reason why we're still stuck with Python. I don't mind an honest discussion and people disagreeing with me, it's why I am here after all.
- adammarples 4y agoI think this could be summed up as a) python venvs can be very annoying, and are a weakness of python, and b) rails + active record is a strength for ruby. Fully agree with both, but disagree with the hyperbole (worst possible choice vs. best possible choice). FWIW I haven't even seen Python 2 code in about 6 years.
- Shorel 4y agoI think Dlang is better than the other languages mentioned in this thread, but I know almost no one uses it. It is what it is.
- peoplefromibiza 4y agoI agree with your statement. The problem for Dlang is that it never reached the popularity Ruby did. Airbnb, Github, Shopify, Gitlab, old Twitter (and many, many others) are all written entirely in Ruby on Rails.
- emilper 4y ago"are all written entirely in Ruby on Rails" ... then promptly rewritten in something else :) https://medium.com/airbnb-engineering/rearchitecting-airbnbs-frontend-5e213efc24d2 https://medium.com/airbnb-engineering/rearchitecting-airbnbs...
- emilper 4y agoI use it, I am not "almost no one" :)