Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
crazysim
May 23, 2004
I AM SOOOOO GAY

sarehu posted:

I went to a Rust meetup a couple days ago. Seven people showed.

One guy was a C guy asking questions who seemed to have shown up with no idea what Rust was for. He asked what is it for. He also asked if it had as good a prepocessor system as the C preprocessor. Another seemed to know quite a bit about Rust, and other things. Another guy spent the entire time editing some Medium post. We spent the time doing an exercism.io exercise where an object has a mutable String field.

But, as a result, I wrote my actual first self-originated line of Rust code, so there's that!

Edit: On that note, is there any way to make a match pattern redundantly declare the type of a variable? Take for example
code:
pub fn hello(name: Option<&str>) -> String {
    "Hello, ".to_string() + &match name {
        Some(s) => s.to_string(),
        None => "World".to_string()
    } + &"!".to_string()
}
I wanted to write Some(s: &str). That doesn't work. Is there any way to do that?

I'll be honest, the San Diego Rust meetup is a bit more of a study group at the moment. It's a bit hard to keep the topics both digestible to newbies and neckbeards so we started doing those koan-like exercism-like things to get people off and running faster while letting the more seasoned Rust users being able to give some code review and commentary. It's something I saw from the LA Rust Meetup. Only, they split into two groups and have one be a hack night on their Stockfighter API because their group tends to be larger.

If you have some suggestions, we would be happy to hear them.

Adbot
ADBOT LOVES YOU

crazysim
May 23, 2004
I AM SOOOOO GAY
:sweatdrop:

Hmm, that reminds me. I should go and check out rustup.rs on Windows. I wonder how well some work Rust CLI utilities will fare in a MinTTY shell.

crazysim
May 23, 2004
I AM SOOOOO GAY

Sheep posted:

Once docs.rs came back up I was able to get it sorted out in ~30 seconds. Turns out that every mirror of docs.rs is out of date with regard to that crate and I just happened to be unlucky enough to be poking at a recently(?) changed portion of it on the day docs.rs was down.

I will look into rustls though, thanks.

You should run "cargo doc --open". Docs.rs is really convenient but "cargo doc" will generate documentation for the versions of the crates in your project locally and let you "cross-link" the types and stuff as well.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply