Skip to content

Instantly share code, notes, and snippets.

#![feature(conservative_impl_trait)]
use std::marker::PhantomData;
use std::collections::HashMap;
fn main() {
let sum_arr =
@DavidEichmann
DavidEichmann / Main.hs
Created December 18, 2017 12:05
DailyProgrammer 342 in Hasksell
{-# OPTIONS_GHC -funbox-strict-fields #-}
module Main where
import Data.Maybe (catMaybes)
import Data.List (splitAt)
import qualified Data.Bits as B
import qualified Data.IntSet as S
import System.Environment (getArgs)
@DavidEichmann
DavidEichmann / Main.hs
Created January 21, 2018 18:41
LiquidHaskell Company and Groups
module Main where
import Data.Set (Set)
import qualified Data.Set as S
main :: IO ()
main
= print
. removePerson (Person 1)
. addPerson (Person 1)
_build/T-15837_perf/stage1/lib/bin/ghc-iserv-dyn: file format elf64-x86-64
Contents of the .eh_frame section:
00000000 0000000000000014 00000000 CIE
Version: 1
Augmentation: "zR"
Code alignment factor: 1
@DavidEichmann
DavidEichmann / gist:45dd2f26f85cf0ef7cd003581ebf82af
Last active June 5, 2019 16:16
clean vs incremental build diff /stage0/compiler/build/RegAlloc/Linear/FreeRegs.hi
--- /home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_clean/stage0/compiler/build/RegAlloc/Linear/FreeRegs.hi
+++ /home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_incremental/stage0/compiler/build/RegAlloc/Linear/FreeRegs.hi
@@ -5,7 +5,7 @@
Way: Wanted [],
got []
interface RegAlloc.Linear.FreeRegs 8061
- interface hash: 44bcaf4a3b059b4973052b1bb40cfabe
+ interface hash: d07c1bca2cdccecfeb85e16d7a2ed7b2
ABI hash: cd601d548e70a39688a3a77e2ce482ac
export-list hash: 5447bdeacdb0192ac15216eb469001ca
--- /home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_clean/stage0/bin/ghc
+++ /home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_incremental/stage0/bin/ghc
@@ -1,6 +1,6 @@
-/home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_clean/stage0/bin/ghc: file format elf64-x86-64
-/home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_clean/stage0/bin/ghc
+/home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_incremental/stage0/bin/ghc: file format elf64-x86-64
+/home/david/Well-Typed/GHC/_nosync_git/.build2/quickest_bfccd83278_incremental/stage0/bin/ghc
architecture: i386:x86-64, flags 0x00000112:
EXEC_P, HAS_SYMS, D_PAGED
This file has been truncated, but you can view the full file.
$ readelf -Ws /nix/store/9ky22s9kp64ilnwf8xqam20xsixiyp6g-aeson-1.3.1.1/lib/ghc-8.4.3/x86_64-linux-ghc-8.4.3/libHSaeson-1.3.1.1-LEouCdGBCUhBv1GPewgsPO-ghc8.4.3.so
Symbol table '.dynsym' contains 9802 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND timezm1zi8zi0zi2_DataziTimeziCalendarziOrdinalDate_zdwfromOrdinalDateValid_closure
2: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND bytestringzm0zi10zi8zi2_DataziByteStringziLazzyziInternal_unpackChars_info
3: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND integerzmgmp_GHCziIntegerziType_ltIntegerzh_info
4: 0000000000000000 0 OBJECT GLOBAL DEFAULT UND unorderedzmcontainerszm0zi2zi9zi0zm5IJJnkQI2ZZvDdhI29XIpGM_DataziHashMapziBase_zdfDataHashMap_info

Keybase proof

I hereby claim:

  • I am davideichmann on github.
  • I am davideichmann (https://keybase.io/davideichmann) on keybase.
  • I have a public key ASAd_rjzoi0guA0gL_TA2ZJs1g-eIUesVXmhTz8W28QEiQo

To claim this, I am signing this object:

import typing
from typing import List, Optional, Tuple, TypeVar, Callable, NamedTuple, Set, Dict, Iterator, Any
from . import ghc_heap
from .types import *
from . import closure
from .utils import CommandWithArgs, get_num_generations
from .block import get_bdescr_val, format_bdescr, heap_start, heap_end, BlockFlags
from .mut_list import collect_mut_list
import gdb
@DavidEichmann
DavidEichmann / gist:66c6b13a971ce5c1a7ff56f5369b011b
Last active November 17, 2020 10:30
stub.cpp large commands
/* return non-zero on error */
static void handle_connection(const unsigned int sock_fd) {
Socket sock(sock_fd);
char *buf = new char[MAX_CMD_SIZE];
while (true) {
uint32_t cmdlen_n, cmdlen;
sock.read((char *)&cmdlen_n, 4);
cmdlen = ntohl(cmdlen_n);