Ooops
May 31, 2020, 08:45:50 PM

Author Topic: Anyone tried RUST?  (Read 380 times)

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 156
Anyone tried RUST?
« on: April 03, 2020, 12:13:32 AM »
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
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2454
Re: Anyone tried RUST?
« Reply #1 on: April 03, 2020, 04:31:44 AM »
I'm aware of it's syntax (which I like) but I've never used it.
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Catalina, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.3, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspberry pi 3 and 4.

Offline Aurel

  • Full Member
  • ***
  • Posts: 151
    • AurelSoft
Re: Anyone tried RUST?
« Reply #2 on: April 03, 2020, 01:05:05 PM »
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);
        });
    }
}

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2454
Re: Anyone tried RUST?
« Reply #3 on: April 03, 2020, 07:27:22 PM »
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.   :))
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
MacOS Catalina, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB.
Linux Mint 19.3, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb).
Raspberry pi 3 and 4.

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 156
Re: Anyone tried RUST?
« Reply #4 on: April 03, 2020, 10:01:12 PM »
@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.
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Offline Aurel

  • Full Member
  • ***
  • Posts: 151
    • AurelSoft
Re: Anyone tried RUST?
« Reply #5 on: April 04, 2020, 07:26:06 AM »
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?

Offline c0d3r9

  • Full Member
  • ***
  • Posts: 156
Re: Anyone tried RUST?
« Reply #6 on: April 04, 2020, 09:18:38 AM »
@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.
Laptop: Win10@64bit - i3 2x2Ghz - 8GB Ram - 1TB HDD
Desktop: Win10@64bit - AMD Ryzen 5 2400G - MSI B450 Tomahawk - 8GB Ram - 240GB SSD

Offline Aurel

  • Full Member
  • ***
  • Posts: 151
    • AurelSoft
Re: Anyone tried RUST?
« Reply #7 on: April 04, 2020, 08:32:57 PM »
@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**).

Quote
and 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

Offline round157

  • Sr. Member
  • ****
  • Posts: 348

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal