Skip to content

Instantly share code, notes, and snippets.

View cheako's full-sized avatar

Michael Mestnik cheako

  • Twin Cities Minnesota, USA -- CST
View GitHub Profile
@kchristidis
kchristidis / protobuf-serialization.md
Last active March 25, 2025 17:49
Notes on protocol buffers and deterministic serialization (or lack thereof)

There doesn't seem to be a good resource online describing the issues with protocol buffers and deterministic serialization (or lack thereof). This is a collection of links on the subject.

Protocol Buffers v3.0.0. release notes:

The deterministic serialization is, however, NOT canonical across languages; it is also unstable across different builds with schema changes due to unknown fields.

Maps documentation:

Wire format ordering and map iteration ordering of map values is undefined, so you cannot rely on your map items being in a particular order.

@CodeZombie
CodeZombie / noise.c
Last active September 29, 2018 22:13
procedural noise generator in C.
#include "noise.h"
float generateNoise(float x, float y, int salt) {
x = fabs(x);//this function cannot handle negative coordinates, so fabs (floating abs) is required.
y = fabs(y);//The side effect is that everything is mirrored on the x/y axis :(
//generate x/y coords for each anchor point around the real point
int x1 = (int) floor(x);
int x2 = (int) floor(x) + 1;
int y1 = (int) floor(y);
@zml2008
zml2008 / VkComputeSample.c
Created May 30, 2016 06:10 — forked from sheredom/VkComputeSample
A simple Vulkan compute sample
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit