top | item 25535438

(no title)

dgregd | 5 years ago

Only if you are going to use Rails. It seems that in all other domains Ruby have lost to Python, Kotlin, Go and others. Personally I love Ruby and Rails, I prefer clean Ruby syntax over Python syntax, however except Rails all other activity is going in other languages. Kotlin code with type inference is as concise as Ruby code but executes 50x faster. Ruby simply won't have ML libraries like Python has.

For a web programming I would switch to Kotlin. However Ktor is still lacking compared to Rails in most important areas for me. In Rails common operations like upload a picture, serve is later in a different resolution, migrate a db, quickly create CRUD forms, etc. are just a few lines of code. In Kolin web frameworks you would have to invest much more time to glue together different libraries to do the same job. Many won't agree with that opinion but for me Rails ActiveRecord is the best part of Rails. There is no a such complete thing for a Java ecosystem. It is a beautiful compromise between ideological (only pure plain Java objects are allowed) ORMs like Hibernate and plain SQL approach like jOOQ.

discuss

order

AlchemistCamp|5 years ago

I've been using Phoenix rather than Rails as my go to for web development, but I still use Ruby shell scripting. It's dramatically faster to write than Python, Go or Rust, largely because it's got more convenient Unix interop than anything since Perl.

One example is, I've written a script that I can pass a domain name and an email address to. It will then set up basic nginx blocks, install certbo and add a cron job if needed, run certbot, get an https certificate and reconfigure the nginx blocks to reverse proxy incoming requests and force https.

I have no idea what language would have let me write this faster than Ruby did. Maybe Perl if I knew it well. Definitely not Go or Rust.

dgregd|5 years ago

Ruby started as a shell scripting language so I agree that it is good for that purpose. However the question is how much time one spends writing shell scripting code for personal use. If someone already knows Python and only occasionally writes shell scripting code then in my opinion learning a new language only for that purpose isn't a good investment. I would say Python is good enough for that tasks.

In other words if someone has a good enough tool in their tool-belt for a certain area, then learning another slightly better tool in that area is not a must.

In my opinion it is better to be proficient in a one language than mediocre in two similar languages. If someone is bored and has time to learn both Python and Ruby then why not.

freedomben|5 years ago

This is essentially my situation exactly!

Ruby is a fine application development language, but an incredible scripting language. Can't recommend it enough for that niche. Nothing else is even close.

pdimitar|5 years ago

For web development -- Kotlin? Hm, possibly I guess.

I'd go for Elixir's Phoenix or, if you really need some heavy duty API gateway -- Rust's Actix-web 3.x.