Home liberachat/#haskell: Logs Calendar

Logs on 2022-01-06 (liberachat/#haskell)

00:00:43 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
00:02:25 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
00:02:59 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
00:08:15 <Axman6> Praise be to the god of locking, Loki
00:08:37 <Axman6> locking is chaos, so I think he's apt
00:10:29 × little_mac quits (~little_ma@2601:410:4300:3ce0:54a9:bec8:b650:a634) (Remote host closed the connection)
00:10:47 little_mac joins (~little_ma@2601:410:4300:3ce0:1c52:e548:30d:e414)
00:12:13 <lechner> I think I can just use hReady https://hackage.haskell.org/package/base-4.16.0.0/docs/System-IO.html#v:hReady
00:16:44 geekosaur feels a tickling in the back of his brain
00:19:05 <jackdk> yeah Axman6 this is a good talk - it's talking about abstractions and laws
00:19:35 <geekosaur> it might work but it's a bit tricky
00:21:08 lavaman joins (~lavaman@98.38.249.169)
00:22:55 × x_kuru quits (~xkuru@user/xkuru) (Read error: Connection reset by peer)
00:23:17 × acidjnk quits (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
00:23:17 × acidjnk_new quits (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de) (Ping timeout: 252 seconds)
00:25:39 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
00:32:13 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 240 seconds)
00:36:36 cheater joins (~Username@user/cheater)
00:44:10 × little_mac quits (~little_ma@2601:410:4300:3ce0:1c52:e548:30d:e414) (Remote host closed the connection)
00:48:02 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
00:48:02 <Axman6> jackdk: the monads in ruby one?
00:48:08 cheater1__ joins (~Username@user/cheater)
00:48:12 cheater1__ is now known as cheater
00:53:56 machinedgod joins (~machinedg@24.105.81.50)
00:55:57 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
00:56:37 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
00:58:03 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
00:58:03 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
00:58:03 wroathe joins (~wroathe@user/wroathe)
00:59:17 Erutuon joins (~Erutuon@user/erutuon)
00:59:18 mvk joins (~mvk@2607:fea8:5cdd:f000::45db)
01:02:41 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
01:03:20 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
01:05:11 BrokenClutch joins (~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e)
01:06:35 justsomeguy joins (~justsomeg@user/justsomeguy)
01:07:27 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 256 seconds)
01:12:30 <jackdk> Axman6: yes
01:12:53 lavaman joins (~lavaman@98.38.249.169)
01:13:43 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
01:14:46 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
01:15:42 × noddy quits (~user@user/noddy) (Quit: WeeChat 3.4)
01:20:44 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.4)
01:21:17 × justsomeguy quits (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3)
01:26:40 × kaph quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Read error: Connection reset by peer)
01:27:44 kaph_ joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
01:33:56 Codaraxis joins (~Codaraxis@user/codaraxis)
01:39:10 <Axman6> I feel like I've been told off before for sharing it here, but glad some people got some value from it
01:44:14 lavaman joins (~lavaman@98.38.249.169)
01:44:52 <EvanR> oh, now I gotta click
01:45:37 notzmv joins (~zmv@user/notzmv)
01:45:59 × jespada quits (~jespada@87.74.32.18) (Ping timeout: 256 seconds)
01:46:12 <EvanR> dang, giving a prepared haskell talk at ruby conferences. I've been doing it wrong this whole time
01:48:10 jespada joins (~jespada@87.74.32.18)
01:48:36 × azimut quits (~azimut@gateway/tor-sasl/azimut) (Ping timeout: 276 seconds)
01:48:39 azimut_ joins (~azimut@gateway/tor-sasl/azimut)
01:48:49 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
01:50:07 <Axman6> I feel like jackdk would be in a good position to do that...
01:50:42 <jackdk> Axman6: like a) people travel to conferences these days, and b) I don't have enough other things to do :P
01:51:16 <Axman6> you're gonna have so much time once you push amazonka-2.0 out the door, there'll definitely be nothing to fix once that's done
01:52:07 lavaman joins (~lavaman@98.38.249.169)
01:56:22 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Quit: WeeChat 3.4)
02:00:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
02:00:50 × mmhat quits (~mmh@55d49507.access.ecotel.net) (Quit: WeeChat 3.4)
02:04:40 <jackdk> Axman6: nah people just chuck more things on the pile =S
02:05:05 <Axman6> praise be to the backlog
02:06:51 <jackdk> mostly I tag them "post 2.0" and say "I'd love to see a PR" because getting something out the door is more important
02:08:29 × tinwood quits (~tinwood@canonical/tinwood) (Remote host closed the connection)
02:11:18 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
02:11:29 tinwood joins (~tinwood@general.default.akavanagh.uk0.bigv.io)
02:11:29 × tinwood quits (~tinwood@general.default.akavanagh.uk0.bigv.io) (Changing host)
02:11:29 tinwood joins (~tinwood@canonical/tinwood)
02:16:45 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
02:16:46 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
02:17:34 califax- joins (~califax@user/califx)
02:17:35 × pottsy quits (~pottsy@129.227.183.244) (Quit: Leaving)
02:21:45 × califax quits (~califax@user/califx) (Ping timeout: 276 seconds)
02:21:45 califax- is now known as califax
02:26:13 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
02:27:17 × xff0x quits (~xff0x@2001:1a81:53e7:b00:f827:c356:f4f8:aa66) (Ping timeout: 240 seconds)
02:28:21 xff0x joins (~xff0x@2001:1a81:53e7:b00:ae4:d336:6060:937f)
02:29:16 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
02:32:22 neurocyte091 joins (~neurocyte@IP-212232089218.dynamic.medianet-world.de)
02:32:22 × neurocyte091 quits (~neurocyte@IP-212232089218.dynamic.medianet-world.de) (Changing host)
02:32:22 neurocyte091 joins (~neurocyte@user/neurocyte)
02:34:09 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
02:34:51 × neurocyte09 quits (~neurocyte@user/neurocyte) (Ping timeout: 256 seconds)
02:34:52 neurocyte091 is now known as neurocyte09
02:36:46 × xff0x quits (~xff0x@2001:1a81:53e7:b00:ae4:d336:6060:937f) (Ping timeout: 268 seconds)
02:37:07 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
02:38:16 vysn joins (~vysn@user/vysn)
02:38:32 xff0x joins (~xff0x@2001:1a81:5223:a300:9deb:66dd:70e6:c22a)
02:52:59 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 256 seconds)
02:56:59 <EvanR> is it possible to suppress top level forall in a type sig in haddock
02:57:18 <EvanR> if it doesn't seem relevant at the level of documentation
03:01:14 noddy joins (~user@user/noddy)
03:01:14 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:02:03 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Remote host closed the connection)
03:02:52 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
03:04:06 × puke quits (~puke@user/puke) (Quit: puke)
03:08:25 lavaman joins (~lavaman@98.38.249.169)
03:19:27 × kaph_ quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Read error: Connection reset by peer)
03:19:29 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 256 seconds)
03:29:11 <Axman6> since it affects the order of type variables in type applications, it's really part of the API now
03:33:01 <BrokenClutch> I want to wax myself without looking like a femboy
03:33:46 <BrokenClutch> oops, wrong chat. How haskell handles stm, is there a optimization on ghc?
03:40:32 × whatsupdoc quits (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
03:41:23 mbuf joins (~Shakthi@122.178.186.114)
03:43:14 <Axman6> o.O
03:43:41 <Axman6> "is there an optimisation on ghc?" I don;t know what you mean by this. GHC provides an implementation of STM
03:48:31 × td_ quits (~td@94.134.91.82) (Ping timeout: 256 seconds)
03:50:06 td_ joins (~td@94.134.91.33)
03:53:25 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 240 seconds)
03:53:57 × mvk quits (~mvk@2607:fea8:5cdd:f000::45db) (Ping timeout: 240 seconds)
03:57:49 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
04:00:14 <EvanR> Understood re: order of variables for type applications but
04:00:56 <EvanR> what about rearranging so the order is default, so the forall is redundant xD
04:00:57 × noddy quits (~user@user/noddy) (Quit: WeeChat 3.4)
04:03:32 noddy joins (~user@user/noddy)
04:04:47 <jackdk> there are times where the explicit ordering is very useful cf. constraints-extras
04:08:05 × kupi quits (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
04:08:40 hyiltiz joins (~quassel@31.220.5.250)
04:10:00 mtjm joins (~mutantmel@2604:a880:2:d0::208b:d001)
04:16:09 × ralu quits (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 256 seconds)
04:17:23 × hyiltiz quits (~quassel@31.220.5.250) (Quit: hyiltiz)
04:18:10 hyiltiz joins (~quassel@31.220.5.250)
04:20:05 × hyiltiz quits (~quassel@31.220.5.250) (Client Quit)
04:22:37 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
04:30:21 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:30:21 deadmarshal joins (~deadmarsh@95.38.116.103)
04:30:37 × xff0x quits (~xff0x@2001:1a81:5223:a300:9deb:66dd:70e6:c22a) (Ping timeout: 240 seconds)
04:31:42 xff0x joins (~xff0x@2001:1a81:5223:a300:d0e9:99bd:8a63:7db6)
04:32:13 × sirlensalot quits (~sirlensal@ool-44c5f8c9.dyn.optonline.net) (Quit: sirlensalot)
04:32:13 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:32:29 lavaman joins (~lavaman@98.38.249.169)
04:32:36 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:32:49 lavaman joins (~lavaman@98.38.249.169)
04:32:57 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:33:04 hyiltiz joins (~quassel@31.220.5.250)
04:33:12 lavaman joins (~lavaman@98.38.249.169)
04:33:18 × hyiltiz quits (~quassel@31.220.5.250) (Client Quit)
04:33:19 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:33:26 hyiltiz joins (~quassel@31.220.5.250)
04:33:33 lavaman joins (~lavaman@98.38.249.169)
04:33:41 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:33:55 lavaman joins (~lavaman@98.38.249.169)
04:34:02 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:34:18 lavaman joins (~lavaman@98.38.249.169)
04:34:25 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:34:41 lavaman joins (~lavaman@98.38.249.169)
04:34:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:35:03 lavaman joins (~lavaman@98.38.249.169)
04:35:11 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:35:25 lavaman joins (~lavaman@98.38.249.169)
04:35:32 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:35:48 lavaman joins (~lavaman@98.38.249.169)
04:35:56 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:36:11 lavaman joins (~lavaman@98.38.249.169)
04:36:19 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:36:37 lavaman joins (~lavaman@98.38.249.169)
04:36:44 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:36:59 lavaman joins (~lavaman@98.38.249.169)
04:37:06 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:37:20 lavaman joins (~lavaman@98.38.249.169)
04:37:28 Jing joins (~hedgehog@2604:a840:3::103c)
04:37:28 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:37:42 lavaman joins (~lavaman@98.38.249.169)
04:37:49 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:37:57 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 240 seconds)
04:38:04 lavaman joins (~lavaman@98.38.249.169)
04:38:11 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:38:25 lavaman joins (~lavaman@98.38.249.169)
04:38:33 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:38:48 lavaman joins (~lavaman@98.38.249.169)
04:38:54 hyiltiz joins (~quassel@31.220.5.250)
04:38:55 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:39:10 lavaman joins (~lavaman@98.38.249.169)
04:39:17 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:39:31 lavaman joins (~lavaman@98.38.249.169)
04:39:38 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:39:54 lavaman joins (~lavaman@98.38.249.169)
04:40:01 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:40:16 lavaman joins (~lavaman@98.38.249.169)
04:40:23 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:40:38 lavaman joins (~lavaman@98.38.249.169)
04:40:45 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:41:00 lavaman joins (~lavaman@98.38.249.169)
04:41:07 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:41:23 lavaman joins (~lavaman@98.38.249.169)
04:41:30 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:41:45 lavaman joins (~lavaman@98.38.249.169)
04:41:52 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:42:06 lavaman joins (~lavaman@98.38.249.169)
04:42:14 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
04:46:03 <EvanR> LAVAMANNNNNNN
04:46:33 rekahsoft joins (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com)
04:48:32 ralu joins (~ralu@static.211.245.203.116.clients.your-server.de)
04:49:34 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
04:53:31 benin9 joins (~benin@183.82.176.241)
04:54:37 × benin quits (~benin@183.82.176.241) (Ping timeout: 240 seconds)
04:54:37 benin9 is now known as benin
04:56:11 shapr joins (~user@2601:7c0:c202:5190:cc66:94d5:eb1a:5dfe)
05:04:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
05:05:18 × hyiltiz quits (~quassel@31.220.5.250) (Quit: hyiltiz)
05:07:37 × Inst quits (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net) (Ping timeout: 240 seconds)
05:09:04 SpencerJanssen[m joins (~sjanssenm@2001:470:69fc:105::1:61d8)
05:13:54 BrokenClutch parts (~pioneer@2804:d41:c292:6c00:33d8:d2f1:d8af:153e) ()
05:15:37 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds)
05:25:05 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:26:34 × doyougnu quits (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net) (Ping timeout: 256 seconds)
05:27:28 emf_ joins (~emf@c-73-97-137-43.hsd1.wa.comcast.net)
05:28:19 × emf_ quits (~emf@c-73-97-137-43.hsd1.wa.comcast.net) (Client Quit)
05:28:37 × emf quits (~emf@2620:10d:c090:400::5:c06d) (Ping timeout: 240 seconds)
05:34:11 × deadmarshal quits (~deadmarsh@95.38.116.103) (Quit: ZNC 1.8.2 - https://znc.in)
05:34:28 deadmarshal joins (~deadmarsh@95.38.116.103)
05:35:31 <Axman6> EvanR: because of the way glirc shows joins and parts, lavaman's been shown as lavaman+x+x+x+x+x+x+x+x+x+x+ .. lavaman+x+x+ .. lavamanx+x+x+x+x+x+x+x+x+x, which made your comment even better
05:35:42 <EvanR> lol
05:36:13 <sshine> ahhh -- this is a joke for those who don't ignore joins/parts. :)
05:36:29 <EvanR> I like how glirc compresses it but still makes it annoying
05:36:38 <EvanR> instead of just hiding it
05:36:47 <sshine> EvanR, you might wanna know.
05:38:46 <Axman6> you can turn it off, but it's useful for when youy're helping someone and they decide to piss off in the middle of it
05:41:43 × geranim0 quits (~geranim0@modemcable242.171-178-173.mc.videotron.ca) (Ping timeout: 256 seconds)
05:42:51 fcc977 joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
05:42:55 × fcc977 quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Remote host closed the connection)
05:43:12 kaph joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
05:45:49 <EvanR> I was just reading about literate haskell, or literate programming. And the idea sounds interesting. But what is the practical workflow like. Does it only produce pdf "papers" or can you generate nice web pages
05:46:05 <EvanR> and what is "it"... a ghc flag?
05:48:07 <sshine> Axman6, right. I usually prefix my messages when answering people, but that has certainly happened a few times over the years.
05:48:32 <sshine> Axman6, (and in the process of prefixing them for the n'th time, realize that the completion doesn't work.)
05:49:13 <sshine> EvanR, .lhs files -- and yeah, you could generate LaTeX or Markdown, I guess.
05:49:54 <EvanR> wait generating markdown sounds... like stepping backwards
05:50:10 <EvanR> compiling from markdown?
05:50:14 <sshine> sorry, yes
05:50:41 <EvanR> oh, so the markdown is the "nice" version
05:50:47 <EvanR> something somewhere shows it nicely
05:51:32 × juhp quits (~juhp@128.106.188.82) (Read error: Connection reset by peer)
05:51:57 <sshine> yeah, so comments on the outside, code on the inside, rather than the other way around like we usually do.
05:52:40 <sshine> and what I was thinking about, IIRC, was this: https://github.com/sol/markdown-unlit#readme -- but that's not regular .lhs format.
05:52:47 × xlei quits (~akans@pool-68-129-84-118.nycmny.fios.verizon.net) (Remote host closed the connection)
05:53:36 xlei joins (~akans@pool-68-129-84-118.nycmny.fios.verizon.net)
05:57:23 <maerwald[m]> EvanR: https://entangled.github.io/
05:57:41 <sshine> but I might still generate Markdown because I like the idea of using Markdown as the data format for blogs. :) I keep most of my notes in Markdown. CodiMD (that is, HackMD.io's open-sourced back-end) has pretty good MathJax support for embedding LaTeX equations.
05:57:44 <maerwald[m]> But I think none of those things are practical for everyday programming
05:59:01 <EvanR> ah cool
06:00:11 <maerwald[m]> I think what's more important than documentation is module structure, so that module level documentation can tell a good story. Then you can have directory level hacking documentation as well (haddock could support this, in fact)
06:01:20 <EvanR> just saw a rant about how literate programming is not documentation it's a PARADIGM!!!!!
06:01:40 <EvanR> actually yeah I just got done with some documentation, but it doesn't address any internals
06:01:58 <EvanR> so I was like how about literate haskell somehow which necessarily includes internals
06:03:44 <maerwald[m]> It makes changing code even harder
06:04:09 <maerwald[m]> Imagine refactoring, moving code to different places etc
06:04:37 <maerwald[m]> You'll just have so write the story from scratch
06:04:48 <EvanR> yeah
06:05:22 <EvanR> it's better as an article or demonstration that's easy to check by compiler
06:05:55 <sshine> yeah, it's pretty neat for writing tutorials.
06:06:01 <sshine> one-page tutorials :P
06:06:34 <maerwald[m]> I also think it's more worthwhile to separate documentation of behavior from documentation of intention
06:06:53 <sshine> maerwald[m], how so?
06:07:01 <sshine> what's an example of documentation of behavior?
06:07:28 <jackdk> `// add one to i`
06:07:30 <maerwald[m]> When intention changes non-trivially, that's a strong sign you should rewrite the entire function, instead of adjusting it
06:09:08 <maerwald[m]> Programmers tend to tweak behavior to the point when the original intention has nothing to do with the current intention
06:09:16 <maerwald[m]> Then you're usually left with messy code
06:09:31 <maerwald[m]> The only way to find out is documenting intention
06:11:28 hyiltiz joins (~quassel@31.220.5.250)
06:12:14 <maerwald[m]> sshine: when you describe relationship of input to output for example
06:14:02 <sshine> maerwald[m], where do you think the two kinds of documentation should be separated? I usually have one place where I document stuff, and that's in comments above functions. :)
06:14:10 <sshine> and also at the top of modules.
06:14:52 <maerwald[m]> sshine: the first line of the documentation should reflect the intention. Then newline and then you can document behavior
06:16:25 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds)
06:16:27 <EvanR> I'm now convinced writing documentation is pointless thanks maerwald[m] xD
06:16:41 <EvanR> unless it's something that never changes like Functor
06:16:42 <maerwald[m]> E.g. "We want to extract the device of the path, if any". Subsequently, there will be a lot of edge cases
06:16:47 <EvanR> which... barely has any docus
06:17:42 <maerwald[m]> But the intention is simple
06:20:27 <sshine> maerwald[m], ah, okay. :) I think I'm sort of doing that without being conscious about it. mostly of the "intention" part being the most zoomed-out description I can give something without scope-creeping the explanation.
06:21:17 <maerwald[m]> sshine: right, but the catch is the intention must never be changed
06:21:25 <maerwald[m]> If it does, write a new function
06:21:55 <maerwald[m]> Unless you control all the call sites
06:27:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
06:29:12 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection)
06:30:59 <Square> how do i take a value and turn it into a Exp in TH?
06:31:15 whatsupdoc joins (uid509081@id-509081.hampstead.irccloud.com)
06:31:59 <EvanR> for the next hour sit quietly and we will control all the call sites
06:32:06 <jackdk> Square: https://hackage.haskell.org/package/template-haskell-2.18.0.0/docs/Language-Haskell-TH-Syntax.html#t:Lift
06:33:04 <jackdk> but also if the value is in a variable, then `[|| foo ||]` might do the trick
06:34:58 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
06:34:58 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
06:34:58 wroathe joins (~wroathe@user/wroathe)
06:38:31 hyiltiz joins (~quassel@31.220.5.250)
06:39:31 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
06:39:39 <Square> jackdk, thanks. That seems to work
06:41:32 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
06:55:42 juhp joins (~juhp@128.106.188.82)
07:00:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:10:37 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 240 seconds)
07:10:41 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds)
07:11:53 emf joins (~emf@c-73-97-137-43.hsd1.wa.comcast.net)
07:12:29 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
07:13:36 lavaman joins (~lavaman@98.38.249.169)
07:14:55 ProfSimm joins (~ProfSimm@87.227.196.109)
07:15:06 hyiltiz joins (~quassel@31.220.5.250)
07:18:03 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
07:18:11 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
07:19:05 × Jing quits (~hedgehog@2604:a840:3::103c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:21:08 × shriekingnoise quits (~shrieking@186.137.144.80) (Quit: Quit)
07:21:34 cheater joins (~Username@user/cheater)
07:21:57 × shapr quits (~user@2601:7c0:c202:5190:cc66:94d5:eb1a:5dfe) (Ping timeout: 240 seconds)
07:24:01 coolnickname joins (uid531864@user/coolnickname)
07:30:21 emf_ joins (~emf@2620:10d:c090:400::5:29c4)
07:34:00 × emf quits (~emf@c-73-97-137-43.hsd1.wa.comcast.net) (Ping timeout: 268 seconds)
07:35:11 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
07:37:08 nhatanh02 joins (~satori@123.24.172.30)
07:39:31 dsrt^ joins (~dsrt@207.5.21.20)
07:40:34 Jing joins (~hedgehog@2604:a840:3::103c)
07:40:48 Tuplanolla joins (~Tuplanoll@91-159-69-90.elisa-laajakaista.fi)
07:59:14 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
08:01:28 spaceseller joins (~spacesell@31.147.205.13)
08:02:45 × spaceseller quits (~spacesell@31.147.205.13) (Remote host closed the connection)
08:03:30 chele joins (~chele@user/chele)
08:04:23 × emf_ quits (~emf@2620:10d:c090:400::5:29c4) (Quit: emf_)
08:05:39 × rekahsoft quits (~rekahsoft@cpe0008a20f982f-cm64777d666260.cpe.net.cable.rogers.com) (Ping timeout: 256 seconds)
08:07:14 Akiva joins (~Akiva@user/Akiva)
08:14:19 × jinsun quits (~quassel@user/jinsun) (Read error: Connection reset by peer)
08:15:39 jinsun joins (~quassel@user/jinsun)
08:21:09 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:26:51 × Sgeo quits (~Sgeo@user/sgeo) (Read error: Connection reset by peer)
08:44:24 Dima[m] joins (~reddima10@2001:470:69fc:105::366)
08:52:48 × mbuf quits (~Shakthi@122.178.186.114) (Quit: Leaving)
08:53:47 notzmv joins (~zmv@user/notzmv)
08:54:08 × zaquest quits (~notzaques@5.130.79.72) (Quit: Leaving)
08:54:45 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
08:55:00 chexum joins (~quassel@gateway/tor-sasl/chexum)
08:55:40 zaquest joins (~notzaques@5.130.79.72)
08:59:14 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Quit: = "")
09:03:36 × bontaq quits (~user@ool-45779fe5.dyn.optonline.net) (Ping timeout: 256 seconds)
09:16:45 acidjnk joins (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de)
09:16:47 acidjnk_new joins (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de)
09:16:55 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Read error: Connection reset by peer)
09:17:46 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:18:53 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds)
09:20:40 × kaph quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Read error: Connection reset by peer)
09:24:31 Inst joins (~delicacie@c-98-208-218-119.hsd1.fl.comcast.net)
09:25:57 × Jing quits (~hedgehog@2604:a840:3::103c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
09:26:31 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
09:26:37 Jing joins (~hedgehog@2604:a840:3::103c)
09:32:17 × tzh quits (~tzh@c-24-21-73-154.hsd1.or.comcast.net) (Quit: zzz)
09:33:56 kaph joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
09:35:00 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
09:36:05 ubert joins (~Thunderbi@p200300ecdf0994db19c621579c5ac118.dip0.t-ipconnect.de)
09:36:48 Dima[m] parts (~reddima10@2001:470:69fc:105::366) ()
09:43:05 kspalaiologos joins (~kspalaiol@user/kspalaiologos)
09:46:26 lavaman joins (~lavaman@98.38.249.169)
09:48:29 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
09:50:37 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 240 seconds)
09:54:08 max22- joins (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr)
10:03:39 × phma quits (~phma@host-67-44-208-205.hnremote.net) (Read error: Connection reset by peer)
10:04:53 phma joins (phma@2001:5b0:212a:8aa8:ed3d:67f3:3037:708a)
10:05:54 `2jt joins (~jtomas@153.red-83-53-252.dynamicip.rima-tde.net)
10:08:02 × phma quits (phma@2001:5b0:212a:8aa8:ed3d:67f3:3037:708a) (Read error: Connection reset by peer)
10:09:19 phma joins (phma@2001:5b0:211b:f778:91c:a71f:b4a2:a400)
10:10:59 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
10:13:10 × max22- quits (~maxime@lfbn-ren-1-1026-62.w92-139.abo.wanadoo.fr) (Remote host closed the connection)
10:13:43 × sphynx quits (~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288) (Ping timeout: 268 seconds)
10:14:06 max22- joins (~maxime@2a01cb088335980076b5f89708bbcdbc.ipv6.abo.wanadoo.fr)
10:14:11 sphynx joins (~xnyhps@2a02:2770:3:0:216:3eff:fe67:3288)
10:14:38 gehmehgeh joins (~user@user/gehmehgeh)
10:19:16 × chexum quits (~quassel@gateway/tor-sasl/chexum) (Remote host closed the connection)
10:19:18 __monty__ joins (~toonn@user/toonn)
10:19:36 chexum joins (~quassel@gateway/tor-sasl/chexum)
10:32:08 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
10:33:33 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 256 seconds)
10:33:33 Lord_of_Life_ is now known as Lord_of_Life
10:35:18 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
10:36:09 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
10:36:09 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
10:36:09 wroathe joins (~wroathe@user/wroathe)
10:40:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
10:42:28 zmt01 joins (~zmt00@user/zmt00)
10:43:17 × zmt00 quits (~zmt00@user/zmt00) (Ping timeout: 240 seconds)
10:43:47 × coolnickname quits (uid531864@user/coolnickname) (Quit: Connection closed for inactivity)
10:48:37 × jinsun quits (~quassel@user/jinsun) (Ping timeout: 240 seconds)
10:49:04 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:50:10 jinsun joins (~quassel@user/jinsun)
10:53:30 × phaazon quits (~phaazon@2001:41d0:a:fe76::1) (Quit: WeeChat 2.9)
10:53:48 × kaph quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Read error: Connection reset by peer)
10:53:55 kaph joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
10:53:58 × kaph quits (~kaph@net-2-38-107-19.cust.vodafonedsl.it) (Remote host closed the connection)
10:54:39 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
10:56:37 x88x88x joins (~x88x88x@2001:19f0:5:39a8:5400:3ff:feb6:73cb)
11:00:01 kaph joins (~kaph@net-2-38-107-19.cust.vodafonedsl.it)
11:06:56 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
11:06:56 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
11:06:56 wroathe joins (~wroathe@user/wroathe)
11:07:37 vglfr joins (~vglfr@88.155.23.34)
11:12:05 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
11:13:46 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
11:16:27 ishan_ joins (~ishan@122.172.57.62)
11:17:57 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Remote host closed the connection)
11:18:04 <ishan_> hello
11:19:03 <[exa]> hi!
11:19:50 <ishan_> i have just started learning haskell and i had a small doubt
11:20:32 <ishan_> why does <min "oh" "hello"> return "hello"
11:21:25 <[exa]> because the comparison is lexicographic, and AFAIK 'h' < 'o', at least in ascii
11:22:31 <ishan_> ahhh ok ok makes sense
11:22:35 <ishan_> Thanks!
11:22:38 <[exa]> if you want to compare by lengths, you can construct something like `minOn`
11:22:44 <[exa]> let's try
11:22:55 <[exa]> > minimumOn length ["oh", "hello"]
11:22:56 <lambdabot> error:
11:22:56 <lambdabot> • Variable not in scope:
11:22:57 <lambdabot> minimumOn :: (t0 a0 -> Int) -> [[Char]] -> t
11:23:18 <[exa]> ah noes it requires extra libraries, but you can see it here: https://hackage.haskell.org/package/extra-1.7.10/docs/Data-List-Extra.html#v:minimumOn
11:23:59 <ishan_> ooohh, I'll check it out Thanks !
11:24:40 <[exa]> > let minOn f x y = (if f x < f y then x else y) in minOn length "oh" "hello"
11:24:42 <lambdabot> "oh"
11:24:53 <[exa]> (parens added for clarity only)
11:25:37 <[exa]> > let minOn f x y = (if f x < f y then x else y) in minOn reverse "oh" "hello" -- :]
11:25:38 <lambdabot> "oh"
11:25:46 <Hecate> (which is usually a good thing)
11:38:05 wroathe joins (~wroathe@206.55.188.8)
11:38:05 × wroathe quits (~wroathe@206.55.188.8) (Changing host)
11:38:05 wroathe joins (~wroathe@user/wroathe)
11:40:13 ishan_ parts (~ishan@122.172.57.62) ()
11:42:41 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
11:49:03 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:50:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:51:49 cosimone joins (~user@93-47-228-11.ip115.fastwebnet.it)
11:55:17 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:55:46 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:57:05 × kspalaiologos quits (~kspalaiol@user/kspalaiologos) (Quit: Leaving)
11:57:21 × byorgey quits (~byorgey@155.138.238.211) (Quit: leaving)
11:57:48 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:59:57 × xff0x quits (~xff0x@2001:1a81:5223:a300:d0e9:99bd:8a63:7db6) (Ping timeout: 240 seconds)
12:00:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
12:01:12 xff0x joins (~xff0x@2001:1a81:5223:a300:3ef8:2137:a2ce:8bcc)
12:01:28 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:02:37 burnsidesLlama joins (~burnsides@129.67.168.22)
12:02:47 <raehik> I can't auto derive a Functor instance for a data type that uses a promoted type and a type family, even though it's "clearly" easy to derive one manually (I get "constructor must only use type var as last arg of a data type"). Why is this? I had assumed GHC simplified type family equations eagerly
12:03:06 machinedgod joins (~machinedg@24.105.81.50)
12:03:38 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
12:09:52 <[exa]> raehik: I always assumed that the `deriving` is processed before any type families are even evaluated, but I can't find anything that would confirm/deny that
12:10:00 mc47 joins (~mc47@xmonad/TheMC47)
12:11:39 geranim0 joins (~geranim0@modemcable242.171-178-173.mc.videotron.ca)
12:15:34 byorgey joins (~byorgey@155.138.238.211)
12:16:05 <raehik> [exa]: I seeee. also can't find anything in GHC docs that helps but I would take that, thanks
12:17:17 <geekosaur> possibly standalone deriving would work better?
12:17:45 <[exa]> I see `tcInstDecls` is done in 2 passes so yeah, could help
12:21:01 wyrd_ joins (~wyrd@gateway/tor-sasl/wyrd)
12:21:05 Midjak joins (~Midjak@may53-1-78-226-116-92.fbx.proxad.net)
12:24:53 <raehik> I am doing standalone deriving
12:24:57 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
12:26:28 <raehik> I have a data type with 2 typevars, first is the promoted type, and one of the fields is a type family on both typevars -- which is where the error message is coming from
12:27:49 <raehik> as a human I can look at the equation for the given promoted type and know the actual type of the field, and now the instance is boring
12:28:05 <[exa]> raehik: is there a proof that the functor argument type doesn't get used e.g. as a contravariant in the type family?
12:30:21 <raehik> no I don't think so. but a single equation in the type family would have that proof, and I don't mind writing out multiple derivings for each constructor of the promoted type
12:31:07 <raehik> like "deriving instance Functor (X 'Promoted1)"
12:31:14 xkuru joins (~xkuru@user/xkuru)
12:31:48 <raehik> and say X has a record "PromotedRep p a" where "PromotedRep 'Promoted1 a = a"
12:33:21 <raehik> it all seemed "simple" when I looked at it, so I was curious why GHC was unhappy to derive automatically. (I get that there's usually lots more going on behind the scenes!)
12:34:54 <[exa]> can we have a code sample btw?
12:35:49 <[exa]> and possibly the precise error
12:37:43 SpencerJanssen[m is now known as sjanssen
12:37:50 <raehik> yes sry, let me write a MWE
12:42:04 acidjnk_new3 joins (~acidjnk@p200300d0c7271e938477eafdff400e1e.dip0.t-ipconnect.de)
12:42:08 <raehik> [exa]: https://paste.tomsmeding.com/hKKF0obk (thanks for the help so far)
12:43:25 <[exa]> oic you assume closed world
12:43:36 <raehik> still a Haskell newbie, recently I keep using this pattern, allows me to move more extension work to the type level. very small loss of having to write out some Foldables etc.
12:44:21 <[exa]> could you lift the type family a bit higher to the whole `data X` ?
12:44:37 × acidjnk_new quits (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
12:44:37 × acidjnk quits (~acidjnk@p200300d0c7271e93a97d350f09b0dd65.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
12:45:07 <raehik> ah yeah sure, good point
12:45:16 × hughjfchen quits (~hughjfche@vmi556545.contaboserver.net) (Quit: WeeChat 2.8)
12:45:33 <[exa]> the logical problem I see there is that there's no telling if you give it say `deriving instance Functor (X SomeUnforeseenType)`
12:46:10 <tomsmeding> that doesn't mean that 'deriving instance Funcctor (X 'ChoiceA)' couldn't work
12:46:37 × acidjnk_new3 quits (~acidjnk@p200300d0c7271e938477eafdff400e1e.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
12:46:49 <[exa]> yeah it could, but the data declaration above has a kinda sneaky forall there somewhere, right?
12:48:22 hughjfchen joins (~hughjfche@vmi556545.contaboserver.net)
12:48:23 <raehik> I think this is it? gives me the same errors https://paste.tomsmeding.com/Q6o88q1O
12:49:48 <[exa]> I meant replacing X with the type family, like `type family X c a` that chooses one of 2 data representations
12:50:03 <[exa]> but yeah that will get unwieldy very quickly
12:50:47 Hud joins (~Hud@184-167-074-028.res.spectrum.com)
12:51:06 coot joins (~coot@89-64-85-93.dynamic.chello.pl)
12:53:39 × nhatanh02 quits (~satori@123.24.172.30) (Ping timeout: 256 seconds)
12:53:55 <raehik> hmm I'm not sure exactly how to do that. I need a concrete product type where the other fields stay the same
12:54:05 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 256 seconds)
12:55:29 coolnickname joins (uid531864@user/coolnickname)
12:55:44 <tomsmeding> I think the DeriveFunctor logic in GHC just only handles a particular list of cases, in particular these: https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Tc/Deriv/Functor.hs#L508-537
12:55:46 <raehik> I can kind of do it like this: https://paste.tomsmeding.com/Lda5md1q
12:56:08 <raehik> But now my Functor instance isn't over the dependent/type family field
12:56:19 <tomsmeding> namely type variables, function types, type constructors, applications of supported things, and forall types
12:56:26 <tomsmeding> and type families just happen to not be in this list
12:56:33 <raehik> oh wonderful cheers tomsmeding
12:56:35 <merijn> raehik: Oh
12:56:38 dhouthoo joins (~dhouthoo@178-117-36-167.access.telenet.be)
12:56:43 <merijn> raehik: You can't do thing with partially applied type families
12:56:52 <merijn> raehik: Which is why your standalone deriving does not work
12:56:58 <tomsmeding> the type family is not partially applied
12:57:15 <merijn> tomsmeding: It is in his standalone deriving
12:57:18 <raehik> ahhh I think you're right
12:58:23 <merijn> raehik: Because partially applied type families are equivalent to type level lambda's (which in turn break decidability)
13:00:02 <raehik> merijn: OK, I understand. Thanks very much for all the insights
13:00:37 <raehik> I shall install HLS for next time because I am a total failure at deriving instances without assistance
13:02:38 × burnsidesLlama quits (~burnsides@129.67.168.22) (Remote host closed the connection)
13:06:08 × ishutin quits (~ishutin@92-249-182-7.pool.digikabel.hu) (Ping timeout: 252 seconds)
13:06:42 Guest|52 joins (~Guest|52@92.40.175.189.threembb.co.uk)
13:07:58 ishutin joins (~ishutin@178-164-188-6.pool.digikabel.hu)
13:08:27 wroathe joins (~wroathe@user/wroathe)
13:12:34 ProfSimm joins (~ProfSimm@87.227.196.109)
13:12:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
13:18:24 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
13:19:37 × Guest|52 quits (~Guest|52@92.40.175.189.threembb.co.uk) (Ping timeout: 240 seconds)
13:35:32 slowButPresent joins (~slowButPr@user/slowbutpresent)
13:37:47 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
13:43:31 × burnsidesLlama quits (~burnsides@dhcp168-022.wadham.ox.ac.uk) (Ping timeout: 256 seconds)
13:51:53 Erutuon joins (~Erutuon@user/erutuon)
13:52:28 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
13:53:01 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds)
13:53:54 wootehfoot joins (~wootehfoo@user/wootehfoot)
13:53:54 burnsidesLlama joins (~burnsides@dhcp168-022.wadham.ox.ac.uk)
13:54:52 × `2jt quits (~jtomas@153.red-83-53-252.dynamicip.rima-tde.net) (Ping timeout: 256 seconds)
13:56:08 <lechner> Hi, sometimes the docs on Hackage are not available due to build failures. i then go to the code. Is there a way to fix the docs on Hackage? Thanks! https://hackage.haskell.org/package/zeromq4-patterns
13:56:38 <geekosaur> you could contact the package maintainers and have them upload docs
13:57:07 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
13:57:14 <geekosaur> packages like that are unlikely to ever build and have automatic doc generation because the hackage builders are not going to have every C library under the sun installed
13:59:05 <lechner> isn't this one missing because of a conflict? https://hackage.haskell.org/package/zeromq4-patterns-0.3.1.0/reports/3
14:00:06 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
14:00:13 <geekosaur> "conflict: pkg-config package
14:00:13 <geekosaur> libzmq>=4.0 && <5.0, not found in the pkg-config database"
14:00:25 <geekosaur> which means the C library is not installed
14:01:05 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Killed (NickServ (Forcing logout FinnElija -> finn_elija)))
14:01:05 finn_elija joins (~finn_elij@user/finn-elija/x-0085643)
14:01:05 finn_elija is now known as FinnElija
14:01:20 katsuragi joins (katsuragi@tilde.institute)
14:01:24 <lechner> the Haskell package does not declare it as a praraquisite?
14:01:26 katsuragi parts (katsuragi@tilde.institute) (WeeChat 2.9)
14:01:31 <lechner> prerequisite?
14:01:51 Vajb joins (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi)
14:01:53 <geekosaur> it does, but how is the builder to know how to install it, or worse download and build it?
14:02:16 <lechner> which os is Hackage on?
14:02:19 <geekosaur> also do the hackage maintainers really want their builders to automatically download and install random C libraries?
14:02:52 <geekosaur> does it matter? the system package name rarely matches the pkg-config package name
14:04:17 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
14:04:31 <lechner> if we at debian could keep up with Hackage (and we are presently behind) the issue would not exist
14:05:25 × ubert quits (~Thunderbi@p200300ecdf0994db19c621579c5ac118.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
14:05:37 <lechner> but i suppose it would require Hackage maintainers to package for Debian
14:06:04 <int-e> Hmm, is there a nicer formulation of this? minmax (x:xs) = foldl' (\(a, b) x -> (min a x, max b x)) (x, x) xs (specification is minmax == minimum &&& maximum, but I want to traverse the list only once)
14:07:29 <geekosaur> lechner, you could try asking in #hackage but I'm pretty sure I already know their answer: they're not going to want to automatically install external libraries to make hackage packages build
14:07:38 <geekosaur> even if they reliably could do so
14:08:33 <lechner> why does the documentation require the C library?
14:09:11 <geekosaur> because haddock is in effect a ghc plugin
14:09:39 <int-e> Ah I guess I could rewrite the lambda to (\(a,b) -> min a &&& max b) in the spirit of that specification.
14:09:56 ubert joins (~Thunderbi@p200300ecdf0994dbb267d7c5a67baed4.dip0.t-ipconnect.de)
14:11:01 <geekosaur> and in particular the parts of the Haskell library which interact with the C library won't compile and may not even parse without at least the C headers around
14:11:25 <int-e> @pl \ab -> min (fst ab) &&& max (snd ab)
14:11:25 <lambdabot> ap ((&&&) . min . fst) (max . snd)
14:12:16 <geekosaur> (example, the Haskell X11 libraries extract a bunch of defines from the C X11 header files and define bindings for them)
14:12:37 <lechner> are those used in the docs?
14:12:52 <lechner> i guess they could be
14:12:59 <geekosaur> they can be referenced
14:13:16 <geekosaur> even if they themselves do not have docstrings
14:13:27 nhatanh02 joins (~satori@123.24.172.30)
14:13:35 <geekosaur> you'll get better answers from #hackage but you'll probably like them even less
14:14:42 <lechner> from 40,000 feet, is it better (or even possible) to isolate haddock from ghc or should Hackage marry Debian?
14:14:45 <geekosaur> really, the easiest solution is to have the package maintainer upload their locally generated docs, and cabal makes this easy enough that they should have done so
14:15:06 <geekosaur> haddock used to be separate. it was a maintenance nightmare because the two were always out of sync
14:15:31 <lechner> Hackage could prevent publication without docs
14:15:49 <lechner> as cruel as it sounds
14:16:17 <geekosaur> I am again going to point you at #hackage. I am not #hackage
14:16:32 <geekosaur> but at the very least I think that prevents any win32-specific packages
14:16:32 <lechner> yeah, thanks for taking the timo
14:17:00 <geekosaur> and docs I think have to be uploaded in a separate step after thye package is uploaded
14:17:06 <lechner> i meant without docs uploaded separately
14:17:13 <geekosaur> (again #hackage would know more about this)
14:17:23 <lechner> yeah, and thanks!
14:17:56 lavaman joins (~lavaman@98.38.249.169)
14:20:56 × wootehfoot quits (~wootehfoo@user/wootehfoot) (Quit: Leaving)
14:35:04 shriekingnoise joins (~shrieking@186.137.144.80)
14:36:02 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
14:36:02 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
14:36:02 wroathe joins (~wroathe@user/wroathe)
14:38:46 <int-e> Oh cool, I didn't know that data Foo = Bar :?: Baz (deriving Show) and data Foo = (:?:) Bar Baz result in different Show instances
14:39:18 <int-e> err, the second one was supposed to also derive (Show), and I messed up the parentheses.
14:41:03 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
14:44:05 <geekosaur> that's documented in the Report, I think
14:44:13 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
14:46:30 vysn joins (~vysn@user/vysn)
14:48:37 × vglfr quits (~vglfr@88.155.23.34) (Ping timeout: 240 seconds)
14:49:59 vglfr joins (~vglfr@88.155.23.34)
14:51:16 <int-e> Yeah it kind of does (the language[1] around this could be clearer though; it says "If the constructor is defined to be an infix operator" which apparently is to be understood to refer to the "(infix conop)" production in[2] [1]https://www.haskell.org/onlinereport/haskell2010/haskellch11.html#x18-18600011.4 [2]https://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-690004.2.1
14:51:56 <int-e> anyway, I've read large parts of the report but I don't have it memorized :)
14:53:48 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
14:57:31 <lechner> For those who read Czech, I think I found a copy of "Learn You A Haskell" http://naucte-se.haskell.cz/
14:57:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
14:58:37 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Ping timeout: 268 seconds)
15:06:24 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
15:06:24 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
15:06:24 wroathe joins (~wroathe@user/wroathe)
15:07:41 × max22- quits (~maxime@2a01cb088335980076b5f89708bbcdbc.ipv6.abo.wanadoo.fr) (Ping timeout: 252 seconds)
15:09:39 k` joins (~user@152.1.137.158)
15:10:09 <k`> Does anyone have an example of application or library code using `stimes` ?
15:11:01 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
15:12:15 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
15:13:32 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
15:13:32 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
15:13:32 wroathe joins (~wroathe@user/wroathe)
15:13:42 <merijn> I used it for AoC :p
15:14:09 <merijn> k`: Any specific reason for the question? :p
15:16:43 × Hud quits (~Hud@184-167-074-028.res.spectrum.com) (Quit: Client closed)
15:17:25 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Ping timeout: 240 seconds)
15:18:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
15:18:23 <k`> merjin: Just curious whether it sees any use. Seems like a lot of work, thought, and lines of GHC core have gone into it.
15:19:52 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 256 seconds)
15:21:06 × wyrd_ quits (~wyrd@gateway/tor-sasl/wyrd) (Ping timeout: 276 seconds)
15:21:20 <merijn> k`: Not that much, I think? It's handful of lines?
15:22:09 <merijn> And it's a pretty big jump in efficiency
15:22:33 douglaswinship joins (~douglaswi@78.40.148.180)
15:23:43 <k`> merjin: Oh yeah, no question there. Just wondering efficiency of _what_.
15:24:12 LiaoTao joins (~LiaoTao@gateway/tor-sasl/liaotao)
15:24:43 <merijn> k`: If you did AoC, I did my first (naive) initial expansion by repeated application of the expansion function, using stimes to make that
15:24:52 <merijn> k`: (spoilers, obviously) https://github.com/merijn/AdventOfCode/blob/master/Day14.hs#L71-L78
15:26:24 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
15:26:24 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
15:26:24 wroathe joins (~wroathe@user/wroathe)
15:29:07 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
15:29:51 <k`> merijn: Oh, yeah, the `stimes n f x = stimes n (f x)` instance is neat and makes good use of the abstraction.
15:30:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
15:30:53 <merijn> Probably some kinda tree builder would too
15:30:59 <k`> I guess it could also improve the efficiency of folding a 'bag' structure.
15:31:03 × coot quits (~coot@89-64-85-93.dynamic.chello.pl) (Quit: coot)
15:32:25 <merijn> k`: Pretty sure the main reason stimes exists is because it's neat and fairly easy to implement, so might as well! And then leave it up to Semigroup users to find instances where it's useful :p
15:32:52 <k`> newtype Bag a = Bag [(Int, a)]; instance Foldable Bag where foldMap f (Bag xs) = foldMap (\ (n, x) -> stimes n (f x)) xs
15:33:14 <merijn> k`: Also, keep in mind that Semigroup was originally in a different library that "basically every possible operation/feature of semigroups you could think off"
15:33:58 <merijn> It was only moved into base fairly recently to make Semigroup a superclass of Monoid, but kept all the minor features so backwards compat is easier
15:34:16 <k`> merijn: Oh, did it start as one of ekmett's libraries?
15:34:48 <merijn> Yeah, in semigroups
15:35:56 <k`> Suddenly it all makes sense :P
15:36:05 Sgeo joins (~Sgeo@user/sgeo)
15:36:52 <merijn> The module was just copy pasted into base and the original package changed to re-export the base module
15:37:07 <k`> Right, don't want to be disruptive.
15:37:10 <geekosaur> there's also the whole mathematical semigroup thing
15:38:00 `2jt joins (~jtomas@153.red-83-53-252.dynamicip.rima-tde.net)
15:38:23 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480::41)
15:38:37 <k`> Honestly, though, I'd rather have `Semigroup` with methods like `commutative :: Maybe (Dict (Commutative a))` and `knownStrictFirst :: Proxy a -> Bool` .
15:39:00 <k`> Is that considered bad API design in Haskell?
15:41:10 <k`> `stimes | Just Dict <- idempotent :: Maybe (Dict (Idempotent a)) = .. | otherwise = ...`
15:42:16 max22- joins (~maxime@2a01cb0883359800b8731b08b5ca29d9.ipv6.abo.wanadoo.fr)
15:44:54 <k`> `foldMap f | knownStrictSecond (Proxy :: Proxy b) = foldl' (\ z x -> z <> f x) mempty | otherwise = foldr (\ x z -> f x <> z) mempty`
15:45:24 <k`> Is that all too kludgy?
15:45:25 × xff0x quits (~xff0x@2001:1a81:5223:a300:3ef8:2137:a2ce:8bcc) (Ping timeout: 240 seconds)
15:46:08 <merijn> I think so? Doesn't seem to buy you much?
15:46:20 <merijn> k`: Like, what is it supposed to improve over the current thing?
15:46:25 xff0x joins (~xff0x@2001:1a81:5223:a300:e304:e5b3:98c9:ca79)
15:46:51 <geekosaur> one would suspect that if it were worth the effort ekmett would have already done it :)
15:46:52 zincy_ joins (~zincy@host86-151-99-97.range86-151.btcentralplus.com)
15:49:50 <k`> Fold with a commutative semigroup in the wrong direction and you can get massively worse performance for no reason at all. For example foldMapping a `Map` or `Set` to `Any` or `All` requires evaluating about half the map or set. But if you knew they were commutative, you could just fold with the dual on the appropriate half.
15:50:17 <merijn> k`: You can just do that yourself in the stimes definition, though?
15:50:32 <k`> Not talking about `stimes` here.
15:51:06 bontaq joins (~user@ool-45779fe5.dyn.optonline.net)
15:51:39 <merijn> tbh, I think that's not nearly frequent enough to incure the API complexity you suggest
15:52:57 × zincy_ quits (~zincy@host86-151-99-97.range86-151.btcentralplus.com) (Ping timeout: 240 seconds)
15:54:43 <k`> Assuming GHC always compiles `foldMap` of a strict semigroup to the equivalent of `foldMap'`, I agree.
15:56:39 <k`> Much like `stimes` it's complexity that you can ignore if you like. And there's not really code to get wrong. You just say `commutative = Just Dict` when you know it's commutative. Or `case commutative :: a of Just Dict -> Just Dict; Nothing -> Nothing`.
15:56:57 × vglfr quits (~vglfr@88.155.23.34) (Ping timeout: 240 seconds)
15:57:15 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
15:57:20 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
15:58:07 <k`> But yeah, the benefit probably doesn't outweigh the complexity.
15:58:14 mbuf joins (~Shakthi@171.61.196.206)
16:03:37 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
16:04:30 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
16:04:30 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
16:04:30 wroathe joins (~wroathe@user/wroathe)
16:07:19 × dsrt^ quits (~dsrt@207.5.21.20) (Ping timeout: 256 seconds)
16:07:48 uam joins (uid360535@id-360535.hampstead.irccloud.com)
16:09:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
16:09:27 spaceseller joins (~spacesell@31.147.205.13)
16:10:28 shapr joins (~user@98.54.1.142)
16:11:32 × jgeerds quits (~jgeerds@55d4ac73.access.ecotel.net) (Ping timeout: 240 seconds)
16:11:53 zyzzyxdonta joins (~zyzzyxdon@ip5f5aa13a.dynamic.kabel-deutschland.de)
16:12:11 zyzzyxdonta parts (~zyzzyxdon@ip5f5aa13a.dynamic.kabel-deutschland.de) ()
16:12:30 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
16:12:30 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
16:12:30 wroathe joins (~wroathe@user/wroathe)
16:16:32 × shapr quits (~user@98.54.1.142) (Ping timeout: 256 seconds)
16:20:25 × Vajb quits (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer)
16:20:41 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
16:21:10 Vajb joins (~Vajb@2001:999:50:e6be:1e98:9376:d93e:4506)
16:21:17 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
16:22:45 CiaoSen joins (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de)
16:24:23 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
16:24:58 × mmalter quits (~mmalter@88.126.10.237) (Read error: Connection reset by peer)
16:25:37 × n3rdy1 quits (~n3rdy1@2600:1700:4570:3480::41) (Ping timeout: 240 seconds)
16:28:57 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
16:29:58 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
16:29:58 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
16:29:58 wroathe joins (~wroathe@user/wroathe)
16:33:07 sirlensalot joins (~sirlensal@ool-44c5f8c9.dyn.optonline.net)
16:33:23 × dextaa quits (~DV@user/dextaa) (Ping timeout: 256 seconds)
16:35:05 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
16:37:38 n3rdy1 joins (~n3rdy1@2600:1700:4570:3480:1b88:50f:dae0:9293)
16:41:37 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
16:41:42 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
16:47:52 justsomeguy joins (~justsomeg@user/justsomeguy)
16:48:21 × spaceseller quits (~spacesell@31.147.205.13) (Quit: Leaving)
16:52:45 × Jing quits (~hedgehog@2604:a840:3::103c) (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:54:48 doyougnu joins (~doyougnu@c-73-25-202-122.hsd1.or.comcast.net)
16:56:10 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
16:56:28 ProfSimm joins (~ProfSimm@87.227.196.109)
17:00:26 × dhouthoo quits (~dhouthoo@178-117-36-167.access.telenet.be) (Quit: WeeChat 3.4)
17:01:32 × coolnickname quits (uid531864@user/coolnickname) (Quit: Connection closed for inactivity)
17:03:25 × shailangsa_ quits (~shailangs@host86-162-150-202.range86-162.btcentralplus.com) (Ping timeout: 240 seconds)
17:04:35 moshet joins (~moshet@190.131.248.18)
17:05:07 × [itchyjunk] quits (~itchyjunk@user/itchyjunk/x-7353470) (Ping timeout: 256 seconds)
17:09:12 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
17:09:12 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
17:09:12 wroathe joins (~wroathe@user/wroathe)
17:13:52 econo joins (uid147250@user/econo)
17:13:55 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
17:14:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
17:16:43 Akiva joins (~Akiva@user/Akiva)
17:19:03 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
17:19:49 × notzmv quits (~zmv@user/notzmv) (Ping timeout: 240 seconds)
17:19:55 widelec-BB joins (~widelec@cpe-109-207-144-181.docsis.tczew.net.pl)
17:21:42 dextaa joins (~DV@user/dextaa)
17:26:57 epolanski joins (uid312403@id-312403.helmsley.irccloud.com)
17:37:58 × wyrd quits (~wyrd@gateway/tor-sasl/wyrd) (Quit: leaving)
17:38:33 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
17:40:49 × Codaraxis quits (~Codaraxis@user/codaraxis) (Ping timeout: 256 seconds)
17:42:16 simendsjo joins (~user@84.211.91.241)
17:43:15 wyrd joins (~wyrd@gateway/tor-sasl/wyrd)
17:44:06 vysn joins (~vysn@user/vysn)
17:44:10 python476 joins (~user@88.160.31.174)
17:44:46 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Remote host closed the connection)
17:45:17 × machinedgod quits (~machinedg@24.105.81.50) (Remote host closed the connection)
17:46:55 emf joins (~emf@2620:10d:c090:400::5:f0df)
17:48:21 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
17:48:24 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
17:48:39 ProfSimm joins (~ProfSimm@87.227.196.109)
17:48:53 machinedgod joins (~machinedg@24.105.81.50)
18:00:37 shailangsa joins (~shailangs@host86-162-150-202.range86-162.btcentralplus.com)
18:00:48 × justsomeguy quits (~justsomeg@user/justsomeguy) (Ping timeout: 256 seconds)
18:01:48 Feuermagier joins (~Feuermagi@user/feuermagier)
18:02:00 Feuermagier_ joins (~Feuermagi@213.178.26.41)
18:02:16 × Feuermagier_ quits (~Feuermagi@213.178.26.41) (Remote host closed the connection)
18:08:01 × Akiva quits (~Akiva@user/Akiva) (Ping timeout: 256 seconds)
18:08:29 × ProfSimm quits (~ProfSimm@87.227.196.109) (Remote host closed the connection)
18:08:47 ProfSimm joins (~ProfSimm@87.227.196.109)
18:11:50 <polyphem> /quit
18:11:53 × polyphem quits (~rod@2a02:810d:640:776c:e450:3ca3:b389:687a) (Quit: WeeChat 3.3)
18:13:04 polyphem joins (~rod@2a02:810d:640:776c:e450:3ca3:b389:687a)
18:15:36 × benin quits (~benin@183.82.176.241) (Quit: The Lounge - https://thelounge.chat)
18:17:18 × uam quits (uid360535@id-360535.hampstead.irccloud.com) (Quit: Connection closed for inactivity)
18:18:44 × mbuf quits (~Shakthi@171.61.196.206) (Quit: Leaving)
18:22:20 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 256 seconds)
18:23:45 × neurocyte09 quits (~neurocyte@user/neurocyte) (Read error: Connection reset by peer)
18:24:32 neurocyte091 joins (~neurocyte@IP-212232089218.dynamic.medianet-world.de)
18:24:32 × neurocyte091 quits (~neurocyte@IP-212232089218.dynamic.medianet-world.de) (Changing host)
18:24:32 neurocyte091 joins (~neurocyte@user/neurocyte)
18:25:35 xb0o2 joins (~xb0o2@user/xb0o2)
18:27:04 dsrt^ joins (~dsrt@207.5.21.20)
18:27:15 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:29:21 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
18:38:37 × deadmarshal quits (~deadmarsh@95.38.116.103) (Ping timeout: 240 seconds)
18:39:13 wroathe joins (~wroathe@user/wroathe)
18:41:07 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
18:44:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
18:46:33 Akiva joins (~Akiva@user/Akiva)
18:46:34 <EvanR> what is a good name for this operation, splitAt? :: SplitLocation -> T -> (T,T) such that cat the two results always equals the original
18:46:57 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds)
18:47:38 <monochrom> splitAt is a good name. It's why it's already taken. :)
18:48:06 <EvanR> typeclass to the rescue
18:48:26 × emf quits (~emf@2620:10d:c090:400::5:f0df) (Quit: emf)
18:50:35 <EvanR> class Monoid a => Split t a | a -> t where
18:50:45 <EvanR> Semigroup
18:51:25 × xlei quits (~akans@pool-68-129-84-118.nycmny.fios.verizon.net) (Quit: ZNC 1.8.2 - https://znc.in)
18:52:43 xlei joins (~akans@pool-68-129-84-118.nycmny.fios.verizon.net)
18:53:23 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
18:56:37 <EvanR> splitAt :: t -> a -> (a,a) -- fst (splitAt t x) <> snd (splitAt t x) = x
18:57:07 × noddy quits (~user@user/noddy) (Quit: WeeChat 3.4)
18:57:52 × widelec-BB quits (~widelec@cpe-109-207-144-181.docsis.tczew.net.pl) (Quit: )
18:58:38 <EvanR> > splitAt 3 [0..9]
18:58:39 <lambdabot> ([0,1,2],[3,4,5,6,7,8,9])
18:58:44 <EvanR> ok good
19:01:10 widelec-BB joins (~widelec@cpe-109-207-144-181.docsis.tczew.net.pl)
19:01:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:02:18 noddy joins (~user@user/noddy)
19:03:25 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
19:04:16 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
19:05:57 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
19:06:32 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:10:08 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Remote host closed the connection)
19:13:37 cheater joins (~Username@user/cheater)
19:16:25 Codaraxis joins (~Codaraxis@user/codaraxis)
19:17:12 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
19:17:35 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
19:23:25 × jespada quits (~jespada@87.74.32.18) (Read error: Connection reset by peer)
19:23:37 jespada_ joins (~jespada@87.74.32.18)
19:24:56 jgeerds joins (~jgeerds@55d4ac73.access.ecotel.net)
19:25:54 <EvanR> shoot the semigroup doesn't always correspond to cat
19:27:56 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
19:29:27 notzmv joins (~zmv@user/notzmv)
19:30:17 geekosaur joins (~geekosaur@xmonad/geekosaur)
19:38:10 kupi joins (uid212005@id-212005.hampstead.irccloud.com)
19:42:34 simendsjo joins (~user@84.211.91.241)
19:52:37 × moshet quits (~moshet@190.131.248.18) (Ping timeout: 240 seconds)
19:59:14 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
20:05:28 × juhp quits (~juhp@128.106.188.82) (Ping timeout: 256 seconds)
20:07:06 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Remote host closed the connection)
20:07:27 zincy_ joins (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d)
20:08:11 juhp joins (~juhp@128.106.188.82)
20:15:35 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
20:15:35 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
20:15:35 wroathe joins (~wroathe@user/wroathe)
20:16:08 <EvanR> is there a more efficient ordering for IntMap.intersection if one of the IntMaps is very small or empty
20:16:32 kuribas joins (~user@ptr-25vy0i9v3nmgstpk1ug.18120a2.ip6.access.telenet.be)
20:17:36 <EvanR> in lambdabot I think I'm observing no
20:18:53 <lechner> Hi, with this code receiving and sending ZeroMQ traffic, I eventually see "file descriptor 1024 out of range for select (0--1024). Recompile with -threaded to work around this." dsal once said there was an issue with the "finalizer". Am I running out of file descriptors? Thanks! https://paste.tomsmeding.com/8ofcOqTl
20:19:57 <EvanR> oof
20:20:11 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
20:20:30 <EvanR> (compiling WITHOUT -threaded is kind of suspicious imho)
20:21:11 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
20:21:41 <monochrom> EvanR: The doc says "O(m+n)" so I don't think there is a difference between "intersect x y" and "intersect y x".
20:22:39 <EvanR> > IM.intersect IM.empty IM.empty
20:22:40 <lambdabot> error:
20:22:40 <lambdabot> Not in scope: ‘IM.intersect’
20:22:40 <lambdabot> Perhaps you meant ‘IM.intersection’ (imported from Data.IntMap)
20:22:45 <EvanR> > IM.intersection IM.empty IM.empty
20:22:46 <lambdabot> fromList []
20:22:50 <EvanR> > IM.intersection IM.empty (IM.fromList (zip [0..] [0.100000000]))
20:22:51 <lambdabot> fromList []
20:23:03 <EvanR> fast... I hope
20:27:50 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection)
20:27:50 × gentauro quits (~gentauro@user/gentauro) (Read error: Connection reset by peer)
20:28:08 <monochrom> That one is probably hand-coded :)
20:28:19 <monochrom> > IM.intersection IM.empty undefined
20:28:20 <lambdabot> fromList []
20:28:31 <EvanR> > IM.intersection (IM.singleton (4,9)) (IM.fromList (zip [0..] [0.100000000]))
20:28:32 <lambdabot> error:
20:28:32 <lambdabot> • Couldn't match expected type ‘IM.IntMap a’
20:28:32 <lambdabot> with actual type ‘a0 -> IM.IntMap a0’
20:28:39 <EvanR> > IM.intersection (IM.singleton 4 9) (IM.fromList (zip [0..] [0.100000000]))
20:28:40 <lambdabot> fromList []
20:29:01 <monochrom> That can't be right...
20:29:06 <EvanR> wut
20:30:42 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
20:30:51 <travv0> > > IM.fromList (zip [0..] [0.100000000])
20:30:52 <lambdabot> <hint>:1:1: error: parse error on input ‘>’
20:30:57 <travv0> > IM.fromList (zip [0..] [0.100000000])
20:30:58 <lambdabot> fromList [(0,0.1)]
20:31:03 <travv0> was that intentional?
20:31:11 <monochrom> Oh haha, good eyes.
20:31:12 <EvanR> no
20:31:14 <EvanR> wth
20:31:50 <EvanR> > IM.intersection IM.empty (IM.fromList (zip [0..] [0..100000000]))
20:31:51 <lambdabot> fromList []
20:32:04 <EvanR> > IM.intersection (IM.singleton 4 9) (IM.fromList (zip [0..] [0..100000000]))
20:32:09 <EvanR> dammit
20:32:10 <lambdabot> mueval-core: Time limit exceeded
20:32:15 <xerox> [0.100000] is the break;break; of haskell
20:33:28 gentauro joins (~gentauro@user/gentauro)
20:34:15 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
20:34:15 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
20:34:15 wroathe joins (~wroathe@user/wroathe)
20:34:24 <EvanR> I guess in the case of small intmap it's better to use a mapWithKey and lookup
20:35:49 × python476 quits (~user@88.160.31.174) (Ping timeout: 240 seconds)
20:39:17 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
20:43:11 <dmj`> are there no ffi bindings to libc?
20:44:22 <Hecate> gnu libc? sweet hell you don't want that :')
20:44:42 <polyphem> strcpy is nice
20:44:43 deadmarshal joins (~deadmarsh@95.38.116.103)
20:44:53 <EvanR> it's pretty easy to ffi bind individual standard c functions
20:45:13 <EvanR> if you need 1 or 2
20:45:55 <EvanR> I can't wait until my haskell program has security hole due to strcpy xD
20:54:15 × cosimone quits (~user@93-47-228-11.ip115.fastwebnet.it) (Remote host closed the connection)
20:58:06 cosimone joins (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20)
20:59:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:01:01 × Feuermagier quits (~Feuermagi@user/feuermagier) (Ping timeout: 240 seconds)
21:02:06 justsomeguy joins (~justsomeg@user/justsomeguy)
21:03:16 pavonia joins (~user@user/siracusa)
21:04:23 × simendsjo quits (~user@84.211.91.241) (Ping timeout: 256 seconds)
21:04:37 × waleee quits (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4) (Ping timeout: 240 seconds)
21:04:44 machinedgod joins (~machinedg@24.105.81.50)
21:06:04 waleee joins (~waleee@2001:9b0:21d:fc00:398f:b003:b90d:acf4)
21:10:28 takuan joins (~takuan@178-116-218-225.access.telenet.be)
21:11:03 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
21:13:26 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
21:14:08 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:14:35 × nhatanh02 quits (~satori@123.24.172.30) (Ping timeout: 256 seconds)
21:15:25 takuan joins (~takuan@178-116-218-225.access.telenet.be)
21:15:32 × burnsidesLlama quits (~burnsides@dhcp168-022.wadham.ox.ac.uk) (Remote host closed the connection)
21:16:59 × zincy_ quits (~zincy@2a00:23c8:970c:4801:8d43:554e:d62c:915d) (Remote host closed the connection)
21:20:09 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:22:38 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
21:22:51 × `2jt quits (~jtomas@153.red-83-53-252.dynamicip.rima-tde.net) (Remote host closed the connection)
21:25:02 <fendor[m]> I miss the bot that reported that a library had a new release ☹️
21:25:23 <int-e> that was hackagebot, hmm
21:26:16 <int-e> (maybe I misremember the nick)
21:26:25 <geekosaur> it was hackagebot
21:26:29 × cheater quits (~Username@user/cheater) (Ping timeout: 256 seconds)
21:26:44 <geekosaur> vanished maybe a month before freenode blew up
21:27:30 emf joins (~emf@2620:10d:c090:400::5:9fd9)
21:28:30 <geekosaur> always reported with /me, iirc
21:32:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
21:32:14 cheater joins (~Username@user/cheater)
21:34:48 × k` quits (~user@152.1.137.158) (Remote host closed the connection)
21:35:10 dudek joins (~dudek@185.150.236.156)
21:37:21 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
21:38:37 <dmj`> If GHC lost existential types, how sorely would they be missed
21:39:16 <maralorn> What is the most common List/Seq like datatype which is strict in the elements?
21:39:33 <Heffalump[m]> dmj': Lose what exactly? Just the exists keyword, or existentials via GADTs?
21:40:38 <Cale> Or like, the syntax that uses forall in a data declaration outside a constructor?
21:41:25 benin joins (~benin@183.82.176.241)
21:41:57 <Cale> We get a decent amount of use out of Some.
21:42:03 <Cale> (i.e. https://hackage.haskell.org/package/some-1.0.3/docs/Data-Some.html )
21:42:23 <Cale> Ironically, it's not defined using existentials :D
21:43:15 <EvanR> oh nice
21:43:29 <Cale> (It originally was, but was changed to be a newtype along with pattern synonyms that safely unsafeCoerce)
21:45:03 <Cale> But the only reason for that is that you're not allowed to define existential newtypes in GHC for no particular reason
21:47:37 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
21:47:37 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
21:47:37 wroathe joins (~wroathe@user/wroathe)
21:48:05 × cosimone quits (~user@2001:b07:ae5:db26:c24a:d20:4d91:1e20) (Ping timeout: 268 seconds)
21:48:44 <EvanR> I just ran into that, it's very annoying
21:48:47 acidjnk_new3 joins (~acidjnk@p200300d0c7271e249cd77df40fde183d.dip0.t-ipconnect.de)
21:48:51 acidjnk joins (~acidjnk@p200300d0c7271e249cd77df40fde183d.dip0.t-ipconnect.de)
21:48:57 <EvanR> I see you can get around it with GHC.Any
21:50:37 × johnw quits (~johnw@76-234-69-149.lightspeed.frokca.sbcglobal.net) (Quit: ZNC - http://znc.in)
21:50:46 <Cale> Of course, if you need a class dictionary packed in there, that's not possible with a newtype
21:53:42 Sgeo_ joins (~Sgeo@user/sgeo)
21:56:13 <monochrom> If GHC lost existential types, we would restore it with rank-2 types.
21:56:23 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 256 seconds)
21:57:06 <monochrom> I don't think of existential typing as an anti-pattern, but even if you do, a direct anti-pattern is still less bad than an encoded anti-pattern.
21:57:54 <xerox> not an existential threat
21:58:09 <monochrom> haha
22:00:52 Gurkenglas joins (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de)
22:13:25 shapr joins (~user@2601:7c0:c202:5190:e39f:2980:57ec:6939)
22:14:55 <dmj`> Cale, Heffalump[m]: I think if we lost existentials, it'd be a loss of existential quantification, existentials introduced via GADTs, polymorphic recursion and maybe RankNTypes too ...
22:15:06 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:15:28 <Heffalump[m]> dmj`: I'd be very very unhappy then :-)
22:16:02 <dmj`> Heffalump[m]: on a scale of 1-10, how unhappy would you be
22:17:39 <geekosaur> don't we lose IO then? (IO being built on top of ST which uses an existential)
22:17:45 <shapr> dmj`: existential crisis?
22:18:08 <geekosaur> yeh, methinks this sounds like sa very violent reaction to something
22:19:04 <dmj`> geekosaur: didn't we have I/O before existentials? I don't see them in the haskell 2010 report at least.
22:19:11 <dmj`> maybe I'm blind though
22:19:51 <Heffalump[m]> I don't think GHC's implementation of the Prelude has ever been pure H98/H2010. It is entitled to use extensions (or the old "-fglasgow-exts") internally to its own libraries.
22:20:03 <monochrom> runST needs rank-2 or existential. But IO does not have to go through ST.
22:22:39 <geekosaur> I guess IO is the same machinery but uses a non-existential in place of the existential
22:22:57 <geekosaur> this still sounds pretty violent to me
22:25:05 <monochrom> If you lose rank-2, then you lose "(Functor f, Monad g) => (forall x. f x -> g x) -> Free f a -> g a", which is a very important thing for free monads.
22:25:44 <monochrom> You lose all of lens and optics etc.
22:25:49 × CiaoSen quits (~Jura@p200300c957347b002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 240 seconds)
22:27:34 <monochrom> "violent" is not the first response that comes to my mind, but "dumbing down", "watering down", "back to stone age" is.
22:27:41 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
22:27:51 <dmj`> monochrom: It might be possible to retain RankNTypes w/o existentials... but one could argue lens and optics were solutions to get around GHC's record system lacking row polymorphism.
22:28:25 <dmj`> monochrom: but yea, you'd lose monad morphism libraries
22:29:37 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 240 seconds)
22:31:28 × xb0o2 quits (~xb0o2@user/xb0o2) (Quit: Client closed)
22:31:37 <monochrom> "data X = forall a. MkX foo" ≅ "newtype Y = MkY (forall r. (forall a. foo -> r) -> r)"
22:32:20 hyiltiz joins (~quassel@31.220.5.250)
22:33:52 <dmj`> existentials also block monomorphization from happening iiuc
22:37:36 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
22:37:36 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
22:37:36 wroathe joins (~wroathe@user/wroathe)
22:38:42 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
22:41:09 × hyiltiz quits (~quassel@31.220.5.250) (Ping timeout: 256 seconds)
22:41:48 <dmj`> monochrom: oh okay, maybe not then
22:42:26 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 256 seconds)
22:43:55 <dmj`> existentials inhibit type inference too
22:44:28 <[itchyjunk]> Is a list of empty tupils represented as [(,)] ? or just []
22:44:46 <geekosaur> [] like any other empty list
22:44:54 <[itchyjunk]> makes sense
22:45:02 <geekosaur> (,) is a tuple constructor
22:45:04 <geekosaur> :t (,)
22:45:06 <lambdabot> a -> b -> (a, b)
22:45:08 hyiltiz joins (~quassel@31.220.5.250)
22:45:15 <Heffalump[m]> what exactly do you mean by "empty tuple"? Do you mean "List of empty tuples" or "Empty list of tuples"?
22:46:59 <kuribas> [itchyjunk]: the type or the value?
22:47:09 <[itchyjunk]> the value
22:47:37 × deadmarshal quits (~deadmarsh@95.38.116.103) (Ping timeout: 240 seconds)
22:47:42 <kuribas> [] is a an empty list of tuples.
22:48:00 <kuribas> I don't know what an "empty tuple" is.
22:48:02 <dmj`> shapr: it would be an existential crisis :)
22:48:05 <geekosaur> ()
22:48:47 <monochrom> The empty tuple is (), aka unit.
22:49:05 <monochrom> [(), (), (), ()] is an example list of empty tuples.
22:49:14 <[itchyjunk]> this seems to work but i am unsure about sizes of [a] [b]
22:49:15 <[itchyjunk]> https://bpa.st/GWEQ
22:49:24 <monochrom> Not to be confused with empty list of tuples.
22:49:24 <[itchyjunk]> Do I just assume the size provided is always equal?
22:49:52 <geekosaur> try it out with both the Prelude's zip and yours
22:50:05 × kuribas quits (~user@ptr-25vy0i9v3nmgstpk1ug.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
22:50:16 <geekosaur> (you can make a smallish change which removes that requirement)
22:50:25 <[itchyjunk]> uh my breaks , but the zip works
22:51:04 <[itchyjunk]> i think i know, myZip [a] [] amd myZip [] [b] should be addressed mamybe
22:51:17 <geekosaur> almost
22:51:26 <geekosaur> [a] matches the 1-item list
22:51:42 <[itchyjunk]> ah
22:51:56 <[itchyjunk]> myZip x [] and myZip [] y maybe
22:52:06 <geekosaur> yes
22:52:23 <geekosaur> and for the final trick, most of us would write _ in place of the binding that won't be used
22:52:23 <Inst> can i have some haskell help with a really stupid example?
22:52:33 <[itchyjunk]> hurrah, myZip = Zip now, i think
22:52:45 <geekosaur> Inst, don't ask to ask, just ask
22:52:55 <[itchyjunk]> ah myZip _ [] = []
22:53:01 <Inst> quicksort a@(x:xs) = ((if null a then [] else quicksort [ k | k <- xs , k <= x ] ++ [x] ++ quicksort [k | k <- xs , k>x]) :: Ord a => [a])
22:53:07 <Inst> this isn't typechecking properly
22:53:59 <Inst> so i know you can force a type signature on a specific expression
22:54:01 <Inst> https://cdn.discordapp.com/attachments/505367988166197268/928781846425247795/unknown.png
22:54:22 <Inst> but this is really complex, 1, 2, it's not working with an inline type signature
22:54:26 <geekosaur> you can but it doesn't generally do what you think
22:54:33 <Inst> why not?
22:54:54 <Inst> EvanR, might you be interested in helping?
22:55:01 <geekosaur> the `a` you use there is not related to any other `a` and in particuloar not to one in your type signature if any
22:55:24 <geekosaur> (unless you use ScopedTypeVariables and "declare" the type variables as shared)
22:56:21 <geekosaur> so basically6 you can use type ascriptions anywhere but they're not very useful unless concrete, i.e. no type variables
22:56:30 <Inst> i took the type signature out, i'm just treating it as an exercise to figure out how to arbitrarily jam type signatures
22:56:43 <Inst> okay, hold on
22:56:53 jakalx joins (~jakalx@base.jakalx.net)
22:57:26 <Inst> it works if i force Int
22:58:21 <geekosaur> right
22:58:31 <Inst> why is this, geekosaur? I really don't get why Haskell wants to be this way
22:58:43 <geekosaur> because that's how it was defined
22:59:06 <geekosaur> there are a bunch of people who wish it hadn't been, but that's what happened. you need an extension and a forall to change it
22:59:15 <geekosaur> I already mentioed the extension above
22:59:15 <Inst> no, but wouldn't it be more flexible if you could use the 5 liner bubblesort and have it be completely complete, including through the use of a type variable type signature?
22:59:22 <Inst> i see
22:59:25 <Inst> i don't really understand
22:59:53 <monochrom> You can always write a top-level type sig, instead of local type sigs.
23:01:01 <dmj`> Inst: a@(x:xs) will never match on the empty list, so null a will never be called, it will pattern match failure instead
23:01:13 <Inst> thanks
23:02:31 xb0o2 joins (~xb0o2@user/xb0o2)
23:03:52 deadmarshal joins (~deadmarsh@95.38.112.110)
23:03:54 × tromp quits (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…)
23:04:25 johnw joins (~johnw@2607:f6f0:3004:1:c8b4:50ff:fef8:6bf0)
23:04:53 tromp joins (~textual@dhcp-077-249-230-040.chello.nl)
23:05:51 <Inst> monochrom: more about flexing
23:06:00 <dmj`> geekosaur: fclabels didn't need existentials :)
23:07:14 <monochrom> What did fclabels need?
23:07:35 <Inst> gah, maybe i'll try again later
23:07:36 <Inst> too tired
23:08:14 <dmj`> monochrom: nothing basically, but chooses to use TypeOperators
23:14:12 <[itchyjunk]> myMap :: (a -> b) -> [a] -> [b], does this type signature look okay?
23:14:31 <monochrom> Yes.
23:14:42 <[itchyjunk]> I don't understand the error I am getting : https://bpa.st/Z42Q
23:15:24 <monochrom> Cannot reproduce.
23:15:38 sonny joins (~sonny@bras-base-london1483w-grc-32-70-52-175-166.dsl.bell.ca)
23:16:56 <geekosaur> I feel like you used parentheses where you weren't supposed to. Show how you're invoking it?
23:17:15 <[itchyjunk]> *Main> myMap +1 [1..5]
23:17:21 <[itchyjunk]> :x
23:17:25 <monochrom> myMap (+ 1) [1..5]
23:17:26 × Vajb quits (~Vajb@2001:999:50:e6be:1e98:9376:d93e:4506) (Remote host closed the connection)
23:17:28 <sonny> section requires parens right?
23:17:38 <[itchyjunk]> what's section?
23:17:42 <[itchyjunk]> hmm was that the only issue?
23:17:43 Vajb joins (~Vajb@2001:999:50:e6be:1e98:9376:d93e:4506)
23:17:44 <sonny> +1
23:17:47 <monochrom> (+ 1) and (1 +)
23:17:59 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 256 seconds)
23:18:01 <sonny> not sure how to describe it
23:18:01 <[itchyjunk]> wow, so the code was right and i used it wrong :<
23:18:02 <monochrom> > map (+ 1) [1..5]
23:18:04 <lambdabot> [2,3,4,5,6]
23:18:21 <sonny> haskell does give you that confident feeling ;)
23:18:27 × chele quits (~chele@user/chele) (Remote host closed the connection)
23:18:39 × max22- quits (~maxime@2a01cb0883359800b8731b08b5ca29d9.ipv6.abo.wanadoo.fr) (Quit: Leaving)
23:18:39 <geekosaur> a section is a partially applied operator. It requires parentheses to distinguish it from a normal application
23:18:49 <geekosaur> so `map + 1` looks like adding 1 to the function map
23:19:07 <geekosaur> but `map (+1)` is mapping a partially applied addition operator
23:20:19 <geekosaur> (spaces are not relevant here)
23:20:31 <geekosaur> :t map +1
23:20:32 <lambdabot> Num ((a -> b) -> [a] -> [b]) => (a -> b) -> [a] -> [b]
23:20:53 <geekosaur> not the weird constraint
23:20:56 <geekosaur> *note
23:21:11 Morrow joins (~user@bzq-110-168-31-106.red.bezeqint.net)
23:21:19 <[itchyjunk]> ah
23:22:05 <sonny> [itchyjunk] what's =>
23:23:14 wroathe joins (~wroathe@206-55-188-8.fttp.usinternet.com)
23:23:14 × wroathe quits (~wroathe@206-55-188-8.fttp.usinternet.com) (Changing host)
23:23:14 wroathe joins (~wroathe@user/wroathe)
23:24:13 × deadmarshal quits (~deadmarsh@95.38.112.110) (Ping timeout: 256 seconds)
23:24:53 <[itchyjunk]> in the type signatuer? i haven't learned the constraint stuff yet xD
23:25:14 <[itchyjunk]> you can apply constraints to the function with it
23:25:19 <[itchyjunk]> i think
23:25:46 <geekosaur> in this case it would be asserting that the type of `map` must have a Num instance (which it doesn't, being a function)
23:25:47 <Heffalump[m]> A simpler example of something with a constraint is
23:25:47 <Heffalump[m]> (+) :: Num a => a -> a -> a
23:26:14 <Heffalump[m]> which just says "+" works on any type that happens to be an instance of the Num class.
23:26:18 <geekosaur> Haskell will happily let you do that right up until you try to use it and it discovers there is no Num instance for that type
23:26:38 <[itchyjunk]> ah
23:27:11 <geekosaur> anyway, Num is what lets us treat Int, Integer, Float, and Double (and some others) the same way instead of having to have separate addition and multiplication operators for each
23:27:13 <sonny> ok, so Num is the typeclass?
23:27:32 polyphem_ joins (~rod@2a02:810d:640:776c:e450:3ca3:b389:687a)
23:27:40 <geekosaur> SML used to require a different addition operator for floats and doubles, which was pretty icky
23:27:53 <sonny> yeah, that's really strict
23:27:55 × Morrow quits (~user@bzq-110-168-31-106.red.bezeqint.net) (Quit: leaving)
23:27:59 <geekosaur> `1 + 2`, but `1.0 +. 2.0`
23:28:44 × polyphem quits (~rod@2a02:810d:640:776c:e450:3ca3:b389:687a) (Ping timeout: 252 seconds)
23:29:12 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:29:15 <[itchyjunk]> Num is an interface iirc
23:29:38 <geekosaur> not quite, but somewhat close
23:30:03 <[itchyjunk]> I am still stuck with keeping a counter through recursion
23:30:08 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
23:30:15 <monochrom> Don't keep a counter.
23:30:27 <[itchyjunk]> i wany a myTupels :: [a] -> [(Int,a)] where the int represents the position of each element
23:30:54 <Heffalump[m]> this is a standard idiom: zip [1..] xs
23:30:55 <geekosaur> think about it differently
23:30:57 <sonny> monochrom it's the accumulator
23:30:59 <monochrom> Oh OK, keep a counter.
23:31:18 <[itchyjunk]> hmm i'll try thinking about it differently
23:31:48 <[itchyjunk]> i was thinking : myTuples (x:xs) = (count,x) : myTuples xs might work if i could keep track of count but i'd have to pass that around which isn't ideal
23:31:53 × Midjak quits (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep)
23:32:34 <monochrom> If you know how to achieve "f n = [n, n+1, n+2, ...]", it is the same idea.
23:32:55 <[itchyjunk]> hmm, idk if i do. guess i'll do that first
23:33:04 <[itchyjunk]> oh wait
23:33:06 <monochrom> You will have to "pass that around".
23:34:03 <geekosaur> there's an idiom for that too. foo xs = go 0 xs where go cnt [] = ...; go cnt (x:xs) = ...
23:34:34 <geekosaur> and on recursion you add 1 to the cnt you pass to the recursive call
23:34:59 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 256 seconds)
23:35:35 Morrow joins (~user@bzq-110-168-31-106.red.bezeqint.net)
23:35:39 <[itchyjunk]> hmm f :: Int -> [Int]
23:35:40 × Morrow quits (~user@bzq-110-168-31-106.red.bezeqint.net) (Client Quit)
23:35:50 <[itchyjunk]> f x = x : f (x+1), i thought this might work.
23:35:57 Morrow joins (~user@bzq-110-168-31-106.red.bezeqint.net)
23:36:15 <geekosaur> it might, depending on what you intend "work" to be
23:36:34 <[itchyjunk]> <interactive>:16:1: error: Variable not in scope: f :: Integer -> t
23:36:36 <geekosaur> > let f x = x : f (x+1) in take 5 (f 4)
23:36:37 <lambdabot> [4,5,6,7,8]
23:36:44 × epolanski quits (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity)
23:36:50 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
23:37:31 <geekosaur> show what you actually did to get that error
23:37:59 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
23:38:20 <[itchyjunk]> https://bpa.st/WPWQ
23:38:47 <geekosaur> you're being bitten by ghci
23:38:54 <[itchyjunk]> hmm
23:39:01 <geekosaur> you need to enter the type signature and the function on the same line, with a semicolon between them
23:39:15 <geekosaur> ghci can't tell you're going to enter the actual function next
23:39:25 <[itchyjunk]> ah let me do it in a file as always
23:39:34 <Axman6> or you can use :{ to start a multi line definition and :} to close it
23:39:41 <[itchyjunk]> argh infinite list, it works
23:39:47 <Axman6> :{
23:39:53 <Axman6> f :: Int -> [Int]
23:40:01 <monochrom> Ugh no, "f :: Int -> [Int]" leads to an error message that says "Int" not "Integer" nor "t".
23:40:03 <Axman6> f x = x : f (x+1)
23:40:05 <Axman6> :}
23:40:25 <monochrom> "f x = x : f (x+1)" does not lead to any error message.
23:40:37 <monochrom> "f 0" under that does not lead to any error message either.
23:40:43 <monochrom> So, again, cannot reproduce.
23:40:49 <[itchyjunk]> Yes it's fixed now
23:41:51 <[itchyjunk]> so back to :: [a] ->[(Int,a)] problem. for the f :: Int -> [Int] , i passed an int to the function which it was incrimenting
23:42:19 <monochrom> So make a helper function that has the extra Int parameter.
23:42:21 <[itchyjunk]> but for mine, i am only passing it some list, it would have to start with some var and add 1 to it each time or somesuc
23:42:37 <geekosaur> I showed an example of how we do that earlier
23:42:47 <geekosaur> [06 23:34:03] <geekosaur> there's an idiom for that too. foo xs = go 0 xs where go cnt [] = ...; go cnt (x:xs) = ...
23:42:54 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds)
23:43:42 <[itchyjunk]> hmmmm
23:43:57 <geekosaur> `go` is a helper function, as monochrom said
23:44:16 <geekosaur> since it's defined in a where clause, there's no particular reason to give it a fancy name
23:44:57 × shapr quits (~user@2601:7c0:c202:5190:e39f:2980:57ec:6939) (Ping timeout: 240 seconds)
23:45:26 <Axman6> what as this function supposed to do [itchyjunk]?
23:46:02 <Axman6> given [1,1,1,2,2,3], what should I get back?
23:46:21 <Axman6> are we doing run length encoding? just ziping indices?
23:46:41 <[itchyjunk]> [(0,1), (1,1), (2,1), (3,2), (4,2), (5,3)]
23:47:17 <[itchyjunk]> I am trying to work my way up to problem 2 here :
23:47:18 <[itchyjunk]> http://www.cas.mcmaster.ca/~dalvescb/LH_Week05_Exercises.pdf
23:47:28 <Axman6> ok, then the suggestion of writing a worker (go) and a wrapper is a good idea
23:47:48 <[itchyjunk]> I am trying to understand the helper go function :x
23:47:56 × _xor quits (~xor@dsl-50-5-233-169.fuse.net) (Quit: bbiab)
23:48:23 <monochrom> go 4 [x,y,z] = [(x,4), (y,5), (z,6)]
23:48:32 <[itchyjunk]> ah
23:48:51 <[itchyjunk]> i think i get it
23:48:54 [itchyjunk] tries stuff
23:49:03 <Axman6> (or [(4,x),(5,y),(6,z)] with the above type)
23:49:17 <monochrom> This is why I grew out of using either words or precise formulas to explain to beginners.
23:49:40 <monochrom> The most effective communication is semi-concrete semi-symbolic examples.
23:49:51 <monochrom> Such as "map f [x,y,z] = [f x, f y, f z]"
23:50:06 × dsrt^ quits (~dsrt@207.5.21.20) (Read error: Connection reset by peer)
23:50:19 <monochrom> As opposed to "it applies f to every element" or writing out the code.
23:50:24 × xb0o2 quits (~xb0o2@user/xb0o2) (Quit: Client closed)
23:52:05 vicfred joins (~vicfred@user/vicfred)
23:52:12 <monochrom> Well, in the case of "map f", the wording is short enough to be probably understandable by beginners. But you will run into larger cases where the wording is so lengthy, the beginner simply stops reading.
23:52:19 machinedgod joins (~machinedg@24.105.81.50)
23:52:36 <Axman6> that opne of the reasons I usually ask "what output do you expect for <this> input?"
23:52:58 <Axman6> that's one*
23:52:59 <[itchyjunk]> This is what my helper ended up looking like
23:52:59 <[itchyjunk]> https://bpa.st/CF6Q
23:53:01 <[itchyjunk]> seems to work
23:53:42 <monochrom> Yeah, like that.
23:53:46 <Axman6> Looks pretty good to me
23:54:50 <[itchyjunk]> https://bpa.st/HPNA
23:55:00 <Axman6> there are other (actually infinite) ways to write that, but this is one of the most clear. There are different ways that Haskellers might prefer to use though, we tend to avoid explicit recursion unless it's necessary
23:55:02 <[itchyjunk]> this works /o\. think i am ready to tackle that problem 2 now
23:55:25 <[itchyjunk]> hmm what's explicit vs implicit recursion?
23:55:30 <[itchyjunk]> Don't think I know the difference
23:55:30 <Axman6> usually we would define that `go` function in a where clause of `myTuples`
23:55:40 <[itchyjunk]> ah
23:55:56 <Axman6> unless it's also useful for other things too
23:56:28 <geekosaur> explicit recursion is what you have been writing. implicit recursion is using a function that does the recursion internally, like map or foldr
23:56:43 <Axman6> I think for now you can ignore that there are other ways to do what you've done, it's pretty likely you'll start to see some patterns and think "Can I write that pattern once and reuse it?"
23:59:59 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)

All times are in UTC on 2022-01-06.