Codish Lexicon

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

attrs — a collection of attr for an object's attributes.   is analogous to items on a dict.   in javascript, attrs and items are the same except for arrays and strings.   aka vars in python.   aka: symbols, vars

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

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

varssee: attrs   python: vars([object]) -> dictionary Without arguments, equivalent to locals(). With an argument, equivalent to object.__dict__.

attr — an attribute of an object.   a setable and getable value associated with a symbol or name in an object.   in some languages, attributes are either private, protected, or public.   distinct: item   python: property   c++: member   aka: member, property   related: pair

object — an instance of a class.   see: set attr, get attr, has attr, del attr   python: The most base type.   distinct: dict   aka: instance, record, struct, structure

items — returns a collection of key to value items (aka duples, pairs) for a dict.   python: dict: D.items() -> list of D's (key, value) pairs, as 2-tuples.   pertains: dict   aka: pairs   mentioned: attrs, update

dict — an unordered linear collection (particularly a set) of items that expresses a relation of keys (domain) to values (range).   in systems where dict inherits bag, it overrides the hash and eq attr functions.   is: collection, bag   attrs: keys, values, items, update, complete   related: item, key, value   distinct: object   perl: hash   seuss: a saque of items.   python: dict() -> new empty dictionary.; dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs.

array — an ordered linear collection implementation that employs a region of contiguous memory where each value is stored at an index offset from the beginning of the memory region.   a linear collection that provides fast random access and iteration to its values with get, set, and iter.   php: create an array &dagger.   related: chain   interface: linear collection, ordered

string — an ordered, though not sorted, collection of characters.   is: linear collection   seuss: text   aka: word

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

shoft — to remove and return the last element of a linear collection.   opposite: shift, posh   aka: pop   perl: pop   legacy: pop   mentioned: deque

array shiftsee: shift   php: shift an element off the beginning of array &dagger.

pipsee: shift

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

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

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

bag — an unordered, nonunique collection that provides insert, remove, and discard as its function attributes of storage and retrieval.   shift or pop are aliases for remove; push and unshift are aliases of insert.   attrs: insert, remove, discard   is: linear collection   a sorted linear nonunique collection that provides insert and (shift or pop) as its storage and retrieval methods.   seuss: bague   distinct: heap   aka: priority queue, pqueue   distinct: set   aka: sack   classes: dict   related: priority   mentioned: adjust, baque, group, hash, saque, trie

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

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.

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

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

array unshiftsee: unshift   php: prepend one or more elements to the beginning of an array &dagger.

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

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

dir — a file system directory, usually represented with the same interface as a dict.   python: dir([object]) -> list of strings Return an alphabetized list of names comprising (some of) the attributes.   php: return an instance of the directory class &dagger.   aka: directory   see: symbols   mentioned: parent

keys — returns the keys from the domain of a dict.   python: dict: D.keys() -> list of D's keys.   perl: [hash]: retrieve list of indices from a hash   aka: array keys   pertains: dict   mentioned: symbols

propertysee: attr   python: property(fget=None, fset=None, fdel=None, doc=None) -> property attribute fget is a function to be used for getting an attribute value, and likewise fset is a function for setting, and fdel a function for del'ing, an.

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

get — returns the value corresponding to a key in a collection. throws a key error if no value exists for the key, or returns a default value if one is provided as the optional second parameter.   pertains: collection   python: dict: D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None..   distinct: at, get attr, load   aka: lookup   mentioned: array, attr, cut, getset

symbol — a unique key for the value of an attr on an object.   symbols can be used to accelerate attribute lookup, and to provide a way to avoid name collisions for interface implementations. symbols can be integers with a non-unique string representation.   aka: word   mentioned: aliaser, del attr, get attr, override, polymorphism, scope, semantics, set attr, syntax

name — a string used to look up a variable in a context   python: file: file name.   aka: nomen, term, word

next

blog comments powered by Disqus