Re: [rust-dev] Autocompletion (was: Why we don't like glob use (use std::vec::*)?)

2014-03-13 Thread Phil Dawes
FWIW I've started working on autocomplete functionality for rust. https://github.com/phildawes/racer I'm persuing the 'scan the source code text, incrementally parsing relevant pieces' approach. I'm also learning the language so it's a bit slow going (and will require cleanup as I become more

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Noam Yorav-Raphael
Perhaps it's not that important that it will be able to continue after errors? I think that generally there should not be type errors even while programming is in progress. It means that if I'm referring to something I have to immediately write a stub for it, but I don't think it's that bad. Noam

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Benjamin Striegel
Is it correct for me to assume that, even if accepted, virtual things will be behind a feature flag for 1.0? If so, then I think that will be enough friction to cause library authors to favor traits instead, especially if users of virtual-using-libraries would have to turn on the feature flag as

Re: [rust-dev] Rust automation downtime

2014-03-13 Thread Thad Guidry
Curious, Whole Mozilla moving ? or just some teams ? and why ? making room for others ? kicked out by grumpy landlord or mayor ? :-) On Wed, Mar 12, 2014 at 11:08 PM, Brian Anderson bander...@mozilla.comwrote: This weekend Mozilla's Mountain View office is moving, and along with it some of

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Patrick Walton
On 3/13/14 6:00 AM, Benjamin Striegel wrote: Is it correct for me to assume that, even if accepted, virtual things will be behind a feature flag for 1.0? If so, then I think that will be enough friction to cause library authors to favor traits instead, especially if users of

[rust-dev] Bay Area Rust meetup tonight! OSs, Parallel Layout in Servo, and Debugging Rust

2014-03-13 Thread Erick Tryzelaar
Hello Rust, Just wanted to remind everyone of the Rust meetup tonight at the SF Mozilla Headquarters. Doors open at 7pm. We've had to make some substitutions with the speakers due to some conflicts, though. Here is the lineup: • Julia Evans: Writing an operating system in Rust (without knowing

Re: [rust-dev] Rust automation downtime

2014-03-13 Thread Eric Reed
The Mountain View office outgrew their old location and they're moving to a larger one. On Thu, Mar 13, 2014 at 6:21 AM, Thad Guidry thadgui...@gmail.com wrote: Curious, Whole Mozilla moving ? or just some teams ? and why ? making room for others ? kicked out by grumpy landlord or mayor ?

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Matthieu Monrocq
And of course I forgot to reply to the list at large... sorry :x -- Matthieu On Wed, Mar 12, 2014 at 8:48 PM, Matthieu Monrocq matthieu.monr...@gmail.com wrote: On Tue, Mar 11, 2014 at 10:18 PM, Patrick Walton pcwal...@mozilla.comwrote: On 3/11/14 2:15 PM, Maciej Piechotka wrote:

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Eric Summers
Matthieu, I tried to model something similar this way. Sometimes the extra pattern matching gets tedious with this approach. You also end up with a lot of constructors with similar names. I also found myself writing a lot of trivial function wrappers around constructors. Of course there

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Eric Summers
Also this approach uses more memory. At least a byte per pointer and maybe more with padding. In most cases like this you would prefer to use a vtable instead of tags to reduce the memory footprint. Eric On Mar 13, 2014, at 1:17 PM, Eric Summers eric.summ...@me.com wrote: Matthieu, I

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Jan Klesnil
Hi, coersion still can break any code depending on library really badly. Just suppose the method implemented for Hello in the following example was added later. After the change, different function is called. IMO, the risks from glob imports are no worse than this. struct Hello { s : ~str

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Daniel Micay
On 13/03/14 02:25 PM, Eric Summers wrote: Also this approach uses more memory. At least a byte per pointer and maybe more with padding. In most cases like this you would prefer to use a vtable instead of tags to reduce the memory footprint. Eric A vtable uses memory too. Either it uses a

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Daniel Micay
Existing problems with the language aren't a reason to add new problems. signature.asc Description: OpenPGP digital signature ___ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Eric Summers
Yes, but with tags you pay the cost even if Option is None. Eric On Mar 13, 2014, at 1:33 PM, Daniel Micay danielmi...@gmail.com wrote: On 13/03/14 02:25 PM, Eric Summers wrote: Also this approach uses more memory. At least a byte per pointer and maybe more with padding. In most cases like

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Patrick Walton
On 3/13/14 11:35 AM, Daniel Micay wrote: Existing problems with the language aren't a reason to add new problems. I don't think the coercion is much of a problem; at least, not a fixable one. Dot notation for method syntax in a systems language that supports values pretty much requires some

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Eric Summers
A really out there solution to reduce memory may be to use a Cap’n Proto style arena that uses offsets instead of pointers, but I’m sure there are a lot of difficult problems with that. Eric On Mar 13, 2014, at 1:37 PM, Eric Summers eric.summ...@me.com wrote: Yes, but with tags you pay the

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Jan Klesnil
I am following Rust only for few month. Was the alternate syntax Trait::method(object, other parameters) discussed? It will be sometimes useful to write Clone::clone(x) instead of x.clone() or (x as Clone).clone(). J On 03/13/2014 07:36 PM, Patrick Walton wrote: On 3/13/14 11:35 AM, Daniel

Re: [rust-dev] Why we don't like glob use (use std::vec::*)?

2014-03-13 Thread Patrick Walton
On 3/13/14 11:44 AM, Jan Klesnil wrote: I am following Rust only for few month. Was the alternate syntax Trait::method(object, other parameters) discussed? It will be sometimes useful to write Clone::clone(x) instead of x.clone() or (x as Clone).clone(). Yup! That's what we call Uniform

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Eric Summers
Thinking about this a bit more, maybe the memory cost could go away with tagged pointers. That is easier to do on a 64-bit platform though. Eric On Mar 13, 2014, at 1:37 PM, Eric Summers eric.summ...@me.com wrote: Yes, but with tags you pay the cost even if Option is None. Eric On Mar

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Matthieu Monrocq
Hi Eric, Coming back on memory; I presented two designs: - in the first one, you have a tag at each level of the hierarchy, which indeed uses more memory for deep hierarchies but means that a type only knows about its immediate children - in the second one, you have a tag only at the root of

Re: [rust-dev] Regarding New Hash FrameWork.

2014-03-13 Thread Erick Tryzelaar
Hello Shiva! It'd be best to target these emails at rust-dev instead of me directly :) We've got a guide for new contributors here: https://github.com/mozilla/rust/wiki/Note-guide-for-new-contributors Feel free to reach out for help here, or on our irc.mozilla.org #rust IRC channel. Please let

Re: [rust-dev] Virtual fn is a bad idea

2014-03-13 Thread Ziad Hatahet
Kind of off-topic, but there is a heated discussion on the D language forums about why having non-virtual base class methods by default is a bad idea: http://forum.dlang.org/thread/lfqoan$5qq$1...@digitalmars.com Also comes up here:

Re: [rust-dev] Rust automation downtime

2014-03-13 Thread Brian Anderson
The entire Mountain View office is moving to a new building that has more space. On 03/13/2014 06:21 AM, Thad Guidry wrote: Curious, Whole Mozilla moving ? or just some teams ? and why ? making room for others ? kicked out by grumpy landlord or mayor ? :-) On Wed, Mar 12, 2014 at 11:08