4 ms·
After my Clojure conversion and baptism, I've taken to writing Python apps in a similar style using Jupyter notebooks, and find it to be a tolerable middle grou
by Nihilartikel 5y ago
After my Clojure conversion and baptism, I've taken to writing Python apps in a similar style using Jupyter notebooks, and find it to be a tolerable middle ground.
Especially if the Python is functional style with good referential transparency.
I.e. in each notebook cell, prototype and exercise your function in isolation. Then copy them over the real py module.
Still, I miss the elegant data literals in Clojure whenever I'm slogging through some literal Dataclass objects for testing..
- dunham 5y agoI used to do this in Jupyter, but switched to vscode. If you have comments that look like: # %% It will treat the following chunk of code like like a Jupyter cell and provide inline ui to run it. It’s almost the same thing as a notebook, but no markdown and your file is just a plain python script.
- Nihilartikel 5y agoNice! I've seen a mention of that here and there, but haven't given it a proper shot yet.