~~~~~~~~~~~~~~~~~~~~ Arc.Ask3.Ru ~~~~~~~~~~~~~~~~~~~~~ 
Номер скриншота №:
✰ 8936BCE2D44CDD5927A14975E7D6D89D__1710689100 ✰
Заголовок документа оригинал.:
✰ EuLisp - Wikipedia ✰
Заголовок документа перевод.:
✰ EuLisp - Wikipedia ✰
Снимок документа находящегося по адресу (URL):
✰ https://en.wikipedia.org/wiki/EuLisp ✰
Адрес хранения снимка оригинал (URL):
✰ https://arc.ask3.ru/arc/aa/89/9d/8936bce2d44cdd5927a14975e7d6d89d.html ✰
Адрес хранения снимка перевод (URL):
✰ https://arc.ask3.ru/arc/aa/89/9d/8936bce2d44cdd5927a14975e7d6d89d__translat.html ✰
Дата и время сохранения документа:
✰ 07.07.2024 11:32:42 (GMT+3, MSK) ✰
Дата и время изменения документа (по данным источника):
✰ 17 March 2024, at 18:25 (UTC). ✰ 

~~~~~~~~~~~~~~~~~~~~~~ Ask3.Ru ~~~~~~~~~~~~~~~~~~~~~~ 
Сервисы Ask3.ru: 
 Архив документов (Снимки документов, в формате HTML, PDF, PNG - подписанные ЭЦП, доказывающие существование документа в момент подписи. Перевод сохраненных документов на русский язык.)https://arc.ask3.ruОтветы на вопросы (Сервис ответов на вопросы, в основном, научной направленности)https://ask3.ru/answer2questionТоварный сопоставитель (Сервис сравнения и выбора товаров) ✰✰
✰ https://ask3.ru/product2collationПартнерыhttps://comrades.ask3.ru


Совет. Чтобы искать на странице, нажмите Ctrl+F или ⌘-F (для MacOS) и введите запрос в поле поиска.
Arc.Ask3.ru: далее начало оригинального документа

EuLisp - Wikipedia Jump to content

EuLisp

From Wikipedia, the free encyclopedia
EuLisp
Paradigmmulti-paradigm: functional, procedural, meta, object-oriented
FamilyLisp
First appeared1990; 34 years ago (1990)
Preview release
0.991[1] / 2010; 14 years ago (2010)
Typing disciplinestrong, dynamic
Scopestatic and dynamic
OSLinux
Filename extensions.em
Major implementations
EuXLisp,[2] Youtoo,[2] Eu2C[2]
Influenced by
Common Lisp, InterLisp, LeLisp, Lisp/VM, Scheme, T, CLOS, ObjVlisp, Oaklisp, MicroCeyx, MCS, Standard ML, Haskell
Influenced
Dylan, ISLISP, Evelin

EuLisp is a statically and dynamically scoped Lisp dialect developed by a loose formation of industrial and academic Lisp users and developers from around Europe. The standardizers intended to create a new Lisp "less encumbered by the past" (compared to Common Lisp), and not so minimalist as Scheme. Another objective was to integrate the object-oriented programming paradigm well. It is a third-generation programming language.

Origin[edit]

The language definition process first began in a meeting in 1985 in Paris and took several years. The complete specification and a first implementation (interpreted-only) were made available in 1990.

1958 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 2020
 LISP 1, 1.5, LISP 2(abandoned)
 Maclisp
 Interlisp
 MDL
 Lisp Machine Lisp
 Scheme  R5RS  R6RS  R7RS small
 NIL
 ZIL (Zork Implementation Language)
 Franz Lisp
 Common Lisp  ANSI standard
 Le Lisp
 MIT Scheme
 XLISP
 T
 Chez Scheme
 Emacs Lisp
 AutoLISP
 PicoLisp
 Gambit
 EuLisp
 ISLISP
 OpenLisp
 PLT Scheme  Racket
 newLISP
 GNU Guile
 Visual LISP
 Clojure
 Arc
 LFE
 Hy
 Chialisp

Distinguishing features[edit]

Its main traits are that it is a Lisp-1 (no separate function and variable namespaces), has a Common Lisp Object System (CLOS) style generic-function type object-oriented system named The EuLisp Object System (TELOS) integrated from the ground up, has a built-in module system, and is defined in layers to promote the use of the Lisp on small, embedded hardware and educational machines. It supports continuations, though not as powerfully as Scheme. It has a simple lightweight process mechanism (threads).

Summary[edit]

Implementations[edit]

An early implementation of EuLisp was Free and Eventually Eulisp (FEEL). The successor to FEEL was Youtoo (interpreted and compiled versions), by University of Bath in the United Kingdom.[3] An interpreter for the basic level of EuLisp, level-0, was written by Russell Bradford in XScheme, an implementation of Scheme by David Michael Betz, originally named EuScheme EuScheme but the most recent version is renamed EuXLisp [1] to avoid confusion. Also Eu2C [2], a EuLisp optimizing compiler, was created by Fraunhofer ISST under the APPLY project in Germany [3].

A dialect of EuLisp was developed, named Plural EuLisp. It was EuLisp with parallel computing programming extensions.

Example[edit]

Example use of classes in the algorithm to solve the "Towers of Hanoi" problem.

(defmodule hanoi
  (syntax (syntax-0)
   import (level-0)
   export (hanoi))

;;;-------------------------------------------------
;;; Tower definition
;;;-------------------------------------------------
(defconstant *max-tower-height* 10)

(defclass <tower> ()
  ((id reader: tower-id keyword: id:)
   (blocks accessor: tower-blocks)))

(defun build-tower (x n)
  (labels ((loop (i res)
                 (if (= i 0) res
                   (loop (- i 1) (cons i res)))))
          ((setter tower-blocks) x (loop n ()))
          x))

(defmethod generic-print ((x <tower>) (s <stream>))
  (sformat s "#<tower ~a: ~a>" (tower-id x) (tower-blocks x)))

;;;-------------------------------------------------
;;; Access to tower blocks
;;;-------------------------------------------------
(defgeneric push (x y))

(defmethod push ((x <tower>) (y <fpi>))
  (let ((blocks (tower-blocks x)))
    (if (or (null? blocks) (< y (car blocks)))
        ((setter tower-blocks) x (cons y blocks))
      (error <condition>
             (fmt "cannot push block of size ~a on tower ~a" y x)))))

(defgeneric pop (x))

(defmethod pop ((x <tower>))
  (let ((blocks (tower-blocks x)))
    (if blocks
        (progn
          ((setter tower-blocks) x (cdr blocks))
          (car blocks))
      (error <condition>
             (fmt "cannot pop block from empty tower ~a" x)))))

;;;-------------------------------------------------
;;; Move n blocks from tower x1 to tower x2 using x3 as buffer
;;;-------------------------------------------------
(defgeneric move (n x1 x2 x3))

(defmethod move ((n <fpi>) (x1 <tower>) (x2 <tower>) (x3 <tower>))
  (if (= n 1)
      (progn
        (push x2 (pop x1))
        (print x1 nl x2 nl x3 nl nl))
    (progn
      (move (- n 1) x1 x3 x2)
      (move 1 x1 x2 x3)
      (move (- n 1) x3 x2 x1))))

;;;-------------------------------------------------
;;; Initialize and run the 'Towers of Hanoi'
;;;-------------------------------------------------
(defun hanoi ()
  (let ((x1 (make <tower> id: 0))
        (x2 (make <tower> id: 1))
        (x3 (make <tower> id: 2)))
    (build-tower x1 *max-tower-height*)
    (build-tower x2 0)
    (build-tower x3 0)
    (print x1 nl x2 nl x3 nl nl)
    (move *max-tower-height* x1 x2 x3)))

(hanoi)

;;;-------------------------------------------------
)  ;; End of module hanoi
;;;-------------------------------------------------

References[edit]

  1. ^ "Eulisp" (PDF). GitHub. Archived from the original (PDF) on 2012-03-06. Retrieved 2017-09-20.
  2. ^ Jump up to: a b c "Eulisp". GitHub.
  3. ^ Kind, Andreas. "Youtoo". School of Mathematical Sciences. University of Bath. England. Retrieved 2018-10-28.

External links[edit]

Arc.Ask3.Ru: конец оригинального документа.
Arc.Ask3.Ru
Номер скриншота №: 8936BCE2D44CDD5927A14975E7D6D89D__1710689100
URL1:https://en.wikipedia.org/wiki/EuLisp
Заголовок, (Title) документа по адресу, URL1:
EuLisp - Wikipedia
Данный printscreen веб страницы (снимок веб страницы, скриншот веб страницы), визуально-программная копия документа расположенного по адресу URL1 и сохраненная в файл, имеет: квалифицированную, усовершенствованную (подтверждены: метки времени, валидность сертификата), открепленную ЭЦП (приложена к данному файлу), что может быть использовано для подтверждения содержания и факта существования документа в этот момент времени. Права на данный скриншот принадлежат администрации Ask3.ru, использование в качестве доказательства только с письменного разрешения правообладателя скриншота. Администрация Ask3.ru не несет ответственности за информацию размещенную на данном скриншоте. Права на прочие зарегистрированные элементы любого права, изображенные на снимках принадлежат их владельцам. Качество перевода предоставляется как есть, любые претензии не могут быть предъявлены. Если вы не согласны с любым пунктом перечисленным выше, немедленно покиньте данный сайт. В случае нарушения любого пункта перечисленного выше, штраф 55! (Пятьдесят пять факториал, денежную единицу можете выбрать самостоятельно, выплаичвается товарами в течение 7 дней с момента нарушения.)