Logs: liberachat/#haskell
| 2021-07-09 16:22:14 | <albet70> | if a type would be an instance of Monad, it could not be an instance of Semigroup? |
| 2021-07-09 16:22:48 | <davean> | No, it could be |
| 2021-07-09 16:22:56 | <davean> | well, sorta |
| 2021-07-09 16:23:21 | <davean> | Depends on what you mean by "it" |
| 2021-07-09 16:23:25 | × | kuribas quits (~user@ptr-25vy0i8xkirhfn6k3n1.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
| 2021-07-09 16:23:41 | <davean> | albet70: https://hackage.haskell.org/package/base-4.15.0.0/docs/Data-List-NonEmpty.html#t:NonEmpty |
| 2021-07-09 16:24:04 | <davean> | Note Monad NonEmpty and Semigroup (NonEmpty a) |
| 2021-07-09 16:24:08 | <drdo> | How would I enable optimization for all packages (including external deps) in cabal.project? |
| 2021-07-09 16:24:24 | <davean> | SLIGHTLY different membership, but probably what you mean by being both |
| 2021-07-09 16:24:28 | <boxscape> | % :k Monad |
| 2021-07-09 16:24:29 | <yahb> | boxscape: (* -> *) -> Constraint |
| 2021-07-09 16:24:44 | × | Martinsos quits (~Martinsos@cpe-188-129-56-84.dynamic.amis.hr) (Remote host closed the connection) |
| 2021-07-09 16:24:48 | <boxscape> | % :k Semigroup |
| 2021-07-09 16:24:48 | <yahb> | boxscape: * -> Constraint |
| 2021-07-09 16:25:04 | × | sergal quits (~ezra@user/ezra) (Changing host) |
| 2021-07-09 16:25:04 | → | sergal joins (~ezra@fsf/member/ezra) |
| 2021-07-09 16:30:02 | × | warnz quits (~warnz@2600:1700:77c0:5610:edd9:472d:4b89:9ab8) (Remote host closed the connection) |
| 2021-07-09 16:31:14 | <albet70> | Functor, Applicative, Monad |
| 2021-07-09 16:31:30 | × | troydm quits (~troydm@host-176-37-124-197.b025.la.net.ua) (Ping timeout: 256 seconds) |
| 2021-07-09 16:31:58 | <albet70> | an instance of Monad, so it must be an instance of Functor and Applicative, right? |
| 2021-07-09 16:32:19 | <[exa]> | true |
| 2021-07-09 16:34:06 | × | norias quits (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) (Ping timeout: 252 seconds) |
| 2021-07-09 16:34:25 | → | norias joins (~jaredm@c-98-219-195-163.hsd1.pa.comcast.net) |
| 2021-07-09 16:34:31 | darklambda | is now known as cs |
| 2021-07-09 16:34:39 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds) |
| 2021-07-09 16:34:42 | cs | is now known as cpp |
| 2021-07-09 16:35:46 | cpp | is now known as darklambda |
| 2021-07-09 16:37:16 | → | hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com) |
| 2021-07-09 16:41:00 | → | ubert joins (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) |
| 2021-07-09 16:41:15 | × | MQ-17J quits (~MQ-17J@8.21.10.15) (Ping timeout: 252 seconds) |
| 2021-07-09 16:44:26 | × | shutdown_-h_now quits (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl) (Ping timeout: 252 seconds) |
| 2021-07-09 16:45:50 | × | ubert quits (~Thunderbi@p2e5a50e5.dip0.t-ipconnect.de) (Ping timeout: 272 seconds) |
| 2021-07-09 16:46:08 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2021-07-09 16:48:38 | <zzz> | if we have ´T a = T Wtv a` and i want to have `tmap :: (a -> b) -> T a -> Tb ; tmap f (T wtv a) = T wtv (f a)` how d we avoid the infinite type error? |
| 2021-07-09 16:50:01 | <dminuoso> | zzz: Can you present your real code? |
| 2021-07-09 16:50:25 | → | shutdown_-h_now joins (~arjan@82-75-187-100.cable.dynamic.v4.ziggo.nl) |
| 2021-07-09 16:50:25 | <dminuoso> | It should exactly like that |
| 2021-07-09 16:50:46 | × | kaizen quits (sid501599@id-501599.brockwell.irccloud.com) (Ping timeout: 246 seconds) |
| 2021-07-09 16:51:02 | → | chomwitt joins (~Pitsikoko@ppp-94-67-202-202.home.otenet.gr) |
| 2021-07-09 16:51:07 | × | hendi quits (sid489601@id-489601.tooting.irccloud.com) (Ping timeout: 246 seconds) |
| 2021-07-09 16:51:32 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2021-07-09 16:51:42 | → | hendi joins (sid489601@id-489601.tooting.irccloud.com) |
| 2021-07-09 16:51:44 | → | kaizen joins (sid501599@id-501599.brockwell.irccloud.com) |
| 2021-07-09 16:52:59 | <zzz> | oops, my bad |
| 2021-07-09 16:53:31 | → | hegstal joins (~hegstal@2a02:c7f:7604:8a00:7018:37c7:e025:203e) |
| 2021-07-09 16:54:03 | <zzz> | i had `T = T Wtv (U a)` |
| 2021-07-09 16:54:14 | <zzz> | i mean `T a = T Wtv (U a)` |
| 2021-07-09 16:54:21 | <zzz> | time for a break |
| 2021-07-09 16:59:02 | <dminuoso> | What do you expect this to do, with that type signature? |
| 2021-07-09 16:59:48 | × | dajoer quits (~david@user/gvx) (Quit: leaving) |
| 2021-07-09 17:02:54 | × | Obo quits (~roberto@70.pool90-171-81.dynamic.orange.es) (Quit: WeeChat 2.8) |
| 2021-07-09 17:04:11 | × | phma quits (phma@2001:5b0:212a:c338:e904:270b:aa2b:a4ce) (Read error: Connection reset by peer) |
| 2021-07-09 17:07:34 | × | michalz quits (~michalz@185.246.204.61) (Remote host closed the connection) |
| 2021-07-09 17:10:16 | <yin[m]> | hi. I'm trying to make a short-circuiting fold, something like a foldl (||) False $ cycle [False, True] that doesn't hang. what's an idiomatic way of achieving this? |
| 2021-07-09 17:10:46 | <yin[m]> | i want it to work on maps, not just lists |
| 2021-07-09 17:11:10 | <monochrom> | foldr, despite wrong intuition |
| 2021-07-09 17:11:22 | <yin[m]> | can you explain? |
| 2021-07-09 17:11:24 | <monochrom> | > foldr (||) undefined (cycle [False, True]) |
| 2021-07-09 17:11:26 | <lambdabot> | True |
| 2021-07-09 17:11:56 | <yin[m]> | let me think about that |
| 2021-07-09 17:12:03 | <monochrom> | Perform lazy evaluation steps by hand to see why. |
| 2021-07-09 17:12:27 | <monochrom> | The popular science story of "foldr starts from the right" is wrong. Has always been wrong. |
| 2021-07-09 17:13:23 | <yin[m]> | of course. why did my intuition mislead me? |
| 2021-07-09 17:14:16 | → | roconnor_ joins (~roconnor@host-104-157-226-103.dyn.295.ca) |
| 2021-07-09 17:15:14 | × | roconnor quits (~roconnor@host-45-78-208-216.dyn.295.ca) (Ping timeout: 252 seconds) |
| 2021-07-09 17:15:30 | <maerwald> | compare foldl and foldr when using (-) |
| 2021-07-09 17:15:45 | → | yauhsien joins (~yauhsien@61-231-39-135.dynamic-ip.hinet.net) |
| 2021-07-09 17:15:46 | <maerwald> | then check how laziness works for || |
| 2021-07-09 17:16:18 | <yin[m]> | foldl actually starts _evaluating_ from the right |
| 2021-07-09 17:16:34 | <yin[m]> | right? |
| 2021-07-09 17:16:44 | <monochrom> | No. |
| 2021-07-09 17:16:57 | <monochrom> | err, yes. |
| 2021-07-09 17:17:07 | <maerwald> | you build all the thunks through the list before you apply the first function |
| 2021-07-09 17:17:38 | → | Atum_ joins (~IRC@user/atum/x-2392232) |
| 2021-07-09 17:18:09 | → | roconnor joins (~roconnor@host-45-58-230-126.dyn.295.ca) |
| 2021-07-09 17:19:06 | <maerwald> | and at that time your `cycle` has already killed the cat |
| 2021-07-09 17:19:31 | <monochrom> | cycle killed the cat. foldr brought it back! |
| 2021-07-09 17:19:32 | × | roconnor_ quits (~roconnor@host-104-157-226-103.dyn.295.ca) (Ping timeout: 252 seconds) |
| 2021-07-09 17:19:38 | <maerwald> | :> |
| 2021-07-09 17:20:50 | → | phma joins (phma@2001:0:c38c:c38c:207c:8189:bcd3:2f32) |
| 2021-07-09 17:23:23 | × | MoC quits (~moc@user/moc) (Quit: Konversation terminated!) |
| 2021-07-09 17:24:52 | × | viluon quits (uid453725@id-453725.brockwell.irccloud.com) (Quit: Connection closed for inactivity) |
| 2021-07-09 17:25:13 | → | phma_ joins (phma@2001:5b0:211b:d008:d38:3ff9:8a1d:e053) |
| 2021-07-09 17:25:14 | × | phma quits (phma@2001:0:c38c:c38c:207c:8189:bcd3:2f32) (Ping timeout: 255 seconds) |
| 2021-07-09 17:28:34 | <zzz> | :) |
| 2021-07-09 17:31:50 | × | chomwitt quits (~Pitsikoko@ppp-94-67-202-202.home.otenet.gr) (Ping timeout: 265 seconds) |
| 2021-07-09 17:34:34 | × | chris-th_ quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-07-09 17:37:14 | × | eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:44e3:e9f0:ea4d:f039) (Remote host closed the connection) |
| 2021-07-09 17:37:19 | → | chris-the-slurpa joins (~chris@81.96.113.213) |
| 2021-07-09 17:37:20 | × | chris-the-slurpa quits (~chris@81.96.113.213) (Read error: Connection reset by peer) |
| 2021-07-09 17:37:32 | → | chris-the-slurpa joins (~chris@81.96.113.213) |
| 2021-07-09 17:37:58 | × | chris-the-slurpa quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-07-09 17:42:38 | → | eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:39f3:da:7ab8:bc1e) |
| 2021-07-09 17:43:07 | → | chris-the-slurpa joins (~chris@81.96.113.213) |
| 2021-07-09 17:44:47 | × | chris-the-slurpa quits (~chris@81.96.113.213) (Remote host closed the connection) |
| 2021-07-09 17:45:15 | → | lavaman joins (~lavaman@98.38.249.169) |
| 2021-07-09 17:45:19 | → | chris-the-slurpa joins (~chris@81.96.113.213) |
| 2021-07-09 17:45:55 | × | Reyu[M] quits (~reyureyuz@matrix.reyuzenfold.com) (Remote host closed the connection) |
| 2021-07-09 17:47:05 | × | ukari quits (~ukari@user/ukari) (Remote host closed the connection) |
| 2021-07-09 17:47:31 | → | mikail joins (~mikail@2a02:c7f:bd83:fd00:55cf:122f:957a:f66f) |
All times are in UTC.