Live data from Hacker News

I Miss Rails

chanind.github.io

161–170 of 522 posts

Re: I Miss Rails

#161
post #148

Earlier quoted context omitted.

Honestly, I just wish Rails had some degree of static typing (a la TypeScript.) As a Rails code base grows and patterns are required beyond the basics, it becomes a nightmare to tell what comes from where. You'd probably gain some mileage from that in your React codebase.

Static-typing seems so at odds with Ruby/Rails that I can't even imagine what that would look like.

It would ideally look pretty similar to typescript. There's actually a few projects adding typing to ruby, but they seem to be mostly trying to catch issues at runtime, which to me is pointless. Or the syntax is onerous, using decorators and/or separate type definitons.

I'd be really interested in a typescript like superset of ruby, and I've even thought about building a prototype of it, though it's quite outside my area of expertise.

Re: I Miss Rails

#162

I've known rails for years but haven't yet used it seriously. I felt it's good because setting up is easy and the velocity is high. Until now I use it every day and I found it's really great and better than my previous impression: 1. Compared to JS there's always a specific way of doing things - how to validate, how to dispatch async Job, how to send emails and real-time notification etc. 2. Compared to Spring there'…

>1. Compared to JS there's always a specific way of doing things - how to validate, how to dispatch async Job, how to send emails and real-time notification etc.

This is so important. When doing something on rails you always get instructions on the exact things you have to do where as JS always seems to either give you 500 different versions of the instructions or just expects you to work out how to set it up based on everything else in your project.

Re: I Miss Rails

#163
post #148

Earlier quoted context omitted.

Honestly, I just wish Rails had some degree of static typing (a la TypeScript.) As a Rails code base grows and patterns are required beyond the basics, it becomes a nightmare to tell what comes from where. You'd probably gain some mileage from that in your React codebase.

Static-typing seems so at odds with Ruby/Rails that I can't even imagine what that would look like.

Stripe has built a type checker for Ruby that they're using internally. I don't think it has been released yet, but you can get a preview of it at https://sorbet.run/.

Re: I Miss Rails

#164
I’ve been really happy splitting the difference between rails style server side rendering and full client side JS apps using Django. I can easily build REST or GraphQL endpoints for client side web apps to consume, but I have the ability to easily render out server side templates for more lightweight pages. Add to that that the python ecosystem is great for data science / data engineering tasks so it’s easy for developers with different backgrounds to cross over / reuse data model code between projects/tasks.

Re: I Miss Rails

#165

Rails is just very high level. The comment on meteor makes it clear why a Rails didn't exist in JS-land. Because the fundamentals are so dynamic and so in flux it becomes hard for a high level framework to gain traction when it can become outdated so quickly (though meteor was a particularly incompetent try at it and that's not the only reason for its failure). Once the community grows a stable low level stack then a…

I don't think a Rails equivalent will ever appear on Node.js simply because JS doesn't have a standard library. Rails stands on the shoulders of Ruby's excellent standard library. The two languages are also poles apart in terms of the quality of design. That is always going to impact any JS framework.

Re: I Miss Rails

#166
post #149
post #89

Earlier quoted context omitted.

> What makes it order of magnitudes more performant than Ruby Source for the "orders of magnitude" anywhere in the last year or so? Ruby with EventMachine outperformed Node significantly when I tested websocket chat servers.

Sources? Seriously, I'd really like to check this EventMachine out.

I ran my own benchmark to decide between the two things a while ago, so I don't have a source in the sense of a published benchmark. YMMV

https://github.com/eventmachine/eventmachine

Re: I Miss Rails

#167
post #4

Why miss it, come on back, the water's still warm and the dev is still as fast as ever in Rails. Honestly, the JS stacks all seem vastly more annoying on so many levels. It seems like the JS ecosystem changes so fast because it knows better is possible, so it just tries to reinvent itself over and over. The JavaScript world starts with this weird prototype based language with a syntax that looks like it might be some…

JS is not my first choice for many things but I still have to work with it often enough to know that most of your complaints about the language haven’t been a problem for years. It’s improved a great deal and is much better to work with lately—more so if you don’t install a library for everything under the sun (because you really don’t have to in order to be productive).

There are valid complaints to levy against the ecosystem, but the ones you listed are non-issues if you take time to learn the language and VMs/environments themselves. To be fair, I mean.

Re: I Miss Rails

#168
I still develop using server-rendered like it's 2012. Since I'm pretty much an indie dev, I just don't think it's worth my time to initally start a project off REST API (i.e. using react) because it's literally 1 more layer to take care off. I.e. if a REST end-point name changes, then I'd have to modify both frontend and backend code. In addition to that, initially, getting a software specs is a much harder problem than to implement. Having to create REST endpoints for every single data that needs to be passed around is not nice when the structure and specs are still very likely to change.

Moreover, finding developer experienced in react is much harder and more expensive than those who do traditional HTML-CSS combo. Finding a freelancer to slice out PSD design into HTML-CSS is also much harder to go wrong. I wouldn't be comfortable outsourcing a react project to freelancer I barely know, but I'd do it for HTML-CSS.

I'm not against react or other SPA frameworks by any means. I think they're great technology that makes certain use cases convenient and can make a good user experience. That being said, there are also costs for those, and I just feel like there are so many websites out there that don't actually need to be implemented using SPA. Traditional server-side rendering would have saved them so much time, resources, and headache.

I personally would only rewrite a particular project into an SPA when there's a real need for it. For example, when the user base is large enough that a nice-to-have user experience becomes a big enough deal, if there are real needs for "reactiveness", or if mobile apps counterparts that would also require REST API is needed.

Re: I Miss Rails

#169

Earlier quoted context omitted.

Static-typing seems so at odds with Ruby/Rails that I can't even imagine what that would look like.

It would ideally look pretty similar to typescript. There's actually a few projects adding typing to ruby, but they seem to be mostly trying to catch issues at runtime, which to me is pointless. Or the syntax is onerous, using decorators and/or separate type definitons. I'd be really interested in a typescript like superset of ruby, and I've even thought about building a prototype of it, though it's quite outside my…

I don't mean the syntax, I mean the abuse (ostensibly a language feature) of method_missing that's incumbent in the ecosystem. What would be the type signature of Active Record?
Post reply on HN