Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2021-03-15 12:58:23 × bennofs__ quits (~quassel@dslb-188-103-037-063.188.103.pools.vodafone-ip.de) (Ping timeout: 245 seconds)
2021-03-15 13:00:14 × epstein quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Ping timeout: 256 seconds)
2021-03-15 13:00:30 Major_Biscuit joins (~Major_Bis@82-169-100-198.biz.kpn.net)
2021-03-15 13:00:48 Tario joins (~Tario@201.192.165.173)
2021-03-15 13:00:53 × isson quits (1b7769ae@27.119.105.174) (Quit: Connection closed)
2021-03-15 13:01:04 × coot quits (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
2021-03-15 13:01:56 bergey` joins (~user@pool-74-108-99-127.nycmny.fios.verizon.net)
2021-03-15 13:03:30 epstein joins (~dwsjeid91@2a00:801:3f8:23a5:cea1:f987:d427:ba9b)
2021-03-15 13:03:51 bennofs_ joins (~quassel@dslb-094-222-035-180.094.222.pools.vodafone-ip.de)
2021-03-15 13:04:27 ubert joins (~Thunderbi@p200300ecdf25d935e6b318fffe838f33.dip0.t-ipconnect.de)
2021-03-15 13:05:12 × mirrorb2rd quits (~dwsjeid91@185.204.1.223) (Read error: Connection reset by peer)
2021-03-15 13:05:47 hyperisco joins (~hyperisco@d192-186-117-226.static.comm.cgocable.net)
2021-03-15 13:06:15 × jumper149 quits (~jumper149@ip185225.wh.uni-hannover.de) (Quit: WeeChat 3.1)
2021-03-15 13:06:57 mirrorb2rd joins (dwsjeid911@gateway/vpn/mullvad/dwsjeid911)
2021-03-15 13:07:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:07:26 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:07:32 ADG1089__ joins (~aditya@122.163.232.170)
2021-03-15 13:07:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-15 13:08:05 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-15 13:08:06 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:08:27 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:08:34 gitgood joins (~gitgood@80-44-12-39.dynamic.dsl.as9105.com)
2021-03-15 13:09:45 × epstein quits (~dwsjeid91@2a00:801:3f8:23a5:cea1:f987:d427:ba9b) (Ping timeout: 265 seconds)
2021-03-15 13:11:43 × ubert quits (~Thunderbi@p200300ecdf25d935e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
2021-03-15 13:11:54 jumper149 joins (~jumper149@ip185225.wh.uni-hannover.de)
2021-03-15 13:12:45 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 246 seconds)
2021-03-15 13:13:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:13:26 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:14:00 bitmapper joins (uid464869@gateway/web/irccloud.com/x-sowvivaeecbildoj)
2021-03-15 13:14:35 × ephemient quits (uid407513@gateway/web/irccloud.com/x-fipeqpvxkwvjfhxb) (Quit: Connection closed for inactivity)
2021-03-15 13:15:39 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-15 13:16:07 <__minoru__shirae> anyway, in the meantime, while I don't have an intuition of those things, the rule of thumb is
2021-03-15 13:16:23 <__minoru__shirae> if you have a regular value and a regular function, you apply it
2021-03-15 13:16:45 <__minoru__shirae> if you have a functor, applicative, or a monad and a regular function, you use fmap
2021-03-15 13:16:48 × iomonad quits (~iomonad@unaffiliated/iomonad) (Ping timeout: 265 seconds)
2021-03-15 13:17:07 <__minoru__shirae> if you have a monad and a kleisli arrow, you use bind
2021-03-15 13:18:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:18:27 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:19:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:19:07 iomonad joins (~iomonad@unaffiliated/iomonad)
2021-03-15 13:19:28 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:20:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:20:28 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:20:38 × bennofs_ quits (~quassel@dslb-094-222-035-180.094.222.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
2021-03-15 13:21:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:21:27 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:21:54 <__minoru__shirae> if you have an applicative and a regular function, you can use applicative style, it will be analogous to using fmap
2021-03-15 13:22:05 × gzj quits (~gzj@unaffiliated/gzj) (Remote host closed the connection)
2021-03-15 13:22:11 alx741 joins (~alx741@181.196.68.64)
2021-03-15 13:22:27 gzj joins (~gzj@unaffiliated/gzj)
2021-03-15 13:22:58 <__minoru__shirae> if you have a monad and a regular function, you can use bind with return, but fmap is simpler
2021-03-15 13:23:05 × gzj quits (~gzj@unaffiliated/gzj) (Read error: Connection reset by peer)
2021-03-15 13:23:30 × ADG1089__ quits (~aditya@122.163.232.170) (Remote host closed the connection)
2021-03-15 13:25:19 × son0p quits (~son0p@181.58.39.182) (Quit: Lost terminal)
2021-03-15 13:25:26 <toasty_avocado[m> Can someone explain what `fold` does? I'm new to functional programming and am unfamiliar with this concept. My understanding is it i applies a function to a data structure recursively?
2021-03-15 13:25:47 <hyperisco> toasty_avocado[m, do you know what foldr does?
2021-03-15 13:26:06 <toasty_avocado[m> Not exactly other than it does the same thing on the right side?
2021-03-15 13:26:28 <hyperisco> fold, foldl, and foldr are not quite the same
2021-03-15 13:26:43 <jumper149> foldl and foldr take a function argument
2021-03-15 13:26:48 <hyperisco> > foldr f z [1,2,3,4,5]
2021-03-15 13:26:51 <lambdabot> f 1 (f 2 (f 3 (f 4 (f 5 z))))
2021-03-15 13:26:58 <jumper149> fold uses a Monoid instance instead
2021-03-15 13:27:11 <hyperisco> fold = foldr mappend mempty
2021-03-15 13:27:24 <jumper149> @src fold
2021-03-15 13:27:24 <lambdabot> Source not found. My brain just exploded
2021-03-15 13:27:44 <jumper149> rip lambdabot
2021-03-15 13:27:50 <toasty_avocado[m> T.T
2021-03-15 13:27:58 <toasty_avocado[m> thanks for the explanation!
2021-03-15 13:28:18 × mirrorb2rd quits (dwsjeid911@gateway/vpn/mullvad/dwsjeid911) (Ping timeout: 260 seconds)
2021-03-15 13:28:38 <hyperisco> > (fold (Just "hello sailor!"), fold Nothing)
2021-03-15 13:28:40 <lambdabot> ("hello sailor!",())
2021-03-15 13:28:45 <hyperisco> whoops
2021-03-15 13:28:52 <hyperisco> > fold (Nothing :: Maybe String)
2021-03-15 13:28:54 <lambdabot> ""
2021-03-15 13:28:57 <hyperisco> a common way I use it
2021-03-15 13:29:13 <toasty_avocado[m> Thanks!
2021-03-15 13:30:28 <hyperisco> Maybe A is A plus one value, and if A has a Monoid instance you can take it back to simply A
2021-03-15 13:30:44 <hyperisco> mapping Nothing to mempty and Just a to a
2021-03-15 13:31:07 heatsink joins (~heatsink@2600:1700:bef1:5e10:7c0e:3b57:dfb:2cb4)
2021-03-15 13:35:26 × heatsink quits (~heatsink@2600:1700:bef1:5e10:7c0e:3b57:dfb:2cb4) (Ping timeout: 264 seconds)
2021-03-15 13:37:25 <__minoru__shirae> I think I'm getting somewhere. Let's say we created a new language, and regular functions in that language translate to kleisli arrows in haskell
2021-03-15 13:37:56 <__minoru__shirae> then that language's fmap would translate to haskell's bind
2021-03-15 13:38:42 × codygman__ quits (~user@47.186.207.161) (Remote host closed the connection)
2021-03-15 13:38:52 berberman joins (~berberman@unaffiliated/berberman)
2021-03-15 13:39:00 codygman__ joins (~user@47.186.207.161)
2021-03-15 13:39:20 × seveg_ quits (~gabriel@2a02-ab04-0249-8d00-dea6-32ff-fe17-0993.dynamic.v6.chello.sk) (Quit: WeeChat 3.0)
2021-03-15 13:39:25 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
2021-03-15 13:39:36 × maop quits (~maop@195.140.213.38) (Remote host closed the connection)
2021-03-15 13:40:00 seveg joins (~gabriel@2a02-ab04-0249-8d00-dea6-32ff-fe17-0993.dynamic.v6.chello.sk)
2021-03-15 13:40:29 × berberman_ quits (~berberman@unaffiliated/berberman) (Ping timeout: 272 seconds)
2021-03-15 13:42:28 nhs joins (~nhs@cpe-70-113-67-118.austin.res.rr.com)
2021-03-15 13:43:06 <__minoru__shirae> but what would that language's bind translate to? a bind for a monad stack.
2021-03-15 13:43:16 × codygman__ quits (~user@47.186.207.161) (Remote host closed the connection)
2021-03-15 13:43:29 × royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed)
2021-03-15 13:43:38 codygman__ joins (~user@47.186.207.161)
2021-03-15 13:43:38 × drbean quits (~drbean@TC210-63-209-218.static.apol.com.tw) (Quit: ZNC 1.8.2+cygwin2 - https://znc.in)
2021-03-15 13:43:48 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)
2021-03-15 13:47:07 bergey` is now known as bergey
2021-03-15 13:47:50 codygman` joins (~user@209.251.131.98)
2021-03-15 13:49:13 <__minoru__shirae> no, regular function application would translate to bind, and fmap would translate to something else

All times are in UTC.