Home liberachat/#haskell: Logs Calendar

Logs on 2021-08-22 (liberachat/#haskell)

00:00:00 <monochrom> "cabal sdist" warns.
00:00:02 <fresheyeball> I know
00:00:11 <fresheyeball> but it I don't share directories dev workflow sucks
00:00:19 <fresheyeball> because I can't alter lib files and get an updte
00:00:24 <fresheyeball> I have to restart ghcid
00:00:31 <sm> there's a flag that does it
00:00:49 <fresheyeball> oh!
00:00:50 <fresheyeball> what is it
00:00:51 <monochrom> I know both sides of the argument for and against "modules should be manually listed" "modules should be automatically detected".
00:01:27 <sm> fresheyeball: I'm very sorry, I'm just dimly pattern-matching solutions I've heard about and don't remember
00:01:40 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 240 seconds)
00:01:40 <fresheyeball> no worries
00:01:42 × jgeerds quits (~jgeerds@55d4b311.access.ecotel.net) (Ping timeout: 245 seconds)
00:01:56 <fresheyeball> I just can't see any argument in favor of manually listing
00:02:06 <monochrom> At the end I am inclined towards the manual side. Besides, a simple "cabal sdist" already alerts you what you haven't listed.
00:02:09 <sm> so what about the hpack idea
00:02:13 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 252 seconds)
00:02:15 <fresheyeball> it just seems like busy work, and introduces the potential of adding a module that is not used
00:02:27 <fresheyeball> I used to use hpack for this
00:02:33 <fresheyeball> but people got mad at me :(
00:02:36 <fresheyeball> so I go back to cabal
00:02:48 <sclv> we do have a ticket for wildcards in cabal, but its currently blocked on the exact-print work. https://github.com/haskell/cabal/issues/5343 the good news is the exact-print work is underway for the next cabal release
00:02:49 <sm> commit your cabal file, then there's no reason for anyone to get mad
00:03:05 <monochrom> hpack doesn't seem to generate version bounds, last I heard from a user question. That will cause some other problems.
00:03:39 <sm> I think that's not hpack's job, it just translates what you wrote in package.yaml
00:04:01 <sm> there you can go wild with bounds, hpack has no opinion
00:04:23 <monochrom> What is hpack's job? What is its use case? I mean if not for making something reasonably usable by a cabal-and-hackage user.
00:04:48 <sclv> its job is just "you can write cabal files but use more braces in your syntax, if you like braces, dude"
00:04:49 <monochrom> Without version bounds, a *.cabal file is immediately unusable in the context of hackage.
00:04:53 <sm> it's pretty clear from the README IIRC ? I don't want to answer hastily and wrongly
00:05:58 <sm> it lets you generate cabal files from a simpler and less redundant format, saving some work and for certain projects, removing a big source of errors (forgetting to mirror changes in all components, forgetting to declare new files, etc.)
00:06:19 <sclv> common stanzas in cabal for the most part eliminated the "less redundant" bit
00:06:37 <sclv> but in fairness to hpack those are much more recent than hpac
00:06:46 <sm> yes, that's true nowadays, if you can require your builders to have a new-enough cabal-install
00:07:26 Guest82 joins (~Guest82@p1256008-ipoe.ipoe.ocn.ne.jp)
00:08:03 <fresheyeball> sclv: if I use -fno-warn-home-modules
00:08:04 <sm> also, what's this about braces ? I have no braces in my package.yamls
00:08:06 <fresheyeball> on the exes
00:08:14 <fresheyeball> will cabal make too big of binaries?
00:08:30 <monochrom> The *.cabal file format doesn't require braces either.
00:09:09 <monochrom> Whoever talked about braces, I don't know what they're talking about, I think they don't know either. Unless the FUD hypothesis is true.
00:09:28 <sm> ok, package.yaml and .cabal are dead even on the braces issue. :)
00:09:55 <monochrom> I am not thrilled about YAML in general.
00:10:21 <fresheyeball> yaml is... better that this batshit snowflake .cabal syntax
00:10:34 × Guest82 quits (~Guest82@p1256008-ipoe.ipoe.ocn.ne.jp) (Client Quit)
00:10:45 <fresheyeball> hell I would take toml
00:10:50 <fresheyeball> and I do not like yaml or toml
00:11:20 <monochrom> YAML did not exist when .cabal needed some kind of syntax.
00:11:37 <monochrom> At that time the other choice was XML.
00:12:07 <fresheyeball> I don't fault the old gods for their choices
00:12:13 <fresheyeball> but I would have like hpack to take over
00:12:20 <fresheyeball> and get us out of snowflake land
00:12:32 <sm> what would have been great is for cabal to merge hpack years ago, and accept either format
00:12:46 <sm> ..in my mind..
00:14:08 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
00:17:55 <sm> and it's still technically quite possible..
00:18:12 <sm> why is everyone looking at me
00:20:11 <fresheyeball> sm: how do we make this happen?
00:22:04 × mdunnio quits (~mdunn@205.178.28.97) (Ping timeout: 250 seconds)
00:22:31 <monochrom> cabal devs are seriously under-staffed and overworked as is, even just for fixing known bugs and fulfilling the most trivial of feature requests.
00:22:52 <sm> ask sclv or other devs (Mikolaj ?) if they'd be open to a nice PR ?
00:23:12 <sm> more of them in #hackage, perhaps
00:23:30 <monochrom> And hpack itself... After seeing one more example that whatever hpack outputs still requires human intervention, I am not optimistic about a proper automation.
00:24:27 <monochrom> i.e., I am not optimistic about even technical plausibility, much less "who actually has time".
00:26:20 <sm> monochrom, you haven't used it (I find it great, and never touch the generated files), and there does seem to be some great new energy in cabal dev, maybe there's a possibility
00:28:10 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 240 seconds)
00:30:38 <monochrom> https://ircbrowse.tomsmeding.com/day/lchaskell/2021/08/09?id=132634#trid132634
00:31:22 <monochrom> The beginning of a conversation that concluded in "hpack doesn't gen version bounds, this is why your package is unbuildable under cabal and hackage"
00:31:58 <monochrom> Last time c_wraith spoke very harshly, it's because of incidents like this.
00:32:10 Morrow_ joins (~Morrow@bzq-110-168-31-106.red.bezeqint.net)
00:32:10 <sm> I don't get it, it's not hpack's job to set bounds for you
00:32:35 <monochrom> Then you have to agree with my "still requires human intervention".
00:32:49 <sm> nope
00:33:06 <monochrom> If it is not some programs job, then it is my hand's job.
00:33:29 <monochrom> I can live with that conclusion, but either a program or a human needs to do it.
00:33:40 <sm> hpack works as advertised: it lets you write your cabal file as a simpler package.yaml file. That's all
00:33:46 <monochrom> Who else is there? Martians?
00:35:40 × xff0x quits (~xff0x@2001:1a81:5267:2d00:3019:a525:5831:f042) (Ping timeout: 240 seconds)
00:42:06 × markpythonicbtc quits (~textual@2601:647:5a00:35:ed7b:d29e:3bfe:71d0) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:42:30 markpythonicbtc joins (~textual@2601:647:5a00:35:ed7b:d29e:3bfe:71d0)
00:44:09 × aab quits (~aab@193.56.116.154) (Ping timeout: 268 seconds)
00:44:52 lavaman joins (~lavaman@98.38.249.169)
00:46:20 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
00:47:10 × Xnuk quits (~xnuk@45.76.202.58) (Quit: ZNC - https://znc.in)
00:47:27 Xnuk joins (~xnuk@vultr.xnu.kr)
00:49:31 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
00:52:12 Erutuon joins (~Erutuon@user/erutuon)
00:55:12 <fresheyeball> so I have Servant
00:55:21 <fresheyeball> a need to setup auth for my web application
00:55:31 <fresheyeball> I also have postgres simple
00:55:37 <fresheyeball> any recommendations? Advice?
00:59:20 × shapr quits (~user@pool-100-36-247-68.washdc.fios.verizon.net) (Ping timeout: 250 seconds)
01:07:25 × markpythonicbtc quits (~textual@2601:647:5a00:35:ed7b:d29e:3bfe:71d0) (Quit: My MacBook has gone to sleep. ZZZzzz…)
01:07:48 markpythonicbtc joins (~textual@2601:647:5a00:35:ed7b:d29e:3bfe:71d0)
01:17:27 × MQ-17J quits (~MQ-17J@d14-69-206-129.try.wideopenwest.com) (Read error: Connection reset by peer)
01:18:00 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:21:05 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 248 seconds)
01:22:22 MQ-17J joins (~MQ-17J@8.6.144.209)
01:25:31 <hololeap> what kind of auth?
01:25:36 AndrewYu joins (~andrew@user/andrewyu)
01:25:57 <hololeap> fresheyeball: ^
01:26:06 <fresheyeball> just like cookie auth
01:26:12 <fresheyeball> sessions management as well I suppose
01:26:17 <fresheyeball> incase server reboots
01:27:32 <hololeap> (I'm probably not qualified to respond to this question) but there is this: https://hackage.haskell.org/package/servant-auth
01:28:32 aab joins (~aab@193.56.116.59)
01:28:48 <fresheyeball> I am looking at that now
01:28:52 <fresheyeball> looks good so far
01:31:41 <hololeap> check out https://docs.servant.dev/en/stable/cookbook/index.html
01:31:49 Axman6 joins (~Axman6@user/axman6)
01:31:50 <hololeap> https://docs.servant.dev/en/stable/cookbook/jwt-and-basic-auth/JWTAndBasicAuth.html
01:32:52 × t0zy quits (~t0zy@49.207.193.1) (Ping timeout: 268 seconds)
01:32:56 <hololeap> whenever I need to do this kind of thing, I just head over to Rails... you might be in "roll-your-own" territory... I don't know
01:33:08 aab parts (~aab@193.56.116.59) ()
01:34:04 × sim590 quits (~simon@modemcable090.207-203-24.mc.videotron.ca) (Ping timeout: 252 seconds)
01:38:02 t0zy joins (~t0zy@49.207.193.1)
01:47:20 sim590 joins (~simon@modemcable090.207-203-24.mc.videotron.ca)
01:50:32 xff0x joins (~xff0x@2001:1a81:52ba:f800:f4cf:86a:773:6851)
01:51:33 keutoi joins (~keutoi@157.47.40.109)
01:52:12 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
02:06:56 × t0zy quits (~t0zy@49.207.193.1) (Ping timeout: 250 seconds)
02:08:01 t0zy joins (~t0zy@2402:3a80:d22:d27f::3d9e:90dd)
02:14:40 × t0zy quits (~t0zy@2402:3a80:d22:d27f::3d9e:90dd) (Ping timeout: 240 seconds)
02:21:42 × xlei quits (znc@pool-68-129-84-118.nycmny.fios.verizon.net) (Quit: ZNC - https://znc.in)
02:21:55 × FinnElija quits (~finn_elij@user/finn-elija/x-0085643) (Ping timeout: 252 seconds)
02:24:03 FinnElija joins (~finn_elij@user/finn-elija/x-0085643)
02:25:57 xlei joins (znc@pool-68-129-84-118.nycmny.fios.verizon.net)
02:27:32 Axma47030 joins (~Axman6@user/axman6)
02:30:03 × Axman6 quits (~Axman6@user/axman6) (Ping timeout: 256 seconds)
02:37:42 × leitz quits (~LeamHall@cpe-173-172-58-72.tx.res.rr.com) (Quit: nappy time)
02:39:31 × td_ quits (~td@muedsl-82-207-238-079.citykom.de) (Ping timeout: 252 seconds)
02:39:56 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
02:40:15 × Xe quits (~cadey@tailscale/xe) (Quit: WeeChat 3.1)
02:40:30 Xe joins (~cadey@tailscale/xe)
02:41:24 td_ joins (~td@muedsl-82-207-238-124.citykom.de)
02:44:10 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 240 seconds)
02:56:34 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
02:56:34 allbery_b joins (~geekosaur@xmonad/geekosaur)
02:56:37 allbery_b is now known as geekosaur
03:00:13 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
03:04:21 lavaman joins (~lavaman@98.38.249.169)
03:04:49 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
03:05:25 × alx741 quits (~alx741@181.196.68.120) (Quit: alx741)
03:08:54 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
03:20:10 × spruit11 quits (~quassel@2a02:a467:ccd6:1:6057:8486:da6d:d017) (Ping timeout: 240 seconds)
03:24:04 × otto_s quits (~user@p5de2f4c7.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
03:25:48 otto_s joins (~user@p4ff27b55.dip0.t-ipconnect.de)
03:27:15 spruit11 joins (~quassel@2a02:a467:ccd6:1:1d51:90f2:b4a7:ece8)
03:28:24 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
03:28:32 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
03:28:32 wroathe joins (~wroathe@user/wroathe)
03:31:10 × stefan-_ quits (~cri@42dots.de) (Ping timeout: 240 seconds)
03:31:48 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
03:35:12 stefan-_ joins (~cri@42dots.de)
03:44:07 × Guest9363 quits (~chris@81.96.113.213) (Remote host closed the connection)
03:45:40 machinedgod joins (~machinedg@24.105.81.50)
03:46:37 × MQ-17J quits (~MQ-17J@8.6.144.209) (Ping timeout: 252 seconds)
03:48:39 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:59:37 chris joins (~chris@81.96.113.213)
03:59:41 chris is now known as Guest1719
04:06:04 wei2912 joins (~wei2912@112.199.250.21)
04:08:58 severen joins (~severen@202.36.179.72)
04:22:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
04:27:53 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
04:31:42 × fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
04:32:16 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 252 seconds)
04:34:24 gentauro_ joins (~gentauro@95.166.247.26)
04:35:22 × gentauro_ quits (~gentauro@95.166.247.26) (Remote host closed the connection)
04:37:13 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
04:49:49 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
04:53:36 × wei2912 quits (~wei2912@112.199.250.21) (Read error: Connection reset by peer)
04:55:14 × bitdex quits (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 244 seconds)
04:55:22 × severen quits (~severen@202.36.179.72) (Ping timeout: 252 seconds)
04:55:28 falafel joins (~falafel@68.232.54.239)
04:57:57 bitdex joins (~bitdex@gateway/tor-sasl/bitdex)
04:58:16 × falafel quits (~falafel@68.232.54.239) (Remote host closed the connection)
04:58:40 falafel joins (~falafel@68.232.54.239)
05:06:21 mei joins (~mei@user/mei)
05:12:45 × slowButPresent quits (~slowButPr@user/slowbutpresent) (Quit: leaving)
05:13:36 wei2912 joins (~wei2912@112.199.250.21)
05:23:58 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
05:31:02 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
05:31:26 × mei quits (~mei@user/mei) (Quit: mei)
05:32:03 mei joins (~mei@user/mei)
05:36:33 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 248 seconds)
05:41:19 × mei quits (~mei@user/mei) (Quit: mei)
05:41:59 mei joins (~mei@user/mei)
05:46:33 ongy[m] joins (~ongymatri@2001:470:69fc:105::5018)
05:50:34 × tengu1 quits (~tengu1@cpe-70-121-244-14.neb.res.rr.com) (Ping timeout: 246 seconds)
05:52:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
05:52:52 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
05:52:52 wroathe joins (~wroathe@user/wroathe)
05:57:31 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
05:57:54 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
05:59:28 alphabeta joins (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net)
05:59:29 × kilolympus quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Ping timeout: 248 seconds)
06:05:18 abrantesasf joins (~abrantesa@2804:14d:b086:4b3c:2e56:dcff:fedb:62f)
06:12:39 Vooch joins (~iovoo@096-038-011-034.biz.spectrum.com)
06:15:23 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:16:34 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
06:19:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:20:52 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 250 seconds)
06:44:39 × tzh quits (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz)
06:50:02 × abrantesasf quits (~abrantesa@2804:14d:b086:4b3c:2e56:dcff:fedb:62f) (Quit: Leaving)
06:50:24 kenran joins (~kenran@200116b82b8bf8008c77ec945bde89d6.dip.versatel-1u1.de)
06:53:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
06:54:10 Erutuon joins (~Erutuon@user/erutuon)
06:59:45 × falafel quits (~falafel@68.232.54.239) (Ping timeout: 248 seconds)
07:06:01 lavaman joins (~lavaman@98.38.249.169)
07:07:25 fef joins (~thedawn@user/thedawn)
07:08:29 vysn joins (~vysn@user/vysn)
07:09:41 kayprish joins (~kayprish@cable-188-2-229-172.dynamic.sbb.rs)
07:10:16 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
07:13:16 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 268 seconds)
07:14:56 Tuplanolla joins (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi)
07:17:53 goepsilongo joins (~goepsilon@2603-7000-ab00-62ed-1cf8-2891-43b9-94ea.res6.spectrum.com)
07:20:10 × goepsilongo_ quits (~goepsilon@2603-7000-ab00-62ed-c9e0-8f19-de85-1d2f.res6.spectrum.com) (Ping timeout: 240 seconds)
07:29:20 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 250 seconds)
07:31:50 × lyxia quits (~lyxia@poisson.chat) (Quit: WeeChat 3.1)
07:36:34 mc47 joins (~mc47@xmonad/TheMC47)
07:42:10 × Morrow_ quits (~Morrow@bzq-110-168-31-106.red.bezeqint.net) (Ping timeout: 240 seconds)
07:45:30 × kayprish quits (~kayprish@cable-188-2-229-172.dynamic.sbb.rs) (Read error: Connection reset by peer)
07:46:43 lyxia joins (~lyxia@poisson.chat)
07:47:27 _ht joins (~quassel@82-169-194-8.biz.kpn.net)
07:59:01 × hololeap quits (~hololeap@user/hololeap) (Quit: Bye)
07:59:20 burnsidesLlama joins (~burnsides@client-8-91.eduroam.oxuni.org.uk)
07:59:27 × burnsidesLlama quits (~burnsides@client-8-91.eduroam.oxuni.org.uk) (Remote host closed the connection)
07:59:55 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
08:00:06 × oldsk00l quits (~znc@ec2-52-58-63-152.eu-central-1.compute.amazonaws.com) (Remote host closed the connection)
08:04:23 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
08:05:13 hendursa1 joins (~weechat@user/hendursaga)
08:06:15 × zaquest quits (~notzaques@5.128.210.178) (Remote host closed the connection)
08:07:35 zaquest joins (~notzaques@5.128.210.178)
08:07:57 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds)
08:08:40 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 240 seconds)
08:10:51 acidjnk joins (~acidjnk@p200300d0c72b9549d9d86757fde39a6c.dip0.t-ipconnect.de)
08:17:17 severen joins (~severen@202.36.179.72)
08:17:39 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b)))
08:17:39 allbery_b joins (~geekosaur@xmonad/geekosaur)
08:17:42 allbery_b is now known as geekosaur
08:22:14 Guest9 joins (~Guest9@115.96.241.44)
08:22:22 <Guest9> hi
08:23:45 <Guest9> is this Haskell beginners forum ?
08:25:31 <[exa]> beginners are welcome
08:25:42 <[exa]> hello! :]
08:27:29 rmo joins (~rmo@user/msr)
08:27:40 × keutoi quits (~keutoi@157.47.40.109) (Ping timeout: 252 seconds)
08:29:24 keutoi joins (~keutoi@223.238.95.231)
08:34:51 flairif joins (~user@2603-90d8-0b40-c000-9a65-0d16-0508-f6c0.res6.spectrum.com)
08:35:50 <flairif> I've got a nooby question..
08:36:06 <Hecate> flairif: don't ask to ask, simply ask :)
08:37:33 <Guest9> hi
08:38:02 <Guest9> I am trying to create a function which adds all digits to a single number
08:38:42 <Hecate> Guest9: so, 'x + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9'?
08:38:42 <Guest9> digitSum = sum . map (read . return) . show
08:39:06 <Guest9> this is the function I wrote and it works..
08:39:33 <Guest9> but now I want to make it such that it adds the result also to a single digit
08:41:00 <Guest9> singleDigitSum digitsum
08:41:00 <Guest9> | digitsum <= 9 = a
08:41:01 <Guest9> | otherwise digitsum a
08:41:10 <Guest9> so I wrote the above function
08:41:25 × severen quits (~severen@202.36.179.72) (Ping timeout: 252 seconds)
08:41:33 <Guest9> singleDigitSum digitsum
08:41:34 <Guest9> | digitsum a <= 9 = a
08:41:34 <Guest9> | otherwise digitsum a
08:41:40 <Guest9> sorry typo
08:41:44 <flairif> thanks :) I'm creating a little number guessing game.. I have `num :: IO (Int)` as the random number... I understand that it's not a "global variable" like in other languages... Everytime I do `n <- num` it's assigning a new random number to n, which is not quite what I want.
08:42:27 <Hecate> flairif: the key here is "variable"
08:42:33 <flairif> My question is difficult to ask, because its kinda contextual...
08:42:50 <Hecate> it's a binding, which is accessible from everywhere (with scoping)
08:42:58 <Hecate> but it's indeed not mutable
08:43:33 <[exa]> Guest9: so your function should take a _list_ of numbers in strings (?) and add them together?
08:43:40 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
08:43:48 <[exa]> Guest9: or just sum 1 to 9 ?
08:43:59 <[exa]> Guest9: or sum all digits of some number?
08:44:14 <Guest9> @ no.. it just takes an number.. reads all digits and adds them up..
08:44:32 <flairif> Right. I guess what I am trying to get at is, how would I "store" a single randomly generated Int that can be used be used throughout the entirity of the program?
08:44:40 <Guest9> except that when the sum is more than 9 then it will add those also till it reaches a single digit..
08:44:50 <Guest9> actually I am trying to learn recursion..: )
08:45:03 <Hecate> flairif: you can pass it as argument :)
08:45:05 <[exa]> Guest9: ah so. that explains the `return` there. You might have better luck with list comprehension, such as `sumDigits x = sum [read x | x <- show x]`
08:45:30 <[exa]> Guest9: note: creating lists that you immediately consume is basically free in haskell, so no worries about an intermediate list
08:45:52 <[exa]> btw I've got a mistake there, should be `read [x]` ofc.
08:46:07 <[exa]> and even better name the `x` differently than the original `x`... :D
08:46:59 <[exa]> :t \x -> sum [read [c] | c <- show x]
08:47:00 <lambdabot> (Num a1, Show a2, Read a1) => a2 -> a1
08:47:06 <flairif> Hecate: I suppose. It just feels uncomfortable, because what if my program was aribrarily large, with dozens of functions that all wanted access to that number, hypothetically?
08:47:26 <[exa]> flairif: you might be looking for State or Reader monads
08:47:33 <[exa]> these are pretty much contextural
08:48:03 <Hecate> flairif: then you would take the time to explore such options by setting the boundaries of your requirements with these parameters ;)
08:48:18 <flairif> hmmm
08:48:21 <Hecate> and you would go towards MVar for example
08:48:52 <Hecate> but for a guessing game it's extremely simple to have the number as an argument, especially if it's a bounded Int
08:50:03 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:50:40 <Guest9> @[exa] : This would be lambda expressions ?.. I guess yet to reach there.. I am trying to write a toy program from C++ where in you take a list of dates and come out with a date number, month number and year number.. using mod operator.. a numerology program.. =D
08:50:40 <lambdabot> Unknown command, try @list
08:51:01 <Guest9> There are no exercises in LYAH..
08:51:58 <[exa]> LYAH doesn't have many exercises, sadly, yes
08:52:28 <[exa]> anyway yeah the \ is a lambda, you can equivalently have a named definition as `sumDigits x = sum [read [c] | c <- show x]`
08:52:29 <flairif> Hecate, hmmm ok. I'll try it
08:54:40 × kenran quits (~kenran@200116b82b8bf8008c77ec945bde89d6.dip.versatel-1u1.de) (Ping timeout: 240 seconds)
08:55:00 <Guest9> yes.. but `sumDigits x = sum [read [c] | c <- show x]` gives a two digit answer when supplied with a string..
08:55:34 <Guest9> Prelude> sumDigits 987458
08:55:37 kenran joins (~kenran@200116b82b8bf8007bc477e0c5eee3d0.dip.versatel-1u1.de)
08:55:39 <Guest9> output is 41
08:55:58 <[exa]> that's right isn't it?
08:56:28 <[exa]> I might have misunderstood the original goal then if not :]
08:56:55 <Hecate> flairif: https://replit.com/@Kleidukos/GreenyellowCyanProgrammer#src/Main.hs
08:57:22 <Hecate> flairif: and type "stack run src/Main.hs" in the "Shell" tab
08:57:22 × Sgeo quits (~Sgeo@user/sgeo) (Ping timeout: 252 seconds)
08:59:13 <flairif> Ok cool
09:01:18 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
09:01:22 <flairif> Hecate, I came up with a solution very similar to that one, so that's nice haha
09:02:42 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
09:03:09 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
09:06:37 <Guest9> is there a recursive way to solve this problem ?
09:07:49 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Ping timeout: 252 seconds)
09:08:22 × econo quits (uid147250@user/econo) (Quit: Connection closed for inactivity)
09:14:04 ubert joins (~Thunderbi@91.141.64.154.wireless.dyn.drei.com)
09:14:44 × Guest1719 quits (~chris@81.96.113.213) (Remote host closed the connection)
09:15:41 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
09:17:36 <[exa]> Guest9: what should be the result for 987458?
09:17:40 × flairif quits (~user@2603-90d8-0b40-c000-9a65-0d16-0508-f6c0.res6.spectrum.com) (Ping timeout: 240 seconds)
09:19:22 × ubert quits (~Thunderbi@91.141.64.154.wireless.dyn.drei.com) (Ping timeout: 252 seconds)
09:19:24 × hnOsmium0001 quits (uid453710@id-453710.stonehaven.irccloud.com) (Quit: Connection closed for inactivity)
09:22:15 jgeerds joins (~jgeerds@55d4b311.access.ecotel.net)
09:22:49 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
09:22:55 Gurkenglas joins (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de)
09:24:10 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 250 seconds)
09:26:02 × phma quits (phma@2001:5b0:2144:518:c685:6b7:63c5:83c0) (Read error: Connection reset by peer)
09:26:58 phma joins (phma@2001:5b0:211f:c4a8:b4c0:8312:139:73b8)
09:31:06 × azeem quits (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it) (Ping timeout: 250 seconds)
09:31:08 <Guest9> 5
09:31:35 azeem joins (~azeem@176.200.245.90)
09:32:02 <Guest9> 9+8+7+4+5+8 = 41.. 4+1 =5
09:33:35 × azeem quits (~azeem@176.200.245.90) (Read error: Connection reset by peer)
09:34:02 azeem joins (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it)
09:34:14 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
09:34:37 jtomas joins (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net)
09:34:46 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Ping timeout: 252 seconds)
09:36:32 <dminuoso> Guest9: Is this a homework assignment?
09:36:47 <Guest9> nope
09:37:02 <Guest9> I am taking Cpp problems and doing in haskell
09:37:15 <Guest9> as I said earlier.. no examples in LYAH
09:37:33 geekosaur joins (~geekosaur@xmonad/geekosaur)
09:38:28 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
09:39:34 <dminuoso> Guest9: start by writing a function `digits :: Integer -> [Integer]` perhaps?
09:39:51 reumeth joins (~reumeth@user/reumeth)
09:40:02 <dminuoso> From there, you can proceed with writing some simple recursive function.
09:40:36 <dminuoso> % sum digits 1234
09:40:37 <yahb> dminuoso: ; <interactive>:4:5: error:; * Couldn't match type: [x0]; with: t0 -> t; Expected: x0 -> t0 -> t; Actual: x0 -> [x0]; * In the first argument of `sum', namely `digits'; In the expression: sum digits 1234; In an equation for `it': it = sum digits 1234; * Relevant bindings include it :: t (bound at <interactive>:4:1)
09:40:39 <dminuoso> % sum (digits 1234)
09:40:39 <yahb> dminuoso: 10
09:41:02 <dminuoso> Is this enough to help you with the task?
09:41:16 <dminuoso> Mind you, `digits` is something I wrote myself in a private chat.
09:41:24 <dminuoso> So consider this one of the tasks for you to solve.
09:41:50 <Guest9> hi.. I have already written function for summation
09:44:27 <Guest9> digitSum = sum . map (read . return) . show
09:44:44 <Guest9> this takes any number and adds the digits in it..
09:44:52 <dminuoso> Mmm, this is not idiomatic
09:44:56 <dminuoso> Try to avoid using `show` and `read`.
09:44:58 × jgeerds quits (~jgeerds@55d4b311.access.ecotel.net) (Ping timeout: 250 seconds)
09:45:24 <Guest9> I am looking for a way to apply it recursively... if the intermediate output is not a single digit no
09:45:47 <dminuoso> Guest9: The way you'd encode this, is by doing conditional recursion.
09:45:57 <dminuoso> i.e. thats how we encode loop conditionals
09:46:01 <dminuoso> for example:
09:46:48 <dminuoso> @src take
09:46:48 <lambdabot> take n _ | n <= 0 = []
09:46:48 <lambdabot> take _ [] = []
09:46:48 <lambdabot> take n (x:xs) = x : take (n-1) xs
09:47:18 <dminuoso> See how this, conditionally on n, either recurses or not? We stop recursing by simply not recursing. We also call this the base cae
09:47:55 <dminuoso> And by modifying this argument in each recursion, we modify it - very much akin to how you might decrement a loop variable each turn.
09:49:48 <dminuoso> Well, and conditionally on the list too, as if the list is empty, this also stops recursing.
09:50:14 <dminuoso> Guest9: And regarding avoiding `read` and `show`, try using:
09:50:16 <dminuoso> % :t divMod
09:50:16 <yahb> dminuoso: Integral a => a -> a -> (a, a)
09:51:10 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
09:51:12 <Guest9> 2 querieas
09:51:45 <Guest9> 1. what is idiomatic ? .. I am sorry.. I am self taught and got only learn you a Haskell as a resource..
09:51:49 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
09:52:14 <Guest9> The example you gave is for a list.. My struggle right now is how do I store the intermediate output?
09:52:22 <dminuoso> Think of "idiomatic haskell" as "what haskell programmers would normally write"
09:52:34 <dminuoso> Guest9: You store it in a function parameter.
09:52:40 <dminuoso> Guest9: Look at the implementation of `take` cited above.
09:52:50 <Guest9> because I need to apply the custom function to the intermediate output also if the output is less than 10
09:53:01 <dminuoso> Note how in the recursive step we "drop" the head of the list, and pass down the tail instead?
09:53:05 <dminuoso> i.e.
09:53:09 <dminuoso> 11:46:48 lambdabot | take n (x:xs) = x : take (n-1) xs
09:53:51 <dminuoso> If this definition is taken, we pattern match the second argument to a list whose head is `x`, and whose tail is `xs`. In the recursive application of take the first parameter is (n-1), and the second parameter is just the tail
09:54:02 <dminuoso> So we "store/keep" intermediate values around in function arguments
09:54:40 <dminuoso> equivalently we might write sum as:
09:55:10 <dminuoso> % sum :: [Int] -> Int; sum [] = 0; sum (x:xs) = x + sum xs
09:55:11 <yahb> dminuoso:
09:55:14 <dminuoso> % sum [1,2,3]
09:55:14 <yahb> dminuoso: 6
09:55:42 <dminuoso> This will expand into
09:55:49 × mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Quit: Leaving)
09:56:28 <dminuoso> sum 1:2:3:[] ---> 1 + sum 2:3:[] ---> 1 + 2 + sum 3:[] ---> 1 + 2 + 3 + sum [] ---> 1 + 2 + 3 + 0
09:56:39 <dminuoso> Guest9: Does this make any sense to you?
09:57:25 <Guest9> this is partial application of function.. currying I think.. I am just on chap 6 ofLYAH
09:57:35 <dminuoso> No, this is not partial application.
09:57:48 <dminuoso> This is just plain function application
09:58:11 <dminuoso> Try to focus on understanding how `sum` works, maybe.
09:58:40 <dminuoso> How we use recursion to model loops, and function arguments to model loop variables.
10:00:11 <Guest9> ok .. let me try going through the recursion chapter again and see..
10:00:15 <Guest9> thanks
10:03:13 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
10:06:36 zer0bitz_ joins (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi)
10:07:13 × zer0bitz quits (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi) (Ping timeout: 252 seconds)
10:07:40 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 240 seconds)
10:08:40 × xff0x quits (~xff0x@2001:1a81:52ba:f800:f4cf:86a:773:6851) (Ping timeout: 240 seconds)
10:09:43 xff0x joins (~xff0x@2001:1a81:52ba:f800:ba30:5326:3556:79a1)
10:10:58 × kenran quits (~kenran@200116b82b8bf8007bc477e0c5eee3d0.dip.versatel-1u1.de) (Quit: WeeChat info:version)
10:11:04 __monty__ joins (~toonn@user/toonn)
10:18:41 × Guest9 quits (~Guest9@115.96.241.44) (Quit: Ping timeout (120 seconds))
10:25:31 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
10:26:24 × zer0bitz_ quits (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi) (Read error: Connection reset by peer)
10:28:31 Guest9 joins (~Guest9@115.96.241.44)
10:28:39 × Guest9 quits (~Guest9@115.96.241.44) (Client Quit)
10:30:57 × haskl quits (~haskl@user/haskl) (Read error: Connection reset by peer)
10:31:55 haskl joins (~haskl@98.37.78.63)
10:33:34 <Gurkenglas> ...installing lens-regex doesnt install regex? hmm.
10:34:48 <Gurkenglas> so i thought "every number in this string should be 2 higher". sounded like a lens oneliner. what's the proper workflow here? presumably not stack install lens, stack install lens-regex, stack install regex, stack ghci, import Control.Lens, import 3 more things, run oneliner
10:35:14 <Gurkenglas> and making a project for that also seems like overkill
10:35:38 × jtomas quits (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Remote host closed the connection)
10:38:45 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
10:39:27 <Gurkenglas> or is the proper workflow in fact to have a project with all the scripting utilities within which i ghci whenever i have a oneliner to execute?
10:40:19 <[exa]> Gurkenglas: maybe use cabal and runhaskell with -package :]
10:40:44 <[exa]> stack is inevitably project-ish
11:00:53 alx741 joins (~alx741@181.196.68.120)
11:03:59 × tcard quits (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp) (Quit: Leaving)
11:04:20 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
11:07:42 lavaman joins (~lavaman@98.38.249.169)
11:08:50 tcard joins (~tcard@p2307053-ipngn17101hodogaya.kanagawa.ocn.ne.jp)
11:10:11 hannessteffenhag joins (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de)
11:11:15 gehmehgeh joins (~user@user/gehmehgeh)
11:12:32 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 268 seconds)
11:14:21 mastarija joins (~mastarija@78-3-210-70.adsl.net.t-com.hr)
11:15:30 kuribas joins (~user@ptr-25vy0iac19m0oa3eqv7.18120a2.ip6.access.telenet.be)
11:16:05 <mastarija> When documenting a type, how does one differentiate between a type constructor and value constructor with the same name? e.g. I have `MyName a = MyName a | OtherName a`
11:16:29 <mastarija> In Haddock I can use single quotes to link to a type or value constructor, but in this case, how do I differentiate?
11:18:11 zer0bitz joins (~zer0bitz@dsl-hkibng31-58c384-213.dhcp.inet.fi)
11:18:13 <mastarija> I have a feeling it was something like MyName:MyName? Can't remember and the documentation is not very clear on this.
11:20:30 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:35:43 <[exa]> I'd try MyName.MyName but no idea really
11:36:02 <[exa]> perhaps check the markup generated at the target site
11:37:58 × dsrt^ quits (~dsrt@209.65.131.194) (Ping timeout: 252 seconds)
11:39:03 × hannessteffenhag quits (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 268 seconds)
11:39:09 <[exa]> the hrefs seem to have v: and t: prefixes
11:39:57 dsrt^ joins (~dsrt@209.65.131.194)
11:46:35 <Arsen> is there a base64encode :: [Char] -> [Char] anywhere?
11:47:02 × vysn quits (~vysn@user/vysn) (Ping timeout: 258 seconds)
11:47:05 <Arsen> I already found libraries implementing that for Text and ByteString
11:49:24 <hpc> in pseudo-haskell, base64encode :: binary data -> text data, so i don't think it would really make sense
11:50:02 <hpc> the existing ones don't really make sense either though, i guess Text -> Text assumes a specific encoding on the input and ByteString -> ByteString assumes ascii-encoded output?
11:51:23 <Arsen> that'd make sense to me
11:51:27 × keutoi quits (~keutoi@223.238.95.231) (Quit: leaving)
11:51:57 <Arsen> and, AFAIK, Data.Text specifies the encoding as UTF16
11:52:03 × alphabeta quits (~kilolympu@cpc92710-cmbg20-2-0-cust265.5-4.cable.virginm.net) (Quit: Quitting IRC :()
11:52:50 <hpc> then maybe for String it can specify UTF8 to make a nightmare for future programmers :D
11:53:16 <hpc> anyhoo, i would just explicitly encode the string
11:54:00 <Arsen> heh, I'm trying to replace a show with a base64 string, and I just realized show might be all I need here, one moment
11:54:28 × cheater quits (~Username@user/cheater) (Ping timeout: 252 seconds)
11:54:36 Hecate had to blink twice because seeing a Haskell programme coverage tool speak on IRC was probably the last straw that broke my sanity
11:54:41 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds)
11:54:49 <Hecate> hpc: should I expect hls to chat here as well? :p
11:56:09 <Arsen> b64wrap :: Text -> [Char]
11:56:09 <Arsen> b64wrap = ("atob("++) . (++")") . show . encodeBase64
11:56:09 <Arsen> it's disgusting, I love it :D
11:56:27 <Arsen> (encodeBase64 is from Data.Text.Encoding.Base64)
11:57:03 <hpc> Hecate: ski is here, if you count mathematical concepts :D
11:58:37 × goepsilongo quits (~goepsilon@2603-7000-ab00-62ed-1cf8-2891-43b9-94ea.res6.spectrum.com) (Quit: Textual IRC Client: www.textualapp.com)
11:59:45 <Hecate> hpc: nah I'm used to mathematical concepts speaking to me in my sleep
12:00:05 <Hecate> I've let that part of my sanity go its own way for some time now :p
12:01:42 × dsrt^ quits (~dsrt@209.65.131.194) (Remote host closed the connection)
12:02:02 dsrt^ joins (~dsrt@209.65.131.194)
12:02:28 × dsrt^ quits (~dsrt@209.65.131.194) (Remote host closed the connection)
12:02:43 × pavonia quits (~user@user/siracusa) (Quit: Bye!)
12:04:45 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
12:04:58 cheater joins (~Username@user/cheater)
12:09:16 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 268 seconds)
12:10:11 hannessteffenhag joins (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de)
12:14:49 × hannessteffenhag quits (~hannesste@ip4d14ffc8.dynamic.kabel-deutschland.de) (Ping timeout: 252 seconds)
12:24:22 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
12:27:28 × mastarija quits (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Ping timeout: 252 seconds)
12:31:01 × markpythonicbtc quits (~textual@2601:647:5a00:35:ed7b:d29e:3bfe:71d0) (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:52:57 × loonycyborg quits (~loonycybo@wesnoth/developer/loonycyborg) (Quit: ZNC - http://znc.sourceforge.net)
12:55:08 loonycyborg joins (~loonycybo@wesnoth/developer/loonycyborg)
12:56:42 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
12:58:59 nrl^ joins (~nrl@209.65.131.194)
12:59:51 s-h-i-n-o-b-i joins (~quassel@104.244.75.124)
13:00:55 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
13:01:01 markpythonicbtc joins (~textual@2600:380:4559:3d84:9546:7b48:3a47:abd9)
13:01:03 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
13:01:05 keutoi joins (~keutoi@106.208.52.196)
13:07:39 waleee joins (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd)
13:08:12 × wei2912 quits (~wei2912@112.199.250.21) (Quit: Lost terminal)
13:08:19 mastarija joins (~mastarija@78-3-210-70.adsl.net.t-com.hr)
13:13:00 × loonycyborg quits (~loonycybo@wesnoth/developer/loonycyborg) (Quit: ZNC - http://znc.sourceforge.net)
13:13:35 loonycyborg joins (~loonycybo@wesnoth/developer/loonycyborg)
13:16:24 favonia joins (~favonia@user/favonia)
13:17:45 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
13:23:07 × fef quits (~thedawn@user/thedawn) (Ping timeout: 244 seconds)
13:23:30 × markpythonicbtc quits (~textual@2600:380:4559:3d84:9546:7b48:3a47:abd9) (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:27:23 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
13:29:19 pbrisbin joins (~patrick@174-081-116-011.res.spectrum.com)
13:30:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
13:34:17 markpythonicbtc joins (~textual@50.228.44.6)
13:35:19 fef joins (~thedawn@user/thedawn)
13:40:41 × img quits (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in)
13:41:11 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
13:45:32 img joins (~img@user/img)
13:46:12 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
13:49:42 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
13:51:36 lbseale joins (~lbseale@user/ep1ctetus)
13:52:07 <mastarija> [exa], you were right it is MyName.MyName thx
13:53:04 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
13:53:16 × keutoi quits (~keutoi@106.208.52.196) (Ping timeout: 250 seconds)
13:53:32 keutoi joins (~keutoi@106.208.52.196)
14:01:23 <[exa]> mastarija: plain luck guess tho. :D
14:01:29 <mastarija> :D
14:03:36 slowButPresent joins (~slowButPr@user/slowbutpresent)
14:06:45 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
14:10:16 × jess quits (~jess@libera/staff/jess) (Quit: brb real quick)
14:10:46 jess joins (~jess@libera/staff/jess)
14:11:15 fendor joins (~fendor@178.115.66.241.wireless.dyn.drei.com)
14:11:25 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
14:26:59 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
14:27:57 amahl joins (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi)
14:31:24 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
14:33:58 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
14:33:58 × pbrisbin quits (~patrick@174-081-116-011.res.spectrum.com) (Ping timeout: 252 seconds)
14:41:42 × dajoer quits (~david@user/gvx) (Quit: leaving)
14:42:38 Guest|24 joins (~Guest|24@185.238.122.126)
14:43:00 × Guest|24 quits (~Guest|24@185.238.122.126) (Client Quit)
14:43:54 × jess quits (~jess@libera/staff/jess) ()
14:47:32 machinedgod joins (~machinedg@24.105.81.50)
14:49:48 <kuribas> The Monoid for Map looks wrong. It should have been (Ord k, Monoid v) => Monoid (Map k v)
14:50:16 × qrpnxz quits (~qrpnxz@user/qrpnxz) (Ping timeout: 258 seconds)
14:57:00 × keutoi quits (~keutoi@106.208.52.196) (Ping timeout: 268 seconds)
14:58:08 × lbseale quits (~lbseale@user/ep1ctetus) (Read error: Connection reset by peer)
14:59:39 jtomas joins (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net)
15:02:45 mc47 joins (~mc47@xmonad/TheMC47)
15:02:54 × machinedgod quits (~machinedg@24.105.81.50) (Read error: Connection reset by peer)
15:03:47 keutoi joins (~keutoi@157.47.25.147)
15:04:13 qrpnxz joins (~qrpnxz@user/qrpnxz)
15:06:04 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
15:06:49 oxide joins (~lambda@user/oxide)
15:09:01 lavaman joins (~lavaman@98.38.249.169)
15:10:24 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 250 seconds)
15:13:34 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
15:14:52 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
15:14:52 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
15:14:52 wroathe joins (~wroathe@user/wroathe)
15:14:57 adamflott joins (~adamflott@c-73-60-249-202.hsd1.ma.comcast.net)
15:17:59 × mastarija quits (~mastarija@78-3-210-70.adsl.net.t-com.hr) (Quit: Leaving)
15:18:49 turlando joins (~turlando@93-42-250-112.ip89.fastwebnet.it)
15:18:49 × turlando quits (~turlando@93-42-250-112.ip89.fastwebnet.it) (Changing host)
15:18:49 turlando joins (~turlando@user/turlando)
15:25:39 × xff0x quits (~xff0x@2001:1a81:52ba:f800:ba30:5326:3556:79a1) (Quit: xff0x)
15:26:11 tremon is now known as tremon_
15:27:42 <dsal> kuribas: that would've been nice, though less applicable. I've written that bug more than once, though.
15:28:35 <kuribas> dsal: isn't it differently applicable though?
15:29:31 <kuribas> these instances don't overlap.
15:31:36 zebrag joins (~chris@user/zebrag)
15:32:06 <kuribas> for Monoids I think about "combining", not "throwing away", though of course they both follow the Monoid laws.
15:35:10 <dsal> If both existed, they'd overlap, wouldn't they?
15:35:34 <kuribas> with different behaviour
15:36:06 <dsal> But yeah, I had the same intuition. I've also got code with maps nested like, five deep with piles of `unionWith (<>)`
15:38:17 <nshepperd> (Ord k, Semigroup v) => Monoid (Map k v) even
15:38:33 <kuribas> ah indeed
15:39:42 <nshepperd> it would nicely subsume the existing instance if you (fmap First)
15:40:07 <nshepperd> or maybe Last. see, i can't even remember which way it's biased
15:40:19 <dsal> Yeah. There's a bit of ship-has-sailed, though. `union` exists today and is correct behavior for some apps. I suppose it wouldn't break anything silently, though.
15:40:31 × keutoi quits (~keutoi@157.47.25.147) (Ping timeout: 252 seconds)
15:40:44 <kuribas> maybe being explicit is better in this case.
15:40:48 <dsal> Right, that's half the problem. I've written *that* bug several times, too.
15:41:04 × Igfoo quits (~ian@matrix.chaos.earth.li) (Quit: BIAB)
15:41:15 <dsal> "The expression (union t1 t2) takes the left-biased union of t1 and t2. It prefers t1 when duplicate keys are encountered, i.e. (union == unionWith const)."
15:41:42 <dsal> `(<>) = union`
15:42:33 keutoi joins (~keutoi@157.47.0.177)
15:42:36 hnOsmium0001 joins (uid453710@id-453710.stonehaven.irccloud.com)
15:42:39 <dsal> It'd be nice to be able to confidently combine maps without read the docs each time.
15:45:32 <dsal> https://github.com/haskell/containers/issues/539
15:49:58 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
15:52:38 benin036932 joins (~benin@183.82.178.142)
15:54:38 Igloo joins (~ian@matrix.chaos.earth.li)
15:55:04 averell joins (~averell@user/averell)
15:55:09 × Igloo quits (~ian@matrix.chaos.earth.li) (Client Quit)
15:55:18 Igloo joins (~ian@matrix.chaos.earth.li)
15:59:58 alicebudda joins (~alicebudd@cold.passenger.volia.net)
16:01:55 Lycurgus joins (~juan@cpe-45-46-140-49.buffalo.res.rr.com)
16:01:59 <adamflott> I have a strange error I'm not sure where to start debugging. I have a fairly simple stack based app that runs fine on NixOS, but fails with "app: user-error" on Ubuntu and OSX. They all use stack, ghc-8.10.4, and polysemy
16:02:50 × acidjnk quits (~acidjnk@p200300d0c72b9549d9d86757fde39a6c.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
16:03:07 <adamflott> I know it at least enters main as my argument parser is run, but after that I have no context/idea where it could be failing
16:03:07 <Lycurgus> does anyone use NixOS in production?
16:03:21 <Lycurgus> i used it about a decade ago
16:03:29 <Lycurgus> not in prod ofc
16:03:41 <maerwald> I rip it out of production whenever I can :p
16:04:31 <dminuoso> Lycurgus: Yes.
16:04:32 shapr joins (~user@pool-100-36-247-68.washdc.fios.verizon.net)
16:05:02 <dminuoso> Lycurgus: We're starting to switch our complex infrastructure pieces, and depending on how this goes perhaps largely switch everything over.
16:05:10 <maerwald> oh dear
16:05:30 <Lycurgus> dminuoso, interesting to see how that turns out
16:05:36 <dminuoso> Right now this entails our zoo of mail related servers, and in the near future our customer authentication infrastructure
16:05:42 <maerwald> Lycurgus: with a low bus factor :p
16:05:48 <Lycurgus> in fairness I haven't looked at nix/nixos in a few years
16:06:10 <maerwald> it hasn't changed... still all constantly moving underdocumented stuff with bad bus factor
16:06:34 <maerwald> now there's a new haskell pkg infrastructure
16:06:46 <dminuoso> maerwald: We're reducing this. Im aiming for 3 senior nix engineers for the rest of the team to ask in depth questions. :)
16:06:53 <Lycurgus> sfaik the originating utrecht dept is the only place it's used outside enthusiasts
16:06:54 <dminuoso> Which for our size is good enough
16:07:08 <maerwald> yeah, I'd rather not hire nix engineers to begin with :p
16:07:09 <Lycurgus> utrecht or wherever
16:07:09 <dminuoso> And yes, the bus factor is definitely a valid concern, but one that is addressable through organizational means
16:07:21 <dminuoso> maerwald: We're going to do the training with existing engineers.
16:07:36 <Lycurgus> lol, will 3 be enuf?
16:07:37 <maerwald> I usually make clear in interviews that I'm not willing to learn nix :p
16:07:45 <dminuoso> Lycurgus: We're a relatively small shop, so yes.
16:08:00 <dminuoso> We arent using nix for development, so this is more about devops of servers.
16:08:13 <dminuoso> maerwald: That's completely fair.
16:08:33 <Lycurgus> it's pretty easy to learn, or was
16:08:41 <dminuoso> I think the important part of nix is to be open and honest about the issues it has.
16:08:44 <maerwald> If someone else maintains it... sure. But I already had a case of nix engineer leaving the startup and then everyone got cold feet.
16:09:00 machinedgod joins (~machinedg@24.105.81.50)
16:09:09 <dminuoso> I think to some extend, the critcism of nix is just more open and honest, the sheer amount of headaches Ive had with things like ansible.. it's all a trade off.
16:09:24 <dminuoso> Except ansible fanboys have a low tendency to agree that there's deep issues with their approach
16:09:31 <dminuoso> Lack of reflection
16:09:47 <maerwald> ansible is just bash
16:09:52 <dminuoso> heh
16:09:53 <Lycurgus> you could make a much better case for it when it started 15 ya or so
16:10:01 <dminuoso> lexically written in yaml
16:10:05 <Lycurgus> since then LSB distro have vastly improved
16:10:28 <dminuoso> I think the only reasonable alternative for our problem domain would have been k8s
16:10:34 <Lycurgus> fight the next war, not the last one
16:10:54 <Lycurgus> *distros
16:11:09 <maerwald> all distros suck
16:11:41 <Lycurgus> well you want NixOS then
16:11:49 <Hecate> or no computers
16:11:57 <Hecate> which would be optimal :p
16:12:10 <dminuoso> 18:11:09 maerwald | all distros suck
16:12:15 <dminuoso> Just like all programming languages suck
16:12:25 <maerwald> dminuoso: yeah, I also say that in interviews: programming sucks
16:13:27 <dminuoso> Right now, its just that nixos is in my comfort zone, and it gives me the right mix of proper declarative description with atomic updates, and yet results in a mostly plain linux system that non-nixos users can interact with.
16:13:48 Guest|58 joins (~Guest|58@77.213.94.23)
16:13:51 <dminuoso> So our old admins can still log in and look around for problems like they're used to. With k8s that approach doesnt work anymore
16:14:10 Erutuon joins (~Erutuon@user/erutuon)
16:14:33 <maerwald> calling nixos *declarative* is a far stretch, that may merely rely on technical definitions rather than reality
16:15:04 <maerwald> once you got your messy stuff written out, it does roughly the same thing (except in different environments/kernels/...)
16:15:55 stef204 joins (~stef204@user/stef204)
16:16:11 <dminuoso> I dont know about that, with nixos its much easier to say "this is an accurate description of our systems". If I remove `services.postfix.enable = true;`, then I have very good reason to trust that the systemd unit will no longer appear.
16:16:50 <dminuoso> Of course this is still based on contracts. If people violate it through various means (say a user is running a postfix from a shell in a tmux session), that cant be helped.
16:17:22 × nate1 quits (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 252 seconds)
16:17:26 <maerwald> can't something later in your expression re-enable the postfix service?
16:17:43 × Guest|58 quits (~Guest|58@77.213.94.23) (Client Quit)
16:17:56 <dminuoso> Sure. And if I really wanted to assert its off, I can just set `services.postfix.enable = lib.mkForce false`
16:17:58 <maerwald> my point being: if it's declarative, there'd be only *one* possible place
16:18:08 <dminuoso> well
16:18:11 <dminuoso> there is one possible place
16:18:14 <dminuoso> its that exact option.
16:19:15 <dminuoso> And nixos doesnt have easy escape hatches here - but since the server description resides on a git repository, you cant trivially violate it
16:19:18 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
16:19:48 <maerwald> sure, puppet, propellor, etc etc
16:19:48 <dminuoso> i.e. you cant log into the server and break that promise without the next deployment undoing your change completely
16:19:52 <maerwald> nothing new
16:19:55 <dminuoso> sure
16:20:05 <dminuoso> puppet achieves similar things, propellor Im not familiar with
16:20:30 <dminuoso> But with puppet it's rather a piece of software that tries to control some existing plain linux
16:20:54 <maerwald> that's good, because it gives me more options to choose from different ecosystems
16:20:56 <dminuoso> With nixos, /etc/systemd/system is a symlink to a store path, which is on a readonly mount
16:21:03 <dminuoso> You cant trivially screw around with that while logged in to the server
16:21:12 <dminuoso> maerwald: absolutely!
16:21:19 <dminuoso> if that's your requirement, then nixos is definitely not for you
16:21:34 <maerwald> since I don't consider NixOS security focussed at all, I wouldn't really use it for deployment in the first place
16:21:36 <dminuoso> for us, we want the opposite: we want to assert that the git repository is the true and complete description of the server.
16:22:40 <dminuoso> And yeah, nixos doesnt get us there all the way - at the end you cant if you want to have any local state. Say, a server has local logs, and the system declaration is obviously not covering that
16:22:57 <dminuoso> Or you might have a database, or maybe the fail2ban database
16:23:33 × stef204 quits (~stef204@user/stef204) (Quit: WeeChat 3.2)
16:24:02 <dminuoso> maerwald: yeah, the security perspective isnt ideal - but honestly, with most distributions it relies on active maintainers that just donate their free time to rapidly push updates.
16:25:31 stef204 joins (~stef204@user/stef204)
16:25:44 <maerwald> yeah, caring about security in devops isn't a nice job
16:26:28 × stef204 quits (~stef204@user/stef204) (Client Quit)
16:26:38 <dminuoso> Honestly, if you care about security, you have to subscribe to CVE updates yourself, and then take the flag yourself.
16:26:46 <maerwald> that's why I'm also not convinced of stackage as a concept and much rather have rolling freeze files
16:27:07 <maerwald> I used to bump our freeze file every 2 weeks
16:27:09 <dminuoso> maerwald: at least nixos has that for you.
16:27:34 <maerwald> nixpkgs uses stackage
16:27:39 <dminuoso> for haskell, yeah
16:27:59 <dminuoso> I was thinking about regular packages and libraries
16:28:19 <maerwald> yeah, that was a docker container and the binary was built with a max 2 old freeze file
16:28:20 <dminuoso> For haskell, Im thinking if we go down that way, we'll end up using haskell.nix
16:28:25 <maerwald> *weeks
16:28:44 <dminuoso> That way we'd have plain old cabal hackage semantics again, with respect to updates
16:28:53 <dminuoso> As long as we regularly bump nixpkgs, which I guess we should want anyway
16:31:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
16:31:09 <dsal> Lycurgus: I'm using nixos on all my "production" linux machines. It's the easiest thing to build and replace at the moment, with no leftover junk I have to compete with.
16:31:19 <maerwald> I much prefer to build static binaries and put them in minimal containers that are heavily syscall restricted, are read-only filesystem etc
16:32:14 <Lycurgus> dsal, i note ur scare quotes
16:32:20 <dminuoso> maerwald: One last thing that I really love about nixos:
16:32:45 <dsal> Lycurgus: Yeah, I just mean for my personal production systems, not my work systems. Work is k8s stuff right now.
16:32:49 <dminuoso> It's how Im generally not afraid of system updates. If something breaks, I know I can completely rollback and not have stuff leaked from the update.
16:33:15 <dminuoso> The only other solution that has this type of "rollback" is if you're fleeting containers
16:33:20 <maerwald> dminuoso: cardanos daedalus (frontend, wallet backend and node) are started via nix expressions btw. I've thought how that'd look like with docker locally, but I believe that would suck. So that might be an interesting use case for nix indeed.
16:33:23 <Lycurgus> the toughest things for humans are simple things it seems once they get on a jag with this or that concept
16:33:30 <maerwald> Because starting docker stuff on a users machine is not good practice
16:34:01 <dminuoso> maerwald: My experience with docker has been pretty poor. The way it screws with the local firewall to implement its networking is absolutely scaring to me.
16:34:06 <dminuoso> And it's very error prone
16:34:10 <maerwald> yes, its broken
16:34:36 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
16:34:47 <maerwald> it's like windows CI... restart it a couple times until it succeeds
16:35:11 <maerwald> but the point is: containers are cattle. If they misbehave, shoot them and respawn.
16:35:25 <maerwald> don't pet them
16:35:32 <dminuoso> We're currently running on centos, and on about 1/3 of the machines we run docker containers on, we've had to spend days to debug and make horrible hotfixes in iptables
16:35:56 <dminuoso> Maybe nobody else runs centos + docker? I dont know, but Im surprised that apparently nobody else has these extreme problems
16:36:13 <dminuoso> Because everything Ive seen suggests that it's properly broken
16:38:57 × pretty_dumm_guy quits (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.2)
16:39:35 <sm> Gurkenglas: when a project is too much, stack scripts can work well
16:47:49 tzh joins (~tzh@c-24-21-73-154.hsd1.or.comcast.net)
16:49:58 Lorra joins (~Lorra@2001:a61:3ae0:8401:6154:47aa:9ecc:175c)
16:52:12 × Lorra quits (~Lorra@2001:a61:3ae0:8401:6154:47aa:9ecc:175c) (Client Quit)
16:53:27 × gehmehgeh quits (~user@user/gehmehgeh) (Quit: Leaving)
16:56:41 mnrmnaugh joins (~mnrmnaugh@68.162.206.56)
16:56:46 × mnrmnaugh quits (~mnrmnaugh@68.162.206.56) (Remote host closed the connection)
16:58:46 × alicebudda quits (~alicebudd@cold.passenger.volia.net) (Quit: Client closed)
17:03:10 × favonia quits (~favonia@user/favonia) (Ping timeout: 240 seconds)
17:03:26 × Vq quits (~vq@90-227-195-41-no77.tbcn.telia.com) (Ping timeout: 268 seconds)
17:04:07 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
17:05:47 xff0x joins (~xff0x@2001:1a81:52ba:f800:27e0:55e3:7826:b52d)
17:08:43 jakalx joins (~jakalx@base.jakalx.net)
17:11:24 × markpythonicbtc quits (~textual@50.228.44.6) (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:13:10 × haskl quits (~haskl@98.37.78.63) (Changing host)
17:13:10 haskl joins (~haskl@user/haskl)
17:14:41 Vq joins (~vq@90-227-195-41-no77.tbcn.telia.com)
17:15:56 favonia joins (~favonia@user/favonia)
17:17:22 × xff0x quits (~xff0x@2001:1a81:52ba:f800:27e0:55e3:7826:b52d) (Ping timeout: 250 seconds)
17:18:06 xff0x joins (~xff0x@2001:1a81:52ba:f800:b837:8a9e:e00a:9d36)
17:19:31 × ggvgc quits (~ggVGc@a.lowtech.earth) (Quit: WeeChat 3.1)
17:19:50 econo joins (uid147250@user/econo)
17:27:35 × keutoi quits (~keutoi@157.47.0.177) (Quit: leaving)
17:27:56 eggplantade joins (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net)
17:33:27 ggVGc joins (~ggVGc@a.lowtech.earth)
17:37:44 × oxide quits (~lambda@user/oxide) (Ping timeout: 250 seconds)
17:41:14 doyougnu joins (~user@c-73-25-202-122.hsd1.or.comcast.net)
17:41:41 <sm> hey all. How do you find out which cabal-install version is required for a given cabal-version (file format) ?
17:41:55 <sm> I want to know which one supports cabal-version 2.2
17:41:56 fendor_ joins (~fendor@91.141.64.241.wireless.dyn.drei.com)
17:42:14 × Lycurgus quits (~juan@cpe-45-46-140-49.buffalo.res.rr.com) (Quit: Exeunt)
17:44:33 × fendor quits (~fendor@178.115.66.241.wireless.dyn.drei.com) (Ping timeout: 248 seconds)
17:45:03 <sclv> iirc that far back anything cabal-install 2.2 and above would work (i.e. we had them coupled at that point)
17:45:21 <int-e> sm: looks like cabal-install x.y depends on Cabal x.y since 1.16
17:47:40 × nrl^ quits (~nrl@209.65.131.194) (Remote host closed the connection)
17:48:33 <sm> thanks
17:51:11 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
17:51:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host)
17:51:11 wroathe joins (~wroathe@user/wroathe)
17:57:13 bontaq joins (~user@ool-18e47f8d.dyn.optonline.net)
17:59:03 vysn joins (~vysn@user/vysn)
17:59:18 jumper149 joins (~jumper149@80.240.31.34)
18:02:34 pbrisbin joins (~patrick@174-081-116-011.res.spectrum.com)
18:05:14 × fef quits (~thedawn@user/thedawn) (Remote host closed the connection)
18:06:03 hololeap joins (~hololeap@user/hololeap)
18:06:45 gustik joins (~gustik@2a01:c844:2410:9020:63ab:4bb6:83d2:e11b)
18:08:31 pavonia joins (~user@user/siracusa)
18:10:54 × kuribas quits (~user@ptr-25vy0iac19m0oa3eqv7.18120a2.ip6.access.telenet.be) (Remote host closed the connection)
18:13:21 Guest5329 joins (~chris@81.96.113.213)
18:14:34 × azeem quits (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it) (Ping timeout: 250 seconds)
18:15:17 lavaman joins (~lavaman@98.38.249.169)
18:15:41 azeem joins (~azeem@176.200.223.33)
18:19:59 oxide joins (~lambda@user/oxide)
18:24:40 × azeem quits (~azeem@176.200.223.33) (Ping timeout: 240 seconds)
18:25:17 azeem joins (~azeem@176.200.223.33)
18:29:44 × azeem quits (~azeem@176.200.223.33) (Ping timeout: 250 seconds)
18:30:58 fresheyeball joins (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net)
18:31:28 <fresheyeball> I am trying to impliment an instance of Show for an existenial type
18:31:33 <fresheyeball> I feel lost
18:32:23 <c_wraith> You probably can't.
18:32:41 <fresheyeball> I got Eq and Ord already
18:32:44 <fresheyeball> why not Show?
18:32:48 azeem joins (~azeem@176.200.223.33)
18:33:13 <c_wraith> what's the type?
18:33:33 <fresheyeball> data Page = PEcho | PLogin
18:33:58 <c_wraith> that's not existential
18:34:10 <fresheyeball> data PageView = forall (p :: Page). (Eq (PageModel p), Typeable p, DemotePage p) => PageView (Proxy p) (PageModel p)
18:35:07 <fresheyeball> I figured it out
18:35:16 <fresheyeball> I didn't know I could just make show, and not showsPrec
18:35:21 <fresheyeball> showsPrec is hard
18:35:26 <fresheyeball> I thought I had to make showsPrec
18:35:37 <c_wraith> showsPrec isn't any harder than show...
18:35:38 Pickchea joins (~private@user/pickchea)
18:35:52 <fresheyeball> It is to me
18:35:55 <sm> tis
18:35:58 <fresheyeball> I don't understand it
18:36:06 <fresheyeball> ShowS? Int for precidence?
18:36:13 <c_wraith> I mean... ok, you need to write more code. But it's identical complexity at the type level.
18:36:25 <fresheyeball> sure ok
18:36:30 <fresheyeball> that makes sense
18:36:37 <fresheyeball> ok, now I need to do Generic
18:36:39 <fresheyeball> FEAR
18:36:48 <sm> I'll tell that one to new users from now on
18:37:12 <c_wraith> I've written showsPrec by hand. It really isn't hard. It breaks down into a few common patterns
18:37:20 <sm> to my wife, in fact
18:37:33 <c_wraith> the docs are nice enough to illustrate all those patterns for you, in fact.
18:38:43 <c_wraith> and Prelude even exports a bunch of weird functions that are useless most of the time, but really convenient for writing showsPrec instances
18:39:32 <c_wraith> :t showParen -- like this
18:39:33 <lambdabot> Bool -> ShowS -> ShowS
18:39:42 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 250 seconds)
18:39:45 hexfive joins (~eric@50.35.83.177)
18:39:50 sm . o O "what do you mean you don't understand ? it's identical complexity at the type level !" "Oh, of course! How silly of me, thanks for making everything clear"
18:40:32 <c_wraith> hey, when the complaint is "I can't figure out how to do X with an existential, but I can figure out Y", pointing out that the existential is irrelevant for the difference matters.
18:40:58 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
18:41:02 <fresheyeball> c_wraith: fair enough, it was a bad question
18:41:18 <fresheyeball> any examples of hand written Generic instances?
18:41:37 <c_wraith> I don't know if anyone has ever hand-written a Generic instance.
18:41:56 <fresheyeball> is there a way to get a Generic instances for my data type?
18:42:16 <c_wraith> ... ok, that's certainly an exaggeration. I'm sure it was done by hand for comparison during the development of the DeriveGeneric extension.
18:42:22 <sm> c_wraith: no criticism implied, I'm just joking around (and backing up fresheyeball's perception, in human terms showsPrec is way harder than show)
18:42:43 <fresheyeball> right, the existential part was really not part of the question though
18:42:50 <fresheyeball> it was more why I can't derive it
18:43:39 × hexfive quits (~eric@50.35.83.177) (Client Quit)
18:43:45 <fresheyeball> And why I can't derive Generic either
18:45:26 <c_wraith> my general experience is that when something is hard to get to work in Haskell, it's also hard to use.
18:45:50 <fresheyeball> c_wraith: maybe so, but I really want the safety and ergonimics this will provide to the code
18:45:54 <c_wraith> the type system issues don't go away
18:46:10 <c_wraith> I question the ergonomics.
18:46:25 <c_wraith> I expect it will be as hard to use everywhere as it is to implement
18:46:27 <fresheyeball> If I can get his, I have dependantly typed routes, which will let me write code in terms of the actual model without a ton of hand mapping between run time ADTs
18:46:47 × xff0x quits (~xff0x@2001:1a81:52ba:f800:b837:8a9e:e00a:9d36) (Ping timeout: 258 seconds)
18:47:26 dschrempf joins (~dominik@2a01-036d-0118-46d4-2358-1c2a-8fb3-e278.pool6.digikabel.hu)
18:47:42 xff0x joins (~xff0x@2001:1a81:52ba:f800:f347:6f1f:6209:b9ad)
18:47:56 × pbrisbin quits (~patrick@174-081-116-011.res.spectrum.com) (Ping timeout: 250 seconds)
18:48:07 <glguy> fresheyeball, There's some research what it means to extend GHC.Generics to handle existential quantification, but the stuff you need isn't in base
18:48:26 <fresheyeball> glguy: that's fine
18:48:30 <fresheyeball> I just need to figure this out
18:48:34 <glguy> and everything that works with generics would need to be updated to use the new stuff
18:48:42 <fresheyeball> all the types that are existentialized in are Generic
18:48:48 <fresheyeball> and the only other thing in this type is a Proxy
18:48:52 <fresheyeball> so it should be possible
18:49:07 <glguy> it's not something Generics currently supports
18:49:23 <fresheyeball> glguy: are you saying it's currently impossible while logically possible?
18:49:45 <glguy> someone could perhaps make a thing that wasn't GHC.Generics but was similar and then it might work
18:49:49 <glguy> but it doesn't work in GHC.Generics
18:50:00 <fresheyeball> so... yes?
18:50:10 <glguy> so no you can't make a Generic instance
18:50:14 segfaultfizzbuzz joins (~segfaultf@157-131-253-1.fiber.dynamic.sonic.net)
18:50:16 <glguy> but you could invent a whole new generics system
18:50:19 <fresheyeball> ok
18:50:35 <fresheyeball> so that makes sense because type Rep would need the existenail variable
18:51:15 <fresheyeball> well lame
18:51:30 <fresheyeball> hmm, I can get around this
18:51:39 <fresheyeball> because I think I am only using Generic for Aeson
18:51:43 timCF joins (~timCF@m91-129-108-244.cust.tele2.ee)
18:52:07 <glguy> You could perhaps use Generics on your underlying PageModel type and then use a not-generics thing to wrap that up for PageView
18:52:30 <fresheyeball> glguy: I don't understand that
18:52:43 segfaultfizzbuzz parts (~segfaultf@157-131-253-1.fiber.dynamic.sonic.net) (Leaving)
18:52:44 <fresheyeball> you mean get ToJSON from the underly Generic?
18:52:58 <fresheyeball> and then use that instance in my hand written instance?
18:53:06 <glguy> There's no reason to store a Proxy in the datatype, anyway
18:53:29 <glguy> the whole datatype really is just the PageModel
18:53:32 abrantesasf joins (~abrantesa@2804:14d:b086:4b3c:2e56:dcff:fedb:62f)
18:53:33 <fresheyeball> I don't see how to get even Eq without it
18:54:01 <glguy> Storing the proxy in the datatype, that first field with type (Proxy p), doesn't help implement Eq
18:54:04 <fresheyeball> http://ix.io/3wGy
18:54:09 <fresheyeball> if you want to see what I have in full
18:54:23 <fresheyeball> I am using it with typeable to get Eq
18:55:25 <timCF> Hello! I'm looking for a some soft of "standard" function `Int -> Rational -> Text` which takes amount of symbols to render aftrer dot as first argument. Ideally I want this function to work without convertions to Float/Double and corresponding rounding errors. I came up with this, but not sure it's optimal solution
18:55:30 <timCF> https://github.com/tkachuk-labs/rentier/blob/8089b849d431b8eaa6aa793894c624d473bd4b04/src/Rentier/Rational.hs#L18-L31
18:55:47 <fresheyeball> timCF: convert to Fixed first
18:55:48 <glguy> fresheyeball, You can always just make a new "Proxy" value when you need it; storing it on the constructor doesn't do anything extra
18:55:57 <fresheyeball> then just use Show
18:56:46 <fresheyeball> glguy: I don't see how to do it
18:56:59 <fresheyeball> how do I bring p into scope without to Proxy?
18:57:11 <timCF> fresheyeball: thanks!
18:57:47 <glguy> fresheyeball, one moment, your file was missing all the language extensions
18:57:59 <fresheyeball> glguy: yeah it's in the cabal file
18:58:09 <glguy> yeah, this is why that's not as good as putting them in the file
18:58:23 <fresheyeball> glguy: I get really sick of adding them
18:58:44 <glguy> fortunately making new files isn't the most common part of making things
18:59:14 <fresheyeball> glguy: I understand the critique, but I am doing it this way and I am not changing it
18:59:29 <glguy> that fine, it just means your file doesn't load. I'll stop
19:00:57 <fresheyeball> glguy: I got it
19:01:08 <fresheyeball> I can do (x :: PageModel p) and avoid the Proxy
19:01:21 <shachaf> -fglasgow-exts for life
19:01:26 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:01:43 <shachaf> I heard they were adding something like glasgow-exts back to GHC?
19:02:24 <fresheyeball> Oop nope
19:02:28 <fresheyeball> I do need the Proxy
19:02:33 <fresheyeball> otherwise I can't get instances into scope
19:05:44 <glguy> no, pattern matching on the PageView constructor brings instances into scope, not the Proxy
19:06:34 <janus> shachaf: is it GHC2021 that is like glasgow-exts?
19:06:50 <glguy> If you ever need a proxy you can recover it like: toProxy :: f p -> Proxy p; toProxy _ = Proxy
19:06:54 <shachaf> Oh, that sounds right.
19:10:00 <janus> GHC2021+GADTs+OverloadedStrings+DerivingStrategies 4 lyfe :P
19:11:14 × Guest5329 quits (~chris@81.96.113.213) (Remote host closed the connection)
19:11:42 × azeem quits (~azeem@176.200.223.33) (Ping timeout: 258 seconds)
19:11:46 × dschrempf quits (~dominik@2a01-036d-0118-46d4-2358-1c2a-8fb3-e278.pool6.digikabel.hu) (Ping timeout: 250 seconds)
19:11:57 <janus> hmm what if they had done multiple levels og GHC2021? :P hahaha you could have GHC2021SevenVotes, GHC2021SixVotes :P then, if like me, you think ghc2021 is a bit too conserative, you'd have the option
19:11:58 <shachaf> Glaswegian Algebraic Data Types isn't part of GHC2021?
19:12:23 <janus> shachaf: they are not ;) the one i mentioned are at 7 votes, they'd need 8 votes to be included
19:13:17 <janus> in effect, i guess it would be like a two-staged voting system
19:13:23 azeem joins (~azeem@176.200.223.33)
19:13:34 <janus> then, you could probe haskell and see which level of ghc2021 people would commonly choose
19:13:44 <janus> i think GHC2021SevenVotes would be more popular than GHC2021EightVotes
19:14:06 <janus> s/haskell/hackage/ (sorry)
19:14:23 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
19:15:28 × hendursa1 quits (~weechat@user/hendursaga) (Quit: hendursa1)
19:15:39 Sgeo joins (~Sgeo@user/sgeo)
19:15:55 hendursaga joins (~weechat@user/hendursaga)
19:17:58 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
19:18:42 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
19:19:58 × azeem quits (~azeem@176.200.223.33) (Ping timeout: 252 seconds)
19:21:52 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Remote host closed the connection)
19:22:30 <fresheyeball> ok so ToJSON was easy
19:22:34 <fresheyeball> but FromJSON is hard
19:23:19 neo joins (~neo3@cpe-292712.ip.primehome.com)
19:24:34 <c_wraith> I'd expect FromJSON to actually be impossible
19:24:48 <fresheyeball> c_wraith: I did this before with singletons
19:24:56 <fresheyeball> but I don't want to pull in singletons just for this
19:25:06 <fresheyeball> basically I demote Page and encode that into the json
19:25:18 <fresheyeball> then I decode Page, and need to convert it to a Proxy of itself
19:25:37 pretty_dumm_guy joins (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655)
19:26:07 <janus> hmmm i wonder if it even makes sense to have a discussion around GHC2021SevenVotes or if is it just plain politically infeasible
19:26:09 <c_wraith> your options are all various forms of "a table". The only question is whether you manage that table yourself or try to throw it into instances of some class to make the compiler do it
19:28:07 × mei quits (~mei@user/mei) (Quit: mei)
19:31:10 × oxide quits (~lambda@user/oxide) (Ping timeout: 240 seconds)
19:34:26 <fresheyeball> c_wraith: I got it!
19:35:02 <fresheyeball> http://ix.io/3wGF
19:35:29 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 248 seconds)
19:41:29 chris joins (~chris@81.96.113.213)
19:41:32 chris is now known as Guest934
19:42:59 Lord_of_Life_ joins (~Lord@user/lord-of-life/x-2819915)
19:43:24 × Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 250 seconds)
19:44:16 Lord_of_Life_ is now known as Lord_of_Life
19:45:40 × Guest934 quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
19:47:44 × alx741 quits (~alx741@181.196.68.120) (Ping timeout: 250 seconds)
19:48:36 × _xor quits (~xor@74.215.232.67) (Read error: Connection reset by peer)
19:49:12 _xor joins (~xor@74.215.232.67)
19:51:01 azeem joins (~azeem@176.200.243.28)
19:53:59 × _xor quits (~xor@74.215.232.67) (Read error: Connection reset by peer)
19:54:24 _xor joins (~xor@74.215.232.67)
19:57:44 × _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection)
19:58:16 burnsidesLlama joins (~burnsides@dhcp168-023.wadham.ox.ac.uk)
20:00:09 × zaquest quits (~notzaques@5.128.210.178) (Quit: Leaving)
20:00:47 alx741 joins (~alx741@181.196.68.94)
20:01:13 zaquest joins (~notzaques@5.128.210.178)
20:02:41 × burnsidesLlama quits (~burnsides@dhcp168-023.wadham.ox.ac.uk) (Ping timeout: 248 seconds)
20:05:04 × juhp quits (~juhp@128.106.188.220) (Ping timeout: 250 seconds)
20:07:48 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 268 seconds)
20:08:04 juhp joins (~juhp@128.106.188.220)
20:09:05 × eggplantade quits (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 248 seconds)
20:09:40 × [Kalisto] quits (~nico@user/kalisto/x-8968079) (Ping timeout: 268 seconds)
20:11:21 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
20:12:58 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
20:13:27 × fendor_ quits (~fendor@91.141.64.241.wireless.dyn.drei.com) (Remote host closed the connection)
20:16:59 azeem joins (~azeem@176.200.243.28)
20:23:46 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 252 seconds)
20:25:52 × benin036932 quits (~benin@183.82.178.142) (Ping timeout: 250 seconds)
20:28:11 azeem joins (~azeem@176.200.243.28)
20:31:14 × Xnuk quits (~xnuk@vultr.xnu.kr) (Quit: ZNC - https://znc.in)
20:35:35 Xnuk joins (~xnuk@45.76.202.58)
20:35:36 × Xnuk quits (~xnuk@45.76.202.58) (Remote host closed the connection)
20:36:25 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 252 seconds)
20:37:58 azeem joins (~azeem@176.200.243.28)
20:40:19 junkicide joins (~user@2a01cb0001f4f500f106e9e16d7acd2d.ipv6.abo.wanadoo.fr)
20:40:52 <junkicide> what is wrong with the following version of the "all" function?
20:40:55 <junkicide> all' :: (a -> Bool) -> [a]-> Bool
20:40:55 <junkicide> all' f l = foldl (\x y -> f $ x) True l
20:41:19 <junkicide> error: …
20:41:19 <junkicide> • Couldn't match expected type ‘a’ with actual type ‘Bool’
20:41:19 <junkicide> ‘a’ is a rigid type variable bound by
20:41:19 <junkicide> the type signature for:
20:41:22 <junkicide> all' :: forall a. (a -> Bool) -> [a] -> Bool
20:41:25 <junkicide> at /home/akulkarni/haskell/hutton/chp7.hs:5:1-33
20:41:28 <junkicide> • In the expression: f $ x
20:41:32 <junkicide> In the first argument of ‘foldl’, namely ‘(\ x y -> f $ x)’
20:41:35 <junkicide> In the expression: foldl (\ x y -> f $ x) True l
20:41:36 <c_wraith> well, I'd argue that you never use y in the lambda is a big problem
20:41:39 <dsal> Too much paste
20:41:51 <junkicide> dsal: sorry about that
20:42:18 <dsal> But yes, I don't understand what you're trying to do with that lambda
20:42:57 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 268 seconds)
20:43:46 <dsal> One thing you might consider is naming those parameters better.
20:45:00 acidjnk joins (~acidjnk@p200300d0c72b9558d9d86757fde39a6c.dip0.t-ipconnect.de)
20:45:06 azeem joins (~azeem@176.200.243.28)
20:45:08 <junkicide> ah I see the problem now
20:45:37 <junkicide> thanks
20:46:25 × Erutuon quits (~Erutuon@user/erutuon) (Ping timeout: 248 seconds)
20:48:41 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 258 seconds)
20:49:26 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Remote host closed the connection)
20:50:10 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
20:50:23 Xnuk joins (~xnuk@45.76.202.58)
20:53:55 × jpds quits (~jpds@gateway/tor-sasl/jpds) (Remote host closed the connection)
20:54:19 jpds joins (~jpds@gateway/tor-sasl/jpds)
20:54:40 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Ping timeout: 240 seconds)
20:55:46 × azeem quits (~azeem@176.200.243.28) (Ping timeout: 250 seconds)
20:56:34 hseg joins (~gesh@IGLD-84-228-238-79.inter.net.il)
20:57:05 azeem joins (~azeem@176.200.243.28)
20:57:05 × mestre quits (~mestre@191.177.175.57) (Quit: Lost terminal)
20:57:59 × __monty__ quits (~toonn@user/toonn) (Quit: leaving)
20:58:45 <hseg> Hi. am getting spooky type errors at a distance. consider the following (ill-formed) program: http://ix.io/3wGQ. ofc, GHC should complain about applying a type to a fully-saturated type. Instead, GHC complains it can't reduce any type family in my program
20:59:40 <dminuoso> hseg: What's the exact error message?
21:00:42 <hseg> so am getting the expected "Cannot apply expression of type ‘Bool’ to a visible type argument ‘Ord’" message
21:01:28 <hseg> but it's buried under a bunch of "Could not match type Sorted NonEmpty with SortedNE" messages, which go away if I delete that offending bit of codee
21:01:41 <hseg> which, note, has exactly nothing to do with my Sorted type family
21:02:45 <dminuoso> This error message looks to be expected.
21:02:46 <hseg> Am similarly getting errors that "Couldn't match type: Item (Map String Int) with: (String, b0) The type 'b0' is ambiguous"
21:02:48 <dminuoso> Why do you think it shouldnt be there?
21:03:00 <hseg> the error message itself is not the problem
21:03:16 <hseg> it's that it causes _other, unrelated_ parts of the code to error
21:04:44 <dminuoso> hseg: Is this `h` top level binding in your original code?
21:04:44 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
21:04:48 <hseg> yes
21:05:10 <dminuoso> I see. So if you replaced the definifion of `h` with undefined, these tyfam errors go away?
21:05:16 <hseg> yup
21:05:28 <dminuoso> Sounds ripe for a bug report then
21:05:32 <hseg> same if I remove the @Ord type application
21:05:55 <maerwald> blergh... who likes word shifting? :D
21:05:59 <hseg> I only get a "could not deduce c (First a) from context c a" error, as expected
21:06:22 <dminuoso> hseg: Possibly related, but...
21:06:25 × mc47 quits (~mc47@xmonad/TheMC47) (Remote host closed the connection)
21:06:32 <dminuoso> hseg: What if you provide a well typed definition for it?
21:06:34 <maerwald> https://hackage.haskell.org/package/bytestring-0.11.1.0/docs/src/Data.ByteString.html#breakSubstring -- trying to figure out how to make this work with Word16
21:06:44 <dminuoso> GHC sometimes bails out earlier or later, depending on the type error.
21:07:59 <maerwald> or you could argue this function isn't defined for Word16 bytestream
21:08:05 <maerwald> I'm not sure
21:08:06 <hseg> yeah, am having trouble getting the right permutation to trip ghc up
21:09:02 <dminuoso> hseg: I think Ive observed GHC sometimes provide a different set of "visible" type errors before. Are the tyfam errors you saw legit?
21:09:11 <hseg> nope
21:09:16 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
21:09:22 <hseg> as I mentioned, if I delete h, ghc compiles clean
21:09:25 <dminuoso> So if you provide a well-typed definition for `h`, the entire module compiles?
21:09:27 <dminuoso> Uh
21:09:30 <dminuoso> Okay, then go file a bug report.
21:09:32 lavaman joins (~lavaman@98.38.249.169)
21:09:37 <dminuoso> Do you have any type checker plugins?
21:09:38 × lavaman quits (~lavaman@98.38.249.169) (Remote host closed the connection)
21:09:54 <hseg> no plugins, but quite a few extensions
21:10:12 <hseg> trying to reeduce to mwe
21:11:14 <dminuoso> Which GHC version is this with?
21:11:29 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
21:11:49 <hseg> 9.0.1
21:11:55 × fresheyeball quits (~fresheyeb@c-71-237-105-37.hsd1.co.comcast.net) (Quit: WeeChat 2.9)
21:12:23 o1lo01ol1o joins (~o1lo01ol1@5.181.115.89.rev.vodafone.pt)
21:12:40 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)
21:14:36 markpythonicbtc joins (~textual@2601:647:5a00:35:d936:f2de:ef6:f0f4)
21:15:49 jakalx parts (~jakalx@base.jakalx.net) (Error from remote client)
21:16:19 <dminuoso> hseg: can you provide the full error message with the tyfams you are getting?
21:16:34 <hseg> a moment, trying to get a mwe
21:18:27 venue joins (~venue@user/venue)
21:18:41 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
21:19:23 [itchyjunk] joins (~itchyjunk@user/itchyjunk/x-7353470)
21:19:29 <hseg> ok, reproduced, minimizing
21:22:26 <hseg> hrm. somehow ANN pragmas are involved?
21:24:42 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
21:25:15 × o1lo01ol1o quits (~o1lo01ol1@5.181.115.89.rev.vodafone.pt) (Remote host closed the connection)
21:27:08 wroathe joins (~wroathe@user/wroathe)
21:27:23 × wroathe quits (~wroathe@user/wroathe) (Client Quit)
21:27:33 wroathe joins (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net)
21:27:33 × wroathe quits (~wroathe@96-88-30-181-static.hfc.comcastbusiness.net) (Changing host)
21:27:33 wroathe joins (~wroathe@user/wroathe)
21:27:46 reumeth joins (~reumeth@user/reumeth)
21:28:05 <geekosaur> ANN prgamas mostly behave like expressions at whatever level they're at
21:29:40 <hseg> ok, mwe: http://ix.io/3wH1
21:30:10 <hseg> deleting adapt compiles clean
21:30:28 <hseg> deleting myid only shows adapt's errors
21:30:58 × jumper149 quits (~jumper149@80.240.31.34) (Quit: WeeChat 3.2)
21:31:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:35:51 Racl joins (~Racl@80.174.59.205.dyn.user.ono.com)
21:35:59 × junkicide quits (~user@2a01cb0001f4f500f106e9e16d7acd2d.ipv6.abo.wanadoo.fr) (Remote host closed the connection)
21:36:21 chris joins (~chris@81.96.113.213)
21:36:24 chris is now known as Guest554
21:39:33 × Racl quits (~Racl@80.174.59.205.dyn.user.ono.com) (Quit: Leaving...)
21:40:18 lavaman joins (~lavaman@98.38.249.169)
21:44:44 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 250 seconds)
21:45:09 <hseg> reported: https://gitlab.haskell.org/ghc/ghc/-/issues/20265
21:50:46 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Remote host closed the connection)
21:51:28 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
21:52:01 jakalx joins (~jakalx@base.jakalx.net)
21:54:16 × reumeth quits (~reumeth@user/reumeth) (Ping timeout: 250 seconds)
21:56:26 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Ping timeout: 250 seconds)
21:58:51 × doyougnu quits (~user@c-73-25-202-122.hsd1.or.comcast.net) (Remote host closed the connection)
21:58:52 × azeem quits (~azeem@176.200.243.28) (Read error: Connection reset by peer)
21:59:07 azeem joins (~azeem@dynamic-adsl-94-34-33-6.clienti.tiscali.it)
22:00:13 <_bin> Where is the best source to learn about using monads to store information in the environment? Stuff like global config variables, logging stuff, etc.?
22:00:46 × adamflott quits (~adamflott@c-73-60-249-202.hsd1.ma.comcast.net) (Quit: Connection closed)
22:01:31 schuelermine joins (~anselmsch@user/schuelermine)
22:03:10 × vysn quits (~vysn@user/vysn) (Ping timeout: 240 seconds)
22:03:18 × geekosaur quits (~geekosaur@xmonad/geekosaur) (Remote host closed the connection)
22:03:38 geekosaur joins (~geekosaur@xmonad/geekosaur)
22:05:05 <maerwald> that sounds like you want a parameter to your functions
22:05:17 × schuelermine quits (~anselmsch@user/schuelermine) (Client Quit)
22:05:31 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 252 seconds)
22:05:56 <_bin> If I'm supplying some logging stuff to most of my functions then that would get rather cumbersome.
22:06:03 <_bin> Is there a better way to do such things?
22:06:09 <maerwald> that's where ppl use Reader monad
22:06:22 <maerwald> which is basically just hiding a function argument
22:07:37 <_bin> That sounds helpful. What's the best resource to learn about using that for this purpose?
22:07:45 talismanick joins (~user@2601:644:8500:8350::e26b)
22:08:13 <talismanick> Has anyone encoded smooth infinitesimal analysis in Haskell?
22:08:23 <sm> you can do it in just IO too, if you're already in that
22:08:58 <_bin> sm: How would I do that
22:09:35 <talismanick> or, more generally, nilpotent infintesimals more "sophisticated" than dual numbers?
22:10:03 <talismanick> Because I remember seeing those used to explain forward-mode automatic differentiation somewhere
22:10:39 <talismanick> Although I don't remember if it was with Haskell (I might be confusing it with the "geometric algebra in Haskell" blogpost)
22:12:57 <sm> _bin: https://hackage.haskell.org/package/io-storage is one way. More generally there's https://hackage.haskell.org/package/mtl-2.2.2/docs/Control-Monad-Reader.html
22:15:54 × Pickchea quits (~private@user/pickchea) (Quit: Leaving)
22:16:24 lavaman joins (~lavaman@98.38.249.169)
22:20:14 × hseg quits (~gesh@IGLD-84-228-238-79.inter.net.il) (Quit: WeeChat 3.2)
22:20:49 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 248 seconds)
22:21:34 × amahl quits (~amahl@dsl-jklbng12-54fbca-64.dhcp.inet.fi) (Ping timeout: 250 seconds)
22:25:07 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
22:25:37 × hendursaga quits (~weechat@user/hendursaga) (Ping timeout: 244 seconds)
22:27:50 hendursaga joins (~weechat@user/hendursaga)
22:27:54 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Remote host closed the connection)
22:32:40 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Ping timeout: 240 seconds)
22:33:53 × adanwan quits (~adanwan@gateway/tor-sasl/adanwan) (Ping timeout: 244 seconds)
22:34:21 adanwan joins (~adanwan@gateway/tor-sasl/adanwan)
22:38:19 cjb joins (~cjb@user/cjb)
22:42:06 lotuseater joins (~user@p200300e7871bf00038fb8d6cf7d8260d.dip0.t-ipconnect.de)
22:43:40 × acidjnk quits (~acidjnk@p200300d0c72b9558d9d86757fde39a6c.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
22:46:48 <koz> Can someone suggest a good infix ASCII approximation to the radix symbol?
22:46:54 <koz> (like, the square root symbol)
22:55:09 <lotuseater> in APL this can be performed with the operator (*÷) :)
22:55:36 <hpc> (-/) perhaps
22:56:02 <hpc> @let b -/ n = n ** (1/b)
22:56:03 <lambdabot> Defined.
22:56:05 <hpc> 3 -/ 8
22:56:09 <hpc> > 3 -/ 8
22:56:11 <lambdabot> 2.0
22:57:08 <koz> -/ is pretty good actually, thanks hpc!
22:57:18 <koz> You are both intelligent and unusually attractive.
22:57:45 <hpc> lol
22:57:52 acidjnk joins (~acidjnk@p200300d0c72b9558d9d86757fde39a6c.dip0.t-ipconnect.de)
22:59:16 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab)
23:00:16 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
23:01:34 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Remote host closed the connection)
23:02:06 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
23:02:56 × Guest554 quits (~chris@81.96.113.213) (Remote host closed the connection)
23:04:39 lavaman joins (~lavaman@98.38.249.169)
23:06:40 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Ping timeout: 240 seconds)
23:07:46 chris joins (~chris@81.96.113.213)
23:07:50 chris is now known as Guest7041
23:09:19 × lavaman quits (~lavaman@98.38.249.169) (Ping timeout: 252 seconds)
23:10:06 × acidjnk quits (~acidjnk@p200300d0c72b9558d9d86757fde39a6c.dip0.t-ipconnect.de) (Ping timeout: 250 seconds)
23:11:08 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:fc6b:7277:c769:1dab) (Remote host closed the connection)
23:11:50 × waleee quits (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 250 seconds)
23:12:10 × Guest7041 quits (~chris@81.96.113.213) (Ping timeout: 240 seconds)
23:12:16 × slep quits (~slep@cpc150002-brnt4-2-0-cust437.4-2.cable.virginm.net) (Ping timeout: 250 seconds)
23:12:16 waleee joins (~waleee@h-98-128-228-119.NA.cust.bahnhof.se)
23:15:24 chris joins (~chris@81.96.113.213)
23:15:29 chris is now known as Guest8337
23:18:45 Erutuon joins (~Erutuon@user/erutuon)
23:19:38 × machinedgod quits (~machinedg@24.105.81.50) (Ping timeout: 250 seconds)
23:24:10 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 252 seconds)
23:28:20 × V quits (~v@anomalous.eu) (Ping timeout: 256 seconds)
23:29:37 × jtomas quits (~jtomas@233.red-83-34-2.dynamicip.rima-tde.net) (Ping timeout: 248 seconds)
23:33:43 eggplantade joins (~Eggplanta@2600:1700:bef1:5e10:6515:9257:f76:9654)
23:35:40 × MidAutumnMoon quits (~MidAutumn@user/midautumnmoon) (Ping timeout: 250 seconds)
23:36:08 roboguy_ joins (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84)
23:37:51 <koz> hpc: What would be a good fixity for (-/)?
23:38:10 × eggplantade quits (~Eggplanta@2600:1700:bef1:5e10:6515:9257:f76:9654) (Ping timeout: 240 seconds)
23:39:48 <hpc> hmm
23:41:16 euouae joins (~euouae@user/euouae)
23:41:55 Topsi joins (~Tobias@dyndsl-095-033-019-235.ewe-ip-backbone.de)
23:41:56 × Tuplanolla quits (~Tuplanoll@91-159-69-50.elisa-laajakaista.fi) (Quit: Leaving.)
23:42:32 <hpc> (a -/ b -/ c) is definitely (a -/ (b -/ c)) imo
23:42:49 <koz> So that's... infixr?
23:43:20 euouae parts (~euouae@user/euouae) ()
23:43:53 MidAutumnMoon joins (~MidAutumn@user/midautumnmoon)
23:44:18 <hpc> it's tempting to make it the same as (**)
23:44:30 <koz> That would make sense.
23:44:40 × roboguy_ quits (~roboguy_@2605:a601:afe7:9f00:2d0e:8bc:c41d:5a84) (Ping timeout: 240 seconds)
23:44:43 <hpc> infixr 8 **
23:44:47 <hpc> so maybe that?
23:44:59 dajoer joins (~david@user/gvx)
23:45:00 <koz> Yeah, seems like a reasonable choice.
23:45:01 <koz> Thanks!
23:51:38 machinedgod joins (~machinedg@24.105.81.50)
23:54:25 × Gurkenglas quits (~Gurkengla@dslb-002-203-144-156.002.203.pools.vodafone-ip.de) (Ping timeout: 252 seconds)
23:56:02 nate1 joins (~nate@108-233-125-227.lightspeed.sntcca.sbcglobal.net)
23:56:28 × wroathe quits (~wroathe@user/wroathe) (Ping timeout: 250 seconds)

All times are in UTC on 2021-08-22.