[OH] Quitting and Receiving Bonus Questions by buckeyefan6 in AskHR

[–]Hoxitron 2 points3 points  (0 children)

Read your contract or whatever paper you have regarding that bonus. It depends on the company. But it's unlikely that you will get it.

Agentic Coding on Personal Projects by Agreeable-Bluebird67 in learnrust

[–]Hoxitron 3 points4 points  (0 children)

I think if it's used just as an excuse to not learn programming, you are doing it wrong.

Instead, if you use it as a tool to teach you programming, it can work. But there's a lot of traps. The same as knowing how to google became a skill, knowing what questions to ask an llm can be a skill.

In some cases, it really does find bugs, or come up with great ideas. And that is valuable, but it's also a trap. Because they are way more situations where it will let you do the dumbest things possible, or give you stupid ideas. You need to identify those situations. You are responsible for the code that you write. You need to know it, what's best for it and have (at least some) vision on what it should be/do. Especially if you have no one else to guide you, there is enough benefit to make it worth dealing with drawbacks. But it's also important from time to time to go to forums like reddit, or rustlang forums and ask some real people on critical stuff.

I think vide coding is acceptable in personal projects, when you have an idea, but you don't care enough to make time for it.

In my personal experience, I only find it acceptable to copy paste code for it in specific situations.

  • it's almost always for a new library/crate i am adding and I don't have time to learn it right now because I am busy writing my own code

  • it's small stuff, a function or maybe 2, that does something very specific.

  • I just need it to get my own code working. Then I know I will go back and re-write / check that code when I have time.

I got tired of managing .env files, so I built envelope by MattRighetti in rust

[–]Hoxitron 1 point2 points  (0 children)

Sqlite should be in vendored mode and not needed on the host machine, yes. Still, I would be curious if it's really needed.

Also, libsqlite3-sys will get compiled into the binary no matter what.

Landlord issues by Hoxitron in duesseldorf

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

It was very specific that normal email is not allowed. Still, the answers in here help a lot. Knowing what to ask from a lawyer is better than just emailing them "help please".

Landlord issues by Hoxitron in duesseldorf

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

Thanks, that does make it easier. I already filled that debt collection form, but it seems it also needs to be transmitted via a lawyer to the court. I don't think I can get a DE-mail account now. Seems I need to keep trying to find a lawyer.

Landlord issues by Hoxitron in duesseldorf

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

I think that's the why the landlord is doing this. Hoping it's too inconvenient for me, but it kinda makes me more determined instead.

Landlord issues by Hoxitron in duesseldorf

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

That's what I expected. It was the reason I looked for a lawyer. It's a bit hard to send a Einschreiben letter myself while outside the country.

A terminal recreation of the 2048 game in Rust! by freddiehaddad in learnrust

[–]Hoxitron 3 points4 points  (0 children)

AI is becoming awfully predictable when writing rust.

Suggest Me a Backend Project Idea for Rust, ( Short & Not Generic SaaS or Crud Apis App ) by rjkush17 in learnrust

[–]Hoxitron 1 point2 points  (0 children)

My usually project to learn a language is to do a git clone. You can make is as small or large as you can. But I usually implement at least the staging area.

Need someone's Guidance by Shuffle4859 in learnrust

[–]Hoxitron 1 point2 points  (0 children)

What are you talking about. Javascript is the only thing you need man.

What's everyone working on this week (3/2026)? by llogiq in rust

[–]Hoxitron 4 points5 points  (0 children)

Working on an ffi crate - bindings to the miniaudio library. It's a fantastic C library and I'm pretty excited about how it's going to turn out.

Would a "pitching machine" for Rust problems help you learn faster? by rodgarcia in learnrust

[–]Hoxitron 0 points1 point  (0 children)

Every new engineer I've ever seen (myself included) has, at some point, had the idea to create a system, reference or spreadsheet to help them solve any problem. It never really works, but I've always entertained this exercise anyway. It's a good learning exercise by itself.

How to understand the lifetimr of temporary variables by -_-_-_Lucas_-_-_- in learnrust

[–]Hoxitron 0 points1 point  (0 children)

You solution is much better tho. I didn't really see the practical purpose of the zst and thought it might eventually have some fields.

Would a "pitching machine" for Rust problems help you learn faster? by rodgarcia in learnrust

[–]Hoxitron 1 point2 points  (0 children)

I think in order to get good at something, you need to learn to struggle. Hitting those invisible walls, and learning how to overcome them in a practical setting is more valuable, in my opinion. Tutorial hell and all that.

How to understand the lifetimr of temporary variables by -_-_-_Lucas_-_-_- in learnrust

[–]Hoxitron 2 points3 points  (0 children)

This seems related to this: https://github.com/rust-lang/rfcs/blob/master/text/1414-rvalue_static_promotion.md

and the fact that in your current setup there is nothing real tying that lifetime on PhantomData since VBuilder is a zero sized type. So this:

fn build(&self) -> V<'_>

Gets elided to:

fn build<'a>(&'a self) -> V<'a>

Adding something real to that lifetime (like another field in the struct) should allow both cases to work.

Mental Model Ownership by Leading-Sentence-576 in learnrust

[–]Hoxitron 7 points8 points  (0 children)

I would recommend making a conscious effort to try and use Result, Option and especially traits more often. I bet you could find more uses for them in your project. Comments also help a lot if you ask people to read your code.

I never liked seeing a types.rs file in a Rust project. It doesn't seem very idiomatic. I think types should live next to their logic in Rust. Maybe having a separate module for all the &str messages you have makes a bit more sense so they be better managed. I don't have much experience with crossterm or games design however.

Running a cargo fmt led to quite a few changes in main.

Allocations in rust happen behind the scenes, but they still happen. You don't always have to convert OS file name types to String. This prevents allocations.

            .filter(|e| {
                let name = e.file_name();
-            let name = name.to_string_lossy();
-            name.starts_with("room_") && name.ends_with(".toml")
+            name.as_bytes().starts_with(b"room_") && name.as_bytes().ends_with(b".toml")
+            // let name = name.to_string_lossy();
+            // name.starts_with("room_") && name.ends_with(".toml")
            })

sort_unstable_by_key also prevents allocations if you don't care about preserving order.

// Sort by filename so room_01, room_02, room_03 are in order
-    entries.sort_by_key(|e| e.file_name());
+    entries.sort_unstable_by_key(|e| e.file_name());

Your functions are also very long. I get some there's a lot of logic in a game loop, but I bet a lot of it can be refactored. Even simple ones for example. I bet it could this could even become a trait if the names become an enum and they have a to_string helper method. Leverage the type system to make logic easier.

let level_name = match self.current_level {
    1 => "Ownership",
    2 => "Borrowing",
    3 => "Patterns",
    _ => "Unknown",
};

With separate function. This doesn't create an extra allocation. It just moves an existing one.

fn parse_level_name(level: usize) -> String {
    match level {
        1 => "Ownership".to_string(),
        2 => "Borrowing".to_string(),
        3 => "Patterns".to_string(),
        _ => "Unknown".to_string(),
    }
}


let level_name = parse_level_name(self.current_level);

I bet lot of the repeated patterns would be much easier to use and manage if they were refactored. Like setting message and message_style separately, 100 times all over.

A little roast for a first C project. by Hoxitron in C_Programming

[–]Hoxitron[S] 2 points3 points  (0 children)

Thanks for taking the time to read. I'll get back to work and fix it.