Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread comex
On Thu, Mar 6, 2014 at 1:38 AM, Patrick Walton wrote: > Optimization of null pointer dereferences has resulted in security > vulnerabilities in the Linux kernel: That was not a case where the load was actually optimized away, only a check following the load. In standard userland as well as moder

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Patrick Walton
Optimization of null pointer dereferences has resulted in security vulnerabilities in the Linux kernel: http://lwn.net/Articles/342330/ I don't think it's responsible for C++ programmers not to consider the undefined behavior of null dereference a real hazard. Patrick comex wrote: >On Wed, M

Re: [rust-dev] Was there a weekly meeting on 2014-3-4?

2014-03-05 Thread Corey Richardson
No, due to the Rust Workweek that is this week. On Thu, Mar 6, 2014 at 1:13 AM, Liigo Zhuang wrote: > Hi Rustist: > > I can't find any information for that in the wiki page: > https://github.com/mozilla/rust/wiki/Meetings > > > -- > by Liigo, http://blog.csdn.net/liigo/ > Google+ https://plus.go

[rust-dev] Was there a weekly meeting on 2014-3-4?

2014-03-05 Thread Liigo Zhuang
Hi Rustist: I can't find any information for that in the wiki page: https://github.com/mozilla/rust/wiki/Meetings -- by *Liigo*, http://blog.csdn.net/liigo/ Google+ https://plus.google.com/105597640837742873343/ ___ Rust-dev mailing list Rust-dev@moz

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Liigo Zhuang
*((int*)0): In theory, this is memory unsafe; In practical, this has been exist for about thirty years, making many software system crash. But I know, most C++ programmers don't consider it a big deal. 2014-03-06 13:06 GMT+08:00 comex : > On Wed, Mar 5, 2014 at 11:42 PM, Patrick Walton > wrote:

Re: [rust-dev] #[link] using absolute path?

2014-03-05 Thread Alex Crichton
Right now #[link] only takes library names (it gets passed through as a -l flag). It doesn't seem much more brittle to use -C link-args than to have absolute paths, so you may wish to explore that route. On Wed, Mar 5, 2014 at 1:12 AM, Doug wrote: > Hey~ > > I've been trying to hook rust up the

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread comex
On Wed, Mar 5, 2014 at 11:42 PM, Patrick Walton wrote: > Dereference of a null pointer is memory-unsafe due to being undefined > behavior. You can't count on dereference of nullptr resulting in a load of > address zero: the optimizer is free to (and often does) remove that load and > any code foll

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Patrick Walton
Dereference of a null pointer is memory-unsafe due to being undefined behavior. You can't count on dereference of nullptr resulting in a load of address zero: the optimizer is free to (and often does) remove that load and any code following it. This means that, for example, clang will cheerfully

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Daniel Micay
On 05/03/14 11:25 PM, comex wrote: > On Wed, Mar 5, 2014 at 6:22 AM, Michael Neumann wrote: >> Try the same in C++: >> >> >> auto i = make_unique(1234); >> auto j = std::move(i); >> cout << *j << endl; // 1234 >> cout << *i << endl; // Segmentation Fault > > Note that a move out o

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread comex
On Wed, Mar 5, 2014 at 6:22 AM, Michael Neumann wrote: > Try the same in C++: > > > auto i = make_unique(1234); > auto j = std::move(i); > cout << *j << endl; // 1234 > cout << *i << endl; // Segmentation Fault Note that a move out of unique_ptr is guaranteed to leave the original

[rust-dev] locating crate source for code completion

2014-03-05 Thread Phil Dawes
Hello everyone! I've started working on a project to add rust code-completion and assistance for editors + IDEs. https://github.com/phildawes/racer The approach I'm persuing is to scan the source code text, incrementally parsing relevant pieces (lines, blocks) to answer the query. I'm hoping to g

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Maciej Piechotka
On Tue, 2014-03-04 at 23:54 -0300, Fernando Pelliccioni wrote: > > We still have the problem of dangling references. > > > Any decent compiler can deal with this problem, and according to the > Standard the implementations are encouraged to issue a warning in such > a case. > I don't know impleme

Re: [rust-dev] Language to replace C

2014-03-05 Thread Richard Gomes
Big projects ( in the "enterprise" space, I mean ) involve a myriad of libraries, tools and legacy systems which need to be integrated sometimes in very strange ways. If I had to interoperate Rust with Java or Python, for example, I would possibly employ /ZeroMQ/ for this purpose. Since there's a

Re: [rust-dev] Language to replace C

2014-03-05 Thread Chris Morgan
This thread has become quite toxic. Please, people: remember our community's code of conduct and let us douse the flames. The Rust community has hitherto had a good image of being a friendly community, and this has typica

Re: [rust-dev] Language to replace C

2014-03-05 Thread Liigo Zhuang
If I'm using oracle, I don't need mysql. If I'm using git, I don't need svn. If I'm using rust, I don't need go. But I don't known what others think about this. 2014年3月5日 下午7:21于 "John Mija" 写道: > I was not saying to you what you need, where did you read about that? > > I'm explaining about the ex

Re: [rust-dev] Language to replace C

2014-03-05 Thread Liigo Zhuang
I don't think let Go away out of my life and project is a bad decision. If someone is a bit critical, please ignore this and move on! 2014年3月5日 下午1:02于 "Benjamin Striegel" 写道: > I'm seeing unnecessarily hostile and dismissive comments from several > participants here. If you can't be civil, then

Re: [rust-dev] Language to replace C

2014-03-05 Thread John Mija
Thanks! My vision was very limited. You don't need other language else a sub-set of Rust. At the beginning, I was thinking in Go because the standard library already has functions to parsing Go code: http://golang.org/pkg/go/ The usage for a sub-set of Rust could be: + To replace bash scrip

Re: [rust-dev] Language to replace C

2014-03-05 Thread John Mija
I was not saying to you what you need, where did you read about that? I'm explaining about the extended usage of two languages, one like main language and the other one like scripting. El 05/03/14 11:17, Liigo Zhuang escribió: I do known what I need. You are not me, please not tell me what ne

Re: [rust-dev] About RFC: "A 30 minute introduction to Rust"

2014-03-05 Thread Michael Neumann
Am 05.03.2014 03:54, schrieb Fernando Pelliccioni: > > So, now, what is the difference between... > > // rust > let i = ~1234; > > and > > // C++ > auto i = make_unique(1234); > > ? > > The Rust code is shorter, but perhaps, more illegible. I think it is > matter of taste. > > But now, the real

Re: [rust-dev] Language to replace C

2014-03-05 Thread Liigo Zhuang
I do known what I need. You are not me, please not tell me what need to do. 2014年3月5日 下午4:59于 "John Mija" 写道: > Although you use Rust as main language, there are reasons to use a second > language i.e. for scripting; the AAA games usually are built in C++ but > it's very common the usage of Lua fo

Re: [rust-dev] Language to replace C

2014-03-05 Thread Kevin Cantu
New languages based on and interoperating with Rust are interesting. A well defined subset of Rust which is still valid Rust can be quite useful. Have you looked at the work Yehuda Katz and others have done with Rust code which doesn't use the Rust runtime? That is *much* more like what you're s

[rust-dev] #[link] using absolute path?

2014-03-05 Thread Doug
Hey~ I've been trying to hook rust up the v8 VM to play with, and although I've got it working, it's kind of annoying to do. In CMake you can extract a list of build targets using something like: function(get_dependent_targets TARGET RETURN) get_property(LOC TARGET ${TARGET} PROPERTY LOCATION)

Re: [rust-dev] Language to replace C

2014-03-05 Thread Gaetan
discutions go steril here. Let's cut this thread - Gaetan 2014-03-05 9:59 GMT+01:00 John Mija : > Although you use Rust as main language, there are reasons to use a second > language i.e. for scripting; the AAA games usually are built in C++ but > it's very common the usage of Lua for scri

Re: [rust-dev] Language to replace C

2014-03-05 Thread John Mija
Although you use Rust as main language, there are reasons to use a second language i.e. for scripting; the AAA games usually are built in C++ but it's very common the usage of Lua for scripting El 05/03/14 04:40, Liigo Zhuang escribió: If I select Rust as my main language, I don't think I have