Home liberachat/#haskell: Logs Calendar

Logs on 2021-11-19 (liberachat/#haskell)

00:00:42 <oats> nice
00:00:59 <dsal> I don't remember what the problem was. heh
00:01:29 <oats> tobogganing
00:01:35 <oats> avoiding arboreal incidents
00:01:46 <dsal> AI can be a problem, yeah.
00:01:54 <oats> lol
00:02:11 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds)
00:03:02 <dsal> oh, I think day4 might've been fun. This was my solution to part 1: `part1 = length`
00:04:54 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
00:05:21 hololeap joins (~hololeap@user/hololeap)
00:05:47 × emf quits (~emf@2620:10d:c090:400::5:d3e3) (Ping timeout: 264 seconds)
00:06:24 <dsal> Sorry. Spoiler.
00:06:31 <oats> oh meanning you already had utility functions for reading in hashmaps and stuff?
00:06:46 <oats> hah no worries, I did most of these last year in not-haskell
00:07:03 <oats> I just wanted to throw together a little framework for doing them in haskell these year
00:07:05 <dsal> Nah, I just wrote a parser that did most of the work.
00:07:14 <dsal> getInput = fmap catMaybes . parseFile (parsePassport `sepBy` "\n")
00:07:33 <dsal> parsePassport was `parsePassport :: Parser (Maybe Passport)`
00:07:43 <oats> mmm, parseFile seems like a very good function
00:08:08 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
00:08:08 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
00:08:08 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
00:08:08 wroathe joins (~wroathe@user/wroathe)
00:08:12 <dsal> It's not particularly fancy: https://github.com/dustin/aoc/blob/master/src/Advent/AoC.hs#L44
00:09:02 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
00:09:05 texasmynsted parts (~texasmyns@99.96.221.112) (WeeChat 3.1)
00:09:59 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
00:11:07 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
00:15:01 × hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer)
00:15:41 <dsal> Man, day 7 with lazy maps kind of blew my mind.
00:15:55 hiruji joins (~hiruji@user/hiruji)
00:17:48 × zava quits (~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) (Quit: WeeChat 3.3)
00:19:45 × ystael quits (~ystael@user/ystael) (Ping timeout: 250 seconds)
00:22:58 <oats> dsal, any particular reason you use Text pretty much everywhere instead of String?
00:23:11 <dsal> Because that's best practice. :)
00:24:02 <oats> 😰
00:25:35 <dsal> It doesn't matter a lot of the time, but `String` is a type alias for `[Char]` which is a silly amount of overhead to do just about anything you might want to do.
00:28:05 × evocatus quits (~evocatus@213.193.2.105) (Quit: Leaving)
00:28:36 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
00:29:05 <oats> yeah, if I had performance in mind I guess I might
00:29:10 <oats> AoC is kinda small scale though :P
00:30:23 mimmy joins (~mimmy@2607:fea8:6e0:7f90:c01b:60fe:9558:2d95)
00:31:26 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
00:31:35 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
00:32:19 turco32 joins (~turco32@104.158.25.93)
00:32:52 Lord_of_Life_ is now known as Lord_of_Life
00:32:58 <turco32> am i doing it wrong using ghci in a terminal and not in a emacs setup?
00:33:21 <turco32> i don't know if a such a setup exists for ghci and emacs
00:34:05 <sm> but, but, maybe you want to slice and dice strings like lists, and without requiring a big extra package and import ?
00:34:21 <sm> maybe you want to interact easily with the OS ?
00:34:30 <turco32> true
00:34:35 <dsal> turco32: There are a few ways to do it. I just use some old haskell-mode stuff and it'll open a ghci buffer and do all the things.
00:34:54 <turco32> oh really?
00:34:58 <turco32> that's neat
00:35:11 <dsal> I think the cool kids do HLS these days, but I've never made that work.
00:35:56 <dsal> oats: Yeah, it may not matter. But it's not harder to use Text and it's got a couple extras that make some things easier. Some things are harder. All depends.
00:36:22 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3)
00:36:26 <oats> turco32, I'm a fan of ghci in emacs
00:36:37 oats uses lsp-mode, haskell-mode, and haskell-interactive-mode
00:36:53 <turco32> id like to find a package that does that
00:37:48 <justsomeguy> spaceemacs and ghcup get you close
00:38:11 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds)
00:38:22 <justsomeguy> Although spaceemacs is pretty huge, and I don't think I'll ever understand how it works.
00:39:38 <monochrom> Nothing wrong with low tech KISS.
00:39:39 <sm> turco, the two easy ide setups are emacs + ghcid, and vs code + haskell extension
00:40:03 <sm> so of course I combine them. vs code + haskell extension with terminal pane running emacs running ghcid for when hls fails
00:41:04 sm has been playing this most excellent jasper van der jeugt joint discovered via HF podcast: https://www.jaspervdj.be/beeraffe/
00:41:22 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
00:41:52 <sm> hello myShoggoth
00:45:25 <dsal> I've never used ghcid, either. Most of these things seem hard to manage more than one project with.
00:45:36 <dsal> I hardly ever have just one project open.
00:46:32 <sm> dsal: you're often hacking on multiple projects simultaneously ?
00:46:51 <sm> like, as part of a single superproject ?
00:46:56 <dsal> Sometimes, yeah.
00:47:08 <dsal> Other times, it's like, I thought of a thing, and I want to do that thing across a bunch of different projects.
00:47:56 <sm> hls is too heavy to keep a lot of instances running. Even ghcid is, sometimes
00:48:20 <sm> vs code could easily shut down the one not currently focussed, though
00:48:30 favonia joins (~favonia@user/favonia)
00:48:44 <dsal> I can't remember what was confusing in vscode.
00:49:01 <dsal> It doesn't help that I have this weird eggshell env. It's like, stack + nix + macos.
00:49:05 <dsal> + multiple projects.
00:50:24 <dsal> vs code was a pretty big improvement for doing TLA+, though. Except the part where it uses entirely different LaTeX templates or something and doesn't bother shading comments.
00:57:42 × abrantesasf quits (~abrantesa@187.36.170.211) (Remote host closed the connection)
00:59:44 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
01:00:01 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Quit: gone to sleep. ZZZzzz…)
01:04:30 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
01:04:34 dsrt^ joins (~dsrt@68.101.63.101)
01:06:37 ystael joins (~ystael@user/ystael)
01:07:29 <myShoggoth> sm: hi!
01:09:35 <sm> myShoggoth: hope you work goes well. I'm loving the haskell interlude podcast, just to say
01:11:20 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:12:35 × alx741 quits (~alx741@181.196.69.19) (Ping timeout: 268 seconds)
01:13:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:14:12 Topsi joins (~Tobias@dyndsl-091-249-083-165.ewe-ip-backbone.de)
01:17:27 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:18:03 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
01:20:51 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
01:20:51 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
01:20:51 wroathe joins (~wroathe@user/wroathe)
01:23:00 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
01:25:16 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
01:26:25 alx741 joins (~alx741@186.178.109.242)
01:27:23 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds)
01:34:19 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
01:35:26 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Client Quit)
01:45:27 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
01:46:47 × zaquest quits (~notzaques@5.130.79.72) (Quit: Leaving)
01:47:37 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
01:47:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
01:48:45 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Read error: Connection reset by peer)
01:51:20 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
01:52:06 × neurocyte0132889 quits (~neurocyte@user/neurocyte) (Ping timeout: 265 seconds)
01:53:13 machinedgod joins (~machinedg@24.105.81.50)
01:55:52 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
01:59:23 × mjrosenb quits (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net) (Remote host closed the connection)
02:00:18 lavaman joins (~lavaman@98.38.249.169)
02:01:11 × waleee quits (~waleee@h-82-196-111-63.NA.cust.bahnhof.se) (Quit: WeeChat 3.3)
02:13:22 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Quit: gone to sleep. ZZZzzz…)
02:15:32 × retro_ quits (~retro@97e2ba2e.skybroadband.com) (Read error: Connection reset by peer)
02:16:22 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds)
02:18:52 × chronon quits (~chronon@user/chronon) (Ping timeout: 260 seconds)
02:20:17 chronon joins (~chronon@user/chronon)
02:22:10 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
02:22:42 Vajb joins (~Vajb@85-76-10-43-nat.elisa-mobile.fi)
02:22:49 × JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 250 seconds)
02:24:34 JimL joins (~quassel@89-162-2-132.fiber.signal.no)
02:24:35 × Vajb quits (~Vajb@85-76-10-43-nat.elisa-mobile.fi) (Read error: Connection reset by peer)
02:24:40 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
02:25:28 <myShoggoth> sm: thank you!
02:25:36 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
02:25:51 <myShoggoth> sm: The Haskell Interlude team is doing a fantastic job
02:27:35 <sm> 👍️ excellent guests
02:46:19 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 268 seconds)
02:46:37 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
02:47:47 × xff0x quits (~xff0x@2001:1a81:53b1:4500:9213:f6eb:82ba:af29) (Ping timeout: 264 seconds)
02:49:17 xff0x joins (~xff0x@2001:1a81:53ef:fb00:5000:2c7a:ffb3:dbe2)
02:50:21 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
02:50:21 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
02:50:21 wroathe joins (~wroathe@user/wroathe)
02:57:14 × alx741 quits (~alx741@186.178.109.242) (Quit: alx741)
03:01:02 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:c01b:60fe:9558:2d95) (Ping timeout: 240 seconds)
03:03:32 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
03:03:37 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Quit: gone to sleep. ZZZzzz…)
03:03:52 Neuromancer is now known as Nrmncr
03:04:21 mimmy joins (~mimmy@2607:fea8:6e0:7f90:9965:319a:ef17:fff9)
03:04:30 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
03:07:32 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
03:07:53 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
03:08:23 zaquest joins (~notzaques@5.130.79.72)
03:10:59 × favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds)
03:16:32 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:9965:319a:ef17:fff9) (Ping timeout: 240 seconds)
03:17:33 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
03:18:03 mimmy joins (~mimmy@2607:fea8:6e0:7f90:c9c2:f9da:e6bb:5682)
03:27:33 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
03:27:33 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
03:27:33 finn_elija is now known as FinnElija
03:29:45 <Axman6> There's a new haskell podcast? :o
03:36:10 × dsrt^ quits (~dsrt@68.101.63.101) (Ping timeout: 256 seconds)
03:36:58 mbuf joins (~Shakthi@122.174.57.32)
03:37:27 × whatsupdoc quits (uid509081@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:41:49 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds)
03:44:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:48:37 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
03:48:43 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
03:53:49 × td_ quits (~td@muedsl-82-207-238-143.citykom.de) (Ping timeout: 250 seconds)
03:55:45 td_ joins (~td@muedsl-82-207-238-169.citykom.de)
03:57:00 mimmy_ joins (~mimmy@2607:fea8:6e0:7f90:f54f:22a2:7c84:1461)
03:57:52 aman joins (~aman@user/aman)
03:59:42 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:c9c2:f9da:e6bb:5682) (Ping timeout: 268 seconds)
04:01:02 × Topsi quits (~Tobias@dyndsl-091-249-083-165.ewe-ip-backbone.de) (Read error: Connection reset by peer)
04:07:09 mimmy joins (~mimmy@2607:fea8:6e0:7f90:9d18:4862:d949:6f72)
04:08:26 iamanewb joins (~iamanewb@98.45.192.30)
04:09:02 × mimmy_ quits (~mimmy@2607:fea8:6e0:7f90:f54f:22a2:7c84:1461) (Ping timeout: 240 seconds)
04:11:10 Guest63 joins (~Guest63@130.253.27.11)
04:15:44 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 268 seconds)
04:15:54 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
04:16:07 mimmy_ joins (~mimmy@2607:fea8:6e0:7f90:2da1:529b:e827:2fbb)
04:17:32 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:9d18:4862:d949:6f72) (Ping timeout: 240 seconds)
04:18:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
04:19:09 vysn joins (~vysn@user/vysn)
04:21:45 whatsupdoc joins (uid509081@hampstead.irccloud.com)
04:22:38 <Guest63> https://paste.tomsmeding.com/1SZMvVLB
04:24:00 <Guest63> I'm having trouble running any command involving "stack build" or "stack test" the error seems to be connected to when I put hspec in my dependencies on the package.yaml file
04:26:01 <Guest63> I have another project that uses hspec and works, but when I use it in this project it doesn't work
04:26:57 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:27:35 <dsal> Guest63: Sounds like an older stack snapshot?
04:28:28 <Guest63> How do I refresh my stack snapshot?
04:28:37 <dsal> you edit stack.yaml
04:31:33 <Guest63> https://paste.tomsmeding.com/nhcYFpfN
04:31:46 <Guest63> What should I edit in stack.yaml?
04:32:47 mimmy joins (~mimmy@2607:fea8:6e0:7f90:45bd:2d1d:42f2:f442)
04:32:48 <sm> Axman6: I was talking about https://haskell.foundation/podcast/
04:34:08 <sm> Guest63: replace lines 20-21 with `resolver: lts-18.17`, eg
04:34:28 <sm> and get rid of all those confusing comments
04:34:38 × aman quits (~aman@user/aman) (Quit: aman)
04:36:05 × mimmy_ quits (~mimmy@2607:fea8:6e0:7f90:2da1:529b:e827:2fbb) (Ping timeout: 268 seconds)
04:37:47 × iamanewb quits (~iamanewb@98.45.192.30) (Quit: Client closed)
04:38:16 <sm> Guest63: your error looks like this packaging bug with mintty: https://github.com/RyanGlScott/mintty/issues/4
04:42:44 <sm> so you're not alone. The easy solution seems to be wait a little bit for lts-18.18
04:47:31 × monochrom quits (trebla@216.138.220.146) (Quit: NO CARRIER)
04:49:39 × xkuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
04:51:10 × puke quits (~puke@user/puke) (Quit: puke)
04:51:27 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
04:52:36 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
04:54:08 <Guest63> sm thank you so much, I had to change that 17 in the URL to a 15
04:54:20 × hiruji quits (~hiruji@user/hiruji) (Read error: Connection reset by peer)
04:54:32 <sm> great
04:55:21 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Client Quit)
04:57:09 <dsal> The URL form is weird and busted.
04:57:19 <dsal> But if it works, then go for it. heh
04:57:52 <Guest63> its autogenerated either way haha
04:59:42 <dsal> Yeah, at some point stack started generating that way and it only worked with some tooling.
05:00:06 <dsal> Just using the string `lts-18.15` works in all the places.
05:00:26 deadmarshal joins (~deadmarsh@95.38.116.147)
05:01:06 × mimmy quits (~mimmy@2607:fea8:6e0:7f90:45bd:2d1d:42f2:f442) (Quit: WeeChat 3.3)
05:01:13 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
05:01:26 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
05:01:33 <sm> love them snapshots
05:06:04 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
05:07:12 <dsal> I was kind of hoping the most recent one would up that network package.
05:13:16 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Read error: Connection reset by peer)
05:19:02 × johnw quits (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0) (Ping timeout: 240 seconds)
05:23:47 × JimL quits (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 264 seconds)
05:26:25 hiruji joins (~hiruji@user/hiruji)
05:26:40 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:26:58 gentauro joins (~gentauro@user/gentauro)
05:27:18 JimL joins (~quassel@89-162-2-132.fiber.signal.no)
05:34:41 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:40:19 gentauro joins (~gentauro@user/gentauro)
05:41:42 × azimut_ quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
05:42:16 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:42:19 azimut joins (~azimut@gateway/tor-sasl/azimut)
05:45:19 gentauro joins (~gentauro@user/gentauro)
05:48:44 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:52:04 × bliminse quits (~bliminse@host86-188-36-178.range86-188.btcentralplus.com) (Quit: leaving)
05:54:04 euouae joins (~euouae@user/euouae)
05:54:19 <euouae> Hello how can I apply `f` to `(a,b)`, i.e. transform into `f a b`?
05:54:36 gentauro joins (~gentauro@user/gentauro)
05:55:11 takuan joins (~takuan@178-116-218-225.access.telenet.be)
05:56:08 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
05:56:10 mei joins (~mei@user/mei)
05:56:18 × zebrag quits (~chris@user/zebrag) (Read error: Connection reset by peer)
05:56:18 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
05:56:35 <euouae> Ah it's `uncurry`
05:59:13 lavaman joins (~lavaman@98.38.249.169)
05:59:35 <EvanR> :t uncurry
05:59:36 <lambdabot> (a -> b -> c) -> (a, b) -> c
05:59:41 <dsal> I'm trying to read some math that's foreign to me. I can sort of work it out, but can someone tell me how to read: g ∈ B → A||B
06:00:09 <euouae> I think that means g is a proof of B -> A || B
06:00:30 <EvanR> hexchat shows the thing between g and B as four zeros in a square : (
06:01:04 <euouae> EvanR it's TeX \in or `belongs to`
06:01:37 <EvanR> ∈?
06:01:50 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
06:01:51 gentauro joins (~gentauro@user/gentauro)
06:02:28 <EvanR> probably the link to whatever dsal is reading is more helpful xD
06:02:42 <dsal> It's in https://maartenfokkinga.github.io/utwente/mmf91m.pdf sorry
06:02:55 <EvanR> oh that one
06:02:56 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 256 seconds)
06:03:03 <dsal> g \in B \rightarrow A||B
06:03:10 bliminse joins (~bliminse@host86-188-36-178.range86-188.btcentralplus.com)
06:03:16 <euouae> there's always €
06:03:29 <dsal> haha
06:03:51 <dsal> I can work a lot of these out backwards because I know the end results, but the function notation with the || seems weird to me.
06:03:51 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:05:05 <euouae> dsal, in that paper it looks like the authors don't care about defining things. It's probably because they think their results are good enough, so what you typically have to do is read the references for definitions
06:05:52 <EvanR> so A||B is the product type
06:06:03 <EvanR> and elsewhere, it's just a pairing
06:06:30 <dsal> oooh. that makes sense here, thanks.
06:06:44 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
06:06:49 <dsal> My brain was telling me the || was like, super dividing these two things.
06:06:57 <EvanR> confusion over product or pairing exists in normal notation (A,B) vs (x,y)
06:07:06 <EvanR> now we have extra confusion xD
06:08:16 <EvanR> page 6 does seem to define ||
06:08:53 × Guest63 quits (~Guest63@130.253.27.11) (Quit: Client closed)
06:09:02 <EvanR> apparently it's a (bi)functor
06:09:07 gentauro joins (~gentauro@user/gentauro)
06:09:44 <euouae> oh yeah. not that I would know what those are :D
06:10:13 <dsal> Oh. I was supposed to get to page 6 before understanding stuff?
06:10:22 <dsal> I don't read a lot of math papers.
06:10:35 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds)
06:10:42 <EvanR> always read the first page and the last page first xD
06:11:13 <euouae> dsal, it varies from paper to paper. This paper is in the style of addressing other experts
06:11:33 <dsal> I'm not an expert. :)
06:11:46 <euouae> me neither and hence our confusions
06:11:46 <EvanR> the pages are to be understood lazily... on demand
06:11:49 <dsal> But it's pretty interesting once I work out the notation.
06:12:23 <EvanR> each page is like an unevaluated thunk, and may required forcing other pages xD
06:12:28 <dsal> The annoying part is I know kind of what they're talking about, so I'm actually working out the whole thing backwards. I'm basically figuring out this notation from understanding what they're trying to describe with it.
06:12:48 <euouae> I have a function `f n` that produces a list of `n` elements with the property that `f (n + 1)` contains `f n`. How can I optimize for this?
06:12:59 <euouae> e.g. f n = [1..n]
06:13:04 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
06:13:04 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:13:04 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
06:13:04 wroathe joins (~wroathe@user/wroathe)
06:13:26 <EvanR> you could memoize f n
06:13:31 <euouae> dsal, it's fine to e-mail the authors and ask them questions too
06:13:48 <EvanR> memocombinators
06:13:53 <euouae> Got it, thank you
06:13:54 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 260 seconds)
06:14:07 gentauro joins (~gentauro@user/gentauro)
06:14:23 <dsal> I've spoken to one of the authors before. I should've known this question was going to come up...
06:14:50 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:15:22 <dsal> I don't understand why \in is used the way it is here. I guess = isn't any more obviously a good idea.
06:15:50 <EvanR> in older papers I've seen \in used in place of : (has type)
06:16:11 <EvanR> if the right side is a type, then that's probably what it is
06:16:52 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:17:07 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
06:17:31 jpds joins (~jpds@gateway/tor-sasl/jpds)
06:17:35 <EvanR> g \in B → A||B would then be g :: B -> (A,B) (haskell notation)
06:17:47 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 264 seconds)
06:19:11 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
06:19:33 jpds joins (~jpds@gateway/tor-sasl/jpds)
06:20:06 <dsal> Yeah, I kind of read that more like "is" than "in" or "element of" or whatever.
06:22:26 gentauro joins (~gentauro@user/gentauro)
06:22:37 <dsal> This barbed wire thing, though… The best part of being a mathematician seems to be making fancy notation you can show off.
06:23:06 chomwitt joins (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374)
06:24:02 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:24:17 dschrempf joins (~dominik@070-207.dynamic.dsl.fonira.net)
06:24:53 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
06:26:10 × chomwitt quits (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374) (Remote host closed the connection)
06:27:22 <EvanR> "is" vs "is a" xD
06:27:54 slice joins (~slice@user/slice)
06:28:03 <dsal> ooh, that might help.
06:28:27 <dsal> These πs with accents are a little too much.
06:28:43 <EvanR> are they projectors out of a product
06:29:25 <dsal> To close the loop, this paper also defines uncurry
06:29:40 <euouae> yay :D
06:29:42 gentauro joins (~gentauro@user/gentauro)
06:29:47 <dsal> You'd never have asked that question if you just read this paper first.
06:30:18 <EvanR> seems yes. modern notation you'd say pi subscript 1 and pi subscript 2
06:30:40 <EvanR> rather that forward and backward accent mark...
06:30:51 <EvanR> who was the editor lol
06:31:36 <dsal> I don't know how I've managed to not read this before. it's pretty good.
06:32:14 <EvanR> all I really can recall is that banana is basically fmap, liftA2, liftA3 etc
06:32:15 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
06:32:33 <euouae> EvanR: it's a draft not published I think
06:33:02 <EvanR> banana's barbed wire paper was not published?
06:33:23 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:34:08 chomwitt joins (~chomwitt@2a02:587:dc12:3f00:12c3:7bff:fe6d:d374)
06:34:10 Lycurgus joins (~juan@98.4.112.204)
06:34:41 <euouae> the pdf linked on github is a draft so there's no editor for it
06:35:27 <Lycurgus> in contrast to the default semantics of "draft"
06:36:28 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
06:36:40 <dsal> Oh hey, someone translated it to Haskell: http://blog.ezyang.com/2010/05/bananas-lenses-envelopes-and-barbed-wire-a-translation-guide/
06:37:22 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
06:37:56 <EvanR> well the publishing industry sucks anyway
06:38:13 <EvanR> who needs em
06:38:59 gentauro joins (~gentauro@user/gentauro)
06:40:22 <euouae> EvanR, no we should have papers from 1970 talking aboug black holes behind paywalls, that's better for society
06:40:45 <euouae> just in case anyone comes up with an idea without paying first, you know?
06:40:46 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:42:22 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 260 seconds)
06:42:27 <EvanR> details of a black hole hidden behind a wall seems ironically apropos
06:44:21 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds)
06:45:55 <Lycurgus> https://maartenfokkinga.github.io/utwente/mmf91m.pdf is the "draft"?
06:46:16 gentauro joins (~gentauro@user/gentauro)
06:46:24 <euouae> touche. I was talking about Hawking's 1975 article "particle creation by black holes"
06:46:44 <euouae> Lycurgus yeah that's the one I meatn
06:47:26 <Lycurgus> ah, so in this case the actual semantics of "30 yo" overrides "draft" as far as mutability
06:47:54 <euouae> I don't understand you, but I think you're saying it's not a draft?
06:48:48 <Lycurgus> no, although I didn see that term in it, I mean a 30 yo thing can't be a draft in the sense of
06:49:06 <Lycurgus> something is likely going to have more drafts before pub
06:49:11 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
06:49:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
06:49:41 <euouae> this is not important
06:50:07 <Lycurgus> no
06:50:16 <euouae> I have a function f :: Int -> Int and a list [Int] and I'd like to group by f-value. e.g. if f 1 = 1, f 2 = 1 and f 3 = 2, then I'd like to have [[1, 2], [3]]. How can I do this?
06:50:29 deadmarshal joins (~deadmarsh@95.38.116.147)
06:50:29 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
06:50:42 <euouae> Lycurgus although if this is a typed/scanned version of an old published paper then yeah I stand corrected, and there's probably an editor...
06:51:14 <Lycurgus> well it's a dvi
06:51:36 <Lycurgus> the tex could be lost
06:52:08 <euouae> I think I can zip, and then groupBy
06:53:20 <Lycurgus> i'm unclear what the function is from example list
06:53:42 <euouae> any function
06:53:50 <euouae> I'm trying to group by f x == f y
06:54:23 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 264 seconds)
06:56:35 gentauro joins (~gentauro@user/gentauro)
07:00:29 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
07:04:14 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:06:54 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
07:09:56 gentauro joins (~gentauro@user/gentauro)
07:15:15 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3)
07:15:37 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
07:16:25 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
07:17:25 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
07:17:25 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:17:34 <tomsmeding> euouae: groupBy ((==) `on` f) ?
07:17:51 lortabac joins (~lortabac@2a01:e0a:541:b8f0:6cf6:5d02:5f47:daaa)
07:17:53 <tomsmeding> might need to sortBy (comparing f) beforehand
07:18:33 <euouae> I had an issue with groupBy only taking sequential values, I rewrote it as https://paste.tomsmeding.com/5d6v3Bga
07:18:59 <euouae> Good point though, I think involving a `sort` is a more efficient way to do
07:20:37 <tomsmeding> euouae: right, your method has quadratic complexity, while sorting has n log n ("linearithmic") complexity
07:22:16 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
07:22:26 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
07:22:49 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
07:23:10 max22- joins (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr)
07:23:17 gentauro joins (~gentauro@user/gentauro)
07:26:42 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
07:27:02 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
07:28:35 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 264 seconds)
07:28:37 <euouae> linearithimic eh? :P
07:28:56 deadmarshal joins (~deadmarsh@95.38.116.147)
07:31:12 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:35:00 geekosaur joins (~geekosaur@xmonad/geekosaur)
07:36:38 gentauro joins (~gentauro@user/gentauro)
07:37:14 Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net)
07:37:20 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
07:39:35 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
07:41:12 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:41:12 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:42:40 gg joins (~gg@2a01:e0a:819:1510:8568:3ca4:33bc:8c5b)
07:43:58 × jonathanx_ quits (~jonathan@dyn-8-sc.cdg.chalmers.se) (Ping timeout: 265 seconds)
07:44:47 × dschrempf quits (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3)
07:46:57 gentauro joins (~gentauro@user/gentauro)
07:48:37 × euouae quits (~euouae@user/euouae) (Quit: )
07:48:49 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:49:53 vicfred joins (~vicfred@user/vicfred)
07:51:57 gentauro joins (~gentauro@user/gentauro)
07:53:41 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
07:53:41 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
07:54:02 <tomsmeding> s/imic/mic/ ;)
07:56:13 xmx joins (~xmx@2409:4071:e00:80b9:b273:3649:b25e:dd93)
07:57:14 <xmx> Hello
07:59:13 gentauro joins (~gentauro@user/gentauro)
07:59:38 <xmx> Guys can anyone tell me what it takes to understand Servant Library ? I have learned the some amount of Haskell but when I see Servant library source code nothing makes sense.
07:59:53 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:01:50 <sm> xmx, I'd be starting with servant's docs, it couldn't hurt eh
08:01:52 <[exa]> xmx: by "servant library" you mean the internal code or how to use it?
08:02:08 jonathanx_ joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
08:02:32 × Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Ping timeout: 256 seconds)
08:03:38 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:04:17 <xmx> [exa]: Internal concepts used.
08:08:45 ubert joins (~Thunderbi@p200300ecdf0ba29adda7833ccd9cfa98.dip0.t-ipconnect.de)
08:09:16 <[exa]> are you familiar with any kind of type-level programming and preferably DataKinds?
08:09:32 gentauro joins (~gentauro@user/gentauro)
08:11:17 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:12:20 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
08:15:29 <idnar> @hoogle merge
08:15:29 <lambdabot> Data.IntMap.Internal merge :: SimpleWhenMissing a c -> SimpleWhenMissing b c -> SimpleWhenMatched a b c -> IntMap a -> IntMap b -> IntMap c
08:15:29 <lambdabot> Data.IntMap.Merge.Lazy merge :: SimpleWhenMissing a c -> SimpleWhenMissing b c -> SimpleWhenMatched a b c -> IntMap a -> IntMap b -> IntMap c
08:15:29 <lambdabot> Data.IntMap.Merge.Strict merge :: SimpleWhenMissing a c -> SimpleWhenMissing b c -> SimpleWhenMatched a b c -> IntMap a -> IntMap b -> IntMap c
08:15:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:16:47 gentauro joins (~gentauro@user/gentauro)
08:17:22 michalz joins (~michalz@185.246.204.119)
08:18:22 gehmehgeh joins (~user@user/gehmehgeh)
08:18:45 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:20:16 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
08:21:02 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
08:21:47 gentauro joins (~gentauro@user/gentauro)
08:22:10 cfricke joins (~cfricke@user/cfricke)
08:23:56 juhp joins (~juhp@128.106.188.82)
08:25:00 timCF joins (~timCF@200-149-20-81.sta.estpak.ee)
08:25:35 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Quit: gone to sleep. ZZZzzz…)
08:27:28 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Remote host closed the connection)
08:29:43 × slice quits (~slice@user/slice) (Quit: zzz)
08:30:24 nschoe joins (~quassel@2a01:e0a:8e:a190:ecb9:277f:4a2a:1a1f)
08:31:20 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:33:23 × mvk quits (~mvk@2607:fea8:5cc3:e900::df92) (Ping timeout: 264 seconds)
08:34:44 pfurla joins (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7)
08:37:10 gentauro joins (~gentauro@user/gentauro)
08:37:58 × nschoe quits (~quassel@2a01:e0a:8e:a190:ecb9:277f:4a2a:1a1f) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
08:38:59 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:42:36 × aegon quits (~mike@174.127.249.180) (Remote host closed the connection)
08:44:27 gentauro joins (~gentauro@user/gentauro)
08:45:54 mc47 joins (~mc47@xmonad/TheMC47)
08:46:07 × jess quits (~jess@libera/staff/jess) (Quit: Lost terminal)
08:46:16 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:46:50 jess joins (~jess@libera/staff/jess)
08:50:11 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 264 seconds)
08:51:42 gentauro joins (~gentauro@user/gentauro)
08:53:27 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
08:55:16 deadmarshal joins (~deadmarsh@95.38.116.147)
08:58:57 gentauro joins (~gentauro@user/gentauro)
09:02:27 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
09:04:44 wei2912 joins (~wei2912@138.75.71.147)
09:04:58 acidjnk joins (~acidjnk@p200300d0c7271e04495a3d38c01005cf.dip0.t-ipconnect.de)
09:06:13 × gustik quits (~gustik@2a01:c844:240a:de20:3606:7339:bc88:b5f5) (Quit: Leaving)
09:06:42 × wei2912 quits (~wei2912@138.75.71.147) (Client Quit)
09:07:03 CiaoSen joins (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
09:07:31 Midjak joins (~Midjak@82-65-111-221.subs.proxad.net)
09:08:14 gentauro joins (~gentauro@user/gentauro)
09:09:01 favonia joins (~favonia@user/favonia)
09:17:33 allbery_b joins (~geekosaur@xmonad/geekosaur)
09:17:33 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
09:17:36 allbery_b is now known as geekosaur
09:19:22 <perrierjouet> hi all
09:19:34 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
09:19:48 <perrierjouet> stack install moe gave me this error http://ix.io/3FqG
09:19:50 × phma quits (phma@2001:5b0:2172:a9b8:34c1:76b3:d477:41fd) (Read error: Connection reset by peer)
09:20:38 <perrierjouet> I did add this line - gray-code-0.3.1@sha256:2c8a4ed9c9ee37320305610604d6d93504e0813d7c9768949af418b53043185a,2388 in /www/.stack/global-project/stack.yaml it did not work
09:20:46 phma joins (~phma@host-67-44-208-215.hnremote.net)
09:21:01 × xmx quits (~xmx@2409:4071:e00:80b9:b273:3649:b25e:dd93) (Remote host closed the connection)
09:21:10 <perrierjouet> perhaps it should be like gray-code-0.3.1@sha256:2c8a4ed9c9ee37320305610604d6d93504e0813d7c9768949af418b53043185a ?
09:21:48 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
09:23:09 × pfurla quits (~pfurla@2804:14d:5c81:4104:6091:9a2c:b661:21c7) (Quit: gone to sleep. ZZZzzz…)
09:26:35 × bitmapper quits (uid464869@lymington.irccloud.com) (Quit: Connection closed for inactivity)
09:27:30 <tomsmeding> perrierjouet: the ,2388 suffix is necessary
09:27:36 <tomsmeding> where exactly did you add this in the stack.yaml?
09:27:42 gentauro joins (~gentauro@user/gentauro)
09:27:54 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
09:28:50 <tomsmeding> perhaps post the stack.yaml after your addition?
09:33:19 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Ping timeout: 268 seconds)
09:33:23 <perrierjouet> tomsmeding: http://ix.io/3FqI
09:33:34 <perrierjouet> my stack.yaml
09:33:37 <tomsmeding> ah, it needs to look like this:
09:33:39 <tomsmeding> extra-deps:
09:33:43 <tomsmeding> - gray-code-.....
09:33:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:34:09 <tomsmeding> (including all the stuff that was already there of course, including the packages thing and the resolver thing
09:34:10 <tomsmeding> )
09:35:31 jinsun__ joins (~quassel@user/jinsun)
09:36:01 <perrierjouet> tomsmeding: thanks it worked
09:36:35 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 250 seconds)
09:37:59 jinsun joins (~quassel@user/jinsun)
09:39:14 jinsun___ joins (~quassel@user/jinsun)
09:41:57 × jinsun__ quits (~quassel@user/jinsun) (Ping timeout: 268 seconds)
09:42:05 <Franciman> well, happy to read haskell is quite energy efficient: https://greenlab.di.uminho.pt/wp-content/uploads/2017/10/sleFinal.pdf
09:42:30 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 260 seconds)
09:42:44 <Franciman> but but ocaml features always a 2x save in energy in the tests
09:42:50 <Franciman> is it because of laziness?
09:49:00 DNH joins (~DNH@2a02:8108:1100:16d8:a055:2897:27b6:f1d6)
09:50:34 × unit73e quits (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291) (Remote host closed the connection)
09:58:42 × jmorris quits (uid433911@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
10:01:47 dsrt^ joins (~dsrt@68.101.63.101)
10:09:18 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
10:12:50 <hololeap> is this nextStep function an example of where I could use logict instead? http://sprunge.us/3zxdMZ
10:13:34 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
10:14:35 × jinsun___ quits (~quassel@user/jinsun) (Read error: Connection reset by peer)
10:15:03 jinsun joins (~quassel@user/jinsun)
10:17:06 × vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds)
10:17:06 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
10:18:37 rkrishnan joins (~user@122.167.19.65)
10:18:45 <hololeap> I was just curious what monad could be used to remember the parent value in a tree traversal. state wouldn't work because it would remember the last value traversed, which could be a leaf and not the parent.
10:18:53 × rkrishnan quits (~user@122.167.19.65) (Remote host closed the connection)
10:20:08 × synthmeat quits (~synthmeat@user/synthmeat) (Quit: WeeChat 3.3)
10:21:59 × bgamari quits (~bgamari@70.16.103.161) (Ping timeout: 264 seconds)
10:22:09 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Read error: Connection reset by peer)
10:22:46 gentauro joins (~gentauro@user/gentauro)
10:23:01 <[exa]> hololeap: well, Reader + local might just do, if you absolutely want a monad
10:24:09 <hololeap> sure, and it isn't necessary, just exploring different ergonomic options
10:25:18 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
10:25:58 <hololeap> I'm also trying to understand how to use logict a little better by finding little use cases for it
10:27:32 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
10:27:32 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
10:27:58 bgamari joins (~bgamari@64.223.235.131)
10:28:24 <hololeap> Reader + local is something I know about
10:33:05 gentauro joins (~gentauro@user/gentauro)
10:33:37 dyeplexer joins (~dyeplexer@user/dyeplexer)
10:38:17 alzgh joins (~alzgh@user/alzgh)
10:39:26 <alzgh> Hello, I have a single haskell file that imports `System.Random`. I want to load it in ghci and test. How can I add `random` package to ghci's environment? I can also do `stack ghci`. Thanks.
10:39:59 <[exa]> alzgh: do you have `random` specified in project dependencies?
10:40:42 <[exa]> alzgh: also in ghci you can add (already installed) packages to the "search paths" using `:set -package random`
10:41:07 <[exa]> (which should be done automagically if you have that in deps)
10:41:37 <alzgh> this isn't a project. It's a single file that import `System.Random`.
10:42:30 <[exa]> ah okay. you might need to install a "global" random package then, I'm not really sure how that's done with stack
10:42:52 <alzgh> just checked with stack ghci and it worked
10:42:57 <[exa]> but try the :set, chances are that it either works or gives you an error that's easier to fix :D
10:43:01 <[exa]> ah okay nice
10:43:09 <alzgh> thanks
10:43:42 <[exa]> yw :]
10:44:03 <[exa]> hololeap: what's the algorithm supposed to do btw? LogicT is for prolog problems
10:45:52 <[exa]> hololeap: also (just curious) you don't support asymmetric branches (such as "left child only") with the datatype there, right?
10:46:03 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
10:48:19 ubert1 joins (~Thunderbi@p200300ecdf0ba29ae6b318fffe838f33.dip0.t-ipconnect.de)
10:50:13 slice joins (~slice@user/slice)
10:51:31 gentauro joins (~gentauro@user/gentauro)
10:52:57 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
10:53:37 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
10:53:43 azimut joins (~azimut@gateway/tor-sasl/azimut)
10:56:04 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
10:56:44 <hololeap> it's for this programming challenge where you implement GoL with a binary tree instead of a 2d grid
10:56:56 Everything joins (~Everythin@37.115.210.35)
10:58:10 <hololeap> and no, it's either a node with two branches or a leaf
10:59:56 <hololeap> since each step in the GoL requires knowledge of all neighboring nodes, you have to carry around the state of the parent so you can reference it
11:00:51 alx741 joins (~alx741@186.178.109.242)
11:01:49 gentauro joins (~gentauro@user/gentauro)
11:02:49 <[exa]> how's the binary tree organized into 2D? like, H-curve?
11:02:59 <[exa]> or is it a 1D cellular automaton?
11:04:08 puke joins (~puke@user/puke)
11:04:27 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
11:05:34 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
11:06:36 <hololeap> it just looks at the parent node and the two children, if they exist
11:07:05 <hololeap> neighbors that don't exist are considered dead
11:08:53 <hololeap> https://www.hackerrank.com/challenges/the-tree-of-life/problem
11:08:59 × deadmarshal quits (~deadmarsh@95.38.116.147) (Quit: ZNC 1.8.2 - https://znc.in)
11:09:16 deadmarshal joins (~deadmarsh@95.38.116.147)
11:10:04 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
11:15:42 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
11:16:54 azimut joins (~azimut@gateway/tor-sasl/azimut)
11:17:18 dschrempf joins (~dominik@62.240.134.78)
11:19:40 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
11:22:02 × CiaoSen quits (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
11:23:32 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 240 seconds)
11:24:35 <tomsmeding> alzgh: stack ghci --package random myfile.hs
11:24:55 <tomsmeding> this automatically downloads and compiles the package and dependencies if necessary
11:25:20 gentauro joins (~gentauro@user/gentauro)
11:26:37 <idnar> @hoogle (a -> b) -> Either a a -> b
11:26:38 <lambdabot> No results found
11:27:19 deadmarshal joins (~deadmarsh@95.38.116.147)
11:27:20 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
11:29:21 synthmeat joins (~synthmeat@user/synthmeat)
11:29:45 <dminuoso> % :t bimap id id
11:29:45 <yahb> dminuoso: Bifunctor p => p b d -> p b d
11:30:00 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
11:30:01 <dminuoso> idnar: Mm, the closest thing is `select`
11:30:05 <dminuoso> from selective functors
11:30:16 <dminuoso> https://hackage.haskell.org/package/selective-0.4.2/docs/Control-Selective.html#v:select
11:30:21 gentauro joins (~gentauro@user/gentauro)
11:31:13 cosimone joins (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3)
11:31:34 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
11:34:22 <idnar> oh actually I have to use my function at different types
11:44:43 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:47:08 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
11:47:52 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:49:00 CiaoSen joins (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
11:51:37 bobfang joins (~bobfang@2a01:4b00:87fe:be00:30ce:ab50:b4f4:7d62)
11:53:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
11:53:11 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
11:53:25 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:54:16 × favonia quits (~favonia@user/favonia) (Ping timeout: 256 seconds)
11:55:19 × bobfang quits (~bobfang@2a01:4b00:87fe:be00:30ce:ab50:b4f4:7d62) (Client Quit)
11:57:00 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 268 seconds)
11:57:40 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 256 seconds)
11:59:15 azimut joins (~azimut@gateway/tor-sasl/azimut)
12:02:33 × dsrt^ quits (~dsrt@68.101.63.101) (Ping timeout: 268 seconds)
12:04:12 <hololeap> % import Data.Bifunctor.Join
12:04:13 <yahb> hololeap:
12:04:28 <hololeap> % :t either id id . runJoin -- idnar
12:04:28 <yahb> hololeap: Join Either c -> c
12:04:33 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
12:05:13 <hololeap> % :t \f -> either id id . runJoin . fmap f
12:05:14 <yahb> hololeap: (a -> c) -> Join Either a -> c
12:05:53 <hololeap> % :t \f -> either id id . runJoin . fmap f . Join -- there we go ;)
12:05:53 <yahb> hololeap: (a -> c) -> Either a a -> c
12:08:20 dminuoso prefers selective
12:08:54 <dminuoso> It seems more fitting
12:09:15 <dminuoso> in particular with branch
12:09:20 <dminuoso> branch :: Selective f => f (Either a b) -> f (a -> c) -> f (b -> c) -> f c
12:09:37 <dminuoso> branch x f f
12:09:45 <hololeap> fair enough. I just wanted to point out that bifunctors has some hidden goodies
12:09:59 dsrt^ joins (~dsrt@68.101.63.101)
12:10:00 <dminuoso> Who knows, depending on idnar's access pattern, they might even end up doing something like `branch x f g` if they are fmapping before
12:10:30 <dminuoso> hololeap: Yeah, Join is a neat thing I havent heard of before
12:11:06 <dminuoso> Perhaps selective is not so elegant, since you need to run it through Identity as well
12:11:14 <dminuoso> Perhaps points to you after all, hololeap
12:11:31 <idnar> mergeBy (comparing (view (choosing _1 _1))) (Left <$> trades) (Right <$> fees)
12:11:32 × n8chan quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Read error: Connection reset by peer)
12:12:25 × ubert quits (~Thunderbi@p200300ecdf0ba29adda7833ccd9cfa98.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
12:12:26 ubert1 is now known as ubert
12:12:27 n8chan joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
12:13:13 <idnar> seems inelegant
12:13:33 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
12:13:59 Guest17 joins (~Guest17@wificampus-098247.grenet.fr)
12:14:12 <dminuoso> idnar: Heh I have this type of access pattern frequently
12:14:19 <dminuoso> It's very unidiomatic and doesnt fit well into optics/lens
12:14:30 <dminuoso> What I do is this:
12:14:40 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Client Quit)
12:14:49 <Guest17> so I was wondering how the the Eq class "works under the hood"
12:14:57 <dminuoso> idnar: https://gist.github.com/dminuoso/079df3993f83700eedd188ecb5d92820
12:15:10 BobFang1992_ joins (~textual@2a01:4b00:87fe:be00:30ce:ab50:b4f4:7d62)
12:15:21 × sunarch quits (uid526836@user/sunarch) (Quit: Connection closed for inactivity)
12:15:35 <dminuoso> Where: unsafeSingular :: forall k is s a. Is k A_Traversal => Optic' k is s a -> Lens' s a
12:15:51 <Guest17> does haskell have functions for comparing its primitive types like Int and Char?
12:15:56 __monty__ joins (~toonn@user/toonn)
12:16:04 <Guest17> that map to FFI calls, I suppose?
12:16:05 <dminuoso> idnar: This could perhaps work for you, because then you can simply pretend you have a lens and it just works.
12:16:28 <dminuoso> So for your case you'd just write: bothSides = unsafeSingular (_Left `failingT` _Right)
12:16:44 <hololeap> Guest17: generally, you convert one type to the other first
12:17:43 <hololeap> but there probably is some low-level way of comparing unboxed values
12:19:01 <Guest17> hololeap: "unboxed values" ?
12:20:03 <geekosaur> I'm not sure what Guest17 is asking
12:21:05 <geekosaur> but the primitive values contained within types like Int and Char ("unboxed values") can be compared using intrinsics that map directly to assembly code in the code generator
12:21:20 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
12:22:03 <geekosaur> and much of the time the compiler will know that it can unbox an Int and directly generate and compare the values, so the result is as fast as assembly code
12:22:08 <geekosaur> @src Int
12:22:08 <lambdabot> data Int = I# Int#
12:22:08 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Client Quit)
12:22:25 <hpc> the "box" around unboxed values is the stuff that gives you laziness and such
12:22:29 <geekosaur> the # marks it as internal and there's an extension to access those directly
12:23:11 <geekosaur> Int# is a signed machine word and operations on it generally map straight to assembly language instructions
12:23:39 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Remote host closed the connection)
12:23:45 × Guest17 quits (~Guest17@wificampus-098247.grenet.fr) (Ping timeout: 256 seconds)
12:23:55 azimut joins (~azimut@gateway/tor-sasl/azimut)
12:25:19 machinedgod joins (~machinedg@24.105.81.50)
12:25:26 <int-e> :t (GHC.Prim.<#)
12:25:27 <lambdabot> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
12:26:05 <int-e> (that's one of the builtin primitive comparison operations)
12:26:26 <dminuoso> And how is that turned back into a Bool?
12:26:53 <dminuoso> Or does this produce something like 0 or 1, and that gets pattern matched back into False/True?
12:27:06 <alzgh> what was the flag for enabling explicit class method signatures?
12:27:21 <dminuoso> alzgh: InstanceSigs ?
12:27:28 <int-e> :t GHC.Exts.isTrue#
12:27:29 <lambdabot> GHC.Prim.Int# -> Bool
12:27:34 <dminuoso> int-e: Ah!
12:27:57 <alzgh> right, thanks dminuoso
12:28:12 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
12:28:24 <int-e> which isn't a builtin but an alias: isTrue# x = tagToEnum# x
12:28:43 <hololeap> speaking of InstanceSigs, what's the status of some meta-extension like Extensions2021 or something? I remember reading about that being considered at some point
12:29:04 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
12:29:05 <merijn> GHC2021
12:29:23 <int-e> dminuoso: conceptually it's a case expression, of course.
12:29:29 × dibblego quits (~dibblego@haskell/developer/dibblego) (Ping timeout: 250 seconds)
12:29:42 <hololeap> oh, nice
12:30:01 × Everything quits (~Everythin@37.115.210.35) (Quit: leaving)
12:30:04 geekosaur joins (~geekosaur@xmonad/geekosaur)
12:30:37 dibblego joins (~dibblego@122-199-1-30.ip4.superloop.com)
12:30:38 × dibblego quits (~dibblego@122-199-1-30.ip4.superloop.com) (Changing host)
12:30:38 dibblego joins (~dibblego@haskell/developer/dibblego)
12:31:52 <int-e> and presumably the compiler knows some simplifciations that optimize case tagToEnum# foo of ... accordingly.
12:32:17 <dminuoso> isTrue# x = tagToEnum# x
12:32:21 <dminuoso> And tagToEnum# is a primop it seems
12:33:07 <hololeap> where can I find a list of which extensions that enables?
12:33:23 <tomsmeding> https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0380-ghc2021.rst
12:33:32 <merijn> hololeap: Presumably in the GHC user guide? :p
12:33:34 <hololeap> ok
12:33:39 <yushyin> hololeap: https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html#extension-GHC2021
12:33:42 <tomsmeding> oh better source: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/control.html?highlight=ghc2021#extension-GHC2021
12:33:55 <hololeap> sorry, I had a hard time finding it in the user guide
12:34:00 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
12:34:02 <tomsmeding> wrong ghc version? :)
12:34:25 <hololeap> no, I just didn't notice the search bar
12:34:37 <hololeap> I was looking through different categories
12:35:27 <tomsmeding> tip: https://downloads.haskell.org/ghc/latest/docs/html/users_guide/exts/table.html
12:36:08 <tomsmeding> I'm not sure whether the extensions are even divided into categories, I never use the categories to find an extension
12:36:20 <tomsmeding> s/whether/why/
12:36:38 <tomsmeding> (that's quite a change in meaning...)
12:36:42 <hololeap> for whatever reason, the docs for 8.10.6 on my PC have the extensions section as one big HTML file, so that's what I'm used to searching through
12:36:59 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
12:41:04 <hololeap> interesting; there are some extensions listed that aren't in the user's guide e.g. RelaxedPolyRec
12:41:38 <yushyin> maybe part of the haskell report
12:41:45 <hololeap> why wouldn't TypeFamilies be in there?
12:42:12 <hololeap> or GADTs
12:42:13 <tomsmeding> why wouldn't GADTs be in there
12:42:14 <tomsmeding> yeah
12:42:29 <yushyin> https://gitlab.haskell.org/ghc/ghc/-/issues/18630
12:42:51 <hololeap> it's all in the docs. except for what isn't in the docs
12:42:57 <tomsmeding> why did PolyKinds, which changes semantics (IIRC), get more votes than TypeFamilies and GADTs
12:43:47 <Cajun> what semantics do polykinds change? i know it lets you use polymorphic kinds, but when does that really change the meaning of a program?
12:44:09 <tomsmeding> see also https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Driver/Session.hs#L3618-3620
12:44:59 <tomsmeding> Cajun: I admit I don't have an example, just some vague recollection. Can't PolyKinds make some code not compile because kinds become more ambiguous or something?
12:45:23 <Cajun> that would make sense, would need to tinker with it some more
12:45:34 <Cajun> cant wait for Thinking with Types 2 :)
12:46:36 <yushyin> cant wait for -XGHC2023! :P
12:47:10 <Cajun> then code breaks because it has -XGHC2021 instead of 2023 :P
12:51:25 <lortabac> TypeFamilies implies MonoLocalBinds, enabling it may make previously working programs not compile anymore
12:51:50 deadmarshal joins (~deadmarsh@95.38.116.147)
12:51:54 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
12:52:15 <lortabac> same problem for GADTs
12:52:59 <tomsmeding> ah
12:54:22 × max22- quits (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 268 seconds)
12:56:22 <dminuoso> Is Data.Text.toLower injective?
12:56:38 <dminuoso> Sorry
12:56:40 <dminuoso> Let me rephrase:
12:57:25 <dminuoso> My question is very redundant and silly.
12:57:27 × whatsupdoc quits (uid509081@hampstead.irccloud.com) (Quit: Connection closed for inactivity)
13:00:21 × slice quits (~slice@user/slice) (Quit: zzz)
13:01:24 <tomsmeding> :)
13:01:49 <tomsmeding> it is injective for certain languages though
13:02:11 <dminuoso> For a moment I was pondering whether `instance Eq where (Domain k) == (Domain l) == T.toLower k == T.toLower l` would behave nicely
13:02:53 <tomsmeding> it's an equivalence relation
13:03:14 <dminuoso> Sure, and DNS even requires this
13:03:44 <dminuoso> My confusion started with "but what if this is not ASCII" - but this is not possible by construction
13:03:55 <dminuoso> Which is why the question was silly to begin with
13:04:23 <dminuoso> Fun fact, in most PCRE implementations \d is likely not what you want.
13:04:32 <dminuoso> Since it often will match UTF8 digit characters of various scripts...
13:05:48 <merijn> dminuoso: No
13:06:07 <merijn> dminuoso: or rather, toLower might be, because it's a hack-job implementation
13:06:10 <c_wraith> Hmm. if it's not supposed to be outside of ASCII, why are you representing it as Text?
13:06:19 <merijn> Unicode toLower is locale dependent
13:06:56 <dminuoso> c_wraith: Yeah ByteString is probably more fitting. Honestly there's a bunch of interfaces that made me pick Text instead
13:06:58 <dminuoso> Seemed more compatible
13:07:24 <c_wraith> there's a well-defined conversion from unicode to bytes for domains
13:07:34 <c_wraith> and nothing else in the world uses it
13:07:56 <dminuoso> Well, strictly speaking Im writing a DNS server layer - but punycode conversion would happen outside of it
13:08:06 <dminuoso> I think?
13:08:09 <dminuoso> Uh.
13:08:11 <dminuoso> Hold on.
13:08:43 <c_wraith> just at a domain level, you should either have bytes that have been encoded, or text that hasn't.
13:08:55 <c_wraith> Those are the two levels that make sense.
13:09:53 <dminuoso> c_wraith: The main reason I have Text here, is because I end up putting it out via JSON.
13:10:04 <dminuoso> using aeson
13:10:43 <dminuoso> There's an extra newtype around it to avoid accidental confusion, so you have to go through my parser routine anyway
13:11:31 <dminuoso> And my parser has things like isLetDig c = isAsciiLetter c || isDigit c
13:16:57 × BobFang1992_ quits (~textual@2a01:4b00:87fe:be00:30ce:ab50:b4f4:7d62) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:17:45 kuribas joins (~user@ptr-25vy0i8ozjc5f1a3qes.18120a2.ip6.access.telenet.be)
13:21:21 zer0bitz joins (~zer0bitz@2001:2003:f6bc:f00:bde7:830:4cf1:2fa1)
13:25:32 × Nrmncr quits (~Neuromanc@user/neuromancer) (Ping timeout: 240 seconds)
13:27:53 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Read error: Connection reset by peer)
13:29:29 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:32:10 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
13:33:58 × dschrempf quits (~dominik@62.240.134.78) (Ping timeout: 260 seconds)
13:36:59 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Ping timeout: 264 seconds)
13:38:22 dschrempf joins (~dominik@62.240.134.78)
13:38:28 Codaraxis_ joins (~Codaraxis@user/codaraxis)
13:38:34 × CiaoSen quits (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
13:40:17 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
13:41:11 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 264 seconds)
13:42:12 jbox joins (~jbox@user/jbox)
13:43:41 × dsrt^ quits (~dsrt@68.101.63.101) (Ping timeout: 268 seconds)
13:43:46 Lycurgus joins (~juan@98.4.112.204)
13:45:44 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
13:45:55 jippiedoe joins (~david@2a02-a44c-e14e-1-fa5e-26bf-14ad-ea07.fixed6.kpn.net)
13:48:44 × dschrempf quits (~dominik@62.240.134.78) (Ping timeout: 256 seconds)
13:50:32 shriekingnoise joins (~shrieking@186.137.144.80)
13:51:20 slice joins (~slice@user/slice)
13:54:23 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 264 seconds)
13:55:20 sydddddd joins (~syd@cpc91646-hart11-2-0-cust432.11-3.cable.virginm.net)
13:55:33 max22- joins (~maxime@2a01cb0883359800f3916cdff6a2f8a4.ipv6.abo.wanadoo.fr)
13:56:13 <kuribas> ApplicativeDo could have been one of the best extensions, if it wasn't so buggy...
13:56:25 <kuribas> It's very useful with records.
13:57:09 <kuribas> Right now, if you would use it for parallelism, it may give you sequencing when you expect parallism.
13:58:11 azimut joins (~azimut@gateway/tor-sasl/azimut)
13:59:13 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
14:00:46 <sydddddd> does anyone have any links on ALens' info (other than Lens docs) ?
14:01:56 <lortabac> kuribas: it's not perfect but it's always been good enough for me
14:02:07 hololeap joins (~hololeap@user/hololeap)
14:02:21 <lortabac> as long as you respect the rules it should be quite reliable
14:02:58 <Lycurgus> kuribas, it does say 'best effort' on parallelism
14:03:04 <c_wraith> sydddddd: it's not really that interesting. It's mostly there to not need to infer polymorphic types
14:03:13 <kuribas> Lycurgus: I'd say it can do better :)
14:03:33 <Lycurgus> that's like sayin it's undone/uncovered
14:03:33 <kuribas> If I do (a, b) <- someApplicative, it will consider it a monad.
14:03:51 <kuribas> Lycurgus: it's buggy and flawed, yes.
14:04:48 <sydddddd> c_wraith: thanks. I tend to use it with specific type errors I've come to recognise and to be fair it usually works.
14:04:55 <Lycurgus> i would say flawed but within spec
14:05:04 <kuribas> Lycurgus: not even that
14:05:37 <sydddddd> usually when passing/returning polymorphic functions that take and return lenses, when type annotations don't help.
14:05:42 <Lycurgus> (as far as parallelism and do)
14:06:18 <sydddddd> does that sound about right for typical usage of it?
14:06:47 <lortabac> kuribas: do you have an example of unexpected behavior?
14:07:00 <kuribas> Lycurgus: it removes polymorphism.
14:07:37 <kuribas> Lycurgus: Also do "x <- foo; y <- bar; let z = x + y; pure z" becomes monadic.
14:08:05 <kuribas> Lycurgus: Or "do (x, y) <- foo; z <- bar; pure (x + y + z)"
14:08:26 <Lycurgus> i wouldn expect parallelism to be handled properly outside stuff explicitly oriented for that
14:08:27 × cosimone quits (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Remote host closed the connection)
14:08:54 <kuribas> Sure I can rewrite than, but it's annoying...
14:08:54 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
14:09:07 <kuribas> Plus, there is no indication that it should be parallel.
14:09:35 <kuribas> So you could think that everything is fine and optimally parallel when it isn't.
14:10:35 geekosaur wonders if the new QualifiedDo stuff would be helpful there
14:10:55 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
14:11:02 <geekosaur> although probaly not since you can't use that to choose the Applicative instance
14:11:03 <geekosaur> sigh
14:11:29 <geekosaur> might be an interesting extension to QualifiedDo since then it could throw a type error if it "upgraded" to Monad
14:14:08 dsrt^ joins (~dsrt@68.101.63.101)
14:14:40 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 265 seconds)
14:17:20 deadmarshal joins (~deadmarsh@95.38.116.147)
14:22:02 kuribas wonders how it's done at facebook
14:24:54 <jippiedoe> I'd love QualifiedDo to take into account what's in scope, that would also allow you to opt out of MonadFail and get exhaustiveness checks in your monad bindings instead
14:31:41 jkaye joins (~jkaye@216.53.205.34)
14:32:25 × synthmeat quits (~synthmeat@user/synthmeat) (Quit: WeeChat 3.3)
14:32:54 favonia joins (~favonia@user/favonia)
14:34:02 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
14:35:18 pera joins (~pera@user/pera)
14:35:19 <hololeap> I would like for there to be some way to force applicative do, rather than it silently defaulting back to monadic do
14:37:04 × xsperry quits (~xs@user/xsperry) (Remote host closed the connection)
14:40:11 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:40:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
14:40:11 wroathe joins (~wroathe@user/wroathe)
14:44:18 Sgeo joins (~Sgeo@user/sgeo)
14:48:03 <kuribas> like purescript ado?
14:49:14 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
14:50:04 × Lycurgus quits (~juan@98.4.112.204) (Quit: Exeunt)
14:50:44 waleee joins (~waleee@h-82-196-111-63.NA.cust.bahnhof.se)
14:51:59 × deadmarshal quits (~deadmarsh@95.38.116.147) (Quit: ZNC 1.8.2 - https://znc.in)
14:52:25 deadmarshal joins (~deadmarsh@95.38.116.147)
14:53:59 × hiruji quits (~hiruji@user/hiruji) (Ping timeout: 268 seconds)
14:55:21 BobFang1992 joins (~textual@2a01:4b00:87fe:be00:2941:7b2f:659a:8781)
14:55:47 <maerwald> "wonders how it's done at facebook" -> you just lie about what you did xD
14:55:59 mimmy joins (~mimmy@146.70.75.190)
14:56:13 <hololeap> kuribas: I haven't used purescript but yeah, ado was what I was thinking
14:56:57 <Franciman> ahah
14:57:25 <hololeap> abort
14:58:40 nvmd joins (~nvmd@user/nvmd)
14:59:32 <hololeap> I agree it's pretty clunky, but at least there is a way to do it... http://sprunge.us/HPeHM8
14:59:52 ymherklotz joins (~user@2a0c:5bc0:40:107b:fdfc:4d2d:898a:f9f5)
14:59:57 hiruji joins (~hiruji@user/hiruji)
15:03:31 <hololeap> I don't know why the `let` built in to the do notation would force it back to monadic do
15:05:48 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
15:06:09 pavonia joins (~user@user/siracusa)
15:06:21 × sprout_ quits (~quassel@2a02:a467:ccd6:1:2c29:7076:9399:3f2e) (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.)
15:06:35 BobFang1992 is now known as bobfang1992_
15:06:48 sprout joins (~quassel@2a02:a467:ccd6:1:7816:2c69:3dcc:933a)
15:07:08 <hololeap> > Note: the final statement must match one of these patterns exactly ... In particular, slight variations such as `return . Just $ x` or `let x = e in return x` would not be recognised.
15:07:48 <hololeap> so it sort of explains it
15:09:07 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in)
15:10:37 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
15:11:27 lavaman joins (~lavaman@98.38.249.169)
15:12:00 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:6cf6:5d02:5f47:daaa) (Quit: WeeChat 2.8)
15:12:11 × jippiedoe quits (~david@2a02-a44c-e14e-1-fa5e-26bf-14ad-ea07.fixed6.kpn.net) (Ping timeout: 265 seconds)
15:13:39 × dsrt^ quits (~dsrt@68.101.63.101) (Remote host closed the connection)
15:14:31 zer0bitz_ joins (~zer0bitz@2001:2003:f6bc:f00:93d:ef3a:ec37:e2db)
15:16:00 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
15:16:11 × zer0bitz quits (~zer0bitz@2001:2003:f6bc:f00:bde7:830:4cf1:2fa1) (Ping timeout: 268 seconds)
15:19:32 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 240 seconds)
15:20:25 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…)
15:22:26 xsperry joins (~xs@cpe-188-129-101-182.dynamic.amis.hr)
15:22:29 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:22:30 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:22:30 wroathe joins (~wroathe@user/wroathe)
15:23:37 cheater1__ joins (~Username@user/cheater)
15:23:37 × cheater quits (~Username@user/cheater) (Ping timeout: 265 seconds)
15:23:40 cheater1__ is now known as cheater
15:26:40 × mimmy quits (~mimmy@146.70.75.190) (Ping timeout: 268 seconds)
15:27:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 268 seconds)
15:27:59 cheater1__ joins (~Username@user/cheater)
15:28:18 × cheater quits (~Username@user/cheater) (Ping timeout: 260 seconds)
15:28:23 cheater1__ is now known as cheater
15:30:11 × alzgh quits (~alzgh@user/alzgh) (Ping timeout: 256 seconds)
15:33:50 ub joins (~Thunderbi@p200300ecdf0ba29aa5e920d3668bb518.dip0.t-ipconnect.de)
15:35:02 × acidjnk quits (~acidjnk@p200300d0c7271e04495a3d38c01005cf.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
15:36:35 × jkaye quits (~jkaye@216.53.205.34) (Remote host closed the connection)
15:37:00 jkaye joins (~jkaye@216.53.205.34)
15:37:56 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
15:38:17 mimmy joins (~mimmy@146.70.75.189)
15:38:28 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Remote host closed the connection)
15:39:34 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
15:40:35 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
15:43:57 alzgh joins (alzgh@user/alzgh)
15:44:33 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
15:45:30 gandalf_ joins (gandalf@2a01:270:20cd:88::1)
15:45:47 gandalf_ parts (gandalf@2a01:270:20cd:88::1) ()
15:45:58 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
15:46:19 lavaman joins (~lavaman@98.38.249.169)
15:48:15 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 268 seconds)
15:49:46 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
15:50:47 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
15:51:33 lortabac joins (~lortabac@2a01:e0a:541:b8f0:e6ab:18be:9a14:11e0)
15:51:33 × turco32 quits (~turco32@104.158.25.93) (Quit: Leaving)
15:56:15 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
15:58:38 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
16:02:59 CiaoSen joins (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
16:05:35 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
16:05:48 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: restarting)
16:06:04 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
16:08:20 × pera quits (~pera@user/pera) (Quit: leaving)
16:08:21 × mjs2600 quits (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net) (Quit: ZNC 1.8.2 - https://znc.in)
16:13:33 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds)
16:13:34 deadmarshal joins (~deadmarsh@95.38.116.147)
16:14:10 × jkaye quits (~jkaye@216.53.205.34) (Ping timeout: 268 seconds)
16:16:16 favonia joins (~favonia@user/favonia)
16:18:06 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
16:18:36 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 276 seconds)
16:18:55 × Midjak quits (~Midjak@82-65-111-221.subs.proxad.net) (Quit: This computer has gone to sleep)
16:20:03 jakalx parts (~jakalx@base.jakalx.net) ()
16:20:16 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
16:21:39 abrantesasf joins (~abrantesa@187.36.170.211)
16:22:31 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:e6ab:18be:9a14:11e0) (Quit: WeeChat 2.8)
16:26:47 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.3)
16:27:25 × terrorjack quits (~terrorjac@2a01:4f8:1c1e:509a::1) (Quit: The Lounge - https://thelounge.chat)
16:28:07 monochrom joins (~trebla@216.138.220.146)
16:29:02 terrorjack joins (~terrorjac@2a01:4f8:1c1e:509a::1)
16:30:18 × DNH quits (~DNH@2a02:8108:1100:16d8:a055:2897:27b6:f1d6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:31:56 × mimmy quits (~mimmy@146.70.75.189) (Ping timeout: 265 seconds)
16:32:06 DNH joins (~DNH@2a02:8108:1100:16d8:a055:2897:27b6:f1d6)
16:36:48 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
16:37:30 mimmy joins (~mimmy@146.70.75.189)
16:39:47 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
16:40:07 alzgh joins (alzgh@user/alzgh)
16:41:11 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 264 seconds)
16:42:35 <kuribas> hololeap: well "return let x = e in x" works
16:42:44 × kuribas quits (~user@ptr-25vy0i8ozjc5f1a3qes.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
16:43:30 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
16:44:26 lavaman joins (~lavaman@98.38.249.169)
16:48:09 jakalx joins (~jakalx@base.jakalx.net)
16:48:30 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 260 seconds)
16:48:30 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 260 seconds)
16:48:57 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
16:49:16 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
16:49:38 deadmarshal joins (~deadmarsh@95.38.116.147)
16:49:56 <monochrom> I am reading and encouraged by https://anthony.noided.media/blog/thoughts/haskell/languages/2021/11/05/writing-about-haskell-is-hard.html Perhaps I should include rank-n types in my class next time. (I already have Applicative, and Functor, and Monad.)
16:50:12 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
16:50:24 <monochrom> And yeah Boring Haskell is a bit misguided.
16:50:45 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
16:50:56 lbseale joins (~ep1ctetus@user/ep1ctetus)
16:52:23 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
16:52:45 <maerwald> it depends on laziness to not blow up? hope they have a good test suite :)
16:55:25 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
16:57:33 × ub quits (~Thunderbi@p200300ecdf0ba29aa5e920d3668bb518.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
17:01:15 <monochrom> Now I'm reading https://reasonablypolymorphic.com/blog/century-of-the-fruitbat/ (OK, so basically I'm catching up with yesterday's Haskell Weekly News heh)
17:02:41 <monochrom> You know what, ironically, I may appreciate Prelude omitting head and tail. Because then my students are forced to write like "f [] = ... f (x:xs) = ..." and learn pattern matching :)
17:03:07 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
17:04:03 <maerwald> Until they need to use Text
17:04:07 <maerwald> and then the world collapses
17:04:22 <maerwald> everything was a lie!
17:04:24 <monochrom> And in the rare case I need head, it's a simple lambda, (\(x:_) -> x).
17:05:00 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:05:22 <maerwald> (\[x] -> x)
17:05:30 <monochrom> I don't use String to teach lists. I use [Int] [Bool] etc.
17:06:15 <maerwald> @pl (\(x:_) -> x)
17:06:15 <lambdabot> head
17:06:22 <monochrom> haha
17:12:14 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Remote host closed the connection)
17:12:59 × mimmy quits (~mimmy@146.70.75.189) (Ping timeout: 264 seconds)
17:14:27 × mbuf quits (~Shakthi@122.174.57.32) (Quit: Leaving)
17:16:32 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:5000:2c7a:ffb3:dbe2) (Ping timeout: 240 seconds)
17:18:16 xff0x joins (~xff0x@2001:1a81:53ef:fb00:5000:2c7a:ffb3:dbe2)
17:23:19 slaydr joins (~seriley@192.109.205.174)
17:24:35 <slaydr> is the Haskell2020 report still in the works?
17:25:30 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
17:26:11 × jbox quits (~jbox@user/jbox) (Ping timeout: 264 seconds)
17:30:47 xkuru joins (~xkuru@user/xkuru)
17:30:51 mbuf joins (~Shakthi@122.174.57.32)
17:31:04 <maerwald> haha
17:31:19 <maerwald> maybe when covid is over
17:31:23 × ubert quits (~Thunderbi@p200300ecdf0ba29ae6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 265 seconds)
17:31:27 <maerwald> (like... never)
17:31:51 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 268 seconds)
17:31:58 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Ping timeout: 260 seconds)
17:35:02 × Jing quits (~hedgehog@115.207.47.111) (Read error: Connection reset by peer)
17:36:58 Jing joins (~hedgehog@2604:a840:3::1094)
17:37:17 mvk joins (~mvk@2607:fea8:5cc1:fa00::4702)
17:38:04 burnsidesLlama joins (~burnsides@dhcp168-013.wadham.ox.ac.uk)
17:38:11 mimmy joins (~mimmy@146.70.75.190)
17:40:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
17:41:11 × jonathanx_ quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 264 seconds)
17:42:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:42:45 econo joins (uid147250@user/econo)
17:43:22 × CannabisIndica quits (~herb@user/mesaboogie) (Ping timeout: 256 seconds)
17:47:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
17:47:43 retroid_ joins (~retro@97e2ba2e.skybroadband.com)
17:48:13 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:49:11 <monochrom> Even the 2020 Summer Games have already finished >:)
17:49:45 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
17:49:54 <monochrom> It's now pretty clear that we will have GHC2021 instead.
17:50:22 × CiaoSen quits (~Jura@p200300c95716ce002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
17:52:03 <monochrom> I am paradoxically both surprised and not surprised that no one complains against GHC2021, whereas people get vocal against no-/=.
17:53:51 × slaydr quits (~seriley@192.109.205.174) (Remote host closed the connection)
17:54:37 <yushyin> but if we are comfortable with ghc2021, maybe it will pave the way for haskell prime :-)
17:54:47 <monochrom> This is consistent with my model that programmers are good at technicalities (even when technicalities are irrelevant) and very bad at social, cultural considerations (even when much more relevant).
17:55:36 <monochrom> GHC2021 is "not" a breaking change because technically it is an opt-"in". So no one will complain.
17:56:48 <monochrom> Just you wait. It is doomed to be so commonly used that socially you will be forced into it anyway. Then it is a breaking change.
17:57:08 deadmarshal joins (~deadmarsh@95.38.116.147)
17:58:00 <monochrom> Whereas no-/= is statistically a pretty irrelevant "breaking" change.
17:58:51 <monochrom> I don't buy the "but what about the principles?" argument because it would apply to GHC2021 too so why aren't you speaking up.
17:59:10 mjs2600 joins (~mjs2600@c-24-91-3-49.hsd1.vt.comcast.net)
18:00:28 Successus joins (~Successus@gateway/tor-sasl/successus)
18:01:12 lavaman joins (~lavaman@98.38.249.169)
18:02:04 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 256 seconds)
18:02:30 emf joins (~emf@162.218.217.186)
18:05:46 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
18:06:10 × alzgh quits (alzgh@user/alzgh) (Remote host closed the connection)
18:06:58 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
18:07:38 emf_ joins (~emf@2620:10d:c090:400::5:5ceb)
18:08:34 × max22- quits (~maxime@2a01cb0883359800f3916cdff6a2f8a4.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
18:09:18 × emf quits (~emf@162.218.217.186) (Ping timeout: 260 seconds)
18:11:42 × DNH quits (~DNH@2a02:8108:1100:16d8:a055:2897:27b6:f1d6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:12:40 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
18:12:46 <davean> monochrom: I did speak up about GHC2021
18:13:02 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 240 seconds)
18:13:11 alzgh joins (~alzgh@user/alzgh)
18:13:34 <davean> No one gives a shit about voices that aren't acting little toddlers who just won't stop crying though. I can't be bothered to keep complaining though and making hyperbolic claims about it.
18:15:37 whatsupdoc joins (uid509081@hampstead.irccloud.com)
18:16:31 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
18:18:23 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Ping timeout: 264 seconds)
18:25:35 × rtsn quits (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se) (Ping timeout: 264 seconds)
18:26:01 rtsn joins (~nstr@c-c7fe225c.07-59-7570703.bbcust.telenor.se)
18:26:54 × Successus quits (~Successus@gateway/tor-sasl/successus) ()
18:27:00 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
18:27:57 × hololeap quits (~hololeap@user/hololeap) (Ping timeout: 276 seconds)
18:28:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:28:15 hololeap joins (~hololeap@user/hololeap)
18:28:31 vicfred joins (~vicfred@user/vicfred)
18:30:21 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
18:30:33 × mbuf quits (~Shakthi@122.174.57.32) (Quit: Leaving)
18:31:52 <dsal> What's bad in GHC2021?
18:31:58 × hololeap quits (~hololeap@user/hololeap) (Remote host closed the connection)
18:33:04 <dsal> Also, I'm not in a great place to understand the arguments for keeping /= -- I kind of like change in general, even when it's slightly uncomfortable.
18:33:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
18:33:53 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:34:26 hololeap joins (~hololeap@user/hololeap)
18:35:23 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 268 seconds)
18:36:01 × ymherklotz quits (~user@2a0c:5bc0:40:107b:fdfc:4d2d:898a:f9f5) (Remote host closed the connection)
18:37:53 zer0bitz joins (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi)
18:37:59 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…)
18:38:42 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 260 seconds)
18:39:05 ymherklotz joins (~ymherklot@2a0c:5bc0:40:107b:fdfc:4d2d:898a:f9f5)
18:39:18 × dyeplexer quits (~dyeplexer@user/dyeplexer) (Remote host closed the connection)
18:39:41 × zer0bitz_ quits (~zer0bitz@2001:2003:f6bc:f00:93d:ef3a:ec37:e2db) (Ping timeout: 268 seconds)
18:43:32 × Cajun quits (~Cajun@user/cajun) (Quit: Client closed)
18:44:25 × bobfang1992_ quits (~textual@2a01:4b00:87fe:be00:2941:7b2f:659a:8781) (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:44:38 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
18:45:20 × lemonsnicks quits (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net) (Ping timeout: 265 seconds)
18:45:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:46:19 lemonsnicks joins (~lemonsnic@cpc159519-perr18-2-0-cust114.19-1.cable.virginm.net)
18:47:09 <yushyin> i think GHC2021 was long overdue and a good first step, i already started a new toy project with GHC2021 ;>
18:47:09 <monochrom> yushyin: I have now thought about it more. One possible outcome is what you said, yes. But another possible outcome is "so we don't need a Haskell Prime".
18:47:50 <yushyin> monochrom: also possible, yes :/
18:48:34 <monochrom> I am pessimistic. Every silver lining has tarnish.
18:50:01 <monochrom> I like GHC2021 too. I even think it is not bold enough. I want BlockArguments to be in. I also want FunDeps in too (or else what's the point of including MPTC).
18:50:41 <monochrom> Ah and DataKinds (or else what's the point of including all the other kind-related extensions).
18:51:17 <dsal> I don't exactly understand BlockArguments. It's kind of like TupleSections in that you just try to do it and the compiler tells you to flip it. Are there downsides?
18:51:25 <geekosaur> sounds like they're still arguing over fundeps vs. tyfams?
18:51:32 <monochrom> I also want NoStarIsType, but it's a minor issue.
18:52:17 <geekosaur> dsal, it can be harder to read (for humans, not the compiler: it actually simplifies parsing by removing a pointless distinction)
18:52:20 <monochrom> Ah tyfams is probably better but needs more consensus. I'm less sad now. :)
18:52:43 × vicfred quits (~vicfred@user/vicfred) (Quit: Leaving)
18:52:46 <dsal> geekosaur: Yeah, sometimes it's super clear. Sometimes it's slightly confusing.
18:53:05 <monochrom> Generally BlockArguments is easy to read if you add more line breaks.
18:53:42 <monochrom> "withX \x -> <newline> withY \y -> <newline> ..." is easy to read.
18:53:46 × motherfsck quits (~motherfsc@user/motherfsck) (Read error: Connection reset by peer)
18:53:55 <monochrom> "withX \x -> withY \y -> ..." is hard to read.
18:54:09 lavaman joins (~lavaman@98.38.249.169)
18:54:58 <monochrom> Call me a stubborn scientist but this clearly puts the blame on one-liners not block arguments.
18:55:07 <monochrom> The extension you're looking for is NoOneLiners.
18:55:21 motherfsck joins (~motherfsc@user/motherfsck)
18:56:52 <dsal> -XNoNewlines
18:56:53 <monochrom> Oh BTW a lot of beginners claim that "f (g (h (i (j (a+b))))" is hard to read too. Are they going to advocate NoParentheses too?
18:57:16 <geekosaur> that's just why so many people use $
18:57:20 <c_wraith> yes. prevent the use of tuples!
18:57:21 <tomsmeding> monochrom: earlier today it was noted that TypeFamilies enables MonoLocalBinds, which is breaking with Haskell2010
18:57:39 <dsal> This is a thing ormolu is doing to me. If I want to break a thing into two lines, it's like, "Nope, that's 8 lines." So I have to choose between one really long line, or 8 lines of one word each.
18:57:58 <monochrom> Meanwhile, the same people, since they came from OOP backgrounds, also claim that "x.plus(y.plus(z))" is better than "x+y+z".
18:58:06 × sm2n_ quits (~sm2n@user/sm2n) (Read error: Connection reset by peer)
18:58:10 sm2n joins (~sm2n@user/sm2n)
18:58:10 max22- joins (~maxime@2a01cb08833598003c399b41b69f08ec.ipv6.abo.wanadoo.fr)
18:58:26 <tomsmeding> (C++ doesn't have that issue)
18:58:33 <monochrom> haha
18:58:36 <tomsmeding> (but then C++ is the kitchen sink anyway)
18:58:46 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 260 seconds)
18:59:09 <monochrom> But ExplicitForall already breaks Haskell2010. I can't use "forall" as a type variable, or not even a term variable.
18:59:36 <tomsmeding> oh interesting, I was somehow under the impression that GHC2021 was non-breaking
19:00:04 <tomsmeding> though the 'forall' breakage is less bad: it causes less programs to compile, but no programs to change meaning
19:00:18 <monochrom> It breaks very slightly. In fact, to be forthcoming, I think "forall"-reserved-word is the only breakage.
19:01:18 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:01:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
19:01:18 wroathe joins (~wroathe@user/wroathe)
19:01:29 <monochrom> But I would think MonoLocalBinds just causes less programs to compile too? I think it doesn't change meaning.
19:01:34 <tomsmeding> monochrom: my ghc already treats 'forall' as a reserved word, even with -XHaskell2010
19:01:35 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
19:02:03 <dsal> > isAlpha '∀'
19:02:05 <lambdabot> False
19:02:06 <dsal> Lame.
19:02:43 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:03:07 <tomsmeding> :set -XUnicodeSyntax
19:03:13 <monochrom> I think GHC -XHaskell2010 still deviates a bit from paper Haskell 2010 regarding that. :)
19:03:19 <tomsmeding> certainly
19:03:46 <tomsmeding> but we're talking about breakage between -XHaskell2010 and -XGHC2021, I think; talking about breakage between report haskell 2021 and -XGHC2021 is not productive, I think
19:03:49 <monochrom> Anyway I don't really raise hell about "forall", no one facetiously uses it as a variable :)
19:03:56 <tomsmeding> at least not in the context of deciding whether -XGHC2021 is a good idea
19:04:39 <tomsmeding> ah of course BangPatterns steals syntax
19:05:00 <monochrom> Ah, that, haha.
19:05:34 <tomsmeding> so -XGHC2021 is indeed breaking with respect to -XHaskell2010 :)
19:05:42 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 260 seconds)
19:05:50 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
19:06:32 <tomsmeding> that makes me agree mildly less with excluding TypeFamilies and GADTs in GHC2021
19:07:03 tomsmeding was starting with "that makes me mildly more in favour of adding those extensions" but adding is not a good idea :p
19:07:24 <dsal> What's the downside of GADTs?
19:07:32 <tomsmeding> implies -XMonoLocalBinds, which is breaking
19:07:33 <monochrom> I think the selection criteria were pragmatic rathan than "as a matter of inflexible high-horse principles".
19:07:47 <dsal> I forget the whole graph of implies. heh
19:07:48 × mimmy quits (~mimmy@146.70.75.190) (Ping timeout: 256 seconds)
19:08:02 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
19:08:07 <tomsmeding> in particular, note that GADTSyntax _is_ in :)
19:08:15 <monochrom> A good balance of "how many people want it" and "how compatible".
19:08:22 <tomsmeding> which is not very useful IMO, but subjective
19:08:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:08:39 <tomsmeding> monochrom: which is a fairly good way of deciding this, perhaps
19:08:58 <monochrom> Some people think that the GADT syntax is clearer, even for ADTs.
19:10:53 <monochrom> The disagreement is between "BNF-like syntax" and "spell out the type sigs of constructors"
19:11:28 zincy_ joins (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3)
19:11:31 <tomsmeding> a positive point of GADT syntax is that it makes explicit that the constructors are functions, and can be used and partially applied as such
19:11:47 <tomsmeding> which might be useful for learnerS?
19:11:50 <tomsmeding> s/S/s/
19:11:56 <davean> I think not having to formats is clearer, but I use AST type generally - never broke the habit.
19:12:03 <davean> *two formats
19:12:46 <c_wraith> It makes it easier to see that constructors are functions, but bizarrely harder to see that they can be used for pattern matching
19:13:01 <tomsmeding> good point
19:13:15 <davean> I just think you state both things and get it axiomaticly so seeing isn't relivent
19:13:30 <c_wraith> I just mean the same argument works both directions
19:13:41 <davean> and I think neither argument is relivent :)
19:13:45 <c_wraith> So neither is really better
19:13:49 <tomsmeding> in which case, normal ADT syntax is shorter :)
19:14:01 <davean> c_wraith: I think GADT is better, because then we don't need two
19:14:09 <davean> (still use AST typically)
19:14:21 <monochrom> See, who dares to say aloud "BNF unclear" >:)
19:15:04 <davean> monochrom: hum?
19:15:35 <monochrom> But I'm also a worst-of-both-worlds person, in addition to being pessimistic. I say that one should define an ADT by writing both syntaxes, both are required, and the compiler gets the pleasure of telling you they don't match up.
19:15:36 <geekosaur> bnf is clearer if you're used to it. it has certainly confused those who aren't, in my experience
19:17:17 <davean> The only part unclear about BNF in my oppinion is which damn one?
19:17:32 <monochrom> heh
19:17:32 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.3)
19:18:29 Guest99 joins (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net)
19:18:46 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
19:20:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:20:38 × max22- quits (~maxime@2a01cb08833598003c399b41b69f08ec.ipv6.abo.wanadoo.fr) (Ping timeout: 260 seconds)
19:21:48 <monochrom> Naaawwww! This is the better syntax: The notation for formation rules in natural deduction.
19:22:58 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
19:23:24 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
19:25:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
19:28:10 <c_wraith> just require all data types be written as a fold
19:29:43 mimmy joins (~mimmy@146.70.75.189)
19:30:47 <monochrom> How would that look? Would it look like "forall r. r -> (Int -> Char -> r) -> r" standing for "data Foo = C0 | C1 Int Char"?
19:31:08 <c_wraith> yep!
19:31:35 <monochrom> Because "data Foo where {C0 :: Foo; C1 :: Int -> Char -> Foo}" comes very close to that. Just s/r/Foo/ essentially.
19:31:57 Killirse joins (~Killirse@146.120.222.5)
19:31:59 unit73e joins (~emanuel@2001:818:e8dd:7c00:32b5:c2ff:fe6b:5291)
19:36:43 × slice quits (~slice@user/slice) (Quit: zzz)
19:37:52 × Killirse quits (~Killirse@146.120.222.5) (Remote host closed the connection)
19:39:19 <zincy_> davean: hey
19:40:51 <monochrom> You have tipped my balance towards the GADT-syntax side. :)
19:42:24 <monochrom> Regarding "each syntax makes some other side less clear", I have never been bothered by that, my teaching material has always needed to spell out all sides, it can't be helped.
19:48:56 × alzgh quits (~alzgh@user/alzgh) (Remote host closed the connection)
19:49:15 alzgh joins (~alzgh@user/alzgh)
19:50:11 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
19:50:35 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
19:54:43 allbery_b joins (~geekosaur@xmonad/geekosaur)
19:54:43 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
19:54:46 allbery_b is now known as geekosaur
19:55:06 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Read error: Connection reset by peer)
19:55:24 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
19:57:39 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…)
19:58:44 vysn joins (~vysn@user/vysn)
20:00:11 × Guest99 quits (~Guest99@pool-100-8-45-127.nwrknj.fios.verizon.net) (Quit: Client closed)
20:02:39 chisui joins (~chisui@2001:16b8:6687:d600:ec27:7b7a:c771:651e)
20:03:00 lortabac joins (~lortabac@2a01:e0a:541:b8f0:4346:8725:e95d:ae21)
20:05:03 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:4346:8725:e95d:ae21) (Client Quit)
20:05:26 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 260 seconds)
20:06:00 DNH joins (~DNH@2a02:8108:1100:16d8:cc0f:3c1b:cb:bfd6)
20:07:51 juhp joins (~juhp@128.106.188.82)
20:07:57 nkatte joins (~nkatte@2804:14c:7980:8c85::bde6)
20:08:16 × nkatte quits (~nkatte@2804:14c:7980:8c85::bde6) (Remote host closed the connection)
20:10:53 <tomsmeding> EvanR: I collected some more data on ghci's evaluation behaviour https://tomsmeding.com/f/ghci-evaluation.html
20:11:02 <tomsmeding> tldr it's a mess
20:11:13 <tomsmeding> monochrom: the sadist in you may like this as well
20:11:19 <EvanR> lol it's at least 3 dimensional now
20:11:21 <maerwald> davean: you can express GADTs with normal syntax
20:11:34 <maerwald> so I don't understand that point
20:12:06 <tomsmeding> EvanR: yes :p
20:12:18 <EvanR> I see there are 3 outcomes
20:12:23 × mimmy quits (~mimmy@146.70.75.189) (Ping timeout: 264 seconds)
20:12:26 <EvanR> _, _:_, and "abc"
20:12:43 <tomsmeding> note: I switched to characters for the thing to be monomorphic even without a typesig
20:13:15 <maerwald> https://paste.tomsmeding.com/3fh551uA
20:13:31 <EvanR> why is there a difference between map and id >_<
20:13:45 <geekosaur> hm. RULES?
20:13:58 <EvanR> RULES fires in ghci?
20:14:06 <geekosaur> dunno tbh
20:14:11 <tomsmeding> maerwald: Illegal equational constraint a ~ String (Use GADTs or TypeFamilies to permit this)
20:14:13 <geekosaur> just the first thing that came to mind
20:14:14 <tomsmeding> that is kind of ironic
20:14:37 <tomsmeding> geekosaur: I suspect https://gitlab.haskell.org/ghc/ghc/-/issues/10160
20:14:58 <maerwald> tomsmeding: ?
20:15:10 <tomsmeding> in particular, a subexpression that is a direct application of a constructor to arguments is already in WHNF without evaluation
20:15:42 <tomsmeding> maerwald: no point, because it isn't related to the syntax question; just funny that you currently need the GADTs extension to write the non-GADT syntax
20:15:58 <maerwald> you don't... TypeFamilies and ExistentialQuantification is enough
20:16:00 <tomsmeding> though that makes sense I guess, because the extension is about the functionality, and GADTSyntax is about the syntax, ostensibly
20:16:09 <geekosaur> I think there's a proposal to separate out equality constraints into their own LANGUAGE pragma
20:16:17 <geekosaur> I know it's been discussed, at least
20:17:02 <geekosaur> since it's kinda a wart that less than obvious LANGUAGE pragmas are needed to enable them
20:17:09 <maerwald> I really dislike jumping from normal to GADT style... using the type equality constraint also enlightens the reader about what this actually does under the hood
20:17:41 rusty joins (~rustyboy@82.77.237.221)
20:18:23 <tomsmeding> EvanR: if you want to try at home: https://paste.tomsmeding.com/ERDspJLB
20:18:55 <EvanR> I almost pasted that into cmd.exe
20:19:01 <tomsmeding> heh
20:19:08 <tomsmeding> sorry, bash
20:19:27 <EvanR> I can try on mac
20:19:40 <tomsmeding> no git bash on your windows?
20:19:46 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
20:20:00 <EvanR> lets not go into the problems with my windows
20:21:58 <monochrom> maerwald: I am not sure that "a ~ [a]" is a good idea.
20:22:39 <EvanR> some of the tests produced results and some gave parse error on input ';' and parse error on input '='
20:22:57 <tomsmeding> that is odd
20:23:24 <EvanR> https://paste.tomsmeding.com/g6XzuV1F
20:23:28 <tomsmeding> EvanR: if you remove the " | $GHCI | ..." stuff on line 11, does the output look sensible?
20:24:02 <tomsmeding> EvanR: what's the version of your ghci there
20:24:06 <EvanR> yep
20:24:18 <EvanR> 7.10.2
20:24:41 <tomsmeding> try entering 'a = 42' in that
20:25:10 <tomsmeding> I think the support for bare variable declarations without let is newer than that
20:25:31 <EvanR> yeah not allowed
20:26:14 <tomsmeding> so all "Without let" cases are not applicable in your version of ghci
20:26:28 <EvanR> https://paste.tomsmeding.com/zzdbhY08
20:26:49 <EvanR> by removing that part maybe the script makes no sense xD
20:27:09 <tomsmeding> you can let it use let always by removing the "" in the 'for letprefix' line
20:28:49 <EvanR> well I see it doesn't show any sprint results anymore
20:30:24 <zincy_> In the machines library what is the difference between Wye and Tee?
20:30:40 <zincy_> Wye is "non-deterministic"
20:31:06 <zincy_> Does this just mean that we don't know the order of the input events i.e they arent sequenced LRLR
20:31:25 mimmy joins (~mimmy@146.70.75.190)
20:31:37 <tomsmeding> EvanR: I suddenly see a pattern in my tables. Recall https://tomsmeding.com/f/ghci-evaluation.html . The 'Without typesig' column, as well as the 'With let' rows of the 'With typesig' column, are consistent: before evaluation, only the bare ['a','b','c'] is in WHNF, and after evaluation, the 'id' variant immedately returns the fully applied constructor, and the 'map' variant produces a fully lazy
20:31:37 <tomsmeding> result.
20:31:59 <tomsmeding> The only weird cases are the 'Without let' cases in the 'With typesig' column: i.e. a :: [Char] ; a = ...
20:32:19 <EvanR> i didn't think the type sig mattered...
20:33:04 <dolio> zincy_: Tee only has 'read from left' and 'read from right'. Wye has, 'read from either input; I don't care which.'
20:34:24 × DNH quits (~DNH@2a02:8108:1100:16d8:cc0f:3c1b:cb:bfd6) (Ping timeout: 268 seconds)
20:35:13 <dolio> So it's impossible for Tee to read from whichever is currently available, for instance.
20:35:56 acidjnk joins (~acidjnk@2001:16b8:671e:6000:64a5:6a76:f3c4:2f23)
20:36:42 fresheyeball joins (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net)
20:37:06 <dolio> Tee is for things like zipping two streams, and Wye is for interleaving.
20:37:30 × chisui quits (~chisui@2001:16b8:6687:d600:ec27:7b7a:c771:651e) (Quit: Client closed)
20:37:50 <zincy_> So Wye there is no order to sequences of input reading
20:38:25 <dolio> You can still request particular sides with Wye. But you can't do something unordered with Tee.
20:39:16 <zincy_> Do you know of any good examples for getting started writing a card game in Machines?
20:39:36 <dolio> I don't.
20:39:54 <zincy_> ah no worries
20:40:57 <zincy_> If I want to model a player which has state and has a moore machine as input representing the game state should the player be written as a custom plan?
20:41:52 <zincy_> Actions would come in from a source to the machine, but also the other moore machine for game state would
20:41:56 <zincy_> be another input
20:43:38 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
20:43:57 × zer0bitz quits (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi) (Read error: Connection reset by peer)
20:44:50 <dolio> I'm not sure. I haven't thought about machines in a long time. I just remember the basics.
20:45:21 <zincy_> no worries
20:45:31 <EvanR> an interactive coupling between a player and a computer game, or two players, or two computers could be modeled with a shared history that they simultaneously try to add to. With the catch that whoever adds "first" (prior in time) forces the other guy to recompute their move (they are interrupted)
20:45:45 <zincy_> I wonder if I can get away with using streamly instead
20:45:46 <EvanR> if both sides add to the same point in time, no problem
20:46:42 <zincy_> interesting
20:47:13 <EvanR> also either side can wait forever until something changes
20:47:16 yauhsien joins (~yauhsien@61-231-35-209.dynamic-ip.hinet.net)
20:47:58 <monochrom> It may be useful to have a machine for the game master.
20:49:17 <zincy_> yeah the game master is essentially a moore machine
20:51:28 <monochrom> RPGs taught me the value of spelling out that there is a game master, and if the game needs someone to do something but it would be wrong to ask any player to do it, then let the game master do it.
20:51:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 256 seconds)
20:51:32 × yauhsien quits (~yauhsien@61-231-35-209.dynamic-ip.hinet.net) (Ping timeout: 240 seconds)
20:52:17 <monochrom> RPG : game master : players :: Haskell : IO : pure sublanguage
20:52:53 <EvanR> you hope IO is not a killer DM
20:53:06 <int-e> So only the DM is allowed to cuss?
20:53:11 <monochrom> Including the role of IO as the kitchen sink for every dirty thing that doesn't look like pure FP :)
20:53:49 <monochrom> You want IORefs? IO. You want threads? IO. You want STM? IO.
20:53:53 <int-e> (if it isn't flawed then it isn't an analogy)
20:54:09 <monochrom> Ugh I tend to make flawless analogies.
20:54:46 <monochrom> What I call analogies, mathematicians say "homomorphism", sometimes even "isomorphism".
20:54:54 <monochrom> Unlike normal people analogies.
20:55:38 <EvanR> isn't that javascript, analogies are called isomorphisms xD
20:55:49 <monochrom> Ugh yikes haha
20:56:37 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 256 seconds)
20:58:11 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…)
21:00:17 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:5000:2c7a:ffb3:dbe2) (Remote host closed the connection)
21:00:33 xff0x joins (~xff0x@2001:1a81:53ef:fb00:e439:7cf7:eb8b:77aa)
21:00:46 × zincy_ quits (~zincy@2a00:23c8:970c:4801:78f3:43f3:fd48:5ac3) (Remote host closed the connection)
21:01:16 deadmarshal joins (~deadmarsh@95.38.116.147)
21:03:58 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
21:08:15 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Remote host closed the connection)
21:13:01 <tomsmeding> EvanR: https://gitlab.haskell.org/ghc/ghc/-/issues/20687#note_392794
21:13:47 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:e439:7cf7:eb8b:77aa) (Remote host closed the connection)
21:14:04 xff0x joins (~xff0x@2001:1a81:53ef:fb00:5d2d:5d37:b74:c17b)
21:15:13 <EvanR> so, it's like quicksand. The only thing you can do is nothing, at least it won't get worse
21:15:39 × sm2n quits (~sm2n@user/sm2n) (Read error: Connection reset by peer)
21:15:47 dsrt^ joins (~dsrt@68.101.63.101)
21:16:06 sm2n joins (~sm2n@user/sm2n)
21:17:57 <tomsmeding> accurate :)
21:18:07 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
21:20:38 × nvmd quits (~nvmd@user/nvmd) (Quit: Later, nerds.)
21:21:06 × turlando quits (~turlando@user/turlando) (Ping timeout: 260 seconds)
21:21:14 turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
21:21:14 × turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host)
21:21:14 turlando joins (~turlando@user/turlando)
21:22:25 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:5d2d:5d37:b74:c17b) (Remote host closed the connection)
21:22:43 xff0x joins (~xff0x@2001:1a81:53ef:fb00:2df4:3045:88e8:7284)
21:27:25 × mei quits (~mei@user/mei) (Ping timeout: 268 seconds)
21:30:27 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:30:49 zer0bitz joins (~zer0bitz@dsl-hkibng31-54fabc-15.dhcp.inet.fi)
21:32:39 mjrosenb joins (~mjrosenb@pool-108-54-97-96.nycmny.fios.verizon.net)
21:35:35 × rusty quits (~rustyboy@82.77.237.221) (Quit: Leaving)
21:36:41 × vysn quits (~vysn@user/vysn) (Ping timeout: 268 seconds)
21:40:34 × sm2n quits (~sm2n@user/sm2n) (Read error: Connection reset by peer)
21:40:51 × fresheyeball quits (~fresheyeb@c-76-25-93-164.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
21:41:36 sm2n joins (~sm2n@user/sm2n)
21:43:25 __monty__ joins (~toonn@user/toonn)
21:46:49 × michalz quits (~michalz@185.246.204.119) (Remote host closed the connection)
21:49:46 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:53:05 rusty joins (~rustyboy@82.77.237.221)
21:53:19 × myShoggoth quits (~myShoggot@97-120-85-195.ptld.qwest.net) (Ping timeout: 268 seconds)
21:54:02 × rusty quits (~rustyboy@82.77.237.221) (Client Quit)
21:54:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:58:11 aegon joins (~mike@174.127.249.180)
22:01:07 BobFang1992 joins (~textual@2a01:4b00:87fe:be00:2087:7385:664a:83cd)
22:08:38 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
22:09:17 <dsal> I refuse to learn where `asum` is
22:09:28 <Hecate> % :i asum
22:09:29 <yahb> Hecate: asum :: (Foldable t, Alternative f) => t (f a) -> f a -- Defined in `Data.Foldable'
22:09:39 <Hecate> dsal: it's okay, the bot knows it for you
22:09:46 <dsal> I used @hoogle in pm
22:09:59 <dsal> It's not my first or second choice.
22:13:10 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Ping timeout: 265 seconds)
22:14:21 BobFang1992 is now known as bobfang1992_
22:14:54 <dsal> Turns out I was just reinventing optional anyway.
22:15:50 <dsal> My first attempt was like `((Just <$> p) <|> pure Nothing)` Then I translated it from lisp to `asum [Just <$> p, pure Nothing]` which is `optional p`
22:16:15 rusty joins (~rustyboy@82.77.237.221)
22:17:24 <jle`> is there a way to have cabal install default to --overwrite-policy=always ?
22:18:05 <sclv> you can set it in the ~/.cabal/config file
22:18:23 <jle`> ooh thanks :)
22:19:55 × mimmy quits (~mimmy@146.70.75.190) (Ping timeout: 256 seconds)
22:20:02 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Ping timeout: 240 seconds)
22:21:00 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
22:24:21 lbseale_ joins (~ep1ctetus@user/ep1ctetus)
22:26:01 <[itchyjunk]> noob question, i get this error : https://bpa.st/WGRA. i thought maybe i am not using runghc properly but trying to compile gives me an issue too
22:26:08 <[itchyjunk]> my code is `sum a b = a + b`
22:27:09 <sm> whats in sumFunction.hs ?
22:27:14 × pfurla quits (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d) (Quit: gone to sleep. ZZZzzz…)
22:27:54 <[itchyjunk]> just that one line :(
22:28:01 <[itchyjunk]> it seems i need to use main somehow
22:28:28 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 268 seconds)
22:28:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
22:29:19 <pavonia> main = putStrLn $ sum 2 3
22:29:23 <sm> ah yes. runghc will run the `main` function
22:29:23 allbery_b joins (~geekosaur@xmonad/geekosaur)
22:29:23 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
22:29:26 allbery_b is now known as geekosaur
22:29:32 <pavonia> * main = putStrLn $ show $ sum 2 3
22:29:34 <[itchyjunk]> ah
22:30:08 <monochrom> If you don't want to have a "main", consider "ghc -e" instead.
22:31:11 sm wonders how to force brick to render a widget once, to generate a viewport, so I can adjust the scroll position, before first rendering the screen
22:31:45 mimmy joins (~mimmy@146.70.75.189)
22:32:02 × deadmarshal quits (~deadmarsh@95.38.116.147) (Ping timeout: 260 seconds)
22:32:11 Maxdamantus joins (~Maxdamant@user/maxdamantus)
22:32:42 <monochrom> Either "ghc -e 'sum 2 3' sumFunction.hs" or "ghc sumFunction.hs -e 'sum 2 3'"
22:34:39 <[itchyjunk]> ah, guess it also doesn't like "sum", changing to add with what you suggest works. or using that main
22:34:50 <monochrom> Yes, that too.
22:34:57 <[itchyjunk]> interesting, the random tutorials i am looking at assumes i do everything inside ghci so it never mentions these things
22:35:00 <monochrom> > sum [3,1,4,1,5]
22:35:01 <lambdabot> 14
22:35:03 <byorgey> sm: I have wondered things like that too. I'm not sure it's possible.
22:35:14 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:2df4:3045:88e8:7284) (Ping timeout: 260 seconds)
22:35:39 lbseale_ is now known as lbseale
22:35:43 xff0x joins (~xff0x@2001:1a81:53ef:fb00:42c4:fa07:876d:825a)
22:36:03 <sm> byorgey: cool. https://github.com/jtdaugherty/brick/issues/170 is about this but I'm not quite seeing the solution
22:38:00 <[itchyjunk]> i renamed my file and function and now it suddenly doesn't work again ;_;
22:38:11 <sm> not a quick fix it seems, I'll come back it
22:38:48 <[itchyjunk]> https://bpa.st/2JGA
22:38:55 <[itchyjunk]> https://bpa.st/UGMQ
22:39:02 <[itchyjunk]> code and error respectively
22:39:48 <pavonia> What's the name of the file?
22:39:58 <[itchyjunk]> addFunction.hs
22:40:10 <monochrom> "Did you save?"
22:40:14 <[itchyjunk]> yes
22:40:57 <pavonia> It really looks like you're compiling the wrong file
22:41:12 <monochrom> Works for me.
22:42:06 <[itchyjunk]> ah yes i was editing the wrong file maybe
22:42:14 × rusty quits (~rustyboy@82.77.237.221) (Remote host closed the connection)
22:42:39 <[itchyjunk]> i was :(
22:43:04 <[itchyjunk]> so is it best practice to just figure out how to include main everywhere? i'll need that eventually?
22:43:06 <monochrom> BTW our favourite https://paste.tomsmeding.com supports putting multiple files/blocks on the same page so no one needs to keep switching tabs any more.
22:43:58 <byorgey> [itchyjunk]: no, you don't need main unless you are writing an application you want to compile to an executable.
22:44:11 <monochrom> It is best practice to learn about "main". But it is not best practice to assume that one size fits all.
22:44:49 <[itchyjunk]> hmm
22:45:01 <monochrom> "it depends" is the only correct rule of thumb, best practice, state of the art, cream of the crop, and correct answer.
22:45:03 myShoggoth joins (~myShoggot@97-120-85-195.ptld.qwest.net)
22:45:16 retro_ joins (~retro@97e2ba2e.skybroadband.com)
22:45:45 <[itchyjunk]> do beginners just write functions, load it into ghci and test it there?
22:45:59 <byorgey> [itchyjunk]: yes, for learning, instead of using runghc / ghc -e, I recommend testing in ghci
22:46:10 <monochrom> Yes, most do, it's OK.
22:46:12 <byorgey> experts also do that.
22:46:13 <pavonia> That's what the pros do too 8)
22:47:17 <monochrom> Writing "main" early is also OK. It just means a different path of learning. Some books teach it that way.
22:48:05 <hpc> whatever happens to give you the tightest write/test/debug loop in the moment
22:48:16 <monochrom> Even for Python, both teaching camps co-exist.
22:48:49 <monochrom> And in the case of PHP and Javascript, "what main?".
22:48:49 × retroid_ quits (~retro@97e2ba2e.skybroadband.com) (Ping timeout: 268 seconds)
22:49:10 × bobfang1992_ quits (~textual@2a01:4b00:87fe:be00:2087:7385:664a:83cd) (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:49:15 <[itchyjunk]> I am in a "OOP" class and it's being taught using java. that does have the `main() { }` thing going as well
22:49:52 <geekosaur> most compiled languages do
22:51:39 <[itchyjunk]> the signature for my `add a b = a + b` should takes a value `b` of type `int->int` and applies `a` of type `int` ? so `add :: int a => int->(int->int)` would make sense no?
22:52:05 <monochrom> No.
22:52:54 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Remote host closed the connection)
22:52:55 <monochrom> Either "Integer -> Integer -> Integer" to KISS, or "Num a => a -> a -> a" if you're ready for type classes.
22:53:54 <monochrom> b is not going to be Integer->Integer.
22:53:56 <[itchyjunk]> hmm google isn't giving me a good result for `haskell KILL`
22:54:18 <geekosaur> ?
22:54:25 <monochrom> Yeah that would sound pretty murderous. Google has reported you to the police!
22:54:29 <[itchyjunk]> KISS*
22:54:38 <geekosaur> "KISS" = "keep it simple, s…"
22:54:40 <monochrom> keep it simple and stupid
22:56:02 × xff0x quits (~xff0x@2001:1a81:53ef:fb00:42c4:fa07:876d:825a) (Ping timeout: 240 seconds)
22:56:17 <[itchyjunk]> ah
22:56:41 <EvanR> keep it stupid simple
22:56:50 <monochrom> A long forgotten virtue.
22:56:55 xff0x joins (~xff0x@2001:1a81:53ef:fb00:8923:f787:bbfb:445e)
22:56:57 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:57:17 <[itchyjunk]> i thought `+` had the type int->(int->int) and you start evaluating from the right so + 2 would give me a value of type (int -> int) and 2 + 2 would be int -> (int -> int)
22:57:32 evocatus joins (~evocatus@213.193.2.105)
22:57:39 <[itchyjunk]> i was trying to apply that to the sum as well
22:57:53 <Rembane_> :t (+) -- if we're lucky this will be a hint
22:57:54 <lambdabot> Num a => a -> a -> a
22:58:05 <monochrom> Nah, "2+2" is syntax sugar for "((+) 2) 2".
22:58:31 <monochrom> Similarly "(add 2) 3".
22:59:36 <[itchyjunk]> hmmmmmm
23:00:05 <hpc> try querying the type of partially applied addition
23:00:09 <hpc> see what type it gives you
23:00:29 <hpc> and then just keep adding arguments
23:00:32 × yahb quits (xsbot@user/mniip/bot/yahb) (Ping timeout: 268 seconds)
23:01:26 <[itchyjunk]> it tells me its add :: Num a => a -> a -> a
23:01:29 max22- joins (~maxime@2a01cb08833598007605f3bf70b72c1c.ipv6.abo.wanadoo.fr)
23:01:39 <monochrom> Yes. (+) has that type too.
23:01:54 <monochrom> But "2+2" is not parsed as "2 (+ 2)".
23:02:00 lavaman joins (~lavaman@98.38.249.169)
23:02:07 <monochrom> It is parsed as what I said.
23:02:46 <pavonia> :t 2 (+2) -- for extra confusion
23:02:47 <lambdabot> (Num a, Num ((a -> a) -> t)) => t
23:03:23 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Quit: ERC (IRC client for Emacs 27.1))
23:03:23 <hpc> :t 2 (+) 2 -- and certainly not this :D
23:03:24 <lambdabot> (Num a, Num t1, Num ((a -> a -> a) -> t1 -> t2)) => t2
23:04:50 chexum_ joins (~quassel@gateway/tor-sasl/chexum)
23:04:51 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Ping timeout: 276 seconds)
23:04:54 <[itchyjunk]> ((+) 2) 2 so first i want to think about ((+) 2) part. here the type is (num -> num) and then for the ((+) 2)2 it then becomes (num->num)->num ?
23:05:11 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 264 seconds)
23:06:08 wootehfoot joins (~wootehfoo@user/wootehfoot)
23:06:13 <pavonia> No, just num
23:06:25 yahb joins (xsbot@user/mniip/bot/yahb)
23:06:31 <pavonia> The more arguments you apply, the less arrows
23:06:36 BobFang1992 joins (~textual@152.37.66.232)
23:07:22 <hpc> you can put all of these into ghci and test your own hypothesis, btw
23:07:26 <[itchyjunk]> oh right, the result of ((+) 2)2 is 4 which has a type num .. hmmm
23:07:31 × mimmy quits (~mimmy@146.70.75.189) (Ping timeout: 256 seconds)
23:09:52 <sm> so then KILL is.... Keep It Lazy, Lummox ?
23:10:48 <sm> Keep It Lean, Loon ?
23:11:01 <monochrom> keep it lazy and lean. Hence, "OOM KILL" >:)
23:11:06 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
23:11:21 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
23:11:38 <sm> makes sense
23:11:48 <monochrom> the "lazy" part refers to overcommitment. As someone in #haskell-tw put it, "happy malloc" i.e. malloc always succeeds :)
23:11:53 wagle joins (~wagle@quassel.wagle.io)
23:12:52 BobFang1992 is now known as bobfang1992_
23:13:02 <hpc> nah, malloc can return 0 sometimes
23:13:05 <hpc> just push to the stack instead
23:13:09 <hpc> /that/ never fails
23:14:04 <monochrom> "malloc can return 0 sometimes" is on the same calibre as "environment variables can be visible to other users sometimes".
23:14:05 <awpr> some allocators guarantee malloc success or abort
23:14:15 favonia joins (~favonia@user/favonia)
23:15:04 <monochrom> I mean, if you're on Solaris or something, and sufficiently old version or something, sure.
23:15:13 <awpr> the idea being that you probably can't do anything meaningful about a malloc failure anyway in 99% of software, so why include an extra opportunity for UB at every malloc call?
23:15:26 <hpc> i am basing this on malloc(3)
23:15:52 <monochrom> Oh, the envvar thing is also on some man page.
23:15:54 <awpr> yeah, the POSIX spec allows it to fail IIRC
23:16:38 <monochrom> There is still a difference between "the kernel can be configured to do this" and "statistically, how frequently?"
23:18:17 <hpc> if we're doing that, we can statistically remove almost every case of error handling
23:18:26 <hpc> because somewhere it's in a reliable tight loop
23:18:35 <monochrom> Besides, overcommitment and happy malloc is also mentioned on the same man page.
23:19:59 <hpc> overcommit is configurable at runtime
23:20:10 <hpc> this can probably go into -offtopic :P
23:20:29 <awpr> I must have misremembered something or transferred this property from the C++ allocator function to malloc, since I can't find a reference for malloc specifically being abort-or-succeed anywhere
23:21:13 × burnsidesLlama quits (~burnsides@dhcp168-013.wadham.ox.ac.uk) (Remote host closed the connection)
23:23:06 Cajun joins (~Cajun@user/cajun)
23:23:44 pfurla joins (~pfurla@2804:14d:5c81:4104:7d84:ffec:9a44:a68d)
23:24:16 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8)
23:24:54 <[itchyjunk]> wait, i think i got it. ((+) 2) 2. the (+) 2 part take 2 and returns a function num -> num so it looks like num -> (num -> num) and ((+)2)2 look like something that take two arguments and returns a num so num->num->num ?
23:25:06 <monochrom> Yes.
23:25:11 <[itchyjunk]> phew
23:25:29 <monochrom> A pretty mechanical rule.
23:27:12 <unit73e> newbies get all confused when ghc is saying "expected A but got C -> B" and that just means you're missing an argument lol
23:27:30 <awpr> there's a difference between the type of the "topmost function" being applied and the type of the whole expression. `2+2` is just `Int` (or any other numerical type), but within that expression, `(+)` is `Int -> Int -> Int`
23:27:44 <[itchyjunk]> unit73e, noted
23:28:15 <Boarders_> do any of you know the haddock syntax for linking to Data.List.foldl1'?
23:28:54 <monochrom> unit73e, sometimes the error message does include "perhaps wrong number of arguments"
23:29:14 <awpr> applying an additional argument means two things: one, the "topmost function" must accept one more argument, i.e. its type must have one more arrow; and two, the entire expression accepts one less argument than before, i.e. its type has one _less_ arrow
23:29:55 <monochrom> But there is a fundamental tension between error messages second-guessing beginner intentions and error messages second-guessing experienced intentions.
23:30:12 <monochrom> My unpopular stance is never second-guess.
23:30:39 <awpr> so if you have something like `(+) 2 :: Int -> Int` and apply that to one more argument, the whole expression's type has one less argument: `((+) 2) 2 :: Int`
23:30:41 hippoid joins (~hippoid@c-98-220-13-8.hsd1.il.comcast.net)
23:30:46 <monochrom> Well, either that, or the compiler is so smart it should write the code and get rid of the erroneous human already.
23:31:23 <hpc> replace all human error with machine error
23:32:21 <awpr> but on the other hand, if you have `f 2`, then you know `f :: Int -> r` for some `r`; but if you apply one more argument `(f 2) 2`, then `f` must be `Int -> Int -> r2` for some other `r2`. (still ignoring that it could be other numeric types instead of `Int`)
23:33:23 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 264 seconds)
23:33:31 Successus joins (~Successus@gateway/tor-sasl/successus)
23:35:02 × acidjnk quits (~acidjnk@2001:16b8:671e:6000:64a5:6a76:f3c4:2f23) (Ping timeout: 240 seconds)
23:35:20 <monochrom> I agree there is a confusion, but my attribution is the words "expected" and "inferred", encouraging beginners to second-guess how important it is to take those two words seriously. (Answer: Very unimportant.)
23:35:57 <monochrom> In this regard I agree with Hugs in just presenting two conflicting types without name-calling them.
23:36:49 lbseale_ joins (~ep1ctetus@user/ep1ctetus)
23:36:53 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
23:37:02 × connrs quits (~connrs@user/connrs) (Quit: ZNC 1.8.2 - https://znc.in)
23:37:19 connrs joins (~connrs@user/connrs)
23:37:21 <hpc> you have to think like the compiler with that sort of error message
23:37:54 × max22- quits (~maxime@2a01cb08833598007605f3bf70b72c1c.ipv6.abo.wanadoo.fr) (Quit: Leaving)
23:38:20 <monochrom> I bet that experienced Haskellers don't care about "expected vs inferred" either.
23:38:47 <hpc> "expected" is "based on the information in the program so far, this is what type fits in this part of your code"
23:39:02 <hpc> and "inferred" is "this is what was found in this part of your code instead"
23:39:17 <[itchyjunk]> blah :: (a -> b) -> [a] -> [b]. blah takes 2 arguments, namely a function of type (a->b) and a list of type [a] and produces a list of type [b]. the function f :: a -> b takes an argument of type a and produces somethign of type b. so blah f :: [a] -> [b] , partial application of f on blah produces a new function blah f that takes an argument of type [a] (map will elements of type a) and returns something of type [b] (map with elements
23:39:17 <[itchyjunk]> of type b) ?
23:39:36 <monochrom> Yes.
23:39:56 <[itchyjunk]> okay i think i actually understand this then.. ;_;
23:40:11 <awpr> except with "list" instead of "map" in the last sentence
23:40:22 <monochrom> Ah I didn't read carefully heh
23:40:28 <[itchyjunk]> ah list! right list!
23:40:35 <sm> I see "expected" and "actual" here, did this change with ghc 9 ?
23:40:38 × lbseale quits (~ep1ctetus@user/ep1ctetus) (Ping timeout: 260 seconds)
23:40:51 <awpr> I remember it being "expected" and "actual"
23:41:06 <geekosaur> it's been "expected" and "actual" since ghc6.6 at least, I have no idea where "inferred" came from
23:41:07 <monochrom> Anyway, see how if you just follow the rules mechanically, if you forget that "intuition" and "understanding" is a thing, everything works.
23:41:10 <hpc> i remember it being "expected" and "the other thing" :P
23:41:27 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:f4b8:2aef:8963:2af8) (Remote host closed the connection)
23:41:36 <monochrom> Ah there was a time it said "inferred".
23:41:41 <awpr> I slightly thought "expected" meant "the type in negative position as part of a function type" and "actual" meant "the type in positive position in a function application"
23:42:12 <geekosaur> hm, maybe that means it did change in 9.x
23:42:12 <geekosaur> since I'm still on 8.10.7
23:42:12 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
23:42:31 <monochrom> And I liked it that way because I just told myself "e for external, i for internal" as a simple and yet pretty effective model.
23:42:32 <sm> I look at expected and actual quite a bit, it seems to give better info than the Couldn't match type... line above
23:43:12 <sm> ie, Expected seems to show the specialised type, not a fully general one
23:43:29 <monochrom> I saw "actual" with GHC 8.10.7 just an hour ago.
23:43:47 <sm> eg:
23:43:47 <sm> • Couldn't match type ‘Screen’ with ‘GenericList Name V.Vector e0’
23:43:47 <sm> Expected: List Name e0
23:43:47 <sm> Actual: Screen
23:43:52 geekosaur joins (~geekosaur@xmonad/geekosaur)
23:44:54 <sm> the Couldn't match type line also is harder to read because the order is not clear. I'm not sure why we shouldn't just remove it
23:45:41 <hpc> hmm, what about, say you wrote a type error in (f a b)
23:45:54 <hpc> expected: in (f _ b), _ :: A
23:45:59 <hpc> actual: a :: B
23:46:27 <hpc> plus or minus formatting
23:47:01 × Jing quits (~hedgehog@2604:a840:3::1094) (Remote host closed the connection)
23:47:04 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
23:47:27 <monochrom> sm, having those 3 lines is only since 9.0 or 9.2, right? Because on 8.10 I get 2 lines:
23:47:30 <monochrom> > not "abc"
23:47:32 <lambdabot> error:
23:47:32 <lambdabot> • Couldn't match expected type ‘Bool’ with actual type ‘[Char]’
23:47:32 <lambdabot> • In the first argument of ‘not’, namely ‘"abc"’
23:47:40 <monochrom> err even one line
23:47:40 Jing joins (~hedgehog@2604:a840:3::1094)
23:47:48 <sm> I see, yes I expect it has been changing
23:48:09 <sm> maybe 9.4 will have elm/rust-level readability
23:48:29 <awpr> I've been doing most of my compiling on 8.10.7 still, and I thought expected/actual was familiar error message formatting for a long time
23:48:36 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
23:49:02 <awpr> could it be that it's omitted if the expected/actual types are no larger than the specific unification failure?
23:49:27 <awpr> > map not "abc"
23:49:28 <lambdabot> error:
23:49:29 <lambdabot> • Couldn't match type ‘Char’ with ‘Bool’
23:49:29 <lambdabot> Expected type: [Bool]
23:49:57 <awpr> looks like it tried to print it there, at least
23:50:06 × lbseale_ quits (~ep1ctetus@user/ep1ctetus) (Quit: Leaving)
23:50:56 <monochrom> Ah in that case 8.10.7 also gives 3 separate lines.
23:51:09 <awpr> oh, yeah, it looks like it merged them into one -- above, "Couldn't match _expected_ type ... with _actual_ type ..."
23:51:29 <geekosaur> my guess is it merges them when they'd say the same thing?
23:51:38 <monochrom> Yeah.
23:52:30 <monochrom> OK, not 'a' is a simple enough example that 9.2 also gives just one line, "Couldn't match expected type ‘Bool’ with actual type ‘Char’"
23:53:23 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Read error: Connection reset by peer)
23:56:15 Guest98 joins (~Guest98@2601:547:902:5e80:3c6c:c3e3:11e0:2f8)
23:56:49 tom__ joins (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684)
23:57:31 × Successus quits (~Successus@gateway/tor-sasl/successus) ()
23:57:49 Feuermagier_ joins (~Feuermagi@2a02:2488:4211:3400:b6fd:ec18:acf6:f1a8)
23:57:53 × hippoid quits (~hippoid@c-98-220-13-8.hsd1.il.comcast.net) (Ping timeout: 268 seconds)
23:58:47 ouroboros_ joins (~ouroboros@2804:14c:65e4:93f6::1001)
23:58:52 × tom_ quits (~tom@2a00:23c8:970c:4801:5b6a:e81b:79dc:f684) (Remote host closed the connection)
23:59:34 × Feuermagier quits (~Feuermagi@user/feuermagier) (Remote host closed the connection)
23:59:35 × ouro_boros quits (~ouroboros@2804:14c:65e4:93f6::1001) (Remote host closed the connection)
23:59:35 × m4lvin quits (~m4lvin@w4eg.de) (Quit: No Ping reply in 180 seconds.)
23:59:38 × averell quits (~averell@user/averell) (Quit: .)
23:59:40 m4lvin_ joins (~m4lvin@w4eg.de)
23:59:54 averell joins (~averell@user/averell)

All times are in UTC on 2021-11-19.