Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-26 08:03:38 <koz_> jle`: Rofl.
2020-11-26 08:03:38 <dminuoso> `dimap id id id` is slightly more running
2020-11-26 08:03:43 <dminuoso> cunning.
2020-11-26 08:03:44 vg joins (~vg@139.59.59.230)
2020-11-26 08:03:47 <jle`> dimap id id wouldn't work i think
2020-11-26 08:03:54 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id]
2020-11-26 08:03:54 <yahb> jle`: [10,10,10]
2020-11-26 08:04:08 × vg quits (~vg@139.59.59.230) (Client Quit)
2020-11-26 08:04:20 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10]
2020-11-26 08:04:20 <yahb> jle`: [10,10,10,10]
2020-11-26 08:04:28 vg joins (~vg@139.59.59.230)
2020-11-26 08:05:13 <incertia> const 10 the big brain id
2020-11-26 08:05:30 <dminuoso> % :t fix ($)
2020-11-26 08:05:31 <yahb> dminuoso: forall {a} {b}. a -> b
2020-11-26 08:05:33 <dminuoso> Mmm.
2020-11-26 08:05:42 acowley joins (~acowley@c-68-83-22-43.hsd1.nj.comcast.net)
2020-11-26 08:05:54 × Guest77209 quits (5fa448e7@95.164.72.231) (Ping timeout: 245 seconds)
2020-11-26 08:06:10 <jle`> how to heat up a CPU
2020-11-26 08:06:34 <dminuoso> Yeah. Who said pure code didn't have side effects.
2020-11-26 08:07:00 <incertia> oh god you can't even C-c out of it
2020-11-26 08:07:23 <incertia> that's so cursed
2020-11-26 08:07:30 <koz_> LOL
2020-11-26 08:07:47 jonathanx joins (~jonathan@dyn-8-sc.cdg.chalmers.se)
2020-11-26 08:07:58 <jle`> % fix($)fix
2020-11-26 08:08:03 <yahb> jle`: [Timed out]
2020-11-26 08:08:43 <dminuoso> :t fix (const fix)
2020-11-26 08:08:44 <lambdabot> (a -> a) -> a
2020-11-26 08:08:51 <dminuoso> Okay that looks like something now
2020-11-26 08:09:49 <dminuoso> % fix (const fix) $ \t -> (1, fst t + 1)
2020-11-26 08:09:49 <yahb> dminuoso: (1,2)
2020-11-26 08:09:58 <dminuoso> Great. So we have a more elaborate way of doing fix
2020-11-26 08:09:58 × vg quits (~vg@139.59.59.230) (Quit: vg)
2020-11-26 08:10:11 vg joins (~vg@139.59.59.230)
2020-11-26 08:10:40 <n0042> I'd like to take a moment to applaud whoever decided to name the Vector function `snoc`.
2020-11-26 08:10:41 alp joins (~alp@2a01:e0a:58b:4920:9554:f534:a35:4872)
2020-11-26 08:10:45 × vg quits (~vg@139.59.59.230) (Client Quit)
2020-11-26 08:10:49 <n0042> That is pretty swell.
2020-11-26 08:10:59 vg joins (~vg@139.59.59.230)
2020-11-26 08:11:04 <dminuoso> n0042: snoc is just cons in reverse
2020-11-26 08:11:09 <n0042> Exactly
2020-11-26 08:11:12 <jle`> yeah, it's instantly understandable :)
2020-11-26 08:11:12 <koz_> n0042: It's 100 IQ wordplay relative some of the stunts Edward pulls.
2020-11-26 08:11:15 <koz_> :t confusing
2020-11-26 08:11:16 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
2020-11-26 08:11:17 <lambdabot> Applicative f => LensLike (Data.Functor.Day.Curried.Curried (Data.Functor.Yoneda.Yoneda f) (Data.Functor.Yoneda.Yoneda f)) s t a b -> LensLike f s t a b
2020-11-26 08:11:32 vg joins (~vg@139.59.59.230)
2020-11-26 08:11:35 × vg quits (~vg@139.59.59.230) (Remote host closed the connection)
2020-11-26 08:11:38 <dminuoso> koz_: Haha, it took me a year to get why confusing was called confusing
2020-11-26 08:11:43 <dminuoso> Then it hit me
2020-11-26 08:12:00 <dminuoso> lens is filled with so many puns
2020-11-26 08:12:10 <koz_> Or, alternatively, Joker and Clown.
2020-11-26 08:12:17 <koz_> (that's actually a two-level reference)
2020-11-26 08:12:56 <dminuoso> Well if you dont know Stealers Wheels
2020-11-26 08:13:30 <dminuoso> The curious thing though is
2020-11-26 08:13:34 <dminuoso> % :t const fix
2020-11-26 08:13:34 <yahb> dminuoso: b -> (a -> a) -> a
2020-11-26 08:13:36 <dminuoso> % :t fix
2020-11-26 08:13:37 <yahb> dminuoso: (a -> a) -> a
2020-11-26 08:13:44 × Lord_of_Life quits (~Lord@46.217.221.184) (Changing host)
2020-11-26 08:13:44 Lord_of_Life joins (~Lord@unaffiliated/lord-of-life/x-0885362)
2020-11-26 08:13:52 <dminuoso> Ah I guess `b ~ (a -> a) -> a`
2020-11-26 08:14:38 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 265 seconds)
2020-11-26 08:14:44 <jle`> fix (const x) = x
2020-11-26 08:14:50 <jle`> % fix (const "hello")
2020-11-26 08:14:50 <yahb> jle`: "hello"
2020-11-26 08:15:11 <dminuoso> % :t fix . const
2020-11-26 08:15:11 <yahb> dminuoso: c -> c
2020-11-26 08:15:13 <dminuoso> There we go!
2020-11-26 08:15:20 <jle`> neato
2020-11-26 08:15:48 <jle`> % Prelude.map ($ 10) [unsafeCoerce, flip const unsafeCoerce, dimap id id id, const 10, fix . const]
2020-11-26 08:15:48 <yahb> jle`: [10,10,10,10,10]
2020-11-26 08:15:54 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
2020-11-26 08:16:10 × chkno quits (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
2020-11-26 08:16:19 chkno joins (~chkno@75-7-2-127.lightspeed.sntcca.sbcglobal.net)
2020-11-26 08:16:20 <koz_> Procrastination a la #haskell.
2020-11-26 08:17:18 <aplainzetakind> I'm trying get a handle on conditional compilation with cabal flags by means of an over-architectured advent of code project: https://gist.github.com/aplainzetakind/ba5b0fa3af4ef7f3deec77c5e025b746 trying to build this, cabal tells me this module imports itself. Why does this happen? (Removing CPP and commenting out ifdefs works fine.)
2020-11-26 08:17:39 <jle`> woo hoo, over-architected advent of code projects
2020-11-26 08:18:18 <jophish> No semigroup instance for Product :(
2020-11-26 08:18:24 <jophish> (Data.Functor.Product.Product)
2020-11-26 08:18:29 <koz_> jle` is uniquely qualified to talk about this!
2020-11-26 08:18:34 <koz_> jophish: I think you want a different Product.
2020-11-26 08:18:45 <jophish> koz_: I do?
2020-11-26 08:18:52 <jophish> thank you
2020-11-26 08:19:07 <koz_> jophish: I _assume_ you're after the monoid (*, 1)?
2020-11-26 08:19:28 <jophish> nope, in fact I'm quite sure that one has a semigroup instance!!!
2020-11-26 08:19:41 <dminuoso> What would the implementation be?
2020-11-26 08:19:45 <koz_> OK, well, I'm unsure what instance you're expecting this one to have.
2020-11-26 08:19:52 <jophish> Pair a1 b1 <> Pair a2 b2 = Pair (a1 <> a2) (b1 <> b2)
2020-11-26 08:20:03 <jle`> Pair x1 y1 <> Pair x2 y2 = Pair (x1 <> x2) (y1 <> y2)
2020-11-26 08:20:09 <jle`> ah beat me to it
2020-11-26 08:20:13 <koz_> Jinx!
2020-11-26 08:20:15 <jophish> you typed it very fast!
2020-11-26 08:20:44 <dminuoso> Probably forgotten then? Make a merge request .
2020-11-26 08:20:49 <jle`> yeah, there should really be one
2020-11-26 08:21:09 <dminuoso> (MonadZip f, MonadZip g) => MonadZip (Product f g)
2020-11-26 08:21:32 <jle`> i think there is the approriate Alt instance
2020-11-26 08:21:33 koz_ wishes it was ApplicativeZip
2020-11-26 08:21:55 <dminuoso> Together with ApplicativeComprehensions?
2020-11-26 08:22:31 <koz_> dminuoso: This.
2020-11-26 08:22:40 royal_screwup21 joins (52254809@gateway/web/cgi-irc/kiwiirc.com/ip.82.37.72.9)

All times are in UTC.