Functioncharts are a new kind of diagram for programs, with the audacious goal of being as expressive as any textual programming languages. It supports creating abstractions, and first-class iteration and recursion. The first version of this diagram is for a Javascript-like language, but it could be adapted for others (WebAssembly?) It was inspired by and borrows ideas from the Statechart formalism.
This editor project started as a specialized drawing tool to allow me to explain the ideas. But I found that trying to build actual programs was the only way to find out what worked and what didn't. The GitHub pages are the documentation for now. The editor is usable but unstable. There is no code generation or iterpreter yet.
https://github.com/billbudge/WebEditorFramework/tree/main/examples/functioncharts
Read the doc first. You can try the editor at this link (warning, it is a buggy prototype)
https://billbudge.github.io/WebEditorFramework/examples/functioncharts/
As a warm-up for this project, I also developed a Statechart editor.
https://github.com/billbudge/WebEditorFramework/tree/main/examples/statechartshttps://billbudge.github.io/WebEditorFramework/examples/statecharts/
m
Marek Rogalski
02/20/2025, 10:15 AM
Cool stuff! I've played with it a little here https://www.youtube.com/live/qnx84Bfwj34?si=PFgdCItxMkrXlKxq&t=2619 (treat it as a sort of mini UX study). The computational layer, despite not being finished, seems really solid. I'm not going to comment on the stuff that's not finished - it's obviously WIP. It tackles the problems that usually are missed in node & wire environments - like external references (they're necessary for closures!) or non-value arguments (they're necessary for generic code!). The part that I like the most is that the UI layer is a blank slate. I mean there are no visual conventions established for basically anything so there is potential to make it really nice environment - colors are not used, shapes are used only minimally, chrome is minimal HTML. This could be turned into really just about anything.
b
Bill Budge
02/20/2025, 4:18 PM
I really like your video. I have to learn to do that! I put the "exponentiation by squaring" example at the top as a "teaser" before jumping into a tutorial, but maybe a simpler example here would be better. I'm glad you were able to figure it out.
Bill Budge
03/08/2025, 2:03 PM
Marek, it was great seeing you try to implement 'factorial' and 'fibonacci'. You found so many UX issues that I need to solve. (I have been working on this a long time and after a while one becomes blind to these things.) I think a little movie in the documentation would be very helpful - it would have saved you some time.