Anyone tried RUST?

Started by plenatus, April 03, 2020, 00:13:32

Previous topic - Next topic

plenatus

Since a few days i´m now working with RUST.
https://www.rust-lang.org/
There are some docs https://doc.rust-lang.org/book/
And some community https://www.rust-lang.org/community
A package manager  https://doc.rust-lang.org/cargo/getting-started/installation.html
and some packages https://crates.io/
Why coding a game with it https://www.youtube.com/watch?v=Ktwl97Ph-SI
And there is so much outta there.

Maybe anybody use it too....or is interested in it.
edit: in english there are much informations about in in the www so i found a nice introduction in german for someone here: https://www.youtube.com/watch?v=xJhuHXilkgo&list=PLNmsVeXQZj7p9CgKtDep-tyA1dW18FNXr

Steve Elliott

I'm aware of it's syntax (which I like) but I've never used it.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Aurel [banned]

#2
Rust is syntactically similar to C++ and developed by Mozilla.
Well if can translate 50% of code in a 1:1 ratio then is fast.
All in all much better than python  ;D

But programming in this looking complex ..piston_window

extern crate piston_window;

use piston_window::*;

fn main() {
    let mut window: PistonWindow =
        WindowSettings::new("Hello World!", [512; 2])
            .build().unwrap();
    while let Some(e) = window.next() {
        window.draw_2d(&e, |c, g| {
            clear([0.5, 0.5, 0.5, 1.0], g);
            rectangle([1.0, 0.0, 0.0, 1.0], // red
                      [0.0, 0.0, 100.0, 100.0], // rectangle
                      c.transform, g);
        });
    }
}
(Y)

Steve Elliott

#3
Quote
But programming in this looking complex ..piston_window

Whoah, that's unreadable!  But can you not post colour tones that similar as an example (foreground and background colours) ?  Plus indentation is all over the place...If you wish to make a point, make it a fair one!...Taking the piss lol.   :))
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

plenatus

@Aurel: piston is not Rust. I bet i could write some unreadable code in your languages too ;)
As i said i start coding now with Rust and i like the syntax.
Sometimes confusing but thats with near all new languages.

Aurel [banned]

#5
Quote@Aurel: piston is not Rust.
yes i know that, it is funny  name : piston  :D

@ cod3r9
they say..it is fast, do you can confirm that is really fast?
(Y)

plenatus

@Aurel: if you wish...i can make some tests in a few weeks or so.Atm i´m learning.
As of that what i read in comparison with C/C++ sometime is C/C++ a little bit faster sometimes is Rust faster....and hey there are situation there is Python faster then C.Yes indeed.

Aurel [banned]

@cod3r9
There is no need for that,i will download and try ..just to see what a heck is that.
In general ,i don't like languages with such a complex syntax.. but Ok.
( i hope that there is no freakin whitespace cra**).

Quoteand hey there are situation there is Python faster then C.Yes indeed.
come on man ! that is not possible  , especially on windows ...maybe on linux but i doubt.
ok i will see what is rust
(Y)