=====================
== avisiblenetwork ==
=====================
seeing the invisible

Conditional Expressions

Abelson and Sussman introduce some dynamism into their procedures by using conditional statements. The procedures in the previous sections were simple and were unidimensional because they would only express what was initially given by the program. By incorporating conditional statements, the procedures can now respond to outcomes according to a set of rules. Conditions are set primarily with predicates, which are statements that return or evaluate to true or false. If the predicate returns true, the consequent expression is executed, while if the predicate returns false, an alternative is executed or the procedure is undefined. Read more...

Substitution for Procedures

Substitution is a convenient way to think about how procedures operate, especially compound procedures that we ourselves define. In the previous post, I illustrated how the function of f was under the hood by writing out all of its parts: (+ (* (+ 3 1) (* 4 2)) (* (+ 3 1) (* 4 2))). This is what substitution offers. One starts with retrieving the procedure, in this case, sum-of-product, and then product. Read more...

Compound Procedures

Compound procedures provide another means of abstraction similar to naming elements. It is an extension of primitive procedures, i.e., it is the combination of primitive procedures. It includes all three aspects of a programming language: primitive elements, a combination of those primitive elements, and the packaging of those elements as a unit to be abstracted. This allows for greater flexibility and functionality in a program. As it is an extension of primitive procedures, I will only present how to build a compound procedure in Common Lisp. Read more...

Evaluating Combinations

In order to process a program, the program breaks itself up into smaller units to evaluate. In doing so, it comes across a combination of primitive expressions laced together with operators and operands. When the interpreter evaluates these combinations, it first evaluates the left most combination, which is made up of primitive elements, and moves rightward. As the interpreter evaluates the first primitive elements, it evaluates the combined elements. This is why programs are said to be recursive in nature i. Read more...

Naming

Naming an object in a computer language, or in general, is one of the most important actions that can take place. It is the first instance of an abstraction and leads to combinations and complexity. Complex programs are nothing but a combination of these simple abstractions. More abstractions does not mean something is better; rather, it simply means that there are many layers in the program. In common Lisp, (defvar size 2) will assign the value of ‘2’ into the variable ‘size’. Read more...

Elements and Expressions

Abelson and Sussman introduce the simplest elements of programming in LISP as a springboard to discuss the inner workings of programming. They propose that a language is based on three components: the primitive expressions (simplest building blocks), means of combining those expressions, and means of abstracting those compound elements for manipulation. This idea is grounded in John Locke’s framework of the human mind as quoted in the previous section. SICP further divides elements into data and procedures. Read more...

Building Abstractions

The first section of SICP looks at the process, i.e., the relationship and glue between data, and uses LISP as a means to conceptualize this relationship. Abelson and Sussman attempt to separate the “abstract” and invisible logic from the data that this relationship manipulates. They use LISP, LISt Processing, to bring out that underlying logic and treat the relationship as a conceptual object in itself. With LISP, they can name and control the movement of bits (process) through rules (LISP’s syntax), which manipulates data (building blocks). Read more...

SICP Preface

Structure and Interpretation of Computer Programs opens with a bang by focusing on programming as a thought process of doing something and emphasizing the how of programming and not the what of programming. Many resources that teach programming gravitate towards implementing a specific language and focus on its syntax. This is useful when trying to find a job, but does not offer much explanation on how programming itself works. SICP attempts to abstract from the language, not to distance itself from programming, but to synthesize and fully conceptualize the underlying structures of programming. Read more...
1 of 1