Home freenode/#haskell: Logs Calendar

Logs: freenode/#haskell

←Prev  Next→ 502,152 events total
2020-11-02 11:34:35 × ubert quits (~Thunderbi@p200300ecdf1e53d1e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
2020-11-02 11:35:16 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 258 seconds)
2020-11-02 11:36:50 × whatisRT quits (~whatisRT@2002:5b41:6a33:0:dea6:32ff:fe5b:d45f) (Quit: ZNC 1.7.5 - https://znc.in)
2020-11-02 11:37:26 × Eason0210 quits (~user@101.85.10.81) (Quit: ERC (IRC client for Emacs 28.0.50))
2020-11-02 11:40:03 × xelxebar quits (~xelxebar@gateway/tor-sasl/xelxebar) (Ping timeout: 240 seconds)
2020-11-02 11:40:46 xelxebar joins (~xelxebar@gateway/tor-sasl/xelxebar)
2020-11-02 11:41:33 meowphius joins (~meowphius@pool-96-237-166-172.bstnma.fios.verizon.net)
2020-11-02 11:42:27 Eason0210 joins (~user@101.85.10.81)
2020-11-02 11:44:26 × florian_ quits (~florian@85-170-214-92.rev.numericable.fr) (Ping timeout: 264 seconds)
2020-11-02 11:45:03 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
2020-11-02 11:47:26 × _xor quits (~xor@74.215.46.133) (Ping timeout: 264 seconds)
2020-11-02 11:47:26 refried_ joins (~textual@pool-108-20-26-90.bstnma.fios.verizon.net)
2020-11-02 11:49:57 drbean joins (~drbean@TC210-63-209-202.static.apol.com.tw)
2020-11-02 11:51:19 chaosmasttter joins (~chaosmast@p200300c4a72dee01a86cafb086ba766e.dip0.t-ipconnect.de)
2020-11-02 11:52:26 × donri quits (~donri@139.28.218.148) (Remote host closed the connection)
2020-11-02 11:52:51 rotaerk joins (rotaerk@2600:3c02::f03c:91ff:fe70:4a45)
2020-11-02 11:53:27 Aquazi joins (uid312403@gateway/web/irccloud.com/x-onbapdmfluqaidcp)
2020-11-02 11:56:34 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 11:57:07 × Tario quits (~Tario@200.119.184.48) (Ping timeout: 258 seconds)
2020-11-02 11:59:35 Tario joins (~Tario@200.119.184.48)
2020-11-02 12:01:00 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 256 seconds)
2020-11-02 12:01:56 _xor joins (~xor@74.215.46.133)
2020-11-02 12:06:38 × britva quits (~britva@31.10.157.156) (Quit: This computer has gone to sleep)
2020-11-02 12:07:00 wei2912 joins (~wei2912@unaffiliated/wei2912)
2020-11-02 12:07:11 LKoen joins (~LKoen@79.160.9.109.rev.sfr.net)
2020-11-02 12:08:45 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 12:09:08 <matthew-> is there a ghc command or something that'll tell me how an expression is being bracketed?
2020-11-02 12:10:13 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
2020-11-02 12:10:14 <matthew-> in res = Subst $ Map.map (apply (Subst s1)) s2 `Map.union` s1, I'm assuming the s2 is an arg to Map.map, and not an arg to Map.union
2020-11-02 12:10:17 <merijn> matthew-: No, but you can query the precedence of operators via ":i"
2020-11-02 12:10:58 <merijn> matthew-: Easy answer, infix precedence is *always* lower than function application
2020-11-02 12:11:47 <merijn> matthew-: infix precedence ranges from 0 to 9, function application has precedence 10 (and record syntax has 11, but that's a bit niche), so 's2' is indeed an argument to Map.map
2020-11-02 12:11:57 <matthew-> ahh yes, I remember that rule.
2020-11-02 12:12:00 <matthew-> cool, thank you very much.
2020-11-02 12:12:12 <merijn> % :i `elem`
2020-11-02 12:12:12 <yahb> merijn: type Foldable :: (* -> *) -> Constraint; class Foldable t where; ...; elem :: Eq a => a -> t a -> Bool; ...; -- Defined in `Data.Foldable'; infix 4 `elem`
2020-11-02 12:12:25 <Uniaika> I feel like the bracketing is Subst $ (Map.map (apply (Subst s1)) s2) `Map.union` s1
2020-11-02 12:12:47 <Uniaika> that's my intuition
2020-11-02 12:12:58 × plutoniix quits (~q@175.176.222.7) (Quit: Leaving)
2020-11-02 12:13:00 <merijn> matthew-: So ":i `Map.union`" in ghci should tell you its precedence
2020-11-02 12:13:30 hackage haskoin-core 0.17.1 - Bitcoin & Bitcoin Cash library for Haskell https://hackage.haskell.org/package/haskoin-core-0.17.1 (jprupp)
2020-11-02 12:13:37 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 256 seconds)
2020-11-02 12:14:22 invaser joins (~Thunderbi@31.148.23.125)
2020-11-02 12:15:44 thir joins (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de)
2020-11-02 12:18:34 <typetetris> ... is there any benefit to learning arrows and this "arrow style" ? Looking into the niv source code it seems to be some kind of obfuscation technique to scare people away.
2020-11-02 12:18:52 <merijn> typetetris: Not really
2020-11-02 12:19:02 <merijn> typetetris: Arrow as an abstraction is mostly obsolete
2020-11-02 12:19:26 <typetetris> If it is obsolete, what is its replacement?
2020-11-02 12:19:57 <merijn> Category from Control.Category, Applicative, and Profunctor all replace different aspects of it
2020-11-02 12:20:27 × Stanley00 quits (~stanley00@unaffiliated/stanley00) ()
2020-11-02 12:20:49 <merijn> There's no real "this replaces all of Arrow" thing, it's mostly that Arrow had rather limited applicability and different aspects of it have been subsumed by more useful abstraction (like those 3)
2020-11-02 12:20:58 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 12:21:35 <typetetris> merijn: Is there some introductory material for the combination of those three things? (Like the papers mentioned in https://downloads.haskell.org/ghc/latest/docs/html/users_guide/glasgow_exts.html#arrow-notation for arrows for example)
2020-11-02 12:21:44 × thir quits (~thir@p200300f27f0b7e00f4e9381c2bf90854.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-11-02 12:22:10 <merijn> No clue, I'm just parrotting people from here :p
2020-11-02 12:23:47 <matthew-> merijn: yup, I would really like an editor mode where it does all those lookups for me and draws in the parens - would aid code comprehension imo
2020-11-02 12:24:10 × sam___ quits (~sam@5.197.204.77.rev.sfr.net) (Ping timeout: 256 seconds)
2020-11-02 12:25:04 × acidjnk_new quits (~acidjnk@p200300d0c72260501db9c4f6165b2eaf.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
2020-11-02 12:25:42 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 260 seconds)
2020-11-02 12:25:44 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
2020-11-02 12:26:01 sam___ joins (~sam@48.16.23.93.rev.sfr.net)
2020-11-02 12:27:01 × khaladrogo_lite quits (~khaladrog@2405:204:5204:7e58:f1ab:1e40:6c9b:8f55) (Quit: Leaving)
2020-11-02 12:29:00 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
2020-11-02 12:29:06 brisbin joins (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net)
2020-11-02 12:30:04 khaladrogo joins (~khaladrog@2405:204:5204:7e58:f1ab:1e40:6c9b:8f55)
2020-11-02 12:30:45 × refried_ quits (~textual@pool-108-20-26-90.bstnma.fios.verizon.net) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
2020-11-02 12:33:14 ensyde joins (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net)
2020-11-02 12:35:04 × Kaiepi quits (~Kaiepi@nwcsnbsc03w-47-55-225-82.dhcp-dynamic.fibreop.nb.bellaliant.net) (Remote host closed the connection)
2020-11-02 12:36:04 × brisbin quits (~patrick@pool-173-49-158-4.phlapa.fios.verizon.net) (Ping timeout: 240 seconds)
2020-11-02 12:36:55 <matthew-> when implementing a language - a mini-haskell if you like - is there any downside to treating every let as if it's a let-rec ?
2020-11-02 12:37:10 Ariakenom joins (~Ariakenom@h-158-174-186-203.NA.cust.bahnhof.se)
2020-11-02 12:37:45 × ensyde quits (~ensyde@99-185-235-117.lightspeed.chrlnc.sbcglobal.net) (Ping timeout: 258 seconds)
2020-11-02 12:37:52 <matthew-> (from a DHM type-inference pov)
2020-11-02 12:37:58 <ski> let x = foo 42 in let x = bar 3 x in let x = baz (frob x) in ..x..
2020-11-02 12:38:19 <merijn> matthew-: Have you heard of our Lord and Saviour TaPL? ;)
2020-11-02 12:38:22 <merijn> @where tapl
2020-11-02 12:38:22 <lambdabot> "Types and Programming Languages" by Benjamin C. Pierce in 2002-02-01 at <https://www.cis.upenn.edu/~bcpierce/tapl/>
2020-11-02 12:38:35 <matthew-> yeah, I have it in front of me, along with Advanced...
2020-11-02 12:38:48 urodna joins (~urodna@unaffiliated/urodna)
2020-11-02 12:39:21 <merijn> matthew-: I recall there being a discussion of the difficulty with recursive bindings at some point in TaPL, but I don't quite recall where, tbh
2020-11-02 12:40:49 <matthew-> I have working DHM based on constraint generation as in Advanced Topics in .... Inference for recursive functions is just fine, it's just the recursive call must be the same monotype. Only the let-binding gets generalised to the principle type
2020-11-02 12:41:33 <matthew-> if you treat let rec x = foo as let x = fix (\x -> foo) then it seems to me like you don't need let on its own
2020-11-02 12:42:13 <jophish> 'cabal.project.local file already exists. Now overwriting it'
2020-11-02 12:42:27 <jophish> Wtf cabal, I spent ages writing that...
2020-11-02 12:42:27 <merijn> You never *need* let, you can always achieve it via lambda binding
2020-11-02 12:42:43 <merijn> jophish: It makes a backup
2020-11-02 12:42:55 <merijn> Should be in cabal.project.local~
2020-11-02 12:43:08 <jophish> Ah I see
2020-11-02 12:43:12 <matthew-> aye, true. So then my puzzlement is why does eg ML have both let and let rec?
2020-11-02 12:43:16 <merijn> jophish: Also, it only does that if you run configure, whose explicit only purpose is to create cabal.project.local?
2020-11-02 12:43:21 lucasb joins (uid333435@gateway/web/irccloud.com/x-pojwugqdpwttxqdq)
2020-11-02 12:43:30 <jophish> Oh
2020-11-02 12:43:53 <jophish> Configure generates an empty project.local, even though I'm setting a flag
2020-11-02 12:43:56 <merijn> jophish: Also, if you cared about persisting whatever you wrote in .local it should probably be in cabal.project? :)
2020-11-02 12:44:24 × Kaivo quits (~Kaivo@104-200-86-99.mc.derytele.com) (Quit: WeeChat 2.9)
2020-11-02 12:44:26 <jophish> merijn: I don't want it in version control
2020-11-02 12:44:27 <merijn> jophish: Is that flag already set in cabal.project maybe?
2020-11-02 12:44:37 <jophish> Nope
2020-11-02 12:44:47 <jophish> I'm setting it to not the default too
2020-11-02 12:44:47 <ski> matthew- : convenience. ability to do the example i had above, with that ordering of subexpressions

All times are in UTC.