Came up in hardfinhq/go-date#13
Consider
package main
import (
"fmt"
"os"
Came up in hardfinhq/go-date#13
Consider
package main
import (
"fmt"
"os"
/1930s.html | |
/1960s.html | |
/1970s.html | |
/1980s.html | |
/1990s.html | |
/2000s.html | |
/2010s.html |
import graphql.language | |
import networkx as nx | |
import tabulate | |
def _find_field_fragment_dependencies( | |
field_node: graphql.language.ast.FieldNode, | |
) -> list[str]: | |
if field_node.selection_set is None: | |
return [] |
The TL;DR here is that if the standard encoding/json
machinery in
Go sees a null
in a JSON field or a nil
pointer in a Go field (of type
*T
), then it will not invoke the UnmarshalJSON()
/ MarshalJSON()
on
your type.
$ go run ./main.go
t1 = main.T{Shift:(*main.Point)(nil)} (nil stays nil, UnmarshalJSON() not invoked)
# Copyright (c) 2023 - Present. Hardfin, Inc. All rights reserved. | |
# Hardfin Confidential - Restricted | |
import csv | |
import io | |
import pathlib | |
import subprocess | |
import tempfile | |
It turns out a lot (2**52
). Anything where the 12 exponent bits
are all 1, independent of the values of the other 52 bits).
$ python main.py
binary(1.0) = 0011111111110000000000000000000000000000000000000000000000000000
binary(2.0) = 0100000000000000000000000000000000000000000000000000000000000000
binary(-1.0) = 1011111111110000000000000000000000000000000000000000000000000000
package main | |
import ( | |
"fmt" | |
"os" | |
"github.com/google/uuid" | |
) | |
type mapKey struct { |
/__pycache__/ | |
/supervisord.log | |
/supervisord.pid |