2011 New Year's Update

357 views
Skip to first unread message

Brian T. Rice

unread,
Jan 3, 2011, 4:46:20 PM1/3/11
to Slate project discussion
Since I've been so publicity-shy the last few years, it must seem like Slate is dormant, but I'll try to dispel such impressions soon and start with some status updates.

Slate is (for purposes of overview) a self-hosted dynamic object-oriented language with prototypes, multi-method dispatch, and a variety of other strong features described at http://www.slatelanguage.org.

VM/platform-side:
The SSA VM is still supporting Slate's run-time well. We've not been regularly updating the 64-bit port of Slate but that is simply due to contraction of build supports (basically, I stick with 32-bit modes out of convenience and we don't have a regular user insisting on 64-bit usage). Other than that, Slate's runtime has remained very portable and stable.

Language:
* Rest-parameters, allowing methods/blocks to receive an arbitrary number of non-dispatching input values (without grouping them in Array arguments), were made possible using sequestering of the comma character from binary selectors.
* Assignment notation has been added, as a macro using a binary selector, but NOT requiring the backtick (`) prefix of ordinary macros. The parser in fact recognizes a class of binary selectors as having assignment-style precedence and expands them into the less-convenient message-passing style that is the basis of Slate abstraction. So we get notational convenience without breaking encapsulation, and without too many special parser rules (macros are just methods on AST node types as usual). Quick examples: "x := y foo: z" => "x: (y foo: z)" and "a at: 3 := 4" => "a at: 3 put: 4". Op-assignment like "+=" is also included.
* Other notations are in development, such as "::=" for immutable/nestable bindings, which will replace a lot of what Slate "define:" does for types and constants. "=:=" is envisioned for two-way unification/pattern-matching of terms.

Libraries:
* Stream / IO performance was increased by an order of magnitude by transitioning the API to build upon the bulk-transfer primitive style rather than element-by-element transfer, meaning that composed streams act faster because they're batching operations by default. This makes parsing and loading Slate libraries quicker, which also improves bootstrap-from-scratch. More in this direction is coming, as strongly informed by Smalltalk's recent experimental Xtreams project.
* Slate's parser was re-structured to be a little more efficient, extensible, and have better stateless stream-style behavior (anticipating a documentation language extension).
* "Pattern" syntax has been added, generalizing symbol syntax #foo with #(foo: _) to allow a few notations from Atomo (described below) such as generalizing `er which expands "#foo `er" to "[| :x | x foo]" into "[| :x :y | x foo: y]", or allowing for full functional-programming-style pattern matches. There's a lot going on with this that is in flux so I'll expand this later.
* Macros named `conditions: and `conditions:otherwise: were added to complement caseOf: and caseOf:otherwise: to allow condition-rule pair checking in methods that is efficient but intention-revealing for code that requires more abstraction support than PMD.
* The Slate file/module notion is taking a page from NewSpeak and CommonJS notions of modules, where file source is used as a kind of strongly-isolated function body that is only aware of its very local naming conventions and which supplies a return value (or side-effects the namespace it is loaded-into) to allow for atomic-loading and relocatable modules, or modules which can be loaded in two different places at once for testing. (This also makes source code less verbose since it uses fewer nested namespaces textually.) I am already parceling out system construction into these independent entities to make Slate's ecosystem less brittle. There will also be a *convenient* library installer soon.

Support:
* Disassembly in the debugger is easier to read.
* Indentation in the Emacs mode is finally sensible in almost all cases, and has kept up with the latest syntax changes.

Atomo:
Atomo is a young language embedded in Haskell that is strongly related to Slate (and evolved through ongoing discussions about desired possibilities for Slate). It uses PMD with a more-sound version of prototype derivation than delegation slots, and also implements input-destructuring and pattern-matching a la Haskell. It is an embedded language so has raised interest from the Haskell/functional community about having a good embedded dynamic language for Haskell as a platform.

I have been engaging in "co-opetition" with Atomo, presenting it at local user groups in Portland for publicity and feedback, and providing experience reports from Slate that help inform design decisions. Atomo in turn has acted as R&D vessel for Slate ideas, which I am carrying back into Slate as quickly as I can. In particular, I will port back Atomo's documentation style (self-hosted, using the parser to embed "live" example code) to make Slate much easier to document, learn, and master.


-- 
Brian T. Rice
Reply all
Reply to author
Forward
0 new messages