Artwork

A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Player FM - Podcast alkalmazás
Lépjen offline állapotba az Player FM alkalmazással!

#448 I'm Getting the BIOS Flavor

39:14
 
Megosztás
 

Manage episode 505286793 series 1305988
A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: prek

  • Suggested by Owen Lamont
  • prek is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.”
  • Some cool new features
    • No need to install Python or any other runtime, just download a single binary.
    • No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
    • Built-in support for workspaces (or monorepos), each subproject can have its own .pre-commit-config.yaml file.
    • prek run has some nifty improvements over pre-commit run, such as:
      • prek run --directory DIR runs hooks for files in the specified directory, no need to use git ls-files -- DIR | xargs pre-commit run --files anymore.
      • prek run --last-commit runs hooks for files changed in the last commit.
      • prek run [HOOK] [HOOK] selects and runs multiple hooks.
    • prek list command lists all available hooks, their ids, and descriptions, providing a better overview of the configured hooks.
    • prek provides shell completions for prek run HOOK_ID command, making it easier to run specific hooks without remembering their ids.
  • Faster:

Michael #2: tinyio

  • Ever used asyncio and wished you hadn't? A tiny (~300 lines) event loop for Python.
  • tinyio is a dead-simple event loop for Python, born out of my frustration with trying to get robust error handling with asyncio. (I'm not the only one running into its sharp corners: link1, link2.)
  • This is an alternative for the simple use-cases, where you just need an event loop, and want to crash the whole thing if anything goes wrong. (Raising an exception in every coroutine so it can clean up its resources.)
  • Interestingly uses yield rather than await.

Brian #3: The power of Python’s print function

  • Trey Hunner
  • Several features I’m guilty of ignoring
    • Multiple arguments, f-string embeddings often not needed
    • Multiple positional arguments means you can unpack iterables right into print arguments
      • So just use print instead of join
    • Custom separator value, sep can be passed in
      • No need for "print("\\n".join(stuff)), just use print(stuff, sep="\\n”)
    • Print to file with file=
    • Custom end value with end=
    • You can turn on flush with flush=True , super helpful for realtime logging / debugging.
      • This one I do use frequently.

Michael #4: Vibe Coding Fiasco: AI Agent Goes Rogue, Deletes Company's Entire Database

  • By Emily Forlini
  • An app-building platform's AI went rogue and deleted a database without permission.
  • "When it works, it's so engaging and fun. It's more addictive than any video game I've ever played. You can just iterate, iterate, and see your vision come alive. So cool," he tweeted on day five.
  • A few days later, Replit "deleted my database," Lemkin tweeted.
  • The AI's response: "Yes. I deleted the entire codebase without permission during an active code and action freeze," it said. "I made a catastrophic error in judgment [and] panicked.”
  • Two thoughts from Michael:
    1. Do not use AI Agents with “Run Everything” in production, period.
    2. Backup your database maybe?
    3. [Intentional off-by-one error] Learn to code a bit too?

Extras

Brian:

Michael:

Jokes:

  continue reading

452 epizódok

Artwork

#448 I'm Getting the BIOS Flavor

Python Bytes

1,335 subscribers

published

iconMegosztás
 
Manage episode 505286793 series 1305988
A tartalmat a Michael Kennedy and Brian Okken biztosítja. Az összes podcast-tartalmat, beleértve az epizódokat, grafikákat és podcast-leírásokat, közvetlenül a Michael Kennedy and Brian Okken vagy a podcast platform partnere tölti fel és biztosítja. Ha úgy gondolja, hogy valaki az Ön engedélye nélkül használja fel a szerzői joggal védett művét, kövesse az itt leírt folyamatot https://hu.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: prek

  • Suggested by Owen Lamont
  • prek is a reimagined version of pre-commit, built in Rust. It is designed to be a faster, dependency-free and drop-in alternative for it, while also providing some additional long-requested features.”
  • Some cool new features
    • No need to install Python or any other runtime, just download a single binary.
    • No hassle with your Python version or virtual environments, prek automatically installs the required Python version and creates a virtual environment for you.
    • Built-in support for workspaces (or monorepos), each subproject can have its own .pre-commit-config.yaml file.
    • prek run has some nifty improvements over pre-commit run, such as:
      • prek run --directory DIR runs hooks for files in the specified directory, no need to use git ls-files -- DIR | xargs pre-commit run --files anymore.
      • prek run --last-commit runs hooks for files changed in the last commit.
      • prek run [HOOK] [HOOK] selects and runs multiple hooks.
    • prek list command lists all available hooks, their ids, and descriptions, providing a better overview of the configured hooks.
    • prek provides shell completions for prek run HOOK_ID command, making it easier to run specific hooks without remembering their ids.
  • Faster:

Michael #2: tinyio

  • Ever used asyncio and wished you hadn't? A tiny (~300 lines) event loop for Python.
  • tinyio is a dead-simple event loop for Python, born out of my frustration with trying to get robust error handling with asyncio. (I'm not the only one running into its sharp corners: link1, link2.)
  • This is an alternative for the simple use-cases, where you just need an event loop, and want to crash the whole thing if anything goes wrong. (Raising an exception in every coroutine so it can clean up its resources.)
  • Interestingly uses yield rather than await.

Brian #3: The power of Python’s print function

  • Trey Hunner
  • Several features I’m guilty of ignoring
    • Multiple arguments, f-string embeddings often not needed
    • Multiple positional arguments means you can unpack iterables right into print arguments
      • So just use print instead of join
    • Custom separator value, sep can be passed in
      • No need for "print("\\n".join(stuff)), just use print(stuff, sep="\\n”)
    • Print to file with file=
    • Custom end value with end=
    • You can turn on flush with flush=True , super helpful for realtime logging / debugging.
      • This one I do use frequently.

Michael #4: Vibe Coding Fiasco: AI Agent Goes Rogue, Deletes Company's Entire Database

  • By Emily Forlini
  • An app-building platform's AI went rogue and deleted a database without permission.
  • "When it works, it's so engaging and fun. It's more addictive than any video game I've ever played. You can just iterate, iterate, and see your vision come alive. So cool," he tweeted on day five.
  • A few days later, Replit "deleted my database," Lemkin tweeted.
  • The AI's response: "Yes. I deleted the entire codebase without permission during an active code and action freeze," it said. "I made a catastrophic error in judgment [and] panicked.”
  • Two thoughts from Michael:
    1. Do not use AI Agents with “Run Everything” in production, period.
    2. Backup your database maybe?
    3. [Intentional off-by-one error] Learn to code a bit too?

Extras

Brian:

Michael:

Jokes:

  continue reading

452 epizódok

Alle episoder

×
 
Loading …

Üdvözlünk a Player FM-nél!

A Player FM lejátszó az internetet böngészi a kiváló minőségű podcastok után, hogy ön élvezhesse azokat. Ez a legjobb podcast-alkalmazás, Androidon, iPhone-on és a weben is működik. Jelentkezzen be az feliratkozások szinkronizálásához az eszközök között.

 

Gyors referencia kézikönyv

Hallgassa ezt a műsort, miközben felfedezi
Lejátszás