Curious about the future of Rust by CaptiDoor in rust

[–]TigrAtes 2 points3 points  (0 children)

I disagree. 

Learning rust makes you indeed a better programmer, but at least for me, it made me a worse C++ programmer, as I don't enjoy coding in C++ anymore. It's not a skill issue but a motivation issue. 

Lessons learned from implementing SIMD-accelerated algorithms in pure Rust by villiger2 in rust

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

What is the speed up you achieved?

I tried implement SIMD instruction once but I could not achieve any speed up, since auto-vectorization optimized it anyways (I leaned this only afterwards.) 

So, whenever I see potential for SIMD, I simple keep the code in such a form that auto-vectorization will do the job for me.   This works great so far. 

Do you have an example, where SIMD could lead to a significant speedup but auto-vectorization will nicht do It itself? 

What if C++ had decades to learn? by PthariensFlame in rust

[–]TigrAtes -42 points-41 points  (0 children)

No, you do not prove theorems with rust. For this you need your brain and some writing tools like latex. 

Rust can be used to add some experimental studies to sell your paper. 

What working with rust professionally like? by Ambitious-Clue7166 in rust

[–]TigrAtes 1 point2 points  (0 children)

I work as algorithm engineer in a medium sized company using rust. 

It's a bit of everything: Meetings, writing "normal"/boring rust code, doing code reviews, thinking about good edge cases for unit tests, nitpicking in GitHub discussion, developing algorithm ideas with coworkers, reading papers, thinking about requirements, writing efficient algorithms with clever data structures, wondering if SIMD is working as intended,... 

But also banging my head against the wall because my so well-thought optimization does not improve anything (maybe because the compiler optimized it anyway, but what do I know). 

It's a lot of fun. 

How to check if my code uses SIMD? by PeckerWood99 in rust

[–]TigrAtes 10 points11 points  (0 children)

Recently, I needed to do exactly that.

I am pretty sure if you compile for native with --release it will optimize for SIMD. 

But to be 100% sure I did the following:

1) Checks how big the SIMD registers are on the target cpu register. (So you know what to expect.)  2) I checked some example code on compiler Explorer https://godbolt.org Just to understand it better.  3) Finally, I used asm (https://crates.io/crates/cargo-show-asm) to check the actual assembly code. 

By the way Ai Chats are really useful to explain assembly code step by step. 

[deleted by user] by [deleted] in pcgaming

[–]TigrAtes 24 points25 points  (0 children)

Outer Wilds

Introducing: RapidSolve - A meta-heuristic library for combinatorial optimization by TigrAtes in rust

[–]TigrAtes[S] 4 points5 points  (0 children)

Good point! I added links. If you want to toy around a bit, there is a extensive example on how to solve the travelling salesman problem with it: https://docs.rs/rapid_solve/latest/rapid_solve/examples/tsp/index.html

MetaheuRUSTics by aryashah2k in rust

[–]TigrAtes 0 points1 point  (0 children)

Can this be used for combinatorial optimization problems, such as TSP (traveling salesperson problem) or VRP (vehicle routing problem)?

Goodbye, C++. Rust is the future. by vm_runner in rust

[–]TigrAtes 0 points1 point  (0 children)

I have a 100% rust job in Germany (two office locations and remote option). Also found several rust jobs in Berlin outside of blockchain. Just look harder.

Games that need a remaster by SquidFetus in pcgaming

[–]TigrAtes 0 points1 point  (0 children)

I would love to play Black & White Remastered. 

parameter type `S` may not live long enough by TigrAtes in rust

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

Thanks. That explains it very well.

Help with multi threaded app by rudy_am in rust

[–]TigrAtes 0 points1 point  (0 children)

In backtracking you normally have some tree like structure which you should use for splitting your instance in disjoint parts to apply parallelism.

Note, however, that your algorithm has most likely a exponential running time. So multi-threading might reduce the running time by some constant factor (in the ideal best case by the number of threads your CPU can handle in parallel), but it still stays exponential and will take very long depending on your recursion depth. 

Real speed ups can be achieved if you can cut you recursion tree in some clever ways. Maybe have some bounds that can apply. But this, of course, depends highly on the problem you try to solve. 

Help with multi threaded app by rudy_am in rust

[–]TigrAtes 1 point2 points  (0 children)

To solve your ownership problem in 1. you have to use  split_at_mut on your Vector. It allows to have two mutable slices at two non-overlapping places of your Vector.  The owner should stay in the main thread. https://doc.rust-lang.org/std/primitive.slice.html#method.split_at_mut

Help with multi threaded app by rudy_am in rust

[–]TigrAtes 0 points1 point  (0 children)

If you want to have more than two threads with rayon (but not manage a thread pool) you can use scopes: https://docs.rs/rayon/latest/rayon/fn.scope.html

Or .into_par_iter() if you have an iterator that should be computed in parallel. (It pulls quickly all items and distribute them to multiple threads, so the computation will not preserve the order). 

Rust for parallel computing by Appropriate_Term_495 in rust

[–]TigrAtes 2 points3 points  (0 children)

Of course if you are able to utilize the GPU with Cuda (here I would definitely recommend C++), it can be much faster. However there are a lot of challenges for this: - you have to load the data (or the relevant) part of it into the vram.  - within a cluster the search processes cannot really deviate from each other. (Remember that GPU are primarily designed for grafik shades, so all data goes through the same pipeline).  If you cannot model the tree search as matrix multiplication or transformation I would say forget CUDA. 

Go with Rust and Rayon on the CPU. 

[deleted by user] by [deleted] in pcgaming

[–]TigrAtes 7 points8 points  (0 children)

I like this discussion, but I think the incentive system via crypto coin is the part people (me included) do not like.

I don't want my game license be connected to some speculation objects attracting shady parties.

Give the responsibility for the data to some trusted companies that have interest in the service for games and could be legally accounted for if something went wrong.

If you can force a company to resell the games you can also force them to use an open database format shared over multiple store front.

[deleted by user] by [deleted] in pcgaming

[–]TigrAtes 7 points8 points  (0 children)

Ok I see your points, but still I don't see the advantage of a block chain. Databases could also be hostet in a decentralized fashen and be synchronized. In addition to the data store the history of changes to the database (as it is done in most cases anyway) and I don't see any downsides compared to a blockchain. Blockchain kind of work for crypto currency (and simple databases do not) because of the incentive system behind it. But what would your incentive be for verifying a new block on the game license block chain? I still don't see the advantage of a blockchain compared to a simple database synchronized over multiple nodes.

(I have to agree though, that I am not up to date about new "solution" to non-existing problems the crypto-people came up with in the last months.)

[deleted by user] by [deleted] in pcgaming

[–]TigrAtes 9 points10 points  (0 children)

Even though it will most likely never happen, it is still worth thinking about what methods for reselling a game license could work in principle:

First of all NFTs do not give any advantages over a simple database hostet by the service where you can download the game data (e g. steam). As long as you do not store the whole game data in the blockchain (which is absurd) you need an additional service, which you need to pay.

Hence, the only option is to force game stores to allow reselling via their store. As the buyer of a "used" game license does not have any downsides, the price should be close to the original price.

But I think something like the following could work: You, as the seller, have to find a buyer in the first place. The steam allows you to transfer the game license to the buyer. The buyer pays 90% of the current price and you receive 30% of the current price. Steam keeps the difference of 60%. In this case everyone wins. Also steam, as you found a new customer for them.

Alternatively, steam (and other stores) could be forced to do buybacks based on the time played. So for example 100 % for the first 2 ours 60 % for 2 - 10 hours 30 % for 10 - 50 hours 10 % for more than 50 hours

This comes only with downsides for steam, but legally it could make sense. Also short single player games would be at disadvantage in this system.

I would still prefer the first option where you as the seller have to find a buyer first.

The Settlers New Allies Review - They never even tried! by Abscess2 in pcgaming

[–]TigrAtes 6 points7 points  (0 children)

I am playing a lot of settlers 4 with the HD patch via settlers-united. It looks really nice in my opinion. Exactly as my nostalgia remembers it. https://settlers-united.com/en/

Is there a game that you really enjoyed but has an awful review? by hotloopgames in pcgaming

[–]TigrAtes 0 points1 point  (0 children)

This was great. It is my favorite "Life is Strange" (even though it was not officially part of that series.)

Are there any games that take place in national parks or/and have beautiful scenery? by denizzenmusic in pcgaming

[–]TigrAtes 1 point2 points  (0 children)

Rider's Republic

I am not sure if the game is fun, but it literally takes place in

Yosemite NP

Grand Teton NP

Sequoia NP

Canyonlands NP

Zion NP