Content deleted Content added
→Platforms: Morphic.js and morphs mentioned |
No edit summary |
||
(47 intermediate revisions by 28 users not shown) | |||
Line 3:
{{DISPLAYTITLE:Snap''!'' (programming language)}}
{{Infobox programming language
| name = Snap''!''
| logo = [[File:Snap!.
| logo
| paradigm = [[Object-oriented programming|object-oriented]], [[educational programming language|educational]], [[Event-driven programming|event-driven]]
| year = {{start date and age|2011}}
| designer = [[Brian Harvey (lecturer)|Brian Harvey]] and [https://github.com/jmoenig/ Jens Mönig]
| developer = [https://github.com/jmoenig/ Jens Mönig]
| latest release version =
| latest release date = {{Start date and age|
| typing = [[Type system|dynamic]]
| implementations =
| programming language = Morphic.js<ref name="morphic_js">{{cite web |last1=Mönig |first1=Jens |title=morphic.js |url=https://github.com/jmoenig/morphic.js/blob/master/morphic.txt |website=GitHub |accessdate=
| dialects =
| influenced by = [[Scratch (programming language)|Scratch]], [[Scheme (programming language)|Scheme]], [[Logo (programming language)|Logo]], [[Smalltalk]], [[APL (programming language) | APL]]
| influenced = [[Scratch (programming language)|Scratch]], BeetleBlocks, NetsBlox, Dragme IDE, [[Turtlestitch]]
| operating system = [[Cross-platform]]
| license = [[Affero General Public License|AGPL]]
Line 24:
}}
'''Snap''!''''' (formerly Build Your Own Blocks) is a free
==User interface==
[[File:Snap! Default interface.jpg|thumb|left|420px|Three resizable columns, containing five regions, in Snap''!'''s [[Integrated development environment|IDE]] at startup]]▼
In Snap''!'', the screen is organized in three resizable columns containing five regions: the block group selector (top of left column), the blocks palette (left column), the main area (middle column), and the stage area (top of right column) with the sprite selector (also called the sprite corral) showing sprite thumbnails below it.{{#tag:ref|The way pre-2.0 Scratch version's screen was organized.|group=Note}}
Line 42 ⟶ 41:
| bgcolor="#BB42C3"| || Sound || Plays audio files and <br />programmable sequenced audio || bgcolor="#5CB712"| || Operators || Mathematical, text, and<br />Boolean operators; lambda
|- valign="top"
| bgcolor="#0E9A6C"| || Pen || Write, draw, or<br />stamp on stage || bgcolor="#C88330"| || Variables || Variables, lists,<br />including lists of lists, lists of blocks, etc
|}
▲[[File:Snap! Default interface.
Snap''!'''s blocks are divided into eight groups: Motion, Looks, Sound, Pen, Control, Sensing, Operators, and Variables. The layout of these groups in the block group selector is shown in the table below.
The central area can show scripts, costumes/backdrops, or sounds associated with the selected sprite. What that area shows depends on the selected tab.
{{clear}}
==Features==
The most important features that Snap''!'' offers, but Scratch does not, include:
*
*
* ''First class'' sprites (or in other words, [[
* "Hyperblocks": functions whose natural ___domain is scalars (text or numbers), extended to accept lists as inputs and apply the underlying function to the scalars in the list or a sublist
*
*
* [[
==Mascot==
[[File:Snap! mascot, Alonzo.svg|50px|right]]
Alonzo, the mascot of Snap''!'', bears the name of [[Alonzo Church]], the inventor of a model of computation in which a universal function, represented by lambda, can create any function behavior by calling it on itself in various combinations. The mascot is a modified version of Gobo from [[Scratch (programming language)|Scratch]], with permission of the Scratch Team. Because Alonzo Church's work is called [[lambda calculus]], the mascot's hair is shaped as the Greek letter [[lambda]].
==Special-purpose blocks (libraries)==
Line 65 ⟶ 66:
Many other libraries are available, such as the 'list utilities' library, the 'words, sentences' library, the 'iterations' library, the 'animation' library, the 'frequency distribution' library, the 'audio computation' library, the 'bar charts' library, the 'world map' library, the 'colors and crayons' library, the 'strings and multi-line input' library, the 'parallelization' library, etc. for other special purposes.
== Limitations ==
While the software itself has little restraints, it does have some limitations.
These include:
* No native cloud variables
* 10 [[megabyte]] file cap for uploading (Snap''!'' Cloud only)
* Users have to manually enable Javascript when loading a project that uses inline bits of JS, due to a hack a few years ago.
==History==
The web-based Snap''!'' and older desktop-based
==License==
The source code of Snap''!'' is [[Affero General Public License|GNU Affero General Public License]] (AGPL) licensed and is hosted on [[GitHub]].<ref>{{cite web|url=https://github.com/jmoenig/Snap/|title=jmoenig/Snap|website=GitHub|access-date=21 May 2017}}</ref> The earlier, desktop-based 3.x version's code is available under a license that allows modification for only non-commercial uses and can be downloaded from the UC Berkeley website<ref>{{cite web|url=http://snap.berkeley.edu/|title=Snap! (Build Your Own Blocks) 4.0|website=snap.berkeley.edu|access-date=21 May 2017}}</ref> or [[CNET]]'s [[
==Platforms==
Snap! runs on the major web-browsers on [[Microsoft Windows|Windows]], [[iOS]], [[MacOS]] and [[Linux]] devices.
Although Snap''!'' is implemented in JavaScript using an [[HTML5]] Canvas [[application programming interface]] (API) and because of that it runs on the major web-browsers on [[Microsoft Windows|Windows]], [[iOS]], [[OS X]] and [[Linux]] devices, it is actually built on top of ''Morphic.js''<ref name="morphic_js">{{cite web |last1=Mönig |first1=Jens |title=morphic.js |url=https://github.com/jmoenig/morphic.js/blob/master/morphic.txt |website=GitHub |accessdate=7 June 2023}}</ref>, a [[Morphic (software)|Morphic]] GUI, which serves as 'middle layer' between Snap! itself and 'bare' JavaScript. All things visible in Snap''!'' are morphs themselves, i.e. all buttons, sliders, dialog boxes, menus,entry fields, text rendering, blinking cursors etc. are created with morphic.js rather than using HTML DOM elements.▼
Supported web-browsers such as
* Firefox
* Chrome (and most Chromium based browsers.)
* Opera GX
* Microsoft Edge
* Safari
==Implementation==
▲
All things visible in Snap''!'' are morphs themselves, i.e. all buttons, sliders, dialog boxes, menus, entry fields, text rendering, blinking cursors etc. are created with morphic.js rather than using HTML DOM elements. Snap! caches the shapes of [[Sprite (computer graphics)|sprite]]s so the sprite doesn't have to be re-drawn onto a new Canvas element every time the mouse moves over its bounding box. It does not cache blocks, however. Instead it manages the insides of C-shaped blocks through the morphic "holes" mechanism.
All user interaction is triggered by events, which are passed on from the root element "the world" to its submorphs. Dropping a morph causes it to become embedded in a new 'owner' ('parent') morph. In Morphic the preferred way to run an animation is to register it with the World by adding it to the World's animation queue. The World steps each registered animation once per display cycle independently of the Morphic stepping mechanism.
==Recognition==
Snap''!'' has been recognized by the Logo Foundation,<ref>{{cite web|url=http://el.media.mit.edu/logo-foundation/what_is_logo/history.html|title=Logo History|website=el.media.mit.edu|access-date=21 May 2017}}</ref> and reviewed in an online magazine for programmers.<ref>{{cite web|url=http://www.i-programmer.info/news/98-languages/8628-visual-language-snap-version-40-released.html|title=Visual Language Snap! Version 4.0 Released|first = Sue|last=
==Notes==
Line 86 ⟶ 111:
==External links==
* {{Official website|snap.berkeley.edu}}
{{Video game engines |state=collapsed}}
{{DEFAULTSORT:Snap! (Programming Language)}}
Line 96 ⟶ 123:
[[Category:Software developer communities]]
[[Category:Visual programming languages]]
[[Category:Video game IDE]]
|