Home freenode/#haskell: Logs Calendar

Logs on 2020-12-19 (freenode/#haskell)

00:02:39 carlomagno joins (~cararell@148.87.23.6)
00:02:41 cads2 joins (~cads@ip-64-72-99-232.lasvegas.net)
00:04:58 teardown_ joins (~user@gateway/tor-sasl/mrush)
00:06:24 <sshine> if I've got a playing card data type, its Eq instance should be easy. but I am conflicted about its Ord instance: on the one hand, Card Spades Ace is not less than Card Hearts Ace, but on the other hand, if they're not greater than each other, and they're not equal, Eq and Ord disagree.
00:06:59 xcmw joins (~textual@2603-6011-2200-f103-5cc1-e708-14f1-cedf.res6.spectrum.com)
00:07:00 <glguy> if you have some semantically interesting comparison function you can make that separate from Ord
00:07:03 <sshine> so for the purpose of making an arbitrary but consistent Ord class for inserting cards into containers, anything goes. and for the purpose of making it logically meaningful, meh.
00:07:15 <glguy> Ord is good for being an arbitrary total order that can be handed off to Map and friends
00:07:16 <Rembane> On the third hand, EQ and (==) are not the same thing, so eh...
00:07:23 <hpc> in some games, there is an ordering of suits
00:07:43 <sshine> glguy, ah, so you're saying: name the comparison function and accept that Ord is a little funky.
00:07:53 <glguy> I'd suggest if you have a semantically important comparison, name and document it
00:08:01 <glguy> and then use that with things like sortBy or whatever as needed
00:08:02 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
00:08:03 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
00:08:14 <sshine> hpc, right. so it'd make sense to not narrow Ord down to express a whole lot other than something consistent.
00:08:22 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
00:08:27 <sshine> glguy, makes perfect sense.
00:08:30 <sshine> thanks guys.
00:08:53 × Tuplanolla quits (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi) (Quit: Leaving.)
00:09:17 <sshine> and yes, different games have completely different card orders. :)
00:09:35 <sshine> sometimes even determined by some arbitrary state of the game.
00:10:37 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
00:11:08 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
00:11:43 × hekkaidekapus_ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
00:12:48 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
00:14:37 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
00:14:49 <sshine> here's another thing; I recently interviewed for a job where the code test had to do with randomly generated passwords. I thought the shortest path was through QuickCheck generators. it was fine for demonstration purposes. but would you depend on QuickCheck outside of your test suite for that? what's the alternative? I only know of monad-bayes, but I can't say that it's as easy to use as
00:14:55 <sshine> Test.QuickCheck.Gen.
00:15:40 <sm[m]> off topic: does anyone know a better news (NNTP) reader than Thunderbird ?
00:18:50 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
00:19:11 <sm[m]> on topic: I recently subscribed it to the haskell stack overflow feed (news.gmane.io > gwene.com.stackoverflow.feeds.tag.haskell) and wow, there's a lot more SO activity than I thought (10-20 questions/day)
00:21:11 × gehmehgeh quits (~ircuser1@gateway/tor-sasl/gehmehgeh) (Quit: Leaving)
00:22:10 <sshine> sm[m], I didn't know you could get StackOverflow updates via NNTP.
00:22:46 <sshine> yeah, the [haskell] tag is pretty active. I sometimes look at it because the [sml] tag is a dried up pond. :-D
00:22:55 <sm[m]> yup, gmane (gmane.io)'s "gwene" newsgroups are RSS feeds
00:23:12 <sshine> but you can't reply, can you?
00:23:28 <sm[m]> I haven't tried!
00:23:37 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
00:24:56 tsrt^ joins (~hph@ip98-184-89-2.mc.at.cox.net)
00:25:36 da39a3ee5e6b4b0d joins (~da39a3ee5@171.5.29.10)
00:27:29 <Kronic> What is the recommended way to maintain an ubuntu install of haskell? I installed it simply through aptitude previously, however when installing ghcup to get hls it installed another version of ghc. I since removed the old version (Haskell-platform) but now none of my builds work in stack
00:28:46 <glguy> Kronic: generally you'd just use ghcup and not anything from aptitude
00:29:03 <glguy> stack is a separate thing that manages its own ghc
00:29:09 <Kronic> can that manage my stack install as well?
00:29:16 <glguy> no, stack's it's own world
00:29:22 <glguy> its*
00:29:59 <sshine> yeah, either install stack and let stack handle ghcs. or use ghcup :)
00:32:54 nineonin_ joins (~nineonine@50.216.62.2)
00:32:54 × nineonine quits (~nineonine@50.216.62.2) (Remote host closed the connection)
00:33:26 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
00:34:08 × dax quits (dax@bitbot/dax) (Quit: brb)
00:34:31 dax joins (dax@bitbot/dax)
00:35:13 <ezzieyguywuf> hrm, after `./setup build` isn't there a way to use the setup executable to run the program?
00:35:15 <Kronic> https://dpaste.org/N4TB This is the error I am getting
00:35:17 teardown joins (~user@gateway/tor-sasl/mrush)
00:35:22 <ezzieyguywuf> rather than `./dist/build/mybin/mybin`?
00:35:23 <Kronic> When I attempt stack build
00:35:40 <ezzieyguywuf> I checked `./setup --help` but didn't see anything about that
00:36:34 olligobber joins (~olligobbe@unaffiliated/olligobber)
00:37:51 × brodie quits (~brodie@207.53.253.137) (Quit: brodie)
00:38:00 × xcmw quits (~textual@2603-6011-2200-f103-5cc1-e708-14f1-cedf.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
00:38:23 × teardown_ quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
00:40:32 × borne quits (~fritjof@200116b864c24e00c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
00:41:24 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
00:43:21 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
00:45:22 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
00:45:58 × hiroaki quits (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de) (Ping timeout: 246 seconds)
00:48:53 × cr3 quits (~cr3@192-222-143-195.qc.cable.ebox.net) (Quit: leaving)
00:49:15 <sm[m]> Kronic: that's normal, and it's telling you what to do
00:49:17 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Ping timeout: 260 seconds)
00:49:57 <sm[m]> making sense ?
00:50:11 <Kronic> I can solve it it just doesn't make sense why it needs that
00:51:18 <sm[m]> stack by default will install only packages from the resolver specified in your stack.yaml. This is for reproducability. It can install extra stuff from Hackage, but then you have to tell it which version, again for reproducibility
00:52:52 <sm[m]> with cabal (by default), you don't have to tell it that, but then cabal is free to pick any version of calamity and may not always pick the one you intended
00:53:07 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
00:53:18 <sm[m]> does that help ?
00:55:44 <Kronic> It makes sense but most other reproducible build tools I've seen solve this just through version specification
00:55:52 <Kronic> Why do I need to specify some hash-like thing?
00:56:41 <sm[m]> oh, that part is optional and I usually omit it. It was added to work around hackage's revisions, which defeated version numbering
00:58:00 <sm[m]> so just - calamity-0.1.22.1 is what you'd usually put unless you want it really really reproducible
00:58:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
00:58:44 <sm[m]> or perhaps it's more than a workaround, and actually provides an additional check. We'd have to check the docs
00:59:13 <Kronic> So, I did that and it spewed out about 8 other libraries that now need to be specified there
00:59:30 <sm[m]> yup, that's normal. They too are not in your stackage resolver
01:00:01 <Kronic> It's good to hear that it's normal so now I know my environment is not broken, but I really have to say that is some really poor usability
01:00:07 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
01:00:11 <sm[m]> sometimes it means you're building an old or non-stackage-friendly project, and/or you would have an easier time with a different/older resolver
01:01:25 <sm[m]> if it's your project, it might be a sign that you've picked some old/niche libraries to depend on
01:01:44 <sm[m]> stack used to have a flag to automatically add these extra-dep lines, I think
01:02:20 <sm[m]> sometimes these things get removed for want of maintainers
01:03:33 <sm[m]> usually, you want to try and keep the extra-deps list short
01:03:57 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
01:04:24 <Kronic> I'm just using a library for discord, there's nothing in the readme about adding this to the stack.yml, similarly this stuff only started happening after I installed ghcup. I must test to see what happens if I install megaparsec
01:04:35 <Kronic> Because before I could just add that to my cabal file and it would leave me alone
01:05:27 <sm[m]> are the 8 extra deps required by calamity ? calamity depends on a lot of stuff
01:06:02 <sm[m]> megaparsec is a popular lib so it should be easier
01:08:48 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
01:09:06 sm[m] tries stack install calamity --dry-run .. yes, it just depends on a bunch of libs not in stackage, so the extra-deps are to be expected until those get added
01:10:36 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection)
01:11:05 <sm[m]> re the readme.. you're right, but that is nothing new :) https://github.com/nitros12/calamity/blob/master/stack.yaml shows the extra deps
01:11:43 whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
01:11:53 <Kronic> If I like the library I'm going to fix that, that was really annoying. I'm just very used to having the build tool be extremely out of my vision in other spaces is all.
01:12:12 <sm[m]> oh, you won't be having that experience with haskell (sorry :)
01:12:23 teardown_ joins (~user@gateway/tor-sasl/mrush)
01:12:35 <Kronic> kind of a shame. Is Nix any different or is it equally annoying?
01:12:50 <sm[m]> but it's actually better than it sounds. GHC is also more in your face than other language's compilers, right ? But it turns out to be a good thing
01:13:09 <sm[m]> more strict error checking, more correct result
01:13:23 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 268 seconds)
01:13:55 <Kronic> I like what I have been using with Haskell the last few days, I burned out on AOC so I wanted to try my hand at a real project. I just find the build-tool experience to be so far removed from anything I am used to
01:14:06 <sm[m]> nix adds another world of complexity, but the results are apparently very good if you pay the cost. Others here can say more about nix
01:14:55 <sm[m]> Kronic: have you read the user guide for stack or cabal yet ? It should not be avoided
01:15:32 <Kronic> I read through a decent amount of the stack one, there's just a lot of stuff to read when learning this language so I probably have a lot of gaps
01:15:39 <sm[m]> yeah
01:15:43 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
01:16:04 <sm[m]> sure, lots of the tooling UX could be nicer, it's a big wish in the community, but it's the current state of things
01:16:53 <sm[m]> I think in a little bit you'll find it pretty efficient
01:17:21 <Kronic> here's to hoping :)
01:17:22 teardown joins (~user@gateway/tor-sasl/mrush)
01:17:45 <sm[m]> stack build --dry-run --file-watch is good to run while you tweak your stack.yaml
01:17:52 × teardown_ quits (~user@gateway/tor-sasl/mrush) (Remote host closed the connection)
01:18:00 <Kronic> what's the purpose of dry-run ?
01:18:21 <sm[m]> no real need for it, if you omit it the thing will start building when you fix the last error
01:18:40 <Kronic> I use file-watch at the moment, so I was just wondering
01:18:45 <sm[m]> I often use it to estimate how much I'll have to build to try out some project
01:19:17 <sm[m]> with --dry-run it doesn't build but does attempt to calculate the install plan
01:19:40 × Deide quits (~Deide@217.155.19.23) (Quit: Seeee yaaaa)
01:19:54 × johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
01:20:08 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:20:29 <Kronic> I see
01:20:56 <sm[m]> it helps me decide which resolver would minimise the building
01:21:17 <sm[m]> stuff like that
01:22:09 tom__ joins (~tom@host86-182-43-65.range86-182.btcentralplus.com)
01:22:22 sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145)
01:23:03 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
01:23:14 cheater joins (~user@unaffiliated/cheater)
01:24:59 × zincy__ quits (~tom@host86-169-79-54.range86-169.btcentralplus.com) (Ping timeout: 256 seconds)
01:25:44 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
01:26:45 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
01:27:29 teardown joins (~user@gateway/tor-sasl/mrush)
01:28:58 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Client Quit)
01:29:18 × roconnor quits (~roconnor@host-45-58-200-239.dyn.295.ca) (Ping timeout: 258 seconds)
01:29:43 dbmikus joins (~dbmikus@c-174-49-172-14.hsd1.pa.comcast.net)
01:34:47 coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl)
01:34:58 × columbarius quits (~columbari@mue-88-130-54-018.dsl.tropolys.de) (Ping timeout: 268 seconds)
01:35:01 × ph88 quits (~ph88@ip5f5af6cd.dynamic.kabel-deutschland.de) (Ping timeout: 264 seconds)
01:36:40 columbarius joins (~columbari@i5E86B362.versanet.de)
01:37:54 <sshine> In the dependencies for tasty-hedgehog-1.0.0.2: hedgehog-1.0.4 from stack configuration does not match >=1.0.2 && <1.0.4 (latest matching version is 1.0.3)
01:38:01 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 264 seconds)
01:38:33 <sshine> but when I go to https://hackage.haskell.org/package/tasty-hedgehog it says that tasty-hedgehog-1.0.0.2 has a hedgehog >=1.0.2 && <1.0.5 constraint!
01:38:46 × Kronic quits (~Kronic___@84.203.96.46) (Quit: Leaving)
01:38:57 × justsomeguy quits (~justsomeg@unaffiliated/--/x-3805311) ()
01:39:03 <sshine> I'm using stack. does it somehow not see that the Hackage constraints were bumped?
01:40:21 <sm[m]> sshine: it doesn't recheck hackage every time, stack update should fix it
01:40:50 × coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
01:41:11 <sm[m]> revisions were made
01:41:45 × xsperry quits (~as@unaffiliated/xsperry) ()
01:44:44 xcmw joins (~textual@2603-6011-2200-f103-5cc1-e708-14f1-cedf.res6.spectrum.com)
01:45:02 × dax quits (dax@bitbot/dax) (Quit: brb)
01:45:10 roconnor joins (~roconnor@host-45-58-208-179.dyn.295.ca)
01:45:23 dax joins (dax@bitbot/dax)
01:45:53 xsperry joins (~as@unaffiliated/xsperry)
01:46:18 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
01:49:38 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
01:50:31 Lord_of_Life_ joins (~Lord@unaffiliated/lord-of-life/x-0885362)
01:51:07 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
01:51:19 <sshine> sm[m], thanks.
01:51:22 <sshine> yeah.
01:53:10 × Lord_of_Life quits (~Lord@unaffiliated/lord-of-life/x-0885362) (Ping timeout: 246 seconds)
01:53:14 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
01:53:21 Lord_of_Life_ is now known as Lord_of_Life
01:53:58 <fuzzypixelz> can anyone please link me the paper that first introduced monads in Haskell?
01:54:28 <sshine> http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf
01:57:51 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
01:58:53 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
02:00:11 × carlomagno quits (~cararell@148.87.23.6) (Remote host closed the connection)
02:03:38 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Ping timeout: 260 seconds)
02:05:52 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
02:06:33 × xff0x quits (~fox@2001:1a81:5299:4500:d633:3a50:dda4:7bce) (Ping timeout: 260 seconds)
02:07:34 johnw joins (~johnw@haskell/developer/johnw)
02:08:10 xff0x joins (~fox@2001:1a81:52d2:4e00:ee28:163c:e796:1277)
02:11:40 × kupi quits (uid212005@gateway/web/irccloud.com/x-mzkzpjlvwmkwoztw) (Quit: Connection closed for inactivity)
02:13:08 × darjeeling_ quits (~darjeelin@122.245.217.210) (Quit: WeeChat 2.9)
02:14:11 darjeeling_ joins (~darjeelin@122.245.217.210)
02:15:03 × dbmikus quits (~dbmikus@c-174-49-172-14.hsd1.pa.comcast.net) (Ping timeout: 268 seconds)
02:16:02 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
02:16:14 alx741 joins (~alx741@181.196.69.62)
02:18:33 × revprez_stg quits (~revprez_s@pool-108-49-213-40.bstnma.fios.verizon.net) (Quit: Lost terminal)
02:21:39 × darjeeling_ quits (~darjeelin@122.245.217.210) (Ping timeout: 256 seconds)
02:25:25 × Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.189) (Quit: Leaving)
02:25:33 _Alleria joins (~AllahuAkb@2604:2000:1484:26:fc97:daa2:47d5:3561)
02:25:41 × zv quits (~zv@unaffiliated/zv) (Ping timeout: 256 seconds)
02:25:55 × da39a3ee5e6b4b0d quits (~da39a3ee5@171.5.29.10) (Quit: Textual IRC Client: www.textualapp.com)
02:26:07 × whataday quits (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Ping timeout: 260 seconds)
02:26:07 × lolmac quits (sid171216@gateway/web/irccloud.com/x-espdqhkcxsbkntws) (Ping timeout: 260 seconds)
02:26:29 berberman_ joins (~berberman@unaffiliated/berberman)
02:26:42 × metamod quits (uid478611@gateway/web/irccloud.com/x-sbvlqgnmuennsspc) (Ping timeout: 260 seconds)
02:26:42 × glowpelt quits (~myst@focks.pw) (Ping timeout: 260 seconds)
02:26:42 × psamim quits (samimpmatr@gateway/shell/matrix.org/x-vsfkhpcmdjixlzby) (Ping timeout: 260 seconds)
02:26:42 × sm[m] quits (simonmicma@gateway/shell/matrix.org/x-gzxysvhrewmogyhp) (Ping timeout: 260 seconds)
02:26:42 × Alleria_ quits (~AllahuAkb@2604:2000:1484:26:bd49:94e5:c539:ee9b) (Ping timeout: 260 seconds)
02:26:49 metamod joins (uid478611@gateway/web/irccloud.com/x-vcbtaspxheignymp)
02:27:17 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
02:27:17 × Noughtmare[m] quits (naughtmare@gateway/shell/matrix.org/x-fpxdgixxyxyfpjbh) (Ping timeout: 260 seconds)
02:27:17 × m4lvin quits (~m4lvin@w4eg.de) (Ping timeout: 260 seconds)
02:27:17 × liquorice quits (sid267884@gateway/web/irccloud.com/x-sshcjibpmbnripit) (Ping timeout: 260 seconds)
02:27:23 × raehik quits (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 256 seconds)
02:27:24 m4lvin joins (~m4lvin@w4eg.de)
02:27:38 × elfets quits (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de) (Quit: Leaving)
02:27:39 glowpelt joins (~myst@focks.pw)
02:27:40 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
02:27:43 whataday joins (~xxx@2400:8902::f03c:92ff:fe60:98d8)
02:27:54 psamim joins (samimpmatr@gateway/shell/matrix.org/x-ykgbnwpnymsecdtt)
02:28:04 liquorice joins (sid267884@gateway/web/irccloud.com/x-wtehvzqjexiicxpn)
02:28:08 × xcmw quits (~textual@2603-6011-2200-f103-5cc1-e708-14f1-cedf.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:28:12 lolmac joins (sid171216@gateway/web/irccloud.com/x-duuhdmvyopfrbzrt)
02:28:13 sm[m] joins (simonmicma@gateway/shell/matrix.org/x-wqdqihhkkwalfrui)
02:28:24 christo joins (~chris@81.96.113.213)
02:28:33 Noughtmare[m] joins (naughtmare@gateway/shell/matrix.org/x-abqpqrdkbpmkfyoz)
02:30:56 × jmchael quits (~jmchael@81.174.180.109) (Ping timeout: 256 seconds)
02:31:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
02:32:43 × christo quits (~chris@81.96.113.213) (Ping timeout: 246 seconds)
02:37:12 darjeeling_ joins (~darjeelin@122.245.217.210)
02:40:20 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Ping timeout: 268 seconds)
02:41:02 <siraben> Is there a Nix overlay for GHC 8.12?
02:42:34 xcmw joins (~textual@2603-6011-2200-f103-757c-623c-37b4-1464.res6.spectrum.com)
02:43:01 × Ariakenom quits (~Ariakenom@2001:9b1:efb:fc00:3120:8946:e899:8a57) (Quit: Leaving)
02:44:15 kam1 joins (~kam1@24.231.108.143)
02:45:44 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
02:45:47 <koz_> siraben: I assume you mean GHC 9?
02:46:00 kam1 joins (~kam1@24.231.108.143)
02:46:14 <siraben> Didn't 8.12 add linear types?
02:46:40 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
02:46:53 kam1 joins (~kam1@24.231.108.143)
02:47:00 × xcmw quits (~textual@2603-6011-2200-f103-757c-623c-37b4-1464.res6.spectrum.com) (Client Quit)
02:47:03 <koz_> siraben: 8.12 got renamed to 9, and isn't technically out yet.
02:47:29 <yushyin> https://gitlab.haskell.org/ghc/ghc/-/wikis/status/ghc-9.0.1 status page fyi
02:47:47 × sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed)
02:47:58 <siraben> koz_: ah, ok.
02:48:14 <siraben> Did the compilation process change? I could just override the version attribute of the Nixpkgs expression
02:48:24 <koz_> yushyin: Is it just me or is that link taking forever to load>
02:48:29 <koz_> ?*
02:48:29 <lambdabot> Maybe you meant: v @ ? .
02:49:06 <yushyin> koz_: sometimes the haskell gitlab is slow as f*ck :/
02:49:25 <koz_> yushyin: Clearly my superior luck ensured that now is one of those times.
02:49:28 drbean joins (~drbean@TC210-63-209-85.static.apol.com.tw)
02:49:53 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
02:50:38 kam1 joins (~kam1@24.231.108.143)
02:50:52 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
02:51:08 kam123 joins (~kam1@24.231.108.143)
02:54:33 × kam123 quits (~kam1@24.231.108.143) (Client Quit)
02:54:51 kam1 joins (~kam1@24.231.108.143)
02:56:17 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
02:56:30 kam1 joins (~kam1@24.231.108.143)
03:03:34 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
03:04:23 × kam1 quits (~kam1@24.231.108.143) (Quit: Quit)
03:04:24 <fuzzypixelz> I just spent a long time staring at ghci because I forgot to use `let` when defining my function for sperate patterns
03:04:40 kam1 joins (~kam1@24.231.108.143)
03:04:46 <fuzzypixelz> it would yell everytime, Non-Exhaustive patterns!
03:04:54 <fuzzypixelz> oh my lorf
03:05:03 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
03:05:20 kam1 joins (~kam1@24.231.108.143)
03:06:51 <fuzzypixelz> wait, it still doesn't work
03:07:27 <fuzzypixelz> maybe I can't do it in ghci
03:07:37 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:07:47 × jchia__ quits (~jchia@jungle.jchia.net) (Remote host closed the connection)
03:08:07 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Ping timeout: 260 seconds)
03:08:17 <dsal> Doing stuff in ghci can be frustrating. Try to minimize that. :)
03:08:34 jchia__ joins (~jchia@58.32.37.146)
03:09:06 × kam1 quits (~kam1@24.231.108.143) (Client Quit)
03:09:27 kam1 joins (~kam1@24.231.108.143)
03:11:15 <fuzzypixelz> dsal: the order in which I define my function for different patterns matters right?
03:11:38 <dsal> Yeah.
03:11:52 <dsal> Otherwise ambiguous matches would cause confusion.
03:12:20 <dsal> > let f _ = 0; f True = 1 in f True
03:12:23 <lambdabot> 0
03:13:04 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
03:13:07 <sshine> siraben, btw, we've added support for expressing stakeholding in a smart contract as owning ERC1155 tokens, by implementing ERC1155 in pure EVM. :-D that was fun.
03:13:29 <siraben> sshine: wait, no language, just pure EVM? nice!
03:13:34 <dsal> I made my expression from last night's AoC Foldable, and now I don't know what that means.
03:13:35 <siraben> which assembler are you using?
03:13:35 <sshine> siraben, now, naturally, code generation has a thousand holes that cryptobugs could crawl in.
03:13:43 <sshine> siraben, well, the compiler is still Haskell, but yeah, just opcodes.
03:13:47 <siraben> Of course
03:13:56 <siraben> Ooh, do you have a link to it?
03:14:05 <sshine> siraben, we're building weak abstractions on top, like subroutines being [Opcode] ;)
03:14:25 <sshine> we're releasing it on December 28th. my friend is kinda weird about coding in the open, I think.
03:15:15 <siraben> sshine: Ok, looking forward to it!
03:16:13 <siraben> Would be interesting if you could achieve this with a tagless final encoding as well for type safety
03:16:15 <sshine> I think writing EVM inside Haskell is a nice way to build minimal language features to realize what's truly useful. costs only as much as you're willing to invest in various language features. so what I really wanna look into is having an abstraction on top of Opcode that encodes its "stack signature".
03:16:20 <siraben> GADTs would work too I guess
03:16:27 <siraben> Right
03:16:31 <sshine> yes!
03:17:06 <siraben> And Conal's work on Compiling to Categories may be useful
03:17:26 <siraben> Yeah, Haskell as a typed metalanguage is very powerful and one doesn't need to roll their own type system
03:17:30 <sshine> so I'm basically doing some of this type-related stuff on the side. so in one repository we're just trampling forward, trying to reach "it runs on the blockchain!" and separately I'm trying to clean up and do things right.
03:17:52 <sshine> we're hardly as efficient as Victor Maia. :-D
03:18:11 <siraben> Who is Victor Maia?
03:18:15 <sshine> Formality author
03:18:34 × theDon quits (~td@muedsl-82-207-238-130.citykom.de) (Ping timeout: 272 seconds)
03:18:54 <siraben> https://github.com/leonidas/codeblog/blob/master/2012/2012-02-17-concatenative-haskell.md
03:18:56 <sshine> he was in Haskell Weekly #242. but I think I mentioned him to you a while ago because he achieved beta reductions in EVM at 200 gas.
03:19:07 <siraben> oh that's cool
03:19:18 <sshine> (for comparison, safeMul is, I think, 78 gas.)
03:19:34 <siraben> "That gives us approximately 267 gas per beta-reduction, which is really low: only 33x more than a native MULMOD, and the same as one SLOAD. "
03:19:36 <sshine> (that is, a MUL that doesn't randomly overflow without warning.)
03:19:37 <siraben> https://medium.com/@maiavictor/compiling-formality-to-the-evm-99aec75677dd
03:19:40 <sshine> ah, 267.
03:19:48 theDon joins (~td@94.134.91.83)
03:19:49 <sshine> yes.
03:19:54 <siraben> still an achievement, my encoding of lambda calculus takes up much more
03:20:04 <siraben> I forget what but it's based on a combinatory logic VM
03:20:09 <sshine> you encoded lambdas in EVM?
03:20:28 <fuzzypixelz> can I format strings without using show and ++?
03:20:34 <siraben> https://gist.github.com/siraben/cbf698c0455f55d41c01c14177e8d90a
03:20:47 <fuzzypixelz> something like ${VAR} in bash?
03:20:51 <siraben> Unfortunately I think I have a subtle bug somewhere
03:20:57 <sshine> I think the efficiency was related to some research on interaction nets, so that's a little out of my reach right now.
03:21:02 <siraben> But the basic conditional compilation I tried worked
03:21:10 <sshine> fuzzypixelz, quasi quoters.
03:21:21 <sshine> fuzzypixelz, some template systems for web use this.
03:21:39 <siraben> sshine: (SII)(SII) loops as expected :D
03:22:02 <siraben> and arithmetic expressions like (+) (#3) (#6)
03:22:04 lagothrix is now known as Guest21990
03:22:04 xirhtogal joins (~lagothrix@unaffiliated/lagothrix)
03:22:04 × Guest21990 quits (~lagothrix@unaffiliated/lagothrix) (Killed (card.freenode.net (Nickname regained by services)))
03:22:04 xirhtogal is now known as lagothrix
03:22:34 <sshine> siraben, is that EVM? :-D there's a bunch of stuff I don't recognize.
03:22:44 <siraben> Yeah EVM but in my assembler syntax
03:22:46 <sshine> fuzzypixelz, one sec.
03:23:24 <sshine> fuzzypixelz, here's an example of a typesafe template library: https://hackage.haskell.org/package/heterocephalus-1.0.5.4/docs/Text-Heterocephalus.html
03:23:43 <siraben> I have a call stack of depth 16 in EVM for addresses in up to 2^16-1
03:23:55 <siraben> Which is sufficient
03:24:05 <sshine> fuzzypixelz, I like it because you can put template variable syntax in text files, and then you can load it into a Haskell file, and then it will create errors if the right variables aren't in scope.
03:24:57 <sshine> fuzzypixelz, you could also just use strings inside the Haskell file, but I think this is a little overkill because the template system adds up to a few hundred milliseconds of compile time just for neater syntax...
03:25:07 <siraben> sshine: I gave a presentation this year on it https://github.com/ActorForth/evm-assembler/blob/master/docs/evm-assembler-talk.pdf
03:25:13 <fuzzypixelz> sshine: sorry for the confusion I'm trying to do something like "hello ${name}" where name is in the scope of my file? I think I wasn't so clear :P
03:26:17 <sshine> fuzzypixelz, tl;dr: [compileText|hello #{name}]
03:26:54 <sshine> fuzzypixelz, I think there are several other libraries that do this. this was just the one I could remember having liked. :)
03:27:15 <sshine> its main purpose is allowing you to take huge strings and put them inside text files instead.
03:27:34 <sshine> but it also has a basic string quasi quoter.
03:30:24 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
03:30:43 <sshine> fuzzypixelz, another purpose one might have is a bunch of special characters that normally need escaping. then https://hackage.haskell.org/package/raw-strings-qq is useful, e.g. [r|\n|] == "\\n". so I wonder if there's a library that specifically only does what you want.
03:32:07 <sshine> siraben, I saw your slides.
03:35:12 <siraben> sshine: nice
03:35:21 <koz_> I'm seeing this here: https://hackage.haskell.org/package/selective-0.4.1.1/docs/Control-Selective.html#t:Validation, where they claim that it's _not_ a monad. Is there some definitional reason it can't be? As far as I can tell it can, they just didn't define the instance.
03:35:27 <sshine> siraben, but re-reading them having written a bunch of EVM, I find them more informative now.
03:36:24 <siraben> I also put an example in "standard" EVM and my own syntax
03:36:28 <sshine> koz_, don't you specifically want for it to not be a Monad so that you can parallellize it?
03:36:55 <koz_> sshine: Sure, but I was checking if this is a conscious choice, rather than an inherent limitation based on its Applicative instance or something.
03:37:30 <sshine> https://www.staff.ncl.ac.uk/andrey.mokhov/selective-functors.pdf
03:38:02 <sshine> I'm pretty sure it is.
03:39:15 <sshine> yeah, they talk about speculative execution and parallelism.
03:40:00 <sshine> siraben, what's your assessment of the "one-word256-as-stack" idea?
03:40:30 <siraben> sshine: i haven't built large enough contracts yet, it's a hack and would be pretty difficult to enforce above assembly
03:41:15 <siraben> if one prohibits general recursion but allows tail recursion, I see no problem with it
03:41:36 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
03:41:39 <siraben> koz_: I though the whole idea for selective applicative functors is an abstraction between applicatives and monads
03:41:43 <koz_> sshine: Actually, upon further thought, it _can't_ be a monad. It's because ap /= <*> for it.
03:41:50 <siraben> So all monads are SAFs, but not all SAFs are monads
03:41:59 <siraben> s/though/thought
03:42:00 <jophish> Anyone here using nix on osx and would be willing to help me test something (single command)
03:42:02 <sshine> I tried writing Solidity earlier this year where I ran into the "stack too deep" problem where the compiler can't reach the full scope because DUP16 is not enough.
03:42:05 <siraben> jophish: sure
03:42:06 <jophish> nix-build https://github.com/expipiplus1/nixpkgs/archive/82196fabb65d5e3824ed57f3db78563797edff74.tar.gz -A directx-shader-compiler
03:42:18 <koz_> Since the >>= would be defined the same way as for Either, which would mean that ap would end up different to <*>.
03:42:25 <siraben> wait jk i'm on NixOS right now lol
03:42:31 <siraben> I'll reboot to try it out, why unot
03:42:35 <siraben> s/unot/not
03:42:38 <jophish> that's very kind, thank you!
03:42:44 × Sheilong quits (uid293653@gateway/web/irccloud.com/x-lgxaqgimsgvlotpk) ()
03:43:35 kupi joins (uid212005@gateway/web/irccloud.com/x-gzofgnqwuptoilky)
03:44:26 sgibber2018 joins (~arch-gibb@208.85.237.137)
03:45:24 × hidedagger quits (~nate@unaffiliated/hidedagger) (Quit: WeeChat 2.9)
03:45:52 <siraben> sshine: you had too many live variables?
03:46:46 <siraben> oh man, I could not trust Solidity to compile smart contracts 100% correctly
03:47:19 × berberman_ quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in)
03:47:41 berberman joins (~berberman@unaffiliated/berberman)
03:50:27 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
03:50:54 MOSCOS joins (~MOSCOS@122.54.107.175)
03:50:58 <sshine> sigh.
03:51:16 <sshine> I'm sure it has bugs, but at least it's extensively used, so they get caught approximately as frequently as they get made, I think.
03:51:24 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 256 seconds)
03:51:50 <siraben> that's true, i've only worked with vyper and it was alright, had to fix the compiler's codegen twice though
03:52:07 <siraben> they encoded LLL as nested python lists >.<
03:52:13 <koz_> @pl \f -> fmap (f $)
03:52:13 <lambdabot> fmap
03:52:20 <koz_> Lol rly?
03:52:26 <koz_> K.
03:52:28 <siraben> koz_: checkmate
03:52:57 <sshine> I learned that 'addr(0)', which is what you write instead of simply 0 to help the linter catch if you're doing funky non-address-related stuff to an address, is not a zero-cost abstraction. it actually does 0 & 0xFFFFFF...FF.
03:53:11 <siraben> reasoning; \f → fmap (f $) = \f → fmap f = fmap
03:53:20 <sshine> you wanna make sure those 0s are properly zeroed.
03:53:34 <siraben> i wonder how hlint can integrate with pointfree
03:53:45 <siraben> sshine: wow
03:53:54 <sshine> so that the upper 96 zero bits are being zeroed for safety.
03:54:14 <sshine> while the bottom 160 zero bits can remain zeroed.
03:54:22 <siraben> solidity generated asm is quite difficult to decode, I wrote a small contract to see how they did procedure calls and wasn't very enlightened
03:54:36 <sshine> surely addr() is supposed to do this for variable input, not constant input that is obviously a valid address. :-D
03:54:38 <siraben> right, that makes sense
03:54:54 <sshine> the compiler is littered with these kinds of things because they design for usability, not efficiency.
03:55:08 <siraben> jophish: it's still compiling, 20% now
03:55:27 <sshine> ah, yeah... we kinda gave up deciphering its output, too.
03:56:27 <sshine> I think we mainly used solc's output to double-check that we understood signature hashing + the memory layout when passing arrays to external contract calls.
03:56:42 polyrain joins (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45)
03:56:58 kam1 joins (~kam1@24.231.108.143)
03:57:03 <koz_> :t (>>= (<$>))
03:57:05 <lambdabot> Functor f => (f a -> a -> b) -> f a -> f b
03:57:08 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
03:57:13 <koz_> Whoops, not quite.
03:57:26 <sshine> Ó_ò
03:58:24 <siraben> sshine: ah yes, i was pondering to write an ABI encoder
03:58:32 <siraben> Wouldn't be a bad exercise in Haskell with the appropriate ADT
03:58:39 <siraben> perhaps even Generic instance? :P
03:58:43 <sshine> siraben, this is on my list, too. :)
03:58:50 <koz_> :t (. (<$>)) . (>>=)
03:58:51 <lambdabot> Monad f => f (f a) -> (a -> b) -> f b
03:58:54 <koz_> There we go!
03:59:04 <siraben> koz_: what on earth are you trying to do
03:59:18 <siraben> :t (>>=) . (>>= (<$>))
03:59:18 <koz_> siraben: Checking whether I understand how ap is defined in terms of bind properly.
03:59:20 <lambdabot> Functor f => (f a -> a -> b1) -> (f b1 -> f a -> b2) -> f a -> b2
03:59:38 × polyrain quits (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45) (Client Quit)
03:59:43 <siraben> i wonder how much of a magma I can get by composing bind, fmap, and ap
03:59:50 <siraben> as in, will any combination typecheck
04:00:11 <sshine> siraben, it is on my to-do list to rip off https://github.com/dapphub/dapptools/blob/master/src/hevm/src/EVM/ABI.hs and export it to a stand-alone library.
04:00:35 <siraben> sshine: that would be great
04:00:44 <siraben> more Haskell tooling for EVM!
04:01:07 × acarrico quits (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net) (Ping timeout: 268 seconds)
04:01:33 Rudd0 joins (~Rudd0@185.189.115.98)
04:01:52 <siraben> Especially if certain things like language design are to be made more accessible, we ought to utilize the ecosystem's libraries (recursion-schemes, bound, fresh monads, etc.)
04:02:02 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Ping timeout: 260 seconds)
04:02:08 <sshine> I'd like an opcode representation that lets me say [MUL] :: Stack 2 1
04:02:39 <siraben> Why not, `MUL :: Stack (Int:-Int:-a) (Int:-a)`?
04:02:40 <sshine> I don't know if this is one of things that are really un-ergonomic and I haven't learned yet... I've tried a few techniques that I regretted and reverted.
04:03:02 <sshine> siraben, definitely possible.
04:03:11 <siraben> i have a tagless final encoding somewhere on my drive
04:05:34 <fuzzypixelz> % data SomeData = Either Int String
04:05:35 <yahb> fuzzypixelz:
04:06:00 <siraben> sshine: https://gist.github.com/siraben/03510d1bf4d73b6958655887bee69bfe
04:06:03 <sshine> fuzzypixelz, don't you mean 'type'?
04:06:32 <fuzzypixelz> yes, sorry
04:06:40 <jophish> siraben: thanks, I think it's basically llvm so might take a short while
04:06:44 <fuzzypixelz> % type SomeData = Either Int String
04:06:44 <yahb> fuzzypixelz:
04:07:02 <fuzzypixelz> % type SomeOtherData = Either Int String
04:07:02 <yahb> fuzzypixelz:
04:07:23 <siraben> jophish: haha, if I'm not able to finish I think SuperSandro2000 on the NixOS channel would be happy to build
04:07:24 <fuzzypixelz> my problem is, how would I distinguish Left's from either type
04:07:29 <siraben> they have a macOS machine
04:07:41 <siraben> fuzzypixelz: pattern matching, or isLeft
04:07:42 <fuzzypixelz> % isLeft (Left 0)
04:07:42 <yahb> fuzzypixelz: True
04:08:19 <sshine> siraben, now we just need to magically be able to transfer the compute you already did to their machine.
04:08:23 <fuzzypixelz> siraben: but it doesn't tell me if it's a SomeData Left, or SomeOtherData Left
04:08:43 <sshine> fuzzypixelz, they're just aliases.
04:09:02 <sshine> fuzzypixelz, there is no difference between type aliases.
04:09:19 <fuzzypixelz> sshine: what if I use newtype?
04:09:19 <sshine> fuzzypixelz, if you feel the need to differentiate, you use 'newtype'. then they can't be used in place of one another.
04:09:47 <sshine> % newtype Foo = Foo (Either Int String)
04:09:47 <yahb> sshine:
04:10:20 <fuzzypixelz> % newtype Bar = Bar (Either Int String)
04:10:20 <yahb> fuzzypixelz:
04:10:26 <fuzzypixelz> % newtype Foo = Foo (Either Int String)
04:10:26 <yahb> fuzzypixelz:
04:10:26 <sshine> % (Foo (Left 42) :: Foo) == (Left 42 :: SomeData)
04:10:27 <yahb> sshine: ; <interactive>:18:28: error:; * Couldn't match type `Either Int String' with `Foo'; Expected type: Foo; Actual type: SomeData; * In the second argument of `(==)', namely `(Left 42 :: SomeData)'; In the expression: (Foo (Left 42) :: Foo) == (Left 42 :: SomeData); In an equation for `it': it = (Foo (Left 42) :: Foo) == (Left 42 :: SomeData)
04:10:40 <sshine> % (Foo (Left 42) :: Foo) == (Bar (Left 42) :: Bar)
04:10:40 <yahb> sshine: ; <interactive>:19:28: error:; * Couldn't match expected type `Foo' with actual type `Bar'; * In the second argument of `(==)', namely `(Bar (Left 42) :: Bar)'; In the expression: (Foo (Left 42) :: Foo) == (Bar (Left 42) :: Bar); In an equation for `it': it = (Foo (Left 42) :: Foo) == (Bar (Left 42) :: Bar)
04:10:41 <siraben> fuzzypixelz: importantly, newtypes don't introduce overhead at runtime as well
04:11:15 <sshine> fuzzypixelz, yeah, the 'Foo' and 'Bar' that go in front of 'Left 42' only cost your sweat, they get removed during compilation.
04:12:01 <sshine> this is the kind of masochism Haskellers like. making it impossible to compare two otherwise perfectly similar values.
04:12:28 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
04:12:43 toorevitimirp joins (~tooreviti@117.182.182.252)
04:13:21 <sshine> siraben, thanks for your example!
04:14:12 <sshine> siraben, what I'm looking for is a way to ensure that EVM subroutines expressed using ADTs in Haskell are consistent about their use of EVM's stack. this encoding provides some safety. but there's still jumps.
04:14:19 <siraben> sshine: ooh I also exploited tagless final to make an assembler for FRACTRAN, the programming language that only uses fractions https://siraben.github.io/2020/02/26/translating_cl.html
04:14:27 <siraben> Yes, there's still jumps, which is the main issue
04:14:37 <siraben> I think you could encode control combinators though
04:14:45 <sshine> I was dreaming about dependent types last night because of this.
04:15:55 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
04:15:55 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
04:15:57 <sshine> hmmm, maybe. but I don't like to invent control structures for the many kinds of loops I'm making. e.g. I made one loop that did 'for (i = 0; i < N; i++) { M[a+i] = x; M[b+i] = y; M[c+i] = z; }'
04:16:21 <sshine> maybe I should really be doing something like a memoryZip3 :-D
04:16:53 <siraben> I think the bound library had an example of a language with jumps
04:17:23 <sshine> what I'm thinking is actually just to write some test automation that does call-graph analysis and makes sure that the stack looks the same in both jump branches... and work with that as a limitation in my labelled jumps.
04:17:29 <sshine> oh
04:18:06 <fuzzypixelz> https://www.youtube.com/watch?v=RqvCNb7fKsg
04:18:11 <fuzzypixelz> ^ best video ever
04:18:32 <sshine> fuzzypixelz, yes. pity he stopped making videos.
04:18:33 <fuzzypixelz> typical Haskeller
04:18:38 <siraben> sshine: sorry for link spam heh, I've also been thinking/collecting resources for this for some time
04:18:43 <siraben> see http://wall.org/~lewis/2013/10/15/asm-monad.html and https://www.stephendiehl.com/posts/monads_machine_code.html
04:18:43 <fuzzypixelz> sshine: he only made one!
04:18:59 <siraben> they have labelled jumps
04:19:40 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
04:19:43 <sshine> fuzzypixelz, he also made a bunch of other videos among which this one is the most impressive: https://www.youtube.com/watch?v=cs9aUt4x-CI
04:21:15 <sshine> siraben, haha, they're all very appreciated, since I'm kinda stuck on which direction to go.
04:22:57 <siraben> sshine: I haven't been working on crypto stuff in recent months but bootstrapping a dialect of Haskell from a 357 byte binary instead
04:23:16 <siraben> I looked into bootstrapping GHC but unfortunately it's very large without a clear path since it's done rarely
04:23:26 <sshine> siraben, cool. I restarted doing crypto this december. had to take a break after quitting my blockchain job.
04:24:08 <sshine> firing management and bringing it back to being a hobby project has made it more fun. ;)
04:24:20 <siraben> Yeah!
04:24:32 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
04:25:00 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:25:20 <sshine> siraben, what's very large?
04:27:09 dyeplexer joins (~lol@unaffiliated/terpin)
04:27:36 <siraben> sshine: GHC itself
04:28:26 <tzlil> is there a smallest haskell compiler? ghc is massive
04:28:32 <tzlil> smaller*
04:28:46 <sshine> tzlil, there are other Haskell compilers, yes.
04:29:31 <sshine> tzlil, do you mean something that is Haskell98 or Haskell2010-compliant?
04:29:40 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
04:29:53 <tzlil> i dont know the difference
04:30:06 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 268 seconds)
04:30:17 <sshine> tzlil, I don't mean to say that it matters which one of those it is, but just that it's "Haskell as it was written in some specification"
04:30:23 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
04:30:24 <sshine> https://github.com/Lemmih/lhc
04:31:08 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
04:31:46 <sshine> https://github.com/UU-ComputerScience/uhc
04:32:14 × robotadam1 quits (~robotadam@178.239.168.171) (Ping timeout: 265 seconds)
04:32:27 <sshine> I don't think they aim to be minimalist, but simply spec-compliant, even though they're probably smaller.
04:32:35 <sshine> also, they're all seemingly stale projects.
04:32:52 <siraben> https://github.com/oriansj/blynn-compiler
04:32:56 <siraben> this one isn't!
04:32:56 × fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Client Quit)
04:33:04 <sshine> cool!
04:33:40 <siraben> runs even better than miranda
04:33:48 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
04:34:14 <siraben> The author is very descriptive and thorough: https://crypto.stanford.edu/~blynn/compiler/
04:34:28 <siraben> s/better/faster
04:34:28 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 256 seconds)
04:35:20 × fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Client Quit)
04:36:04 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
04:36:18 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
04:36:43 fengh parts (~haskeller@ip72-205-40-121.dc.dc.cox.net) ()
04:37:24 argento joins (~argent0@168.227.97.34)
04:38:19 <siraben> iophish: build finished with log http://ix.io/2IDN
04:39:05 <siraben> but fails to run dyld: Library not loaded: @rpath/libdxcompiler.3.7.dylib
04:41:03 Vulfe joins (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net)
04:42:58 × electricityZZZZ quits (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 256 seconds)
04:43:02 <sshine> siraben, I'm convinced now that writing assembler in do-blocks is awesome.
04:44:09 <siraben> sshine: nice, what convinced you?
04:45:19 <sshine> siraben, the syntactic simplicity. the 'label <- here' is pretty cool, too.
04:45:49 × Vulfe quits (~vulfe@75-28-176-196.lightspeed.evtnil.sbcglobal.net) (Ping timeout: 260 seconds)
04:45:53 <sshine> we've had some pretty unserious bugs caused by copy-pasting strings around. it will be good to have this type of labelling instead.
04:46:29 × stef204 quits (~stef204@unaffiliated/stef-204/x-384198) (Ping timeout: 272 seconds)
04:46:51 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
04:47:51 <siraben> sshine: indeed
04:49:13 <sshine> siraben, when you say tagless final and opcodes, do you mean something like the Stack (Int :- Int :- a) encoding?
04:49:54 × solonarv quits (~solonarv@adijon-656-1-25-229.w90-13.abo.wanadoo.fr) (Ping timeout: 260 seconds)
04:50:27 <sshine> siraben, never mind, I get it. :)
04:50:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
04:50:36 <siraben> sshine: yes, but let Stack is polymorphic higher kinded
04:50:43 <siraben> be*
04:51:44 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
04:52:55 × polyphem quits (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889) (Ping timeout: 268 seconds)
04:52:55 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
04:55:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
04:55:53 × fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Quit: WeeChat 3.0)
04:56:16 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
04:56:37 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
04:57:30 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Quit: fuzzypixelz)
05:01:00 prinned joins (~vvkrip0@103.206.114.92)
05:01:50 × johnw quits (~johnw@haskell/developer/johnw) (Quit: ZNC - http://znc.in)
05:03:38 <tzlil> how can i do a wildcard for lists with a single element?
05:06:15 <sshine> tzlil, foo (x : _) = ...?
05:06:32 <sshine> tzlil, sorry, foo [_] = ...?
05:06:49 <sshine> tzlil, what's the goal?
05:07:00 <tzlil> trying to replicate isAsc
05:07:17 <tzlil> which i just finished doing
05:09:07 <sshine> tzlil, what does isAsc do?
05:09:21 <sshine> is that isAscii or isAscending or isAscetic? :-P
05:09:41 nh is now known as bh
05:09:46 bh is now known as nh
05:10:51 <tzlil> isAscending
05:11:05 <tzlil> http://0x0.st/iCzT.txt
05:11:09 <tzlil> heres my code if you are interested
05:11:15 × forell quits (~forell@unaffiliated/forell) (Quit: ZNC - https://znc.in)
05:11:39 forell joins (~forell@unaffiliated/forell)
05:11:44 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
05:11:48 <sshine> I'd splurge and spend the extra bucks on 'ending'.
05:12:33 <sshine> tzlil, nice. can you do this with pattern matching two elements deep instead? then you avoid 'head' which is a partial function.
05:13:05 <sshine> isAscending (x : y : xs) = ...
05:13:19 <tzlil> ah, i didnt know you could do that
05:16:21 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 268 seconds)
05:18:03 <tzlil> what are partial functions sshine ?
05:18:11 <sshine> > head []
05:18:13 <lambdabot> *Exception: Prelude.head: empty list
05:18:30 <sshine> functions that throw up or continue forever.
05:19:05 <tzlil> uhuh
05:20:25 <sshine> you can often avoid them and find something altogether better instead.
05:22:31 × pfurla quits (~pfurla@ool-182ed2e2.dyn.optonline.net) (Ping timeout: 268 seconds)
05:22:48 polyrain joins (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45)
05:23:11 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
05:23:19 pfurla joins (~pfurla@ool-182ed2e2.dyn.optonline.net)
05:27:26 <gentauro> I don't know why `head` and `tail` exists when the correct way to handle list is with pattern matching (`x:xs`)
05:29:01 <dolio> Because sometimes they're handy.
05:32:05 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
05:33:30 bitmagie joins (~Thunderbi@200116b8060b1300cdcb3c5626b1cd47.dip.versatel-1u1.de)
05:36:52 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
05:37:09 × polyrain quits (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45) (Quit: My MacBook has gone to sleep. ZZZzzz…)
05:37:50 <EvanR> sometimes theyre even correct. i.e. when the list is not empty
05:37:51 shf joins (~sheaf@2a01:cb19:80cc:7e00:6038:d2e0:43eb:69bf)
05:38:22 <EvanR> in which case there may not be a sane thing to do with pattern matching
05:38:47 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
05:42:00 × dave_uy quits (~david@108.61.193.26) (Quit: Ping timeout (120 seconds))
05:42:31 dave_uy joins (~david@108.61.193.26)
05:42:35 ADG1089 joins (~aditya@122.163.166.13)
05:43:02 <ADG1089> Hi do you know guys why would hls be stuck at "Applying hint"?
05:43:17 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Ping timeout: 260 seconds)
05:44:13 × toorevitimirp quits (~tooreviti@117.182.182.252) (Remote host closed the connection)
05:46:55 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Quit: WeeChat 2.9)
05:48:56 × prinned quits (~vvkrip0@103.206.114.92) (Quit: WeeChat 2.9)
05:53:37 × PlasmaStar quits (plasma@unaffiliated/plasmastar) (Ping timeout: 272 seconds)
05:53:40 joeyh joins (~joeyh@kitenet.net)
05:54:15 × joeyh_ quits (joeyh@kitenet.net) (Ping timeout: 272 seconds)
05:54:53 × agrif quits (agrif@overviewer/dev/agrif) (Ping timeout: 272 seconds)
05:55:02 prinned joins (~vvkrip0@103.206.114.92)
05:55:19 agrif joins (agrif@rakeri.net)
05:55:19 × agrif quits (agrif@rakeri.net) (Changing host)
05:55:19 agrif joins (agrif@overviewer/dev/agrif)
05:55:20 philopso1 joins (~caecilius@gateway/tor-sasl/caecilius)
05:56:53 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
05:57:30 PlasmaStar joins (plasma@unaffiliated/plasmastar)
05:57:40 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
05:59:03 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
05:59:44 <gentauro> I would understand if they were part of the NonEmpty list module
05:59:54 <gentauro> cos you know you will always have a non-empty list
05:59:54 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:00:05 <gentauro> but for list? Nah, just do pattern-matching
06:01:29 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:02:15 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:07:29 <sshine> gentauro, pattern matching marries you to the AST.
06:08:39 <jophish> siraben: did dxc finish compiling btw?
06:08:51 <jophish> If it failed, then it would have been right at the end lol
06:08:54 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:09:00 <siraben> jophish: yeah i posted the build log above
06:09:02 <siraben> check haskell logs
06:09:07 <siraben> also it fails at runtime
06:09:12 <sshine> 05:38:19 <siraben> iophish: build finished with log http://ix.io/2IDN
06:09:21 <siraben> thanks sshine
06:09:36 <jophish> Ah thanks
06:09:50 <siraben> jophish: just curl that URL and pipe into less to see with colors
06:10:02 <jophish> annoying that it fails to run
06:10:16 <sshine> siraben, it was very helpful to converse with you earlier. I have a much better idea about where to go.
06:10:47 <jophish> ah, it's because osx does libname.version.dylib
06:10:54 <jophish> and linux does libname.so.version
06:11:00 <sshine> siraben, another thing I want to do is be able to say how much something costs (approximately when necessary) without simulating.
06:11:39 <siraben> sshine: no problem, I enjoyed the discussion.
06:12:27 × ADG1089 quits (~aditya@122.163.166.13) (Quit: Konversation terminated!)
06:15:04 × m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Ping timeout: 260 seconds)
06:15:17 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
06:16:04 <jophish> siraben: I've pushed a fix, so nix-build https://github.com/expipiplus1/nixpkgs/archive/a9ec238f685c4c0e36c45b0f79da5836d8c2e799.tar.gz -A directx-shader-compiler please please feel free to decide you're not my build farm and I'll understand :D
06:16:25 × prinned quits (~vvkrip0@103.206.114.92) (Quit: WeeChat 2.9)
06:17:00 <siraben> jophish: I'm on the go right now so I won't be able to, let me know if you still need it later
06:17:12 <siraben> no worries :)
06:17:21 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:17:37 <jophish> sure thing. I think what I'll do is limit the PR to Linux only and make another one adding darwin support, pending someone testing
06:17:45 <siraben> sshine: sounds like a good candidate for abstract interpretation
06:18:49 × nineonin_ quits (~nineonine@50.216.62.2) (Ping timeout: 264 seconds)
06:19:09 × mozzarella quits (~sam@unaffiliated/sam113101) (Read error: Connection reset by peer)
06:19:21 × eacameron quits (sid256985@gateway/web/irccloud.com/x-lrjkdvzxlvibxfym) (Quit: Connection closed for inactivity)
06:19:29 <sshine> siraben, for example, an 'SSTORE' operation either costs one thing or one other thing, depending on whether the storage address is set to/from zero/non-zero, and in some cases it gives you a refund, but you only get that after the code has executed. it is completely non-trivial to know what one chunk of EVM code does without knowing the complete state of the blockchain. :-D
06:19:55 <siraben> So at least you can have an upper bound, right?
06:19:55 <sshine> s/does/costs/
06:20:36 <siraben> Assume the contract does not revert and always takes the "most expensive" path
06:21:32 <sshine> yeah so in a lot of cases, if you build some control structure on top, you'd be able to say exactly what something costs. and in some cases, e.g. when external contract calls have variable-length input, you can only really spit out an equation and a suggested upper bound.
06:22:26 <sshine> sorry. and in a lot of cases you can only say something about a bound. but that's still fine, since I want to calculate the upper bound for minimizing how much I have to feed a call.
06:22:46 <siraben> Right
06:22:52 × todda7 quits (~torstein@ppp-2-84-17-53.home.otenet.gr) (Ping timeout: 272 seconds)
06:22:53 <sshine> right now our unit tests just call with 3 million gas every time.
06:23:04 <siraben> Yoikes, a lot of gas
06:23:23 × teardown quits (~user@gateway/tor-sasl/mrush) (Ping timeout: 240 seconds)
06:23:30 <sshine> no thought was put into cost calculation.
06:23:33 <siraben> On regtest not a problem but on the mainnet yes
06:23:37 <sshine> haha yes.
06:24:13 <siraben> I'm not sure how doing this in Haskell would work? Supposedly just folding over the ADT
06:24:37 <siraben> or the dual equivalent in the tagless final encoding
06:25:27 <sshine> yes.
06:26:03 <sshine> preferrably a high-level ADT and not [Opcode] ;-) since that leaves for a whole lot of uncertainty.
06:26:12 <siraben> right
06:26:51 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
06:26:52 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:29:09 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:32:06 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
06:32:35 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Read error: Connection reset by peer)
06:34:44 takuan joins (~takuan@178-116-218-225.access.telenet.be)
06:35:05 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:35:38 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:35:52 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:37:59 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:39:32 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:41:00 todda7 joins (~torstein@ppp-2-84-17-53.home.otenet.gr)
06:41:23 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:41:41 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:43:35 <jle`> can anyone see why my nested sepBy doesn't parse? :| for "1 2 3 | 9 2" i'd want to get [[1,2,3],[9,2]], but (decimal `sepBy` " ") `sepBy` " | " seems to error at the |
06:43:49 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:44:11 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Quit: leaving)
06:44:20 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:45:14 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:45:16 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:45:35 <MarcelineVQ> is it the spaces around | ?
06:45:58 <MarcelineVQ> like, maybe the first is eating all of "1 2 3 "
06:46:12 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:46:19 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:46:27 <MarcelineVQ> *around " | "
06:46:43 <jle`> hm, should i make it try " | " ?
06:46:54 <sshine> jle`, no
06:47:08 <iqubic> jle`: sepBy doesn't do any backtracking. So if the sepBy matches the space after the number, but not another number, it will fail.
06:47:18 plutoniix joins (~q@ppp-124-121-191-247.revip2.asianet.co.th)
06:47:22 × plutoniix quits (~q@ppp-124-121-191-247.revip2.asianet.co.th) (Read error: Connection reset by peer)
06:47:37 <iqubic> I think. I'm not sure if that's actually true.
06:47:51 <sshine> jle`, you want to make 'decimal' eat whitespace after it, and you want something like 'symbol "|"' to assume that there's no whitespace before it and eat the whitespace after it.
06:48:38 <iqubic> I solve this by just using: `many (number <* optional " ") `sepBy` "| "`
06:48:50 × theorbtwo quits (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net) (Remote host closed the connection)
06:49:05 <sshine> e.g. many (lexeme decimal) `sepBy` symbol "|"
06:49:40 <jle`> sshine: doesn't quite work for me i think i'd like it to stop eating after a \n
06:49:54 <jle`> so "1 2 3 | 9 2\n5 2 | 3 1 2 | 3\n" i think
06:49:59 <jle`> ah, maybe i can just have it eat sapce space
06:50:00 <sshine> jle`, you could adjust your whitespace eater for that.
06:50:03 <jle`> :O
06:50:23 <jle`> ◕‿◕
06:51:01 <iqubic> jle`: My thing stops at a \n
06:53:28 <jle`> thanks all :)
06:53:31 <sshine> jle`, Parsec's .Token / Megaparsec's .Lexer have some over-engineered machinery for dealing with the many kinds of whitepsace. I normally go with a poor-man's version: lexeme = (<* space), symbol = lexeme . void . string
06:57:18 <sshine> https://hackage.haskell.org/package/megaparsec-9.0.1/docs/Text-Megaparsec-Char-Lexer.html#g:1
07:00:22 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
07:00:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
07:04:00 plutoniix joins (~q@ppp-27-55-80-69.revip3.asianet.co.th)
07:04:33 <siraben> jle`: are you generalizing to n arms?
07:04:48 <jle`> heh, not quite
07:05:02 <iqubic> What's an arm here?
07:06:46 olligobber1 joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
07:06:59 <sshine> sounds christmas-related.
07:07:03 <siraben> iqubic: a list of numbers
07:07:29 <siraben> data RuleD = Seq [Int] | Alt [Int] [Int] | Lit String
07:07:54 <siraben> in general one could have Alt [[Int]] I suppose
07:08:35 × olligobber quits (~olligobbe@unaffiliated/olligobber) (Ping timeout: 268 seconds)
07:08:36 × cads2 quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 256 seconds)
07:08:36 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Ping timeout: 256 seconds)
07:10:47 × urodna quits (~urodna@unaffiliated/urodna) (Quit: urodna)
07:11:19 × tri0dE quits (~melosense@51.194.80.91) (Ping timeout: 246 seconds)
07:11:28 × Rudd0 quits (~Rudd0@185.189.115.98) (Remote host closed the connection)
07:13:44 cads joins (~cads@ip-64-72-99-232.lasvegas.net)
07:13:44 cads2 joins (~cads@ip-64-72-99-232.lasvegas.net)
07:18:06 mozzarella joins (~sam@unaffiliated/sam113101)
07:18:19 × machinedgod quits (~machinedg@135-23-192-217.cpe.pppoe.ca) (Ping timeout: 246 seconds)
07:25:22 xcmw joins (~textual@2603-6011-2200-f103-cdbc-9ec6-8319-9dc9.res6.spectrum.com)
07:28:28 × sfvm quits (~sfvm@37.228.215.77) (Remote host closed the connection)
07:31:30 × cads2 quits (~cads@ip-64-72-99-232.lasvegas.net) (Quit: Leaving)
07:31:31 × cads quits (~cads@ip-64-72-99-232.lasvegas.net) (Quit: Leaving)
07:35:05 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
07:37:34 <int-e> siraben: that looks vaguely familiar
07:39:20 int-e once again abused `words` for parsing though
07:40:35 <xerox_> :)
07:40:49 <xerox_> words . map replaceOffendingChars -- is an AoC tradition
07:41:42 johnw joins (~johnw@haskell/developer/johnw)
07:42:53 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
07:46:44 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:47:26 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 268 seconds)
07:50:27 wei2912 joins (~wei2912@unaffiliated/wei2912)
07:51:15 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
07:53:01 FreeBirdLjj joins (~freebirdl@101.87.168.174)
07:53:36 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
07:56:26 × bitmagie quits (~Thunderbi@200116b8060b1300cdcb3c5626b1cd47.dip.versatel-1u1.de) (Quit: bitmagie)
07:58:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
08:04:58 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:10:15 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds)
08:13:36 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
08:15:10 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
08:16:43 × philopso1 quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
08:18:07 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
08:19:26 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Ping timeout: 256 seconds)
08:19:37 sord937 joins (~sord937@gateway/tor-sasl/sord937)
08:20:48 × cp- quits (~cp-@b157153.ppp.asahi-net.or.jp) (Quit: Disappeared in a puff of smoke)
08:21:31 kuribas joins (~user@ptr-25vy0i96g2rg1rlzyqd.18120a2.ip6.access.telenet.be)
08:22:26 <kuribas> anyone know a good name for a database library? I wanted to call my library hasqly, as it is a bit similar to the clojure library honeysql, but that may confuse with the hasql library.
08:25:36 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
08:26:46 ADG1089 joins (~aditya@122.163.166.13)
08:27:01 <ADG1089> how can i remove this warning from xmonad.hs ?
08:27:07 <ADG1089> Could not find module ‘XMonad’
08:27:09 <ADG1089> There are files missing in the ‘xmonad-0.15’ package,
08:27:10 <ADG1089> try running 'ghc-pkg check'.
08:27:12 <ADG1089> Use -v (or `:set -v` in ghci) to see a list of the files searched for.
08:27:19 <ADG1089> hlint is giving this
08:28:33 CMCDragonkai2 joins (~Thunderbi@124.19.3.250)
08:30:20 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
08:31:28 × jedws quits (~jedws@121.209.189.201) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:32:10 × drbean quits (~drbean@TC210-63-209-85.static.apol.com.tw) (Ping timeout: 246 seconds)
08:32:34 × kuribas quits (~user@ptr-25vy0i96g2rg1rlzyqd.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3))
08:33:17 × renzhi quits (~renzhi@2607:fa49:6500:ac00::bfed) (Ping timeout: 260 seconds)
08:33:56 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
08:35:53 Amirali_ joins (~Amirali@51.194.80.91)
08:37:17 <suzu_> how did you install xmonad?
08:37:32 <suzu_> did you try running 'ghc-pkg check'.
08:37:33 <suzu_> ?
08:38:17 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
08:41:45 × plutoniix quits (~q@ppp-27-55-80-69.revip3.asianet.co.th) (Ping timeout: 240 seconds)
08:45:28 Boomerang_ joins (~Boomerang@2a05:f6c7:2179:0:d811:4796:d80c:9d85)
08:45:34 × Boomerang_ quits (~Boomerang@2a05:f6c7:2179:0:d811:4796:d80c:9d85) (Remote host closed the connection)
08:46:15 × CMCDragonkai2 quits (~Thunderbi@124.19.3.250) (Remote host closed the connection)
08:46:38 <ADG1089> suzu_: it's fine except for some haddock warnings
08:46:48 × wei2912 quits (~wei2912@unaffiliated/wei2912) (Remote host closed the connection)
08:46:53 <ADG1089> xmonad & xmobar are working fine
08:47:20 <ADG1089> i was trying to find a way to specify these depencies to haskell language server using hlint
08:48:36 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
08:48:49 wonko7 joins (~wonko7@69.75.150.77.rev.sfr.net)
08:50:05 fendor joins (~fendor@178.115.129.197.wireless.dyn.drei.com)
08:51:08 × heatsink quits (~heatsink@107-136-5-69.lightspeed.sntcca.sbcglobal.net) (Remote host closed the connection)
08:52:18 × darjeeling_ quits (~darjeelin@122.245.217.210) (Ping timeout: 256 seconds)
08:53:25 × fengh quits (~haskeller@ip72-205-40-121.dc.dc.cox.net) (Ping timeout: 240 seconds)
08:55:56 <suzu_> i think there's some messages produced by hls on startup
08:56:11 <suzu_> that should show the ghc it's using to resolve packages
08:56:20 <suzu_> can you confirm it's the system one?
08:57:35 × xcmw quits (~textual@2603-6011-2200-f103-cdbc-9ec6-8319-9dc9.res6.spectrum.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:58:51 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
09:00:06 × rab24ack[m] quits (rab24ackma@gateway/shell/matrix.org/x-xexybdvzbhtsmpoc) (Quit: Idle for 30+ days)
09:00:51 <ADG1089> I am using the one installed by stack in /usr/lib/ghc-8.10.2/
09:01:16 Varis joins (~Tadas@unaffiliated/varis)
09:04:34 avdb joins (~avdb@213.177.155.250)
09:04:41 × avdb quits (~avdb@213.177.155.250) (Client Quit)
09:05:00 avdb joins (~avdb@213.177.155.250)
09:05:47 coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl)
09:11:03 Tuplanolla joins (~Tuplanoll@91-159-68-239.elisa-laajakaista.fi)
09:11:59 <suzu_> that's probably the problem
09:12:07 <suzu_> xmonad is installed in your system and so the system ghc knows about it
09:12:17 <suzu_> the stack ghc there doesn't know about the system xmonad
09:12:25 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Quit: mputz)
09:12:28 <suzu_> get hls to use the system ghc and that should fix it
09:15:39 <suzu_> i think that's done by making a hie.yaml file?
09:15:41 <suzu_> https://github.com/mpickering/hie-bios
09:18:43 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
09:25:10 cp- joins (~cp-@b157153.ppp.asahi-net.or.jp)
09:25:37 dhil joins (~dhil@78.156.97.38)
09:25:59 _linker_ joins (~linker@2a02:a31a:a041:9a80:6084:8b0:6bec:7d)
09:28:38 <ADG1089> i have installed packages using stack cabal pacman , going to fix that first and then i think it might work @suzu_
09:29:44 <xerox_> I have a conundrum… in my mind the first and second defitions of 'go' should behave the same, in practice they don't: the bottom one gets the cake in 0.2s the top one takes almost 4 seconds! I can't see where the difference might be coming from, ideas? https://pastebin.com/raw/ytMYCkuQ
09:29:51 × coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
09:30:06 asheshambasta joins (~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be)
09:31:24 <idnar> mmm, hlint doesn't like case on bool
09:31:38 <suzu_> recommends 'if'
09:33:07 <suzu_> xerox_: fyi you can use catMaybes :: [Maybe a] -> [a] instead of the pat match
09:33:14 <idnar> I'm not sure I like how this looks with if:
09:33:22 <idnar> https://www.irccloud.com/pastebin/VGrDKrIm/
09:33:29 plutoniix joins (~q@ppp-223-24-93-250.revip6.asianet.co.th)
09:33:52 coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl)
09:34:55 <suzu_> xerox_: what happens if you add strictless to l and r arguments on the bottom go?
09:35:17 <xerox_> suzu_: the bottom one doesn't need tricks because it's the fast one, if I add them to the top one it makes no difference
09:36:03 <suzu_> err what i mean is
09:36:14 <suzu_> if you add it to the bottom one, does it get slower?
09:36:19 <xerox_> wow
09:36:30 <xerox_> that's a perspective I haven't considered! let's try
09:37:01 <xerox_> nope.
09:37:20 <xerox_> my best guess is it has something to do with either inlining or the rules for <- in guards?
09:37:42 <xerox_> my best guess is it has something to do with either inlining or the rules for <- in guards?
09:37:45 <xerox_> oops
09:38:08 <xerox_> oh yeah {-# INLINE isPrefix #-} fixes it
09:38:26 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
09:38:59 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
09:39:19 <suzu_> w..hy
09:39:28 × Sgeo quits (~Sgeo@ool-18b98aa4.dyn.optonline.net) (Read error: Connection reset by peer)
09:39:28 <suzu_> why would calling it be so expensive
09:39:44 <xerox_> beats me
09:39:57 × plutoniix quits (~q@ppp-223-24-93-250.revip6.asianet.co.th) (Read error: Connection reset by peer)
09:40:15 <suzu_> if you don't inline it, but you compile with -O2, is it still slow?
09:40:22 <xerox_> yeah
09:40:49 <suzu_> if you inline it and don't use any opt flags, is it slow?
09:41:22 <xerox_> no
09:41:33 <suzu_> hmm
09:41:33 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
09:41:48 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
09:41:53 <suzu_> i would've guessed that the inline doesnt do it, but instead allows other optimizations to fire which speeds the program up
09:41:56 × bliminse quits (~bliminse@host109-158-129-129.range109-158.btcentralplus.com) (Quit: leaving)
09:41:56 <suzu_> i guess that's not true
09:42:16 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
09:42:39 <xerox_> related but different I wish the regex library return type wasn't that mess of list of arrays of tuples of tuples
09:42:43 ph88 joins (~ph88@2a02:8109:9e00:7e5c:d5e6:6f2:2e3f:fbbc)
09:42:55 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
09:43:28 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
09:43:37 <suzu_> you might be able to do what you want with a parser combinator instead of a regex
09:43:45 Varis joins (~Tadas@unaffiliated/varis)
09:43:55 <xerox_> hehe that's also a whole different can of worms
09:44:10 <suzu_> parser combinators can parse more than traditional regexes
09:44:25 <suzu_> except for where regex start doing things that are not in a regular language
09:44:27 <suzu_> lol
09:45:13 <xerox_> oh it's just me not knowing how to use =~ it has some nice types as well
09:47:45 ubert joins (~Thunderbi@p200300ecdf35141be6b318fffe838f33.dip0.t-ipconnect.de)
09:48:40 <avdb> https://dpaste.com/6NE4YVP2Z
09:48:50 <avdb> I don't know if I already pasted this here, I got problems installing hlint
09:49:05 <avdb> When I run "cabal install happy" it says that it's installed
09:49:35 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
09:49:47 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
09:50:42 <avdb> versions >=1.19.4 are available as well
09:51:07 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
09:51:31 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
09:51:42 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
09:52:26 × perrier-jouet quits (~perrier-j@modemcable012.251-130-66.mc.videotron.ca) (Quit: WeeChat 2.9)
09:52:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
09:56:27 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
09:57:25 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
10:01:47 <nrdmn01> It seems like you cannot declare variadic functions as such with `foreign`. Some packages assume that the ABI for variadic and non-variadic functions is the same and just declare the parameters they need. Is this always a safe assumption?
10:03:35 <c_wraith> To be really properly safe, you'd need a wrapper function in C with a fixed parameter count
10:04:35 Rudd0 joins (~Rudd0@185.189.115.108)
10:06:00 <suzu_> the abi on the C-side of things i believe is the same if you're calling cdecls
10:06:49 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
10:06:51 <nf> int-e: regarding yesterday's ping, i fixed my issue by removing the LANGUAGE UnboxedTuples pragma from L.hs. i have no idea why that works, i'll probably open an issue at mueval
10:07:01 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
10:08:23 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
10:08:32 rayyyy joins (~nanoz@gateway/tor-sasl/nanoz)
10:08:58 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
10:09:12 × hnOsmium0001 quits (uid453710@gateway/web/irccloud.com/x-xugolrqxaepfynua) (Quit: Connection closed for inactivity)
10:12:32 <nrdmn01> I've noticed that lukko and network rely on this assumption. I'm not sure if this is considered to be a bug
10:15:45 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
10:17:22 <int-e> nf: Oh I missed it. I should change the default Pristine.hs to account for this.
10:18:19 kaiwkx joins (~user@116.236.159.130)
10:19:00 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
10:19:13 <int-e> nf: if you look here, you can see it's disabled too: https://silicon.int-e.eu/lambdabot/State/Pristine.hs
10:19:34 <nf> ah, doesn't just break @type for me
10:19:45 <nf> mueval refuses to load the module if it has UnboxedTuples
10:22:49 <int-e> I thought it was a restriction of the bytecode compiler, namely it doesn't support returning unboxed tuples
10:23:21 <int-e> But something changed in this area to make the check more eager, and I forgot what.
10:23:46 <nf> ok
10:24:11 <nf> while i'm at it, how do i tell lambdabot to set its user mode before joining channels?
10:24:33 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
10:26:28 × iqubic quits (~user@2601:602:9500:4870:ea80:52c0:6e0b:7c11) (Ping timeout: 260 seconds)
10:28:38 <nf> that doesn't seem possible
10:29:01 × kaiwkx quits (~user@116.236.159.130) (Remote host closed the connection)
10:34:59 <int-e> Yeah I don't think there's any command for that, nor for sending raw IRC messages.
10:35:56 iqubic joins (~user@2601:602:9500:4870:8814:94b0:8a49:5083)
10:40:57 × ADG1089 quits (~aditya@122.163.166.13) (Remote host closed the connection)
10:42:16 <int-e> nf: You could mimic the `codepage` command for a `usermode` command, https://github.com/lambdabot/lambdabot/blob/master/lambdabot-core/src/Lambdabot/Plugin/Core/System.hs#L93 ... but so far nobody has done so :)
10:42:47 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
10:42:49 × kupi quits (uid212005@gateway/web/irccloud.com/x-gzofgnqwuptoilky) (Quit: Connection closed for inactivity)
10:44:54 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
10:49:58 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 268 seconds)
10:50:23 <nf> i think a raw command would be nice too, would you be ok with that?
10:51:45 <nf> int-e ^
10:53:14 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
10:53:56 × jneira quits (501e6453@gateway/web/cgi-irc/kiwiirc.com/ip.80.30.100.83) (Ping timeout: 272 seconds)
10:55:58 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
10:57:42 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
10:58:03 <int-e> nf: I would be very reluctant to take it because lambdabot's authentication of privileged users is rather weak
10:58:21 <nf> fai
10:58:23 <nf> r
10:58:51 <int-e> maybe it it was restricted to rc files... which should be possible, but I don't know whether there's any precedent for that in the codebase.
10:58:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
10:58:55 <int-e> it -> if
10:59:26 <nf> a better option would be to make authentication stronger, maybe with hostmasks
10:59:36 <nf> i'm just gonna make "usermode" :)
11:00:38 christo joins (~chris@81.96.113.213)
11:00:41 <int-e> nf: As for unboxed tuples, the problem I've encountered revolves around automatically enabling -fobject-code. See https://gitlab.haskell.org/ghc/ghc/-/issues/16876 ... mueval/hint don't cope well with that. And it affects ghci's :t (which is used by @type) because only interpreted modules get the benefit of having *all* their ids visible in ghci when loaded.
11:00:45 m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
11:01:39 <nf> ah, that might be the root cause
11:02:00 <int-e> so another case of magic being bad, but only when you notice it. or maybe that's swapping cause and effect.
11:02:03 <nf> and something like https://stackoverflow.com/a/7139107/4198687 might be the solution (second part)
11:02:55 × ubert quits (~Thunderbi@p200300ecdf35141be6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
11:02:59 <nf> i filed an issue here https://github.com/gwern/mueval/issues/20
11:03:18 <nf> i added your link
11:05:13 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
11:07:55 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 246 seconds)
11:08:39 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
11:09:36 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
11:09:57 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
11:11:47 sm2n joins (~sm2n@bras-base-hmtnon1497w-grc-44-69-156-5-58.dsl.bell.ca)
11:12:24 <int-e> nf: Good luck with that! (I suspect mueval is basically unmaintained at this point. The only reason it still works is that it offloads almost all of its work to `hint`)
11:12:27 × avdb quits (~avdb@213.177.155.250) (Quit: avdb)
11:13:02 <int-e> But maybe I'll be proven wrong.
11:14:22 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 265 seconds)
11:17:32 polyrain joins (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45)
11:20:23 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Ping timeout: 240 seconds)
11:20:35 × coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
11:21:36 <int-e> Oh, haskell-ci is growing github actions support, yay.
11:22:45 <int-e> phadej++
11:24:17 <nf> int-e: seems like the bot doesn't store its own nickname in the LB monad, this might be trickier than i thought
11:25:07 sord937 joins (~sord937@gateway/tor-sasl/sord937)
11:25:34 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
11:26:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:27:58 × polyrain quits (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45) (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:29:13 <int-e> nf: Hmm. There's `lambdabotName` which extracts it from an IrcMessage. Interesting, and iffy.
11:30:22 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
11:30:23 <int-e> nf: Haha, the last two lines of lambdabot-core/src/Lambdabot/Message.hs
11:30:34 <nf> heh
11:31:48 <tzlil> is it possible to bootstrap this https://github.com/Lemmih/lhc without GHC? ghc is a little big for me
11:31:53 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
11:32:09 <int-e> nf: But it should still solve your immediate problem, I think? I'm not 100% sure since the command will usually be in an rc context.
11:32:14 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
11:34:17 <int-e> nf: But I think I see the problem it's trying to solve there... lambdabot was intended to be able to connect to several networks, and it may have different nicks on each.
11:34:51 polyrain joins (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45)
11:35:29 __monty__ joins (~toonn@unaffiliated/toonn)
11:35:49 × polyrain quits (~polyrain@2001:8003:e501:6901:b191:708e:2c1c:2f45) (Client Quit)
11:36:28 × asheshambasta quits (~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be) (Ping timeout: 260 seconds)
11:37:38 kam1 joins (~kam1@24.231.108.143)
11:42:46 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
11:43:03 <nf> yeah it probably solves my problem
11:43:07 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
11:43:14 <nf> int-e: "nickserv identify" (in passwd.rc.sample) isn't a thing anymore, right?
11:44:12 <nf> oh i guess that could be msg server:nickserv identify
11:45:01 <int-e> yeah it's msg freenode:nickserv identify ...
11:48:17 <int-e> (the example is freenode specific anyway)
11:48:30 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
11:49:08 × SupaYoshi quits (~supayoshi@213-10-140-13.fixed.kpn.net) (Quit: Goodbye!)
11:49:17 <demiurge> fwiw it's potentially, theoretically, very slightly safer to send `nickserv identify ...` rather than `privmsg nickserv identify ...` here
11:49:59 <nf> demiurge: how so?
11:50:18 <nf> oh, right, in case someone pretends to be nickserv
11:50:18 <int-e> services are sometimes momentarily offline and can be impersonated
11:50:31 <demiurge> the rule preventing normal people from using *serv nicks is an optional extra restricting something people can normally do; it can get lost
11:50:37 <demiurge> it doesn't normally, but it could
11:51:07 <demiurge> whereas if the config for the server-side alias somehow got lost, it just wouldn't do anything
11:51:18 <__monty__> SASL+TLS ftw, : )
11:53:58 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
11:54:50 <int-e> That first S...
11:54:54 borne joins (~fritjof@200116b864053600c0a3d285e8e687f4.dip.versatel-1u1.de)
11:55:31 SupaYoshi joins (~supayoshi@213-10-140-13.fixed.kpn.net)
11:55:39 <int-e> I mean I read "Simple" and then this list, https://en.wikipedia.org/wiki/Simple_Authentication_and_Security_Layer#SASL_mechanisms ... and then I'm questioning my sanity.
11:58:22 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
12:01:16 drbean joins (~drbean@TC210-63-209-204.static.apol.com.tw)
12:05:58 <nf> the IRC side of it is rather simple https://ircv3.net/specs/extensions/sasl-3.1.html
12:10:02 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 260 seconds)
12:13:34 fuzzypixelz joins (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net)
12:16:49 × rayyyy quits (~nanoz@gateway/tor-sasl/nanoz) (Remote host closed the connection)
12:17:14 <demiurge> SASL itself is quite simple, it's just a carrier for arbitrary things
12:18:18 <Chousuke> There seems to be a pattern of "simple" things being anything but. SNMP is another example.
12:19:09 × m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Quit: WeeChat 2.7.1)
12:19:15 <demiurge> i mean, naming a thing "simple ..." is usually silly
12:20:36 <demiurge> SASL included, but even so its simpleness is relevant and useful sometimes; the idea is that you can carry SASL between the thing being authenticated and the thing doing the authenticating without having to understand any of those mechanisms
12:20:51 <demiurge> and an implementation that carries without understanding is indeed quite simple
12:21:14 raehik joins (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net)
12:25:04 jollygood2 joins (~bc8165ab@217.29.117.252)
12:25:12 <idnar> Chousuke: SOAP!
12:29:03 Franciman joins (~francesco@host-82-49-79-73.retail.telecomitalia.it)
12:29:17 × olligobber1 quits (olligobber@gateway/vpn/privateinternetaccess/olligobber) (Remote host closed the connection)
12:33:22 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Ping timeout: 260 seconds)
12:39:35 <tzlil> is it possible to do something like ((x : y) : xs) to get elements inside tuples if i have a list of tuples as an argument?
12:47:39 × fuzzypixelz quits (~fuzzypixe@eth-west-pareq2-46-193-4-100.wb.wifirst.net) (Ping timeout: 265 seconds)
12:48:31 <tomsmeding> tzlil: you can nest patterns, so if your argument has type, say, [(a, b, c)], then you can pattern-match that using ((x, y, z) : xs)
12:48:59 <tomsmeding> you can't match a tuple (a, b, c) using a pattern (x : y) if that's what you intended
12:50:20 jamm joins (~jamm@unaffiliated/jamm)
12:51:45 geekosaur joins (ac3a8ced@172.58.140.237)
12:51:46 jmchael joins (~jmchael@81.174.180.109)
12:51:52 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 246 seconds)
12:51:58 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
12:52:28 MOSCOS joins (~MOSCOS@122.54.107.175)
12:52:59 mouseghost joins (~draco@87-206-9-185.dynamic.chello.pl)
12:52:59 × mouseghost quits (~draco@87-206-9-185.dynamic.chello.pl) (Changing host)
12:52:59 mouseghost joins (~draco@wikipedia/desperek)
12:53:24 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
12:54:42 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
12:57:33 gehmehgeh joins (~ircuser1@gateway/tor-sasl/gehmehgeh)
12:59:08 × lordyod quits (~lordyod@c-67-169-144-132.hsd1.ca.comcast.net) (Remote host closed the connection)
12:59:37 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
13:08:10 × _ashbreeze_ quits (~mark@184-157-32-85.dyn.centurytel.net) (Remote host closed the connection)
13:08:21 asheshambasta joins (~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be)
13:11:03 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
13:11:51 m0rphism joins (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de)
13:12:12 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
13:16:11 ubert joins (~Thunderbi@p200300ecdf35141be6b318fffe838f33.dip0.t-ipconnect.de)
13:19:32 <gentauro> is there a way to share a constructo for sum types to the result when using show is: `FooBar (Foo 42))` and `FooBar (Bar 'a'))`? FooBar, Foo and Bar are constructors
13:20:16 <gentauro> what I end up with is something like this `Foo (Foo 42))` and `Bar (Bar 'a'))` where both are of the type FooBar
13:20:19 <gentauro> :|
13:20:27 <gentauro> I just think it looks redundant
13:20:54 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 260 seconds)
13:21:14 <gentauro> Remark: Combining sum and product types is not an option as Foo and Bar have different types and therefore a function that works for FooBar Foo would also work for Bar (runtime error and not compile error)
13:21:36 × ubert quits (~Thunderbi@p200300ecdf35141be6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection)
13:22:02 × jollygood2 quits (~bc8165ab@217.29.117.252) (Ping timeout: 256 seconds)
13:22:18 <gentauro> `data FooBar = Foo Int | Bar Char` <- not an option
13:23:00 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
13:23:26 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
13:23:36 <gentauro> `data FooBar = Foo { foo :: Int } | Bar { bar :: Char} ` <- this is the one that it's not an option
13:23:39 <gentauro> :)
13:24:29 <joel135> You mean you want to "flatten" the type?
13:26:42 <gentauro> joel135: I think I found a solution. I just have to my `logic` to another file (module)
13:26:49 <gentauro> then it's possible :)
13:27:09 <joel135> ok
13:28:55 <gentauro> `I just have to my` -> I just have to move my`
13:30:27 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
13:31:07 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 260 seconds)
13:31:58 rBiosas joins (~biosas@ip-62-24-80-122.net.upcbroadband.cz)
13:32:47 × Philonous quits (~Philonous@unaffiliated/philonous) (Quit: ZNC - http://znc.in)
13:33:14 Philonous joins (~Philonous@unaffiliated/philonous)
13:35:12 × borne quits (~fritjof@200116b864053600c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
13:36:11 Ariakenom joins (~Ariakenom@2001:9b1:efb:fc00:34da:ffcd:6792:c11b)
13:36:51 × FreeBirdLjj quits (~freebirdl@101.87.168.174) ()
13:37:16 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
13:37:37 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
13:38:01 × argento quits (~argent0@168.227.97.34) (Quit: leaving)
13:41:21 frdg joins (47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net)
13:42:07 × frdg quits (47b88ff9@pool-71-184-143-249.bstnma.fios.verizon.net) (Remote host closed the connection)
13:43:00 × drbean quits (~drbean@TC210-63-209-204.static.apol.com.tw) (Ping timeout: 256 seconds)
13:44:23 sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145)
13:45:04 × wonko7 quits (~wonko7@69.75.150.77.rev.sfr.net) (Ping timeout: 246 seconds)
13:45:24 Tario joins (~Tario@201.192.165.173)
13:50:01 × werneta quits (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net) (Ping timeout: 264 seconds)
13:50:39 × StoneToad quits (~StoneToad@104-192-232-58.ppp.storm.ca) (Ping timeout: 268 seconds)
13:50:42 mputz joins (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de)
13:51:54 werneta joins (~werneta@70-142-214-115.lightspeed.irvnca.sbcglobal.net)
13:55:12 StoneToad joins (~StoneToad@104-192-232-26.ppp.storm.ca)
13:55:16 × mputz quits (~Thunderbi@dslb-088-064-063-125.088.064.pools.vodafone-ip.de) (Client Quit)
13:55:26 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
13:57:23 _ashbreeze_ joins (~mark@184-157-32-85.dyn.centurytel.net)
13:58:24 × andreas303 quits (~andreas@gateway/tor-sasl/andreas303) (Remote host closed the connection)
14:00:02 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 264 seconds)
14:01:29 elfets joins (~elfets@ip-37-201-23-96.hsi13.unitymediagroup.de)
14:01:38 andreas303 joins (~andreas@gateway/tor-sasl/andreas303)
14:01:53 × shf quits (~sheaf@2a01:cb19:80cc:7e00:6038:d2e0:43eb:69bf) (Read error: Connection reset by peer)
14:05:29 Wuzzy joins (~Wuzzy@p5b0df9ae.dip0.t-ipconnect.de)
14:05:46 FreeBirdLjj joins (~freebirdl@101.87.168.174)
14:09:01 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
14:09:07 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
14:11:07 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Quit: WeeChat 3.0)
14:11:17 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
14:13:28 × cp- quits (~cp-@b157153.ppp.asahi-net.or.jp) (Remote host closed the connection)
14:14:44 × Benzi-Junior quits (~BenziJuni@88-149-65-135.du.xdsl.is) (Ping timeout: 256 seconds)
14:23:59 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
14:25:17 × StoneToad quits (~StoneToad@104-192-232-26.ppp.storm.ca) (Ping timeout: 256 seconds)
14:26:16 × FreeBirdLjj quits (~freebirdl@101.87.168.174) ()
14:27:33 fengh joins (~haskeller@ip72-205-40-121.dc.dc.cox.net)
14:29:45 FreeBirdLjj joins (~freebirdl@101.87.168.174)
14:29:52 urodna joins (~urodna@unaffiliated/urodna)
14:30:45 StoneToad joins (~StoneToad@104-192-232-55.ppp.storm.ca)
14:33:29 cole-h joins (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net)
14:33:44 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
14:34:01 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
14:37:38 × matryoshka quits (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809) (Read error: Connection reset by peer)
14:38:14 × geekosaur quits (ac3a8ced@172.58.140.237) (Remote host closed the connection)
14:38:30 matryoshka joins (~matryoshk@2606:6080:1002:8:3285:30e:de43:8809)
14:38:45 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 268 seconds)
14:42:39 <inkbottle> dsal: Thanks for the pointer about STM. I have a hard time conciliate functional programming with inter-process communication and the rest of it. It will take time.
14:43:01 kam1 joins (~kam1@24.231.108.143)
14:44:03 <merijn> inkbottle: Most inter-process communication is simply "the same stuff you do in other languages, except now you have IO in the type", tbh
14:44:34 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
14:46:54 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
14:47:00 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
14:50:26 wonko7 joins (~wonko7@69.75.150.77.rev.sfr.net)
14:54:20 borne joins (~fritjof@200116b864053600c0a3d285e8e687f4.dip.versatel-1u1.de)
15:08:23 solonarv joins (~solonarv@adijon-656-1-25-229.w90-13.abo.wanadoo.fr)
15:08:37 <ezzieyguywuf> can I make cabal make a man-page for me?
15:09:15 Kronic joins (~Kronic___@84.203.96.46)
15:09:26 <merijn> ezzieyguywuf: Define "can" ;)
15:09:39 <merijn> You can modify cabal to do anything, in theory :p
15:10:03 <merijn> Practically speaking: No.
15:10:28 <merijn> You could, theoretically, build code for that into a custom Setup.hs, but Custom build type is a PITA
15:11:31 Tops2 joins (~Tobias@95.33.88.255)
15:14:27 cp- joins (~cp-@b157153.ppp.asahi-net.or.jp)
15:14:38 coot joins (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl)
15:15:30 × cole-h quits (~cole-h@c-73-48-197-220.hsd1.ca.comcast.net) (Ping timeout: 272 seconds)
15:22:43 fendor_ joins (~fendor@178.115.130.51.wireless.dyn.drei.com)
15:23:46 <ezzieyguywuf> lol, like is it built in
15:24:06 <merijn> ezzieyguywuf: As I said: "Practically speaking: No"
15:24:18 <ezzieyguywuf> hrm, different question - if I'm packaging something from hackage, where would I look to see if there's a man pag eto install
15:24:25 <merijn> It doesn't really make sense anyway, since there's a gazillion different doc formats and way to convert things
15:24:37 <tzlil> http://0x0.st/iC-R.txt how come the first main works, but the second one gives me a type mismatch?
15:25:02 <merijn> ezzieyguywuf: The repository and/or check if there's something in the sdist
15:25:09 × fendor quits (~fendor@178.115.129.197.wireless.dyn.drei.com) (Ping timeout: 260 seconds)
15:25:09 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:25:15 <ezzieyguywuf> merijn: yea the sdist is what I'm using
15:25:20 <ezzieyguywuf> so it's just a matter of searching
15:25:30 <ezzieyguywuf> i.e. there's not a predefined place they would put it
15:25:31 <merijn> tzlil: You're calling "hasPath" with a tuple, but it doesn't take a tuple
15:25:47 <merijn> tzlil: You'll wanna unlearn the habit of using parentheses for function calls asap, tbh
15:26:14 <tzlil> is `[(Int, Int)]` not a list of tuples?
15:26:14 <merijn> ezzieyguywuf: Well, it'd have to be listed as extra-data-file or extra-source-file in the cabal file to be included in the tarball
15:26:35 <merijn> tzlil: Yes, but hasPath takes 3 arguments, a list, and 2 ints
15:26:43 <lambda> tzlil: `([(1, 2)], 1, 2)` is a `([(Int, Int)], Int, Int)` 3-tuple
15:26:46 <merijn> tzlil: You are calling it with 1 argument, a tuple
15:26:54 <tzlil> ohh
15:27:01 <ezzieyguywuf> merijn: ok. thank you for yoru help.
15:27:26 <merijn> tzlil: probably wanna put a space between print and ( to help remind you of the difference :)
15:27:45 <lambda> tzlil: you want something like `main = print $ hasPath [(1, 2)] 1 2`
15:27:47 <merijn> The correct way would be: print (hasPath [(1, 2)] 1 2)
15:27:57 <tzlil> thank you
15:28:03 Nahra joins (~Nahra@unaffiliated/nahra)
15:28:58 <merijn> Same with the other one, which would be better formatted as: print (isAsc [1, 2, 3])
15:29:34 <merijn> tzlil: Also "True && isAsc(xs)" is just "isAsc xs" ;)
15:32:55 thunderseethe joins (4a882763@cpe-74-136-39-99.kya.res.rr.com)
15:33:41 polyphem joins (~p0lyph3m@2a02:810d:640:776c:76d7:55f6:f85b:c889)
15:34:20 <thunderseethe> if I have a GADT constructor in the style `IntLit :: Int -> Expr Int` does that preclude me from writing a functor instance for my GADT `Expr`?
15:36:30 <solonarv> thunderseethe: yes, it does
15:36:44 <merijn> Not necessarily
15:36:50 shatriff joins (~vitaliish@176-52-216-242.irishtelecom.com)
15:37:00 <solonarv> hm. true
15:37:10 <thunderseethe> Fair enough, is there a common tactic for handling/working around that? Avoid having leaf constructors in my GADT?
15:37:13 <solonarv> however you can't write a functor instance that applies the function to tht Int
15:37:35 <thunderseethe> That is okay, I just want to return the int unmodified
15:37:55 <solonarv> merijn: actually, how? what's the RHS of fmap f (IntLit n) ?
15:38:30 <merijn> solonarv: actually, maybe you're right, thinking is hard :p
15:38:38 ep1ctetus joins (b8bba2a3@ip184-187-162-163.sb.sd.cox.net)
15:38:41 <solonarv> it can't be IntLit n or IntLit (f n) (doesn't typecheck), and if it's anything else, you break the 'fmap id = id' law
15:38:44 <thunderseethe> Lol it is, I've been scratching my head
15:39:44 <thunderseethe> Okay it sounds like I'll need a more fundamental redesign. Thanks for your help!
15:40:30 <ep1ctetus> I am trying add this delay (https://hackage.haskell.org/package/delay-0) package into my stack setup, but it won't compile. I get an error message "Could not find module `GHC.Event'"
15:41:34 <merijn> Sound's like your GHC is too old and/or broken?
15:42:14 <ep1ctetus> hm, I am using 8.8.4
15:42:22 <merijn> hmm, docs say it's GHC internal that module
15:42:26 × mouseghost quits (~draco@wikipedia/desperek) (Quit: mew wew)
15:43:06 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
15:43:10 <ep1ctetus> I looked into using 8.10 but learned that it is not working on Windows
15:44:04 <merijn> oh, you're on windows?
15:44:15 <ep1ctetus> yeah, maybe that's my problem
15:44:31 <merijn> GHC.Event is low level API stuff for interacting with the event manager
15:44:56 <merijn> Given that it's marked as GHC internal and Windows probably has a separate event manager I wouldn't be surprised if that's it
15:45:13 × StoneToad quits (~StoneToad@104-192-232-55.ppp.storm.ca) (Ping timeout: 264 seconds)
15:45:40 <ep1ctetus> ok that makes sense, I think I can work around it. Thanks for your help!
15:46:25 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
15:46:27 × _linker_ quits (~linker@2a02:a31a:a041:9a80:6084:8b0:6bec:7d) (Ping timeout: 260 seconds)
15:47:00 <ephemient> ep1ctetus: its upstream repository has a unreleased commit titled "Updates for 8.8": https://code.xkrd.net/davean/delay/-/commit/321946082b4252fa7e28e28219299148ec2a5b1b
15:47:59 _linker_ joins (~linker@2a02:a31a:a041:9a80:6084:8b0:6bec:7d)
15:50:53 StoneToad joins (~StoneToad@104-192-232-22.ppp.storm.ca)
15:52:52 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 260 seconds)
15:53:16 × todda7 quits (~torstein@ppp-2-84-17-53.home.otenet.gr) (Ping timeout: 240 seconds)
15:55:29 son0p joins (~son0p@181.136.122.143)
15:56:04 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
15:56:05 Darwin226 joins (5fa878fa@95.168.120.250)
15:56:21 × son0p quits (~son0p@181.136.122.143) (Remote host closed the connection)
15:56:37 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
15:58:27 <Darwin226> Hey guys. Anyone with experience with hip/JuicyPixels? I have a greyscale image (Y color space) and what I want to do is just sum up all the values. When I do writeImage I can see that it indeed is a greyscale photo, but when I use the sum function I get really small numbers
15:58:47 <Darwin226> in fact negative values, like -5e-13
15:59:53 × thunderseethe quits (4a882763@cpe-74-136-39-99.kya.res.rr.com) (Remote host closed the connection)
16:00:01 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Client Quit)
16:00:05 × patier[m] quits (patiermatr@gateway/shell/matrix.org/x-vnsjzoxsrzoienfx) (Quit: Idle for 30+ days)
16:00:34 nbloomf joins (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f)
16:00:42 × StoneToad quits (~StoneToad@104-192-232-22.ppp.storm.ca) (Ping timeout: 256 seconds)
16:01:37 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
16:01:47 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:5066:52d5:a64e:1d0f) (Client Quit)
16:02:01 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds)
16:03:50 × sparsity quits (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145) (Quit: Connection closed)
16:04:49 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
16:05:54 StoneToad joins (~StoneToad@104-192-232-29.ppp.storm.ca)
16:06:04 Tario joins (~Tario@201.192.165.173)
16:07:37 todda7 joins (~torstein@ppp-2-84-17-53.home.otenet.gr)
16:07:53 × MarcelineVQ quits (~anja@198.254.202.72) (Remote host closed the connection)
16:08:14 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 265 seconds)
16:08:33 Sheilong joins (uid293653@gateway/web/irccloud.com/x-lvkvgosacwanvten)
16:14:17 <Ferdirand> is there a reason why attoparsec's Parser does not implement MonadFix ?
16:14:51 p-core joins (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515)
16:15:20 <[exa]> Ferdirand: kinda thinking if `fix` even makes sense for parsing
16:16:16 <hpc> it makes sense wherever recursion does
16:16:26 <ephemient> original parsec doesn't implement MonadFix either, but Megaparsec does
16:16:30 <Ferdirand> megaparsec has it
16:17:22 <Ferdirand> i'm trying a crazy solution to today's advent of code
16:17:30 <[exa]> hm... isn't attoparsec parsing method too "strict" for that approach?
16:17:32 <ephemient> it makes sense when the structure is sufficiently lazy, maybe attoparsec isn't?
16:17:40 <ephemient> yeah that
16:17:47 <Ferdirand> where i'm building an intmap of parsers
16:18:02 × Wuzzy quits (~Wuzzy@p5b0df9ae.dip0.t-ipconnect.de) (Ping timeout: 268 seconds)
16:18:04 <Ferdirand> by parsing rule specifications
16:18:16 <Ferdirand> the rules do not come in order, so my intmap is lazy
16:19:28 <Ferdirand> btw the reason i'm giving attoparsec a try is that i couldn't wrap my head around a backtracking bug in the megaparsec version
16:19:39 × Tario quits (~Tario@201.192.165.173) (Read error: Connection reset by peer)
16:19:46 <Ferdirand> after unsuccessfully inserting "try" in every place i could think of
16:20:00 <[exa]> hell yeah, spray try!
16:20:05 <merijn> eh, no
16:20:08 <[exa]> I love that part of megaparsec :]
16:20:18 <merijn> Spraying try is a *great* of making your parser a billion times harder to figure out
16:21:17 shenyi joins (uid216035@gateway/web/irccloud.com/x-uvfrbzkrqfbnyxjp)
16:21:28 cheater1 joins (~user@unaffiliated/cheater)
16:21:30 machinedgod joins (~machinedg@135-23-192-217.cpe.pppoe.ca)
16:21:44 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 260 seconds)
16:21:52 cheater1 is now known as cheater
16:22:28 <Ferdirand> which is why i wanted to give attoparsec a try
16:23:02 perrier-jouet joins (~perrier-j@modemcable012.251-130-66.mc.videotron.ca)
16:23:03 <Ferdirand> it's a shame because it would have been a great showcase for how awesome it is to have first-class parsers
16:23:04 <[exa]> o man, looking at the puzzle input I'd just sed it to prolog and let it solve itself.. :d
16:23:19 <[exa]> Ferdirand: why you need a fix though?
16:23:26 × Darwin226 quits (5fa878fa@95.168.120.250) (Remote host closed the connection)
16:24:01 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
16:24:31 <Ferdirand> my rules parser is a Parser (IntMap (Parser ())
16:25:37 Benzi-Junior joins (~BenziJuni@dsl-149-65-135.hive.is)
16:25:50 <Ferdirand> which would be mfix (\rules -> fromList <$> many (ruleParser rules))
16:26:04 <[exa]> What about Parser (Intmap (Intmap -> Parser() ) ) ?
16:26:30 <sm[m]> Ferdirand: to figure out those, use megaparsec's dbg to trace its progress
16:26:33 bilibilimaster joins (85a77fee@os3-393-29984.vs.sakura.ne.jp)
16:26:50 <Ferdirand> [exa]: i'm not sure, i wanted all map lookups to happen only once if possible
16:27:33 <Ferdirand> so that after the first invocation, every rule parser would retain references to its sub-rules
16:28:00 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
16:28:10 <Ferdirand> sm[m]: oh that's a great idea, didn't know that existed
16:28:40 <sm[m]> sometimes it's essential
16:29:38 <sm[m]> also, writing clear grammars first (eg as a comment) we'll help you write more robust parsers
16:29:47 <sm[m]> will
16:29:55 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
16:30:35 christo joins (~chris@81.96.113.213)
16:30:35 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
16:31:01 <glguy> Ferdirand, In megaparsec (a<|>b) never tries b when a succeeds
16:31:07 <Ferdirand> i was pretty happy about the clarity of my code
16:31:15 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
16:31:17 <Ferdirand> glguy: what about (try a) <|> b ?
16:31:25 <glguy> that's an instance of what I wrote
16:31:26 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
16:31:33 <glguy> where a = try youra
16:31:42 <glguy> try is about failure, not success
16:31:47 <Ferdirand> ah
16:31:48 <Ferdirand> okay
16:31:51 <Ferdirand> yes i got it now
16:31:52 <[exa]> Ferdirand: like, for a prototype I'd just do a cleanly separated `return $ \rules -> do ...aaabbbParser...`
16:32:33 <Ferdirand> so i actually wrote another version where i parse and backtrack by hand
16:33:00 <Ferdirand> and you are right that the failures are exactly the cases where the rule matches a prefix of the string before matching the complete string
16:33:09 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
16:33:20 <Ferdirand> so if i have (a <|> b) >> c
16:33:23 <glguy> Ferdirand, I have a fixpoint for building the parser table like your'e describing, but I do it after parsing instead of directly inside of megaparsec with an mfix https://github.com/glguy/advent2020/blob/master/execs/Day19.hs
16:34:08 <glguy> Ferdirand, nshepperd and I were just talking about this in ##adventofcode-spoilers. You can use Codensity to distribute the >> c under the <|> and make this work with megaparsec
16:34:25 <Ferdirand> Codensity
16:34:25 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 264 seconds)
16:34:31 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
16:34:37 <Ferdirand> this is probably above my level
16:35:03 <glguy> Codensity is a unhelpful name for a continuation passing transformation
16:35:09 × christo quits (~chris@81.96.113.213) (Ping timeout: 260 seconds)
16:35:37 <solonarv> glguy: in fact, with megaparsec and (a <|> b), not only is b never tried if a succeeds (this isn't too surprising); b will also not be tried if a fails after consuming input!
16:35:56 <glguy> solonarv, yeah, that's where try comes back in
16:36:08 <glguy> The practical affect of which is that >>= become right associated and >>= distributes under <|>
16:37:08 cheater1 joins (~user@unaffiliated/cheater)
16:37:40 christo joins (~chris@81.96.113.213)
16:37:48 <sm[m]> solonarv: right, this trips up everyone
16:38:12 <Ferdirand> but just to clarify
16:38:23 <sm[m]> it could be made much more prominent in parser libs' tutorials I think
16:38:42 fendor_ is now known as fendor
16:38:47 <Ferdirand> here the problem is that we have (a <|> b) >> c, where (a >> c) fails, (b >> c) succeeds, but (a) succeeds
16:39:14 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 256 seconds)
16:39:21 <glguy> b >> c would have succeeded but is never tried because a succeeded
16:39:23 cheater1 is now known as cheater
16:39:29 <Ferdirand> right
16:39:36 <Ferdirand> and this is not fixable with a "try" somewhere
16:39:46 <glguy> that sums it up
16:39:48 justsomeguy joins (~justsomeg@216.186.218.241)
16:39:48 × justsomeguy quits (~justsomeg@216.186.218.241) (Changing host)
16:39:48 justsomeguy joins (~justsomeg@unaffiliated/--/x-3805311)
16:40:06 <Ferdirand> i'll have learned something today. Codensity here I come.
16:40:32 <Ferdirand> Codensity f is the Monad generated by taking the right Kan extension of any Functor f along itself (Ran f f).
16:41:05 <glguy> That might be true and also doesn't matter
16:41:19 <sm[m]> Ferdirand: for that case couldn't you simply switch the order of a and b
16:41:39 <glguy> sm[m], not if you ever wanted a >> c to work when b succeds but b >> c fails
16:41:53 <sm[m]> Ok, gotcha
16:42:04 <glguy> sm[m], also this is for an advent of code problem where the grammer is given as an input
16:42:18 <glguy> sm[m], so ideally you aren't having to do too much inspection of what that grammar is
16:42:32 × notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection)
16:42:45 <glguy> and we're fotunate that it's a particularly gentle case of a grammar to handle
16:42:57 <sm[m]> (a>>c)<|>(b>>c)... ok
16:43:30 notzmv joins (~user@unaffiliated/zmv)
16:43:52 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Quit: leaving)
16:44:01 <glguy> the easier solution is to just use not-megaparsec and to pick a library that doesn't have this commitment optimization
16:44:29 bitmagie joins (~Thunderbi@200116b8060b1300bd278c3452ca1c66.dip.versatel-1u1.de)
16:44:54 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Remote host closed the connection)
16:44:56 <glguy> (but if you learn about codensity along the way then it'll be worth it; that turns out to be useful in a variety of contexts)
16:45:44 <Ferdirand> so what is easier, learning about codensity or implementing MonadFix for attoparsec's Parser ? :)
16:45:57 × notzmv quits (~user@unaffiliated/zmv) (Remote host closed the connection)
16:46:27 × hexfive quits (~hexfive@50-47-142-195.evrt.wa.frontiernet.net) (Quit: i must go. my people need me.)
16:46:51 × Neuromancer quits (~Neuromanc@unaffiliated/neuromancer) (Read error: Connection reset by peer)
16:47:16 <nshepperd> Codensity f a = forall r. (a -> m r) -> m r
16:47:23 <[exa]> oh my, the sed+prolog approach works
16:47:29 <nshepperd> err
16:47:47 <nshepperd> Codensity m a = forall r. (a -> m r) -> m r
16:47:58 notzmv joins (~user@unaffiliated/zmv)
16:48:40 <glguy> Ferdirand, Codensity is easier
16:48:46 <glguy> and mfix for megaparsec would just be kind of a hack
16:48:49 × otulp quits (~otulp@ti0187q162-6038.bb.online.no) (Ping timeout: 264 seconds)
16:49:11 <Ferdirand> why kind of a hack ?
16:49:28 <glguy> because it's an unnecessary layer violation
16:49:33 <Ferdirand> I think it's really nice to abstract the rule IDs away
16:49:36 <glguy> you'd just be doing it out of convenience
16:50:04 <glguy> finish your parsing, then resolve your references; there's no reason to merge them
16:50:06 × p-core quits (~Thunderbi@2001:718:1e03:5128:2ab7:7f35:48a1:8515) (Remote host closed the connection)
16:50:31 <glguy> Ferdirand, I think it's probably worth trying to follow the types and implement: Functor, Applicative, Monad, Alternative on Codensity. Doing those instances would give you a sense of what it does and why ti fixes the megaparsec issue you're having
16:50:41 <Ferdirand> i thought it was really beautiful to completely eliminate the indirection
16:51:16 <Ferdirand> it does make debugging a tad more difficult :°
16:51:27 <glguy> The reason to justify that complexity would be if parsing the rules themselves was directed by the rules parsed so far and somehow the strictness worked out that you could return the intmap lazily enough
16:51:43 <Ferdirand> but that works
16:51:47 <Ferdirand> that's not the problem
16:52:14 <Ferdirand> megaparsec + mfix works perfectly fine together when the grammar is regular
16:52:48 <glguy> I mean, you could also parse the inputs while you were parsing the rules in the top half all in one lump of code
16:52:55 <glguy> but making that kind of mess of thigns is why we have compilers in the first place
16:52:59 <Ferdirand> yeah that's what i do :)
16:54:06 <Ferdirand> i considered wrapping Parser with a newtype to introduce a clear separation
16:54:40 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
16:55:01 <Ferdirand> I already have a solution with separated rule parsing and rule matching, and a hand-written matcher, with the same rule type as yours
16:55:09 <Ferdirand> IntMap (Either Char [[Int]])
16:55:44 <glguy> If you want to do the all-in-one solution, you can just do the fixed point outside of megaparsec
16:56:03 <glguy> pass the intmap you got after a successful parse back in as a parameter
16:56:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
16:56:57 <Ferdirand> yeah, i guess that would work
16:57:11 <Ferdirand> it's not as pretty as mfix, though
16:57:23 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
16:58:03 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
16:58:54 × cheater quits (~user@unaffiliated/cheater) (Ping timeout: 256 seconds)
16:59:03 × borne quits (~fritjof@200116b864053600c0a3d285e8e687f4.dip.versatel-1u1.de) (Ping timeout: 260 seconds)
16:59:26 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 264 seconds)
16:59:33 geekosaur joins (42d52137@66.213.33.55)
16:59:57 Neuromancer joins (~Neuromanc@unaffiliated/neuromancer)
17:00:59 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
17:01:21 × pavonia quits (~user@unaffiliated/siracusa) (Quit: Bye!)
17:02:08 × bitmagie quits (~Thunderbi@200116b8060b1300bd278c3452ca1c66.dip.versatel-1u1.de) (Quit: bitmagie)
17:02:14 <glguy> Ferdirand, why were you looking at attoparsec?
17:02:19 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
17:02:39 <glguy> Ferdirand, it has this same backtracking behavior as megaparsec
17:02:52 × heatsink quits (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a) (Ping timeout: 260 seconds)
17:05:29 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
17:05:52 × hekkaidekapus{ quits (~tchouri@gateway/tor-sasl/hekkaidekapus) (Remote host closed the connection)
17:06:10 <Ferdirand> glguy: does it ?
17:07:00 hekkaidekapus{ joins (~tchouri@gateway/tor-sasl/hekkaidekapus)
17:07:32 <glguy> The only (well-known to me) parser combinator library that doesn't do that is ReadP
17:08:01 <Ferdirand> ah yes
17:08:02 × bilibilimaster quits (85a77fee@os3-393-29984.vs.sakura.ne.jp) (Remote host closed the connection)
17:08:03 <Ferdirand> of course
17:08:17 <Ferdirand> i was still in the mindset that my problem was caused by a lack of `try`
17:08:22 <Ferdirand> which we established is not
17:08:30 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
17:08:44 <[exa]> attoparsec docs: "This combinator is provided for compatibility with Parsec. attoparsec parsers always backtrack on failure."
17:08:46 × berberman quits (~berberman@unaffiliated/berberman) (Quit: ZNC 1.7.5 - https://znc.in)
17:09:01 <glguy> Right
17:09:02 <Ferdirand> yes this is a terminology problem
17:09:14 berberman joins (~berberman@unaffiliated/berberman)
17:09:19 <glguy> The important words are "on failure"
17:09:38 <Ferdirand> but ReadP is actually a nice idea
17:09:52 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
17:10:06 <glguy> In attoparsec: pure x <|> y === pure x
17:12:14 <Ferdirand> so, Codensity
17:12:40 <Ferdirand> i can write an instance Functor (Codensity f) without a Functor f constraint on f
17:12:55 <Ferdirand> that's somewhat surprising
17:12:57 <glguy> pretty cool :nod:
17:14:42 <Ferdirand> try :: Parser i a -> Parser i a
17:14:46 <Ferdirand> oops sorry
17:14:56 <Ferdirand> pure a = Codensity ($ a)
17:16:01 <Ferdirand> i'm following the types but this is still baffling
17:16:07 <xerox_> @info Codensity
17:16:07 <lambdabot> Codensity
17:16:22 <geekosaur> no @info
17:16:47 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
17:17:05 kupi joins (uid212005@gateway/web/irccloud.com/x-bdrehaakptqukgwb)
17:17:11 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
17:18:25 <nf> all that is making me wonder whether there are grammars that ReadP *can't* parse
17:18:47 <glguy> There are
17:19:54 <monochrom> Left recursion will always pose a problem.
17:19:55 <nf> note that i mean grammars, not languages
17:20:02 <xerox_> what is ReadP
17:20:07 <nf> monochrom: doesn't it handle that by running parsers in parallel?
17:20:31 <nf> xerox_: https://hackage.haskell.org/package/base/docs/Text-ParserCombinators-ReadP.html
17:20:44 <glguy> nf: it doesn't
17:21:16 <glguy> It would need a parallel case operation
17:21:52 <nf> It parses all alternatives in parallel [...]
17:22:01 <nf> you even said <glguy> So we might have to keep track of fuel or do them in parallel like readp
17:22:07 <xerox_> so <|> and +++ are very different?
17:22:41 <xerox_> R f1 +++ R f2 = R (\k -> f1 k <|> f2 k) -- lol
17:22:41 <dminuoso> Yes. No. Perhaps.
17:22:42 × Nahra quits (~Nahra@unaffiliated/nahra) (Quit: leaving)
17:22:43 <glguy> nf: that was me being wrong
17:23:03 <nf> impossible
17:23:24 <dminuoso> xerox_: <|> has no intrinsic meaning, so its behavior depends on the specific instance.
17:23:33 <dminuoso> xerox_: In case of ReadP it happens that <|> = +++
17:23:43 <nf> guess i'll actually try it
17:25:29 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
17:25:59 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
17:26:04 <nf> hm
17:26:28 <nf> let p = (p >> char 'a') +++ char 'b' in readP_to_S p "baaaa"
17:26:31 <nf> loops forever
17:27:05 <nf> disappointing
17:27:30 electricityZZZZ joins (~electrici@108-216-157-17.lightspeed.sntcca.sbcglobal.net)
17:28:17 Tario joins (~Tario@201.192.165.173)
17:30:11 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 268 seconds)
17:31:27 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
17:31:33 <dolio> There isn't really much that can be done with that kind of representation.
17:31:53 <dolio> `p` is not like a non-terminal. It is a recursively defined value.
17:32:31 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
17:32:53 cosimone joins (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd)
17:35:43 kam1 joins (~kam1@24.231.108.143)
17:37:02 hnOsmium0001 joins (uid453710@gateway/web/irccloud.com/x-gbnbzzrwsbzvqykf)
17:37:15 <nf> you could probably break down the evaluation by layering constructors
17:37:20 <nf> something like the delay monad?
17:40:11 DTZUZU joins (~DTZUZU@205.ip-149-56-132.net)
17:40:28 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 260 seconds)
17:41:14 <Ferdirand> try :: Parser i a -> Parser i a
17:41:19 <Ferdirand> argh sorry
17:41:42 <dolio> You could do something where (>>=) added its own delays, but then it wouldn't be a monad, technically.
17:41:49 <Ferdirand> Codensity fab <*> Codensity fb = Codensity $ fab . (fb .) . (.)
17:42:43 <Ferdirand> that's not extremely clear
17:43:04 <Ferdirand> Codensity is essentially wrapping a into ($ a) ?
17:43:16 <Ferdirand> with a restricted type ?
17:45:50 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
17:47:13 waskell joins (~quassel@d66-183-127-166.bchsia.telus.net)
17:48:03 <dolio> You don't need to write everything point free.
17:49:33 <glguy> especially if the goal is to understand the result of what you're doing :)
17:49:48 <Ferdirand> all right
17:50:06 <Ferdirand> i can extract the value from the codensity by applying it a lambda
17:50:42 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
17:50:57 <Ferdirand> but it's still incredible that Applicative doesn't require any constraints
17:51:08 <Ferdirand> let's try Monad
17:52:21 nbloomf joins (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5)
17:52:41 × salumu quits (~sMuNiX@vlnsm8-montreal02-142-122-8-233.internet.virginmobile.ca) (Ping timeout: 256 seconds)
17:55:01 shapr hops cheerfully
17:57:07 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
18:02:15 × asheshambasta quits (~user@ptr-e1lysaxt4bg7tmaahx1.18120a2.ip6.access.telenet.be) (Ping timeout: 268 seconds)
18:03:44 <Kronic> Wow I'm dumb, I solved part 2 of day 8 a few days ago, got the wrong answer and left it. So I came back to it today... I was using the sample input :|
18:04:11 juuandyy joins (~juuandyy@90.166.144.65)
18:04:11 <Ferdirand> Codensity ma >>= f = Codensity $ \fb -> ma (\a -> let Codensity fb' = f a in fb' (\b -> fb b))
18:04:13 × cosimone quits (~cosimone@2001:b07:ae5:db26:d849:743b:370b:b3cd) (Remote host closed the connection)
18:04:23 × dyeplexer quits (~lol@unaffiliated/terpin) (Remote host closed the connection)
18:04:45 <Ferdirand> i kinda start getting a vague intuition about it
18:05:43 <Ferdirand> so far the f doesn't seem very useful
18:05:58 <glguy> You'll need a way to go: f a -> Codensity f a
18:06:04 <glguy> and back: Codensity f a -> f a
18:06:13 <Ferdirand> might have replaced "f r" by "r" in the types, and these three instances would still be valid, right ?
18:06:16 <Ferdirand> wait
18:06:26 <Ferdirand> you had me reimplement Cont !
18:06:41 <glguy> Ferdirand, but how is it different from Cont?
18:06:45 <Ferdirand> ah no
18:06:47 <Ferdirand> Cont is easier
18:07:12 <Ferdirand> because when i'm unpacking a Cont, I can choose any r
18:07:37 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
18:08:05 knupfer joins (~Thunderbi@200116b82c88b400312c68723da6f021.dip.versatel-1u1.de)
18:09:47 <Ferdirand> ok, so: Alternative
18:10:02 <sm[m]> Kronic: hehe, a fresh mind helps!
18:10:16 × wayne quits (~wayne@unaffiliated/wayne) (Ping timeout: 240 seconds)
18:10:54 × jamm quits (~jamm@unaffiliated/jamm) (Remote host closed the connection)
18:10:55 <Ferdirand> that must require some constraint, surely
18:11:46 wayne joins (~wayne@unaffiliated/wayne)
18:12:01 <Ferdirand> empty = Codensity (const empty)
18:15:33 drewolson4 joins (~drewolson@64.227.24.16)
18:17:16 × drewolson quits (~drewolson@64.227.24.16) (Ping timeout: 240 seconds)
18:17:16 drewolson4 is now known as drewolson
18:18:04 nrdmn01 is now known as nrdmn
18:18:47 <Ferdirand> Codensity fx <|> Codensity fy = Codensity $ \m -> fx m <|> fy m
18:18:52 <Ferdirand> this one is strange
18:20:18 <Ferdirand> oh
18:20:22 <Ferdirand> i think i get it
18:20:50 <Ferdirand> Codensity f is an applicative even if f is not
18:21:09 <Ferdirand> likewise for monad
18:21:15 <Ferdirand> so
18:21:34 <Ferdirand> distributivity between <|> and <*> can also hold independently of the behaviour of the underlying <*>
18:22:17 <nf> weird, my guess would have been empty = Codensity (=<< empty)
18:22:36 <nf> i wonder what that instance would do
18:24:09 <Kronic> sm[m], very true. I came back to it several times for a few mins and read the solution and was like "there's no reason for this not to work". So today I came back, rewrote it, got the same answer as only then did I look at my input lol
18:25:37 Wuzzy joins (~Wuzzy@p5b0df6ea.dip0.t-ipconnect.de)
18:25:43 <nf> well, i guess they are the same if empty >>= f === empty
18:25:46 <nf> is that a law somewhere?
18:26:45 <nf> aha, it is a law of mzero
18:27:12 <dsal> inkbottle: if you can do io, you can do STM
18:29:22 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
18:29:54 <nf> ok, there's something i don't understand
18:30:36 <nf> the type of (<|>) for Codensity f should be isomorphic to forall b c d. ((a -> f b) -> f b) -> ((a -> f c) -> f c) -> (a -> f d) -> f d , right?
18:30:36 Guest53 joins (~textual@2a00:20:604b:87a0:546d:9605:22e6:832a)
18:30:44 <nf> what forces b ~ c ~ d ?
18:31:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds)
18:32:35 <nf> ooooh wait i got confused by the notation for existential types
18:33:01 <nf> it's actually (forall b. (a -> f b) -> f b) -> (forall b. (a -> f b) -> f b) -> (forall b. (a -> f b) -> f b)
18:34:02 <nf> that last forall is pushed to the top level and then the inner b's are set to that rigid top-level b
18:34:11 <aplainzetakind> Can -Wincomplete-patterns be confused by ViewPatterns?
18:35:02 × Wuzzy quits (~Wuzzy@p5b0df6ea.dip0.t-ipconnect.de) (Ping timeout: 260 seconds)
18:36:13 Wuzzy joins (~Wuzzy@p5b0dfe65.dip0.t-ipconnect.de)
18:36:28 <ephemient> no more than guards do, but that can be difficult for the compiler too
18:37:35 <maralorn> Is there some way to capture all recoverable IOExceptions but not the other ones.
18:37:41 <maralorn> E.g. all but sigterm, sigkill or async exceptions?
18:41:30 <aplainzetakind> ephemient: How can I locally suppress it?
18:41:54 <aplainzetakind> Except by putting a redundant pattern at the end.
18:42:20 × Guest53 quits (~textual@2a00:20:604b:87a0:546d:9605:22e6:832a) (Quit: Textual IRC Client: www.textualapp.com)
18:42:36 Jeanne-Kamikaze joins (~Jeanne-Ka@66.115.189.169)
18:46:02 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 268 seconds)
18:47:17 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
18:48:24 heatsink joins (~heatsink@2600:1700:bef1:5e10:404:9305:1542:3c1a)
18:51:00 leifm joins (~leif@dawn.whatbox.ca)
18:51:36 christo joins (~chris@81.96.113.213)
18:51:43 <wz1000> Is there anything that lets me do a parallel map over a Vector?
18:52:18 <shapr> parMap ?
18:52:28 <shapr> @hoogle parMap
18:52:28 <lambdabot> Control.Parallel.Strategies parMap :: Strategy b -> (a -> b) -> [a] -> [b]
18:52:28 <lambdabot> Control.Monad.Par.Combinator parMap :: (Traversable t, NFData b, ParFuture iv p) => (a -> b) -> t a -> p (t b)
18:52:29 <lambdabot> BroadcastChan parMapM_ :: (Foldable f, MonadUnliftIO m) => Handler m a -> Int -> (a -> m ()) -> f a -> m ()
18:53:00 <leifm> @hoogle parTraversable
18:53:01 <lambdabot> Control.Parallel.Strategies parTraversable :: Traversable t => Strategy a -> Strategy (t a)
18:53:03 <Ferdirand> glguy: thanks for all these precious hints
18:53:06 <shapr> wz1000: though my first try at using parMap instantly ate 64 GB of RAM and then dug into my swapfile. I've been using parBuffer since then.
18:53:25 <Ferdirand> not yet fully grokking Codensity. I'll be back with more questions, probably.
18:53:50 <wz1000> shapr: but then I have to convert to and from a list
18:54:14 <shapr> in that case, what about parTraversable suggested by leifm?
18:54:30 <wz1000> I guess this might work: https://hackage.haskell.org/package/vector-strategies-0.4/docs/Data-Vector-Strategies.html
18:56:52 <leifm> Isn't converting to and from a list basically free? `fromList [1 .. 100]` shouldn't construct the list `[1.. 100]` in memory, and neither should `toList vec`, so `fromList . parMap f . toList` might not construct anything.
18:58:13 dhouthoo joins (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be)
18:58:51 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net)
18:59:57 Sgeo joins (~Sgeo@ool-18b98aa4.dyn.optonline.net)
19:00:55 × geekosaur quits (42d52137@66.213.33.55) (Ping timeout: 245 seconds)
19:02:02 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 256 seconds)
19:03:31 berberman_ joins (~berberman@unaffiliated/berberman)
19:03:45 × dhil quits (~dhil@78.156.97.38) (Ping timeout: 240 seconds)
19:04:03 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:04:28 × berberman quits (~berberman@unaffiliated/berberman) (Ping timeout: 260 seconds)
19:04:43 × dhouthoo quits (~dhouthoo@ptr-eitgbj2w0uu6delkbrh.18120a2.ip6.access.telenet.be) (Quit: WeeChat 2.9)
19:07:04 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:07:07 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
19:09:13 × knupfer quits (~Thunderbi@200116b82c88b400312c68723da6f021.dip.versatel-1u1.de) (Ping timeout: 258 seconds)
19:12:14 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds)
19:12:45 <glguy> Ferdirand, if you look inside the implementation of ReadP's instances you just wrote you might find them familiar
19:13:47 × xff0x quits (~fox@2001:1a81:52d2:4e00:ee28:163c:e796:1277) (Ping timeout: 268 seconds)
19:14:03 kam1 joins (~kam1@24.231.108.143)
19:15:20 xff0x joins (~fox@141.98.255.147)
19:20:05 geowiesnot joins (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr)
19:23:18 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
19:24:24 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
19:24:53 × juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 268 seconds)
19:24:57 geekosaur joins (42d52137@66.213.33.55)
19:26:18 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
19:27:01 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
19:27:41 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
19:28:18 christo joins (~chris@81.96.113.213)
19:28:22 philopsos joins (~caecilius@gateway/tor-sasl/caecilius)
19:28:30 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
19:29:15 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:29:47 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
19:30:03 juuandyy joins (~juuandyy@90.166.144.65)
19:30:21 × FreeBirdLjj quits (~freebirdl@101.87.168.174) (Remote host closed the connection)
19:30:56 FreeBirdLjj joins (~freebirdl@101.87.168.174)
19:31:01 × FreeBirdLjj quits (~freebirdl@101.87.168.174) (Read error: Connection reset by peer)
19:31:19 FreeBirdLjj joins (~freebirdl@101.87.168.174)
19:31:22 × FreeBirdLjj quits (~freebirdl@101.87.168.174) (Read error: Connection reset by peer)
19:31:38 FreeBirdLjj joins (~freebirdl@101.87.168.174)
19:31:43 × FreeBirdLjj quits (~freebirdl@101.87.168.174) (Remote host closed the connection)
19:32:03 FreeBirdLjj joins (~freebirdl@101.87.168.174)
19:32:04 × FreeBirdLjj quits (~freebirdl@101.87.168.174) (Read error: Connection reset by peer)
19:33:26 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
19:33:34 cosimone joins (~cosimone@93-47-228-249.ip115.fastwebnet.it)
19:33:59 neiluj joins (~jco@91-167-203-101.subs.proxad.net)
19:33:59 × neiluj quits (~jco@91-167-203-101.subs.proxad.net) (Changing host)
19:33:59 neiluj joins (~jco@unaffiliated/neiluj)
19:34:14 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 264 seconds)
19:34:38 christo joins (~chris@81.96.113.213)
19:36:27 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:36:46 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:37:25 × Tario quits (~Tario@201.192.165.173) (Ping timeout: 264 seconds)
19:37:29 christo joins (~chris@81.96.113.213)
19:38:41 hiroaki joins (~hiroaki@ip4d168e73.dynamic.kabel-deutschland.de)
19:39:31 ADG1089 joins (~aditya@122.163.166.13)
19:39:36 × cosimone quits (~cosimone@93-47-228-249.ip115.fastwebnet.it) (Quit: cosimone)
19:39:49 <ADG1089> i have containers-0.6.2.1 & containers 0.6.4.1 how can i remove the latter
19:40:06 <ADG1089> i can't find it in ghc-pkg list
19:40:44 <c_wraith> that means it probably was installed by new-style cabal?
19:41:29 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
19:42:23 <c_wraith> look in ~/.ghc/<version>/environments/default
19:42:38 <c_wraith> If there's a line in there that mentions containers 0.6.4.1, remove it
19:43:03 <c_wraith> and beware of using cabal install --lib
19:44:00 ADG1089_ joins (~adg1089@171.76.183.207)
19:44:18 <glguy> ADG1089, Did you see c_wraith's 4-message response?
19:44:47 Mrbuck joins (~Mrbuck@gateway/tor-sasl/mrbuck)
19:45:26 ddellacosta joins (dd@gateway/vpn/mullvad/ddellacosta)
19:45:51 × ADG1089 quits (~aditya@122.163.166.13) (Ping timeout: 268 seconds)
19:46:05 × Varis quits (~Tadas@unaffiliated/varis) (Ping timeout: 240 seconds)
19:46:43 grepcake joins (~artyom@77.234.203.51)
19:47:10 the-smug-one joins (~user@83-92-112-87-cable.dk.customer.tdc.net)
19:47:11 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 265 seconds)
19:48:38 Gurkenglas joins (~Gurkengla@unaffiliated/gurkenglas)
19:48:51 <the-smug-one> Hot take: Tagless final style is far more useful in lazily evaluated languages than in eagerly evaluated ones.
19:50:00 ADG1089 joins (~aditya@122.163.166.13)
19:50:07 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
19:50:12 <ADG1089> c_wraith: that fixed it
19:50:27 <ADG1089> thanks, what should i use instead of cabal install --lib, pacman?
19:51:04 <sclv> just use newstyle with projects
19:51:10 <sclv> don't install libs at all
19:51:24 × geowiesnot quits (~user@i15-les02-ix2-87-89-181-157.sfr.lns.abo.bbox.fr) (Ping timeout: 268 seconds)
19:51:38 <grepcake> Hi, could someone please explain why `instance (MonadState S m) => LangL (HasS m) where` is an undecidable instance? And what should I do to help it
19:51:54 <ADG1089> sclv: v2-install?
19:52:08 × christo quits (~chris@81.96.113.213) (Remote host closed the connection)
19:52:14 <sclv> no don't install libs at all directly
19:52:22 <sclv> just add them as deps to your project and v2-build
19:52:27 <sclv> only v2-install executables
19:52:49 <c_wraith> use mkdir and cabal init a lot
19:52:55 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
19:53:10 <glguy> for one-off experimentation I'll run: cabal repl --build-dep somelib
19:53:29 × aplainzetakind quits (~johndoe@captainludd.powered.by.lunarbnc.net) (Client Quit)
19:53:39 Gurkenglas_ joins (~Gurkengla@unaffiliated/gurkenglas)
19:53:52 × Gurkenglas quits (~Gurkengla@unaffiliated/gurkenglas) (Ping timeout: 268 seconds)
19:54:56 × ADG1089 quits (~aditya@122.163.166.13) (Remote host closed the connection)
19:54:57 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 260 seconds)
19:57:27 christo joins (~chris@81.96.113.213)
19:59:24 aplainzetakind joins (~johndoe@captainludd.powered.by.lunarbnc.net)
19:59:26 Tario joins (~Tario@200.119.184.13)
20:00:41 ADG1089 joins (~aditya@122.163.166.13)
20:00:48 superstar64 joins (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net)
20:01:12 <superstar64> any way i have type inference for instance constraints?
20:01:22 <superstar64> where the stuff before ``=>`` is inferred
20:02:01 × juuandyy quits (~juuandyy@90.166.144.65) (Ping timeout: 264 seconds)
20:02:30 × christo quits (~chris@81.96.113.213) (Ping timeout: 268 seconds)
20:04:10 × ADG1089 quits (~aditya@122.163.166.13) (Remote host closed the connection)
20:04:29 ADG1089 joins (~aditya@122.163.166.13)
20:05:01 <ddellacosta> superstar64: I'm not sure exactly what you mean--ghc will certainly complain if constraints are not satisfied and suggest a solution, and on the other side of the equation it's possible to derive a lot of instances for data types
20:05:33 <superstar64> yea, instead of ghc complaining, i want it to fill in the constraints for me
20:05:58 <superstar64> i have like 100 instances and it's kinda annoying to have each one declare it's requirements
20:06:23 <superstar64> i have a 1 function per type class thing going on
20:06:42 <ddellacosta> I would suggest first seeing if you can cut down on the number of instances. That doesn't seem like a very satisfactory design
20:06:45 × ADG1089 quits (~aditya@122.163.166.13) (Remote host closed the connection)
20:07:10 <ddellacosta> and I don't know how Haskell would make this easier on you, other than maybe template haskell?
20:07:38 <ddellacosta> I mean, you can try to derive what you need
20:07:46 ADG1089 joins (~aditya@122.163.166.13)
20:07:51 <ephemient> https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#the-constraint-kind already allows for aliases if you've got some unfortunate design that makes you type the same context over and over again
20:08:45 <superstar64> nope each instance has unique requirements https://github.com/Superstar64/aith/tree/rewrite/source/TypeSystem
20:08:57 danvet joins (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa)
20:10:27 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
20:12:24 knupfer joins (~Thunderbi@200116b82c88b4001c2dbafffe42f16d.dip.versatel-1u1.de)
20:12:24 × knupfer quits (~Thunderbi@200116b82c88b4001c2dbafffe42f16d.dip.versatel-1u1.de) (Client Quit)
20:12:40 knupfer joins (~Thunderbi@mue-88-130-61-012.dsl.tropolys.de)
20:14:29 × grepcake quits (~artyom@77.234.203.51) (Quit: Konversation terminated!)
20:14:30 × Tario quits (~Tario@200.119.184.13) (Read error: Connection reset by peer)
20:14:52 × ep1ctetus quits (b8bba2a3@ip184-187-162-163.sb.sd.cox.net) (Remote host closed the connection)
20:15:02 × Vulfe quits (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c) (Ping timeout: 264 seconds)
20:15:11 ocharles is now known as ocharles_bot
20:16:13 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 272 seconds)
20:16:32 cr3 joins (~cr3@192-222-143-195.qc.cable.ebox.net)
20:16:41 Tario joins (~Tario@201.192.165.173)
20:16:54 ocharles_bot is now known as ocharles
20:19:16 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
20:19:38 the-smug-one parts (~user@83-92-112-87-cable.dk.customer.tdc.net) ("ERC (IRC client for Emacs 27.1)")
20:24:21 Varis joins (~Tadas@unaffiliated/varis)
20:25:49 boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)
20:25:58 × boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Client Quit)
20:26:33 × ADG1089 quits (~aditya@122.163.166.13) (Remote host closed the connection)
20:27:16 Vulfe joins (~vulfe@2600:1702:31b0:34e0:cca6:5d8:2bb0:556c)
20:29:19 cosimone joins (~cosimone@2001:b07:ae5:db26:1fb3:ef3f:ece2:c6f8)
20:30:43 boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)
20:32:55 acarrico joins (~acarrico@dhcp-68-142-39-249.greenmountainaccess.net)
20:34:35 × ADG1089_ quits (~adg1089@171.76.183.207) (Ping timeout: 272 seconds)
20:34:36 × Rudd0 quits (~Rudd0@185.189.115.108) (Ping timeout: 240 seconds)
20:35:06 × boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Client Quit)
20:35:37 × xff0x quits (~fox@141.98.255.147) (Ping timeout: 246 seconds)
20:36:28 × Tops2 quits (~Tobias@95.33.88.255) (Read error: Connection reset by peer)
20:37:21 knupfer1 joins (~Thunderbi@200116b82c88b400045df42dbcef899f.dip.versatel-1u1.de)
20:37:21 × knupfer quits (~Thunderbi@mue-88-130-61-012.dsl.tropolys.de) (Read error: Connection reset by peer)
20:37:21 knupfer1 is now known as knupfer
20:37:30 jneira joins (5127ad83@gateway/web/cgi-irc/kiwiirc.com/ip.81.39.173.131)
20:37:30 xff0x joins (~fox@2001:1a81:52d2:4e00:ee28:163c:e796:1277)
20:39:31 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
20:39:50 <gentauro> anybody know how to pretty-encode with Aeson? https://hackage.haskell.org/package/aeson-1.5.4.1/docs/Data-Aeson.html#g:1
20:40:07 <gentauro> pretty-encode = multi-line + 2 space indentation
20:40:08 <gentauro> :)
20:40:17 × nineonine quits (~nineonine@S01061cabc0b095f3.vf.shawcable.net) (Remote host closed the connection)
20:40:28 <koz_> There's an 'aeson-pretty' package that might do what you need?
20:41:19 <gentauro> koz_: and we have a winner :) https://hackage.haskell.org/package/aeson-pretty-0.8.8/docs/Data-Aeson-Encode-Pretty.html#v:encodePretty
20:41:27 <gentauro> https://hackage.haskell.org/package/aeson-pretty-0.8.8/docs/Data-Aeson-Encode-Pretty.html#v:defConfig
20:41:30 <gentauro> :)
20:41:31 <koz_> Glad I could help.
20:41:33 <gentauro> koz_: thx
20:42:21 nineonine joins (~nineonine@S01061cabc0b095f3.vf.shawcable.net)
20:42:59 boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)
20:43:35 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
20:45:28 × Jeanne-Kamikaze quits (~Jeanne-Ka@66.115.189.169) (Ping timeout: 272 seconds)
20:46:00 lordyod joins (~lordyod@c-67-169-144-132.hsd1.ca.comcast.net)
20:46:57 × superstar64 quits (6ccefa7c@108-206-250-124.lightspeed.miamfl.sbcglobal.net) (Remote host closed the connection)
20:48:13 <boxscape> Are there sensible implementations of MonadPlus that are different from the Alternative instance?
20:48:36 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
20:48:56 <koz_> boxscape: That would by definition make them insensible, surely?
20:49:11 <boxscape> Possibly, I don't know much about MonadPlus
20:50:03 × cosimone quits (~cosimone@2001:b07:ae5:db26:1fb3:ef3f:ece2:c6f8) (Quit: cosimone)
20:50:05 <boxscape> Does it only exist because Applicative and Alternative weren't around at the time?
20:50:12 <koz_> Pretty much.
20:50:19 <boxscape> I see
20:50:24 cosimone joins (~cosimone@2001:b07:ae5:db26:1fb3:ef3f:ece2:c6f8)
20:51:41 z0 joins (~z0@188.251.64.220)
20:51:57 <tzlil> are there namespaces in haskell? ive challenged myself to implement some functions that haskell provides (zip, length, elem, etc.) but i have to change the name in order to not conflict with the actual function
20:52:24 <koz_> tzlil: There are modules, which act as namespaces.
20:52:50 <koz_> If by 'Haskell' you mean 'Prelude', the solution is 'import Prelude hiding (zip, length, elem, whateverTheHellElse, ...)'
20:53:13 <tzlil> and can i do `import Prelude hiding *`?
20:53:18 <tzlil> yeah, i mean prelude
20:53:30 <boxscape> you can write `import qualified Prelude`
20:53:39 <koz_> tzlil: No because that's not valid syntax. Is your goal to have nothing in the Prelude available at all?
20:53:42 <tzlil> it looks like i can compile with -XNoImplicitPrelude
20:53:45 <boxscape> that means anything from Prelude has to be accessed by writing "Prelude.x`
20:53:48 <koz_> If so, the solution is {-# NoImplicitPrelude #-}.
20:53:49 <boxscape> that works, too
20:53:53 <koz_> I meant.
20:53:59 <tzlil> thanks
20:54:00 <koz_> {-# LANGUAGE NoImplicitPrelude #-}
20:54:02 <koz_> At the top of the file.
20:54:04 <dolio> You can also `import Prelude()`
20:54:10 <boxscape> oh, yeah
20:54:16 <koz_> boxscape's and dolio's suggestions are also good.
20:54:28 <tzlil> ah wait, now `Int` and `Bool` are not in scope
20:55:07 <boxscape> if you only want to import specific things you can also do `import Prelude (Int, Bool)`
20:55:19 fryguybob joins (~fryguybob@cpe-74-65-31-113.rochester.res.rr.com)
20:55:32 solarliner joins (~solarline@243.81.10.109.rev.sfr.net)
20:55:39 <tzlil> thanks
20:55:48 xcmw joins (~textual@2603-6011-2200-f103-cdbc-9ec6-8319-9dc9.res6.spectrum.com)
20:57:23 × StoneToad quits (~StoneToad@104-192-232-29.ppp.storm.ca) (Ping timeout: 268 seconds)
20:57:25 <gentauro> B21:54 < koz_> {-# LANGUAGE NoImplicitPrelude #-}
20:57:32 <gentauro> koz_: so no IO right?
20:57:50 <koz_> gentauro: Well, I was offering a solution to the stated problem.
20:57:50 <tzlil> now its complaining about some operators not being in scope, which is to be expected, but i dont know what name i need to import them by
20:57:59 <koz_> tzlil: Which operators?
20:58:06 <tzlil> +, $, ==
20:58:10 <tzlil> etc. etc.
20:58:11 <koz_> gentauro: I have no idea what our questioner is trying to achieve.
20:58:22 <gentauro> koz_: me neither
20:58:25 <koz_> tzlil: import Prelude ((+), ($), (==), ...)
20:58:31 <gentauro> I guess no IO but also nothing else
20:58:31 <gentauro> :|
20:58:33 <tzlil> > ive challenged myself to implement some functions that haskell provides (zip, length, elem, etc.)
20:58:36 <lambdabot> error:
20:58:36 <lambdabot> A section must be enclosed in parentheses thus: (etc .)
20:58:38 kritzefitz joins (~kritzefit@212.86.56.80)
20:58:50 <geekosaur> I would import hiding just those, then
20:58:51 <gentauro> tzlil: fair enough
20:59:21 <tzlil> yes i should probably just hide the ones i implement
20:59:22 <gentauro> i have seen blog post where people do the same and implement the `IO` type :)
20:59:38 <gentauro> so it's all good
20:59:50 <aplainzetakind> tzlil: Start with NoImplicitPrelude, then import Prelude, then whenever you get a clash, add it to the hiding () list.
21:02:22 StoneToad joins (~StoneToad@104-192-232-46.ppp.storm.ca)
21:03:18 <boxscape> aplainzetakind I don't think NoImplicitPrelude even makes a difference when you do that
21:03:29 <boxscape> % import Prelude ()
21:03:29 <yahb> boxscape:
21:03:32 <boxscape> % :t False
21:03:32 <yahb> boxscape: Bool
21:03:36 <boxscape> hmm
21:03:42 <boxscape> maybe in ghci it does :)
21:04:12 <lyxia> in a file it does, at least
21:05:12 <dolio> I'm not sure there's any point of NoImplicitPrelude unless you're turning it on project-wide and using some other prelude-like module.
21:05:30 <dolio> If you're still putting an `import Prelude ...` line in every file, it isn't doing anything.
21:06:05 <dolio> And if you're putting the pragma in every file, you're not saving typing.
21:07:05 × kam1 quits (~kam1@24.231.108.143) (Ping timeout: 240 seconds)
21:07:06 <dolio> I guess the other use is modules in base and such that Prelude depends on, but that's not a normal use case.
21:07:29 × mimi_vx quits (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3) (Read error: Connection reset by peer)
21:07:38 bitmagie joins (~Thunderbi@200116b8060b130034d20c9fa6bd9fdc.dip.versatel-1u1.de)
21:07:45 mimi_vx joins (~mimi@2a01:490:16:1026:ad8e:aaec:b83:b6c3)
21:07:48 × bitmagie quits (~Thunderbi@200116b8060b130034d20c9fa6bd9fdc.dip.versatel-1u1.de) (Client Quit)
21:11:33 <tzlil> whats wrong with this function signature? `zipWith :: (a -> a -> a) [a] [a]`
21:11:52 <tzlil> im getting `Expected kind ‘* -> * -> *’, but ‘a -> a -> a’ has kind ‘*’`
21:12:20 <hpc> you're missing the rest of the arrows
21:12:24 <koz_> tzlil: Because you wanted (a -> a -> a) -> [a] -> [a]
21:12:32 <tzlil> oh, oops
21:12:37 <koz_> Also, this isn't the signature zipWith should have even _if_ you put those arrows in.
21:12:50 <koz_> Because zipWith needs _two_ lists, and gives back one, but you need one list.
21:12:59 <hpc> as for why you are getting the error you are, it's trying to apply (a -> a -> a) to two parameters, the way you might write Either [a] [a]
21:20:18 × StoneToad quits (~StoneToad@104-192-232-46.ppp.storm.ca) (Ping timeout: 272 seconds)
21:21:31 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
21:22:38 × neiluj quits (~jco@unaffiliated/neiluj) (Quit: leaving)
21:23:02 × xff0x quits (~fox@2001:1a81:52d2:4e00:ee28:163c:e796:1277) (Ping timeout: 260 seconds)
21:23:05 × Franciman quits (~francesco@host-82-49-79-73.retail.telecomitalia.it) (Quit: Leaving)
21:23:41 xff0x joins (~fox@port-92-195-45-54.dynamic.as20676.net)
21:24:07 chum joins (~lindzeyn@wan.hillcountryweb.com)
21:24:54 StoneToad joins (~StoneToad@104-192-232-61.ppp.storm.ca)
21:28:56 × sord937 quits (~sord937@gateway/tor-sasl/sord937) (Quit: sord937)
21:29:23 <gentauro> is it correctly assumed that `LBS.writeFile` is strict? I don't seem to be able to find a strict implemenation of writeFile -> https://hackage.haskell.org/package/strict-0.4.0.1/docs/System-IO-Strict.html#v:readFile
21:30:10 <c_wraith> You should assume every writeFile consumes the entire input when executed.
21:30:16 <c_wraith> If it didn't, it would be buggy
21:30:47 <Kronic> Question here to any of you vimmers out there... when I use w/b to navigate forward and backwards a word it works basically normally but when I attempt to do it inside this lambda: (\a -> read a :: Integer) it seems to just jump all over the place, is there anyway to change this or is this behavior expected?
21:30:54 <gentauro> c_wraith: Roger that
21:31:35 <gentauro> I just recall when I used putStr/puStrLn I had to re-write them so they `flushed`
21:32:05 <c_wraith> Oh, that's a separate idea. that's about IO buffering
21:32:11 <geekosaur> that's related to buffering, not whole file ops
21:32:39 <c_wraith> When you close a file, as writeFile does, it had better flush the entire buffer. Or else the IO library is buggy. :)
21:32:53 <gentauro> https://gitlab.com/spisemisu/cleanse-facebook/-/blob/master/src/CleanseFacebook/Eff.hs#L132-137
21:33:25 <gentauro> c_wraith: I'm using https://hackage.haskell.org/package/bytestring so :)
21:33:27 <leifm> Kronic: Works like normal for me
21:33:53 <Kronic> Must be some of my configuration, I just loaded it up without my .vimrc and it seems to be normal, so I'll have to locate the problem
21:33:53 <c_wraith> The difference with putStr is that it doesn't close the stream it's writing to. So if the terminal is line-buffering and nothing flushes the buffer, the terminal just sits there waiting for more characters.
21:34:00 nbloomf joins (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5)
21:34:52 × Mrbuck quits (~Mrbuck@gateway/tor-sasl/mrbuck) (Quit: WeeChat 2.9)
21:34:59 <gentauro> c_wraith: so it's the same with `interact`?
21:35:26 <c_wraith> it certainly can be.
21:35:44 <Kronic> thanks for testing though leifm ! :)
21:35:52 <c_wraith> interact is messy to think about here because its use of lazy IO is a weird form of concurrency, and interact makes it especially obvious
21:43:53 × boxscape quits (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89) (Ping timeout: 256 seconds)
21:44:02 brodie joins (~brodie@207.53.253.137)
21:44:25 × chang quits (~textual@host-173-230-65-85.njjcmar.clients.pavlovmedia.com) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:45:46 × sakirious quits (~sakirious@c-71-197-191-137.hsd1.wa.comcast.net) (Quit: The Lounge - https://thelounge.chat)
21:46:30 × kupi quits (uid212005@gateway/web/irccloud.com/x-bdrehaakptqukgwb) (Quit: Connection closed for inactivity)
21:49:02 × geekosaur quits (42d52137@66.213.33.55) (Remote host closed the connection)
21:50:37 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 264 seconds)
21:51:21 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
21:54:41 <gentauro> c_wraith: I think I'm using `getContents` somewhere in the code in a lazy manner
21:57:52 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:59:47 × danvet quits (~Daniel@2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa) (Ping timeout: 260 seconds)
22:00:34 <gentauro> c_wraith: I guess `getContents >>= \cs -> length cs `seq` pure cs` should do it :)
22:01:36 × solarliner quits (~solarline@243.81.10.109.rev.sfr.net) (Ping timeout: 240 seconds)
22:04:56 × wroathe quits (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Ping timeout: 240 seconds)
22:05:13 × knupfer quits (~Thunderbi@200116b82c88b400045df42dbcef899f.dip.versatel-1u1.de) (Ping timeout: 268 seconds)
22:05:31 Rudd0 joins (~Rudd0@185.189.115.98)
22:12:47 wroathe joins (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net)
22:17:19 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:19:39 pavonia joins (~user@unaffiliated/siracusa)
22:21:56 sparsity joins (5eae2591@gateway/web/cgi-irc/kiwiirc.com/ip.94.174.37.145)
22:22:16 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
22:28:36 <gentauro> c_wraith: do you have any experience when using `writeLine` with many files?
22:30:03 × __monty__ quits (~toonn@unaffiliated/toonn) (Quit: leaving)
22:30:26 <gentauro> I noticed that `readLine` reached easily the too many files open on a Linux (therefore I needed a strict `readFile`). http://woshub.com/too-many-open-files-error-linux/
22:30:42 × wonko7 quits (~wonko7@69.75.150.77.rev.sfr.net) (Ping timeout: 260 seconds)
22:30:54 olligobber joins (olligobber@gateway/vpn/privateinternetaccess/olligobber)
22:31:12 <gentauro> but I'm afraid if I rely on `async` to handle the many `writeFile` it's going to be the same …
22:31:20 <xsperry> alternatively, you can force evaluation with evaluate (force text)
22:36:03 × roconnor quits (~roconnor@host-45-58-208-179.dyn.295.ca) (Ping timeout: 268 seconds)
22:38:21 danso joins (~dan@69-165-210-185.cable.teksavvy.com)
22:40:51 geowiesnot joins (~user@87-89-181-157.abo.bbox.fr)
22:49:13 × takuan quits (~takuan@178-116-218-225.access.telenet.be) (Remote host closed the connection)
22:52:59 × MOSCOS quits (~MOSCOS@122.54.107.175) (Remote host closed the connection)
22:53:26 MOSCOS joins (~MOSCOS@122.54.107.175)
22:54:57 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
22:59:40 × kritzefitz quits (~kritzefit@212.86.56.80) (Remote host closed the connection)
23:03:54 nbloomf joins (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5)
23:05:24 × Varis quits (~Tadas@unaffiliated/varis) (Remote host closed the connection)
23:05:59 × fendor quits (~fendor@178.115.130.51.wireless.dyn.drei.com) (Remote host closed the connection)
23:09:01 urek joins (~urek@2804:7f1:e10a:f71b:1d25:d790:4162:b2ba)
23:13:00 <ggVGc> great... wondered why my application was using 11gb of memory... LazyBS.writeFile
23:13:03 <ggVGc> :(
23:13:15 kam1 joins (~kam1@24.231.108.143)
23:13:21 <ggVGc> why does lazy IO even exist
23:13:35 <c_wraith> that isn't lazy IO
23:13:54 <c_wraith> when it completes execution, arguments will have been fully evaluated
23:14:08 <c_wraith> (and the return value, for that matter)
23:14:35 <hpc> more precisely, execution of writeFile isn't dependent on another expression being evaluated
23:15:10 <c_wraith> it's possible lazy bytestrings with lots of thunks in them are your problem
23:15:23 <c_wraith> Bute it's not writeFile causing it.
23:15:45 <c_wraith> It's writeFile forcing their evaluation. Which causes some profiling modes to report it as the primary cost center
23:16:02 <gentauro> 00:13 < ggVGc> great... wondered why my application was using 11gb of memory... LazyBS.writeFile
23:16:21 <gentauro> ggVGc: you are still far away from the 23 GB mem leak of `taffybar` on my laptop :P
23:16:33 <gentauro> (I guess having 64 GB helps with running Haskell stuff)
23:16:52 <gentauro> I even let the mem leak stay there for a few weeks just because I could xD
23:20:22 <gentauro> c_wraith: so the best way to handle ByteString should be doing a `LBS.ByteString` -> `BS.ByteString` and then call `writeFile`?
23:20:34 <c_wraith> that's not going to fix anything
23:20:52 <c_wraith> It's just going to change where the massive thunk buildup is evaluated
23:21:00 <c_wraith> The fix is to not build up thunks
23:21:00 × elliott__ quits (~elliott@pool-108-51-101-42.washdc.fios.verizon.net) (Ping timeout: 256 seconds)
23:21:06 <dolio> It's a good thing lazy IO exists, or all the people who use it as a scapegoat for their real problems might have to figure out what's actuall wrong.
23:22:50 elliott__ joins (~elliott@pool-108-51-101-42.washdc.fios.verizon.net)
23:23:08 × coot quits (~coot@37.30.50.101.nat.umts.dynamic.t-mobile.pl) (Quit: coot)
23:24:41 Welkin joins (~Welkin@216.243.35.47)
23:24:51 <ggVGc> c_wraith: hm, yeah, I thought it was weird... And it's possible changing it also had some other effect. But I did get my memory usage down to a stable level
23:24:58 <ggVGc> hence I have now stopped investigating
23:25:45 <ggVGc> I guess I did move some other things around that might have affected laziness when changing things to try to pinpoint what was happening
23:25:49 <Welkin> user count dropped since I was last on here 6-9 months ago
23:26:08 × hackage quits (mniip@haskell/bot/hackage) (Read error: Connection reset by peer)
23:26:31 × aoei quits (~aoei@li2174-104.members.linode.com) (Quit: ZNC 1.7.5 - https://znc.in)
23:26:32 × nitrix quits (~nitrix@haskell/developer/nitrix) (Remote host closed the connection)
23:26:40 × nbloomf quits (~nbloomf@2600:1700:ad14:3020:9d9f:2423:b563:76e5) (Quit: My MacBook has gone to sleep. ZZZzzz…)
23:26:45 hackage joins (mniip@haskell/bot/hackage)
23:26:45 nitrix joins (~nitrix@haskell/developer/nitrix)
23:26:46 aoei joins (~aoei@li2174-104.members.linode.com)
23:28:25 theorbtwo joins (~theorb@cpc81822-swin19-2-0-cust3.3-1.cable.virginm.net)
23:28:40 Varis joins (~Tadas@unaffiliated/varis)
23:28:56 × merijn quits (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 240 seconds)
23:35:44 × ddellacosta quits (dd@gateway/vpn/mullvad/ddellacosta) (Ping timeout: 260 seconds)
23:37:37 × shutdown_-h_now quits (~arjan@2001:1c06:2d0b:2312:b430:7c21:4c6a:15a8) (Ping timeout: 272 seconds)
23:41:16 philopso1 joins (~caecilius@gateway/tor-sasl/caecilius)
23:43:00 shutdown_-h_now joins (~arjan@2001:1c06:2d0b:2312:438:f47:3e76:14d7)
23:43:15 × kam1 quits (~kam1@24.231.108.143) (Read error: Connection reset by peer)
23:44:43 × philopsos quits (~caecilius@gateway/tor-sasl/caecilius) (Ping timeout: 240 seconds)
23:47:38 × brodie quits (~brodie@207.53.253.137) (Ping timeout: 256 seconds)
23:52:44 × geowiesnot quits (~user@87-89-181-157.abo.bbox.fr) (Ping timeout: 256 seconds)
23:55:40 merijn joins (~merijn@83-160-49-249.ip.xs4all.nl)
23:57:20 nowhere_man joins (~pierre@2a01:e0a:3c7:60d0:e88f:4e24:f6a7:f155)
23:58:08 × m0rphism quits (~m0rphism@HSI-KBW-085-216-104-059.hsi.kabelbw.de) (Quit: WeeChat 2.7.1)
23:59:54 boxscape joins (4ff0ba59@gateway/web/cgi-irc/kiwiirc.com/ip.79.240.186.89)

All times are in UTC on 2020-12-19.