Logs: freenode/#haskell
| 2021-03-12 19:19:59 | <hololeap> | funky business |
| 2021-03-12 19:22:06 | → | Khisanth joins (~Khisanth@24.sub-174-244-147.myvzw.com) |
| 2021-03-12 19:22:48 | × | tromp quits (~tromp@dhcp-077-249-230-040.chello.nl) (Remote host closed the connection) |
| 2021-03-12 19:25:30 | × | jumper149 quits (~jumper149@ip185225.wh.uni-hannover.de) (Quit: WeeChat 3.0.1) |
| 2021-03-12 19:26:31 | × | takuan quits (~takuan@178-116-218-225.access.telenet.be) (Ping timeout: 265 seconds) |
| 2021-03-12 19:26:39 | × | heatsink quits (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) (Remote host closed the connection) |
| 2021-03-12 19:27:43 | → | notzmv joins (~zmv@unaffiliated/zmv) |
| 2021-03-12 19:28:07 | × | knupfer quits (~Thunderbi@200116b82c668700c9527be50386a639.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2021-03-12 19:29:29 | → | tromp joins (~tromp@dhcp-077-249-230-040.chello.nl) |
| 2021-03-12 19:31:24 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Quit: Connection closed) |
| 2021-03-12 19:31:44 | → | royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) |
| 2021-03-12 19:33:42 | × | geekosaur quits (82650c7a@130.101.12.122) (Ping timeout: 240 seconds) |
| 2021-03-12 19:33:45 | ← | Solid parts (~blyat@unaffiliated/solid-) ("WeeChat 3.1") |
| 2021-03-12 19:33:48 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 2021-03-12 19:34:37 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 2021-03-12 19:35:28 | → | coot joins (~coot@37.30.55.141.nat.umts.dynamic.t-mobile.pl) |
| 2021-03-12 19:36:18 | × | royal_screwup21 quits (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9) (Ping timeout: 245 seconds) |
| 2021-03-12 19:36:38 | × | Tops2 quits (~Tobias@dyndsl-095-033-024-175.ewe-ip-backbone.de) (Read error: Connection reset by peer) |
| 2021-03-12 19:37:58 | × | stree quits (~stree@68.36.8.116) (Ping timeout: 245 seconds) |
| 2021-03-12 19:44:46 | <hololeap> | which is considered the best style? `(\f -> bar . f) . foo` or `(bar .) . foo` or `fmap bar . foo` |
| 2021-03-12 19:46:44 | <hololeap> | it's kind of funny because they go in order from most visual overhead to least, but also in order from least mental overhead to most |
| 2021-03-12 19:48:05 | → | ezrakilty joins (~ezrakilty@75-172-115-167.tukw.qwest.net) |
| 2021-03-12 19:48:57 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 2021-03-12 19:49:06 | × | ixlun quits (~user@109.249.184.132) (Read error: Connection reset by peer) |
| 2021-03-12 19:50:01 | → | ixlun joins (~user@109.249.184.132) |
| 2021-03-12 19:50:19 | <monochrom> | Depends on the audience? Someone who's crazy about homset functors will love "fmap bar . foo", but how many people are like that? |
| 2021-03-12 19:50:19 | × | crobbins quits (~crobbins@2600:1700:48eb:8490:64e8:fb97:6b55:2a25) (Remote host closed the connection) |
| 2021-03-12 19:50:23 | → | stree joins (~stree@68.36.8.116) |
| 2021-03-12 19:51:34 | <ephemient> | isn't this the same as \x -> bar . foo x? that expression makes more sense to me than any of the previous 3 |
| 2021-03-12 19:51:51 | <monochrom> | Yeah. |
| 2021-03-12 19:52:03 | → | monadmatt joins (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) |
| 2021-03-12 19:52:07 | × | kayvan quits (~user@52-119-115-185.PUBLIC.monkeybrains.net) (Remote host closed the connection) |
| 2021-03-12 19:52:19 | → | rj joins (~x@gateway/tor-sasl/rj) |
| 2021-03-12 19:52:52 | × | ezrakilty quits (~ezrakilty@75-172-115-167.tukw.qwest.net) (Ping timeout: 276 seconds) |
| 2021-03-12 19:53:44 | <hololeap> | ok, well my example should have been `(\f -> bar . f) . foo . baz` |
| 2021-03-12 19:54:39 | <hololeap> | IRL: runFilters = (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold |
| 2021-03-12 19:55:09 | × | Guest64155 quits (~textual@zrcout.mskcc.org) (Ping timeout: 264 seconds) |
| 2021-03-12 19:56:07 | → | knupfer joins (~Thunderbi@200116b82c66870055c2ea10e2e0e610.dip.versatel-1u1.de) |
| 2021-03-12 19:56:15 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 246 seconds) |
| 2021-03-12 19:56:15 | <hololeap> | runKleisli is the only thing that takes an argument (Kleisli m a) and returns a function |
| 2021-03-12 19:56:28 | × | monadmatt quits (~user@119-17-128-101.771180.mel.nbn.aussiebb.net) (Ping timeout: 256 seconds) |
| 2021-03-12 19:57:58 | × | myShoggoth quits (~myShoggot@75.164.81.55) (Ping timeout: 245 seconds) |
| 2021-03-12 19:58:04 | <hololeap> | i'll just go with the first option for least mental overhead |
| 2021-03-12 19:58:59 | <monochrom> | How bad is \x y -> runMT (runK (getE (fold x))) y ? |
| 2021-03-12 19:59:03 | × | Kaiepi quits (~Kaiepi@47.54.252.148) (Remote host closed the connection) |
| 2021-03-12 19:59:14 | → | geekosaur joins (82650c7a@130.101.12.122) |
| 2021-03-12 19:59:32 | <monochrom> | or \x y -> runMT ((runK . getE . fold) x) y |
| 2021-03-12 20:00:07 | → | crobbins joins (~crobbins@2601:2c1:200:ec50:2da1:91bc:2113:a3e2) |
| 2021-03-12 20:00:09 | → | average joins (uid473595@gateway/web/irccloud.com/x-syihsbtugiothwsv) |
| 2021-03-12 20:00:47 | <monochrom> | See this is why people don't understand me when I say "I don't use (.) for pointfree, I use it for pipeline structure, and pointfree is so much more than (.) anyway" |
| 2021-03-12 20:01:20 | <monochrom> | So they set up a strawman attack "so you write like \x -> (f . g) x?" to ridicule me. |
| 2021-03-12 20:01:59 | <monochrom> | No, but I may write like \x y -> runMT ((runK . getE . fold) x) y or (\f -> runMaybeT . f) . runKleisli . getEndomorphism . fold |
| 2021-03-12 20:02:17 | <monochrom> | I am not your strawman. |
| 2021-03-12 20:02:21 | → | myShoggoth joins (~myShoggot@75.164.81.55) |
| 2021-03-12 20:02:35 | <hololeap> | i hope that's not directed at me |
| 2021-03-12 20:02:54 | <monochrom> | Not you. Their nickname starts with "c". |
| 2021-03-12 20:03:03 | <hololeap> | haha alright. |
| 2021-03-12 20:04:36 | <hololeap> | monochrom: but you're right that it could also be written that way |
| 2021-03-12 20:04:47 | <sparsity> | https://pastebin.com/raw/RmF5RnYq |
| 2021-03-12 20:05:02 | × | ep1ctetus_ quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Read error: Connection reset by peer) |
| 2021-03-12 20:05:03 | × | petersen quits (~petersen@redhat/juhp) (Ping timeout: 245 seconds) |
| 2021-03-12 20:05:44 | gitgoood | is now known as gitgood |
| 2021-03-12 20:05:45 | <hololeap> | if i had started out with the type signature i probably would have written it that way |
| 2021-03-12 20:05:58 | <monochrom> | :) |
| 2021-03-12 20:06:08 | <monochrom> | I think your version shows interesting piping too. |
| 2021-03-12 20:06:24 | <monochrom> | It's up to you. Both are explaining something. |
| 2021-03-12 20:06:45 | → | ep1ctetus joins (~epictetus@ip72-194-215-136.sb.sd.cox.net) |
| 2021-03-12 20:07:15 | → | petersen joins (~petersen@redhat/juhp) |
| 2021-03-12 20:07:56 | <sparsity> | im trying to convert the above code to a monadic streaming version, with ((Int,Int),) as the monad... not sure if it will work |
| 2021-03-12 20:08:22 | × | frozenErebus quits (~frozenEre@94.128.82.20) (Ping timeout: 256 seconds) |
| 2021-03-12 20:08:47 | → | wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
| 2021-03-12 20:08:57 | <sparsity> | appearing at; instance Nonempty f => Shaped (Int,Int) (Zipper (Tree f)) where |
| 2021-03-12 20:13:26 | <hololeap> | sparsity: which monad for ((Int,Int),) ? |
| 2021-03-12 20:13:28 | × | wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 256 seconds) |
| 2021-03-12 20:13:52 | <hololeap> | @unmtl Writer (Int,Int) a |
| 2021-03-12 20:13:52 | <lambdabot> | (a, Int, Int) |
| 2021-03-12 20:14:03 | <hololeap> | but Writer needs a Monoid |
| 2021-03-12 20:15:42 | <sparsity> | I just mean that instead of obtaining eg. (IO a,ListM IO a) on doing monadic uncons on an IO List, which is monadic (IO), here geti returns (((Int,Int),a),Tree f a), so instead of `IO a' its ((Int,Int),a) |
| 2021-03-12 20:16:56 | → | Deide joins (~Deide@217.155.19.23) |
| 2021-03-12 20:17:31 | <sparsity> | ie. capturing "shaped" traversals within monadic traversals |
| 2021-03-12 20:18:01 | <sparsity> | not sure if ListT actually needs its parameter to be Monadic... |
| 2021-03-12 20:19:33 | <hololeap> | not gonna lie, i find the code you pasted very confusing. but you might be looking for LogicT instead of ListT ... ? |
| 2021-03-12 20:20:12 | <sparsity> | the ListT i mean is defined here; https://github.com/fog-hs/clock-scanner/blob/master/ListT.hs |
| 2021-03-12 20:20:46 | <sparsity> | it isnt used in the paste above |
| 2021-03-12 20:21:13 | <sparsity> | that just uses ((Int,Int),) directly via the Shaped class instance for Tree |
| 2021-03-12 20:21:49 | × | ep1ctetus quits (~epictetus@ip72-194-215-136.sb.sd.cox.net) (Quit: Leaving) |
| 2021-03-12 20:22:06 | <sparsity> | but I wonder if i can capture that in the LinearM framework of implemented by ListT above |
| 2021-03-12 20:22:46 | <sparsity> | so that just as I can have streaming in IO, i could instead have the shape index as the context |
| 2021-03-12 20:23:31 | → | Alleria joins (~textual@2603-7000-3040-0000-b05d-e0a9-84ee-9eef.res6.spectrum.com) |
| 2021-03-12 20:23:47 | <sparsity> | so that streaming over the tree is possible, where the "shape" is stored in this wrapper to the `a' retrived at the head (which is `m a' when using ListT m) |
| 2021-03-12 20:23:54 | Alleria | is now known as Guest48052 |
| 2021-03-12 20:25:05 | <sparsity> | getM :: Monad m => StateM m (f m a) a |
| 2021-03-12 20:25:44 | <sparsity> | type StateM m s a = s -> m (Maybe (a, s)) |
| 2021-03-12 20:26:21 | <sparsity> | comparing with the type of geti gives m~(,) i |
| 2021-03-12 20:27:24 | → | heatsink joins (~heatsink@2600:1700:bef1:5e10:c79:3d13:d977:c947) |
| 2021-03-12 20:29:27 | → | pera joins (~pera@unaffiliated/pera) |
| 2021-03-12 20:30:35 | <sparsity> | seems almost like setting m as a State monad, with the shape index `i' as the state |
| 2021-03-12 20:31:42 | <sparsity> | the resulting carry during traversal is provided with these indexes, eg so that a carried copy can be updated and used to replace the values to give the comonad |
| 2021-03-12 20:32:07 | × | rj quits (~x@gateway/tor-sasl/rj) (Ping timeout: 268 seconds) |
| 2021-03-12 20:32:17 | <sparsity> | (since State during traverse gives mapAccum which has the carry) |
All times are in UTC.