
Curio: A Modern Library for Reliable Concurrent I/O Using Python Coroutines - joshbaptiste
https://github.com/dabeaz/curio
======
bdarnell
Cool! The "why" section doesn't do a great job IMHO of explaining why this is
interesting when we already have asyncio; the tutorial does a better job of
showing off capabilities that are unique to this library. The key is that in
most async libraries (including asyncio), the event loop sees the world as a
collection of independent callbacks, which makes it very difficult to inspect
and debug the system. Curio is modeled more like a thread/process scheduler
that knows about the sequential tasks taking place at the higher level, so it
can provide debugging tools similar to what you'd see in a multithreaded
debugger.

------
samuell
As David Beazley [1] is the goto guy for anything related to python
concurrency (His outstanding material on the topic was what finally made
python generators / coroutines tick for me). This makes me much intrigued by
this!

[1] [http://www.dabeaz.com/](http://www.dabeaz.com/)

------
fermigier
I'm guessing that this project is related to this presentation:
[https://www.youtube.com/watch?v=MCs5OvhV9S4](https://www.youtube.com/watch?v=MCs5OvhV9S4)]

From the youtube description: "There are currently three popular approaches to
Python concurrency: threads, event loops, and coroutines. Each is shrouded by
various degrees of mystery and peril. In this talk, all three approaches will
be deconstructed and explained in a epic ground-up live coding battle."

(I may be wrong, I watched it already 6 months ago. BTW it is excellent.).

------
ionelm
This is something quite similar to what I've worked on 8 years ago [1]
although I gave up. I didn't have integration with other async frameworks/libs
in mind from the beginning. I short, there weren't many things I could use it
for. Plus it was slow - sure, there was no 'yield from' (PEP-380) back then.

It's interesting that David Beazley did it (he is certainly more qualified)
but it's doomed if it doesn't play well with other libraries ...

[1] [https://pypi.python.org/pypi/cogen](https://pypi.python.org/pypi/cogen)

------
newmotors
Very cool!

~~~
corysama
Hi, newmotors. Welcome to Hacker News!

Please note that the HN community takes a rather strict approach when
moderating comments that contribute noise to the conversation. "Nice article!"
comments are routinely downvoted. As is sarcasm, witticisms, memes, references
and other styles of comments that occur frequently but do not contribute to
the discussion. It's a knowingly doomed attempt to hold back the flood of
noise that covers Reddit.

~~~
sillysaurus3
"Very cool!" is something that would boost the author's morale. In many cases,
that's why authors post things: they need a morale boost. Even if the internet
is usually mean, having anyone at all say anything nice is usually enough to
keep them going.

I propose that "Very cool," "Thank you," and other pleasantries be upvoted.
They are what you'd want a community to consist of: optimism.

~~~
meowface
I completely disagree. If this was a chatroom or something, then sure.
Submission comments should actually add something useful regarding the
submitted link.

Imagine if there were 40 comments that all said "Cool" or "Nice work". Do you
think they should all be upvoted? "Very cool" followed by how or why you think
it's cool, or something else constructive, is worth reading. "Very cool" by
itself is just a mindless blurting of emotion.

If you want to boost the author's morale, send them an email or message saying
you like their work. No need to pollute the comment section here.

~~~
sillysaurus3
_Imagine if there were 40 comments that all said "Cool" or "Nice work"._

This has never happened. And it won't happen. We're worrying about the wrong
things. It doesn't make sense to reply to "Coffee is good" by saying "Careful,
you might drown in it."

A comment doesn't need to add anything. The sorting algorithm penalizes short
comments. They end up at the bottom.

Imagine if there were forty comments that said variations of "Thank you."
After you read the first one, you'd know immediately to stop reading. The
sorting algorithm ensures you won't miss anything. Troll comments, perhaps,
but not valuable ones.

Alternatively, you could read all forty comments. It would be about a hundred
words in total.

~~~
meowface
I'll acknowledge your point if and only if HN's sorting algorithm actually
works how you describe.

