Snap! (programming language): Difference between revisions

Content deleted Content added
External links: Category:Video game IDE
No edit summary
 
(29 intermediate revisions by 20 users not shown)
Line 3:
{{DISPLAYTITLE:Snap''!'' (programming language)}}
{{Infobox programming language
| name = Snap''!'' {{#tag:ref|The software's version is 9.0.1.|group=Note}}
| logo = [[File:Snap!.svg|200px]]
| logo size = 90PX
| logo caption = 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 = 910.07.12
| latest release date = {{Start date and age|20232025|75|185}} <ref>{{cite web|url=https://github.com/jmoenig/Snap/releases|title=jmoenig/Snap|website=GitHub|access-date=JulyMay 185, 20232025}}</ref>
| 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=7 June 2023}}</ref> (written in [[JavaScript]]); {{#tag:ref|BYOB was written in [[Squeak]].|group=Note}}
| 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 25 ⟶ 24:
}}
 
'''Snap''!''''' (formerly Build Your Own Blocks) is a free block-based [[List of educational programming languages|educational]] graphical programming language and online community. Snap allowingallows students to explore, create, and remix interactive animations, games, stories, and more, while learning about mathematical and computational ideas. While inspired by [[Scratch (programming language)|Scratch]], Snap''!'' has many advanced features. The Snap''!'' editor, and programs created in it, are [[web application]]s that run in the browser (like [[Scratch (programming language)|Scratch 3]]) without requiring [[Installation (computer programs)|installation]].{{#tag:ref|BYOB, Snap''!''{{'}}s predecessor, was a modification of Scratch and could export projects as [[Portable Executable|Windows executables]].|group=Note}} It is 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, written by Jens Mönig as 'middle layer' between Snap! itself and 'bare' JavaScript.
 
==User interface==
Line 42 ⟶ 41:
| bgcolor="#BB42C3"| &nbsp; || Sound || Plays audio files and <br />programmable sequenced audio || bgcolor="#5CB712"| &nbsp; || Operators || Mathematical, text, and<br />Boolean operators; lambda
|- valign="top"
| bgcolor="#0E9A6C"| &nbsp; || Pen || Write, draw, or<br />stamp on stage || bgcolor="#C88330"| &nbsp; || Variables || Variables, lists,<br />including lists of lists, lists of blocks, etc
|}
[[File:Snap! Default interface.png|thumb|left|420px|''Three resizable columns, containing five regions, in Snap!'s [[Integrated development environment|IDE]] at startup'']]
Line 48 ⟶ 47:
 
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:
* Expressions using anonymous functions, represented by a block inside a gray ring, having one or more empty slot(s)/argument(s) that are filled by a "higher order function" (the one that is calling the anonymous one). (Their computer-science theoretical basis is [[first class function]]s, which in turn have [[lambda calculus]] as their even more abstract and mathematical foundation)
* Lists that are [[First class object|first class]] (including ''lists of lists/arrays'')
* ''First class'' sprites (or in other words, [[Prototype-based programming|prototype-oriented instance-based classless object programming]])
* "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
* Nestable sprites
Line 60 ⟶ 59:
 
==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]].{{#tag:ref|There's no picture here because the developers of Snap''!'' got informal permission from the Scratch Team to use this modified Gobo, but they didn't agree to allow any use, even commercial, by anyone, and that's the requirement for uploading a picture to Wikimedia.|group=Note}}
 
==Special-purpose blocks (libraries)==
Line 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 [https://snap.berkeley.edu/old_site/old-byob.html BYOB] have beenwere both developed by Jens Mönig for [[Microsoft Windows|Windows]], [[OS X]] and [[Linux]]<ref>{{cite web|url=http://scratch.mit.edu/users/Jens|title=Scratch - Imagine, Program, Share|website=scratch.mit.edu|access-date=21 May 2017}}</ref> with design ideas and documentation provided by [[Brian Harvey (lecturer)|Brian Harvey]]<ref>{{cite web|url=https://people.eecs.berkeley.edu/~bh/|title=HomePage for Brian Harvey (bh@cs.Berkeley.EDU)|website=people.eecs.berkeley.edu/~bh/|access-date=19 January 2019}}</ref> from [[University of California, Berkeley]] and have been used to teach "The Beauty and Joy of Computing" introductory course in [[computer science]] (CS) for non-CS-major students.<ref>{{cite web|url=http://inst.eecs.berkeley.edu/~cs10/fa11/|title=UC Berkeley EECS - CS10 : The Beauty and Joy of Computing - Fall 2011|website=inst.eecs.berkeley.edu|access-date=21 May 2017}}</ref> Jens was a member of the [https://scratch.mit.edu/info/credits/ Scratch Team] before creating ''Snap!''.<ref>{{cite web |url=https://forum.snap.berkeley.edu/t/relationship-with-the-scratch-team/1277/2 |title=Relationship With the Scratch Team - Politics - Snap! Forums |website=forum.snap.berkeley.edu |url-status=dead |archive-url=https://web.archive.org/web/20200102174250/https://forum.snap.berkeley.edu/t/relationship-with-the-scratch-team/1277/2 |archive-date=2020-01-02}}</ref> BYOB is still available for downloading.
 
==License==
Line 74 ⟶ 83:
 
==Platforms==
ItSnap! runs on the major web-browsers on [[Microsoft Windows|Windows]], [[iOS]], [[OS XMacOS]] and [[Linux]] devices,.
 
Supported web-browsers such as
 
* Firefox
* Chrome (and most Chromium based browsers.)
* Opera GX
* Microsoft Edge
* Safari
 
==Implementation==
Although Snap''!'' is implemented in JavaScript using an [[HTML5]] Canvas [[application programming interface]] (API), 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. It uses an [[HTML5]] Canvas [[application programming interface]] (API).
 
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.
Line 84 ⟶ 101:
 
==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=EditorGee|website=i-programmer.info|access-date=21 May 2017}}</ref> As of December 2014, 100 New York City (NYC) high schools will introduceintroduced University of California, Berkeley's “Beauty and Joy of Computing” as a new AP Computer Science Principles course starting in 2015, using Snap''!''.<ref>{{cite web|url=https://obamawhitehouse.archives.gov/the-press-office/2014/12/08/fact-sheet-new-commitments-support-computer-science-education|title=FACT SHEET: New Commitments to Support Computer Science Education|date=8 December 2014|website=obamawhitehouse.archives.gov|access-date=20 January 2019}}</ref> Jens and Brian received the National Technology Leadership Summit (NTLS) 2020 Educational Leadership Award for lifetime achievement based in part on Snap''!''.
 
==Notes==
Line 94 ⟶ 111:
==External links==
* {{Official website|snap.berkeley.edu}}
 
{{Video game engines |state=collapsed}}
 
{{DEFAULTSORT:Snap! (Programming Language)}}