Skip to content

Instantly share code, notes, and snippets.

@davisp
davisp / example_output.txt
Created September 19, 2023 20:15
Example Fragment Metadata Dissector Output
File size: 0
Footer:
Size: 1470
Offset: 16661
Version: 19
Schema: __1694461845295_1694461845295_e1efb1f68e164882ac088fde959dfcca
Type: 0
Non-Empty Domain:
-116.999985
-111.500004
@davisp
davisp / a.md
Last active May 20, 2023 22:40
Exercise a possible bug present on macOS Ventura on M1

Possible Bug on macOS Ventura on Apple M1 Silcone

To check your system if this bug is present simply, save the m1-ventura-write-bug.c file below to disk and compile and run it as such:

$ gcc m1-ventura-write-bug.c
$ ./a.out
@davisp
davisp / a.txt
Last active January 12, 2023 16:36
g++ foo.cc
./a.out

Brined & Roasted Turkey

Brine Recipe

  • 1 gal vegetable broth (four 32oz boxes)
  • 1 cup salt
  • 1 cup sugar
  • 1 tbsp dried sage
commit 2b06eb25433f4ef257da293ac7e8ae0f9806bdc2
Author: Paul J. Davis <[email protected]>
Date: Wed Oct 26 16:53:01 2022 -0500
Use snprintf to avoid deprecation warnings as errors
diff --git a/tiledb/sm/filter/checksum_md5_filter.cc b/tiledb/sm/filter/checksum_md5_filter.cc
index 82893bde7..5b10f17b7 100644
--- a/tiledb/sm/filter/checksum_md5_filter.cc
+++ b/tiledb/sm/filter/checksum_md5_filter.cc
/Users/davisp/github/apache/couchdb/src/config/src/config_listener_mon.erl:49: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:141: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:148: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:238: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:281: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:304: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/ets_lru/src/ets_lru.erl:319: Warning: Garbage collection of terms is possibly delayed
/Users/davisp/github/apache/couchdb/src/hyper/src/hyper_binary.erl:78: Warning: Garbage collection of terms is possibly delayed
/Use
visit1(Child, Acc) ->
{SeenAcc, Ignore1, Ignore2} = Acc,
{NewSeenAcc, _, _} = other:call(Child, SeenAcc),
{NewSeenAcc, Ignore1, Ignore2}.
visit2(Child, Acc) ->
{SeenAcc, Ignore1, Ignore2} = Acc,
{NewSeenAcc, _, _} = other:call(Child, SeenAcc),
{SeenAcc, NewSeenAcc, Ignore1, Ignore2}.
@davisp
davisp / stack_test.erl
Last active March 22, 2022 15:44
Erlang Compiler Stack Reference Regression
-module(stack_test).
-export([
run/0
]).
run() ->
run(7500, 0.0008).
--- slow_tuples.no-sink.S 2022-03-22 09:54:32.000000000 -0500
+++ slow_tuples.opt.S 2022-03-22 09:54:08.000000000 -0500
@@ -297,9 +297,9 @@
{loop_rec,{f,24},{x,0}}.
{test,is_tagged_tuple,{f,23},[{x,0},2,{atom,get_mem}]}.
{test_heap,3,1}.
- {get_tuple_element,{x,0},1,{x,0}}.
remove_message.
{put_tuple2,{x,1},{list,[{atom,mem_max},{y,0}]}}.
+ {get_tuple_element,{x,0},1,{x,0}}.
-module(slow_tuples).
-export([
run/0
]).
run() ->
run(7500, 0.0008, {1647,841737,351137}).