<?xml version="1.0"?><!DOCTYPE rss PUBLIC "-//Netscape Communications//DTD RSS 0.91//EN" "http://my.netscape.com/publish/formats/rss-0.91.dtd"><rss version="0.91"><channel>  <title>The Mango Library</title>  <description>Mango Library Development Log</description>  <link>/mango/news</link>  <language>en-gb</language>  <webMaster>jez@jezuk.co.uk</webMaster>  
<item><title>Mango on GitHub</title><link>http://www.jezuk.co.uk/mango/news?id=4363</link><description><![CDATA[ I've migrated my self-hosted Bazaar repository up <a href='https://github.com/jezhiggins/mango'>into GitHub<a/>.   ]]></description></item>
<item><title>Mango Release. Panic ye not!</title><link>http://www.jezuk.co.uk/mango/news?id=4157</link><description><![CDATA[ <p>Nothing earth shaking. just a small handful of predicates and a sequence.  The new predicates are Nand, Nor, Xor, and Xnor which perform the logical operations you expect and OneOf, which evaluates a number of other predicates and returns true if one and only one of those is true.  The new sequence is the NullSequence, which returns null after null after null.</p>
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.zip'>mango-bin.zip</a> (68,267 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.tar.gz'>mango-bin.tar.gz</a> (68,277 bytes)</li>
</ul>
The binaries are compiled with Java 6.  The code builds fine with Java 5 though, so if you're using that just grab the source.
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.zip'>mango-src.zip</a> (88,097 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.tar.gz'>mango-src.tar.gz</a> (30,930 bytes)</li>
</ul>
The source bundle includes a <code>javadoc</code> build target, and the current <a href='http://www.jezuk.co.uk/mango-files/html'>Javadoc is available online</a>, but you can grab the Javadoc seperately too.  <ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.zip'>mango-javadoc.zip</a> (104,691 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.tar.gz'>mango-javadoc.tar.gz</a> (42,454 bytes)</li>
</ul>
</p>
<p>The Mango code lives in a Bazaar repository.  You can pull the code from :
<pre>
    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk
</pre>
</p>
<p>The previous non-generic release, built with Java 1.4, is <a href='http://www.jezuk.co.uk/mango/download#java14'>still available</a>.</p> ]]></description></item>
<item><title>Zippy Triples  with Groovy and Mango</title><link>http://www.jezuk.co.uk/mango/news?id=4078</link><description><![CDATA[ <p>Here's a Groovy version of the Java code below.  It's more or less identical to <a href='http://wordaligned.org/articles/zippy-triples-served-with-python'>the Python original</a>.</p>
<pre class="prettyprint">
import uk.co.jezuk.mango.Iterators

def prev_this_next(items) {
  chain = Iterators.ChainIterator(null, items, null)
  (prev, current, next) = Iterators.TeeIterator(chain, 3)
  current.next()
  next.next()
  next.next()
  return Iterators.ZipIterator(prev, current, next)
}

long_weekend = ["Friday", "Saturday", "Sunday", "Monday"]
yesterday_today_tomorrow = prev_this_next(long_weekend)
for(ytt in yesterday_today_tomorrow) 
  println ytt
</pre> ]]></description></item>
<item><title>Zippy triples served with Java and Mango</title><link>http://www.jezuk.co.uk/mango/news?id=4077</link><description><![CDATA[ <p>Here's a fairly direct transliteration of some of the code presented in Thomas Guest's <a href='http://wordaligned.org/articles/zippy-triples-served-with-python'>Zippy Triples served with Python</a>.  As you might anticipate, it's a little wordier than the Python original, but it's still a nice example of using iterators in an unusual way to neatly solve a problem.</p>

<pre class="prettyprint">
import java.util.Iterator;
import java.util.List;

import uk.co.jezuk.mango.Collections;
import uk.co.jezuk.mango.Iterators;

public class ZippyTriples
{
    static public void main(final String[] args)
    {
        List&lt;String&gt; long_weekend = Collections.list("Friday", "Saturday", "Sunday", "Monday");
        Iterator&lt;List&lt;String&gt;&gt; yesterday_today_tomorrow = prev_this_next(long_weekend);

        while(yesterday_today_tomorrow.hasNext())
        {
            List&lt;String&gt; ytt = yesterday_today_tomorrow.next();
            for(String d : ytt)
            {
                System.out.print(d);
                System.out.print(" ");
            }
            System.out.println();
        }
    }

    static Iterator&lt;List&lt;String&gt;&gt; prev_this_next(final List&lt;String&gt; items)
    {
        Iterator&lt;String&gt; chain = Iterators.ChainIterator(null, items, null);
        List&lt;Iterator&lt;String&gt;&gt; prev_this_next = Iterators.TeeIterator(chain, 3);
        Iterator&lt;String&gt; prev = prev_this_next.get(0);
        Iterator&lt;String&gt; current = prev_this_next.get(1);
        Iterator&lt;String&gt; next = prev_this_next.get(2);

        current.next();
        next.next();
        next.next();

        return Iterators.ZipIterator(prev, current, next);
    }
}
</pre> ]]></description></item>
<item><title>Mango Release.  You can tell it's summer, the iterators are blooming.</title><link>http://www.jezuk.co.uk/mango/news?id=4074</link><description><![CDATA[ A few years ago, my code-chum Thomas Guest wrote <a href='http://wordaligned.org/articles/zippy-triples-served-with-python'>
Zippy triples served with Python</a>, a rather good article highlighting some of the neat iterators in the Python standard library.  I've added similar iterators to Mango (although they are, of course, a little wordier than their Python originals) - ChainIterator, TeeIterator, ZipIterator - along with a GeneratorIterator and a new ConstantSequence (it makes sense when you see it).  Wrapping up this release are new Any and All predicates.

<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.zip'>mango-bin.zip</a> (64,441 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.tar.gz'>mango-bin.tar.gz</a> (64,476 bytes)</li>
</ul>
The binaries are compiled with Java 6.  The code builds fine with Java 5 though, so if you're using that just grab the source.
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.zip'>mango-src.zip</a> (80,379 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.tar.gz'>mango-src.tar.gz</a> (30,600 bytes)</li>
</ul>
The source bundle includes a <code>javadoc</code> build target, and the current <a href='http://www.jezuk.co.uk/mango-files/html'>Javadoc is available online</a>, but you can grab the Javadoc seperately too.  <ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.zip'>mango-javadoc.zip</a> (103,181 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.tar.gz'>mango-javadoc.tar.gz</a> (40,282 bytes)</li>
</ul>
</p>
<p>The Mango code lives in a Bazaar repository.  You can pull the code from :
<pre>
    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk
</pre>
</p>
<p>The previous non-generic release, built with Java 1.4, is <a href='http://www.jezuk.co.uk/mango/download#java14'>still available</a>.</p> ]]></description></item>
<item><title>Mango Release, now with added Generics</title><link>http://www.jezuk.co.uk/mango/news?id=3992</link><description><![CDATA[ <p>Over the past three or four weeks I've restarted work on Mango, dragging it into the modern age by throwing out the deprecated bits, making one or two little nips and tucks, and by generifying (if that's a real word) the library.  So, I've cut a new release.
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.zip'>mango-bin.zip</a> (54,231 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-bin.tar.gz'>mango-bin.tar.gz</a> (54,285 bytes)</li>
</ul>
The binaries are compiled with Java 6.  The code builds fine with Java 5 though, so if you're using that just grab the source.
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.zip'>mango-src.zip</a> (68,847 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-src.tar.gz'>mango-src.tar.gz</a> (25,146 bytes)</li>
</ul>
The source bundle includes a <code>javadoc</code> build target, and the current <a href='http://www.jezuk.co.uk/mango-files/html'>Javadoc is available online</a>, but you can grab the Javadoc seperately too.  It's not overflowing with words, if I'm honest, because the concepts Mango uses are pretty straightforward, but hopefully the Javadoc's not without its uses.
<ul>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.zip'>mango-javadoc.tar.gz</a> (101,603 bytes)</li>
<li><a href='http://www.jezuk.co.uk/mango-files/mango-javadoc.tar.gz'>mango-javadoc.tar.gz</a> (38,392 bytes)</li>
</ul>
</p>
<p>The Mango code is now lives in a Bazaar repository.  You can pull the code from :
<pre>
    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk
</pre>
</p>
<p>The previous non-generic release, built with Java 1.4, is <a href='http://www.jezuk.co.uk/mango/download#java14'>still available</a>.</p> ]]></description></item>
<item><title>The LGPL and Java</title><link>http://www.jezuk.co.uk/mango/news?id=3314</link><description><![CDATA[ <span class='linkfarm'><strong><a href='http://www.gnu.org/licenses/lgpl-java.html'>The LGPL and Java</a></strong> - <i>... the LGPL works as intended with all known programming languages, including Java ...</i> <br/>Describes exactly why <a href='/mango'>Mango</a> is released under the <a href='/mango/license'>LGPL</a>.</span> ]]></description></item>
<item><title>New Mango Release</title><link>http://www.jezuk.co.uk/mango/news?id=3313</link><description><![CDATA[ <p>Uploaded a new <a href='/mango/download'>Mango release</a>.</p>
<p>It adds a couple of new <a href='/mango/iterators'>iterators</a>.  The <a href='/mango-files/html'>Javadocs</a> are up-to-date, but the web pages are lagging a little.</p> ]]></description></item>
<item><title>Makeover</title><link>http://www.jezuk.co.uk/mango/news?id=3302</link><description><![CDATA[ Prettied up the Mango website, including adding a logo designed by <a href='http://www.altheim.com/murray/'>Murray Altheim</a>.  He originally mailed it to me back in April 2004 while he was <i>just wasting time not writing a paper</i>.  It's obviously taken some time to work its way out of my inbox and on to the web, but I'm very pleased to finally get it up here.  And chuffed too, that someone would take the time.  Belated thanks Murray! ]]></description></item>
<item><title>ReverseIterator</title><link>http://www.jezuk.co.uk/mango/news?id=3171</link><description><![CDATA[ <p>I'm in the middle of writing a conference presentation which talks about some of what Mango does, I'm struggling for an example, and bam!  There it is, what I need is an iterator that traverses a list in reverse order.  So I wrote a test, wrote an iterator, then wrote it again in under five minutes.  It's in subversion now.</p>
<p>You can pull the Mango code from 
<pre>  svn co svn://jezuk.dnsalias.net/jezuk/mango/trunk</pre>
</p> ]]></description></item>

</channel></rss>