E

1 program Added 2025-11-04T14:56:05Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit ee4fd42b0c · authored 2025-11-04T15:56:05+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

8 sources · pl_id: pl/e
LLM (this repo) · 1PldbLinguistWikipediaEsolangHyperpolyglotRosettacodeWikidata · Q2658244

Wikipedia infobox

Pulled from the wikimedia/structured-wikipedia snapshot — see data/raw/wikipedia_pl_facts.*.jsonl and pl_fact.csv for the long-table provenance.

Paradigmsmulti-paradigm: object-oriented · message passing
Typingstrong, dynamic
Designed byMark S. Miller
First appeared1997
Influenced byJoule · Original-E · Java
LicensePortions in different free licenses
Homepagehttp://erights.org

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.elinguistprimary979.7K files

LLM-contributed programs

Dining Philosophers

Provenance: commit ee4fd42b0c · authored 2025-11-04T15:56:05+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.e · license: MIT License · added: 2025-11-04T14:56:05Z
# Copyright 2002 Combex, Inc. under the terms of the MIT X license
# found at http://www.opensource.org/licenses/mit-license.html .
#
# This is a straightforward translation of the Oz solution from
# http://www.mozart-oz.org/documentation/tutorial/node10.html
#
# To run this, you'll need a file named "e.bat" or "e.sh" on your
# path. See http://www.erights.org/ for how to get this. Then,
#
#   e dining-philosophers.e

? pragma.syntax("0.8")

/**
 * A philosopher is an active object that alternately thinks and
 * eats.
 */
def makePhilosopher(name, left, right) :any {
    def philosopher {
        to think() {
            println(`$name is thinking`)
            timer.whenPast(timer.now() + 3000,
                         def _ { eat() })
        }
        to eat() {
            println(`$name is hungry`)
            when (left <- take(), right <- take()) -> {
                println(`$name is eating`)
                timer.whenPast(timer.now() + 3000,
                             def _ {
                                 left.put()
                                 right.put()
                                 think()
                             })
            }
        }
    }
    return philosopher
}

/**
 * A fork is a shared passive object. It can be taken by only one
 * philosopher at a time.
 */
def makeFork(name) :any {
    def holder {
        to take() {
            def taken <- E.newCell(null)
            taken.put(true)
            return taken
        }
    }
    var current := holder
    def fork {
        to take() {
            def result := current.take()
            current := def broken {
                to take() { throw("already taken") }
            }
            return result
        }
        to put() {
            current := fork
        }
    }
    return fork
}

def philosophers {
    ["Plato", "Kant", "Turing", "Russel", "Socrates"]
}

# create the forks
def forks := <elib:tables.makeFlexList>()
for name in philosophers {
    forks.push(makeFork(name))
}

# create the philosophers
var i := 0
for name in philosophers {
    def p := makePhilosopher(name,
                             forks[i],
                             forks[(i + 1) % philosophers.size()])
    p.think()
    i += 1
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.e/0.epredicates[{"kind": "any", "regexes": ["^\\s*(def|var)\\s+(.+):=", "^\\s*(def|to)\\s+(\\w+)(\\(.+\\))?\\s+\\{", "^\\s*(when)\\s+(\\(.+\\))\\s+->\\s+\\{"]}]

Contribute — propose a file extension

Tell us where to find evidence about E (mapped to pl/e). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/E/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Déjà Vu E (eeEee) →