I used to have friends, touch grass and even go outside. Rust has freed me from all these obligations and difficulties in life
Posts by Togglebit
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>.
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...
Oh Rust, you be fickle sometimes!
Today during a live stream I was exploring a lifetime issue, and I came up with this:
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...
Zig 0.15.1 is out!
https://ziglang.org/download/0.15.1/release-notes.html
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/
Trying vibe coding for the first time
www.youtube.com/shorts/vzJKP...
Sharing some Vim trix
www.youtube.com/shorts/JswX_...
🔴 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
🔴 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
Programming Rust on a mobile phone: www.youtube.com/shorts/ifBED...
Playing around with SIMD and Rust over at twitch.tv/togglebit (or youtube.com/@togglebuns-...)
#rust
Streaming general programming over at twitch.tv/togglebit
Also live on YouTube: youtube.com/@togglebuns-...
Come and nerd out with us
Is this some kind of Star Trek reference?
What actually happens when you use the "else" in if-else?
Have you heard that using "else" is bad?
youtube.com/shorts/zsiuv...
Doing some work on my TUI framework:
twitch.tv/togglebit | youtube.com/@togglebuns-...
Day 5 (last day!)
Working on: Fixing a bug with Anathema
Number of interruptions: 0
Did you manage the entire time: yes
#focuschallenge
Today in game engine dev: time step
Catch it live at twitch.tv/togglebit | youtube.com/@togglebuns-live/live
Day 4
Working on: Fixing my time step
Number of interruptions: 0
Did you manage the entire time: yes
#focuschallenge
Day 3
Working on: Running Winit in the browser
Number of interruptions 0
Did you manage the entire time: yes
#focuschallenge
Today in game engine dev: snapshots and server interpolation
Catch it live at twitch.tv/togglebit | youtube.com/@togglebuns-live/live
Day 2
Working on: Writing notes for Client / Server networking
Number of interruptions: 1
Did you manage the entire time: yes
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.
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.
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
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...
I realise this is now showing an anime girl in my feed. I'll be single soon enough