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