Skip to content

Releases: jmoenig/Snap

Bordeaux

14 Jul 10:52
Compare
Choose a tag to compare

(nicknamed "Bordeaux", because that's where it was first demoed at RoboEduc16)

  • New Features
    • Retina Display Support, thanks, Bartosz Leper!! Note: This is currently not supported by Safari, and therefore also not available on iOS devices
    • Additional Graphic Effects, thanks, Dylan Servilla!!
    • Interactive Toggle Switches for Boolean Slots and Literals
    • Resizable Palette (double-click on resizers to slide back to normal)
  • New Default Settings (now enabled by default)
    • Keyboard Editing
    • Tables Support
  • Bugfixes (most notable only):
    • reject dropping hat-blocks into block editor scripting areas
    • accept multi-line inputs (e.g. in JS-functions or code-mapping blocks) with shift-enter
    • prevent “make a block” dialog from being closed by pressing “OK” if no label text has been specified
    • show error message balloons happening in other sprites next to their icon in the sprite-corral
    • (again) enable recursive cloning
    • prevent expandable blocks from expanding / collapsing inside the palette
  • Translation updates
    • Italian
    • Swedish
    • Chinese
    • Russian
    • Catalan
    • German

May 9, 2016

09 May 16:40
Compare
Choose a tag to compare
  • Threads: fixed #1212 - Null continuation doesn't escape from calling context.
  • Updated Simplified Chinese translation, thanks to @ubertao! #1209
  • Media import dialog with thumbnails, thanks to @ubertao! #1213

May 4, 2016

04 May 15:13
Compare
Choose a tag to compare

minor maintentance release:

  • cloning speedup
  • new Estonian translation

May 2, 2016

02 May 12:14
Compare
Choose a tag to compare

in depth release notes / documentation attached as pdf below

  • first class sprites, new MY reporter block and extended functionality of TOUCHING
  • fixed switching from list watcher to table view inside sprite speech bubbles
  • fixed paint editor automatic rotation center issue
  • enhanced functionality to SET a sprite’s attributes
  • execute clone initialization scripts’ first step in the same frame as the clone command
  • auto-repair (sorta) certain broken project files
  • Threads: More aggressive emergency yielding
  • “corpsify” deleted sprites, which might still be referred to by variables and lists
  • Blocks: simplify block copying
  • experimental hidden “live-coding support” preference
  • updated penTrails library to shrinkWrap generated costumes

demos from the documentation:
http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=population
http://snap.berkeley.edu/run#present:Username=jens&ProjectName=Woodworm
http://snap.berkeley.edu/run#present:Username=jens&ProjectName=Ferris%20Wheel%202016
http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=PathFollower
http://snap.berkeley.edu/run#present:Username=jens&ProjectName=cartwheel
http://snap.berkeley.edu/run#cloud:Username=jens&ProjectName=rotation

  • new Indonesian translation. Yay!! Thank you, Alexander Liu!!
  • Translation updates: Slovenian, Portuguese, Chinese
  • minor bug fixes

March 16, 2016

16 Mar 12:24
Compare
Choose a tag to compare

in-depth release notes / documentation attached as pdf below

  • linked lists are now automatically saved in the project
  • new "transient variable" feature:
  • transient
  • fixed keyboard editing for uppercase variable names
  • added web-api http block library
  • German translation update

March 11, 2016 v4.0.5-1

12 Mar 03:07
Compare
Choose a tag to compare
  • Fix a couple minor glitches with generic when hat blocks
  • Adds a new pen trails library

[testing releases to be added to the snap site.]

Memphis

24 Feb 14:57
Compare
Choose a tag to compare

download the full release description:
TablesInSnap.pdf

check out the live version:
http://snap.berkeley.edu/run

Exploring 2D Lists as Tables

_Data often comes in the form of tables. Snap’s answer to this is the generalization of lists. Because lists are first-class citizens of Snap, a table can be modeled as a list of lists, each sub-list representing a row, and same-indexed items of every row forming a logical column. Snap! version 4.0.5 introduces an alternative widget for exploring large lists and lists of lists._

The usual widget for exploring a list is Snap’s list watcher. It is modeled after Scratch’s list watcher, providing a user-interface for exploring and directly editing a list. Since lists are first-class in Snap, list-watchers are not restricted to be shown onstage, but also appear inside sprites’ speech bubbles and in result-balloons whenever the user clicks on a reporter in a scripting pane that returns a list:

list

Likewise, lists within lists are usually shown in Snap as exactly that: A list watcher within another list watcher:

list_of_list

New in version 4.0.5 is that lists whose first item is another list are now displayed as tables:

default

The new table view feature needs to be enabled in the settings menu (click on the gear button). Once enabled Snap remembers this preference across sessions. You can disable and re-enable support for tables again anytime.

enabletables

A gridded layout of nested lists was first suggested by my friend and collaborator Brian Harvey back in the days of BYOB 3. Alas, I did not get around to implementing Brian’s original idea until now.

Table widgets are optimized to let users browse through large amounts of data. This is accomplished by simplifying the visual appearance of their components and by scrolling cell-wise as opposed to per-pixel sliding of list watchers. Unlike list watchers table widgets are “view-only” and do not enable direct editing of cells. Instead, tables can be manipulated using Snap’s list blocks. Snap’s Morphic architecture makes sure that any changes applied to the list elsewhere - either by directly editing a list or variable watcher, or through blocks and scripts - are immediately reflected in every table view for that list.

Note:

When Table support is enabled you get an additional choice in the preferences menu, that lets you add higher-contrast lines to table views. By default this setting is off in order to de-emphasize empty cells.

tablelines

Conversely, enabling table lines emphasizes non-existing cells in tables:

tablelinescontrast

Large Lists

Since the new table widgets are more efficient at displaying large lists, Snap now automatically uses them whenever showing lists larger than 100 items, the current threshold for conventional list watchers, at which the user has to manually select another range of 100 items to show in the widget. The new table view is not constrained by this limit and lets the user seamlessly scroll through the whole list.

big list

An example of a list containing 10 million random integers is shown above. Since the list is not 2-dimensional the widget’s value-holding cells are colored in Snap’s list category color and slightly rounded, like cells in list watchers. This emphasizes the single-dimensional list-ness of the structure.

2D Lists

Two-dimensional lists are also automatically shown as tables. An example of a short and simple dictionary is shown here. The background color of the cells is white, same as the list-block’s input slots. This coloring indicates that all cells can be safely accessed by their column and row indices.

2dtable

Examples

Tables are sometimes convenient models for board-game type simulations. This Snap project mimics an aspect of Nicki Case’s and Vi Hart’s “Parable of the Polygons”:

parable

The sprites - or rather clones - on the stage are basically a visualization of the underlying table data structure that is stored in a variable named _grid_ here. It’s fun to watch the table in the result-balloon inside the script editor change in synch with the pattern on the stage as the project is in running auto-solving mode.

An example of a larger table is the result of this _pixels_ reporter that returns a list of pixels, where each pixel is a sub-list containing the RGBA channel values:

pixels

The benefit of the table view modality is that it lets you scroll through all four color channels simultaneously and rather “snappily”. The new table widget being less feature-packed than the full-fledged list watcher pops up instantly once the data has been received, and also is quicker to react to both user input (scrolling) and to modifications applied to the table elsewhere (when running scripts).

You can navigate the table view either through the scroll bars, using the mouse-wheel or the touch-pad, or by dragging the inner value-cells (like dragging Google Maps).

Switching Views

Table views are just another way to inspect and observe a list. You can switch from table view to list watcher and vice-versa using the context menu:

list view list watcher context menu

You can now also inspect every list / table in a separate modeless dialog box outside of the stage, either using the context menu, or by double-clicking on a table view or list watcher:

speech bubble dialog

Within a table view dialog only table views are supported, i.e. of you double-click on a list watcher to open it in a dialog box it always appears as table view.

First-Class Data Types in Tables

Tables can hold any of Snap’s first-class data objects. Currently these are text, numbers, Booleans, lists and rings (lambdafied blocks and scripts), and - experimentally - costumes:

types

Adjusting the Layout

Unlike list watchers the new table widgets don’t automatically adjust cell-sizes to their values’ visualizations. Instead they initially start out with a fixed default cell size for everything. This is one of the trade-offs for supporting views on large data sets.

You can adjust the width of each column individually by dragging the column-label left and right. Holding the shift-key down while dragging any column-label globally changes the widths of all columns. Similarly you can increase or decrease row heights globally by dragging any row label up or down. this way users can explore diverse data:

resize

Table Display Limitations

Another concession to enabling the user to scroll through large tables is only showing 2 data dimensions in a table view at one time. If in item in a table row contains another list, the cell does not offer an interactive, recursive list watcher but only shows the symbol for a list that is also used for list-type input slots in custom blocks. In this example the cell B4 hold a two-item list. It is shown symbolically in the table view:

nested lists

Double clicking on a cell that holds a list opens a dialog box with a (table) view on the embedded list. This way you can explore more-dimensional lists and tables-within-tables

Display of text in table view cells is also limited to a single line of a few words, longer texts will be shown in abbreviated form. However, this only affects the display of text in cells, the actual data in the list is not altered in any way. Querying the item in the actual data structure using Snap’s list blocks always reports the full sized and correctly lined text object.

Blocks for Tables

The big idea behind tables in Snap is that there isn’t any. Tables in Snap are nothing but lists of row-lists. Everything you already know about lists can be applied to tables. It’s fun and very straightforward to build your own blocks for tables:

getter

Note: Table views label rows by number and columns with letters. If you want to quickly find out the ...

Read more

4.0.4

11 Feb 15:22
Compare
Choose a tag to compare
  • Use Blob API to Save Files (to Disk), Thanks, Michael!!
  • Show result bubble when the user clicks on a command script that uses REPORT (You can now click on REPORT and it actually does something)
  • New generic “When” hat block, enhances red stop button behavior
  • New block (instance) variables feature (experimental)
  • evaluator performance optimizations
  • Morphic grab-threshold fix for scroll frames
  • fixed several block rendering glitches
  • List category LENGTH reporter now also works on text
  • Changed “any” to “random” (in English only)
  • new FILL primitive in the Pen category
  • switched to animation frame scheduling, please use TURBO for music
  • Updated German translation
  • Cloud: 10 MB cloud upload limit for media per project
  • Objects, Paint: Automatic Sprite Center Detection, Thanks, Craxic!!
  • Morphic: Handling of diacritics, [Alt] + key in input fields (Windows), Thanks, DaDoro!!
  • NL translation update

4.0.3

15 Dec 08:35
Compare
Choose a tag to compare
  • fixed occasional horizontal rendering artifacts in block “holes”
    (C-shaped slots and Ring holes)
  • improved user editing of input slots and fixed cursor behavior (note:
    the text cursor inside input slots also blinks again, as it should have)
  • always export comments attached to prototype hat blocks in the block
    editor along with script pic
  • when first opening a block editor on a custom block definition make
    it big enough to show everything (as much as fits on the screen)
  • remember block editor position and dimensions for each edited custom
    block definition when acknowledging (pressing OK or APPLY) for the
    session
  • speed up stacking of commands and loading of projects by suppressing
    redundant block redraws
  • introducing a “grab threshold” preference to suppress accidental
    grabbing through micro-movements of the hand. This addresses the
    “cannot-click-on-drop-downs-in-Chrome-under-Windows” set of bug
    reports, and also the issues that arise out of accidentally dragging
    off a copy of a parameter blob when trying to just click on it to
    rename it
  • new hidden (shift-click) option to adjust the grab threshold in the
    settings menu for the current session
  • expand list watchers inside result bubbles and speech/thought
    balloons to show everything (as much of the list’s first level as fist
    into either the scripting area for result bubbles or the stage for
    speech balloons - note resizing the stage affects the size of the list
    watchers inside speech balloons, i.e. making the stage bigger increases
    the number of visible elements even while the balloon is showing)
  • fixed a bug that make an occasional gray rectangle appear at the
    mouse pointer
  • added a way to invoke blocks synchronously in JavaScript - under
    construction (possibly to be used for generic “When” hat blocks and
    user-customizable drop-downs)
  • added methods to cache morphs’ fullImage and fullBounds while dragging
  • Reporters (also nested reporters) and sprite icons (in the corral)
    are now semi-transparent when being dragged, so you can see possible
    drop target halos /through/ them
  • in “prefer empty slot drops” mode (default) it is now much harder to
    drop reporters onto non-static C-slots inside custom blocks (e.g. in
    FOR loops) and onto variadic input arrowheads (to replace the whole
    input with an input list)
  • ScriptsMorphs are now noticing transparent clicks (addresses #997)
  • %interaction slots are now static, fixed #982 (it is no longer
    possible to drop reporters into the input slot of a “When I am…” hat
    block (never was intended that it should be possible)
  • fixed ctrl-f for the block editor in all situations (thanks, Brian,
    for the bug report)
  • new Bulgarian and Romanian translations contributed!
  • fix for IE backspace and tab errors contributed!
  • better resource loading mechanism contributed!

Amsterdam

06 Aug 15:26
Compare
Choose a tag to compare

v4.0.2

  • optimizes performance of the Morphic framework, thanks to @nathan's brilliant engineering

  • introduces prototypal inheritance at the level of sprite-local variables

  • supports editing block scripts using only the keyboard:

    enable "Keyboard Editing" in the settings menu, then
    activate:

    • shift + click on a scripting pane's background
    • shift + click on any block
    • shift + enter in the IDE's edit mode

    stop editing:

    • left-click on scripting pane's background
    • esc

    navigate among scripts:

    • tab: next script
    • backtab (shift + tab): last script

    start editing a new script:

    • shift + enter

    navigate among commands within a script:

    • down arrow: next command
    • up arrow: last command

    navigate among all elements within a script:

    • right arrow: next element (block or input)
    • left arrow: last element

    move the currently edited script (stack of blocks):

    • shift + arrow keys (left, right, up, down)

    editing scripts:

    • backspace:
      • delete currently focused reporter
      • delete command above current insertion mark (blinking)
      • collapse currently focused variadic input by one element
    • enter:
      • edit currently focused input slot
      • expand currently focused variadic input by one element
    • space:
      • activate currently focused input slot's pull-down menu, if any
      • show a menu of reachable variables for the focused input or reporter
    • any other key:
      start searching for insertable matching blocks
    • in menus triggered by this feature:
      • navigate with up / down arrow keys
      • trigger selection with enter
      • cancel menu with esc
    • in the search bar triggered b this feature:
      • keep typing / deleting to narrow and update matches
      • navigate among shown matches with up / down arrow keys
      • insert selected match at the focus' position with enter
      • cancel searching and inserting with esc

    running the currently edited script:
    * shift+ctrl+enter simulates clicking the edited script with the mouse