Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 06:34
    dependabot-preview[bot] synchronize #1306
  • 06:34

    dependabot-preview[bot] on pip

    Bump pylint from 2.4.2 to 2.4.4… (compare)

  • 06:34
    dependabot-preview[bot] edited #1306
  • 06:32
    dependabot-preview[bot] edited #1306
  • 06:32

    dependabot-preview[bot] on pip

    (compare)

  • 06:32

    dependabot-preview[bot] on master

    Bump pyopenssl from 19.0.0 to 1… Merge pull request #1312 from p… (compare)

  • 06:32
    dependabot-preview[bot] closed #1312
  • 06:29

    pquentin on bleach-spike

    Add missing async/await annotat… Add sample trio test Acknowledge Python 3.6+ support… and 1 more (compare)

  • 06:29
    pquentin closed #122
  • 06:15

    dependabot-preview[bot] on pip

    (compare)

  • 06:15

    dependabot-preview[bot] on master

    Bump pyasn1 from 0.4.7 to 0.4.8… Merge pull request #115 from py… (compare)

  • 06:15
    dependabot-preview[bot] closed #115
  • 06:08
    dependabot-preview[bot] synchronize #1312
  • 06:08

    dependabot-preview[bot] on pip

    Bump pyopenssl from 19.0.0 to 1… (compare)

  • 06:08
    dependabot-preview[bot] edited #1312
  • 06:08
    dependabot-preview[bot] synchronize #1306
  • 06:08

    dependabot-preview[bot] on pip

    Bump pylint from 2.4.2 to 2.4.4… (compare)

  • 06:08
    dependabot-preview[bot] edited #1306
  • 06:07
    dependabot-preview[bot] edited #1312
  • 06:07
    dependabot-preview[bot] edited #1306
Nathaniel J. Smith
@njsmith
@jtrakk huh, interesting. It's also possible that some other process that's sharing your stdout file is putting it into non-blocking mode... unfortunately non-blocking mode is a global property of a file
because of the scrollbar
I've seen on some project's docs (can't remember which) a thing that shows the full box when you mouse over it
for some wide code-block
jtrakk
@jtrakk
"In regular English, "stream" and "channel" mean basically the same thing." In the context of waterways, a channel is the container that the water flows through. A stream is the moving water.
those animations are so frickin dope
Nathaniel J. Smith
@njsmith
@jtrakk yeah, I kinda hate that scrollbar, but not sure how to fix it :-/
Nathaniel J. Smith
@njsmith
it's too bad that "port" is already taken by TCP/IP. It would be a great word for streams – one syllable, and emphasizes that the object represents an endpoint, rather than the whole connection
jtrakk
@jtrakk
it might be worth looking through a list of plumbing products/terms. For the "renaming Nursery" thread, I looked into arboreal terms for "branch point", but decided against suggesting the term they use
Nathaniel J. Smith
@njsmith
I just made a loud snorting noise and confused my spouse
jtrakk
@jtrakk
:-)
Nathaniel J. Smith
@njsmith
I spent a fair amount of time staring at thesaurus entries the last few weeks, but there might well be things I've missed!
jtrakk
@jtrakk
Pump, Valve, etc have the "endpoint" feel
Nathaniel J. Smith
@njsmith
those are specific elements though: a pump is an active thing that moves material from one point to another, and a valve is a control you can use to block or allow flow. I think that would be misleading here.
jtrakk
@jtrakk
Bus is short
Nathaniel J. Smith
@njsmith
@jtrakk that was actually on an earlier draft of that list, but I took it out because of the computer usage of "bus" as a term for interchange/routing systems: https://en.wikipedia.org/wiki/Bus_(computing)
jtrakk
@jtrakk
yep
Nathaniel J. Smith
@njsmith
it's very annoying that people have spent 60+ years inventing terminology for communicating stuff involving computers. just imagine if we were back in the 50s, all the lovely jargon available for the taking.
jtrakk
@jtrakk
A few of these are interesting.
Flume, Canal, Chute, Conduit, Intake, Siphon, Orifice.
https://www.ussdams.org/resource-center/glossary/
Nathaniel J. Smith
@njsmith
feel free to post ideas in the thread :-)
jtrakk
@jtrakk
Sure.
John Belmonte
@belm0
embedded visualization framework for Python programs, based on Trio
https://github.com/groove-x/pura
(shared as proof of concept, not in pypi)
Nathaniel J. Smith
@njsmith
Whoa, that's cool
Nathaniel J. Smith
@njsmith
Is it using hypercorn underneath or something else?
jtrakk
@jtrakk
@belm0 Very cool! Thanks for sharing this
John Belmonte
@belm0
no, it's using the trio example server from h11 :-p
(best I could do 1 year ago when I wrote it)
unlikely this code could be used unmodified in another project, which is why it's labeled proof-of-concept
Nathaniel J. Smith
@njsmith
@belm0 ahh heh :-) makes sense
John Belmonte
@belm0
one nice thing about this approach is that the draw() method you implement is sync, so with respect to concurrency it's working with an atomic snapshot of your program's state
Kyle Lawlor
@wgwz
just discovered this project today and thought it might be interesting to try to create some trio documentation with: https://mybinder.readthedocs.io/en/latest/using.html#generating-interactive-open-source-package-documentation
Nathaniel J. Smith
@njsmith
@wgwz oh yeah, binder is pretty cool! (I used to work with the folks working on it.) maybe it would be useful for our hypothetical future "cookbook" documentation? it does require using jupyter notebooks, and I'm not sure if our users are familiar with those or how much work it would take to integrate them into our sphinx docs. And it they take like ~30 seconds to start. So not something you can use to easily fiddle with examples directly while reading the docs.
Peter Sutton
@dj-foxxy

What's the easiest way to run a bunch of tasks in a given order with at most n in parallel.

async def main():
    async with trio.open_nursery() as nursery:
        for i in range(1000):
            nursery.start_soon(slow_lookup, i)

In the example, other parts of the code are awaiting for a specific value j to be mapped to an i. Lower values of i are much more likely to map to any j, so I'd like to start them in order. Does that make sense?

Matthias Urlichs
@smurfix
It does. You probably want a CapacityLimiter.
You also want to use await nursery.start() because with that the initial step of slow_lookup must tell the loop that it may proceed with the next i.
Peter Sutton
@dj-foxxy
Thanks @smurfix , that's what I'll use. Seems to work well, same speed to complete all lookups but everything is mapped almost instantly now (len(js) <<< len(is)).
(I'm scanning a network looking for a small set of MACs)
Kyle Lawlor
@wgwz

@njsmith yeah, that part in particular caught my eye. "interactive open source documentation" sounds great. hmm, yeah those are good points. although i do think the design of jupyter notebooks is pretty user-friendly. i think that even in the case of unfamiliarity with jupyter and low-level of experience with python, the barrier to figuring out how to use it would be fairly low.

to address all the points you made which are valid and i don't disagree with, perhaps the ~30 seconds to load up the notebook isn't that bad. i'm going assume that most users who would be interested in using these are users with less experience in trio than those who already know a lot about async python. when i read through the trio documentation, it takes me a while to get through. i think that is primarily a result of the density of topics. so this means for people like myself, i will already commit a hour or two to reading the documentation at a time.

so i wouldn't mind opening a new tab for the examples i'm reading through and having to wait for it to load. it also makes it possible for me to study how trio is working outside of my typical development environment (my laptop). for example i could be at the library and be able to use the browser at the library.
Nathaniel J. Smith
@njsmith
@wgwz yeah, the core idea of having interactive examples in the docs sounds really cool. There are just a bunch of details and I'm having trouble imagining how they would all work out
I guess in addition to binder, there are other services that do interactive programming in your browser, like repl.it and glitch and probably others I don't know about. I wonder if any of them are particularly good for this use case.
Dave Hirschfeld
@dhirschfeld
You've come across https://github.com/minrk/thebelab? It seems to be aimed at this usecase but I haven't used it myself so couldn't say how well it fits the bill..
Nathaniel J. Smith
@njsmith
Hah, of course Min has gone and implemented exactly the thing we were talking about
I wonder if it's ready for real use
It looks like the live REPL on python.org uses https://www.pythonanywhere.com/
Nathaniel J. Smith
@njsmith
huh, I think this might be the first time guido has posted on the trio tracker. I wonder how he found the thread :-)
aratz-lasa
@aratz-lasa
Awesome!
Benjamin Kane
@bbkane
Hello - is there a list of companies/projects using Trio in production? https://github.com/python-trio/trio/wiki/Testimonials is mostly people, not projects/companies. Is it being used for PyPi ?
oakkitten
@oakkitten
regarding #1208, why is Queue not considered a candidate to replace Channel?
oakkitten
@oakkitten
Tube, Hose, Pipe, these all transfer liquid-ish substances, and i agree that Channel is similiar, but one wouldn't say a Queue of water
Nathaniel J. Smith
@njsmith
@oakkitten Queue also has a big conflict with queue.Queue and asyncio.Queue unfortunately...