[HN Gopher] Show HN: A modern Jupyter client for macOS
       ___________________________________________________________________
        
       Show HN: A modern Jupyter client for macOS
        
       I love Jupyter - it's how I learned to code back when I was working
       as a scientist. But I was always frustrated that there wasn't a
       simple and elegant app that I could use with my Mac. I made do by
       wrapping JupyterLab in a chrome app, and then more recently
       switching to VS Code to make use of Copilot. I've always craved a
       more focused and lighter-weight experience when working in a
       notebook. That's why I created Satyrn.  It starts up really fast
       (faster time-to-execution than VS Code or JupyterLab), you can
       launch notebooks right from the Finder, and the design is super
       minimalist. It's got an OpenAI integration (use your own API key)
       for multi-cell generation with your notebook as context (I'll add
       other LLMs soon). And many more useful features like a virtual
       environment management UI, Black code formatting, and easy
       image/table copy buttons.  Full disclosure: it's built with
       Electron. I originally wrote it in Swift but couldn't get the
       editor experience to where I wanted it. Now it supports
       autocomplete, multi-cursor editing, and moving the cursor between
       cells just like you'd expect from JupyterLab or VS Code.  Satyrn
       sits on top of the jupyter-server, so it works with all your
       existing python kernels, Jupyter configuration, and ipynb files. It
       only works with local files at the moment, but I'm planning to
       extend it to support remote servers as well.  I'm an indie
       developer, and I will try to monetize at some point, but it's free
       while in alpha. If you're interested, please try it out!  I'd love
       your feedback in the comments, or you can contact me at jack-at-
       satyrn-dot-app.
        
       Author : jackhodkinson
       Score  : 227 points
       Date   : 2024-07-07 17:59 UTC (5 hours ago)
        
 (HTM) web link (satyrn.app)
 (TXT) w3m dump (satyrn.app)
        
       | jackhodkinson wrote:
       | Thanks for checking out my project. I'd love your feedback in the
       | comments.
       | 
       | I'm not sure if the post text above is visible (I can't see it on
       | my phone's HN reader) so I'm going to repost it here as a comment
       | too:
       | 
       | I love Jupyter - it's how I learned to code back when I was
       | working as a scientist. But I was always frustrated that there
       | wasn't a simple and elegant app that I could use with my Mac. I
       | made do by wrapping JupyterLab in a chrome app, and then more
       | recently switching to VS Code to make use of Copilot. I've always
       | craved a more focused and lighter-weight experience when working
       | in a notebook. That's why I created Satyrn. It starts up really
       | fast (faster time-to-execution than VS Code or JupyterLab), you
       | can launch notebooks right from the Finder, and the design is
       | super minimalist. It's got an OpenAI integration (use your own
       | API key) for multi-cell generation with your notebook as context
       | (I'll add other LLMs soon). And many more useful features like a
       | virtual environment management UI, Black code formatting, and
       | easy image/table copy buttons.
       | 
       | Full disclosure: it's built with Electron. I originally wrote it
       | in Swift but couldn't get the editor experience to where I wanted
       | it. Now it supports autocomplete, multi-cursor editing, and
       | moving the cursor between cells just like you'd expect from
       | JupyterLab or VS Code.
       | 
       | Satyrn sits on top of the jupyter-server, so it works with all
       | your existing python kernels, Jupyter configuration, and ipynb
       | files. It only works with local files at the moment, but I'm
       | planning to extend it to support remote servers as well.
       | 
       | I'm an indie developer, and I will try to monetize at some point,
       | but it's free while in alpha. If you're interested, please try it
       | out!
       | 
       | I'd love your feedback in the comments, or you can contact me at
       | jack-at-satyrn-dot-app.
        
       | pbronez wrote:
       | Cool!
       | 
       | Surprised to hear you started with a native UI and pivoted to
       | electron. What was the major blocker there?
       | 
       | I recently got frustrated with OpenSCAD and decided to try
       | CadQuery and Build123d. The modeling backend is a big step
       | forward, but the GUI is not nearly as good as OpenSCAD. I managed
       | to get it working via VSCode with a plugin, but I'm dreaming of
       | embedding everything in a dedicated MacOS app so I can jump into
       | CAD work without hacking through dev setup.
        
         | jackhodkinson wrote:
         | There aren't many great production-ready open-source frameworks
         | for code-editor components in Swift. I assessed quite a few but
         | found that the feature completeness was far from what I needed.
         | I tried to fork [CodeEditSourceEditor](https://github.com/CodeE
         | ditApp/CodeEditSourceEditor) and add the extra features I
         | wanted, but I think it would have taken me 6-12 months to get
         | it to an acceptable state, meanwhile not spending any time
         | focusing on the rest of the product experience.
         | 
         | I decided to play around with Typescript and Electron over a
         | weekend and ended up getting a really solid prototype so I made
         | the heart wrenching decision to move over.
         | 
         | I'm messing around with writing my own text editor component in
         | Swift now, but it's quite a big endeavour to get the standard
         | expected for a production ready product.
         | 
         | I'm assuming a pure-swift CAD UI would be equally difficult.
         | Would be really cool to see that tho.
        
       | yboris wrote:
       | I hope you consider an open source model: code available freely
       | on GitHub & app available for purchase on your website.
       | 
       | I was scared about doing it this way, but it worked out for me:
       | https://videohubapp.com/ for pay-what-you-want-$5-minimum for my
       | app, and https://github.com/whyboris/Video-Hub-App git-clone-and-
       | build for the code. I currently sell about 60 copies per month
       | (same average across the last 4 years too).
        
         | breck wrote:
         | > pay-what-you-want-$5-minimum for my app
         | 
         | > I currently sell about 60 copies per month (same average
         | across the last 4 years too).
         | 
         | I'm guessing the median is $5, can you share what the average
         | is?
        
         | rudedogg wrote:
         | Nice app, I might give it a try for my video collection.
         | 
         | Would you be willing to share the OS breakdown? I'm primarily
         | interested in macOS and am wondering roughly what % of your
         | sales are for that platform?
        
       | phromo wrote:
       | Alternatives and innovation in this space are greatly
       | appreciated! I run Linux and Windows so I keep my eyes fixed on
       | https://github.com/zed-industries/zed/pull/12062#issuecommen... -
       | - zed is a cross platform, gpu rendered, rust-based editor..
       | Jupyter support should arrive soonish
        
         | ayhanfuat wrote:
         | nteract (https://nteract.io/) supports windows and linux.
        
           | phromo wrote:
           | I still use Atom+Hydrogen most days.. About the same amount
           | of years since the last (major) updates as nteract.
           | 
           | https://github.com/nteract/hydrogen
        
         | jackhodkinson wrote:
         | That contribution to Zed from rgbkrk looks awesome.
        
       | cheptsov wrote:
       | Can I use it to connect to a remote Jupyter notebook server?
        
         | jackhodkinson wrote:
         | Not yet! But I'm working on this :)
        
           | cheptsov wrote:
           | That will be interesting. Happy to test and share feedback.
           | Previously, I was a part of the DataSpell and PyCharm team
           | building notebook support. Now working with dstack, where we
           | support dev environments and super interested in remote
           | support.
        
             | jackhodkinson wrote:
             | Thanks! I'll let you know when it's ready. What do you use
             | now to work with remote environments? JupyterLab or VS
             | Code?
        
               | cheptsov wrote:
               | Right now, mostly VSCode - mainly because it's a desktop
               | IDE and it also supports notebooks.
        
       | Halan wrote:
       | The reason people use an actual IDE instead of Jupyter web is
       | because it allows you to jump in the libraries source code
        
         | jackhodkinson wrote:
         | Agreed, that's a big one. I'd love to add that capability to
         | Satyrn too.
        
       | ibash wrote:
       | Thank you for attempting to use swift first. Electron apps are
       | bloated and overused.
       | 
       | Excited to play around with this!
        
         | jackhodkinson wrote:
         | I agree! At the very least I can port this to Tauri to make it
         | have a smaller footprint.
        
       | magnio wrote:
       | To be frank, I don't see any additional features of the app over
       | VSCode, other than it starts up faster, which does not matter
       | much as VSCode starts up faster than the import cell of any
       | notebooks I have. Also, one big reason I use VSCode for notebook
       | is to get the Python LSP.
       | 
       | Good luck to you though, I do think the demographics of
       | scientists who find VSCode confusing is actually sizeable.
        
       | asdf_snar wrote:
       | I use Jupyter Lab every day on OSX in scientific/academic work,
       | so I feel I am your target audience. In case it helps you gauge
       | my impression, I spent about two minutes reading the post and
       | scrolling through the website.
       | 
       | I feel I did not understand the main advantages of this notebook
       | aside from the AI integration. I don't understand how "start-up"
       | time is a cost; I have a Jupyter server running at all times and
       | use it as a scratch-pad throughout the day, so it is always
       | available.
       | 
       | I don't understand the "modern command palette". As far as I can
       | tell all the commands are available to regular Jupyter Labs, and
       | either way I always use hotkeys for them.
       | 
       | The code formatting using black isn't bad, but notebooks are for
       | scratchy ideas, not real code. If I'm at the point of formatting
       | code, it's going in an actual IDE. I'd even argue providing
       | formatting inside of a notebook encourages bad habits for
       | scientists, who prefer to stay entirely within a notebook, but
       | are then sometimes unable to reproduce their results.
       | 
       | I don't see the advantage of the copy-paste; I can copy paste
       | directly from Labs to Slack/online editing pages, and certain
       | Latex typesetters.
       | 
       | Pros: it looks pretty, the site has nice demo videos (in terms of
       | quality; I didn't understand the content).
       | 
       | I want to like this but I don't see any benefits for a power user
       | except for the AI integration; if AI is the only selling point
       | then I prefer to get it differently.
        
         | jackhodkinson wrote:
         | Thanks for your feedback!
         | 
         | If you'd be happy to share: I'm curious to know what scientific
         | field you work in? Do you do 100% computational work, or is it
         | a mixture of experimental and computational?
        
         | ayhanfuat wrote:
         | I also use notebooks and qtconsole daily so I'd like to chime
         | in.
         | 
         | - I don't have a continuously running notebook server. I start
         | it when I need to and shut it down if I won't be working with
         | it for a while. I do like the idea of clicking an icon and
         | starting an app.
         | 
         | - Modern command palette, I believe, is similar to what you
         | would see in apps like VS code. It doesn't offer more commands
         | but instead make it easier to find and execute commands. I
         | don't use Jupyter Lab so I don't know if it has a command
         | palette but Jupyter Notebook doesn't so that seems like an
         | advantage to me.
         | 
         | - I disagree on the formatting point, too. Even if I am just
         | doing something very quick I cannot stand seeing lines
         | extending some length, no space after a colon, single vs double
         | quote inconsistency etc. So I do spend time formatting them
         | even if I am on IDLE and know for sure I am not going to save
         | it. Thankfully, IPython added support for Black so it is less
         | of an issue for me.
         | 
         | Apps in this area generally focused on extending Jupyter to
         | maybe combine SQL/JS with Python, making data exploration
         | easier but I do appreciate a light app that just gives me a
         | notebook experience with some small advantages, especially
         | considering Classic Notebook is going to go away soon. I'll
         | definitely give it a try.
        
         | hatmatrix wrote:
         | I switched to Windows/WSL2 a few years back so don't have a
         | fight in this game (though if it's Electron, why only macOS?) -
         | but having to switch between IDE and Jupyter for code
         | formatting seems like unnecessary overhead.
         | 
         | But TBH Quarto is much better in this regard; you can use a
         | VScode together with another IDE if you wish to format/edit/run
         | chunks of code in the same file.
        
       | oli5679 wrote:
       | I use notebooks the whole time, normally in vs-code and with
       | github copilot setup.
       | 
       | I found it quite painful to point it to a couple of environments
       | I have, and confusing how i get it pointing to my gpt4 api keys.
       | Once I did these two I was not sure how to prompt rather than
       | typing a command.
       | 
       | Good luck with this, don't mean this in a critical way, just
       | trying to give some feedback of what I think when I first try it.
        
         | rahimnathwani wrote:
         | I also edit my notebooks in vscode. I wouldn't switch to
         | something that doesn't support GitHub copilot, unless
         | completions are much better.
        
           | jackhodkinson wrote:
           | Thanks for your feedback! I'm looking into this. I'd also
           | really like copilot here.
        
         | jackhodkinson wrote:
         | I'll work on making them easier to configure.
         | 
         | At the moment you press `g` (for generate) while in command-
         | mode to create a "prompt cell". I'll think of ways to make this
         | more obvious.
         | 
         | Appreciate you spending the time to try it out and share your
         | feedback.
        
       | tomwphillips wrote:
       | Why "modern"? I suggest you use more descriptive adjectives.
        
         | s3p wrote:
         | I think the approach is a Mac-first app that follows Apple's
         | design language, no?
        
         | aflag wrote:
         | I always felt that if you have nothing to say about your
         | project you say it's modern. They just coded it, so it must be
        
       | BaculumMeumEst wrote:
       | Dude I just started getting into deep learning and have been
       | flabbergasted getting stuff working. I installed jupyter and
       | torch via homebrew. I can use torch fine from programs, or in
       | venvs, but when I try to use torch in a Jupyter notebook it
       | cannot find the module. Is it a different python environment or
       | something?
        
         | nickvazz wrote:
         | Hey, I used to run into the same issue and figured out
         | installing conda, and utilizing its python was the easiest to
         | keep things straight. Once you install conda and can activate
         | your environment, then when using pip, don't just call `pip
         | install` because your path could be using a different pip than
         | you expect. Instead use `python -m pip install` after
         | activating your conda environment but make sure you're using
         | the right Python (`which python` & `conda env list`)
        
         | adammarples wrote:
         | Python packaging etc can be a real pain point. I would suggest
         | not using homebrew for these, in fact uninstall them. For
         | jupiter/torch heavy work, I would install anaconda and then use
         | that exclusively. Best of luck, it can be annoying but follow a
         | good guide online you'll be OK.
        
         | jackhodkinson wrote:
         | It can be confusing. The key is that you probably have multiple
         | versions of python installed on your computer (that's normal).
         | Secondly, the default "kernel" in Jupyter was probably not the
         | one you used to install torch.
         | 
         | I'd suggest 2 things to help: 1. Try `pyenv` for python version
         | management 2. See this tutorial for how to create a virtual
         | environment and add it as a Jupyter kernel:
         | https://selvamsubbiah.com/run-jupyter-notebook-in-a-virtual-...
         | 
         | Satyrn makes it easier to add virtual environments as a kernel,
         | but you still will need to create the virtual environment and
         | install torch there yourself.
         | 
         | That's a really great point you made about how confusing it is
         | to pip install stuff with `!pip` when working in the notebook.
         | Right now Satyrn does not support the `!` commands, but I will
         | add this soon and try to make it so `!pip` works with the
         | expected virtual environment you are working with.
        
         | threePointFive wrote:
         | Jupyter and pytorch can be installed completely as python
         | packages via pip thanks to the modern wheel distribution
         | format. Because of that, I would generally not recommend using
         | an external package manager for project dependencies. I prefer
         | installing python via the Python.org downloads, then creating a
         | dedicated virtual environment where I can pip install any
         | packages. That way I known where all my dependencies are
         | installed, and I can make seperate environments for different
         | Python or library versions.
        
         | amelius wrote:
         | Package management is a fundamentally hard problem, and it's
         | not all technical.
         | 
         | Nowadays, before I try anything new, I mentally reserve one or
         | two days for the inevitable problems with configuring,
         | compiling and installing. Also, it happens regularly that the
         | cost of trying something turns out to be too high, and I just
         | move on to the next thing.
         | 
         | Of course, sometimes stuff works out of the box, but that is
         | only in a small fraction of cases.
         | 
         | It is sad that it has come to this, and it makes me wonder how
         | we'll cope in a future when software has even more layers of
         | complexity.
        
       | 29athrowaway wrote:
       | Does it work with Sagemath?
        
         | jackhodkinson wrote:
         | Is this it? https://www.sagemath.org/
         | 
         | This looks like a programming language built on top of Python.
         | 
         | Satyrn only supports the Python programming language right now.
         | 
         | If you are using this on the regular, I'm curious if you have
         | tried Julia or Mathematica, if so why do you use Sagemath over
         | those alternatives?
        
           | 29athrowaway wrote:
           | There are many reasons to use Sagemath.
           | 
           | It unifies multiple existing open source math libraries and
           | packages. It integrates with Octave, Scilab, Maxima, etc. It
           | also integrates well with LaTeX... you can take results,
           | format them as TeX and also render them.
           | 
           | Its objective is to be a replacement for Maple, Mathematica
           | and MATLAB, which are prohibitively expensive for many
           | people. As such, once it's installed it comes with batteries
           | included and you can easily share workbooks that others can
           | run without falling into a DevOps-like situation.
           | 
           | The DSL that is offers can be more convenient than Python.
           | 
           | There are some interesting quickstart tutorials here
           | https://doc.sagemath.org/html/en/prep/quickstart.html
           | 
           | And it was also discussed earlier on HN here, with many
           | comments that are more informed than anything I could say at
           | this moment: https://news.ycombinator.com/item?id=23511183
           | 
           | I tried JetBrains DataSpell as a desktop frontend for Sage
           | and the results were not good.
        
       | twarge wrote:
       | This sort of high performance minimalism is precisely what makes
       | the Mac app ecosystem great. Not because you can't write the same
       | thing on other platforms, but because everyone who cares about it
       | has condensed on the Mac platform.
       | 
       | Would love to see this adopt the document-based app API and the
       | toolbar API.
        
         | behnamoh wrote:
         | > This sort of high performance minimalism is precisely what
         | makes the Mac app ecosystem great. Not because you can't write
         | the same thing on other platforms, but because everyone who
         | cares about it has condensed on the Mac platform.
         | 
         | Meh. Most apps like this are built for the Mac because a lot of
         | programmers use Macs. If anything, Apple makes it difficult to
         | develop for macOS because they keep breaking APIs with each
         | update.
        
           | llamaimperative wrote:
           | Pretty sure that's what they're saying
        
             | behnamoh wrote:
             | Pretty sure that's not what they're saying.
        
         | hipadev23 wrote:
         | > high performance minimalism
         | 
         | bro it's python and electron. they're both ubiquitous but
         | they're sure as hell nowhere near the fastest in their
         | categories.
        
       | dsp_person wrote:
       | Anyone else live in a Jupyter QtConsole?
        
         | flippant wrote:
         | Thank you. I didn't know this existed.
         | 
         | https://qtconsole.readthedocs.io/en/stable/
        
         | CamperBob2 wrote:
         | Yes, I have it set up to launch at OS startup, along with a
         | hotkey to task-switch to it at any time. An incredibly
         | underrated tool.
         | 
         | JupyterLab still has its uses, but it's just too heavyweight
         | for the "calculator replacement" role IMO. QtConsole is
         | perfect. Or at least, it is with a bit of additional startup
         | code.
        
       | blindriver wrote:
       | Can someone explain their views on Jupyter notebooks? As far as I
       | can tell, the instructor/content creators will set up the
       | "notebook" and students can read the notes and click on the
       | "play" button to see it work in action. Is there anything else
       | besides that?
       | 
       | I guess I'm old school and am used to cutting and pasting and
       | running things in my own terminal, so I'm wondering if there are
       | added benefits that I'm not aware of of Jupyter notebooks. It
       | seems to have a very loyal following so I would love to learn
       | their perspective!
        
         | dijit wrote:
         | Really good for doing some basic data science, the kind of
         | thing where you want some graphs based on some source data that
         | is variable.
         | 
         | Being able to change functions around and generate new graphs
         | (IE; if I want the mean not the median for a contrived example)
         | is really handy.
        
         | adobrawy wrote:
         | Data science / ML are using that. Databricks (data platform,
         | data warehouse) have support to run notebooks in workflows on
         | periodic basis.
         | 
         | There is market of professional use of them.
        
         | jackhodkinson wrote:
         | When I learned to program I was working as a scientist. I was
         | relying on OriginLab (a scientific version of Excel) for my
         | data analysis and it was a real pain. I decided to start using
         | python for analysis and plotting and started with scripts and
         | terminal interactivity, but found it too clunky. Jupyter feels
         | more interactive when you are working with data because you
         | need to explore the data and experiment with data manipulation
         | in a way I found quite natural to do in a notebook.
         | 
         | Since then I've moved into software development where I rely on
         | my IDE for any coding that involves working with more than a
         | few modules. And as I got better working with an IDE I did
         | gravitate toward making a script for certain kinds of tasks
         | where I use to reach for a notebook, but there are still many
         | data analysis tasks that I would much prefer a notebook for.
         | 
         | It's also quite nice to share a notebook with someone to show
         | them how you arrived at your conclusions, and it's nice for
         | them to be able to take your analysis and modify it or test
         | their own ideas on top of yours. Obviously the notebooks are
         | not great for collaboration without some fiddling around with
         | git, but they are still very good for this kind of
         | collaboration.
        
         | bobbylarrybobby wrote:
         | Imo there hasn't been much of a point except as a share-only
         | format since vscode's Python extension could natively handle
         | comment-delimited code cells. You get all the benefits of a
         | Jupyter notebook while still just writing a plain text file.
        
         | ericjmorey wrote:
         | You can also edit the notebook, both code blocks and text. It's
         | used for quick visual iterative exploration of datasets with
         | descriptions. The focus is on creating a report of your
         | analysis and process rather than a "product".
        
         | lucasoshiro wrote:
         | Another point not mentioned by the other comments: you run code
         | interactively (like you would do in a REPL), but keeping what
         | you wrote. This is very practical, for example, if you want to
         | develop a simple code for data analysis. You fetch the data
         | only once, then develop the rest of the code based on it,
         | instead of writing everything without seeing the data.
         | 
         | As a consequence of it, it makes easier to write bad code. I
         | care about code quality, but I must admit that sometimes I
         | needed to stop and refactor my jupyter notebooks.
         | 
         | It's a nice tool, but it doesn't replace writing a .py
        
         | analog31 wrote:
         | I'm a so called "scientific" programmer, meaning that I use
         | programming as a tool for solving problems, not for writing
         | software that others will use. Many of my programs run only
         | once, or a few times with changes each time.
         | 
         | I've switched virtually all of my work to Jupyter, including
         | some lab automation, but also data analysis, modeling,
         | visualization, and so forth. I use it as an interactive lab
         | notebook that can "do" things.
         | 
         | Of all the tools I've used in 40+ years, my Jupyter notebooks
         | are the best thing I've experienced for being able to go back
         | and understand things I've done, weeks or years later.
        
       | fnoof wrote:
       | How does this compare to the "official" Jupyter desktop app:
       | https://github.com/jupyterlab/jupyterlab-desktop
        
         | dijit wrote:
         | Looks like a native app vs an Electron app.
        
           | ashvardanian wrote:
           | Both are web apps sadly.
        
       | rrr_oh_man wrote:
       | I'm still hoping for something that is at least 80% as functional
       | and integrated as RStudio is for R.
        
         | Affric wrote:
         | Have you had a look at Quarto? Any thoughts?
        
       | dkga wrote:
       | Congrats! Sorry if you shared here below and I missed it, but I'd
       | love to hear what exactly didn't work out with a pure Swift
       | approach. I'm trying that route for a SQL client based on duckdb
       | (as a side project) and would be very helpful to avoid similar
       | pitfalls for example.
        
       | madjam002 wrote:
       | Is there something like Jupyter for Javascript/Typescript,
       | ideally self hosted? At the moment I just do data science using
       | one off scripts in NodeJS but seeing these notebook style formats
       | recently where different chunks of code appear to be snapshotted
       | and then visualisations can be easily integrated looks quite
       | nice.
        
         | __natty__ wrote:
         | Yes. You can use Jupyter notebooks with both JavaScript and
         | TypeScript. Such support is from Deno for example [0]
         | 
         | [0] https://deno.com/blog/v1.37
        
       | wenc wrote:
       | I used to use Jupyter and Jupyter Lab, but by far the most able
       | Jupyter interface today is actually VS Code (I use this every
       | day).
       | 
       | The interface is sleek, the language server and debugger are
       | built in (so completions, variable renaming, step-by-step
       | debugging etc. all work seamlessly) and it makes Jupyter a
       | pleasure to use.
        
       ___________________________________________________________________
       (page generated 2024-07-07 23:00 UTC)