News for hackers. Stuff that matters.
Re:Mozilla releases version 0.1 of the Rust programming lang... by kibwen on Monday January 23, 2012 @04:39PM (#3502252)
If anyone decides to give Rust a spin and is compelled to help out by providing feedback, the devs love to hear comments and criticism from users of the language:

https://mail.mozilla.org/listinfo/rust-dev

Re:Mozilla releases version 0.1 of the Rust programming lang... by Chirono on Monday January 23, 2012 @05:38PM (#3502515)
Do you know if there is any explanation of 'unique pointers' and 'unique closures' anywhere? I'm quite interested to see some of the decisions, especially wrt the type-system.
Re:Mozilla releases version 0.1 of the Rust programming lang... by richdougherty on Monday January 23, 2012 @08:33PM (#3503042)
Unique types are used to guarantee that only a single reference is ever held to a value. Sort of like the value has a single "owner". This restriction, while a maybe bit of a pain to program with, gives the compiler permission to do clever things.

In particular:

1. The compiler can detect when a value is no longer "owned" (referenced) by anything and free it automatically -- without garbage collection. That's really handy for things like closures where the compiler automatically allocated the memory for you in the first place.

2. If an immutable value is modified then a copy usually needs to be made. But if the immutable value is uniquely-referenced then the compiler can reuse the old bit of memory, thereby saving a copy operation. It can do this because it can prove the old memory can no longer be accessed.

3. I think Rust might also use uniqueness when sending values between its tasks. Since it can prove the value will no longer be referenced by the old task the compiler can avoid copying the values while still preserving isolation.

http://en.wikipedia.org/wiki/Uniqueness_type

Re:Mozilla releases version 0.1 of the Rust programming lang... by Chirono on Tuesday January 24, 2012 @03:15AM (#3503936)
Thanks, uniqueness typing has been a bit of a hobby of mine for a few years, so I'm familiar with 1 & 2. Uniqueness in system-level languages, however, is not something I know so much about, so something like 3 is pretty interesting.
Re:Mozilla releases version 0.1 of the Rust programming lang... by pcwalton on Tuesday January 24, 2012 @10:31AM (#3505149)
You're correct regarding (3) -- that's the main reason unique pointers were added to Rust in the first place. We call the heap of unique pointers the "exchange heap" for this reason.
Re:Mozilla releases version 0.1 of the Rust programming lang... by starwed on Monday January 23, 2012 @05:50PM (#3502560)
One of the devs keeps a blog, and he has a post about implementing unique closures. (There are several posts on the topic actually, since I guess the idea evolved a bit with time. Just check out the Rust category for more...)

http://smallcultfollowing.com/babysteps/blog/2011/12/16/impl...

Re:Mozilla releases version 0.1 of the Rust programming lang... by zokier on Monday January 23, 2012 @05:47PM (#3502545)
I do not know about unique closures, but afaik unique pointers in Rust are similar to std::unique_pointer in C++ (with some syntax sugar).
Re:Mozilla releases version 0.1 of the Rust programming lang... by kumarshantanu on Tuesday January 24, 2012 @12:32AM (#3503612)
They should consider moving the discussion to Google Groups or something. Not everybody loves to read the discussion threads via email.
Re:Mozilla releases version 0.1 of the Rust programming lang... by mapleoin on Tuesday January 24, 2012 @04:29AM (#3504072)
I've always found mailman's web interface a lot easier to read than Google Groups. e.g.: https://mail.mozilla.org/pipermail/rust-dev/2012-January/thr...

AFAIK Google Groups don't even support threads

Re:Mozilla releases version 0.1 of the Rust programming lang... by freehunter on Tuesday January 24, 2012 @08:43AM (#3504657)
I grew up with computers in the 80s that didn't have Internet connectivity. I didn't get Internet access at home until 2005. Mailing lists confuse the hell out of me.
Re:Mozilla releases version 0.1 of the Rust programming lang... by lobster_johnson on Saturday January 28, 2012 @08:29AM (#3522017)
That's interesting, considering that mailing lists (like news/Usenet) were ideal for offline use, having been designed back in the day when Internet often had to be dialed up at specific times to exchange mail and news asynchronously (remember UUCP?). You can read and write submissions offline and submit them later.