Search Haskell Channel Logs

Wednesday, February 22, 2017

#haskell channel featuring mniip, lambdabot, tsahyt, liste, zipper, grantwu,

mniip 2017-02-21 21:54:33
definitely not the result
mniip 2017-02-21 21:54:51
as it is usually bound to be worse than the already implemented stuff
zipper 2017-02-21 21:58:57
mniip: :) you're an encouraging person.
zipper 2017-02-21 21:59:12
mniip: Ever thought of being a life coach? :P
grantwu 2017-02-21 22:07:06
Good morning
grantwu 2017-02-21 22:08:14
I'm not sure what sort of unholy thing I have done, but I get this when I try to run stack setup: http://lpaste.net/8694464595516981248
grantwu 2017-02-21 22:08:33
stack exec -- ghci fails with : can't load .so/.DLL for: libgmp.so (libgmp.so: cannot open shared object file: No such file or directory)
phadej 2017-02-21 22:10:45
grantwu: on what platform you are? Ubuntu?
phadej 2017-02-21 22:12:32
grantwu: how you installed stack, using manual download?
phadej 2017-02-21 22:12:56
have you installed the deps, as in https://docs.haskellstack.org/en/stable/install_and_upgrade/#manual-download_2 ?
grantwu 2017-02-21 22:13:08
I am on Ubuntu 16.10. I *believe* I installed it through NixOS
grantwu 2017-02-21 22:13:25
Either that, or through the installer...
grantwu 2017-02-21 22:14:14
Yeah, I installed it through nix
tsahyt 2017-02-21 22:27:15
Hafydd: I just wanted to make sure that permutations don't make a difference in terms of what elements are contained in the result, regardless of order
tsahyt 2017-02-21 22:27:33
or put differently, that the length of the result is invariant under permutations of the input
zipper 2017-02-21 22:32:29
:t nub
lambdabot 2017-02-21 22:32:32
Eq a => [a] -> [a]
tsahyt 2017-02-21 22:39:14
is there a way to write an IO action that exhibits one behavior on the first call and another on all subsequent calls?
tsahyt 2017-02-21 22:39:38
my current solution has an IORef Bool to check whether it's the first call, which gets initialized somewhere else
liste 2017-02-21 22:42:21
tsahyt: makeCounter :: IO (IO Int)
tsahyt 2017-02-21 22:43:30
I'm not sure I understand
tsahyt 2017-02-21 22:44:16
what would an implementation look like?
liste 2017-02-21 22:45:01
1 sec