Train (programming language)
Train is a programming language notable for being completely visible rather than based on text as are traditional programing languages and even visual programming languages. Train is based on simulating physical objects (pieces from a wooden toy train set) in a 2d world. Train combines source code, program state, and output into a single abstraction. While it is Turing complete, it would be difficult to make production scale programs in Train making it an esoteric programming language. However, unlike other esoteric languages, the goal of Train is not to obfuscate but rather entice play by simulating toys.
Programs in Train are made by linking together pieces of track and adding engines, cars, cargo, stations, and wyes.[1]. Engines can be though of as threads and thus multi-threaded programs in Train are simply tracks with multiple engines. Engines connect to cars to form trains. Cars represent memory addresses. A train has one engine but unlimited cars in Train. Cargo represents variables that can be stored in memory by being placed on cars. There are several data types in Train which correspond to different sets of toys that can be placed on train cars, including blocks, numbers, colors, and dinosaurs. Stations in Train allow cargo to be operated on including increment and decrement, simple arithmetic, and output by slingshot or catapult. Loops are formed by connecting tracks in physical loops. Wyes in the tracks allow If/Then and Do/While logic. Goto control is achieved using tunnels that can teleport trains to other tracks.
Since Train does not require the ability to read or write, it can be used by very young, pre-literate children[2]. However, complex programs are also possible making Train appealing to adults as well. Like Scratch, Train was developed to help teach kids how to program through play following a constructionist learning paradigm. Train was developed at Harvard University[3]
The Train interpreter is written in Javascript and is Open Source[4]. Implementations are available for the web[5] and devices[6]
References[edit]
- ↑ http://http://train-hub.org/TrainManual.html
- ↑ http://www.bestappsforkids.org/health/train-code-visually-all-ages-coding-apps/?fbclid=IwAR2BoOw_p0zjAe8O1RemZZWMrdqBDdOK0dkTN_yJNrH8HfxQMX9JnTfaEfE
- ↑ https://wiki.med.harvard.edu/SysBio/Megason/
- ↑ https://github.com/smegason/train
- ↑ http://train-hub.org/trainWeb.html
- ↑ https://itunes.apple.com/us/app/train-code-visually/id1439720008?ls=1&mt=8
External links[edit]
This article "Train (programming language)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Train (programming language). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.