E
E is a programming language designed around object-capability security and event-loop concurrency, in order to support creation of highly robust and secure programs.
Using the Java implementation of E, Java libraries can be used from E code, and its REPL (e.g. Creating a Window).
Trying E
The current recommended E implementation ("E-on-Java") may be downloaded from erights.org.
To run an E program:
$ rune program.e
To get a REPL (aka prompt, shell, interactive interpreter):
$ rune
An online REPL is also available at Rosetta Code IRC or [irc://chat.freenode.net/erights #erights] on chat.[http://freenode.net/ freenode.net].
Syntax of examples
While most of the examples on Rosetta Code are E expressions (programs), some may be written like this:
? ''expression''
value: ''print representation''
This is both the format of a transcript at an E REPL, and the format employed by Updoc, a test framework for E. “?” is a prompt for user input (“>” indicates multi-line input) and “# foo:” indicates responses.
# value:the return value of the ''expression'', printed# problem:an exception thrown by evaluation of the ''expression''# syntax error:an exception thrown by parsing of the ''expression''# stdout:or# stderr:text written to thestdoutorstderrstreams. It is typically only used in test scripts and not in ordinary interactive sessions.
To try out these examples for yourself, just install E and run the rune command to get the “?” prompt.
Multi-line input is automatic for unbalanced brackets/parens and can be indicated in other cases by a trailing backslash.
See Also
Tasks
- 100 doors
- Abstract type
- Accumulator factory
- Ackermann function
- Active object
- Align columns
- Amb
- Anagrams
- Animate a pendulum
- Animation
- Apply a callback to an array
- Arbitrary-precision integers (included)
- Arithmetic evaluation
- Arithmetic/Integer
- Array concatenation
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Atomic updates
- Averages/Arithmetic mean
- Averages/Median
- Averages/Mode
- Averages/Pythagorean means
- Averages/Root mean square
- Averages/Simple moving average
- Binary search
- Binary strings
- Bitmap
- Bitmap/Flood fill
- Bitmap/Read a PPM file
- Bitmap/Write a PPM file
- Bitwise operations
- Boolean values
- Break OO privacy
- Bresenham's Line Algorithm
- Bulls and cows
- Call an object method
- Character codes
- Check that file exists
- Checkpoint synchronization
- Classes
- Collections
- Combinations
- Command-line arguments
- Comments
- Compound data type
- Concurrent computing
- Conditional structures
- Constrained genericity
- Copy a string
- Create a file
- Cumulative standard deviation
- Deepcopy
- Define a primitive data type
- Delegates
- Delete a file
- Detect division by zero
- Determine if a string is numeric
- Dining philosophers
- Distributed programming
- Documentation
- Doubly-linked list/Definition
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Doubly-linked list/Traversal
- Dynamic variable names
- Empty program
- Enforced immutability
- Enumerations
- Environment variables
- Ethiopian multiplication
- Events
- Evolutionary algorithm
- Exceptions
- Execute Brainfuck
- Execute HQ9+
- Execute a system command
- Exponentiation operator
- Extend your language
- Factorial
- Factors of an integer
- Fibonacci sequence
- Filter
- Find limit of recursion
- First-class functions
- First-class functions/Use numbers analogously
- FizzBuzz
- Flatten a list
- Flow-control structures
- Forward difference
- Function composition
- Function definition
- Generator/Exponential
- Generic swap
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- HTTP
- Happy numbers
- Hash from two arrays
- Hello world!
- Hello world/Graphical
- Hello world/Standard error
- Hello world/Text
- Higher-order functions
- Horner's rule for polynomial evaluation
- Hostname
- Increment a numerical string
- Infinity
- Inheritance/Multiple
- Inheritance/Single
- Integer comparison
- Integer sequence
- Interactive programming
- Introspection
- Jensen's Device
- Knapsack problem/Unbounded
- Knuth shuffle
- List comprehensions
- Literals/Integer
- Literals/String
- Logical operations
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- MD5
- Man or boy test
- Memory allocation
- Metaprogramming
- Metered concurrency
- Miller–Rabin primality test
- Monte Carlo methods
- Multiline shebang
- Multiple distinct objects
- Multiplication tables
- Mutual recursion
- Named parameters
- Non-decimal radices/Convert
- Non-decimal radices/Input
- Non-decimal radices/Output
- Nth root
- Null object
- Numerical integration
- Object serialization
- One-dimensional cellular automata
- Optional parameters
- Ordered words
- Palindrome detection
- Pangram checker
- Parametric polymorphism
- Partial function application
- Pascal's triangle
- Percentage difference between images
- Perfect numbers
- Playing cards
- Pointers and references
- Polymorphic copy
- Polymorphism
- Polynomial long division
- Power set
- Primality by trial division
- Prime decomposition
- Probabilistic choice
- Program termination
- Quaternion type
- Queue/Definition
- Queue/Usage
- Quine
- Random numbers
- Range extraction
- Rate counter
- Read entire file
- Real constants and functions
- Remove duplicate elements
- Rename a file
- Repeat a string
- Respond to an unknown method call
- Reverse a string
- Rot-13
- Run-length encoding
- Runtime evaluation
- Runtime evaluation/In an environment
- SEDOLs
- Safe addition
- Scope modifiers
- Search a list
- Send an unknown method call
- Seven-sided dice from five-sided dice
- Shell one-liner
- Short-circuit evaluation
- Sierpinski carpet
- Sierpinski triangle
- Sieve of Eratosthenes
- Simple windowed application
- Singleton
- Singly-linked list/Element definition
- Singly-linked list/Element insertion
- Singly-linked list/Traversal
- Sleep
- Sort an array of composite structures
- Sort an integer array
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Permutation sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Shell sort
- Special characters
- Spiral matrix
- Stack
- Stair-climbing puzzle
- String case
- String interpolation (included)
- String length
- String matching
- Substring
- Sum and product of an array
- Sum of a series
- Sum of squares
- Symmetric difference
- Synchronous concurrency
- System time
- Take notes on the command line
- Terminal control/Ringing the terminal bell
- Test a function
- Text processing/Max licenses in use
- Time a function
- Tokenize a string
- Top rank per group
- Topological sort
- Tree traversal
- Trigonometric functions
- Undefined values
- Variables
- Variadic function
- Walk a directory/Non-recursively
- Walk a directory/Recursively
- Web scraping
- Window creation
- XML/DOM serialization
- XML/XPath
- Y combinator
- Zig-zag matrix