#haskell - Mon 19 Feb 2007 between 01:31 and 01:40

NY Lost Funds



orbitzCouldn't match expected type `Int' against inferred type `a -> b'
donswork out the type of each of your variables.
a -> b usually means missing arguments
sorearbah.
orbitzdons: size is an Int
sorearif you delete a directory while in another vt you are in the directory ...
orbitzand size2 is the reuslt of size `div` 2
allbery_b(sqrt . fromIntegral) ?
goltrpoat> (sqrt . fromIntegral) (3^2 + 4^2 :: Int)
lambdabot5.0
soreardons: why do you distinguish compile steps from run steps?
goltrpoat> sqrt $ fromIntegral (3^2 + 4^2 :: Int)
lambdabot5.0
nornagon> sqrt . fromIntegral (3^2+4^2 :: Int)
lambdabotadd an instance declaration for (Num (a -> b))
nornagonneeds more brackets.
soreardons: nm, doh, separate timing
dons: who gave you bin/timeout.hs? every line ends with ^M!
:)
orbitzi don't get it, form iIntegral work sin aht example but when i do
h = (sqrt . fromIntegral) (size^2 - size2^2 :: Int)
donsoh, its from ghc/testsuite/timeout
orbitzi get No instance for (Floating Int)
what am i doign wrong?
donsyou're using an Int where a Double is expected
fromIntegral is required to convert the Int to its Double representation
orbitzbut didn't goltrpoat just od the same thing?
donsthat fragment doesn't necessarily have the same type constraints as your code
goltrpoatit's not the same thing.. (f . g) x = f (g x), while f . g x = f . (g x)
orbitzgoltrpoat: i have paren in my paste dont' i?
goltrpoatoh, sorry.. stepped away, didn't see the second paste
orbitzhrm, size shoudl be a Int, so should size2
hpasteorbitz pasted "(no title)" at http://hpaste.org/553
soreardons: your timing method is fishy. Why don't you use wait4(2)? (eqv. time(1))
orbitzhttp://hpaste.org/553 i must be doign something very silly wrong
donsyeah, its a quick hack.
soreardons: my nobench results are suspect, I thought I could safely run it in the background.
goltrpoatorbitz: i'm guessing y + h is the problem, not the definition of h
assuming polygon takes [Int]
kc5tja(++) = foldr (\a b -> (a:) . b) id ---- "This actually makes sense intuitively." Uhh... No -- it doesn't.

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 

IrcArchive

NY Lost Funds