Earlier quoted context omitted.
Isn't this true of any language? I mean the language isn't what decides how you connect or build your sql queries? In rails I could choose to write a pretty scary join ``` User.joins("left join ponies on ponies.user_id IN (select id from foobars where user_id=users.id").group("so_funny").count ``` or I could have a policy to avoid joins at all cost and reject any commit that uses a join and get fun things like: ``` u…
You are right, but aren't really attacking the point I was making. Even with totally optimized sql, one language's ORM will be inherently slower than another due to the intrisics of how the records being operated on are represented in that particular language. In Rails's case, EVERY single record pulled out of a database gets its own object. There is overhead to being able to represent table members from a relational…
Happy Birthday, Ruby
101–110 of 239 posts
Re: Happy Birthday, Ruby
#102Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
So, I'm old, and have done lots of stuff in lots of languages in frameworks. For about a dozen years, Rails was my go-to toolkit. I've written a couple dozen production applications with it. Unfortunately, Rails has really fallen out of favor lately. Even a Rails-specialty shop I worked for briefly has pivoted to using ASP.NET. I've played around in that stack, and found it lacking. (EF just doesn't compete as an ORM…
Rails is not like this. Rails is more like bridge where you have to learn the rules as well as this whole bidding system that fills a book before you can actually play the game.
There is no real magic in Rails, and once you learn the tricks yourself it becomes the most pleasant and productive ecosystem to work with that I've experienced. If you don't bother to learn though, it's going to be awful and slow and opaque.
By the way some of the good ideas in Ruby and Rails have made their way to PHP7 and recent versions of Laravel. So much has changed if your last PHP exposure was 12 years ago, it's not bad now.
Re: Happy Birthday, Ruby
#103Ruby's bare word syntax, while sometimes clunky, is usually nice to read. Other than that, Ruby is a stain on software engineering. If you have the choice, don't make it your first language! Ruby has the most fundamental flaws of any of the scripting languages.
Have you looked at the array_* methods in PHP?
Re: Happy Birthday, Ruby
#104I'm currently working on a Ruby project, and I love the language so much! It's elegant, fast enough for me, and the ecosystem rocks. It seems that, after Ruby borrowed from many previous languages, a lot of rubyisms went into Rust (the nice functional-style enumerations, the awesome package manager inspired by Bundler). And I'm thrilled the best of the Ruby world found its way into other languages. A future where the…
Wouldn't Crystal fit the bill for a fast compiled language explicitly designed to emulate Ruby's syntax? (I don't have any significant Ruby or Crystal experience, so if there are reasons why that doesn't fit the bill, I'm sorry)
There are tons of uses for non-Ruby languages. These days I'm primarily in TypeScript and Kotlin, even though I really, really like Ruby; as-is it doesn't scale, from the perspective of somebody who likes manageable code, as well as I'd like it to. But when I want a non-Ruby language, I am not tied to Ruby syntax (and I kind of think that Ruby's syntax works almost exclusively for Ruby? I think a lot of the expressivity of the Ruby language loses something when you don't have its dynamic approach to the world) in a way that makes Crystal, with its lack of libraries or maturity, not an appealing choice of tooling.
(I also feel similarly about Elixir, though in Elixir's case there are also some interesting things around BEAM that I might like to leverage. And I think that a typed Elixir would get my attention right quick.)
Re: Happy Birthday, Ruby
#105Earlier quoted context omitted.
Do you have any experience with Django? I haven't used rails myself, but I'm told they are very similar in the "look at what I'm not doing" regard.
Django has a lot going for it in terms of simplicity but it lacks most of Rails' advanced features and timesavers. In my experience it sits somewhere between Sinatra and Rails
Re: Happy Birthday, Ruby
#106After 25 years it seems Ruby is in gradual decline these days? You will find one ruby related post at HN after reading 500 of Javascript and/or Python posts here for example.
I don't think it's in decline, but it's certainly maturing - there's not so much "cool new stuff" to share about it anymore
On the other side of the world, Ruby has many adherents in the embedded development world. A large number of the Japanese talks are about mruby and that has motivated many of the last few years of the languages' improvements.
Re: Happy Birthday, Ruby
#107Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
Early in my career, I only "knew" a little C++ from a high school programming class I had taken, and I knew a tiny bit about Java. Then I found Ruby, and people talked very highly of it. But it had all these "Gems", I couldn't figure out what a Gem was. I didn't know enough. I thought it was like a compiler plugin or something. I thought that just like there were different versions of Java, there were different versi…
I didn't dislike Ruby, but I found Python much more intuitive, as you did, but I suspect that in great part was because it had a similar syntax and concepts as C++/Java.
It was like programming in C with a much cleaner syntax and writing 1/3 of the code, it really was an epiphany.
Re: Happy Birthday, Ruby
#108Re: Happy Birthday, Ruby
#109Earlier quoted context omitted.
Early in my career, I only "knew" a little C++ from a high school programming class I had taken, and I knew a tiny bit about Java. Then I found Ruby, and people talked very highly of it. But it had all these "Gems", I couldn't figure out what a Gem was. I didn't know enough. I thought it was like a compiler plugin or something. I thought that just like there were different versions of Java, there were different versi…
Python has a Cheese Shop full of Eggs. I love straightforward names as much as anyone, but I don't think Python is exactly the leader in this department, either.
Comments about Ruby say:
- "the webpacker gem"
- "Simple to integrate gems"
- "supported via gems"
- "few dozen obscure gems"
- "the I18n gem"
- "the ruby-each-line gem"
- "vast amount of Ruby gems available"
- "working with so many gems"
Comments about Python say: - "packaged either as a Wheel or an Egg"
- "The numpy module is a wheel"
- "a wheel is specifically not a source distribution"
- "NumPy publishes a lot of wheels for a given release"
All those Python related comments are from one single comment who's author was discussing the technical differences between Eggs and Wheels as packaging formats. Arguably only the last Python comment uses "wheel" as a synonym for "package" or "library".Re: Happy Birthday, Ruby
#110Ruby is the very least favorite of all the programming languages I've had to use regularly over my career. Its syntax strongly favors cuteness over familiarity. Wherever Ruby can diverge from expectations to give you a pointless little tickle of whimsical inventiveness instead, it seems to do so. Visually it looks like an unwanted love child of Pascal and Python. There's no clear rhyme or reason to the use of sigils…
So, I'm old, and have done lots of stuff in lots of languages in frameworks. For about a dozen years, Rails was my go-to toolkit. I've written a couple dozen production applications with it. Unfortunately, Rails has really fallen out of favor lately. Even a Rails-specialty shop I worked for briefly has pivoted to using ASP.NET. I've played around in that stack, and found it lacking. (EF just doesn't compete as an ORM…
Ruby has the easiest data access tools, between ActiveRecord and Sequel (which I prefer), out there. I don't know too many folks who'd disagree with you about that. But where you're happy with Rails taking a few lines, I am as of late big on Kotlin (because I agree with you regarding Java) encouraging me to be correct. I'm building a new product using Spring Boot, Kotlin, and JDBI and while, yes, there's boilerplate - it's not the thing that slows me down. I liken it to touch typing; I don't worry if a programmer can't touch type because getting text onto a screen is never the slowest part of the process.
The thing that slows me down, as it does whenever I'm programming, is thinking, and I've learned over time that Ruby doesn't really help me with that. (A lot of other toolchains, both statically and dynamically typed--hello, TypeScript!--do.) I just don't worry about writing a query with a join - it forces me to understand my domain while I'm writing it, not when it runs and bombs out with an error because I mistyped something or got the relationship wrong in my head because my IntelliSense doesn't exist.
It depends on what you're prioritizing. I went back to the JVM for this project in part for perf, but also because I have a pretty high bar for correctness and I want to make sure my stuff works without writing in/out tests for something as simple as types.
Horses for courses.
(Also, I would submit that the frontend SOTA for "Java" is React, FWIW, same as almost anywhere else.)