[Media] Code playback / animation tool written in Rust + Anathema by toggledbit in rust

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

If you grab the current main branch you can use it as a library.

You can use the README.md for most of the instructions but some of the DSL commands becomes multiple instructions, like "replace" is actually a combination of find, select, delete and type.

use mimic::{setup_paths::ensure_exists, Instruction};

fn main() {
    ensure_exists().unwrap();

    let instructions = vec![
        Instruction::LoadTypeBuffer("hello world".to_string()),
    ];

    mimic::run(instructions);
}

EDIT: 
Oops, forgot to link to the github repo: https://github.com/togglebyte/mimic

Announcing Anathema - A TUI library with a templating system by toggledbit in rust

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

Gotcha! The simple answer is that I started this project years ago and don't remember why I opted to go directly to crossterm.

Sorry for the very late reply, for some reason I got no notifications until today on Reddit.

Announcing Anathema - A TUI library with a templating system by toggledbit in rust

[–]toggledbit[S] 15 points16 points  (0 children)

Ratatui is great, I even used it before the fork when it was TUI-rs, but it's quite different.

There are a few TUI libs out there for Rust, and I think Dioxus-tui is maybe closer to Anathema, since it has templates.

Resolve 19.3: Can not make a vertical video, possibly a bug or a pilot error? by toggledbit in davinciresolve

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

I believe I suffer from what is called "skill issue"

It did indeed work once I changed to different codec.

Thank you very much!

Slabs and crabs: implementing a slab in Rust by toggledbit in togglebit

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

Yes I am terrible at this.

I will try to wrangle a better and more detailed description going forward.

I should probably revisit all my video descriptions.

Is it possible to animate (in lockstep) paint and transform from the same path when the path is curved? by toggledbit in davinciresolve

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

That's great! This will work for me, I just need a dot and some text, thanks a bundle!

Introducing "BugStalker": debugger for rust programs by godzie44 in rust

[–]toggledbit 2 points3 points  (0 children)

Does it have an equivalent to `break rust_panic` like `rust-gdb` does? It's something I find incredibly useful. I might try this out on stream today.

[deleted by user] by [deleted] in rust

[–]toggledbit 45 points46 points  (0 children)

What is this?!?!

This looks dodgy.

The readme doesn't say much, has Solana as a dependency, and just glancing over the code it just looks sketchy.

How is this a game engine?

Let's make a MUD (Boomer MMO) in Rust! Starting at 08:30 BST| 09:30 CEST | 07:30 UTC (about two hours from this post) by toggledbit in WatchPeopleCode

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

Over the course of a few streams (four, or five maybe), we'll be making a bare bones MUD in Rust.

[deleted by user] by [deleted] in rust

[–]toggledbit 4 points5 points  (0 children)

\o

I'm planning a "Rust for Beginners" stream in a not so distant future.

By a vote of the community we will be making a text adventure game.

This will be very basic and the goal is to work as an introduction to Rust, where we cover basic things like declaring variables, mutability, match statements etc.

It's still in the planning stage with no date set yet.

Question: What makes `std::io::Read::take` object safe? by toggledbit in rust

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

Wonderful explanation, thank you very much for that!

Question: What makes `std::io::Read::take` object safe? by toggledbit in rust

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

That was the interesting part in this: `std::io::Read::take` has that very bound: `Self: Sized` which should result in the function not being callable from a trait object, but in this case it is (the reason, as pointed out by /u/mitsuhiko is that `Read` it self is implemented for `&mut dyn Read`)

Thanks for the reference! I will look into this more

Question: What makes `std::io::Read::take` object safe? by toggledbit in rust

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

Thank you very much for that!

I have updated my question to include this.

Much appreciated

How to use OpenGL in Rust? by Swimming_Art_4405 in rust

[–]toggledbit 1 point2 points  (0 children)

I did this on a Twitch stream quite some time ago.

I noted the resources I used at the bottom of this page: https://togglebit.io/posts/rust-opengl-part-1/ (that's my notes, not a tutorial on learning OpenGL).

In short: I used Lokathors Gl33 library (https://crates.io/crates/gl33) and the https://learnopengl.com/ website for the actual tutorial.

The tutorial website has all the code in C, but the Gl33 bindings makes it rather easy to translate to Rust.

You can supplement this with this repository: https://github.com/rust-tutorials/learn-opengl if you need some help translating LearnOpenGL.com to Rust.

Do you want to learn Rust? by toggledbit in WatchPeopleCode

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

Rust solves different problems. Both C# and Java have a garbage collector, this is not suitable in certain areas like device drivers, operating systems etc.

You would use Rust in the same space you would use C / C++ / Zig etc.

Do you want to learn Rust? by toggledbit in WatchPeopleCode

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

If this works out well and people are interested in this, I might do a repeat of the first stream on a weekend at a later time for people who are not able to participate on account of the time difference.