Evil Haskell Tips (@EvilHaskellTips) profile picture

go forth, my statically typed minions. Eval! Apply!

Joined January 2014
Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)Photo by Evil Haskell Tips (@EvilHaskellTips)
Some things are too evil even for me
finally, a language which combines the easiness of haskell and power of go type system presenting: Goskell
2
6
67
3,361
Ugh, wish I’d have thunk of this one
Haskell be like RTS: do you have a value? Thunk: I have a concept of a value.
1
6
605
Create a Brobdingnagian monstrosity of 1.2m lines of Haskell. That way, the tooling you create to make working on it tolerable will be practically instant on codebases that don’t need 18 lanes for a 3 point turn. (With love and appreciation, @mercury)
1
1
1
12
1,116
“Semigroup” and “Monoid” are exclusionary terminology. Prefer “smashy-smashy” and “smashy-smashy-with-extra-nothing”.
1
11
3
75
4,498
Tired of probabilistic correctness guarantees? instance Arbitrary UUID where … shrink uuid = case UUID.toWords uuid of (a,b,c,d) -> [UUID.fromWords a' b' c' d' | a' <- sw a, b' <- sw b, c' <- sw c, d' <- sw d] where sw w = take 10 $ iterate (`div` 2) w
1
1
1
1,249
Do as thou wilt shall be the whole of the Law, and the type system is really just a suggestion.
it's well known that satan and those who vibe with him are haskellers
6
835
Performance tip: s/sequence/mapConcurrently/g Good code can be run in any order.
2
1
10
1,250
The great thing about using Haskell with LLMs is that you can be absolutely precise about the nonsense you are ingesting and emitting.
9
796
Testing is for programmers lacking the moral fibre to prove every useful property about their code in the type system.
1
3
20
1,457
If you nevertheless insist on putting your inadequacies on display with a suite of property tests, at least be sure to prioritise efficiency over interpretability by making a single god-test that verifies everything possible about a function.
1
1
1
4
1,150
If you're writing a parser for some type t, one fun thing to omit is a way to turn it back into a string. Easy visualisation, canonicalisation and roundtrip properties are for people who insist on putting bugs in their code and there is no reason to coddle them.
6
683
If the libraries underpinning your app don't implement Generic, you may have to get creative.
2
1
12
2,227
Only Sinead truly understands me
6
584
Be judicious in your character builds: if you dump a lot of points into optics you’ll find it difficult to fit into a hessian-and-sackcloth simple-Haskell adventuring party.
Oh, you write Haskell? Kmettoverse, Snoyman-nihilist or FRP mystic?
8
Pro tip: write Haskell like it’s Ruby and Ruby like it’s Haskell and your employment will be secure until the company goes broke.
Ruby and Haskell are basically the same language, modulo trivial details that people think are important but aren't.
3
If you are having difficulty making your Haskell sufficiently evil, you could give up and go back to Perl, or you could implement @ghc2031 ‘s visionary extensions.
{-# LANGUAGE InconsolableInstances #-}
4
Step 1: use a lazy language Step 2: instead of benchmarking, assume laziness is the problem and rewrite every use of lists into vectors. Step 3: be amazed when it doesn’t help. Step 4: profit! (Step 0 was to assume you were smarter than everybody else about everything.)
They wanted to be able to adaptively work out how to get a given set of tasks done in minimum time. This is why I was assigned an optimisation task before the benchmarks were finished, over my strenuous objections. (The optimisation was not faster, you’ll be shocked to hear.)
1
12
Ivory towers require gatekeepers. Remember, avoid success, at all costs.
What's with the penchant for Haskell libraries citing academic papers as THE VERY FIRST THING in their documentation?? And like 50% of the time it links to some paywall'd ACM site. Also, the papers linked are almost always a terrible introduction to the ideas of the library.
1
6