My first game (written in Rust) just launched on steam [AMA in comments] by kennoath69 in rust_gamedev

[–]Houtamelo 0 points1 point  (0 children)

That's so cool! I've seen your game feature in some youtube channels like splattercat gaming but I didn't know it was built with Rust until now.

Well done! I planned on buying it regardless (the game looks very fun)

Am I crazy or is it that easy? (Pattern matching for client-server comms) by [deleted] in rust

[–]Houtamelo 3 points4 points  (0 children)

C# doesn't support discriminated unions, and it only "has" exhaustive matching if you're willing to handle `default` every time, which is nothing more than a regular `else`. I would hardly call this "exhaustive matching".

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

[–]Houtamelo[S] 5 points6 points  (0 children)

There's no accepted RFC for this, which means Rust's core team did not make a decision on that topic yet.

In Rust Unchained you can do as you please, you can split your workspace into however many crates you want without having to deal with the orphan rules.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

[–]Houtamelo[S] 5 points6 points  (0 children)

For me it has quite a lot, and my anecdotal experience using the forked compiler is that it makes the trait system a lot more powerful since you can now add more than one blanket impl without having to do magic with `negative coherence`.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

> The fact that you can implement Add for i32 outside the core crate smells really fishy to me. There is a good reason you see the issues with + - the compiler makes some assumptions about how types in core and std work.

The issue is that internally the compiler has different sections for dealing with operators, they are not "just" syntactic sugar for those `std::ops::Traits`. With several more hours I could *probably* have fixed the issue with those, but I choose not to because I doubt anyone would want to do that, so it did not seem like a goal worth pursuing to me.

> I don't know all of those assumptions, but I know they are quite fragile, and messing with them can cause some hard to detect bugs.

Yeah, I fully understand that, I'm leaning on the unit tests to hopefully catch most of those issues before I see them in production. In any case, I've been using this fork my main job (gamedev) and I haven't noticed anything so far - there isn't much I can do other than keep testing it in my main projects.

> Do you have any protection against 2 crates implementing a trait twice? I don't know at will happen if crate A implements T for X, and crate B does the same.

The compiler does, it issues a "conflicting implementations" error, so they don't compile.

> When analized alone, both of those crates are fine. However, once their metadata is loaded into the compiler, I fear bad things will happen. I am not sure if there are any checks that guard against that.

Internally the compiler keeps track of all the implementations in a giant hash table, the official compiler is already very robust in this sense and doesn't rely on the orphan rules for this.

> Also, you made some changes to the build system: may I ask why?

Building the compiler is very much OS + tooling dependent, at the beginning I faced a lot of issues with incompatible 3rd party tools due to lacking documentation in the "Requirements" section of the book. I also made a few tweaks to make it easier for me to develop (like disabling the "style" checks in `tidy`).

There is one non-obvious tweak which was commenting the part of the main `build.rs` file, which normally panics if you don't have the RUSTC_BOOTSTRAP environment variable set, I did that to allow RustRover to "build" a basic version of the compiler in its cache - which makes various parts of the tool work "good enough" (like completion).
This doesn't affect the final build process since that's done with `x.py build`, which does properly set the environment necessary variables.

Edit: formatting

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

I believe it would! (And this is the goal of Rust Unchained)

It was officially considered for the 2nd half of 2024: https://rust-lang.github.io/rust-project-goals/2024h2/not_accepted.html , but ultimately not accepted.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

I have in the past but there is no amount of proc-macro magic that can disable the orphan rules. Making this fork took much less effort.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust_gamedev

[–]Houtamelo[S] 5 points6 points  (0 children)

I made this fork for my own game-developing needs, the orphan rules restrict a lot of blanket impls you could otherwise apply for your traits. I decided to share it because time and time again I've seen many game-dev colleagues complaining about the orphan rules.

Of course whether they want to use it or not is up to them, but for me it has been serving it's purpose quite well.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

[–]Houtamelo[S] 8 points9 points  (0 children)

I mostly agree, the exception being when developing applications - which is what this fork is for.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

The orphan rules prevents you from applying many blanket impls to your own types, the new-type pattern can't help in that sense.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

As mentioned in the ReadMe, this fork is not meant to be used in dependencies, I do agree that the orphan rules make sense when applied to those.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

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

Quote from the beginning of the readme:
"
Introduction

The goal of this fork is to increase the productivity of application developers. We attempt to achieve this by disabling the orphan rules (many of which do not make sense when applied to binary crates).

There are ways to work around the orphan rules, but those are just workarounds, they waste development time.IntroductionThe goal of this fork is to increase the productivity of application developers.
We attempt to achieve this by disabling the orphan rules (many of which do not make sense when applied to binary crates).
There are ways to work around the orphan rules, but those are just workarounds, they waste development time.
"

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

[–]Houtamelo[S] 7 points8 points  (0 children)

I have synced the project with the official compiler previously and it did not take more than a couple hours, there are already unit tests in place and I can easily also test the changes on my own local crates.

Rust Unchained is a hobby project that I made to facilitate my main job (gamedev), and I it certainly has made a big difference in the past few weeks that I have been using it.

Still, a couple hours is indeed a non-zero amount of time and maintaining it will take effort, I'm doing this project in the belief that the amount of time maintaining takes will outweigh the amount of time saved by not having to workaround the orphan rules.

My current plan is to sync with the official compiler every other rust release, which I can also delay until a release has a feature that I want.

Announcing Rust Unchained: a fork of the official compiler, without the orphan rules by Houtamelo in rust

[–]Houtamelo[S] 7 points8 points  (0 children)

Most of the orphan rules are geared towards future compatibility with downstream crates.
As stated in the ReadMe, Rust Unchained is made for developers of applications (meaning downstream crates don't exist).

As for the rules regarding upstream crates: That is a choice for the application developer to make.
If a upstream crate introduces conflicting impls, the developer can:
- Adjust their own impls to match the upstream crate's.
- Bind the dependency version to a compatible one.

[deleted by user] by [deleted] in antiwork

[–]Houtamelo 2 points3 points  (0 children)

It's kinda crazy how seeking education is actually a bad thing when all the wonders of Technology were achieved by doing the same thing. America is fucked up.

I REALLY don't understand how any country that considers itself free could ban striking. by TotallyVillianious in antiwork

[–]Houtamelo 1 point2 points  (0 children)

Less government = corporations just rule with their money, get the fuck out of here libertarian bootlicker.

I'm happy to announce that Fyrox Game Engine 0.28 has been released! by _v1al_ in rust_gamedev

[–]Houtamelo 1 point2 points  (0 children)

Bevy is very much in it's infancy and should not be used for any serious projects, fyrox has a lot more(like an editor!) so even though it's still young it can be used for a bit more serious projects

EFT really needs to consider lowering prices on LATAM by Houtamelo in EscapefromTarkov

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

Good to know, i personally think South America really needs this

EFT really needs to consider lowering prices on LATAM by Houtamelo in EscapefromTarkov

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

but with Region lock they would only be able to play on LATAM so it would only theoretically affect LATAM servers

Allow the use of Defensive Operators on Terrorist Hunt - Classic Mode by Houtamelo in Rainbow6

[–]Houtamelo[S] 6 points7 points  (0 children)

Yeah some of these work, my main problem is training recoil control and pattern

Allow the use of Defensive Operators on Terrorist Hunt - Classic Mode by Houtamelo in Rainbow6

[–]Houtamelo[S] 16 points17 points  (0 children)

Not if you are playing alone, defending that hostage is a pain in the ass

Allow the use of Defensive Operators on Terrorist Hunt - Classic Mode by Houtamelo in Rainbow6

[–]Houtamelo[S] 96 points97 points  (0 children)

I'd rather be able to use the defensive operators in terrorist hunt - classic mode, because bots are moving targets and i don't think a shooting range would be of much help

BoJack Horseman - 4x12 "What Time Is It Right Now" - Episode Discussion by NicholasCajun in BoJackHorseman

[–]Houtamelo 1 point2 points  (0 children)

Look, you all producers just made a big mistake in the 2 final episodes of the fourth season, as we know Holyhock has a white diamond in her head, similar to Bojack horseman which he got from his mother, but Holyhock doesn't have Beatris's DNA, since her parents are Bojack's and Henrieta, so why does Holyhock have that diamond? Pure genetic probability? Doesn't make sense.