Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite it in C #659

Closed
ghost opened this issue Jan 28, 2022 · 18 comments
Closed

Rewrite it in C #659

ghost opened this issue Jan 28, 2022 · 18 comments

Comments

@ghost
Copy link

ghost commented Jan 28, 2022

No description provided.

@offbeat-stuff
Copy link

this is a bad suggestion

@offbeat-stuff
Copy link

while rust might not look the best programming language it is very good compared to java and almost on par in performance with c. Any gains in speed with c will only happen if some expert works on the project.

@ghost
Copy link
Author

ghost commented Feb 9, 2022

while rust might not look the best programming language it is very good compared to java and almost on par in performance with c. Any gains in speed with c will only happen if some expert works on the project.

C (:rocket:) is:

  • Memory safe 🚀
  • Blazing fast 🚀
  • Minimal 🚀

Therefore, this project needs to be written in C (:rocket:), as in its current state of using Rust, it is full of CVEs and memory leaks. Switching to C (:rocket:) will magically fix all these issues :rocket:

@offbeat-stuff
Copy link

C is the most memory unsafe language that will ever exist because you control memory yourself and c programming takes a lot of time just make sure memory is being handled correctly. The main reason people use languages like C++ and Java is because you don't handle memory yourself the language does.

@offbeat-stuff
Copy link

Also switching to c will not be magical. It will take like 3-4 months of progress to do that.Also many libraries that stevenaralla uses are in rust to write the project in c it would require rewriting those too. And while there maybe issues in rust those are going to be solved by their respective devs. If this project was written with C a lot of code might have security issues and other things b/c of poor coding that might not get identified for years.

@ghost
Copy link
Author

ghost commented Feb 12, 2022

Also switching to c will not be magical. It will take like 3-4 months of progress to do that.Also many libraries that stevenaralla uses are in rust to write the project in c it would require rewriting those too. And while there maybe issues in rust those are going to be solved by their respective devs. If this project was written with C a lot of code might have security issues and other things b/c of poor coding that might not get identified for years.

Rewrite it in C (:rocket:) and rewrite the libraries in C (:rocket:). We can not let this unsafe Rust code loose! We're just letting the CVEs fly. C (:rocket:) is completely immune to CVEs as it is memory safe :rocket:.

This project being written in Rust and not C (:rocket:) should be a CVE in and of itself!

@offbeat-stuff
Copy link

offbeat-stuff commented Feb 13, 2022

Have you ever programmed anything in C?

@ghost
Copy link
Author

ghost commented Feb 13, 2022

Have you ever programmed anything in C?

Yes, I have programmed many things in C (:rocket:) It's completely memory safe (:rocket:), secure (:rocket:), minimal (:rocket:), configurable (:rocket:) and fast (:rocket:)!

@ritschwumm
Copy link

write in c, write in c. https://www.youtube.com/watch?v=1S1fISh-pag

@offbeat-stuff
Copy link

stop with the rockets, rust is a good modern language and not everybody can handle C that is why languages like rust,go are used they might have issues but so does C. In the end these CVEs will not effect normal users. They are special cases. Also as stated by the dev this is a hobby project so asking a rewrite in the first place is illogical. C is only as much memory safe as much memory safe you write it. A C rewrite can have large issues that will further drag this incomplete project into mud.

@ghost
Copy link
Author

ghost commented Feb 14, 2022

stop with the rockets, rust is a good modern language and not everybody can handle C that is why languages like rust,go are used they might have issues but so does C. In the end these CVEs will not effect normal users. They are special cases. Also as stated by the dev this is a hobby project so asking a rewrite in the first place is illogical. C is only as much memory safe as much memory safe you write it. A C rewrite can have large issues that will further drag this incomplete project into mud.

Rust is the one dragging this project down in the mud. C (:rocket:) would fly this project into the sky :rocket:. Every CVE is a user-end bug, and C (:rocket:) has none!

Rust is inherently non-memory safe and CVE prone no matter how you write it! C (:rocket:) is inherently 100% memory safe (:rocket:) and immune to CVEs no matter how you write it!

@Jan69
Copy link

Jan69 commented Feb 18, 2022

if anything, it should be Zig instead of C ;P
Rust's main problem is that there isn't even an actual spec, so it is literally impossible to make any third-party compilers or stuff, without constantly playing catch-up with the official implementation...
C is great and all, but for big projects like this, it doesn't really make sense, because it is designed for low-level system programming, and doesn't even have a decent standard library for handling strings, it's main benefit is that it's very widely supported and can be compiled anywhere, and that it's POSSIBLE to optimize things manually... but it would drastically slow down the development, because you'd need to do a ton of tests, every single time you make a change, just in case you forgot to properly handle some buffer overflow or underflow, or a missing null terminator, or any of a dozen other things...
not to mention that this project needs to not JUST run, it needs to also be compatible with vanilla minecraft, to the best of its ability, and vanilla minecraft was not designed with C in mind, either, which would add extra complexity trying to port all the features back to C, for no reason...

all in all, good troll, 11/10

@offbeat-stuff
Copy link

Why not java?? minecraft is written in java

Or C++ bedrock edition has a lot of bugs though

@offbeat-stuff
Copy link

stop with the rockets, rust is a good modern language and not everybody can handle C that is why languages like rust,go are used they might have issues but so does C. In the end these CVEs will not effect normal users. They are special cases. Also as stated by the dev this is a hobby project so asking a rewrite in the first place is illogical. C is only as much memory safe as much memory safe you write it. A C rewrite can have large issues that will further drag this incomplete project into mud.

Rust is the one dragging this project down in the mud. C (🚀) would fly this project into the sky 🚀. Every CVE is a user-end bug, and C (🚀) has none!

Rust is inherently non-memory safe and CVE prone no matter how you write it! C (🚀) is inherently 100% memory safe (🚀) and immune to CVEs no matter how you write it!

Did you even ready my reply??

@bdotsamir
Copy link

@offbeat-stuff dude. they're trolling lmao

@offbeat-stuff
Copy link

It was fun though

@ghost
Copy link
Author

ghost commented Feb 26, 2022

@offbeat-stuff dude. they're trolling lmao

Stop misgendering me. My pronouns are sneed/sneed (formerly chuck/chuck).

@iceiix
Copy link
Owner

iceiix commented Mar 6, 2022

C may be unironically better than Rust for some of what I'm trying to accomplish with this project, specifically #446 🕸️ Web support.

I find this other project very interesting: https://github.com/satoshinm/NetCraft. It is written in C and already has web support years ago thanks to Emscripten's superior support for C as compared to Rust. However it isn't as featureful. Steven was further along in gameplay functionality when this project forked from it, compared to when NetCraft forked from Craft — but we are much further behind @satoshinm in supporting the web platform, and it isn't as straightforward to port as with C.

At one point in time, Rust was seemingly on track to becoming the language for the web. Native wasm32-unknown-unknown target thanks to the LLVM toolchain. There is/was(?) even a Rust and WebAssembly working group https://rustwasm.github.io but it fizzled out or they stopped blogging in 2019. Cargo package support for the web is hit-or-miss. Had this project been written in C using glfw or SDL, we may have already had web support by now.

Rust's memory safety doesn't matter as much when targeting WebAssembly, though as a modern modern language it can be more pleasant to program in compared to C. No free lunch. Not planning to rewrite in C, myself, but if anyone else wants to I'm all for it.

Repository owner locked and limited conversation to collaborators Mar 6, 2022
@iceiix iceiix converted this issue into discussion #670 Mar 6, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants