The REPL Programming Language
'Cause many languages do not have a REPL.
- see Why REPL for more information
- (loop (print (eval (read))))
- Read-Eval-Print Loop
- Ruby-Enlighted Programming Language
- Ruby's Endless Programming Language
- lambda literal
- type/class literal(
repl/type
) ?:
/and
/or
instead ofif..else
- modifier expression(
if
/while
/unless
/until
)
git clone git://github.com/kenpusney/repl-lang.git
cd repl-lang && ./repl
# make expression
make Object
# polish notation and `&` operator
:new & Object
:+.& 1,2
require 'repl/uglisp'
(:list.& 1,2,3,4)
#=> [1,2,3,4]
(:car.& (:list.& 1,2,3,4))
#=> 1
(:cdr.& (:list.& 1,2,3,4))
#=> [2,3,4]
require 'repl/type'
## define a new class:
k = :type.&({
attr_reader: [:x],
attr_writer: [:x],
attr_accessor: [:z],
init: ->(x){ @x = x },
},Object) ## default superclass: Object