Home liberachat/#haskell: Logs Calendar

Logs on 2021-06-02 (liberachat/#haskell)

00:00:17 × pavonia quits (~user@user/siracusa) (Ping timeout: 264 seconds)
00:00:26 pavonia_ is now known as pavonia
00:00:42 × derelict quits (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 272 seconds)
00:00:54 × tv quits (~tv@user/tv) (Ping timeout: 264 seconds)
00:01:17 tv joins (~tv@user/tv)
00:02:00 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 245 seconds)
00:05:41 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
00:06:18 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
00:06:50 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 252 seconds)
00:08:43 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Client Quit)
00:09:02 exarkun joins (~exarkun@user/exarkun)
00:09:14 × Axman6 quits (~Axman6@user/axman6) (Remote host closed the connection)
00:09:28 Axman6 joins (~Axman6@user/axman6)
00:09:29 <exarkun> With Warp (or any other Wait-compatible server) how do I listen on an arbitrary unused port and then discover which port that was?
00:11:29 <exarkun> oh there's `withApplication`, great
00:13:48 × zopsi quits (sid153252@id-153252.stonehaven.irccloud.com) ()
00:17:13 zopsi joins (~zopsi@irc.dir.ac)
00:17:16 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
00:18:10 <tonyday> https://hackage.haskell.org/package/base-4.15.0.0/reports/1
00:18:52 <tonyday> I get the same error as hackage, trying to cabal build base. What are we doing wrong?
00:19:11 <sclv> you can't build base
00:19:12 <geekosaur> base isn't buildable by itself normally, it's built as part of ghc
00:19:13 <sclv> it ships with ghc
00:20:13 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
00:20:58 × bfrk quits (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
00:21:09 × neceve quits (~quassel@2a02:c7f:607e:d600:a95a:ecd2:e57a:3130) (Ping timeout: 244 seconds)
00:21:35 <tonyday> I'm used to saying -fwrite-ide-info -hiedir=.hie to get files I can analyse for a project. Any clues how I would do this for base?
00:22:04 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
00:24:40 sayola joins (~vekto@dslc-082-082-145-205.pools.arcor-ip.net)
00:25:39 <geekosaur> you might need to do it as part of a ghc build
00:26:08 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
00:26:56 × hexfive quits (~eric@50.35.83.177) (Quit: WeeChat 3.0)
00:27:18 × zeenk quits (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41) (Quit: Konversation terminated!)
00:27:47 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Client Quit)
00:30:11 <tonyday> ok, thanks.
00:30:38 <geekosaur> folks in #ghc might have better ideas, possibly
00:33:17 × boxscape quits (~boxscape@user/boxscape) (Ping timeout: 264 seconds)
00:35:45 <yin> i was going through some stuff i had bookmarked and was happy to find this https://www.youtube.com/watch?v=jFk1qpr1ytk which got me curious, has anything been done in this direction? what's the state of "lazy" natural numbers in haskell?
00:35:45 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
00:37:12 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
00:38:10 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Client Quit)
00:40:36 × ddellacosta quits (~ddellacos@89.45.224.118) (Remote host closed the connection)
00:41:21 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
00:41:52 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
00:42:17 × shailangsa quits (~shailangs@host165-120-169-73.range165-120.btcentralplus.com) (Ping timeout: 264 seconds)
00:43:24 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
00:44:06 falafel_ joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
00:45:08 × Deide quits (~Deide@user/deide) (Quit: Seeee yaaaa)
00:45:46 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Client Quit)
00:45:59 × wagle quits (~wagle@quassel.wagle.io) (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
00:46:26 wagle joins (~wagle@quassel.wagle.io)
00:55:47 × petersen quits (~juhp@bb219-75-40-154.singnet.com.sg) (Ping timeout: 268 seconds)
00:55:48 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
00:58:13 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Client Quit)
00:59:25 ddellacosta joins (~ddellacos@89.45.224.248)
01:00:14 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Ping timeout: 272 seconds)
01:00:40 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
01:01:29 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 264 seconds)
01:02:00 × geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Ping timeout: 245 seconds)
01:02:01 × lbseale quits (~lbseale@ip72-194-54-201.sb.sd.cox.net) (Read error: Connection reset by peer)
01:02:01 <lyxia> yin: is there a two sentence summary of what you are looking for
01:03:17 × dhil quits (~dhil@195.213.192.85) (Ping timeout: 264 seconds)
01:04:52 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 252 seconds)
01:07:13 jpds joins (~jpds@gateway/tor-sasl/jpds)
01:11:05 × oxide quits (~lambda@user/oxide) (Ping timeout: 264 seconds)
01:12:47 × albet70 quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:13:55 albet70 joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:14:38 shailangsa joins (~shailangs@host86-186-136-74.range86-186.btcentralplus.com)
01:15:32 peteretep is now known as pjlsergeant
01:15:51 oxide joins (~lambda@user/oxide)
01:17:02 <yin> performant peano-like natural numbers i guess?
01:17:29 <yin> emphasis on performant
01:18:02 × pjlsergeant quits (sid143467@id-143467.stonehaven.irccloud.com) (Quit: Updating details, brb)
01:18:11 pjlsergeant joins (sid143467@id-143467.stonehaven.irccloud.com)
01:18:14 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Remote host closed the connection)
01:21:46 × falafel_ quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds)
01:23:34 <yin> the talk i based on this paper http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.3442
01:24:09 <yin> *is
01:24:37 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
01:25:21 <lyxia> well you can write a compiler that compiles your Nat to a GMP integer and translates pattern-matching to arithmetic operations.
01:25:21 abrar joins (~abrar@static-108-2-152-54.phlapa.fios.verizon.net)
01:29:18 × ddellacosta quits (~ddellacos@89.45.224.248) (Remote host closed the connection)
01:29:35 <yin> i that what idris does?
01:31:35 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Quit: My MacBook Air has gone to sleep. ZZZzzz…)
01:33:18 <yin> Colin siggests something like a pair (m,n) where m is a machine word and n is a thunk, where the think progressively collapses, incrementing the word as it is lazily evaluated
01:33:44 × xff0x quits (~xff0x@2001:1a81:52ca:4f00:7e41:f92f:ed4d:a7b5) (Ping timeout: 252 seconds)
01:35:14 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
01:35:28 xff0x joins (~xff0x@2001:1a81:5307:4e00:e51:c3f6:62c2:5e71)
01:36:26 <Axman6> yin: I seem to remember edwardk doing some stuff that involved using weird representation of natural numbers that might be relevant - I remember something where they were base 2, but the digits were 2 and 3, with a single 1... it's been along time (pretty sure this had to do with efficient maps or caches or something)
01:36:53 <c_wraith> sounds like the skew heap stuff
01:38:36 × egoist quits (~egoist@186.235.82.52) (Quit: WeeChat 3.1)
01:38:48 <Axman6> yes!
01:38:53 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
01:40:30 jaevanko joins (~jaevanko@2600:1700:1330:2bef:7d9a:87ce:495f:966a)
01:45:50 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 252 seconds)
01:48:08 wenzel joins (~wenzel@user/wenzel)
01:49:09 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
01:51:12 hmmmas joins (~chenqisu1@183.217.202.217)
01:52:56 systemhalted joins (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net)
01:58:40 × systemhalted quits (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) (Ping timeout: 245 seconds)
02:01:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:02:26 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
02:02:43 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Remote host closed the connection)
02:05:01 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Remote host closed the connection)
02:05:59 wei2912 joins (~wei2912@112.199.250.21)
02:06:04 systemhalted joins (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net)
02:07:43 juhp joins (~juhp@128.106.188.199)
02:09:08 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 244 seconds)
02:12:06 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
02:12:07 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (copper.libera.chat (Nickname regained by services)))
02:12:07 finn_elija is now known as FinnElija
02:12:26 × systemhalted quits (~aqualogic@71-129-231-253.lightspeed.rcsntx.sbcglobal.net) (Ping timeout: 272 seconds)
02:12:58 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
02:14:09 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
02:15:46 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
02:16:27 lavaman joins (~lavaman@98.38.249.169)
02:18:17 × y04nn quits (~y04nn@193.32.127.220) (Ping timeout: 252 seconds)
02:20:43 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
02:20:45 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
02:24:53 AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net)
02:29:43 <yin> oh i think i remember that!
02:31:30 × td_ quits (~td@94.134.91.112) (Ping timeout: 264 seconds)
02:32:56 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
02:33:10 td_ joins (~td@muedsl-82-207-238-043.citykom.de)
02:35:13 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9)
02:35:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
02:36:17 ikex joins (~ash@user/ikex)
02:36:50 mccoyb joins (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632)
02:37:15 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
02:37:32 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Ping timeout: 268 seconds)
02:41:51 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 268 seconds)
02:44:31 vicfred joins (~vicfred@user/vicfred)
02:45:17 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
02:45:55 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
02:48:33 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 264 seconds)
02:48:34 × ornxka quits (~ornxka@user/ornxka) (Quit: WeeChat 3.0)
02:53:47 ornxka joins (~ornxka@user/ornxka)
03:01:14 × shailangsa quits (~shailangs@host86-186-136-74.range86-186.btcentralplus.com) ()
03:01:56 falafel_ joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
03:02:08 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:03:18 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
03:06:54 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
03:07:19 × alx741 quits (~alx741@181.196.69.176) (Quit: alx741)
03:11:59 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
03:12:58 abhixec joins (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net)
03:15:14 × zebrag quits (~chris@user/zebrag) (Quit: Konversation terminated!)
03:15:31 otto_s joins (~user@p5b044eb9.dip0.t-ipconnect.de)
03:17:34 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
03:18:23 pfurla_ joins (~pfurla@216.151.180.231)
03:18:47 × otto_s_ quits (~user@p5de2ffe1.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
03:19:34 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
03:20:04 × abhixec quits (~abhixec@c-67-169-139-16.hsd1.ca.comcast.net) (Quit: leaving)
03:20:12 twitch joins (~textual@pool-71-246-146-102.rich.east.verizon.net)
03:21:28 × ikex quits (~ash@user/ikex) (Ping timeout: 272 seconds)
03:21:53 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 264 seconds)
03:21:54 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 264 seconds)
03:22:18 × twitch quits (~textual@pool-71-246-146-102.rich.east.verizon.net) (Client Quit)
03:22:25 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds)
03:23:04 wanagnuj joins (~wanagnuj@101.95.97.158)
03:24:11 koishi_ joins (~koishi_@67.209.186.120.16clouds.com)
03:25:28 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
03:25:36 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 244 seconds)
03:26:04 hyiltiz parts (~quassel@31.220.5.250) ()
03:26:33 Lord_of_Life_ is now known as Lord_of_Life
03:26:35 × koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Client Quit)
03:26:42 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
03:26:57 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
03:28:42 shailangsa joins (~shailangs@host86-186-136-74.range86-186.btcentralplus.com)
03:29:36 hyiltiz joins (~quassel@31.220.5.250)
03:32:19 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:34:31 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
03:39:12 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
03:39:15 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
03:39:54 × ku quits (~ku@2601:280:c780:7ea0:a829:e2b3:d453:ddc1) (Ping timeout: 264 seconds)
03:42:26 × renzhi quits (~xp@2607:fa49:6500:bc00::e7b) (Ping timeout: 252 seconds)
03:50:05 × skn quits (~znc@sec.nimmagadda.net) (Quit: ZNC 1.8.2 - https://znc.in)
03:50:34 skn joins (~znc@sec.nimmagadda.net)
03:50:49 × smitop quits (uid328768@user/smitop) (Quit: Connection closed for inactivity)
03:53:11 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
03:58:12 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
03:58:30 rk04 joins (~rk04@user/rajk)
04:01:00 <jaevanko> So there's "Write Yourself a Scheme in 48 Hours", is there anything similar for a statically typed language, maybe a subset of Haskell?
04:02:06 <Axman6> I think Stephen Dehow about http://dev.stephendiehl.com/fun/
04:02:09 <Axman6> uh
04:02:12 <Axman6> how about http://dev.stephendiehl.com/fun/
04:02:32 <jaevanko> Oh, that seems perfect. Thanks
04:02:51 <dy> Incomplete sadly :(
04:03:06 × rk04 quits (~rk04@user/rajk) (Ping timeout: 250 seconds)
04:03:07 <Axman6> yeah, is a shame
04:03:23 haskman joins (~haskman@106.201.29.153)
04:04:03 <jaevanko> Oh, I see that now. Well, it'll be a start
04:05:59 × kmein quits (~weechat@user/kmein) (Quit: ciao kakao)
04:06:03 <dy> Still a great start yeah.
04:06:24 <dy> You might also check out: https://www.microsoft.com/en-us/research/publication/make-fast-curry-pushenter-vs-evalapply/
04:06:29 <dy> For some insight into evaluation models.
04:06:39 <dy> (And, perhaps, how you might compile them down.)
04:07:07 <dy> "Our conclusion is simple, and contradicts our initial intuition: compiled implementations should use eval/apply."
04:07:23 <dy> I could be wrong but isn't GHC STG still/back to push/enter though?
04:07:57 kmein joins (~weechat@user/kmein)
04:09:17 Feuermagier joins (~Feuermagi@user/feuermagier)
04:09:32 × satai quits (~satai@static-84-42-172-253.net.upcbroadband.cz) (Quit: satai)
04:13:56 koishi_ joins (~koishi_@67.209.186.120.16clouds.com)
04:14:57 × koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection)
04:14:58 × eight quits (~eight@user/eight) (Ping timeout: 268 seconds)
04:17:13 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
04:19:14 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
04:21:08 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
04:21:35 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
04:22:16 × pfurla_ quits (~pfurla@216.151.180.231) (Ping timeout: 272 seconds)
04:22:51 × seeg- quits (~seeg@45.76.32.162) (Quit: ZNC 1.7.5+deb4 - https://znc.in)
04:24:46 seeg joins (~seeg@2a05:f480:1400:311:5400:1ff:feff:256)
04:29:27 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Read error: Connection reset by peer)
04:29:33 pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
04:30:09 rk04 joins (~rk04@user/rajk)
04:30:44 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
04:31:48 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:32:53 × jaevanko quits (~jaevanko@2600:1700:1330:2bef:7d9a:87ce:495f:966a) (Quit: Leaving)
04:34:08 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
04:36:09 lavaman joins (~lavaman@98.38.249.169)
04:36:17 × vk3wtf quits (~doc@59-102-3-251.tpgi.com.au) (Ping timeout: 264 seconds)
04:36:39 reumeth joins (~reumeth@user/reumeth)
04:38:24 × mccoyb quits (~textual@2601:182:d000:3b50:74fc:67c:ef8b:8632) (Quit: Textual IRC Client: www.textualapp.com)
04:38:44 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
04:41:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
04:42:53 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.1)
04:45:04 × beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 272 seconds)
04:45:37 ytg joins (~ytg@109-186-149-143.bb.netvision.net.il)
04:46:00 × ytg quits (~ytg@109-186-149-143.bb.netvision.net.il) (Client Quit)
04:46:08 danso joins (~danso@23-233-111-52.cpe.pppoe.ca)
04:47:22 pfurla joins (~pfurla@216.131.82.58)
04:48:14 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds)
04:49:05 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 245 seconds)
04:49:50 vk3wtf joins (~doc@124.168.198.139)
04:50:13 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
04:50:46 × pfurla_ quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 272 seconds)
04:52:34 × haskman quits (~haskman@106.201.29.153) (Quit: Going to sleep. ZZZzzz…)
04:53:35 pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
04:55:12 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
04:55:18 seeg0 joins (~thelounge@static.89.161.217.95.clients.your-server.de)
04:55:50 × pfurla quits (~pfurla@216.131.82.58) (Ping timeout: 272 seconds)
04:57:50 × falafel_ quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 245 seconds)
04:58:48 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
05:04:28 × AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.)
05:05:45 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
05:06:52 kristjansson joins (sid126207@id-126207.tinside.irccloud.com)
05:08:34 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
05:12:50 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
05:16:46 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
05:20:04 favonia joins (~favonia@user/favonia)
05:21:48 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 272 seconds)
05:25:25 beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net)
05:29:27 × exarkun quits (~exarkun@user/exarkun) (Ping timeout: 272 seconds)
05:30:41 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
05:31:50 × rk04 quits (~rk04@user/rajk) (Quit: Client closed)
05:32:32 chomwitt joins (~Pitsikoko@2a02:587:dc02:b00:b16c:5166:feb8:97d5)
05:33:52 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
05:36:59 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
05:38:41 euix joins (~euix@047-229-039-121.res.spectrum.com)
05:38:42 × haltux quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Ping timeout: 264 seconds)
05:39:06 × jao quits (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net) (Ping timeout: 245 seconds)
05:39:25 euix parts (~euix@047-229-039-121.res.spectrum.com) ()
05:41:29 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 244 seconds)
05:42:16 schuelermine joins (~schuelerm@user/schuelermine)
05:43:51 Bartosz joins (~textual@24.35.90.211)
05:43:56 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
05:46:27 haltux joins (~haltux@a89-154-181-47.cpe.netcabo.pt)
05:49:41 guest62 joins (~user@49.5.6.87)
05:50:42 <guest62> turn epoch time to date like the command in bash shell, date "+%Y-%m-%d %H-%M-%S ", it is hard?
05:51:14 <guest62> there's a list, contain lots of epoch time, but I need to group them by month
05:51:31 <guest62> or by year or day
05:51:54 × xff0x quits (~xff0x@2001:1a81:5307:4e00:e51:c3f6:62c2:5e71) (Ping timeout: 264 seconds)
05:52:11 xff0x joins (~xff0x@185.65.135.235)
05:54:12 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
05:55:15 mattil joins (~mattil@airio.portalify.com)
05:56:48 larkfisherman joins (~larkfishe@178.77.38.65)
05:56:48 × larkfisherman quits (~larkfishe@178.77.38.65) (Client Quit)
05:57:58 sondre joins (~sondrelun@cm-84.212.100.140.getinternet.no)
06:00:18 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 264 seconds)
06:00:54 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
06:01:18 favonia joins (~favonia@user/favonia)
06:02:08 guest62` joins (~user@49.5.6.87)
06:02:47 v01d4lph4 joins (~v01d4lph4@122.160.65.250)
06:02:47 × v01d4lph4 quits (~v01d4lph4@122.160.65.250) (Changing host)
06:02:47 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
06:04:20 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
06:05:41 × guest62 quits (~user@49.5.6.87) (Ping timeout: 264 seconds)
06:07:21 pfurla joins (~pfurla@5.15.195.173.client.static.strong-in52.as13926.net)
06:07:34 × Erutuon quits (~Erutuon@user/erutuon) (Quit: WeeChat 2.8)
06:08:44 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 252 seconds)
06:09:46 exarkun joins (~exarkun@user/exarkun)
06:10:08 Erutuon joins (~Erutuon@user/erutuon)
06:10:34 × pfurla_ quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 272 seconds)
06:14:07 <dminuoso> Not bad, I have an actual memory leak in one of our haskell servers.
06:14:16 <dminuoso> Now how do I go about and find it..
06:15:08 <Axman6> Look at the code, and think _really_ hard
06:15:13 <dminuoso> heh
06:15:47 <Axman6> heap profiling is the first place to start, not sure the best way to do that though, it always felt like a bit of a dark art to me
06:16:24 <dminuoso> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html#profiling-memory-usage
06:16:28 <dminuoso> Looks straight enough to me
06:16:53 <Axman6> Getting useful output is sometimes a bit painful though
06:17:05 <Axman6> I think there might be some better tools now though
06:17:05 × sondre quits (~sondrelun@cm-84.212.100.140.getinternet.no) (Ping timeout: 264 seconds)
06:17:42 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
06:17:57 <dminuoso> https://iohk.io/en/blog/posts/2020/09/24/being-lazy-without-getting-bloated/
06:17:59 <dminuoso> Mmm
06:18:06 rk04 joins (~rk04@user/rajk)
06:18:53 × rk04 quits (~rk04@user/rajk) (Client Quit)
06:19:40 × Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…)
06:20:28 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
06:20:31 favonia joins (~favonia@user/favonia)
06:21:33 × Erutuon quits (~Erutuon@user/erutuon) (Quit: WeeChat 2.8)
06:21:43 Erutuon joins (~Erutuon@user/erutuon)
06:24:30 × xff0x quits (~xff0x@185.65.135.235) (Ping timeout: 245 seconds)
06:24:55 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
06:25:20 × haltux quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Ping timeout: 245 seconds)
06:26:22 xff0x joins (~xff0x@2001:1a81:5307:4e00:e51:c3f6:62c2:5e71)
06:27:17 × jlamothe quits (~jlamothe@198.251.57.81) (Ping timeout: 272 seconds)
06:27:28 haltux joins (~haltux@a89-154-181-47.cpe.netcabo.pt)
06:28:18 × vicfred quits (~vicfred@user/vicfred) (Ping timeout: 272 seconds)
06:28:21 × phma quits (phma@2001:5b0:210b:c908:65f2:b626:259e:91d6) (Read error: Connection reset by peer)
06:28:59 jlamothe joins (~jlamothe@198.251.57.81)
06:30:47 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
06:31:48 phma joins (phma@2001:5b0:210b:c908:3c3e:633c:a47d:5a17)
06:31:57 wonko joins (~wjc@62.115.229.50)
06:33:18 × sheepduck quits (~sheepduck@2607:fea8:2a60:b700::8a94) (Ping timeout: 264 seconds)
06:37:33 lavaman joins (~lavaman@98.38.249.169)
06:38:02 bfrk joins (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de)
06:39:18 × chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:b16c:5166:feb8:97d5) (Ping timeout: 264 seconds)
06:41:06 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
06:42:00 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
06:43:24 bfrk parts (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de) ()
06:45:20 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
06:46:06 chele joins (~chele@user/chele)
06:46:20 <dminuoso> % instance Char where magic = 1
06:46:20 <yahb> dminuoso: ; <interactive>:20:21: error: `magic' is not a (visible) method of class `Char'
06:46:34 <dminuoso> Is this a diagnostic bug?
06:46:58 <dminuoso> % :k Char
06:46:58 <yahb> dminuoso: *
06:47:27 <dminuoso> I get that this is valid syntax (nullary typeclasses), but GHC should detect that Char is not a class
06:47:44 × Adran quits (~adran@botters/adran) (Quit: Este é o fim.)
06:48:16 <opqdonut> % instance Maybe Char where magic = 1
06:48:16 <yahb> opqdonut: ; <interactive>:22:27: error: `magic' is not a (visible) method of class `Maybe'
06:48:23 <opqdonut> same thing
06:49:05 <dminuoso> % instance NotAThing where magic = 1
06:49:05 <yahb> dminuoso: ; <interactive>:23:10: error: Not in scope: type constructor or class `NotAThing'
06:50:50 <Axman6> D:
06:51:19 Adran joins (adran@botters/adran)
06:52:26 rk04 joins (~rk04@user/rajk)
06:57:13 haskman joins (~haskman@106.201.29.153)
07:00:56 × schuelermine quits (~schuelerm@user/schuelermine) (Quit: Quit)
07:02:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:03:20 niflce joins (~IceChat95@user/niflce)
07:03:28 × niflce quits (~IceChat95@user/niflce) (Client Quit)
07:04:30 chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr)
07:10:04 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
07:10:49 mikoto-chan joins (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be)
07:11:08 cfricke joins (~cfricke@user/cfricke)
07:12:08 mc47 joins (~yecinem@89.246.239.190)
07:13:16 × guest62` quits (~user@49.5.6.87) (Ping timeout: 272 seconds)
07:13:56 shriekingnoise joins (~shrieking@186.137.144.80)
07:14:41 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 264 seconds)
07:15:10 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
07:15:18 × Guest6937 quits (bart@kobayashi.com.pl) (Quit: WeeChat 3.1)
07:15:31 bjfs joins (bart@kobayashi.com.pl)
07:15:50 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
07:17:34 satai joins (~satai@static-84-42-172-253.net.upcbroadband.cz)
07:17:38 lortabac joins (~lortabac@2a01:e0a:541:b8f0:2e4f:b94a:ab3f:8431)
07:20:42 bor0 joins (~boro@user/bor0)
07:21:30 × beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 272 seconds)
07:25:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
07:26:07 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
07:27:53 favonia joins (~favonia@user/favonia)
07:28:14 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
07:29:26 chele_ joins (~chele@user/chele)
07:29:48 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
07:30:11 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
07:30:20 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 245 seconds)
07:31:06 × rk04 quits (~rk04@user/rajk) (Ping timeout: 250 seconds)
07:32:18 × chele quits (~chele@user/chele) (Ping timeout: 268 seconds)
07:32:43 chele_ is now known as chele
07:37:00 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds)
07:41:59 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
07:42:31 dunkeln joins (~dunkeln@94.129.65.28)
07:44:56 × mattil quits (~mattil@airio.portalify.com) (Ping timeout: 272 seconds)
07:45:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:46:50 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Ping timeout: 272 seconds)
07:51:56 spirgel joins (spirgel@gateway/vpn/protonvpn/spirgel)
07:52:04 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Remote host closed the connection)
07:52:21 × spirgel quits (spirgel@gateway/vpn/protonvpn/spirgel) (Client Quit)
07:54:19 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
07:55:06 pera joins (~pera@0541db7e.skybroadband.com)
07:55:29 zeenk joins (~zeenk@2a02:2f04:a310:b600:b098:bf18:df4d:4c41)
07:55:29 pera is now known as Guest6551
07:58:15 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
07:59:20 pfurla_ joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
08:00:43 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
08:00:56 rk04 joins (~rk04@user/rajk)
08:01:08 chele_ joins (~chele@user/chele)
08:01:11 chele is now known as Guest5174
08:01:11 chele_ is now known as chele
08:01:21 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Client Quit)
08:01:38 × chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (Remote host closed the connection)
08:01:39 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
08:01:48 × jonathanx quits (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Client Quit)
08:02:02 × pfurla quits (~pfurla@5.15.195.173.client.static.strong-in52.as13926.net) (Ping timeout: 252 seconds)
08:02:03 jonathanx joins (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se)
08:02:41 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 264 seconds)
08:03:15 × Guest5174 quits (~chele@user/chele) (Ping timeout: 245 seconds)
08:05:30 × rk04 quits (~rk04@user/rajk) (Client Quit)
08:06:18 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
08:06:39 shryke_ joins (~shryke@91.103.43.254)
08:07:43 favonia joins (~favonia@user/favonia)
08:08:05 × alp quits (~alp@163.172.83.213) (Changing host)
08:08:05 alp joins (~alp@user/alp)
08:09:20 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Quit: Lost terminal)
08:09:28 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 252 seconds)
08:10:00 larkfisherman joins (~larkfishe@217.75.204.126)
08:10:18 _xft0 joins (~root@185.234.208.208.r.toneticgroup.pl)
08:12:57 hendursaga joins (~weechat@user/hendursaga)
08:13:27 dhil joins (~dhil@195.213.192.85)
08:15:36 michalz joins (~user@185.246.204.60)
08:17:00 × sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Ping timeout: 244 seconds)
08:17:27 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
08:19:23 gehmehgeh joins (~user@user/gehmehgeh)
08:20:38 sqrt2 joins (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net)
08:21:09 × shryke_ quits (~shryke@91.103.43.254) (Quit: WeeChat 3.1)
08:21:38 shryke joins (~shryke@91.103.43.254)
08:22:13 ccapndave joins (~ccapndave@84-73-232-220.dclient.hispeed.ch)
08:22:44 <ccapndave> Morning! How can I write this in point-free style? isValidChar c = isAscii c && isAlpha c
08:23:25 <opqdonut> :t liftA2 (&&) isAscii isAlpha -- using the Applicative ((->) r) instance
08:23:26 <lambdabot> Char -> Bool
08:24:00 boxscape joins (~boxscape@user/boxscape)
08:24:21 fendor_ joins (~fendor@178.115.57.160.wireless.dyn.drei.com)
08:24:26 <dminuoso> Depending on frequency, I sometimes find myself writing: (.&&.) = liftA2 (&&)
08:24:43 <ccapndave> Awesome! Thanks very much
08:24:52 <dminuoso> (And (.||.) = liftA2 (||) equivalent)
08:25:08 <opqdonut> :t All . isAlpha <> All . isAscii -- using the Monoid m => Monoid (r->m) istance
08:25:09 <lambdabot> Char -> All
08:25:20 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds)
08:25:42 <boxscape> I recently discovered the Boolean package which just lets you do `isAlpha && isAscii`
08:25:44 <opqdonut> :t getAll . (All . isAlpha <> All . isAscii) -- let's unwrap
08:25:44 <lambdabot> Char -> Bool
08:26:08 <dminuoso> % :t ala Sum foldMap [even, odd]
08:26:09 <yahb> dminuoso: (Integral a, Num (a -> Bool)) => a -> Bool
08:26:29 <dminuoso> uh no wait
08:26:31 <dminuoso> this is strange
08:26:59 × fendor quits (~fendor@178.165.178.245.wireless.dyn.drei.com) (Ping timeout: 272 seconds)
08:27:19 <boxscape> % :t cotraverse and [even, odd]
08:27:19 <yahb> boxscape: Integral a => a -> Bool
08:27:29 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
08:27:33 <dminuoso> That's cute
08:27:44 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Read error: Connection reset by peer)
08:27:55 <ccapndave> boxscape: https://hackage.haskell.org/package/Boolean-0.2.4/candidate/docs/Data-Boolean.html this one?
08:28:08 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
08:28:21 <boxscape> ccapndave yep, though this module in particular is what redefines && https://hackage.haskell.org/package/Boolean-0.2.4/docs/Data-Boolean-Overload.html
08:29:19 <ccapndave> Stack doesn't seem to know about this package
08:29:30 <boxscape> :(
08:29:38 <ccapndave> Ah well, `liftA2` is fine
08:29:52 <opqdonut> yeah that's what people use in practice
08:30:27 FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993)
08:30:29 <ccapndave> Thanks a lot. I had better get back to my day job :)
08:30:49 <ccapndave> Haskell has a way of taking my attention away from what I am supposed to be doing
08:30:59 <opqdonut> I know
08:31:34 × FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit)
08:31:38 <opqdonut> speaking of Haskell, I just pushed the final lecture of my online haskell course: https://haskell.mooc.fi/
08:31:43 <boxscape> :t isAlpha &liftA2 (&&)$ isAscii -- I wish we had a nicer way of modifying operators with liftA2
08:31:44 <lambdabot> Char -> Bool
08:31:52 <opqdonut> part 2 is still technically "in preview", but there should be no major changes
08:32:18 <ccapndave> Awesome!
08:32:23 <ccapndave> I'll check it out
08:32:30 <ccapndave> *after* doing some actual work ;)
08:33:59 FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993)
08:35:07 xprlgjf joins (~gavin@60.27.93.209.dyn.plus.net)
08:36:22 × ccapndave quits (~ccapndave@84-73-232-220.dclient.hispeed.ch) (Quit: Leaving...)
08:42:41 × tcard quits (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp) (Remote host closed the connection)
08:42:55 tcard joins (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp)
08:43:17 × fabfianda quits (~fabfianda@net-93-148-125-174.cust.vodafonedsl.it) (Ping timeout: 252 seconds)
08:44:15 fabfianda joins (~fabfianda@mob-5-90-244-84.net.vodafone.it)
08:46:06 ukari joins (~ukari@user/ukari)
08:47:15 × FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Quit: FreeVariable)
08:47:44 FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993)
08:48:07 batman_ joins (~batman@x4db91071.dyn.telefonica.de)
08:48:24 × batman_ quits (~batman@x4db91071.dyn.telefonica.de) (Client Quit)
08:48:27 × FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit)
08:48:53 FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993)
08:49:18 × FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit)
08:50:50 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
08:52:24 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9)
08:52:30 kuribas joins (~user@ptr-25vy0i6y10noc9bho8l.18120a2.ip6.access.telenet.be)
08:54:55 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 245 seconds)
08:56:40 FreeVariable joins (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993)
08:57:18 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Ping timeout: 264 seconds)
08:58:42 <ukari> for `foo x y = bar x >> bar y`, it could be rewrite to `foo x = ((>>) . bar) x . bar` through `foo x y = (>>) (bar x) . bar $ y`. how to rewrite it to `foo = (. bar) . (>>) . bar`?
08:59:42 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 264 seconds)
08:59:44 <[exa]> ukari: as the first thing, flip the `.` in the middle (flip (.) ...)
09:00:06 <[exa]> then you should be able to do it just by adding one more `.` to get the `x` "out" of the second parameter
09:00:19 nschoe joins (~quassel@2a01:e0a:8e:a190:184d:3a8c:7727:6c6d)
09:00:45 <[exa]> OR, use lambdabots great @pl functionality. :]
09:01:05 × FreeVariable quits (~Thunderbi@2a02:aa12:540:e480:d738:2660:2e:8993) (Client Quit)
09:03:55 <ukari> thanks you, [exa], I have get the `foo = flip (.) bar . ((>>) . bar)`
09:04:14 ubert joins (~Thunderbi@p200300ecdf259da5e6b318fffe838f33.dip0.t-ipconnect.de)
09:04:50 <[exa]> yap that looks right
09:05:26 <[exa]> not "optically better" tho
09:05:39 <[exa]> I'd vote for `traverse bar [x,y]` or something
09:06:24 <[exa]> (given you'd desperately want to "simplify" the original expression)
09:07:59 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
09:09:44 × exarkun quits (~exarkun@user/exarkun) (Remote host closed the connection)
09:10:17 exarkun joins (~exarkun@user/exarkun)
09:11:15 × Maxdamantus quits (~Maxdamant@user/maxdamantus) (Ping timeout: 244 seconds)
09:13:00 Maxdamantus joins (~Maxdamant@user/maxdamantus)
09:13:54 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:14:14 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
09:14:39 favonia joins (~favonia@user/favonia)
09:15:07 × Kaivo quits (~Kaivo@user/kaivo) (Ping timeout: 272 seconds)
09:15:17 <ukari> summary about pointfree style for `foo x y = bar x >> bar y`, https://gist.github.com/ukari/6402acdcc61489c6625027d65a59bcc9
09:17:50 × fabfianda quits (~fabfianda@mob-5-90-244-84.net.vodafone.it) (Ping timeout: 245 seconds)
09:18:23 fabfianda joins (~fabfianda@net-93-148-125-174.cust.dsl.teletu.it)
09:18:31 <[exa]> o nice
09:18:45 Kaivo joins (~Kaivo@user/kaivo)
09:19:31 Pixi_ joins (~Pixi@user/pixi)
09:21:18 <boxscape> hm wikipedia lists an algorithm for converting into a pointfree expression (ie an expression in SK calculus) that has length Θ(n^3)
09:21:19 <boxscape> I'm pretty sure you could do Θ(n) though
09:21:25 <boxscape> You "just" need to write a lambda calculus interpreter pointfreely, and then attach the lambda term encoded with S and K combinators, giving you the constant length of the interpreter plus O(n) for the lambda term
09:22:01 <boxscape> (n being the length of the original lambda expression)
09:22:16 <river> true
09:23:09 × Pixi quits (~Pixi@user/pixi) (Ping timeout: 272 seconds)
09:24:15 ixlun joins (~matthew@109.249.184.235)
09:27:56 sondre joins (~sondrelun@cm-84.212.100.140.getinternet.no)
09:29:21 × wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal)
09:30:56 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
09:34:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
09:34:55 favonia joins (~favonia@user/favonia)
09:35:22 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-dev)
09:37:11 × Kaivo quits (~Kaivo@user/kaivo) (Ping timeout: 252 seconds)
09:37:13 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
09:38:48 Kaivo joins (~Kaivo@user/kaivo)
09:41:31 ku joins (~ku@2601:280:c780:7ea0:3536:1caf:f72e:47bc)
09:42:30 thiross joins (~thiross@173.242.113.143.16clouds.com)
09:46:58 × thiross quits (~thiross@173.242.113.143.16clouds.com) (Client Quit)
09:47:41 thiross joins (~thiross@173.242.113.143.16clouds.com)
09:48:58 koishi_ joins (~koishi_@67.209.186.120.16clouds.com)
09:49:59 × koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection)
09:52:30 ccntrq joins (~ccntrq@business-90-187-183-141.pool2.vodafone-ip.de)
09:53:55 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:54:02 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9)
09:56:02 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
09:56:27 favonia joins (~favonia@user/favonia)
09:59:04 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Ping timeout: 268 seconds)
10:00:45 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 245 seconds)
10:01:02 shryke_ joins (~shryke@91.103.43.254)
10:02:07 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Read error: Connection reset by peer)
10:02:25 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
10:04:04 × thiross quits (~thiross@173.242.113.143.16clouds.com) (Ping timeout: 250 seconds)
10:04:30 × shryke quits (~shryke@91.103.43.254) (Ping timeout: 245 seconds)
10:06:35 × fabfianda quits (~fabfianda@net-93-148-125-174.cust.dsl.teletu.it) (Ping timeout: 245 seconds)
10:07:03 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:2e4f:b94a:ab3f:8431) (Ping timeout: 244 seconds)
10:07:21 fabfianda joins (~fabfianda@mob-5-90-240-15.net.vodafone.it)
10:07:26 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Ping timeout: 272 seconds)
10:11:24 × favonia quits (~favonia@user/favonia) (Ping timeout: 268 seconds)
10:11:47 benin4 joins (~benin@183.82.205.186)
10:11:49 favonia joins (~favonia@user/favonia)
10:12:18 lortabac joins (~lortabac@2a01:e0a:541:b8f0:ca30:4180:833e:bce9)
10:12:30 × benin quits (~benin@183.82.205.186) (Ping timeout: 272 seconds)
10:12:30 benin4 is now known as benin
10:13:45 k3nny joins (~k3nny@user/k3nny)
10:16:25 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
10:17:37 × haskman quits (~haskman@106.201.29.153) (Ping timeout: 272 seconds)
10:18:18 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 264 seconds)
10:19:28 × fabfianda quits (~fabfianda@mob-5-90-240-15.net.vodafone.it) (Ping timeout: 272 seconds)
10:19:40 fabfianda joins (~fabfianda@net-93-148-125-174.cust.dsl.teletu.it)
10:20:59 rk04 joins (~rk04@user/rajk)
10:22:46 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
10:26:44 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
10:29:02 scn joins (~user@2600:6c54:4500:1849:11c9:ec1e:8500:8c64)
10:32:49 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
10:33:03 × scn quits (~user@2600:6c54:4500:1849:11c9:ec1e:8500:8c64) (Quit: ERC (IRC client for Emacs 27.1))
10:33:13 favonia joins (~favonia@user/favonia)
10:33:24 × dhil quits (~dhil@195.213.192.85) (Ping timeout: 272 seconds)
10:35:15 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-dev)
10:36:04 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:36:45 × amk quits (~amk@176.61.106.150) (Remote host closed the connection)
10:37:04 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Client Quit)
10:37:17 × bor0 quits (~boro@user/bor0) (Quit: Leaving)
10:37:40 haskman joins (~haskman@223.190.0.187)
10:37:55 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
10:38:49 lavaman joins (~lavaman@98.38.249.169)
10:39:26 amk joins (~amk@176.61.106.150)
10:41:43 dhil joins (~dhil@195.213.192.85)
10:43:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
10:45:07 × berberman quits (~berberman@user/berberman) (Ping timeout: 265 seconds)
10:45:13 berberman_ joins (~berberman@user/berberman)
10:46:56 × img quits (~img@2405:6580:b1c0:2500:1e68:3732:5209:e4c0) (Quit: ZNC 1.8.1 - https://znc.in)
10:47:43 × rk04 quits (~rk04@user/rajk) (Quit: Client closed)
10:49:15 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
10:49:47 img joins (~img@2405:6580:b1c0:2500:2508:a86c:693c:5a39)
10:49:59 fendor_ is now known as fendor
10:56:06 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 264 seconds)
10:56:19 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
10:57:40 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:00:20 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 245 seconds)
11:06:49 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
11:08:38 y04nn joins (~y04nn@193.32.127.220)
11:08:50 × _xft0 quits (~root@185.234.208.208.r.toneticgroup.pl) (Quit: leaving)
11:09:40 xsperry joins (~as@user/xsperry)
11:10:08 × shryke_ quits (~shryke@91.103.43.254) (Ping timeout: 272 seconds)
11:10:32 <ziman> i'm writing an algorithm (check various caches, if they all miss, do something expensive) that can short-circuit in two ways: 1) cache hit, 2) some error. Is there a neat way of expressing this? Now I'm using MonadFail to express the errors but the cache lookups still cause a indentation cascade of case expressions, where the (Just hitData) branch is always (return hitData).
11:10:57 <ziman> I find it hard to google.
11:11:01 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
11:11:51 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Remote host closed the connection)
11:12:17 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
11:12:25 cheater1__ joins (~Username@user/cheater)
11:12:27 × cheater quits (~Username@user/cheater) (Ping timeout: 268 seconds)
11:12:37 cheater1__ is now known as cheater
11:12:59 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Remote host closed the connection)
11:13:24 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
11:13:25 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
11:13:42 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-dev)
11:14:01 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Client Quit)
11:15:20 × wanagnuj quits (~wanagnuj@101.95.97.158) (Ping timeout: 245 seconds)
11:16:14 <boxscape> ziman I don't have extensive experience with it but that seems like a use case for callCC, which lets you return early
11:16:22 <boxscape> https://en.m.wikibooks.org/wiki/Haskell/Continuation_passing_style (search for callcc here)
11:16:22 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
11:16:52 <boxscape> ziman you could combine ContT with ExceptT to get both the ability to return early and the ability to throw an error
11:18:08 <ziman> ah, i see
11:18:48 <ziman> yeah, that would probably work for my use case
11:19:38 ikex joins (~ash@user/ikex)
11:20:52 × ixlun quits (~matthew@109.249.184.235) (Read error: Connection reset by peer)
11:28:03 <boxscape> ziman I suppose you could also only use Cont without Except and have the function live in Cont r (Either Error Result), not sure which would be more convenient
11:29:12 × haskman quits (~haskman@223.190.0.187) (Quit: Going to sleep. ZZZzzz…)
11:29:38 <ziman> i think i'd prefer to have two distinct "throws"
11:29:42 <boxscape> fair
11:29:43 <ziman> but it's an interesting question
11:30:19 <ziman> well, in other words, i'd like (pure x) return the success thing without me having to wrap it in Right
11:30:46 <ziman> because otherwise the monad instance would be annoying, i imagine
11:30:58 <ziman> like not being able to fmap stuff easily and such
11:31:02 boxscape10 joins (~boxscape@user/boxscape)
11:31:25 <boxscape10> ziman are you familiar with mtl style?
11:31:36 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
11:32:01 <ziman> i use mtl but i'm not sure what you mean by the "mtl style"; do you mean autolifting via typeclasses?
11:32:06 <boxscape10> yeah
11:32:27 <boxscape10> but if you use mtl I imagine the answer is yes :)
11:32:45 <ziman> hmm, is there an autolifted version of "pure"?
11:32:57 <ziman> not sure if that makes sense, even
11:33:27 <boxscape10> erm, I suppose I say pure is already autolifted IIUC
11:33:34 <boxscape10> s/I say/I would say
11:33:54 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
11:34:01 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:34:55 × boxscape quits (~boxscape@user/boxscape) (Ping timeout: 245 seconds)
11:34:55 × Guest6551 quits (~pera@0541db7e.skybroadband.com) (Ping timeout: 245 seconds)
11:35:27 favonia joins (~favonia@user/favonia)
11:36:47 <ziman> oh, right, because you'd use the transformer formulation then
11:37:31 haskman joins (~haskman@223.190.0.187)
11:37:39 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Client Quit)
11:37:47 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:38:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Client Quit)
11:38:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:39:09 habib joins (~habib@89.38.69.197)
11:39:24 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Client Quit)
11:39:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:39:48 boxscape10 is now known as boxscape
11:40:30 <habib> hey, can anyone tell me if `(a <=< b) . c` is equivalent to `a <=< (b . c)`, and/or how to check the equivalence of different bracketed statements in the general case?
11:40:48 <hpc> :t \a b c -> (a <=< b) . c
11:40:49 <lambdabot> Monad m => (b -> m c) -> (a1 -> m b) -> (a2 -> a1) -> a2 -> m c
11:40:55 <hpc> :t \a b c -> a <=< (b . c)
11:40:56 <lambdabot> Monad m => (b1 -> m c) -> (b2 -> m b1) -> (a -> b2) -> a -> m c
11:42:04 <hpc> you could do it with equational reasoning
11:42:14 <merijn> @check \f g h x -> ((f <=< g) . h) x == (f <=< (g . h)) x
11:42:15 <lambdabot> error:
11:42:15 <lambdabot> • No instance for (Typeable m0) arising from a use of ‘myquickcheck’ • In th...
11:42:18 <merijn> aww
11:42:23 <hpc> expand out the definition of (.) and (<=<), and use the Monad laws to turn them into the same equation
11:42:40 <hpc> or well, same expression
11:42:56 <habib> i guess that's my final resort, just manually expanding it
11:43:36 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
11:44:03 <habib> what i really care about is doing `a <=< b . c` without brackets and knowing that it's equivalent to the one i want `a <=< (b . c)`, but if the one i want is also equivalent to the other one, it doesn't matter which way the unbracketed expression resolves to
11:44:30 <habib> in fact, if they're both equivalent, that's happy days, because then it means i don't have to put brackets when i want it the other way as well
11:45:01 × hmmmas quits (~chenqisu1@183.217.202.217) (Quit: Leaving.)
11:45:08 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 268 seconds)
11:46:36 <habib> thanks hpc, i'll just do the expansion tonight
11:46:46 <lyxia> @check \fgh x -> let f,g :: Int -> [Int] ; h :: Int -> Int ; (Fn f, Fn g, Fn h) = fgh in ((f <=< g) . h) x === (f <=< (g . h)) x
11:46:47 <lambdabot> +++ OK, passed 100 tests.
11:47:55 <hpc> jeez, i need to properly learn quickcheck
11:48:15 <habib> oh nice
11:48:15 dunkeln joins (~dunkeln@94.129.65.28)
11:49:33 <habib> that's confidence enough for me with what i'm doing if i do a manual test and things still work the same
11:49:39 <habib> thanks lyxia
11:50:09 <habib> i gotta get back to work now ha; i'll use this tonight
11:50:21 habib parts (~habib@89.38.69.197) ()
11:51:27 haltux_ joins (~haltux@a89-154-181-47.cpe.netcabo.pt)
11:51:37 thiross joins (~user@173.242.113.143.16clouds.com)
11:51:45 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.1)
11:51:54 × haltux quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Ping timeout: 264 seconds)
11:52:19 shryke_ joins (~shryke@91.103.43.254)
11:52:30 pera joins (~pera@0541db7e.skybroadband.com)
11:52:54 pera is now known as Guest3322
11:54:18 smitop joins (uid328768@user/smitop)
11:55:07 × thiross quits (~user@173.242.113.143.16clouds.com) (Remote host closed the connection)
11:55:29 × exarkun quits (~exarkun@user/exarkun) (Remote host closed the connection)
11:55:38 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9)
11:55:49 × ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Read error: Connection reset by peer)
11:56:02 exarkun joins (~exarkun@user/exarkun)
11:56:09 × shryke_ quits (~shryke@91.103.43.254) (Client Quit)
11:58:57 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
12:00:22 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
12:00:33 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Ping timeout: 268 seconds)
12:02:14 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
12:03:58 × ikex quits (~ash@user/ikex) (Ping timeout: 272 seconds)
12:04:52 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
12:08:24 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
12:09:08 zebrag joins (~chris@user/zebrag)
12:09:11 ikex joins (~ash@user/ikex)
12:09:46 GuYuChina joins (~GuYuChina@120.244.202.156)
12:10:05 GuYuChina parts (~GuYuChina@120.244.202.156) ()
12:13:00 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
12:13:56 × dutchgriffon quits (~laurens@2604:3d08:4383:6200:14a:dacb:8b69:ead6) (Ping timeout: 252 seconds)
12:15:04 dutchgriffon joins (~laurens@2604:3d08:4383:6200:1c6:2d20:b4b0:b2cf)
12:18:06 benin8 joins (~benin@106.198.94.140)
12:18:20 × ptrcmd quits (~ptrcmd@user/ptrcmd) (Quit: Lost terminal)
12:19:23 jacks2 joins (~bc817c21@217.29.117.252)
12:19:25 ptrcmd joins (~ptrcmd@user/ptrcmd)
12:19:55 × benin quits (~benin@183.82.205.186) (Ping timeout: 245 seconds)
12:21:29 <jacks2> hi. where can I find textual source that is in the gif on this page? http://hackage.haskell.org/package/concurrent-output
12:21:32 <jacks2> I tried google but no luck
12:21:43 benin joins (benin@gateway/vpn/protonvpn/benin)
12:23:21 <Taneb> jacks2: https://git.joeyh.name/index.cgi/concurrent-output.git/tree/demo2.hs
12:23:41 × benin8 quits (~benin@106.198.94.140) (Ping timeout: 264 seconds)
12:23:52 <jacks2> thanks!
12:23:55 <Taneb> I went to the website linked to as the source repo on Hackage, and saw there was a demo2.hs file
12:25:12 <jacks2> yeah, I missed it
12:25:17 <jacks2> pretty nifty library.
12:26:02 <jacks2> demo works flawlessly on linux, would be nice if it worked on other OSes as well. I'll have to test
12:29:14 leeb joins (~leeb@KD111239154171.au-net.ne.jp)
12:30:52 Guest5 joins (~Guest5@040-194-158-163.dynamic.caiway.nl)
12:30:54 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 264 seconds)
12:31:00 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
12:31:05 <Guest5> Hi, I have a strange Haskell problem
12:31:19 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Remote host closed the connection)
12:31:36 <Guest5> I have a list `[c, b, a]`, I then call `reverse` on the list and it gives back `[b, a, c]`
12:31:51 <Guest5> How is that possible?
12:31:53 v01d4lph4 joins (~v01d4lph4@user/v01d4lph4)
12:32:09 <jacks2> > reverse [1, 2, 3]
12:32:11 <lambdabot> [3,2,1]
12:32:11 <merijn> > reverse [ 3, 2, 1]
12:32:13 <lambdabot> [1,2,3]
12:32:43 int-e can think of dirty runST/unsafeInterleaveST tricks to do that kind of thing
12:32:44 <merijn> Pretty sure you're calling the wrong reverse function
12:33:01 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
12:33:06 × benin quits (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 272 seconds)
12:33:07 <merijn> int-e: When you hear hooves, think horses, not zebras ;)
12:33:18 <merijn> Well, unless you live in Africa, I suppose!
12:33:28 <int-e> > reverse [c,b,a]
12:33:29 <lambdabot> [a,b,c]
12:33:43 <Guest5> ```
12:33:47 <Guest5> ```flattenApp :: Surface -> (Surface, [Surface])
12:33:48 <Guest5> flattenApp s = let (f', as) = go s in (f', reverse as)
12:33:48 <Guest5> where
12:33:49 <Guest5> go (SApp f a) = let (f', as) = flattenApp f in (f', a : as)
12:33:49 <Guest5> go s = (s, [])
12:33:50 <Guest5> reverse [] = []
12:33:50 × Guest5 quits (~Guest5@040-194-158-163.dynamic.caiway.nl) (Killed (ozone (No Spam)))
12:34:00 <yushyin> ;D
12:34:19 <merijn> Guest5: That is defining a custom reverse right there, so *presumably* your definition of reverse is broken :)
12:34:29 <int-e> reverse [] = [] -- well we see what's wrong here
12:34:41 <int-e> merijn: they're not currently here, ozone killed them
12:35:06 <merijn> I have join/quits disabled :p
12:35:06 <niko> he should be able to rejoin
12:35:38 timothy1 joins (~timothy@bb42-60-217-138.singnet.com.sg)
12:36:11 <int-e> merijn: anyway, when I hear hooves, I think people banging coconuts
12:36:41 koishi_ joins (~koishi_@67.209.186.120.16clouds.com)
12:36:54 × v01d4lph4 quits (~v01d4lph4@user/v01d4lph4) (Ping timeout: 272 seconds)
12:37:35 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 252 seconds)
12:37:56 × timothy1 quits (~timothy@bb42-60-217-138.singnet.com.sg) (Client Quit)
12:38:49 <merijn> Where did you get the coconuts?
12:38:51 <jacks2> Guest5, do you understand what you did?
12:39:26 <jacks2> > let reverse _ = "..." in reverse [a,b,c]
12:39:28 <lambdabot> "..."
12:39:28 <merijn> Found them? In Mercia? The coconut's tropical! This is a temperate zone!
12:40:01 ezzieyguywuf joins (~Unknown@user/ezzieyguywuf)
12:41:27 cheater joins (~Username@user/cheater)
12:41:53 Guest5 joins (~Guest5@040-194-158-163.dynamic.caiway.nl)
12:42:09 <Guest5> Oops, I got banned for a moment
12:42:27 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
12:43:11 <Taneb> Guest5: yeah, it's generally bad to paste multiple lines directly into IRC. For that sort of thing you should use some sort of paste bin service
12:43:25 <Guest5> Yeah lesson learned
12:45:11 × koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection)
12:45:53 <int-e> merijn: I don't know, I never asked the Monty Python troupe.
12:46:13 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
12:46:39 × cheater quits (~Username@user/cheater) (Remote host closed the connection)
12:47:04 benin joins (~benin@183.82.205.186)
12:47:08 bigLama joins (~user@static-176-165-167-17.ftth.abo.bbox.fr)
12:50:24 rk04 joins (~rk04@user/rajk)
12:50:50 × Guest5 quits (~Guest5@040-194-158-163.dynamic.caiway.nl) (Quit: Client closed)
12:50:54 koishi_ joins (~koishi_@67.209.186.120.16clouds.com)
12:51:11 <c_wraith> how confusing is it to use <**> in a parser? I've got an infix expression that I had written variously as `(\x op y -> x `op` y) <$> fx <*> fop <*> fy', `flip ($) <$> fx <*> fop <*> fy', and `(&) <$> fx <*> fop <*> fy'
12:51:38 <c_wraith> I just realized I can write it as `fx <**> fop <*> fy' instead.
12:52:00 <c_wraith> But I'm not convinced that's any better
12:52:20 <Taneb> I personally think it's not much worse than using <*> at all
12:53:01 × ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Read error: Connection reset by peer)
12:53:57 <int-e> c_wraith: lgtm
12:54:33 cheater1__ joins (~Username@user/cheater)
12:55:03 cheater1__ is now known as cheater
12:55:41 <dminuoso> c_wraith: I dislike <**> in optparse-applicative, where it seems to be rather common
12:55:53 <gentauro> anybody using `hakyll`? I would like to have bookmarks on my "titles". Just like the readme.md handle that on GitLab/GitHub. Anybody done this?
12:55:58 <int-e> (apart from the fact that <**> isn't the nicest name for what it does, which can't easily be changed after the fact)
12:56:34 <dminuoso> Id rather use ApplicativeDo ;)
12:57:12 <int-e> dminuoso: but then you need names for all the points, eww
12:57:45 reumeth joins (~reumeth@user/reumeth)
12:58:37 ubikium joins (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net)
13:00:22 × rk04 quits (~rk04@user/rajk) (Quit: Client closed)
13:01:01 alx741 joins (~alx741@181.196.69.176)
13:01:11 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9)
13:03:12 rk04 joins (~rk04@user/rajk)
13:04:01 × bigLama quits (~user@static-176-165-167-17.ftth.abo.bbox.fr) (Quit: ERC (IRC client for Emacs 28.0.50))
13:06:07 × koishi_ quits (~koishi_@67.209.186.120.16clouds.com) (Remote host closed the connection)
13:06:56 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
13:07:44 gentauro joins (~gentauro@user/gentauro)
13:10:21 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 245 seconds)
13:10:43 o1lo01ol1o joins (~o1lo01ol1@mobile-107-107-58-49.mycingular.net)
13:12:22 × oxide quits (~lambda@user/oxide) (Ping timeout: 272 seconds)
13:12:22 bigLama joins (~user@static-176-165-167-17.ftth.abo.bbox.fr)
13:12:44 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:14:00 × bigLama quits (~user@static-176-165-167-17.ftth.abo.bbox.fr) (Client Quit)
13:14:08 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
13:15:25 bigLama joins (~user@static-176-165-167-17.ftth.abo.bbox.fr)
13:15:40 × bigLama quits (~user@static-176-165-167-17.ftth.abo.bbox.fr) (Client Quit)
13:16:10 × xff0x quits (~xff0x@2001:1a81:5307:4e00:e51:c3f6:62c2:5e71) (Ping timeout: 272 seconds)
13:16:19 bigLama joins (~user@static-176-165-167-17.ftth.abo.bbox.fr)
13:18:42 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 272 seconds)
13:19:32 FreeVariable joins (~Thunderbi@156.25.4.27)
13:20:17 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
13:20:24 × FreeVariable quits (~Thunderbi@156.25.4.27) (Client Quit)
13:21:05 hexo joins (~hexo@2a02-ab04-2843-9500-c95c-a376-1418-c3e1.dynamic.v6.chello.sk)
13:22:27 dunkeln joins (~dunkeln@94.129.65.28)
13:23:04 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:23:43 dut joins (~dut@user/dut)
13:23:44 dut_ joins (~dut@user/dut)
13:24:26 × dut_ quits (~dut@user/dut) (Client Quit)
13:27:35 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
13:27:44 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
13:29:40 ub joins (~Thunderbi@p200300ecdf259da5656b91086baf35ac.dip0.t-ipconnect.de)
13:30:27 AgentM joins (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net)
13:30:39 × larkfisherman quits (~larkfishe@217.75.204.126) (Quit: Leaving)
13:31:18 ixlun joins (~matthew@109.249.184.235)
13:31:30 larkfisherman joins (~larkfishe@217.75.204.126)
13:31:30 × haltux_ quits (~haltux@a89-154-181-47.cpe.netcabo.pt) (Ping timeout: 264 seconds)
13:31:31 dy is now known as ocelot
13:31:40 ocelot is now known as dy
13:39:09 × larkfisherman quits (~larkfishe@217.75.204.126) (Quit: Leaving)
13:42:46 × benin quits (~benin@183.82.205.186) (Ping timeout: 272 seconds)
13:46:27 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:5878:fcfd:e07b:ffd9) (Remote host closed the connection)
13:48:40 __monty__ joins (~toonn@user/toonn)
13:49:56 marienz joins (~marienz@libera/staff/marienz)
13:51:00 × waleee quits (~waleee@h-98-128-228-119.NA.cust.bahnhof.se) (Ping timeout: 272 seconds)
13:55:40 Boomerang joins (~Boomerang@xd520f68c.cust.hiper.dk)
13:57:51 <dminuoso> Alternatively you can use <*> + Backwards
13:57:57 <dminuoso> A bit overkill, I admit.
13:58:30 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
14:02:16 <c_wraith> that's way beyond a *bit* overkill
14:03:14 <c_wraith> it would work nicely if I wanted that every single time. But when I just want reverse application once, that's an amazing amount of overhead.
14:05:17 × exarkun quits (~exarkun@user/exarkun) (Read error: Connection reset by peer)
14:05:47 exarkun joins (~exarkun@user/exarkun)
14:09:31 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2-dev)
14:10:00 benin joins (~benin@183.82.205.186)
14:11:03 geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com)
14:11:23 xff0x joins (~xff0x@217.110.198.158)
14:19:12 hexfive joins (~eric@50.35.83.177)
14:19:26 × hexfive quits (~eric@50.35.83.177) (Client Quit)
14:19:30 × xff0x quits (~xff0x@217.110.198.158) (Ping timeout: 245 seconds)
14:19:52 FreeVariable joins (~Thunderbi@wifi-unifr-140-170.unifr.ch)
14:20:56 × ixlun quits (~matthew@109.249.184.235) (Read error: Connection reset by peer)
14:21:49 bigLama parts (~user@static-176-165-167-17.ftth.abo.bbox.fr) (ERC (IRC client for Emacs 28.0.50))
14:21:57 xff0x joins (~xff0x@217.110.198.158)
14:22:06 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
14:22:22 bigLama joins (~user@static-176-165-167-17.ftth.abo.bbox.fr)
14:24:40 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
14:27:23 slowButPresent joins (~slowButPr@user/slowbutpresent)
14:28:07 <dminuoso> c_wraith: Hey,
14:28:13 <dminuoso> Sorry, hit enter too early
14:30:05 <dminuoso> But hey, can you find some comfort in the irony of the Applicative definition for BackwardsÖ
14:30:06 <dminuoso> Backwards f <*> Backwards a = Backwards (a <**> f)
14:31:16 <c_wraith> haha
14:37:02 dtman34 joins (~dtman34@c-73-62-246-247.hsd1.mn.comcast.net)
14:40:34 lavaman joins (~lavaman@98.38.249.169)
14:40:48 chomwitt joins (~Pitsikoko@2a02:587:dc02:b00:b16c:5166:feb8:97d5)
14:41:43 Sgeo joins (~Sgeo@user/sgeo)
14:43:36 jao joins (~jao@cpc103048-sgyl39-2-0-cust502.18-2.cable.virginm.net)
14:45:28 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
14:46:06 × ikex quits (~ash@user/ikex) (Ping timeout: 272 seconds)
14:46:12 × drewolson quits (~drewolson@64.227.24.16) (Changing host)
14:46:12 drewolson joins (~drewolson@user/drewolson)
14:46:26 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 268 seconds)
14:46:49 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
14:50:21 Iryon joins (~Iryon@2a02:a31a:a045:3500:c000:ef2e:b473:4083)
14:51:48 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Ping timeout: 272 seconds)
14:56:56 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
14:57:17 Soft joins (~soft-matr@2001:470:69fc:105::c75)
14:57:48 × cfricke quits (~cfricke@user/cfricke) (Quit: WeeChat 3.1)
14:58:29 <kuribas> :t Backwards
14:58:30 <lambdabot> error:
14:58:30 <lambdabot> • Data constructor not in scope: Backwards
14:58:30 <lambdabot> • Perhaps you meant variable ‘backwards’ (imported from Control.Lens)
14:59:38 <c_wraith> https://hackage.haskell.org/package/transformers-0.5.6.2/docs/Control-Applicative-Backwards.html
15:00:45 arjun joins (~user@user/arjun)
15:00:47 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
15:08:34 <ski> @type Control.Applicative.Backwards.Backwards
15:08:35 <lambdabot> forall k (f :: k -> *) (a :: k). f a -> Control.Applicative.Backwards.Backwards f a
15:10:08 <c_wraith> Huh. I really don't see that getting much benefit from being polykinded, but at least it won't hurt anything
15:12:25 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Remote host closed the connection)
15:12:37 × hexo quits (~hexo@2a02-ab04-2843-9500-c95c-a376-1418-c3e1.dynamic.v6.chello.sk) (Changing host)
15:12:38 hexo joins (~hexo@user/hexo)
15:13:14 × arjun quits (~user@user/arjun) (Remote host closed the connection)
15:15:14 × haskman quits (~haskman@223.190.0.187) (Quit: Going to sleep. ZZZzzz…)
15:16:30 × __monty__ quits (~toonn@user/toonn) (Ping timeout: 272 seconds)
15:17:24 Topsi joins (~Tobias@dyndsl-095-033-027-146.ewe-ip-backbone.de)
15:20:39 haskman joins (~haskman@223.190.0.187)
15:21:23 Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:524:105d:d218:2c77)
15:22:06 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
15:24:23 × ccntrq quits (~ccntrq@business-90-187-183-141.pool2.vodafone-ip.de) (Remote host closed the connection)
15:24:54 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
15:26:18 × k3nny quits (~k3nny@user/k3nny) (Quit: Leaving)
15:27:56 __monty__ joins (~toonn@user/toonn)
15:28:39 × lortabac quits (~lortabac@2a01:e0a:541:b8f0:ca30:4180:833e:bce9) (Quit: WeeChat 2.8)
15:30:26 × xff0x quits (~xff0x@217.110.198.158) (Ping timeout: 272 seconds)
15:30:54 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
15:32:19 benin5 joins (benin@gateway/vpn/protonvpn/benin)
15:32:36 favonia joins (~favonia@user/favonia)
15:34:20 bfrk joins (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de)
15:34:30 × benin quits (~benin@183.82.205.186) (Ping timeout: 264 seconds)
15:34:31 benin5 is now known as benin
15:34:37 lbseale joins (~lbseale@ip72-194-54-201.sb.sd.cox.net)
15:36:02 o1lo01ol_ joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
15:36:25 chddr joins (~Thunderbi@31.148.23.125)
15:38:14 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Remote host closed the connection)
15:39:16 × sondre quits (~sondrelun@cm-84.212.100.140.getinternet.no) (Ping timeout: 244 seconds)
15:39:18 × nschoe quits (~quassel@2a01:e0a:8e:a190:184d:3a8c:7727:6c6d) (Ping timeout: 264 seconds)
15:39:53 × o1lo01ol1o quits (~o1lo01ol1@mobile-107-107-58-49.mycingular.net) (Ping timeout: 264 seconds)
15:40:37 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
15:43:32 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
15:43:32 × o1lo01ol_ quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Read error: Connection reset by peer)
15:43:55 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
15:45:15 benin1 joins (~benin@183.82.205.186)
15:46:49 _xft0 joins (~root@185.234.208.208.r.toneticgroup.pl)
15:46:51 × rk04 quits (~rk04@user/rajk) (Quit: Client closed)
15:47:00 × benin quits (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 245 seconds)
15:47:01 benin1 is now known as benin
15:47:37 × Scotty_Trees quits (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net) (Quit: Leaving)
15:48:10 × chomwitt quits (~Pitsikoko@2a02:587:dc02:b00:b16c:5166:feb8:97d5) (Ping timeout: 272 seconds)
15:51:08 nectar joins (~nectar@117.222.64.74)
15:53:30 × chele quits (~chele@user/chele) (Remote host closed the connection)
15:56:24 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
15:58:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
15:59:50 Guest9 joins (~Guest9@43.241.144.19)
16:00:10 × FreeVariable quits (~Thunderbi@wifi-unifr-140-170.unifr.ch) (Quit: FreeVariable)
16:03:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
16:05:05 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
16:08:12 xff0x joins (~xff0x@2001:1a81:5307:4e00:7012:84d9:dce9:1f3f)
16:14:46 × bfrk quits (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de) (Ping timeout: 272 seconds)
16:17:50 × bigLama quits (~user@static-176-165-167-17.ftth.abo.bbox.fr) (Remote host closed the connection)
16:19:30 <boxscape> :t when
16:19:31 <lambdabot> Applicative f => Bool -> f () -> f ()
16:19:32 <boxscape> hm
16:19:37 <boxscape> I'd prefer Bool -> f a -> f ()
16:26:14 Topsi1 joins (~Tobias@2001:638:708:1a::d5)
16:27:11 Topsi2 joins (~Tobias@dyndsl-095-033-027-146.ewe-ip-backbone.de)
16:27:12 × Topsi1 quits (~Tobias@2001:638:708:1a::d5) (Read error: Connection reset by peer)
16:27:22 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
16:30:17 × Topsi quits (~Tobias@dyndsl-095-033-027-146.ewe-ip-backbone.de) (Ping timeout: 264 seconds)
16:31:31 ixlun joins (~matthew@109.249.184.235)
16:33:42 heath joins (~heath@user/heath)
16:33:53 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 264 seconds)
16:37:23 × pounce quits (~pounce@facebook/engineering/pounce) (Ping timeout: 252 seconds)
16:38:18 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
16:40:08 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
16:40:32 favonia joins (~favonia@user/favonia)
16:43:32 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Remote host closed the connection)
16:46:01 dunkeln joins (~dunkeln@94.129.65.28)
16:46:49 rk04 joins (~rk04@user/rajk)
16:49:16 bartavelle joins (~bartavell@2001:41d0:1:744c::1)
16:49:39 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
16:50:04 favonia joins (~favonia@user/favonia)
16:50:28 tzh joins (~tzh@c-24-21-73-154.hsd1.wa.comcast.net)
16:50:41 × rk04 quits (~rk04@user/rajk) (Client Quit)
16:51:55 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
16:52:48 econo joins (uid147250@user/econo)
16:54:12 fizbin joins (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net)
16:54:42 × amk quits (~amk@176.61.106.150) (Ping timeout: 244 seconds)
16:56:20 amk joins (~amk@176.61.106.150)
16:56:37 × jrm quits (~jrm@156.34.187.65) (Ping timeout: 272 seconds)
16:57:18 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 264 seconds)
17:00:15 chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr)
17:00:20 × nectar quits (~nectar@117.222.64.74) (Quit: leaving)
17:00:58 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:02:20 × shailangsa quits (~shailangs@host86-186-136-74.range86-186.btcentralplus.com) ()
17:03:15 lemmih_ joins (~lemmih@2406:3003:2072:44:f18c:82dd:8503:4c59)
17:03:17 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 264 seconds)
17:03:30 <infinisil> :t when . void
17:03:31 <lambdabot> error:
17:03:31 <lambdabot> • Couldn't match type ‘f ()’ with ‘Bool’
17:03:31 <lambdabot> Expected type: f a -> Bool
17:03:51 <infinisil> Well, something like that
17:05:05 Erutuon joins (~Erutuon@user/erutuon)
17:05:11 <boxscape> yeah
17:05:33 × lemmih quits (~lemmih@2406:3003:2072:44:a0fb:4a2e:4541:1c1d) (Ping timeout: 244 seconds)
17:07:32 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
17:07:59 × Iryon quits (~Iryon@2a02:a31a:a045:3500:c000:ef2e:b473:4083) (Remote host closed the connection)
17:10:23 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
17:10:30 × chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (Ping timeout: 264 seconds)
17:10:46 favonia joins (~favonia@user/favonia)
17:10:58 dss1 joins (~dss@shepsoft.net)
17:11:40 dss1 parts (~dss@shepsoft.net) ()
17:12:57 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:14:14 × chddr quits (~Thunderbi@31.148.23.125) (Ping timeout: 252 seconds)
17:14:32 dunkeln joins (~dunkeln@94.129.65.28)
17:14:44 × Guest9 quits (~Guest9@43.241.144.19) (Quit: Connection closed)
17:16:28 × sqrt2 quits (~ben@tunnel330957-pt.tunnel.tserv6.fra1.ipv6.he.net) (Quit: ZNC - http://znc.in)
17:16:47 Guest9 joins (~Guest9@43.241.144.19)
17:18:06 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
17:18:51 <dminuoso> boxscape: `() <$` tends to read nicely
17:19:07 <dminuoso> Perhaps it's just because I used a lot
17:19:27 <boxscape> hm yeah that doesn't look too bad
17:19:46 <dminuoso> Also it doesn't need an extra import. :)
17:20:11 <boxscape> true
17:20:34 <dminuoso> Mmm, that's actually a silly argument, since you need Control.Monad anyway for when
17:20:43 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:20:55 × ixlun quits (~matthew@109.249.184.235) (Read error: Connection reset by peer)
17:21:05 <boxscape> it makes the explicit import list a bit shorter if you use it :)
17:21:18 <boxscape> s/if you use it/if you have one
17:21:20 <dminuoso> Actually Ive been switching to explicit import lists
17:21:27 <dminuoso> Tend to prefer it much
17:21:45 <dminuoso> But it needs something like hls to make it enjoyable
17:21:54 ski grumbles at `void'
17:22:12 <dminuoso> ski: the choice of the identifier?
17:22:16 <boxscape> yeah on the other hand when you have tools to jump to any definition in any package I find less of a need for explicit import lists
17:22:36 <dminuoso> boxscape: The readers are not always under your control though.
17:22:41 <boxscape> yes, that is true
17:22:44 sqrt2 joins (~ben@80-108-18-7.cable.dynamic.surfer.at)
17:23:00 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:23:04 <dminuoso> Also, its sometimes usefult to ascertain external dependencies by just going through the import part.
17:24:43 <boxscape> dminuoso do you use them when you import something qualified?
17:25:35 <dminuoso> boxscape: No, but out of habit I generally only import text/bytestring/containers qualified.
17:25:43 <boxscape> I see
17:27:39 derelict joins (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com)
17:29:06 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 264 seconds)
17:29:12 <dminuoso> (heh well, I guess *Yes* rather than *No*)
17:29:46 <dminuoso> And `ip`, but that's very specific to IP annoyances.
17:29:59 <ski> dminuoso : yes
17:30:15 <dminuoso> It's quite interesting how it's nearly impossible to cleanly abstract over both ipv4 and ipv6. Every attempt in each library/tooling here has been foiled.
17:30:25 <monochrom> text, bytestring, and containers have deliberate name clashes and tell you to resolve by qualified imports.
17:30:46 <monochrom> They do this as their answer to SML real adult module system. >:)
17:30:46 <dminuoso> Instead, we have fooV4, fooV6, barV4, barV6 - with lots of duplication (with duplication rates that feel like 95%)
17:30:53 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.1)
17:30:58 <ski> imho, the name `void', with this meaning, should not be exported from any other modules than FFI ones
17:32:00 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Ping timeout: 245 seconds)
17:32:24 ordinate joins (~ordinate@c-68-38-144-3.hsd1.in.comcast.net)
17:32:57 <ordinate> good afternoon
17:33:02 <dminuoso> Hi ordinate o/
17:33:03 <boxscape> hi
17:33:19 dminuoso readies his answer cards for ordinate
17:33:31 <ordinate> nice to see you all again
17:34:30 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
17:35:14 mustafa joins (sid502723@rockylinux/releng/mstg)
17:37:56 shailangsa joins (~shailangs@host86-186-136-74.range86-186.btcentralplus.com)
17:38:03 dpl_ joins (~dpl@77-121-78-163.chn.volia.net)
17:38:23 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
17:38:50 rk04 joins (~rk04@user/rajk)
17:38:53 favonia joins (~favonia@user/favonia)
17:39:29 maerwald blinks
17:39:39 <maerwald> no... can't see you -,-
17:39:49 × jacks2 quits (~bc817c21@217.29.117.252) (Quit: http://www.okay.uz/ (Session timeout))
17:42:25 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
17:43:54 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
17:44:57 × leeb quits (~leeb@KD111239154171.au-net.ne.jp) (Quit: WeeChat 3.1)
17:45:02 oxide joins (~lambda@user/oxide)
17:45:16 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
17:45:36 × rk04 quits (~rk04@user/rajk) (Quit: Client closed)
17:45:48 <dminuoso> Is it safe to Data.ByteString.Char8.hPutStrLn (Aeson.encode x) ?
17:46:19 <dminuoso> My instinct says yes, because Aeson will give me a UTF8 encoded string anyway, which should not screw up my terminal
17:46:36 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
17:47:29 <monochrom> I say yes. Unless UTF8 screws up your terminal.
17:47:46 <Ariakenom> does anyone have a fancy pretty printed ghci setup?
17:47:56 <dminuoso> Well couldn't a user embed sneaky escape sequences in a JSON string?
17:48:30 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Ping timeout: 272 seconds)
17:48:39 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
17:49:37 <monochrom> I want to conjecture that unprintable characters are further backslash-escaped, but I haven't tried.
17:50:29 dminuoso wishes for a reality in which a terminal control protocol and text encoding were separate things
17:51:05 <dminuoso> Conflating these two seems like one of the larger mistakes in programming history
17:52:29 jackhill is now known as KM4MBG
17:53:24 <ordinate> i think ive accidentally started a much bigger project than i thought
17:53:34 × derelict quits (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 272 seconds)
17:53:40 favonia joins (~favonia@user/favonia)
17:54:52 <lyxia> I think encode only produces ASCII, unless someone hijacks a ToJSON instance.
17:55:44 chomwitt joins (~Pitsikoko@athedsl-20549.home.otenet.gr)
17:59:20 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:00:45 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Quit: imdoor)
18:00:54 <Ariakenom> I just got this code to work some an ancient tab I had https://gist.github.com/pera/8447522
18:01:54 <Ariakenom> ..work from some..
18:04:58 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Read error: Connection reset by peer)
18:09:19 × zebrag quits (~chris@user/zebrag) (Remote host closed the connection)
18:10:29 doublex__ joins (~doublex@2601:542:c480:6ee0:184b:7083:f026:c689)
18:12:31 vicfred joins (~vicfred@user/vicfred)
18:13:11 beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net)
18:14:05 pavonia joins (~user@user/siracusa)
18:14:15 × doublex_ quits (~doublex@2601:542:c480:6ee0:184b:7083:f026:c689) (Ping timeout: 268 seconds)
18:14:28 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds)
18:16:23 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
18:23:01 favonia joins (~favonia@user/favonia)
18:24:08 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
18:24:09 KM4MBG is now known as jackhill
18:26:44 tremon joins (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl)
18:29:30 mrufrufin joins (~dxk@108.235.170.90)
18:29:42 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 264 seconds)
18:31:35 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
18:32:00 × amk quits (~amk@176.61.106.150) (Ping timeout: 245 seconds)
18:32:21 amk joins (~amk@176.61.106.150)
18:32:32 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:524:105d:d218:2c77) (Read error: Connection reset by peer)
18:32:50 × ukari quits (~ukari@user/ukari) (Remote host closed the connection)
18:33:18 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
18:33:37 ukari joins (~ukari@user/ukari)
18:33:52 sondre joins (~sondrelun@cm-84.212.100.140.getinternet.no)
18:42:00 lavaman joins (~lavaman@98.38.249.169)
18:42:45 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:45:13 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
18:46:16 × wenzel quits (~wenzel@user/wenzel) (Read error: Connection reset by peer)
18:46:36 wenzel joins (~wenzel@user/wenzel)
18:46:46 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 272 seconds)
18:48:33 mrufrufin parts (~dxk@108.235.170.90) ()
18:50:06 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Ping timeout: 264 seconds)
18:52:06 nuttingd joins (~nuttingd@75.164.99.232)
18:52:44 × nuttingd quits (~nuttingd@75.164.99.232) (Client Quit)
18:53:11 Deide joins (~Deide@wire.desu.ga)
18:53:11 × Deide quits (~Deide@wire.desu.ga) (Changing host)
18:53:12 Deide joins (~Deide@user/deide)
18:53:38 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Read error: Connection reset by peer)
18:54:17 raehik1 joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:54:59 × kuribas quits (~user@ptr-25vy0i6y10noc9bho8l.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
18:55:58 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
18:56:57 hiruji` joins (~hiruji@2606:6080:1001:18:8d41:9604:d435:36b6)
18:58:01 <gentauro> hey, is it possible to have "more friendly" Aeson parsing messages? For example if the recieved JSON payload is only missing the `type` property? https://pastebin.ubuntu.com/p/PhZ2wz7fRZ/
18:58:10 × hiruji quits (~hiruji@user/hiruji) (Ping timeout: 272 seconds)
18:58:40 gentauro like in an `automated` way so I don't have to write all the boilerplate myself :)
18:58:49 × wenzel quits (~wenzel@user/wenzel) (Quit: Leaving)
19:00:42 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
19:00:51 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:01:07 favonia joins (~favonia@user/favonia)
19:01:52 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:03:00 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:04:17 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:04:48 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:05:13 <lyxia> doesn't it already tell you that the `type` property is missing?
19:06:14 glguy_ joins (x@libera/staff/glguy)
19:06:32 imdoor joins (~imdoor@balticom-142-78-50.balticom.lv)
19:07:33 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:08:48 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:10:15 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:10:29 × Guest3322 quits (~pera@0541db7e.skybroadband.com) (Ping timeout: 264 seconds)
19:10:30 ddellacosta joins (~ddellacos@86.106.121.72)
19:10:35 × glguy_ quits (x@libera/staff/glguy) (Remote host closed the connection)
19:10:50 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
19:11:15 favonia joins (~favonia@user/favonia)
19:11:27 Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:8504:3672:14f4:b190)
19:11:53 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Quit: imdoor)
19:12:06 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:12:54 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:14:17 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:15:56 <dminuoso> gentauro: Indeed, (.:) uses ttps://hackage.haskell.org/package/aeson-1.5.6.0/docs/src/Data.Aeson.Types.FromJSON.html#explicitParseField
19:16:09 <dminuoso> gentauro: You might be intereted in the generic mechanism with options.
19:16:27 <dminuoso> coupled with aeson-deriving its really neat
19:16:42 <dminuoso> err deriving-aeson
19:16:51 <dminuoso> https://hackage.haskell.org/package/deriving-aeson
19:16:52 jjhoo_ is now known as jjhoo
19:17:14 <dminuoso> advantage of aeson-deriving is that you get guaranteed coherence between toJSON and toEncoding. :)
19:17:25 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:18:04 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:22:21 tose joins (~tose@ip-85-160-9-136.eurotel.cz)
19:22:51 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 245 seconds)
19:23:05 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:23:51 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:26:08 <gentauro> dminuoso: hmmm, so `(.:)` actually gives me what I'm requesting right?
19:26:42 <gentauro> `Nothing -> fail $ "key " ++ show key ++ " not found"`
19:26:51 × Guest9 quits (~Guest9@43.241.144.19) (Quit: Connection closed)
19:27:01 <gentauro> that seems usefull
19:27:07 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
19:27:14 <gentauro> and the other branch is only used then I'm not getting a JSON.Object type
19:27:17 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:27:18 <gentauro> I think I got it
19:27:40 <lyxia> There's also withObject
19:30:15 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Read error: Connection reset by peer)
19:30:32 × tose quits (~tose@ip-85-160-9-136.eurotel.cz) (Remote host closed the connection)
19:32:06 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:32:50 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
19:33:14 favonia joins (~favonia@user/favonia)
19:33:49 × ordinate quits (~ordinate@c-68-38-144-3.hsd1.in.comcast.net) (Quit: Leaving)
19:34:51 bfrk joins (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de)
19:35:25 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:35:51 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
19:35:54 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Ping timeout: 244 seconds)
19:36:38 × ukari quits (~ukari@user/ukari) (Remote host closed the connection)
19:36:46 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:37:08 ukari joins (~ukari@user/ukari)
19:37:32 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:39:20 zmt00 joins (~zmt00@user/zmt00)
19:39:48 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Read error: Connection reset by peer)
19:40:13 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:40:56 amahl_ joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:41:14 Scotty_Trees joins (~Scotty_Tr@162-234-179-169.lightspeed.brhmal.sbcglobal.net)
19:42:03 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Read error: Connection reset by peer)
19:42:05 learner-monad joins (~eric@cpe-174-105-47-100.columbus.res.rr.com)
19:42:19 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
19:43:10 × learner-monad quits (~eric@cpe-174-105-47-100.columbus.res.rr.com) (Client Quit)
19:44:18 jrm joins (~jrm@156.34.187.65)
19:44:30 Baloo_ joins (~Baloo_@141.98.255.153)
19:44:53 ubert1 joins (~Thunderbi@p200300ecdf259dece6b318fffe838f33.dip0.t-ipconnect.de)
19:45:50 learner-monad joins (~eric@cpe-174-105-47-100.columbus.res.rr.com)
19:46:56 × ubert quits (~Thunderbi@p200300ecdf259da5e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 272 seconds)
19:46:56 ubert1 is now known as ubert
19:47:47 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Remote host closed the connection)
19:48:21 × amahl_ quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Read error: Connection reset by peer)
19:49:46 Baloo__ joins (~Baloo_@h-98-128-172-214.A785.priv.bahnhof.se)
19:50:03 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
19:50:37 ub1 joins (~Thunderbi@p200300ecdf259dec656b91086baf35ac.dip0.t-ipconnect.de)
19:51:28 × Baloo__ quits (~Baloo_@h-98-128-172-214.A785.priv.bahnhof.se) (Client Quit)
19:51:41 × ub quits (~Thunderbi@p200300ecdf259da5656b91086baf35ac.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
19:52:07 Baloo__ joins (~Baloo_@h-98-128-172-214.A785.priv.bahnhof.se)
19:52:40 reumeth joins (~reumeth@user/reumeth)
19:52:54 ub1 is now known as ub
19:54:09 × Baloo_ quits (~Baloo_@141.98.255.153) (Ping timeout: 268 seconds)
19:54:46 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Ping timeout: 268 seconds)
19:55:40 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Quit: leaving)
19:55:56 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
19:55:56 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
19:56:25 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:56:52 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Remote host closed the connection)
19:57:44 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
19:58:57 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.1)
19:59:30 derelict joins (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com)
20:00:08 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
20:01:25 lavaman joins (~lavaman@98.38.249.169)
20:04:52 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
20:04:56 × juhp quits (~juhp@128.106.188.199) (Ping timeout: 245 seconds)
20:06:21 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
20:06:43 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:07:18 juhp joins (~juhp@128.106.188.199)
20:08:42 × otto_s quits (~user@p5b044eb9.dip0.t-ipconnect.de) (Ping timeout: 264 seconds)
20:09:02 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:09:41 × favonia quits (~favonia@user/favonia) (Ping timeout: 252 seconds)
20:10:04 favonia joins (~favonia@user/favonia)
20:10:12 otto_s joins (~user@p4ff27438.dip0.t-ipconnect.de)
20:11:06 benin0 joins (benin@gateway/vpn/protonvpn/benin)
20:12:54 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Ping timeout: 272 seconds)
20:13:12 × ddellacosta quits (~ddellacos@86.106.121.72) (Remote host closed the connection)
20:13:30 × benin quits (~benin@183.82.205.186) (Ping timeout: 264 seconds)
20:13:31 benin0 is now known as benin
20:13:34 ddellacosta joins (~ddellacos@86.106.121.72)
20:14:38 redienhcs joins (~redienhcs@200.188.238.241)
20:15:15 ixlun joins (~matthew@109.249.184.235)
20:15:43 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
20:16:37 Wally parts (~Wally@dragonbox/forum-staff/wally) ()
20:17:17 × redienhcs quits (~redienhcs@200.188.238.241) (Client Quit)
20:20:08 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Ping timeout: 252 seconds)
20:20:24 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
20:21:18 × mikoto-chan quits (~mikoto-ch@ip-213-49-189-31.dsl.scarlet.be) (Ping timeout: 264 seconds)
20:22:51 Bartosz joins (~textual@24.35.90.211)
20:27:00 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Ping timeout: 245 seconds)
20:27:12 × boxscape quits (~boxscape@user/boxscape) (Quit: Connection closed)
20:27:53 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:29:52 boxscape joins (~boxscape@user/boxscape)
20:30:16 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
20:32:06 × danso quits (~danso@23-233-111-52.cpe.pppoe.ca) (Quit: WeeChat 3.1)
20:33:59 Wally joins (~Wally@dragonbox/forum-staff/wally)
20:37:52 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
20:38:09 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
20:38:41 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
20:39:21 imdoor joins (~imdoor@balticom-142-78-50.balticom.lv)
20:41:24 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
20:42:08 × ukari quits (~ukari@user/ukari) (Remote host closed the connection)
20:43:11 ukari joins (~ukari@user/ukari)
20:45:50 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 272 seconds)
20:46:45 × Bartosz quits (~textual@24.35.90.211) (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:50:02 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
20:51:05 djb2021 joins (~djb2021@HSI-KBW-091-089-090-070.hsi2.kabelbw.de)
20:52:23 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
20:54:05 × benin quits (benin@gateway/vpn/protonvpn/benin) (Ping timeout: 245 seconds)
20:59:09 × hgolden quits (~hgolden2@cpe-172-114-84-61.socal.res.rr.com) (Remote host closed the connection)
21:01:23 <lbseale> I'm looking for the right data structure to hold an associated list of amounts and dates, I'll want to be able to use a function like "give me all the amounts between these two dates"
21:01:43 <lbseale> is a plain Map the right one?
21:02:22 <boxscape> lbseale this seems like the right data structure https://hackage.haskell.org/package/IntervalMap-0.6.1.2/docs/Data-IntervalMap-Lazy.html
21:02:33 <boxscape> or wait
21:02:52 <boxscape> let me make sure I'm actually understanding what interval map does
21:03:54 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 264 seconds)
21:04:30 <lbseale> nice, the within function is exactly what I'm thinking
21:04:37 <lbseale> thank you boxscape !
21:04:50 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
21:05:15 <boxscape> lbseale yeah, I guess the one downside is each value has to be associated with an interval of dates, so if you actually have points in time, it'd have to be a 0-width interval for each value in the map
21:05:33 <boxscape> i.e., amount x goes from date 2021-05-03 to 2021-05-03, or whatever
21:06:24 <lbseale> right, is it ok to have a 0-width interval?
21:06:42 <boxscape> I don't see why not but I haven't tested it
21:07:03 Bartosz joins (~textual@24.35.90.211)
21:07:06 <lbseale> ok, I'll look into it
21:07:06 <sm[m]> nice lib, boxscape
21:08:06 <lbseale> what does the the '|' in this type signature mean class Ord e => Interval i e | i -> e where
21:08:18 <hpc> functional dependency
21:08:25 <hpc> "i implies e"
21:08:42 <boxscape> (more precisely, everything *after* the | is a functional dependency)
21:09:03 <boxscape> it means that you can't have two instances with the same i but different e's
21:09:08 <hpc> you can have instance Interval A B or instance Interval A C, but not both
21:09:16 × sondre quits (~sondrelun@cm-84.212.100.140.getinternet.no) (Ping timeout: 272 seconds)
21:09:36 <hpc> but not the other way, you can have both instance Interval B A and instance Interval C A
21:10:18 <hpc> and this extends to type inference, given (Interval A x) => ..., ghc infers that x = B
21:10:21 <lbseale> ok that makes sense
21:10:50 zebrag joins (~chris@user/zebrag)
21:11:38 <boxscape> it does kind of seem like the regular Map should have a within-like function, doesn't it?
21:11:47 × Bartosz quits (~textual@24.35.90.211) (Client Quit)
21:11:49 <boxscape> given the Ord constraint it should be possible
21:13:07 × alx741 quits (~alx741@181.196.69.176) (Ping timeout: 272 seconds)
21:14:05 × beka quits (~beka@104.193.170-254.PUBLIC.monkeybrains.net) (Ping timeout: 245 seconds)
21:15:10 <lbseale> maybe it would be easier for me to implement within for ordinary Map
21:15:23 × mc47 quits (~yecinem@89.246.239.190) (Remote host closed the connection)
21:16:08 eight joins (~eight@user/eight)
21:16:58 <boxscape> it's possible, though I don't know if it can be done efficiently without accessing the Map internals (but the Data.Map.Interal module might be good enough for that)
21:17:30 × ukari quits (~ukari@user/ukari) (Ping timeout: 272 seconds)
21:17:33 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 272 seconds)
21:18:26 × chomwitt quits (~Pitsikoko@athedsl-20549.home.otenet.gr) (Ping timeout: 252 seconds)
21:19:30 × TheCoffeMaker quits (~TheCoffeM@user/thecoffemaker) (Ping timeout: 264 seconds)
21:19:32 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
21:19:38 <djb2021> hi, i've put together a minimal non working swagger2 example of which i however think it should work: https://paste.tomsmeding.com/2VlzfDTS. The JSON definition should be ok in my opinion. However, i get an error message when eitherDecode'ing the file, that basically says, that the type "file" is not supported. I am quite sure that OpenAPI 2.0
21:19:39 <djb2021> accepts file type there. I have tried to understand the code of swagger2 library here: https://hackage.haskell.org/package/swagger2-2.6/docs/Data-Swagger.html#t:Schema I must say that i am not very familiar with haskell kinds. I didn't understand that very well. Can someone, please, explain that to me? Anyway, my understanding of the definition of
21:19:39 <djb2021> the swagger2 Schema type definition is that the type of the HasParamSchema doesn't include SwaggerFile as its type is ParamSchema 'SwaggerKindSchema. Is that correct?
21:20:59 × ixlun quits (~matthew@109.249.184.235) (Read error: Connection reset by peer)
21:21:15 × _xft0 quits (~root@185.234.208.208.r.toneticgroup.pl) (Quit: leaving)
21:21:36 × haskman quits (~haskman@223.190.0.187) (Quit: Going to sleep. ZZZzzz…)
21:25:00 <dminuoso> djb2021: https://hackage.haskell.org/package/swagger2-2.6/docs/Data-Swagger.html#t:SwaggerType
21:25:21 <dminuoso> By the way, swagger2 is very dead, you should switch to openapi3 if you can
21:25:38 wallymathieu joins (~wallymath@81-234-151-21-no94.tbcn.telia.com)
21:25:42 alx741 joins (~alx741@186.178.108.19)
21:25:51 TheCoffeMaker joins (~TheCoffeM@user/thecoffemaker)
21:26:50 × geekosaur quits (~geekosaur@069-135-003-034.biz.spectrum.com) (Remote host closed the connection)
21:26:54 × wallymathieu quits (~wallymath@81-234-151-21-no94.tbcn.telia.com) (Client Quit)
21:27:43 × imdoor quits (~imdoor@balticom-142-78-50.balticom.lv) (Quit: imdoor)
21:28:40 <dminuoso> djb2021: Can you share your haskell code that defines the swagger spec?
21:28:41 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.1)
21:29:11 geekosaur joins (~geekosaur@069-135-003-034.biz.spectrum.com)
21:29:49 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:29:50 davidnutting joins (~nuttingd@75.164.99.232)
21:30:30 <djb2021> dminuoso: yes, updating is already planned but not so easy. The SwaggerType spec you sent contains the definition of SwaggerFile as SwaggerType SwaggerKindParamOtherSchema. That limits SwaggerFile only to those cases where ParamSchema is instantiated with kind SwaggerKindParamOtherSchema - right? But that is not the case for ParamSchema in
21:30:31 <djb2021> response, right?
21:31:02 <dminuoso> Uh..
21:31:13 <boxscape> lbseale fwiw I opened an issue in the containers repo https://github.com/haskell/containers/issues/778
21:31:45 <lbseale> boxscape: many thanks!
21:31:54 <dminuoso> djb2021: That sounds rather confusing, to be honest.
21:31:55 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:31:55 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
21:32:46 × exarkun quits (~exarkun@user/exarkun) (Remote host closed the connection)
21:33:05 × davidnutting quits (~nuttingd@75.164.99.232) (Client Quit)
21:33:19 exarkun joins (~exarkun@user/exarkun)
21:33:22 davidnutting joins (~nuttingd@75.164.99.232)
21:33:56 <dminuoso> Ah now I understand.
21:34:05 <dminuoso> Yes.
21:34:23 <dminuoso> You only get file for SwaggerKindParamOtherSchema
21:35:04 <dminuoso> This fact is supported in various places in swagger2
21:35:07 × ddellacosta quits (~ddellacos@86.106.121.72) (Remote host closed the connection)
21:35:22 <dminuoso> More concretely, file is only valid for param
21:35:36 ddellacosta joins (~ddellacos@86.106.121.72)
21:36:50 <dminuoso> So yeah, because Schema uses `ParamSchema SwaggerKindSchema`, it cant contain a file it looks like
21:37:08 <djb2021> Ok, thanks - in other words it is a bug, right?
21:37:16 <dminuoso> Not sure, it looks intentional
21:37:24 <lbseale> boxscape: Here's an easy solution, use filterWithKey with a function that checks if the key is within a set date range
21:37:29 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
21:37:42 <boxscape> lbseale yep, that works, but seems slower than necessary
21:37:59 <boxscape> since you have to go through all entries
21:38:50 <boxscape> lbseale oh, but wait
21:39:01 <boxscape> lbseale you can use split
21:39:14 <dminuoso> djb2021: looks forbidden in openapi 2.0
21:39:30 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Ping timeout: 245 seconds)
21:39:58 <boxscape> lbseale if you split at the lower bound, you get everything smaller and larger as two separate maps, and then use split on the latter to get everything between the two bounds and everything larger than the upper bound
21:40:13 <dminuoso> Mmm
21:40:16 <dminuoso> "A definition of the response structure. It can be a primitive, an array or an object. If this field does not exist, it means no content is returned as part of the response. As an extension to the Schema Object, its root type value may also be "file". This SHOULD be accompanied by a relevant produces mime-type."
21:40:19 <boxscape> lbseale or splitLookup if you need values exactly matching the bound as well
21:40:30 × ddellacosta quits (~ddellacos@86.106.121.72) (Ping timeout: 264 seconds)
21:40:53 <lbseale> boxscape: yes! this is exactly what we want
21:41:05 <dminuoso> djb2021: Ah https://github.com/GetShopTV/swagger2/issues/76
21:41:17 × tremon quits (~tremon@217-63-61-89.cable.dynamic.v4.ziggo.nl) (Quit: getting boxed in)
21:41:30 <lbseale> get a sub-map with just keys within the given range
21:42:17 <djb2021> But, please, look here: https://swagger.io/specification/v2/:' An additional primitive data type "file" is used by the Parameter Object and the Response Object to set the parameter type or the response as being a file.' And then, please, read here: https://hackage.haskell.org/package/swagger2-2.6/docs/src/Data.Swagger.Internal.html#Response, There
21:42:18 <djb2021> the "file" is clearly allowed.
21:42:42 <djb2021> aah you got it already
21:44:10 <djb2021> dminuoso: thank you so much, the bug report makes it clear!
21:44:12 <dminuoso> Yeah sorry it took me a moment to cut through the thick typitis.
21:44:23 <dminuoso> djb2021: Btw, you mentioned "kinds"
21:44:36 <djb2021> oh yes, can you explain that to me?
21:44:45 <dminuoso> So none of this is kind stuff, they are actually types
21:44:55 <dminuoso> the choice of the word "kind" is just in the english sense
21:45:35 <dminuoso> The key facility here is an extension called `DataKinds`, which you can use to lift data constructors to types
21:45:46 <dminuoso> % :set -XDataKinds
21:45:46 <yahb> dminuoso:
21:45:52 <dminuoso> % data Color = Red | Green
21:45:52 <yahb> dminuoso:
21:45:56 <dminuoso> % :k Red
21:45:56 <yahb> dminuoso: Color
21:46:14 <dminuoso> See, how `Red` also exists on the type level? That is, there exists a type called `Red`.
21:46:37 × fendor quits (~fendor@178.115.57.160.wireless.dyn.drei.com) (Remote host closed the connection)
21:47:19 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Ping timeout: 252 seconds)
21:47:37 <hpc> % data Light a where Go :: Light Green; Stop :: Light Red
21:47:37 <yahb> hpc:
21:47:39 <hpc> :t Go
21:47:40 <lambdabot> error:
21:47:40 <lambdabot> • Data constructor not in scope: Go
21:47:40 <lambdabot> • Perhaps you meant one of these:
21:47:51 <dminuoso> % :t Go
21:47:51 <yahb> dminuoso: Light 'Green
21:48:05 <hpc> whoops, lambdabot habit :D
21:48:09 <djb2021> ah - i think i start understanding
21:48:28 <dminuoso> djb2021: (And if you are really curious, kinds are to types, as types are to values)
21:48:30 <djb2021> so Red and Green (which were constructors) are now types
21:48:33 <dminuoso> Yup!
21:48:42 <hpc> % :k Light -- and just for completeness
21:48:42 <yahb> hpc: Color -> *
21:48:45 <dminuoso> You can also refer to them as 'Red and 'Green
21:48:55 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:48:58 <dminuoso> The tick serves to diambiguate, but whenever its unambiguous, the tick is optional
21:50:18 × AgentM quits (~agentm@pool-162-83-130-212.nycmny.fios.verizon.net) (Quit: Leaving.)
21:50:24 habib joins (~habib@89.38.69.198)
21:50:35 × habib quits (~habib@89.38.69.198) (Quit: habib)
21:50:47 o1lo01ol1o joins (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net)
21:50:55 × Baloo__ quits (~Baloo_@h-98-128-172-214.A785.priv.bahnhof.se) (Read error: Connection reset by peer)
21:50:58 <dminuoso> djb2021: So kinds is an old term for "the types of types", nowadays the type of a type is some other type again.
21:51:36 <djb2021> ok, i think i got it, the only thing that confuses me still is the signature as above: Color -> *
21:51:41 <dminuoso> Yeah, so
21:51:41 <boxscape> (ghc error messages still use "kind" though)
21:51:48 <dminuoso> djb2021: * is a very special type
21:52:06 <dminuoso> let's replace it with Type (which is a different name for it)
21:52:07 <djb2021> how should i read that signature
21:52:42 <dminuoso> The type of Light (which itself is a type!) is `Color -> Type`
21:52:46 <hpc> djb2021: Light is a type-level function that takes a Color and produces a type
21:52:51 <hpc> djb2021: it's like Maybe :: * -> *
21:52:59 dminuoso votes we should replace * with Type
21:53:01 <dminuoso> for sanity
21:53:02 <hpc> or Type -> Type
21:53:23 <boxscape> % :set -XNoStarIsKind
21:53:23 <yahb> boxscape: Some flags have not been recognized: -XNoStarIsKind
21:53:26 × river quits (~river@tilde.team/user/river) (Read error: Connection reset by peer)
21:53:31 <boxscape> % :set -XNoStarIsType
21:53:31 <yahb> boxscape:
21:53:35 <boxscape> % :k Light
21:53:35 <yahb> boxscape: Color -> Type
21:53:38 <dminuoso> djb2021: To introduce a relevant term, types can be inhabitable or non-inhabitable
21:53:54 <dminuoso> djb2021: a type is said to be inhabitable, if values of that type can exist
21:54:30 <dminuoso> 'Red is uninhabitable (that means there exists no values of type Red, not even undefined!)
21:54:44 <dminuoso> Similarly Type is uninhabitable
21:54:51 <boxscape> what's the difference between uninhabitable and uninhabited?
21:54:55 × o1lo01ol1o quits (~o1lo01ol1@c-73-10-81-85.hsd1.nj.comcast.net) (Ping timeout: 245 seconds)
21:55:10 <djb2021> ah ok, and Light could be called a (parametric) type constructor?
21:55:25 <dminuoso> boxscape: I guess there is none, mmm
21:55:35 <hpc> djb2021: yep, it's like how Just is a data constructor
21:56:01 <dminuoso> djb2021: as a point of interest, one might wonder what makes a "constructor a constructor" - my mind model is, its something you can pattern match on.
21:56:01 <djb2021> ah ok
21:56:11 <hpc> djb2021: there's another good example if you've gotten into type classes
21:56:14 <hpc> % :k Functor
21:56:14 <yahb> hpc: (Type -> Type) -> Constraint
21:56:24 <dminuoso> djb2021: a data constructor you can pattern match with case-of, a type constructor you can pattern match with a type family (or a typeclass instance)
21:56:25 <nitrix> Yeah, if you can construct it, you can deconstruct it.
21:56:34 <hpc> Functor takes a parameter that's (Type -> Type) - Maybe, for example
21:56:45 <hpc> and produces a Constraint, which is the kind of things that go on the left of =>
21:56:48 river joins (~river@tilde.team/user/river)
21:56:55 <dminuoso> Though, Functor opens another can of worms
21:56:57 <dminuoso> and requires ConstraintKinds
21:57:02 <dminuoso> To talk about here
21:57:06 <hpc> true
21:57:13 <djb2021> very interesting - i had a completely different model -- something that constructs a thing such as data or now types....
21:57:40 <dminuoso> djb2021: Inded, `Maybe Int` creates a new type (that has no name other than `Maybe Int` itself)
21:57:51 <dminuoso> djb2021: Here's a very simple rule by the way:
21:58:10 <dminuoso> A type can only be inhabited, if its type is Type
21:58:18 <dminuoso> To check:
21:58:21 <dminuoso> % :k Int
21:58:21 <yahb> dminuoso: Type
21:58:28 <dminuoso> So `Int` is inhabited.
21:58:32 <dminuoso> We can ask GHC to verify:
21:58:38 <dminuoso> % f :: Int; f = undefined
21:58:38 <yahb> dminuoso:
21:58:53 <dminuoso> Type checks, we have a value of type Int. So its inhabited.
21:58:59 <dminuoso> f :: Maybe; f = undefined
21:59:02 <dminuoso> % f :: Maybe; f = undefined
21:59:02 <yahb> dminuoso: ; <interactive>:77:6: error:; * Expecting one more argument to `Maybe'; Expected a type, but `Maybe' has kind `Type -> Type'; * In the type signature: f :: Maybe
21:59:05 <dminuoso> Fails to type check!
21:59:10 <dminuoso> % :k Maybe
21:59:10 <yahb> dminuoso: Type -> Type
21:59:23 <hpc> % f :: 'Red; f = undefined
21:59:24 <yahb> hpc: ; <interactive>:79:6: error:; * Expected a type, but 'Red has kind `Color'; * In the type signature: f :: 'Red
21:59:39 <dminuoso> The diagnostic is poor
21:59:49 <dminuoso> when GHC says "Expected a type", it really means "a type of kind/type Type"
22:00:47 <djb2021> is there a function to transcript this conversation?
22:00:56 <dminuoso> djb2021: Check the topic
22:01:00 <djb2021> i want to read it tomorrow again
22:01:06 <dminuoso> We provide full channel logging
22:01:12 <dminuoso> /topic
22:01:37 <dminuoso> djb2021: in hpc's example, because the type of 'Red is Color (i.e. 'Red :: Color -- note that both left hand and right hand side are types), there exists no values of type 'Red, not even undefined.
22:01:46 <dminuoso> (Because again, the type of 'Red is not Type)
22:01:50 <nitrix> dminuoso, Most IRC clients let you escape / with another /, so //topic should work, or you can also do /say /topic which I think is in the RFC.
22:01:57 <dminuoso> /foo
22:02:03 <dminuoso> nitrix: Ah I was always curious about the syntax :)
22:02:07 <nitrix> :)
22:02:26 <boxscape> djb2021 these are the logs for today https://ircbrowse.tomsmeding.com/day/lchaskell/2021/06/02
22:02:39 <hpc> one final detail is unboxing
22:02:40 <dminuoso> djb2021: The main usefulness of this DataKinds, is that we can pattern match on these lifted types *similarly* to how we can pattern match on nullary sum types in the value level
22:02:53 <dminuoso> So you could write something like
22:02:57 <hpc> which essentially is for values that don't have all the thunk wrapping around them
22:03:03 <hpc> % :t 5#
22:03:03 <yahb> hpc: Int#
22:03:07 <hpc> % :k Int#
22:03:07 <yahb> hpc: TYPE 'GHC.Exts.IntRep
22:03:09 <djb2021> boxscape: thank you very much
22:03:22 <hpc> you don't really get into that unless you're doing FFI or really heavy optimization
22:03:32 <hpc> but it's useful to know it's there
22:04:46 <hpc> the # there is just part of the identifier name, and used by convention to mark unboxed stuff
22:05:01 <hpc> so like you don't get Light# automagically or anything
22:05:17 <dminuoso> % type family Value n :: Nat where Value 'Red = 10; Value 'Green = 20
22:05:17 <yahb> dminuoso:
22:05:35 <dminuoso> djb2021: ^- here. This is a type level equivalent of `\f -> case f of Red -> 10; Green -> 20`
22:05:45 <dminuoso> (yes, we can have numbers on the type level too!)
22:05:54 <hpc> % :k Value
22:05:54 <yahb> hpc: Color -> Nat
22:06:10 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 245 seconds)
22:06:14 ddellacosta joins (~ddellacos@86.106.121.17)
22:06:43 <dminuoso> djb2021: So you see, there's this deep rabbit hole that opens up when you realize this type system lets you pattern match on types, express computations, etc..
22:06:50 × unyu quits (~pyon@user/pyon) (Ping timeout: 252 seconds)
22:06:53 <dminuoso> Next up we have type level lists too..
22:07:00 × dhil quits (~dhil@195.213.192.85) (Ping timeout: 245 seconds)
22:07:21 × davidnutting quits (~nuttingd@75.164.99.232) (Quit: WeeChat 3.1)
22:07:38 davidnutting joins (~nuttingd@75.164.99.232)
22:07:42 <dminuoso> % kind! (Value 'Red)
22:07:42 <yahb> dminuoso: ; <interactive>:100:1: error:; * Variable not in scope: kind :: Array i0 e; * Perhaps you meant one of these: `find' (imported from Data.List), `BSL.find' (imported from Data.ByteString.Lazy), `BS.find' (imported from Data.ByteString); <interactive>:100:8: error: Data constructor not in scope: Value :: Name -> i0
22:07:50 <dminuoso> % :kind! (Value 'Red)
22:07:50 <yahb> dminuoso: Nat; = 10
22:07:54 <dminuoso> % :kind! (Value 'Green)
22:07:54 <yahb> dminuoso: Nat; = 20
22:08:21 <djb2021> wow, currently this blows my mind - but i got a few things the equivalence with match case is clear.
22:09:38 <dminuoso> % :set -XPolyKinds
22:09:38 <yahb> dminuoso:
22:09:42 <dminuoso> % newtype Tagged s b = Tagged b
22:09:42 <yahb> dminuoso:
22:09:59 <djb2021> the "family" in the definition confuses me a little bit - i never used this before
22:10:09 <dminuoso> djb2021: "type family" is just a type level function, nothing more
22:10:35 <dminuoso> well, there's some differences, but you can think of them as type level functions
22:10:38 <dminuoso> type family is just the name for it
22:10:42 <hpc> % class LowerColor (c :: Color) where color :: Color; instance LowerColor Red where color = Red; instanceLowerColor Green where color = Green
22:10:42 <yahb> hpc: ; <interactive>:105:53: error: parse error on input `instance'
22:10:55 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:8504:3672:14f4:b190) (Quit: Leaving)
22:10:58 <hpc> % class LowerColor (c :: Color) where color :: Color
22:10:59 <yahb> hpc: ; <interactive>:106:37: error:; * Could not deduce (LowerColor c0); from the context: LowerColor c; bound by the type signature for:; color :: forall (c :: Color). LowerColor c => Color; at <interactive>:106:37-50; The type variable `c0' is ambiguous; * In the ambiguity check for `color'; To defer the ambiguity check to use sites, enable AllowAmb
22:11:20 × ddellacosta quits (~ddellacos@86.106.121.17) (Ping timeout: 272 seconds)
22:11:21 <hpc> oh right
22:12:00 <hpc> % class LowerColor (c :: Color) where color :: Tagged c Color
22:12:00 <yahb> hpc:
22:12:10 <hpc> % instance LowerColor Red where color = Tagged Red
22:12:10 <yahb> hpc:
22:12:16 <hpc> % instance LowerColor Green where color = Tagged Green
22:12:16 <yahb> hpc:
22:12:27 <hpc> you can do something like that to get your types back to the value level
22:12:32 <hpc> and it doesn't have to be so direct
22:14:29 <dminuoso> % f :: forall (n :: Nat) (k :: Color) (l :: Color). (KnownNat n, n ~ Value k + Value l) => Tagged k String -> Tagged l String -> (Integer, Int); f (Tagged l) (Tagged r) = (natVal (Proxy @n), length l + length r)
22:14:29 <yahb> dminuoso:
22:15:00 <dminuoso> % f (Tagged "its red" :: Tagged 'Red String) (Tagged "its green" :: Tagged 'Green String)
22:15:00 <yahb> dminuoso: (30,16)
22:15:37 <dminuoso> djb2021: Next level now! We can define variables (by using equality constraints), and then we can pull these type level numbers back into the value level
22:16:21 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
22:16:43 <janus> ok i have made a repo for my project with template haskell that doesn't work with profiling: http://github.com/ysangkok/cabal-profiling-issue
22:16:45 <dminuoso> Note in particular
22:16:56 <dminuoso> There is a constraint (its left to a =>):
22:17:00 <dminuoso> n ~ Value k + Value l
22:17:13 <janus> if i remove cabal.project, it compiles, but if it is left there, it doesn't. i don't understand it since i thought profiling shouldn't need source changes
22:17:29 <djb2021> wait - i didn't understand your % f :: forall ...
22:17:40 <dminuoso> djb2021: ignore the forall bits until the dot.
22:17:45 <dminuoso> pretend this reads:
22:17:48 <hpc> djb2021: copy it to a text editor and split it into two lines on the ;
22:17:53 <dminuoso> (KnownNat n, n ~ Value k + Value l) => Tagged k String -> Tagged l String -> (Integer, Int); f (Tagged l) (Tagged r) = (natVal (Proxy @n), length l + length r)
22:18:21 <dminuoso> Think of this as setting the variable `n` to be the type family Value applied to k, plus (this is a type level natural plus) type family Value applied to l
22:18:25 <dminuoso> If you recall my above definition
22:18:31 <dminuoso> that means `n ~ 30` at the type level
22:18:34 × michalz quits (~user@185.246.204.60) (Remote host closed the connection)
22:18:49 <dminuoso> natVal let's you pull down a type level natural back into the value world (true magic going on!)
22:19:18 <hpc> % :t natVal
22:19:18 <yahb> hpc: KnownNat n => proxy n -> Integer
22:19:34 <hpc> it's like an infinite version of class LowerColor
22:20:55 <monochrom> Wait a second, I think I heard that profiling and TH can't mix.
22:21:46 <Arsen> can cabal build deps on all cores in cabal install? right now, I'm stuck on a single pandoc build compiling one file at a time, with another 11 cores fully free
22:22:07 <dminuoso> djb2021: or maybe a different example
22:22:09 <dminuoso> % type family Len s where Len '[] = 0; Len (x ': xs) = 1 + Len xs
22:22:09 <yahb> dminuoso:
22:22:15 <dminuoso> Here, type level length for type level lists
22:23:15 ddellacosta joins (~ddellacos@86.106.121.115)
22:23:28 <djb2021> so computations at the type level?
22:24:05 <dminuoso> % tyl :: forall (n :: Nat) (s :: [Data.Kind.Type]) a. (KnownNat n, n ~ Len s) => Tagged s a -> Integer; tyl _ = natVal (Proxy @n)
22:24:05 <yahb> dminuoso:
22:24:20 <janus> monochrom: oh :O but if that is the case, why doesn't ghc immediatly quit once it sees LANGUAGE TemplateHaskell and profiling is on?
22:24:37 <dminuoso> % tyl (Tagged "foo" :: Tagged '[Float, Double, Int, 'Red, 'Green] String)
22:24:37 <yahb> dminuoso: ; <interactive>:138:29: error:; * Expected a type, but 'Red has kind `Color'; * In the first argument of `Tagged', namely '[Float, Double, Int, 'Red, 'Green]; In an expression type signature: Tagged '[Float, Double, Int, 'Red, 'Green] String; In the first argument of `tyl', namely `(Tagged "foo" :: Tagged '[Float, Double, Int, 'Red, 'Green] String)'
22:24:44 <dminuoso> % tyl (Tagged "foo" :: Tagged '[Float, Double, Int] String)
22:24:44 <yahb> dminuoso: 3
22:24:48 <dminuoso> err bad example
22:24:56 <dminuoso> % tyl (Tagged "foo" :: Tagged '[Float, Double, Int, Char, IO ()] String)
22:24:56 <yahb> dminuoso: 5
22:24:59 <dminuoso> djb2021: Yes!
22:26:19 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
22:26:41 <dminuoso> djb2021: The beauty of these type level computations, is that the resulting types can be used to type terms with.
22:26:50 × eight quits (~eight@user/eight) (Quit: Rebooting)
22:27:23 <hpc> and that the type-level language closely resembles the value-level language
22:27:36 <hpc> if you squint, C++ has been doing type-level programming for ages with templates
22:27:46 <dminuoso> servant is a prime example of this. You express an API with a very rich type, and then you use complicated type level computations to turn that rich type into something you can type a function with.
22:28:15 <djb2021> that is exactly what i wanted to write but i hesitated because i was not sure if that is blasphemic :)
22:28:41 <djb2021> ??
22:28:42 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
22:28:43 <dminuoso> djb2021: https://hackage.haskell.org/package/servant-0.18.2/docs/Servant-API-Generic.html#t:ToServant
22:28:55 <djb2021> i have never used the servant library
22:28:56 × ddellacosta quits (~ddellacos@86.106.121.115) (Ping timeout: 268 seconds)
22:28:58 <hpc> djb2021: now you're getting it :D
22:29:15 eight joins (~eight@user/eight)
22:29:24 <dminuoso> djb2021: imagine we did this:
22:29:34 <dminuoso> data (path :: k) :> (a :: *)
22:29:36 <dminuoso> % data (path :: k) :> (a :: *)
22:29:36 <yahb> dminuoso: ; <interactive>:141:27: error:; Operator applied to too few arguments: *; With NoStarIsType, `*' is treated as a regular type operator. ; Did you mean to use `Type' from Data.Kind instead?
22:29:40 <dminuoso> % data (path :: k) :> (a :: Type)
22:29:40 <yahb> dminuoso: ; <interactive>:142:27: error:; Ambiguous occurrence `Type'; It could refer to; either `Language.Haskell.TH.Type', imported from `Language.Haskell.TH' (and originally defined in `Language.Haskell.TH.Syntax'); or `Data.Kind.Type', imported from `Data.Kind' (and originally defined in `GHC.Types')
22:29:43 <dminuoso> % data (path :: k) :> (a :: Data.Kind.Type)
22:29:43 <yahb> dminuoso:
22:30:09 <hpc> there's something morbidly hilarious about "Data.Kind.Type"
22:30:12 <dminuoso> djb2021: now next up, you have to accept that strings can exist on the type level too (that is "foo" can be a type!)
22:30:22 <dminuoso> djb2021: are you with me so far?
22:30:48 × azeem quits (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it) (Remote host closed the connection)
22:30:58 azeem joins (~azeem@dynamic-adsl-94-34-34-125.clienti.tiscali.it)
22:31:35 <djb2021> i didn't understand the servant stuff - what is the goal of the library
22:31:41 <dminuoso> you will in a second! :)
22:31:59 <dminuoso> next up we will conjure a data kind using what we learned
22:32:29 <dminuoso> % data Method = Post | Get
22:32:29 <yahb> dminuoso:
22:32:37 <dminuoso> Now we have a type level 'Post and 'Get
22:32:39 × tonyday quits (~user@202-65-93-249.ip4.superloop.com) (Read error: Connection reset by peer)
22:32:52 <dminuoso> The above data type :> exists without needing any lifting
22:32:54 tonyday joins (~user@202-65-93-249.ip4.superloop.com)
22:33:53 <dminuoso> djb2021: if you keep on doing this, you get to have a purely type thing that looks like this:
22:34:25 <dminuoso> % type Endpoint = "users" :> Capture "userId" Int :> Get '[JSON] User
22:34:25 <yahb> dminuoso: ; <interactive>:145:28: error: Not in scope: type constructor or class `Capture'; <interactive>:145:58: error: Not in scope: type constructor or class `JSON'; <interactive>:145:64: error: Not in scope: type constructor or class `User'
22:34:30 <dminuoso> Which is just a pure type
22:34:37 <dminuoso> If we can then use type machinery to say:
22:35:14 × wonko quits (~wjc@62.115.229.50) (Quit: See You Space Cowboy..)
22:35:17 <dminuoso> f :: ServerType Endpoint; f userId = loadUserFromDatabase userId
22:35:24 ru0mad joins (~ru0mad@82-64-17-144.subs.proxad.net)
22:36:01 <dminuoso> The choice `ServerType` is imaginary, but imagine this was a sophisticated type calculation, that would *return* `Int -> IO User`
22:36:38 <dminuoso> This machinery lets us derive a router, server handlers, client handlers - all well typed because the shape is communicated through a type
22:36:43 × ru0mad quits (~ru0mad@82-64-17-144.subs.proxad.net) (Client Quit)
22:36:54 × favonia quits (~favonia@user/favonia) (Ping timeout: 264 seconds)
22:37:25 <hpc> and then you can run "curl http://localhost/users/5" to get that user's data
22:38:29 × davidnutting quits (~nuttingd@75.164.99.232) (Quit: WeeChat 3.1)
22:38:34 favonia joins (~favonia@user/favonia)
22:39:01 <dminuoso> djb2021: Concretely, servant lets you a) generate a client automatically (with automatically inferred types!) for each endpoint, b) with the type checker verify that your request handlers match the request/response types exactly (so you cant forget an argument, or falsey assume that the specified userId is of type String), c) you can automatically generate documentation - all from a single type.
22:39:12 <dminuoso> All this is driven by complex type level computation
22:39:26 davidnutting joins (~nuttingd@75.164.99.232)
22:39:41 × davidnutting quits (~nuttingd@75.164.99.232) (Client Quit)
22:40:02 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
22:41:18 ddellacosta joins (~ddellacos@86.106.121.77)
22:41:31 × fizbin quits (~fizbin@c-73-33-197-160.hsd1.nj.comcast.net) (Remote host closed the connection)
22:43:04 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
22:43:07 × derelict quits (~winter@2603-6011-f901-9e5b-0000-0000-0000-08cf.res6.spectrum.com) (Ping timeout: 268 seconds)
22:43:26 tonyday parts (~user@202-65-93-249.ip4.superloop.com) (ERC (IRC client for Emacs 28.0.50))
22:44:09 <djb2021> let me summarize if i understood correctly: i design an API by defining it as a type? where is the difference to the way that is done with swagger-codegen? with this approach (in java) code is generated for the controller and client code generation is possible there too but i have never used it.
22:45:07 renzhi joins (~xp@2607:fa49:6500:bc00::e7b)
22:45:09 <djb2021> where exactly is the strength
22:45:20 <djb2021> of the servant approach?
22:45:53 × ddellacosta quits (~ddellacos@86.106.121.77) (Ping timeout: 252 seconds)
22:46:00 <dminuoso> djb2021: with swagger there is no guarantee your swagger spec is ever in sync with the code. you can simply forget to re-run your code generator.
22:46:10 <hpc> the advantage is remaining in-language, rather than having to resort to writing some kind of yaml/json/xml file
22:46:13 <dminuoso> and this applies to every part that uses swagger
22:46:44 <dminuoso> djb2021: with servant, if the type ever changes and you forget to update your code, it will produce a type error.
22:47:41 × jolly quits (~jolly@208.180.97.158) (Ping timeout: 272 seconds)
22:48:02 <dminuoso> and servant offers hooks to customize behavior in the server for example, allowing you to attach further arbitrary things onto the API
22:49:16 <dminuoso> say a full authentication, which automatically communicates the logged in user into the type system, so that the handlers suddenly receive an additional argument for the user - but not because its buitin but because you can extend it this way
22:49:18 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:53:07 <djb2021> ok, i understand that because the definitions are on the type level any missing implementation detail is found during compile time. This is a clear advantage. But isn't the API first approach (think of several teams, some of them for frontends) a good thing? Is it better to define an API in the language?
22:53:54 <dminuoso> to be fair, servant was an experiment originally I think
22:54:27 × myShoggoth quits (~myShoggot@97-120-89-117.ptld.qwest.net) (Read error: Connection reset by peer)
22:54:46 myShoggoth joins (~myShoggot@97-120-89-117.ptld.qwest.net)
22:54:54 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
22:55:39 <dminuoso> servant comes at a steep cost, mistakes result in type errors that can be hard to decipher - especially to someone new to servant. you accumulate a lot of extensions to even express a type, and then you might be confused about what things even mean
22:56:34 <dminuoso> Is it good? I think it has good uses, but wouldn't recommend it to everybody. I merely mentioned it to demonstrate what we can do just at the type level, where you might have thought `Int` and `(->)` was the extend of it. :p
22:56:45 pera joins (~pera@0541db7e.skybroadband.com)
22:57:07 pera is now known as Guest3714
22:57:11 <djb2021> ok, wait, i have been reading a little bit through servant -- with servant i can combine several APIs to a resulting single API, right?
22:57:25 <dminuoso> what do you mean?
22:57:35 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857) (Remote host closed the connection)
22:58:04 × yaroot quits (~yaroot@6.3.30.125.dy.iij4u.or.jp) (Quit: The Lounge - https://thelounge.chat)
22:58:53 <djb2021> ok, this was the description for a union of two apis, get and post
22:59:00 yaroot joins (~yaroot@6.3.30.125.dy.iij4u.or.jp)
22:59:02 <djb2021> so this is similar to swagger
22:59:09 <dminuoso> yeah, with servant you usually describe a set of endpoints
22:59:13 ddellacosta joins (~ddellacos@86.106.121.72)
22:59:15 × Guest3714 quits (~pera@0541db7e.skybroadband.com) (Client Quit)
23:00:07 <djb2021> and servant supports export of that API to OpenApI / Swagger?
23:00:27 <djb2021> and client code generation for test?
23:00:41 benin0 joins (~benin@183.82.205.186)
23:00:44 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:3547:b6d4:7412:5857)
23:00:45 dmwit joins (~dmwit@pool-96-255-233-247.washdc.fios.verizon.net)
23:00:48 lavaman joins (~lavaman@98.38.249.169)
23:00:55 <dminuoso> there is a package servant-swagger and servant-openapi, yes.
23:01:11 <dminuoso> Which automatically generate appropriate swagger specs for you
23:01:21 <djb2021> great
23:01:51 <dminuoso> You just need to deal with schemas for your types, but you can use generics to automatically boiler plate most of it
23:02:06 × raehik1 quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
23:02:19 boioioing joins (~boioioing@cpe-76-84-141-127.neb.res.rr.com)
23:02:38 <dminuoso> https://gist.github.com/dminuoso/fde24babea76ad23af01eb650ca185e7
23:02:40 <dminuoso> Looks like this
23:03:19 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
23:03:54 × ddellacosta quits (~ddellacos@86.106.121.72) (Ping timeout: 272 seconds)
23:04:55 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 245 seconds)
23:05:33 <djb2021> i am hoping to implement a service with that soon, i wanted to learn that for a long time, but i never got the time to do that. This year it looks good, however. Let's see.
23:06:31 <djb2021> Thank you very much!
23:06:58 <djb2021> Have a good day / night.
23:09:55 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 245 seconds)
23:11:58 falafel_ joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:12:17 × falafel_ quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Remote host closed the connection)
23:12:51 × djb2021 quits (~djb2021@HSI-KBW-091-089-090-070.hsi2.kabelbw.de) (Quit: Client closed)
23:16:41 ddellacosta joins (~ddellacos@86.106.121.100)
23:17:50 × favonia quits (~favonia@user/favonia) (Ping timeout: 272 seconds)
23:18:15 favonia joins (~favonia@user/favonia)
23:18:46 falafel joins (~falafel@pool-96-255-70-50.washdc.fios.verizon.net)
23:20:05 × betelgeuse quits (~john2gb@94-225-47-8.access.telenet.be) (Ping timeout: 265 seconds)
23:20:56 bfrk1 joins (~Thunderbi@200116b8456bb4003c666de9803185e6.dip.versatel-1u1.de)
23:21:05 × bfrk quits (~Thunderbi@200116b845fca000f97ff890167a6943.dip.versatel-1u1.de) (Ping timeout: 252 seconds)
23:21:05 bfrk1 is now known as bfrk
23:21:09 betelgeuse0 joins (~john2gb@94-225-47-8.access.telenet.be)
23:21:38 × ddellacosta quits (~ddellacos@86.106.121.100) (Ping timeout: 272 seconds)
23:22:38 dunkeln joins (~dunkeln@94.129.65.28)
23:24:19 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:24:26 niko is now known as o
23:27:54 × dunkeln quits (~dunkeln@94.129.65.28) (Ping timeout: 264 seconds)
23:29:33 × ubikium quits (~ubikium@113x43x248x70.ap113.ftth.arteria-hikari.net) (Quit: Quit)
23:29:42 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
23:35:00 ddellacosta joins (~ddellacos@86.106.121.61)
23:38:31 beka joins (~beka@104.193.170-254.PUBLIC.monkeybrains.net)
23:39:51 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds)
23:39:54 × ddellacosta quits (~ddellacos@86.106.121.61) (Ping timeout: 264 seconds)
23:41:13 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
23:44:51 × bfrk quits (~Thunderbi@200116b8456bb4003c666de9803185e6.dip.versatel-1u1.de) (Quit: bfrk)
23:45:13 × orion quits (~orion@user/orion) (Read error: Connection reset by peer)
23:45:25 orion joins (~orion@user/orion)
23:49:30 × dpl_ quits (~dpl@77-121-78-163.chn.volia.net) (Ping timeout: 264 seconds)
23:52:30 ddellacosta joins (~ddellacos@89.46.62.63)
23:56:33 <boxscape> Does anyone use AccumT?
23:56:46 <boxscape> I just saw it for the first time, but never saw it listed in lists of Monad Transfomers
23:56:50 × ddellacosta quits (~ddellacos@89.46.62.63) (Ping timeout: 252 seconds)
23:57:05 <boxscape> (or lists of Monads, for that matter)
23:57:24 <boxscape> https://hackage.haskell.org/package/transformers/docs/Control-Monad-Trans-Accum.html#t:AccumT

All times are in UTC on 2021-06-02.