I want to make a list of open source programming l...
# thinking-together
d
I want to make a list of open source programming languages with a projectional editor, that supports mixed text and graphical notation. Not node and wire syntax like Pure Data. Instead, code is organized in a syntax tree where tree nodes can either have a conventional text syntax, or use graphical notation. Please reply if you know a project like this, and post a link.
👍 2
3
hazel.org is a text based language with a projectional editor. There is a branch of the github repo called "livelits" which supports embedded graphical notations. The UI is written in Reason and runs in a web browser.
https://www.jetbrains.com/mps/ is a Java framework for building languages with projectional editors. mbeddr.com/ is a C-like language built on the MPS framework.
i
Is this even close to what you have in mind? https://github.com/nicolas-p/skov
w
This fits the bill: structural editor, stored on disk as conventional code: http://strlen.com/restructor/
is also "mixed" in the sense that you can edit a subexpression as text before it gets converted back into a tree
d
Let me explain what I want. My Curv programming language is a DSL for making graphical objects. Currently, Curv is a purely text based language. I would like to extend Curv so that subexpressions can have graphical syntax. A colour literal should display a colour swatch, and be editable using a colour picker. An image literal should display the actual image. I should be able to paste an image into source code from the clipboard. I need the ability to extend the syntax with new graphical notations. How does the UI work? How do I implement this? It would be good to look at existing projects that have solved the problem.
👍 1
@Ivan Reese Scov has a purely text based syntax, but I can see how you would extend it to support subexpressions with graphical syntax.
g
fructure and isomorf both fit the bill i think
a
I don't know of any good implementations of this in the wild, but you're basically describing my current hobby project. To add to your list of example use cases - an equation editor would be interesting. Instead of having operators (+, -, /, etc) in the base language, you could have a dedicated equation editor that looks more like a wysiwig latex.
@Doug Moen If you're ever looking for someone to bounce implementation ideas off of, I'm always interested in this sort of editor in particular.
d
@Aleks That's great. I'd love to chat in more detail. Are the design goals for your project online yet? Or any code? mbeddr.com has a wysiwyg equation editor plugin already. It seems like the most mature of the projects I've looked at so far.
a
No and no 😞. I wrote roughly 30 pages exploring visual programming and describing the project... and then discovered this community. Looking back at it, it reads like somebody trying to map an alien landscape only to discover the landscape is both inhabited and well mapped. I should really go back and turn the project outline bits into a blog post. There's also no code online yet. I want to have a working compiler and editor before I publish a first draft. So far, I've got an on-disk format and a read-only visualizer. I'll be working on a little interpreter for the next few weeks, then I'm going to go back and make the visualizer interactive. Its very much a 'when I have free time' sort of project.
y
> I would like to extend Curv so that subexpressions can have graphical syntax. A colour literal should display a colour swatch, and be editable using a colour picker. An image literal should display the actual image. @Doug Moen Sounds similar to Barista: https://dl.acm.org/doi/pdf/10.1145/1124772.1124831 I've seen the general idea implemented in other places, but can't quite find them atm... will post again if they show up.