Live data from Hacker News

Ruby on Rails Audit Complete

ostif.org

151–160 of 171 posts

Re: Ruby on Rails Audit Complete

#151
post #149
post #32

Earlier quoted context omitted.

What caused the drop in popularity in RoR? It seemed like ~10-12 years ago RoR was the de-facto startup standard. On any given day there were multiple items on the HN front page having something to do with RoR.

> What caused the drop in popularity in RoR? Async/await. JavaScript and all other modern languages and frameworks have a great concurrency story. Rails still hasn't (but it's coming next year, it's been coming next year for a decade).

The concurrency story in Ruby is fine. We've been using multi-process Ruby scripts in production for over a decade. The pre 2.7 ruby had some issues, but it's been solid for years. The async/await programming paradigm is painful by comparison. Sure, there are languages out there that have been designed from the ground up with concurrency in mind, that have an even better concurrency story, but those do not put developer happiness(™) front and center.

Re: Ruby on Rails Audit Complete

#152
post #51

I settled for the Rails Way using a subset of the defaults. Not disappointed

Elaborate on your experience?

I am not a programmer and I am still working on my first rails project using AI and the guides. With that, my experience is mostly positive. I want it to be as simple as possible so not devise, no cable or actiontext or mail etc. (subset) - then I want sqlite for production since I will have max 8000 users - mostly read operations. Importmaps (takes time to get the AI to write js that passes jslint.com), plain css, deploy on apache proxy using systemd. What made me comment was that a while ago I was considering to use VIPS because I heard that its much faster and scales better. But since there was the default minimagick I stuck to that, so I was not disappointed when I read the audit.

A seasoned rails developer would know how to do what I want but I only have the chatgpt which keeps trying to push me to use all these Gems so I can scale to my 2 Billion users when I go IPO...

tl;dr working on my little rails site and learning is a joy.

Re: Ruby on Rails Audit Complete

#153
post #147

Earlier quoted context omitted.

In practice it is not. And no, you don't have to run it, but it makes things a lot easier to do so. And no, you don't need to do what you suggest, you just need to load all the code into a running Ruby REPL. It is one consequence of Ruby being as dynamic as it is, but another is that the codebases tends to be far smaller. Anywhere from half to 1/10th of the size of codebases in statically typed languages is my experi…

> load all the code into a running Ruby REPL That counts as running it if you ask me. And I don't see how just loading the code would help you find the callers of a function? > Anywhere from half to 1/10th of the size of codebases in statically typed languages is my experience, including with direct translations. That sounds highly implausible.

> That counts as running it if you ask me. And I don't see how just loading the code would help you find the callers of a function?

Loading it lets you introspect the code for calls. It's not necessarily always trivial to know what the type of the target object will be unless you're prepared to execute candidate methods, but it's rare for this to be an actual issue in practice. The more typical way of doing this would be to call piece of the code but without the elaborate setup you argue you'd need.

You can also use Ripper or Parser to analyse the code if you insist on not loading the code, but you're then making things harder for yourself for no good reason.

And that's really what it boils down to: If you insist on doing things the way you would for a static language, then yes, you will have a bad time.

That's a you issue, not a tooling issue.

> That sounds highly implausible.

It's nevertheless true. I've translated multiple projects feature for feature from C, C++ and other languages to Ruby over the years. It's only implausible to people inexperienced with Ruby.

Re: Ruby on Rails Audit Complete

#154
post #50
post #43

and yet people wanna shit at frameworks.!! by choosing something like Rails or another major popular web framework -- you have already mitigated a lot of security vulnerabilities that affect the industry. & no next.js is not a proper web framework. JS doesn't have the equivalent to rails. The web frameworks we're talking are Rails, Django, Laravel & Spring.

“Equivalent to Rails” is a nebulous term, but given your examples, I’d offer these as JS equivalents of Rails: - SvelteKit - RedwoodJS - Wasp There are more options but I think they’d cause more “well, actually” comments than I could bear. :-)

Let's take a look at SvelteKit. Huh, it has zero to say about the database? And this is the first framework that comes to mind as equivalent to Rails? Sheer insanity

Re: Ruby on Rails Audit Complete

#155

Earlier quoted context omitted.

Extremely risky tbh I would have an extremely hard time if I go off path or need to hire someone. It would be almost negligence to choose it unfortunately

It's the opposite since it standardises everything as oppose to roll your own. If you need to hire someone you'd need to train them on your system no matter what, with a framework you can use their documentation to explain where things are and how they work.

Elixir is already a small fraction of a small and shrinking community (Rails). Ash is a tiny fraction of an already tiny fraction. I cannot imagine defending this choice to anyone unless I was literally the CEO of a company and answered only to myself.

Ash does look badass though!

Re: Ruby on Rails Audit Complete

#156
post #153

Earlier quoted context omitted.

> load all the code into a running Ruby REPL That counts as running it if you ask me. And I don't see how just loading the code would help you find the callers of a function? > Anywhere from half to 1/10th of the size of codebases in statically typed languages is my experience, including with direct translations. That sounds highly implausible.

> That counts as running it if you ask me. And I don't see how just loading the code would help you find the callers of a function? Loading it lets you introspect the code for calls. It's not necessarily always trivial to know what the type of the target object will be unless you're prepared to execute candidate methods, but it's rare for this to be an actual issue in practice. The more typical way of doing this woul…

> The more typical way of doing this would be to call piece of the code but without the elaborate setup you argue you'd need.

But how do you call the code if you don't know where it's called from?

Let's have a concrete example. In this `initialize` method how do I know what the arguments are meant to be?

https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitla...

There's no type annotation so the main ways to know are documentation (haha) and seeing what it is called with in existing code. But how do you find where that method is called?

(Note this isn't the best example because I would imagine the `initialize` isn't magically generated, but it is still difficult to search for so it's almost as bad as the magic identifiers.)

Re: Ruby on Rails Audit Complete

#157
post #58

Earlier quoted context omitted.

You don't miss things like enums, exhaustive switch or any other basic language features? How about `method_missing` its such a crazy idea to me that something like this exists, I know why it exists but I am like why, why such bloat and complexity.

No, I honestly don’t. I can emulate an Enum without having an Enum type. I rely less on a compiler and more on myself with automated tests.

Part of the problem is when you have to rely on someone else.

Re: Ruby on Rails Audit Complete

#158

Earlier quoted context omitted.

It's the opposite since it standardises everything as oppose to roll your own. If you need to hire someone you'd need to train them on your system no matter what, with a framework you can use their documentation to explain where things are and how they work.

Elixir is already a small fraction of a small and shrinking community (Rails). Ash is a tiny fraction of an already tiny fraction. I cannot imagine defending this choice to anyone unless I was literally the CEO of a company and answered only to myself. Ash does look badass though!

Elixir really needs to lose the perception, if there is one, of it being a subset of the Ruby/Rails community. It's true that the initial influx of Elixir developers came from the Ruby world back when Elixir was new, but that was a long time ago. Tons of Elixir folk come into it nowadays without a Ruby background.

Elixir and Ruby really aren't that similar anyway. The syntax differences are very superficial - Elixir's a functional language with very style and semantics to Ruby, and that's even before you get into the magic of OTP and the BEAM, for which Ruby has nothing comparable.

Re: Ruby on Rails Audit Complete

#159

Earlier quoted context omitted.

It's the opposite since it standardises everything as oppose to roll your own. If you need to hire someone you'd need to train them on your system no matter what, with a framework you can use their documentation to explain where things are and how they work.

Elixir is already a small fraction of a small and shrinking community (Rails). Ash is a tiny fraction of an already tiny fraction. I cannot imagine defending this choice to anyone unless I was literally the CEO of a company and answered only to myself. Ash does look badass though!

I've been using Elixir for over 10 years, if it was ever a "small fraction of the Rails community" it was during its formative years only. Elixir is fully its own thing. We don't even really talk about Ruby? I really do think you've got a mixed up perception on that front

Re: Ruby on Rails Audit Complete

#160

Earlier quoted context omitted.

Elixir is already a small fraction of a small and shrinking community (Rails). Ash is a tiny fraction of an already tiny fraction. I cannot imagine defending this choice to anyone unless I was literally the CEO of a company and answered only to myself. Ash does look badass though!

I've been using Elixir for over 10 years, if it was ever a "small fraction of the Rails community" it was during its formative years only. Elixir is fully its own thing. We don't even really talk about Ruby? I really do think you've got a mixed up perception on that front

Even José himself says that Ruby's influence on Elixir is overstated: https://news.ycombinator.com/item?id=36604054
Post reply on HN