Logs: freenode/#haskell
| 2021-03-16 11:47:14 | → | toughLuck joins (~Seo@84-112-54-174.cable.dynamic.surfer.at) |
| 2021-03-16 11:47:20 | → | tougherLuck joins (~Seo@84-112-54-174.cable.dynamic.surfer.at) |
| 2021-03-16 11:48:11 | sm2n_ | is now known as sm2n |
| 2021-03-16 11:48:25 | × | toughLuck quits (~Seo@84-112-54-174.cable.dynamic.surfer.at) (Client Quit) |
| 2021-03-16 11:48:25 | × | tougherLuck quits (~Seo@84-112-54-174.cable.dynamic.surfer.at) (Client Quit) |
| 2021-03-16 11:48:45 | → | toughLuck joins (~Seo@84-112-54-174.cable.dynamic.surfer.at) |
| 2021-03-16 11:48:51 | × | toughLuck quits (~Seo@84-112-54-174.cable.dynamic.surfer.at) (Client Quit) |
| 2021-03-16 11:49:17 | → | idhugo_ joins (~idhugo@87-49-147-45-mobile.dk.customer.tdc.net) |
| 2021-03-16 11:49:28 | <pjb> | kuribas: I wasn't special, this was the program for all pupils in 1968-1974 in France… |
| 2021-03-16 11:49:54 | <pjb> | kuribas: so you can realize how low the education system has fallen since then! |
| 2021-03-16 11:50:17 | <pjb> | thanks for the cis194 link! |
| 2021-03-16 11:50:43 | → | nhs_ joins (~nhs@70.113.67.118) |
| 2021-03-16 11:51:35 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2021-03-16 11:51:36 | <dminuoso> | :t traverseA |
| 2021-03-16 11:51:38 | <lambdabot> | error: |
| 2021-03-16 11:51:38 | <lambdabot> | • Variable not in scope: traverseA |
| 2021-03-16 11:51:38 | <lambdabot> | • Perhaps you meant one of these: |
| 2021-03-16 11:51:50 | → | Kaiepi joins (~Kaiepi@47.54.252.148) |
| 2021-03-16 11:51:55 | <kuribas> | dminuoso: traverse? |
| 2021-03-16 11:51:59 | <kuribas> | :t traverse |
| 2021-03-16 11:52:00 | <lambdabot> | (Traversable t, Applicative f) => (a -> f b) -> t a -> f (t b) |
| 2021-03-16 11:52:07 | <Uniaika> | :t sequenceA |
| 2021-03-16 11:52:08 | <lambdabot> | (Traversable t, Applicative f) => t (f a) -> f (t a) |
| 2021-03-16 11:52:08 | × | idhugo__ quits (~idhugo@80-62-116-180-mobile.dk.customer.tdc.net) (Ping timeout: 256 seconds) |
| 2021-03-16 11:52:15 | × | LKoen quits (~LKoen@194.250.88.92.rev.sfr.net) (Quit: “It’s only logical. First you learn to talk, then you learn to think. Too bad it’s not the other way round.”) |
| 2021-03-16 11:52:20 | <mouseghost> | pjb, "we dont need no category theory to buy apples at the store" |
| 2021-03-16 11:52:24 | <hpc> | pjb: sounds nice, i definitely would have liked to have built an intuition for fields in school |
| 2021-03-16 11:52:41 | → | cr4zsci joins (b07a57f1@176.122.87.241) |
| 2021-03-16 11:53:02 | <kuribas> | pjb: teaching sets in a playful way is different from teaching arithmetic using abstract algebra... |
| 2021-03-16 11:53:10 | <cr4zsci> | good day |
| 2021-03-16 11:53:31 | × | nhs quits (~nhs@cpe-70-113-67-118.austin.res.rr.com) (Ping timeout: 265 seconds) |
| 2021-03-16 11:53:32 | <pjb> | kuribas: of course, but it gives a good basis in kinder garden, to teach more abstract things later. |
| 2021-03-16 11:53:45 | <cr4zsci> | can I ask newbies here? |
| 2021-03-16 11:53:48 | → | Major_Biscuit joins (~Major_Bis@wlan-145-94-219-47.wlan.tudelft.nl) |
| 2021-03-16 11:54:04 | <dminuoso> | Uniaika: ah yeah that |
| 2021-03-16 11:54:06 | <hpc> | @where asktoask |
| 2021-03-16 11:54:06 | <lambdabot> | I know nothing about asktoask. |
| 2021-03-16 11:54:09 | <hpc> | blah |
| 2021-03-16 11:54:09 | <dminuoso> | Uniaika: Im just annoyed that |
| 2021-03-16 11:54:11 | <dminuoso> | % :t sequenceA |
| 2021-03-16 11:54:11 | <yahb> | dminuoso: (Traversable t, Applicative f) => t (f a) -> f (t a) |
| 2021-03-16 11:54:13 | → | psygate joins (~psygate@unaffiliated/psygate) |
| 2021-03-16 11:54:14 | <hpc> | cr4zsci: don't ask to ask, just ask ;) |
| 2021-03-16 11:54:16 | <dminuoso> | % :t replicateM |
| 2021-03-16 11:54:16 | <yahb> | dminuoso: Applicative m => Int -> m a -> m [a] |
| 2021-03-16 11:54:21 | <dminuoso> | This is so inconsistent. |
| 2021-03-16 11:55:03 | <pjb> | kuribas: the main complain of pupils and students, is to understand how abstrations are useful and can be applied to real situations. This is why it's important to teach concrete things first ("bathtub problems", but it can also be concrete programming problems ;-) ), and then later teach the theory. |
| 2021-03-16 11:55:25 | <kuribas> | pjb: exactly my point :) |
| 2021-03-16 11:57:41 | <hpc> | i see it the other way, earlier math classes are so specific/concrete for so long that you don't even realize what math is until you're in college |
| 2021-03-16 11:57:45 | → | machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca) |
| 2021-03-16 11:57:46 | × | toorevitimirp quits (~tooreviti@117.182.182.40) (Remote host closed the connection) |
| 2021-03-16 11:59:31 | × | psygate quits (~psygate@unaffiliated/psygate) (Quit: Leaving) |
| 2021-03-16 11:59:55 | → | psygate joins (~psygate@unaffiliated/psygate) |
| 2021-03-16 12:00:13 | <kuribas> | hpc: you don't need to exclude abstract stuff, just teach it after the specifics are known. |
| 2021-03-16 12:00:48 | <merijn> | kuribas: I'm reminded of the usual "teaching math" quote I bust out wrt Haskell |
| 2021-03-16 12:00:49 | <cr4zsci> | f :: (Ord a, Num b) => a -> b -> a f 1 2 :: (Ord a, Num a) => a How does the compiler determine that a must be a type that implements both Ord and Num? |
| 2021-03-16 12:01:22 | <hpc> | i would like to have at least seen it interleaved |
| 2021-03-16 12:01:32 | <merijn> | "Suppose that you want to teach the 'cat' concept to a very young child. Do you explain that a cat is a relatively small, primarily carnivorous mammal with retractible claws, a distinctive sonic output, etc.? I'll bet not. You probably show the kid a lot of different cats, saying 'kitty' each time, until it gets the idea. To put it more generally, generalizations are best made by abstraction from |
| 2021-03-16 12:01:38 | <cr4zsci> | * :t f 1 2 :: (Ord a, Num a) => a |
| 2021-03-16 12:01:38 | <merijn> | experience." |
| 2021-03-16 12:01:41 | <merijn> | - R. P. Boas (Can we make mathematics intelligible?, American Mathematical Monthly 88 (1981), pp. 727-731) |
| 2021-03-16 12:01:49 | <hpc> | i had to explain to a coworker that "you know math, you just don't realize it" |
| 2021-03-16 12:02:11 | <hpc> | he didn't realize that real algebra and boolean algebra are the same thing |
| 2021-03-16 12:02:42 | <merijn> | cr4zsci: That depends on what 'f' is |
| 2021-03-16 12:03:23 | hackage | dyre 0.9.1 - Dynamic reconfiguration in Haskell https://hackage.haskell.org/package/dyre-0.9.1 (frasertweedale) |
| 2021-03-16 12:03:31 | → | cur8or joins (~cur8or@72canterbury.cybersmart.co.za) |
| 2021-03-16 12:03:32 | <merijn> | cr4zsci: Ah, wait |
| 2021-03-16 12:03:44 | <kuribas> | cr4zsci: the type inference algorithm infers the constraints from the context. |
| 2021-03-16 12:03:51 | <merijn> | cr4zsci: Are you asking why 'a' has to be Ord and Num, despite the type of 'f' only requiring Ord? |
| 2021-03-16 12:04:14 | × | Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection) |
| 2021-03-16 12:04:28 | <cr4zsci> | Yes |
| 2021-03-16 12:04:36 | <merijn> | cr4zsci: That's fairly straightforward |
| 2021-03-16 12:04:36 | → | coot joins (~coot@37.30.58.223.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-16 12:04:37 | <merijn> | :t 1 |
| 2021-03-16 12:04:39 | <lambdabot> | Num p => p |
| 2021-03-16 12:04:55 | <merijn> | cr4zsci: Numeric literals are polymorphic (i.e. can be any type that is an instance of Num) |
| 2021-03-16 12:05:00 | <merijn> | > 1 :: Int |
| 2021-03-16 12:05:03 | <lambdabot> | 1 |
| 2021-03-16 12:05:03 | <merijn> | > 1 :: Double |
| 2021-03-16 12:05:06 | <lambdabot> | 1.0 |
| 2021-03-16 12:05:06 | <merijn> | > 1 :: Rational |
| 2021-03-16 12:05:09 | <lambdabot> | 1 % 1 |
| 2021-03-16 12:05:40 | <merijn> | cr4zsci: So the compiler knows: 1) first argument of 'f' must be an instance of Ord, and 2) 1 must be an instance of Num |
| 2021-03-16 12:06:15 | <merijn> | So, if 1 is the first argument to 'f', we can conclude that whatever 'a' is, it *must* be both an instance of Ord (because of 'f') and Num (because of 1) |
| 2021-03-16 12:07:30 | × | pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!) |
| 2021-03-16 12:07:52 | <merijn> | cr4zsci: if you do ":t f 'c' 2" you'd just get back Char (because 'c' is not polymorphic, but type Char) |
| 2021-03-16 12:08:02 | × | geekosaur quits (ac3a3b4d@172.58.59.77) (Ping timeout: 240 seconds) |
| 2021-03-16 12:08:03 | <cr4zsci> | I understood! Many thanks |
| 2021-03-16 12:08:11 | <olligobber> | > 1 :: Sum Int |
| 2021-03-16 12:08:13 | <lambdabot> | Sum {getSum = 1} |
| 2021-03-16 12:11:16 | → | peanut_ joins (~peanut@2a02:8388:a101:2600:2ba8:dc0d:2e25:a003) |
| 2021-03-16 12:12:18 | <curiousgay> | I wonder if it makes any sense if type classes were called type sets where in inheritance parents are subsets (as opposed to superclass) and children are supersets (as opposed to subclass) |
| 2021-03-16 12:12:51 | <olligobber> | isn't there already a thing called type sets |
| 2021-03-16 12:12:55 | <cr4zsci> | type is taken from parameter and most generic type from argument |
| 2021-03-16 12:12:59 | <olligobber> | like, sets of types |
| 2021-03-16 12:14:10 | → | dbmikus joins (~dbmikus@cpe-76-167-86-219.natsow.res.rr.com) |
| 2021-03-16 12:15:09 | <olligobber> | https://hackage.haskell.org/package/type-level-sets-0.8.9.0/docs/Data-Type-Set.html |
| 2021-03-16 12:15:41 | → | urodna joins (~urodna@unaffiliated/urodna) |
| 2021-03-16 12:15:50 | × | bitmagie quits (~Thunderbi@200116b806998b0058b04fa04645b802.dip.versatel-1u1.de) (Quit: bitmagie) |
| 2021-03-16 12:16:11 | × | ukari quits (~ukari@unaffiliated/ukari) (Remote host closed the connection) |
All times are in UTC.