m (HTML: added "of")
m (made "grammars" singular)
(15 intermediate revisions by 9 users not shown)
Line 1: Line 1:
 
{{External Programs}}{{about|programming languages in general|the type of project that simulates a programming language|Programming Language (Project Type)}}
 
{{External Programs}}{{about|programming languages in general|the type of project that simulates a programming language|Programming Language (Project Type)}}
  
A '''programming language''' is a set of rules and functions that let people use computers, cell phones, tablets, and more devices. Programming languages are designed to make it easy for humans to write complex instructions. They function a lot like human languages: they have explicit grammars and a primitive vocabulary. [[Scratch]] is a programming language.
+
A '''programming language''' is a set of rules and functions that let people use computers, cell phones, tablets, and more devices. Programming languages are designed to make it easy for humans to write complex instructions. They function a lot like human languages: they have explicit grammar and primitive vocabulary. [[Scratch]] is a programming language.
  
 
== Theory ==
 
== Theory ==
 +
 
A programming language is a language for writing instructions for a machine. A programming language is defined by a grammar.
 
A programming language is a language for writing instructions for a machine. A programming language is defined by a grammar.
  
Line 9: Line 10:
  
 
Languages may be designed to support paradigms, ways of programming.<ref>http://cs.lmu.edu/~ray/notes/paradigms/</ref> Paradigms include:
 
Languages may be designed to support paradigms, ways of programming.<ref>http://cs.lmu.edu/~ray/notes/paradigms/</ref> Paradigms include:
*Imperative: Programs use statements
+
 
*Functional: Programs use functions and avoid state
+
* Imperative: Programs use statements
*Declarative: Programs state rules of a problems
+
* Functional: Programs use functions and avoid state
*Object-oriented: Message passing between objects
+
* Declarative: Programs state rules of a problems
*Procedural: Programs are separated into subroutines
+
* Object-oriented: Message passing between objects
 +
* Procedural: Programs are separated into subroutines
  
 
Languages usually have various primitive data types which can be expanded with Object-Oriented Programming:
 
Languages usually have various primitive data types which can be expanded with Object-Oriented Programming:
*Numbers, which are parsed as numbers
+
 
**Some languages consider integers, floating-point numbers, and doubles to be different data types.
+
* Numbers, which are parsed as numbers
*[[String]]s, which are parsed as text
+
** Some languages consider integers, floating-point numbers, and doubles to be different data types.
*[[Array]]s, which are lists of elements
+
* [[String]]s, which are parsed as text
*Objects, which are dictionaries of key-value pairs.
+
* [[Array]]s, which are lists of elements
*[[Functions]], which are pieces of code which can be executed with [[Argument]]s.
+
* Objects, which are dictionaries of key-value pairs.
 +
* [[Functions]], which are pieces of code which can be executed with [[Argument]]s.
  
 
In essence, a programming language just provides a framework where a function can be executed with arguments{{-}}the rest can be worked around. Usually, the grammar of a language consists of "statements", which are either:
 
In essence, a programming language just provides a framework where a function can be executed with arguments{{-}}the rest can be worked around. Usually, the grammar of a language consists of "statements", which are either:
*Assignments: binding some value to a name ([[variable]])
+
 
*Procedure calls
+
* Assignments: binding some value to a name ([[variable]])
*Special forms: certain specialized procedures which cannot be created using the language itself, for example, IF/ELSE. The inputs to special forms are not immediately evaluated.
+
* Procedure calls
 +
* Special forms: certain specialized procedures which cannot be created using the language itself, for example, IF/ELSE. The inputs to special forms are not immediately evaluated.
  
 
The syntax of a programming language gives rules about how to do each of the above. For example:
 
The syntax of a programming language gives rules about how to do each of the above. For example:
  
*Assignments:
+
* Assignments:
**Squeak: <code>var _ val</code>
+
** Squeak: <code>var _ val</code>
**JavaScript: <code>var = val</code>
+
** JavaScript: <code>var = val</code>
**Scheme: <code>(SET! var val)</code>
+
** Scheme: <code>(SET! var val)</code>
*Procedure calls
+
* Procedure calls:
**Squeak: <code>obj proc: arg</code>
+
** Squeak: <code>obj proc: arg</code>
**JavaScript: <code>proc(arg)</code>
+
** JavaScript: <code>proc(arg)</code>
**Scheme: <code>(proc arg)</code>
+
** Scheme: <code>(proc arg)</code>
*Special forms (if, in this case)
+
* Special forms (if, in this case):
**Squeak: <code>bool ifTrue: [something] ifFalse: [something].</code>
+
** Squeak: <code>bool ifTrue: [something] ifFalse: [something].</code>
**JavaScript: <code>if (bool) {something;} else {something;}</code>
+
** JavaScript: <code>if (bool) {something;} else {something;}</code>
**Scheme: <code>(if bool something something)</code>
+
** Scheme: <code>(if bool something something)</code>
  
 
Scratch simplifies programming a lot by hiding all of this in blocks: all blocks are equal, there are no special forms. Of course, in reality, certain blocks are programmed completely differently as special cases. For example, the IF block needs special programming to execute the C block contents, and the WAIT UNTIL block needs special programming to escape the atomic loop. Assignment is just another block. The REPEAT UNTIL special form block repeatedly evaluates its Boolean input, then its block, input, until the former input evaluates to true. This contrasts with custom blocks, whose inputs are evaluated prior to their execution.
 
Scratch simplifies programming a lot by hiding all of this in blocks: all blocks are equal, there are no special forms. Of course, in reality, certain blocks are programmed completely differently as special cases. For example, the IF block needs special programming to execute the C block contents, and the WAIT UNTIL block needs special programming to escape the atomic loop. Assignment is just another block. The REPEAT UNTIL special form block repeatedly evaluates its Boolean input, then its block, input, until the former input evaluates to true. This contrasts with custom blocks, whose inputs are evaluated prior to their execution.
  
 
Languages may be designed to support paradigms, ways of programming.<ref>http://cs.lmu.edu/~ray/notes/paradigms/</ref> Paradigms include:
 
Languages may be designed to support paradigms, ways of programming.<ref>http://cs.lmu.edu/~ray/notes/paradigms/</ref> Paradigms include:
*Imperative: Programs use statements
+
* Imperative: Programs use statements
*Functional: Programs use functions and avoid state
+
* Functional: Programs use functions and avoid state
*Declarative: Programs state rules of a problem
+
* Declarative: Programs state rules of a problem
*Object-oriented: Message passing between objects
+
* Object-oriented: Message passing between objects
*Procedural: Programs are separated into subroutines
+
* Procedural: Programs are separated into subroutines
  
 
== Implementation ==
 
== Implementation ==
 +
 
Programming languages are generally either ''interpreted'' or ''compiled'', which means they are either executed directly, or translated into another language. For example, C is compiled while Python and JavaScript are interpreted. Java is compiled into bytecode, which is interpreted by the Java Virtual Machine.
 
Programming languages are generally either ''interpreted'' or ''compiled'', which means they are either executed directly, or translated into another language. For example, C is compiled while Python and JavaScript are interpreted. Java is compiled into bytecode, which is interpreted by the Java Virtual Machine.
  
{{note}}Java and JavaScript are two completely different programming languages with different grammars, semantics, creation, and uses.
+
{{note|Java and JavaScript are two completely different programming languages with different grammars, semantics, creation, and uses.}}
  
 
The steps of a compiler can be separated into the front end and the back end. The front end translates the source language into an intermediate representation and the back end of a compiler translates the intermediate representation into the target language. This way, different compilers can be created by matching different combinations of front ends and back ends.
 
The steps of a compiler can be separated into the front end and the back end. The front end translates the source language into an intermediate representation and the back end of a compiler translates the intermediate representation into the target language. This way, different compilers can be created by matching different combinations of front ends and back ends.
Line 62: Line 67:
  
 
'''Front end'''
 
'''Front end'''
*A lexer: This converts the program into tokens.
+
 
*A parser: This analyzes the tokens as per the context-free grammar of the language, then converts them into a parse tree that can easily be interpreted.
+
* A lexer: This converts the program into tokens.
*A semantic analyzer: This walks the parse tree and determines the meanings of the nodes.
+
* A parser: This analyzes the tokens as per the context-free grammar of the language, then converts them into a parse tree that can easily be interpreted.
*An intermediate code generator: This translates the parse tree into an intermediate representation.
+
* A semantic analyzer: This walks the parse tree and determines the meanings of the nodes.
 +
* An intermediate code generator: This translates the parse tree into an intermediate representation.
 +
 
 
'''Back end'''
 
'''Back end'''
*A code optimizer: This improves the program.
+
 
*An interpreter or compiler: The interpreter runs the program and the compiler generates an executable file.
+
* A code optimizer: This improves the program.
 +
* An interpreter or compiler: The interpreter runs the program and the compiler generates an executable file.
  
 
The lexer accepts the program as an input and ''tokenizes'' it, or splits it into substrings with semantic meanings. The tokens may be defined by regular expressions. The lexer's output has two parts: the lexemes, which are the different substrings of the program, and the tokens, which are lexemes' classifications. For example, the JavaScript code <code>var x = 0;</code> could be separated into the following tokens:
 
The lexer accepts the program as an input and ''tokenizes'' it, or splits it into substrings with semantic meanings. The tokens may be defined by regular expressions. The lexer's output has two parts: the lexemes, which are the different substrings of the program, and the tokens, which are lexemes' classifications. For example, the JavaScript code <code>var x = 0;</code> could be separated into the following tokens:
Line 100: Line 108:
  
 
== Scratch as a Programming Language ==
 
== Scratch as a Programming Language ==
 +
 
Scratch is a block-based imperative, event-driven, dynamically-typed and interpreted programming language.
 
Scratch is a block-based imperative, event-driven, dynamically-typed and interpreted programming language.
  
 
=== Typing ===
 
=== Typing ===
 +
 
Scratch is dynamically-typed, meaning that whether data types agree is checked during program execution.<ref>https://docs.oracle.com/cd/E57471_01/bigData.100/extensions_bdd/src/cext_transform_typing.html</ref> Scratch's primitive data types are numbers, strings and Booleans.
 
Scratch is dynamically-typed, meaning that whether data types agree is checked during program execution.<ref>https://docs.oracle.com/cd/E57471_01/bigData.100/extensions_bdd/src/cext_transform_typing.html</ref> Scratch's primitive data types are numbers, strings and Booleans.
  
 
=== Special Forms ===
 
=== Special Forms ===
 +
 
Scratch's special forms are blocks which cannot be replicated using custom blocks. These blocks may reevaluate their inputs. For example, the repeat-until loop reevaluates its Boolean input before each iteration to see if the condition's value has changed.<ref>https://snap.berkeley.edu/SnapManual.pdf</ref>
 
Scratch's special forms are blocks which cannot be replicated using custom blocks. These blocks may reevaluate their inputs. For example, the repeat-until loop reevaluates its Boolean input before each iteration to see if the condition's value has changed.<ref>https://snap.berkeley.edu/SnapManual.pdf</ref>
  
 
=== Implementation ===
 
=== Implementation ===
 +
 
Scratch is an interpreted programming language. Scratch 3.0 uses a virtual machine, which builds an abstract syntax tree.<ref>https://github.com/LLK/scratch-vm</ref>
 
Scratch is an interpreted programming language. Scratch 3.0 uses a virtual machine, which builds an abstract syntax tree.<ref>https://github.com/LLK/scratch-vm</ref>
  
Line 114: Line 126:
  
 
=== Squeak ===
 
=== Squeak ===
 +
 
{{main|Smalltalk}}
 
{{main|Smalltalk}}
 
Squeak was used to program the 1.x series of Scratch. It is a simple language designed to be human-readable and concise. See [[Squeak Tutorial]] for a simple introduction.
 
Squeak was used to program the 1.x series of Scratch. It is a simple language designed to be human-readable and concise. See [[Squeak Tutorial]] for a simple introduction.
  
 
=== Flash ===
 
=== Flash ===
 +
 
[[Wikipedia:Adobe Flash|Adobe Flash]] is a programming suite by Adobe, which was used to create [[Scratch 2.0]]. Flash programming is done in ActionScript, a language based on ECMAScript.
 
[[Wikipedia:Adobe Flash|Adobe Flash]] is a programming suite by Adobe, which was used to create [[Scratch 2.0]]. Flash programming is done in ActionScript, a language based on ECMAScript.
  
 
=== Python ===
 
=== Python ===
 +
 
{{main|Python}}
 
{{main|Python}}
[[Wikipedia:Python (programming language)|Python]] is a simple interpreted scripting language that is used in the Scratch 2.0 back-end ([[server]]-side code). The Django coding platform is used on a nginx server.<ref>http://scratch.mit.edu/discuss/post/44464/</ref> The forums run on DjangoBB, a Python library. Python is also used in many Scratch add-ons, including [[Kurt]].
+
[[Wikipedia:Python (programming language)|Python]] is a simple interpreted scripting language that is used in the Scratch 2.0 back-end ([[server]]-side code). The Django coding platform is used on a nginx server.<ref>[[post:44464]]</ref> The forums run on DjangoBB, a Python library. Python is also used in many Scratch add-ons, including [[Kurt]].
  
 
=== PHP ===
 
=== PHP ===
[[Wikipedia:PHP|PHP]] is a programming language which was used in the [[Scratch Website|Scratch website's]] [[server]]-side code ([[ScratchR]]). It stands for PHP: Hypertext Preprocessor.
+
 
 +
[[Wikipedia:PHP|PHP]] is a programming language which was used in the [[Scratch Website|Scratch website's]] [[server]]-side code ([[ScratchR]]) and is still used on the wiki. PHP stands for "PHP: Hypertext Preprocessor" (a {{wp|recursive acronym}}).
  
 
=== SQL ===
 
=== SQL ===
 +
 
SQL (Structured Query Language) is a database query language. This is used to store backend information on the website, such as users and forum data.
 
SQL (Structured Query Language) is a database query language. This is used to store backend information on the website, such as users and forum data.
  
=== Mongo ===
+
=== MongoDB ===
Mongo is a database system that is used to store [[Cloud Variables|cloud variables]].
+
 
 +
MongoDB is a database system that is used to store [[Cloud Variables|cloud variables]].
  
 
=== Java ===
 
=== Java ===
 +
 
[[Wikipedia:Java (programming language)|Java]] is a powerful, object oriented programming language. Java was used to write the original [[Java Player]] for Scratch.
 
[[Wikipedia:Java (programming language)|Java]] is a powerful, object oriented programming language. Java was used to write the original [[Java Player]] for Scratch.
  
 
=== JavaScript ===
 
=== JavaScript ===
 +
 
[[Wikipedia:JavaScript|JavaScript]] (commonly shortened to JS) is a simple programming language based on ECMAScript for web development. [[Snap!]] is written entirely in JavaScript, and the Scratch website uses JavaScript for interactive elements. These include [[Comments (website feature)|commenting]], [[Project Tags|tagging]], and editing [[Project Notes]]. In the 2.0 site, it is also used to automatically check for new [[messages]], load [[What's Happening?]] and [[Scratch News]], and quote posts in the [[Scratch Discussion Forums|forums]]. JavaScript is also being used to develop Scratch 3.0.
 
[[Wikipedia:JavaScript|JavaScript]] (commonly shortened to JS) is a simple programming language based on ECMAScript for web development. [[Snap!]] is written entirely in JavaScript, and the Scratch website uses JavaScript for interactive elements. These include [[Comments (website feature)|commenting]], [[Project Tags|tagging]], and editing [[Project Notes]]. In the 2.0 site, it is also used to automatically check for new [[messages]], load [[What's Happening?]] and [[Scratch News]], and quote posts in the [[Scratch Discussion Forums|forums]]. JavaScript is also being used to develop Scratch 3.0.
 +
 +
===Node.js===
 +
 +
[[Wikipedia:Node.js|Node.js]] is a backend server language based on JavaScript.
 +
 +
It is used on Scratch in many ways including projects, assets, cloud variables and large parts of the community.<ref>https://scratch.mit.edu/users/thisandagain/#comments-47658856</ref>
  
 
=== GL Shader Language ===
 
=== GL Shader Language ===
 +
 
GLSL is a programming language used in OpenGL and WebGL to process vertices and fragments. It is being used in the Scratch 3.0 renderer.<ref>https://github.com/LLK/scratch-render/tree/develop/src/shaders</ref>
 
GLSL is a programming language used in OpenGL and WebGL to process vertices and fragments. It is being used in the Scratch 3.0 renderer.<ref>https://github.com/LLK/scratch-render/tree/develop/src/shaders</ref>
  
 
=== Tosh ===
 
=== Tosh ===
Tosh is a cross compatible version of scratch created by scratch user blob8108. It allows people to use text base programming rather than the standard drag and drop method. The syntax is easy to learn and use. It is designed so that people can quickly and easily create complex programs without the use of the mouse. The projects are run using a built in version of the [[Phosphorus Player]]. The projects can also be downloaded and run on the main scratch website.
+
 
 +
Tosh is a cross compatible version of Scratch created by user blob8108. It allows people to use text base programming rather than the standard drag and drop method. <!-- The syntax is easy to learn and use. --> It is designed so that people can quickly and easily create complex programs without the use of the mouse. Projects are played using a built-in version of the [[Phosphorus Player]]. The projects can also be downloaded and run on the main [[Scratch Website]].
  
 
== Markup Languages ==
 
== Markup Languages ==
  
 
=== HTML ===
 
=== HTML ===
 +
 
[[Wikipedia:HTML|HTML]] is a web-based markup language. It is used for the layout of the Scratch website and to create the [[HTML5 Player]].
 
[[Wikipedia:HTML|HTML]] is a web-based markup language. It is used for the layout of the Scratch website and to create the [[HTML5 Player]].
  
 
=== Cascading Style Sheets ===
 
=== Cascading Style Sheets ===
[[Wikipedia:Cascading Style Sheets|Cascading Style Sheets]] (commonly shortened to CSS) are a method of styling HTML documents. It is used to add color and make the site more visually appealing.
+
 
 +
[[Wikipedia:Cascading Style Sheets|Cascading Style Sheets]] (commonly shortened to CSS) is a method of styling HTML documents. It is used to add color and make websites more visually appealing.
  
 
== External links ==
 
== External links ==
*[[Wikipedia:Programming language|Programming language on Wikipedia]]
+
 
 +
* [[Wikipedia:Programming language|Programming language on Wikipedia]]
  
 
== References ==
 
== References ==
 
<references/>
 
<references/>
 +
 
[[Category:Computer Science]]
 
[[Category:Computer Science]]
[[Category:Programming Languages]]
+
[[Category:Programming Languages]][[ja:プログラミング言語]]

Revision as of 22:08, 11 August 2019

SandCastleIcon.png This page has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the Internet, as we can't guarantee the safety of other websites.
This article is about programming languages in general. For the type of project that simulates a programming language, see Programming Language (Project Type).


A programming language is a set of rules and functions that let people use computers, cell phones, tablets, and more devices. Programming languages are designed to make it easy for humans to write complex instructions. They function a lot like human languages: they have explicit grammar and primitive vocabulary. Scratch is a programming language.

Theory

A programming language is a language for writing instructions for a machine. A programming language is defined by a grammar.

Many programming paradigms exist which focus on different design aspects. Imperative languages focus on commands and how to accomplish tasks, declarative languages dictate the rules and conditions of a task and do not specify the process of completing it, and functional languages emphasize functions which do not change state, and are guaranteed to always produce the same output for an input.

Languages may be designed to support paradigms, ways of programming.[1] Paradigms include:

  • Imperative: Programs use statements
  • Functional: Programs use functions and avoid state
  • Declarative: Programs state rules of a problems
  • Object-oriented: Message passing between objects
  • Procedural: Programs are separated into subroutines

Languages usually have various primitive data types which can be expanded with Object-Oriented Programming:

  • Numbers, which are parsed as numbers
    • Some languages consider integers, floating-point numbers, and doubles to be different data types.
  • Strings, which are parsed as text
  • Arrays, which are lists of elements
  • Objects, which are dictionaries of key-value pairs.
  • Functions, which are pieces of code which can be executed with Arguments.

In essence, a programming language just provides a framework where a function can be executed with arguments—the rest can be worked around. Usually, the grammar of a language consists of "statements", which are either:

  • Assignments: binding some value to a name (variable)
  • Procedure calls
  • Special forms: certain specialized procedures which cannot be created using the language itself, for example, IF/ELSE. The inputs to special forms are not immediately evaluated.

The syntax of a programming language gives rules about how to do each of the above. For example:

  • Assignments:
    • Squeak: var _ val
    • JavaScript: var = val
    • Scheme: (SET! var val)
  • Procedure calls:
    • Squeak: obj proc: arg
    • JavaScript: proc(arg)
    • Scheme: (proc arg)
  • Special forms (if, in this case):
    • Squeak: bool ifTrue: [something] ifFalse: [something].
    • JavaScript: if (bool) {something;} else {something;}
    • Scheme: (if bool something something)

Scratch simplifies programming a lot by hiding all of this in blocks: all blocks are equal, there are no special forms. Of course, in reality, certain blocks are programmed completely differently as special cases. For example, the IF block needs special programming to execute the C block contents, and the WAIT UNTIL block needs special programming to escape the atomic loop. Assignment is just another block. The REPEAT UNTIL special form block repeatedly evaluates its Boolean input, then its block, input, until the former input evaluates to true. This contrasts with custom blocks, whose inputs are evaluated prior to their execution.

Languages may be designed to support paradigms, ways of programming.[2] Paradigms include:

  • Imperative: Programs use statements
  • Functional: Programs use functions and avoid state
  • Declarative: Programs state rules of a problem
  • Object-oriented: Message passing between objects
  • Procedural: Programs are separated into subroutines

Implementation

Programming languages are generally either interpreted or compiled, which means they are either executed directly, or translated into another language. For example, C is compiled while Python and JavaScript are interpreted. Java is compiled into bytecode, which is interpreted by the Java Virtual Machine.

Note Note: Java and JavaScript are two completely different programming languages with different grammars, semantics, creation, and uses.

The steps of a compiler can be separated into the front end and the back end. The front end translates the source language into an intermediate representation and the back end of a compiler translates the intermediate representation into the target language. This way, different compilers can be created by matching different combinations of front ends and back ends.

Language implementations usually consist of the following parts:

Front end

  • A lexer: This converts the program into tokens.
  • A parser: This analyzes the tokens as per the context-free grammar of the language, then converts them into a parse tree that can easily be interpreted.
  • A semantic analyzer: This walks the parse tree and determines the meanings of the nodes.
  • An intermediate code generator: This translates the parse tree into an intermediate representation.

Back end

  • A code optimizer: This improves the program.
  • An interpreter or compiler: The interpreter runs the program and the compiler generates an executable file.

The lexer accepts the program as an input and tokenizes it, or splits it into substrings with semantic meanings. The tokens may be defined by regular expressions. The lexer's output has two parts: the lexemes, which are the different substrings of the program, and the tokens, which are lexemes' classifications. For example, the JavaScript code var x = 0; could be separated into the following tokens:

Lexeme Token
var var
x identifier
= assignment_operator
0 integer_literal
; semicolon

The parser analyzes the tokens and lexemes produced by the lexer program and creates an abstract syntax tree (AST). The parser utilizes a context-free grammar, the specification of the syntax. In a grammar, symbols called nonterminals are defined by productions, sequences of tokens and nonterminals. Algorithms such as LALR or Earley may be used, and the parser may be table-driven or handwritten.

Parsing algorithms are classified into top-bottom parsing, which starts with the root node and constructs the tree to the leaves, and bottom-up parsing, which start with the tokens and work up to the root node. Bottom-up parsing consists of shifts, where the next token may be pushed onto the parse stack, and reduction, where items on the stack are found to match a production, and replaced with it.[3] Lookahead tokens are used when whether to shift or reduce is undecided.[4]

After the parse tree is created, it may be simplified into an abstract syntax tree (AST). Then, the tree is traversed and its nodes are read. Here, the compiler may check that all the variables are declared and the data types match.

Afterwards, a lower-level intermediate representation of the program is created. GCC uses a language called RTL.[5]

Scratch as a Programming Language

Scratch is a block-based imperative, event-driven, dynamically-typed and interpreted programming language.

Typing

Scratch is dynamically-typed, meaning that whether data types agree is checked during program execution.[6] Scratch's primitive data types are numbers, strings and Booleans.

Special Forms

Scratch's special forms are blocks which cannot be replicated using custom blocks. These blocks may reevaluate their inputs. For example, the repeat-until loop reevaluates its Boolean input before each iteration to see if the condition's value has changed.[7]

Implementation

Scratch is an interpreted programming language. Scratch 3.0 uses a virtual machine, which builds an abstract syntax tree.[8]

Programming languages relevant to Scratch

Squeak

Main article: Smalltalk

Squeak was used to program the 1.x series of Scratch. It is a simple language designed to be human-readable and concise. See Squeak Tutorial for a simple introduction.

Flash

Adobe Flash is a programming suite by Adobe, which was used to create Scratch 2.0. Flash programming is done in ActionScript, a language based on ECMAScript.

Python

Main article: Python

Python is a simple interpreted scripting language that is used in the Scratch 2.0 back-end (server-side code). The Django coding platform is used on a nginx server.[9] The forums run on DjangoBB, a Python library. Python is also used in many Scratch add-ons, including Kurt.

PHP

PHP is a programming language which was used in the Scratch website's server-side code (ScratchR) and is still used on the wiki. PHP stands for "PHP: Hypertext Preprocessor" (a recursive acronym).

SQL

SQL (Structured Query Language) is a database query language. This is used to store backend information on the website, such as users and forum data.

MongoDB

MongoDB is a database system that is used to store cloud variables.

Java

Java is a powerful, object oriented programming language. Java was used to write the original Java Player for Scratch.

JavaScript

JavaScript (commonly shortened to JS) is a simple programming language based on ECMAScript for web development. Snap! is written entirely in JavaScript, and the Scratch website uses JavaScript for interactive elements. These include commenting, tagging, and editing Project Notes. In the 2.0 site, it is also used to automatically check for new messages, load What's Happening? and Scratch News, and quote posts in the forums. JavaScript is also being used to develop Scratch 3.0.

Node.js

Node.js is a backend server language based on JavaScript.

It is used on Scratch in many ways including projects, assets, cloud variables and large parts of the community.[10]

GL Shader Language

GLSL is a programming language used in OpenGL and WebGL to process vertices and fragments. It is being used in the Scratch 3.0 renderer.[11]

Tosh

Tosh is a cross compatible version of Scratch created by user blob8108. It allows people to use text base programming rather than the standard drag and drop method. It is designed so that people can quickly and easily create complex programs without the use of the mouse. Projects are played using a built-in version of the Phosphorus Player. The projects can also be downloaded and run on the main Scratch Website.

Markup Languages

HTML

HTML is a web-based markup language. It is used for the layout of the Scratch website and to create the HTML5 Player.

Cascading Style Sheets

Cascading Style Sheets (commonly shortened to CSS) is a method of styling HTML documents. It is used to add color and make websites more visually appealing.

External links

References

  1. http://cs.lmu.edu/~ray/notes/paradigms/
  2. http://cs.lmu.edu/~ray/notes/paradigms/
  3. http://sites.tufts.edu/comp181/2013/10/06/shift-reduce-parsing-bottom-up-parsing/
  4. http://www.cs.engr.uky.edu/~lewis/essays/compilers/td-parse.html
  5. https://gcc.gnu.org/onlinedocs/gccint/RTL.html
  6. https://docs.oracle.com/cd/E57471_01/bigData.100/extensions_bdd/src/cext_transform_typing.html
  7. https://snap.berkeley.edu/SnapManual.pdf
  8. https://github.com/LLK/scratch-vm
  9. post:44464
  10. https://scratch.mit.edu/users/thisandagain/#comments-47658856
  11. https://github.com/LLK/scratch-render/tree/develop/src/shaders