Hello, WordPress

I’m currently in the process of setting up a more streamlined bloggin pipeline from my trusty emacs config. Hopefully this will enable me to share snippets and thoughts for my own sick pleasure.

Currently i’m working in spacemacs and org mode, i will check if some features are working

for x in range(0,10):
    print(x)

OMG yes it can print code with syntax, this is the best shit 🙂

#[system(for_each)]
fn pathfinding_human(
    _human: &Human,
    transform: &mut Transform,
    pathfinding: &mut PathfindingAgent,
    #[resource] _view_rect: &CamViewRect,
) {
    if pathfinding.path.is_empty() {
        let result = astar(
            &crate::util::Vec2::to_ivec2(transform.position),
            |&pos| linear_successors_ivec2(pos),
            |&pos| pos.distance_to(pathfinding.target),
            |&pos| pos == pathfinding.target,
        )
        .unwrap();
        println!("PATH IS: {:?}", result);
        pathfinding.path = result.0;
    }

    let cur_position = transform.position;

    let dir: crate::util::Vec2 = IVec2::to_vec2(pathfinding.path[0]) - cur_position;
    println!("Direction :{:?} \n Mag:{:?}\n Norm:{:?}", dir, dir.mag(), dir.norm());
    if dir.mag() > pathfinding.speed {
        // if transform.position.to_ivec2().distance_to(*pathfinding.path.first().unwrap()) == 0 {
        transform.position += dir.norm() * pathfinding.speed;
    } else {
        println!("Popping point on path: {:?}", pathfinding.path);
        transform.position = pathfinding.path[0].into();
        pathfinding.path.remove(0);
    }
}

Hell yea, thats some saxy saxy shit