Month: March 2019

Looping Through Bytes to Check for Bits



Checking for bits in 1 byte is easy. Checking in 2 bytes is also easy. Checking an odd number of bits in a variable number bytes isn’t so easy. The hard part is dealing with the boundary between bytes where we need to move from one to the next. Lets... Continue reading

Lua-stater a Lua State Machine



At work I use state machines extensively in one of our applications. I’ve found state machines to be very powerful when working with messaging. They are especially useful when combined with event based processing, where an event comes in, the current state can process and move to the next state... Continue reading