<?xml version='1.0' encoding='iso-8859-1'?><?xml-stylesheet type='text/xsl' href='https://w3future.com/w3f/w3f.xsl' ?>
<html xmlns="http://www.w3.org/2002/06/xhtml2" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:xf="http://www.w3.org/2002/xforms/cr" xml:lang="en" xml:base="https://w3future.com/weblog/2004/05/index.txt">
<head>
<title>Sjoerd Visscher's weblog</title>
</head>
<body>
<section id="content">
	<h>Sjoerd Visscher's weblog</h>
	<p></p>
	<section id="note">
		<h>Last Update</h>
		<p>10/16/2005; 1:29:52 AM</p>
		<p id="alternates" class="buttons">
			<l href="https://w3future.com/weblog/2004/05/index.xml?notransform" rel="alternate" type="application/xml" title="See this web page with XHTML 2.0 technology."><span>Try</span> XHTML 2.0</l>
			<l href="view-source:https://w3future.com/weblog/2004/05/index.xml?notransform" title="View the XHTML 2.0 source of this page."><span>Src</span> XHTML 2.0</l>
			<l href="https://w3future.com/tools/xr.pl?xr=https://w3future.com/xr/w3f.xml&amp;xml=https://w3future.com/weblog/2004/05/index.xml%3Fnotransform" rel="meta" type="application/rdf+xml" title="RDF metadata"><span>RDF</span> Metadata</l>
		</p>
		<xi:include href="https://w3future.com/w3f/buttons.xml" />
	</section><section>
  <h><a href="https://w3future.com/weblog/2004/05/13.xml">Thursday, May 13, 2004</a></h>
<a name="a275"></a>
<section id="a275">
<h id='moiellTeaser'><a href="https://w3future.com/weblog/2004/05/13.xml#a275" class="weblogItemTitle">Moiell teaser</a></h>
<p>Almost a year ago I wrote about <a href="https://w3future.com/weblog/2003/05/21.xml#xpath20Sequences">adding sequences to Loell</a>. 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.</p>
<p>The result turned out to be rather different from the original Loell, so I gave it a new name: <em>Moiell</em>. It stands for Monadic Objects, Iterative Evaluation, Little Language. I'll explain later.</p><p>The reason I'm now posting about this is that I got the following code running:</p>
<pre>sieve: [|p::ns| &gt;p, sieve( ns[me mod p != 0] ) ]
>sieve(2..inf)</pre>
<p>It generates the prime numbers using <a href="http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">the sieve of Eratosthenes</a>. I think it's really cool short code. A little bit of explanation:</p>
<ul>
<li><code>[|args| body]</code> &#8212; a function (as in Smalltalk)</li>
<li><code>x::xs</code> &#8212; put first value of a sequence in <code>x</code> and the rest (lazily) in <code>xs</code> (like <code>x:xs</code> in Haskell)</li>
<li><code>&gt; values</code> &#8212; yield values (like <code>yield</code> in Python or Ruby)</li>
<li><code>values[test]</code> &#8212; filter (as in XPath)</li>
</ul>
</section>
</section><section>
  <h><a href="https://w3future.com/weblog/2004/05/07.xml">Friday, May 07, 2004</a></h>
<a name="a274"></a>
<section id="a274">
<h id='windowsLonghornGlassLookUpdated'><a href="https://w3future.com/weblog/2004/05/07.xml#a274" class="weblogItemTitle">Windows Longhorn Glass Look Updated</a></h>
<p>It's funny to see the increase in hit to my Windows Longhorn Glass Look page everytime there's news about Longhorn. Today <a href="http://www.zdnet.be/News.cfm?id=36227">ZDnet Netherlands</a> (and the Dutch ZDnet Belgium) even put a link to it in the "relevant links" section of an article about Aero.</p>
<p><a href="http://www.winsupersite.com/showcase/longhorn_4074_02.asp">WinSuperSite published new screenshots</a> and I liked <a href="http://www.winsupersite.com/images/showcase/4074_ui_06.gif">the new menus</a>, so I added a menu to the page. The windows are now resizable too.</p>
<p><a href="https://w3future.com/2003/glass/glass.html">The Windows Longhorn Glass Look page.</a></p>
</section>
</section>
<xi:include href="https://w3future.com/tools/rdf.php?about=https://w3future.com/weblog/2004/05/index.txt" /></section>
<section id="navigation"><xi:include href="https://w3future.com/w3f/sections.xml" /></section>
<section id="sidebar"><xi:include href="https://w3future.com/weblog/sidebars/weblog.opml" /></section>
</body>
</html>