Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 615 616 617 618 619 620 621 622 623 624 625 .. 5022
502,152 events total
2020-10-13 15:25:55 <monochrom> 2^(1/2) wouldn't please him either. It's still irrational.
2020-10-13 15:25:56 <jil> I'm learning Haskell with "Programming in Haskell" 2nd edition..
2020-10-13 15:26:16 <blip> Nice, can we help you?
2020-10-13 15:26:39 <blip> monochrom: Yes
2020-10-13 15:26:41 <monochrom> You know what, s/It's still/He's/ >:)
2020-10-13 15:26:42 <jil> what a perfect fith or an equidistant semitone ?
2020-10-13 15:26:43 × Bakun quits (~bakun@51.15.0.88) (Read error: Connection reset by peer)
2020-10-13 15:27:25 × ensyde quits (~ensyde@2600:1702:2e30:1a40:f09c:a012:516e:b253) (Ping timeout: 240 seconds)
2020-10-13 15:27:39 <jil> It would bother me If I was rational, not you ?
2020-10-13 15:27:49 <blip> monochrom: He'd use (3/2)^7 minus some octaves for a semitone
2020-10-13 15:29:28 <blip> jil: that is a quite modern stance
2020-10-13 15:30:19 × kritzefitz quits (~kritzefit@fw-front.credativ.com) (Remote host closed the connection)
2020-10-13 15:30:35 <blip> jil: don't be confused, we're just smalltalking about historic music theory
2020-10-13 15:30:56 <gentauro> kindaro: Torben wrote back and it is Jon Sporing who currently is wrote/maintain the material. Torben say that you should write Jon an e-mail and ask (nicely) if you can have a copy :-)
2020-10-13 15:31:49 Bakun joins (~bakun@51.15.0.88)
2020-10-13 15:32:08 <jil> blip: I was confused. Thank you.
2020-10-13 15:33:11 <blip> jil: So, can we help you on your journey to enlightenment?
2020-10-13 15:33:32 <blip> (regarding haskell)
2020-10-13 15:34:23 <blip> merijn: Thanks for the recommendation, that's quite intresting
2020-10-13 15:34:45 × CindyLinz quits (~cindy_utf@112.121.78.20) (Ping timeout: 240 seconds)
2020-10-13 15:34:49 × Bakun quits (~bakun@51.15.0.88) (Read error: Connection reset by peer)
2020-10-13 15:34:53 <blip> merijn: The descriptions of this literature reminds me of Kafka
2020-10-13 15:37:45 × bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 240 seconds)
2020-10-13 15:37:57 mdunnio_ joins (~mdunnio@208.59.170.5)
2020-10-13 15:38:17 Bakun joins (~bakun@51.15.0.88)
2020-10-13 15:39:42 fendor joins (~fendor@e237-037.eduroam.tuwien.ac.at)
2020-10-13 15:39:58 jgt joins (~jgt@77-255-14-254.adsl.inetia.pl)
2020-10-13 15:40:16 × mdunnio quits (~mdunnio@208.59.170.5) (Ping timeout: 246 seconds)
2020-10-13 15:40:27 <jil> I think listing your smalltalking is already helping me a lot. But I was also wondering if the construct `add x = x :: Int` with the type coercing at the end, was recent because I don't see it in my manual (from 2016) but it work in GHCi 8.6.5
2020-10-13 15:40:52 kritzefitz joins (~kritzefit@212.86.56.80)
2020-10-13 15:40:56 <ski> it's not a coercion, but a type ascription
2020-10-13 15:41:10 <blip> Ah, yes. In the MetaData of Generic Rep are the constructor names as Symbols. All I need now, is a type level function which converts camel case Symbols into hyphenated lowercase Symbols. That's a challenge but possible :)
2020-10-13 15:41:13 × polyrain quits (~polyrain@2001:8003:e501:6901:8a4:c02:960d:e633) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-13 15:41:18 <ski> (it doesn't change the type of anything, it just specifies (pins down) what the type should be)
2020-10-13 15:41:18 <monochrom> It is not recent. Just unidiomatic.
2020-10-13 15:41:30 <ski> and yes, it's standard Haskell. was in Haskell98 already
2020-10-13 15:41:38 <jil> thank you for the correction ski I wasn't sure about the vocabulary indeed.
2020-10-13 15:42:22 <blip> jil: normally, you would write:
2020-10-13 15:42:30 <ski> no worry, clearing up terminological (and sometimes conceptual) misalignments can often be useful, when communicating
2020-10-13 15:42:37 <blip> `add x :: Int -> Int`
2020-10-13 15:42:47 <ski> (without the `x')
2020-10-13 15:42:58 <blip> oops
2020-10-13 15:43:28 <blip> and propably `add :: Int -> Int -> Int`, magmas are cool
2020-10-13 15:43:54 <jil> what are magmas ?
2020-10-13 15:44:04 <ski> jil : it can sometimes be useful to have them, if there's a type ambiguity problem (the system has trouble figuring out which specific type you intend, somewhere in your code)
2020-10-13 15:44:17 <blip> all functions which take two arguments of the same type and return something of that type
2020-10-13 15:44:25 <blip> `magma :: a -> a -> a`
2020-10-13 15:44:35 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-13 15:44:36 <blip> addition or multiplication for example
2020-10-13 15:44:41 <ski> "magma" is a concept in math (abstract algebra) for a binary operation on a set/type
2020-10-13 15:45:58 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
2020-10-13 15:46:00 <ski> blip : why're they cool ?
2020-10-13 15:46:23 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Client Quit)
2020-10-13 15:46:50 <jil> I see.
2020-10-13 15:46:52 <blip> ski: I like them a lot; you can define nice operators and a lot of things are magmas
2020-10-13 15:47:08 <blip> ski: Or would you prefer them described as hot?
2020-10-13 15:47:14 <blip> :)
2020-10-13 15:47:15 <ski> usually you'd want a few laws, i think
2020-10-13 15:47:41 LKoen joins (~LKoen@lstlambert-657-1-123-43.w92-154.abo.wanadoo.fr)
2020-10-13 15:47:47 <ski> sure, if you have a magma, you automatically gets an operation taking a binary tree with leaves being elements in the magma, to an element in the magma
2020-10-13 15:47:49 × LKoen quits (~LKoen@lstlambert-657-1-123-43.w92-154.abo.wanadoo.fr) (Read error: Connection reset by peer)
2020-10-13 15:48:02 <blip> and that is nice
2020-10-13 15:48:10 LKoen joins (~LKoen@81.255.219.130)
2020-10-13 15:48:49 <blip> for example (<>) is quite nice, obviously it's even a monoid, but a lot of the niceness comes from the magma part
2020-10-13 15:48:53 fresheyeball joins (~isaac@c-71-237-105-37.hsd1.co.comcast.net)
2020-10-13 15:49:01 <blip> or semigroup
2020-10-13 15:50:10 × knupfer quits (~Thunderbi@200116b82c814300c0110b68686b9a3e.dip.versatel-1u1.de) (Quit: knupfer)
2020-10-13 15:50:18 knupfer joins (~Thunderbi@200116b82c814300159e9cdeac30c350.dip.versatel-1u1.de)
2020-10-13 15:50:20 × blip quits (58823d9e@gateway/web/cgi-irc/kiwiirc.com/ip.88.130.61.158) (Quit: Connection closed)
2020-10-13 15:50:27 × Bakun quits (~bakun@51.15.0.88) (Read error: Connection reset by peer)
2020-10-13 15:50:38 blip joins (58823d9e@gateway/web/cgi-irc/kiwiirc.com/ip.88.130.61.158)
2020-10-13 15:50:44 xff0x joins (~fox@217.110.198.158)
2020-10-13 15:50:58 CindyLinz joins (~cindy_utf@112.121.78.20)
2020-10-13 15:51:09 <ski> with semigroup, you have associativity, so you can combine a sequence of elements into a single element, and get the same result, regardless of how you group the elements in the sequence
2020-10-13 15:51:46 <monochrom> That means magmas are freer than semigroups. :)
2020-10-13 15:52:10 <blip> jil: How would you implement this signature: `slurp :: (a, b) -> a`
2020-10-13 15:52:24 <blip> monochrom: :)
2020-10-13 15:52:34 <ski> i guess you have a free functor from magmas to semigroups
2020-10-13 15:52:36 × ubert quits (~Thunderbi@2a02:8109:9880:303c:ca5b:76ff:fe29:f233) (Quit: ubert)
2020-10-13 15:52:39 × alp quits (~alp@2a01:e0a:58b:4920:e961:3e4f:cf0f:6182) (Ping timeout: 272 seconds)
2020-10-13 15:54:21 <jil> as `slurp (x,y) = x` blip
2020-10-13 15:54:45 <blip> jil: cool, and what about: barf :: a -> (a, b)
2020-10-13 15:54:50 Bakun joins (~bakun@51.15.0.88)
2020-10-13 15:55:11 thir joins (~thir@p200300f27f02580060eb7dde324e54c8.dip0.t-ipconnect.de)
2020-10-13 15:55:19 GyroW_ joins (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be)
2020-10-13 15:55:20 × GyroW_ quits (~GyroW@ptr-48ujrfd1ztq5fjywfw3.18120a2.ip6.access.telenet.be) (Changing host)
2020-10-13 15:55:20 GyroW_ joins (~GyroW@unaffiliated/gyrow)
2020-10-13 15:56:34 × GyroW quits (~GyroW@unaffiliated/gyrow) (Ping timeout: 272 seconds)
2020-10-13 15:57:47 <jil> I'm looking for a definition with the flowing type `add :: Int -> Int -> Int -> Int` and I come up with this https://paste.debian.net/1166987 but I feel something is correct.
2020-10-13 15:57:53 <jil> or not necessary
2020-10-13 15:59:10 <ski> what do you mean by "flowing type" ?
2020-10-13 15:59:13 × knupfer quits (~Thunderbi@200116b82c814300159e9cdeac30c350.dip.versatel-1u1.de) (Read error: Connection reset by peer)
2020-10-13 15:59:16 <jil> more precisely I don't understand why removing the first `:: Int` make a fucntion returning `Num a` also I have x, y z Ints
2020-10-13 15:59:17 <ski> @type let add x y z = x+y+z::Int where x :: Int; y :: Int; z :: Int in add
2020-10-13 15:59:17 <monochrom> Write "add :: Int -> Int -> Int -> Int" instead of the "where x::Int etc" block. That block means something else.
2020-10-13 15:59:19 <lambdabot> error:
2020-10-13 15:59:19 <lambdabot> The type signature for ‘x’ lacks an accompanying binding
2020-10-13 15:59:19 <lambdabot> (The type signature must be given where ‘x’ is declared)
2020-10-13 15:59:20 knupfer joins (~Thunderbi@200116b82c814300f1e41d34f9bff3a4.dip.versatel-1u1.de)
2020-10-13 15:59:22 × blip quits (58823d9e@gateway/web/cgi-irc/kiwiirc.com/ip.88.130.61.158) (Quit: Connection closed)

All times are in UTC.