Elektrine lite

← Feed

@slava@mathstodon.xyz

Post #3721903

2026-07-10 17:29 UTC

@zwarich@hachyderm.io @joe@f.duriansoftware.com Also I’ll say that bitwise equality and hashing might be workable but bitwise comparison for sorting seems overly restrictive

Replies (3)

  • @joe@f.duriansoftware.com 2026-07-10 17:54

    @slava@mathstodon.xyz @zwarich@hachyderm.io it might depend on what you want generic sorting for. if you just need some arbitrary ordering for your generic ordered binary tree, then bulk bitwise might be fine

    Open ##3721902

  • @zwarich@hachyderm.io 2026-07-10 17:34

    @slava@mathstodon.xyz @joe@f.duriansoftware.com I think we just rediscovered why people liked big endian to begin with, but I imagine you have all sorts of cursed non-lexicographic monoid orderings in your pocket.

    Open ##3721958

  • @zwarich@hachyderm.io 2026-07-10 17:45

    @slava@mathstodon.xyz @joe@f.duriansoftware.com There is a parallel opinionated approach to sorting. You get rid of comparison-based sorting and give every type a discriminator to implement generic radix sort: https://www.cambridge.org/core/journals/journal-of-functional-programming/article/generic-topdown-discrimination-for-sorting-and-partitioning-in-linear-time/B85E48EFC0B4D2BDDDE9A3885094FDD7

    Open ##4248964