Coding 2023-11-22

Tags:
By Max Woerner Chase

I ended up not focusing on much today. Mainly, I messed around with some of the tech I was interested in messing with. Specifically, marimo.

As I understand it, marimo is trying to be a replacement for Jupyter in terms of exploratory data processing and visualization. That... was not what I used it for, so the overall experience was mostly illuminating in terms of "Boy, Python sure can be used in a lot of ways, and the resulting code can look very different."

To get a feel for marimo, I looked over some code I'd written as a Jupyter notebook that, to be clear, never needed to be a Jupyter notebook, so getting it into marimo was mostly not interesting, except for all of the typos that I found because the code was never actually run.

From the perspective of my own code, my main takeaways were that working with annotations felt not-great, and I'd have to look over the code to understand how some of this all works. Like, looking at the generated Python file, I'm not sure how the code representing the cells gets dealt with as something to actually run.

Mostly, I've come away with a greater sense of how much the purpose or tooling can change the look of the code. Like, I'd never write something that looks like a marimo notebook "by accident", and there are at least aspects of the Python that Dafny generates that I wouldn't think to write like.

:)

If you haven't taken a look at the Python code that Dafny generates, please understand that that was a self-directed burn that does not intend to disrespect the Dafny project.

Overall, I'm very interested in the "automatic literate programming" aspect of marimo, but I'm seeing some teething problems for specific styles of code. If you're not using annotations, I doubt you'll hit any of the issues I did. (Although it occurs to me now that I think some Python code may be outright syntactically invalid to put in a marimo notebook, like star imports.)

Sadly, I don't have anything to say about the marimo module, because I... didn't try to use it. This code was really not meant for notebooks, but having it in a weird interface helps to dull the itching sensation I get when Python code is neither a fully standalone script, nor a version control repository with a full test harness set up.

Potentially, there's some better tool out there for that specific use case. "Make it easier to set up a repository with test harnesses" isn't it for me, because I am several years worth of rabbit hole into writing a task runner that accords with my sensibilities, and I haven't run across anything that obsoletes my work on MOTR. So, my best hope is probably something in the notebook space, but I'm not sure what. Maybe I just need to think more about what I'm trying to accomplish here...

Anyway, the one thing I'd really like to change so far about marimo is the tab completion bindings, but maybe that's just a matter of "it's not working how Kakoune works". Aside from that, I'm interested in trying to use it the next time I need to do actual notebook stuff.

For now, I'm going to wind down.

Good night.