Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wow, this pops up only a few days after I discover the existence of pyrasite[0]. I even created a wrapper around it to get a decent REPL (using ptpython[1]) and am planning to extend it over time into a kind of Pharo/Smalltalk live coding experience.

[0] https://pyrasite.readthedocs.io/en/latest/ [1] https://github.com/prompt-toolkit/ptpython



Interesting, I hadn't heard of pyrasite, it has a nice GUI with info about objects' memory usage, threads, open files and more. I'll definitely take ideas from it.

I'm working on a live coding environment for python[0], based on emacs' SLIME mode for common lisp. It's quite new and I haven't written documentation yet, but all the main SLIME features not covered by LSP are working.

- All results printed in the repl are presentations that can be inspected, copied around and used again -- as the actual object, not just it's str or repr text like in most repls.

- On any uncaught exception you get an interactive backtrace buffer where you can jump to source, see arguments and local variables for each frame, and eval code or open a repl in the context of any stack frame. And the arguments and local variables aren't just text but presentations you can open in the object inspector, copy to the repl and use, etc.

- A thread viewer where you can view stats on all threads, get the backtrace of any thread, spawn a repl in the context of any of it's stack frames, etc.

- An async task viewer with somewhat more limited functionality as async tasks don't keep a full stack.

- A pretty documentation browser using mmontone's slime-doc-contribs.

- The ability to trace functions, where again their arguments and return values aren't just printed as text, but as presentations, that you can open in the inspector, copy to the repl, etc.

- I took some code from IPython's autoreload extension, so interactive development without restarting and losing state mostly works.

If you want to collaborate or just talk ideas that'd be fantastic, I don't have any experience with the Pharo/Smalltalk world.

https://codeberg.org/sczi/swanky-python/


Nice set of features you have here, very similar to Smalltalk (particularly Pharo) ideals. Actually I'm also actively working on a Pharo VM simulator so I can ultimately get GToolkit[0], which I really like and is based on it, running in Python. Nothing published yet though, but can definitely get in touch via your project.

[0] https://gtoolkit.com/


So far it's just a subset of what's supported by SLIME for common lisp, and I've heard the smalltalk community emphasizes interactive development tooling even more so than the lisp folks. I've seen some of the gtoolkit videos and it's really impressive what such a small group of people have built, I'll definitely study it more seriously for ideas for my python environment once I've got the basics finished. I even tried gtoolkit very briefly but got stuck just trying to show all keyboard shortcuts in a given context and add new ones, but that was years ago and a quick search says Pharo's redone it's shortcut system since then.


Yeah I think pyrasite would be able to vastly simplify its implementation if it chose to (it might not though! the "same python version" requirements can feel strict)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: