Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→
Page 1 .. 731 732 733 734 735 736 737 738 739 740 741 .. 5022
502,152 events total
2020-10-19 11:55:15 <merijn> unfixpoint: Incidentally Data.Monoid has two newtypes for Bool to get a monoid
2020-10-19 11:55:27 <merijn> unfixpoint: "Any" and "All"
2020-10-19 11:55:27 × knupfer quits (~Thunderbi@dynamic-046-114-151-029.46.114.pool.telefonica.de) (Read error: Connection reset by peer)
2020-10-19 11:55:29 <unfixpoint> It's not `Bool` there ;)
2020-10-19 11:55:44 <merijn> > Any True <> Any False
2020-10-19 11:55:46 <lambdabot> Any {getAny = True}
2020-10-19 11:55:47 <dminuoso> unfixpoint: Right. Recall, a traversal/foldable has 0-to-many targets.
2020-10-19 11:55:55 <dminuoso> unfixpoint: so now:
2020-10-19 11:55:55 <merijn> > All True <> All False
2020-10-19 11:55:57 <lambdabot> All {getAll = False}
2020-10-19 11:55:58 hackage jsonifier 0.1.0.3 - Fast and simple JSON encoding toolkit https://hackage.haskell.org/package/jsonifier-0.1.0.3 (NikitaVolkov)
2020-10-19 11:55:58 <dminuoso> ix :: Index m -> Traversal' m (IxValue m)
2020-10-19 11:56:12 <unfixpoint> The probably actually occurs with a `data`-type and I'm using `ix 0 . entryBla .= xxx` and `view (ix 0 . entryBla)` etc.
2020-10-19 11:56:36 <dminuoso> unfixpoint: ^- now because this produces a Traversal, which could have many targets or none, the view implementation demands a monoid
2020-10-19 11:56:51 <unfixpoint> Is there a way, or should I just implement a Monoid instance?
2020-10-19 11:57:01 <dminuoso> unfixpoint: you could just use toListOf instead
2020-10-19 11:57:06 <merijn> unfixpoint: There already is one as I pointed out :p
2020-10-19 11:57:14 <merijn> Well, two, actually
2020-10-19 11:57:24 × MindlessDrone quits (~MindlessD@unaffiliated/mindlessdrone) (Ping timeout: 260 seconds)
2020-10-19 11:58:04 <dminuoso> unfixpoint: So what you could do:
2020-10-19 11:58:08 <unfixpoint> For Bool yeah, but not for the actual type. I just used Bool as example
2020-10-19 11:58:22 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
2020-10-19 11:58:34 geekosaur joins (ac3a8cd5@172.58.140.213)
2020-10-19 11:58:52 <dminuoso> % [True, False, True] ^. ix 1
2020-10-19 11:58:53 <yahb> dminuoso: ; <interactive>:84:24: error:; * No instance for (Monoid Bool) arising from a use of `ix'; * In the second argument of `(^.)', namely `ix 1'; In the expression: [True, False, True] ^. ix 1; In an equation for `it': it = [True, False, True] ^. ix 1
2020-10-19 11:58:55 <dminuoso> % [True, False, True] ^. ix 1 . to Any
2020-10-19 11:58:55 <yahb> dminuoso: Any {getAny = False}
2020-10-19 11:58:58 <dminuoso> unfixpoint: ^- there
2020-10-19 11:59:03 <dminuoso> You can also use `ala` if you like
2020-10-19 11:59:37 <dminuoso> unfixpoint: ah. if you want this to work with anything, use toListOf instead.
2020-10-19 11:59:43 <dminuoso> And accept the fact that you cant view through a traversa
2020-10-19 11:59:53 <dminuoso> (The fact this works at all is surprising and disliked by some)
2020-10-19 11:59:59 <merijn> Or use First
2020-10-19 12:00:01 × manishearth1 quits (~manishear@195.206.169.184) ()
2020-10-19 12:00:05 <merijn> and/or Last
2020-10-19 12:00:34 <merijn> > First (Just 1) <> First (Just 2) <> First (Just 3)
2020-10-19 12:00:38 <lambdabot> First {getFirst = Just 1}
2020-10-19 12:01:05 MindlessDrone joins (~MindlessD@unaffiliated/mindlessdrone)
2020-10-19 12:02:40 × lep-delete quits (~lep@94.31.82.44) (Ping timeout: 265 seconds)
2020-10-19 12:03:05 × err quits (b9749498@185.116.148.152) (Remote host closed the connection)
2020-10-19 12:03:28 <unfixpoint> Yeah, First makes most sense. I don't want to convert it to list as I only care about a certain index
2020-10-19 12:03:50 heatsink joins (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net)
2020-10-19 12:04:40 <unfixpoint> Maybe I should just use `(!0) <$> get` and not use lens for the array access.
2020-10-19 12:06:03 × Unhammer quits (~Unhammer@gateway/tor-sasl/unhammer) (Ping timeout: 240 seconds)
2020-10-19 12:06:27 urodna joins (~urodna@unaffiliated/urodna)
2020-10-19 12:07:01 × da39a3ee5e6b4b0d quits (~textual@n11211935170.netvigator.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-19 12:07:54 da39a3ee5e6b4b0d joins (~textual@n11211935170.netvigator.com)
2020-10-19 12:08:30 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 272 seconds)
2020-10-19 12:08:56 <unfixpoint> `use (ix i . entryBla)` would be so much nicer than `_entryBla . (!i) <$> get` heh
2020-10-19 12:09:12 djellemah joins (~djellemah@2601:5c2:100:96c:e008:b638:39fe:6a54)
2020-10-19 12:10:08 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-10-19 12:11:02 × Maxdamantus quits (~Maxdamant@unaffiliated/maxdamantus) (Ping timeout: 272 seconds)
2020-10-19 12:11:11 Tario joins (~Tario@201.192.165.173)
2020-10-19 12:11:20 × Stanley00 quits (~stanley00@unaffiliated/stanley00) (Remote host closed the connection)
2020-10-19 12:12:30 Maxdamantus joins (~Maxdamant@unaffiliated/maxdamantus)
2020-10-19 12:12:33 × codygman quits (~codygman@47-184-107-46.dlls.tx.frontiernet.net) (Read error: Connection reset by peer)
2020-10-19 12:12:53 codygman joins (~codygman@47-184-107-46.dlls.tx.frontiernet.net)
2020-10-19 12:13:31 × Kaivo quits (~Kaivo@ec2-15-222-231-32.ca-central-1.compute.amazonaws.com) (Ping timeout: 246 seconds)
2020-10-19 12:14:59 Unhammer joins (~Unhammer@gateway/tor-sasl/unhammer)
2020-10-19 12:15:27 × karanlikmadde quits (~karanlikm@2a01:c22:a46a:b400:3c0d:995b:be0c:192) (Quit: karanlikmadde)
2020-10-19 12:15:43 christo joins (~chris@81.96.113.213)
2020-10-19 12:16:05 Kaivo joins (~Kaivo@104-200-86-99.mc.derytele.com)
2020-10-19 12:17:17 break_point joins (~user@93.177.73.90)
2020-10-19 12:18:00 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-10-19 12:19:29 × tersetears[m] quits (tersetears@gateway/shell/matrix.org/x-idycfalifvfectvy) (Quit: authenticating)
2020-10-19 12:19:38 tersetears[m] joins (tersetears@gateway/shell/matrix.org/x-oyfdvgnkfjkfeqwt)
2020-10-19 12:20:14 avn joins (~avn@78-56-108-78.static.zebra.lt)
2020-10-19 12:20:53 × tersetears[m] quits (tersetears@gateway/shell/matrix.org/x-oyfdvgnkfjkfeqwt) (Client Quit)
2020-10-19 12:21:03 tersetears[m] joins (tersetears@gateway/shell/matrix.org/x-pldppmjclmpzqaog)
2020-10-19 12:23:45 × unfixpoint quits (550112fd@253.18.1.85.dynamic.wline.res.cust.swisscom.ch) (Remote host closed the connection)
2020-10-19 12:29:32 × toorevitimirp quits (~tooreviti@117.182.180.0) (Ping timeout: 256 seconds)
2020-10-19 12:30:56 christo joins (~chris@81.96.113.213)
2020-10-19 12:31:20 × avoandmayo quits (~textual@122-58-158-238-adsl.sparkbb.co.nz) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-19 12:31:33 drbean joins (~drbean@TC210-63-209-68.static.apol.com.tw)
2020-10-19 12:36:54 × break_point quits (~user@93.177.73.90) (Remote host closed the connection)
2020-10-19 12:41:46 ski joins (~ski@nc-2504-30.studat.chalmers.se)
2020-10-19 12:43:49 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
2020-10-19 12:45:02 × fendor quits (~fendor@e237-037.eduroam.tuwien.ac.at) (Quit: Leaving)
2020-10-19 12:48:57 mmkarakaya joins (b0584711@gateway/web/cgi-irc/kiwiirc.com/ip.176.88.71.17)
2020-10-19 12:52:14 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
2020-10-19 12:52:36 totallynotnate joins (~nate@110.138.18.157)
2020-10-19 12:52:41 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
2020-10-19 12:52:43 × Buntspecht quits (~user@unaffiliated/siracusa) (Quit: Bye!)
2020-10-19 12:52:56 Whez joins (~textual@2a01:e0a:21f:1060:d47a:6e97:3e60:fddf)
2020-10-19 12:54:47 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
2020-10-19 12:56:31 × Amras quits (~Amras@unaffiliated/amras0000) (Ping timeout: 272 seconds)
2020-10-19 12:57:23 Amras joins (~Amras@unaffiliated/amras0000)
2020-10-19 12:57:35 nbloomf joins (~nbloomf@2600:1700:ad14:3020:e14d:f5f1:4984:f268)
2020-10-19 12:57:47 × Whez quits (~textual@2a01:e0a:21f:1060:d47a:6e97:3e60:fddf) (Ping timeout: 272 seconds)
2020-10-19 12:58:44 <dminuoso> @tell unfixpoint the lens-y way of (!0) is to use unsafeSingular which says "This looks like a traversal, but I do promise it targets one and only one element. Burden of proof is on me. Make it a lens!"
2020-10-19 12:58:45 <lambdabot> Consider it noted.
2020-10-19 13:00:58 hackage clckwrks-plugin-redirect 0.0.1 - support redirects for CMS/Blogging in clckwrks https://hackage.haskell.org/package/clckwrks-plugin-redirect-0.0.1 (JeremyShaw)
2020-10-19 13:02:29 <dminuoso> @tell unfixpoint So you could also just say `use (unsafeSingular (ix 0))` - but then you have to ensure that `ix 0` definitely points at an element, or a bottom with 6 legs will crawl up on you.
2020-10-19 13:02:29 <lambdabot> Consider it noted.
2020-10-19 13:06:33 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:e14d:f5f1:4984:f268) (Quit: My MacBook has gone to sleep. ZZZzzz…)
2020-10-19 13:06:39 raichoo joins (~raichoo@dslb-188-100-014-089.188.100.pools.vodafone-ip.de)
2020-10-19 13:08:45 karanlikmadde joins (~karanlikm@2a01:c22:a46a:b400:3c0d:995b:be0c:192)
2020-10-19 13:09:41 Ariakenom_ joins (~Ariakenom@h-155-4-221-35.NA.cust.bahnhof.se)
2020-10-19 13:10:54 errst joins (~errst@unaffiliated/tirej)
2020-10-19 13:11:01 × errst quits (~errst@unaffiliated/tirej) (Client Quit)

All times are in UTC.