Hello,

I have started learning Rust. I have only made a fibonaci series program so far but I would make more complex program as I progress in learning Rust :D

1 point

1+1=2 1+2=3 2+3=5

permalink
report
reply
8 points

make a game engine

/s

permalink
report
reply
4 points

perhaps a simple turn based card game with the ability to add custom cards

permalink
report
reply
1 point
*

Single player blackjack against the dealer is a good choice.

The basic rules of the game are easy to implement so the payoff is quick and you can extend it later with additional complexity if you like.

  • Aces as 1 or 11
  • splitting doubles
  • Betting
  • Random card, single deck, multiple decks etc
  • Dealer logic as AI
  • Player AI with card counting
permalink
report
parent
reply
6 points

When I’m curious about a language, I usually first build some implementation of a perceptron or basic neural network, as well as a (usually very bad) text editor.

I feel like once I have those behind me, I’ve got some fundamentals and can dive deeper into what makes the specific language actually special :)

permalink
report
reply
2 points

Turn the Fibonacci series into an Iterator. >:)

permalink
report
reply
2 points

that could be a good exercise, I haven’t got the needed knowledge to do so, but I will keep this in mind.

permalink
report
parent
reply
3 points

Yeah, it’s a bit of a stretch goal. 🙃

When I learn a new language, I like to implement the Sieve of Erastothenes (which is a simple algorithm for finding prime numbers), and I had done so with Rust. Two years or so later, I looked back at that code and thought, damn, that looks like a Java dev wrote it.

Then I realized the most idiomatic way of implementing that would be an iterator. This was actually an interesting challenge, because typically Sieve of Erastothenes uses an upper bound, which I didn’t want to have.
But yeah, it was also just wild to me, how much different the iterator code looked (and in many ways, how much better it was). It was just really cool to see, how much I had progressed in those two years.

permalink
report
parent
reply

Rust Programming

!rust@lemmy.ml

Create post

Community stats

  • 231

    Monthly active users

  • 120

    Posts

  • 277

    Comments

Community moderators