Cuberite Forum

Full Version: Random Chitchat 2017
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
I've been recently into c++, had my first segfault a few days ago.

What I still don't get, why can't things not be thread safe automagically? Can't we just assume it's thread safe? I mean, if I have a pointer in both threads, why can't I just use it in both or at least read only. Damn.
Because the CPUs aren't clever enough to make things thread safe automagically. The only languages which provide automagic thread safety do so at the cost of significant overhead, speciallism, or a lot of careful language design from the start. You can use data from multiple threads if all threads use it read-only, but I don't think we do that anywhere in the code at the moment.
There is a new language named Rust and it has very nice features:
  • zero-cost abstractions
  • move semantics
  • guaranteed memory safety
  • threads without data races
  • trait-based generics
  • pattern matching
  • type inference
  • minimal runtime
  • efficient C bindings
In this case Rust checks the code on compiling for data races, missing move's and more.
I've been following Rust for a while as it's the language used in Servo, Mozilla's experimental browser engine, but I'll have to play with it some longer to get used to the syntax.
There is also a unix-like os written in rust Big Grin
https://www.redox-os.org/
Yeah I know, I have it as a VM on my laptop Smile
From OpenHub.net:
Over the past twelve months, 40 developers contributed new code to Cuberite. This is one of the largest open-source teams in the world, and is in the top 2% of all project teams on Open Hub.
( https://www.openhub.net/p/cuberite/factoids )
:D
AwesomeBig Grin
Currently we have entities and for example the pickup entity that inherits from it. Couldn't we do the same with mobs, too?
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34