w3future.com

Sjoerd Visscher's weblog

Last Update

10/16/2005; 1:29:52 AM

Try XHTML 2.0
Src XHTML 2.0
RDF Metadata


Site Colors

Syn Atom 1.0
Syn RSS 0.91
Syn Subscribe

CC Licensed
Geo URL
With Radio

Thursday, May 13, 2004

Moiell teaser

Almost a year ago I wrote about adding sequences to Loell. I did a few attempts but failed. Then a month ago I implemented continuations in Javascript. (It's not pretty.) After that it went pretty smooth. All languages may by Turing complete, but some language features can make the difference between being able to solve a problem or not. Even if that feature is simply implemented in the language itself.

The result turned out to be rather different from the original Loell, so I gave it a new name: Moiell. It stands for Monadic Objects, Iterative Evaluation, Little Language. I'll explain later.

The reason I'm now posting about this is that I got the following code running:

sieve: [|p::ns| >p, sieve( ns[me mod p != 0] ) ]
>sieve(2..inf)

It generates the prime numbers using the sieve of Eratosthenes. I think it's really cool short code. A little bit of explanation:

  • [|args| body] — a function (as in Smalltalk)
  • x::xs — put first value of a sequence in x and the rest (lazily) in xs (like x:xs in Haskell)
  • > values — yield values (like yield in Python or Ruby)
  • values[test] — filter (as in XPath)

Friday, May 07, 2004

Windows Longhorn Glass Look Updated

It's funny to see the increase in hit to my Windows Longhorn Glass Look page everytime there's news about Longhorn. Today ZDnet Netherlands (and the Dutch ZDnet Belgium) even put a link to it in the "relevant links" section of an article about Aero.

WinSuperSite published new screenshots and I liked the new menus, so I added a menu to the page. The windows are now resizable too.

The Windows Longhorn Glass Look page.