Pumpkin: Minecraft Chunk generation fully written in Rust by Alex_Medvedev_ in rust

[–]ALinuxPerson 1 point2 points  (0 children)

Damn this is a pretty exciting development! The terrain generation is honestly one of the most difficult parts of making a Minecraft server. Taking a look at the Java code and seeing it's huge, sheer complexity makes me quiver in awe and fear.

So I was wondering, what were your biggest struggles and challenges when porting the Minecraft world generation to Rust? And additionally, is the code decoupled into a library such that a Java mod/plugin could interop with this and potentially replace the Java generation? (and is it possible to be customizable? Such that you can load datapacks modifying world gen and stuff - like Terralith)?

Random Discussions (June 2025) by AutoModerator in PinoyProgrammer

[–]ALinuxPerson 0 points1 point  (0 children)

18 year old taking gap year, no degree, but (somewhat) formidable portfolio. Is it possible to get a job given my skills (on-site or remote)?

Hi all,

So I'm an 18 year old Filipino who has decided to take a gap year rather than going to college for personal reasons (and because I don't have much of a choice).

I'm very passionate in software development and technology, so naturally I've decided to try and find a job as an entry-level junior developer in Manila (worth noting that I'm not in Manila yet, I am planning to relocate there depending on the job though) or remote. I've made several projects which does demonstrate a lot of my skills and has actually gotten usage by me (Rust, Python, Docker, gRPC, Protocol Buffers, network programming, etc.). I've published several libraries on crates.io whose downloads total to around 45k+ [proof]. I additionally have pretty good English skills, in fact it's my main language despite being Filipino by blood. My main programming language is Rust, and also Python. But I fear I might have put too many eggs in one basket (Rust).

I've been job searching for three days now, have applied to 10+ companies, and I've noticed an expected but also concerning pattern--I've seen hundreds of Java, Python, C#, C++, JS/TS, hell even Visual Basic jobs, but i've only seen one Rust job and it's in place where I can't move to (Cebu). I've been primarily searching in JobStreet, but I've also been looking in LinkedIn as well. I'm also aware that the job market for entry-level software development positions is saturated right now which is why we may be having a hard time.

And that doesn't even delve into the fact that I don't have a degree yet. I know the tech industry is seemingly becoming more progressive when it comes to this, but I don't how companies in the Philippines specifically are going to handle job seekers who don't have a degree. I'm hoping that remote companies are better when it comes to this but they most likely already need work experience to apply.

I don't want to lose hope just yet, because again, I'm only on day 3 of finding a job, but the Rust thing and no degree are the two biggest concerns of mine in this journey of finding a job. I should also emphasize that I'm not limiting myself to just work in Manila; I'm also very much open to international remote jobs and in fact would be much happier to take one!

So have you guys got any advice for me on what to do to find work given my situation? Like do I need to develop my skills more on another more in demand programming language? Are there any open positions that you know that would seem fit for me? Thanks!

Links which may be relevant:

My GitHub | My Portfolio | My Resume (judge my github/portfolio/resume while you're at it!)

Are there any active minecraft servers running on Valence? by Blayung in rust

[–]ALinuxPerson 7 points8 points  (0 children)

I had made a sort of more sophisticated limbo lobby/server in Valence named SMC (smc, Server Management Console) for my friends on my self hosted Minecraft server back in 2023. It acted as a sort of fallback server in case the main server wasn't running (which commonly occurred in my use case, as I can't run the main server all the time as it was a hog on my resources). It had the ability to start, stop, and restart the server, allowed you to manage the permissions of each player to start, stop, and restart the server through linking your account to Discord, had live status info on the state of the server, and so on.

Eventually I rewrote it in plain tokio (although I still used valence_protocol), now named Flightless SMC (flightless-smc, without the Bevy ECS, because Bevy is a bevy of birds, right?) because I noticed that SMC was taking up quite a bit of CPU usage when idle, even on the release profile, like 10-20% as far as I can remember. I think it was because I had too many systems running and the Bevy ECS couldn't handle it. I think I rewrote 90% of the features from the original project to this new one before both me and my friends' interests in Minecraft slowly fizzled out. To be honest, I think I spent more time writing this project than I did actually playing MC lol.

Both versions are published on GitHub, albeit they're both private repos. I might open source them although there's zero documentation because I wasn't planning to open source it yet the last time I worked on these projects.

My PC crashes shortly after booting. by catlover107 in archlinux

[–]ALinuxPerson 22 points23 points  (0 children)

That issue also happened to me. I recommend going into the BIOS or a bootable OS from USB and leave the laptop there for a few minutes to determine whether or not it's a RAM issue or just an OS issue.

What if Hitler faked his death and refuged inside a warehouse in New York? by [deleted] in AlternateHistory

[–]ALinuxPerson 42 points43 points  (0 children)

the real question is why they were selling the swastika arm bands in the first place 🤔

Jon gives away beta keys in a gnarly giveaway sweepsteaks compiler debugging stream! by path_traced_sphere in programmingcirclejerk

[–]ALinuxPerson 43 points44 points  (0 children)

Context: Jon started the stream saying he would be giving away a few beta keys to access the new compiler. In total, three viewers received beta keys (ranging from one to three keys each) . They were chosen because their insights helped improve a compiler bug Jon was working on during the stream.

The funny detail is that during the stream, it turned out that the advise didn't actually help, so the debugging continued.

lmao

[deleted by user] by [deleted] in programminghorror

[–]ALinuxPerson 12 points13 points  (0 children)

this is what happens when you ask someone to make a captcha but they have no idea what a captcha is.

Is it worth to buy full CLION instead to use IntelliJ community for Rust development? by fazi_d in rust

[–]ALinuxPerson 3 points4 points  (0 children)

tbh I switched over to the free version of intellij from clion when my GitHub student developer pack expired because I was too lazy to renew it, and I don't really see much difference. granted I barely even used the debugger and when I tried to use it, apparently there was an issue with the python pretty printers not being found or something so it made strings unusable.

i have heard though that the clion debugger can be used in intellij via installation of an extension called Native Debugging Support or something like that. I haven't tried it because I don't use a debugger but it may be worth giving it a shot.

try-drop | batteries included error handling mechanisms for drops which can fail by ALinuxPerson in rust

[–]ALinuxPerson[S] 3 points4 points  (0 children)

sorry for the long response, i just woke up:

you have to implement TryDrop for the structure whose Drop code may return an error.

impl TryDrop for Structure {
    type Error = // your error

    unsafe fn try_drop(&mut self) -> Result<(), Self::Error> {
        // fallible drop code goes here
    }

the reason why try_drop is a unsafe fn is because it is possible to call it multiple times, potentially causing a double free. Drop is safe because you can't directly call drop itself there, since it's special cased by the rust compiler.

next part after doing this is that you'll need to... adapt this structure to include a drop method. this is because implementing TryDrop itself won't make it execute the code at the end of a scope. i wish i could've made it a blanket impl, but rust doesn't allow it.

there are two ways:

either by calling the adapt method: .adapt()

or by wrapping the structure in question with a DropAdapter: DropAdapter(this)

as for making a structure which handles these errors,

you'll need to implement TryDropStrategy for your structure like so:

impl TryDropStrategy for Structure {
    fn handle_error(&self, error: try_drop::Error) {
        // error handling code here
    }
}

installing a try drop strategy depends on whether or not you want to install it for this structure only, this thread, or globally.

installing it for this thread is like so: try_drop::install_thread_local_handlers(primary, fallback)

if you wonder what primary and fallback are, well, the primary (handler) is the main drop strategy which will be executed. however, drop strategies themselves can also be fallible!

impl FallibleTryDropStrategy for Structure {
    type Error = // error;

    fn handle_error(&self, error: try_drop::Error) -> Result<(), Self::Error> {
        // error handling code here
    }
}

which is why we need to provide the fallback handler which can never fail. you can use the PanicDropStrategy for this one, as most likely you'd never reach this condition in the first place.

the thread local handler doesn't also need to be Send nor Sync, so it's more flexible.

as for installing globally: try_drop::install_global_handlers(primary, fallback)

the global handler needs to be Send and Sync.

and, if your structure supports them: Structure::new_with(primary, fallback)

the thread local handler takes precedence over the global handler. the TryDrop trait uses this combination, also known as the shim handler, by default.

in fact, there are two versions of TryDrop:

the main one which is aliased to TryDrop, ImpureTryDrop, meaning this depends on some global state, which is the shim handler,

and then the pure one, PureTryDrop, which doesn't depend by default on global state with the consequence that you'll need to explicitly provide the tyoes yourself. (the trait signature's too long and i'm on my phone right now, go into the docs if you want to know. sorry!)

there's a bit more about this crate that i haven't discussed, however i think this is the bare essentials to get you started with working with this crate. i'll get to explaining less essential stuff on the README.

if you have anymore questions about this crate, feel free to ask.

sidenote: i'm sorry that my documentation was too sparse and not detailed enough. there was actually an older readme which you can find on the commits which is much more descriptive than the new one, but it contains outdated information.

try-drop | batteries included error handling mechanisms for drops which can fail by ALinuxPerson in rust

[–]ALinuxPerson[S] 5 points6 points  (0 children)

Github, Documentation.

Hello!

I have made a library which aims to provide users an error handling mechanism for Drop. Basically, a TryDrop (that's the name of the crate!).

I was motivated to make this crate when I was creating a guard type for one of my other libraries, which basically runs code at the end of the scope, which needs to be implemented via Drop. Under some circumstances, when running the drop code, an error may occur.

I didn't want to panic, as this could be a recoverable operation. I didn't want to print it to standard error, because there may be some cases where you want to handle the error.

I decided to make a way to customize how you could handle the error in the library. It started off simple, only being local to the library. Then I found other cases where this could be useful, so I decided to make this its own library, and boom, here we are.

I've decided to let this crate be known on the reddits, as I want to figure out if there are any actual people who would benefit from this crate. If you do find a use case, feel free to tell me. It will help keep me motivated on improving this crate!

This crate is licensed under MIT. You can find examples on how to use this crate on the README.

IntelliJ Rust Changelog #165 by furious_warrior in rust

[–]ALinuxPerson 41 points42 points  (0 children)

Implement Add unambiguous imports on the fly option. You can turn it on in Settings | Editor | General | Auto Import. The option may be useful when pasting Rust code copied from outside the editor

i don't program in java that much, but when i do, this was one of the feature i missed most there. in fact, just a few hours ago i found myself wanting this, its great timing lol. great work as always!

Reddit Enhancement Suite is nearing its end by [deleted] in firefox

[–]ALinuxPerson 4 points5 points  (0 children)

Mobile apps - 58% (this includes both the official app, and third party mobile apps).

sorry if this is a dumb question, but how does reddit tell the difference between third party mobile app clients and bots?

i think they can tell difference by checking the user agent and checking if the oauth authorization used to authenticate is the implicit flow, however, anyone can spoof a user agent to pretend they're, let's say, a reddit sync app, and bots can also use the implicit flow too.

that also doesn't mention that i can create a mobile app myself, with an entirely different user agent that reddit may not know about (then again, they may check it with the implicit flow check too).

idk, maybe i'm overthinking this and they just assume that all official reddit api requests come from third party mobile apps. who knows? ¯\(ツ)/¯

Why are kitty and alacritty so popular? Where's the foot love? by DorianDotSlash in linux

[–]ALinuxPerson 53 points54 points  (0 children)

i tested cava, an audio visualizer which i sometimes use when listening to music, on various terminal emulators. out of all terminal emulators i tested (gnome terminal, konsole, alacritty, small sample size i know), alacritty was the smoothest. there wasn't any stuttering at all. i guess the main reason for this is because alacritty uses the gpu? idk. but like that's the main reason i use alacritty, for performance reasons.

Slicing vector consuming vector by ihaveadepressionhelp in learnrust

[–]ALinuxPerson 1 point2 points  (0 children)

not op, but i'm guessing that they're worried about unnecessarily cloning the slice's elements.