Logs: freenode/#haskell
| 2020-09-24 08:44:18 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) |
| 2020-09-24 08:46:33 | → | acidjnk_new2 joins (~acidjnk@p200300d0c7237863349b0df7f7aa9c44.dip0.t-ipconnect.de) |
| 2020-09-24 08:49:27 | × | chaosmasttter quits (~chaosmast@p200300c4a714f101b8e97b5389efff25.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-09-24 08:49:33 | × | ahmr88_ quits (~ahmr88@cpc85006-haye22-2-0-cust131.17-4.cable.virginm.net) (Ping timeout: 256 seconds) |
| 2020-09-24 08:50:52 | → | wonko7 joins (~wonko7@2a01:e35:2ffb:7040:8c5f:831a:4acc:45dd) |
| 2020-09-24 08:52:08 | → | Saten-san joins (~Saten-san@ip-213-49-123-19.dsl.scarlet.be) |
| 2020-09-24 08:53:47 | × | kenran quits (~maier@b2b-37-24-119-190.unitymedia.biz) (Ping timeout: 260 seconds) |
| 2020-09-24 08:55:10 | → | SanchayanM joins (~Sanchayan@171.76.101.244) |
| 2020-09-24 08:55:13 | × | SanchayanM quits (~Sanchayan@171.76.101.244) (Remote host closed the connection) |
| 2020-09-24 08:55:31 | <AWizzArd> | Yesterday I was looking for something bind-like for Monoids. `Config` is a Semigroup/Monoid. setA, setB, ... setX, setY, setZ are functions of type :: x -> Config -> Config (or instead of x it can be the letter after "set", so a/b/.../y/z). |
| 2020-09-24 08:55:34 | → | SanchayanM joins (~Sanchayan@171.76.101.244) |
| 2020-09-24 08:55:40 | × | Sanchayan quits (~Sanchayan@122.167.81.155) (Ping timeout: 260 seconds) |
| 2020-09-24 08:55:45 | <AWizzArd> | If I continue like this then the nesting would become very deep: let conf = setX myX (setY myY defaultConfig) |
| 2020-09-24 08:56:20 | <merijn> | AWizzArd: oh, lemme tell you a cool trick :p |
| 2020-09-24 08:56:26 | <merijn> | Config is a Monoid, yeah? |
| 2020-09-24 08:57:17 | <merijn> | You can simply do "setX myX <> setY myY" (or, if you've got a lot of them: "mconcat [setX myX, setY myY, ... ]") |
| 2020-09-24 09:00:01 | × | jmp-TOK1 quits (~jmp-TOK@185.163.110.116) () |
| 2020-09-24 09:00:39 | × | boistordu quits (boistordum@gateway/shell/matrix.org/x-znueblbzpfbcdbpl) (Quit: Idle for 30+ days) |
| 2020-09-24 09:00:46 | <AWizzArd> | merijn: I am surprised. |
| 2020-09-24 09:00:57 | <merijn> | Why? |
| 2020-09-24 09:01:00 | <AWizzArd> | (<>) :: Semigroup a => a -> a -> a |
| 2020-09-24 09:01:13 | → | elliott_ joins (~elliott_@100.36.54.163) |
| 2020-09-24 09:01:22 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 2020-09-24 09:01:34 | <AWizzArd> | So you are not using the Semigroup implementation of Config here? |
| 2020-09-24 09:01:41 | <merijn> | AWizzArd: "instance Semigroup a => Semigroup (r -> a) where f <> g = \x -> f x <> g x" |
| 2020-09-24 09:01:58 | <merijn> | It's the best Monoid/Semigroup instance! |
| 2020-09-24 09:01:59 | <AWizzArd> | Aha, so you are using the fact that Functions are a Semigroup |
| 2020-09-24 09:02:12 | <merijn> | Yeah |
| 2020-09-24 09:02:16 | <AWizzArd> | merijn: this was essentially what I was looking for. I saw this, dunno, a year ago. |
| 2020-09-24 09:02:31 | <AWizzArd> | But I remembered that Config was the SG constraint I was looking for. |
| 2020-09-24 09:02:37 | <hekkaidekapus> | AWizzArd: Seconding merijn, you could go further and use any other Foldable than [] and write `flip (appEndo . foldMap Endo) defaultConfig`. |
| 2020-09-24 09:02:39 | <AWizzArd> | And it didn’t play well with <> |
| 2020-09-24 09:03:28 | <AWizzArd> | Well, yesterday we came up with foldr ($) defaultConfig [setX myX, setY myY, ...] |
| 2020-09-24 09:03:28 | × | kori quits (~kori@arrowheads/kori) (Read error: Connection reset by peer) |
| 2020-09-24 09:03:30 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 2020-09-24 09:03:39 | <AWizzArd> | But this wasn’t using the Semigroupnissity here. |
| 2020-09-24 09:09:02 | × | tomboy64 quits (~tomboy64@gateway/tor-sasl/tomboy64) (Remote host closed the connection) |
| 2020-09-24 09:09:49 | → | tomboy64 joins (~tomboy64@gateway/tor-sasl/tomboy64) |
| 2020-09-24 09:11:17 | <AWizzArd> | Another thing that surprised me: main = putStrLn ("Hallo" :: Text) <-- GHC complained about ambiguity. I would have expected that this explicit `:: Text` would help. GHC would understand that I didn’t accidentally hit the wrong key because a pencil fell on my keyboard and this happened to write exactly this char combination. |
| 2020-09-24 09:11:50 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection) |
| 2020-09-24 09:12:07 | → | chele joins (~chele@2a02:8106:1:f900:faca:b8ff:fe2f:8499) |
| 2020-09-24 09:12:17 | <merijn> | AWizzArd: Would help how? What was the ambiguity? |
| 2020-09-24 09:12:45 | × | oish quits (~charlie@228.25.169.217.in-addr.arpa) (Ping timeout: 240 seconds) |
| 2020-09-24 09:12:52 | <hekkaidekapus> | @type putStrLn -- AWizzArd |
| 2020-09-24 09:12:53 | <lambdabot> | String -> IO () |
| 2020-09-24 09:13:27 | <AWizzArd> | hekkaidekapus: I was using the one from Data.Text.IO (putStrLn) |
| 2020-09-24 09:13:39 | <AWizzArd> | So both functions were in scope. |
| 2020-09-24 09:13:53 | <hekkaidekapus> | So, qualify the usage. |
| 2020-09-24 09:14:13 | <hekkaidekapus> | Prelude. or Data.Text. |
| 2020-09-24 09:14:15 | <AWizzArd> | hekkaidekapus: yes of course, the fix was easy. But why didn’t the explicit type sig not help? |
| 2020-09-24 09:14:18 | <hekkaidekapus> | Prelude. or Data.Text.IO |
| 2020-09-24 09:14:31 | <AWizzArd> | -not |
| 2020-09-24 09:14:55 | → | oish joins (~charlie@228.25.169.217.in-addr.arpa) |
| 2020-09-24 09:15:49 | <lortabac> | AWizzArd: for name overloading you need a type class |
| 2020-09-24 09:15:50 | <hekkaidekapus> | Because ("Hallo" :: Text) is its own thing and does not influence how putStrLn works. |
| 2020-09-24 09:19:07 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-24 09:20:00 | → | daa joins (c1c6b9ce@193.198.185.206) |
| 2020-09-24 09:20:51 | <merijn> | AWizzArd: GHC doesn't do type directed resolution, so adding a type annotation does nothing |
| 2020-09-24 09:20:52 | <edwardk> | idnar: removing the Eq and Show superclasses of Num was done to allow things like instance Num a => Num (x -> a) to not have to lie to users any more if brought in as an orphan. It isn't in scope by default, but it is a thing that was popular with the community at the time. |
| 2020-09-24 09:21:04 | <edwardk> | it was one of the first major breaks with the published report in GHC. |
| 2020-09-24 09:21:41 | → | bshum1 joins (~bshum@195.206.169.184) |
| 2020-09-24 09:21:49 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-24 09:22:50 | × | cosimone quits (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) (Quit: Quit.) |
| 2020-09-24 09:25:29 | → | kori joins (~kori@arrowheads/kori) |
| 2020-09-24 09:26:26 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds) |
| 2020-09-24 09:27:13 | → | stree_ joins (~stree@50-108-126-14.adr01.mskg.mi.frontiernet.net) |
| 2020-09-24 09:27:13 | → | cosimone joins (~cosimone@2001:b07:ae5:db26:b248:7aff:feea:34b6) |
| 2020-09-24 09:28:13 | × | stree quits (~stree@50-108-115-67.adr01.mskg.mi.frontiernet.net) (Ping timeout: 260 seconds) |
| 2020-09-24 09:28:41 | <shad0w_> | `Any Haskeller worth their salt would reject this code as a gruesome abomination. ` |
| 2020-09-24 09:28:48 | → | Noglues joins (284a7b51@40.74.123.81) |
| 2020-09-24 09:28:54 | <shad0w_> | - as read on typeclassopedia |
| 2020-09-24 09:28:57 | <shad0w_> | LMAO |
| 2020-09-24 09:29:44 | × | Noglues quits (284a7b51@40.74.123.81) (Remote host closed the connection) |
| 2020-09-24 09:29:50 | <AWizzArd> | shad0w_: (-: |
| 2020-09-24 09:31:29 | <shad0w_> | AWizzArd: lmao, what is that, Schrödinger's smiley ? |
| 2020-09-24 09:31:50 | <MarcelineVQ> | sometimes you gotta dodge left |
| 2020-09-24 09:32:01 | <AWizzArd> | MarcelineVQ: hahaha |
| 2020-09-24 09:32:15 | → | heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) |
| 2020-09-24 09:32:47 | → | dhil joins (~dhil@11.29.39.217.dyn.plus.net) |
| 2020-09-24 09:33:21 | <AWizzArd> | MarcelineVQ: I just tried it, and we would have to do it like a chicken, i.e. keeping our head in the position it was before. That way the head will fall on its right side, and the truth of (-: becomes visible. |
| 2020-09-24 09:34:49 | × | danvet quits (~danvet@2a02:168:57f4:0:5f80:650d:c6e6:3453) (Quit: Leaving) |
| 2020-09-24 09:35:09 | → | carlomagno1 joins (~cararell@inet-hqmc01-o.oracle.com) |
| 2020-09-24 09:35:53 | <MarcelineVQ> | after all, why did the chicken cross the road |
| 2020-09-24 09:36:34 | × | carlomagno quits (~cararell@inet-hqmc02-o.oracle.com) (Ping timeout: 258 seconds) |
| 2020-09-24 09:36:56 | × | heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds) |
| 2020-09-24 09:38:39 | → | ubert1 joins (~Thunderbi@91.141.2.79.wireless.dyn.drei.com) |
| 2020-09-24 09:38:40 | × | kori quits (~kori@arrowheads/kori) (Read error: Connection reset by peer) |
| 2020-09-24 09:39:19 | <tdammers> | yeah, that was stupid. don't mess with the road, it'll send its goons to kidnap your children and kill them just to teach you to mind your own fucking business |
| 2020-09-24 09:39:38 | <tdammers> | anyway |
| 2020-09-24 09:40:22 | × | ubert quits (~Thunderbi@91.141.1.30.wireless.dyn.drei.com) (Ping timeout: 272 seconds) |
| 2020-09-24 09:40:22 | ubert1 | is now known as ubert |
| 2020-09-24 09:42:34 | → | heatsink joins (~heatsink@107.136.5.69) |
| 2020-09-24 09:42:37 | → | alexm_ joins (~AlexM87@161.8.233.138) |
| 2020-09-24 09:42:44 | × | hc quits (~hc@bsd.pm) (Remote host closed the connection) |
| 2020-09-24 09:43:43 | × | SanchayanM quits (~Sanchayan@171.76.101.244) (Quit: leaving) |
| 2020-09-24 09:43:53 | → | hc joins (~hc@bsd.pm) |
| 2020-09-24 09:44:10 | <pjb> | tdammers: yep: https://www.marcelhuijserphotography.com/blog/2014/12/road-ecology-blog-why-did-the-chicken-cross-the-road |
| 2020-09-24 09:44:52 | <MarcelineVQ> | all part of the unwritten book a da road |
| 2020-09-24 09:46:21 | → | v_m_v joins (~vm_v@2a02:aa12:3200:6480:f507:71a:9334:3099) |
| 2020-09-24 09:46:53 | × | heatsink quits (~heatsink@107.136.5.69) (Ping timeout: 260 seconds) |
All times are in UTC.