make-rstring ==> "" make reverse
make-sbuf ==> SBUF" " make
</pre></li>
+<li>The <code>every?</code> word has been replaced with <code>monotonic? ( seq quot -- ? )</code>. Its behavior is a superset of <code>every?</code> -- it now accepts any transitive relation, and checks if the sequence is monotonic under this relation. For example,
+<code>[ = ] monotonic?</code> checks if all elements in a sequence are equal, and <code>[ < ] monotonic?</code> checks for a strictly increasing sequence of integers.</li>
</ul>
</li>
</li>
+<li>User interface:
+
+<ul>
+<li>Binary search is now used for spacial indexing where possible. This improves performance when there are a lot of lines of output in the listener.</li>
+<li>Scroll bars now behave in a more intuitive manner, closer to conventional GUIs.</li>
+<li>Menus now appear when the mouse button is pressed, not released, and dragging through the menu with the button held down behaves as one would expect.</li>
+<li>The data stack and call stack are now shown. In the single-stepper, these two display the state of the program being stepped. In the inspector, the call stack display is replaced with an inspector history.</li>
+<li>Pack layouts with gaps are now supported.</li>
+<li>Many bug fixes.</li>
+</ul>
+
+</li>
<li>Everything else:
<li>New <code>cond ( conditions -- )</code> combinator. It behaves like a set of nested <code>ifte</code>s, and compiles if each branch has the same stack effect. See its documentation comment for details.</li>
<li>Formally documented method combination (<code>G:</code> syntax) in handbook.
<li>Erlang/Termite-style concurrency library in <code>contrib/concurrency</code> (Chris Double).</li>
-<li>Completely redid infix algebra in <code>conrib/algebra/</code>. Now, vector operations are possible
+<li>Completely redid infix algebra in <code>contrib/algebra/</code>. Now, vector operations are possible
and the syntax doesn't use so many spaces. New way to write the quadratic formula:
<pre>MATH: quadratic[a;b;c] =
plusmin[(-b)/2*a;(sqrt(b^2)-4*a*c)/2*a] ;</pre>
-- fix up the min thumb size hack\r
-\r
+ ui:\r
\r
+- fix up the min thumb size hack\r
- long lines of text fail in draw-surface\r
- only redraw dirty gadgets\r
- faster mouse tracking\r
Outputs \texttt{t} if the quotation yields true when applied to each element, otherwise outputs \texttt{f}. Given an empty sequence, vacuously outputs \texttt{t}.
\wordtable{
\vocabulary{sequences}
-\ordinaryword{every?}{every?~( seq quot -- ?~)}
+\ordinaryword{monotonic?}{monotonic?~( seq quot -- ?~)}
\texttt{quot:~element element -- ?}\\
}
Tests if all elements of the sequence are equivalent under the relation. The quotation should be an equality relation (see \ref{equality}), otherwise the result will not be useful. This is implemented by vacuously outputting \verb|t| if the sequence is empty, or otherwise, by applying the quotation to each element together with the first element in turn, and testing if it always yields a true value. Usually, this word is used to test if all elements of a sequence are equal, or the same element:
M: object >list ( seq -- list ) dup length 0 rot (>list) ;
-: conjunction ( v -- ? ) [ ] all? ; flushable
-: disjunction ( v -- ? ) [ ] contains? ; flushable
-
: index ( obj seq -- n ) [ = ] find-with drop ; flushable
: index* ( obj i seq -- n ) [ = ] find-with* drop ; flushable
: member? ( obj seq -- ? ) [ = ] contains-with? ; flushable
: literals-match? ( values template -- ? )
[
over literal? [ >r literal-value r> ] [ nip @ ] ifte =
- ] 2map conjunction ;
+ ] 2map [ ] all? ;
: values-match? ( values template -- ? )
[ @ = [ drop f ] unless ] 2map [ ] subset [ eq? ] monotonic? ;
[ swap memq? ] map-with ;
: lookup-mask ( mask word -- word )
- over disjunction [ (kill-shuffle) hash ] [ nip ] ifte ;
+ over [ ] contains? [ (kill-shuffle) hash ] [ nip ] ifte ;
: kill-shuffle ( literals node -- )
#! If certain values passing through a stack op are being
M: #return optimize-node* ( node -- node/t )
optimize-fold ;
-! #label
-GENERIC: calls-label* ( label node -- ? )
-
-M: node calls-label* 2drop f ;
-
-M: #call-label calls-label* node-param eq? ;
-
-: calls-label? ( label node -- ? )
- [ calls-label? not ] all-nodes-with? not ;
-
! M: #label optimize-node* ( node -- node/t )
! dup node-param over node-children first calls-label? [
! drop t
: retarget-drag ( -- )
hand [ rect-loc world get pick-up ] keep
2dup hand-clicked eq? [
- 2drop
- ] [
- [ set-hand-clicked ] keep update-hand
- ] ifte ;
+ 2dup set-hand-clicked dup update-hand
+ ] unless 2drop ;
: menu-actions ( glass -- )
dup [ drop retarget-drag ] [ drag 1 ] set-action
: command-quot ( presented quot -- quot )
[
+ \ drop ,
[ swap literalize , % ] [ ] make ,
[ pane get pane-call ] %
] [ ] make ;