Python Bytes - #448 I’m Getting the BIOS Flavor

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:

Big Technology Podcast - Google’s Best Week Ever, AI’s Rising Costs, Putin and Xi’s Immortality Quest

Ranjan Roy from Margins is back for our weekly discussion of the latest tech news. We cover: 1) Google's Gemini may power Siri 2) Google gets to keep Chrome and Android 3) Google can keep paying Apple for distribution 4) Is generative AI enough rationale to allow the market to decide Google's fate? 5) Google's Nano Banana image creator goes viral 6) Google's stock is up 47% in the past year and still cheap 7) Do we want the iPhone 17 Air? 8) AI is getting more expensive to run 9) But AI is getting cheaper per token. Hmm. 10) Anthropic raises $13 billion at a $183 billion valuation 11) Putin and Xi discuss immortality

---

Enjoying Big Technology Podcast? Please rate us five stars ⭐⭐⭐⭐⭐ in your podcast app of choice.

Want a discount for Big Technology on Substack + Discord? Here’s 25% off for the first year: https://www.bigtechnology.com/subscribe?coupon=0843016b

Questions? Feedback? Write to: bigtechnologypodcast@gmail.com

The Stack Overflow Podcast - Kotlin is more than just the Android house language

Ryan welcomes Jeffrey van Gogh, Director of Engineering, Android Developer Experience, at Google and board member of the Kotlin Foundation. They discuss the evolution of the Kotlin language from JVM to multiplatform, how their governance board works with the community to stop breaking changes, and the intricacies of Kotlin’s multiplatform capabilities beyond just Android.

Episode notes: 

The Kotlin Foundation’s mission is to protect, promote, and advance the development of the Kotlin programming language.

Over half of respondents in this year’s Annual Developer Survey reported that they want to start using Kotlin in the next year. 

Connect with Jeffrey on LinkedIn or email him at jvg@google.com.

Congrats to user BMac on winning a Populist badge for answering the question How to convert UPPERCASE text to Title Case using CSS.

See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.

Lex Fridman Podcast - #480 – Dave Hone: T-Rex, Dinosaurs, Extinction, Evolution, and Jurassic Park

Dave Hone is a paleontologist, expert on dinosaurs, co-host of the Terrible Lizards podcast, and author of numerous scientific papers and books on the behavior and ecology of dinosaurs. He lectures at Queen Mary University of London on topics of Ecology, Zoology, Biology, and Evolution.
Thank you for listening ❤ Check out our sponsors: https://lexfridman.com/sponsors/ep480-sc
See below for timestamps, transcript, and to give feedback, submit questions, contact Lex, etc.

Transcript:
https://lexfridman.com/dave-hone-transcript

CONTACT LEX:
Feedback – give feedback to Lex: https://lexfridman.com/survey
AMA – submit questions, videos or call-in: https://lexfridman.com/ama
Hiring – join our team: https://lexfridman.com/hiring
Other – other ways to get in touch: https://lexfridman.com/contact

EPISODE LINKS:
Dave’s Website: https://www.davehone.co.uk/
Dave’s Books: https://amzn.to/4pbk828
Terrible Lizards Podcast: https://terriblelizards.libsyn.com/
Dave’s Blog: https://archosaurmusings.wordpress.com/
Dave’s Academic Website: https://www.qmul.ac.uk/sbbs/staff/davidhone.html

SPONSORS:
To support this podcast, check out our sponsors & get discounts:
Lindy: No-code AI agent builder.
Go to https://go.lindy.ai/lex
BetterHelp: Online therapy and counseling.
Go to https://betterhelp.com/lex
Shopify: Sell stuff online.
Go to https://shopify.com/lex
LMNT: Zero-sugar electrolyte drink mix.
Go to https://drinkLMNT.com/lex
AG1: All-in-one daily nutrition drink.
Go to https://drinkag1.com/lex

OUTLINE:
(00:00) – Introduction
(00:22) – Sponsors, Comments, and Reflections
(07:18) – T-Rex’s size & biomechanics
(31:00) – T-Rex’s hunting strategies
(44:07) – History of dinosaurs on Earth
(1:04:38) – $31.8 million T-Rex fossil
(1:17:44) – T-Rex’s skull and bone-crushing bite force
(1:36:33) – What Jurassic Park got wrong
(1:54:52) – Evolution and sexual selection
(2:15:26) – Spinosaurus
(2:26:02) – What Jurassic Park got right
(2:33:35) – T-Rex’s intelligence
(2:43:34) – Cannibalism among T-Rex
(2:49:05) – Extinction of the dinosaurs
(3:06:15) – Dragons
(3:22:39) – Birds are dinosaurs
(3:33:23) – Future of paleontology

PODCAST LINKS:
– Podcast Website: https://lexfridman.com/podcast
– Apple Podcasts: https://apple.co/2lwqZIr
– Spotify: https://spoti.fi/2nEwCF8
– RSS: https://lexfridman.com/feed/podcast/
– Podcast Playlist: https://www.youtube.com/playlist?list=PLrAXtmErZgOdP_8GztsuKi9nrraNbKKp4
– Clips Channel: https://www.youtube.com/lexclips

Code Story: Insights from Startup Tech Leaders - S11 Bonus: Alan Fisher, KinetiX at Wabtec Corporation

Alan Fisher started his career as a computer programmer. Early on, he was hired by the 1st or 2nd largest freight railroad in the world, Union Pacific. He describes their technology group as having a punk rock spirit, leaning towards building their own solutions over buying them, which he found great value in. Outside of tech, he has been married for 30 years, and has 3 kids. He is an avid runner, landing someplace between a marathon runner and a mile in the morning kinda guy. He also loves to read the classics, drawing inspiration from them, along with restoring old homes.

Given his rich history in the rail industry, Alan has led the charge in growth, innovation, and most recently, logistics, analytics, and digital mine. As his company started to look to the future in how to solve the industry's most pressing problems, his team executed the acquisition of a portfolio of companies and products - driving by automated inspection.

This is a creation story of KinetiX at Wabtec Corporation.

Sponsors

Links



Support this podcast at — https://redcircle.com/code-story-insights-from-startup-tech-leaders/donations

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Big Technology Podcast - Brain Computer Interface Frontier: Movement, Coma, Depression, AI Merge

Dr. Ben Rapoport and Michael Mager are the co-founders of Precision Neuroscience, a company building a minimally invasive, high-resolution brain-computer interface. The two join Big Technology to discuss the modern day applications of BCIs and frontiers of the technology, including computer control, stroke rehab, decoding consciousness in coma patients, AI-powered neural biomarkers for depression, and the long-term prospect of merging human cognition with machines. Tune in for a fascinating look at the potential for one of earth's most promising technologies.

---

Enjoying Big Technology Podcast? Please rate us five stars ⭐⭐⭐⭐⭐ in your podcast app of choice.

Want a discount for Big Technology on Substack + Discord? Here’s 25% off for the first year: https://www.bigtechnology.com/subscribe?coupon=0843016b

Questions? Feedback? Write to: bigtechnologypodcast@gmail.com

Code Story: Insights from Startup Tech Leaders - Building Identity Orchestration for AI Agents with Granville Schmidt of Strata

We are bringing you a special episode, as our friends at Strata return to the podcast. You might remember our interview from Season 8 with Eric Olden, Co-founder & CEO of the company. Eric took us through the creation story of the company. Today, we will be talking with Granville Schmidt, Chief Architect at Strata, who has been instrumental in architecting and building identity orchestration for AI agents from the ground up. In our chat, we are going to be discussing how the enterprises need to take advantage of identify for agents, and can do so seamlessly, no matter their level of tech debt, disconnection, or complex migration path.

Questions

  • Let's break down Identity Orchestration for our audience. Can you explain what it is and walk us through a real customer scenario where it made a huge difference
  • Enterprises have accumulated decades of identity tech debt. What are the main problems identity orchestration solves for companies trying to modernize?
  • I noticed you work with customers in what you call DDIL environments - disconnected, disrupted, intermittent, and limited bandwidth scenarios. Can you help us understand what these environments look like in practice and why identity becomes such a critical challenge there? 
  • You've pioneered Identity Orchestration for AI Agents. What was the moment when you realized AI agents needed a fundamentally different approach to identity management?
  • Imagine a company with 1,000 employees but 50,000 AI agents running autonomously. How does your platform handle identity for all these agents differently than traditional systems?

Links




Support this podcast at — https://redcircle.com/code-story-insights-from-startup-tech-leaders/donations

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Code Story: Insights from Startup Tech Leaders - S11 E15: Derek Ting, TextNow

Derek Ting grew up in Canada-land, enjoying all the things of the area but especially hockey. He mentioned he has a bit of ADD, which made it hard for him to make it through a chapter in school. Nowadays, he has 2 kids. His oldest son plays hockey, and he and his family enjoys rooting on the Toronto Maple Leafs. When asked about food, he claimed to be one of lives to eat, as he loves food. In fact, the more exotic food the better - but not as far as insects or something.

When Derek figured out that carriers wanted to charge for texting, on top of the fees he was already paying for his phone and associated services. He found this atrocious, and he wanted to figure out a way to text for free - and eventually, all phone service.

This is the creation story of TextNow.

Sponsors

Links



Support this podcast at — https://redcircle.com/code-story-insights-from-startup-tech-leaders/donations

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Python Bytes - #447 Going down a rat hole

Topics covered in this episode:
Watch on YouTube

About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

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.

Michael #1: rathole

  • A lightweight and high-performance reverse proxy for NAT traversal, written in Rust. An alternative to frp and ngrok.
  • Features
    • High Performance Much higher throughput can be achieved than frp, and more stable when handling a large volume of connections.
    • Low Resource Consumption Consumes much fewer memory than similar tools. See Benchmark. The binary can be as small as ~500KiB to fit the constraints of devices, like embedded devices as routers.
      • On my server, it’s currently using about 2.7MB in Docker (wow!)
    • Security Tokens of services are mandatory and service-wise. The server and clients are responsible for their own configs. With the optional Noise Protocol, encryption can be configured at ease. No need to create a self-signed certificate! TLS is also supported.
    • Hot Reload Services can be added or removed dynamically by hot-reloading the configuration file. HTTP API is WIP.

Brian #2: pre-commit: install with uv

  • Adam Johnson
  • pre-commit doesn’t natively support uv, but you can get around that with pre-commit-uv
  • $ uv tool install pre-commit --with pre-commit-uv
  • Installing pre-commit like this
    • Installs it globally
    • Installs with uv
    • adds an extra plugin “pre-commit-uv” to pre-commit, so that any Python based tool installed via pre-commit also uses uv
  • Very cool. Nice speedup

Brian #3: A good example of what functools.Placeholder from Python 3.14 allows

  • Rodrigo Girão Serrão
  • Remove punctuation functionally
  • Also How to use functools.Placeholder, a blog post about it.
  • functools.partial is cool way to create a new function that partially binds some parameters to another function.
  • It doesn’t always work for functions that take positional arguments.
  • functools.Placeholder fixes that with the ability to put in placeholders for spots where you want to be able to pass that in from the outer partial binding.
  • And all of this sounds totally obscure without a good example, so thank you to Rodgrigo for coming up with the punctuation removal example (and writeup)

Michael #4: Converted 160 old blog posts with AI

  • They were held-hostage at wordpress.com to markdown and integrated them into my Hugo site at mkennedy.codes

  • Here is the chat conversation with Claude Opus/Sonnet.

    • Had to juggle this a bit because the RSS feed only held the last 50. So we had to go back in and web scrape. That resulted in oddies like comments on wordpress that had to be cleaned etc.
    • Whole process took 3-4 hours from idea to “production”duction”.
    • The chat transcript is just the first round getting the RSS → Hugo done. The fixes occurred in other chats.
  • This article is timely and noteworthy: Blogging service TypePad is shutting down and taking all blog content with it

  • This highlights why your domain name needs to be legit, not just tied to the host. I’m looking at you pyfound.blogspot.com. I just redirected blog.michaelckennedy.net to mkennedy.codes

  • Carefully mapping old posts to a new archived area using NGINX config. This is just the HTTP portion, but note the /sitemap.xml and location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" { portions. The latter maps posts such as https://blog.michaelckennedy.net/2018/01/08/a-bunch-of-online-python-courses/ to https://mkennedy.codes/posts/r/a-bunch-of-online-python-courses/

    server {
        listen 80;
        server_name blog.michaelckennedy.net;
    
        # Redirect sitemap.xml to new domain
        location = /sitemap.xml {
            return 301 <https://mkennedy.codes/sitemap.xml>;
        }
    
        # Handle blog post redirects for HTTP -> HTTPS with URL transformation
        # Pattern: /YYYY/MM/DD/post-slug/ -> <https://mkennedy.codes/posts/r/post-slug/>
        location ~ "^/([0-9]{4})/([0-9]{2})/([0-9]{2})/(.+?)/?$" {
            return 301 <https://mkennedy.codes/posts/r/$4/>;
        }
    
        # Redirect all other HTTP URLs to mkennedy.codes homepage
        location / {
            return 301 <https://mkennedy.codes/>;
        }
    }
    

Extras

Brian:

Michael:

Joke: Do you know him? He is me.

The Stack Overflow Podcast - Building AI for consumer applications isn’t all fun and games

Kylan Gibbs, CEO of Inworld, joins the show to discuss the technical challenges of creating interactive AI for virtual worlds and games, the significance of user experience, and the importance of accessibility and cost-efficiency in deploying AI models.

Episode notes: 

Inworld provides solutions for AI applications that allow teams to build and deploy workloads, spend less time on maintenance, and accelerate iteration speed.

Connect with Kylan on LinkedIn.

Today we’re shouting out the winner of an Illuminator badge, user MrWhite, who edited and answered 500 questions, both actions within 12 hours.

See Privacy Policy at https://art19.com/privacy and California Privacy Notice at https://art19.com/privacy#do-not-sell-my-info.