[RSS 0.91]
Tuesday 11 September, 2012
#Mango on GitHub
I've migrated my self-hosted Bazaar repository up into GitHub.
[
Add a comment]
Wednesday 27 October, 2010
#Mango Release. Panic ye not!

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.

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. The source bundle includes a javadoc build target, and the current Javadoc is available online, but you can grab the Javadoc seperately too.

The Mango code lives in a Bazaar repository. You can pull the code from :

    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk

The previous non-generic release, built with Java 1.4, is still available.


[Add a comment]

Friday 21 May, 2010
#Zippy Triples with Groovy and Mango

Here's a Groovy version of the Java code below. It's more or less identical to the Python original.

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
Zippy, fruity, groovy ... YEAH!

(Nice work, Jez)
Thomas Guest [e] [w], 22nd May 2010


[Add a comment]

#Zippy triples served with Java and Mango

Here's a fairly direct transliteration of some of the code presented in Thomas Guest's Zippy Triples served with Python. 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.

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<String> long_weekend = Collections.list("Friday", "Saturday", "Sunday", "Monday");
        Iterator<List<String>> yesterday_today_tomorrow = prev_this_next(long_weekend);

        while(yesterday_today_tomorrow.hasNext())
        {
            List<String> ytt = yesterday_today_tomorrow.next();
            for(String d : ytt)
            {
                System.out.print(d);
                System.out.print(" ");
            }
            System.out.println();
        }
    }

    static Iterator<List<String>> prev_this_next(final List<String> items)
    {
        Iterator<String> chain = Iterators.ChainIterator(null, items, null);
        List<Iterator<String>> prev_this_next = Iterators.TeeIterator(chain, 3);
        Iterator<String> prev = prev_this_next.get(0);
        Iterator<String> current = prev_this_next.get(1);
        Iterator<String> next = prev_this_next.get(2);

        current.next();
        next.next();
        next.next();

        return Iterators.ZipIterator(prev, current, next);
    }
}
Hello,

very nice example. Are You also programming in PHP?

It is better and more friendly than Python I think.

Regards,

Laz
Laz Taylor [e] [w], 9th Jun 2010


[Add a comment]

Thursday 13 May, 2010
#Mango Release. You can tell it's summer, the iterators are blooming.
A few years ago, my code-chum Thomas Guest wrote Zippy triples served with Python, 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. 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. The source bundle includes a javadoc build target, and the current Javadoc is available online, but you can grab the Javadoc seperately too.

The Mango code lives in a Bazaar repository. You can pull the code from :

    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk

The previous non-generic release, built with Java 1.4, is still available.


[Add a comment]

Thursday 05 November, 2009
#Mango Release, now with added Generics

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.

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. The source bundle includes a javadoc build target, and the current Javadoc is available online, 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.

The Mango code is now lives in a Bazaar repository. You can pull the code from :

    bzr branch http://jezuk.dnsalias.net/bzr/mango/trunk

The previous non-generic release, built with Java 1.4, is still available.


[Add a comment]

Monday 20 August, 2007
#The LGPL and Java - ... the LGPL works as intended with all known programming languages, including Java ...
Describes exactly why Mango is released under the LGPL.

[Add a comment]

Friday 17 August, 2007
#New Mango Release

Uploaded a new Mango release.

It adds a couple of new iterators. The Javadocs are up-to-date, but the web pages are lagging a little.


[Add a comment]

Wednesday 15 August, 2007
#Makeover
Prettied up the Mango website, including adding a logo designed by Murray Altheim. He originally mailed it to me back in April 2004 while he was just wasting time not writing a paper. 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!
[Add a comment]

Friday 16 March, 2007
#ReverseIterator

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.

You can pull the Mango code from

  svn co svn://jezuk.dnsalias.net/jezuk/mango/trunk

hello from google...
google [e] [w], 19th Mar 2007

[Add a comment]

Friday 13 October, 2006
#New Mango Release

My recent development rush has wound down so I've packaged a new Mango release. Online Javadoc is up-to-date. Other documentation currently lacks some of the new things.


[Add a comment]

Friday 29 September, 2006
#Updated SelectingIterator to support the remove method.
Hi i needed to know something for a class project if eny one knows who invented the steam locomotive pleas contact me.
kim [e], 24th Mar 2008

[Add a comment]

Thursday 28 September, 2006
#Added int findPositionIf(Collection coll, Predicate pred)
[Add a comment]

Monday 25 September, 2006
#

Added Partition, an algorithm for splitting a collection into two. Iterates over the collection, applying a predicate to each element. Objects matching the predicate are removed and added to a results collection.


[Add a comment]

Friday 22 September, 2006
#

The changes keep coming. Yesterday saw set intersection, and today I've just committed symmetric difference. My initial feeling was to call it disjunction, but that's clearly the latent logician in me talking.


[Add a comment]

Thursday 21 September, 2006
#New Release

Kicked out a new Mango release. Online Javadoc is up-to-date. Other documentation currently lacks the new things.


[Add a comment]

#

Mango has suddenly become work relevant again. In the last couple of days I've committed a new iterator that works over Strings, and a new algorithm for stripping duplicates from a sorted collection.

I expect more to follow, and will drop a new release soon.

Added an algorithm to find the intersection of two collections.
jez, 21st Sep 2006
Added a variation on find which returns the index of the object in the collection
jez, 23rd Sep 2006

[Add a comment]

Wednesday 08 September, 2004
#NullIterator
/**
* A NullIterator iterates over nothing. That is, hasNext
* always returns false.
*/

static public java.util.Iterator NullIterator();

In CVS (mail me for access) now.
[Add a comment]

Friday 28 May, 2004
#Mango still lives.
Uploaded a new release today. It adds a couple of additional algorithms, and two new iterators, SkippingIterator and, much more interesting, TransformIterator.
Cool! Will the next version have a MincingIterator ? :-)

Seriously(ish) - any thought about integrating with Jakarta Commons Collections ? The two libraries share some common concepts and it would be nice to be able to use them together...
kal, 1st Jun 2004

It's worth another look I suppose. I did track the commons-dev mailing list for some time a while back, but there seemed to be no movement on Collections at the time. (It was all Bean this and Jelly that.)

Commons Collections and Mango have similar iterators and unary predicates, so perhaps the algorithms part would fit with them.

I'll have another go at their mailing list perhaps.
jez, 2nd Jun 2004

Well, I'm a bit late to the conversation, but I also am a bit curious about the Commons Functor work. Do they make sense to you??

I'm not at all clear if they've become less verbose, one of the main reasons for Functors etc.

Hope all is well,

Owen
backspaces, 6th Sep 2006


[Add a comment]

Wednesday 19 May, 2004
#Does Mango still live?
A recent mail -
To: Jez
Subject: Mango Status?

Greetings:

I came across your website some time ago.  I am the author of a similar
libary, jga, found at

http://jga.sf.net/

I'll be speaking at the next JavaOne on applying functors to desktop
programming, and one of my slides lists the available functor-based
libraries that I have been able to find.  I thought I'd touch base with
you to find out what the status of Mango is at this point.

Is this still an on-going project?

David Hall
I replied
To: David
Subject: Re: Mango Status?

Hello David, 

> 
> I came across your website some time ago.  I am the author of a
> similar libary, jga, found at
> 
> http://jga.sf.net/
> 

We certainly seem to have been be working along similar lines.  I 
knew somebody had to be somewhere :)

> I'll be speaking at the next JavaOne on applying functors to desktop
> programming, and one of my slides lists the available functor-based
> libraries that I have been able to find.  I thought I'd touch base with
> you to find out what the status of Mango is at this point.
> 
> Is this still an on-going project?
> 

It's still on-going in as much as I haven't stopped working on 
it.  I just haven't been working on it, if you see what I mean.
The library started as a result of some other work I was doing 
at the time, and I've added to it in dribs and drabs over time.  
Checking now, it has been some time. 

Over the last year or so, I've done much less work in Java and 
rather more in C++, so the motivation to work on it hasn't been 
there.  I'll no doubt come back to it at some point.  Simply 
receiving this mail may prod me a bit.

Best, 
Jez

[Add a comment]


Jez Higgins