Codish Lexicon

One word for one meaning, One meaning for one word,
Symmetric opposites, Comprehensive classes.
A dictionary of computer programming names.

stateless — an attribute of a function that connotes that a function will always return the same result for given input.   opposite: stateful   classes: abs, absolute, add, div, first, mul, pad, reversed, slice, sub   mentioned: expression, getset, transitive

stateful — an attribute of a function that indicates that a function may not always return the same result for given input because the result depends on state like an input stream or scope values.   opposite: stateless   related: idempotent   see: state   classes: complete, getset, reverse, update   mentioned: closure, count, in place, statement

abs — absolute value.   returns the positive reflection of negative integers, returning positive numbers as they were.   a transitive function that maps integers into the natural number line.   distinct: absolute   is: stateless, idempotent   related: neg   python: abs(number) -> number Return the absolute value of the argument.   perl: [number]: absolute value function   php: absolute value &dagger.   distinct: pos   related: positive

absolute — returns the fully qualified path for a given path and the cwd.   is: stateless, idempotent   distinct: abs, normal, canonical

add — returns the result of adding values arithmetically.   opposite: sub   is: arithmetic, stateless   related: zero   python: set: Add an element to a set. This has no effect if the element is already present.   related: bale, or, sum   aka: concat, merge, plus   distinct: extend   mentioned: complexity function, end, identity, magnitude, neg, non polynomial time, signed

pad — pad a numeric string with a particular character, "0" by default, on either the left or right side or into the "center" or distributed among the interpolated spaces as in justify, by default left, so that the resultant string has a given minimum length.   is: stateless   related: sprintf   related: center   aka: zfill

example: pad("1", 3) eq "001"

example: pad("1", 3, " ") eq " 1"

reversed — returns the reversed form of an iterable.   is: stateless   distinct: reverse   opposite: reversed   python: reversed(sequence) -> reverse iterator over values of the sequence Return a reverse iterator.   aka: array reverse   mentioned: ed, next

slice — returns the corresponding values for a given range of indicies (indexy).   is: stateless   python: slice([start,] stop[, step]) Create a slice object. This is used for extended slicing (e.g. a[0:10:2]).   aka: array slice   mentioned: indices

sub — calculates a difference of the latter from the former.   opposite: add   commute: diff   distinct: subscript   is: arithmetic, stateless   related: zero   perl: [control flow]: declare a subroutine, possibly anonymously; see: [function]   mentioned: identity

expression — an element of a program's syntax, typically used to express stateless computation through function application (apply), including algebraic operators.   aka: term   mentioned: destructure, eval, heap array, literal, lvalue, return, statement, whether

getsetdict: get the value for a given key, beforehand setting the value for the key to a default if no key exists yet.   is: stateful   distinct: get with a default value is stateless as it does not modify the object when it returns the default value.   pertains: collection

state — data that is relevant to the flow of an algorithm at a particular time, sometimes representable as a cursor pointing at a vertex in a graph or machine.   the cursor in a machine.   an observable state sends a signal when a cursor arrives at the state.   aka: stateful   mentioned: continuation, iteration, protocol

idempotent — (1.) of unary functions, converging on a return value when reapplied, as when the returned value of one application is passed back as a parameter.   a unary function, f, is idempotent iff f(x) eq f(f(x)).   (1.a.) an attribute of a unary function that denotes whether the function is idempotent for all values in its domain.   (2.) of binary functions, returning the same value when that value is passed to both parameters.   a value is idempotent for a binary function iff f(x, x) eq x.   a binary function, g, is idempotent iff f(x, x) eq x for all x in its domain.   (2.a.) a binary function that returns whether a particular value is idempotent for a given binary function, meaning f(x, x) eq x.   (2.b.) an attribute of a binary function that denotes whether the function is idempotent for all values in the domain of both parameters.   classes: abs, absolute, normal   related: stateful

complete — to copy the items from a source dictionary to a target if no item exists on the target collection with the respective key.   complete(target, source)   related: update   distinct: ready, done   is: stateful   concept: pertains to trees for which every leaf has the same depth, and every other child has a vertex for every possible child edge.   pertains: dict   see: done

reverse — to reverse a linear collection in place.   is: stateful   distinct: reversed   opposite: reverse   aka: tac   python: list: L.reverse() reverse *IN PLACE*.   perl: [list]: flip a string or a list   aka: array reverse

update — to copy all items from a source dict to a target, overwriting any existing items with the corresponding key, but preserving all other items.   related: complete   is: stateful   python: dict: D.update(E, **F) -> None. Update D from E and F: for k in E: D[k] = E[k] (if E has keys else: for (k, v) in E: D[k] = v) then: for k in F: D[k] = F[k].   python: set: Update a set with the union of itself and another.   pertains: dict   distinct: extend, merge

stream — a source or target for an ordered progression of values, usually characters in text by way of read and write. input streams are iterable.   is: iteration

scope — an object that associates symbols or names with values for a block of code and can include a ref to another scope to defer to if a symbol does not exist, conceptually forming a stack with the current scope at the head.   related: function   aka: lexical scope   distinct: local   mentioned: closure, context, def, enclosure, global, keyword, stateful, var

valuedata of any class.   see: def, variable   aka: datum   related: dict

closure — a function and a ref to the frame it was defined in.   an object that represents a function (for behavior) and the context in which it was created at run-time (for stateful data captured in the scope).   the availability of closures in a language is predicated on run time gc of scopes, with a scope tree instead of a scope stack.   related: enclosure, function

count — a stateful destructive operation that returns the number of values in an iteration.   distinct: length   python: list: L.count(value) -> integer return number of occurrences of value.   python: str: S.count(sub[, start[, end]]) -> int Return the number of non-overlapping occurrences of substring sub in string S[start:end]. Optional arguments start and end are interpreted as in slice notation.   python: unicode: S.count(sub[, start[, end]]) -> int Return the number of non-overlapping occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.   php: count all elements in an array, or properties in an object &dagger.   distinct: len   pertains: iterable   mentioned: fewest, most, range

in placeconcept: to statefully modify an object, such that the returned object is the modified parameter or context object.   mentioned: extend, push, unshift

statement — an element of a program's syntax that may express stateful operations like assignment, control flow like if and while, or the evaluation of an expression.   mentioned: apply, block, control flow, exec, lvalue, return

neg — arithmetic negation.   number: mul -1.   integer: returns the two's complement, which means to not2 then add 1.   distinct: not, not2, negative   related: abs, negative   mentioned: scalar, signed

postemporal: position.   distinct: positive, abs, index, key   perl: [regex]: find or set the offset for the last/next m//g search   php: alias of current() &dagger.   see: index   aka: position   mentioned: remove, shift, time, unshift

integer — pertains to number values that are positive, negative, and zero, but have no mantissa.   integers have arbitrary magnitude.   distinct: int   distinct: natural, whole   mentioned: abs, bitwise, genericity, pointer, rational, real, ref

transitive functionconcept: a unary function that consistently returns the corresponding value in a range for a given key in a domain.   distinct: relation, binary relation, transitive relation

map — a function that returns the respective values for an linear collection of keys and a transitive function.   commute: each   python: map(function, sequence[, sequence, ...]) -> list Return a list of the results of applying the function to the items of the argument sequence(s). If more than one sequence is given, the function is called with an argument list consisting of the corresponding item of each sequence, substituting None for missing values when not all sequences have the same length. If the function is None, return a list of the items of the sequence (or a list of tuples if more than one sequence).   perl: [list]: apply a change to a list to get back a new list with the changes   aka: array map   pertains: iterable   related: pair   mentioned: abs, binary relation, enumerate, equivalence relation, font, zip with

natural — pertains to number values that are positive or zero.   natural numbers have arbitrary magnitude.   distinct: integer, whole, uint   mentioned: abs, binary, digit, unsigned

numberconcept: a whole, natural, integer, real, or complex numeric value.   a transitive function that returns the corresponding number, usually limited to a subset of the real domain like int or float.

normalfile system: returns the one equivalent path that does not include parent ("..") and self (".") path components.   is: idempotent   distinct: canonical, absolute   geometry: a binary relation between a line and a plane that returns whether the line is perpendicular with every intersecting line in the plane.   distinct: perpendicular, orthogonal

path — a list of edges that a cursor can traverse starting at a given vertex and stoping at another.   related in the context of file system paths: normal, absolute, canonical   aka: segment, segments   related: edges   mentioned: canonize, parent

cwd — the current working deirectory   aka: pwd   unix: pwd   mentioned: absolute

zero — returns the arithmetic identity of a class, object, or group. this is a value that when added to any value of a particular class returns the same value. for numbers, this is the value of zero (0). for any collection class, this is an empty collection. for a string, this is a null string, "". for a tuple, this is the nuple.   related: unit   related: add, false, sub

identity: x add x.class.zero = x

bale — transforms an iterable into a list of accumulated sub-lists of a given length.   related: zip, add   aka: xargs   pertains: iterable

baled([1, 2, 3, 4]) eq [[1, 2], [3, 4]]

baled([1, 2, 3, 4, 5, 6], 3) eq [[1, 2, 3], [4, 5, 6]]

baled([1, 2, 3, 4, 5], 3) eq [[1, 2, 3], [4, 5]]

baled([1, 2, 3, 4, 5], 3, 0) eq [[1, 2, 3], [4, 5, 0]]

shell idiom: input | xargs -n 2

orlogical disjunction.   related: and, or2, union, add   opposite: and, nor   mentioned: le, nor2, nxor, xor

Truth Table
X Y X or Y
0 false false false
1 false true true
2 true false true
3 true true true

sumreduces an iterable collection of numbers to the sum total of all the values with add and zero as a basis. values are not necessarily numbers.   related: add, product   python: sum(sequence, start=0) -> value Returns the sum of a sequence of numbers (NOT strings) plus the value of parameter 'start'. When the sequence is empty, returns start.   aka: array sum

extendpython: to augment a linear collection in place by adding all of the values of another collection to the end.   javascript: the idiom for extend in javascript is to call push variadically, as in this.push.apply(this, other).   presently has no codish name.   distinct: update, add   related: push   python: list: L.extend(iterable) extend list by appending elements from the iterable.   mentioned: poshy

concat — to add ordered linear collections like strings and arrays.   see: add   see: cat

plussee: add

set — to assign a value for a key in an item.   in math, a set is a collection of unique values that meet certain criteria. to avoid ambiguity, such collections are called bags in codish, or uniques in seuss.   distinct: unique, bag   pertains: collection   python: set(iterable) -> set object Build an unordered collection of unique elements.   distinct: put, save, set attr   aka: store

next

blog comments powered by Disqus