mbw 2017-03-02 02:45:49
v, w :: Num a => [a]; a, b :: Num a => [[a]]
cocreature 2017-03-02 02:46:24
mbw: you can't express zipWith using do notation (well using ApplicativeDo and ZipList you probably can but that's another topic)
mbw 2017-03-02 02:47:37
The dotProd can stay. But I thought I should be able to express applying the partially applied (dotProd row) to each row of (transpose b).
mbw 2017-03-02 02:49:48
So I thought that it would somehow be possible to do row <- a in a do block, and in a nested do block have something like row' <- (transpose b); return $ dotProd row row'.
ertes 2017-03-02 02:49:59
> [ replicate n c | n <- [1..4] | c <- "abcd" ]
lambdabot 2017-03-02 02:50:03
["a","bb","ccc","dddd"]
cocreature 2017-03-02 02:50:16
mbw: sure, that should work exactly like you described
mbw 2017-03-02 02:50:27
I can't get it to parse :(
mauke 2017-03-02 02:51:44
better not tell us what the error is, otherwise we might be able to help you
mbw 2017-03-02 02:52:19
mauke: I am currently trying to phrase it in a manner suitable for discussion, sorry for the delay
cocreature 2017-03-02 02:52:19
mbw: http://lpaste.net/353125
mauke 2017-03-02 02:52:25
why not just post your code and the error message?
cocreature 2017-03-02 02:52:32
however, I don't think replacing map by do notation is useful
cocreature 2017-03-02 02:52:59
eh you probably need a return around the last do block
mauke 2017-03-02 02:53:07
yeah, I was about to say
cocreature 2017-03-02 02:53:16
that's what I get for not adding types
russellw 2017-03-02 02:53:48
Okay so I'm using Stack because Google search results seemed to say it was better. It's been updating package index for about ten minutes now, which I wasn't expecting. Is it supposed to be doing that?
mauke 2017-03-02 02:53:48
don't need types if you're a text rewriting system :-)
mbw 2017-03-02 02:55:08
Ah, the return $ do ... part does it.
cocreature 2017-03-02 02:55:39
the return is not necessary for it to parse. it's "just" necessary for it to do the right thing :)
mbw 2017-03-02 02:58:06
Now that I think of it, that wasn't really that hard.
mbw 2017-03-02 02:59:51
And regarding replacing map: That's not what I want to do, I just want to be able to do some transformation, playing around with it.
mbw 2017-03-02 03:00:14
Anyway, thanks for your help!
iainhallam 2017-03-02 03:38:31
Is anyone available to help me build Haskell from source on CentOS 7?
iainhallam 2017-03-02 03:39:03
The README in the platform source distribution appears to contradict itself several times and I haven't been able to get platform.sh to run.
johnw 2017-03-02 03:39:39
iainhallam: just wondering, but would it be at all possible to run your Haskell application from Docker?
johnw 2017-03-02 03:39:46
this is what I do, rather than figure out building on CentOS 7
iainhallam 2017-03-02 03:40:04
I'm a sysadmin, and I have to install it for use across 100 teaching machines.
johnw 2017-03-02 03:40:10
ahh
merijn 2017-03-02 03:40:14
iainhallam: Why are you trying to build from source?
merijn 2017-03-02 03:40:23
iainhallam: Why not just install the binary dist?
johnw 2017-03-02 03:40:24
are you going to prepare an .rpm?
iainhallam 2017-03-02 03:41:05
Because the installer doesn't want to put it anywhere other than /usr/local.
iainhallam 2017-03-02 03:42:04
Eventually going to package to RPM, yes.
iainhallam 2017-03-02 03:42:04
My target is /opt/haskell/8
merijn 2017-03-02 03:43:25
iainhallam: Wut?
ertes 2017-03-02 03:43:32
there are at least 20 CentOS machines in the world that have a /nix directory, because a certain ertes didn't want to bother figuring out haskell deployment on CentOS =)
merijn 2017-03-02 03:43:57
I'm using GHC on Scientific Linux, which I'm pretty sure is retarded old CentOS and it Just Works
c_wraith 2017-03-02 03:43:59
ertes: do you know where that ertes is?
iainhallam 2017-03-02 03:44:26
@merijn: Why "wut?"?
lambdabot 2017-03-02 03:44:27
Unknown command, try @list
merijn 2017-03-02 03:44:39
Download bindist, run "./configure --prefix=~/opt/", "make install" and it just works
merijn 2017-03-02 03:45:03
Replace --prefix with whatever you want
ertes 2017-03-02 03:45:04
c_wraith: err…
iainhallam 2017-03-02 03:45:05
Of the whole platform?