News for hackers. Stuff that matters.
[dead]
Re:Ruby for Good by compumike on Sunday May 24, 2026 @01:41PM (#48259376)
You can cheaply and readably give a lot of clues to both agents and humans with some assertions at the start of a method:

  raise ArgumentError.new("...") unless ...
which can include type assertions but also a lot more. The agents seem to do well with this.

I've also had good results using agents to write Crystal https://crystal-lang.org/ which is Ruby-like but does have the static types and produces blazing fast static binaries. Might be a sweet spot for coding agents if you're building some backend services. But I'd still pick Ruby on Rails for a new full stack project.

Re:Ruby for Good by BirAdam on Sunday May 24, 2026 @01:00PM (#48258996)
Why go halfway with Rust when you could just pick Ada SPARK? Seems like an arbitrary choice based off of rationalizing a trend.
Re:Ruby for Good by pelagicAustral on Sunday May 24, 2026 @01:53PM (#48259489)
I feel like your comment is a bit tongue in cheek and i am going to take it at face value, but I honestly been feeling increasingly more like doing verbatim what you're suggesting and i dont have a very solid justification for it.
Re:Ruby for Good by BirAdam on Sunday May 24, 2026 @02:53PM (#48259967)
I meant it honestly. What excuse do people have to choose anything other than mission critical technologies if the AI system can do most of the heavy lifting? Why should we settle for anything less than five 9s of uptime?
Re:Ruby for Good by firesteelrain on Sunday May 24, 2026 @01:12PM (#48259101)
Because you pick Ada Spark if are in a certification heavy environment like Aerospace.
Re:Ruby for Good by blacksmith_tb on Sunday May 24, 2026 @01:12PM (#48259100)
That seems like it would depend quite a bit on the project? I would think many nonprofits would want a webapp of some flavor, and Ruby (or Python) are still not bad choices there - my experience with Claude is that it handles Ruby well.
Re:Ruby for Good by vidarh on Sunday May 24, 2026 @02:05PM (#48259600)
Agents handle Ruby just fine. I used to have to give them some stern rules about avoiding instance_variable_get etc. instead of adding accessors, but those problems have pretty much vanished in the last 6 months.

I like using Ruby with agents because the code remains short and readable.

Re:Ruby for Good by jazzyjackson on Sunday May 24, 2026 @01:39PM (#48259347)
I’m downvoting because this is basically bait without any contribution as to why you feel that way, but personally I vibe coded a very successful result by iterating a rails app and then crawling the entire site into static files (~144,000 product pages and category pages) and then stashing them all in a bucket on cloudflare free tier.

I never wrote ruby before so I could only sanity check the results and approach of what it was doing, but thanks to the automated data migrations it was very easy for me to change my mind about how I wanted data to be structured, rollback if it didn’t work etc. it is a language designed for rapid iteration.

Re:Ruby for Good by m12k on Sunday May 24, 2026 @01:25PM (#48259216)
The typescript team themselves rewrote the compiler in Go to get better use of coding agents.
Re:Ruby for Good by hoten on Sunday May 24, 2026 @01:31PM (#48259263)
They started that migration years ago. I don't remember them citing agentic coding as a reason. Do you have a source?
Re:Ruby for Good by lexoj on Sunday May 24, 2026 @02:08PM (#48259615)
Not sure about the compiler but prominent users of llm agents (Mitchel Hashimoto, Armin Ronacher etc) has mentioned that Go gives better results for agentic coding.
Re:Ruby for Good by franz899 on Sunday May 24, 2026 @01:42PM (#48259381)
They did it for speed, and Go was the language with the closest syntax to migrate to.
Re:Ruby for Good by lfx on Sunday May 24, 2026 @01:06PM (#48259048)
I understand why rust, but why TS? just for a front end?
Re:Ruby for Good by mdavidn on Sunday May 24, 2026 @01:21PM (#48259174)
Compiler errors help the chatbot find and fix problems. The equivalent in Ruby, RBS, isn't as widely adopted. Type annotations being in separate files is also inconvenient.

https://github.com/ruby/rbs

Re:Ruby for Good by graboid on Sunday May 24, 2026 @01:25PM (#48259222)
I feel for a smallish project I'd rather prefer to have more readable, dense code like Ruby's over the ceremony of static types.
Re:Ruby for Good by QuantumNomad_ on Sunday May 24, 2026 @01:46PM (#48259414)
There is almost no ceremony involved in dealing with types in Rust.

And what little there is, is worth it ten-fold for all of the runtime bug headaches that you avoid compared to dynamically typed languages.

Re:Ruby for Good by wasmperson on Sunday May 24, 2026 @09:01PM (#48262539)
Specifically addressing the "almost no ceremony" claim and not the "totally worth it" claim:

JS:

  let person_1 = { };
  let person_2 = { parent: person_1 };
  person_1.child = person_2;
Rust:

  use std::cell::Cell;
  struct Person<'a> {
      parent: Option<&'a Person<'a>>,
      child: Cell<Option<&'a Person<'a>>>
  }

  let person_1 = Person {
      parent: None,
      child: Cell::new(None)
  };
    
  let person_2 = Person {
      parent: Some(&person_1),
      child: Cell::new(None)
  };
    
  person_1.child.set(Some(&person_2));
And that's before we start talking about function signatures and traits.
Re:Ruby for Good by tjpnz on Monday May 25, 2026 @12:43AM (#48263462)
Agentic coding is not a given anywhere.