Ruby methods are colorless
11–20 of 242 posts
Re: Ruby methods are colorless
#12Earlier quoted context omitted.
"Colorless" is probably referring to the thing in Rust where functions are "Colored" for async or sync execution I can tell you as a non-Ruby, non-web dev what the Ruby mindshare feels like to me: - I hear that Ruby is slow - The syntax looks odd - I know Ruby on Rails was very popular at some point but I think it's been displaced almost entirely by C# and Node.js - I have no intention of learning Ruby. If I was goin…
Here's three different ways to write a small shell script that turns letters into uppercase: Node: let inputData = ''; process.stdin.on('data', chunk => inputData += chunk ); process.stdin.on('end', () => console.log(inputData.toUpperCase()) ); Python: import sys sys.stdout.write( sys.stdin.read().upper() ) Ruby: puts $stdin.read.upcase
Re: Ruby methods are colorless
#13Earlier quoted context omitted.
"Colorless" is probably referring to the thing in Rust where functions are "Colored" for async or sync execution I can tell you as a non-Ruby, non-web dev what the Ruby mindshare feels like to me: - I hear that Ruby is slow - The syntax looks odd - I know Ruby on Rails was very popular at some point but I think it's been displaced almost entirely by C# and Node.js - I have no intention of learning Ruby. If I was goin…
It's not a Rust thing. It's any language with a async/await. IIRC the original article was about JavaScript.
Re: Ruby methods are colorless
#14[flagged]
Is this an LLM account? Every comment starts with "It's fascinating"/intruinging/mind-blowing. Then some confused nonsense, and it always ends with a "Does anyone else?". This seems like a template where an AI filled in the blanks.
> The idea that 'Ruby Methods Are Colorless' is intriguing. It seems to suggest that methods in Ruby lack inherent complexity, which aligns with the language's philosophy of simplicity and readability. Ruby's method names are often so intuitive that they don't obscure the functionality behind a facade of complexity, making the code feel 'colorless' in a good way—clear and transparent. Anyone else feel like this makes Ruby especially appealing for both beginners and seasoned developers?
Apart from the telltale signs of an LLM, it's so unlikely someone would write a long and grammatically correct comment that was completely unrelated to what the article was about.
Re: Ruby methods are colorless
#15I dunno. Maybe I'm old now?
Anyways; good for Ruby! Async/await just seems very faddish to me: it didn't solve any of the hard multithreading/multiprocessing problems, and introduced a bunch of other issues. My guess is that it was interesting type theory that bled over into Real Life.
Re: Ruby methods are colorless
#16I've implemented coroutines in C and C++; my preferred multitasking environment is message-passing between processes. I'm not quite sure what the async/await stuff is buying us (I'm thinking C++, here). Like, I get multi-shot stackless coroutines, i.e., function objects, but I don't get why you'd want to orchestrate some sort of temporal Turing pit of async functions bleeding across your code base. I dunno. Maybe I'm…
I generally agree that manually migrating everything to "be async" in order to achieve this exposes at the very least a lack of belief that computers can be used to automate drudge work.
Re: Ruby methods are colorless
#17I've implemented coroutines in C and C++; my preferred multitasking environment is message-passing between processes. I'm not quite sure what the async/await stuff is buying us (I'm thinking C++, here). Like, I get multi-shot stackless coroutines, i.e., function objects, but I don't get why you'd want to orchestrate some sort of temporal Turing pit of async functions bleeding across your code base. I dunno. Maybe I'm…
Re: Ruby methods are colorless
#18There are a lot of things I dislike in JS, but I think the I/O async model is just right from an ergonomics point of view. The event loop is implicit, any async function returns a promise, you can deal with promises from inside sync code without much trouble.
It's just the right balance.
Re: Ruby methods are colorless
#19I've implemented coroutines in C and C++; my preferred multitasking environment is message-passing between processes. I'm not quite sure what the async/await stuff is buying us (I'm thinking C++, here). Like, I get multi-shot stackless coroutines, i.e., function objects, but I don't get why you'd want to orchestrate some sort of temporal Turing pit of async functions bleeding across your code base. I dunno. Maybe I'm…
Thank goodness we have wiser language developers out there who have resisted this impulse.
Re: Ruby methods are colorless
#20I don't like colored function for obvious reasons, but fully colorless for async means you don't know when things are async or not. There are a lot of things I dislike in JS, but I think the I/O async model is just right from an ergonomics point of view. The event loop is implicit, any async function returns a promise, you can deal with promises from inside sync code without much trouble. It's just the right balance.
The IDE can tell you.