Live data from Hacker News

Replacing Ruby on Rails: Let's Go

madebymany.com

51–60 of 89 posts

Re: Replacing Ruby on Rails: Let's Go

#51
post #9

I'm surprised he chose to use Martini for the web component since the author himself has chosen to discontinue development of Martini in favor of a different approach with Negroni. These days most people I know that use anything outside of the Golang stdlib seem to reach for Gin.

The choice of library names in Go makes your comment here sound like a scene out of Mad Men.

Re: Replacing Ruby on Rails: Let's Go

#52
post #33

Odd. RoR and Go address entirely different app domains. The only thing that connects them is that RoR was trendy yesterday, and Go is trendy today. If this is the rationale for replacement, the author will be writing plenty of "replacing" articles in the years forward.

What do you see the app domains of Rails and Go as?

With RoR it's pretty much in the description. Monolithic web apps with relatively standard and simple domain logic (i.e. CRUD). Lots of presentation code (HTML templates, handling of static assets and what not).

Go is for writing small, focused, paralellizable and likely distributed services. If I wanted to crunch data, I'd try Go.

I'd expect, say, a RoR app to connect to a Go service for some of its heavier domain logic. I'd neither write a RoR-type app in Go, nor a Go-type service in RoR.

Re: Replacing Ruby on Rails: Let's Go

#53
I never personally learned Rails so I'm just an interested observer, but can someone explain the problems with Rails currently? And why the switch in language rather than just making fixes to the framework? After looking through the article it doesn't seem like there was a very strong case made for Go. Thanks!

Re: Replacing Ruby on Rails: Let's Go

#54
post #2

I like Ruby/Rails, I like Go. I like frameworks that make your life easier when starting a new project. I don't think Go is anywhere near the list of languages to build a Rails successor on top of. Rails can do so much of the cool stuff it does because Ruby is an incredibly flexible language. Go, on the other hand, could be described as "inflexible as a feature". You have a beautifully simple language that optimizes…

I for one would like to see a serious Go-based alternative to Wordpress. Virtually every major CMS out there uses PHP, and all of them are highly prone to hacking.

> Virtually every major CMS out there uses PHP

This probably has to do with the majority of cheap web hosts out there offering only PHP, Perl, and (if you're really lucky) Rails.

Re: Replacing Ruby on Rails: Let's Go

#55
post #2

I like Ruby/Rails, I like Go. I like frameworks that make your life easier when starting a new project. I don't think Go is anywhere near the list of languages to build a Rails successor on top of. Rails can do so much of the cool stuff it does because Ruby is an incredibly flexible language. Go, on the other hand, could be described as "inflexible as a feature". You have a beautifully simple language that optimizes…

The idea that programming languages are "worlds apart" and "vastly different" is hyperbole that would make Turing frown or maybe giggle. Have you considered that Ruby is written in C [0], and that you can do plenty of things with a general purpose programming language and some good ideas? Edit: Would you care to substantively explain the downvote(s)? The parent is so preoccupied with frameworks he's overlooking the b…

Your blood is 92% water. Seawater is somewhere around 95% water. Despite being incredibly similar, replacing one with the other in any great amount would be catastrophic. You share half of your DNA with a banana, but you're still completely different from a banana in any way anyone cares about.

The fact that Prolog, Fortran and Ruby are all Turing-complete is useful to know from a computer science standpoint, but from a perspective of actual use, it just isn't that relevant. A language — whether human or computer — isn't just about the algorithms it can express, but about the ways it lets you express them, understand them and combine them. And Turing equivalence tells us very little about that sort of thing.

This is a bit abstract, so here's a tiny but concrete example of how differences in how you express an algorithm can have a tangible effect:

  f = open("somefile.txt")
  f.write("Hello world")
  f.close()

  with open("somefile.txt") as f:
    f.write("Hello world")
They're effectively the same, and could conceivably even be compiled to the same object code, but the latter is less error-prone — we can't accidentally leave the file open. A language that only allows the former is inherently more brittle. There's a whole world of variation like this (and also a lot unlike this) that doesn't affect whether the language is equivalent to a Turing machine, but does have a real impact on your program.

So I think it is quite possible for languages to be worlds apart while still being able to compute everything a Turing machine can.

Re: Replacing Ruby on Rails: Let's Go

#56

I never personally learned Rails so I'm just an interested observer, but can someone explain the problems with Rails currently? And why the switch in language rather than just making fixes to the framework? After looking through the article it doesn't seem like there was a very strong case made for Go. Thanks!

In a nutshell: Rails isn't shinny anymore. By migrating from (now) old Rails to new shiny Go, people can write these kinds of articles and pretend to be cutting edge and forward thinking.

Re: Replacing Ruby on Rails: Let's Go

#57
post #2

I like Ruby/Rails, I like Go. I like frameworks that make your life easier when starting a new project. I don't think Go is anywhere near the list of languages to build a Rails successor on top of. Rails can do so much of the cool stuff it does because Ruby is an incredibly flexible language. Go, on the other hand, could be described as "inflexible as a feature". You have a beautifully simple language that optimizes…

The idea that programming languages are "worlds apart" and "vastly different" is hyperbole that would make Turing frown or maybe giggle. Have you considered that Ruby is written in C [0], and that you can do plenty of things with a general purpose programming language and some good ideas? Edit: Would you care to substantively explain the downvote(s)? The parent is so preoccupied with frameworks he's overlooking the b…

Framework programmers without a solid CS background dont always get it.

Re: Replacing Ruby on Rails: Let's Go

#58
post #23

Rails is still the best framework for building CRUD applications. It shouldn't be used for every scenario but if you want to build a traditional CRUD app, nothing is better than Rails in my opinion.

I think ASP.NET MVC is as easy as Rails for CRUD apps.

i dont use .net, but i'm impressed with the number of smart people praising it (and Azure) these days.

Re: Replacing Ruby on Rails: Let's Go

#59
post #33

Odd. RoR and Go address entirely different app domains. The only thing that connects them is that RoR was trendy yesterday, and Go is trendy today. If this is the rationale for replacement, the author will be writing plenty of "replacing" articles in the years forward.

What do you see the app domains of Rails and Go as?

I've worked (as a freelancer) on a number of apps recently using Rails for the "front back-end" and either Erlang or Go for the "back back-end" and it's been working great.

Rails works great for things like authentication, creating a nice and maintainable UI, handling billing code, sending emails, managing the database schema, and all the web related stuff.

Erlang and Go work nicely for all the "heavy work", think sending tens of million of push notifications quickly, crunching data etc.

They can communicate using a shared, Rails-maintained database, and things like Redis to trigger updates or orders.

You can even do Erlang-backend processing of Sidekiq payloads, pushed from the Rails side etc.

All in all: use each tool for its own strengths.

Re: Replacing Ruby on Rails: Let's Go

#60
post #38
post #4

Earlier quoted context omitted.

> I just don't see a monolithic web framework being high up on the list of "must haves". And I think that's what makes Go so welcome to many people. In fact, I'm tired of frameworks that do everything for me because they tend to do everything just "well enough". And I noticed the OP is using Martini - which isn't necessarily bad - but it's not needed. It does make learning a language like Go a lot easier for newcomer…

In fact, Go's standard library is fantastic, so you don't need Martini for many things. I think it provides a nice layer on top of the code for comprehensibility when reading through code

Better use gin or negroni, since martini is slow due to reflections
Post reply on HN