Abstract: Joy is a functional programming language based on the composition of functions taking one stack as argument and yielding one stack as value. Stacks can contain values of simple types such as truth values, characters and integers, and values of aggregate types such as sets, character strings and quoted programs with lists as a special case. The stack functions include the usual operations such as addition, comparison and list manipulation, but also many new kinds of functions which dequote quoted programs in various ways. These new functions behave like higher order functions, such as conditionals, various forms of recursion, and for aggregates the map, fold and filter functions. This paper gives an overview of the basic programs from which others are built by composition and quotation.
Keywords: functional programming, function composition, higher order functions, quotation and dequotation of programs, combinators.
Joy programs denote functions which take states as arguments and as values. Programs are built from atomic programs which also denote functions which take states as arguments and as values. The meaning of compound programs has to be given in terms of the meanings of atomic programs. It is useful to classify atomic programs into categories depending on what kind of function they denote. A coarse classification distinguishes just three, called 1) the literals, 2) the operators and 3) the combinators.
Firstly, the literal atomic programs are those which look like constants in conventional languages. They comprise literal numbers (or, more correctly, numerals) such as integers, and other literals of type character, string, truth value and set. Literals do not denote numbers, characters, strings and so on, but they denote functions which take one state as argument and yield as value another state which is like the argument state except that the value of the literal has been pushed onto the stack component.
Secondly, the operator atoms are those which look like n-ary operators in other languages. They include the operations such as for addition and the other arithmetical operations, and for the various operations on other types. Like all programs, operators denote functions from states to states, but the functions are not defined on all states. An n-ary operator (such as the binary addition operator) denotes a function which is defined only on states whose stack component has n items (such as two integers) on top.
The function yields as value another state which is like the argument state except that the n items on the stack have been replaced by the result (such as the sum).
Also included as operators are those atoms denoting mere structural
functions of the stack component such as dup
,
swap
and pop
, and those that involve input and
output such as get
and put
.
Thirdly, the combinator atoms are like operators in that they require the top of the stack to contain certain items. But unlike operators, they do not treat these items as passive data. Instead they execute these items - and hence those items must be quoted programs. So, combinators also denote functions which are defined only on states having the appropriate number of quoted programs on top of the stack. They yield as values another state which depends on the argument state, including the quoted programs, and on the combinator itself.
Literals, operators and combinators can be concatenated to form programs. These may then be enclosed in square brackets to form literal quotations. Such literals are not atomic, but if they occur in a program they are treated just like other literals: they cause the quoted program to be pushed onto the stack. So, literal quotations denote functions which take any stack as argument and yield as value another stack which is like the argument stack except that it has the quotation pushed on top. Quotations on top of the stack can be treated like other values, they can be manipulated, taken apart and combined, but they can also be executed by combinators. If a quotation contains only literals, then it is a value of the list type. The component literals do not have to be of the same type, and they may include further quotations. If a list is executed by a combinator, then its components are pushed onto the stack.
The remainder of this paper is organised as follows: The next section describes the principal types of Joy and their literals. Following that are four sections on operators, the general ones applicable to all types, then those applicable to simple types such as integers, characters and truth values, then those applicable to aggregate types such as strings, sets and lists, and finally the predicates which return truth values. The following three sections deal with combinators, first those that are independent of any typing, then those specialised to simple types, and finally those specialised to aggregate types.
Some atoms can be applied to any stack and their effect is to push something on the stack. The items that can be pushed are of various types. There are simple types such as integers, characters and truth values. There are also aggregate types such as strings, sets and quoted programs. Atomic programs which push a simple or aggregate value onto the stack will be called literals. A different kind of atom can be applied only to a non-empty stack. Their effect is to re-organise the top few elements of the stack.
Some, like dup, swap and pop, just edit the top few elements. Others expect the top few elements to be of certain types and their effect is to replace these elements by the result of applying a function to them as arguments. These include the arithmetic and relational operators for addition, multiplication and comparisons, and the truthfunctional operators. They also include list operations like concatenation. Collectively all of them will be called operators. A third kind of atoms expect quoted programs on the top of the stack. Like the operators, they pop the quoted programs off the stack. But they do not treat them as passive data structures in the way operators do. Instead they cause the quoted programs to be executed. These are called combinators.
After this rough exposition of the classification it is important to suppress any procedural reading and to revert to the official interpretation of Joy programs as denoting unary functions. So the three classes of atoms, namely literals, operators and combinators, all denote unary functions from and to states which include a stack as a principal component. The remainder of this section will deal with literals.
First, the literals of the integer type. The following is the offical semantics of those atoms that look like numerals:
A digit string such as "123
" denotes not a
number but a function from states to states. For any
state S1 as argument this function yields as its value another state
S2 which is like S1 except that its stack component has an additional
item, the number 123 pushed onto it.
The semantics for the truth value type is similar: The two
symbols true and false denote functions which
for any state as argument yields as value another state which is like
the argument state except that the logical constant true
or false
has been pushed onto the stack. Literals of the
character type can be treated just like small numbers. So, a
quoted character such as 'A
denotes a function taking any
state into another state with that character pushed onto the stack.
The three types of truth values, characters and integers constitute what will be called simple types. They are simple in that their values do not have parts. There are also aggregate types which do have parts. The parts can be extracted by suitable operators and the aggregates can be constructed from their parts. Joy has three different aggregate types: sets of small numbers, strings of characters, and quoted programs, which have lists as a special case.
The set type comprises the usual unordered collections
familiar from set theory. The elements of a set are written inside
curly braces, such as {1 3 5}
. The whole is a literal
atom, and it denotes a function pushing that set onto the stack. For
most implementations on current machines the elements of sets will be
small numbers in the range 0
.. 31
, The
string type of character strings constitutes another
aggregate type. Its literals are written as zero or more characters
enclosed in double quotes, such as "Hello"
. Such a
literal again denotes a function, one which pushes that string.
The third aggregate type is that of quoted programs, or briefly, quotations. Its literals are written inside square brackets. A program consists of zero or more literals, operators or combinators. Enclosing it in square brackets turns it into a quoted program. Quotations denote functions which push the quoted program; the quoted program is not executed, it is pushed onto the stack in "suspended animation". The following are quotations:
[1 2 3] ['A 'B "CDE" {10 11 12}] [pop dup *] [[[]]] [peter paul mary] ["" {} [] [hello "Hello"]A value of the list type is just a special case of a quotation in which the elements are themselves literals. Quotations can contain other quotations, and hence lists can contain other lists.
The following concern connections between quotations and the stack. The stack is normally a sequence of values of various types. This sequence is just a special list which is modified by programs. Since it is a list, it should be possible to put this list on top of the stack - that is to say, on top of itself. Also, it should be possible to make the list on top of the stack become the stack. Finally, it should be possible to create a new, empty stack. There are three operators that do just that:
stack unstack newstackThe stack operator pushes onto the stack a list containing all the elements of the stack. The unstack operator expects a list on top of the stack and makes that the stack. The
unstack
operator undoes what the stack
operator does, but the reverse is true only in special cases.  Also, it should be noted that the stack is not
always a sequence of values, it can also contain operators and
combinators. So, strictly speaking the stack is always a quotation,
and the stack
operator pushes a quotation onto the stack,
and the unstack
operator expects a quotation on the stack
and makes that the new stack.
It is sometimes useful to treat several types together. The numeric types are integers and characters, the Boolean types are truth values and sets, and the sequence types are strings and lists. A leaf is anything which is not a list, and a tree is either a leaf or a (possibly empty) list of trees.
This completes the brief survey of the six principal types and their literals. Other types might be included in more elaborate versions of Joy. Obvious simple types to add are real (and perhaps complex) numbers, and an enumeration type as in Pascal. It is less clear what new aggregate types are useful since lists already are so versatile. Records and arrays are certainly possible. Only files will be considered briefly below.
First, the following unary operators are defined on all stacks containing at least one element:
pop dupThe top element does not have to satisfy any particular condition, it can be of any type. The pop operator removes the top element. The dup operator pushes a duplicate on top, so it replaces the one original by two copies.
The following binary operators are defined on all stacks containing at least two elements:
swap popd popop dupdThe swap operator interchanges the top two elements. The popd operator removes the second element. The popop operator removes the first and the second element. The dupd operator duplicates the second element.
The following ternary operators are defined for all stacks containing at least three elements:
swapd rollup rolldownThe swapd operator interchanges the second and third elements but leaves the first element in place. The rollup operator moves the third and second element into second and third position and moves the first element into third position. The rolldown operator moves the second and first element into third and second position and moves the third element into first position.
There is another ternary operator:
choiceThe choice operator expects three values on top of the stack, say
X
, Y
and Z
, with
Z
on top. The third value from the top, X
,
has to be a truth value. If it is true
, then the
choice
operator just leaves Y
on top of the
stack, and X
and Z
disappear. On the other
hand, if X
is false, then the choice
operator
just leaves Z
on top of the stack, and X
and
Y
disappear. This operator is related to two combinators
ifte
and branch
which are explained in the
next sections.
There is another operator for multi-choices. It expects a non-empty list of non-empty lists on top of the stack and below that one further item.
opcaseThe opcase operator matches the type of the item with the
first
members of the lists. When a match is found, the
rest
of that list is pushed onto the stack. If no match
is found, then the last list is used as the default.
The following two operators handle input and output:
put getThe put operator expects one item on top of the stack, it removes it and writes it to the output file. The get operator expects one item in the input file, it reads it from there and pushes it on top of the stack.
+ - * / % max minThe following unary operators are defined for all numeric types.
succ pred abs signThe succ and pred operators yield the successor and predecessor, respectively. The abs operator computes the absolute value, and the sign operator returns the signum value, an integer which is
-1
, 0
or +1
depending on
whether the parameter is negative, zero or positive.
The following mathematical functions are provided:
fact exp fib nfib gcdThe unary fact operator computes the factorial function. The binary exp operator computes the exponentiation function, the exponent is the top parameter. The binary fib operator computes the Fibonacci function. The binary nfib operator computes a similar function, which is the number of calls which a recursive implementation of the Fibonacci function would need; if this function is implemented recursively, then the number of its calls is the same. The binary gcd operator computes the greatest common divisor.
The type of truth values is one of the Boolean types. The operators are
and or xor notThe three binary operators and, or and xor compute the logical conjunction, inclusive disjunction and exclusive disjunction. The unary not operator computes the negation.
first second third restThe first operator extracts the first element of values of the sequence types string and list. For sets it extracts the first member using the underlying ordering. The second operator expects an aggregate of at least two elements, for sequences it extracts the second element, for sets it extracts the second element under the ordering. The third operator expects an aggregate of at least three members, it extracts the third element. The rest operator expects an aggregate with at least one member, it returns an aggregate which is like the parameter aggregate but has its first element removed.
The following binary operators require an aggregate and a potential member on top of the stack:
cons swonsThe cons operator expects the aggregate on top of the stack and the potential member below. The effect is to add the potential member into the aggregate. In the case of strings and lists the potential member is added in front. In the case of sets the potential member is added only in case it is not already a member. The swons operator does essentially the same except that it expects the potential member on top and the aggregate below. Essentially
swons
is equivalent to the composition
swap cons
, and hence its name. The two operators are
converses of each other.
The following unary operators also require a non-empty aggregate on top of the stack:
uncons unswonsThe uncons operator replaces the aggregate element by two elements, the first and the rest, with the rest on top. The unswons operator does the same, but with the first on top. These two operators differ from other operators in that they leave two values on top of the stack. Such operators would not make much sense in other notations. Their names were chosen because their effect is to undo the effect of the two binary operators
cons
and swons
.
There are two operators for indexing in various ways:
at of drop takeThese four binary operators expect an aggregate and a number. That number is used for indexing into the aggregate. The at operator expects the aggregate A and above that a number N, it returns that member of the aggregate which is at the N-th position in the aggregate. The of operator expects a number N and above that an aggregate A, it returns the N-th member of A. So the two operators are converses of each other. The drop and take operators both expect an aggregate A and above that a number N. The
drop
operator
returns an aggragate like A except that the first N elements have
been removed. The take
operator returns an aggregate like
A except that only the first N elements have been retained. For
all four operators in the case of sequences the sequence ordering is
used, and for sets the underlying ordering is used.
The following are some general operators for aggregates:
size reverse concat swoncat zip flatten transposeThe unary size operator determines the number of elements of any aggregate, and for lists this means top level members. The unary reverse operator reverses strings and lists, it has no effect on sets. The binary concat operator concatenates two sequences of the same type, it appends the top parameter to the second parameter. The swoncat operator does the same except that it executes a
swap
first. The binary
zip operator expects two aggregates of the same type. It
returns a list of lists of two elements, each pair taken from
corresponding elements in the aggregates. The size of the result list
is the same as the size of the smaller of the two parameter
aggregates. The unary flatten operator expects a list of
sequences and combines them by concatenation. The unary
transpose operator is for matrix manipulation. It also
expects a list of lists L1, L2 ... and returns a list of
lists. The first sublist contains the first members of the Li,
the second sublist contains the second members, and so on. The list
returned has as many members as the shortest of the Li.
The type of sets is another of the Boolean types. The operators are
and or xor notThe three binary operators and, or and xor compute the intersection, union and symmetric difference. The unary not operator computes the complement. For most implementations on current machines the complement will be with respect to the largest set,
{0..31}
.
The following operators on sequences deal with ordering of their elements:
qsort qsort1 mergeThe unary qsort operator uses the quicksort algorithm to return a sorted version of the parameter. The qsort1 operator does the same, except that it expects a list of sequences which it sorts according to the first element of the sequences. The binary merge operator is like the
concat
operator in that it produces a single sequence.
The difference is that it picks elements from the two sequences in
accordance with their order. If the two sequences were sorted, then
the result of merging them is also sorted.
The following are arithmetic operations for lists of numbers:
sum product scalarproductThe first two expect a list of numbers, the sum operator adds them up, the product operator multiplies them, and for empty lists the results are 0 and 1 respectively. The scalarproduct operator expects a list of two lists of numbers. It multiplies corresponding elements of the two lists and returns the sum of these products.
The following unary operators expect an aggregate on top of the stack and leave a list of various subaggregates on top of the stack:
frontlist restlist powerlist subseqlist permlistLet the size of the aggregate be (N). The frontlist and restlist operators return a list of N+1 subaggregates. The
frontlist
operator returns a list, beginning with the
empty aggregate, obtained by successively adding the last, second last
... first member of the original aggregate. The restlist
operator returns a list, beginning with the original aggregate, by
successively removing the first, second ... last member of the
original aggregate. The powerlist operator returns a list
of all 2^N subaggregates such that for each member of the
original aggregate there will be one subaggregate in the list
containing it and one not containing it. The subseqlist
operator is similar, but it returns a shorter list of (N * (N-1) / 2
+ 1 ) subaggregates containing only consecutive members of the
original aggregate. The permlist only applies to sequence
aggregates, it returns a list of all the N! (N factorial)
permutations of the sequence.
A related binary operator is
insertlistThe insertlist operator expects a sequence and above that another potential member. It returns the list of all sequences obtained by inserting the potential member in all possible positions in the sequence.
A related binary operator for finding the cartesian product is
cartproductwhich expects two aggregates that do not have to be of the same type. The cartproduct operator returns a list of all pairs (as two element lists) of elements taken from the two aggregates. If the aggregates have M and N members, there will be M × N pairs in the result list.
The following unary operators expect a tree:
treeflatten treestrip treereverse treesizeThe treeflatten operator turns a tree into a flat list containg the leaves of the tree. The treestrip operator returns a tree with the same structure but with all leaves removed. The treereverse operator returns a tree in which (recursively) all internal lists have been reversed. The treesize operator returns an integer which is the number of leaves.
odd even positive negativeThe odd and the even predicate return
true
or false
just in case the parameter is
odd or even. The positive and the negative
predicate return true
or false
just in case
the parameter is positive or negative -- note that truth values and
characters are never negative.
The following binary predicates are defined for all numeric types, they have their usual meaning:
= != < <= > >=The following are two unary predicates defined for all types:
null smallThe null predicate is true if its simple parameter is numerically zero or its aggregate parameter is empty. The small predicate is true if its simple parameter is numerically zero or 1, or its aggregate parameter contains at most one element.
The following binary predicates test aggregates for members:
in hasThe in-predicate is true if the second parameter is in the top aggregate parameter. The has-predicate is true if the aggregate second parameter has the top parameter as a member. The two predicates are converses of each other.
The following binary predicate is defined for two aggregates of the same kind:
equalThe
equal
predicate is true if the two aggregates have the
same members. For strings and lists this means same members in the
same positions. For lists this means recursive equality.
Sometimes it is necessary to test a parameter for its type. This is done by the following unary predicates:
logical char integer set string list leafThe predicates logical, char, integer, set, string and list are true if the parameter is a true value, character, integer, set, string or list, respectively. The predicate leaf is true if the parameter is not a list.
Sometimes it is useful to operate on quoted predicates to obtain another quoted predicate. There are three such operators:
conjoin disjoin negateThe two operators conjoin and disjoin expect two quoted predicates and return one quoted predicate. If that is ever called it will compute the conjunction or disjunction of the two parameters. The other operator is negate which expects one quoted predicate and returns a quoted predicate which computes the negation.
Combinators can be classified in many ways: in terms of the number of expected quotations, in terms of the total number of expected parameters, quotations and others, in terms of their behaviour, and so on. To fix the terminology, combinators will be called unary, binary, ternary and so on, if they expect one or two or three quotations, and so on. But note that many combinators expect further parameters below the quotations which they will execute. The following are some simple unary combinators which require the top of the stack to be one quotation.
i x y
The i combinator pops the quotation off the stack and
executes it, effectively by dequoting. The x
combinator leaves the quotation on the stack and executes it.
Consequently the x
combinator will be executing on a stack
which has as its top element the very same quotation which it is
currently executing. The y combinator first converts the
quotation [P]
into a different quotation [Q]
with the following strange property: if [Q]
is ever called
by some combinator, then it builds a copy of itself on top of the
stack and then executes the [P]
-part of itself. After
this conversion, the y
combinator calls the
[Q]
it has constructed. In this way the y
combinator builds some of the behaviour of the x
combinator into the [Q]
.
Another unary combinator is
nullaryNo matter how many parameters the quotation consumes from the stack when nullary executes it, they are all restored and the final value calculated by the execution of the quotation is pushed on top of that.
The next unary combinators allow manipulation of the stack below the top few elements:
dip dipd dipddThe dip combinator requires a further element
X
to be below the quotation. It removes the quotation and
X
, saves X
somewhere, executes the quotation
on the remainder of the stack, and finally restores X
.
The dipd and the dipdd combinator are similar.
They expect two or three elements, (X) and (Y), or (X), (Y)
and (Z) below the quotation. The two or three elements are saved
and restored after the execution of the quotation.
Three further unary combinators are
app1 app2 app3Apart from the quotation which they expect on top of the stack, they require one or two or three further elements on the stack. So the
app2
combinator requires two further elements, say
X
and Y
. In this case the quotation will be
executed twice, once with X
on top of the stack and once
with Y
on top of the stack. The executions could be done
in any order, even concurrently, provided there are no side effects.
If both executions terminate, both should leave behind a non-empty
stack with respectively X'
and Y'
on top.
These two values, in their order, are then pushed onto the stack in
place of X
and Y
. The two other combinators
app1
and app3
behave analogously: The
app1
combinator causes just one execution of the
quotation, and it replaces X
by X'
. The
app3
combinator cases three executions of the quotation,
and it replaces X
, Y
and Z
by
X'
, Y'
and Z'
, maintaining the
order.
The binary combinators expect two quotations on top of the stack.
b cleaveThe b combinator expects two quotations
[P]
and
[Q]
, with [Q]
on top. It removes the two
quotations and executes first [P]
and then
[Q]
. The cleave combinator also expects two
quotations, and below that an item X
. It also first
executes [P]
, with X
on top, and then saves
the top result element, say P(X)
. Then it executes
[Q]
, again with X
, and saves the top result as
Q(X)
. Finally it restores the stack to what it was below
X
and pushes the two results P(X)
and
Q(X)
.
The ternary combinators expect three quotations on top of the stack. One of the most important is
ifteThe ifte ("if-then-else") combinator performs branching. Its third parameter is the if-part, its second parameter is the then-part, its first parameter, on top, is the else-part. It executes the if-part, which must yield a truth value. It saves that value and restores the stack to what it was before the if-part was executed. If the saved value was
true
the then-part is executed,
otherwise the else-part is executed.
There are two combinators for doing simple looping:
whiledo tailrecThe binary whiledo combinator is similar to the
ifte
combinator in that it has a test, the while-part,
which is second on the stack. The combinator repeatedly executes the
while-part and while that yields true
it executes the
other part, the do-part. The ternary tailrec
("tail-recursion") combinator also has a test, the third parameter.
If that yields true, the second parameter is executed and the
combinator exits, otherwise the top parameter is executed and after
that the process is repeated.
The quaternary combinators expect four quotations on top of the stack.
linrec binrec genrecThe linrec combinator for linear recursion expects an if-part, a then-part, an else1-part and on top an else2-part. Like the
ifte
combinator it executes the if-part, and if that
yields true it executes the else-part. Otherwise it executes the
else1-part, then it recurses with all four parts, and finally it
executes the else2-part. The binrec combinator for
binary recursion is similar, except that the else1-part has
to produce two values. The recursion with all four parts is executed
an the two values separately. The else2-part then has available the
two results from these two executions. The genrec
combinator for general recursion is also has an if-part, a
then-part and two else-parts.
It differs from the other two combinators in that after the execution of the else1-part nothing in particular is executed, but a program consisting of the four parts and the combinator is pushed onto the stack. The else2-part thus has it available as a parameter.
For linear recursion the if-part often is [null]
and the
else1-part often is either [pred]
for numeric types or
[uncons]
for aggregate types. The two parts are built
into
primrecfor primitive recursion. The binary primrec combinator expects two quotations, a start-part (similar to the else-part of the earlier combinators) and a combine-part (similar to the else2-part of the earlier combinators. Below that it expects a value of any type. The combinator essentially supplies the other two parts.
There are several combinators which do not have a fixed number of quotation parameters. Instead they use a list of quotations. They are
cond condlinrecThe cond combinator is like the one in Lisp, it is a generalisation of the
ifte
combinator. It expects a
non-empty list of programs, each consisting of a quoted if-part
followed by a then-part. The various if-parts are executed until one
is found that returns true
, and then its corresponding
then-part is executed.
The last program in the list is the default which is executed if none
of the if-parts yield true
. The condlinrec
combinator is similar, it expects a list of pairs or triples of quoted
programs. Pairs consist of an if-part and a then1-part, and triples
have an additional then2-part. Again the first if-part that yields
true
selects its corresponding then1-part for execution.
If there is a then2-part, the combinator first recurses and then
executes the then2-part. The last program is the default, it does not
have an if-part.
The cleave
combinator also has a generalisation:
constructexpects two parameters, a quotation and above that a list of quotations. Each quotation in the list will produce a value that will eventually be pushed onto the stack, and the first quotation determines the stack onto which these values will be pushed.
The following binary combinator expects a truth value below its two quotation parameters:
branchThe branch combinator resembles the
choice
operator and the ifte
combinator. The truth value below
the two quotations determines which of the two quotations will be
executed. If the truth value is true
, then the if-part,
the second parameter, is executed, otherwise the then-part, the top
parameter, is executed.
The following unary combinator expects a numeric value below its quotation parameter:
timesThe times combinator executes its quotation parameter as many times as indicated by the numeric value; if the value is zero or less, then the quotation is not executed at all.
The stack is just a list, so any list could serve as the stack, including a list which happens to be on top of the stack. The following unary combinator expects a list below its quotation parameter:
infraThe infra combinator temporarily discards the remainder of the stack and takes the list to be the stack. It then executes the quotation which yields a result stack. This result is then pushed as a list onto the original stack replacing the original list. Hence any quotation can serve as a complex unary operation on lists.
The following unary combinator expects an aggregate below its quotation parameter:
stepThe step combinator removes the aggregate and the quotation, and then repeatedly puts the members of the aggregate on top of the remaining stack and executes the quotation. For sequential aggregates such as strings, lists or more generally, quotations, the members are selected in the order of their occurrance in the aggregate. For sets the members are selected on the basis of their underlying order. So the quotation is executed as many times as the aggregate has members. What happens to the members depends entirely on the quotation. In the simplest though unlikely case where the quotation does nothing, the members are left on the stack in the order in which they occurred in the aggregate with the last member on top.
There is a related combinator for stepping through two aggregates:
step2The step2 expects two aggregates which do not have to be of the same type. Above that it expects a quotation. It steps through the lower aggregate and for each member it steps through the higher aggregate. The pairs of members are then made available to the quoted program. If the aggregates have M and N members, there will be M × N pairs.
The following combinators for aggregates are mostly familiar from list processing languages:
map fold filter splitAll four step through the members of the aggregate in the same manner as the
step
combinator. The map combinator
combines the results of applying the quotation to create a new
aggregate of the same type as the original. The fold
combinator expects a quotation which computes a binary function, below
that a value, the initial value, and below that an
aggregate. It uses the binary function to combine the members of the
aggregate into one single value, and if the aggregate happens to be
empty it returns the initial value.
The filter combinator needs a quotation which computes a truth value, so it is a test. It applies the test to each member of the aggregate and creates a new aggregate containing those members of the original which pass the test. The resulting aggregate is of the same types as the parameter. The split combinator only makes sense in a language in which a function can return two values.
It is like the filter
combinator except that it returns
two aggregates - one containing the members of the original which did
not pass the test, and above that another containing those which did
pass the test. The resulting aggregates are of the same type as the
parameter. In both result aggregates the ordering of the original
aggregate is preserved in case they are strings or lists.
The following unary combinators expect an aggregate below their quotation parameter which must compute a truth value:
some allThe some combinator returns
true
if some
members of the aggregate pass the test of the quotation, otherwise it
returns false
. The all combinator returns
true
if all members of the aggregate pass the test of the
quotation, otherwise it returns false
. For empty
aggregates some
returns false
and
all
returns true
.
The following unary combinator expects two aggregates and above that a program suitable for combining their respective elements:
zipwithThe zipwith combinator produces a list which is as long as the smaller of the two aggregate parameters. The elements of the resultlist are obtained by using the program parameter to combine corresponding members of the two aggregates.
The following unary combinators expect a program and below that a tree:
treestep treemap treefilter treefoldThey all resemble corresponding combinators for aggregates. The treestep combinator uses the program to process the leaf nodes in the same way as
step
handles members of an
aggregate. The treemap combinator uses the program to
compute replacement leaves for a tree which has the same structure.
The treefilter combinator needs a program that yields a
truth value, it produces a tree of only those leaves which pass the
test. The treefold combinator expects an initial
value above the tree and above that the quotation which is used to
combine the leaves with the initial value.
There are two tree combinators which are similar to the
genrec
combinator:
treerec treerecgenand above that two quotations,
[O]
and [C]
.
If the tree is a leaf, then [O]
is executed, typically an
operation on a leaf. If the tree is not a leaf, then then combinator
[C]
is executed, and it will find on top of the stack the
program [[O] [C] treerec]
. The slightly more general
treerecgen combinator also expects a tree but above that
three quotations: [O1]
, [O2]
and
[C]
. If the tree is a leaf, then [O1]
is
executed. If it is not a leaf, then first [O2]
is
executed, and then the combinator [C]
is executed which
will find [[O1] [O2] [C] treerecgen]
on top of the stack.


| clip_lines {isoband} | R Documentation |
Clip lines so they don't run into a set of boxes. Useful for labeling isolines, as it allows removal of line segments that would run into any text labels.
clip_lines(x, y, id, clip_boxes, asp = 1)
x |
Numeric vector of x coordinates |
y |
Numeric vector of y coordinates |
id |
Integer vector of id numbers indicating which lines are connected |
clip_boxes |
Data frame specifying the locations of boxes to clip to.
Should have five columns, named |
asp |
Aspect ratio (width/height) of the target canvas. This is used to convert widths to heights and vice versa for rotated boxes |


hot deal
Minimal living room
500 Ftsq
4 Bedrooms
2 Bathrooms
$1.300 000
For rent
Yes
No
All types
Type 1
Type 2
Type 3
Type 4
City
New York
Paris
Amsterdam
Rome
Bedrooms
1
2
3
4
Bathrooms
1
2
3
search
Recent Properties
Search your dream property
Featured
$1000
Miami
Sea View Property
Offer
$1200
Dhaka
Raddison Blue Hotel
Featured
$1000
Dhaka
Sea View Property
Featured
$1000
Pataya
Sea View Property
Featured
$1000
Bali
Sea View Property
Featured
$1000
Himalaya
Sea View Property
View more


Techumen Glimpse
2k18
“TECHUMEN” is the subject of all exhibitions taking place in the Walchand College Of Engineering,sangli. Fragments of lost memories, fleeting moments and the breaking apart of human nature are this event highlighted topics. We welcome you to a exploration space of a unique kind—the one that will stay with you and impact you on many levels. Come and Enjoy.
Mega Event Of Acses & National Level Symposium
“Understanding Life”
WCE Acses
20 Oct – 21Oct 2018
“Faces of Peace”
WCE Acses
20 Oct – 21Oct 2018
“Instant Gratification”
WCE Acses
20 Oct – 21Oct 2018
“Facts of Blossoms”
WCE Acses
20 Oct – 21Oct 2018
“In Loving Memory”
WCE Acses
20 Oct – 21Oct 2018


Four JeM associates, responsible for carrying out blast in J&K’s Pulwama, arrested
Incriminating material was recovered from their possession.
by PTIFour associates of terror group Jaish-e-Mohammad (JeM), who were responsible for carrying out a blast in Jammu and Kashmir’s Pulwama district, have been arrested, police said on Tuesday.
While investigating the terror attack that took place in the Arihal area of Pulwama in July, police learnt about the involvement of a person, Sharik Ahmad, who had been constantly communicating with a foreign militant and making plans to carry out attacks in the area, a police spokesman said.
“Accordingly, Ahmad with the help of three other JeM associates, identified as Aqib Ahmad, Adil Ahmad Mir and Owais Ahmad, conspired and executed the terror attack in Airhal area,” he said.
On Monday, the module was busted with the arrest of the all four persons, the spokesman said.
He said the investigation into the case revealed that all the four persons are linked to JeM and played their active part in conspiring and executing the terror attack in Arihal area.
Incriminating material was recovered from their possession and it has been taken into records for the purpose of investigation and to probe their complicity in other terror crimes, the spokesman said, adding further investigation in the case is in progress.


| Home | Trees | Indices | Help |
|
|---|
|
|
object --+ | Room
A Campfire room.
| Instance Methods | |||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from |
| Instance Variables | |
|
id The room id. |
|
|
name The name of the room. |
|
|
uri The urlparsed URI of the room. |
| Properties | |
|
Inherited from |
| Method Details |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
|
repr(x)
|
Joins the room; if 'force' is True join even if already joined. Returns True if successfully joined, False otherwise. |
Leaves the room. Returns True if successfully left, False otherwise. |
Toggles guest access on and off. Returns True if successfully toggled, False otherwise. |
Checks if the guest access is enabled. Returns True if the guest access is enabled, False otherwise. |
Gets the URL for guest access. Returns None if the guest access is not enabled. |
Gets the invite code for guest access. Returns None if the guest access is not enabled. |
Changes the name of the room. Returns the new name if successfully changed, None otherwise. |
Changes the name of the room. Returns the new name if successfully changed, None otherwise. |
Changes the topic of the room. Returns the new topic if successfully changed, None otherwise. |
Locks the room to prevent new users from entering. Returns True if successfully locked, False otherwise. |
Unlocks the room. Returns True if successfully unlocked, False otherwise. |
Pings the server updating the last time we have been seen there. Returns True if successfully pinged, False otherwise. |
Destroys the room. Returns True if successfully destroyed, False otherwise. |
Lists the users chatting in the room. Returns a set of the users. |
Send a message to the room. Returns the message if successfully sent it, None otherwise. |
Paste a message to the room. Returns the message if successfully pasted it, None otherwise. |
Gets the dates of transcripts of the room. Returns a list of dates. |
Get the transcript for the given date (a datetime.date instance). Returns a list of message data: * id: the id of the message * person: the name of the person who wrote the message if any * user_id: the user id of the person if any * message: the message itself if any |
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Sun May 18 15:07:02 2008 | http://epydoc.sourceforge.net |


*Rails 3.0.0 [beta
4] (June 8th, 2010)*
- JSON: set Base.include_root_in_json = true to include a root value in the
JSON: {"post": {"title": …}}. Mirrors the Active
Record option. [Santiago Pastorino]
*Rails 3.0.0 [beta
3] (April 13th, 2010)*
*Rails 3.0.0 [beta
1] (February 4, 2010)*
- Add support for errors in JSON format. 1956 [Fabien Jakimowicz]
- Recognizes 410 as Resource Gone. 2316 [Jordan Brough, Jatinder Singh]
- More thorough SSL support. 2370 [Roy Nicholson]
- HTTP proxy support. 2133 [Marshall Huss, Sébastien Dabet]
*2.3.2 [Final] (March 15, 2009)*
- Nothing new, just included in 2.3.2
*2.2.1 [RC2] (November 14th, 2008)*
- Fixed that ActiveResource#post would post an empty string when it
shouldn‘t be posting anything 525 [Paolo Angelini]
*2.2.0 [RC1] (October 24th, 2008)*
- Add ActiveResource::Base#to_xml and ActiveResource::Base#to_json. 1011
[Rasik Pandey, Cody Fauser]
- Add ActiveResource::Base.find(:last). [754 state:resolved] (Adrian Mugnolo)
- Fixed problems with the logger used if the logging string included
%’s [840 state:resolved] (Jamis Buck)
- Fixed Base#exists? to check status code as integer [299 state:resolved]
(Wes Oldenbeuving)
*2.1.0 (May 31st, 2008)*
- Fixed response logging to use length instead of the entire thing (seangeo)
[27]
- Fixed that to_param should be used and honored instead of hardcoding the id
11406 [gspiers]
- Improve documentation. [Ryan Bigg, Jan De Poorter, Cheah Chu Yeow, Xavier
Shay, Jack Danger Canty, Emilio Tagua, Xavier Noria, Sunny Ripert]
- Use HEAD instead of GET in exists? [bscofield]
- Fix small documentation typo. Closes 10670 [Luca Guidi]
- find_or_create_resource_for handles module nesting. 10646 [xavier]
- Allow setting ActiveResource::Base#format before site. [Rick Olson]
- Support agnostic formats when calling custom methods. Closes 10635
[joerichsen]
- Document custom methods. 10589 [Cheah Chu Yeow]
- Ruby 1.9 compatibility. [Jeremy Kemper]
*2.0.2* (December 16th, 2007)
- Added more specific exceptions for 400, 401, and 403 (all descending from
ClientError so existing rescues will work) 10326 [trek]
- Correct empty response handling. 10445 [seangeo]
*2.0.1* (December 7th, 2007)
- Don‘t cache net/http object so that ActiveResource is more
thread-safe. Closes 10142 [kou]
- Update XML documentation examples to include explicit type attributes.
Closes 9754 [Josh Susser]
- Added one-off declarations of mock behavior [David Heinemeier Hansson].
Example:
Before:
ActiveResource::HttpMock.respond_to do |mock|
mock.get "/people/1.xml", {}, "<person><name>David</name></person>"
end
Now:
ActiveResource::HttpMock.respond_to.get "/people/1.xml", {}, "<person><name>David</name></person>"
- Added ActiveResource.format= which defaults to :xml but can also be set to
:json [David Heinemeier Hansson]. Example:
class Person < ActiveResource::Base
self.site = "http://app/"
self.format = :json
end
person = Person.find(1) # => GET http://app/people/1.json
person.name = "David"
person.save # => PUT http://app/people/1.json {name: "David"}
Person.format = :xml
person.name = "Mary"
person.save # => PUT http://app/people/1.json <person><name>Mary</name></person>
- Fix reload error when path prefix is used. 8727 [Ian Warshak]
- Remove ActiveResource::Struct because it hasn‘t proven very useful.
Creating a new ActiveResource::Base
subclass is often less code and always clearer. 8612 [Josh Peek]
- Fix query methods on resources. [Cody Fauser]
- pass the prefix_options to the instantiated record when using find without
a specific id. Closes 8544 [Eloy Duran]
- Recognize and raise an exception on 405 Method Not Allowed responses. 7692
[Josh Peek]
- Handle string and symbol param keys when splitting params into prefix
params and query params.
Comment.find(:all, :params => { :article_id => 5, :page => 2 }) or Comment.find(:all, :params => { 'article_id' => 5, :page => 2 })
- Added find-one with symbol [David Heinemeier Hansson]. Example:
Person.find(:one, :from => :leader) # => GET /people/leader.xml
- BACKWARDS INCOMPATIBLE: Changed the finder API to be more extensible with
:params and more strict usage of scopes [David Heinemeier Hansson].
Changes:
Person.find(:all, :title => "CEO") ...becomes: Person.find(:all, :params => { :title => "CEO" })
Person.find(:managers) ...becomes: Person.find(:all, :from => :managers)
Person.find("/companies/1/manager.xml") ...becomes: Person.find(:one, :from => "/companies/1/manager.xml")
- Add support for setting custom headers per Active Resource model [Rick
Olson]
class Project
headers['X-Token'] = 'foo'
end
# makes the GET request with the custom X-Token header Project.find(:all)
- Added find-by-path options to ActiveResource::Base.find [David Heinemeier
Hansson]. Examples:
employees = Person.find(:all, :from => "/companies/1/people.xml") # => GET /companies/1/people.xml
manager = Person.find("/companies/1/manager.xml") # => GET /companies/1/manager.xml
- Added support for using classes from within a single nested module [David
Heinemeier Hansson]. Example:
module Highrise
class Note < ActiveResource::Base
self.site = "http://37s.sunrise.i:3000"
end
class Comment < ActiveResource::Base
self.site = "http://37s.sunrise.i:3000"
end
end
assert_kind_of Highrise::Comment, Note.find(1).comments.first
- Added load_attributes_from_response as a way of loading attributes from
other responses than just create [David Heinemeier Hansson]
class Highrise::Task < ActiveResource::Base
def complete
load_attributes_from_response(post(:complete))
end
end
…will set "done_at" when complete is called.
- Added support for calling custom methods 6979 [rwdaigle]
Person.find(:managers) # => GET /people/managers.xml
Kase.find(1).post(:close) # => POST /kases/1/close.xml
- Remove explicit prefix_options parameter for
ActiveResource::Base#initialize. [Rick Olson] ActiveResource splits the
prefix_options from it automatically.
- Allow ActiveResource::Base.delete with custom prefix. [Rick Olson]
- Add ActiveResource::Base#dup [Rick Olson]
- Fixed constant warning when fetching the same object multiple times [David
Heinemeier Hansson]
- Added that saves which get a body response (and not just a 201) will use
that response to update themselves [David Heinemeier Hansson]
- Disregard namespaces from the default element name, so Highrise::Person
will just try to fetch from "/people", not
"/highrise/people" [David Heinemeier Hansson]
- Allow array and hash query parameters. 7756 [Greg Spurrier]
- Loading a resource preserves its prefix_options. 7353 [Ryan Daigle]
- Carry over the convenience of create from ActiveRecord. Closes 7340. [Ryan
Daigle]
- Increase ActiveResource::Base
test coverage. Closes 7173, 7174 [Rich Collins]
- Interpret 422 Unprocessable Entity as ResourceInvalid. 7097 [dkubb]
- Mega documentation patches. 7025, 7069 [rwdaigle]
- Base.exists?(id, options) and Base#exists? check whether the resource is
found. 6970 [rwdaigle]
- Query string support. [untext, Jeremy Kemper]
# GET /forums/1/topics.xml?sort=created_at
Topic.find(:all, :forum_id => 1, :sort => 'created_at')
- Base#==, eql?, and hash methods. == returns true if its argument is
identical to self or if it‘s an instance of the same class, is not
new?, and has the same id. eql? is an alias for ==. hash delegates to id.
[Jeremy Kemper]
- Allow subclassed resources to share the site info [Rick Olson, Jeremy
Kemper]
d
class BeastResource < ActiveResource::Base
self.site = 'http://beast.caboo.se'
end
class Forum < BeastResource
# taken from BeastResource
# self.site = 'http://beast.caboo.se'
end
class Topic < BeastResource
self.site += '/forums/:forum_id'
end
- Fix issues with ActiveResource collection handling. Closes 6291. [bmilekic]
- Use attr_accessor_with_default to dry up attribute initialization.
References 6538. [Stuart Halloway]
- Add basic logging support for logging outgoing requests. [Jamis Buck]
- Add Base.delete for deleting resources without having to instantiate them
first. [Jamis Buck]
- Make save behavior mimic AR::Base#save (true on success, false on failure).
[Jamis Buck]
- Add Basic HTTP Authentication to ActiveResource (closes 6305). [jonathan]
- Extracted id_from_response as an entry point for customizing how a created
resource gets its own ID. By default, it extracts from the Location
response header.
- Optimistic locking: raise ActiveResource::ResourceConflict
on 409 Conflict response. [Jeremy Kemper]
# Example controller action
def update
@person.save!
rescue ActiveRecord::StaleObjectError
render :xml => @person.reload.to_xml, :status => '409 Conflict'
end
- Basic validation support [Rick Olson]
Parses the xml response of ActiveRecord::Errors#to_xml with a similar
interface to ActiveRecord::Errors.
render :xml => @person.errors.to_xml, :status => '400 Validation Error'
- Deep hashes are converted into collections of resources. [Jeremy Kemper]
Person.new :name => 'Bob',
:address => { :id => 1, :city => 'Portland' },
:contacts => [{ :id => 1 }, { :id => 2 }]
Looks for Address and Contact resources and creates them if unavailable. So
clients can fetch a complex resource in a single request if you e.g.
render :xml => @person.to_xml(:include => [:address, :contacts])
in your controller action.
- Major updates [Rick Olson]
- Add full support for find/create/update/destroy
- Add support for specifying prefixes.
- Allow overriding of element_name, collection_name, and primary key
- Provide simpler HTTP mock interface for testing
# rails routing code map.resources :posts do |post|
post.resources :comments
end
# ActiveResources class Post < ActiveResource::Base
self.site = "http://37s.sunrise.i:3000/"
end
class Comment < ActiveResource::Base
self.site = "http://37s.sunrise.i:3000/posts/:post_id/"
end
@post = Post.find 5 @comments = Comment.find :all, :post_id => @post.id
@comment = Comment.new({:body => ‘hello world’}, {:post_id
=> @post.id}) @comment.save
- Base.site= accepts URIs. 200...400 are valid response codes. PUT and POST
request bodies default to ’’. [Jeremy Kemper]
- Initial checkin: object-oriented client for restful HTTP resources which
follow the Rails
convention. [David Heinemeier Hansson]


Parly summons minister over doctors’ strike
by Staff ReporterParliament has demanded a ministerial statement from Health minister Obadiah Moyo explained the state of the country’s health delivery system after government fired over 280 doctors recently.
The call, endorsed by Speaker of the National Assembly Jacob Mudenda yesterday, was made by opposition MDC MP for Harare East Tendai Biti who expressed fears that the fired doctors would leave the country and offer their services elsewhere.
More to follow….
Source – Daily News


--- layout: post title: Ottawa Android October Meeting categories: - Meetings tags: [] status: publish type: post published: true meta: _edit_last: '1' _wp_old_slug: '' --- This is a reminder to everyone that there is an Ottawa Android meeting next week (October 20th, 2010) at The Code Factory (246 Queen St, Ottawa) and it starts at 6:30pm. The contents of this months meeting will be:


pnmhistmap(1) pnmhistmap(1) NAME pnmhistmap - draw a histogram for a PGM or PPM file SYNOPSIS pnmhistmap [-black] [-white] [-max N] [-verbose] [pnmfile] DESCRIPTION Reads a portable anymap as input, although bitmap (PBM) input produces an error message and no image. Produces an image showing a histogram of the color (or gray) values in the input. A graymap (PGM) input produces a bitmap output. A pixmap (PPM) input produces pixmap output with three overlaid histograms: a red one for the red input, a green one for the green input, and a blue one for the blue input. The output is fixed in size: 256 pixels wide by 200 pixels high. OPTIONS -black Ignores the count of black pixels when scaling the histogram. -white Ignores the count of white pixels when scaling the histogram. The -black and -white options, which can be used seperately or together, are useful for images with a large percentage of pixels whose value is zero or 255, which can cause the remaining histogram data to become unreadbaly small. Note that, for pixmap inputs, these options apply to all colors; if, for example, the input has a large number of bright-red areas, you will probably want to use the -white option. -max N Force the scaling of the histogram to use N as the largest-count value. This is useful for inputs with a large percentage of sin‐ gle-color pixels which are not black or white. -verbose Report the progress of making the histogram, including the largest-count value used to scale the output. All flags can be abbreviated to their shortest unique prefix. BUGS Assumes maxval is always 255. Images with a smaller maxval will only use the lower-value side of the histogram. This can be overcome either by piping the input through "pnmdepth 255" or by cutting and scaling the lower-value side of the histogram. Neither is a particularly elegant solution. Should allow the output size to be specified. SEE ALSO pgmhist(1), ppmhist(1), pgm(5), ppm(5) AUTHOR Wilson H. Bent. Jr. (whb@usc.edu). 25 October 1993 pnmhistmap(1)


name: inverse layout: true class: center, middle, inverse --- # STAT 105: Lecture 1 ## Why Engineers Study Statistics ### Chapter 1: Introduction .footnote[Course page: [imouzon.github.io/stat105](https://imouzon.github.io/stat105)] --- # Section 1.1 ## Engineering Statistics: What and Why --- layout: false .left-column[ ## What and Why ### Engineers In General ] .right-column[
What Do Engineers Do?
- Design/build/operate/improve some system - Use both **quantitative theories** (i.e., mathematical) and **scientific principles** (i.e., physics, chemistry, psychology(?)) as a guide - Obvious issue - math/science vast, no one knows everything. - Additionally, engineers must work outside of "lab conditions" - there is no control over the environment, the users, the timing, ... ] --- name: inverse layout: true class: center, middle, inverse --- # So, here's the situation: ## The "system" you want to improve is essentially unique ## There are competing theories that all seem equal ## Experts disagree bitterly about what to do # What's an engineer to do??? --- #Option 1: Just Give Up ## A few drawbacks to this one --- #Option 2: Gather Some Data ## Figure Out What Really Matters in the System --- layout: false .left-column[ ## What and Why ### Engineers In General ### Data? ] .right-column[ ## What Do I Mean Data? Data is **essentially just information** we can record. Examples are incredibly easy to come up with: - Students with majors and courses they enrolled in ``` student major course John Philosophy EASY 101 Kate Engineering SMRT 500 Mike Mathematics MATH 000 ``` - Amount I can bench over time ``` Date Weight 06/01 55 lbs. 06/02 56 lbs. 06/03 57 lbs. 06/04 59 lbs. ... ... 08/21 345 lbs. ``` Really trivial to come up with examples ] --- name: inverse layout: true class: center, middle, inverse ---
Getting Data is Easy
Getting Good Data is Hard
--- layout: false .left-column[ ## What and Why ### Engineers In General ### Data? ### Example 1 ] .right-column[ ##Two Competing Theories ###Goal: Load gears into a continuous carburizing furnace to minimize distortion during heat treating - **Theory 1**: Load the gears laid in a stack - **Theory 2**: Hang the gears from a bar - **Complications**: No two gears exactly the same - if we test it how do we decide what was the effect of the gear and what was the effect of the loading method? - **Smart engineer**: tried it both ways and collected the distortion measures from multiple attempts ``` Method Distortion measure (.0001 in.) Laid 5, 8, 8, 9, 9, 9, 9, 10, 10, ..., 19, 27 Hung 7, 8, 8, 10, 10, 10, 10, 11, 11, ..., 31, 36 ``` ] --- layout: false .left-column[ ## What and Why ### Engineers In General ### Data? ### Example 1 ] .right-column[ ##Two Competing Theories ###Goal: minimize distortion ``` Method Distortion measure (.0001 in.) Laid 5, 8, 8, 9, 9, 9, 9, 10, 10, ..., 19, 27 Hung 7, 8, 8, 10, 10, 10, 10, 11, 11, ..., 31, 36 ``` Plots and summary values help us see what's going on:
``` Mean hung runout: 17.9 Mean laid runout: 12.6 ``` Looks like laying gears in a stack is best ] --- layout: false .left-column[ ## What and Why ### Engineers In General ### Data? ### Example 1 ### Engineering Statistics ] .right-column[ ## Engineering Statistics Collecting good data is part of what engineering statistics is concerned with, but of course that's only the first part. Our text book defines it this way: > **Engineering Statistics** is the study of how *best* to > > 1. Collect engineering data > 2. summarize or describe engineering data, and > 3. draw formal inferences and practical conclusions on the basis of engineering data > > all while recognizing the reality of variation Recognizing the "reality of variation" in the distortion example led the engineer to run multiple tests This helped rules out the possibility that hanging gears is better since the chance that the gears were worse so often is pretty low ] --- name: inverse layout: true class: center, middle, inverse --- # All good engineers use statistical tools # The only question is whether they will use good ones --- # Section 1.2 ## Basic Terminology --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ] .right-column[ ## Types of Statistical Studies > An **observational study** is one in which the investigator's role is basically passive. A process or phenomenon is watched and data are recorded, but there is no intervention on the part of the person conducting the study. > An **experimental study** (or, more simply, an experiment) is one in which the investigator's role is active. Process variables are manipulated, and the study environment is regulated. - Experiments: faster, more reliable results, helps determine causal relationships. - These are the "perfect world" scenarios - most studies blend both. - Even under ideal circumstances, some variables can not be controlled. ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ] .right-column[ ## Extent to Which Results Can be Applied > An **enumerative study** is one in which there is a particular, well-defined, finite group of objects under study. Data are collected on some or all of these objects, and conclusions are intended to apply only to those objects. > A **population** is the entire group of objects about which one wishes to gather information in a statistical study. > A **sample** is a group of objects on which one actually gathers data. In the case of an enumerative investigation, the sample is a subset of the population (and can in some cases include the entire population). - Example: If I am ordering 5000 microprocessors from Intel, I may test a few to see how well they actually work. In this case, the shipment is my population and the ones I test make the sample. I hope to use the sample to make a judgement about the entire shipment (so if 3/4 don't work, I should probably send the shipment back). ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ] .right-column[ ## Extent to Which Results Can be Applied > An **analytical study** is one in which a process or phenonmeon is investigated at one point in space and time with the hope that the data collected will be representative of a system behavior at other places and times under similar conditions. In this kind of study, there is rarely, if ever, a particular well-defined group of objects to which conclusions are thought to be limited. - **Analytical studies** tend to be the most important in engineering. - Ex: Stock prices are dropping. I may determine if something doesn't change in the trading environment, they will continue dropping. - Ex: The gear distortion example (Chapter 1, Example 1). ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ] .right-column[ # Telling the Difference ## Observation vs. Experiment - If things are being manipulated by the researcher, it's more of an experiment than an observational study. ## Enmerative vs. Analytical - We generally frown on people discussing **conceptual populations** - populations consisting of "all widgets that have heretofore existed or could one day exist in this universe or some other" type stuff - Basically, if the population isn't well described, concrete thing, it's an analytical study. ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ### Types of Data ] .right-column[ # Types of Data: Qualitative > **Qualitative** or **categorical** data are the values of basically nonnumerical characteristics associated with items in a sample. - Ex: Eye color, choice of major, hometown, response to the question "have you ever been to Europe" Qualitative variables can have a natural ordering - it's just that the ordering doesn't translate to an amount of something. Only by aggrigation and counting can we get meaningful numerical values from qualitative variables. - Example: Classifying parts as (1) Conforming (it works), (2) Rework (fixable) and (3) Scrap (broken forever) ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ### Types of Data ] .right-column[ # Types of Data: Quantitative > **Quantitative** or **numerical** data are values of numerical characteristics associated with items in a sample. - Ex: Counts of the number of times some phenomenon occurs, measurements like weight/height We can further describe **continuous** variables (where the actual result could be any value in a continuous interval) from **discrete** variables (where the number of values the variable could take are countable). ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ### Types of Data ### Ex: Machine Parts ] .right-column[ # Example: Machine Parts > Suppose we get a shipment of 5000 machine parts and would like to verify that the shipment meets the standards the machinist agreed to. We take out 100 parts and examine them carefully. To verify that the parts are as strong as we anticipated, we measure the "Rockwell hardness" with a machine that is accurate to the first decimal place. We also examine each part for scratches and record it weight. Further, we run the part in a test machine to determine if it works correctly. **Question**: How many data values are we collecting from each part and what type of data values are they? ] --- layout:false .left-column[ ## What and Why ## Terms ### Types of Studies ### Types of Data ### Ex: Machine Parts ### Uni/Multi/Repeat ] .right-column[ # Number of Measurements > **Univariate data** arise when only a single characteristic of each sample item is observed. > **Multivariate data** arise when observations are made on more than one characteristic of each sampled item. > **Bivariate data** are a special case of multivariate data where two characteristics are observed for each sampled item. > **Repeated measures data** arise when a sample item is being measured on the same characteristic but in multiple contexts (either with different instruments or in different scenarios). > **Paired data** are a special case of repeated measures data where the sample item is measured twice on the same characteristic. ]


Structures
The following structures are available globally.
-
A signed fraction with numerator and denominator of unbounded size. A BFraction value is represented by a BInt numerator and a BInt denominator. The representation is normalized, so that numerator and denominator has no common divisors except 1. The denominator is always positive, 0 has the representation 0/1
See moreDeclaration
Swift
public struct BFraction : CustomStringConvertible, Comparable, Equatable
-
A signed integer of unbounded size. A BInt value is represented with magnitude and sign. The magnitude is an array of unsigned 64 bit integers (a.k.a. Limbs). The sign is a boolean value, true means value < 0, false means value >= 0 The representation is little-endian, least significant Limb has index 0. The representation is minimal, there is no leading zero Limbs. The exception is that the value 0 is represented as a single 64 bit zero Limb and sign false
See moreDeclaration
Swift
public struct BInt : CustomStringConvertible, Comparable, Equatable, Hashable
-
CRT instances implement the Chinese Remainder Theorem
Create an instance from a given set of moduli which fullfill the following conditions:
- at least two moduli
- all moduli are positive
- the moduli are pairwise coprime
Then use the compute method to compute the CRT value for a given set of residues. The same CRT instance can be used for different inputs, as long as the moduli are the same.
See moreDeclaration
Swift
public struct CRT


About Me
Hey There!
My name is Noel Glamann. I'm a high school senior born and raised in the suburbs of Missouri.
I have been emphasizing my studies in programming and web design throughout high school.
Currently, I am preparing for my college studies in Salt Lake City where I will be diving deeper into
software development and business management. I could spend the rest of my life eating nothing but
chick-fil-a and communicating though Friends quotes. In the future, I plan to use my skills
as a project manager for an impactful tech company. I also hope to be a leader for girls around
the world making breakthroughs in STEM industries.
Empowered women empower women.
Education
Lewis and Clark Career Center
Date of Attendence: August 2019 - May 2021
- Courses Taken: Computer Software Development I & II
- SkillsUSA Organization Member
Fort Zumwalt West High School
Date of Attendence: August 2017 - May 2021
- GPA at Graduation: TBD
- A+ Tutor
- Class Officer
- Honor Roll
(Committed) Neumont College of Computer Science
-future attendee
Anticipated Date of Attendence: Fall 2021 - Fall 2023
Achievements
SKillsUSA Competitions:
- Related Technical Math State Competition: First Place (April 2021)
- Related Technical Math District Competition: Second Place (February 2021, February 2020)
- Web Design District Competition: Third Place (February 2020)
Awards
- Career & Technical Education Honors Certificate (2019-2021)
- Teacher Nominated Outstanding Student Award @ Lewis & Clark Career Center(2020-2021)
- NCWIT Aspirations in Computing: Regional Affiliate Winner 2021
- HS Graduation Awards: (Recieved 2021)
- Academic Letter Award
- College Preparatory Academic Achievement Certificate
- Presidential Education Awards Program
Leadership Positions
- Senior Class Officer (2020-2021)
Skills
- Website Development
- HTML5
- Designing Page Layout
- Tables, iFrames, Forms
- Incorporating Multimedia
- CSS
- Graphic Alterations
- Responsive Design
- SQL & Database Administration
- Javascript
- Specific Skills:
- Arrays, Loops, Conditionals
- Working with Style Sheets
- Programming for Web Forms
- Program Design
- Software Dev. Cycle/Tools --pseudocode, charts
- AGILE Development
- Collaborative Programming
- Python Programming
- IDE Fundamentals
- Specific Skills:
- Input/Output Statements
- Calculations
- Selection/Loop Structures
- Data Handling
- GUI Design Using tkinter
- Linux Operating System
- Debian & Ubuntu
- History & Terminology
- Command Line Basics
- Open Source Software Concepts
Education
Lewis and Clark Career Center
Date of Attendence: August 2019 - May 2021
- Courses Taken: Computer Software Development I & II
- SkillsUSA Organization Member
Fort Zumwalt West High School
Date of Attendence: August 2017 - May 2021
- GPA at Graduation: TBD
- A+ Tutor
- Class Officer
- Honor Roll
(Committed) Neumont College of Computer Science
-future attendee
Anticipated Date of Attendence: Fall 2021 - Fall 2023
Employment Experience
-
Von Maur
- Employement: September 2019 - September 2021
- Position: Children's Department Sales Associate
- Job Description:
-
Old Navy
- Employement: September 2018 - August 2019
- Position: Brand Associate
- Job Description:
Testimonials
Thorin Schmidt
Dalisay Terry


Unit DTMLUtils
Description
A unit containing machine-learning related classes and functions
Overview
Classes, Interfaces, Objects and Records
Functions and Procedures
Types
Description
Functions and Procedures
function Sigmoid(x: double): double; overload; |
|
|
function SigmoidPrime(x: double): double; overload; |
|
|
function Relu(x: double): double; overload; |
|
|
function ReluPrime(x: double): double; overload; |
|
|
function AccuracyScore(yhat, y: TDTMatrix): double; |
|
|
Types
TSummaryMap = TFPGMap<string, TDTMatrix>; |
|
holding dataset statistic summaries, e.g., 'mean' and stdev
|
TClassWiseSummaryMap = TFPGMap<double, TSummaryMap>; |
|
holding dataset's class-wise statistic summaries, e.g., 'mean' and stdev
|
Generated by PasDoc 0.15.0.
|


--- layout: post title: Kaizenconf is open date: '2008-09-05T08:23:00.001+01:00' tags: [conferences, kaizenconf] modified_time: '2008-09-05T08:23:30.632+01:00' blogger_id: tag:blogger.com,1999:blog-4015568221071268916.post-1193143339235530587 comments: true blogger_orig_url: http://serialseb.blogspot.com/2008/09/kaizenconf-is-open.html ---
For those that were waiting for the kaizenconf registration to be open, it now is. But it’s not really a registration, it’s a request for a registration. So if I understand that correctly, I still don’t know if I’ll be there or not.
If you come from good old Great Britain, I’d recommend booking anyway. With the sterling going down, cancellation fees will probably be cheaper than waiting and see your money be half what it was.


Ronaldo Subbed Again As Dybala Rescues Juve
by SL InternationalSerie A
Result: Juventus 1-0 AC Milan
Date: 10 November 2019
Venue: Juventus Stadium
Cristiano Ronaldo was subbed off for a second game in a row, as Juventus registered a 1-0 win over AC Milan to reclaim top spot from Inter Milan.
Bianconeri boss Maurizio Sarri made five changes to the side that beat Lokomotiv Moscow in the UEFA Champions League in midweek, with defender Matthijs de Ligt returning to partner Leonardo Bonucci in the heart of defence, while Dybala had to contend with a place on the bench.
Juventus were nearly punished for a slow start in the 16th minute after Suso delivered a delightful cross into the box but the unmarked Krzysztof Piatek glanced his header over the bar from close range.
The home side had to wait until the final five minutes of the half for their first real opening after Ronaldo unleashed a shot that was saved by goalkeeper Gianluigi Donnarumma, while Wojciech Szczesny did well to deny Piatek at the other end minutes later.
Juventus were finding it difficult to break down the Rossoneri defence after the break and Sarri made a big call ten minutes into the second stanza by bringing on Dybala in place of Ronaldo, who ran straight down the tunnel after being taken off.
Sarri's surprise substitution was vindicated with 13 minutes remaining after Dybala finally broke the deadlock with a shot into the bottom corner after weaving his way into the Milan box.
Hakan Calhanoglu almost levelled matters for Rossoneri with seven minutes remaining after latching onto a loose ball on the far side but his shot was saved by Szczesny, as Juventus held for the win on to move a point clear at the top of the table while Milan dropped to 14th.


Singularity of Origin Experimental Port Scanner
IP address specification e.g. <IP_ADDRESS>,<IP_ADDRESS>-255
Ports specification e.g. 80,443,1080,8080-8090
Results


Added try-catch statement by dotjpg3141 · Pull Request #57 · terrajobst/minsk I'm really enjoing this series. I've implemented the try-catch statement and the repl doesn't crash anymore if the evaluator throws an (intended) exception.
Fixing Random, part 31 Last time in this series we saw that we could compute a continuous posterior distribution when given a continuous prior and a discrete likelihood function; I hope it is clear how that is useful, bu…
Microsoft Build 2019 Developer Conference May 6-8 Seattle, WA Join developers and industry experts at Microsoft Build to explore the latest developer tools and technologies. #MSBuild
Using Bing Maps in Blazor with JSInterop and TypeScript In this article we are going to work with the Bing Maps web control in a client side Blazor application. As there is not a Blazor native…
Keyloggers Injected in Web Trust Seal Supply Chain Attack Hackers compromised the script used by Best of the Web to display their trust seal on their customers' websites and to add two key logging scripts designed to sniff keystrokes from visitors.
Using Ed25519 signing keys for encryption @Benjojo12 and I are building an encryption tool that will support SSH keys as recipients. For Ed25519 keys that requires converting points between different elliptic curves. Let's see why and how.
Google is using Your Gmail Account to Track Your Purchases Do you think your email on Gmail is private? If so, you may want to think again, as your Gmail messages are being scanned by Google for purchases, which are then displayed in your Google account.


Introduction
This specifies a **RESTful API** for WSO2 **API Manager** - Store. Please see [full swagger definition](https://raw.githubusercontent.com/wso2/carbon-apimgt/v6.5.176/components/apimgt/org.wso2.carbon.apimgt.rest.api.store/src/main/resources/store-api.yaml) of the API which is written using [swagger 2.0](http://swagger.io/) specification.
Version information
0.16.0
Contact information
Contact: WSO2
Email<EMAIL_ADDRESS>License information
License: Apache 2.0
URL: http://www.apache.org/licenses/LICENSE-2.0.html
URI Scheme
Host: apis.wso2.com
BasePath: /api/am/store/v0.16
Scheme: [HTTPS]
Consumes
[application/json]
Produces
[application/json]


Sentiment Analysis is the process of determining whether a piece of writing is positive, negative or neutral. A sentiment analysis system for text analysis combines natural language processing (NLP) and machine learning techniques to assign weighted sentiment scores to the entities, topics, themes and categories within a sentence or phrase.
A word cloud (wordle or weighted list in visual design) is a novelty visual representation of text data, typically used to depict keyword metadata (tags) on websites, or to visualize free form text. Tags are usually single words, and the importance of each tag is shown with font size or color. This format is useful for quickly perceiving the most prominent terms to determine its relative prominence. When used as website navigation aids, the terms are hyperlinked to items associated with the tag.


Resent you. Or envy you.
For throwing me away as you grew.
Either way Im too prideful.
Too bold. Too grounded.
To allow myself to not go down the chute.
See, I don’t need that.
But want that. I can see that.
Even though it’s only the surface.
What even was the purpose?
For letting me go.

I’ll just hate myself.
For not doing this to you a long time ago.
what if this is an illusion? What if we’re all just walking around with the same splattered thoughts in the back of our heads? Like are we really even friends? And what am I doing here? And when is this going to end? And Is it just me or are you too sculpting your face into the whole smile and pretend?  If that’s the case, then how could you ever possibly win? Because see now I’m confused as to where to even begin.  I couldn’t even tell you. I’m just going with the motions. It seems like every day is a masterpiece of chaos and miscommunicated emotions. And unfortunately each day we wake up and wet our broken brushes. But did you ever think what if we just stopped painting these ugly commotions?
I can see myself crumbling, falling down gracefully. Emotionless with no desire to grab on to something. Outstretched arms with more than enough capability to lift me back up, but nothing seems more appealing to me than that empty pit. It’s tireless. To let go and try less. To neglect life’s responsibilities and succumb to my insecurities as they encompass me and swallow me whole. Into that black hole. That lifeless pit that wants me.


# Cucumber-Rails
[![Build Status](secure.travis-ci.org/cucumber/cucumber-rails.png)](http://travis-ci.org/cucumber/cucumber-rails) [![Dependency Status](gemnasium.com/cucumber/cucumber-rails.png)](https://gemnasium.com/cucumber/cucumber-rails)
Cucumber-Rails brings Cucumber to Rails 3.x. For Rails 2x support, see the [Cucumber Wiki](github.com/cucumber/cucumber/wiki/Ruby-on-Rails).
## Installation
Before you can use the generator, add the gem to your project’s Gemfile as follows:
group :test do gem 'cucumber-rails' # database_cleaner is not required, but highly recommended gem 'database_cleaner' end
Then install it by running:
bundle install
Learn about the various options:
rails generate cucumber:install --help
Finally, bootstrap your Rails app, for example:
rails generate cucumber:install
## Running Cucumber
With Rake:
rake cucumber
Without Rake:
[bundle exec] cucumber
## Bugs and feature requests
The only way to have a bug fixed or a new feature accepted is to describe it with a Cucumber feature. Let’s say you think you have found a bug in the cucumber:install generator. Fork this project, clone it to your workstation and check out a branch with a descriptive name:
git clone git@github.com:you/cucumber-rails.git git checkout -b bug-install-generator
Start by making sure you can run the existing features. Now, create a feature that demonstrates what’s wrong. See the existing features for examples. When you have a failing feature that reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team will review it and hopefully create a fix.
If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request.
### Setting up your environment
I strongly recommend rvm and ruby 1.9.3. When you have that, cd into your cucumber-rails repository and:
gem install bundler bundle install
### Running all features
With all dependencies installed, all features should pass:
rake cucumber
One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass.