Skip to content

Instantly share code, notes, and snippets.

View BillyDonahue's full-sized avatar
🎯
Focusing

Billy Donahue BillyDonahue

🎯
Focusing
  • MongoDB
  • New York
View GitHub Profile
@BillyDonahue
BillyDonahue / utf8_decoder.cpp
Last active August 28, 2019 01:22
Utf8 to uint16_t decoder
#include <cstdint>
#include <cstdio>
#include <cctype>
#include <string>
struct Utf8Decoder {
Utf8Decoder() : state(0), value(0) {}
/// \return
@BillyDonahue
BillyDonahue / nm output
Last active June 20, 2019 22:02
intelFP renames missed
$ nm --extern-only --defined-only build/dynamic_gcc/third_party/IntelRDFPMathLib20U1/libintel_decimal128.so |grep -v mongodb_local |sort -k3
00000000000ca1c0 T bid128_to_binary128_2part
00000000003de060 D bid_bid_bid_recip_scale32
00000000003de000 D bid_bid_reciprocals10_32
0000000000014c60 T bid_f128_acos
0000000000014cb0 T bid_f128_acosd
0000000000014230 T bid_f128_acosh
00000000000125e0 T bid_f128_add
0000000000014bb0 T bid_f128_asin
0000000000014c00 T bid_f128_asind
--- /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf 2017-01-17 11:01:38.000000000 -0500
+++ /usr/local/etc/avrdude.conf 2016-02-16 16:30:04.000000000 -0500
@@ -828,118 +828,100 @@
usbvendor = "www.fischl.de";
usbproduct = "USBasp";
# following variants are autodetected for id "usbasp"
# original usbasp from fischl.de
# see above "usbasp"
@BillyDonahue
BillyDonahue / vec.cc
Last active January 2, 2018 01:12
operator= by ref vs by value.
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
struct AssignByRef {
explicit AssignByRef(std::string s) : s(std::move(s)) {}
AssignByRef(const AssignByRef& src) : s(src.s) {}
AssignByRef(AssignByRef&& src) : s(std::move(src.s)) {}
AssignByRef& operator=(const AssignByRef& src) { // copy assign