Scratch language as additional macro language



Dear Community,
I have been playing a bit with the Scratch language some times ago. Eventhough it is mostly though to introduce kids to programing, I realised that it has some high potential for more serious projects that involves non-initiated coders.

As an example, the platform TinkerCad Electronics allows to do some electric circuits simulation including Arduino, and the sketch of the Arduino can be written in this Scratch language.

I also used the offline Scratch editor to allow the user to generate some text file using predefined function blocs.
It is even possible to wrap a Scratch project into an mobile application using the MIT App Inventor for instance !

The Idea

My idea now which is probably a bit futuristic, would be to have a Scratch Editor in Fiji that would allow to write macros in this language.
I agree that complex program are more easily written in a hard-coded language, but I think it could be some intuitive alternative to the macro language for instance.
It is possible to write some extensions for Scratch to have your own Scratch blocs, but then you can only use them in the Scratch Editor.

What I dont know is how to use the scratch language into a stand alone application like Fiji…
But if TinkerCad can do it on a website I guess there are some ways :wink:


Cool idea. Having a visual programming language directly available in Fiji would be awesome. I think it would be unlikely that the original Scratch language would be incorporated. If someone had the capacity to take on this project, then I suspect they would end up re-implementing a Scratch-like language instead of trying to make Scratch and Fiji/ImageJ libraries compatible. That said, KNIME Image Processing is one way to do visual programming with ImageJ/Fiji libraries that already exists, it looks like:


I am using Knime intensively too for image processing but for most Fiji users it is still too overwhelming somehow.
I think some core parts of the scratch language could be reused like the loop structures… and then indeed the big part of the work would be to implement the Fiji functions into some Scratch blocs.