REPL Shell
Jump to navigation
Jump to search
A REPL Shell is an advanced CLI-based shell to a software code interpreter.
- AKA: Read–Eval–Print Loop.
- Context:
- It can range from being a Pure REPL CLI-based Shell to being a Hybrid REPL CLI-based Shell (such as IPython).
- Example(s):
- IPython Shell (e.g. based on Jupyter notebook environment).
- IJulia Shell.
- …
- Counter-Example(s):
- See: Expert System Shell, SQL CLI Shell, Emacs, vim.
References
2015
- (Wikipedia, 2015) ⇒ http://en.wikipedia.org/wiki/Read–eval–print_loop Retrieved:2015-7-6.
- A read–eval–print loop (REPL), also known as an interactive toplevel or language shell, is a simple, interactive computer programming environment that takes single user inputs (i.e. single expressions), evaluates them, and returns the result to the user; a program written in a REPL environment is executed piecewise. The term is most usually used to refer to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command line shells and similar environments for programming languages, and is particularly characteristic of scripting languages.
2013
- (Wikipedia, 2013) ⇒ http://en.wikipedia.org/wiki/Read–eval–print_loop Retrieved:2013-12-19.
- A read–eval–print loop (REPL) is a simple, interactive computer programming environment. The term is most usually used to refer to a Lisp interactive environment, but can be applied to command line shells and similar environments for programming languages such as APL, BASIC, Clojure, F#, Factor, Haskell, J, Julia, Perl, PHP, Prolog, Python, R, Ruby, Scala, Smalltalk, Standard ML, Tcl, Javascript, et al. Synonyms include interactive toplevel and language shell.
In a REPL, the user enters one or more expressions (rather than an entire compilation unit), which are then evaluated, and the results displayed. The name read–eval–print loop comes from the names of the Lisp primitive functions which implement this functionality:
- The read function accepts an expression from the user, and parses it into a data structure in memory. For instance, the user may enter the s-expression
(+ 1 2 3)
, which is parsed into a linked list containing four data elements. - The eval function takes this internal data structure and evaluates it. In Lisp, evaluating an s-expression beginning with the name of a function means calling that function on the arguments that make up the rest of the expression. So the function
+
is called on the arguments1 2 3
, yielding the result6
. - The print function takes the result yielded by eval, and prints it out to the user. If it is a complex expression, it may be pretty-printed to make it easier to understand. In this example, though, the number
6
does not need much formatting to print.REPLs facilitate exploratory programming and debugging because the read–eval–print loop is usually much faster than the classic edit-compile-run-debug cycle.
- The read function accepts an expression from the user, and parses it into a data structure in memory. For instance, the user may enter the s-expression
- A read–eval–print loop (REPL) is a simple, interactive computer programming environment. The term is most usually used to refer to a Lisp interactive environment, but can be applied to command line shells and similar environments for programming languages such as APL, BASIC, Clojure, F#, Factor, Haskell, J, Julia, Perl, PHP, Prolog, Python, R, Ruby, Scala, Smalltalk, Standard ML, Tcl, Javascript, et al. Synonyms include interactive toplevel and language shell.