216 lines
9.1 KiB
HTML
216 lines
9.1 KiB
HTML
<!-- :noWordSep=+-*\=><;.?/'()%,_|: -->
|
|
|
|
<html>
|
|
<head><title>Factor change log</title></head>
|
|
<body>
|
|
|
|
<h1>Factor 0.77:</h1>
|
|
|
|
<ul>
|
|
<li>Compiler:
|
|
<ul>
|
|
<li>Optimizing out conditionals where the test value is a constant.</li>
|
|
<li>Optimizing out type checks that are always/never satisfied.</li>
|
|
<li>Inlining method bodies when generic words are called on values with known compile-time types.</li>
|
|
<li>Side-effect-free words that output immutable values are evaluated at compile time if all their inputs are literal. You can declare a word as having this condition by suffixing the definition with <code>foldable</code>, eg:
|
|
<pre>: cube dup dup * * ; foldable</pre></li>
|
|
<li>Various arithmetic identities such as <code>1 *</code> are optimized out.
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li>Collections:
|
|
|
|
<ul>
|
|
<li><code>2each ( seq seq quot -- quot: elt -- elt )</code> combinator</li>
|
|
<li><code>join ( seq glue -- seq )</code> word. Takes a sequence of sequences, and constructs a new sequence with the glue in between each sequence. For example:
|
|
<pre> [ "usr" "bin" "grep" ] "/" join
|
|
<b>"usr/bin/grep"</b></pre></li>
|
|
<li>Integers now support the sequence protocol. An integer is an increasing sequence of its predecessors. This means the <code>count ( n -- [ 0 ... n-1 ] )</code> word is gone; just use <code>>vector</code> instead. Also, <code>project</code> has been made redundant by <code>map</code>.</li>
|
|
<li>The <code>seq-transpose ( seq -- seq )</code> word is now named <code>flip</code>.
|
|
</li>
|
|
<li>The matrices library has been greatly simplified. Matrices are now represented as vectors of vectors, and matrix words have been moved to the <code>math</code> vocabulary.</li>
|
|
<li>More descriptive "out of bounds" errors.</li>
|
|
<li>New <code>make-hash ( quot -- namespace )</code> combinator executes quotation in a new namespace, which is then pushed on the stack.</li>
|
|
<li>The <code><namespace></code> word is gone. It would create a hashtable with a default capacity. Now, just write <code>{{ }} clone</code>.</li>
|
|
<li>Sequence construction words changed:
|
|
<pre>
|
|
make-list ==> [ ] make
|
|
make-vector ==> { } make
|
|
make-string ==> "" make
|
|
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>Development tools:
|
|
|
|
<ul>
|
|
<li>In the UI, object slots are now clickable in the inspector.</li>
|
|
<li>Inspector now supports a history and an interactive loop; it prints a brief help message when it starts describing usage.</li>
|
|
<li>The prettyprinter has been merged with the unparser. The <code>unparse ( object -- string )</code> word has been moved to the <code>prettyprint</code> vocabulary, and can now produce a parsable string for any class supported by the prettyprinter.</li>
|
|
<li>New <code>unparse-short ( object -- string )</code> returns a string no longer than a single line.</li>
|
|
<li>The prettyprinter now supports many more configuration variables. See the handbook for details.</li>
|
|
<li>New <code>profile ( word -- )</code> word. Causes the word's accumulative runtime to be stored in a global variable named by the word. This is done with the annotation facility, the word's definition is modified; use <code>reload ( word -- )</code> to get the old definition back from the source file.</li>
|
|
</ul>
|
|
|
|
</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:
|
|
|
|
<ul>
|
|
<li>New <code>sleep ( ms -- )</code> word pauses current thread for a number of milliseconds.</li>
|
|
<li>New <code>with-datastack ( stack word -- stack )</code> combinator.</li>
|
|
<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>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>
|
|
(Daniel Ehrenberg)</li>
|
|
<li>Support for client sockets on Windows. (Mackenzie Straight)</li>
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<h1>Factor 0.76:</h1>
|
|
|
|
<ul>
|
|
<li>
|
|
UI framework:
|
|
<ul>
|
|
<li>Now uses 3-dimensional co-ordinates throughout</li>
|
|
<li>Gradient paint, bevel border paint</li>
|
|
<li>Split pane gadget</li>
|
|
<li>Horizontal scroll bars and wheel mouse scrolling in scroller gadgets</li>
|
|
<li>Incremental layout improves listener responsiveness</li>
|
|
<li>The listener supports styled text output and presentations</li>
|
|
<li>Slide-show tutorial with live code examples</li>
|
|
<li>Performance improvements, code cleanups, bug fixes</li>
|
|
</ul>
|
|
</li>
|
|
<li>
|
|
Sequences:
|
|
<ul>
|
|
<li>The following formely list-specific words are now generic:
|
|
|
|
<pre>all? ( seq quot -- ? | quot: elt -- ? )
|
|
all-with? ( obj seq quot -- ? | quot: elt -- ? )
|
|
subset ( seq quot -- seq | quot: elt -- ? )
|
|
subset-with ( obj seq quot -- seq | quot: obj elt -- ? )
|
|
fiber? ( seq quot -- ? | quot: elt elt -- ? )
|
|
prune ( seq -- seq )</pre>
|
|
|
|
<li> The <code>contains?</code> word for testing membership in a sequence has been
|
|
renamed to <code>member? ( elt seq -- ? )</code>.
|
|
|
|
<li> The list-specific <code>some?</code> and <code>some-with?</code> combinators are gone. Their replacements are generic:
|
|
|
|
<pre>contains? ( seq quot -- ? | quot: elt -- ? )
|
|
contains-with? ( obj seq quot -- ? | quot: obj elt -- ? )
|
|
find ( seq quot -- i elt | quot: elt -- ? )
|
|
find* ( i seq quot -- i elt | quot: elt -- ? )
|
|
find-with ( obj seq quot -- i elt | quot: elt -- ? )
|
|
find-with* ( obj i seq quot -- i elt | quot: elt -- ? )</pre>
|
|
|
|
See the developer's handbook for details.
|
|
|
|
<li> The <code>nreverse ( seq -- )</code> word has been removed.
|
|
|
|
<li> <code>reverse-slice ( seq -- seq )</code> outputs a new sequence that shares
|
|
structure with the given sequence, but presents elements in reverse
|
|
order.
|
|
|
|
<li> The <code>string-compare</code> primitive has been replaced with the lexi word
|
|
which now operates on any pair of sequences of numbers. The
|
|
string> word has been replaced with <code>lexi></code>.
|
|
|
|
<li> The <code>,</code> word no longer accepts a string as input inside a <code>make-string</code>. In 0.75, the following
|
|
two lines were equivalent:
|
|
|
|
<pre>[ "Hello" , " world" , ] make-string
|
|
[ "Hello" % " world" % ] make-string</pre>
|
|
|
|
<li> Now, the former raises a type error. Use <code>,</code> with characters, and <code>%</code> with
|
|
strings inside make-string.
|
|
</ul>
|
|
|
|
<li>Streams:
|
|
|
|
<ul>
|
|
<li>The following words have been renamed:
|
|
|
|
<pre>stream-auto-flush ==> stream-finish ( stream -- )
|
|
stream-write-attr ==> stream-format ( string style stream -- )
|
|
write-attr ==> format ( string style -- )</pre>
|
|
|
|
<li>The following words no longer accept character arguments:
|
|
|
|
<pre>stream-format ( string style stream -- )
|
|
format ( string style -- )
|
|
stream-write ( string stream -- )
|
|
write ( string -- )
|
|
stream-print ( string -- )
|
|
print ( string -- )</pre>
|
|
|
|
<li>Use the new words to write characters:
|
|
|
|
<pre>stream-write1 ( char stream -- )
|
|
write1 ( char -- )</pre>
|
|
|
|
Note that <code>stream-write1</code> is generic and your stream must implement it.
|
|
|
|
<li><code>with-string</code> word renamed to <code>string-out ( quot -- string )</code>
|
|
|
|
<li>New <code>string-in ( string quot -- )</code> word, calls <code>quot</code> with <code>stdio</code> bound to
|
|
a stream that reads from the given string.
|
|
</ul>
|
|
|
|
<li>Everything else:
|
|
|
|
<ul>
|
|
|
|
<li>Many improvements to the matrices library.
|
|
|
|
<li>Improved inspector. Call it with <code>inspect ( obj -- )</code>.
|
|
|
|
<li>The number of generations used for garbage collection can now be set
|
|
with the +G command line switch. You must specify at least 2
|
|
generations.
|
|
|
|
<li>Only 2 generations are used by default now, since there seems to be no
|
|
performance benefit to having 3 after running some brief benchmarks.
|
|
|
|
<li>Fixed bug where images saved from the jEdit plugin would fail to
|
|
start.
|
|
|
|
<li>md5 hashing algorithm in <code>contrib/crypto/</code> (Doug Coleman).
|
|
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</body>
|
|
</html>
|