Logs: freenode/#haskell
| 2020-09-20 23:19:01 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-09-20 23:19:35 | × | Jeanne-Kamikaze quits (~Jeanne-Ka@104.200.129.62) (Quit: Leaving) |
| 2020-09-20 23:20:29 | × | Guest39453 quits (43aa4b1c@c-67-170-75-28.hsd1.wa.comcast.net) (Remote host closed the connection) |
| 2020-09-20 23:20:58 | → | cyphase joins (~cyphase@unaffiliated/cyphase) |
| 2020-09-20 23:28:29 | × | ph88 quits (~ph88@2a02:8109:9e40:2704:b503:e755:2c19:955c) (Ping timeout: 272 seconds) |
| 2020-09-20 23:30:14 | <orion> | tomsmeding: type instance MethodState UpdateNow = AppState |
| 2020-09-20 23:34:51 | → | sepi joins (49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) |
| 2020-09-20 23:36:12 | × | pera quits (~pera@unaffiliated/pera) (Ping timeout: 272 seconds) |
| 2020-09-20 23:42:14 | × | sepi quits (49dc4892@c-73-220-72-146.hsd1.ca.comcast.net) (Remote host closed the connection) |
| 2020-09-20 23:45:21 | × | falafel quits (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Remote host closed the connection) |
| 2020-09-20 23:46:45 | → | falafel joins (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) |
| 2020-09-20 23:49:15 | × | opticblast quits (~june@075-128-229-153.res.spectrum.com) (Quit: leaving) |
| 2020-09-20 23:49:21 | → | jedws joins (~jedws@121.209.139.222) |
| 2020-09-20 23:49:37 | <orion> | tomsmeding: I got it! All I had to do was change the type signature to this: update :: (UpdateEvent event, MethodState event ~ AppState, MonadIO m, MonadTime m) |
| 2020-09-20 23:49:39 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-20 23:50:07 | <orion> | Thank you for your assistance. |
| 2020-09-20 23:52:43 | → | MorrowM joins (~max@bzq-110-168-31-106.red.bezeqint.net) |
| 2020-09-20 23:53:10 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
| 2020-09-20 23:53:20 | × | falafel quits (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Remote host closed the connection) |
| 2020-09-20 23:53:57 | → | falafel joins (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) |
| 2020-09-20 23:54:34 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 272 seconds) |
| 2020-09-20 23:57:51 | → | cipherchess joins (~oned4@151.51.54.223) |
| 2020-09-20 23:58:07 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:10e:bca5:1dcc:68c6) |
| 2020-09-20 23:58:14 | → | polyrain joins (~polyrain@2001:8003:e501:6901:3846:7fa4:c749:eb08) |
| 2020-09-21 00:00:01 | × | romtam quits (~romtam@s91904426.blix.com) () |
| 2020-09-21 00:00:10 | × | atk quits (~Arch-TK@ircpuzzles/staff/Arch-TK) (Quit: Well this is unexpected.) |
| 2020-09-21 00:00:32 | <cipherchess> | In cabal, what is the difference between v2- and new-? Which one should I use? |
| 2020-09-21 00:00:50 | → | wroathe joins (~wroathe@c-73-24-27-54.hsd1.mn.comcast.net) |
| 2020-09-21 00:00:54 | × | gmt quits (~gmt@pool-71-105-108-44.nycmny.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2020-09-21 00:00:59 | <dolio> | The only difference is the name. |
| 2020-09-21 00:01:42 | <dolio> | If your cabal-install is 3 or newer (I think), those are the default, as well. |
| 2020-09-21 00:01:59 | × | ddellacosta quits (~dd@86.106.121.168) (Quit: WeeChat 2.8) |
| 2020-09-21 00:02:02 | → | atk joins (~Arch-TK@ircpuzzles/staff/Arch-TK) |
| 2020-09-21 00:02:33 | <cipherchess> | Oh nice, thank you. |
| 2020-09-21 00:02:33 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:10e:bca5:1dcc:68c6) (Client Quit) |
| 2020-09-21 00:02:51 | <edwardk> | Cale: i figured a way to make everything work. i just had to give up on Nat. |
| 2020-09-21 00:02:53 | <edwardk> | =) |
| 2020-09-21 00:03:54 | <edwardk> | now it "just works" https://github.com/ekmett/haskell/blob/master/types/example/Vec.hs -- and you can even swap out Natural there for Int, Word, etc. to get things with smaller singletons. |
| 2020-09-21 00:04:09 | × | MorrowM quits (~max@bzq-110-168-31-106.red.bezeqint.net) (Remote host closed the connection) |
| 2020-09-21 00:04:48 | → | ddellacosta joins (~dd@86.106.121.168) |
| 2020-09-21 00:05:41 | <Cale> | Well, that's definitely simpler |
| 2020-09-21 00:06:15 | <edwardk> | basically i gave in and made fully general Z' and S' data families and used them to make Word, Word16, Natural ... all inhabitable as kinds. then made 'safe' aliases for Z and S that delegate to 0 and 1+ for the nat case but otherwise use those Z' and S' hacked constructors |
| 2020-09-21 00:06:21 | → | thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) |
| 2020-09-21 00:07:31 | <edwardk> | to be fully safe the Z and S I export should have an enumerated set of types for which they work, but the proof of concept is nice |
| 2020-09-21 00:07:56 | <edwardk> | you can't use Nat in there or you get the lack of injection issue we had before, but everything else works as expected and Nat is no longer my bottleneck |
| 2020-09-21 00:08:21 | → | ph88 joins (~ph88@2a02:8109:9e40:2704:b503:e755:2c19:955c) |
| 2020-09-21 00:08:27 | <Cale> | The definition of the S type family is amusing |
| 2020-09-21 00:09:06 | → | shatriff joins (~vitaliish@176.52.219.10) |
| 2020-09-21 00:09:12 | ← | cipherchess parts (~oned4@151.51.54.223) () |
| 2020-09-21 00:09:25 | <edwardk> | what i'll do is switch it to an open type family that way i can enumerate exactly which types it works on and users can extend that set by importing Data.Type.Unsafe and adding a type instance |
| 2020-09-21 00:09:47 | × | falafel quits (~falafel@2605:e000:1527:d491:f090:20fe:cddf:2a1a) (Ping timeout: 260 seconds) |
| 2020-09-21 00:10:57 | × | thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-09-21 00:13:04 | → | nbloomf joins (~nbloomf@2600:1700:83e0:1f40:10e:bca5:1dcc:68c6) |
| 2020-09-21 00:13:13 | <edwardk> | oh, i have an even better hack, one sec |
| 2020-09-21 00:13:26 | × | nbloomf quits (~nbloomf@2600:1700:83e0:1f40:10e:bca5:1dcc:68c6) (Client Quit) |
| 2020-09-21 00:14:27 | → | thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) |
| 2020-09-21 00:16:41 | <edwardk> | there |
| 2020-09-21 00:16:58 | <edwardk> | now you need to instantiate Nice in order to unstick the evaluation of Z and S for your type |
| 2020-09-21 00:17:06 | <edwardk> | making them safer to export from Data.Type |
| 2020-09-21 00:17:16 | <edwardk> | they'll eval for naturals and any Nice type |
| 2020-09-21 00:17:44 | sm[m] | thinks why can't we have a SwapColons extension |
| 2020-09-21 00:18:37 | × | thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 244 seconds) |
| 2020-09-21 00:19:06 | × | ph88 quits (~ph88@2a02:8109:9e40:2704:b503:e755:2c19:955c) (Ping timeout: 246 seconds) |
| 2020-09-21 00:19:58 | <edwardk> | its not currently as safe as i'd like, because you can just claim 'Nice' for any type you want. a safer version would export the Nice, but not include the defaults i guess |
| 2020-09-21 00:20:27 | <edwardk> | that way if you have your own injective zero and succ you can instantiate the class, or you can delegate to mine through Unsafe |
| 2020-09-21 00:20:33 | <edwardk> | ok, going back and writing longer instances |
| 2020-09-21 00:20:45 | → | Xing`1 joins (~Xing`@185.244.214.216) |
| 2020-09-21 00:22:22 | <ddellacosta> | Baader-Meinhof is a funny thing. This morning I was checking out haskellweekly.news and clicked on a blog post about contravariant functors, as I haven't built up much of an intuition for them yet, so was interested. I skimmed it enough to note that it talked about composing predicate functions. Later, I jumped back into a side project debugging some FFI code, and searched for items on this |
| 2020-09-21 00:22:24 | <ddellacosta> | topic--found another blog post, which...talked about using contravariant functors in the context of debugging. Finally I took a break and looked up a logging library someone had mentioned earlier today here, co-log...yeah, more contravariant functors. I haven't read all of these in depth yet, but I guess the universe/my unconscious is telling me I need to stop slacking off |
| 2020-09-21 00:23:20 | <koz_> | ddellacosta: Contravariant functors are indeed cool. |
| 2020-09-21 00:23:31 | → | thir joins (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) |
| 2020-09-21 00:23:36 | <ddellacosta> | they seem kind of mindblowing honestly |
| 2020-09-21 00:24:02 | <koz_> | ddellacosta: They can do some really cool things - discrimination sorting, for example. |
| 2020-09-21 00:24:17 | <ddellacosta> | damnit, now I have another thing to go read about lol |
| 2020-09-21 00:24:32 | <koz_> | ddellacosta: Do you know how radix sorting works? |
| 2020-09-21 00:24:56 | <ddellacosta> | unfortunately no |
| 2020-09-21 00:25:04 | <koz_> | Read that first. |
| 2020-09-21 00:25:21 | <koz_> | It'll help a lot to understand what's happening and why it has the asymptotics it claims. |
| 2020-09-21 00:25:48 | ddellacosta | pulls out the CLRS |
| 2020-09-21 00:27:51 | → | merijn joins (~merijn@83-160-49-249.ip.xs4all.nl) |
| 2020-09-21 00:28:27 | × | thir quits (~thir@p200300f27f0fc600ed2222922a5678d5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
| 2020-09-21 00:31:22 | × | borne quits (~fritjof@200116b86490460022497ba62715fb72.dip.versatel-1u1.de) (Ping timeout: 260 seconds) |
| 2020-09-21 00:33:00 | → | bahamas joins (~lucian@188.24.181.166) |
| 2020-09-21 00:33:01 | × | bahamas quits (~lucian@188.24.181.166) (Changing host) |
| 2020-09-21 00:33:01 | → | bahamas joins (~lucian@unaffiliated/bahamas) |
| 2020-09-21 00:33:12 | × | merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds) |
| 2020-09-21 00:33:18 | × | suppi quits (~suppi@172.246.241.246) (Ping timeout: 256 seconds) |
| 2020-09-21 00:35:39 | → | suppi joins (~suppi@2605:f700:40:c00::e6fc:6842) |
| 2020-09-21 00:37:41 | × | bahamas quits (~lucian@unaffiliated/bahamas) (Ping timeout: 260 seconds) |
| 2020-09-21 00:38:28 | → | CMCDragonkai1 joins (~Thunderbi@124.19.3.250) |
| 2020-09-21 00:39:31 | <ddellacosta> | koz_ thank you, that was super interesting. As far as discrimination sorting, is there a better source than this? https://hackage.haskell.org/package/discrimination Everything else that comes up is for like, young child education |
| 2020-09-21 00:39:36 | → | plutoniix joins (~q@ppp-223-24-94-234.revip6.asianet.co.th) |
| 2020-09-21 00:39:47 | <Cale> | ddellacosta: For the most part, a decent intuition for practically all the examples relevant to programming is just that when F is a contravariant functor, then a value of type F a is something which consumes values of type a |
| 2020-09-21 00:40:02 | <koz_> | ddellacosta: That's the source, plus its links. |
| 2020-09-21 00:40:05 | → | mariatsji joins (~mariatsji@2a01:79d:53aa:c66c:342b:5324:f59b:5b0e) |
| 2020-09-21 00:40:19 | <koz_> | I'd read the papers it links - if you're used to algorithm literature, it's pretty readable. |
| 2020-09-21 00:40:31 | <ddellacosta> | Cale: thank you, that is helpful! |
| 2020-09-21 00:40:42 | <ddellacosta> | koz_: ah okay, I didn't see any linked papers but will look again |
| 2020-09-21 00:41:01 | <ddellacosta> | d'oh right at the top, nevermind |
| 2020-09-21 00:41:03 | <ddellacosta> | thanks koz_ ! |
All times are in UTC.