2012-09-21

vocabulary size conversion

7.11: adde/vocabulary size conversion:
. if you'd rather not learn a large collection of library calls
it should convert imported source code
by expanding each 5-dollar word
into a paragraph of 5-cent words .
. this could have the side-affect of running slower
because the 5-dollar words are
packing a lot of code into a c module .
. so it might be useful to implement it
only at the presentation layer;
ie, if you don't modify the expansion,
then it converts the expansion back to its 5-dollar word .
9.5:
. another way of putting that,
is that addx should be giving you a dual library
where everything is visible as adda code,
but it's mostly impl'd in c code,
unless you change the c's adda twin,
in which case it compiles that adda change into c,
and then, of course, into a binary .
. notice how Python does it differently:
it auto'compiles your scripting to Python bytecode;
but porting to C requires manual effort .
. the reason for this is that most Python code
makes extensive use of the Python virtual machine,
and there is efficient translation from Python to C;
rather, it takes human skill to sort out
where the hotspots are, and how to untangle them
for separation into a C file .
. adda, on the other hand,
encourages explicit typing;
and, if the user has done that,
then conversion to C should be easy and useful .
. adde should be tracking user's
adda file modifications,
and not bothering to C-translate it
until the user seems to be done tweaking it .