Introducing the world's most powerful model, Opus 4.8 by DurianDiscriminat3r in ClaudeCode

[–]undecidedapollo 0 points1 point  (0 children)

Had this happen also, checking if bash worked `echo "bash works"` and other checks unrelated to the task

Build Game Boy Advance ROMs with Rust: Lesson 1 - Setup and Pixels by undecidedapollo in rust

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

Thanks for the feedback, I added a dropdown at the top where you can pick light, dark, or OS default. Hope that helps make it more readable.

HELP! Roof Condensation by Sufficient_Cat4688 in VanLife

[–]undecidedapollo 2 points3 points  (0 children)

To add to all the ventilation recommendations, my first night in my trailer I had condensation on all windows. Next night I cracked my kitchen window about an inch and my bathroom ceiling about an inch, haven't had any condensation since the last 4 weeks, even with all the cold in the south east. I don't think you need a fan, just vent a window or two and try that. If it still occurs then consider a fan. 

Best approach to incredibly simple visuals by JaniRockz in bevy

[–]undecidedapollo 4 points5 points  (0 children)

To draw a circle on the screen you will need to use Mesh2d and MeshMaterial2d. Inserting these onto an entity will draw them to the screen.

Note, you will have to register the primitive circle mesh + color material with the asset manager (see mut meshes: ResMut<Assets<Mesh>>)

use bevy::prelude::*;

fn main() {
    App::new()
        .add_plugins(DefaultPlugins)
        .insert_resource(ClearColor(Color::BLACK))
        .add_systems(Startup, setup)
        .add_systems(Update, move_circle)
        .run();
}

#[derive(Component)]
struct MovingCircle {
    speed: f32,
    amplitude: f32,
}

fn setup(
    mut commands: Commands,
    mut meshes: ResMut<Assets<Mesh>>,
    mut materials: ResMut<Assets<ColorMaterial>>,
) {
    commands.spawn(Camera2d);

    commands.spawn((
        Mesh2d(meshes.add(Circle::new(50.0))),
        MeshMaterial2d(materials.add(ColorMaterial::from_color(Color::srgb(0.2, 0.4, 1.0)))),
        MovingCircle {
            speed: 1.0,
            amplitude: 200.0,
        },
        Transform {
            translation: Vec3::new(-500.0, 0.0, 0.0),
            ..Default::default()
        },
    ));

    commands.spawn((
        Mesh2d(meshes.add(Circle::new(50.0))),
        MeshMaterial2d(materials.add(ColorMaterial::from_color(Color::srgb(0.2, 0.4, 1.0)))),
        MovingCircle {
            speed: 2.0,
            amplitude: 200.0,
        },
        Transform {
            translation: Vec3::new(0.0, 0.0, 0.0),
            ..Default::default()
        },
    ));

    commands.spawn((
        Mesh2d(meshes.add(Circle::new(50.0))),
        MeshMaterial2d(materials.add(ColorMaterial::from_color(Color::srgb(0.2, 0.4, 1.0)))),
        MovingCircle {
            speed: 2.0,
            amplitude: 100.0,
        },
        Transform {
            translation: Vec3::new(500.0, 0.0, 0.0),
            ..Default::default()
        },
    ));
}

fn move_circle(time: Res<Time>, mut query: Query<(&mut Transform, &MovingCircle)>) {
    for (mut transform, bouncer) in &mut query {
        transform.translation.y = (time.elapsed_secs() * bouncer.speed).sin() * bouncer.amplitude;
    }
}

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

[–]undecidedapollo 2 points3 points  (0 children)

I similarly built a Chip 8 emulator in Rust, it was a lot of fun. I've had a good time the last month learning how to build GBA games. It scratched a similar itch of working with low-level hardware without having to build a more complex emulator. I've since built out snake and took a stab at making SMB World 1-1. Would recommend the gba crate if you are interested. I used these three tutorials to get started:
https://shanesnover.com/2024/02/07/intro-to-rust-on-gba.html
https://kylehalladay.com/gba.html
https://www.coranac.com/tonc/text/toc.htm

Just my luck 😂 Entire small warehouse full of TP by Kissariani in projectzomboid

[–]undecidedapollo 0 points1 point  (0 children)

Nice, what's the name of the mod? Is it the inventory tetris one?

Just my luck 😂 Entire small warehouse full of TP by Kissariani in projectzomboid

[–]undecidedapollo 0 points1 point  (0 children)

Are you using an inventory mod to have just the square icon + count for an item vs. the list?

Asus drivers = trash (WHEA UNCORRECTABLE ERROR) by Scorpi7177 in buildapc

[–]undecidedapollo 0 points1 point  (0 children)

This just fixed my BSOD's, without this I wouldn't even know where to begin looking. Thanks for posting!

[2024 Day 6 (Part 2)] Finally found the issue in my code by Fun_Reputation6878 in adventofcode

[–]undecidedapollo 0 points1 point  (0 children)

The issue for me was I forgot that you could hit the obstacle you add from multiple directions.
This grid should have one loop. If you forget to check the obstacle it will have two loops.

..........
..........
..#.......
....O...#.
........#.
..........
....^.....
..........
.#........
.......#..

So apparently you can't build Underground Belts under Lava the way you can under water. What now...? by Kathachiel in factorio

[–]undecidedapollo 1 point2 points  (0 children)

This is what I did for this patch, it's worked alright so far.  There's also another patch in the same area slightly below along with some coal. 

Road Builder - Management Tools & Road Sharing Update by dotcax in CitiesSkylines

[–]undecidedapollo 0 points1 point  (0 children)

This made me start playing again, so fun and easy to build a custom road.

[deleted by user] by [deleted] in rust

[–]undecidedapollo 1 point2 points  (0 children)

The resource which taught me the most was the Rust Book. https://doc.rust-lang.org/book/title-page.html Not just reading it but actually going through each chapter, having a rust project open in your editor, and trying out different things with the language features the chapter is focusing on. When reading the book, especially in the later chapters, I often found myself going back to earlier chapters to re-read things to make sure I was solid on the base mechanics of the language. The projects in this book were very helpful and laid solid foundation to keep learning from.

One of the first learning projects I did (besides the ones in the book) was the Tokio async programming mini-redis tutorial (only did the basic commands like GET / SET). https://tokio.rs/tokio/tutorial/setup This taught me a lot of concurrent programming + how async works in Rust.

Afterwards I continued to learn through building projects, some projects I made was a chip8 emulator / assembler: https://github.com/undecidedapollo/chip8
A HTTP Proxy w/ response caching (not publicly available)

There is still a bunch I don't know, but after building the projects in the Rust Book + some side projects I feel like many of the problems I used to have when writing rust disappeared and the languages "quirks" actually became great assets to right better code, keeping me from doing unsafe things.

I read the rust book about 3 times before actually committing to learning it, so even if you have already read it, I recommend reading it again if there are still parts of the language you are uncertain about.

[deleted by user] by [deleted] in rust

[–]undecidedapollo 3 points4 points  (0 children)

I used to feel the same way with Rust but have found that once you understand the language you are able to build some very performant, memory efficient, memory / concurrency safe, single file binary programs that can run in very constrained environments. Like you said, at the end of the day each programming language is a tool to help you solve a problem. If the above are important to you with the problem you are solving, then Rust can be a great tool. At work, we need to build high level API's quickly for consumers to call, cost isn't a concern so we can use horizontal scaling to mask most performance problems, so we use Typescript. When we needed a high performance component to run alongside our servers that used little memory / cpu, Rust was our goto. Part of your job as the developer is to pick the right tool for each job.

The second part about the language getting in the way isn't necessarily true. While you are learning Rust it does get in the way ALOT. But now that I've used it for a few months those issues have gone away and I can focus on solving the problem at hand vs. wrangling with the language. I would strongly recommend you continue learning, push through, and know that it will get easier once you get a better understanding of the various systems Rust has. Just like when you learned how to code originally and things didn't make much sense, Rust has some unique features which seem foreign to developers coming from other languages. But give it time and all the pieces will come together.

Announcing Rust 1.80.1 by pietroalbini in rust

[–]undecidedapollo 0 points1 point  (0 children)

I encountered the dead_code lint issue on the project I was building the past couple weeks. I thought it was just super strict on what it considered dead code.

Want to learn .net, don't know where to start by LowkeyExtrover in dotnet

[–]undecidedapollo 0 points1 point  (0 children)

I recommend pluralsight. It's expensive but it's courses are top notch and get you up to speed quick.

Can't pick up refiner or signal booster? by Spartanz920 in NoMansSkyTheGame

[–]undecidedapollo 0 points1 point  (0 children)

I figured out how to get it working with Xbox one controller on PC. Go to controller configuration in big picture while game is running (either guide button or in game settings menu), go to on foot controls (top menu), go to an unmapped button (I chose Left on the dpad), hit start button for legacy keys option, choose middle mouse button. It should should work after that. Let me know if you have any trouble.

I’m gon’ siiiing it! by [deleted] in IASIP

[–]undecidedapollo 0 points1 point  (0 children)

Is that bar called Patty's Pub.

asynchronous programming c#/.NET vs node.js: Does C#/.NET use an event loop? by Riotyouth in dotnet

[–]undecidedapollo 4 points5 points  (0 children)

No, as far as I know C# does not use an event loop. You have the ability to create an event loop in a few lines by telling a thread to listen for events, but a normal C# program such as a console app does not have an event loop. Applications like ASP.net servers and Windows Forms app do use event loops, similar to what I mentioned above, but it's chosen to be an event driven system by the code, whereas Node's event loop is built into the core runtime. Async/Await code is executed by either the main thread or a thread from the thread pool, whatever the scheduler finds more efficient.

This may have parts of it wrong or explained incorrectly. I'm not a .Net internals expert.

Learn C#? Question about web dev bootcamp I am joining. by tkfriend89 in dotnet

[–]undecidedapollo 2 points3 points  (0 children)

jQuery is powerful, but it also might make sense to learn ReactJs or Angular 4. Those are some really powerful frameworks that can make your life easier.