I want to try Ruby since the news of Rails 8 came out, but it's been so difficult that I just gave up. Installing Ruby on Mac and Windows and actually getting the 3.3 version required for Rails 8 was a huge mission and test of patience because every installer defaulted to older versions of both Ruby and Rails even one month after the release. And yes, even Docker required tweaking to get the versions and I had issues…
Use rvm to install ruby. Ruby dev sucks on Windows, mac only.
Ruby 3.4.0
151–160 of 282 posts
Re: Ruby 3.4.0
#152I want to try Ruby since the news of Rails 8 came out, but it's been so difficult that I just gave up. Installing Ruby on Mac and Windows and actually getting the 3.3 version required for Rails 8 was a huge mission and test of patience because every installer defaulted to older versions of both Ruby and Rails even one month after the release. And yes, even Docker required tweaking to get the versions and I had issues…
Re: Ruby 3.4.0
#153Earlier quoted context omitted.
I don't understand the point of it when the `.map(&:upcase)` syntax is shorter. This just seems like yet another syntactic sugar Rubyism that doesn't really add anything. If it's an alternative to the `|x|` syntax when using only one block variable, then I like that.
`arr.map { it.thing.blah.stuff }` The `&:` doesn't work in that context
&: is very nice, but not enough.
Re: Ruby 3.4.0
#154Earlier quoted context omitted.
Rails has some very, very good features that make standing up a CRUD app with an administrative backend _very easy_. It's also got a bunch of semi-functional-programming paradigms throughout that make life quite a bit easier when you get used to using them. Honestly, if it had types by default and across all / most of its packages easily (no. Sorbet + Rails is pain, or at least was last I tried), I'd probably recomme…
If you're happy to trade the ecosystem and a bit of compilation speed for types, then Crystal is a perfectly cromulent choice.
I've tend to have found Kotlin to be the direction I'm more happy going with. It speaks to my particular itches for me personally, more effectively. I can absolutely see how it's a very effective choice.
Re: Ruby 3.4.0
#155Earlier quoted context omitted.
If you're happy to trade the ecosystem and a bit of compilation speed for types, then Crystal is a perfectly cromulent choice.
Except it's not because: 1) It has differences in behavior with certain classes and is not a drop-in replacement. 2) It always compiles, so it's kind of slow to compile-test
Compile/test time is ok. It's a few extra seconds to run tests, but hasn't been an issue in practice for me.
Re: Ruby 3.4.0
#156Earlier quoted context omitted.
It's very powerful though which is a bit terrifying. You can literally monkey patch Object at runtime and add methods to every single instantiated object! (I believe this is how rspec works..) Awesome, but with great power come great responsibility ;)
RSpec moved from that quite some time ago. Monkey patching nowadays is usually frowned upon, even refinements, which could simulate monkey patching in a limited scope, are rarely used.
Re: Ruby 3.4.0
#157Earlier quoted context omitted.
That has been the story of every dynamic language since forever, thankfully the whole AI focus has made JITs finally matter in CPython world as well. Personally I have learnt this lesson back in 2000's, in the age of AOLServer, Vignette, and our own Safelayer product. All based on Apache, IIS and Tcl. We were early adopters of .NET, when it was only available to MSFT Partners and never again, using scripting language…
What's a scripting language? Also I'm not sure for TCL ( https://news.ycombinator.com/item?id=24390937 claims it's had a bytecode compiler since around 2000) but the main python and Ruby implementations have compilers (compile to bytecode then interpret the bytecode). Apparently ruby got an optional (has to be enabled) jit compiler recently and python has an experimental jit in the last release (3.13).
Re: Ruby 3.4.0
#158Earlier quoted context omitted.
Those are relative positions. We can't talk about a "nosedive" from that. It may be the case, but also maybe Ruby was just the slowest growing out of a number of languages growing in popularity. We don't have enough data from there.
> since ruby is a language that is less and less used by many programmers But this statement from thread starter is about Ruby's relative position. If Ruby's rank in top-used language ranking drops, then we can say that the language is less used by programmers in the survey pool.
I guess we disagree on that part.
Re: Ruby 3.4.0
#159Earlier quoted context omitted.
People say frontend/backend parity, and that’s true, but I also remember there was a time in 2011 or so where single thread/async was this new hot thing. Nginx was starting to get popular and overtake Apache on installs, and people were enamored with its performance and idea of “no blocking, ever” and “callbacks for everything”, which the nginx codebase sorta takes to the extreme. The c10k problem and all that. When…
“Node makes it impossible to write blocking code” reminds me of this classic and hilarious piece by Ted Dziuba: http://widgetsandshit.com/teddziuba/2011/10/node-js-is-cance...
Re: Ruby 3.4.0
#160Earlier quoted context omitted.
No wait, I know Oracle has a bad rep which is deserved, but TruffleRuby and GraalVM is truly open-source, not open-core. They actually did something great this time. Someone pointed this out https://news.ycombinator.com/item?id=42323293
> You will need to sign the Oracle Contributor Agreement (using an online form) for us to able to review and merge your work. Read my lips: N. O. Read the CLA. This is a trap, do not get yourself or your company caught in it. It is open-source for now, until it gets enough traction. Then the rug will be pulled, the code will be relicensed as well as any further development or contributions. This is insane , I cannot…