HNHacker News
TopNewBestAskShowJobs

wires

39 karma · joined January 10, 2011

founder statebox.org also typedefs.com
submissionscomments
wires··on Visual Programming Doesn’t Suck
You are right about this, it is exactly what is hard to do! it is possible to do some form of this, where you have well behaved "macros" that create diagrams of particular shape "at runtime" (forall n. the diagram with n copies of n)
wires··on Visual Programming Doesn’t Suck
Valid point, but this is why there is category theory. That is really about the "compositionality of systems", we need that more than diagrams. Just turns out diagrams are a good way to do things with categories
wires··on Visual Programming Doesn’t Suck
I think the conclusion is because one diagrams has many different syntactical expressions, but the theory tells us they all behave the same, so we can just pick the most efficient, most compact, whatever. ie. the diagram is the best representation, not the syntax.

so we can go: diagram -> expression -> code of your choice from expression we can go back to diagram, but code to expression not necessarily.

the problem now is that if the picture is the leading representation, then we need to lift all the tools to the diagram realm, so comments, higher order diagrams, grouping, closures, variables, etc

wires··on Visual Programming Doesn’t Suck
Stay tuned! It is not any kind of design but specific diagrams and for a certain large class of programs we can do it. It might take a while before we've implemented all the needed runtimes, but JS should be release sometime this year
wires··on Visual Programming Doesn’t Suck
I totally agree with you & thanks for that nice GIF! I used LabVIEW a lot and always enjoyed it... so anyway we have keyboard input for the diagrams / blocks, its very important. also a minimum of wires, they are annoying to draw
wires··on Visual Programming Doesn’t Suck
yo totally agree, keyboard input to build the diagrams is mandatory. we are going much more for a text editor feel than some VR-style swipe-a-wire

but once that's working, I'm all for neuralink + VR for "diagram dreaming"

wires··on Visual Programming Doesn’t Suck
there is some pretty solid theory on how to translate between the kind of diagrams statebox uses and digital circuits. In fact we are doing some experiments with direct diagram to wafer (chip) translation using LibreSilicon http://libresilicon.com/ this is certainly not a done thing, but something we'd love to work more on in the future
wires··on Visual Programming Doesn’t Suck
I don't think I agree. We know that there are diagrams that come from category theory that behave very well, this is what statebox uses. It enforces certain constraints, so we pivot everything around this and see if we can recover some form of programming from it.

certain cases are still much better done in text and statebox itself is written in text, so nobody is claiming programming itself should be 100% pictures, but then again, I think it can be done and I think there is merit to it.

after all, text is also some sort of picture; on the screen but also in your head

wires··on Visual Programming Doesn’t Suck
so I started my studies in animation actually, I used a lot of those tools, you can think of statebox as applying category theory to restructure aftereffects or https://en.wikipedia.org/wiki/Shake_(software)

when done right, we claim, you can target many different things ("semantics")

what we claim is something like, the compositional aspect of many such node based systems can be described as a certain type of mathematical object (monoidal category) ~ we can build an editor for that and then map that "dsl" to particular targets (image processing, state machines, etc)

wires··on Visual Programming Doesn’t Suck
ohey. you came to the right place :-)

no wires, composition of boxes, no vi bindings yet, but def. something wanted and what we are going for

I want vi/emacs/spacemacs for diagrams

wires··on Visual Programming Doesn’t Suck
Hi, the ATM is mega simplified, we tried modelling the entire machine and it not easy. But we are quite convinced it is possible, but it demands features from the language that we have not implemented yet tho.

Error handling is not really a problem, in fact, a lot of the time is spend thinking hard about each and every error that can occur and modelling it out ~ making sure the machine behaves well.

Problems are rather about machine synchronisation and how processes communicate (or rather, can we autogenerate proofs about their behaviour under communication).

thanks for the comments

wires··on Visual Programming Doesn’t Suck
check back in a few weeks... we are working hard on the tools and you should be able to try it yourself.

I definitely want a good demo video on the page.

but listen, I get it, I tried literally 50 different such tools, they all suck. Nobody in their sane mind decides to write one if you don't have a good reason. Certainly not in Idris :-)

but we have good reasons:

1) compositional theories of diagrams exists 2) such diagrams can express many "topologically equivalent" expression in the same diagram, this is a huge win! and very different from (AFAIK) all existing node-based editors 3) use cases in decentralised computing require fault-free tools that work like this

but really, I think generally applicable usable 2d-syntax exists...

wires··on Visual Programming Doesn’t Suck
right! statebox tries really hard to strike a balance between these two.

in order to make diagrams _as_ composable as functional code, you need proper theory of diagrams and a "compiler" that checks your diagrams for "type errors"

wires··on Visual Programming Doesn’t Suck
hi tomc1985

> Why does category theory magically transform node diagrams into something usable from something not? Unreal blueprints/Reactor schematics/whatever are quite fine in their current form, even if their usage falls apart in advanced constructions. Is statebox going to magically make huge node-and-graph-designed programs reasonable? Your writeup didn't convince me that "category theory" adds any significant value, and neither does it help inform as to what category theory actually is. How does statebox improve upon existing node-based programming implementations?

nothing magical, just good engineering and UX design and solid theoretical underpinnings.

cat. th. does add value: there are many ways to build diagrams and build syntaxes for diagrams, but they are not all equivalently powerful or general. but it turns out that there are diagrams that _are_ suitable, and this is what we use.

It will improve upon existing diagram tools in that it gives a formal theory of how they work, so you can really build huuge diagrams and still be sure everything works.

I didn't write the blog post, but I could try to write one about the value of category theory, because it is often misunderstood. It is however very abstract and takes the mind a while to see the value off, which is not so easy to convey.

> CS formality and big words misses the point of visual programming entirely, in that it is to simplify the process of software creation to make it more approachable to non-programmers. Unless your UX is absolutely top-notch you are going to lose these novice users as they struggle to deal with the constraints without a good reason to UX to do so.

oh, yeah this is something often misunderstood, we are not trying to target novice developers (yet). we need to develop a lot of stuff and CS formality is right now still the simplest way to understand the system. I mean, we are not trying to be arrogant or puffy or something, but for instance the way we realise our compilation is with "functorial semantics". we have a functor between categories that does the trick. We could call it something else, but it doesn't help (at this stage).

anyway, if we do our job well then all the category theory would be under the hood and you just get a nice UX for coding with diagrams.

> Also- The memetastic design of statebox's main page is a pretty big turnoff :(

opinions differ :) I thought it was quite funny 2 years ago and many people thought so as well and then it got turned into this homepage.

at the moment we don't really have time to spend time on the site, but it will def. be changed in the future

wires··on Visual Programming Doesn’t Suck
100%

this is the point exactly

wires··on Visual Programming Doesn’t Suck
love that blog, great anti-examples, thanks for sharing!

we are really trying to avoid coming to this style of visual programming

write once, read never

wires··on Visual Programming Doesn’t Suck
the tools for reasoning about text can be limited if the text is in a language unsuitable for reasoning

this is why we work in a typed, purely functional setting.

spaghetti is difficult to deal with, for starters, you need "compositionality", so that you get no undefined or emergent behaviour.

then second you need some form of "graphical macros", or a "meta-language" for diagrams, code that generates diagrams or "higher order functions" for diagrams.

wires··on Visual Programming Doesn’t Suck
yep, the diagrams are like typed purely functional programs

also stream processing is possible, we can (at least in theory) use the same diagram to compose state machines or stream processing functions or DB queries or ...

wires··on Visual Programming Doesn’t Suck
and thanks for posting the blog article on HN
wires··on Visual Programming Doesn’t Suck
Awesome stuff right? Pawel is great at explaining things!

It is certainly more complicated in the beginning, partly because it is a paradigm shift, and partly because of the abstract nature. But then again, linear algebra isn't particularly natural when you see it the first time, I'd say..

But graphical linear algebra gives other powerful insights, such as the meaning of division by zero. btw. we use a very similar calculus

wires··on Visual Programming Doesn’t Suck
awesome comments, and we want to get that experience: a sound type-system and model checker that tells you when things go wrong (statebox' rustc)

but add (formalised) graphical scaffolding to glue parts together.

wires··on Visual Programming Doesn’t Suck
:rock:

exactly, every picture represents an "equivalence class" of expressions (or code).

I say equivalence class, because the picture represents many formulas: by topologically distorting the picture you get different code. however, they all behave in the same way. 2+3 = 1+4 = 5

wires··on Visual Programming Doesn’t Suck
Totally! I imagine a web of types and function definitions (as diagrams)
wires··on Visual Programming Doesn’t Suck
:) I also did a lot of Max/MSP and many similar systems, [nord modular](http://nmedit.sourceforge.net/) , and also wrote such tools back then, for audio and 3d and video, which is what led to statebox ultimately.

I would say the spaghetti aspect of max is the main complaint with visual programming.

To modularise it (small diagrams), you need to contain the behaviour of the boxes (ie. typed purely functional code).

And to generalise it (audio, video, microservices, ...) you need to separate the syntax from the semantics.

(took me about 15yrs to figure out a way to do this properly :-)

wires··on Visual Programming Doesn’t Suck
awesome comments, really cool to read all of this.

anyway, I would argue both are valid examples is graphical progamming, but they happen at different levels.

the "node based" tools usually define some sort of function or system, ie. a "type"; for this you need category theory to describe how the diagrams look and this is not what any editor I know does, but it means a whole of difference.

And the map editors are for defining "terms of a type", given a definition of a "map datatype" there is a graphical way to edit it.

when we talk about graphical programming we are initially focussing on the first, well defined graphical protocol definitions. you can think of it as type checked event sourcing, where the "behaviour" or "type" is described by a (sort of) graph representing a (sort of) state machine)

but we have relatively clear idea's to extend this to the second case as well.

The difference with other (older) approaches is that in the last 20 years a lot of mathematics appeared dealing with formal (categorical) diagrams or proof nets, etc. that we leverage. I claim we (the world) now finally really understand how to build visual languages that do no suck.

hence statebox :-)

wires··on Visual Programming Doesn’t Suck
Great points,

> scalability and maintainability > easy for very small examples but it doesn't scale.

this is very true, that is why we do it differently; we clearly define the semantics of our diagrams and take guidance from category theory in this. this is different from other graphical languages; we try to assume the minimum but then guarantee you that some stuff is always preserved.

think of it like deterministic, pure functional programming, but with diagrams.

> usually lacks good mechanisms for abstraction, reuse and hierarchical structure. > f versioning, diffing or merging

very important points, we try to address this by having everything based on immutable, persistent data structures with built in content addressing; similar to git for instance.

diffing and merging is very complicated and still research but there are many hints that this can be done

wires··on Visual Programming Doesn’t Suck
:) valid point! We are not quite ready for HN prime-time, we are still working hard on the tools and will def. show a demo once we are there

but I come pretty much from the same standpoint: that visual programming sucks; but it doesn't have to be, that is what we are trying to demonstrate.

wires··on Visual Programming Doesn’t Suck
Yeah, I feel you, been there myself.

but this is mainly because those BI tools themselves and the graphical languages they use have issues.

when done properly, diagrams can be searched similarly to Haskell's hoogle, Purescript's pursuit, etc... in addition you could specify a template diagram it should match

wires··on Visual Programming Doesn’t Suck
Hi, Statebox founder here :-) awesome to see this on the HN frontpage. Will read your comments and give feedback, meanwhile, feel free to ask me things!
wires··on Alexander Grothendieck has died
His style of thinking seems very categorical, where one does not focus on structure of the objects in question (say prime numbers), rather on the mappings between/from/to them. In fact, from the cat. perspective you need to put extra effort to point out particular objects in your collection (http://ncatlab.org/nlab/show/generalized+element).

Grothendieck certainly knew what it means for p to be prime. I don't know, but maybe his thoughts went along the line of "primes are some substructure of the natural numbers and such and such changes happen in the functions that we can build on them".

So he was obviously able to speak about some collection of primes, yet whether an actual number is prime he probably doesn't think much about.

← PreviousPage 2 of 3Next →