News for hackers. Stuff that matters.
Re:Show HN: Ruby One-Liners Cookbook by sdwisely on Wednesday September 30, 2020 @09:29AM (#24638503)
the next release of Crystal will also be 1.0 too.

https://crystal-lang.org/

Re:Show HN: Ruby One-Liners Cookbook by faitswulff on Wednesday September 30, 2020 @10:32AM (#24639080)
Crystal is a great language that has learned a lot from Ruby. I'm excited to see where it goes. I think one area where it doesn't measure up to Ruby, however, is Windows support, which they've decided to forgo for the 1.0 milestone [0].

That said, I'm excited to pick up Crystal someday. What are some good niches you've found for it?

[0]: https://crystal-lang.org/2020/03/03/towards-crystal-1.0.html...

Re:Show HN: Ruby One-Liners Cookbook by radiospiel on Wednesday September 30, 2020 @09:42AM (#24638597)
I remember they said that already 2 years ago. :(
Re:Show HN: Ruby One-Liners Cookbook by block_dagger on Wednesday September 30, 2020 @10:08AM (#24638864)
Crystal has no metaprogramming. Lang is far less useful than Ruby imo, doesn’t deserve equal comparison.
Re:Show HN: Ruby One-Liners Cookbook by 1337_d00dZ on Wednesday September 30, 2020 @10:49AM (#24639278)
Re:Show HN: Ruby One-Liners Cookbook by block_dagger on Wednesday September 30, 2020 @02:53PM (#24642271)
True, but one of the selling points of Ruby to begin with is runtime metaprogramming. Sure, it should generally be discouraged, but when it's heavily utilized by ecosystems like Rails, it becomes a primary feature that macros do not adequately address.
Re:Show HN: Ruby One-Liners Cookbook by brigandish on Thursday October 01, 2020 @05:41AM (#24649108)
Are you saying it's a primary feature for Rails or for Ruby? I can't think of an example where it's a primary feature for a user of Rails but I usually avoid it in favour of better tools so I might not know of them. Perhaps you know of some?
Re:Show HN: Ruby One-Liners Cookbook by sourdoughness on Saturday October 03, 2020 @08:38AM (#24671611)
Rails leans on meta programming for a lot of its magic (though less so than it used to in early versions). You don’t generally use it as a user of Rails, though.
Re:Show HN: Ruby One-Liners Cookbook by brigandish on Sunday October 04, 2020 @09:31PM (#24683769)
Then I don't see how they're any better than macros in that situation.
Re:Show HN: Ruby One-Liners Cookbook by realusername on Wednesday September 30, 2020 @12:06PM (#24640239)
It does have metaprogramming, only at compile time. Crystal metaprogramming is very advanced as well, you could even create methods dynamically from a JSON file if you wanted to.