kadoban 2017-01-31 06:45:28
(all of the result that is)
qmm 2017-01-31 06:48:37
MarcelineVQ: oop, didn't mean to put in there like that.
qmm 2017-01-31 06:48:59
funnily using sum instead of folr (+) 0 hasn't caused a stack overflow :)
kadoban 2017-01-31 06:49:24
That's because of foldr instead of foldl', which would be more appropriate
kadoban 2017-01-31 06:49:40
(I believe anyway)
MarcelineVQ 2017-01-31 06:51:22
foldl' forces the evaluation of + each step so it'll just keep adding forever instead of using up all the stack space making an expression of nested (+)'s
MarcelineVQ 2017-01-31 06:51:36
you still run into a problem of not getting anywhere though
qmm 2017-01-31 06:51:51
that was supposed to be [1 .. total]
kadoban 2017-01-31 06:51:53
You do get somewhere, just not to infinity ;)
MarcelineVQ 2017-01-31 06:51:56
:>
qmm 2017-01-31 06:52:00
use of sum worked just fine
qmm 2017-01-31 06:52:23
thanks for instrucing me to look into fold further
qmm 2017-01-31 06:52:34
i keep meaning to really dive into computing with fold
monochrom 2017-01-31 06:53:52
It is not clear how sum does it. You will have to deep dig into the source code.
Boomerang 2017-01-31 06:55:32
@src sum
lambdabot 2017-01-31 06:55:32
sum = foldl (+) 0
kadoban 2017-01-31 06:56:08
@src isn't really to be relied upon for anything where the exact implementation matters
Boomerang 2017-01-31 06:56:22
Ah fair enough!
qmm 2017-01-31 06:57:31
i thought there was a paper on the universality of fold
kadoban 2017-01-31 06:57:42
(it just pulls from a manually-created text file is why, so it's both missing a lot and full of small lies)
qmm 2017-01-31 06:57:56
oh, there is this paper http://www.cs.nott.ac.uk/~pszgmh/fold.pdf
qmm 2017-01-31 06:58:14
i need to read through that
kadoban 2017-01-31 06:58:21
Yep, that's a quite interesting one.
dunx 2017-01-31 07:00:34
;
HKei 2017-01-31 07:34:03
Hey, so I've been trying hint and I'm having some weird 'issues' (maybe just my brain being stupid)
HKei 2017-01-31 07:34:39
First of all, `interpret somethingsomething (as :: a)` compiles for me even if a isn't an instance of Typeable
HKei 2017-01-31 07:34:42
which is weird
HKei 2017-01-31 07:37:09
and then if I try to load a module that uses a non-interpreted module from my package, it can import that module but it apparently doesn't see its symbols (I get 'type constructor or class not in scope' kind of errors)
Naughtmare[m] 2017-01-31 07:41:12
Everything is automatically an instance of Typeable iirc
HKei 2017-01-31 07:42:55
Ok well, that solves that mystery then