News for hackers. Stuff that matters.
Re:Show HN: Neco – Coroutine Library for C by nialv7 on Tuesday April 09, 2024 @07:55PM (#39985555)
These are cooperatively scheduled green threads...

I feel the word "coroutine" is slowly losing its original meaning, similar to what happened to "lambda".

Re:Show HN: Neco – Coroutine Library for C by wavemode on Tuesday April 09, 2024 @08:48PM (#39985847)
what was the original meaning of lambda?
Re:Show HN: Neco – Coroutine Library for C by bee_rider on Tuesday April 09, 2024 @09:05PM (#39985951)
Maybe they mean as in lambda calculus?

Although, deep in our hearts we all must know that lambda was already taken, it is an eigenvalue.

Re:Show HN: Neco – Coroutine Library for C by animaomnium on Tuesday April 09, 2024 @08:59PM (#39985917)
eleventh letter of the greek alphabet, derived from phoenecian "lamed", etc.
Re:Show HN: Neco – Coroutine Library for C by samatman on Tuesday April 09, 2024 @09:17PM (#39986016)
I don't know where you're getting that impression.

These are stackful, symmetric coroutines with a build-in scheduler. It implements suspend and resume. You can call that a green thread if you want, or a fiber or whatever. They're coroutines.

The API docs make all of this clearer than the README. https://github.com/tidwall/neco/blob/main/docs/API.md

Re:Show HN: Neco – Coroutine Library for C by nialv7 on Wednesday April 10, 2024 @05:51AM (#39988843)
I think the replies l got here more or less proves my point.

So a coroutine is basically something you can explicitly yield control flow from or give control flow to. neco doesn't really let you do that. Caller of neco_resume isn't relinquishing the control flow to another coroutine. neco_yield looks like a coroutine yield, but for asymmetric coroutine it should yield to caller, for symmetric coroutine it should let you specify who you are yielding to. This one does neither.

And I feel if you stretch the definition of coroutine to include this, then you can basically call most multitasking systems coroutines, rendering the concept mostly useless.

Re:Show HN: Neco – Coroutine Library for C by samatman on Wednesday April 10, 2024 @10:26AM (#39991068)
These are coroutines. Just... look at the code, this isn't a proprietary binary product where you have to take someone's word for it. They're very clearly coroutines. I don't know what else to say here.
Re:Show HN: Neco – Coroutine Library for C by dkjaudyeqooe on Tuesday April 09, 2024 @09:37PM (#39986136)
Coroutine is definitely appropriate here. Any implementation that has one function (routine) executing while others are paused is applicable. It always means cooperative multitasking, which this is. No meaning lost whatsoever.
Re:Show HN: Neco – Coroutine Library for C by nialv7 on Wednesday April 10, 2024 @06:00AM (#39988911)
Coroutine doesn't just mean cooperative multitasking, it means a specific form of cooperative multitasking. There's value in making that distinction.

Also don't get me wrong, meaning of words do change, I am grumpy about it but that's fine. Kinda feel weird to have people telling me it has always meant that.

Re:Show HN: Neco – Coroutine Library for C by dkjaudyeqooe on Wednesday April 10, 2024 @07:26AM (#39989447)
OK, but what's the distinction? What are the different kinds of cooperative multitasking here?