Rust, this new language.
Rust Preliminary (vii): Formatting summary: In rust, if you want to make a screen output, or write to a file, you need to format the data. This article summarizes some of the formatting methods that it supports. This article refers to the following official documentation, but, in my style, I will highlight comparisons in the C # language, which may be better understood. Http://rustbyexample.com/hello/print.html Http://doc.rust-lang.org/std/fmt/http://rustbyexa ... Read the full text
Posted @ 2015-08-27 13:00 Chen Xizhang Read (36) | Comments (2) Edit
Rust Preliminary (vi): Using the Rust component summary in C #: In the previous article, we compared the performance of C # and Rust by example, and it should be said that in the release mode, Rust's computationally intensive operations have some obvious advantages. So, is it possible for us to do some quick application development in C #, and some of the core algorithms are implemented with rust? The answer is yes. Write the code below the rust code and save it in the Lib.rs file with use Std::thread; #[no_mangle] pub extern fn p ... Read the full text
Posted @ 2015-08-26 15:57 Chen Xizhang Read (30) | Comments (0) Edit
Rust Preliminary (v): Rust vs C # Performance Comparison summary: The purpose of my learning rust is not to expect it to replace existing development platforms or languages. On the contrary, I think most of the current research and development teams are not able to use only one platform or one language. As organizations grow, they rely more and more on a large number of programming languages. Different programming languages have different capabilities and weaknesses, and a multi-language stack allows you to use it when the benefits of a particular programming language are in effect, using other programming languages when it is flawed. Rust's main areas of expertise are: numerical calculations and threading. I'll use an example below to compare Rust and C # 's sex ... Read the full text
Posted @ 2015-08-26 13:46 Chen Xizhang Read (29) | Comments (0) Edit
Rust Preliminary (iv): processing time in rust summary: This looks like a very small problem, if we are in. NET, it is easy to use System.DateTime.Now directly to get to the current time, but also to perform a variety of different calculations or outputs. But such a problem, in rust, still took me some time. Of course, I think this kind of toss-up also has some benefits, from which we can better understand some of rust's internal principles. Let's take a look at how to do it. Rust default comes with the STD library, there is no time-based function, if we want to process time (get ... Read the full text
Posted @ 2015-08-26 13:05 Chen Xizhang Read (26) | Comments (0) Edit
Rust Preliminary (iii): Use Atom with racer for the Rust programming Summary: There is a discussion about the Rust Editor in the rust.cc community (saying that many people want to learn a new language and will immediately consider the editor's question, including me), the main concern is that the smart tip (which is really important). Everyone discussed down there are several options 1. Eclipse 2. VS code (I used, currently support language highlighting, but no smart tips, or not handy) 3.emacs (GNU Founder's work, again to open-source tribute) 4.SolidOak (I used, experience very bad) 5 ... read more
Posted @ 2015-08-26 11:46 Chen Xizhang Read (28) | Comments (0) Edit
Rust Preliminary (ii): Write the Rust program using visual Studio code (guess the game) Summary: I followed this help document to complete the first complete rust program: Guess the game http://kaisery.gitbooks.io/ Rust-book-chinese/content/content/3.1.guessing%20game%20%e7%8c%9c%e7%8c%9c%e7%9c%8b.html The development tools I use are visual Studio Code, this should be the most "what you can find" now ... Read the full text
Posted @ 2015-08-18 15:31 Chen Xizhang Read (83) | Comments (0) Edit
Rust Preliminary (i): Introductory summary: Recently in the study of rust this new language. So what is rust? Rust is a modern system programming language that focuses on security and speed, and achieves its goals by ensuring memory security without garbage collection, making it a language that works in a number of use cases that are not appropriate in many other languages: embedded in other languages, programmed at specific time and space requirements, and write the underlying code, such as device drivers and operating systems. It uses a series of compile-time security checks that do not generate runtime overhead to elevate the areas of current language interest while eliminating all data competition ... Read the full text
Rust, this new language.