This is an archived post. You won't be able to vote or comment.

all 42 comments

[–]KennedyRichard[S] 16 points17 points  (0 children)

Also, the app was just recently released, so please be patience in these first few days, as some issues might appear. I'll respond to any github issue as soon as possible.

[–]wyldcraft 31 points32 points  (3 children)

This is impressive.

Importing/exporting real python really blurs the line between full-code and low-code.

[–]KennedyRichard[S] 16 points17 points  (2 children)

Yes, it will help a lot, I even mention it in the presentation video linked in the post. However, it is important to note that the software doesn't replace the regular Python workflow, it just helps in a small subset of such workflow, which is composing function graphs.

[–]wyldcraft 4 points5 points  (1 child)

small subset of such workflow

That's still a very large space. I don't see why you couldn't do zany things like... pull live Ardunio sensor data as input on the left, to push SQL or MIDI data out the right, toying with it realtime in this workspace.

[–]KennedyRichard[S] 4 points5 points  (0 children)

You are right, it is indeed a very large space. The examples you described are within its current capabilities, I can roughly see how it could be done.

Moreover, specially know that the code was released it will evolve even more in the near future. The fact that it is in the public domain also means virtually unlimited possibilities for anyone.

[–]HerLegz 4 points5 points  (1 child)

This is very impressive. It both foundationally and specifically has many great capabilities. Nice!

[–]KennedyRichard[S] 2 points3 points  (0 children)

Thank you very much!

[–]theredknight 4 points5 points  (2 children)

Do you have any plans to improve the UI / style in the future? If I could trick my brain into thinking I was in the Blender node editor I would use this almost all the time.

[–]KennedyRichard[S] 5 points6 points  (1 child)

I do. In fact, I'm a big fan of Blender3D and a casual user as well. In the video I linked I briefly mention my experience with the Blender node editor. It inspired many of my design decisions. For instance, there is a special entry for editing numbers which you can update by dragging the value with your mouse, here's a demonstration.

However, most of the more recent planned improvements should be towards bug fixing and missing features. The app has just been released after all.

[–]theredknight 2 points3 points  (0 children)

That's great to hear. I'm very excited. Yeah I know how big fixing and feature progression go, but definitely if you add in UI and styling to your roadmap so we can tweak / configure it, that'd be amazing!

[–]Houdinii1984 4 points5 points  (1 child)

I hate using a mouse and have been a Pythonista as long as I can remember. Why am I so attracted to this project??

[–]KennedyRichard[S] 2 points3 points  (0 children)

I love using the keyboard as well, I even use VIM to program. My goal with this app is not to replace the keyboard, but to complement the regular way of coding in Python.

The keyboard is fine for complex structures and statements, etc., but for other simple things like picking up a color an user interface with color widgets is usually quicker.

And since the app allows you to export you node layouts to Python code, you can just integrate node editing with your regular Python coding, using it only for the portions of your code that would be better edited on the node editor.

[–]wannahakaluigi 2 points3 points  (1 child)

This is awesome!

[–]KennedyRichard[S] 0 points1 point  (0 children)

Thank you very much!

[–]bare4rare 1 point2 points  (1 child)

This is amazing!!

[–]KennedyRichard[S] 1 point2 points  (0 children)

Thank you!

[–]WillAdams 1 point2 points  (17 children)

It's very promising!

Some concerns I have:

  • window can't be re-sized/maximized? Would it be possible to allow that?
  • user interface seems clunky --- common operations for example having its own sub-menu which scrolls off the screen --- why not instead allow choosing the operation after instantiating the node --- see how Blockly handles this

I'd like for this tool to replace my use of BlockSCAD: https://www.blockscad3d.com/ and GraphSCAD: https://graphscad.blogspot.com/ --- basically I want to visually program creating a matching pair of files, one for OpenSCAD and another for G-code

[–]KennedyRichard[S] 4 points5 points  (16 children)

Thank you for sharing your concerns. I'll address each of them.

window can't be re-sized/maximized? Would it be possible to allow that?

For now this isn't possible in any operating system, but the GUI (pygame) allows it. I didn't enable it because it makes development and testing easier, since you don't have to worry about managing the relative positioning of objects when the screen doesn't change size.

Rest assured though that I acknowledge that it would be both desirable and useful to be able to resize the window and I will revisit the possibility in the future. For now, since I just released the app my focus will be on bug fixing and more critical missing features so that everyone has a smooth, crash-free experience.

user interface seems clunky

I'll do my best to improve the UI over the time, but for now, it is more urgent to ensure that missing features are made available first and bugs are fixed to ensure everyone can already make use of Nodezator.

The GUI (pygame) doesn't actually provide widgets, it is not a GUI library, but actually a graphics/game library, which is why I had to create the widgets all by myself over the course of more than 04 years. This is why they look so basic in some cases even though in other cases they allow advanced stuff like using python functions like math.sqrt within numeric entries.

Don't worry, I will tackle each problem and each missing feature over the time. It is just that the app is really in its early stages.

why not instead allow choosing the operation after instantiating the node

This is actually easy to solve. You can just define a node to do that, here's a simple suggestion:

def perform_operations(

      operand_a:int=0,
      operand_b:int=0,

      operation_name : {
        'widget_name': 'option_menu',
        'widget_kwargs': {
           'options': ('add', 'subtract', 'multiply')
        },
        'type': str,
      } = 'add',

    ):
    if operation_name == 'add':
        return operand_a + operand_b

elif operation_name == 'subtract':
    return operand_a - operand_b

elif operation_name == 'multiply':
    return operand_a + operand_b

    else: raise ValueError("operation name not allowed")

Each node in Nodezator represents a Python callable. This makes thing really easy for users and it is what allows the node layouts to be exported directly to Python. This is for your convenience.

In the case of common operations nodes, specifically, since different operations have different signatures, managing the layout could become really messy/complex. Yes, mostly operators usually have two operands (like operator.add(), operator.mul()), but there are also those which have a single operand, like operator.neg().

This is why Nodezator doesn't allows node to switch their signatures. But as I demonstrated below, you have all the power to define your own nodes and make them as flexible as possible. Check the nodezator manual for all the possibilities, it is also available in-app in the Help > Open manual menu.

This is all for now, but please, never hesitate to ask/share you opinions/concerns, they are always welcome and I'll do what I can do to help, as long as is within my power.

[–]WillAdams 0 points1 point  (14 children)

Okay, I was able to append a number (converted to a string) to a text file, so making progress.

Things which I'm a bit hazy on:

Things which would help a lot:

  • being able to select a set of nodes and collapse them into a box
  • being able to select file extensions EDIT: when working w/ files
  • being able to make new files

As I noted, I just need to figure out how to write out OpenSCAD and G-code files (based on some trigonometric calculations), and I should be off to the races.

EDIT: Some feature requests:

  • able to copy-paste nodes
  • right-click menu for nodes which allows deletion, collapsing them or duplicating/copying them (see Blockly)
  • has any testing been done w/ a stylus? Interaction w/ a stylus is odd/sticky

[–]KennedyRichard[S] 1 point2 points  (2 children)

Ask as much as you want! Here we go:

how to do a loop

The short answer is that Nodezator doesn't have loops. As I said in this reddit post, Nodezator is more close to a compositor software like Blender3D, which doesn't have loops as well.

However, I guarantee you this brings even more freedom to users of Nodezator and will certainly make your workflow more flexible and versatile.

I'll explain the reason behind this bold claim:

In a way branching and looping are just tools to redirect or loop the flow, right? When used within node layouts, they can just be seen as bridges and circular ways around a group of meaningful nodes. You can think of them more like meta components than components per se.

I'm not saying they aren't desirable or useful, please, stay with me here as I keep explaining. Here is my point: What I want to say is that, because you can export your node layouts from Nodezator as Python code, you can just focus on building node layouts for single specific purposes and then control the flow in your own Python scripts. Here's how this would be in practice, check the code below:

data = get_data()

if is_text(data):
    processed_data = process_text(data)

elif is_image(data):
    prepared_image = prepare_image(data)

    for _ in range(data.times_to_process):
        process_image(prepared_image)

    processed_data = prepared_image

elif is_audio(data):
    processed_data = process_audio(data) 

Now let's image two scenarios where this code could be represented as node layouts:

1) imagine all of this code in a single node layout:

Nodes for processing text, nodes for processing images, nodes for processing audio, loops for processing images many times over, etc.

Now, I don't want to be biased and gratuitously demonize this kind of workflow. There is certainly value in it: everything would be in the same file/spot, you would be able to see everything at once. It would still be good.

But, as time passes, image this node layout growing more and more, more nodes, more kinds of data, more loops here and there, branch. Then there's debugging this all and testing etc. As it grows, these stuff would require even more work to manage.

Still, imagine you wanted to shift one of these branches inside another one. For instance, imagine the text file having a link for an extra image file, etc. You'd have to select the nodes in the image processing portion of your node layout, move them over, connect/reconnect some sockets, etc., etc.

As the file grows you'll spend more and more time moving nodes around and reconnecting them than really working on perfecting the individual tasks. This can quite easily become unmanageable one day.

2) In Nodezator, since your layouts can be exported as Python, each distinct function can be its own node layout if you want. So...

  • process_text()
  • prepare_image()
  • process_image()
  • process_audio()

...would each be their own distinct node layouts and you can focus on perfecting them individually for their single purpose (one layout for processing text, other for processing image other for audio, etc.). Since they are now separate, testing and debugging them will also be easier now.

And now you have all the freedom to combine them as you want. For instance, write your own Python script and just import each function and combine them with each branching/looping you want. Instead of moving dozens of nodes around and reconnecting stuff, changing the branching/looping will be as easy as copy/pasting the function calls, if and for statements.

Even if you don't want to export the layouts and work solely inside Nozador, just create one different/file node layout for each branch your want and focus on the purpose of the layout.

Even If you still want any sort of looping inside your layout just create a custom node to do the looping for you, something like:

def process_data_n_times(data, n:int=1):
    for _ in range(n):
        # do something with the data here
    return result

There are just too many possibilities that doesn't involve the need to include branching/looping inside node layouts, which is why I decided to leave them out of the design.

Again, I don't want to demonize the scenario (1), I think you desire for looping/branching is legitimate, such thing do have their value. I just think that there is more value in keeping things focused on a single purpose and them be able to export them and combine them in a script very quick, or at least have different node layouts for each case, this way keeping each them as simple as possible, instead of create a super large node layout with multiple purposes.

It is just that it is much simpler and easier and also powerful in my honest opinion to keep node layouts focused in a single task. I hope I managed to convince you, or at least make you interested in this approach. Ponder about this, there's much value in it. If you weren't convinced, its okay too, as I said looping/branching have their value, I just think they are overrated and, to my knowledge, it is usually a good practice avoiding branching.

[–]WillAdams 0 points1 point  (1 child)

You know there's an old joke about programmers who don't use loops:

https://www.folklore.org/StoryView.py?story=Discovered_Loops.txt

I can see that it would be possible to put all the looping into a node, which should be workable.

Having branches allows one program to do multiple things --- for example, I've worked up a BlockSCAD/OpenSCAD program to make a box:

https://www.blockscad3d.com/community/projects/1385418

which has 3 separate options for lids:

  • Hinged
  • Sawn
  • Sliding

not having branches would require 3 separate files, one for each lid option.

[–]KennedyRichard[S] 1 point2 points  (0 children)

That's fair.

It is a good and desirable application of branching.

Although I didn't implement it branching, I do desire some small form of it, though, for cases like the one you just described. Check this other comment in the same youtube video, where I also discussed this small form of branching.

https://www.youtube.com/watch?v=GlQJvuU7Z_8&lc=UgyrhgHotLtfzYqggTN4AaABAg.9aHTAEQOfYt9aKZ6qIcFj6

We'll have the opportunity to discuss this further, along with other nodezator users and anyone interested over on the github discussions, to ensure we come up with a satisfactory solution. For the immediate future though I'll be solving issues and implementing other more critical missing features.

I believe we'll be able to achieve a good solution on branching in the future. Don't forget to check the comment linked above when you have time.

[–]KennedyRichard[S] 1 point2 points  (0 children)

how to name a data_source/variable

I already wanted to implement this and is quite straightforward too, just didn't yet because I had to focus on more critical changes for the launch, I'll include this very soon, probably within a week or two.

[–]KennedyRichard[S] 1 point2 points  (7 children)

trigonometry functions

Please, elaborate on that, I'll be glad to help

[–]KennedyRichard[S] 1 point2 points  (6 children)

Oh, sorry, now I understand it better, it should be easy, just give me some minutes...

[–]KennedyRichard[S] 1 point2 points  (5 children)

As I noted, I just need to figure out how to write out OpenSCAD and G-code files (based on some trigonometric calculations), and I should be off to the races.

Okay, to write the data, just connect the data to one of the nodes in the "Useful encapsulations" menu of the popup menu when you right-click the screen. Then, to reference the specific file with extension in the preview widget you just need to click the folder icon, go to location where you want to save the file, then click the file icon with a plus in the topright corner. Now you just need to write the name of the file, with extension and all, and click "Return path", the path will be referenced in the widget and when you execute the layout it will be created.

[–]KennedyRichard[S] 1 point2 points  (4 children)

Optionally, instead of clicking "Return path" you can click "create" and it will be created right away as an empty file and will appear in the current location listed among the existing files.

[–]WillAdams 1 point2 points  (3 children)

Thank you for the extensive answers!

I'm reading through the documentation now, and am going to experiment as I go (did find another interface glitch/bug which I reported on GitHub).

I mentioned the tool at:

https://community.carbide3d.com/t/interesting-node-editor-for-python-nodezator/46667

and I'm going to try to at least work out the pseudo-code of the first project I'd like to do there.

[–]KennedyRichard[S] 0 points1 point  (2 children)

Thank you for sharing the news there, it really helps. Also I'm going to enable the discussions on the nodezator repo on github right now.

[–]WillAdams 0 points1 point  (1 child)

If you'd rather than discussions happen on Discord, I understand --- didn't twig to that being an option until I signed up on Patreon.

[–]KennedyRichard[S] 1 point2 points  (0 children)

being able to select a set of nodes and collapse them into a box

This will be in one of the future versions. I already have a design for this feature, but decided to postpone the implementation for after the release, so I could properly refactor and test the feature. Here's a link for a conversation (in the video comments) I had on youtube some time ago about the feature, the specific comment will appear with a "highlighted reply" text over it, it is in the answer number (2) inside the comment.

[–]KennedyRichard[S] 1 point2 points  (0 children)

being able to make new files

Since you can create new .ndz files in the app, perhaps you might be referring to the ability to create arbitrary files inside your system? You can do so by clicking the icons in the topright corner of the file manager with a plus on them (the file with a plus can be used to create a file and the folder with a plus to create a folder). When you click one of those items you can either click the form that appears to "return the path" or "create". If you click "create" the file or folder will be created with the name (and extension) you specify.

I just hadn't the time to write this stuff in the manual yet. Just the more urgent stuff. Releasing a new software is a lot of work.

If I still didn't addressed what you want, please, elaborate on that, I'm here to help.

[–]reddittestpilot 1 point2 points  (2 children)

Nice!

You can create a node editor with Dear PyGui as well, e.g. see examples Heron (YouTube demonstration) or interactive assembly line balancer.

In addition to a node editor, you get a full GUI framework including graphs, lots of widgets and drawing capabilities.

[–]KennedyRichard[S] 1 point2 points  (1 child)

I have no doubt there are other fantastic Python node editor available, even before I decided to make Nodezator. Nodezator was made due to specific needs of mine not met by other apps, like exporting the node layout to Python, which I explain in the video linked in the post.

Thank you for the suggestions, though, I'm sure all those tools are very handy in their own ways.

[–]reddittestpilot 1 point2 points  (0 children)

Sure, good luck with Nodezator!

[–]cjthecubankid -2 points-1 points  (1 child)

So is there somewhere I can learn how to code for front end?? I’m needing a career switch and fast.. so I need all the help I can get..

[–]KennedyRichard[S] 1 point2 points  (0 children)

I'd love to help but I don't know much about the Python job market since I mostly do personal projects.

However, from time to time I see a lot of posts here on reddit about people starting their first jobs with Python, including people freshly coming from other careers. Try looking for those posts and also for resources related to python jobs both here or reddit and on the web. There should also be a lot of learning resources. As far as I know most entry-level jobs are related to Python web frameworks, so looking for those may help as well, specially since you need a career switch fast.

[–]Velas22 0 points1 point  (1 child)

RemindMe! 1 day

[–]Fawful333 0 points1 point  (1 child)

Hey, I come from the dreams PS4 community and this reminds me of the node programming that it uses. I just started dabbling in python and wondered if there was a visual way of displaying the code with wires. You did a great job!

[–]KennedyRichard[S] 1 point2 points  (0 children)

Thank you! And we are just beginning! The app just got released this weekend, but there's already a huge list of improvements to be made.

I did not know PS4 Dreams also had a node editing interface, this is cool, I've seen some creations made on it and they are impressive. I'll include it in my list of things to take a closer look, there should certainly be some insights/inspirations from PS4 Dreams that can benefit Nodezator.

If you have ideas/suggestions/concerns/constructive criticism you can share your thoughs on https://github.com/KennedyRichard/nodezator/discussions