Logs: freenode/#haskell
| 2020-10-21 11:03:58 | hackage | haskoin-core 0.17.0 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.0 (jprupp) |
| 2020-10-21 11:03:58 | <lambdabot> | error: |
| 2020-10-21 11:03:58 | <lambdabot> | • Couldn't match expected type ‘Integer’ with actual type ‘[a0]’ |
| 2020-10-21 11:03:58 | <lambdabot> | • In the first argument of ‘fromInteger’, namely ‘[0 .. ]’ |
| 2020-10-21 11:04:00 | <siraben> | Are there haskell packages that can help me write an LLVM backend? |
| 2020-10-21 11:04:20 | → | Amras joins (~Amras@unaffiliated/amras0000) |
| 2020-10-21 11:04:28 | <olligobber> | @type (\f _ _ -> f <$> (fromInteger <$> [0..]) <*> (fromInteger <$> [0..])) :: Num a => (a -> a -> c) -> [a] -> [a] -> [c] |
| 2020-10-21 11:04:29 | <lambdabot> | Num a => (a -> a -> c) -> [a] -> [a] -> [c] |
| 2020-10-21 11:05:11 | <nicknick> | Okay okay :D |
| 2020-10-21 11:05:16 | <nicknick> | You guys rock |
| 2020-10-21 11:05:26 | × | Velpoman quits (~Velpoman@159.65.76.124) (Remote host closed the connection) |
| 2020-10-21 11:05:34 | <dminuoso> | siraben: What exactly are your intentions? |
| 2020-10-21 11:06:03 | × | avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-21 11:06:19 | <nicknick> | But what is things are simple? Like what is I need a function implementation for type signature f :: Num a => a -> [a] -> a |
| 2020-10-21 11:06:31 | <nicknick> | is = if |
| 2020-10-21 11:06:34 | <nicknick> | if = is |
| 2020-10-21 11:06:36 | <siraben> | dminuoso: I'd like to create an LLVM backend for the https://trigraph.net/powdertoy/R216/manual.md computer |
| 2020-10-21 11:06:36 | <siraben> | Or a simpler arch, just to learn |
| 2020-10-21 11:06:46 | <olligobber> | :t const :: Num a => a -> [a] -> a |
| 2020-10-21 11:06:47 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:06:50 | → | thir joins (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) |
| 2020-10-21 11:07:05 | <olligobber> | :t const (const 0) :: Num a => a -> [a] -> a |
| 2020-10-21 11:07:06 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:07:23 | <siraben> | nicknick: you can easily find functions that exhibit a given type (provided it's possible to do so), but these functions may not be equivalent |
| 2020-10-21 11:07:34 | → | random joins (~random@185.219.70.106) |
| 2020-10-21 11:07:35 | <olligobber> | :t (\_ -> sum) :: Num a => a -> [a] -> a |
| 2020-10-21 11:07:36 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:07:57 | <olligobber> | siraben, it's always possible to |
| 2020-10-21 11:08:03 | <olligobber> | :t undefined :: a -> b |
| 2020-10-21 11:08:04 | <lambdabot> | a -> b |
| 2020-10-21 11:08:11 | <siraben> | lol |
| 2020-10-21 11:08:12 | × | raichoo quits (~raichoo@213.240.178.58) (Quit: Lost terminal) |
| 2020-10-21 11:08:26 | <random> | hey guys |
| 2020-10-21 11:08:31 | <random> | what was the name of that monad tutorial |
| 2020-10-21 11:08:39 | → | mirrorbird joins (~psutcliff@2a00:801:42b:7891:16b1:e53f:55b2:15e1) |
| 2020-10-21 11:08:39 | <random> | where you did like 5 examples |
| 2020-10-21 11:08:45 | <random> | and eventually you arrived at monads in the end |
| 2020-10-21 11:08:54 | × | alx741 quits (~alx741@186.178.110.244) (Ping timeout: 260 seconds) |
| 2020-10-21 11:09:23 | <nicknick> | Can we do better than onst (const 0) |
| 2020-10-21 11:09:33 | <nicknick> | Better than const (const 0) |
| 2020-10-21 11:09:38 | Clint | squints. |
| 2020-10-21 11:09:54 | <siraben> | nicknick: what is your intention here? you just want any function that has that type? |
| 2020-10-21 11:09:56 | <olligobber> | what makes one function better than another? |
| 2020-10-21 11:09:56 | <ski> | can you qualify "better" more ? |
| 2020-10-21 11:10:04 | <nicknick> | Any fucntion |
| 2020-10-21 11:10:12 | <nicknick> | Should look like a gentleman |
| 2020-10-21 11:10:19 | <siraben> | ? |
| 2020-10-21 11:10:26 | <siraben> | :t undefined :: Num a => a → [a] → a |
| 2020-10-21 11:10:28 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:10:29 | <ski> | then `const (const undefined)' should suffice, right ? |
| 2020-10-21 11:10:33 | <olligobber> | :t (\_ _ -> sum $ fromInteger <$> [0..]) :: Num a => a -> [a] -> a |
| 2020-10-21 11:10:34 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:10:34 | × | Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 256 seconds) |
| 2020-10-21 11:10:38 | → | Wuzzy joins (~Wuzzy@p5790ef06.dip0.t-ipconnect.de) |
| 2020-10-21 11:10:56 | <siraben> | dminuoso: did that clarify my intentions? |
| 2020-10-21 11:11:18 | × | thir quits (~thir@p200300f27f0b040039cda3b6fce8e5af.dip0.t-ipconnect.de) (Ping timeout: 246 seconds) |
| 2020-10-21 11:11:36 | <siraben> | :t (\x y → x <$ y) :: Num a => a → [a] → a |
| 2020-10-21 11:11:37 | <lambdabot> | error: |
| 2020-10-21 11:11:37 | <lambdabot> | • Occurs check: cannot construct the infinite type: a1 ~ [a1] |
| 2020-10-21 11:11:37 | <lambdabot> | • In the expression: x <$ y |
| 2020-10-21 11:11:54 | × | xerox_ quits (~xerox@unaffiliated/xerox) (Ping timeout: 272 seconds) |
| 2020-10-21 11:12:06 | → | Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus) |
| 2020-10-21 11:12:19 | <olligobber> | :t (\x y -> sum $ x <$ y) :: Num a => a -> [a] -> a |
| 2020-10-21 11:12:21 | <lambdabot> | Num a => a -> [a] -> a |
| 2020-10-21 11:12:25 | <siraben> | Of course. |
| 2020-10-21 11:13:28 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds) |
| 2020-10-21 11:14:23 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-10-21 11:14:37 | <nicknick> | How can I get a step-by-step solution for \f x y -> [f (sum x) (sum y)] |
| 2020-10-21 11:14:51 | <ski> | what do you mean ? |
| 2020-10-21 11:15:04 | × | ffviewer quits (1bf6c255@27-246-194-85.adsl.fetnet.net) (Ping timeout: 245 seconds) |
| 2020-10-21 11:15:30 | <olligobber> | what is a solution? |
| 2020-10-21 11:15:40 | <nicknick> | Like |
| 2020-10-21 11:15:45 | <nicknick> | How we arrived at this? |
| 2020-10-21 11:16:07 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2020-10-21 11:16:58 | × | geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 272 seconds) |
| 2020-10-21 11:17:01 | <ski> | we have two lists of numbers of type `a'. we want a list of `c's. `f' can turn two `a's into a `c'. if we sum the two lists, and pass the sums to `f', we get a `c', which we can put in a list so that we get something of the appropriate/expected result type |
| 2020-10-21 11:18:23 | <ski> | of course, we could have taken the product instead, or something else entirely .. |
| 2020-10-21 11:18:28 | hackage | haskoin-node 0.17.0 - P2P library for Bitcoin and Bitcoin Cash https://hackage.haskell.org/package/haskoin-node-0.17.0 (jprupp) |
| 2020-10-21 11:19:22 | × | kritzefitz quits (~kritzefit@p200300ecdf05be00f1ae985ba6d99bb3.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-10-21 11:23:20 | <nicknick> | How can we justify that const (const undefined) satisfies Num a => a -> [a] -> a? |
| 2020-10-21 11:24:15 | × | polyrain quits (~polyrain@2001:8003:e501:6901:1965:2d83:52d2:222c) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 2020-10-21 11:24:34 | <ski> | `const' has type `a -> ([a] -> a)' and `undefined' has type `a', so `const undefined' has type `[a] -> a' |
| 2020-10-21 11:25:09 | × | Rudd0 quits (~Rudd0@185.189.115.103) (Ping timeout: 265 seconds) |
| 2020-10-21 11:25:11 | <ski> | `const' also has type `([a] -> a) -> (a -> [a] -> a)', so `const (const undefined)' has type `a -> [a] -> a' |
| 2020-10-21 11:25:45 | <ski> | further, we can always add more (unused/useless) constraints on type variables, so `const (const undefined)' also has type `Num a => a -> [a] -> a' |
| 2020-10-21 11:27:15 | → | geowiesnot joins (~user@87-89-181-157.abo.bbox.fr) |
| 2020-10-21 11:27:38 | × | Tario quits (~Tario@201.192.165.173) (Ping timeout: 256 seconds) |
| 2020-10-21 11:28:01 | → | Tario joins (~Tario@201.192.165.173) |
| 2020-10-21 11:28:11 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-10-21 11:29:53 | × | karanlikmadde quits (~karanlikm@2a01:c22:b046:2a00:715c:4cac:e6ca:b78) (Quit: karanlikmadde) |
| 2020-10-21 11:31:34 | → | whatisRT joins (~whatisRT@2002:5b41:6a33:0:5c34:b0ad:5b4d:c699) |
| 2020-10-21 11:32:26 | × | geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 260 seconds) |
| 2020-10-21 11:32:40 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-10-21 11:32:55 | → | kritzefitz joins (~kritzefit@2003:5b:203b:200::10:49) |
| 2020-10-21 11:33:50 | → | nineonin_ joins (~textual@216-19-190-182.dyn.novuscom.net) |
| 2020-10-21 11:33:57 | <nicknick> | If we apply some (but not all)of the arguments to a function, what kind of function do we get as a result? |
| 2020-10-21 11:34:55 | × | nineonin_ quits (~textual@216-19-190-182.dyn.novuscom.net) (Client Quit) |
| 2020-10-21 11:35:04 | <ski> | all functions in Haskell take exactly one input parameter/argument |
| 2020-10-21 11:35:54 | <nicknick> | What if it is a custom function? |
| 2020-10-21 11:35:58 | hackage | dirichlet 0.1.0.0 - Multivariate dirichlet distribution https://hackage.haskell.org/package/dirichlet-0.1.0.0 (dschrempf) |
All times are in UTC.