I've used almost none of these! I've had exposure to regex-tdfa (via hledger) and I found it semi-awkward, although that could be the way it's embedded in hledger; I also adopted the mentioned algebraic-graphs which I would generally recommend although for the thing I used it for ultimately I decided I shouldn't have.
I'll throw out a recommendation for HTF (haskell testing framework) which for some reason seems very out-of-favour. It wraps HUnit and QuickCheck, but lets you write tests or properties in one-liners right next to the code they are testing, without any boilerplate. No need to build weird heirarchies of test trees; the test function names are their description. I find that reduced friction is great for encouraging me to actually write tests:
that seems very ergonomic :) seems to use a GHC plugin, is there any special setup needed apart from the pragma or do you not really notice it? Does it cause any issues with the language server?
alfred-margaret – fast search for multiple strings in big texts
dataframe – for exploring data (though I have yet to use in production)
doctest – for inline tests
QuickCheck – the OG property testing framework. I know people say hedgehog is better, but there are more docs and integrations for QC, so it feels more comfortable
What are the advantages over async? (I'm often a bit hesitant of depending on stuff that's not the most standard/popular, especially for something so bug-prone as concurrency.)
It gives you first-class thread scopes, so at any point within a scope you can spawn off new threads against that scope and they'll all get cleaned up when the scope returns. It's handy for things like spawning off a thread per network request, where individual thread lifetimes don't nest cleanly so concurrently/withAsync can't really be used.
jmtd | a day ago
I've used almost none of these! I've had exposure to
regex-tdfa(via hledger) and I found it semi-awkward, although that could be the way it's embedded in hledger; I also adopted the mentioned algebraic-graphs which I would generally recommend although for the thing I used it for ultimately I decided I shouldn't have.I'll throw out a recommendation for HTF (haskell testing framework) which for some reason seems very out-of-favour. It wraps HUnit and QuickCheck, but lets you write tests or properties in one-liners right next to the code they are testing, without any boilerplate. No need to build weird heirarchies of test trees; the test function names are their description. I find that reduced friction is great for encouraging me to actually write tests:
Sanity | a day ago
that seems very ergonomic :) seems to use a GHC plugin, is there any special setup needed apart from the pragma or do you not really notice it? Does it cause any issues with the language server?
vaibhavsagar | 13 hours ago
Quick recommendation for retry, which I've used at two different workplaces to great effect.
jackdk | 11 hours ago
Thoughts on
retryvs.stamina? I should probably add one of them to the list.Sanity | a day ago
Nice list, though for things like
semialignI'd probably just write my own function rather than add a dep.If we're recommending, here are some that I enjoy using:
refi64 | a day ago
ki is another great one in this space too, a bit more generalized than async is.
Sanity | a day ago
What are the advantages over async? (I'm often a bit hesitant of depending on stuff that's not the most standard/popular, especially for something so bug-prone as concurrency.)
robgssp | 20 hours ago
It gives you first-class thread scopes, so at any point within a scope you can spawn off new threads against that scope and they'll all get cleaned up when the scope returns. It's handy for things like spawning off a thread per network request, where individual thread lifetimes don't nest cleanly so
concurrently/withAsynccan't really be used.jkachmar | 23 hours ago
check out
flatparse! it’s an even faster & more efficient parser combinator library with emphasis on better compile times and fewer allocations.Sanity | 5 hours ago
Thanks, very interesting, I will have to give it a go :-)