Git Product home page Git Product logo

mcescheme's Introduction

Meta-Circular Evaluator by using lambda with lexical scope

mce.scm, mcemce.scm

mce.scm is a Meta-Circular Evaluator, just by using the following special forms and builtin functions in Scheme, without define special form.

  • Special forms: lambda with lexical scope, quote, cond
  • Builtin functions: car, cdr, cons, eq?, pair?

U combinators are mainly used to implement Eval, Apply and other utilities.

mcemce.scm is derived from mce.scm and shows the Meta-Circular Evaluator on the Meta-Circular Evaluator.

eval-mce.scm

eval-mce.scm is a short Scheme code of Evaluator to run mce.scm, by using the above 8 basics with single quote notation as quote, let, append, null?, map, memq, assq, call-with-input-file, read, display, newline and utility accessors, without define special form. It is just a reference implementation.

Quine code for mce.scm

  • GNU Guile, Chibi-Scheme, SCM
((lambda (X) (cons X (cons (cons (quote quote) (cons X (quote ()))) (quote ())))) (quote (lambda (X) (cons X (cons (cons (quote quote) (cons X (quote ()))) (quote ()))))))
  • Gauche, Racket
((lambda (X) (cons X (cons (cons 'quote (cons X '())) '())))
 '(lambda (X) (cons X (cons (cons 'quote (cons X '())) '()))))

mce2.scm, S2C.scm, ASSQ-sample.scm, mce2mce2.com

mce2.scm is a Meta-Circular Evaluator, just by using lambda, quote, if, eq? and procedure?. Lambda expressions as closures are used to implement cons equivalent.

S2C.scm is a translator to derive from S-expression code to cons equivalent code. ASSQ-sample.scm is a sample code for mce2.scm before translating.

mce2mce2.scm is derived from mce2.scm and shows the Meta-Circular Evaluator on the Meta-Circular Evaluator.

Licence

The codes in this repository are licensed under CC0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.