5 ms·
While this is indeed interesting, I feel I should point out Haskell is one of the worst languages out there for writing a SAT silver which performs remotely wel
by CJefferson 10y ago
While this is indeed interesting, I feel I should point out Haskell is one of the worst languages out there for writing a SAT silver which performs remotely well, as all modern algorithms work fundamentally on in-place modification of data structures, so you just have to put your whole program in the IO monad.
- nightski 10y agoWhy would that make it the worst? The IO monad isn't some dirty thing. Imperative programming in Haskell can be a wonderful experience even compared to traditional imperative languages. I use the "imperative" term lightly here.
- dllthomas 10y ago> so you just have to put your whole program in the IO monad You have to put the bits that actually modify things in IO or ST. While it's better Haskell style to keep as much as pure as you can, when you do need to modify things Haskell still works just fine.
- platz 10y agoThere is no edict that says haskell programs cannot live in IO. Also, it is especially rich for some folks to use 'no true scottsman' without even being a scottsman.
- dllthomas 10y agoThis medium sometimes leaves tone ambiguous... I understand you to be agreeing with me?
- platz 10y agoyes, but also just expanding a bit as well.
- bbcbasic 10y agoNo need for IO guilt! Living in IO saves you from learning transformer stacks early too. Admittedly I find the monad transformer and free monads etc a bit confusing.
- CJefferson 10y agoI'm not a Haskell expert, but I am a sat expert, and worked with good Haskell programmers. We managed to get decent performance, but what we ended up with looked a lot like a C program translated into Haskell, so it wasn't clear we had really gained anything. Memory safety I suppose.
- dllthomas 10y ago"Like C, but with memory safety and QuickCheck" sounds like a pretty good language for a SAT solver... "Idiomatic Haskell won't produce a very fast SAT solver" is something that doesn't surprise me.
- CJefferson 10y agoIn a modern SAT solver, almost everything modifies the state, all the time. I've written sat solvers, and tried to work with good Haskell programmers to write sat solvers. It didn't turn out well.