| dbpprop:abstract
|
- A read-eval-print loop (REPL), also known as an interactive toplevel, 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 Smalltalk, Perl, Scala, Python, Ruby, Haskell, APL, BASIC, J, Scheme, TCL, and other languages as well. In a REPL, the user may enter expressions, 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 a single 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 arguments 1 2 3, yielding the result 6. 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. The REPL is commonly misnamed an interpreter. This is a misnomer—many programming languages that use compilation have REPLs, such as Common Lisp and Python. Because the print function outputs in the same textual format that the read function uses for input, most results are printed in a form that could (if it's useful) be copied and pasted back into the REPL. However, it's sometimes necessary to print representations of opaque data elements that can't 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's the <__module__. class instance> notation, and in Common Lisp, 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.
- REPL (ang. read-eval-print loop - pętla wczytaj-wykonaj-wypisz) to proste, interaktywne środowisko programowania. Pojęcie to jest najczęściej stosowane w odniesieniu do języka programowania Lisp, lecz może być też zastosowany do wiersza poleceń powłoki. Popularne są również środowiska dla innych języków takich jak Smalltalk, Perl, Python, Ruby, Haskell, Scheme i wielu innych. Dzięki REPL użytkownik może wprowadzać polecenia, które następnie zostaną wykonane a następnie jego wynik wypisany.
- REPL (Read-eval-print loop) — простая интерактивная среда программирования. Данный термин наиболее часто используется применительно к интерактивной среде языка программирования Lisp, однако может использоваться и применительно к интерактивным средам языков Smalltalk, Python, Ruby, Haskell и других языков. В такой среде пользователь может вводить выражения, которые среда тут же будет вычислять, а результат вычисления отображать пользователю. Название read-eval-print loop происходит от имён примитивов языка Lisp, которые реализуют подобную функциональность: Функция read читает одно выражение и преобразует его в соответствующую структуру данных в памяти. Функция eval принимает одну такую структуру данных и вычисляет соответствующее ей выражение. Функция print принимает результат вычисления выражения и печатает его пользователю. Чтобы реализовать REPL-среду для некоторого языка, достаточно реализовать три перечисленные выше функции и объединить их в бесконечный цикл. REPL-среда очень удобна при изучении нового языка, так как предоставляет пользователю быструю обратную связь.
|
| rdfs:comment
|
- A read-eval-print loop (REPL), also known as an interactive toplevel, 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 Smalltalk, Perl, Scala, Python, Ruby, Haskell, APL, BASIC, J, Scheme, TCL, and other languages as well. In a REPL, the user may enter expressions, which are then evaluated, and the results displayed.
- REPL (ang. read-eval-print loop - pętla wczytaj-wykonaj-wypisz) to proste, interaktywne środowisko programowania. Pojęcie to jest najczęściej stosowane w odniesieniu do języka programowania Lisp, lecz może być też zastosowany do wiersza poleceń powłoki. Popularne są również środowiska dla innych języków takich jak Smalltalk, Perl, Python, Ruby, Haskell, Scheme i wielu innych.
- REPL (Read-eval-print loop) — простая интерактивная среда программирования.
|