I do wonder if it'll ever be possible to get Rust tests to feel as nice to write as, say, test suites in Python or Ruby. I might just be missing a lot of helpers, but a part of me really wants to use a test metalanguage that (for example) RC's everything, gives me implicit casts from strings to what ever type I need, and a bunch of other stuff.
I've always found Rust object buildup to be pretty annoying.
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…”
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.
I built a set of gems (propel_rails) that takes the already terse Ruby on Rails code to the next extreme. It generates a set of top level classes like an API controller and some concerns that then create a full restful resource (model, controller, serializer, unit and e2e tests) with 0 boilerplate code. The controller ends up being only a list of all permitted attributes the api will accept because the restful actions are automatically generated. It’s a bit hard to fully describe but the meta programming power of Ruby really does make amazing things easy.
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 but use Rails all day, sure, but the whole convention over configuration thing is such a huge anti pattern to me.
I’ve had similar experiences with Spring Boot Java applications. Methods in stack traces that don’t exist in source code but are magicked into existence by annotations.
>But before I did so I researched first. I asked a few instances to analyse the project in terms of gains of complexity, stability, testability, etc., and while (obviously) stability would drop (no types in Ruby) it’s not that awful (Sorbet has types in Ruby!).
Is it not a rage-bait argument to say that not having types implies less stability?
If you replaced "AI" with "a developer" in this article, it might make more sense why it's being dunked on. It would be an article about someone telling someone to do something, and then when the work was done they were happy with the result. It's just a bit of a nothing all round
I do wonder if it'll ever be possible to get Rust tests to feel as nice to write as, say, test suites in Python or Ruby. I might just be missing a lot of helpers, but a part of me really wants to use a test metalanguage that (for example) RC's everything, gives me implicit casts from strings to what ever type I need, and a bunch of other stuff.
I've always found Rust object buildup to be pretty annoying.
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…”
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.
you sound jealous :)
I built a set of gems (propel_rails) that takes the already terse Ruby on Rails code to the next extreme. It generates a set of top level classes like an API controller and some concerns that then create a full restful resource (model, controller, serializer, unit and e2e tests) with 0 boilerplate code. The controller ends up being only a list of all permitted attributes the api will accept because the restful actions are automatically generated. It’s a bit hard to fully describe but the meta programming power of Ruby really does make amazing things easy.
This sounds like CRUD, distilled.
I suppose it works in terms of your domain model?
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 but use Rails all day, sure, but the whole convention over configuration thing is such a huge anti pattern to me.
I’ve had similar experiences with Spring Boot Java applications. Methods in stack traces that don’t exist in source code but are magicked into existence by annotations.
method(:name).source is your friend
I get a similar feeling from Elixir and Phoenix without the method_missing foot gun.
I’m sure the LLM that translated the code was ecstatic!
>But before I did so I researched first. I asked a few instances to analyse the project in terms of gains of complexity, stability, testability, etc., and while (obviously) stability would drop (no types in Ruby) it’s not that awful (Sorbet has types in Ruby!).
Is it not a rage-bait argument to say that not having types implies less stability?
No? Maybe the industry can now talk maturely about tradeoffs like that rather than pretending they don't exist.
If you can switch from Rust to Ruby, and it would make sense, choosing Rust in the beginning was a mistake.
To count lines of rust code:
fd . -e rs -uu | xargs cat | wc -l
Why not just:
find . -name '*.rs' | xargs wc -l
From whatever to Go ... hype!
From Go to Rust ... hype!
From Rust to Ruby ... the new hype!?
"I have no idea if it works or not because I haven’t yet tried running it. But it's 5x shorter!"
The fact that it doesn't end with what happens when they run `rails server` makes me think they did it and didn't like the results.
Not a xkcd, but quite relevant:
https://web.archive.org/web/20091015091833/http://www.hackle...
Idk why people are shitting on you. So many LLM haters on here. It’s changed the game completely and some people just don’t want to accept it.
I think this is cool. Verbosity of languages is important when it comes to coding with AI. I’ve found Go to be a happy medium.
If you replaced "AI" with "a developer" in this article, it might make more sense why it's being dunked on. It would be an article about someone telling someone to do something, and then when the work was done they were happy with the result. It's just a bit of a nothing all round