Advertisement · 728 × 90

Posts by Togglebit

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

4 months ago 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>.

4 months ago 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...

4 months ago 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:

4 months ago 2 0 1 0
Video

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...

7 months ago 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

7 months ago 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/

9 months ago 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...

10 months ago 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_...

10 months ago 2 0 0 0
Advertisement
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

10 months ago 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

10 months ago 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...

10 months ago 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

10 months ago 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

10 months ago 0 0 0 0

Is this some kind of Star Trek reference?

11 months ago 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...

11 months ago 0 0 0 0
Advertisement

Doing some work on my TUI framework:

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

11 months ago 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

11 months ago 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

11 months ago 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

11 months ago 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

11 months ago 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

11 months ago 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

11 months ago 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.

11 months ago 1 0 1 0
Advertisement

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.

11 months ago 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

11 months ago 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...

11 months ago 8 4 0 0

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

11 months ago 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...

11 months ago 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-...

11 months ago 8 2 0 0