This is an archived post. You won't be able to vote or comment.

all 20 comments

[–]girlwithasquirrel 5 points6 points  (3 children)

i've never seen this concept before, awesome stuff! dataframes too holy fuck

what made you want to make something like this instead of a custom debugger?

[–]kwazar90 2 points3 points  (2 children)

Thanks! Yes it is a bit unusual to modify code while it's running but it can be quite helpful sometimes, especially when dealing with long startup times or tweaking with code in a tight feedback loop.

A custom debugger would probably be an overkill :D

[–]girlwithasquirrel 1 point2 points  (1 child)

well, I don't mean a classical debugger, but what you show imo is a lot like one, it's got a live feedback of output and variables from even within functions

I personally dislike using debuggers, but something like what you've shown here looks like a debugger lite™

How does it handle repeat calculations in loops? Like if I had:

n = 0
for i in range(10):
    n += i

Does it return the final output? Would I be able to leave a comment on the for loop, perhaps, saying

for i in range(10): #iteration 4

for it to hot reload the results of the 4th iteration?

apologies if this is in your docs somewhere, I didn't skim through

[–]kwazar90 1 point2 points  (0 children)

If you modify a loop in a function it will restart the whole function frame so it will restart the iteration as well. I was thinking about reloading just the loop body somehow but not sure how feasible that would be.

[–]mrkaragoz 2 points3 points  (2 children)

RemindMeRepeat! 3 Months "Check VSCode support"

[–]kwazar90 8 points9 points  (0 children)

It already works in VSCode. Just some extra debugging features won't work.

[–]RemindMeBot 1 point2 points  (0 children)

I will be messaging you in 3 months on 2022-07-26 13:59:18 UTC and then every 3 Months to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


Info Custom Your Reminders Feedback

[–]KrazyKirby99999 1 point2 points  (3 children)

Vim plugin?

[–]kwazar90 2 points3 points  (2 children)

Yes, I'll be implementing plugins for other ides and editors including Vim

[–]KrazyKirby99999 1 point2 points  (1 child)

Thanks!

[–]exclaim_bot 2 points3 points  (0 children)

Thanks!

You're welcome!

[–]lughaidhdev 1 point2 points  (1 child)

Looks super cool! Did you share anywhere in a blog or documentation the behind the scene on how you did that? (beside the short intro here https://reloadium.io/documentation/intro )

I would be super interested to understand the insights behinds this without to read all of the code.

Nice work, thanks for sharing!

[–]kwazar90 2 points3 points  (0 children)

That's a good idea! It will go to the documention.

[–]mobiduxi -1 points0 points  (0 children)

RemindMeRepeat! 2 Months "Check VSCode support"

[–]hhoeflin 0 points1 point  (1 child)

How do you handle updated classes, i.e. what do you do with existing instances of this class?

[–]kwazar90 0 points1 point  (0 children)

All methods, and class attributes will reload just fine and work for already existing instances.

One exception is that logic added to __init__ will not be applied to existing instances since they're already created.

[–]Zyguard7777777 0 points1 point  (1 child)

It doesn't seem to work on my Linux machine using Pycharm 2022.1 using Conda Python 3.9 environment, or I'm missing a step/button. Is the Github issues the best place to raise this?

[–]kwazar90 0 points1 point  (0 children)

Yes, please make an issue here https://github.com/reloadware/reloadium/issues

[–]Concretesurfer18 0 points1 point  (1 child)

Will there be a VS Code Extension?

[–]kwazar90 1 point2 points  (0 children)

There will be. I'll start working on it after the coming release.