{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreibizws757spkuydefquwuudmyfcjhydl7bv2aejs3r2mr4gak2piu",
"uri": "at://did:plc:pi6woz4d47bkuws673w2il2r/app.bsky.feed.post/3mgjj44foxyc2"
},
"path": "/t/sneak-peek-bolt-math/13766#post_9",
"publishedAt": "2026-03-07T16:59:04.000Z",
"site": "https://discourse.haskell.org",
"tags": [
"numhask"
],
"textContent": "brandonchinn178:\n\n> Exciting! I’ve also been bothered by this. It would be nice to see how this interacts with these conversations\n\nI mean, considering my ExpressibleBy and ConvertibleTo classes, I am definitely in support of the first inasmuch as I think that it could be even better (Where’s my fromNatural? and my fromWhole, assuming we distinguish Natural and Whole numbers? I would like to support more literal types too, and would eg give booleans, `0` and `1` specific support) , and I think am fairly orthogonal to the second (but I think support it).\n\nwaivio:\n\n> I like the cut of your jib.\n>\n> […]\n>\n> I’ve been admiring your efforts on Memory abstractions, `posit` currently depends on `data-dword`, if your efforts result in an arbitrary precision 2’s Complement Integer, I would happily be an early adopter.\n\nAhoy, matey!\n\nAnd yes, that is on the table somewhere, if I can fuse my improved bits to the new num stack (which they are designed to do so).\n\nmichaelpj:\n\n> We use numhask at work, which handles the vector space stuff pretty nicely with its `*Action` classes. I think it does pretty much everything you outline in the post?\n\nI am having a bit of a complex reaction to discovering this package. This is a little bit like landing my homemade rocket on the moon and getting out to see someone waving at me from their own rocket. It is a pity that Numhask managed to elude my notice until now, because it looks good enough that I almost might not have bothered writing my own! But only maybe…\n\nOn one hand, it is a math library, so of course it does the same things - if it did something different, I’d be very concerned! On the other hand, there is a fascinating amount of convergent evolution and it validates several of the design choices that I made, including some things I left out because I was still mulling them over.\n\nI will have to spend some time dissecting numhask for my own benefit but I think I prefer my own foundation lain on heterogenous math, and its totally a personal opinion but I still consider defining symbol operators as part of typeclasses to be a crime against interoperability.\n\nI think, let competition breed quality. Also, the upcoming geometric algebra portion _will_ include things that numhask lacks - like wedge products and multivectors, transdimensional operations where heterogenous support is not just suggested, but required.\n\nPlus, there are two types of libraries - those we write for ourselves to achieve our own goals that we allow others to use, and those we write specifically for use by other people. My library falls more firmly into the latter; I want this to be approachable and friendly to learners, with a specific goal of game development - hence a large focus on starting with soft / colloquial terminology and increasing in specificity.\n\nWhile numhask is easily parseable by someone comfortable with advanced math such as us, it isn’t quite so approachable for lesser mortals. Gotta make it easy to climb the ivory tower, y’know?\n\ndschrempf:\n\n> May I suggest renaming the `divides` class function? “a divides b” means that a divides b without a reminder. Maybe `divide` or `divideBy`?\n\nNice catch! I suspect I automatically pluralized it because everything else ended in -s >_<\n\nI actually need to ponder this seriously (I am not kidding about being particular about terminology to be approachable). How do you feel about `divided` (as another possibility)? Then `divides = flip divided`, the `-By` can be implicit which reserves explicit `dividedBy` to match the Haskell colloquialism used in eg `sortBy` etc.",
"title": "Sneak Peek: Bolt Math"
}