ivan.moony
Bronze Coder
I just reached a decent checkpoint in writing a language which I plan to use in my CMS as a replacement for HTML+CSS+XSLT.
Rewrite bases its functioning on pattern matching against s-expressions and term rewriting. It is a Turing complete minimalist declarative creation where only rules for programming are substitution rules. Entire source code fits in less than 300 javascript lines of code.
this is a rough example code:
which results with:
I composed a few examples in a browser based playground of which theorem verifying and calculating boolean operations may be the most interesting.
Visit the playground here.
Visit the project homepage here.
Rewrite bases its functioning on pattern matching against s-expressions and term rewriting. It is a Turing complete minimalist declarative creation where only rules for programming are substitution rules. Entire source code fits in less than 300 javascript lines of code.
this is a rough example code:
Code:
(
(
REWRITE
(
(READ (VAR <a>) + (VAR <a>))
(WRITE 2 * <a> )
)
(
(READ (VAR <a>) * (VAR <a>))
(WRITE <a> ^ 2 )
)
)
(X + X) * (X + X)
)
which results with:
Code:
((2 * X) ^ 2)
I composed a few examples in a browser based playground of which theorem verifying and calculating boolean operations may be the most interesting.
Visit the playground here.
Visit the project homepage here.
Last edited: