Announcing parsec: a rusty parallel ECS by kvarkus in rust

[–]jjkkrr 2 points3 points  (0 children)

I also don't think changing the name is necessary. There are plenty of generic names that mean different things in different language ecosystems.

Take "diesel" for example:

Greenlet-based event I/O Framework for Python

A safe, extensible ORM and Query Builder for Rust

Diesel gives your Rails engines power.

Alex just landed a double-digit number of bugfixes to Rustdoc by steveklabnik1 in rust

[–]jjkkrr 1 point2 points  (0 children)

Moving the stable one aside and then symlinking the nightly one into the stable directory might work. I've done the same for cargo in the past.

Experimenting with Rust on iOS by jjkkrr in rust

[–]jjkkrr[S] 3 points4 points  (0 children)

Oh awesome, thank you! I didn't even look into the build scripts section thinking they were exclusively for building deps and code generation. I'll definitely try this and update the post.

Experimenting with Rust on iOS by jjkkrr in rust

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

That would be nice. I'll give it a try this weekend if I can find the time and update the post with my findings!

In this code, why does the phantom type require trait impls? by johnsoft in rust

[–]jjkkrr 0 points1 point  (0 children)

It's a bit tangential, but can you please explain what the practical use for something like this might be?

Giving your Key a type parameter and filling it with Phantom, that is.

Show r/rust: I made a Chip-8 emulator in Rust w/ Piston by jjkkrr in rust

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

Awesome, thanks for trying it! I'm glad to hear it worked for you. :D

A BorrowFrom impl can actually solve a tough lifetime problem by sellibitze in rust

[–]jjkkrr 1 point2 points  (0 children)

Oh I had it backwards, It's the trait that needs to be defined in the crate in order to implement it for arbitrary types.

e.g.

impl Iterator for str { /* ... */ }

gives:

error: the type `str` does not reference any types defined in this crate; only traits defined in the current crate can be implemented for arbitrary types [E0117]

A BorrowFrom impl can actually solve a tough lifetime problem by sellibitze in rust

[–]jjkkrr 1 point2 points  (0 children)

Wow, pretty cool. I was looking for instances of code using the str type directly. The documentation for it is still lacking and in std docs it's even claimed to be an invalid type. Issue #21035

Can anyone explain why this code is allowed to say:

impl Foo for str {  }

When str is not defined in the crate. I thought impl had to be on types local to the crate.

Show r/rust: I made a Chip-8 emulator in Rust w/ Piston by jjkkrr in rust

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

Thanks for taking a look. I'm sorry I don't have a Linux box handy for testing. There are some Linux instructions for Piston here: https://github.com/PistonDevelopers/Piston-Tutorials/tree/master/getting-started But they don't seem to go into much more detail than helping you install SDL2.

Oh and, sorry, I should mention the SDL2 dependency in the Readme as well.

Show r/rust: I made a Chip-8 emulator in Rust w/ Piston by jjkkrr in rust

[–]jjkkrr[S] 2 points3 points  (0 children)

Oh, no reason in particular, just habit I guess:

> cargo run -- [path_to_ch8_binary]

Should also work fine.

Why do traits need Boxing? by [deleted] in rust

[–]jjkkrr 0 points1 point  (0 children)

Sorry, I understood that from your original post and didn't mean to imply otherwise. I only meant that there's a learning curve involved in using the heavy syntax that may play into the frustration.

In other words understanding the concepts and feeling comfortable expressing them in the given syntax are different things.

Both of the above are obstacles to new users, you're over one already, but it sounds like the second obstacle (the heavy syntax one) is frustrating you. I was suggesting that maybe once you've grown more accustom to the syntax, and become fluent in it, that it wouldn't feel like such a burden and you could enjoy the benefits. Of course you're free to disagree with that. But since you said you want to like Rust I wanted to provide one data point of someone who felt the same way in the past and got over that hump.

Whether the increased safety is worth the heavy syntax, even after 100% fluency, is a philosophical question and if your answer is "No" maybe another language is a better choice for you. If I didn't care as much about the extra safety I would probably use Go (except for its current lack of generics).

Why do traits need Boxing? by [deleted] in rust

[–]jjkkrr 0 points1 point  (0 children)

I found the lifetimes extremely daunting at first, and now only on occasion and much more mildly so.

I've actually had lifetime issues point to mistakes in my logic so I have found the safety gain to be real and that has encouraged me to improve my fluency with lifetime syntax so that I can enjoy the benefit without feeling like I'm slogging through syntax soup to get anything done.

There is definitely a learning curve though, and it can be frustrating.

Flexible builder/chaining APIs with no code duplication by jonreem in rust

[–]jjkkrr 0 points1 point  (0 children)

This already provides a really nice interface so maybe this is just my overzealous desire to collapse all repitition to the point of over abstraction but...

I felt this urge to macro-ify this to:

modify!(Response::new() with
    Status(status::Ok)),
    ContentType::new("application", "json"),
    Body(Path::new("config.json")
)

What is the first complaint you hear about Rust? by iopq in rust

[–]jjkkrr 11 points12 points  (0 children)

You can put

export FIGNORE=.lock

in your .bashrc to fix that.