ANN: Pure 0.41

11 views
Skip to first unread message

Albert Graef

unread,
Jan 21, 2010, 1:23:41 PM1/21/10
to pure...@googlegroups.com
Brief summary of the most important changes: indirect tail calls are now
optimized; changes in && and || to make them extensible and
tail-recursive; new representation for record data; various bugfixes.
Details can be found here:
http://pure-lang.googlecode.com/svn/trunk/pure/NEWS

*Package maintainers* please note that the library version number was
bumped, so rebuilding the addon modules is required. Sorry for the hassle.

Source: http://pure-lang.googlecode.com/files/pure-0.41.tar.gz
Windows MSI: http://pure-lang.googlecode.com/files/pure-0.41.msi

Windows users please note that the pd-pure and pure-gtk packages were
updated accordingly. Download links:
http://pure-lang.googlecode.com/files/pd-pure-0.10.msi
http://pure-lang.googlecode.com/files/pure-gtk-0.5.msi

Enjoy! :)
Albert

--
Dr. Albert Gr"af
Dept. of Music-Informatics, University of Mainz, Germany
Email: Dr.G...@t-online.de, a...@muwiinfa.geschichte.uni-mainz.de
WWW: http://www.musikinformatik.uni-mainz.de/ag

max.wolf

unread,
Jan 22, 2010, 1:54:22 PM1/22/10
to pure-lang
Hi

I like the records.
I only wonder, if for typical record usage, "delete" shouldn't remove
all entries for the given key.
Or at least a "delete_all" should be added.

Max

Albert Graef

unread,
Jan 23, 2010, 1:57:11 AM1/23/10
to pure...@googlegroups.com
max.wolf wrote:
> I only wonder, if for typical record usage, "delete" shouldn't remove
> all entries for the given key.

I think that the current version is appropriate, because insert/update
also updates just one entry, not all of them.

> Or at least a "delete_all" should be added.

That's a one-liner:

> delete_all x y = {a | a@(k=>_) = x; k ~== y} if recordp x;
> delete_all {x=>1,y=>2,x=>3} x;
{y=>2}

Only the basic record operations are in the prelude, but as you can see
you can easily add the stuff that you need. That's the nice thing about
having records implemented as matrices, as these already offer some
really powerful operations.

Reply all
Reply to author
Forward
0 new messages