Go Language vs C/C++
I have spent several days on Go. It is a little more similar to C, not C++. As it has no class concept, only structure. Also it has pointer (…
I have spent several days on Go. It is a little more similar to C, not C++. As it has no class concept, only structure. Also it has pointer (…
Abstract Syntax Notation One (ASN.1) is mainly for binary protocol, it is a standard and notation that describes rules and structures for representing, encoding, transmitting, and decoding data intelecommunications and…
Recently I spent some time to write a DSL ( domain specific Language) lexer and parser. Without double flex, bison (C++) will be used. Bison ( version 3.0.2/3.04) generally support…
C++ default , copy, move, assignment constructors Sometimes it is confusing where/when the default , copy, move, assignment constructors in C++ are invoked, here some are notes: e.g.: class A…
The same thing happened to bison/yacc, I googled around, and was a little surprised that I could not find a bison/yacc cheat sheet. So I made a very rudimentary one here. Bison-Yacc_cheat_sheet…
I googled around, and was a little surprised that I could not find a flex/flex cheat sheet. So I made a very rudimentary one here. flex_cheat_sheet Please comment on how to improve…
GDB cheatsheat There is a good gdb cheatsheet at http://darkdust.net/files/GDB%20Cheat%20Sheet.pdf The output format for print, x is missing there, somehow I think it is useful to add the output formats: x,d,u,o,t,a,f,s,z,r…
The std::unique_lock class is a lot more flexible when dealing with mutex locks. It has the same interface as std::lock_guard but provides additional methods for explicitly locking and unlocking mutexes…
Quota from a good article from http://www.cprogramming.com/c++11/c++11-lambda-closures.html It turns out that the way lambdas are implemented is by creating a small class; this class overloads the operator(), so that it…
Found a good one to explain: How @staticmethod and @classmethod are different. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 class Kls(object): no_inst…