I think it can be useful to make some pseudo-code abstractions that are language
independent and provide different ways to realize them (as opposed to just
directly translating it to 1 statement per language)
You can make pseudocode abstractions for actions
so you don't have to explain the entire thing in multiple entries. they should
have a fixed syntax (unlike normal entries)
This maybe too ambitious, but we can try to explain the java or lisp syntax and
workings in terms of these abstractions so programs can learn
things about how to understand or write code
entry: to make a program in a language, make sure you only have
pseudocode abstractions and you can translate them all into code of that language
abstraction: [x] is lisp-code
means x is a lisp code statement
abstraction: [x] is lisp-code
x is probably be a list
abstraction: let [ x ] be an empty list
can be visualized as a putting an empty list in the box named x
abstraction: let [ x ] be an empty list
make a variable with nothing in it
abstraction: let [ x ] be an empty list
do [(setq x ())] in lisp
abstraction: do [x] in lisp
x should be a lisp-expression or you should alert something
abstraction: let [ x ] be an empty list
java-code List x = new List()
abstraction: let [ x ] be an empty list
can be done by removing everything inside the box named x
entry: an empty variable can be visualized as a box with nothing in it
entry: add something to a list
pseudocode: make a variable with name [ x ]
..
pseudocode: let [ x ] be an empty list
can be done by doing set [ x ] to [ empty list]
pseudocode: add [y] to list [x]
can be done in lisp by …
pseudocode: add [y] to list [x]
you should try to see x as a list before doing this
pseudocode: set [ A ] to [ B ]
can be visualized as deleting what is inside A
and setting whatever B is inside the box named A
pseudocode: set [ A ] to [ B ]
execute (setq A B) in lisp
pseudocode: set [A] to [B]
can be done in java by executing a = b
pseudocode: execute [A] in java …
A should be a valid java expression
pseudocode: execute [A] in lisp
…
entry: a class is a collection of variables and functions
entry: you can see a class as a list of functions and variables
entry: if objects have something in common, you can make a class
for them and define functions for it
entry: java-class is roughly a list of variables and functions
entry: java-function takes parameters with a certain type
and has java statements in its body
entry: lisp-function
entry: lisp is a programming language
cyc: http://opencyc1.cyc.com:3602/cgi-bin/cyccgi/cg?cb-start
entry: java is a programming language
cyc: http://opencyc1.cyc.com:3602/cgi-bin/cyccgi/cg?cb-cf&c64461
entry: programmng languages have syntax rules
entry: Lists
Lists can be seen as linked variables, with every list element being
a point and the links directional lines between points. (See entries-line-drawings)
Cyc: http://opencyc1.cyc.com:3602/cgi-bin/cyccgi/cg?cb-cf&c60071
entry: An empty list can be visualized as nothing (empty space)
entry: An empty list can be visualized as a variable pointing to Nil (or null)
entry: A list element can be seen as a box with 2 variables, one containing an object
and another containing the position of another list element
entry: A list can be a database containing an ordered array of items (from wordnet)
http://wordnet.princeton.edu/perl/webwn
entry: Null or nil can be visualized as a special constant position in space
entry: null or nil can't be visualized as a position in space
entry: A variable can be seen as a box containing a value (natural number) with
a name to find it.
entry: Loops
entry: Lisp-list
An empty list in lisp can be made with ()
Cyc: http://opencyc1.cyc.com:3602/cgi-bin/cyccgi/cg?cb-cf&c71451





