Skip to content

Instantly share code, notes, and snippets.

@antirez
antirez / resp3.md
Last active June 2, 2020 08:41
RESP3 protocol draft

RESP3 specification

Versions history:

  • 1.0, 2 May 2018, Initial draft to get community feedbacks.

Background

The Redis protocol has served us well in the past years, showing that, if carefully designed, a simple human readable protocol is not the bottleneck in the client server communication, and that the simplicity of the design is a major advantage in creating a healthy client libraries ecosystem.

Yet the Redis experience has shown that after about six years from its introduction (when it replaced the initial Redis protocol), the current RESP protocol could be improved, especially in order to make client implementations simpler and to support new features.

@mbinna
mbinna / effective_modern_cmake.md
Last active May 24, 2024 07:26
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@analogrelay
analogrelay / EventSourcesAndCountersOhMy.md
Last active September 13, 2021 07:58
EventSource/EventCounters patterns
@cloudwu
cloudwu / pimpl.cpp
Last active July 3, 2017 10:51
My version of pimpl
// My version of pimpl (cloudwu@gmail.com)
// See http://en.cppreference.com/w/cpp/language/pimpl
#include <iostream>
// interface (widget.h)
class widget {
struct impl;
public:
static widget* create(int); // replacement of new
@goldshtn
goldshtn / coreclr-usdt.patch
Created April 2, 2017 06:57
.NET Core (CoreCLR) patch for emitting USDT probes
diff --git a/src/scripts/genXplatLttng.py b/src/scripts/genXplatLttng.py
index bacf034..3d40d77 100644
--- a/src/scripts/genXplatLttng.py
+++ b/src/scripts/genXplatLttng.py
@@ -407,8 +407,25 @@ def generateLttngTpProvider(providerName, eventNodes, allTemplates):
for eventNode in eventNodes:
eventName = eventNode.getAttribute('symbol')
templateName = eventNode.getAttribute('template')
+
+ template = allTemplates[templateName] if templateName else None
@dr2chase
dr2chase / 18597-args-results-in-registers.md
Last active October 5, 2017 17:49
Browsable copy of golang proposal CL 35054

Proposal: Passing Go arguments and results in registers.

Author(s): David Chase

Last updated: 2017-01-10

Discussion at https://golang.org/issue/18597.

Abstract

- Inexplicable perversity of human nature.
- The clever machinations of MongoDB's marketing people.
- The AGPL license killed it.
- We spent too long development before monetizing.
- Bad performance.
- Numeric types limited to a 64-bit `float`.
- Great product, but didn't/couldn't translate to revenue.
- Bad business model.
- Failure in timezones/timestamp nuances.
@aclements
aclements / 17503-eliminate-rescan.md
Created October 18, 2016 20:04
Preview of proposal go/golang#17503

Proposal: Eliminate STW stack re-scanning

Author(s): Austin Clements, Rick Hudson

Last updated: 2016-10-18

Discussion at https://golang.org/issue/17503.

Abstract

@chenchun
chenchun / latency.markdown
Created October 22, 2015 04:49 — forked from hellerbarde/latency.markdown
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs