Snap! (programming language): Difference between revisions

Content deleted Content added
m Replaced superseded JPEG with lossless and more lightweight PNG.
m Snap! is now updated. :~)
Line 3:
{{DISPLAYTITLE:Snap''!'' (programming language)}}
{{Infobox programming language
| name = Snap''!'' {{#tag:ref|ProgramThe versionssoftware's 8version is 9.0.21.3|group=Note}}
| logo = [[File:Snap!.svg|200px]]
| logo size = 90PX
Line 51:
==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 [[Firstfirst class function]]s, which in turn have [[Lambdalambda calculus]] as their even more abstract, mathematical, foundation),
* lists that are [[First class object|first class]] (including ''lists of lists/arrays''),
* ''First class'' sprites (in other words [[Prototype-based programming|prototype-oriented instance-based classless object programming]]),
Line 71:
 
==License==
The source code of Snap''!'' is [[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 [[Downloaddownload.com]] and TechTracker download page.<ref>CNET Download.com and CNET TechTracker's [http://download.cnet.com/BYOB-Build-Your-Own-Blocks/3000-20415_4-75629466.html BYOB for Windows] download page</ref><ref>CNET's Download.com and TechTracker [http://download.cnet.com/BYOB-Build-Your-Own-Blocks/3000-20415_4-75629082.html BYOB for Mac] download page</ref>
 
==Platforms==
Line 79:
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.
 
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- and E-shaped blocks through the morphic "holes" mechanism.
 
All user interaction is triggered by events, which are passed on from the root element - "the World -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==