Live data from Hacker News

From Rust to Ruby

xlii.space

81–90 of 108 posts

Re: From Rust to Ruby

#81
post #3

At first I thought this would be an interesting article, but as soon as they mentioned using an LLM to do the conversion I lost all interest. It's like saying "I wanted this done so I got my underling to do it, here is my story...". Like why would I bother to read it then, as it was clearly not you doing the conversion or putting any thought into it.

The point isn't about writing it but seeing difference and making probably suboptimal choice.

I mentioned in other comment that I reviewed it extensively. It's not a big project so outside of a few spicy bits it's mostly a web app.

I'd say that saying "not putting thought into it" is unfair. I didn't push the button and YOLO.

I did research about the tradeoffs and consequences. Snippets of Rust code vs Rails are the real thing and testability of Rust app is something I spent 2 months on.

As LLM enthusiast would say: context matters ;)

Re: From Rust to Ruby

#82
post #41

Earlier quoted context omitted.

The biggest problem is that this is software development going forward. Programming languages don't really matter outside craft programming. As LLM improve, it will eventually be a matter to specify in which kind of language the specification should be generated. The UML and RUP crowd has had their vengeance.

That does not explain why people think their project that is 99% written by LLM is worth sharing.

Post ain't about project written in LLM (and Rust one have 6 months in good ol' craft code) but about contrast between two variants.

While personally I'm skeptical about LLM usage (and vibe coding in general) I'm not going to pretend it doesn't exist just on principle. I wouldn't risk rewrite 6 months worth of code to Rails but it's a perfectly good case for LLM conversion.

Re: From Rust to Ruby

#83
post #75
post #45

Earlier quoted context omitted.

Most Java and .NET ones, not everything breaks, statically compiled, so not as many unit tests required as in dynamic languages. While it is deprecated, you can do a File=>New Project for Web Forms in 2026.

Why do many people mention the need of tests for types in dynamically typed languages? In Rails my tests are mostly to ensure that a request to a controller returns the expected response and the expected changes in the database. Unit tests are often on validations and the errors they return for invalid data. Then there are functional tests that drive a headless browser.

Because they are a requirement to avoid runtime errors that usually are compilation errors in other languages.

Not fun in production.

Dynamic languages with optional typing like BASIC or Common Lisp is another matter.

Re: From Rust to Ruby

#84
post #18

I'm not sure any language + framework prioritizes developer happiness as much as Ruby on Rails.

I don't think I've ever been unhappier than working on a Rails project. See a bug on the site - something is rendering incorrectly. grep to find the view. Great, there's a method that is being called to render the buggy section. Grep for the method name - 0 hits. Amazing, it's something that is synthesized somewhere and I have no idea where. Guess I'll stop what I'm doing and read docs for an hour. If you do nothing…

I won't be as harsh because I have years of experience in Rails and didn't develop harsh feelings against it but moving from Rust/Go/Zig/TypeScript (which I used lately) to Ruby ain't smooth ride.

Discoverability is much worse, LSPs aren't super helpful. Using Dash (documentation app) helps a ton. Still some names are confusing after switch (took a minute to recall that 'filter' is actually 'select' in Ruby).

I won't say that dev experience is bad but it's definitely different.

Re: From Rust to Ruby

#85
post #16

If you can switch from Rust to Ruby, and it would make sense, choosing Rust in the beginning was a mistake.

Thats a great summary of the piece and a reason why I decided to share.

Re: From Rust to Ruby

#86
> Rust is verbose

It's really not that verbose. I rewrote a Python project in Rust. It was about 10% more lines of code. If they're seeing a bit difference it's definitely an outlier or they're doing something horribly wrong.

Re: From Rust to Ruby

#87
post #18

Earlier quoted context omitted.

I don't think I've ever been unhappier than working on a Rails project. See a bug on the site - something is rendering incorrectly. grep to find the view. Great, there's a method that is being called to render the buggy section. Grep for the method name - 0 hits. Amazing, it's something that is synthesized somewhere and I have no idea where. Guess I'll stop what I'm doing and read docs for an hour. If you do nothing…

I would advice reading the "efficient rails" book, which explains a lot about how to debug RoR apps.

The fact that you have to read a book and break out a debugger to do the equivalent of "find all" in any other languages should tell you something right?

My experience is exactly the same as Milch's. I've tried to fix stuff in Gitlab but given up when I couldn't even find where it things are defined.

That can happen in other languages, e.g. Rust or C where macros are used. But it's pretty much the exception there whereas in Rails it seems to be done by default.

Re: From Rust to Ruby

#88
post #71

Curious if there are folks (perhaps from ruby community) using crystal for medium/large projects. How has your experience been? I recently tried it out in a hobby project and was pleasantly surprised at how smooth the overall DX was, and how little memory it consumed.

Is there such thing as rails for crystal?

Marten and Lucky come close.

My use cases are fairly minimal though, and the adjacent ecosystem is not as well developed. You likely won't be able to get an out of the box integrated gems for shopping cart, blogging platform, newsletter, analytics etc. as you might for rails. If you are building something new from basic blocks, a lot of the foundational blocks seem to be good state. But again, my experience is very limited.

Re: From Rust to Ruby

#89

This defies belief. “I wanted to scratch a technical itch. My local AI completed the job in 30 minutes. I never pressed Start to see if it works, but I did write a blog post about it…”

2016 check out my new JavaScript Library!

2026 check out the work I didn't write!

2036 how I've written 200 lines in this ancient Latin called C

Post reply on HN