News for hackers. Stuff that matters.
Re:Running GitHub on Rails 6.0 by AlchemistCamp on Tuesday September 10, 2019 @08:48AM (#20927547)
The place where Ruby really wins is speed of development. Despite massive ecosystems and many libraries, Python, .Net and especially Java all lag Ruby in terms of how long it takes to build a web app.

I'd say part of the reason is expressiveness of the language (since it's very easy to make DSLs with Ruby and Rails benefits greatly from them), but another part is cultural. Python, .Net and especially Java communities tend to suffer (and benefit!) from a strong emphasis on correctness and purity over speed and developer experience.

Re:Running GitHub on Rails 6.0 by philwelch on Tuesday September 10, 2019 @04:51PM (#20933575)
I'm not sure that Ruby is actually any faster or more expressive than Python. Having used both languages I consider them roughly equivalent.
Re:Running GitHub on Rails 6.0 by AlchemistCamp on Friday September 13, 2019 @08:26AM (#20961446)
Can you write DSL like the Rails router DSL in Python?

If so, how much work is involved?

Re:Running GitHub on Rails 6.0 by philwelch on Sunday September 15, 2019 @03:32AM (#20976056)
Having a cute API and leaving the parentheses out of your function calls isn't a DSL, it's just a cute API where you leave the parentheses off. I know Ruby people call them "DSLs" all the time, but they aren't.

Python doesn't have an idiomatic equivalent to block arguments, but you could probably write an equally usable routing API. It just wouldn't look as cute because there would still be parentheses.

What you end up doing in e.g. Flask is decorating your controlle method with the path that routes to it. Turbogears controllers serve routes based on class and method names without the extra wiring that Rails has. Django has a Rails-style "URLconf" (https://docs.djangoproject.com/en/2.2/topics/http/urls/) that actually seems a lot more intuitive and explicit to me.