HN user

paulshen

779 karma
Posts42
Comments39
View on HN
wattenberger.com 3y ago

Chatbots are not the future

paulshen
161pts152
secretartofscience.com 3y ago

What we talk about when we talk about performance (2021)

paulshen
32pts3
natto.dev 3y ago

Show HN: Visualizing PyTorch's Broadcasting Semantics

paulshen
1pts0
discord.com 3y ago

Discord’s Creator Portal

paulshen
90pts57
natto.dev 3y ago

Show HN: Natto.dev – live spatial JavaScript environment

paulshen
2pts0
museapp.com 4y ago

Muse 2.0 - Tool for Thought on iPad and Mac

paulshen
137pts4
python.natto.dev 4y ago

Show HN: A Spatial Environment for Python

paulshen
169pts30
python.natto.dev 4y ago

Show HN: A Spatial Environment for Python

paulshen
2pts1
www.youtube.com 4y ago

Prototyping a Logo programming environment inside natto.dev [video]

paulshen
32pts2
retool.com 4y ago

State of Engineering Time

paulshen
2pts0
www.contentlayer.dev 4y ago

Contentlayer (Beta): Content Made Easy for Developers

paulshen
1pts0
www.placemark.io 4y ago

Placemark

paulshen
6pts0
feifan.blog 4y ago

Feature-Less Software

paulshen
2pts0
macos8.app 4y ago

Infinite Mac – Mac OS 8 emulator

paulshen
1pts2
www.youtube.com 4y ago

Prototyping a Logo programming environment inside natto.dev [video]

paulshen
3pts0
blog.darklang.com 4y ago

How to Fund CaramelLang?

paulshen
2pts0
www.youtube.com 4y ago

Freeform editors like Natto are the future of programming

paulshen
2pts1
www.bespokesynth.com 4y ago

Bespoke Synth 1.0 – open-source software modular synthesizer

paulshen
745pts242
natto.dev 4y ago

Generative art in a spatial live JavaScript environment

paulshen
2pts0
secretartofscience.com 4y ago

What we talk about when we talk about performance (2021)

paulshen
2pts0
birthday.report 5y ago

Show HN: Birthday.report – open-source birthday calendar

paulshen
21pts6
natto.dev 5y ago

Show HN: Natto – a canvas for writing and manipulating JavaScript

paulshen
5pts2
bypaulshen.com 5y ago

Approaches to Exploring Codebases

paulshen
3pts2
artifacts.bypaulshen.com 5y ago

Show HN: Smalltalk-like browser of TypeScript code

paulshen
2pts0
artifacts.bypaulshen.com 5y ago

Show HN: Experimental Semantic Code Explorer

paulshen
117pts25
drawbattle.io 5y ago

Show HN: Draw battle – A competitive team drawing game good for work socials

paulshen
1pts0
bypaulshen.com 5y ago

Monads for JavaScript Developers

paulshen
2pts1
twitter.com 5y ago

A thread of “advanced” React interview questions

paulshen
3pts0
twitter.com 5y ago

Vue first impressions as React developer

paulshen
1pts0
bypaulshen.com 6y ago

VSCodeVim Tips

paulshen
2pts0

Hi all! I've been working on natto.dev, a spatial environment for JavaScript. With all the buzz around PyScript, I found Pyodide and got it working inside natto! It's a beautiful piece of software.

This is a tech demo of what a Python spatial notebook could look like. It's a stripped down version of natto (eg interactive outputs, multiplayer) so please check that out if this interests you!

Here's the main file of the tictactoe implementation.

https://gist.github.com/paulshen/b04db68c754f73e693cd29a481c...

`update` is similar to React's render function except here it's being called on every interaction (eg mousemove tick) and redrawing the entire screen from scratch! The code runs so fast that this is fine from a perf standpoint. Note that egui has a reactive or continuous mode. You can rerender everything from scratch 60fps (continuous mode) and it'd be fine in most cases.

Thanks! I'm using plain React. I have a React onMouseDown React listener that attaches mousemove/mouseup listeners on the window. I round the numbers to the grid.

I've seen https://reactflow.dev/ but haven't used it myself. The core drag interaction is not much code but feel free to reach out on twitter. happy to share more!

The eval of natto maps surprisingly well to React's primitives (memoization, effects). This is pseudocode for the main eval https://gist.github.com/paulshen/9889b6067609f9053a0d56d4641...

The expression is only transformed with Babel if you enable the JSX React transform. Otherwise, it's just straight eval-ed by your browser. It's by no means battle-tested (eg while (true)). I haven't tested circular deps and am leaving that as a surprise for myself in a little bit. One thing that I do is run the canvas in an iframe on a different domain for security reasons.

Parsing is something I'm trying to avoid as much as possible but it's likely I'll add it. Referencing things as inputs[2] doesn't feel stable. May help with implicit deps and avoiding wires (see observablehq.com)

As for mess of wires, I'm still forming my opinion! I want to learn more about nodes-and-wire programming and why it isn't mainstream. The hunch I'm getting is that visual programming feels better to create than consume. The space is great for exploration but looking at someone else's canvas can be chaotic. Maybe there are features that can alleviate this (multiple views, autolayout). Look at this haha https://twitter.com/_paulshen/status/1321872376234082305

yes! This is what I'm exploring next, composability. One idea is to make "big boxes" like you describe. The other approach is to make canvases have special input/output pane and the ability to reference/run other canvases.

Yes, very intentional! I'm taking a JavaScript-first approach. I know JavaScript, you probably know JavaScript, and the browser runs JavaScript. It's not the perfect language but here we are. It has lot of nice qualities!

I consider natto a much?-code approach in realm of no/low-code. Instead of building abstractions (no-code), what if we built new environments and UI for code? I'm spending most time building UI and trying to keep execution abstractions as minimal as possible.

Hi all! Developer here before first coffee

I'm actively working on natto.dev and it really is in "preview". I'm excited about the future of programming and having a canvas to explore it on. still looking for "crazier" ideas - my favorite current one is dragging a column out of a table. https://twitter.com/_paulshen/status/1366801887341649924

The more I work on it, the more confident I am that there's something there. If you try it, I'd love to hear your feedback!

natto takes inspiration from a whole lot of work. non-exhaustive list: Yahoo Pipes, Excel, design tools (Figma), Observable, darklang, GToolkit, SmallTalk (repl-driven), http://joshuahhh.com/projects/pane/, http://www.lamdu.org/, https://futureofcoding.org/catalog/

As much as I love natto (the food), I'll likely rename it at some point. Pronunciation hit rate has been 0%

Hi! I'm excited to share a preview of natto, a spatial UI for writing and manipulating JavaScript. It's kinda like a mix of JS playground, script runner, API client, JSON viewer, and datavis tool. Here's a demo video https://twitter.com/_paulshen/status/1370404362325876737

If you're interested, I recommend checking out the tutorial https://natto.dev/tutorial to get a tour of the features. The "coolest" feature right now is the ability to drag a column header out of a table pane.

I get quite excited thinking about the "future of code" and think natto explores some ideas in that direction. I'm actively working on this (have lot of ideas) so stay tuned for updates. thanks!

Good feedback. Thank you! This iteration explores my question that while navigation history is a tree, what do people want on the screen at the same time? Personally, I find myself usually wanting 2-3 units of information on the screen (most often, a caller and callee). That's why panes are draggable from one column to another. The navigation is semantic but the panes are unopinionated.

Iteration 01 https://artifacts.bypaulshen.com/code-explorer/01/?snapshot=... implements exactly what you suggest with showing connections. Closing a pane will recursively close children. Also references are tied to the pane (point 4)

5. yes! I'm going through iterations of exploration but will consider these important points when/if productionizing.