David Beazley: Generators: The Final Frontier - PyCon 2014

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 47

  • @petermoore8811
    @petermoore8811 11 місяців тому +1

    yield from "is" amazing. But I think Professor Beasley is more amazed by simplicity of the syntax. Powerful yet simple syntax. Always in need. And must add, Thank you Prof David, for being exactly who you are and influencing generations.

  • @Algoritmik
    @Algoritmik 6 років тому +4

    He is not just typing, he is coding while he talks and jokes about the subject. That is fascinaring!

  • @cheaterman49
    @cheaterman49 10 років тому +14

    The more I learn about Python the more this language simply amazes me!

    • @alan2here
      @alan2here 3 роки тому +1

      Hell Yeah :)

    • @cheaterman49
      @cheaterman49 3 роки тому +3

      @@alan2here Oh man have I grown since that comment :-) now doing it full time and I love it!

    • @edwingarcia5043
      @edwingarcia5043 3 роки тому

      @@cheaterman49 That's cool bro.

    • @bunchathumbs6194
      @bunchathumbs6194 3 роки тому

      @@cheaterman49 bro that is epic)

    • @rikudosennin
      @rikudosennin 2 роки тому

      @@cheaterman49 Wow I'm fairly new to programming and I'm having fun with python ! Although recursive approaches usually run into some error for larger test cases ( competitive programming) , I'm still gonna continue with this language till I become really good.

  • @ludoanderz
    @ludoanderz 10 років тому +13

    Mindbogglingly informative, as per usual

  • @veryxcit
    @veryxcit 10 років тому +16

    Always best speaker -- by far, no matter the subject. Keeps it moving and audience on the edge of their seats!

    • @Asdayasman
      @Asdayasman 9 років тому +2

      veryxcit m8 RaymondH

    • @akhtaransari8899
      @akhtaransari8899 3 роки тому

      @@Asdayasman . N b I no
      Bn mn j bm k ubhar

    • @Asdayasman
      @Asdayasman 3 роки тому

      @@akhtaransari8899 What the fuck did you just say to me?

  • @meunomejaestavaemuso
    @meunomejaestavaemuso 9 років тому +9

    I like how David recreates the asyncio module from scratch using threads just to wrapper our head around what this things is doing and how generators (in the 3.4) are the key for this. I don't think this is madness, it's very elegant code.

  • @HypocriticalElitist
    @HypocriticalElitist 9 років тому +3

    This has been incredibly useful for helping me to understand asyncio. Thank you.

  • @petermoore8811
    @petermoore8811 6 років тому +2

    I do wonder what will be Davids' gravestone inscription. Perhaps Here lies David my head finally exploded !

  • @frankcui
    @frankcui 10 років тому +1

    Two speakers I like most for pycon : David and Jessica :)

    • @vismantasd
      @vismantasd 7 років тому

      Since I liked this presentation so much, just want to look up the other speaker you mention. Is it Jessica McKellar?

  • @fandibataineh4586
    @fandibataineh4586 2 роки тому +1

    anybody has a link to the 1st part of the trilogy "Generator Tricks for Systems Programmers", please?

  • @alan2here
    @alan2here 3 роки тому

    Yield and pools/futures seem really useful. :)
    I wonder if Numpy is already recurrent.
    Your concurrency example prevents timing attacks.

  • @Asdayasman
    @Asdayasman 10 років тому +15

    End of the break: 1:37:45.

  • @Murkz21
    @Murkz21 3 роки тому

    37:57, why for inlined fuctions we don't need to use a next() mathod to start the generator like the claissic way described at 07:57?

  • @alan2here
    @alan2here 3 роки тому

    I use Python 3, but then again relative to this talk, I live in the future.

  • @poszu
    @poszu 8 років тому +1

    Great talk! It indeed blown my mind :)

  • @malliditarunreddy
    @malliditarunreddy 2 місяці тому

    "Whenever we are supposed to come back from the break"❌ yield from break✅

  • @ricosrealm
    @ricosrealm 4 роки тому

    How does the thread pool work around the GIL exactly? It seems like he found interesting parallelization model for threads but didn't full explain why it works.

    • @Asdayasman
      @Asdayasman 3 роки тому

      Async "I/O". There's an important part in there.
      You want async because you're waiting for things. If you're waiting for things, they're not doing work in the Python runtime. If they're not doing work in the Python runtime, they're not holding the GIL.

  • @alan2here
    @alan2here 3 роки тому

    You're very brave to do it all on the fly, you must've felt half asleep by the end.

  • @izxle
    @izxle 10 років тому +2

    is there a video for the other two parts?

    • @OttoFazzl
      @OttoFazzl 5 років тому

      The second part on coroutines is here: ua-cam.com/video/Z_OAlIhXziw/v-deo.html

  • @alan2here
    @alan2here 3 роки тому

    I guess you could submit the clever code along with a more conventional implementation of the same thing.

  • @alan2here
    @alan2here 3 роки тому

    I would have supposed (yield 42; return "monty") was equivalent to (yield 42; yield "monty"; end_function)

  • @xjazz666
    @xjazz666 4 роки тому

    Hi, are you never closing the files please?

  • @alan2here
    @alan2here 3 роки тому +1

    Pythons recursion limit really does seem awful, why 10-ish bits? Ironic for a language where all ints by default are bigInts. Else 64bit perhaps would be good.

    • @Asdayasman
      @Asdayasman 3 роки тому

      If you need to recurse more than a THOUSAND times, you're doing it wrong. Iterate.

    • @alan2here
      @alan2here 3 роки тому

      @@AsdayasmanOnly in python, recursive algorithms in general are a branch of computer science and work perfectly well, they can produce some extremely tidy and perfectly performant code.

    • @Asdayasman
      @Asdayasman 3 роки тому +1

      @@alan2here Which come about by forcing the language implementors to do things like TCO and unrolling because the programmers are too stupid to do it iteratively, or alternatively the programmers need to use trampolines to get around stack limits for similar reasons.
      Recursion has its place. Deep recursion doesn't.

  • @MarkJay
    @MarkJay 7 років тому

    crazy stuff

  • @charlieflowers4987
    @charlieflowers4987 Рік тому

    Doesn't this just highlight that Python has a ridiculously wimpy recursion limit?

  • @ChristopherBreeden85
    @ChristopherBreeden85 9 років тому +1

    This presentation should be called generators from hell.

  • @asd1qwe1
    @asd1qwe1 10 років тому

    nice one

  • @robinranabhat3125
    @robinranabhat3125 2 роки тому

    1:12:40 Aysncio

  • @alan2here
    @alan2here 3 роки тому

    Master R…
    …egex
    Phew :)

  • @shannonmcintyre1284
    @shannonmcintyre1284 3 роки тому

    arent you something...