wiki:IdeasAndConcepts

Basics

There are some basic ideas and concepts one should be familiar with in order to participate in a meaningful conversation with us.

  • Code is data - from the CPU perspective, code and data are numbers in memory, however from the language perspective, expressions are lists (well, trees) of symbols. There are some meaning or value behind each symbol. This is where miracles occur.
  • Pointers - an address of some location (byte) in memory. It could be physical or virtual address. It is just a number (of a byte), like a number of a house on a street. Words of language are symbolic pointers to its meaning (associations).
  • Stack and Calling Convention - the most important things to understand how programs work and why it is the way it is.
  • Functional Programming - a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. The path to parallel processing.
  • Environment - In Functional programming, the environment is (a pointer to) the table (or a function) which maps variable names (symbols) on to their values (or some code). It represents a context in which names have some meaning or values.
  • Continuation - is (a pointer to) an object that represents the computational process at a given point in its execution. It could be called the snapshot of a process, its current state.
  • Closure - it is an object, a bunch of pointers to the body of some procedure and its environments (there is more than one of them), to the snapshot of a process (continuation), etc.
  • First-Class Function - it is a pointer to a procedure along with its environments (a closure) which could be passed in a language as an argument to a function, or used as a return value' or stored in a variable.
  • Higher-order Function - a kind of procedure that either takes one or more procedures (closures) as its arguments, or returns a procedure (a closure). map / reduce are best known ones.
  • Recursion - when a function calls itself with a new set of arguments (and new environment) to avoid looping using local state variables.
  • Lazy Evaluation - delayed evaluation i.e. producing the procedure's return value on demand, when the code is actually attempting to use it. Have you ever heard about iterators?
  • Memoization - is about storing values of variables between recursive calls (in the environment), or just caching.
  • Persistent data structure - an immutable object, whose state cannot be modified after it is created. The new copies of (pointers to) the same immutable data will be created and used instead.
  • Hash tables - Almost everything could be made out of cons cells, lookup tables, vectors and matrices, trees, but hash tables are closures. They could be implemented as Pluggable Primitives (idea form Smalltalk).
  • Plug-ins - it is the way to implement some special features with highly optimized hand-written assembly language, like SSE4.2 matrix manipulation or GPGPU map/reduce operations.
  • Foreign Function Interface - is the way to reuse the code written by other talented engineers, usually in from of shared libraries. In contrast with plug-ins we just allocate and initialize required data-structures and makecalls to the procedures.
  • Pipeline - is a set of data processing elements connected in series, so that the output of one element is the input of the next one. Where the power of UNIX comes from.
  • Stream - is an infinite sequence (a list of symbols or numbers) which comes from a port or a channel or a pipe.
  • Message Passing - is the most natural way of communication between objects, processes or systems. It about mapping a set of symbols in a stream which an object could recognize, to a set of rules or procedures that it could execute.
  • YAML - is a human-readable (and human-friendly) data serialization format. Readability counts.
  • Asynchronous I/O
  • Scheme Programming Language - The minimalistic and stylish implementation of big ideas by smart engineers. The most wonderful language existing.
  • Common Lisp - was developed to standardize the divergent variants of Lisp thus it is not an implementation but rather a language specification. This is what happened when committees are formed.

Immutable data

Rule-governed behavior

Delegation

Message passing

Hardware assisted atomic operations

Lock-free algorithms

The Implementation of Functional Programming Languages

Last modified 8 years ago Last modified on Apr 8, 2012, 2:17:21 AM
Note: See TracWiki for help on using the wiki.