Skip to content

Instantly share code, notes, and snippets.

@renthraysk
renthraysk / html5entities.go
Created March 3, 2025 15:10
experimental drop replacement for html5entities.go in goldmark
package util
import "sync"
// An HTML5Entity struct represents HTML5 entitites.
type HTML5Entity struct {
Name string
CodePoints []int
Characters []byte
}
@renthraysk
renthraysk / 1brc.go
Last active March 23, 2024 15:48
Initial pass at the 1BRC
package main
import (
"bytes"
"errors"
"flag"
"io"
"log"
"os"
"sort"
@renthraysk
renthraysk / main.go2
Last active July 22, 2020 13:09
Experimenting with go2 generics and databases
package main
import (
"fmt"
"log"
"database/sql"
"github.com/go-sql-driver/mysql"
)
@renthraysk
renthraysk / main.go
Last active June 24, 2020 19:12
Cancellation
package main
import (
"context"
"errors"
"fmt"
"log"
"net"
"net/http"
"os"