Togglebit's Avatar

Togglebit

@togglebit.io

89
Followers
8
Following
32
Posts
05.03.2025
Joined
Posts Following

Latest posts by Togglebit @togglebit.io

I used to have friends, touch grass and even go outside. Rust has freed me from all these obligations and difficulties in life

13.11.2025 18:29 👍 0 🔁 0 💬 0 📌 0

In short these two are the same:

type T1<'a> = Box<dyn Bar<'a>>;
type T2<'a> = Box<dyn Bar<'a> + 'a>;

So by returning the type alias we are not returning Box<dyn Trait<'a>> but Box<dyn Trait<'a> + 'a>.

13.11.2025 18:25 👍 1 🔁 0 💬 0 📌 0
Lifetime elision - The Rust Reference

At an initial glance it seems like both functions should compile, after all the only difference is that we are returning an alias, right?

SPOILER AHEAD:

So why does the function returning an alias work while the other one doesn't?

The answer can be found here:

doc.rust-lang.org/reference/li...

13.11.2025 18:24 👍 1 🔁 0 💬 1 📌 0
Preview
Fickle lifetimes Fickle lifetimes. GitHub Gist: instantly share code, notes, and snippets.

Oh Rust, you be fickle sometimes!

Today during a live stream I was exploring a lifetime issue, and I came up with this:

13.11.2025 18:23 👍 2 🔁 0 💬 1 📌 0
Video thumbnail

I got fed up with animating code for videos so I wrote Mimic. It plays back code based on simple instructions.

crate: crates.io/crates/mimic
github: github.com/togglebyte/m...

21.08.2025 08:37 👍 8 🔁 1 💬 0 📌 0
0.15.1 Release Notes ⚡ The Zig Programming Language https://ziglang.org/download/0.15.1/release-notes.html

Zig 0.15.1 is out!

https://ziglang.org/download/0.15.1/release-notes.html

20.08.2025 20:23 👍 14 🔁 3 💬 2 📌 0
Introducing Anathema: A Text User Interface library in Rust
Introducing Anathema: A Text User Interface library in Rust YouTube video by togglebit

Announcing Anathema - A TUI library with a templating system.

youtu.be/WmF1f5wWPRE
Here are some relevant links:
* Git: github.com/togglebyte/a...
* The Guide: togglebyte.github.io/anathema-gui...
* Live stream (next will be on Monday around 8 am UTC): www.twitch.tv/togglebit/

28.06.2025 15:10 👍 5 🔁 0 💬 0 📌 0
Vibe coding for the first time
Vibe coding for the first time YouTube video by togglebit

Trying vibe coding for the first time

www.youtube.com/shorts/vzJKP...

16.05.2025 09:32 👍 2 🔁 0 💬 0 📌 0
Sharing my favourite Vim trick with you!
Sharing my favourite Vim trick with you! YouTube video by togglebit

Sharing some Vim trix
www.youtube.com/shorts/JswX_...

12.05.2025 18:24 👍 2 🔁 0 💬 0 📌 0
Preview
Twitch Twitch is the world

🔴 Live: Game engine in Rust! Day 12: Integrating the generic game loop

Catch it live on twitch.tv/togglebit | youtube.com/@togglebuns-live

#rustlang #gamedev

12.05.2025 07:28 👍 13 🔁 3 💬 0 📌 0
Preview
togglebit - Twitch Rust dev and provider of generic rantings

🔴 Live: Game engine in Rust! Day 11: Figuring out the next step

I'm working on a (very simple) game engine in Rust.
Today I am recapping where we are and what the next steps will be

Catch it live on twitch.tv/togglebit or youtube.com/@togglebuns-...

#rustlang #gamedev

09.05.2025 08:39 👍 4 🔁 1 💬 0 📌 0
Programming Rust on a phone
Programming Rust on a phone YouTube video by togglebit

Programming Rust on a mobile phone: www.youtube.com/shorts/ifBED...

08.05.2025 09:30 👍 2 🔁 0 💬 0 📌 0
Preview
togglebit - Twitch Rust dev and provider of generic rantings

Playing around with SIMD and Rust over at twitch.tv/togglebit (or youtube.com/@togglebuns-...)
#rust

07.05.2025 07:37 👍 0 🔁 0 💬 0 📌 0
Preview
togglebit - Twitch Merging PRs, nerding out about stuff

Streaming general programming over at twitch.tv/togglebit

Also live on YouTube: youtube.com/@togglebuns-...

Come and nerd out with us

05.05.2025 10:49 👍 0 🔁 0 💬 0 📌 0

Is this some kind of Star Trek reference?

04.05.2025 09:54 👍 5 🔁 0 💬 4 📌 0
Don't use else, with if-else
Don't use else, with if-else YouTube video by togglebit

What actually happens when you use the "else" in if-else?
Have you heard that using "else" is bad?

youtube.com/shorts/zsiuv...

02.05.2025 09:25 👍 0 🔁 0 💬 0 📌 0

Doing some work on my TUI framework:

twitch.tv/togglebit | youtube.com/@togglebuns-...

02.05.2025 09:24 👍 0 🔁 0 💬 0 📌 0
Focus challenge | ToggleBit

Day 5 (last day!)
Working on: Fixing a bug with Anathema
Number of interruptions: 0
Did you manage the entire time: yes

#focuschallenge

24.04.2025 17:00 👍 4 🔁 0 💬 0 📌 0
Preview
togglebit - Twitch Rust dev and provider of generic rantings

Today in game engine dev: time step

Catch it live at twitch.tv/togglebit | youtube.com/@togglebuns-live/live

23.04.2025 11:18 👍 1 🔁 0 💬 0 📌 0
Focus challenge | ToggleBit

Day 4
Working on: Fixing my time step
Number of interruptions: 0
Did you manage the entire time: yes

#focuschallenge

23.04.2025 09:14 👍 0 🔁 0 💬 0 📌 0
Focus challenge | ToggleBit

Day 3
Working on: Running Winit in the browser
Number of interruptions 0
Did you manage the entire time: yes

#focuschallenge

22.04.2025 06:36 👍 1 🔁 0 💬 0 📌 0
Preview
togglebit - Twitch Rust dev and provider of generic rantings

Today in game engine dev: snapshots and server interpolation

Catch it live at twitch.tv/togglebit | youtube.com/@togglebuns-live/live

21.04.2025 09:41 👍 1 🔁 0 💬 0 📌 0

Day 2
Working on: Writing notes for Client / Server networking
Number of interruptions: 1
Did you manage the entire time: yes

21.04.2025 07:11 👍 0 🔁 0 💬 0 📌 0

It's when the coding aspect is less fun it becomes a problem (in this case I find it easier to let my self be distracted instead of solving the two difficult problems ahead of me)
But yes, you are right.

20.04.2025 10:54 👍 1 🔁 0 💬 1 📌 0

Seems sensible! I find it's way to easy to let a whole Sunday go down the drain from consuming too much YouTube and such.

20.04.2025 10:38 👍 1 🔁 0 💬 1 📌 0
Focus challenge | ToggleBit

Doing the focus challenge for the next five days.

Day 1
Working on: Time step for a game engine
Number of interruptions 0
Did you manage the entire time: yes

#focuschallenge

20.04.2025 07:26 👍 3 🔁 0 💬 2 📌 0
Preview
Zig Day Milano, sab 17 mag 2025, 09:30 | Meetup **Unisciti a noi per dedicare una giornata a imparare e sperimentare con Zig!** Zig è un linguaggio di programmazione con una community in crescita. Ha una sintassi snella,

Il primo Zig Day di Milano si terra' il 17 Maggio vicino a Porta Garibaldi.

L'evento consiste in una giornata intera dedicata alla programmazione collaborativa
(quindi non aspettatevi talk), come descritto qui: kristoff.it/blog/zig-day/

Invito: www.meetup.com/it-IT/coding...

19.04.2025 08:40 👍 8 🔁 4 💬 0 📌 0

I realise this is now showing an anime girl in my feed. I'll be single soon enough

18.04.2025 13:15 👍 0 🔁 0 💬 0 📌 0
Preview
Anime girl on Gnome GitLab Recently I’ve been seeing injected into various Gnome GitLab pages the image of an anime girl and something about Anubis. Pretty wild. Is this some sort of ongoing attack on the site? I also obs...

Imagine if you girlfriend left you because a website you looked at had an "anime girl": discourse.gnome.org/t/anime-girl...

18.04.2025 10:16 👍 0 🔁 0 💬 1 📌 0
Preview
togglebit - Twitch 🔴 Live: Game engine in Rust! Day 7: Tweaking the project structure

Today in game engine dev: testing the project structure to see if it makes sense. #rust #gamedev

Catch it live over at twitch.tv/togglebit | youtube.com/@togglebuns-...

18.04.2025 06:52 👍 8 🔁 2 💬 0 📌 0