Show HN: Scripton – Python IDE with built-in realtime visualizations (opens in a new tab)scripton.dev
449 pointsWhy another Python IDE? Scripton hopes to fill a gap in the Python development ecosystem by being an IDE that:
1. Focuses on easy, fast, and interactive visualizations (and exposes rich JS plotting libraries like Observable Plot and Plotly directly to Python)
2. Provides a tightly integrated REPL for rapid prototyping and exploration
3. Is script-centric (as opposed to, say, notebook-style)
A historical detour for why these 3 features: Not so long ago (ok, well, maybe over a decade ago...), the go-to environment for many researchers in scientific fields would have been something like MATLAB. Generating multiple simultaneous visualizations (potentially dynamic) directly from your scripts, rapidly prototyping in the REPL, all without giving up on writing regular scripts. Over time, many switched over to Python but there wasn't an equivalent environment offering similar capabilities. IPython/Jupyter notebooks eventually became the de facto replacement. And while notebooks are great for many things (indeed, it wasn't uncommon for folks to switch between MATLAB and Mathematica Notebooks), they do make certain trade-offs that prevent them from being a full substitute.
Inner workings:
- Implemented in C++ (IDE <-> Python IPC), Python, TypeScript (UI), WGSL (WebGPU-based visualizations)
- While the editor component is based off Monaco, the IDE is not a vscode fork and was written from scratch. Happy to chat about the trade-offs if anyone's interested
- Uses a custom Python debugger written from scratch (which enables features like visualizing intermediate outputs while paused in the debugger)
Scripton's under active development (currently only available for macOS but Linux and Windows support is planned). Would love for you to try it out and share your thoughts! Since this is HN, I’m also happy to chat about its internals.
Comments (139) 52 threads
Earlier commentsMy advice: Get the [planned] Windows version to shipping asap. Best of luck :)
For a long time, I had my own observability suite - a messy library of python scripts that I use for visualizing data. I replaced all of them with rerun (https://rerun.io/) and if you are someone who think Scipton is exciting, you should def try rerun too!
I use cursor/vscode for my development and add a line or two to my usual workflows in python, and rerun pops up in it's own window. It's a simple pip installable library, and just works. It's open source, and the founders run a very active forum too.
Edit: One slightly related tid-bit that might be interesting to HN folks. rerun isn't that old, and is in active development, with some breaking changes and new features that come up every month. And it means that LLM are pretty bad at rerun code gen, beyond the simple boilerplate. Recently, it kind of made my life hell as all of my interns refuse to use docs and try using LLMs for rerun code generation and come to me with a messy code spaghetti. It's both sad and hilarious. To make my life easier, I asked rerun folks to create and host machine readable docs somewhere and they never got to it. So I just scrape their docs into a markdown file and ask my interns to paste the docs in their prompt before they query LLMs and it works like a charm now.
Could I drop rerun into this to improve my monitoring?
https://youtube.com/shorts/Y1LGSMFisDc
Rerun natively supports the server and the viewer being on different devices (https://rerun.io/docs/reference/sdk/operating-modes). In your case, in the script you are dumping data into csv, I'd add the relevant lines to log data to rerun.
On the desktop side, you can spawn a viewer that can listen to the stream and visualize it.
Nagios, Collectd, [Prometheus], Grafana
From "Preview of Explore Logs, a new way to browse your logs without writing LogQL" https://news.ycombinator.com/item?id=39981805 :
> Grafana supports SQL, PromQL, InfluxQL, and LogQL.
From https://news.ycombinator.com/item?id=40164993 :
> But that's not a GUI, that's notebooks. For Jupyter integration, TIL pyqtgraph has jupyter_rfb, Remote Frame Buffer: https://github.com/vispy/jupyter_rfb
pyqtgraph: https://github.com/pyqtgraph/pyqtgraph
Matplotlib can generate GIF and WEBM (and .mp4) animations, but not realtime.
ManimCE might work in notebooks, but IDK about realtime
Genesis is fast enough by FPS for faster than realtime 3D with Python (LuisaRender) and a GPU: https://github.com/Genesis-Embodied-AI/Genesis
https://github.com/microsoft/data-formulator
Huh. Nice hack. I may have to give that a try for some of the more obscure stuff I deal with.
> Recently, it kind of made my life hell as all of my interns refuse to use docs and try using LLMs for rerun code generation and come to me with a messy code spaghetti. It's both sad and hilarious.
I'm really agog at this. Do your interns understand that if they're just an LLM prompt injector, their job can be done by anybody? I haven't bumped into this yet, but I think your reaction was a lot more positive than mine would have been.
I know that I certainly wouldn't be rehiring any interns that gave me that kind of grief.
I tried my best to explain it to them, and nudge them to using docs. I did live debugging sessions with them to try and 'teach' them how to use docs. Ultimately, it was taking away too much of my time for little to no return. I only started working in the industry like a month ago and it's my first time having interns that I didn't pick (back in school, I had undergad research assistants that I interviewed/selected, and they were all excellent) - still learning the ropes.
We did recently add an export for LLMs[1], but weren't quite confident in how the big models handled it. The biggest issue we kept running into was that it would prefer using older APIs over the latest ones. I tested it just now with ChatGPT, and it seems to be doing a lot better! The export is kept up-to-date with the latest contents of our docs, which update every release. Sometimes a bit more frequently, if we're doing drive-by doc fixes.
For convenience, here's a GPT pre-loaded with the file: https://chatgpt.com/g/g-674702fde5948191a810bdf73370b6eb-rer...
[1]: https://rerun.io/llms.txt
(Can I access a mmap file, display it in real time with rerun and save a history at the same time?)
i found with aider if you do README.md with a halfway decent "spec" it will try to comply in architect or coder mode. I've been messing with it idly, and i will try this tack - give it the spec for the library or whatever.
someday, and i threaten this all the time, i am going to launch a website where i put all of these little "tricks" that make sense post hoc :-)
All comments shown.
Couldn't load more comments. Check your connection and try again.