Read–eval–print loop
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.[10] The term usually refers to programming interfaces similar to the classic Lisp machine interactive environment or to Common Lisp with the SLIME development environment.[1] Common examples include command-line shells and similar environments for programming languages, and the technique is very characteristic of scripting languages, even though their characteristics can vary greatly.[1]
A read–eval–print loop (REPL), also termed an interactive toplevel or language shell, is a simple interactive computer programming environment that takes single user inputs, executes them, and returns the result to the user; a program written in a REPL environment is executed piecewise.[10] The term usually refers to programming interfaces similar to the classic Lisp machine interactive environment or to Common Lisp with the SLIME development environment.[1] Common examples include command-line shells and similar environments for programming languages, and the technique is very characteristic of scripting languages, even though their characteristics can vary greatly.[1] A minimal definition in Common Lisp is: (loop (print (eval (read)))) where read waits for user input and eval evaluates it.[10] print prints the result, and loop loops indefinitely.[10] You can enter (+ 1 1) and stop the loop with C-c .[src] ===Combining source files and REPL development=== Developers of Lisp applications typically do not write or copy-paste code to a REPL.[5] They use the REPL for quick tests, for debugging and to explore a running system.[1] They write their application in a source file under version control, they use commands or keyboard shortcuts to compile their code interactively.[src] The Lisp process is running and connected to their editor, and it compiles new code "on the fly", without restarting.[src] In Common Lisp, developers typically compile the current function they are working on.[src] They can also compile a whole file, or compile a whole project.[src] When a function is compiled, they may get type warnings (specially with the SBCL implementation), and they can invoke the newly created function from the REPL.[src] If an error occurs, they are given an interactive debugger.[src] This process of compiling one single function and testing it on the REPL is very fast in comparison to other processes.[src] The cycle of writing a new function, compiling it and testing is very short, and interactive, making it suitable for development.[src] It also means that the application state is not lost during development.[src] It is only when they choose to do so that they run or compile all the application from scratch.[src]
21 sentences · 21 cited inline · 10 references stored
References
- Hey, Tony; Pápay, Gyuri (2014). The Computing Universe: A Journey through a Revolution . Cambridge University Press. p. 76 . ISBN 978-1-316-12322-5 , "A major characteristic of modern scripting languages is their interactivity, sometimes referred to as a REPL programming environment. ... The characteristics of ease of use and immediate execution with a REPL environment are sometimes taken as the definition of a scripting language" {{ cite book }} : CS1 maint: postscript ( link ) Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "Hey, Tony; Pápay, Gyuri (2014). The Computing Universe: A Journey through a Revolution . Cambridge University Press. p. 76 . ISBN 978-1-316-12322-5 , "A major characteristic of modern scripting languages is their interactivity, sometimes referred to as a REPL programming environment. ... The characteristics of ease of use and immediate execution with a REPL environment are sometimes taken as the definition of a scripting language" {{ cite book }} : CS1 maint: postscript ( link ) Wikipedia revision 1356441599, retrieved 2026-11-18." Hey, Tony; Pápay, Gyuri (2014). 2026-11-17. https://books.google.com/books?id=q4FIBQAAQBAJ&pg=PA76&dq=repl+scripting. Accessed 26 November 2026.
Chicago "Hey, Tony; Pápay, Gyuri (2014). The Computing Universe: A Journey through a Revolution . Cambridge University Press. p. 76 . ISBN 978-1-316-12322-5 , "A major characteristic of modern scripting languages is their interactivity, sometimes referred to as a REPL programming environment. ... The characteristics of ease of use and immediate execution with a REPL environment are sometimes taken as the definition of a scripting language" {{ cite book }} : CS1 maint: postscript ( link ) Wikipedia revision 1356441599, retrieved 2026-11-18." Hey, Tony; Pápay, Gyuri (2014). 2026-11-17. https://books.google.com/books?id=q4FIBQAAQBAJ&pg=PA76&dq=repl+scripting.
APA Hey, Tony; Pápay, Gyuri (2014). (2026). Hey, Tony; Pápay, Gyuri (2014). The Computing Universe: A Journey through a Revolution . Cambridge University Press. p. 76 . ISBN 978-1-316-12322-5 , "A major characteristic of modern scripting languages is their interactivity, sometimes referred to as a REPL programming environment. ... The characteristics of ease of use and immediate execution with a REPL environment are sometimes taken as the definition of a scripting language" {{ cite book }} : CS1 maint: postscript ( link ) Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://books.google.com/books?id=q4FIBQAAQBAJ&pg=PA76&dq=repl+scripting
- L. Peter Deutsch; Edmund Berkeley, The LISP Implementation for the PDP-1 Computer (PDF) , p. 15 Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "L. Peter Deutsch; Edmund Berkeley, The LISP Implementation for the PDP-1 Computer (PDF) , p. 15 Wikipedia revision 1356441599, retrieved 2026-11-18." L. 2026-11-17. http://s3data.computerhistory.org/pdp-1/DEC.pdp_1.1964.102650371.pdf. Accessed 26 November 2026.
Chicago "L. Peter Deutsch; Edmund Berkeley, The LISP Implementation for the PDP-1 Computer (PDF) , p. 15 Wikipedia revision 1356441599, retrieved 2026-11-18." L. 2026-11-17. http://s3data.computerhistory.org/pdp-1/DEC.pdp_1.1964.102650371.pdf.
APA L. (2026). L. Peter Deutsch; Edmund Berkeley, The LISP Implementation for the PDP-1 Computer (PDF) , p. 15 Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from http://s3data.computerhistory.org/pdp-1/DEC.pdp_1.1964.102650371.pdf
- Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail.comENDED PROGRAMMING SYSTEM WITHIN CTSS Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail.comENDED PROGRAMMING SYSTEM WITHIN CTSS Wikipedia revision 1356441599, retrieved 2026-11-18." Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail. 2026-11-17. https://drive.google.com/file/d/1AHTlN-nCtgMQ2Dnr8t_hP6TAqH-MOfOm. Accessed 26 November 2026.
Chicago "Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail.comENDED PROGRAMMING SYSTEM WITHIN CTSS Wikipedia revision 1356441599, retrieved 2026-11-18." Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail. 2026-11-17. https://drive.google.com/file/d/1AHTlN-nCtgMQ2Dnr8t_hP6TAqH-MOfOm.
APA Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail. (2026). Joseph Weizenbaum, OPL-I: AN OPEN santichaymi2@gmail.comENDED PROGRAMMING SYSTEM WITHIN CTSS Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://drive.google.com/file/d/1AHTlN-nCtgMQ2Dnr8t_hP6TAqH-MOfOm
- Both of these projects were likely carried out in 1963, well before the respective publications appeared. However, it is impossible to place the dates of invention exactly. Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "Both of these projects were likely carried out in 1963, well before the respective publications appeared. However, it is impossible to place the dates of invention exactly. Wikipedia revision 1356441599, retrieved 2026-11-18." Both of these projects were likely carried out in 1963, well before the respective publications appeared. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1356441599. Accessed 26 November 2026.
Chicago "Both of these projects were likely carried out in 1963, well before the respective publications appeared. However, it is impossible to place the dates of invention exactly. Wikipedia revision 1356441599, retrieved 2026-11-18." Both of these projects were likely carried out in 1963, well before the respective publications appeared. 2026-11-17. https://en.wikipedia.org/w/index.php?oldid=1356441599.
APA Both of these projects were likely carried out in 1963, well before the respective publications appeared. (2026). Both of these projects were likely carried out in 1963, well before the respective publications appeared. However, it is impossible to place the dates of invention exactly. Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://en.wikipedia.org/w/index.php?oldid=1356441599
- list processing languages · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "list processing languages." There is a complex and interesting relationship between Lisp and SLIP, both being eponymous "list processing languages". 2026-11-17. https://en.wikipedia.org/wiki/ArXiv_(identifier). Accessed 26 November 2026.
Chicago "list processing languages." There is a complex and interesting relationship between Lisp and SLIP, both being eponymous "list processing languages". 2026-11-17. https://en.wikipedia.org/wiki/ArXiv_(identifier).
APA There is a complex and interesting relationship between Lisp and SLIP, both being eponymous "list processing languages". (2026). list processing languages. Retrieved November 26, 2026, from https://en.wikipedia.org/wiki/ArXiv_(identifier)
- David A. Moon (April 8, 1974), MACLISP Reference Manual (PDF) , p. 89 Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "David A. Moon (April 8, 1974), MACLISP Reference Manual (PDF) , p. 89 Wikipedia revision 1356441599, retrieved 2026-11-18." David A. 2026-11-17. https://www.softwarepreservation.org/projects/LISP/MIT/Moon-MACLISP_Reference_Manual-Apr_08_1974.pdf. Accessed 26 November 2026.
Chicago "David A. Moon (April 8, 1974), MACLISP Reference Manual (PDF) , p. 89 Wikipedia revision 1356441599, retrieved 2026-11-18." David A. 2026-11-17. https://www.softwarepreservation.org/projects/LISP/MIT/Moon-MACLISP_Reference_Manual-Apr_08_1974.pdf.
APA David A. (2026). David A. Moon (April 8, 1974), MACLISP Reference Manual (PDF) , p. 89 Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://www.softwarepreservation.org/projects/LISP/MIT/Moon-MACLISP_Reference_Manual-Apr_08_1974.pdf
- Smith, Jerry D. (1988). An introduction to Scheme . Englewood Cliffs, N.J. : Prentice Hall. p. 8 . ISBN 978-0-13-496712-7 . Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "Smith, Jerry D. (1988). An introduction to Scheme . Englewood Cliffs, N.J. : Prentice Hall. p. 8 . ISBN 978-0-13-496712-7 . Wikipedia revision 1356441599, retrieved 2026-11-18." Smith, Jerry D. 2026-11-17. https://archive.org/details/introductiontosc0000smit/page/8. Accessed 26 November 2026.
Chicago "Smith, Jerry D. (1988). An introduction to Scheme . Englewood Cliffs, N.J. : Prentice Hall. p. 8 . ISBN 978-0-13-496712-7 . Wikipedia revision 1356441599, retrieved 2026-11-18." Smith, Jerry D. 2026-11-17. https://archive.org/details/introductiontosc0000smit/page/8.
APA Smith, Jerry D. (2026). Smith, Jerry D. (1988). An introduction to Scheme . Englewood Cliffs, N.J. : Prentice Hall. p. 8 . ISBN 978-0-13-496712-7 . Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://archive.org/details/introductiontosc0000smit/page/8
- rep.scm -- Initial 1986 revision of MIT-Scheme · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "rep.scm -- Initial 1986 revision of MIT-Scheme." Hanson, Chris (1986). 2026-11-17. https://github.com/jaseemabid/mit-scheme/blob/47c68ef5fa41821c3f52f886ef69f99d232d10bb/v7/src/runtime/rep.scm. Accessed 26 November 2026.
Chicago "rep.scm -- Initial 1986 revision of MIT-Scheme." Hanson, Chris (1986). 2026-11-17. https://github.com/jaseemabid/mit-scheme/blob/47c68ef5fa41821c3f52f886ef69f99d232d10bb/v7/src/runtime/rep.scm.
APA Hanson, Chris (1986). (2026). rep.scm -- Initial 1986 revision of MIT-Scheme. Retrieved November 26, 2026, from https://github.com/jaseemabid/mit-scheme/blob/47c68ef5fa41821c3f52f886ef69f99d232d10bb/v7/src/runtime/rep.scm
- A principled approach to REPL interpreters · retrieved 2026-11-17 · rev 1356441599
Cite this reference
MLA "A principled approach to REPL interpreters." van Binsbergen, L. 2026-11-17. https://hal.inria.fr/hal-02968938/file/onward2020-repls.pdf. Accessed 26 November 2026.
Chicago "A principled approach to REPL interpreters." van Binsbergen, L. 2026-11-17. https://hal.inria.fr/hal-02968938/file/onward2020-repls.pdf.
APA van Binsbergen, L. (2026). A principled approach to REPL interpreters. Retrieved November 26, 2026, from https://hal.inria.fr/hal-02968938/file/onward2020-repls.pdf
- a b Grillmeyer, O. (2013). Exploring Computer Science with Scheme . Undergraduate Texts in Computer Science. Springer New York. p. 239. ISBN 978-1-4757-2937-5 . Retrieved 2021-06-26 . The central component to the Scheme interpreter is the read-eval-print loop . Commands are read in, then evaluated. Finally, the evaluated result is printed. Wikipedia revision 1356441599, retrieved 2026-11-18 · retrieved 2021-06-25 · rev 1356441599
Cite this reference
MLA "a b Grillmeyer, O. (2013). Exploring Computer Science with Scheme . Undergraduate Texts in Computer Science. Springer New York. p. 239. ISBN 978-1-4757-2937-5 . Retrieved 2021-06-26 . The central component to the Scheme interpreter is the read-eval-print loop . Commands are read in, then evaluated. Finally, the evaluated result is printed. Wikipedia revision 1356441599, retrieved 2026-11-18." a b Grillmeyer, O. 2021-06-25. https://books.google.com/books?id=GoXjBwAAQBAJ. Accessed 26 November 2026.
Chicago "a b Grillmeyer, O. (2013). Exploring Computer Science with Scheme . Undergraduate Texts in Computer Science. Springer New York. p. 239. ISBN 978-1-4757-2937-5 . Retrieved 2021-06-26 . The central component to the Scheme interpreter is the read-eval-print loop . Commands are read in, then evaluated. Finally, the evaluated result is printed. Wikipedia revision 1356441599, retrieved 2026-11-18." a b Grillmeyer, O. 2021-06-25. https://books.google.com/books?id=GoXjBwAAQBAJ.
APA a b Grillmeyer, O. (2021). a b Grillmeyer, O. (2013). Exploring Computer Science with Scheme . Undergraduate Texts in Computer Science. Springer New York. p. 239. ISBN 978-1-4757-2937-5 . Retrieved 2021-06-26 . The central component to the Scheme interpreter is the read-eval-print loop . Commands are read in, then evaluated. Finally, the evaluated result is printed. Wikipedia revision 1356441599, retrieved 2026-11-18. Retrieved November 26, 2026, from https://books.google.com/books?id=GoXjBwAAQBAJ
Cite this article
MLA
"Read–eval–print loop." encyclopegia.org, 2026, https://encyclopegia.org/wiki/read-eval-print-loop. Accessed 26 November 2026.
Chicago
"Read–eval–print loop." encyclopegia.org. Accessed November 26, 2026. https://encyclopegia.org/wiki/read-eval-print-loop.
APA
encyclopegia.org. (2026). Read–eval–print loop. Retrieved November 26, 2026, from https://encyclopegia.org/wiki/read-eval-print-loop
Accessed November 26, 2026 · CC BY-SA 4.0 · citation page · JSON