I release NegaPosi Compiler 0.0.0+- on my diary page.
http://www.namikilab.tuat.ac.jp/~sasada/diary/200505.html#d10
NegaPosi is my new scripting language. Scripts written by NegaPosi
can run on ruby interpreter.
You can convert any Ruby scripts to NegaPosi scripts using NegaPosi
compiler.
Thanks,
--
// SASADA Koichi at atdot dot net
//
// Yes, it's a only joke software :)
Hahaha, I actually wrote one of these too, and was going to post it, but
darn it, you beat me to it :)
I think mine is simpler though ;)
Ryan
P.S. I'll post it later, it isn't on my current machine.
If anyone is interested, here is my NegaPosi generator:
def generate_np(str, width=64)
(str+"\0").gsub(/./) do |b|
("%08b"%b[0]).tr('01','-+')
end.scan(/[-+]{#{width}}|[-+]+/) do |line|
puts line.reverse.ljust(width)+'_'
end
end
It can take a parameter to output different widths (which don't affect the
processing of the NegaPosi "code.") I took a more functional approach in
this, but I suspect SASADA Koichi's is more efficient.
Ryan
str.scan(/.{1,8}/m).map{ |s| s.reverse
}.join.unpack('b*')[0].tr('01','-+').scan(/.{1,64}/).map{ |s| (s << ('
' * 64))[0,64]<< '_' }.join("\n")
Paul.
OK, that *was* one line before I posted it. Let's try again:
I was somewhat scared that it would compile to yarv bytecode :)
Isn't NegaPosi going to be YARV's intermediate language?! ;-)