Waterbear

tags: sketchdance

What are next steps in the resurrection of Waterbear?

Waterbear is a visual language, ideally supported underneath by a simple text language (Moonshine)Moonshine

Goals

Among the goals of this rewrite are:

  • Bring back the toolkit nature of Waterbear, allowing people to easily create their own block-based languages with it.
  • Make the UI more powerful, allowing customizations and support for tutorials and walkthroughs
  • Allow demi-modes between text and blocks, to type in equations, for instance.
  • Allow blocks to wrap native code (in whatever language is native)
  • Improved embedding, allowing Waterbear scripts to be embedded in any web page
  • Vastly improved text output producing scripts which can dropped into a browser and run without further work
  • Round-trip from script mode using the Moonshine language, a text-based programming language designed to map well to blocks
  • Improve undo/redo, copy/paste and other infrastructure
  • Compile to JS for speed or run block-by block for debugging
  • Collaborative: invite others to contribute to your Waterbear projects
  • Block-level support for testing
  • Many, many more example programs and tutorials

Reasons for existing (vs. using Blockly)

  • Textish mode: Switch view of block(s) so editing is closer to text but still constrained
  • More textish mode: specific areas like editing formulas
  • Zooming: Open a block to see/modify it's implementation
  • Substitute: Replace block in-place with block matching signature
  • Moonshine: Evolving together, so there is a text-based language which maps cleanly to and from blocks
  • Nesting: Leverage the DOM for lightweight implementation, speed, and easier debugging
  • Goal: Not just a block language, but an environment for easing between blocks and text

Programming for the Fun of It

Notes for potential book, grant application(s), course syllabus, etc.

  • Waterbear - the official Moonshine IDE incorporating blocks
  • Bootleg - experimental OS
  • Tardigrade - the block toolkit
  • Moss Piglet - the IDE toolkit
  • Moonshine - language that maps cleanly to and from blocks
  • Alley - server component to break scripts out of the browser (for Arduino, shell scripts, Minecraft, etc.)
  • Xastle - social media layer
  • Moat - secure anonymous file transfer
  • SketchDance Suite - web site combining Waterbear with other tools

Next Steps

  • Make tabs/sockets nicer
  • Minimal version of Moonshine to support current blocks
  • Show text (Moonshine) and make round-trippable
  • Allow blocks that make new blocks
  • Move literal arrays out of main script and into form popups
  • Import libs, get new blocks
  • Reconfigurable UI
  • GUI for tweaking values (dragging)
  • Moonshine -> non JS as demo
  • Zooming
  • Duplicate some missing Scratch blocks?
  • More scratch-like
  • Built-in tree shaking for exporting single file
  • Documentation of what each module is for, why they exist the way they do, how to add a feature, tips to finding/fixing bugs,

Pre-history of Waterbear

  • Scratch
  • Logo
  • Kutia
  • Dandelion

Programming for Artists

Other

  • A toolkit for languages
  • A universal language
  • Translating code into blocks
  • Higher-level blocks, forms, graphs

What makes a Waterbear block?

  • Signature
    • Namespace
    • Name
    • Types/Arguments
    • Type/return value
  • Block type
  • Arguments / Defaults
  • Visible strings for localization
  • Open/closed state (local, not persisted)
  • Template (?)
  • Breakpoint (local, not persisted)
  • Canonical URL
  • Version
  • Author/history

Open Question: Is it more practical to build a different block language to support a different output language (i.e.: Java, C, Python) or to use Moonshine for the blocks but have a way to compile Moonshine to each output language. Ugh, is that what Blockly is doing with LISP? Oh, apparently Blockly doesn't do that anymore, it is implemented entirely with Javascript, blocks can be defined in either JS or JSON, and it can output a number of other languages, blocks are SVG elements and it has been localized. Is there even a reason for creating Waterbear anymore?

A: Yes, Waterbear is still useful. I want to be able to switch a single (or a selected set) block into text-ish mode, where editing is closer to text but still constrained. Also, for specific areas like editing formulas there may even be a "more textish" mode. Blockly doens't implement this, or zooming, or other techniques I want to use to bridge the gaps between blocks and text. For instance, bridging between separate blocks and drop-down functions (like the Math blocks in Scratch) by allowing blocks to be substituted in place if their signatures match (from a context menu).

Ideally, Waterbear (when combined with Moonshine), won't be just a block language, but an environment for easing the transition between blocks and text.

Inspiration

  • Stop Writing Dead Programs Erlang at 15:33: Actor model, shared-nothing state, supervisor trees. Kill anything any time. Introspection tools