Codish Lexicon

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

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

list — a linear collection that provides fast put, push, pop, shift, and unshift operations.   an ordered nonunique linear collection.   applies to directory listing.   distinct: symbols   includes: queue, deque, staque   python: list() -> new list; list(sequence) -> new list initialized from sequence's items.   php: assign variables as if they were an array &dagger.

edge — a connection in a graph that starts at one vertex and stops at another.   mentioned: atan, complete, depth, graph, machine, path, stable, transitive relation, transitive

cursor — a number or a pointer to a position in any number of dimensions.   aka: pointer   distinct: ref

start — to start moving a cursor from the beginning of a stream.   distinct: begin, boot, halt   opposite: stop   aka: boot, play

vertex — a point in a graph.   plural: vertices   distinct: node   aka: node

stop — to stop a moving cursor and send the cursor to the beginning of a stream or machine.   distinct: end   related: finish, halt   distinct: abort, halt, shutdown   aka: boot   opposite: start   mentioned: edge, event, path, restart, return, run, temporal, wait

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

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

canonizeconcept: to convert a path to a canonical path, usually with the canonical transitive function.   aka: canonicalize

parentfile system: a directory arrived at by the path component "..". the root of a file system often has a parent link to itself.   related: child, root, leaf, base, ancestor, descendant   opposite: child   transitive: ancestors   mentioned: heap array, normal, parent class

queue — a linear collection that only provides shift and push for storage and retrieval, such that the first value pushed is always the first value shifted (fifo).   queues operations are often atomic, so they can be used to pass messages safely between threads or processes.   aka: dequeue, enqueue   distinct: signal   mentioned: linear collection, list, ordered, que

deque — an ordered linear collection that provides shift, unshift, push, and pop as its storage and retrieval functions. a deque can be implemented as a list or a regrowable, cyclic array.   seuss: an ordered linear que that provides shift, shoft, pish, and posh as its storage and retrieval functions.   mentioned: linear collection

symbols — a collection of symbols for a given object's attributes (attrs).   is analgous to keys on a dict.   see: attrs   aka: dir   distinct: list

putinsert a value at given key. for non-unique collections like an array or list, put does not replace the value at the given index, but bumps all successive values down 1 position.   distinct: set, insert   pertains: collection

push — to augment a linear collection in place by adding a value to the end.   opposite: pop, unshift   python: append   related: extend   seuss: posh   perl: [array]: append one or more elements to an array   aka: append, array push, enqueue   related: concatenate   pertains: ordered   mentioned: bag, deque, list, queue, stack

pop — to remove and return the last value of a linear collection.   seuss: shoft   python: dict: D.pop(k[,d]) -> v, remove specified key and return the corresponding value If key is not found, d is returned if given, otherwise KeyError is raised.   python: list: L.pop([index]) -> item -- remove and return item at index (default last).   python: set: Remove and return an arbitrary set element.   perl: [array]: remove the last element from an array and return it   aka: array pop   related: first   pertains: ordered   opposite: push, shift   see: shoft   mentioned: bag, deque, stack

shift — to remove and return the first value of a linear collection.   python: the idiom for shift in python is to pop with a position of zero.   opposite: unshift, pop   seuss: opposite: shoft, pish   perl: [array]: remove the first element of an array, and return it   aka: array shift, dequeue, pip   pertains: ordered   opposite: shoft   mentioned: bag, deque, list, queue

unshift — to augment a linear collection in place by adding a value to the beginning, moving existing values rightward.   python: the idiom for unshift in python is to use insert with a position of zero.   aka: bump, propend, prepend   seuss: pish   perl: [array]: prepend more elements to the beginning of a list   aka: array unshift   pertains: ordered   opposite: push, shift   mentioned: bag, deque, list

appendsee: push   python: list: L.append(object) append object to end.

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

block — a list of program statements.   distinct: wait, join   mentioned: apply, raise, scope

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

enumerate — to assign nominal values to each respective value in a list, effectively creating the map that relates each ordinal offset in a list with its respective value.   python: enumerate(iterable) -> iterator for index, value of iterable Return an enumerate object. iterable must be an other object that supports iteration. The enumerate object yields pairs containing a count (from zero) and a value yielded by the iterable argument. enumerate is useful for obtaining an indexed list, (0, seq[0]), (1, seq[1]), (2, seq[2]).   mentioned: next

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

filter — to return a stable copy of a list omitting all of the values that fail a given condition (boolean function).   distinct: where   python: filter(function or None, sequence) -> list, tuple, or string Return those items of sequence for which function(item) is true. If function is None, return the items that are true. If sequence is a tuple or string, return the same type, else return a list.   pertains: iterable

has — returns whether a collection contains an value.   returns whether a list contains a value.   returns whether a dict contains a key.   has(collection, value)   distinct: in   aka: contains, exists   aka: array key exists, has key, has value, includes   pertains: collection   distinct: has attr   commute: in   mentioned: complexity function, discard

index — a key number for an ordered linear collection.   finds the first value that matches a given value and returns its key number. otherwise returns -1 to indicate failure.   opposite: last index   aka: offset, pos   python: list: L.index(value, [start, [stop]]) -> integer -- return first index of value.   python: str: S.index(sub [,start [,end]]) -> int Like S.find() but raise ValueError when the substring is not found.   python: unicode: S.index(sub [,start [,end]]) -> int Like S.find() but raise ValueError when the substring is not found.   perl: [string]: find a substring within a string   distinct: find, pos

insert — to add a value to a collection.   opposite: remove   python: list: L.insert(index, object) insert object before index.   pertains: bag, collection   distinct: put   mentioned: unshift

join — to interpolate a delimiter between a list of texts.   to interpolate a list between a list of lists.   aka: implode   distinct: wait   python: str: S.join(sequence) -> string Return a string which is the concatenation of the strings in the sequence. The separator between elements is S.   python: unicode: S.join(sequence) -> unicode Return a string which is the concatenation of the strings in the sequence. The separator between elements is S.   perl: [list]: join a list into a string using a separator   php: alias of implode() &dagger.   distinct: block

linear collection — a collection for storage and retrieval of values in a 1-dimensional domain. linear collections can be ordered, sorted, or unordered. linear collections can be unique or nonunique. linear collections may be mappings.   interfaces: list, bag, dict, queue, deque, stack   implementations: array, chain, tree, hash array, heap array, trie   classes: bag, string   is: collection   mentioned: bague, hash

Linear Collection Classes
ordered nonunique list, deque, queue, stack
ordered nonunique mapping ordered multi dict
ordered unique ordered bag
ordered unique mapping ordered dict
sorted nonunique sorted multi bag
sorted nonunique mapping sorted multi dict
sorted unique sorted bag
sorted unique mapping sorted dict
unordered nonunique multi bag
unordered nonunique mapping multi dict
unordered unique bag
unordered unique mapping dict

Some collections are defined by the subset of the collection interface that they implement. By declaring the subset of a collection interface that you intend to use, you provide performance optimization opportunities for the underlying implementation. For example, if you only use push and pop, the implementation can be chain with nearly instantaneous storage and retrieval.

Ordered Nonunique Collection Interfaces
push pop shift unshift random access interface
push pop shift unshift random access list
push pop shift unshift deque
push shift queue
push pop stack

matrix — an ordered planar collection of numbers with certain algebraic properties and pertinent functions.   a matrix is not ragged.   a rectilinear list of lists of numbers with certain algebraic properties.   distinct: table   mentioned: math, unit

remove — removes a value from a collection, based on its value, not its key or position.   opposite: insert   distinct: del, erase   aka: rm   python: list: L.remove(value) remove first occurrence of value.   python: set: Remove an element from a set; it must be a member. If the element is not a member, raise a KeyError.   pertains: bag, collection   aka: unlink   mentioned: discard, strip, strop, trim begin, trim end, trim

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

seq — an ordered lazy linear collection defined by a basis and recursive function.   seq takes a variadic list of basis parameters (the first values of the sequence). The last parameter is the recursive function.   the Fibonacci sequence can be lazily generated with the lazy iteration returned by seq(1, 1, add).   mentioned: seed, seque

sort — to arrange a linear collection in strictly non-descending order in place given a suitable definition of comparison. To sort implies a guarantee of "strong" sorting; that is, equivalent elements retain their relative positions to one another.   distinct: sorted   python: list: L.sort(cmp=None, key=None, reverse=False) stable sort *IN PLACE*;; cmp(x, y) -> -1, 0, 1.   perl: [list]: sort a list of values   php: sort an array &dagger.   mentioned: by, lexicographic, stable

split — returns the list of texts that were interpolated by a delimiter in a given text.   returns the list of lists that were interpolated by a delimiterd in a given list.   aka: explode   python: str: S.split([sep [,maxsplit]]) -> list of strings Return a list of the words in the string S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator.   python: unicode: S.split([sep [,maxsplit]]) -> list of strings Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator.   perl: [regex]: split up a string using a regexp delimiter   php: split string into array by regular expression &dagger.

uniq — a version of unique that returns a list of only the unique values of an iteration assuming that they are in sorted order, which is to say that it reduces repeated values in order to a single value.   related: unique

next

blog comments powered by Disqus