Ring Buffer

  Рет қаралды 12,063

octetz

octetz

Күн бұрын

Пікірлер: 17
@ThePandaGuitar
@ThePandaGuitar 28 күн бұрын
wow, golden content. my type of youtube channels. please keep posting octetz 🙏
@mbeware
@mbeware Жыл бұрын
great demonstration of a simple implementation of circular buffer. those structure are really useful with Arduino and other microcontroller. I usually reserve a node as an indicator for "overflow/datalost" that might be important to log (or turn on a warning light). I just recreate the node after sending/emptying the buffer and start at 0 instead of -1.
@joshrosso
@joshrosso Жыл бұрын
Great idea regarding the overflow indicator 👍🏻
@MitchelTighe-sj5fm
@MitchelTighe-sj5fm Жыл бұрын
Hey Josh, I'm a young Unix admin with an extremely weak background in computer science so most of your videos go over my head, but I really appreciate the depth you provide in your videos. Just wanted to say thanks your work is appreciated.
@joshrosso
@joshrosso Жыл бұрын
Keep at it, learning comp sci stuff with a Unix admin background will set you up well!
@cococholate
@cococholate Жыл бұрын
Thank You a lot! You did great job explaining! Its a bit overkill for me still, but you explain it very well! I probably will watch video 10 times until I get everything :)
@tuhu5990
@tuhu5990 Жыл бұрын
Really good video! Like it! Expecting more good quality ones.👍
@aamonaze
@aamonaze 11 ай бұрын
great explained
@ChimiChanga1337
@ChimiChanga1337 7 ай бұрын
Hey John, the blog seems to be down.
@jefmyers502
@jefmyers502 Жыл бұрын
Your videos are great! Thank you!
@joshrosso
@joshrosso Жыл бұрын
Thanks for watching!
@evanxg852000
@evanxg852000 Жыл бұрын
Great tutorial, I got here from the blog post.Please can I know the software you are using to draw over the code editor. I have an xpen device but endup switching on different screens. Also some implementation block the insert/read when its full/empty. My guess is that data loss is ok for your use case.
@joshrosso
@joshrosso Жыл бұрын
Exactly! My goal/design trade-off here is to intentionally allow for overflow, prioritizing newest data. The drawing you're seeing is a screen annotating tool, Presentify.
@sternparadis227
@sternparadis227 9 ай бұрын
There are several flaws in this implementation of the algorithm which are 'solved' by you using nil values. The first problem is in the Insert method. The first value inserted increases _lastInsert_ index by 1. At this point _nextRead_ is 0 and thus equal to _lastInsert_ which is now also 0. This executes the code that increases the _nextRead_ index by 1. The second problem lies in the Emit method. When in the loop the last character is read, the loop breaks but the _nextRead_ index is not increased. So the _nextRead_ is still pointing to the previous position. As said both problems are obfuscated by the fact you use nil values.
@guavavodka
@guavavodka Жыл бұрын
what is your zsh/iterm theme?
@Lado93
@Lado93 6 ай бұрын
insert method is wrong i think..the if lastInsert == nextRead will be true after first insert. If the nextRead is 0 on init then after insert first insert lastInsert is 0 then the statement is true and you will move the nextRead to 1 and so one and so one. Solution would be to check if the last value of ring buffer N-1 is null or not if is null that mean you yet didn't fill the whole ring buffer else if there is value already then it make sense for the nextRead to move
@gimmemoreborisbrejcha9794
@gimmemoreborisbrejcha9794 5 ай бұрын
Bro my eyes... make this in a darker background fgs
eapbg #29 Ring Buffer
20:55
eapbg
Рет қаралды 21 М.
Interrupt Safe Ring Buffer :: Bare Metal Programming Series 6
59:49
Low Byte Productions
Рет қаралды 10 М.
I Sent a Subscriber to Disneyland
0:27
MrBeast
Рет қаралды 104 МЛН
Function Iterators might just change the way we write loops in Go
11:35
Rust Data Modelling Without Classes
11:25
No Boilerplate
Рет қаралды 186 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 197 М.
Writing a Rust-based ring buffer
40:01
timClicks
Рет қаралды 6 М.
Shaping Linux Traffic with tc
46:19
octetz
Рет қаралды 25 М.
Emulating a CPU in C++ (6502)
52:28
Dave Poo
Рет қаралды 1 МЛН
Pipes: Named and Unnamed (Unix)
15:26
octetz
Рет қаралды 2,2 М.
Time-based KV Store in Go (Interview Question)
31:38
octetz
Рет қаралды 982
Object-Oriented Programming is Bad
44:35
Brian Will
Рет қаралды 2,3 МЛН