Page MenuHomePhabricator

Add support for a Blockly graphical language such as Scratch or Snap! to Wikifunctions
Open, Needs TriagePublic

Description

It would be great to support a graphical programming language such as Scratch, Snap, or something homegrown based on Blockly within Wikifunctions.

This task is to explore this space and figure out how this could work. Feel free to add ideas below. There are many different options:

  • Composition could be done with a custom-made interface, eg based on Blockly
  • We might allow for Programming in Python or JavaScript using Blockly or Snap as a shim

etc.

Scratch: https://scratch.mit.edu/
Snap!: https://snap.berkeley.edu/
Blockly: https://developers.google.com/blockly

Event Timeline

Is this better merged into T298633 as a general graphical-programming-language support task?

I'd like to be involved in this investigation.

See, for example:

Scratch and eToys are good models to use, FWIW, but I've got a personal lean toward things with 1:1 mappings w/ (a subset of) JavaScript (like the turtlescript example above). Note that I'd almost certainly use Blockly as the UX layer for turtlescript if I were building it in 2021, instead of hand-rolling my own UX.

(a perhaps non-obvious anecdote is that localization is/was a big issue w/ block-based representations. some languages have wildly varying string lengths to describe certain programming concepts, and some of these stretch the graphical layout of a 'block'. eToys and Scratch made it work, but the localization effort was more involved than "merely" translation.)

aliu renamed this task from Add support for a graphical language such as Scratch or Snap! to Wikifunctions to Add support for a Blockly graphical language such as Scratch or Snap! to Wikifunctions.Dec 2 2023, 2:02 AM
aliu subscribed.

I wrote an experimental script to convert blocks from the Visual Programming languages Snap! and Scratch into source code based on a Mapping in a CSV-File. You can find the source code here. It is experimental and I am interested and try to extend the functionality of it. For example adding support for nested functions and also a reverse block create script. So you have source code as Input and get Blocks in a visual programming language as output.