Rue

Posted by s on Dec. 21, 2008, 9:46 p.m.

The module system is really useful with the whole module rule system. Could use some memoization maybe, but speed really isn't something to worry over

Modules It would seem there are two kinds of modules. Invasive ones like ++ and – that are akin to C's #include and OOP ones like the rest which are akin to Java's classes. While the invasiveness is simpler, Rue gives it a scalability factor of suck. The OOP system is surprisingly enabling with the data abstraction not causing dependencies everywhere

++ Add one to a decimal. Doesn't overflow

Sub one from a decimal. Overflow? Trailing –

bin2hex Converts binary to hex

hex2bin Converts hex to binary

Surprisingly the above two aren't as mirroring of the other in implementation as one would think

fib Fibonnacci of x Surprisingly intuitive

flip Returns reverse of supplied string

len Returns length of supplied string

lgloop{x y} Returns 2x copies of y

bin2une Returns the unary value of a binary argument

isprime.1 Returns if an unary number is prime or not

However, the invasive modules can be wrapped

import ++

!(?P<a>.)::=\g<a>++

Would allow one to create a function to do ++

Comments