Hacker Newsnew | past | comments | ask | show | jobs | submit | jdaw0's commentslogin

i wanted to like marimo, but the best notebook interface i've tried so far is vscode's interactive window [0]. the important thing is that it's a python file first, but you can divide up the code into cells to run in the jupyter kernel either all at once or interactively.

0: https://code.visualstudio.com/docs/python/jupyter-support-py


Spyder also has these, possibly for longer than vscode [0]. I don't know who had this idea first but I remember some vim plugins doing that long ago, so maybe the vim community?

[0] https://docs.spyder-ide.org/current/panes/editor.html#code-c...


Jupytext docs > The percent format: https://github.com/mwouts/jupytext/blob/main/docs/formats-sc... :

  # %% [markdown]
  # Another Markdown cell

  # %%
  # This is a code cell
  class A():
      def one():
          return 1


  # %% Optional title [cell type] key="value"
MyST Markdown has: https://mystmd.org/guide/notebooks-with-markdown :

  ```{code-cell} LANGUAGE
  :key: value

  CODE TO BE EXECUTED
  ```
And :

  ---
  kernelspec:
    name: javascript
    display_name: JavaScript
  ---

  # Another markdown cell

  ```{code-cell} javascript
  // This is a code cell
  console.log("hello javascript kernel");
  ```
But also does not store the outputs in the markdown.


Thanks, this is a good read. I did not know MyST, it is very cool.

The vim plugin I was talking about was vim-slime [0], which seems to date from 2007 and does have regions delimited with #%%.

Slime comes from Emacs originally, but I could not find if the original Emacs slime has regions.

Matlab also has those, which they call code sections [1]. Hard to find when they were introduced. Maybe 2021, but I suspect older.

None of those stores gge output of the command.

[0] https://vimawesome.com/plugin/vim-slime

[1] https://www.mathworks.com/help/matlab/matlab_prog/create-and...


The Spyder docs list other implementations of the percent format for notebooks as markdown and for delimiting runnable blocks within source code:

  # %%

  "^# %%"
Org-mode was released in 2003: https://en.wikipedia.org/wiki/Org-mode

Org-mode supports code blocks: https://orgmode.org/manual/Structure-of-Code-Blocks.html :

  #+BEGIN_SRC <language> and 
  #+END_SRC. 
Literate programming; LaTeX: https://en.wikipedia.org/wiki/Literate_programming

Notebook interface; Markdown + MathTeX: https://en.wikipedia.org/wiki/Notebook_interface ;

  $ \delta_{2 3 4} = 5 $

  $$ \Delta_\text{3 4 5} = 56 $$


This is also where I have landed. Gives you all of your nice IDE tooling alongside the REPL environment. No need for separate notebook aware code formatters/linters/etc. That they version cleanly is just the cherry on top.


Looks very interesting. Could you elaborate on why you prefer this over the .ipynb notebook interface built into VS Code? The doc you linked mentions debugging, but I have found that the VS Code debugger is already fairly well-integrated into .ipynb notebooks. Is it mainly the improved diffing and having a REPL?


my impetus for exploring it was that vim modal editing and keyboard navigation is just really clunky in the notebook integration.

whether or not it's better for you depends on your use case for notebooks — i use them mostly for prototyping and exploratory data analysis so separating the code from the output might be more convenient for me than for you


Out of curiosity, does this approach also allow for interactive widgets?


Yes. Though it is split into a code section and an interactive section, like with Markdown previews. It really is driven by the code cells though.


Agreed, I find this to be a super productive environment, because you get all of vscode's IDE plus the niceties of Jupyter and IPython.

I wrote a small vscode extension that builds upon this to automatically infer code blocks via indentation, so that you don't have to select them manually: [0]

[0]: https://github.com/kylebarron/vscode-jupyter-python



just being left wing doesn't save a place from being a toxic cesspit [0]

0: https://bsky.app/profile/jdaw0.com/post/3ljyl6kbeys2a


people stopped making these systems because they simply didn't work to solve the problem

there's a trillion dollars in it for you if you can prove me wrong and make one that does the job better than modern transformer-based language models


I think it's more that the old expert systems (AKA flow charts) did work, but required you to already be an expert to answer every decision point.

Modern LLMs solve the huge problem of turning natural language from non-experts into the kind of question an expert system can use… 95% of the time.

95% is fantastic if you're e.g. me with GCSE grade C in biology from 25 years ago, asking a medical question. If you're already a domain expert, it sucks.

I suspect that feeding the output of an LLM into an expert system is still useful, for much the same reason that feeding code from an LLM into a compiler is useful.


using discord for community and docs is a dead giveaway for whether a FOSS project is actually about FOSS principle or whether it's about chasing clout


i'm really disappointed with the twitter alternatives. i thought one might feel like early twitter before the culture war takeover, but bsky and mastodon are just left wing hugbox versions of the same thing. threads is nothing but brands, E-list "celebrities" and "influencers" out for a buck. i've even gotten desperate enough to try substack notes, but it's just a tacked-on halfass feature. is there really no choice but to fight the hackernews ui to find technical discussions on interesting topics?


The main difference AFAIK is that it allows a custom site list, a feature the original version dropped at some point. I do not know why the distinction is clean vs an implied unclean


> I do not know why the distinction is clean vs an implied unclean

The Chrome version of the original extension (other than the Firefox version) embedded Google analytics.

edit: looked it up. Source: https://github.com/iamadamdev/bypass-paywalls-chrome/issues/...


funny to me that this image has reached the level of mimetic saturation that you can infer exactly what the image is going to be without opening it. many such cases but i always think it's interesting.



I still hate this story. The difference is that the fisherman without a business empire is one bad week away from ruin and his entire family starving to death.


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

Search: