javax.z Yet Another Collections Library

G

Godspeed

I have started writing a new collections library based on set theory as per
Spivey's Z notation. I have put the library on SourceForge. It is currently
in its infancy and it will be expanded fairly rapidly.

Let me know if you are interested in getting involved.

To try it out go to: http://sourceforge.net/projects/zedlib

.... or search for project "javax.z"

I have resisted calling it yacl, but maybe that is more appropriate!

Brad.
 
G

Godspeed

Good idea. Just for a teaser...

Sequence extends Function extends Relation extends Set implements
java.util.Set

Bag extends Function ...

IMO, Sun has incorrectly modelled Map (which is equivalent to Spivey's
Function) separate to a Set. However, a Function (Map) is actually a type of
Set. Sun's collections don't have a natural Relation class which is a
mapping of X to Y values, where X can be repeated if it maps to a different
Y (hence, different to Map). A Sun Map should be a type of Relation (IMO)
which I call a Function following Spivey.

I suppose there is a purist reason for using javax.z, and it should make
collections more useful and usable. One major improvement I should make is
to introduce interfaces (they are all classes at the moment). I'll do that
soon.

The ability to use domainRestriction, rangeRestriction, transitiveClosure,
inverse, relationalComposition, relationalOverride should prove interesting
and satisfying.

Oliver Wong said:
Godspeed said:
I have started writing a new collections library based on set theory as
per Spivey's Z notation. [...]

To try it out go to: http://sourceforge.net/projects/zedlib

Maybe you should put a little blurb on the homepage about why people
should prefer your library over Sun's.

- Oliver
 
T

Thomas Weidenfeller

Oliver said:
Godspeed said:
I have started writing a new collections library based on set theory as per
Spivey's Z notation. [...]
To try it out go to: http://sourceforge.net/projects/zedlib

Maybe you should put a little blurb on the homepage about why people
should prefer your library over Sun's.

[the original posting didn't show up at my news server. Probably because
it was x-posted to non-existing groups. So I add my comments here.]


I would actually suggest the OP starts with revising the package name.
"javax.z" is in Sun's reserved name space.

Then a pointer to http://spivey.oriel.ox.ac.uk/mike/zrm/zrm.pdf might be
in order, too, to enlight candidates about the Z notation. My printed
copy is catching dust for many years, and I doubt one will win the
hearts and minds of the garden-variety programmer with a Z-notation
based library, with equally terse documentation. But good luck to the OP.

/Thomas
 
G

Godspeed

Thanks for the feedback.

I could change the package name to "au.com.javax.z" or go for something like
"com.zedlib" or just "collections.z" or does Doug Lea own "collections"?

Thomas Weidenfeller said:
Oliver said:
Godspeed said:
I have started writing a new collections library based on set theory as
per Spivey's Z notation. [...]
To try it out go to: http://sourceforge.net/projects/zedlib

Maybe you should put a little blurb on the homepage about why people
should prefer your library over Sun's.

[the original posting didn't show up at my news server. Probably because
it was x-posted to non-existing groups. So I add my comments here.]


I would actually suggest the OP starts with revising the package name.
"javax.z" is in Sun's reserved name space.

Then a pointer to http://spivey.oriel.ox.ac.uk/mike/zrm/zrm.pdf might be
in order, too, to enlight candidates about the Z notation. My printed copy
is catching dust for many years, and I doubt one will win the hearts and
minds of the garden-variety programmer with a Z-notation based library,
with equally terse documentation. But good luck to the OP.

/Thomas
 
A

Andrew Thompson

Godspeed said:
Thanks for the feedback.

Please refrain from top-posting.
I could change the package name to "au.com.javax.z"

I do not think too many people would be excited
about a package name proclaiming to come out
of some Australian company called 'javax'.

Package names are supposed to be indicative of
their origin.
..or go for something like "com.zedlib"

Do you own Zedlib (or variants) as a company name?
do you control the domain zedlib.com? If no - I would
again suggest not.
..or just "collections.z" or does Doug Lea own "collections"?

Dunno.. but individuals can put code under there own
names, like
ind.thompson.andrew.etcetera..
...or in your case it might be..
ind.speed.god...
...or..
ind.xagyg
...or..
ind.name.real

BTW - 'godspeed'.. is that /faster/ than 'ludicrous speed'?

Andrew T.
 
O

Oliver Wong

Godspeed said:
I could change the package name to "au.com.javax.z" or go for something
like "com.zedlib" or just "collections.z" or does Doug Lea own
"collections"?

The way it usually works, is you use your domain name, in reverse order,
as the prefix to your package name. For example, if you own "google.com",
you might call your package "com.google.zedlib"

If you don't own a domain name, consider getting one.

If won't get a domain, then just keep in mind the above convention, and
try not to step on anyone's toes (i.e. don't use the "com.google." prefix if
you know someone else owns the "google.com" domain).

- Oliver
 
G

Godspeed

OK - I've renamed the packages to org.zedlib (yes, I own the domain
zedlib.org).

I will attempt to get more info up onto the home page over the next week.

Cheers,
Brad.
 
D

Daniel Dyer

I have started writing a new collections library based on set theory as
per
Spivey's Z notation. I have put the library on SourceForge. It is
currently
in its infancy and it will be expanded fairly rapidly.

Let me know if you are interested in getting involved.

To try it out go to: http://sourceforge.net/projects/zedlib

I went to have a look at the code but the CVS repository is empty.

It might be worthwhile uploading some Javadoc API documentation so people
can get an idea of how the library fits together without having to
download it first.

Dan.
 
X

Xagyg

Daniel Dyer wrote:
It might be worthwhile uploading some Javadoc API documentation so people
can get an idea of how the library fits together without having to
download it first.

Hi Daniel. Thanks for the feedback. I will get some info up on the web
pages tonight. I agree it is very sparsely populated and more info is
required.

At the moment, the javadoc is in the download. I'll post a version on
the project home page and some other blurb that people should find
useful.

I will attempt to get the code into CVS tonight, but it may take a
little longer given all the other stuff I need to do.

Brad.
 
C

Chris Uppal

Xagyg said:
At the moment, the javadoc is in the download. I'll post a version on
the project home page and some other blurb that people should find
useful.

BTW, the JavaDoc comment for Sequence (in the source) is incorrect -- it's
identical to that for Relation. Maybe you hadn't intended to release Sequence
yet ?

-- chris
 
G

Godspeed

BTW, the JavaDoc comment for Sequence (in the source) is incorrect -- it's
identical to that for Relation. Maybe you hadn't intended to release
Sequence
yet ?

Thanks Chris. It has been a bit of a rush with the documentation. Although I
have some basic comments, I have cleaned up Set and I'll do Relation
next.... then Function etc.

I'll try to get another release out in a week that contains better doco all
round. More tests required too. Set tests are ok. Quite a few Relation tests
are done. Need to write tests for Function, Sequence, Bag.

I have added some stuff to the project home page that people should find
useful.

Brad.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top