Skip Navigation
jcbritobr Júlio Gardona @mastodon.social

Computer science lover, digital artist and open sourcerer. 🖥️ 🐹 🦀 🐧 ⚛️

Posts 0
Comments 21
Leaving Rust gamedev after 3 years
  • @asdfasdfasdf @kaffiene I think build a linked list is the last stage of learning rust, because linked lists has circular references that can lead to memory leaks and other memory issues. Build one with rust is hard, because the compiler will not easy for you to make mistakes, but if you can write a linked list, you can write anything in rust. Try this book.

    https://rust-unofficial.github.io/too-many-lists

  • Leaving Rust gamedev after 3 years
  • @asdfasdfasdf @kaffiene As the friend above says, rust require some time and have a learning curve. Its very different, and thats why people gets strugling with the language. As you got proficience, it will save you hours of debug. I suffered with the learning curve also, but I needed to change the way I was think about how to program.

  • Leaving Rust gamedev after 3 years
  • @kaffiene @asdfasdfasdf Its slow when you dont know what youŕe doing. For example, build a linked list in #rustlang is different then build one in java, because you can´t leave the variables in a wrong state. It's only a different approach, not a slow approach.

  • since: my first project
  • @larix @Ephera it's better to return an Option<&str> as a String may DeRef to &str.

    For example

    self.name.as_deref()

  • Are Rust errors are so verbose or its just me?
  • @iso all the errors are the same. Missing trait implementations. Already see c++ template issue with dozens of lines. There are some tools that helps like the below. But if you had 100 missing traits implementations, you will got a 100 error lines report.
    https://github.com/zkat/miette

  • Are Rust errors are so verbose or its just me?
  • @iso In my opninion they are pretty neat, if you use their monads correctly.

  • Could rust do with a crates.io alternative?
  • @onlinepersona Got this issue two days ago. Someone upload a package with same name of mine. I was need to change the name to also upload.

  • Don't write Rust like it's Java
  • @onlinepersona @snaggen another problem I see people doing while writing rust, is trying to write code like java. Rust isn't an OO language, but you can organize your code and have hierarchies.

  • Don't write Rust like it's Java
  • @onlinepersona @snaggen

    people write oo code in linux source code using c. With rust is simple. Just use composition, and you can explore the traits, that serves as and is better than interfaces.

  • The Urgent Need for Memory Safety in Software Products
  • @snaggen Cyber security problems seems to be a major issue to fix in this decade.

  • Async Rust Is A Bad Language
  • @sugar_in_your_tea #golang is a near perfect aproach for writing concurrency and async code, indeed, but rust already has channels in standard library. My github has a lot of concurrency code using only std library, including examples in atomics, channels, mutexes, conditional variables, etc...

    https://doc.rust-lang.org/rust-by-example/std_misc/channels.html

    https://github.com/jcbritobr/concprog/blob/master/src/threadpool.rs

    https://github.com/jcbritobr/concprog/blob/master/src/channels.rs

  • Async Rust Is A Bad Language
  • @sugar_in_your_tea @wim
    go channels and goroutines are very good and easy to work, but thei cant acquire the performance and security of #tokio. You can write good code and solutions with goroutines, but there are limitations. #Rust async is a bit more difficult to do, but its not so or too complicated or dificult, and you will choose between the two languages by kind of problems you want to solve.

  • Stable Linux distro with up to date packages
  • @NoRecognition84 @rodneyck its bad anyway. Why a opensource project will do something like that? Telemetry causes bad performance in production. If its opt in, no one will activate, and soon the business will force its use.