Misplaced Pages

Read–eval–print loop

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

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. The term usually refers to programming interfaces similar to the classic Lisp machine interactive environment. Common examples include command-line shells and similar environments for programming languages , and the technique is very characteristic of scripting languages .

#807192

20-656: In 1964, the expression READ-EVAL-PRINT cycle is used by L. Peter Deutsch and Edmund Berkeley for an implementation of Lisp on the PDP-1 . Just one month later, Project Mac published a report by Joseph Weizenbaum (the creator of ELIZA , the world's first chatbot) describing a REPL-based language, called OPL-1, implemented in his Fortran-SLIP language on the Compatible Time Sharing System (CTSS) . The 1974 Maclisp reference manual by David A. Moon attests "Read-eval-print loop" on page 89, but does not use

40-462: A Lisp REPL includes: Edmund Berkeley Edmund Callis Berkeley (March 21, 1909 – March 7, 1988) was an American computer scientist who co-founded the Association for Computing Machinery (ACM) in 1947. His 1949 book Giant Brains, or Machines That Think popularized cognitive images of early computers. He was also a social activist who worked to achieve conditions that might minimize

60-478: A school. The school was founded in 1904 by John Card Jenkins and Francis Tabor. Both graduates of Cambridge University , they had met after knocking heads on a soccer pitch. Originally on the upper floors of a small Midtown building, the school relocated to its current location on 98th street in 1915. The original 1915 building by Delano and Aldrich still stands, although it has undergone significant expansion and renovation, most recently in 1997. In April 2021, it

80-534: A technical but accessible survey of the most prominent examples of the time, including machines from MIT, Harvard, the Moore School, Bell Laboratories, and elsewhere. In Giant Brains , Berkeley also outlined a device which some have described as the first " personal computer ", Simon . Plans on how to build this computer were published in the journal Radio Electronics in 1950 and 1951. Simon used relay logic and cost about $ 600 to construct. The first working model

100-519: A virtual machine which provides an interface to the compiler. For example, starting with JDK 9, Java included JShell as a command-line interface to the language. Various other languages have third-party tools available for download that provide similar shell interaction with the language. As a shell , a REPL environment allows users to access relevant features of an operating system in addition to providing access to programming capabilities. The most common use for REPLs outside of operating system shells

120-430: Is for interactive prototyping . Other uses include mathematical calculation, creating documents that integrate scientific analysis (e.g. IPython ), interactive software maintenance, benchmarking , and algorithm exploration. A minimal definition is: where env represents initial eval -uation environment. It is also assumed that env can be destructively updated by eval . Typical functionality provided by

140-498: The #<whatever> form. The REPL of CLIM , SLIME , and the Symbolics Lisp Machine can also read back unreadable objects. They record for each output which object was printed. Later when the code is read back, the object will be retrieved from the printed output. REPLs can be created to support any text-based language. REPL support for compiled languages is usually achieved by implementing an interpreter on top of

160-456: The Committee for a SANE Nuclear Policy (SANE), and was active in the organization's Boston chapter. On the title page of the magazine "Computers and Automation", January 1963, Edmund Berkeley published a picture by Efraim Arazi from 1962 as computer art . This picture inspired him to initiate the first computer art contest in 1963. Berkeley had coined the term "computer art". The annual contest

180-714: The Harvard Mark I in 1942. In November 1946 he drafted a specification for "Sequence Controlled Calculators for the Prudential", which led to signing a contract with the Eckert-Mauchly Computer Corporation in 1947 for one of the first UNIVAC computers. He became famous in 1949 with the publication of his book Giant Brains, or Machines That Think in which he described the principles behind computing machines (called then "mechanical brains", "sequence-controlled calculators", or various other terms), and then gave

200-535: The United States of America ), a lion (representing Great Britain ), a book (symbol of education ), and a cross (representing a tradition of Christianity ). Although the school's name is spelled (though not pronounced) the same way as that of the breed of dog, which is also its mascot , it was in fact named for the rue St-Bernard in Brussels, Belgium , where a relative of one of St. Bernard's founders had also founded

220-772: The Junior (or Lower) School consists of grades K through 3, the Middle School grades 4 through 6, and the Upper School grades 7 through 9. Mondays through Thursdays, boys in the Junior School must wear St. Bernard's polo shirts (polo shirts with the school shield emblazoned upon the chest) in either red, white, or blue, khakis, and a blazer. Boys in the Middle and Upper Schools must wear a polo or oxford shirt, accompanied by khakis and blazers as well. On Fridays, all boys wear jackets and ties (with

SECTION 10

#1732851659808

240-537: The acronym REPL. Since at least the 1980s, the abbreviations REP Loop and REPL are attested in the context of Scheme . In a REPL, the user enters one or more expressions (rather than an entire compilation unit ) and the REPL evaluates them and displays the results. The name read–eval–print loop comes from the names of the Lisp primitive functions which implement this functionality: The development environment then returns to

260-461: The exception of the kindergartners). St. Bernard's alumni, known as Old Boys , earn admission to a wide range of secondary schools in the United States and the United Kingdom , both day and boarding. The schools attended with greatest frequency include Andover , Collegiate , Deerfield , Exeter , Groton , Horace Mann , Lawrenceville , St. Paul's , Stuyvesant , and Trinity . Alumni of

280-490: The greatest hazards facing the modern world. Berkeley came to the conclusion that nuclear war was the biggest existential threat to humanity. After the company dropped the project, Berkeley was forbidden to work on anti-nuclear efforts, even on his own time, prompting him to quit Prudential in 1948 and found his own actuary and computing consultancy. After World War II , Berkeley became a lifelong peace activist and campaigned against nuclear proliferation. In 1958 Berkeley joined

300-408: The read state, creating a loop, which terminates when the program is closed. REPLs facilitate exploratory programming and debugging because the programmer can inspect the printed result before deciding what expression to provide for the next read. The read–eval–print loop involves the programmer more frequently than the classic edit–compile–run–debug cycle. Because the print function outputs in

320-523: The same textual format that the read function uses for input, most results are printed in a form that could be copied and pasted back into the REPL. However, it is sometimes necessary to print representations of elements that cannot sensibly be read back in, such as a socket handle or a complex class instance. In these cases, there must exist a syntax for unreadable objects. In Python, it is the <__module__.class instance> notation, and in Common Lisp,

340-524: The threat of nuclear war . Berkeley attended St. Bernard's School and Phillips Exeter Academy . He received a BA in Mathematics and Logic from Harvard in 1930. He pursued a career as an insurance actuary at Prudential Insurance from 1934–1948, except for service in the United States Navy during World War II . Berkeley saw George Stibitz 's calculator at Bell Laboratories in 1939, and

360-493: Was a key point in the development of computer art up to the year 1973. This way Edmund Berkeley became a pioneer in the field of computer art. St. Bernard%27s School St. Bernard's School is a private, all-male elementary school in the Carnegie Hill neighborhood of Manhattan 's Upper East Side . It was founded in 1904 by John Card Jenkins, along with Francis Tabor. The school shield depicts an eagle (representing

380-499: Was announced that Joy S. Hurd IV had been appointed to serve as the school's next headmaster, starting his role on July 1, 2022. Mr. Hurd taught at St. Bernard's for several years and was most recently the head of Lake Forest Country Day School . He is a graduate of Harvard College and has master's degrees from Columbia University's Teachers College and the Bread Loaf School of Middlebury College . The school has three divisions:

400-452: Was built at Columbia University with the help of two graduate students. He also created the Geniac and Brainiac toy computers. Berkeley founded, published and edited Computers and Automation , the first computer magazine. He sometimes wrote for the magazine under the pseudonym "Neil D. MacDonald". He was involved in a "hazards research" at Prudential Insurance, with the goal of determining

#807192