it may only be relevant to people who support free software and who have argued for or against free cultural licenses for non-software works.
it converts arbitrary english essays (or other essays written in ascii) to python (2/pypy 2) code.
a hello world program:
Code: Select all
%bbvahpbvaepbvalpbvalpbvaopibap vawpbvaopbvarpbvalpbbvadp
richard stallmans "saying no to unjust computing even once is help":
"the right to read":
i realise these are not spectacular outputs. there is a clear screen command, and the language is not only "graphical"-- it also sets variables, lets you create loops, clear and append variables, do conditionals--
stallmans "the right to read" compiles to 29 kloc, the last dozen lines of which are:
Code: Select all
if locolour < 0: locolour = 7
colour(locolour, 0)
xy(locx, locy, locolour)
for loop747 in range(figure('r', vars, 'n')):
if locx > 0: locx -= 1
xy(locx, locy, locolour)
locolour -= 1
if locolour < 0: locolour = 7
colour(locolour, 0)
vars['r'] = ''
lutog = 0
colour(7, 0)
Code: Select all
# % turn on/off printing
# @ quit program
# a, A cycle colour backwards
# b, B cycle colour
# c, C copy next variable value to following character variable
# d, D move down most recent variable value
# e, E toggle print default upper/lower (starts lower)
# f, F move to 1, 1
# g, G get next character variable value
# h, H append next variable value to following character variable
# i, I set next variable to empty string
# j, J fi
# k, K if most recent variable value is true, do the following
# l, L move left most recent variable value
# m, M convert most recent value to uppercase
# n, N convert most recent value to lowercase
# o, O set next variable to 0
# p, P print most recent variable value
# q, Q exit loop early (limited)
# r, R move right most recent variable value
# s, S turn off print default case
# t, T set next variable to random number 0 to 99
# u, U move up most recent variable value
# v, V set next letter to following character
# w, W loop most recent variable value times
# x, X mark end of loop
# y, Y wait next value seconds
# z, Z clear screen
if you have python2 installed, you can use that instead of pypy:
cat saying-no-even-once.txt | python2 diogenes.py > man.py ; python2 ./man.py
as usual, this isnt really a zip file. just rename it without the .zip