Hacker News new | past | comments | ask | show | jobs | submit login
Curio: A Modern Library for Reliable Concurrent I/O Using Python Coroutines (github.com/dabeaz)
95 points by joshbaptiste on Nov 1, 2015 | hide | past | favorite | 13 comments



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.


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/


I'm guessing that this project is related to this presentation: 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.).


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


Very cool!


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.


"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.


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.


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.


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


No, hackernews isn't meant to be an emotional support group. You can provide specific feedback about what's nice about an article, but empty comments pointless and are mimicking the purpose of the upvote.


HN needs a vaccination against meanness the way European politics needed one against dictatorships: Life is pretty miserable without it.

I'll have to disagree with your characterization of HN. The site isn't here to serve you. It's much more interesting than that. You're a member of a community. I remember vividly what the site was like in the very early days. "Very cool!" type comments were there, alongside thoughtful comments about the relative merits of quicksort.

Pg said that empty-but-pleasant comments are fine, for what it's worth. I didn't mean to say that everyone should upvote them, but it's mistaken for them to be downvoted, or to call them out as examples of what not to write.

Comments like "Thanks for making this" are morale boosters. Keeping them (or at least not discouraging them) might encourage people to show more stuff they've made.


In other words, newmotors, just like you learned how to deal with paragraph and word minimums in school, on HN, you need to fluff your positive gratitude in a bit more specificity to match the vernacular: Why do you think it's cool? How does it positively affect whatever you are working on or what your interests are in?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: