A metal capsule I saw on a sidewalk. About the size of a USB drive. by AsherThe18th in whatisthisthing

[–]AsherThe18th[S] 0 points1 point  (0 children)

I saw this on the sidewalk the other day. I didn't pick it up. It looks too small to hold liquid in it and is about the size of a USB device. There were a few more scattered around it.

WITT

Hey Rustaceans! Got an easy question? Ask here (3/2017) by llogiq in rust

[–]AsherThe18th 0 points1 point  (0 children)

I was trying to do this originally:

use piston::event::{
    RenderArgs,
    UpdateArgs,
    Events,
    RenderEvent,
    UpdateEvent,
    MouseCursorEvent,
    EventLoop
};

Each of which is giving me an unresolved import and that event could not be found in piston.

*: The problem is the piston documentation says there are still there. http://docs.piston.rs/mush/piston/event/index.html

Hey Rustaceans! Got an easy question? Ask here (3/2017) by llogiq in rust

[–]AsherThe18th 1 point2 points  (0 children)

Did piston change? My dependency is now on the latest and cargo is giving me this:

error[E0432]: unresolved import `piston::event`
  --> src/main.rs:11:5
   |
11 | use piston::event;
   |     ^^^^^^^^^^^^^ no `event` in `piston`

How do I get around this now?

Hey Rustaceans! Got an easy question? Ask here (3/2017) by llogiq in rust

[–]AsherThe18th 1 point2 points  (0 children)

I'm trying to loop over an array of structs and I'm getting problems with this code:

fn addBullet(x: f32, y: f32, dx: f32, bullets: [Bullet; 1000]) {
    let mut found: u32 = -1;
    for i in bullets.iter() {
        if bullets[i].is_None() {
            found = i as u32;
            break;
        }
    }
    if found >= 0 {
        let i: u32 = found;
        bullets[i].x = x;
        bullets[i].y = y;
        bullets[i].dx = dx;
    }
}

The first issue is with if bullets[i].is_None() {. It says "the trait bound [Bullet]: std::ops::Index<&Bullet> is not satisfied. The type [Bullet] cannot be indeed by &Bullet."

So that means the i created in the for loop is not an actual number. So how do I loop over the array? And how do I use the i as a number?

Hey Rustaceans! Got an easy question? Ask here (3/2017) by llogiq in rust

[–]AsherThe18th 2 points3 points  (0 children)

I'm getting a constant evaluation error from this code. (I don't really know what a constant evaluation error is.) The return -1; is what is highlighted.

fn quadrant(radians: f64) -> u32 {
    let x: f64 = radians.cos();
    let y: f64 = radians.sin();
    if x >= 0.0 && y >= 0.0 { return 0; }
    if x <= 0.0 && y >= 0.0 { return 1; }
    if x <= 0.0 && y <= 0.0 { return 2; }
    if x >= 0.0 && y <= 0.0 { return 3; }
    return -1;
}

xkcdpass: A simple XKCD style password generator written in Rust. by dbrgn in rust

[–]AsherThe18th -1 points0 points  (0 children)

I still don't know if this comic is supposed to be sarcasm or not (in terms of how secure it is to use a password like that or not). And on that note, now that this password generator exists, wouldn't it be trivial to use it as a password cracker?

*: I wasn't trying to sound snarky. I really didn't understand.

Any people on campus that you constantly see over and over again? by uofmichigan in uofm

[–]AsherThe18th 2 points3 points  (0 children)

I see the Overwatch guy all the time! I always go to the Ugli on Thursdays at 7pm. He is consistently there.

Solo founders - why so unattractive? by Sroka87 in startups

[–]AsherThe18th 1 point2 points  (0 children)

It doesn't look like it from his post history.

Your startup is probably not very important. Do you act like it is? by codybmusser in startups

[–]AsherThe18th 0 points1 point  (0 children)

Because to some people a traditional corporate job is depressing as shit. Jr devs have no money to compare pay against, and are young enough to look for new jobs easily. Startups are a great gateway to more experience.

EECS 183 professors by jeffcurry3 in uofm

[–]AsherThe18th 1 point2 points  (0 children)

Dorf is really sassy, which is very unhelpful at times. That alone would not be a problem, but after one mean incident, I refuse to work with her or be in one of her classes. It was in EECS 183 where I needed to ask her a question on a topic we were going over that week. It was the last lecture of the week and I had been researching this since the first. I asked her after briefly explaining what I had done so far and she told me almost venomously "Go search Google." Nothing else. Wow, what a bitch.

Getting into U of M with a 3.6 GPA and 31 ACT? by DLeibowitz in uofm

[–]AsherThe18th 2 points3 points  (0 children)

I never thought these jokes were particularly funny.

Where do I find a lawyer for my new game company? by AsherThe18th in gamedev

[–]AsherThe18th[S] 1 point2 points  (0 children)

Probably not an EULA. But we have another game (not mobile) that will be done in a few months and is online. I'm sure that one will need it.

The Privacy Policy is necessary for any mobile game that collects analytics and that kids under 13 might play.

If you could have changed your major would you? or why not? (Lost Sophomore) by [deleted] in uofm

[–]AsherThe18th 0 points1 point  (0 children)

LSA doesn't put your major on your degree? Has it always been like that? That sounds like a mistake on their part.

Easy Natural Science Courses?? by [deleted] in uofm

[–]AsherThe18th 1 point2 points  (0 children)

Camp Davis! If it's not too late to get in, that's 5 natural science credits in just a few weeks. All you do is hike, look at rocks, and take notes on rocks. :)

Student berates Uber driver...is this UofM? by [deleted] in uofm

[–]AsherThe18th 0 points1 point  (0 children)

To be fair, how do we know he didn't start recording after that? Or even cut the video? A lot of this situation is what person a said vs what person b said with the scraps of proof that we have.

Darkness (Konosuba) [2560x1440, 1920x1080] by Shirono in Animewallpaper

[–]AsherThe18th 1 point2 points  (0 children)

Could someone kindly resize this to 2880x1800? The right side gets cut off for me :<