wow, golden content. my type of youtube channels. please keep posting octetz 🙏
@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 Жыл бұрын
Great idea regarding the overflow indicator 👍🏻
@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 Жыл бұрын
Keep at it, learning comp sci stuff with a Unix admin background will set you up well!
@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 Жыл бұрын
Really good video! Like it! Expecting more good quality ones.👍
@aamonaze11 ай бұрын
great explained
@ChimiChanga13377 ай бұрын
Hey John, the blog seems to be down.
@jefmyers502 Жыл бұрын
Your videos are great! Thank you!
@joshrosso Жыл бұрын
Thanks for watching!
@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 Жыл бұрын
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.
@sternparadis2279 ай бұрын
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 Жыл бұрын
what is your zsh/iterm theme?
@Lado936 ай бұрын
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
@gimmemoreborisbrejcha97945 ай бұрын
Bro my eyes... make this in a darker background fgs