Hacker News
14 hours ago by Micoloth

I have a few questions - Is this inspired/based on the Blender node editor package?

Some stylistic choices look very much taken from there, even if some other details (eg font) look much more primitive

- If it’s not based on that, why?

Blander has an Excellent Python-based cross-platform ui which is completely open source. I’ve always thought it’s a crying shame that’s not available as a package to build desktop apps. And I think it would be very good to take things from there, like their very mature graph editor

9 hours ago by WillAdams

That last point is _very_ interesting.

8 hours ago by catapart

Blender was my first thought here, too.

A while ago, I was asked to write a plugin for Blender since I really liked the program. I looked into it but realized that it was a python-only situation and I really just can't stand coding like that, so I passed on it. But if I could get the python ecosystem without having to code like that - that's a really interesting prospect!

Never looked in to its package size, as far as UI goes, but that does sound like something that could be interesting! I do wonder how different it is from imgui, but there could be something there!

3 hours ago by cyanydeez

Animation nodes plugin for blender did wonders for understanding blender bedfore it was basically consumed by the core team by Jacques Locke

8 hours ago by echelon

It looks like ComfyUI, which is blowing up in the creative space.

3 hours ago by undefined
[deleted]
5 hours ago by mistercow

I can see some advantages of this kind of editor for specific contexts, like if you’re building a shader, this UI forces you to be purely functional without explicitly teaching purely functional concepts.

But it seems like there’s also a general feeling that this is easier than learning how to code, and I guess my question is… is it? Is this really a better idea than a simple to use API with a DSL (or just a simple language like Go or Lua). Is it just less intimidating to beginners?

You still have to learn the concepts and rules of the system, in addition to figuring out cable management. It seems to make documenting your “code” a lot harder. And now with AI assistants, you’re giving up even more by not working with text.

5 hours ago by MrLeap

I've got 2 decades of professional programming experience under my belt and I still think node graph editors are grand. I regularly use VFXGraph / Shadergraph / Custom nodegraph editors for various gamedev things (e.g. dialog trees, checkpoint graphs, all sorts of things)

I'm very defensive of my "repl latency". By that I mean, how much effort/time does it take for me to see the results of my change in action? Every node editor that's found its way into my workflow brings that latency down to real time.

They provide much more information so much faster about every change you're making as you're making it. It's like a causality scope. If the widget you're tuning/iterating on benefits from that, they're a joy.

5 hours ago by mistercow

Isn’t that, again, specifically a benefit of being purely functional?

5 hours ago by MrLeap

To me, the way inputs and outputs are presented in nodegraph editors adds value on top of the benefits functional programming provides. You see the cascade of every change in real time. Change parameters and see every stage's new inputs and outputs as they're transformed.

If I added Logger.Log calls to show as much info, my console would be a blur. I wouldn't be able to click on a parameter in my log and change its value and see what the consequences were.

You can change values at a breakpoint, but that's a single moment in time. If your code's running at 60hz, breakpoints can feel like trying to solve a where's waldo through an electron microscope.

I have not came across any workflow in my IDEs that is as flexible and informative for the situations where nodegraph editors shine. If something comes to mind for you, I'd love to know about it.

There's no theoretical reason a text editor couldn't be made to show the same cross section of key information though. TempleOS is kind of like that lol.

2 hours ago by baq

It’s somewhere between excel and traditional source trees. It isn’t a bad idea, but the tooling isn’t there for general purpose work.

12 hours ago by hhthrowaway1230

Great work, I love node based uis! I'm still looking for an isolated minmal python package that soly does the backend part of these graph node frameworks like comfy, n8n, or node-red. I.e loading json & serialziing, executing nodes. Which also includes the various ways of processing nodes. Like topology sort, node executing queues. If you all know something lmk!

6 hours ago by halfcat

Say more. Are you wanting “Node-RED but for Python”? Or the non-UI parts that are accessible programmatically?

I’ve had similar interests and realized I essentially needed two things:

1. Something like “FastAPI without the HTTP parts”. Basically a request/response cycle with middleware functionality, where we run a registered Python callable in response to a JSON request, but where that JSON request can be from any source, like “pulled from a queue” or read from the command line, instead of “pushed from a web browser”. For that I essentially pieced together a basic task registration decorator class with pydantic’s `validate_call` decorator and let pydantic handle the serialization/deserialization. There are libraries like FastAPI, typer, Celery and others that do this, but they’re all tightly coupled with specific transports. I want to be able to delegate to a developer “build a function that takes this JSON and performs this task and returns JSON”, but not with HTTP (FastAPI), and I don’t want to be required to add Redis to run some small task (Celery), and I do want the task to be callable by CLI (typer), but not only CLI. It seems like there are all of these tools but none of them are loosely coupled enough to do this in a straightforward way.

2. Some way to run a directed acyclic graph (DAG) of those registered tasks. There are lots of tools that do this in varying degrees of heaviness (Airflow, Luigi, Dagster, etc), but for a lightweight solution this is built into Python with graphlib’s TopologicalSorter. But the point here would be, whichever one of these you pick, it helps to have #1 available in a way that allows for generic “running approved Python functions from JSON”.

So I sort of have those parts of it roughed out, but now I’d also like a better UI for it, for instance to allow for a more high level dashboard red/yellow/green status of things, or to enable a less technical user to adjust the schedule of a registered task, and so on. Django’s admin portal is a first step her but ultimately we’d need something more interactive to make it a team effort where more employees can contribute without needing to know Python.

3 hours ago by Towaway69

NodeRED has a very simple json format to describe flows - basically an array of objects with each object describing a node and its connection.

If there were to be a commonality of formats between various node-based programming environments then an interchange between backends and frontends would be possible.

I was thinking of creating a python interpreter for node red flows but stopped at things such as jsonata support and mustache template engine.

NodeRED does make much use of its underlying NodeJS roots.

8 hours ago by Someone

FTA: “For instance, this is all you need to turn numpy.save() into a node:

  from numpy import save

  main_callable = save

  third_party_import_text = 'from numpy import save'
”

So, if you want to turn multiple Numpy methods into nodes, you’ll have to copy-paste-edit this?

Looks unergonomic and slow (repeatedly parsing the Numpy file, once for each node to create) to me.

I would think a single file

  from numpy import save,foo,bar,baz
should be enough to more efficiently generate four versions of the above.

What do I overlook?

6 hours ago by WillAdams

At a guess, the implementation detail/difficulty of making multiple nodes from a single declaration.

5 hours ago by skeledrew

You could use a script to automate creating the modules from import specs.

3 hours ago by skeledrew

A good way to not only eliminate syntax errors (given the minimal typing), but also greatly reduce type errors (although from a glance I don't see mention of type-hint checks to ensure incompatible sockets aren't connectable). It bothers me that I see nothing about async support, nor reusing a graph as a node in another graph (after all, it's all function compositions). Maybe I'll try it, but I don't like to think of the hoops I may have to jump through to work around limitations.

9 hours ago by agumonkey

the customizable node source code is neat

11 hours ago by antman

Very nice! It might be able to run on the browser with pygame-wasm/pybag

14 hours ago by magic_hamster

That's pretty cool. Not something I'd use for serious work, but a fun little toy nonetheless.

Daily Digest

Get a daily email with the the top stories from Hacker News. No spam, unsubscribe at any time.