pauleveritt,
@pauleveritt@fosstodon.org avatar

@tonybaloney A question about subinterpreters. Let's say you import your app in a subinterpreter. Then detect the app source changed, throw away the interpreter, make a new one, and import.

Meaning, a half-step to hot reloading. Would that work? Or is some import state still in parent interpreter?

carlton,
@carlton@fosstodon.org avatar

@pauleveritt cheeky. I like it 🥳

pauleveritt,
@pauleveritt@fosstodon.org avatar

@carlton You betcha. PEP 554 says: "Conceivably we could invent a mechanism by which any (or every) module could be reset, unlike reload() which does not clear the module before loading into it.”

But that's under “Deferred”. As is “Resetting an interpreter's state.” PEP 734 doesn't mention it.

carlton,
@carlton@fosstodon.org avatar

@pauleveritt if subinterpreters could give us hot reloading that would be amazing. 🤩

pauleveritt,
@pauleveritt@fosstodon.org avatar

@carlton We'd have to think of it as tepid reloading. Maybe warm. 😇 No time travel state, for example.

I can't help but think that the arrival of nogil, subinterpreters, and maybe even JIT stuff, is going to launch a new web framework that's designed around all that.

carlton,
@carlton@fosstodon.org avatar

@pauleveritt May a thousand flowers bloom! 😉

pauleveritt,
@pauleveritt@fosstodon.org avatar

@carlton Hopefully one is a perennial. 🤞

carlton,
@carlton@fosstodon.org avatar

@pauleveritt I’m SO KEEN for real threading and/or subinterpreters.

tonybaloney,
@tonybaloney@fosstodon.org avatar

@pauleveritt @carlton yes I think that would work and I want to test it. Thank you for nerd-sniping me a week before my talk

pauleveritt,
@pauleveritt@fosstodon.org avatar

@tonybaloney @carlton Oh I'm just getting started. Have I asked you about setting debugger breakpoints in subinterpreter code? 😈

You doing anything for sprints?

tonybaloney,
@tonybaloney@fosstodon.org avatar

@carlton @pauleveritt hahaha save that question for my talk. And asking about logging.
I don’t have time for sprints this year but we’ll find some time to chat properly

tonybaloney,
@tonybaloney@fosstodon.org avatar

@carlton @pauleveritt I’ve spent all afternoon trying to implement hot reloading in sub interpreters instead of packing for my flight in the morning. On the plus side I’ve learnt a lot more about the API!
Debugging is working…

pauleveritt,
@pauleveritt@fosstodon.org avatar

@tonybaloney @carlton Wow! I’m...sorry....in an excited kind of way. Can't wait to talk to you about what you learned and whether the idea is worth trying.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • rosin
  • thenastyranch
  • osvaldo12
  • cubers
  • InstantRegret
  • DreamBathrooms
  • cisconetworking
  • magazineikmin
  • Youngstown
  • Durango
  • mdbf
  • slotface
  • ngwrru68w68
  • kavyap
  • JUstTest
  • tacticalgear
  • modclub
  • khanakhh
  • anitta
  • ethstaker
  • tester
  • everett
  • GTA5RPClips
  • normalnudes
  • megavids
  • Leos
  • provamag3
  • lostlight
  • All magazines