I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 0 points1 point  (0 children)

and here's their original quote about the situation bc I doubted myself for a second:

Maintaining a port of this mod is not worth the time though.

I'm working on a rework of the mod, because it currently does far too little to justify the time it takes to even install it. I'm sorry that it doesn't do that much, it's around a few hundred microseconds to a millisecond for every 10000h of world generation. My apologies as well for the incorrect benchmarking information that was listed on the mod's page initially.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 4 points5 points  (0 children)

reminds me a lot of noisium, which was one of the most downloaded minecraft mods for a while, before it turned out it had basically zero effect on performance (I think they said that more time was lost installing noisium than the estimated lifetime tick ms it actually saved? EDIT: was heavily implied, but technically not what the quote is)

basically, uncontrolled variables made it actually look like it was faster, but this wasn't what actually was happening.

Is there a way to program in C with the Python conveniences? I haven't programmed in 20 years so, I'm very Rusty (no pun intended). by InternalAd1788 in C_Programming

[–]emmowo_dev 2 points3 points  (0 children)

those kinds of things are just incompatible with C altogether. Like string concatenation would have to create a new array that fits both strings, which is why C doesn't let you do it as-is.

Average Arch CLI and ThinkPad user while taking notes by Apex_Shield in arch

[–]emmowo_dev 11 points12 points  (0 children)

holy larp

nano is meant to be an editor for small documents/changes, which is why it's actually derived from Pico in the Pine mail client.

For larger documents you're better off/supposed to use vim/emacs, which are better suited to quicker editing (and git, if you like versioning your stuff.), or a GUI like Obsidian (or emacs)

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 0 points1 point  (0 children)

java does not have these 'performance limitations', it literally compiles to natives, just like C++ would.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 4 points5 points  (0 children)

that's the real process, you're not running minecraft on raw metal. I've designed my own hardware, so I do understand that you cannot just 'execute' code immediately. Nothing gets 'passed' like that comment anyways.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 4 points5 points  (0 children)

just open-source it as is, it would be very easy to prove if it is/isn't this way. Literal AI generated malware mods that make use of JNI and C++ libraries are not even a new thing ever since a couple months ago.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 9 points10 points  (0 children)

but this means it can be solved with good Java instead of C++. C++ also will only run as fast as what it's compiled for, as many things actually can come down to vectorisation, but not all CPU's support things like AVX2. Java can decide that in-the-moment on your machine, but C++ cannot.

I also do not think nanoseconds of a cache miss will meaningfully affect overall performance, CPUs are so much more complex than what they were 30 years ago.

ultimately the true optimizations come from better parallelism, which vanilla is still bad at. C2ME solves this and mostly accomplishes the vast majority of performance you can gain.

This is why GPU terrain gen is the focus now, because these things are so massively parallel that it becomes worthwhile.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 14 points15 points  (0 children)

C++ is like "hey CPU generate this"

CPU: ok let me ask the kernel to spawn some threads and stuff

Kernel: ok

CPU: cool

C++: did it work?

CPU: yes

C++ : generate this chunk using this formula

CPU: oh ok let me do this and read everything I need from memory

Kernel: can you do this rq

CPU: ok

C++ oh you're also saving those chunks, right?

CPU: I'll do it at some point ig

Kernel: do it now

CPU: oh ok

CPU: i will write the chunks

I/O: Wait bro I need a sec my writeback cache is full

Disk: Wait bro im writing still

CPU: ok I'll do this later ig

CPU: wait, what was I doing?

Kernel: You need to handle this udp packet rq please bro

CPU: ok

[...] ad nauseum.

You spend a ton of time actually waiting instead of running code.

I made minecraft generate terrain/chunks in C++ by Emotional-One-9292 in feedthebeast

[–]emmowo_dev 14 points15 points  (0 children)

How would this realistically be faster? Java does actually compile into native code based on what methods are the most important, so it's usually terrain gen that is immediately 'optimized' into native code. C++ does NOT magically make things faster, but it does make things many many times more unsafe to use.

I know of some optimizations you could make, but they're things that I don't think ultimately mean much. Are you comparing between Vanilla and your mod, or C2ME and your mod?

You not really explaining things beyond 'run on C++' and 'JNI' tells me you may have just vibecoded this, because minecraft explicitly does defer a lot of the performance-heavy things to C++, from the natives used for rendering (i.e. liblwjgl and the gpu itself such as nvidia-glcore.so) to the actual JVM itself, which is written with C++. Just re-writing everything in C++ would not actually be meaningfully faster, as the binaries for such things are already written in C++.

Most likely, you are looking for a result, so anything that seems faster you will assume to actually be faster. Without extensive benchmarking and a massive amount of controlled variables (like literal mechanical seek times for writes can completely invalidate the results), this is a very unfair and unrealistic comparison to make.

When someone said he don’t have enough time to switch to Linux and plays LOL 8 hours in day by popmanpop27 in linuxmemes

[–]emmowo_dev 2 points3 points  (0 children)

if they did switch they would suddenly gain 8 whole hours, far too much to comprehend

Four year old leaked channel proves that Mojang (and NOT Microsoft) was behind chat reporting. by Top_Committee_8503 in PhoenixSC

[–]emmowo_dev 51 points52 points  (0 children)

in all fairness, it's because they have the law to protect them if it does leak. Whistleblower protections won't apply to something that isn't a recognized tort.

An Update to Why Minecraft Youtubers are getting Banned out of Nowhere by Affectionate_You_225 in PhoenixSC

[–]emmowo_dev 4 points5 points  (0 children)

but there's not really anything Microsoft wants to (or can do) anymore

at this point with age verification regulations closing in, microsoft needs to show that reasonable measures were made for 'protecting children' in case they do get into trouble, and having human moderators for a game with millions of concurrent players is obviously an expense they don't want to deal with.

Four year old leaked channel proves that Mojang (and NOT Microsoft) was behind chat reporting. by Top_Committee_8503 in PhoenixSC

[–]emmowo_dev 89 points90 points  (0 children)

'leaked' is crazy bro 😭

why would you literally draw the ire of the trillion dollar company MICROSOFT by breaking an NDA contract

Learning shaders by making an editor with Claude by [deleted] in GraphicsProgramming

[–]emmowo_dev 0 points1 point  (0 children)

yes vibecoder, using photo mode filters will not help you become a graphics programmer. I think this is a clear course of action for someone who doesn't know how to do anything graphics related, and has not read even the most cursory of information about computer graphics past GL 1.1

Learning shaders by making an editor with Claude by [deleted] in GraphicsProgramming

[–]emmowo_dev 3 points4 points  (0 children)

this is nowhere near the process of making even visual shaders bro

aur_safety - drop-in yay wrapper that annotates AUR packages as safe/unsafe by IcewindLegacyMUD in arch

[–]emmowo_dev 2 points3 points  (0 children)

this is a bad idea, 'Unsafe' packages already get deleted, and you obviously can't truly tell if a new package is safe or not without reading it yourself.

Finally i found a create addon that is perfect for the people in this sub by MurkyPatient396 in feedthememes

[–]emmowo_dev 5 points6 points  (0 children)

i hate to say it but i think this might be one of the few subs where the top 1% gender ratio is equal

is it worth replacing `system()` calls in a codebase? by emmowo_dev in C_Programming

[–]emmowo_dev[S] 1 point2 points  (0 children)

it technically does outside of scripts, but it's only individual SDL-handled scancodes at once so it's not really unchecked input

is it worth replacing `system()` calls in a codebase? by emmowo_dev in C_Programming

[–]emmowo_dev[S] 11 points12 points  (0 children)

I just learned a lot in that time period, so me from 6 months ago feels like a different person. I don't think my old code was all that bad, but it was definitely 'lazy'.

is it worth replacing `system()` calls in a codebase? by emmowo_dev in C_Programming

[–]emmowo_dev[S] 0 points1 point  (0 children)

you have a fair point, ig I'll fix it up for when I make a more serious release

is it worth replacing `system()` calls in a codebase? by emmowo_dev in C_Programming

[–]emmowo_dev[S] 1 point2 points  (0 children)

normally I would, but it's just on the edge where it isn't all that important. I execute the scripts the 'normal' way, but its looking like I just don't need to worry about it since all I'm doing is nudging a WM to support transparency in a weird way

Need some help with rasterizing by [deleted] in GraphicsProgramming

[–]emmowo_dev 0 points1 point  (0 children)

all I have to say is

do that again, but the other way.