vbsd
Joined 7 years ago
Joined 7 years ago
That’s a good example of an algebra where 1 + 1 + 1 = 1, but the article is specifically about systems where in addition to that condition, this second condition is also true: 1 + 1 != 0 (not equal!). ℤ₂ is not an example of that.
On the other hand, I maintain that this is an incidental rather than essential reason for the program finishing quickly. In that benchmark code, we can replace "sleep" with our custom sleep function which does not record start time before execution:
async fn wrapped_sleep(d: Duration) {
sleep(d).await
}
The following program will still finish in ~10 seconds. #[tokio::main]
async fn main() {
let num_tasks = 100;
let mut tasks = Vec::new();
for _ in 0..num_tasks {
tasks.push(wrapped_sleep(Duration::from_secs(10)));
}
futures::future::join_all(tasks).await;
}I’m not a Rust programmer but I strongly suspect this updated explanation is erroneous. It’s probably more like this: start time is recorded when the task execution is started. However, the task immediately yields control back to the async loop. Then the async loop starts another task, and so on. It’s just that the async loop only returns the control to sleeping task no earlier than the moment 1s passes after the task execution was initialy started. I’d be surprised if it had anything to do with when sleep() was called.
But I do agree with the general argument that lock-in as this for your core technologies (a database certainly counts) should be avoided.
Maybe they actually just don’t care about attracting startups, the whole “free license for small players” thing is just so that developers can check it out, not for actual use.
On an unrelated note, do you accept feature suggestions? Task deletion would be nice to have.
With regular programming, you have a full specification of the program (the code) and it gets turned into an executable. When you want to change some behavior, you change the code parts that relate to the behavior and the whole thing is compiled again.
With agentic programming, there’s no full spec, no “codebase in English”. You write instructions but they are discarded as soon as you close your session, and what’s left is this lower level thing (the code written in a traditional programming language).
It’s almost like a difference between declarative and imperative paradigm for the process of creating software.