description | The first arithmantic programming language ever! |
homepage URL | https://github.com/jaseg/Graf-Zahl |
repository URL | https://github.com/jaseg/Graf-Zahl.git |
owner | s@jaseg.de |
last change | Tue, 7 Aug 2012 13:16:24 +0000 (7 15:16 +0200) |
last refresh | Fri, 26 Apr 2024 04:31:52 +0000 (26 06:31 +0200) |
mirror URL | git://repo.or.cz/Graf-Zahl.git |
https://repo.or.cz/Graf-Zahl.git | |
ssh://git@repo.or.cz/Graf-Zahl.git | |
bundle info | Graf-Zahl.git downloadable bundles |
content tags |
Graf Zahl is a small piece of ruby code that, when require()
d, injects ruby with arithmomantic character tracking.
Arithmomancy is the old art of fortune telling using the magical properties of numbers. Names are converted into numbers, and the numbers in turn are processed by a highly involved algorithm (to be found in Character.doTehArithmancy(something)
) and then looked up in a character table that survived form ancient times.
The character of each thing is modified by everything you do with it (method calls, operators). This way it then can be checked that you do only process values and classes with a pure character. Values which are often used in certain contexts will slowly assume the character of these contexts. So if you often use your 1
in an evil environment, over time it might turn evil.
Check out and run test.rb
. Please note this code is written against ruby 1.9.3 and will very likely not work against anything < 1.9. Also, please note it is horribly slow. This is a side effect of Graf Zahl practising a really ancient art as well as an implication of the way Graf Zahl does this (think of intercepting any method call) and I think is an acceptable price for an artithmomantically verifiable program.
A planned feature is the on-the-fly modification of method calls when there is a character mismatch, details can be found in TODO
, just to make it a little more esotheric and harder to use.
Just for fun, and because now I know a lot more about ruby's way of OO. You may find this code useful because it can be used for pretty deep debugging of ruby code. Just comment out the whole arithmomancy stuff and uncomment the one puts
in process_call(...)
. Also, ponies.
The project's code, issue tracker and I can be found on github under https://github.com/jaseg/Graf-Zahl . Fork me!
11 years ago | master | logtree |