2021-11-26 00:00:19 +0100 | <maerwald> | PVP isn't particularly clear about whether "changing behavior of a function" counts as a breaking change or not... I guess I'm allowed to consider it one though |
2021-11-26 00:00:41 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 00:01:11 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:d837:dc58:2ea7:10e8) (Ping timeout: 245 seconds) |
2021-11-26 00:02:48 +0100 | <dsal> | arahael: unmaintained, or perfect? |
2021-11-26 00:02:56 +0100 | <arahael> | dsal: Let me try and find the ticket. |
2021-11-26 00:03:01 +0100 | <maerwald> | I think scotty blows up with large body sizes? |
2021-11-26 00:03:25 +0100 | Skyfire | (~pyon@user/pyon) (Quit: WeeChat 3.3) |
2021-11-26 00:04:12 +0100 | <arahael> | OOh! As of... May this year, it has new maintainers! https://github.com/scotty-web/scotty/issues/274 |
2021-11-26 00:04:50 +0100 | <arahael> | maerwald: Not too sure of PVP myself, I haven't properly read it... But I'd think we'd err on assuming something's breaking if we're not sure, in terms of versioning? |
2021-11-26 00:05:51 +0100 | slack1256 | (~slack1256@181.42.50.148) (Ping timeout: 250 seconds) |
2021-11-26 00:06:00 +0100 | <arahael> | maerwald: I don't see any tickets against large body sizes. Incidentally, what's your go-to small webserver framework library? |
2021-11-26 00:06:26 +0100 | <hpc> | it depends on what "changing behavior of a function" means |
2021-11-26 00:06:28 +0100 | <arahael> | Since writing my own gemini server (just as a hypothetical test case, really), using Network-simple-tls, I'm suddenly inspired at how easy it is to write the. |
2021-11-26 00:06:32 +0100 | <maerwald> | I avoid web servers like a plague... the only time I write them is if someone throws a lot of money at me |
2021-11-26 00:06:37 +0100 | <hpc> | https://xkcd.com/1172/ |
2021-11-26 00:06:41 +0100 | <maerwald> | and then most of the time servant is already in use |
2021-11-26 00:06:42 +0100 | <monochrom> | "behaviour change" may count as bug fix or count as feature change. We normally say "point release" for bug fixes, even though there is a facetious logic saying that it "breaks" "backward" "compatibility". There is even an xkcd for that. |
2021-11-26 00:07:14 +0100 | <monochrom> | For feature changes, there are also backward compatible ones and incompatible ones. |
2021-11-26 00:07:23 +0100 | <maerwald> | monochrom: well, lets put it this way... if you change behavior of a function in *filepath*, would you rather have a point release or a major bump :p |
2021-11-26 00:07:39 +0100 | <hpc> | it depends |
2021-11-26 00:07:40 +0100 | <monochrom> | Yes hpc has got the xkcd in question :) |
2021-11-26 00:07:50 +0100 | <maerwald> | or do you not mind your haskell program deleting different files now |
2021-11-26 00:08:02 +0100 | <monochrom> | The only correct answer is "it depends". |
2021-11-26 00:08:23 +0100 | <hpc> | haha |
2021-11-26 00:08:30 +0100 | <hpc> | it's like scrollback is backwards today |
2021-11-26 00:09:14 +0100 | burnsidesLlama | (~burnsides@dhcp168-032.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-26 00:10:05 +0100 | Skyfire | (~pyon@user/pyon) |
2021-11-26 00:10:22 +0100 | Pickchea | (~private@user/pickchea) (Quit: Leaving) |
2021-11-26 00:10:27 +0100 | <monochrom> | You have to take specifications aka user expectations into account. |
2021-11-26 00:10:57 +0100 | <monochrom> | And you have to judge what's facetious and what's reasonable. |
2021-11-26 00:11:04 +0100 | <hololeap> | maerwald: wouldn't it be considered a breaking change if any input no longer produces the same output? |
2021-11-26 00:11:38 +0100 | <maerwald> | I think it depends whether you truly consider it a bug or simply behavioral change |
2021-11-26 00:11:42 +0100 | <hpc> | let's go full nihilist - any version bump is a breaking change because there might be a sha256 collision in its nix derivation :D |
2021-11-26 00:11:48 +0100 | <monochrom> | If your old version took 10 seconds, your new version takes 1 second, all else being equal. |
2021-11-26 00:12:28 +0100 | <monochrom> | Someone can facetiously say "this breaks my usage of your algorithm to time 10 seconds" but you should just give them the finger. This is not a breaking change. |
2021-11-26 00:13:58 +0100 | <monochrom> | At the meta level: When will programmers understand that technicalities are never the only considerations? |
2021-11-26 00:14:23 +0100 | <maerwald> | I'm thinking more: does major bump make people read changelogs? |
2021-11-26 00:14:37 +0100 | <maerwald> | I don't read changelogs for minor version bumps |
2021-11-26 00:14:42 +0100 | <hpc> | if that's your metric we don't need version numbers at all |
2021-11-26 00:14:47 +0100 | <maerwald> | :D |
2021-11-26 00:14:48 +0100 | <geekosaur> | does anything make people read changelogs? |
2021-11-26 00:14:53 +0100 | <dsal> | I don't read logs until my tests break. |
2021-11-26 00:15:09 +0100 | <monochrom> | Not me. "This is an exciting release!" makes me read changelogs. |
2021-11-26 00:15:25 +0100 | <dsal> | I skip docs and go straight to the excitement. |
2021-11-26 00:15:58 +0100 | <geekosaur> | "This is a release" makes me read changelogs, unless I've been following along with development (only a couple of packages, one non-Haskell) |
2021-11-26 00:16:11 +0100 | <hpc> | i wait for #haskell to talk about it |
2021-11-26 00:16:17 +0100 | <geekosaur> | but then, I'm weird. I also read docs. |
2021-11-26 00:16:19 +0100 | <hpc> | i didn't even know ghc 9 was out until a week ago |
2021-11-26 00:16:36 +0100 | <arahael> | How would I troubleshoot this issue when doing a 'cabal build --verbose'? dist-newstyle/src/amazonka-d53e9f8a972a20ec/amazonka: getDirectoryContents:openDirStream: does not exist (No such file or directory) |
2021-11-26 00:16:44 +0100 | <monochrom> | I read changelogs when I think I need to know. I don't read when I think I don't need to know. |
2021-11-26 00:16:48 +0100 | <dsal> | I would be so bored if I couldn't just roll everything forward and see what the day brings me. |
2021-11-26 00:17:04 +0100 | <dsal> | arahael: Ooh, did the compiler delete the file? |
2021-11-26 00:17:18 +0100 | <arahael> | dsal: How would I find out? :D |
2021-11-26 00:17:23 +0100 | <maerwald> | arahael: did you specify an incorrect subdir? |
2021-11-26 00:17:25 +0100 | <monochrom> | So, once again, you won't be able to find a correlation with any machine-checkable formal technicalities such as "version bump". |
2021-11-26 00:17:34 +0100 | <arahael> | maerwald: That's possible! Let me check... |
2021-11-26 00:17:41 +0100 | Skyfire | (~pyon@user/pyon) (Quit: brb) |
2021-11-26 00:17:50 +0100 | <maerwald> | it's lib/amazonka |
2021-11-26 00:18:06 +0100 | <jackdk> | that repo did get rearranged. amazonka is now under lib/amazonka, amazonka-core is now under lib/amazonka-core, generated service amazonka-foo is under lib/services/amazonka-foo |
2021-11-26 00:18:33 +0100 | <monochrom> | When are you going to learn that I make decisions based on like two dozen variables and most of them are fuzzy social constructs? |
2021-11-26 00:18:54 +0100 | <arahael> | jackdk: Ah, thanks. |
2021-11-26 00:18:56 +0100 | <Axman6> | jackdk's been on a "Get Amazonka 2.0 released" rampage for the last few months, and I am very thankful to him for it <3 |
2021-11-26 00:18:59 +0100 | <monochrom> | This is where even machine learning performs better than human learning. |
2021-11-26 00:19:10 +0100 | <Axman6> | What a top bloke |
2021-11-26 00:19:56 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 00:19:56 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 00:19:56 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 00:22:03 +0100 | <arahael> | jackdk: With cabal.project, can I specify 'subdir/*' to say, "use all these...", instead of specifying each individual package? |
2021-11-26 00:22:14 +0100 | <maerwald> | I hope not :D |
2021-11-26 00:22:33 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-11-26 00:22:34 +0100 | <jackdk> | Axman6: it's frustrating when I say "I think I fixed your bug, can you test?" and people are like "well, er... I don't have the system to test on any more" - this is "the cloud", just stand up your own storage bucket or VM for a few minutes please |
2021-11-26 00:22:42 +0100 | <maerwald> | file globbing is generally a plague in metadata |
2021-11-26 00:23:32 +0100 | <arahael> | I've now got: cabal: sdist of amazonka-core-2.0: filepath wildcard 'README.md' does not |
2021-11-26 00:23:41 +0100 | <jackdk> | arahael: I don't think so but if you're on cabal-install >= 3.2.0.0 you should be able to list multiple subdirs |
2021-11-26 00:23:51 +0100 | <jackdk> | even though the key is still `subdir: ` |
2021-11-26 00:23:56 +0100 | <arahael> | jackdk: Ah, neat! |
2021-11-26 00:23:57 +0100 | <jackdk> | https://github.com/haskell/cabal/blob/8d959d0b17751a235052c05c3ba7eae2b8bb6ddc/cabal-install/chang… |
2021-11-26 00:24:30 +0100 | <maerwald> | arahael: that looks like a bug in the repo |
2021-11-26 00:24:39 +0100 | <arahael> | maerwald: Mine or jackdk's? |
2021-11-26 00:24:53 +0100 | <maerwald> | https://github.com/brendanhay/amazonka/blob/bc2f5d28def1ecb1d569b265a7a415c28307fd71/lib/amazonka-… |
2021-11-26 00:25:17 +0100 | <dsal> | Is amazonka 2 coming out soon/ |
2021-11-26 00:25:27 +0100 | <dsal> | I updated some of my projects a bit back, but haven't been keeping up. |
2021-11-26 00:25:38 +0100 | <Axman6> | Itis if you help test it dsal |
2021-11-26 00:25:41 +0100 | <arahael> | maerwald: Ah, thanks. :D |
2021-11-26 00:25:49 +0100 | <dsal> | Axman6: I did! Filed a bug and everyting. |
2021-11-26 00:26:01 +0100 | <Axman6> | More test pls |
2021-11-26 00:26:10 +0100 | <dsal> | I only found the one bug. :) |
2021-11-26 00:26:17 +0100 | <jackdk> | I hope I fixed it |
2021-11-26 00:26:20 +0100 | <dsal> | I use S3 a lot, some lambda, SQS. |
2021-11-26 00:26:24 +0100 | <dsal> | Someone fixed it. |
2021-11-26 00:26:29 +0100 | <jackdk> | phew |
2021-11-26 00:26:30 +0100 | raehik1 | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) (Ping timeout: 260 seconds) |
2021-11-26 00:26:43 +0100 | <dsal> | At work I'm using SES, but that's not going to be updated any time soon. |
2021-11-26 00:26:50 +0100 | max22- | (~maxime@2a01cb088335980085c825298679dd8e.ipv6.abo.wanadoo.fr) (Quit: Leaving) |
2021-11-26 00:26:55 +0100 | <jackdk> | dsal: the last PR for the milestone is aeson-2.0 support, then Brendan needs to regenerate docs, then we tag release and announce RC and give people a chance to catch up and find breakage, then hackage. |
2021-11-26 00:27:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
2021-11-26 00:27:20 +0100 | <dsal> | Neeat. So I guess I should test against that. |
2021-11-26 00:27:49 +0100 | <jackdk> | He's been pretty responsive after I went through and triaged all the issues, but he's got some work stuff this week. |
2021-11-26 00:28:06 +0100 | <arahael> | jackdk: I have to get back to work (On Swift, not haskell. *sigh*. But it pays the bills). Hopefully I'll find more time over the weekend to play with this, even if that means cloning your repo, as it looks like I might be able to fix things myself a bit. |
2021-11-26 00:31:43 +0100 | burnsidesLlama | (~burnsides@dhcp168-032.wadham.ox.ac.uk) |
2021-11-26 00:31:45 +0100 | <jackdk> | arahael: https://github.com/brendanhay/amazonka/pull/714 |
2021-11-26 00:32:30 +0100 | <jackdk> | the aeson-2.0 branch is rebased atop latest `main`, so have another crack when you're off work |
2021-11-26 00:33:32 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:d837:dc58:2ea7:10e8) |
2021-11-26 00:33:57 +0100 | <arahael> | jackdk: Nice, it gets me past that issue, I'll have to look at this after work later as I have to fiddle with versions and all that crap with my project. :) |
2021-11-26 00:34:05 +0100 | <arahael> | Amazing work, I love IRC. :) |
2021-11-26 00:34:08 +0100 | <arahael> | (And amazonka) |
2021-11-26 00:35:38 +0100 | <Axman6> | If you ever meet jackdk, please buy him a beverage of his choice (i'll be doing this next time I'm in Brisbane... I should go to Brisbane). It's hard to state just how much work he's put into finally getting a release of Amazonka, lots of cat herding, lots of patching. I wish I had as much will |
2021-11-26 00:38:02 +0100 | <jackdk> | thankfully it was a solid project to try and save - Brendan's generator code has either hit all the corner cases already or was built with a tremendous amount of foresight |
2021-11-26 00:39:23 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-11-26 00:41:25 +0100 | pretty_dumm_guy | (trottel@gateway/vpn/protonvpn/prettydummguy/x-88029655) (Quit: WeeChat 3.3) |
2021-11-26 00:49:45 +0100 | zincy_ | (~zincy@host86-181-60-139.range86-181.btcentralplus.com) |
2021-11-26 00:54:53 +0100 | <arahael> | Woah - jack's aussie? |
2021-11-26 00:57:29 +0100 | sunarch | (uid526836@user/sunarch) |
2021-11-26 01:04:49 +0100 | <Axman6> | All the best Haskellers are |
2021-11-26 01:04:56 +0100 | sayola | (~vekto@dslb-002-201-085-156.002.201.pools.vodafone-ip.de) (Ping timeout: 245 seconds) |
2021-11-26 01:05:13 +0100 | <hpc> | can confirm, am not an aussie :P |
2021-11-26 01:08:44 +0100 | <Axman6> | (Or British, obviously) |
2021-11-26 01:10:17 +0100 | <hpc> | reverse aussie |
2021-11-26 01:11:40 +0100 | <Axman6> | Where the ciminals come from |
2021-11-26 01:14:22 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2021-11-26 01:25:13 +0100 | sayola | (~vekto@dslb-092-072-095-186.092.072.pools.vodafone-ip.de) |
2021-11-26 01:30:25 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 01:30:25 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 01:30:25 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 01:30:30 +0100 | sm2n | (~sm2n@user/sm2n) (Ping timeout: 265 seconds) |
2021-11-26 01:30:47 +0100 | sm2n | (~sm2n@user/sm2n) |
2021-11-26 01:30:48 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:a418:17da:6b4f:5fc3) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-26 01:34:02 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Read error: Connection reset by peer) |
2021-11-26 01:35:20 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 256 seconds) |
2021-11-26 01:35:22 +0100 | <monochrom> | dons is probably from Australia too. Certainly went to a university there. |
2021-11-26 01:35:34 +0100 | <Axman6> | yeah I believe so |
2021-11-26 01:35:42 +0100 | zincy_ | (~zincy@host86-181-60-139.range86-181.btcentralplus.com) (Remote host closed the connection) |
2021-11-26 01:35:53 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 01:36:21 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2021-11-26 01:37:45 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:d837:dc58:2ea7:10e8) (Remote host closed the connection) |
2021-11-26 01:37:59 +0100 | Skyfire | (~pyon@user/pyon) |
2021-11-26 01:39:19 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:d837:dc58:2ea7:10e8) |
2021-11-26 01:44:24 +0100 | mreh | (~matthew@host81-157-195-163.range81-157.btcentralplus.com) (Quit: Lost terminal) |
2021-11-26 01:44:53 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:4d2d:d973:9795:262a) |
2021-11-26 01:46:43 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
2021-11-26 01:46:43 +0100 | mmhat | (~mmh@55d42d28.access.ecotel.net) (Read error: Connection reset by peer) |
2021-11-26 01:47:58 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 01:48:06 +0100 | acidjnk_new | (~acidjnk@p200300d0c7271e128015eb8f81d9ba9d.dip0.t-ipconnect.de) (Ping timeout: 260 seconds) |
2021-11-26 01:49:03 +0100 | <arahael> | nice. so i have a chance... eventually... |
2021-11-26 01:49:10 +0100 | <arahael> | slim chance. |
2021-11-26 01:49:55 +0100 | <jackdk> | the aussie haskell meetups have been a bit quiet of late, but there's still some chatter on fp-syd |
2021-11-26 01:52:41 +0100 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) (Remote host closed the connection) |
2021-11-26 01:55:34 +0100 | zava | (~zava@ip5f5bdf0f.dynamic.kabel-deutschland.de) (Quit: WeeChat 3.3) |
2021-11-26 01:57:45 +0100 | <arahael> | is that on slack? |
2021-11-26 01:58:24 +0100 | <arahael> | unfortunately i find meetups in person difficult. |
2021-11-26 01:58:57 +0100 | mvk | (~mvk@2607:fea8:5cc1:fa00::4702) |
2021-11-26 01:59:06 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2021-11-26 02:00:15 +0100 | <EvanR> | yeah accessing meetups in australia is challenging, it's an island after all |
2021-11-26 02:01:03 +0100 | <arahael> | i live on that island. the island is the size of the USA, though. |
2021-11-26 02:01:31 +0100 | <dsal> | I've been there once. I saw a wallaby |
2021-11-26 02:01:47 +0100 | <arahael> | but my challenge is that organising interpreters basically cost anywhere betweem $120 to $240 an hour... unless i rely on voice to text apps which are also exhausting. |
2021-11-26 02:02:16 +0100 | <monochrom> | Ugh it's large enough to be called a continent! |
2021-11-26 02:02:38 +0100 | <arahael> | it is a continent! |
2021-11-26 02:02:44 +0100 | <arahael> | it's an island continent. |
2021-11-26 02:02:53 +0100 | <EvanR> | you could also say it's the size of pluto... but not sure if that is helping or hurting |
2021-11-26 02:02:59 +0100 | <monochrom> | Ugh tautologically every continent is an island continent... |
2021-11-26 02:03:29 +0100 | <monochrom> | OK nevermind. |
2021-11-26 02:03:45 +0100 | <arahael> | :P |
2021-11-26 02:04:53 +0100 | <EvanR> | this island earth |
2021-11-26 02:05:29 +0100 | <dsal> | Wadler's Law question: What's the difference between syntax and lexical syntax? |
2021-11-26 02:05:42 +0100 | <hpc> | how frequently it's discussed |
2021-11-26 02:06:04 +0100 | ystael | (~ystael@user/ystael) (Quit: Lost terminal) |
2021-11-26 02:06:04 +0100 | <dsal> | haha |
2021-11-26 02:06:04 +0100 | <EvanR> | in the old days people distinguished lexers and parsers |
2021-11-26 02:06:15 +0100 | <EvanR> | in the dark times before monads |
2021-11-26 02:06:22 +0100 | <monochrom> | I feel that that question will cause expoentially more arguments than just arguing over a particular language's syntax... >:) |
2021-11-26 02:06:23 +0100 | <hpc> | a lexer splits a string into a stream of tokens |
2021-11-26 02:06:35 +0100 | <hpc> | a parser turns a stream of tokens into an AST |
2021-11-26 02:06:45 +0100 | jmorris | (uid433911@id-433911.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 02:07:00 +0100 | <monochrom> | We still separate Alex from Happy. |
2021-11-26 02:07:02 +0100 | <dsal> | I just don't quite understand what this was referring to in the 90s. |
2021-11-26 02:07:08 +0100 | <dsal> | Why can't Alex be Happy? |
2021-11-26 02:07:28 +0100 | <EvanR> | lexers allowed the use of regex |
2021-11-26 02:07:32 +0100 | <EvanR> | so it was cool |
2021-11-26 02:07:39 +0100 | <dsal> | Oh *that* syntax? |
2021-11-26 02:07:44 +0100 | <monochrom> | Alex thought that conquering Persia would make him happy. |
2021-11-26 02:07:51 +0100 | <dsal> | I used lex back in the day, but never yacc. |
2021-11-26 02:08:48 +0100 | <hpc> | you didn't have parser combinators, and nobody wanted to implement a parsing system that could do tokenization in a nice composable way |
2021-11-26 02:09:02 +0100 | <hpc> | so instead they applied the universal solution to difficult parsing problems - add another pass |
2021-11-26 02:09:03 +0100 | <EvanR> | i blame regex for why anyone who works in a boring coding job hates coding |
2021-11-26 02:09:22 +0100 | <dsal> | I avoid regex pretty hard. |
2021-11-26 02:09:27 +0100 | <dsal> | Possibly too hard, but I doubt it. |
2021-11-26 02:09:52 +0100 | <hpc> | regexes have an undesereved reputation of being difficult |
2021-11-26 02:10:12 +0100 | <hpc> | people can't handle backslashes apparently |
2021-11-26 02:10:13 +0100 | <geekosaur> | well, in the really old days, it was so lexing and parsing could fit in the same process address space |
2021-11-26 02:10:22 +0100 | <hpc> | (like lisp with parens :P) |
2021-11-26 02:10:30 +0100 | <geekosaur> | but this didn't apply to haskell; by then it was just habit |
2021-11-26 02:10:36 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-11-26 02:11:17 +0100 | machinedgod | (~machinedg@24.105.81.50) (Ping timeout: 250 seconds) |
2021-11-26 02:11:19 +0100 | <hpc> | from the perspective of computational complexity, regexes are extremely simple even |
2021-11-26 02:11:36 +0100 | <hpc> | regexes are just a particular way of representing a finite state machine |
2021-11-26 02:11:43 +0100 | <geekosaur> | also, as I read this, lexical syntax meant bird tracks |
2021-11-26 02:11:44 +0100 | <EvanR> | great example of how humans and computers differ |
2021-11-26 02:12:15 +0100 | <monochrom> | I like having a tokenization stage that eliminates the difference between "f (x)" and "f(x)". |
2021-11-26 02:12:41 +0100 | <EvanR> | how does that work |
2021-11-26 02:12:47 +0100 | <dsal> | The naming argument is dumb, but the forest-for-trees part I hope got through a bit is that they're so focused on naming "things" that they completely avoid naming patterns and algorithms. Let's have big walls of code marching off to the right in case statements but start a fight if I point out that all of that is just doing "doThisOrFailTheTest", so why don't we just name that *idea* and move on. |
2021-11-26 02:12:49 +0100 | <jackdk> | arahael: there is a slack. I don't know if their meetups are in-person or online, they've had to do both at different stages for pandemic-related reasons |
2021-11-26 02:12:56 +0100 | <EvanR> | without totally parsing everything in the process |
2021-11-26 02:13:14 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:4d2d:d973:9795:262a) (Quit: Textual IRC Client: www.textualapp.com) |
2021-11-26 02:13:24 +0100 | <hpc> | EvanR: both can lex to ["f", "(", "x", ")"] |
2021-11-26 02:13:36 +0100 | <monochrom> | Not sure what you mean by "totally parsing". |
2021-11-26 02:13:44 +0100 | <EvanR> | only if space is always irrelevant? |
2021-11-26 02:13:49 +0100 | <hpc> | you don't need to balance parens or anything like that |
2021-11-26 02:14:04 +0100 | <EvanR> | space doesn't matter in some parts of haskell but does in others |
2021-11-26 02:14:04 +0100 | <hpc> | it would just as easily lex "f )x(" |
2021-11-26 02:14:18 +0100 | <monochrom> | Tokenization has to go through all of the input, yes. But only streamingly. |
2021-11-26 02:14:25 +0100 | <dsal> | I like the look of `f )x(` |
2021-11-26 02:14:32 +0100 | <monochrom> | Tokenization does not have to be smart, no. |
2021-11-26 02:14:33 +0100 | <hpc> | EvanR: yeah, you'd write a specific lexer for what you need |
2021-11-26 02:14:34 +0100 | <dsal> | Looks neat in my font. Gonna build a parser. |
2021-11-26 02:14:40 +0100 | <hpc> | like you write a specific parser :P |
2021-11-26 02:14:53 +0100 | <hpc> | dsal: just swap the glyphs |
2021-11-26 02:15:11 +0100 | <dsal> | Oh yeah. Do it in the font. That's lazy thinking. |
2021-11-26 02:15:12 +0100 | <hpc> | make a font instead |
2021-11-26 02:15:21 +0100 | alx741 | (~alx741@186.178.108.193) (Ping timeout: 245 seconds) |
2021-11-26 02:15:39 +0100 | <monochrom> | It just has to recognize token boundaries and classify tokens and report that the token stream is: identifier f, open paren, identifier x, close paren. |
2021-11-26 02:15:42 +0100 | <dsal> | Why even create a language if it doesn't need its own font? |
2021-11-26 02:16:10 +0100 | <dsal> | Are there modern lexers that can care about unicode classes? |
2021-11-26 02:16:12 +0100 | <hpc> | it doesn't even have to say f is an identifier |
2021-11-26 02:16:14 +0100 | <geekosaur> | go back to agda? :þ |
2021-11-26 02:16:22 +0100 | <hpc> | it just needs to know it's a lettery word of some sort |
2021-11-26 02:16:27 +0100 | <EvanR> | agda does not like this idea lol |
2021-11-26 02:16:28 +0100 | <hpc> | maybe it's a keyword |
2021-11-26 02:16:33 +0100 | <monochrom> | Your CFG grammar then does not have to say "whitespace*" 200 times. |
2021-11-26 02:16:36 +0100 | <hpc> | maybe it's not a keyword in this particular context :D |
2021-11-26 02:16:42 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-11-26 02:16:46 +0100 | <monochrom> | Unlike, for example, the XML grammar. |
2021-11-26 02:16:51 +0100 | <dsal> | Collection of different types of whitespaces. |
2021-11-26 02:17:34 +0100 | <EvanR> | now I'm not sure where whitespace matters or not... "a-b" "f -x"... |
2021-11-26 02:17:46 +0100 | <monochrom> | For better or worse, due to self-perpetuating education or otherwise, it's also intuitive. |
2021-11-26 02:17:47 +0100 | <hpc> | EvanR: depends on the language |
2021-11-26 02:18:01 +0100 | <dsal> | a-b is just another symbol in some languages. |
2021-11-26 02:18:45 +0100 | <dsal> | And then agda's special _ thing. |
2021-11-26 02:18:57 +0100 | <dsal> | One thing I've learned is that everything I know is wrong. |
2021-11-26 02:18:57 +0100 | <EvanR> | wut |
2021-11-26 02:19:03 +0100 | <hpc> | agda's operator parsing is neat, but very simple lexing-wise |
2021-11-26 02:19:14 +0100 | <monochrom> | Because when teaching a student the syntax of Haskell for example, I just have to say "an expression can be identifier, +, identifier". I don't have to say where there can be optional spaces. And the students alreeady knows. |
2021-11-26 02:19:20 +0100 | <hpc> | infix operators always have whitespace between them |
2021-11-26 02:20:23 +0100 | <EvanR> | 2 ^ x |
2021-11-26 02:21:05 +0100 | <dsal> | I was going to ask how much pain it'd be to get Haskell using λ for lambda because surely nobody uses that as a variable, then I realize I do that. |
2021-11-26 02:21:32 +0100 | <geekosaur> | didn't we already find a math-operator lambda instead of the Greek lowercase letter? |
2021-11-26 02:21:34 +0100 | <EvanR> | why not use a different color for variables |
2021-11-26 02:22:01 +0100 | <dsal> | I was briefly surprised that there's more than one λ |
2021-11-26 02:22:03 +0100 | <monochrom> | hpc: It is customary and nice for most languages for the tokenizer to right away classify identifiers vs reserved words. |
2021-11-26 02:22:34 +0100 | <monochrom> | However, you would be right about PL/I, in which "if if==0 then then=1 else else=if" can make sense. |
2021-11-26 02:22:35 +0100 | <dsal> | That's what I need. `λ λ -> λ` but with a different λ for the first λ obviously. |
2021-11-26 02:23:21 +0100 | <EvanR> | blue for types, red for values, or something |
2021-11-26 02:23:27 +0100 | <monochrom> | which is a snark way to say: ugh, please don't do that, please classify identifiers vs reserved words ASAP. |
2021-11-26 02:23:35 +0100 | <hpc> | > let as = [1..] in as |
2021-11-26 02:23:36 +0100 | <lambdabot> | [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,... |
2021-11-26 02:23:42 +0100 | <hpc> | i was thinking of haskell specifically |
2021-11-26 02:23:47 +0100 | <hpc> | "as" is a keyword |
2021-11-26 02:23:48 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 02:23:56 +0100 | <monochrom> | No. |
2021-11-26 02:24:18 +0100 | <hpc> | yes? it's part of import syntax |
2021-11-26 02:24:29 +0100 | <monochrom> | And yet unreserved. |
2021-11-26 02:24:38 +0100 | <hpc> | i didn't say reserved :P |
2021-11-26 02:24:54 +0100 | <EvanR> | import qualified As (as) as As |
2021-11-26 02:25:11 +0100 | <monochrom> | Damn you. |
2021-11-26 02:25:30 +0100 | <dsal> | Where does "as" go in that import? |
2021-11-26 02:25:30 +0100 | <hpc> | unless you want to explain in your parser that yes, import syntax uses a specific identifier in the middle of it for magical purposes |
2021-11-26 02:25:41 +0100 | <hpc> | EvanR: <3 |
2021-11-26 02:26:08 +0100 | <hpc> | you're missing something though |
2021-11-26 02:26:37 +0100 | <hpc> | this needs data As, with constructor As |
2021-11-26 02:26:49 +0100 | <dsal> | import qualified "as" As (As(as)) as As |
2021-11-26 02:26:56 +0100 | <arahael> | jackdk: yeah. aussies seem to prefer in person or video meetings. both which i find less accessible. |
2021-11-26 02:27:04 +0100 | <EvanR> | well capital As is a bit weak |
2021-11-26 02:27:19 +0100 | <monochrom> | Oh hey "hiding" is unreserved too, let's do it! |
2021-11-26 02:27:21 +0100 | <dsal> | It's not bad (at being bad) if you read it aloud. |
2021-11-26 02:28:04 +0100 | <dsal> | import qualified "qualified" Qualified (As(qualified)) as Qualified |
2021-11-26 02:28:19 +0100 | <EvanR> | > let qualified = hiding; hiding = qualified; as = as in [] |
2021-11-26 02:28:20 +0100 | <lambdabot> | [] |
2021-11-26 02:28:45 +0100 | <EvanR> | > let import = qualified in [] |
2021-11-26 02:28:46 +0100 | <lambdabot> | <hint>:1:5: error: parse error on input ‘import’ |
2021-11-26 02:28:49 +0100 | <EvanR> | oooo |
2021-11-26 02:28:54 +0100 | <hpc> | that's a shame |
2021-11-26 02:29:08 +0100 | <hpc> | i really wanted "from future import __something__" to be a valid haskell expression |
2021-11-26 02:29:11 +0100 | <monochrom> | I guess you all prefer PI/I haha |
2021-11-26 02:29:19 +0100 | <geekosaur> | import pretty much has to be a reserved word for the rest to not be |
2021-11-26 02:29:46 +0100 | <hpc> | geekosaur: nope, you can say top-level expressions aren't allowed, and nested imports aren't allowed |
2021-11-26 02:29:58 +0100 | <hpc> | and in import syntax, '=' only occurs inside parens |
2021-11-26 02:30:02 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 02:30:05 +0100 | <hpc> | totally unambiguous! |
2021-11-26 02:30:12 +0100 | <hpc> | nothing could be simpler! |
2021-11-26 02:30:16 +0100 | <monochrom> | Yeah if there is no "=" then it's an import clause. If there is "=" then it's a definition clause. |
2021-11-26 02:30:41 +0100 | <EvanR> | the poor implementors of the language |
2021-11-26 02:31:16 +0100 | <EvanR> | when will AI be able to do that job |
2021-11-26 02:31:23 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2021-11-26 02:31:44 +0100 | <monochrom> | The additional benefit is that now Alex and Happy cannot help you parse Haskell, so you really have to use a monad parser combinator library. |
2021-11-26 02:32:55 +0100 | <janus> | my dad just threw away his PL/I book :( |
2021-11-26 02:35:47 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) (Ping timeout: 250 seconds) |
2021-11-26 02:37:34 +0100 | smaris | (~smaris@cpe-75-82-50-132.socal.res.rr.com) |
2021-11-26 02:40:09 +0100 | Cajun | (~Cajun@user/cajun) |
2021-11-26 02:42:46 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 02:42:46 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 02:42:46 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 02:45:22 +0100 | dolio | (~dolio@130.44.130.54) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-26 02:48:31 +0100 | dolio | (~dolio@130.44.130.54) |
2021-11-26 02:52:51 +0100 | smaris | (~smaris@cpe-75-82-50-132.socal.res.rr.com) (Ping timeout: 245 seconds) |
2021-11-26 02:54:27 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
2021-11-26 02:58:04 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-11-26 02:58:49 +0100 | alx741 | (~alx741@186.178.109.84) |
2021-11-26 03:07:39 +0100 | JimL | (~quassel@89-162-2-132.fiber.signal.no) (Ping timeout: 260 seconds) |
2021-11-26 03:18:14 +0100 | alx741 | (~alx741@186.178.109.84) (Ping timeout: 260 seconds) |
2021-11-26 03:22:52 +0100 | epolanski | (uid312403@id-312403.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 03:23:32 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
2021-11-26 03:25:02 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 03:25:46 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:8d6b:77ca:adc:64ea) |
2021-11-26 03:26:18 +0100 | <remexre> | where does resource management live in fused-effects these days? sounds like they were moving it to -exceptions, but I don't see it there |
2021-11-26 03:31:03 +0100 | alx741 | (~alx741@186.178.109.84) |
2021-11-26 03:38:32 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) (Ping timeout: 240 seconds) |
2021-11-26 03:38:57 +0100 | xff0x | (~xff0x@2001:1a81:5377:a800:3eaf:ed99:f02b:b5f2) (Ping timeout: 268 seconds) |
2021-11-26 03:40:15 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:6878:c21:1339:de41) |
2021-11-26 03:41:01 +0100 | burnsidesLlama | (~burnsides@dhcp168-032.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-26 03:41:32 +0100 | burnsidesLlama | (~burnsides@dhcp168-032.wadham.ox.ac.uk) |
2021-11-26 03:42:03 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
2021-11-26 03:43:04 +0100 | smaris | (~smaris@cpe-75-82-50-132.socal.res.rr.com) |
2021-11-26 03:43:23 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 03:45:46 +0100 | burnsidesLlama | (~burnsides@dhcp168-032.wadham.ox.ac.uk) (Ping timeout: 245 seconds) |
2021-11-26 03:46:42 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) |
2021-11-26 03:49:28 +0100 | zebrag | (~chris@user/zebrag) (Quit: Konversation terminated!) |
2021-11-26 03:52:14 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-26 04:00:26 +0100 | EvanR | (~evan@user/evanr) (Quit: Leaving) |
2021-11-26 04:01:35 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 04:01:36 +0100 | benin | (~benin@183.82.179.164) (Ping timeout: 245 seconds) |
2021-11-26 04:02:02 +0100 | benin | (~benin@183.82.179.164) |
2021-11-26 04:02:51 +0100 | ubert | (~Thunderbi@p200300ecdf0ba227e6b318fffe838f33.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2021-11-26 04:03:09 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 04:07:01 +0100 | zaquest | (~notzaques@5.130.79.72) (Remote host closed the connection) |
2021-11-26 04:08:14 +0100 | zaquest | (~notzaques@5.130.79.72) |
2021-11-26 04:09:11 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) (Quit: Leaving) |
2021-11-26 04:14:15 +0100 | ec | (~ec@gateway/tor-sasl/ec) (Ping timeout: 276 seconds) |
2021-11-26 04:19:14 +0100 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) |
2021-11-26 04:20:59 +0100 | myShoggoth | (~myShoggot@97-120-85-195.ptld.qwest.net) (Client Quit) |
2021-11-26 04:24:12 +0100 | td_ | (~td@94.134.91.22) (Ping timeout: 256 seconds) |
2021-11-26 04:26:09 +0100 | td_ | (~td@94.134.91.33) |
2021-11-26 04:33:49 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) |
2021-11-26 04:34:56 +0100 | mbuf | (~Shakthi@171.61.241.63) |
2021-11-26 04:38:49 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 04:48:34 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-11-26 04:54:03 +0100 | renzhi | (~xp@2607:fa49:6500:b100::5cef) (Ping timeout: 260 seconds) |
2021-11-26 04:54:05 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 04:54:05 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 04:54:05 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 04:54:45 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 04:59:07 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-11-26 05:03:50 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 05:07:33 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:8d6b:77ca:adc:64ea) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 05:08:12 +0100 | hatchet | (~hatchet@2601:448:4280:330:c0d:94db:7b6:5658) |
2021-11-26 05:09:16 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:8d6b:77ca:adc:64ea) |
2021-11-26 05:12:22 +0100 | <hatchet> | Hello everyone. I'm new to Haskell, trying to teach myself by implementing ERC20. Is there some sort of idiom for code that looks like this |
2021-11-26 05:12:23 +0100 | <hatchet> | ```haskell |
2021-11-26 05:12:23 +0100 | <hatchet> | do |
2021-11-26 05:12:24 +0100 | <hatchet> | state <- exec (mint alice 5) context state |
2021-11-26 05:12:24 +0100 | <hatchet> | state <- exec (mint bob 10) context state |
2021-11-26 05:12:25 +0100 | <hatchet> | state <- exec (balanceOf alice) context state |
2021-11-26 05:12:25 +0100 | <hatchet> | state <- exec (balanceOf bob) context state |
2021-11-26 05:12:26 +0100 | <hatchet> | return () |
2021-11-26 05:12:26 +0100 | <hatchet> | ``` |
2021-11-26 05:12:32 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 05:13:22 +0100 | <hatchet> | Ignore the code fences, I was hoping markdown syntax worked :( |
2021-11-26 05:13:32 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-11-26 05:14:30 +0100 | <dsal> | It works for me. |
2021-11-26 05:15:06 +0100 | <hatchet> | Oh, well I'm using a web irc client. I obviously don't use IRC much |
2021-11-26 05:15:15 +0100 | <dsal> | What is `exec`? You wouldn't restart the state every time. |
2021-11-26 05:16:05 +0100 | <hatchet> | It's a function that takes a partial function, a context, and a state, returns `IO State` |
2021-11-26 05:16:15 +0100 | <hatchet> | `exec :: Show a => (EnvironmentInput -> ExecutionResult a) -> Context -> State -> IO State` |
2021-11-26 05:16:20 +0100 | <dsal> | I suspect it's not a partial function. |
2021-11-26 05:16:25 +0100 | smaris | (~smaris@cpe-75-82-50-132.socal.res.rr.com) (Quit: WeeChat 3.3) |
2021-11-26 05:16:50 +0100 | <hatchet> | I wrote exec, idk, maybe I made some mistaek |
2021-11-26 05:16:52 +0100 | <hatchet> | mistake |
2021-11-26 05:17:11 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
2021-11-26 05:17:26 +0100 | <dsal> | I'd want to write something like `something $ do { mint alice 5; mint bob 10; balanceOf alice, balanceOf bob }` |
2021-11-26 05:17:36 +0100 | <hatchet> | https://gist.github.com/encody/0c8f57b69186c7edb00788c9a8c7b63b |
2021-11-26 05:18:32 +0100 | <hatchet> | relevant section at the bottom |
2021-11-26 05:20:07 +0100 | <dsal> | There's a lot going on here. |
2021-11-26 05:20:15 +0100 | <hatchet> | Yeah, my first intuition was to create a list of partial functions and execute those using a fold of some sort, since they all have very similar signatures, but since they can return slightly different things the compiler got mad at me and wouldn't let me |
2021-11-26 05:20:33 +0100 | <dsal> | The most direct translation would be `exec (mint alice 5) context state >>= exec (mint bob 10) context >>= exec (balanceOf alice) context >>= exec (balanceOf bob) context` |
2021-11-26 05:20:56 +0100 | <hatchet> | I'd never written any haskell 24 hours ago lol |
2021-11-26 05:20:58 +0100 | <dsal> | I don't think partial function means what you think partial function means. |
2021-11-26 05:21:05 +0100 | <hatchet> | darn it |
2021-11-26 05:21:09 +0100 | <dsal> | OK, then yeah, this isn't at all how any of this should be written. heh |
2021-11-26 05:21:49 +0100 | <hatchet> | Partially executed function? Like where it takes 2 arguments but you only give it one and save it for later |
2021-11-26 05:21:57 +0100 | <dsal> | partially applied function. |
2021-11-26 05:22:05 +0100 | <hatchet> | yeah that |
2021-11-26 05:22:08 +0100 | <dsal> | A partial function is a function that is undefined for some inputs. |
2021-11-26 05:22:17 +0100 | <dsal> | > 3 `div` 0 |
2021-11-26 05:22:18 +0100 | <lambdabot> | *Exception: divide by zero |
2021-11-26 05:22:26 +0100 | <dsal> | > head [] |
2021-11-26 05:22:27 +0100 | <lambdabot> | *Exception: Prelude.head: empty list |
2021-11-26 05:22:33 +0100 | <hatchet> | Sorry my terminology is gonna be fudgy |
2021-11-26 05:22:36 +0100 | <dsal> | Partial functions are bad. |
2021-11-26 05:23:26 +0100 | <hatchet> | Anyways, I was thinking that the `>>=` operator would be useful here, just couldn't quite figure it out |
2021-11-26 05:23:44 +0100 | <dsal> | You might try stylish-haskell to clean things up a bit. This code's a bit hard to follow for a couple reasons. But one of them is it's not clear what you're trying to do. |
2021-11-26 05:23:53 +0100 | <dsal> | I think you're trying to create State monad, but that's generally not a day one thing. |
2021-11-26 05:24:26 +0100 | <dsal> | Oh, gist had rendered this poorly. heh |
2021-11-26 05:24:48 +0100 | <dsal> | It's a weird style, but it was showing up in my browser with like, no indentation. |
2021-11-26 05:25:17 +0100 | <hatchet> | oh weird. I'm writing in VS Code and I just installed the Haskell extension pack which apparently came with a formatter. Just using that |
2021-11-26 05:25:55 +0100 | <hatchet> | I'm trying to rewrite this in haskell: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol |
2021-11-26 05:26:37 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) (Quit: Free ZNC ~ Powered by LunarBNC: https://LunarBNC.net) |
2021-11-26 05:26:39 +0100 | <hatchet> | So far the only things that actually work are the balanceOf and transfer functions |
2021-11-26 05:26:58 +0100 | aplainzetakind | (~johndoe@captainludd.powered.by.lunarbnc.net) |
2021-11-26 05:27:01 +0100 | <dsal> | The formatter looks like ormolu or something. Not my favorite. I don't know why people like having one word per line. |
2021-11-26 05:27:44 +0100 | <hatchet> | Can't say I have much of an opinion on style yet. The only functional programming language I've used before is Ocaml, and that was only in undergrad |
2021-11-26 05:29:21 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-26 05:29:43 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 05:30:48 +0100 | <dsal> | Well. Starting from the middle won't be a super efficient strategy, but you might look into the State monad. It looks like you're approximately aiming for that. |
2021-11-26 05:32:31 +0100 | <dsal> | It looks like this: |
2021-11-26 05:32:31 +0100 | <dsal> | > flip evalState 3 $ do { modify (* 11) ; get } |
2021-11-26 05:32:33 +0100 | <lambdabot> | 33 |
2021-11-26 05:32:44 +0100 | EvanR | (~evan@user/evanr) |
2021-11-26 05:33:21 +0100 | <Axman6> | hatchet: is feels very much like you want the StateT monad transformer (and probably ReaderT, so might as well go with a full RWST Context () State IO) |
2021-11-26 05:33:26 +0100 | <dsal> | > flip evalState 3 $ do { original <- get; modify (* 11) ; modify (+ 100); final <- get; pure (original, final) } |
2021-11-26 05:33:27 +0100 | <lambdabot> | (3,133) |
2021-11-26 05:34:15 +0100 | <dsal> | Seems like starting day one with StateT is… inefficient. heh |
2021-11-26 05:34:19 +0100 | <Axman6> | if you ever find yourself passing around some sort of state to update, particularly monadically, then StateT is probably going to lead to much cleaner code, and means you can't accidentally makes a new state and then forget to use it and end up using an old state |
2021-11-26 05:34:26 +0100 | <Axman6> | v.hard to debug |
2021-11-26 05:34:41 +0100 | <Axman6> | @hoogle StateT |
2021-11-26 05:34:41 +0100 | <lambdabot> | Control.Monad.Trans.State.Lazy newtype StateT s m a |
2021-11-26 05:34:41 +0100 | <lambdabot> | Control.Monad.Trans.State.Lazy StateT :: (s -> m (a, s)) -> StateT s m a |
2021-11-26 05:34:41 +0100 | <lambdabot> | Control.Monad.Trans.State.Strict newtype StateT s m a |
2021-11-26 05:35:33 +0100 | <hatchet> | Okay, this sounds like great stuff to read up on. Thus far the documentation has been... unforgiving? to someone who isn't comfortable with the syntax yet. Any pointers for slightly more friendly intros to these things? |
2021-11-26 05:35:34 +0100 | <dsal> | We can go full weird. |
2021-11-26 05:35:35 +0100 | <dsal> | > flip execState (2,4) $ do { _1 += 11; _2 *= 6 } |
2021-11-26 05:35:36 +0100 | <lambdabot> | (13,24) |
2021-11-26 05:35:55 +0100 | <dsal> | hatchet: It's really easy if you learn in a more constructive order. |
2021-11-26 05:36:03 +0100 | <dsal> | The documentation is pretty good once you have a foundation. |
2021-11-26 05:36:49 +0100 | <dsal> | But if you start learning music by grabbing some orchestral sheet music on day one, you're gonna be a bit lost. |
2021-11-26 05:37:24 +0100 | <hatchet> | Ok, cool. I read a bunch of this http://learnyouahaskell.com/ and watched most of these videos https://www.youtube.com/channel/UC3xdLFFsqG701QAyGJIPT1g/videos |
2021-11-26 05:38:03 +0100 | <dsal> | Neat, I've never seen that video set. |
2021-11-26 05:38:03 +0100 | <hatchet> | For now I think I want to focus more on basic syntax tho (like figuring out exactly when and how to use `>>=` like above) |
2021-11-26 05:38:20 +0100 | <EvanR> | call me nuts but I still think this is a good crash course https://www.haskell.org/tutorial/ |
2021-11-26 05:38:23 +0100 | <dsal> | Yeah, that's why starting from the beginning makes things a bit easier. |
2021-11-26 05:38:35 +0100 | <EvanR> | i.e. A gentle introduction |
2021-11-26 05:41:07 +0100 | <hatchet> | the gentle introduction has come up a bunch in my ddg searches |
2021-11-26 05:41:29 +0100 | <dsal> | hatchet: Well, I would definitely not write that. It seems pretty weird. I think that's just StateT that you want there. |
2021-11-26 05:42:02 +0100 | <dsal> | I still like haskellbook.com -- but I read intro stuff all the time and always learn something new. |
2021-11-26 05:44:18 +0100 | <hatchet> | Thanks for all the recommendations! |
2021-11-26 05:46:25 +0100 | <dsal> | It's nice because it starts with nothing and then you build all the stuff you need to use. Some people think it's too slow. I keep seeing people try to go faster and getting really frustrated because they want to start on step 19. |
2021-11-26 05:47:10 +0100 | <jackdk> | I literally ground through the haskell book beginning-to-end and found that worked very well for me. |
2021-11-26 05:47:48 +0100 | <hatchet> | I did a similar thing when I learned Rust, just read through the entire book in like 3 days |
2021-11-26 05:47:49 +0100 | RobotMicrowave | (~user@2804:d41:c2b2:be00:2926:cba1:14b8:da8b) |
2021-11-26 05:48:03 +0100 | <hatchet> | I'll give it a shot! |
2021-11-26 05:48:16 +0100 | <EvanR> | reading is cool but |
2021-11-26 05:48:19 +0100 | <dsal> | jackdk: Yeah, especially as a quite experienced programmer, I found it helped sort of flush the unhelpful baggage. |
2021-11-26 05:48:27 +0100 | jlamothe | (~jlamothe@198.251.61.229) (Ping timeout: 268 seconds) |
2021-11-26 05:48:32 +0100 | <EvanR> | pales in comparison to how much writing you will need to do xD |
2021-11-26 05:48:46 +0100 | <dsal> | Ha. Yeah. The Book basically has you invent everything along the way. |
2021-11-26 05:49:01 +0100 | <RobotMicrowave> | what book? |
2021-11-26 05:49:01 +0100 | <jackdk> | It then took me a while to learn how to actually structure an application... I was fortunate enough to join a project with an established codebase and learn off that |
2021-11-26 05:49:02 +0100 | <EvanR> | kind of like, you want to speak a language, but you just read about it a lot xD |
2021-11-26 05:49:06 +0100 | <dsal> | RobotMicrowave: haskellbook.com |
2021-11-26 05:49:15 +0100 | <RobotMicrowave> | oh no |
2021-11-26 05:50:08 +0100 | <RobotMicrowave> | this book big |
2021-11-26 05:50:14 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 05:50:31 +0100 | <RobotMicrowave> | and pricy, 60 dollars is just too much for me :( |
2021-11-26 05:50:34 +0100 | <dsal> | jackdk: I was mostly just building my own apps. But you see the blub bubble rise. Like, start out passing everything around and thinking these dumb ReaderT things are overkill. Then one day you get it. |
2021-11-26 05:50:54 +0100 | <EvanR> | ReaderT is a good one |
2021-11-26 05:50:55 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 05:51:04 +0100 | <jackdk> | that feeling of "ok, so that's why THEY invented THAT" is very satisfying |
2021-11-26 05:51:06 +0100 | <dsal> | RobotMicrowave: There are other resources. I just found that one to be quite good and was completely worth it to me. |
2021-11-26 05:51:20 +0100 | <dsal> | jackdk: I love doing that several months later. heh |
2021-11-26 05:51:41 +0100 | <jackdk> | I had a similar moment when I finally understood that lens operators were not chosen at random |
2021-11-26 05:51:43 +0100 | <dsal> | How often I'm like, "WTF... why would anyone ever need this?" [several months later] "Ugh, I wish I had a way to... wait a second" |
2021-11-26 05:52:38 +0100 | <jackdk> | It's often useful to learn what a bunch of stuff is and what it's for, but defer the details until you hit the problem that it solves |
2021-11-26 05:53:13 +0100 | <RobotMicrowave> | I try to learn by reading the docs, it's not very helpful, but it's very fun |
2021-11-26 05:54:19 +0100 | <dsal> | RobotMicrowave: Haskell docs are generally just references. You won't learn lens or recursion-schemes by reading haddock. :) |
2021-11-26 05:57:26 +0100 | <RobotMicrowave> | dsal: sad |
2021-11-26 05:57:27 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) (Quit: leaving) |
2021-11-26 05:57:57 +0100 | <dsal> | Good instructional material and good references are often very different. |
2021-11-26 05:57:59 +0100 | <dsal> | > flip execState (2,4) $ do { _1 += 11; _2 *= 6; modify (over each (^2)) } |
2021-11-26 05:58:01 +0100 | <lambdabot> | (169,576) |
2021-11-26 05:58:05 +0100 | <dsal> | wheee |
2021-11-26 05:58:49 +0100 | <dsal> | > flip execState (2,4) $ do { _1 += 11; _2 *= 6; modify (over each (2^)) } |
2021-11-26 05:58:50 +0100 | <lambdabot> | (8192,16777216) |
2021-11-26 05:59:32 +0100 | <RobotMicrowave> | dsal: I've learned most of my c++ with the docs and a debugger |
2021-11-26 06:00:01 +0100 | <RobotMicrowave> | But of couse i got some theory to back this up |
2021-11-26 06:00:23 +0100 | <RobotMicrowave> | by reading random articles |
2021-11-26 06:01:28 +0100 | <monochrom> | I doubt that there is any online free doc that teaches "concept", the latest addition to C++, properly. |
2021-11-26 06:01:32 +0100 | <EvanR> | random article U my alma mater |
2021-11-26 06:01:37 +0100 | <dsal> | hahaha |
2021-11-26 06:01:58 +0100 | <hatchet> | how i learned web dev fr |
2021-11-26 06:02:27 +0100 | <RobotMicrowave> | hatchet: web dev is a hoax, just glue things together |
2021-11-26 06:02:38 +0100 | <EvanR> | when haskell docs are good, they are very good |
2021-11-26 06:03:07 +0100 | <RobotMicrowave> | monochrom: cppreference can helpe you a lot, but it would be good to read the PR |
2021-11-26 06:04:44 +0100 | <monochrom> | That's what I tried. No. |
2021-11-26 06:04:51 +0100 | <monochrom> | Either that or I'm dense. |
2021-11-26 06:06:47 +0100 | <RobotMicrowave> | monochrom: I'm really dumb, so I take 2 months to understand this kind of stuff |
2021-11-26 06:07:08 +0100 | <dsal> | It sounds like you're just doing things inefficiently. |
2021-11-26 06:07:24 +0100 | <RobotMicrowave> | dsal: pretty much |
2021-11-26 06:07:50 +0100 | <RobotMicrowave> | this and I'm pretty dumb, like, a lot |
2021-11-26 06:07:56 +0100 | <dsal> | Trying to understand the universe by seeing tiny bits here and there will take a very long time and probably won't work super well. |
2021-11-26 06:08:13 +0100 | <RobotMicrowave> | dsal: I try my best |
2021-11-26 06:10:39 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 06:10:39 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 06:10:39 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 06:14:59 +0100 | RobotMicrowave | (~user@2804:d41:c2b2:be00:2926:cba1:14b8:da8b) (ERC 5.4.1 (IRC client for GNU Emacs 27.2)) |
2021-11-26 06:16:13 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
2021-11-26 06:17:44 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 06:18:14 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Client Quit) |
2021-11-26 06:24:41 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 06:26:09 +0100 | monochrom | (trebla@216.138.220.146) (Quit: NO CARRIER) |
2021-11-26 06:26:19 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 06:31:05 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
2021-11-26 06:33:42 +0100 | reumeth | (~reumeth@user/reumeth) |
2021-11-26 06:34:42 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-26 06:38:29 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 06:39:25 +0100 | hatchet | (~hatchet@2601:448:4280:330:c0d:94db:7b6:5658) (Quit: Client closed) |
2021-11-26 06:39:38 +0100 | jlamothe | (~jlamothe@198.251.61.229) |
2021-11-26 06:40:30 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 06:40:49 +0100 | reumeth | (~reumeth@user/reumeth) (Ping timeout: 250 seconds) |
2021-11-26 06:46:52 +0100 | <EvanR> | if you grind through something slow and inefficiently, that may end up being valuable later on |
2021-11-26 06:47:10 +0100 | <EvanR> | worst case, as a red flag of what not to do xD |
2021-11-26 06:49:44 +0100 | emf | (~emf@2620:10d:c090:400::5:4c86) |
2021-11-26 06:50:55 +0100 | <sm> | @where htac , hatchet |
2021-11-26 06:50:55 +0100 | <lambdabot> | "Haskell Tutorial and Cookbook" by Mark Watson in 2017-09-04 at <https://leanpub.com/haskell-cookbook> |
2021-11-26 06:51:12 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 06:51:12 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 06:51:12 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 06:53:31 +0100 | <dsal> | EvanR: I hit it from all angles. Had code I'd written and was using over long periods of time, started HPFFP, did some exercisms and AoC, read other books, played around with various other projects, then eventually just started doing everything all at once. |
2021-11-26 06:53:35 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 06:55:45 +0100 | <EvanR> | I had the benefit of doing the scheme book in school, so at least I knew what a pure function was. |
2021-11-26 06:55:57 +0100 | <EvanR> | the rest follows from there |
2021-11-26 06:56:10 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-26 06:56:47 +0100 | <EvanR> | there's also a bit of laziness in there, so that wasn't super alien |
2021-11-26 06:56:52 +0100 | <dsal> | I programmed in ocaml a couple of decades ago. Had good times there. |
2021-11-26 06:57:39 +0100 | <EvanR> | but haskell was definitely a step up on the tech level from anything I saw before |
2021-11-26 06:57:51 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 245 seconds) |
2021-11-26 06:58:07 +0100 | <EvanR> | which then opened the door to other things |
2021-11-26 07:00:26 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 07:08:34 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-26 07:08:41 +0100 | son0p | (~ff@181.136.122.143) (Ping timeout: 245 seconds) |
2021-11-26 07:08:48 +0100 | takuan | (~takuan@178-116-218-225.access.telenet.be) |
2021-11-26 07:09:58 +0100 | <Axman6> | I wonder how hard it would be to add a transformation to hlint for foo <$> pure a <*> pure b <*> someApplicativeThing <*> pure c ==> (\x -> foo a b x c) <$> someApplicativeThing, but for arbitrary number of actions |
2021-11-26 07:14:32 +0100 | monochrom | (trebla@216.138.220.146) |
2021-11-26 07:14:52 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:8d6b:77ca:adc:64ea) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 07:15:12 +0100 | m1dnight_ | (~christoph@christophe.dev) (Quit: WeeChat 3.1) |
2021-11-26 07:16:44 +0100 | m1dnight | (~christoph@christophe.dev) |
2021-11-26 07:24:47 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:6878:c21:1339:de41) (Ping timeout: 260 seconds) |
2021-11-26 07:25:01 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 07:25:26 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:a1e8:7445:87f2:2d40) |
2021-11-26 07:26:53 +0100 | xkuru | (~xkuru@user/xkuru) (Read error: Connection reset by peer) |
2021-11-26 07:30:43 +0100 | EvanR | (~evan@user/evanr) (Quit: Leaving) |
2021-11-26 07:31:01 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 07:33:03 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 07:35:47 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 07:36:49 +0100 | wei2912 | (~wei2912@116.88.103.128) |
2021-11-26 07:37:19 +0100 | wei2912 | (~wei2912@116.88.103.128) (Client Quit) |
2021-11-26 07:37:35 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 250 seconds) |
2021-11-26 07:38:01 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) (Quit: zzz) |
2021-11-26 07:39:56 +0100 | srk | (~sorki@user/srk) (Ping timeout: 245 seconds) |
2021-11-26 07:40:02 +0100 | emf | (~emf@2620:10d:c090:400::5:4c86) (Quit: emf) |
2021-11-26 07:44:36 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-11-26 07:47:47 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:a1e8:7445:87f2:2d40) (Ping timeout: 250 seconds) |
2021-11-26 07:48:39 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:4dee:bd75:d531:be0) |
2021-11-26 07:50:15 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) (Remote host closed the connection) |
2021-11-26 07:50:43 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-11-26 07:57:01 +0100 | benin | (~benin@183.82.179.164) (Ping timeout: 245 seconds) |
2021-11-26 07:58:18 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 07:59:32 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-11-26 07:59:57 +0100 | benin | (~benin@183.82.179.164) |
2021-11-26 08:09:56 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:4dee:bd75:d531:be0) (Ping timeout: 245 seconds) |
2021-11-26 08:10:51 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:42f4:b800:f8f2:1c2a) |
2021-11-26 08:12:08 +0100 | peeweep[m] | (~peeweep@2001:470:69fc:105::1:39c1) |
2021-11-26 08:12:43 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 08:14:49 +0100 | michalz | (~michalz@185.246.204.37) |
2021-11-26 08:17:36 +0100 | emf | (~emf@2620:10d:c090:400::5:4c86) |
2021-11-26 08:20:25 +0100 | peeweep[m] | (~peeweep@2001:470:69fc:105::1:39c1) () |
2021-11-26 08:21:50 +0100 | jakalx | (~jakalx@base.jakalx.net) () |
2021-11-26 08:21:58 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-11-26 08:23:56 +0100 | emf | (~emf@2620:10d:c090:400::5:4c86) (Quit: emf) |
2021-11-26 08:27:37 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-11-26 08:29:08 +0100 | Teacup | (~teacup@user/teacup) (Quit: Teacup) |
2021-11-26 08:29:32 +0100 | Teacup | (~teacup@user/teacup) |
2021-11-26 08:33:44 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-11-26 08:34:20 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 268 seconds) |
2021-11-26 08:41:51 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 08:49:35 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 08:51:56 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 08:54:14 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 260 seconds) |
2021-11-26 08:54:54 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-11-26 08:55:06 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-11-26 08:55:13 +0100 | <dminuoso> | Axman6: Doesn't htlint just do very naive and static matching of patterns? https://github.com/ndmitchell/hlint/blob/master/data/hlint.yaml |
2021-11-26 08:56:51 +0100 | <arahael> | dminuoso: If it's "just do a very naive and static matching of patterns", then it's insane how good it is compared to literally every other programming language ecosystem's lint. :( |
2021-11-26 08:57:06 +0100 | <dminuoso> | Our opinions diverge apparently. |
2021-11-26 08:57:21 +0100 | <arahael> | Not neccessarily. |
2021-11-26 08:57:35 +0100 | <arahael> | You're assuming this is a high bar. |
2021-11-26 08:57:52 +0100 | <dminuoso> | That might very well be. :) |
2021-11-26 08:57:55 +0100 | <earthy> | it helps that haskell's semantics do not carry side effects. ;) |
2021-11-26 08:58:40 +0100 | <dminuoso> | I guess there's a point to that. With a (mostly) referential transparent language, you can have static refactoring rules easily |
2021-11-26 08:58:57 +0100 | <dminuoso> | *referentially transparent. uh |
2021-11-26 08:59:11 +0100 | <dminuoso> | arahael: I just dont put much faith or value in linters in the first place. |
2021-11-26 08:59:36 +0100 | <earthy> | dminuoso: they're *extremely* helpful in large teams |
2021-11-26 08:59:49 +0100 | <dminuoso> | Yeah your and my opinions diverge here as well. :) |
2021-11-26 09:00:01 +0100 | <opqdonut> | extremely helpful for project outcomes, or extremely helpful for placating pedants?-) |
2021-11-26 09:00:08 +0100 | <arahael> | I agree, they're *extremely* good for large teams, they're good at catching the low hanging fruit. |
2021-11-26 09:00:30 +0100 | <arahael> | Especially if the compilers are crap. |
2021-11-26 09:00:35 +0100 | <earthy> | project outcomes, in my experience. large teams tend to wallow in pedantic discussions if given half a chance |
2021-11-26 09:00:38 +0100 | arahael | glares at Kiel's GCC. |
2021-11-26 09:00:44 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:859e:604a:c9a4:ff01) |
2021-11-26 09:00:47 +0100 | chele | (~chele@user/chele) |
2021-11-26 09:01:01 +0100 | <earthy> | linters take the discussion off the table |
2021-11-26 09:01:02 +0100 | <dminuoso> | In my opinion they're not helpful for large teams. If I want to express some code in a way that the linter disagrees with, why should a static tool without actual Haskell expertise or problem domain knowledge tell me different? |
2021-11-26 09:01:08 +0100 | <opqdonut> | agreeing on conventions and checking them automatically is a great pattern, but linters are rarely up to the task. you need custom ad-hoc analysers |
2021-11-26 09:01:09 +0100 | <arahael> | earthy: That, too. |
2021-11-26 09:01:23 +0100 | <opqdonut> | things like "are all localization keys used in the source defined for all languages" |
2021-11-26 09:01:25 +0100 | <arahael> | dminuoso: Some teams I've worked in required MISRA-C. |
2021-11-26 09:01:29 +0100 | <dminuoso> | These tools appear to serve to give the impression that unskilled developers can produce "nice looking code". But the reality, good quality code cannot be reasonably described by linters. |
2021-11-26 09:01:31 +0100 | <opqdonut> | "are all events emitted by service X handled by service Y" |
2021-11-26 09:01:32 +0100 | <earthy> | opqdonut: that'd be better, yes. we also do that. ;) |
2021-11-26 09:01:48 +0100 | <arahael> | dminuoso: There's a reason I said low-hanging fruit. |
2021-11-26 09:01:55 +0100 | <earthy> | dminuoso: the trick is that *bad* patterns can be detected by linters |
2021-11-26 09:02:03 +0100 | <dminuoso> | arahael: To me, linters stand in the way. Too often I trigger patterns that I simply completely disagree with. |
2021-11-26 09:02:09 +0100 | <earthy> | just taking away the actively bad stuff is a boon. |
2021-11-26 09:02:12 +0100 | <dminuoso> | And in large teams you have this type of conflict more often |
2021-11-26 09:03:01 +0100 | <dminuoso> | earthy: A code review would catch that same stuff but in a better way. |
2021-11-26 09:03:22 +0100 | <arahael> | dminuoso: Code review is often a mere formality in large teams, it's insane how often review misses painfully obvious crap. |
2021-11-26 09:03:52 +0100 | <dminuoso> | There's your real problem then. |
2021-11-26 09:04:23 +0100 | <dminuoso> | A linter will not really improve that situation much. Instead, it will give all the more justification to simply click "Accept" every time. |
2021-11-26 09:04:36 +0100 | <dminuoso> | "Oh the linter and tests passed? Then it must be good" |
2021-11-26 09:04:41 +0100 | <earthy> | dminuoso: may be... but people suck at seeing these things, and can be *much* more effective when analysing whether the code fits the domain and whether it makes sense. |
2021-11-26 09:05:10 +0100 | <earthy> | dminuoso: that is a lack of imagination on the dev reviewing. the content of the tests are what should be under review. |
2021-11-26 09:05:16 +0100 | <arahael> | dminuoso: A linter that checks use-before-assign, or use-after-free is a good one, as an example, plus, unused variables, etc, all often help. |
2021-11-26 09:05:26 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-11-26 09:05:36 +0100 | <earthy> | arahael: granted, that's mostly in languages that basically suck for correctness. ;) |
2021-11-26 09:05:37 +0100 | <arahael> | dminuoso: Do you disable all your warnings with your compiler, if you don't like linters? |
2021-11-26 09:05:41 +0100 | <dminuoso> | arahael: Absolutely. It's just that we have these as warnings in GHC already. :) |
2021-11-26 09:05:44 +0100 | <arahael> | earthy: Well, yes. |
2021-11-26 09:05:49 +0100 | <arahael> | dminuoso: So you *do* like the linters. |
2021-11-26 09:06:05 +0100 | <arahael> | dminuoso: I guess you mean you don't like linters that are separate to the compiler? |
2021-11-26 09:06:41 +0100 | <dminuoso> | arahael: Okay so I guess you have a point there. I dont like linters that emit warnings based on stylistic or supposed idiomatic choices. |
2021-11-26 09:06:44 +0100 | <arahael> | dminuoso: There are some unbelievably bad compilers out there, having a linter helps massively. |
2021-11-26 09:06:52 +0100 | <dminuoso> | And hlint is almost all that. |
2021-11-26 09:06:59 +0100 | <arahael> | dminuoso: I once had to use a assembler that couldn't even implement *macros* correctly. |
2021-11-26 09:07:16 +0100 | Vajb | (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) |
2021-11-26 09:07:27 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 09:07:29 +0100 | <dminuoso> | Like, hlint has generalization warnings I simply disagree with. |
2021-11-26 09:07:34 +0100 | <arahael> | dminuoso: And Kiel's GCC by default, if I recall correctly, doesn't even optimise at all. Which happens to be a good thing because the linting options are almost as bad. |
2021-11-26 09:07:35 +0100 | <dminuoso> | If I want to pick `map` over `fmap`, I might have a good reason for that. |
2021-11-26 09:07:54 +0100 | <dminuoso> | Or this one: - warn: {lhs: "maybe []", rhs: foldMap} |
2021-11-26 09:07:55 +0100 | <arahael> | dminuoso: No optimisation means less potential for undefined behaviour in practice - it becomes implementation-defined in practice instead. |
2021-11-26 09:08:00 +0100 | <dminuoso> | I simply completely disagree with this in any way |
2021-11-26 09:08:13 +0100 | <arahael> | dminuoso: I think hlint's explicitly not recommended to be an automatically-applied lint. |
2021-11-26 09:08:47 +0100 | <dminuoso> | arahael: The problem is, if my code provokes that linting rule, I have to write a complete separate line to squelch the linter as to not annoy everyone else. |
2021-11-26 09:08:53 +0100 | <dminuoso> | And this seems disapportionate to me |
2021-11-26 09:09:06 +0100 | <dminuoso> | And its very frustrating |
2021-11-26 09:09:37 +0100 | <arahael> | dminuoso: That's relatively unusual in C projects with crappy compilers. In those projects, you'd just fix the damn rule and move on. :) |
2021-11-26 09:10:01 +0100 | <dminuoso> | My tools should obey me, not the other way around. |
2021-11-26 09:10:49 +0100 | <arahael> | dminuoso: You have good tools. A good validating compiler helps. Makes a separate linting tool less important, but you still have a lint phase, it's just embedded. |
2021-11-26 09:10:58 +0100 | <dminuoso> | Like I pointed out earlier |
2021-11-26 09:11:01 +0100 | <arahael> | Right. |
2021-11-26 09:11:07 +0100 | <dminuoso> | 09:06:41 dminuoso | arahael: Okay so I guess you have a point there. I dont like linters that emit warnings based on stylistic or supposed idiomatic choices. |
2021-11-26 09:11:36 +0100 | <dminuoso> | Lets separate linters into "linting potentially erraneous code" and "linting whatever the author deems unidiomatic or stylistically wrong" |
2021-11-26 09:11:49 +0100 | <dminuoso> | The first I completely agree with, and GHC has a fairly decent set of warnings already |
2021-11-26 09:12:11 +0100 | <dminuoso> | I like it, and for languages where the implementation does not have this built in, I dont mind a separate linting software at all. |
2021-11-26 09:12:22 +0100 | <arahael> | I just wish haskell enabled all those by default. |
2021-11-26 09:12:25 +0100 | dhouthoo | (~dhouthoo@178-117-36-167.access.telenet.be) |
2021-11-26 09:12:36 +0100 | <dminuoso> | Indeed. -Wall and -Wcompat should be enabled by default |
2021-11-26 09:12:53 +0100 | <dminuoso> | And -fno-warn-name-shadowing |
2021-11-26 09:13:34 +0100 | <arahael> | Right. Oh, that's an interesting point. People seem to _hate_ name shadowing for some reason. I've not understood it. |
2021-11-26 09:13:41 +0100 | <arahael> | I don't really know why. |
2021-11-26 09:14:22 +0100 | <dminuoso> | In my opinion this is a sane default: `-Wall -Wcompat -Werror=incomplete-patterns -Wno-warn-unticked-promoted-constructors -Wno-warn-name-shadowing` |
2021-11-26 09:14:33 +0100 | <arahael> | I mean, I get shadowing in teh global scope is problematic, but people get unreasonably annoyed if I shadow something in a freaking 3-line scope. |
2021-11-26 09:15:35 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 09:16:52 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 09:17:54 +0100 | <arahael> | People in large teams basically loose all perspective. |
2021-11-26 09:18:13 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 09:18:39 +0100 | <[exa]> | +1 ^ |
2021-11-26 09:18:42 +0100 | <dminuoso> | Perhaps some large teams are just badly organized. |
2021-11-26 09:18:52 +0100 | <dminuoso> | And no amount of tooling can realistically compensate for that |
2021-11-26 09:19:59 +0100 | <[exa]> | dminuoso: just curious (don't take this as me being doubtful :D ), are there any other ways to organize large teams than literally separate them into subteams? |
2021-11-26 09:20:47 +0100 | <dminuoso> | Im not saying they cant be organized |
2021-11-26 09:21:19 +0100 | <dminuoso> | It's just that perhaps too many shops that operate huge teams lack both the necessary discipline on programmers and the organizational skills by senior positions |
2021-11-26 09:24:02 +0100 | Megant | (megant@user/megant) (Ping timeout: 240 seconds) |
2021-11-26 09:25:14 +0100 | jushur | (~human@user/jushur) |
2021-11-26 09:26:29 +0100 | michalz | (~michalz@185.246.204.37) (Read error: No route to host) |
2021-11-26 09:27:27 +0100 | michalz | (~michalz@185.246.204.58) |
2021-11-26 09:28:15 +0100 | img | (~img@user/img) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-26 09:28:36 +0100 | earthy | nods |
2021-11-26 09:29:22 +0100 | <earthy> | that sounds valid. especially given that it's hard to get enough seniors to be able to organize the more junior devs |
2021-11-26 09:31:29 +0100 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) |
2021-11-26 09:32:00 +0100 | <arahael> | Or you have too many seniors and not enough juniors. |
2021-11-26 09:34:47 +0100 | img | (~img@user/img) |
2021-11-26 09:39:39 +0100 | mmhat | (~mmh@55d426e2.access.ecotel.net) |
2021-11-26 09:41:26 +0100 | lavaman | (~lavaman@98.38.249.169) (Read error: Connection reset by peer) |
2021-11-26 09:41:26 +0100 | awschnap | (~lavaman@98.38.249.169) |
2021-11-26 09:43:58 +0100 | rkrishnan | (~user@171.48.57.101) |
2021-11-26 09:47:50 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 09:52:30 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 260 seconds) |
2021-11-26 09:52:33 +0100 | cfricke | (~cfricke@user/cfricke) |
2021-11-26 09:57:31 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 09:58:43 +0100 | machinedgod | (~machinedg@24.105.81.50) |
2021-11-26 09:59:14 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-11-26 10:06:04 +0100 | Megant | (megant@user/megant) |
2021-11-26 10:07:45 +0100 | Midjak | (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
2021-11-26 10:08:07 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 10:09:07 +0100 | Midjak | (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Remote host closed the connection) |
2021-11-26 10:12:01 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 10:17:38 +0100 | allbery_b | (~geekosaur@xmonad/geekosaur) |
2021-11-26 10:17:38 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Killed (NickServ (GHOST command used by allbery_b))) |
2021-11-26 10:17:41 +0100 | allbery_b | geekosaur |
2021-11-26 10:17:55 +0100 | jumper149 | (~jumper149@static.6.71.203.116.clients.your-server.de) |
2021-11-26 10:19:01 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-26 10:19:30 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 256 seconds) |
2021-11-26 10:21:02 +0100 | mmhat | (~mmh@55d426e2.access.ecotel.net) (Quit: WeeChat 3.3) |
2021-11-26 10:25:57 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:42f4:b800:f8f2:1c2a) (Ping timeout: 250 seconds) |
2021-11-26 10:27:04 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:57:b0d1:750c:1fc) |
2021-11-26 10:31:55 +0100 | acidjnk_new | (~acidjnk@p200300d0c7271e128015eb8f81d9ba9d.dip0.t-ipconnect.de) |
2021-11-26 10:34:48 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 256 seconds) |
2021-11-26 10:37:44 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 10:38:02 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 10:38:26 +0100 | econo | (uid147250@user/econo) (Quit: Connection closed for inactivity) |
2021-11-26 10:38:55 +0100 | srk | (~sorki@user/srk) |
2021-11-26 10:41:09 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 10:42:41 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 10:43:21 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2021-11-26 10:43:41 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 245 seconds) |
2021-11-26 10:43:43 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:d837:dc58:2ea7:10e8) (Remote host closed the connection) |
2021-11-26 10:44:35 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Client Quit) |
2021-11-26 10:45:26 +0100 | gehmehgeh | (~user@user/gehmehgeh) |
2021-11-26 10:46:10 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2021-11-26 10:49:19 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 10:49:55 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 10:54:38 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 256 seconds) |
2021-11-26 10:59:52 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) |
2021-11-26 11:03:14 +0100 | <arahael> | Wow. Updating to Aeson 2.0 is a huge jump from 1.5. Finally did it for one of my repos. :D |
2021-11-26 11:03:37 +0100 | <arahael> | And I was able to do it mechanically whilst watching a movie so pretty happy about that. |
2021-11-26 11:06:40 +0100 | notzmv | (~zmv@user/notzmv) (Ping timeout: 268 seconds) |
2021-11-26 11:08:07 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:09:47 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:10:19 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:11:59 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:12:16 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:12:52 +0100 | jgeerds | (~jgeerds@55d45b75.access.ecotel.net) |
2021-11-26 11:14:35 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:14:52 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:17:38 +0100 | <jackdk> | I do wish they published a 1.6 with the KeyMap interface and type aliases to easy that transition, but it wasn't so bad |
2021-11-26 11:18:02 +0100 | neurocyte0132889 | (~neurocyte@92.119.8.11) |
2021-11-26 11:18:02 +0100 | neurocyte0132889 | (~neurocyte@92.119.8.11) (Changing host) |
2021-11-26 11:18:02 +0100 | neurocyte0132889 | (~neurocyte@user/neurocyte) |
2021-11-26 11:18:07 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 11:19:50 +0100 | <arahael> | Right. I haven't gotten my repo fully up to speed with amazonka 2.0, but it's compiling (with all the imports and everything - just everything amazonka has been commented out such as the runAWST stuff. |
2021-11-26 11:19:58 +0100 | <arahael> | But the aeson is pretty decent. |
2021-11-26 11:20:09 +0100 | <arahael> | Next I'll have to update the amazonka bits. :) |
2021-11-26 11:20:27 +0100 | <arahael> | (Which I confirm compiles, I noticed in the release notes that runAWST is gone) |
2021-11-26 11:20:36 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:20:53 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:21:12 +0100 | Sgeo | (~Sgeo@user/sgeo) (Read error: Connection reset by peer) |
2021-11-26 11:22:41 +0100 | <arahael> | I mean, I still have the amazon imports and all. :) |
2021-11-26 11:22:45 +0100 | <jackdk> | yes, thank the maker. It was never as well-behaved as other transformers |
2021-11-26 11:22:59 +0100 | <arahael> | I'm afraid I'm too naive to know better. :( |
2021-11-26 11:24:39 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:24:57 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:25:48 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 256 seconds) |
2021-11-26 11:28:02 +0100 | max22- | (~maxime@lfbn-ren-1-762-224.w81-53.abo.wanadoo.fr) (Ping timeout: 240 seconds) |
2021-11-26 11:30:49 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:31:06 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:31:47 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 11:33:37 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) |
2021-11-26 11:37:03 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:37:20 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:37:26 +0100 | max22- | (~maxime@2a01cb088335980072dc9c7c6d37d1a7.ipv6.abo.wanadoo.fr) |
2021-11-26 11:38:40 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:38:57 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:39:14 +0100 | <Unhammer> | What's the big change with 2.0? |
2021-11-26 11:40:54 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:41:37 +0100 | <arahael> | Unhammer: The most obvious is that Object is now a KeyMap. |
2021-11-26 11:42:03 +0100 | <arahael> | I noticed it when !? stopped working with them. |
2021-11-26 11:43:37 +0100 | <jackdk> | The KeyMap type became opaque so that the implementation could be swapped out, as someone demonstrated a working PoC DoS attack against the unordered-containers HashMap |
2021-11-26 11:43:57 +0100 | <arahael> | jackdk: Oh? |
2021-11-26 11:44:12 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) |
2021-11-26 11:44:30 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
2021-11-26 11:45:24 +0100 | <jackdk> | https://cs-syd.eu/posts/2021-09-11-json-vulnerability discusses the vulnerability but newer versions of aeson use the Map from containers instead so are unaffected |
2021-11-26 11:45:30 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Remote host closed the connection) |
2021-11-26 11:45:55 +0100 | <arahael> | Thanks, I'll check that out! |
2021-11-26 11:46:10 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
2021-11-26 11:46:37 +0100 | zer0bitz | (~zer0bitz@2001:2003:f6bc:f00:75c5:c6ed:c91:17fe) |
2021-11-26 11:47:51 +0100 | <arahael> | Ah, interesting. Seems logical. |
2021-11-26 11:49:38 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) (Ping timeout: 260 seconds) |
2021-11-26 11:50:53 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:52:33 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:52:52 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:54:32 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:54:51 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:56:31 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:56:50 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:58:30 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 11:58:48 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 11:59:30 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 260 seconds) |
2021-11-26 12:02:33 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:02:51 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:04:31 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:04:38 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-11-26 12:04:49 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:06:29 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:06:47 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:07:55 +0100 | LiaoTao_ | (~LiaoTao@gateway/tor-sasl/liaotao) |
2021-11-26 12:10:29 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:10:45 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-11-26 12:10:47 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:11:21 +0100 | LiaoTao | (~LiaoTao@gateway/tor-sasl/liaotao) (Ping timeout: 276 seconds) |
2021-11-26 12:13:31 +0100 | raehik1 | (~raehik@cpc95906-rdng25-2-0-cust156.15-3.cable.virginm.net) |
2021-11-26 12:13:38 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) (Remote host closed the connection) |
2021-11-26 12:14:31 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 245 seconds) |
2021-11-26 12:15:41 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 12:18:58 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 12:19:45 +0100 | albet70 | (~xxx@2400:8902::f03c:92ff:fe60:98d8) |
2021-11-26 12:20:49 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 12:23:04 +0100 | kuribas | (~user@ptr-25vy0i8ep4e11jhvxvb.18120a2.ip6.access.telenet.be) |
2021-11-26 12:25:13 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:25:30 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:26:08 +0100 | royo | (~royo@user/royo) |
2021-11-26 12:26:19 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 12:26:43 +0100 | royo | (~royo@user/royo) () |
2021-11-26 12:29:47 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 12:33:23 +0100 | <Unhammer> | Oh nice |
2021-11-26 12:39:09 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-26 12:39:27 +0100 | chele | (~chele@user/chele) (Remote host closed the connection) |
2021-11-26 12:40:08 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 12:41:43 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 12:42:20 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Read error: Connection reset by peer) |
2021-11-26 12:42:29 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:44:02 +0100 | gehmehgeh_ | (~user@user/gehmehgeh) |
2021-11-26 12:45:48 +0100 | gehmehgeh | (~user@user/gehmehgeh) (Ping timeout: 276 seconds) |
2021-11-26 12:46:35 +0100 | AlexNoo_ | (~AlexNoo@178.34.162.8) |
2021-11-26 12:46:36 +0100 | jinsun__ | (~quassel@user/jinsun) |
2021-11-26 12:47:12 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2021-11-26 12:47:29 +0100 | MidAutumnMoon65 | (~MidAutumn@user/midautumnmoon) |
2021-11-26 12:47:37 +0100 | ralu9 | (~ralu@static.211.245.203.116.clients.your-server.de) |
2021-11-26 12:47:41 +0100 | russruss0 | (~russruss@my.russellmcc.com) |
2021-11-26 12:47:45 +0100 | ellie9 | (~ellie@user/ellie) |
2021-11-26 12:48:17 +0100 | curiousgay | (~curiousga@77-120-141-90.kha.volia.net) |
2021-11-26 12:48:18 +0100 | davl_ | (~davl@207.154.228.18) |
2021-11-26 12:48:20 +0100 | cfebs_ | (~cfebs@user/cfebs) |
2021-11-26 12:48:25 +0100 | mustafa_ | (sid502723@rockylinux/releng/mustafa) |
2021-11-26 12:48:33 +0100 | deadmarshal_ | (~deadmarsh@95.38.116.172) |
2021-11-26 12:48:34 +0100 | brettgilio3 | (~brettgili@x-node.gq) |
2021-11-26 12:48:40 +0100 | sqrt2_ | (~ben@80-108-18-7.cable.dynamic.surfer.at) |
2021-11-26 12:48:42 +0100 | gabiruh_ | (~gabiruh@vps19177.publiccloud.com.br) |
2021-11-26 12:48:43 +0100 | eL_Bart0- | (eL_Bart0@dietunichtguten.org) |
2021-11-26 12:48:44 +0100 | dysfigured | (~dfg@li490-89.members.linode.com) |
2021-11-26 12:48:48 +0100 | greyrat_ | (~greyrat@ip202.ip-51-178-215.eu) |
2021-11-26 12:48:50 +0100 | m5zs7k_ | (aquares@web10.mydevil.net) |
2021-11-26 12:48:53 +0100 | madnight_ | (~madnight@static.59.103.201.195.clients.your-server.de) |
2021-11-26 12:48:56 +0100 | zopsi_ | (zopsi@2600:3c00::f03c:91ff:fe14:551f) |
2021-11-26 12:49:09 +0100 | pyook | (~puke@user/puke) |
2021-11-26 12:49:09 +0100 | puke | (~puke@user/puke) (Killed (mercury.libera.chat (Nickname regained by services))) |
2021-11-26 12:49:09 +0100 | pyook | puke |
2021-11-26 12:49:11 +0100 | Techcable_ | (~Techcable@168.235.93.147) |
2021-11-26 12:49:24 +0100 | forell_ | (~forell@host-178-216-90-220.sta.tvknaszapraca.pl) |
2021-11-26 12:49:35 +0100 | aforemny_ | (~aforemny@static.248.158.34.188.clients.your-server.de) |
2021-11-26 12:49:47 +0100 | dminuoso_ | (~dminuoso@static.88-198-218-68.clients.your-server.de) |
2021-11-26 12:49:49 +0100 | wagle_ | (~wagle@quassel.wagle.io) |
2021-11-26 12:50:11 +0100 | fjmorazan_ | (~quassel@user/fjmorazan) |
2021-11-26 12:50:22 +0100 | glider_ | (~glider@user/glider) |
2021-11-26 12:50:30 +0100 | dumptruckman_ | (~dumptruck@45-79-173-88.ip.linodeusercontent.com) |
2021-11-26 12:50:33 +0100 | p3n_ | (~p3n@217.198.124.246) |
2021-11-26 12:50:36 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 12:50:44 +0100 | sshine_ | (~simon@hubris.eta.solutions) |
2021-11-26 12:50:46 +0100 | ptrcmd_ | (~ptrcmd@user/ptrcmd) |
2021-11-26 12:50:52 +0100 | anderson_ | (~ande@user/anderson) |
2021-11-26 12:50:53 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 12:50:56 +0100 | Clint_ | (~Clint@user/clint) |
2021-11-26 12:50:57 +0100 | Hecate_ | (~mariposa@163.172.211.189) |
2021-11-26 12:50:59 +0100 | [exa]_ | (~exa@srv3.blesmrt.net) |
2021-11-26 12:50:59 +0100 | dfordivam1 | (~dfordivam@tk2-219-19469.vs.sakura.ne.jp) |
2021-11-26 12:51:03 +0100 | cjay- | (cjay@nerdbox.nerd2nerd.org) |
2021-11-26 12:51:06 +0100 | m1dnight_ | (~christoph@christophe.dev) |
2021-11-26 12:51:10 +0100 | tlax_ | (tlax@kapsi.fi) |
2021-11-26 12:51:14 +0100 | bcoppens_ | (~bartcopp@vpn2.bartcoppens.be) |
2021-11-26 12:51:19 +0100 | pie__ | (~pie_bnc@user/pie/x-2818909) |
2021-11-26 12:51:20 +0100 | dminuoso | (~dminuoso@user/dminuoso) (Killed (NickServ (GHOST command used by dminuoso_!~dminuoso@static.88-198-218-68.clients.your-server.de))) |
2021-11-26 12:51:20 +0100 | Igloo | (~ian@matrix.chaos.earth.li) |
2021-11-26 12:51:23 +0100 | Eoco_ | (~ian@x-160-94-179-157.acm.umn.edu) |
2021-11-26 12:51:25 +0100 | ts2 | (~ts@46.101.20.9) |
2021-11-26 12:51:48 +0100 | dminuoso_ | dminuoso |
2021-11-26 12:51:50 +0100 | jushurr | (~human@user/jushur) |
2021-11-26 12:52:06 +0100 | dminuoso | (~dminuoso@static.88-198-218-68.clients.your-server.de) (Changing host) |
2021-11-26 12:52:06 +0100 | dminuoso | (~dminuoso@user/dminuoso) |
2021-11-26 12:52:33 +0100 | connrs_ | (~connrs@user/connrs) |
2021-11-26 12:54:24 +0100 | mht-wtf | (~mht@mht.wtf) |
2021-11-26 12:54:33 +0100 | infinity0_ | (~infinity0@occupy.ecodis.net) |
2021-11-26 12:54:34 +0100 | infinity0 | (~infinity0@occupy.ecodis.net) (Killed (iridium.libera.chat (Nickname regained by services))) |
2021-11-26 12:54:34 +0100 | infinity0_ | infinity0 |
2021-11-26 12:54:39 +0100 | Square | (~a@user/square) |
2021-11-26 12:54:57 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-11-26 12:55:08 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 12:55:20 +0100 | In0perable | (~PLAYER_1@fancydata.science) |
2021-11-26 12:55:24 +0100 | Lord_of_Life_ | (~Lord@user/lord-of-life/x-2819915) |
2021-11-26 12:55:26 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 12:55:59 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | connrs | (~connrs@user/connrs) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | Inoperable | (~PLAYER_1@fancydata.science) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | zopsi | (~zopsi@irc.dir.ac) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | forell | (~forell@user/forell) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | Sqaure | (~a@user/square) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | greyrat | (~greyrat@ip202.ip-51-178-215.eu) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | madnight | (~madnight@static.59.103.201.195.clients.your-server.de) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | dfordvm | (~dfordivam@tk2-219-19469.vs.sakura.ne.jp) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | ptrcmd | (~ptrcmd@user/ptrcmd) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | connrs_ | connrs |
2021-11-26 12:55:59 +0100 | sshine | (~simon@hubris.eta.solutions) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | p3n | (~p3n@217.198.124.246) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | m1dnight | (~christoph@christophe.dev) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | wagle | (~wagle@quassel.wagle.io) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | cfebs | (~cfebs@user/cfebs) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | AlexNoo | (~AlexNoo@178.34.162.8) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | Clint | (~Clint@user/clint) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | MidAutumnMoon6 | (~MidAutumn@user/midautumnmoon) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | [exa] | (exa@user/exa/x-3587197) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | glider | (~glider@user/glider) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | brettgilio | (~brettgili@x-node.gq) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | ts1 | (~ts@46.101.20.9) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | mht | (~mht@mht.wtf) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | bcoppens | (~bartcopp@vpn2.bartcoppens.be) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | Eoco | (~ian@x-160-94-179-157.acm.umn.edu) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | Hecate | (~mariposa@user/hecate) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | sm[i]_ | (~user@li229-222.members.linode.com) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | davl | (~davl@207.154.228.18) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | cjay | (cjay@nerdbox.nerd2nerd.org) (Ping timeout: 260 seconds) |
2021-11-26 12:55:59 +0100 | tlax | (tlax@kapsi.fi) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | Lord_of_Life | (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | jushur | (~human@user/jushur) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | mbuf | (~Shakthi@171.61.241.63) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | ralu | (~ralu@static.211.245.203.116.clients.your-server.de) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | jinsun | (~quassel@user/jinsun) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | russruss | (~russruss@my.russellmcc.com) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | mustafa | (sid502723@rockylinux/releng/mustafa) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | gabiruh | (~gabiruh@vps19177.publiccloud.com.br) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | fjmorazan | (~quassel@user/fjmorazan) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | Techcable | (~Techcable@168.235.93.147) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | smunix | (~smunix@static.26.70.12.49.clients.your-server.de) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | eL_Bart0 | (eL_Bart0@dietunichtguten.org) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | m5zs7k | (aquares@web10.mydevil.net) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | anderson | (~ande@user/anderson) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | aforemny | (~aforemny@static.248.158.34.188.clients.your-server.de) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | xsarnik | (xsarnik@lounge.fi.muni.cz) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | ian_ | (~ian@matrix.chaos.earth.li) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | dumptruckman | (~dumptruck@45-79-173-88.ip.linodeusercontent.com) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | micro | (~micro@user/micro) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | dfg | (~dfg@user/dfg) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | sqrt2 | (~ben@80-108-18-7.cable.dynamic.surfer.at) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | pie_ | (~pie_bnc@user/pie/x-2818909) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | platz | (~platz@user/platz) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | ellie | (~ellie@user/ellie) (Ping timeout: 260 seconds) |
2021-11-26 12:56:00 +0100 | xsarnik | (xsarnik@lounge.fi.muni.cz) |
2021-11-26 12:56:00 +0100 | mbuf | (~Shakthi@171.61.241.63) |
2021-11-26 12:56:00 +0100 | cfebs_ | cfebs |
2021-11-26 12:56:00 +0100 | sm[i]_ | (~user@li229-222.members.linode.com) |
2021-11-26 12:56:00 +0100 | russruss0 | russruss |
2021-11-26 12:56:01 +0100 | ralu9 | ralu |
2021-11-26 12:56:01 +0100 | dumptruckman_ | dumptruckman |
2021-11-26 12:56:01 +0100 | brettgilio3 | brettgilio |
2021-11-26 12:56:01 +0100 | ellie9 | ellie |
2021-11-26 12:56:01 +0100 | mustafa_ | mustafa |
2021-11-26 12:56:02 +0100 | MidAutumnMoon65 | MidAutumnMoon6 |
2021-11-26 12:56:02 +0100 | m5zs7k_ | m5zs7k |
2021-11-26 12:56:15 +0100 | anderson_ | anderson |
2021-11-26 12:56:17 +0100 | micro | (~micro@user/micro) |
2021-11-26 12:56:38 +0100 | platz | (~platz@40.122.118.113) |
2021-11-26 12:56:38 +0100 | platz | (~platz@40.122.118.113) (Changing host) |
2021-11-26 12:56:38 +0100 | platz | (~platz@user/platz) |
2021-11-26 12:58:10 +0100 | deadmarshal_ | (~deadmarsh@95.38.116.172) (Ping timeout: 256 seconds) |
2021-11-26 12:58:14 +0100 | Lord_of_Life_ | Lord_of_Life |
2021-11-26 12:59:38 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 12:59:49 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 13:03:42 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 13:04:11 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) (Client Quit) |
2021-11-26 13:06:37 +0100 | mmhat | (~mmh@55d426e2.access.ecotel.net) |
2021-11-26 13:07:45 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 13:11:14 +0100 | Vajb | (~Vajb@nalkaylds2h97nzof-2.v6.elisa-mobile.fi) (Read error: Connection reset by peer) |
2021-11-26 13:12:00 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-11-26 13:13:46 +0100 | [exa]_ | [exa] |
2021-11-26 13:13:53 +0100 | [exa] | (~exa@srv3.blesmrt.net) (Changing host) |
2021-11-26 13:13:53 +0100 | [exa] | (~exa@user/exa/x-3587197) |
2021-11-26 13:15:56 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 13:16:11 +0100 | benin | (~benin@183.82.179.164) (Ping timeout: 245 seconds) |
2021-11-26 13:19:15 +0100 | notzmv | (~zmv@user/notzmv) |
2021-11-26 13:19:44 +0100 | boxscape_ | (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) |
2021-11-26 13:21:06 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-26 13:24:11 +0100 | max22- | (~maxime@2a01cb088335980072dc9c7c6d37d1a7.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
2021-11-26 13:26:20 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:28:00 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:28:13 +0100 | benin | (~benin@183.82.179.164) |
2021-11-26 13:28:18 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:29:06 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 245 seconds) |
2021-11-26 13:29:56 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 13:30:41 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) |
2021-11-26 13:32:54 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 13:34:34 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:34:51 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:37:40 +0100 | awschnap | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-26 13:39:20 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:39:37 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:41:17 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:41:35 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:42:52 +0100 | slack1256 | (~slack1256@186.11.45.199) |
2021-11-26 13:46:21 +0100 | cfricke | (~cfricke@user/cfricke) (Ping timeout: 250 seconds) |
2021-11-26 13:46:53 +0100 | aforemny_ | aforemny |
2021-11-26 13:47:39 +0100 | cfricke | (~cfricke@user/cfricke) |
2021-11-26 13:50:13 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:50:31 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 13:51:39 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 13:51:44 +0100 | <zero> | what's a case where return can be defined more optimally than pure? |
2021-11-26 13:52:17 +0100 | zero | yin |
2021-11-26 13:52:32 +0100 | yin | zzz |
2021-11-26 13:54:01 +0100 | <hpc> | i can't immagine there is one |
2021-11-26 13:54:26 +0100 | <hpc> | everything that would be in scope defining return is also in scope defining pure |
2021-11-26 13:59:10 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 13:59:27 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 14:02:08 +0100 | <geekosaur> | zero, afaik the only reason there's a difference is backward compatibility |
2021-11-26 14:02:16 +0100 | <geekosaur> | not optimality |
2021-11-26 14:02:25 +0100 | [itchyjunk] | (~itchyjunk@user/itchyjunk/x-7353470) |
2021-11-26 14:02:49 +0100 | <dminuoso> | What's the idiomatic way to provide a |
2021-11-26 14:02:52 +0100 | <dminuoso> | oops |
2021-11-26 14:03:04 +0100 | <geekosaur> | in fact there's a "monad of no return" proposal that would remove return from Monad and just use Applicative's pure |
2021-11-26 14:03:20 +0100 | <dminuoso> | What's the idiomatic way to provide an uninitialized CString buffer of a specified size? |
2021-11-26 14:03:39 +0100 | <dminuoso> | Something like `withBuf 10 $ \ptr -> ...` |
2021-11-26 14:04:24 +0100 | <geekosaur> | isn't this the use case for allocaBytes? |
2021-11-26 14:05:06 +0100 | <dminuoso> | Ohh. Yes. |
2021-11-26 14:05:14 +0100 | <dminuoso> | That's what I was looking for. thanks. |
2021-11-26 14:07:46 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 14:08:34 +0100 | coolnickname | (~omg@user/coolnickname) (Ping timeout: 268 seconds) |
2021-11-26 14:09:33 +0100 | narendra | (~user@2a02:8109:b63f:ff7c::56c2) |
2021-11-26 14:10:11 +0100 | AlexNoo_ | AlexNoo |
2021-11-26 14:10:39 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 14:11:03 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) |
2021-11-26 14:11:55 +0100 | coolnickname | (~coolnickn@73.194.7.51.dyn.plus.net) |
2021-11-26 14:13:19 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-26 14:13:45 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 14:18:06 +0100 | <nf> | :t \l f -> do a <- use l; l <~ f a :: MonadState s m => (forall f. Functor f => (a -> f a) -> s -> f s) -> (a -> m a) -> m () |
2021-11-26 14:18:07 +0100 | <lambdabot> | error: |
2021-11-26 14:18:07 +0100 | <lambdabot> | • Couldn't match type ‘Const a s’ with ‘Identity s’ |
2021-11-26 14:18:07 +0100 | <lambdabot> | Expected type: ASetter s s a b |
2021-11-26 14:18:18 +0100 | <nf> | why doesn't this typecheck? |
2021-11-26 14:18:39 +0100 | <nf> | i don't know how to say more explicitly that i want l to be polymorphic in f |
2021-11-26 14:19:00 +0100 | <nf> | (a workaround is to use cloneLens l but i'd like to understand why that is needed) |
2021-11-26 14:19:31 +0100 | <dminuoso> | % :t use |
2021-11-26 14:19:31 +0100 | <yahb> | dminuoso: MonadState s m => Getting a s a -> m a |
2021-11-26 14:19:33 +0100 | <dminuoso> | % :i Getting |
2021-11-26 14:19:33 +0100 | <yahb> | dminuoso: type Getting :: * -> * -> * -> *; type Getting r s a = (a -> Const r a) -> s -> Const r s; -- Defined in `Control.Lens.Getter' |
2021-11-26 14:19:39 +0100 | <dminuoso> | % :t (<~) |
2021-11-26 14:19:39 +0100 | <yahb> | dminuoso: MonadState s m => ASetter s s a b -> m b -> m () |
2021-11-26 14:19:42 +0100 | <dminuoso> | % :i ASetter |
2021-11-26 14:19:42 +0100 | <yahb> | dminuoso: type ASetter :: * -> * -> * -> * -> *; type ASetter s t a b = (a -> Identity b) -> s -> Identity t; -- Defined in `Control.Lens.Setter' |
2021-11-26 14:20:10 +0100 | <dminuoso> | nf: The problem has nothing to do with f, but the consumption of it. |
2021-11-26 14:20:25 +0100 | <nf> | i mean f the functor, not f the second argument |
2021-11-26 14:20:28 +0100 | <dminuoso> | Ah |
2021-11-26 14:21:02 +0100 | <dminuoso> | Mm this is actually curious |
2021-11-26 14:21:13 +0100 | <nf> | it seems to me that forall f. Functor f => (a -> f a) -> s -> f s should unify with both ASetter and Getting |
2021-11-26 14:21:40 +0100 | <nf> | then again i have no idea how rank-n types work in ghc |
2021-11-26 14:21:43 +0100 | <dminuoso> | Im idly wondering whether this has to do with simplified subsumption |
2021-11-26 14:22:14 +0100 | <hpc> | :t let foo :: MonadState s m => (forall f. Functor f => (a -> f a) -> s -> f s) -> (a -> m a) -> m (); foo = \l f -> do a <- use l; l <~ f a in foo |
2021-11-26 14:22:15 +0100 | <lambdabot> | MonadState s m => (forall (f :: * -> *). Functor f => (a -> f a) -> s -> f s) -> (a -> m a) -> m () |
2021-11-26 14:22:15 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Quit: ZNC 1.8.2 - https://znc.in) |
2021-11-26 14:22:24 +0100 | <hpc> | it's a syntax issue |
2021-11-26 14:22:24 +0100 | <nf> | o_o |
2021-11-26 14:22:32 +0100 | <nf> | lol |
2021-11-26 14:22:33 +0100 | <hpc> | your type signature is applying to a, or f a, or something |
2021-11-26 14:22:35 +0100 | <hpc> | not to the whole lambda |
2021-11-26 14:22:50 +0100 | <nf> | ...oh my god |
2021-11-26 14:22:54 +0100 | <nf> | thanks. |
2021-11-26 14:22:58 +0100 | <hpc> | :D |
2021-11-26 14:23:04 +0100 | <dminuoso> | Oh hah |
2021-11-26 14:23:20 +0100 | nf | writes 100 times "i will never assume the precedence of :: again" |
2021-11-26 14:23:21 +0100 | dminuoso | still prefers `optics` |
2021-11-26 14:23:30 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 14:23:53 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
2021-11-26 14:24:00 +0100 | <hpc> | nf: yeah, i have been burned by that enough times that any use of inline "::" without parens is instantly suspect |
2021-11-26 14:24:10 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2021-11-26 14:25:04 +0100 | <nf> | and now for a follow-up question: what magic set of extensions do i have to turn on to make ghc infer a type for foo? |
2021-11-26 14:25:18 +0100 | <dminuoso> | nf: DoesNotExist |
2021-11-26 14:25:19 +0100 | <nf> | :t let foo = \l f -> do a <- use l; l <~ f a in foo |
2021-11-26 14:25:20 +0100 | <lambdabot> | error: |
2021-11-26 14:25:20 +0100 | <lambdabot> | • Couldn't match type ‘Const t1 s1’ with ‘Identity s1’ |
2021-11-26 14:25:20 +0100 | <lambdabot> | Expected type: ASetter s1 s1 t1 b1 |
2021-11-26 14:25:21 +0100 | <hpc> | iirc higher-rank types can't be inferred |
2021-11-26 14:25:27 +0100 | <nf> | not even rank 2? |
2021-11-26 14:25:38 +0100 | <dminuoso> | rank 2 can, but I dont think that algorithm has been implemented in GHC |
2021-11-26 14:25:43 +0100 | <dminuoso> | IIRC |
2021-11-26 14:25:46 +0100 | <nf> | ok |
2021-11-26 14:25:56 +0100 | <hpc> | there used to be two extensions |
2021-11-26 14:26:00 +0100 | <hpc> | Rank2Types and RankNTypes |
2021-11-26 14:26:15 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 265 seconds) |
2021-11-26 14:26:22 +0100 | <hpc> | but that was aaaaaages ago and i hadn't ever needed to use them |
2021-11-26 14:26:35 +0100 | <hpc> | maybe the inference algorithm used to exist? |
2021-11-26 14:27:12 +0100 | <nf> | https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/rank_polymorphism.html#type-inference |
2021-11-26 14:27:22 +0100 | <nf> | apparently not doable without annotating |
2021-11-26 14:27:34 +0100 | bsdbandit | (~bwell@users.757.org) |
2021-11-26 14:27:56 +0100 | <dminuoso> | nf: Yeah for arbitrary rank that is true |
2021-11-26 14:28:15 +0100 | <dminuoso> | This is also worth a skim https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/putting.pdf |
2021-11-26 14:28:19 +0100 | <nf> | yeah i saw that |
2021-11-26 14:28:32 +0100 | jushurr | (~human@user/jushur) (Quit: payload updated) |
2021-11-26 14:29:33 +0100 | <geekosaur> | the inference algo never existed. ages ago ghc only supported rank-2 types; eventually that was extended to rank-N |
2021-11-26 14:29:57 +0100 | <dminuoso> | Also, rank 2 type inference decideability really depends on language features I think |
2021-11-26 14:30:05 +0100 | <geekosaur> | iirc adding rank-2 inference has been considered and they decided it was a lot of complexity for somnething that would rarely if ever be used |
2021-11-26 14:30:07 +0100 | <dminuoso> | So perhaps interaction with other extensions rendered that impossible |
2021-11-26 14:30:37 +0100 | <nf> | geekosaur: a reasonable choice |
2021-11-26 14:31:10 +0100 | <hpc> | i wonder if it would lead to confusing type errors along the lines of instance Num b => Num (a -> b) and such |
2021-11-26 14:31:27 +0100 | <dminuoso> | Realistically you should document the type signature anyway. |
2021-11-26 14:31:50 +0100 | <dminuoso> | So lack of inference just means you have to think for yourself rather than asking GHC `f :: _` |
2021-11-26 14:32:05 +0100 | <dminuoso> | Also: If you used `optics` this problem wouldn't appear. :P |
2021-11-26 14:32:21 +0100 | nf | is now reading https://hackage.haskell.org/package/optics-0.4/docs/Optics.html |
2021-11-26 14:32:25 +0100 | <dminuoso> | Since that brings everything back to rank1. |
2021-11-26 14:33:05 +0100 | <dminuoso> | (Or rather, the higher rank stuff is hidden behind newtypes) |
2021-11-26 14:33:46 +0100 | <nf> | i don't think i'm mature enough for optics yet. i haven't grown out of my "LENSES COMPOSE LIKE FUNCTIONS THIS IS SO COOL!!!11" phase |
2021-11-26 14:34:27 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-26 14:34:41 +0100 | <dminuoso> | optics do too! |
2021-11-26 14:34:53 +0100 | <dminuoso> | It's just hidden behind an operator :p |
2021-11-26 14:34:55 +0100 | <nf> | yes but not transparently |
2021-11-26 14:34:58 +0100 | <dminuoso> | heh |
2021-11-26 14:35:17 +0100 | <hpc> | what you need is a healthy dose of spring framework :D |
2021-11-26 14:35:27 +0100 | <dminuoso> | This sort of mathematical beauty and symmetry of lens/optics always amazes me. |
2021-11-26 14:36:55 +0100 | <dminuoso> | nf: Here's a selling point then: optics use a uniform profunctor representation, giving you more beauty inside! :p |
2021-11-26 14:37:06 +0100 | <dminuoso> | With lens its a mix of VL, mixed and profunctor stuff. :p |
2021-11-26 14:37:25 +0100 | slowButPresent | (~slowButPr@user/slowbutpresent) |
2021-11-26 14:37:27 +0100 | <nf> | if only i wasn't so superficial |
2021-11-26 14:37:48 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 14:39:28 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 14:39:41 +0100 | Hecate_ | Hecate |
2021-11-26 14:41:12 +0100 | <boxscape_> | is there a better way to write `f <=< pure g <=< h`? |
2021-11-26 14:41:23 +0100 | jgeerds | (~jgeerds@55d45b75.access.ecotel.net) (Ping timeout: 250 seconds) |
2021-11-26 14:41:48 +0100 | <boxscape_> | oh |
2021-11-26 14:41:52 +0100 | <boxscape_> | it's just `f . g <=< h` |
2021-11-26 14:42:59 +0100 | <lortabac> | regarding rank-n types, you can have full inference if you only allow them hidden in a data-type (as we currently do for existentials) |
2021-11-26 14:43:00 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 14:43:36 +0100 | <lortabac> | which IMO is a good compromise, but it's not what GHC decided to do |
2021-11-26 14:47:53 +0100 | jinsun__ | jinsun |
2021-11-26 14:51:18 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-26 14:53:52 +0100 | mc47 | (~mc47@xmonad/TheMC47) (Remote host closed the connection) |
2021-11-26 14:54:27 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Remote host closed the connection) |
2021-11-26 14:55:03 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 14:56:43 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 14:57:02 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 14:58:42 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 14:59:01 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 15:00:37 +0100 | arjun | (~user@user/arjun) |
2021-11-26 15:02:45 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 15:02:46 +0100 | jonathanx_ | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Read error: Connection reset by peer) |
2021-11-26 15:03:04 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 15:04:03 +0100 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2021-11-26 15:04:26 +0100 | smorgasbord | (buggy@thunix.net) |
2021-11-26 15:04:55 +0100 | smorgasbord | (buggy@thunix.net) (Changing host) |
2021-11-26 15:04:55 +0100 | smorgasbord | (buggy@user/smorgasbord) |
2021-11-26 15:05:15 +0100 | reumeth | (~reumeth@user/reumeth) |
2021-11-26 15:05:32 +0100 | <smorgasbord> | hello! I wanted to know if there was anyway of pattern matching a Data constructor using a wildcard, and using the exact same match later? |
2021-11-26 15:06:10 +0100 | <smorgasbord> | considering that I have something like Data Foo = Bar int | Baz char |
2021-11-26 15:07:12 +0100 | <smorgasbord> | anyway I can do something like `hello (WC x) = WC 10` |
2021-11-26 15:07:38 +0100 | <dminuoso> | Of course. |
2021-11-26 15:07:41 +0100 | <dminuoso> | Exactly like that. |
2021-11-26 15:08:01 +0100 | <dminuoso> | You're not really "reusing the exact same match", you're just building the same data constructor back again. |
2021-11-26 15:08:02 +0100 | <boxscape_> | ...but not if WC is supposed to match both `Bar` and `Baz` |
2021-11-26 15:08:06 +0100 | <dminuoso> | Ah. |
2021-11-26 15:08:24 +0100 | <dminuoso> | You read the pseudocode better than me I guess |
2021-11-26 15:08:38 +0100 | <smorgasbord> | I get an error when I do it exactly like that |
2021-11-26 15:08:41 +0100 | <dminuoso> | smorgasbord: What would that even do if the data constructor was `Baz`? |
2021-11-26 15:08:42 +0100 | <kuribas> | 10 is not a char ... |
2021-11-26 15:08:48 +0100 | <dminuoso> | smorgasbord: You can't construct `Baz 10` |
2021-11-26 15:08:53 +0100 | <kuribas> | maybe he wants a Functor? |
2021-11-26 15:08:57 +0100 | <smorgasbord> | dminuoso: it would have given an error :P (Not the best example) |
2021-11-26 15:09:13 +0100 | <hpc> | maybe you want @? |
2021-11-26 15:09:16 +0100 | <smorgasbord> | WC is indeed supposed to match both |
2021-11-26 15:09:20 +0100 | <hpc> | @let data Foo = Bar Int | Baz Char |
2021-11-26 15:09:20 +0100 | <lambdabot> | Defined. |
2021-11-26 15:09:30 +0100 | <dminuoso> | smorgasbord: If you have something like `data F a = F a | G a`, you can write a Functor implementation and use `fmap` |
2021-11-26 15:09:30 +0100 | <hpc> | @let f x@(Bar n) = (n, x) |
2021-11-26 15:09:31 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 15:09:31 +0100 | <lambdabot> | Defined. |
2021-11-26 15:09:35 +0100 | <hpc> | > f (Bar 10) |
2021-11-26 15:09:36 +0100 | <lambdabot> | error: |
2021-11-26 15:09:36 +0100 | <lambdabot> | Ambiguous occurrence ‘f’ |
2021-11-26 15:09:36 +0100 | <lambdabot> | It could refer to |
2021-11-26 15:09:37 +0100 | alx741 | (~alx741@186.178.109.84) (Quit: alx741) |
2021-11-26 15:09:39 +0100 | <hpc> | ugh |
2021-11-26 15:09:48 +0100 | <hpc> | @let foo x@(Bar n) = (n, x) |
2021-11-26 15:09:49 +0100 | <lambdabot> | Defined. |
2021-11-26 15:09:52 +0100 | <hpc> | > foo (Bar 10) |
2021-11-26 15:09:53 +0100 | <lambdabot> | error: |
2021-11-26 15:09:53 +0100 | <lambdabot> | • No instance for (Show Foo) |
2021-11-26 15:09:53 +0100 | <lambdabot> | arising from a use of ‘show_M8911773327894737618’ |
2021-11-26 15:10:01 +0100 | <hpc> | you get the idea |
2021-11-26 15:10:19 +0100 | <smorgasbord> | hpc: I'm really sorry, but I don't :( |
2021-11-26 15:10:33 +0100 | <dminuoso> | hpc: It wouldn't match both though |
2021-11-26 15:10:45 +0100 | <smorgasbord> | x@() gives me access to the whole datum |
2021-11-26 15:10:45 +0100 | <dminuoso> | smorgasbord: consider this: |
2021-11-26 15:10:52 +0100 | <smorgasbord> | and Bar only is a specific constructor |
2021-11-26 15:11:02 +0100 | alx741 | (~alx741@186.178.109.84) |
2021-11-26 15:11:03 +0100 | <dminuoso> | % data OneOf a = This a | That a |
2021-11-26 15:11:04 +0100 | <yahb> | dminuoso: |
2021-11-26 15:11:07 +0100 | <smorgasbord> | I want access tothe constructor I don't know a priori |
2021-11-26 15:11:14 +0100 | <smorgasbord> | I only know the arity of the contructor |
2021-11-26 15:11:27 +0100 | <dminuoso> | % instance Functor OneOf where fmap f (This a) = This (f a); fmap f (That a) = That (f a) |
2021-11-26 15:11:28 +0100 | <yahb> | dminuoso: |
2021-11-26 15:11:47 +0100 | <dminuoso> | % fmap (+1) (This 10) |
2021-11-26 15:11:47 +0100 | <yahb> | dminuoso: ; <interactive>:11:1: error:; * No instance for (Show (OneOf Integer)) arising from a use of `print'; * In a stmt of an interactive GHCi command: print it |
2021-11-26 15:11:49 +0100 | <kuribas> | smorgasbord: short answer: you cannot. |
2021-11-26 15:11:56 +0100 | <dminuoso> | % data OneOf a = This a | That a deriving Show |
2021-11-26 15:11:56 +0100 | <yahb> | dminuoso: |
2021-11-26 15:11:59 +0100 | <dminuoso> | % instance Functor OneOf where fmap f (This a) = This (f a); fmap f (That a) = That (f a) |
2021-11-26 15:11:59 +0100 | <yahb> | dminuoso: |
2021-11-26 15:12:02 +0100 | <dminuoso> | % fmap (+1) (This 10) |
2021-11-26 15:12:03 +0100 | <yahb> | dminuoso: This 11 |
2021-11-26 15:12:05 +0100 | <dminuoso> | % fmap (+1) (That 10) |
2021-11-26 15:12:05 +0100 | <yahb> | dminuoso: That 11 |
2021-11-26 15:12:13 +0100 | <kuribas> | smorgasbord: larger answer, you can with some hack but shouldn't. |
2021-11-26 15:12:15 +0100 | <dminuoso> | % "foo" <$ This 10 |
2021-11-26 15:12:15 +0100 | <yahb> | dminuoso: This "foo" |
2021-11-26 15:12:19 +0100 | <dminuoso> | % "foo" <$ That [1,2,3] |
2021-11-26 15:12:19 +0100 | <yahb> | dminuoso: That "foo" |
2021-11-26 15:12:22 +0100 | <dminuoso> | smorgasbord: ^- this perhaps? |
2021-11-26 15:14:33 +0100 | acidjnk_new | (~acidjnk@p200300d0c7271e128015eb8f81d9ba9d.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-26 15:16:23 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 15:16:41 +0100 | <smorgasbord> | I don't understand what you've written dminuoso |
2021-11-26 15:16:54 +0100 | <smorgasbord> | what is the `<$` operator supposed to do? |
2021-11-26 15:18:12 +0100 | <dminuoso> | smorgasbord: That's just fmap with a constant value. |
2021-11-26 15:18:29 +0100 | <dminuoso> | % fmap (const "foo") This [1,2,3] |
2021-11-26 15:18:29 +0100 | <yahb> | dminuoso: "foo" |
2021-11-26 15:18:33 +0100 | <dminuoso> | Uh |
2021-11-26 15:18:37 +0100 | <dminuoso> | % fmap (const "foo") (This [1,2,3]) |
2021-11-26 15:18:37 +0100 | <yahb> | dminuoso: This "foo" |
2021-11-26 15:21:34 +0100 | slac59793 | (~slack1256@181.43.229.27) |
2021-11-26 15:21:57 +0100 | arjun | (~user@user/arjun) (ERC 5.4.1 (IRC client for GNU Emacs 29.0.50)) |
2021-11-26 15:23:32 +0100 | slack1256 | (~slack1256@186.11.45.199) (Ping timeout: 240 seconds) |
2021-11-26 15:27:49 +0100 | justache | (~justache@user/justache) (Read error: Connection reset by peer) |
2021-11-26 15:27:49 +0100 | <smorgasbord> | ah I missed the line in dminuoso's code about the functor |
2021-11-26 15:28:07 +0100 | <smorgasbord> | I think I will have to understand functors then, another person I had asked about this also suggested the same |
2021-11-26 15:28:12 +0100 | <smorgasbord> | thank you! |
2021-11-26 15:28:40 +0100 | <dminuoso> | smorgasbord: In simple terms, any data type where you can "map over its values" in a sensible fashion is called a functor. |
2021-11-26 15:28:44 +0100 | justache | (~justache@user/justache) |
2021-11-26 15:29:07 +0100 | <dminuoso> | So for instance, we can map over the values of a list and modify them |
2021-11-26 15:29:16 +0100 | <dminuoso> | % fmap (+1) [1,2,3,4] |
2021-11-26 15:29:16 +0100 | <yahb> | dminuoso: [2,3,4,5] |
2021-11-26 15:29:39 +0100 | <smorgasbord> | right, this looks like a normal map that I'm familiar with from other languages |
2021-11-26 15:29:43 +0100 | <dminuoso> | Yup. |
2021-11-26 15:29:48 +0100 | <dminuoso> | We just have an implied law |
2021-11-26 15:30:22 +0100 | <dminuoso> | Which we can think of as saying "fmap may not change the structure of the thing", for instance fmap on list is not allowed to change the element order, or drop elements |
2021-11-26 15:31:07 +0100 | <smorgasbord> | so in a tree like structure, I can't replace elements with fmap? |
2021-11-26 15:31:12 +0100 | <xsperry> | smorgasbord, unlike a normal map it can be used on a lot more than just lists or collections |
2021-11-26 15:31:36 +0100 | max22- | (~maxime@2a01cb0883359800917d653070f119e8.ipv6.abo.wanadoo.fr) |
2021-11-26 15:31:38 +0100 | <smorgasbord> | that could be a problem (an x-y problem) because I want to use this to make changes to a tree like structure with a lot of different constructors |
2021-11-26 15:32:11 +0100 | <boxscape_> | Tree-like structures are very often Functors |
2021-11-26 15:32:27 +0100 | <boxscape_> | so you can typically replace elements in a tree with fmap |
2021-11-26 15:32:29 +0100 | <geekosaur> | but if you want to make changes you may want Traversable instead |
2021-11-26 15:32:40 +0100 | <geekosaur> | depending on the changes |
2021-11-26 15:32:55 +0100 | <xsperry> | > fmap (*10) $ M.fromList [("one", 1), ("two", 2)] |
2021-11-26 15:32:57 +0100 | <lambdabot> | fromList [("one",10),("two",20)] |
2021-11-26 15:33:17 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2021-11-26 15:34:03 +0100 | kennyd | (~bc8165b6@217.29.117.252) |
2021-11-26 15:34:22 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-26 15:35:00 +0100 | <smorgasbord> | I actually am trying to simplify expressions in an implementation of Montague's intensional logic. So what I was trying to do, was take lambda expressions in the language when applied, which look like `Appl (Lmbd (LVar 'x') <body-of-l-expr>) y`, where y will replace every instance of (LVar 'x') in the expression. |
2021-11-26 15:35:24 +0100 | <smorgasbord> | I basically wanted to take this syntax tree and return <body-of-expr-with-y-replaxing-x> |
2021-11-26 15:36:28 +0100 | <smorgasbord> | The recursive procedure needed me to deconstruct to act on the args of the constructor, but there are a lot of constructors, so I did not want to write the recursive call manually for each constructor |
2021-11-26 15:37:14 +0100 | <mniip> | this is a monadic pattern actually |
2021-11-26 15:37:20 +0100 | bliminse | (~bliminse@host86-188-36-178.range86-188.btcentralplus.com) (Quit: leaving) |
2021-11-26 15:37:37 +0100 | <smorgasbord> | I am new to haskell and scared of the word 'monad' xD |
2021-11-26 15:37:44 +0100 | <mniip> | do be |
2021-11-26 15:38:44 +0100 | <mniip> | saying that doesn't actually save you from writing out every constructor though |
2021-11-26 15:38:57 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) |
2021-11-26 15:39:08 +0100 | <mniip> | I don't think the deriving mechanism is strong enough |
2021-11-26 15:39:24 +0100 | <justsomeguy> | b/c |
2021-11-26 15:39:27 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 260 seconds) |
2021-11-26 15:39:41 +0100 | <smorgasbord> | where should I start if I want to solve this with the monadic approach? |
2021-11-26 15:39:50 +0100 | <smorgasbord> | should I learn about monads in general or something specific? |
2021-11-26 15:39:54 +0100 | <mniip> | although, if this is a lambda calculus, you have to be careful with your descent |
2021-11-26 15:40:06 +0100 | <mniip> | because you can hit a lambda that shadows the identifier you're currently substituting |
2021-11-26 15:40:26 +0100 | <mniip> | so it's not a straightforward tree traversal |
2021-11-26 15:40:28 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
2021-11-26 15:40:36 +0100 | <smorgasbord> | mniip: you're right, I had not considered that earlier. Thank you for that! |
2021-11-26 15:41:05 +0100 | kennyd | (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/ (Ping timeout)) |
2021-11-26 15:41:08 +0100 | <mniip> | this is definitely not a "general monads" type situation no, rather a fairly niche application of them |
2021-11-26 15:41:41 +0100 | bliminse | (~bliminse@host86-188-36-178.range86-188.btcentralplus.com) |
2021-11-26 15:42:03 +0100 | <mniip> | @let data Expr v = Var v | App v v deriving (Functor, Show) |
2021-11-26 15:42:04 +0100 | <lambdabot> | Defined. |
2021-11-26 15:43:19 +0100 | <mniip> | @let instance Monad Expr where { return = Var; Var v >>= h = h v; App f x >>= h = App (f >>= h) (x >>= h) }; instance Applicative Expr where { pure = return; (<*>) = ap } |
2021-11-26 15:43:19 +0100 | <lambdabot> | .L.hs:156:16: error: |
2021-11-26 15:43:19 +0100 | <lambdabot> | Ambiguous occurrence ‘Expr’ |
2021-11-26 15:43:19 +0100 | <lambdabot> | It could refer to |
2021-11-26 15:43:24 +0100 | <mniip> | uh oh |
2021-11-26 15:43:29 +0100 | <mniip> | but yeah basically this |
2021-11-26 15:44:16 +0100 | <smorgasbord> | well looks fairly complicated for the me right now. I will do it manually for the moment and try to come back to rewrite it later. thanks for the help everyone! |
2021-11-26 15:44:44 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Quit: The Lounge - https://thelounge.chat) |
2021-11-26 15:45:23 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2021-11-26 15:48:06 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) (Client Quit) |
2021-11-26 15:48:13 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) |
2021-11-26 15:48:43 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) |
2021-11-26 15:48:52 +0100 | coolnickname | (~coolnickn@73.194.7.51.dyn.plus.net) (Quit: ZNC 1.8.1 - https://znc.in) |
2021-11-26 15:49:17 +0100 | Katarushisu | (~Katarushi@cpc147334-finc20-2-0-cust27.4-2.cable.virginm.net) |
2021-11-26 15:49:54 +0100 | coolnickname | (~coolnickn@73.194.7.51.dyn.plus.net) |
2021-11-26 15:50:57 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 15:53:27 +0100 | eggplantade | (~Eggplanta@108-201-191-115.lightspeed.sntcca.sbcglobal.net) (Ping timeout: 260 seconds) |
2021-11-26 15:55:29 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 16:02:24 +0100 | kennyd | (~bc8165b6@217.29.117.252) |
2021-11-26 16:07:41 +0100 | ph88_ | (~ph88@2a02:8109:9e00:71d0:15f2:638c:7ed7:4999) |
2021-11-26 16:11:32 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 16:11:51 +0100 | ph88^ | (~ph88@2a02:8109:9e00:71d0:6dfb:d68d:ebe:207) (Ping timeout: 264 seconds) |
2021-11-26 16:12:02 +0100 | narendra | (~user@2a02:8109:b63f:ff7c::56c2) (Ping timeout: 240 seconds) |
2021-11-26 16:13:25 +0100 | narendra | (~user@2a02:8109:b63f:ff7c::56c2) |
2021-11-26 16:16:09 +0100 | mcgroin | (~mcgroin@roc37-h01-176-170-197-243.dsl.sta.abo.bbox.fr) (Quit: WeeChat 3.3) |
2021-11-26 16:18:54 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 16:19:06 +0100 | Kaiepi | (~Kaiepi@156.34.44.192) (Ping timeout: 245 seconds) |
2021-11-26 16:23:48 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 16:24:40 +0100 | alx741 | (~alx741@186.178.109.84) (Ping timeout: 265 seconds) |
2021-11-26 16:25:24 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
2021-11-26 16:27:46 +0100 | <maralorn> | Does hackage enforce that uploaded versions are increasing? |
2021-11-26 16:28:32 +0100 | narendra | (~user@2a02:8109:b63f:ff7c::56c2) (Ping timeout: 240 seconds) |
2021-11-26 16:28:42 +0100 | <maralorn> | I need to backport a fix to an older version of my lib in a setting where I can‘t yet use a newer version of the lib because of dependency clashes. |
2021-11-26 16:30:06 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) (Quit: Leaving) |
2021-11-26 16:30:32 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 16:30:33 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 16:30:33 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 16:32:22 +0100 | <hpc> | you can add patch releases for previous versions, yes |
2021-11-26 16:33:40 +0100 | boxscape_ | (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Quit: Connection closed) |
2021-11-26 16:35:21 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 16:35:57 +0100 | coolnickname | (~coolnickn@73.194.7.51.dyn.plus.net) (Ping timeout: 268 seconds) |
2021-11-26 16:37:12 +0100 | alx741 | (~alx741@181.196.69.161) |
2021-11-26 16:40:25 +0100 | kupi | (uid212005@id-212005.hampstead.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 16:42:20 +0100 | <maerwald> | if you couldn't, then that would be a disaster for PVP :D |
2021-11-26 16:42:30 +0100 | <maerwald> | since the only reason of having PVP is backporting patches |
2021-11-26 16:44:32 +0100 | alx741 | (~alx741@181.196.69.161) (Ping timeout: 240 seconds) |
2021-11-26 16:44:53 +0100 | <kennyd> | how come haskell doesn't have built-in fixed sized arrays? even C has them |
2021-11-26 16:45:22 +0100 | <kennyd> | or unsigned integral types.. seems like it would be in haskell spirit to make these restrictions at compile time |
2021-11-26 16:46:01 +0100 | EvanR | (~evan@user/evanr) |
2021-11-26 16:46:30 +0100 | <hpc> | Word ~ Int, Word64 ~ Int64, and Natural ~ Integer |
2021-11-26 16:47:09 +0100 | <hpc> | and C doesn't really have fixed size arrays |
2021-11-26 16:47:26 +0100 | <hpc> | it has pointers to memory that's been allocated up to a fixed length :P |
2021-11-26 16:47:33 +0100 | <maerwald> | I think it does |
2021-11-26 16:47:59 +0100 | <maerwald> | it's just when you pass an array to a function it degrades to a pointer |
2021-11-26 16:48:07 +0100 | <hpc> | the size doesn't show up in the type of it, either |
2021-11-26 16:48:36 +0100 | <kennyd> | hpc, no, C has real fixed size arrays. and you can maintain the size of the array in function declaration. it just isn't common to do so |
2021-11-26 16:48:54 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 16:49:16 +0100 | <kennyd> | int func(int (*)[10]) <- you can only pass a pointer to array of 10 ints |
2021-11-26 16:49:17 +0100 | <EvanR> | pass by pointer degradation |
2021-11-26 16:50:47 +0100 | <kennyd> | and func knows the size pointer points to, at compile time |
2021-11-26 16:50:54 +0100 | <kennyd> | size of the array pointer points to* |
2021-11-26 16:51:57 +0100 | <hpc> | https://paste.tomsmeding.com/uygLC9YK compiled for me |
2021-11-26 16:52:14 +0100 | <kennyd> | hpc, that is not what I wrote |
2021-11-26 16:52:43 +0100 | <kennyd> | int arg[10] is an int pointer in this context. int (*arg)[10] is a pointer to an array of 10 ints |
2021-11-26 16:52:51 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
2021-11-26 16:52:52 +0100 | <maerwald> | hpc: you get compile time warnings with real arrays in C |
2021-11-26 16:53:03 +0100 | <maerwald> | in the initializer and in the accessing |
2021-11-26 16:53:17 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 16:53:43 +0100 | <lortabac> | kennyd: Haskell has arrays, but they are less useful than in other languages, since they either require mutability or copying |
2021-11-26 16:53:59 +0100 | justsomeguy | (~justsomeg@user/justsomeguy) (Quit: WeeChat 3.3) |
2021-11-26 16:54:02 +0100 | <hpc> | warnings don't count :P |
2021-11-26 16:54:16 +0100 | <maerwald> | hpc: you can turn them into errors |
2021-11-26 16:54:22 +0100 | <kennyd> | well C standard doesn't distinguish between a warning and compile error. it just talks about diagnostics |
2021-11-26 16:54:56 +0100 | <lortabac> | kennyd: the common use case for arrays is when you have values that you read frequently and modify seldom |
2021-11-26 16:55:03 +0100 | <kennyd> | lortabac, I think immutable arrays are still useful. I'm just a bit puzzled why we need third party libraries to restrict the size |
2021-11-26 16:55:44 +0100 | <hpc> | arrays are part of base |
2021-11-26 16:55:49 +0100 | <maerwald> | it would have been nice though if passing arrays to functions doesn't degrade them to pointers |
2021-11-26 16:56:18 +0100 | <lortabac> | kennyd: what do you mean by third party libraries? |
2021-11-26 16:56:19 +0100 | <maerwald> | that makes little sense to me... sure, cast them to a pointer if you want to do something unsafe |
2021-11-26 16:56:25 +0100 | <kennyd> | hpc which ones? I see half a dozen array/vector libraries on hackage |
2021-11-26 16:56:47 +0100 | <maerwald> | well, haskells 'array' package is... let's say "special" |
2021-11-26 16:56:59 +0100 | <lortabac> | :) |
2021-11-26 16:57:11 +0100 | <hpc> | argh, misread hoogle |
2021-11-26 16:57:14 +0100 | <hpc> | https://hoogle.haskell.org/?hoogle=Array |
2021-11-26 16:57:14 +0100 | alx741 | (~alx741@186.178.108.213) |
2021-11-26 16:57:21 +0100 | <hpc> | (second item) |
2021-11-26 16:57:23 +0100 | <maerwald> | if you manage to use it in real world code without swearing, I'll buy you a beer |
2021-11-26 16:57:49 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
2021-11-26 16:58:05 +0100 | <hpc> | i guess you can use GHC.Arr if you want to code like a pirate |
2021-11-26 16:58:08 +0100 | <lortabac> | maybe we should reformulate kennyd's question as "why does Data.Array suck?" |
2021-11-26 16:58:09 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 16:58:29 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 16:58:35 +0100 | <hpc> | also there's https://hackage.haskell.org/package/vector |
2021-11-26 16:59:09 +0100 | <hpc> | Data.Array sucks because it's too generic |
2021-11-26 16:59:30 +0100 | <maerwald> | lortabac: because someone wrote it that way |
2021-11-26 16:59:37 +0100 | <hpc> | being able to index an array by Ordering isn't worth the tuple nonsense and off-by-one errors |
2021-11-26 17:00:12 +0100 | <maerwald> | it's very common for programmers to only think about properties and care nothing about ergonomics |
2021-11-26 17:00:23 +0100 | <maerwald> | that's how we got nix too |
2021-11-26 17:00:35 +0100 | <hpc> | > array (LT, GT) [(LT, 1), (EQ, 2), (GT, 3)] |
2021-11-26 17:00:37 +0100 | <lambdabot> | array (LT,GT) [(LT,1),(EQ,2),(GT,3)] |
2021-11-26 17:01:20 +0100 | <hpc> | > @let wat = array (LT, GT) [(LT, 1), (EQ, 2), (GT, 3)] |
2021-11-26 17:01:21 +0100 | <lambdabot> | <hint>:1:1: error: parse error on input ‘@’ |
2021-11-26 17:01:27 +0100 | <hpc> | @let wat = array (LT, GT) [(LT, 1), (EQ, 2), (GT, 3)] |
2021-11-26 17:01:28 +0100 | <lambdabot> | Defined. |
2021-11-26 17:01:39 +0100 | <hpc> | > wat ! (compare "yes" "no") |
2021-11-26 17:01:40 +0100 | <lambdabot> | 3 |
2021-11-26 17:01:48 +0100 | <lortabac> | kennyd: regarding the ability to check the size at compile-time, it's certainly doable, but it takes you quickly to singletons territory, which is not something everybody is willing to endure :) |
2021-11-26 17:01:48 +0100 | <hpc> | features! |
2021-11-26 17:01:49 +0100 | <hololeap> | kennyd: use vector-sized. it keeps the size of the array at the type level, and it's well used and well maintained |
2021-11-26 17:02:24 +0100 | <lortabac> | it's definitely not within "simple Haskell" |
2021-11-26 17:03:24 +0100 | <hpc> | vector-sized also has such neat definitions as https://hackage.haskell.org/package/vector-sized-1.5.0/docs/Data-Vector-Sized.html#v:-43--43- |
2021-11-26 17:03:32 +0100 | <hpc> | try writing that one in C |
2021-11-26 17:03:41 +0100 | <kennyd> | hololeap, ok. for context, I'm building a toy chess engine as a practice |
2021-11-26 17:04:26 +0100 | <lortabac> | these type-level tricks are good as long as all the sizes can be determined statically |
2021-11-26 17:04:36 +0100 | <hololeap> | yeah vector-sized would be perfect for that. I built a toy game of life board with it |
2021-11-26 17:05:06 +0100 | <EvanR> | for a toy chess engine you may be served by making a "8 of something" packed data type |
2021-11-26 17:05:17 +0100 | <hololeap> | there is also that option |
2021-11-26 17:05:31 +0100 | <EvanR> | since it's only 8 |
2021-11-26 17:05:35 +0100 | <lortabac> | once you start serializing or reading arrays of unknown size from a database you start suffering |
2021-11-26 17:05:38 +0100 | <hpc> | you can also do away with the arrays entirely, and use bit masks |
2021-11-26 17:05:53 +0100 | <hpc> | there are 64 squares on a chessboard, and guess what type has 64 booleans packed into it |
2021-11-26 17:06:00 +0100 | <EvanR> | lol |
2021-11-26 17:06:01 +0100 | <hpc> | stockfish uses that extensively |
2021-11-26 17:06:24 +0100 | <EvanR> | if only the CPU came with a chess instruction |
2021-11-26 17:06:49 +0100 | <EvanR> | wait... microcode xD |
2021-11-26 17:06:51 +0100 | <maerwald> | how does bool help on a chess board... "there's a piece on the square"? |
2021-11-26 17:06:53 +0100 | <hpc> | EvanR: it's on intel's roadmap right after the http-post-xml-to-facebook instruction |
2021-11-26 17:07:28 +0100 | <EvanR> | use several words one for each piece-mask |
2021-11-26 17:07:30 +0100 | <hpc> | maerwald: what squares are attacked, what squares are defended, where pieces can move next turn, etc |
2021-11-26 17:07:31 +0100 | Neuromancer | (~Neuromanc@user/neuromancer) (Read error: Connection reset by peer) |
2021-11-26 17:07:39 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-26 17:07:51 +0100 | <hpc> | you just have lots and lots of masks, for their own specific purpose |
2021-11-26 17:08:06 +0100 | <maerwald> | I bet that code is easy to follow |
2021-11-26 17:08:10 +0100 | <hpc> | the actual board state, you do very little with |
2021-11-26 17:08:19 +0100 | <hpc> | it is, in fact |
2021-11-26 17:08:20 +0100 | Kaiepi | (~Kaiepi@156.34.44.192) |
2021-11-26 17:08:46 +0100 | <hpc> | although i was messing with stockfish before they added the NN |
2021-11-26 17:08:51 +0100 | <hpc> | so maybe it's slightly messier now |
2021-11-26 17:09:16 +0100 | slack1256 | (~slack1256@191.126.227.86) |
2021-11-26 17:11:43 +0100 | slac59793 | (~slack1256@181.43.229.27) (Ping timeout: 268 seconds) |
2021-11-26 17:11:55 +0100 | Feuermagier_ | (~Feuermagi@154.28.188.22) |
2021-11-26 17:12:26 +0100 | lortabac | (~lortabac@2a01:e0a:541:b8f0:859e:604a:c9a4:ff01) (Quit: WeeChat 2.8) |
2021-11-26 17:14:31 +0100 | Feuermagier | (~Feuermagi@user/feuermagier) (Ping timeout: 245 seconds) |
2021-11-26 17:14:35 +0100 | <hololeap> | wait, why isn't there a (Comonad w1, Comonad w2) => instance Comonad (Compose w1 w2) |
2021-11-26 17:14:56 +0100 | <hololeap> | comonads don't compose either? |
2021-11-26 17:15:04 +0100 | <hololeap> | I would think they would |
2021-11-26 17:15:09 +0100 | <EvanR> | why would they |
2021-11-26 17:15:40 +0100 | <hololeap> | well, extract certainly would. I haven't thought too hard about duplicate and the laws |
2021-11-26 17:15:51 +0100 | <mniip> | well? |
2021-11-26 17:15:57 +0100 | <mniip> | the same thing happens with monads? |
2021-11-26 17:16:06 +0100 | dsrt^ | (~dsrt@68.101.58.90) (Remote host closed the connection) |
2021-11-26 17:16:37 +0100 | <EvanR> | maybe you want to invent comonad transformers xD |
2021-11-26 17:16:52 +0100 | <hololeap> | that's true |
2021-11-26 17:17:50 +0100 | pavonia | (~user@user/siracusa) (Quit: Bye!) |
2021-11-26 17:24:29 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 17:24:29 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 17:24:29 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 17:24:40 +0100 | alx741 | (~alx741@186.178.108.213) (Ping timeout: 268 seconds) |
2021-11-26 17:25:39 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-26 17:28:57 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) |
2021-11-26 17:29:37 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 268 seconds) |
2021-11-26 17:31:36 +0100 | Carras | (~carras@202.184.44.217) |
2021-11-26 17:33:32 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 240 seconds) |
2021-11-26 17:34:13 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) |
2021-11-26 17:35:21 +0100 | Carras | (~carras@202.184.44.217) (Client Quit) |
2021-11-26 17:38:05 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) |
2021-11-26 17:38:44 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) (Remote host closed the connection) |
2021-11-26 17:39:06 +0100 | alx741 | (~alx741@186.178.109.194) |
2021-11-26 17:40:47 +0100 | tzh | (~tzh@c-24-21-73-154.hsd1.wa.comcast.net) |
2021-11-26 17:45:19 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 17:46:18 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 17:47:45 +0100 | cfricke | (~cfricke@user/cfricke) (Quit: WeeChat 3.3) |
2021-11-26 17:49:55 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 17:49:56 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 245 seconds) |
2021-11-26 17:51:36 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 17:52:28 +0100 | <janus> | hmm a haskell webbrowser from Hallgren and co from 1994 is on the HN frontpage :O |
2021-11-26 17:53:44 +0100 | <[itchyjunk]> | Are there "objects" in haskell like in Java? for example, String is an object there |
2021-11-26 17:54:39 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Ping timeout: 250 seconds) |
2021-11-26 17:54:58 +0100 | <janus> | [itchyjunk]: no but you can define functions that all take the same record as the first parameter and return a modified record |
2021-11-26 17:55:00 +0100 | <yushyin> | (a closure over a mutable state could be seen as an object :P) |
2021-11-26 17:55:57 +0100 | <janus> | [itchyjunk]: with that pattern, `obj.method(arg0, arg1)` would be written `method obj arg0 arg1` but it would be pure of course |
2021-11-26 17:56:21 +0100 | <janus> | [itchyjunk]: you can put it in a monad and it starts looking impure |
2021-11-26 17:56:40 +0100 | Cajun | (~Cajun@user/cajun) (Quit: Client closed) |
2021-11-26 17:56:40 +0100 | <[itchyjunk]> | ah, idk monads yet. but the rest makes sense |
2021-11-26 17:58:05 +0100 | <sm> | a haskell web browser from 1994 - nice |
2021-11-26 17:58:33 +0100 | <janus> | the web is something else now, that part is the least interesting :P |
2021-11-26 17:59:05 +0100 | <janus> | fudgets are more interesting though. i always wanted to know, how do fudgets compare to other streaming libraries and UI paradigms? |
2021-11-26 17:59:34 +0100 | dsrt^ | (~dsrt@68.101.58.90) |
2021-11-26 18:00:09 +0100 | <EvanR> | after your first "object" of that kind you make... you will quickly become tired of the boilerplate and wonder if someone invented an entire field of computer science to streamline it xD |
2021-11-26 18:01:38 +0100 | <[itchyjunk]> | so a string is of type String. but string is also of type list of characters? |
2021-11-26 18:01:47 +0100 | <[itchyjunk]> | so String = [char] ? |
2021-11-26 18:02:04 +0100 | <[itchyjunk]> | at least i thought i saw the type String somewhere |
2021-11-26 18:03:06 +0100 | <janus> | it's just an alias, you can replace every String with [Char] and it would still compile |
2021-11-26 18:03:12 +0100 | <yushyin> | [itchyjunk]: String is just a type synonym of [Char] |
2021-11-26 18:03:16 +0100 | <[itchyjunk]> | ah great |
2021-11-26 18:03:36 +0100 | <janus> | it's not great! it's horrible! |
2021-11-26 18:04:18 +0100 | <[itchyjunk]> | so `"Hello friend" -> ["Hello", "friend"]` is `f :: [Char] -> [[]]` ? |
2021-11-26 18:04:33 +0100 | <[itchyjunk]> | i was gonna say `[[Char]]` but that might imply single char? |
2021-11-26 18:04:35 +0100 | <janus> | [] is not a valid type |
2021-11-26 18:04:38 +0100 | <[itchyjunk]> | wait not, maybe that is correct |
2021-11-26 18:04:41 +0100 | <monochrom> | No. ['H', 'e', 'l', 'l', 'o', ' ', 'f', ...] |
2021-11-26 18:04:42 +0100 | <[itchyjunk]> | oh.. |
2021-11-26 18:04:46 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 268 seconds) |
2021-11-26 18:04:58 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 18:05:32 +0100 | mbuf | (~Shakthi@171.61.241.63) (Quit: Leaving) |
2021-11-26 18:05:42 +0100 | <[itchyjunk]> | no i want `["hello","friend"]` and am trying to figure out the signature. so `f :: [Char] ->[[Char]]` ? a list containing lists of characters |
2021-11-26 18:05:53 +0100 | <monochrom> | Although, upon seeing [Char], one could not logically imagine "like ["Hello", "friedn"]" |
2021-11-26 18:06:05 +0100 | <[itchyjunk]> | [['H',..,'o']['F',..,'d']] |
2021-11-26 18:06:18 +0100 | <monochrom> | I mean, it is not like Unicode has code points for English words... |
2021-11-26 18:06:37 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 18:07:19 +0100 | <janus> | yes ["Hello","friend"] is the same as [['H',...,'o'],['F',...,'d']] |
2021-11-26 18:07:21 +0100 | <janus> | those are values |
2021-11-26 18:07:26 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 245 seconds) |
2021-11-26 18:07:54 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 18:08:01 +0100 | <janus> | the function that splits by space is indeed String -> [String] which is the same type as [Char] -> [[Char]] |
2021-11-26 18:08:21 +0100 | <janus> | :t words |
2021-11-26 18:08:22 +0100 | <lambdabot> | String -> [String] |
2021-11-26 18:08:22 +0100 | <[itchyjunk]> | ah okay, so that's the signature i want |
2021-11-26 18:10:48 +0100 | <janus> | just like String is an alias for [Char] on the type level, you can see "hi" as an alias for ['h','i'] |
2021-11-26 18:10:56 +0100 | ptrcmd_ | ptrmcd |
2021-11-26 18:10:57 +0100 | <EvanR> | maybe [itchyjunk] is confused about the difference between String and Char |
2021-11-26 18:10:59 +0100 | ptrmcd | ptrcmd |
2021-11-26 18:11:05 +0100 | <[itchyjunk]> | I think i get it now |
2021-11-26 18:11:06 +0100 | <EvanR> | many languages do not know the difference |
2021-11-26 18:11:13 +0100 | <[itchyjunk]> | String is just [Char] |
2021-11-26 18:11:19 +0100 | <monochrom> | But Java has a difference. |
2021-11-26 18:11:20 +0100 | <EvanR> | yeah but Char |
2021-11-26 18:11:33 +0100 | <EvanR> | isn't just a string of length 1 xD |
2021-11-26 18:11:38 +0100 | <[itchyjunk]> | aka String is a fake sugar syntax |
2021-11-26 18:11:54 +0100 | <[itchyjunk]> | hmm idk how Char gets implemented, true |
2021-11-26 18:12:04 +0100 | <[itchyjunk]> | but there is primitive types in Java and char is that.. |
2021-11-26 18:12:06 +0100 | kjak | (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) (Ping timeout: 256 seconds) |
2021-11-26 18:12:06 +0100 | <EvanR> | it's like a number |
2021-11-26 18:12:08 +0100 | <EvanR> | atomic |
2021-11-26 18:12:11 +0100 | <[itchyjunk]> | internally, it's some unicode uumber |
2021-11-26 18:12:14 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 18:12:20 +0100 | <[itchyjunk]> | 67 = A or somesuch |
2021-11-26 18:12:26 +0100 | <EvanR> | yeah basically |
2021-11-26 18:12:39 +0100 | <EvanR> | so a string is a list of that |
2021-11-26 18:12:43 +0100 | slac78719 | (~slack1256@191.126.227.81) |
2021-11-26 18:12:45 +0100 | <monochrom> | Same for our Char. |
2021-11-26 18:12:48 +0100 | <[itchyjunk]> | i think now, A and a smiley emojy are the same because of unicode |
2021-11-26 18:13:00 +0100 | <[itchyjunk]> | encoded the same way that is |
2021-11-26 18:13:22 +0100 | <monochrom> | Well, "same" for now. There is more to support laziness. |
2021-11-26 18:13:27 +0100 | <[itchyjunk]> | so use can have irc nicknames with emojies in ircd's that support unicode |
2021-11-26 18:13:28 +0100 | <EvanR> | > "A😀" |
2021-11-26 18:13:30 +0100 | <lambdabot> | "A\128512" |
2021-11-26 18:13:44 +0100 | <[itchyjunk]> | 6 digit number? |
2021-11-26 18:13:47 +0100 | <dsal> | Is there an easy way to like, download hackage source (latest or something)? I wanted to do a quick survey. |
2021-11-26 18:13:56 +0100 | <[itchyjunk]> | we went from 3 digit numbers to 6 digit already? damn.. |
2021-11-26 18:14:02 +0100 | <janus> | both char and strings are 'atomic' in both java and haskell, no? you can't mutate a java string (keeping its identity) without fancy tricks |
2021-11-26 18:14:09 +0100 | <EvanR> | it's up to 21 bits I think |
2021-11-26 18:14:15 +0100 | <[itchyjunk]> | String is an object in java |
2021-11-26 18:14:15 +0100 | <dsal> | In particular, I'm curious how ByteString is imported. |
2021-11-26 18:14:21 +0100 | <[itchyjunk]> | char is primitive type |
2021-11-26 18:14:23 +0100 | slack7679 | (~slack1256@181.42.49.169) |
2021-11-26 18:14:38 +0100 | <EvanR> | by "atomic" I mean you can subdivide it into smaller data |
2021-11-26 18:14:46 +0100 | <EvanR> | can't* |
2021-11-26 18:15:13 +0100 | <janus> | ah i interpreted it as immutable somehow, oops |
2021-11-26 18:15:14 +0100 | slack1256 | (~slack1256@191.126.227.86) (Ping timeout: 268 seconds) |
2021-11-26 18:16:06 +0100 | <EvanR> | good to know that about strings in java though xD |
2021-11-26 18:16:12 +0100 | <EvanR> | why am I learning so much about java in here |
2021-11-26 18:16:12 +0100 | <monochrom> | Atomic weapon/fuel keeps decaying. Clearly mutable. And mutant-causing too, in superhero comics. |
2021-11-26 18:16:35 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Ping timeout: 256 seconds) |
2021-11-26 18:16:43 +0100 | <[itchyjunk]> | you use '' for chars right? |
2021-11-26 18:16:55 +0100 | <janus> | right check this out |
2021-11-26 18:17:00 +0100 | <janus> | :t 'A' |
2021-11-26 18:17:00 +0100 | <lambdabot> | Char |
2021-11-26 18:17:01 +0100 | <[itchyjunk]> | if x /= ' ' makes sense? to check if x is same as space |
2021-11-26 18:17:06 +0100 | <[itchyjunk]> | ah |
2021-11-26 18:17:26 +0100 | slac78719 | (~slack1256@191.126.227.81) (Ping timeout: 260 seconds) |
2021-11-26 18:17:43 +0100 | <janus> | [itchyjunk]: do you know how to use ghci? |
2021-11-26 18:18:07 +0100 | <[itchyjunk]> | yes, i am :l my functions into ghci and running them that way for everything currently |
2021-11-26 18:18:16 +0100 | <[itchyjunk]> | well i know how to run ghci.. xD |
2021-11-26 18:18:20 +0100 | <[itchyjunk]> | not sure what counts as usage |
2021-11-26 18:18:24 +0100 | <janus> | dsal: isn't it just github.com/haskell/hackage-server ? or what are you referring to when you say hackage? |
2021-11-26 18:19:01 +0100 | <janus> | [itchyjunk]: ah great. ok, so in ghci you can use ":t" to query the type of something like i did in this chat |
2021-11-26 18:19:22 +0100 | <geekosaur> | dsal, I think there are some hackage packages for that |
2021-11-26 18:19:37 +0100 | <[itchyjunk]> | right, i did use :t for functions but didn't think about using it for data types :D |
2021-11-26 18:20:04 +0100 | <EvanR> | [itchyjunk], in ghci do putStrLn "A😀" |
2021-11-26 18:20:10 +0100 | <EvanR> | fun times |
2021-11-26 18:20:11 +0100 | <dsal> | janus: The actual packages -- I want to survey. |
2021-11-26 18:20:24 +0100 | <dsal> | geekosaur: I found a sort of howto guide with a bunch of steps I might be able to reproduce. |
2021-11-26 18:20:41 +0100 | <[itchyjunk]> | https://bpa.st/VYGA |
2021-11-26 18:21:04 +0100 | <EvanR> | you didn't put quotes |
2021-11-26 18:21:08 +0100 | <[itchyjunk]> | ah.. |
2021-11-26 18:21:17 +0100 | <janus> | apropos i am trying to write a stackage not-solver for cabal, where do cabal devs hang out? |
2021-11-26 18:21:54 +0100 | <maerwald> | janus: what is a stackage not-solver? |
2021-11-26 18:22:05 +0100 | <[itchyjunk]> | lexical error in string/character literal at end of input |
2021-11-26 18:22:15 +0100 | <[itchyjunk]> | ah nm |
2021-11-26 18:22:32 +0100 | <janus> | maerwald: cabal has a "solver" configuration flag which currently has one option "modular". the modular solver was written to replace the top-down solver 10 years ago |
2021-11-26 18:22:37 +0100 | <geekosaur> | https://hackage.haskell.org/package/hackage-mirror |
2021-11-26 18:22:37 +0100 | <geekosaur> | #hackage I think? |
2021-11-26 18:22:37 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-11-26 18:22:39 +0100 | <[itchyjunk]> | "A😀" :: [Char] heh interesting |
2021-11-26 18:22:46 +0100 | <EvanR> | ikr |
2021-11-26 18:22:53 +0100 | <dsal> | There are currently 123453 package*versions in hackage. |
2021-11-26 18:23:30 +0100 | <janus> | maerwald: since stackage doesn't need solving anything it's not really a solver. so i can't call it "stackage solver" since it isn't actually solving anything. but i put it such that it goes in the "solver" config space option, where you used to put top-down or modular, and where you can now only put modular |
2021-11-26 18:23:50 +0100 | <maerwald> | janus: you mean freeze files? |
2021-11-26 18:23:56 +0100 | <maerwald> | that already exists |
2021-11-26 18:24:13 +0100 | <EvanR> | [itchyjunk], ord :: Char -> Int from Data.Char gives you the number for the char, very handy |
2021-11-26 18:24:18 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-11-26 18:24:19 +0100 | <maerwald> | and that's likely how the stackage support will be implemented |
2021-11-26 18:24:30 +0100 | <janus> | maerwald: but freeze files are not in the same syntax as build.yaml |
2021-11-26 18:24:51 +0100 | <maerwald> | janus: you can convert that easily |
2021-11-26 18:24:52 +0100 | <janus> | maerwald: and freeze files are project specific, they can't meaningfully be shared across projects right? |
2021-11-26 18:25:03 +0100 | <maerwald> | janus: there's a ticket for remote freeze files |
2021-11-26 18:25:08 +0100 | <hololeap> | dsal: you know you want to upload 3 more |
2021-11-26 18:25:10 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-26 18:25:27 +0100 | <maerwald> | janus: I suggest you read the topic about the hackage support, probably all your questions will be answered there |
2021-11-26 18:25:39 +0100 | <janus> | maerwald: where is that? |
2021-11-26 18:25:57 +0100 | <dsal> | hololeap: Yeah, that's almost distracting me... |
2021-11-26 18:26:02 +0100 | <maerwald> | janus: https://github.com/haskell/cabal/issues/7556 |
2021-11-26 18:26:11 +0100 | <hololeap> | haha |
2021-11-26 18:29:24 +0100 | jstolarek | (~jstolarek@137.220.120.162) |
2021-11-26 18:29:58 +0100 | <janus> | [itchyjunk]: beware, just because it looks the same, it could be different: |
2021-11-26 18:30:02 +0100 | <janus> | > putStrLn "\xe9" |
2021-11-26 18:30:04 +0100 | <lambdabot> | <IO ()> |
2021-11-26 18:30:11 +0100 | <janus> | % putStrLn "\xe9" |
2021-11-26 18:30:11 +0100 | <yahb> | janus: é |
2021-11-26 18:30:19 +0100 | <janus> | % putStrLn "\x65\x301" |
2021-11-26 18:30:19 +0100 | <yahb> | janus: é |
2021-11-26 18:30:49 +0100 | SSCC | (~SSCC@59-102-95-229.tpgi.com.au) |
2021-11-26 18:30:58 +0100 | boxscape_ | (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) |
2021-11-26 18:31:08 +0100 | <edwardk> | hololeap: you can look into Day u v -- for two comonads u and v. that at least composes |
2021-11-26 18:31:23 +0100 | slice | (~slice@user/slice) |
2021-11-26 18:33:14 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 18:33:14 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 18:33:15 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 18:33:25 +0100 | <hololeap> | oh no... kan-extensions... XD |
2021-11-26 18:34:39 +0100 | <[itchyjunk]> | Oh ohh, ,i've confused myself |
2021-11-26 18:34:46 +0100 | <hololeap> | edwardk: where would you recommend I look into that? |
2021-11-26 18:34:46 +0100 | [itchyjunk] | takes a short break in hopes of unconfusing self |
2021-11-26 18:35:27 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) |
2021-11-26 18:35:40 +0100 | <janus> | maerwald: ok very cool, i hadn't internalized that it's coming in cabal 3.8 |
2021-11-26 18:36:39 +0100 | <edwardk> | hololeap:phil freeman wrote it up at one point: https://blog.functorial.com/posts/2016-08-08-Comonad-And-Day-Convolution.html |
2021-11-26 18:37:18 +0100 | <hololeap> | cool, thanks. that might get me one step closer to penetrating that library |
2021-11-26 18:39:14 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) |
2021-11-26 18:39:18 +0100 | <janus> | the beginning of the read still says cabal 3.10 but that was moved ahead, i guess... |
2021-11-26 18:39:25 +0100 | <edwardk> | re: comonads not composing, its the same problem as with monads. you wind up needing to take FG -> FGFG to write duplicate but two arbitrary comonads just give you what you need to get FFGG by duplicating each part. Then you have no way to distribute them to get FGFG |
2021-11-26 18:40:27 +0100 | <edwardk> | for monads OTOH, join needs to take FGFG -> FG, and sure you could use the join of each monad if you had FFGG -> FG -- but you lack a distributive law in general to get FGFG -> FFGG to apply that latter step |
2021-11-26 18:40:40 +0100 | <edwardk> | so you get stuck in the middle in both cases. |
2021-11-26 18:41:00 +0100 | <hololeap> | gotcha |
2021-11-26 18:42:10 +0100 | <boxscape_> | so then... is there some dual to Day that lets you compose any two monads? |
2021-11-26 18:42:20 +0100 | <EvanR> | stupid question, why does composing comonads require you to do FG -> FGFG |
2021-11-26 18:42:25 +0100 | <hololeap> | Night |
2021-11-26 18:42:50 +0100 | <boxscape_> | hololeap I suppose I could have thought of that myself.. |
2021-11-26 18:43:03 +0100 | <edwardk> | a subset of the monad/comonad transformers come from taking comonads/monads that _do_ have such a distributive law. e.g. you can write f (e -> a) -> e -> f a. and that distributive law is the basis of ReaderT |
2021-11-26 18:43:04 +0100 | <hololeap> | boxscape_: I was joking :p |
2021-11-26 18:43:15 +0100 | <boxscape_> | https://hackage.haskell.org/package/functor-combinators-0.4.1.0/docs/Data-Functor-Combinator.html#… |
2021-11-26 18:43:20 +0100 | <edwardk> | (e, f a) -> f (e, a) -- gives you the building block for WriterT, etc. |
2021-11-26 18:43:41 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) (Ping timeout: 245 seconds) |
2021-11-26 18:43:51 +0100 | <hololeap> | EvanR: because duplicate on `W1 (W2 a)` would mean getting `W1 (W2 (W1 (W2 a)))` if that makes sense |
2021-11-26 18:44:01 +0100 | <EvanR> | oh right |
2021-11-26 18:44:08 +0100 | <edwardk> | EvanR: consider the type signature for 'duplicate' for Compose f g where f and g are comonads, under the assumption you are writing ... hololeap got it |
2021-11-26 18:44:47 +0100 | <EvanR> | and now I see the monad version |
2021-11-26 18:44:57 +0100 | <EvanR> | and all that that entails (mtl) |
2021-11-26 18:45:40 +0100 | <boxscape_> | (no idea though if the Night I linked lets you compose Monads, from the description I'd guess not) |
2021-11-26 18:46:33 +0100 | <hololeap> | FunctorBy Night -- sounds like the setup to a movie |
2021-11-26 18:46:56 +0100 | <EvanR> | wait... Night is real? |
2021-11-26 18:46:59 +0100 | <dminuoso> | smorgasbord: With fmap on a tree like structure you cant change the shape of the tree, but you can universally map and replace each element. |
2021-11-26 18:47:39 +0100 | <dminuoso> | smorgasbord: We can concisely express this law as `fmap id = id`, which means if you fmap with the identity function, it must give you the same thing back. It cant change the structure, drop elements, reorder them, etc. |
2021-11-26 18:48:59 +0100 | <EvanR> | ah it's not dual to Day |
2021-11-26 18:49:06 +0100 | <EvanR> | unfortunately xD |
2021-11-26 18:49:09 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) (Ping timeout: 276 seconds) |
2021-11-26 18:49:18 +0100 | <edwardk> | boxscape_: there's a fancy phrase tarmo uustalu likes to use saying 'the dual of substitution is redecoration' -- it is the thing that finally gave me the "right" reference frame for thinking about comonads in haskell. that you are basically taking some 'view of a structure and computing local answers (w a -> b) before you apply them at every possible 'location' in w, and reassemble the structure: w a -> w b... out of those little |
2021-11-26 18:49:18 +0100 | <edwardk> | tiles. whats telling to me is the comonad doesn't change 'shape' in the process it has just as many 'b's as it had 'a's. which is weird compared to the usual monad story, where >>='ing lists can change the number of elements in the list. the comonadic operations redecorate the structure, but they don't change it. |
2021-11-26 18:49:31 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 18:49:54 +0100 | <edwardk> | the day convolution of two comonads, is more about convolving two different comonads notion of shape and location, and making something that has a 'location' for the product of that notion. |
2021-11-26 18:50:13 +0100 | <edwardk> | that works really well when not reshaping things |
2021-11-26 18:51:01 +0100 | bitdex | (~bitdex@gateway/tor-sasl/bitdex) |
2021-11-26 18:52:02 +0100 | <boxscape_> | hm, interesting |
2021-11-26 18:54:03 +0100 | benin | (~benin@183.82.179.164) (Quit: The Lounge - https://thelounge.chat) |
2021-11-26 18:54:04 +0100 | <edwardk> | now if you want to get fancy, a better frame for thinking about comonads is maybe to dip over and look at comonads in Poly, and show they are in 1:1 correspondence with categories, and then poke at the day convolution story above and see how it compares with product categories |
2021-11-26 18:54:54 +0100 | benin | (~benin@183.82.179.164) |
2021-11-26 18:56:39 +0100 | <hololeap> | if f and g are both distributive and comonads, does that mean you could get an automatic comonad instance for the composition? |
2021-11-26 18:57:02 +0100 | <hololeap> | or maybe only one of them has to be distributive? |
2021-11-26 18:57:06 +0100 | <edwardk> | Distributive is a very strong class |
2021-11-26 18:57:24 +0100 | <hololeap> | true, not many functors are distributive |
2021-11-26 18:57:46 +0100 | <edwardk> | Distributive f is saying f ~ (->) e for some e. |
2021-11-26 18:57:59 +0100 | <hololeap> | oh, I guess this goes back to the relationship between adjunctions and comonads |
2021-11-26 18:58:00 +0100 | <edwardk> | so now you're reinventing Traced |
2021-11-26 18:58:23 +0100 | <dminuoso> | edwardk: (Jokingly) But Distributive is not very strong. It doesn't even have Strong as a superclass. |
2021-11-26 18:58:39 +0100 | <edwardk> | for something to be both Distributive _and_ a Comonad you wind up with a monoid on that 'e' |
2021-11-26 18:58:41 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@static-198-54-131-107.cust.tzulo.com) |
2021-11-26 18:58:47 +0100 | <edwardk> | dminuoso: *headdesk* |
2021-11-26 18:59:27 +0100 | <hololeap> | edwardk: I've been meaning to ask you, where did you get the terms that you use in your profunctors library? is there a good reference for all those concepts somewhere? |
2021-11-26 18:59:47 +0100 | <edwardk> | hololeap: in the head version of distributive (which builds on hkd), distributive becomes a bit stronger, able to provide all the implied instances you'd expect if you need it to, and it can recover that monoid. |
2021-11-26 19:00:03 +0100 | <dminuoso> | hololeap: ncatlab.org? :p |
2021-11-26 19:00:25 +0100 | <edwardk> | some i plucked out of thin air, pastro and street wrote a paper on tambara modules, i abused some vocabulary there |
2021-11-26 19:00:26 +0100 | <dminuoso> | edwardk's prime hobby is turning that wiki into hackage. |
2021-11-26 19:00:44 +0100 | <dminuoso> | And I mean this non-jokingly. |
2021-11-26 19:01:34 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
2021-11-26 19:01:39 +0100 | <hololeap> | edwardk: ok, what about subprofunctor? |
2021-11-26 19:01:43 +0100 | <hololeap> | what does that mean? |
2021-11-26 19:01:44 +0100 | <dsal> | This survey of Data.ByteString imports is interesting. I was told not to use `BS` because it's supposed to be `SB` which sounds like... the other one. Turns out, most imports use `B`, followed closely by `BS`. `SB` is in the list with nearly three times the occurrence of `QtahDBS`. |
2021-11-26 19:02:07 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) (Remote host closed the connection) |
2021-11-26 19:02:37 +0100 | <dminuoso> | dsal: I have never seen SB before. |
2021-11-26 19:02:47 +0100 | <dminuoso> | What is the S trying to imply? Strict? |
2021-11-26 19:02:53 +0100 | <dminuoso> | Would you also have LB then? |
2021-11-26 19:03:25 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 19:03:33 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 250 seconds) |
2021-11-26 19:03:34 +0100 | <dsal> | Yes. |
2021-11-26 19:03:48 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 19:03:53 +0100 | dminuoso | uses BS and BSL |
2021-11-26 19:04:06 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds) |
2021-11-26 19:04:13 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-26 19:04:15 +0100 | <dsal> | I've not got everything downloaded yet, but it's approximately 3240:102 BS:SB right now. |
2021-11-26 19:04:22 +0100 | <maerwald> | SB is for ShortByteString, no? |
2021-11-26 19:04:33 +0100 | <dminuoso> | I use SBS for ShortByteString |
2021-11-26 19:04:59 +0100 | <dsal> | Who knows. There are a lot of these things that are just "this is the standard way to do this" declarations that I can't find any evidence for other than this one guy thinks he's a standards body. |
2021-11-26 19:05:22 +0100 | chomwitt | (~chomwitt@94.69.34.153) (Ping timeout: 256 seconds) |
2021-11-26 19:05:50 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 19:05:52 +0100 | <dsal> | It's possibly a language barrier, but I'm quite certain he thinks he's smarter than everyone. |
2021-11-26 19:05:59 +0100 | Lycurgus | (~juan@98.4.112.204) |
2021-11-26 19:06:11 +0100 | <EvanR> | wait... BS is BS now? |
2021-11-26 19:06:14 +0100 | geekosaur | (~geekosaur@xmonad/geekosaur) |
2021-11-26 19:06:23 +0100 | <hololeap> | haha way to go dsal, I'm sure the look on his face will be priceless when you hand him the survey :p |
2021-11-26 19:06:33 +0100 | <EvanR> | is haskell going to be associated with satanism too |
2021-11-26 19:06:37 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 19:06:48 +0100 | <dsal> | In one of the lens discussions, I was trying to understand what the actual argument was and it was "People think I don't like lens because I don't understand it. I do understand it and it's a bad idea." It's like... OK, but that wasn't the question. |
2021-11-26 19:06:59 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 19:07:07 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Ping timeout: 260 seconds) |
2021-11-26 19:07:12 +0100 | <dsal> | "People think I don't understand linear algebra. I wrote a book on it!" OK, but I wasn't asking you about linear algebra. |
2021-11-26 19:07:46 +0100 | <hololeap> | that says something that people still don't think he understands it after writing a book on it |
2021-11-26 19:07:50 +0100 | <dsal> | hololeap: I honestly don't think he cares. He's pretty sure everyone's wrong about things and his way is the only path to enlightenment. |
2021-11-26 19:08:10 +0100 | <edwardk> | hololeap: https://en.wikipedia.org/wiki/Subfunctor |
2021-11-26 19:09:03 +0100 | <hololeap> | edwardk: oh, that's all you meant :p |
2021-11-26 19:09:12 +0100 | <dsal> | In the end, it's 127 for SB and 23 for QtahDBS. Maybe I should start using QtahDBS |
2021-11-26 19:09:41 +0100 | <hololeap> | definitely QtahDBS |
2021-11-26 19:09:48 +0100 | <EvanR> | I guess it's inevitable. Once there are actual haskell jobs, there must necessarily be stupid haskell jobs xD |
2021-11-26 19:10:44 +0100 | <dsal> | Also in use (in order of frequency): B, S, P, D, C, L, A, F, K, X, J, E and surprisingly last, B' |
2021-11-26 19:10:49 +0100 | benin | (~benin@183.82.179.164) (Quit: The Lounge - https://thelounge.chat) |
2021-11-26 19:11:31 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) |
2021-11-26 19:11:38 +0100 | <dsal> | (actually, X, J, E, and B' are all the same frequency, so it's not necessarily last, just sorted higher) |
2021-11-26 19:11:51 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2021-11-26 19:13:58 +0100 | benin | (~benin@183.82.179.164) |
2021-11-26 19:17:30 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-26 19:17:42 +0100 | benin | (~benin@183.82.179.164) (Client Quit) |
2021-11-26 19:18:33 +0100 | <[itchyjunk]> | for `f :: [Char] -> [[Char]]`, `f [] = [[]]` makes sense right? |
2021-11-26 19:18:53 +0100 | <dsal> | Why not `f [] = []` ? |
2021-11-26 19:19:02 +0100 | <dsal> | Not enough context to know which one is better. |
2021-11-26 19:19:20 +0100 | <[itchyjunk]> | isn't it expecting [[]] ? |
2021-11-26 19:19:24 +0100 | <[itchyjunk]> | due to the signature |
2021-11-26 19:19:30 +0100 | <geekosaur> | the outer list could be empty |
2021-11-26 19:19:40 +0100 | <monochrom> | > [] :: [[Char]] |
2021-11-26 19:19:41 +0100 | <lambdabot> | [] |
2021-11-26 19:19:43 +0100 | <monochrom> | is legal |
2021-11-26 19:19:48 +0100 | <monochrom> | > [] :: [[[[[Char]]]]] |
2021-11-26 19:19:49 +0100 | <lambdabot> | [] |
2021-11-26 19:19:51 +0100 | <monochrom> | is too |
2021-11-26 19:19:52 +0100 | <geekosaur> | with [[]] the outer list has one item, the inner one is empty |
2021-11-26 19:20:07 +0100 | <[itchyjunk]> | oh |
2021-11-26 19:20:22 +0100 | <dsal> | And thus zero was invented. |
2021-11-26 19:20:33 +0100 | <monochrom> | But [[]] is not wrong either. Depends on what you want f to do. |
2021-11-26 19:20:45 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 19:20:46 +0100 | <geekosaur> | which is what dsal said |
2021-11-26 19:20:49 +0100 | <dsal> | What the `f` do you want? |
2021-11-26 19:20:54 +0100 | <geekosaur> | heh |
2021-11-26 19:20:55 +0100 | <monochrom> | haha |
2021-11-26 19:20:57 +0100 | <[itchyjunk]> | lol |
2021-11-26 19:22:21 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-11-26 19:23:02 +0100 | jgeerds | (~jgeerds@55d45b75.access.ecotel.net) |
2021-11-26 19:23:34 +0100 | <monochrom> | This is why I don't say "makes sense" very often. What does it even mean? |
2021-11-26 19:24:05 +0100 | <[itchyjunk]> | yes it's doesn't make sense to say that |
2021-11-26 19:24:08 +0100 | <monochrom> | type checks? the right thing to do? understandable? sympathizable? |
2021-11-26 19:24:18 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 268 seconds) |
2021-11-26 19:24:29 +0100 | <tom__> | Does it not mean "I understand what you said"? |
2021-11-26 19:24:51 +0100 | <monochrom> | See that's the point. Sometimes yes, sometimes something else. |
2021-11-26 19:25:32 +0100 | <monochrom> | "I understand what you are saying" so it makes sense, but "but you are wrong there" so it doesn't make sense, too. |
2021-11-26 19:25:44 +0100 | <tom__> | Natural language huh |
2021-11-26 19:25:53 +0100 | <monochrom> | natural languages die die die |
2021-11-26 19:26:21 +0100 | <tom__> | haha |
2021-11-26 19:27:33 +0100 | econo | (uid147250@user/econo) |
2021-11-26 19:28:15 +0100 | <tom__> | Is there a data structure which would model the positions of players at a table who are either active or inactive. Obviously a single list works but separate data structures for inactives and actives would simplify game logic and validation. |
2021-11-26 19:29:03 +0100 | Jing | (~hedgehog@115.207.50.95) (Read error: Connection reset by peer) |
2021-11-26 19:29:03 +0100 | <tom__> | I'm looking for two data structures that share ordering but are parameterized by different types. |
2021-11-26 19:30:43 +0100 | <dsal> | tom__: It means I think I understand something that I think you said and I want you to think that your idea is right even though I probably don't know what you're talking about. |
2021-11-26 19:30:54 +0100 | <monochrom> | haha |
2021-11-26 19:31:26 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Quit: WeeChat 3.3) |
2021-11-26 19:31:45 +0100 | <dsal> | tom__: You can convert the full set to the subset pretty easily, right? |
2021-11-26 19:31:50 +0100 | <tom__> | haha |
2021-11-26 19:32:00 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 19:32:30 +0100 | <dsal> | Here are the results from my very important survey: https://usercontent.irccloud-cdn.com/file/hKXNfFFF/bytestring.png |
2021-11-26 19:32:36 +0100 | <tom__> | dsal: Yeah just a simple filter on the list right |
2021-11-26 19:33:01 +0100 | <dsal> | Yeah, once you have functions that give you the things you think you need a structure for, you don't need to think about the structure anymore. |
2021-11-26 19:33:17 +0100 | <tom__> | Makes sense |
2021-11-26 19:33:22 +0100 | <dsal> | haha |
2021-11-26 19:33:24 +0100 | <tom__> | :D |
2021-11-26 19:33:36 +0100 | <monochrom> | "what have I done???!!!" |
2021-11-26 19:34:05 +0100 | lavaman | (~lavaman@98.38.249.169) (Remote host closed the connection) |
2021-11-26 19:34:06 +0100 | <tom__> | Okay so just a single list/vector then |
2021-11-26 19:34:13 +0100 | <[itchyjunk]> | how do you do nothing? |
2021-11-26 19:34:20 +0100 | <monochrom> | Cannot. |
2021-11-26 19:34:21 +0100 | <[itchyjunk]> | if blah then blah else do nothing |
2021-11-26 19:34:22 +0100 | <zzz> | dsal makes census |
2021-11-26 19:34:24 +0100 | <[itchyjunk]> | hmm |
2021-11-26 19:34:47 +0100 | <geekosaur> | well. "do nothing" can make sense in certain contexts. at some point you'll have to show code |
2021-11-26 19:34:53 +0100 | <geekosaur> | @where paste |
2021-11-26 19:34:53 +0100 | <lambdabot> | Help us help you: please paste full code, input and/or output at e.g. https://paste.tomsmeding.com |
2021-11-26 19:35:00 +0100 | <monochrom> | But ask yourself why you need that "nothing". The reason will lead to a solution. |
2021-11-26 19:35:19 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 19:35:50 +0100 | <dsal> | There's that zero again. |
2021-11-26 19:36:25 +0100 | <dsal> | I want to add 1 if this is greater than three, but I don't want to add anything otherwise and this is making me add something. |
2021-11-26 19:36:35 +0100 | <tom__> | Why do we need validation when everything can be correct by construction |
2021-11-26 19:36:53 +0100 | <tom__> | Assume no parsing |
2021-11-26 19:36:56 +0100 | <dsal> | Not everything can be, but some people really like making things hard and unsafe. |
2021-11-26 19:37:05 +0100 | <geekosaur> | because you can't always be correct by construction in Haskell. |
2021-11-26 19:37:23 +0100 | dsal | totally isn't talking about really annoying things on a project today |
2021-11-26 19:37:24 +0100 | <monochrom> | I consider validation to be part of parsing. |
2021-11-26 19:37:29 +0100 | <geekosaur> | at some point that starts to require fancies like dependent types, where you have to carry around a proof that it's correct |
2021-11-26 19:37:54 +0100 | <tom__> | Yeah |
2021-11-26 19:38:01 +0100 | <monochrom> | Well, OK, I don't always. I am OK with type-checking after parsing, for example. |
2021-11-26 19:38:02 +0100 | <geekosaur> | or yes, parsing, or other cases where something comes from "outside" and you don't get to assume correctness |
2021-11-26 19:38:06 +0100 | <geekosaur> | or even sanity |
2021-11-26 19:38:07 +0100 | <tom__> | Validation is part of parsing interesting |
2021-11-26 19:39:10 +0100 | <tom__> | So should I strive for correct by construction only when the tools needed to do so are minimalistic - ADTs usually |
2021-11-26 19:39:13 +0100 | <monochrom> | But most people's idea of "validation" is trivial conditions like "the age field must be non-negative" so why don't you check that during parsing already. |
2021-11-26 19:39:35 +0100 | <dsal> | The lexi-lambda post makes an argument to sort of separate these concepts. A parser will reject invalid data. A validator will just tell you if your data is valid. It's good to avoid the latter. |
2021-11-26 19:39:36 +0100 | <tom__> | Yeah |
2021-11-26 19:39:50 +0100 | <monochrom> | I strive for correct-by-construction iff pragmatic. |
2021-11-26 19:40:02 +0100 | <dsal> | yeah. You can go overboard and make it harder. |
2021-11-26 19:40:09 +0100 | <tom__> | Liquid haskell |
2021-11-26 19:40:15 +0100 | <tom__> | For my crud app |
2021-11-26 19:40:16 +0100 | <dsal> | I have this image I got from an old war archive. https://usercontent.irccloud-cdn.com/file/EzyJmco3/error.png |
2021-11-26 19:40:17 +0100 | <xerox> | (i strive for correct-by-construction) iff pragmatic |
2021-11-26 19:40:25 +0100 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) (Remote host closed the connection) |
2021-11-26 19:40:32 +0100 | rkrishnan | (~user@171.48.57.101) (Ping timeout: 240 seconds) |
2021-11-26 19:40:40 +0100 | dyeplexer | (~dyeplexer@user/dyeplexer) (Remote host closed the connection) |
2021-11-26 19:40:44 +0100 | jonathanx | (~jonathan@h-178-174-176-109.A357.priv.bahnhof.se) |
2021-11-26 19:40:49 +0100 | <[itchyjunk]> | say `f :: a -> a`, does `[f]` imply [a] then? |
2021-11-26 19:40:53 +0100 | <tom__> | I am going to confuse people at work with iff |
2021-11-26 19:41:02 +0100 | <tom__> | Stop misspelling if! |
2021-11-26 19:41:15 +0100 | <dsal> | [itchyjunk]: f is id. I'm not sure what you're asking though. |
2021-11-26 19:41:25 +0100 | <dsal> | tom__: I had someone correct one of my PRs before submitting it while I was asleep. |
2021-11-26 19:41:40 +0100 | <[itchyjunk]> | hmm |
2021-11-26 19:41:47 +0100 | <tom__> | Correct in what way? |
2021-11-26 19:41:52 +0100 | <dsal> | s/iff/if/ |
2021-11-26 19:41:57 +0100 | <tom__> | haha |
2021-11-26 19:42:05 +0100 | <monochrom> | What is "`[f]` imply [a]"? |
2021-11-26 19:42:24 +0100 | <[itchyjunk]> | i want to make a list out of what f returns |
2021-11-26 19:42:49 +0100 | <monochrom> | and? |
2021-11-26 19:43:09 +0100 | <dsal> | like, `[f x]`? |
2021-11-26 19:43:10 +0100 | <zzz> | [itchyjunk]: rememeber that there' an implicit forall a. in your a -> a, so f = id is the only solution |
2021-11-26 19:43:25 +0100 | lbseale | (~ep1ctetus@user/ep1ctetus) (Ping timeout: 250 seconds) |
2021-11-26 19:44:31 +0100 | <dsal> | "make a list out of what f returns" is kind of a weird way to think about things. Do you just want a list of one item? That's [x]. If you want more than one thing, then where do they come from? |
2021-11-26 19:44:42 +0100 | <EvanR> | correct by construction crud apps? UrWeb? |
2021-11-26 19:44:51 +0100 | <monochrom> | See, programming is a special case of explaining yourself clearly, as opposed to intuitively. |
2021-11-26 19:45:24 +0100 | <[itchyjunk]> | hmmm |
2021-11-26 19:45:33 +0100 | <[itchyjunk]> | the [[Char]] is throwing me off honestly |
2021-11-26 19:45:45 +0100 | <EvanR> | imagine it says [String] then |
2021-11-26 19:45:46 +0100 | <dsal> | Unless you're programming in perl, where you can pretty much just type anything and the runtime will say "make sense" |
2021-11-26 19:45:59 +0100 | <monochrom> | :) |
2021-11-26 19:46:01 +0100 | <zzz> | monochrom: programming is a way to find out that what your exaplanation was wrong to begin with |
2021-11-26 19:46:03 +0100 | <tom__> | haha |
2021-11-26 19:46:13 +0100 | <EvanR> | or imagine that [[a]] is a list of rows of a |
2021-11-26 19:46:19 +0100 | <EvanR> | or columns |
2021-11-26 19:46:27 +0100 | <zzz> | s/what// |
2021-11-26 19:46:29 +0100 | <geekosaur> | rubber duck explaining? |
2021-11-26 19:46:51 +0100 | <dsal> | The other way to think of it is to just not think of lists of lists and only think in one dimension, get that done, and then think of that whole dimension as one thing and move on to the next dimension. |
2021-11-26 19:46:53 +0100 | <EvanR> | [[[a]]] is a list of layers of that xD |
2021-11-26 19:46:59 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 19:47:22 +0100 | <[itchyjunk]> | ill think about it somemore before showing my code but basically |
2021-11-26 19:47:24 +0100 | <dsal> | If you have a `a -> b` you don't need to think of a `[a] -> [b]` because that's already there. |
2021-11-26 19:47:51 +0100 | <[itchyjunk]> | f "ab cd" ["a","b","c","d"], but what i want is ["ab","cd"] |
2021-11-26 19:47:54 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 19:47:57 +0100 | <[itchyjunk]> | so i think i am in somewhat of a right track |
2021-11-26 19:48:03 +0100 | <[itchyjunk]> | just the details need to be worked out |
2021-11-26 19:48:11 +0100 | <dsal> | > unwords "ab cd" |
2021-11-26 19:48:12 +0100 | <lambdabot> | error: |
2021-11-26 19:48:12 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 19:48:12 +0100 | <lambdabot> | • Couldn't match type ‘Char’ with ‘[Char]’ |
2021-11-26 19:48:12 +0100 | <lambdabot> | Expected type: [String] |
2021-11-26 19:48:16 +0100 | <dsal> | damnit |
2021-11-26 19:48:18 +0100 | <zzz> | ahah |
2021-11-26 19:48:19 +0100 | <dsal> | > words "ab cd" |
2021-11-26 19:48:21 +0100 | <lambdabot> | ["ab","cd"] |
2021-11-26 19:48:28 +0100 | <EvanR> | ununwords |
2021-11-26 19:48:31 +0100 | <dsal> | @src words |
2021-11-26 19:48:31 +0100 | <lambdabot> | words s = case dropWhile isSpace s of |
2021-11-26 19:48:31 +0100 | <lambdabot> | "" -> [] |
2021-11-26 19:48:31 +0100 | <lambdabot> | s' -> w : words s'' where (w, s'') = break isSpace s' |
2021-11-26 19:48:34 +0100 | <[itchyjunk]> | yes something like that |
2021-11-26 19:48:37 +0100 | <dsal> | ok, that's probably not helpful. |
2021-11-26 19:48:48 +0100 | <zzz> | wth |
2021-11-26 19:49:09 +0100 | <monochrom> | I think it's helpful. Sometimes you didn't know that you have to code like that. |
2021-11-26 19:49:18 +0100 | <monochrom> | or even that you can. |
2021-11-26 19:49:27 +0100 | <zzz> | but why |
2021-11-26 19:49:32 +0100 | <dsal> | Yeah, just ignore `break` I think the shape is helpful. |
2021-11-26 19:49:47 +0100 | <zzz> | @src break |
2021-11-26 19:49:48 +0100 | <lambdabot> | break p = span (not . p) |
2021-11-26 19:49:53 +0100 | <dsal> | obviously |
2021-11-26 19:50:23 +0100 | <[itchyjunk]> | my approach is a bit err odd |
2021-11-26 19:50:24 +0100 | <[itchyjunk]> | https://bpa.st/BSQA |
2021-11-26 19:50:30 +0100 | <[itchyjunk]> | ignore g, was using that to test things |
2021-11-26 19:51:01 +0100 | <dsal> | [itchyjunk]: Yeah, you're just putting everything in its own list, which you knew already. |
2021-11-26 19:51:17 +0100 | <[itchyjunk]> | right |
2021-11-26 19:51:32 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 240 seconds) |
2021-11-26 19:51:32 +0100 | FragByte | (~christian@user/fragbyte) (Ping timeout: 265 seconds) |
2021-11-26 19:51:47 +0100 | <dsal> | But if you want to group things together while they're not spaces, then you keep adding to that first list while it's not a space, then ignore spaces, then recurse. |
2021-11-26 19:52:05 +0100 | <monochrom> | You are asking yourself, how to ensure f "hi there" = ["hi", "there"]. |
2021-11-26 19:52:19 +0100 | <[itchyjunk]> | thats what i was attempting to do, x: f xs does the keep going part |
2021-11-26 19:52:22 +0100 | <monochrom> | And by the induction hypothesis, f "i there" = ["i", "there"] |
2021-11-26 19:52:39 +0100 | <[itchyjunk]> | but [x: f xs] wasn't doing what i thought it might do |
2021-11-26 19:52:45 +0100 | <monochrom> | So your job is to start with ["i", "there"] and build ["hi", "there"] |
2021-11-26 19:53:02 +0100 | <geekosaur> | (x : f xs) ? |
2021-11-26 19:53:05 +0100 | FragByte | (~christian@user/fragbyte) |
2021-11-26 19:53:12 +0100 | Jeanne-Kamikaze | (~Jeanne-Ka@static-198-54-131-107.cust.tzulo.com) (Quit: Leaving) |
2021-11-26 19:53:27 +0100 | <geekosaur> | > 'a' : [] |
2021-11-26 19:53:28 +0100 | <lambdabot> | "a" |
2021-11-26 19:53:36 +0100 | <geekosaur> | > ['a' : []] |
2021-11-26 19:53:37 +0100 | <lambdabot> | ["a"] |
2021-11-26 19:53:39 +0100 | <monochrom> | (Also note how nicely I have avoided framing it as "change" :) ) |
2021-11-26 19:54:07 +0100 | <[itchyjunk]> | oh i'll try to use this hint geekosaur just gave |
2021-11-26 19:56:51 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 19:57:10 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 19:57:20 +0100 | kennyd | (~bc8165b6@217.29.117.252) (Quit: http://www.okay.uz/) |
2021-11-26 19:57:27 +0100 | jakalx | (~jakalx@base.jakalx.net) (Error from remote client) |
2021-11-26 19:59:27 +0100 | boxscape_ | (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) (Ping timeout: 250 seconds) |
2021-11-26 20:01:19 +0100 | max22- | (~maxime@2a01cb0883359800917d653070f119e8.ipv6.abo.wanadoo.fr) (Ping timeout: 268 seconds) |
2021-11-26 20:02:37 +0100 | <[itchyjunk]> | if i have `f (x:xs) = [x:f xs]` with f (' ':xs) = [], i know it should fully work but for "ab cd", it should be ["a":"b cd"] then ["ab":" cd"] then it encounters " " and it should be [ab:[]] = ["ab"] ? |
2021-11-26 20:02:47 +0100 | <[itchyjunk]> | shouldn't fully work* |
2021-11-26 20:03:36 +0100 | <monochrom> | No. |
2021-11-26 20:03:49 +0100 | <monochrom> | The whole thing. No. |
2021-11-26 20:03:55 +0100 | <zzz> | i there any difference (perf wise) between `| null x = ([],[])` and `| null x = (x,x)` ? |
2021-11-26 20:03:58 +0100 | jakalx | (~jakalx@base.jakalx.net) |
2021-11-26 20:04:09 +0100 | <monochrom> | No difference. |
2021-11-26 20:04:51 +0100 | <monochrom> | GHC-generated code has a static flyweight [] so saying "x" and saying "[]" both get compiled to the same [] flyweight. |
2021-11-26 20:04:55 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 20:05:07 +0100 | <monochrom> | Similarly for Nothing and other nullary data constructors. |
2021-11-26 20:05:19 +0100 | <zzz> | nice |
2021-11-26 20:05:55 +0100 | <zzz> | so i can think of it as just pointers to some "nullary value" in memory? |
2021-11-26 20:06:08 +0100 | <monochrom> | Yeah, x already points to the same reused []. |
2021-11-26 20:06:35 +0100 | <monochrom> | It's also a statically created [], no heap pressure. |
2021-11-26 20:07:47 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 20:08:02 +0100 | <zzz> | and just out of curiosity, are all nullary constructors the same? |
2021-11-26 20:08:10 +0100 | <monochrom> | Ah, that one is a no. |
2021-11-26 20:08:21 +0100 | <monochrom> | [] and Nothing are at different addresses. |
2021-11-26 20:08:22 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) |
2021-11-26 20:08:41 +0100 | <zzz> | couldn't they be at the same address? |
2021-11-26 20:08:59 +0100 | <monochrom> | I think there is no harm, but GHC didn't do it. |
2021-11-26 20:09:11 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) |
2021-11-26 20:09:13 +0100 | <zzz> | nice curisioty |
2021-11-26 20:09:24 +0100 | <monochrom> | Probably easier to debug in some sense. |
2021-11-26 20:10:33 +0100 | xsperry | (~xs@user/xsperry) () |
2021-11-26 20:10:46 +0100 | jgeerds | (~jgeerds@55d45b75.access.ecotel.net) (Ping timeout: 245 seconds) |
2021-11-26 20:11:21 +0100 | {Franciman} | Franciman |
2021-11-26 20:13:16 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:57:b0d1:750c:1fc) (Ping timeout: 245 seconds) |
2021-11-26 20:14:21 +0100 | xff0x | (~xff0x@2001:1a81:53bb:9600:5031:992:22e6:cca9) |
2021-11-26 20:15:40 +0100 | <hololeap> | type ThisWord = [Char] |
2021-11-26 20:15:45 +0100 | <hololeap> | type Remainder = [Char] |
2021-11-26 20:15:59 +0100 | <hololeap> | stringToWordAndRemainder :: [Char] -> (ThisWord, Remainder) -- it might help you to write this first, [itchyjunk] |
2021-11-26 20:16:16 +0100 | xsperry | (~xs@user/xsperry) |
2021-11-26 20:16:48 +0100 | <[itchyjunk]> | hmm i manage to "this word" -> ["this word"] |
2021-11-26 20:17:09 +0100 | <[itchyjunk]> | but i'll try that first |
2021-11-26 20:17:56 +0100 | <zzz> | > (:[]) "this word" |
2021-11-26 20:17:57 +0100 | <lambdabot> | ["this word"] |
2021-11-26 20:18:20 +0100 | <zzz> | yu have unlocked the angry monkey |
2021-11-26 20:18:52 +0100 | zzz | (:[]) |
2021-11-26 20:19:04 +0100 | <monochrom> | It is not angry. |
2021-11-26 20:19:11 +0100 | <EvanR> | it eats 1 thing and becomes full |
2021-11-26 20:19:14 +0100 | <monochrom> | Maybe it is robotic. |
2021-11-26 20:19:18 +0100 | <EvanR> | hungry monkey |
2021-11-26 20:19:18 +0100 | <zzz> | i dont remember |
2021-11-26 20:19:28 +0100 | <geekosaur> | robot monkey is how we used to refer to it |
2021-11-26 20:19:32 +0100 | <EvanR> | > (:[]) 'a' |
2021-11-26 20:19:34 +0100 | <lambdabot> | "a" |
2021-11-26 20:19:38 +0100 | <EvanR> | > (:[]) 1 |
2021-11-26 20:19:40 +0100 | <lambdabot> | [1] |
2021-11-26 20:19:45 +0100 | <maerwald> | I think it's a lovely monkey with big beautiful lips |
2021-11-26 20:19:53 +0100 | <maerwald> | but that's just my imagination |
2021-11-26 20:20:19 +0100 | <EvanR> | :t (:[]) (:[]) -- it can be a cannibal monkey |
2021-11-26 20:20:20 +0100 | <lambdabot> | [a -> [a]] |
2021-11-26 20:20:31 +0100 | <monochrom> | You project your persona to everything. If you see a ____ monkey, you are the one who is ____ |
2021-11-26 20:20:38 +0100 | <EvanR> | oof |
2021-11-26 20:20:44 +0100 | <monochrom> | Yes I think of myself as robotic, too. |
2021-11-26 20:20:52 +0100 | MrNobody_0000000 | (~MrNobody@user/mrnobody-0000000/x-9129771) |
2021-11-26 20:20:56 +0100 | zzz | is angry |
2021-11-26 20:21:15 +0100 | <MrNobody_0000000> | hello guys |
2021-11-26 20:21:17 +0100 | <EvanR> | you just called me a cannibal |
2021-11-26 20:21:19 +0100 | <maerwald> | well, thank you for the compliment |
2021-11-26 20:21:28 +0100 | <zzz> | GET OUT |
2021-11-26 20:21:30 +0100 | <MrNobody_0000000> | I'm having a little difficulty understanding the ||| operator |
2021-11-26 20:21:36 +0100 | <MrNobody_0000000> | I'm reading my xmonad config |
2021-11-26 20:21:41 +0100 | <geekosaur> | which one? |
2021-11-26 20:21:44 +0100 | <geekosaur> | ah |
2021-11-26 20:21:54 +0100 | <geekosaur> | it's not the one you'll find in the standard library |
2021-11-26 20:22:08 +0100 | <MrNobody_0000000> | is it specific to xmonad? |
2021-11-26 20:22:19 +0100 | <[itchyjunk]> | i just wrote a function that maps "hello world" to "hello world" it seems |
2021-11-26 20:22:20 +0100 | <[itchyjunk]> | hmm |
2021-11-26 20:22:58 +0100 | <monochrom> | Yes, you wrote foldr (:) [] but with your own recursion. |
2021-11-26 20:22:58 +0100 | <geekosaur> | https://hackage.haskell.org/package/xmonad-0.17.0/docs/XMonad-Layout.html#v:-124--124--124- |
2021-11-26 20:23:22 +0100 | <geekosaur> | but there's also one in Control.Arrow that does something completely different |
2021-11-26 20:24:22 +0100 | <MrNobody_0000000> | tiled ||| Mirror tiled ||| noBorders Full |
2021-11-26 20:24:26 +0100 | <MrNobody_0000000> | that's an example |
2021-11-26 20:24:45 +0100 | <[itchyjunk]> | i think the way i am approaching this is producing [h [e [ l [ l [o]]]]] or somesuch |
2021-11-26 20:25:47 +0100 | <hololeap> | [itchyjunk]: did you try writing that function I mentioned? (it doesn't need that long of a name :p) |
2021-11-26 20:25:58 +0100 | <[itchyjunk]> | that's the one i am working on |
2021-11-26 20:26:12 +0100 | hiruji` | (~hiruji@pool-100-4-208-71.albyny.fios.verizon.net) |
2021-11-26 20:26:13 +0100 | <[itchyjunk]> | just a tiny bit i need to figure out |
2021-11-26 20:26:30 +0100 | <[itchyjunk]> | https://bpa.st/EN3Q |
2021-11-26 20:26:32 +0100 | <geekosaur> | MrNobody_0000000, this is a shortcut for writing something like (Choose CL tiled (Choose CL (Mirror tiled) Full)) |
2021-11-26 20:26:37 +0100 | <[itchyjunk]> | h is supposed to be the one you mentioned |
2021-11-26 20:26:45 +0100 | hiruji | (~hiruji@user/hiruji) (Ping timeout: 250 seconds) |
2021-11-26 20:26:49 +0100 | <[itchyjunk]> | i just have an issue with `then x : h xs` part |
2021-11-26 20:26:52 +0100 | <MrNobody_0000000> | thanks I'll look it up |
2021-11-26 20:27:04 +0100 | <geekosaur> | this is somewhat annoying to write out so we use the ||| shortcut |
2021-11-26 20:27:10 +0100 | <[itchyjunk]> | i think the `else [xs]` does what i want |
2021-11-26 20:27:17 +0100 | <hololeap> | so with input "these are some words" it should return ("these", "are some words") |
2021-11-26 20:27:21 +0100 | <geekosaur> | I pointed to ||| earlier, Choose is just above it and CL just below |
2021-11-26 20:27:21 +0100 | <EvanR> | if you go by the types then [h [e [l [l [o]]]]] is very unlikely to happen |
2021-11-26 20:27:44 +0100 | <monochrom> | This doesn't escape from what I said. |
2021-11-26 20:27:45 +0100 | <[itchyjunk]> | oh like that? |
2021-11-26 20:28:04 +0100 | <[itchyjunk]> | i could do h (x:' ':y) = (x,y) |
2021-11-26 20:28:05 +0100 | <[itchyjunk]> | no? |
2021-11-26 20:28:27 +0100 | <hololeap> | no, you can't split a list like that, but it shouldn't be too hard to figure out |
2021-11-26 20:28:28 +0100 | <MrNobody_0000000> | so is choose comparable to an enumeration |
2021-11-26 20:28:44 +0100 | <[itchyjunk]> | ah, let me think for a few more minutes then |
2021-11-26 20:28:44 +0100 | <monochrom> | You want h "hi there" = ("hi", "there"). The induction hypothesis says you can assume h "i there" = ("i", "there"). So now you have to bridge that to ("hi", "there"). |
2021-11-26 20:28:50 +0100 | <EvanR> | see you keep thinking : is joining two lists |
2021-11-26 20:28:53 +0100 | <EvanR> | that's ++ |
2021-11-26 20:29:00 +0100 | <[itchyjunk]> | oh |
2021-11-26 20:29:01 +0100 | <EvanR> | and we don't have a pattern for that (for lists) |
2021-11-26 20:29:01 +0100 | <monochrom> | As long as you ignore this line of thought, you will get nowhere. |
2021-11-26 20:29:42 +0100 | <geekosaur> | MrNobody_0000000, it's a switch. every time you press mod-space, a CL turns into a CR, which causes the corresponding Choose to switch from the left layout to the right |
2021-11-26 20:29:58 +0100 | <geekosaur> | (Choose is itself a "layout" for this purpose) |
2021-11-26 20:30:03 +0100 | <monochrom> | Especially if you are still thinking of a for-loop, as opposed to this simple non-tail recursion. |
2021-11-26 20:30:19 +0100 | <hololeap> | [itchyjunk]: you'll have three cases for that function: for an empty list, for a list starting with a space character, and a list starting with any other character |
2021-11-26 20:30:25 +0100 | <geekosaur> | if all the switches are CR, the layout resets such that all the CRs become CLs and you cycle back to the beginning |
2021-11-26 20:30:30 +0100 | <[itchyjunk]> | is this signature correct? `h :: [Char] -> ([Char], [Char]) |
2021-11-26 20:30:35 +0100 | <monochrom> | Yes. |
2021-11-26 20:30:35 +0100 | <hololeap> | yes |
2021-11-26 20:30:44 +0100 | <MrNobody_0000000> | wow I really need to forget about C lol |
2021-11-26 20:30:54 +0100 | <geekosaur> | btw you might want to move to #xmonad, it's quieter there |
2021-11-26 20:31:13 +0100 | <MrNobody_0000000> | I'll check it out |
2021-11-26 20:31:27 +0100 | <MrNobody_0000000> | Maybe I'll come back here when I know a bit more about haskell |
2021-11-26 20:31:33 +0100 | <MrNobody_0000000> | it's a process haha |
2021-11-26 20:31:59 +0100 | <geekosaur> | well, this is less about Haskell than about how we implemented layouts |
2021-11-26 20:32:10 +0100 | <geekosaur> | they're a combination of function and data |
2021-11-26 20:32:31 +0100 | <EvanR> | forget about C, learn haskell, realize there's a C API xD |
2021-11-26 20:32:35 +0100 | <MrNobody_0000000> | are you a developer of xmonad? |
2021-11-26 20:32:39 +0100 | <geekosaur> | CLR is data that's stored in the Choose "layout", saying whether it haas curently chosen left or right. Initially they all choose left |
2021-11-26 20:32:42 +0100 | <geekosaur> | yes |
2021-11-26 20:33:04 +0100 | <MrNobody_0000000> | wow it's an honor |
2021-11-26 20:33:30 +0100 | <sm> | how would you write a file strictly ? so that you can read it right afterward and be sure of seeing all the new content ? |
2021-11-26 20:33:42 +0100 | <monochrom> | writeFile already does. |
2021-11-26 20:33:56 +0100 | <monochrom> | vanilla Prelude writeFile |
2021-11-26 20:34:21 +0100 | <MrNobody_0000000> | thanks for the help |
2021-11-26 20:34:42 +0100 | <geekosaur> | no problem |
2021-11-26 20:34:56 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 20:35:12 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:4cc1:c671:40b5:6186) |
2021-11-26 20:35:30 +0100 | lavaman | (~lavaman@98.38.249.169) |
2021-11-26 20:35:57 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:4cc1:c671:40b5:6186) (Remote host closed the connection) |
2021-11-26 20:35:57 +0100 | <monochrom> | Or if you are already using a Handle, then hClose does it. |
2021-11-26 20:36:17 +0100 | <maerwald> | sm: on windows? :) |
2021-11-26 20:36:22 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:4cc1:c671:40b5:6186) |
2021-11-26 20:36:24 +0100 | <monochrom> | Or if you are already using withFile, then waiting for it to return does it. |
2021-11-26 20:37:33 +0100 | <sm> | thanks! On all platforms. Good to know writeFile does, I am currently using hPutStr and for that I should close the handle. Great. |
2021-11-26 20:37:51 +0100 | <monochrom> | or flush buffer if you can't close yet. |
2021-11-26 20:38:09 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:4cc1:c671:40b5:6186) (Remote host closed the connection) |
2021-11-26 20:38:09 +0100 | <maerwald> | I don't know if vanilla writeFile will work this way on windows |
2021-11-26 20:38:18 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 20:38:19 +0100 | <maerwald> | I'd probably use Win32 api |
2021-11-26 20:38:22 +0100 | hiruji` | (~hiruji@pool-100-4-208-71.albyny.fios.verizon.net) (Ping timeout: 260 seconds) |
2021-11-26 20:38:43 +0100 | xsperry | (~xs@user/xsperry) () |
2021-11-26 20:39:08 +0100 | <monochrom> | What would be a possible problem? |
2021-11-26 20:39:29 +0100 | <maerwald> | how writeFile interacts with Win32 |
2021-11-26 20:39:40 +0100 | <maerwald> | and whether it allows reads during writes |
2021-11-26 20:40:09 +0100 | lavaman | (~lavaman@98.38.249.169) (Ping timeout: 268 seconds) |
2021-11-26 20:40:16 +0100 | <EvanR> | what is this windows FUD |
2021-11-26 20:40:24 +0100 | <monochrom> | Um it's sequentially writeFile (which ends with a close) and only after that a readFile. |
2021-11-26 20:40:36 +0100 | <maerwald> | ah |
2021-11-26 20:41:01 +0100 | <maerwald> | I thought it's like using a file as a pipe |
2021-11-26 20:41:03 +0100 | narendraj9 | (~user@2a02:8109:b63f:ff7c::57b2) |
2021-11-26 20:41:14 +0100 | <monochrom> | I'm OK if you say "hPutStr then hFlush then try to read but with a different Handle" |
2021-11-26 20:42:07 +0100 | <EvanR> | on the same thread? |
2021-11-26 20:42:24 +0100 | Lycurgus | (~juan@98.4.112.204) (Quit: Exeunt) |
2021-11-26 20:42:57 +0100 | <monochrom> | Well, Windows has pretty paranoid file locking, so as long as you're coming from a different Handle... |
2021-11-26 20:43:02 +0100 | cosimone` | (~user@93-47-228-243.ip115.fastwebnet.it) |
2021-11-26 20:46:02 +0100 | cosimone | (~user@2001:b07:ae5:db26:a7aa:8027:6b4e:2fb3) (Ping timeout: 240 seconds) |
2021-11-26 20:46:29 +0100 | <geekosaur> | iirc there is a problem that Handles aren't GCd immediateloy so an immediate readFile may find the write Handle still there? |
2021-11-26 20:48:25 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 20:48:31 +0100 | <monochrom> | iirc writeFile is not lazy, unlike readFile, it has a very deterministic and determined hClose. |
2021-11-26 20:48:44 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 20:48:56 +0100 | <monochrom> | I mean, as far as "iirc" is concerning. |
2021-11-26 20:49:02 +0100 | <monochrom> | s/concerning/concerned/ |
2021-11-26 20:49:18 +0100 | max22- | (~maxime@2a01cb0883359800b686e733ae8fbdbc.ipv6.abo.wanadoo.fr) |
2021-11-26 20:49:50 +0100 | <EvanR> | so writeFile is a good driver of a big lazy thing to be written |
2021-11-26 20:49:58 +0100 | <monochrom> | Yes. |
2021-11-26 20:50:34 +0100 | hiruji | (~hiruji@user/hiruji) |
2021-11-26 20:50:50 +0100 | <monochrom> | even putStr is, despite often you don't see the writing. |
2021-11-26 20:50:58 +0100 | <monochrom> | But that's buffering not laziness. |
2021-11-26 20:51:26 +0100 | <monochrom> | What would "lazy writing" mean? "Don't write until the human peek-a-poo"? |
2021-11-26 20:51:40 +0100 | <EvanR> | ask Writer xD |
2021-11-26 20:53:41 +0100 | <hololeap> | isn't that how quantum mumbo jumbo works? the universe doesn't write to file until I observe it? :) |
2021-11-26 20:54:16 +0100 | <monochrom> | At that level IIRC all physicists agree that the Copenhagen interpretation doesn't apply. |
2021-11-26 20:54:52 +0100 | hiruji` | (~hiruji@2606:6080:1001:10:3c5b:63ff:df18:8486) |
2021-11-26 20:54:53 +0100 | <sm> | with RecordWildCards, why am I seeing You cannot use `..' in a record update ? I have seen that done lots |
2021-11-26 20:55:02 +0100 | hiruji | (~hiruji@user/hiruji) (Ping timeout: 240 seconds) |
2021-11-26 20:55:19 +0100 | <jle`> | sm: i've seen it a lot in creating records |
2021-11-26 20:55:32 +0100 | <jle`> | but i'm not sure it would really make sense in a record update |
2021-11-26 20:55:43 +0100 | <jle`> | since it's implying that you're updating all of the fields anyway |
2021-11-26 20:55:49 +0100 | <sm> | I'm trying to use it with Data.Default - return def{..} |
2021-11-26 20:55:51 +0100 | <jle`> | so you might as well create a new record right? |
2021-11-26 20:55:58 +0100 | whatsupdoc | (uid509081@id-509081.hampstead.irccloud.com) |
2021-11-26 20:56:12 +0100 | <jle`> | sm: yeah i'm saying that def{..} would overwrite all of the fields anyway |
2021-11-26 20:56:22 +0100 | <jle`> | so it would use none of 'def''s fields |
2021-11-26 20:56:38 +0100 | <sm> | yes, I just want to minimise typing |
2021-11-26 20:57:14 +0100 | <monochrom> | Are you sure you were not seeing other people doing "Ctor{..}" as opposed to "varname{..}"? |
2021-11-26 20:57:18 +0100 | narendraj9 | (~user@2a02:8109:b63f:ff7c::57b2) (Remote host closed the connection) |
2021-11-26 20:57:26 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 20:57:37 +0100 | <hololeap> | jle`: why did you do this to us? https://hackage.haskell.org/package/functor-combinators-0.4.1.0/docs/Data-Functor-Combinator.html#… |
2021-11-26 20:57:41 +0100 | <sm> | that must be it I guess monochrom |
2021-11-26 20:57:55 +0100 | <jle`> | i guess it technically "makes sense" to implement, but it's probably sufficiently silly in its function that it's more likely to be done by mistake maybe |
2021-11-26 20:58:06 +0100 | <jle`> | hololeap: :) |
2021-11-26 20:58:08 +0100 | <jle`> | it's been useful to me |
2021-11-26 20:58:10 +0100 | <jle`> | :3 |
2021-11-26 20:58:13 +0100 | <hololeap> | is that not supposed to be the dual of Day? |
2021-11-26 20:58:22 +0100 | <sm> | my idea was to update a default value (smart constructor) so I wouldn't have to set every field |
2021-11-26 20:58:34 +0100 | <jle`> | hololeap: ah yes, if that's what you are talking about |
2021-11-26 20:58:38 +0100 | <jle`> | hololeap: it's the dual of invariant Day |
2021-11-26 20:58:44 +0100 | <jle`> | sm: that would set every field though |
2021-11-26 20:58:49 +0100 | <jle`> | what you wrote |
2021-11-26 20:59:06 +0100 | <monochrom> | I prefer Knight, if it comes downs to pun. |
2021-11-26 20:59:14 +0100 | son0p | (~ff@181.136.122.143) |
2021-11-26 20:59:17 +0100 | <hololeap> | oh, ok. it came up in a earlier discussion. "what's the dual of Day? Night?" ... somebody hoogles... |
2021-11-26 20:59:29 +0100 | <geekosaur> | there's a ghc issue about this that concluded it didn't really make sense |
2021-11-26 20:59:33 +0100 | <jle`> | monochrom: ah that's a better one i think |
2021-11-26 20:59:40 +0100 | <jle`> | since both Day and Knight are names in that context |
2021-11-26 20:59:40 +0100 | <geekosaur> | (.. in record updates) |
2021-11-26 20:59:42 +0100 | <jle`> | darn |
2021-11-26 21:00:34 +0100 | <monochrom> | Just bump the major major version :) |
2021-11-26 21:00:36 +0100 | <sm> | NamedFieldPuns seems to work better. return def{field2,field5} |
2021-11-26 21:00:48 +0100 | <jle`> | that one actually makes sense, yeah |
2021-11-26 21:00:51 +0100 | <hololeap> | (oh it does actually say that in the docs) |
2021-11-26 21:01:07 +0100 | <jle`> | sm: because def{..} would be equivalent to def{field1,field2,field3,field4,field5} etc. |
2021-11-26 21:01:26 +0100 | <jle`> | with namedfieldpuns you can pick which fields you want overwritten |
2021-11-26 21:01:46 +0100 | <janus> | that's one thing i like about GHC2021, it has NamedFieldPuns but not RecordWildCards |
2021-11-26 21:02:08 +0100 | <sm> | yes. I know def is not loved because it can be harder to read, I'm just trying it in this script since I'm tired of writing both a long data def and then a long smart constructor |
2021-11-26 21:02:13 +0100 | <janus> | i saw a pattern in our code base where we have fun A{..} = B{..} though |
2021-11-26 21:02:24 +0100 | <janus> | i dunno if i approve of that though :O |
2021-11-26 21:02:28 +0100 | <jle`> | sm: the issue isn't really with def though, i think |
2021-11-26 21:02:46 +0100 | <geekosaur> | just with bindings vs. constructors |
2021-11-26 21:03:02 +0100 | <jle`> | but i guess you're saying that the original constructor is not exported, but just all the fields? |
2021-11-26 21:03:24 +0100 | chomwitt | (~chomwitt@94.69.34.153) |
2021-11-26 21:03:35 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-26 21:04:09 +0100 | pavonia | (~user@user/siracusa) |
2021-11-26 21:04:12 +0100 | <jle`> | sm: you're basically using to avoid the equivalent MyLongNameConstructor{..}, right? |
2021-11-26 21:04:52 +0100 | <jle`> | janus: heh, that one can be fun :) if you have types that are just equivalent to others but missing fields, like intermediate data types |
2021-11-26 21:05:07 +0100 | juhp | (~juhp@128.106.188.82) (Ping timeout: 250 seconds) |
2021-11-26 21:06:16 +0100 | <janus> | thing is, our development environment relies on ripgrep... so unless you have HLS understanding RecordWildCards, there is at least that disadvantage |
2021-11-26 21:06:22 +0100 | <janus> | but i guess it's not really a giant problem |
2021-11-26 21:06:47 +0100 | juhp | (~juhp@128.106.188.82) |
2021-11-26 21:07:07 +0100 | <jle`> | tooling is a big issue with a lot of haskell usage patterns, yeah |
2021-11-26 21:07:25 +0100 | <jle`> | but if you rg for fields then you'll at least get the final use sites, right heh |
2021-11-26 21:07:51 +0100 | <nf> | monad-dijkstra rules |
2021-11-26 21:07:54 +0100 | <janus> | with NamedFieldPuns, if you're supposed to copy all fields over with that pattern, the compiler wouldn't know that... with RecordWildCards it could theoretically warn that you have a field in scope that isn't used |
2021-11-26 21:08:07 +0100 | <nf> | i just solved an old AoC puzzle with it and i really like it https://github.com/ncfavier/aoc/blob/main/src/2015/Day22.hs |
2021-11-26 21:08:07 +0100 | <janus> | though i think there isn't currently a warning for that |
2021-11-26 21:09:03 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 21:09:21 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 21:09:23 +0100 | <jle`> | janus: ah yeah, the lack of warning is something that does bother me |
2021-11-26 21:09:28 +0100 | <jle`> | there's only a warning if *none* are used |
2021-11-26 21:09:42 +0100 | <jle`> | maybe in general it's best to replace recordwildcards with namedfieldpuns when you are refactoring |
2021-11-26 21:09:44 +0100 | <janus> | but i think we should definitely have a warning like that. then RecordWildCards would have a use case where it is superior to NamedFieldPuns |
2021-11-26 21:10:01 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 21:10:14 +0100 | <jle`> | a warning might not make sense because it's sort of one of the "points" of recordwildcards, i don't think most people use it intending to use all of the fields |
2021-11-26 21:10:18 +0100 | <jle`> | unless maybe they should |
2021-11-26 21:10:43 +0100 | <janus> | exactly. the warning would be optional, i am not saying it should be in -Wall or anything |
2021-11-26 21:12:40 +0100 | <sm> | jle`: yes I'm avoiding that, but more important avoiding having to set all the fields |
2021-11-26 21:13:04 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) (Remote host closed the connection) |
2021-11-26 21:13:22 +0100 | ubert | (~Thunderbi@p200300ecdf0ba285e6b318fffe838f33.dip0.t-ipconnect.de) |
2021-11-26 21:13:50 +0100 | SSCC | (~SSCC@59-102-95-229.tpgi.com.au) (Quit: Client closed) |
2021-11-26 21:13:53 +0100 | <jle`> | sm: yeah, my point is that a hypothetical def{..} would set all of the fields |
2021-11-26 21:14:12 +0100 | <jle`> | since {..} in a binding position is equivalent to {field1,field2,field3,field4...all fields} |
2021-11-26 21:14:28 +0100 | <jle`> | no matter what is already in scope |
2021-11-26 21:15:21 +0100 | <jle`> | so if there was a def{..}, it would ignore all of the information in def and just overwrite it with whatever is in scope, and if the field isn't in scope, it'd be set to undefined |
2021-11-26 21:18:06 +0100 | <sm> | agreed, thank you |
2021-11-26 21:19:46 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 21:20:03 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 21:20:31 +0100 | <dminuoso> | I wish we had a split extension that just provided the construction via Constructor{..} :( |
2021-11-26 21:20:31 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 21:21:01 +0100 | <dminuoso> | But without the unhygeniec macro of Constructor{..} pattern matching |
2021-11-26 21:21:34 +0100 | <dminuoso> | Ive become very fond of it parsers and all kinds of other ApplicativeDo core |
2021-11-26 21:22:49 +0100 | <janus> | dminuoso: if you had a warning that triggered when you used it to match, wouldn't that do? no need for a new extension :P |
2021-11-26 21:23:30 +0100 | <janus> | there are already warnings in -Weverything that are too extreme, may as well add another one :P |
2021-11-26 21:23:43 +0100 | <dminuoso> | No, I dont care for code that can secretly, without display, introduce identifiers |
2021-11-26 21:23:57 +0100 | <dminuoso> | It's bad enough that I use optics TH helpers like makeLenses already. |
2021-11-26 21:24:11 +0100 | <janus> | well if you had a warning and you turn on -Werror you will effectively not have that code |
2021-11-26 21:24:19 +0100 | <dminuoso> | That's not true. |
2021-11-26 21:24:30 +0100 | <janus> | why not? |
2021-11-26 21:24:39 +0100 | <[itchyjunk]> | is `where var1 = f n && var 2 = g n` valid syntax? |
2021-11-26 21:25:03 +0100 | <dminuoso> | [itchyjunk]: No. What is that supposed to denote? |
2021-11-26 21:25:13 +0100 | <dminuoso> | janus: Not sure what to tell you beyond what I just wrote |
2021-11-26 21:25:27 +0100 | Sgeo | (~Sgeo@user/sgeo) |
2021-11-26 21:25:31 +0100 | <dminuoso> | Or wait |
2021-11-26 21:25:46 +0100 | <dminuoso> | I think I misunderstood. You mean the warning would fire whenever used as a pattern match? |
2021-11-26 21:26:03 +0100 | <[itchyjunk]> | i need to assign 2 valiables var1 and var2 where var1 needs to hold output of f and var2 of g so a function h can return (var1,var2) |
2021-11-26 21:26:05 +0100 | <janus> | dminuoso: yes exactly. i am just saying you don't necessarily need a "split extension" to achieve what you want |
2021-11-26 21:26:08 +0100 | <dminuoso> | Don't see that getting into GHC, a warning that would warn on a *feature* itself. |
2021-11-26 21:26:25 +0100 | <dminuoso> | yet-another-extension seems far more likely and in line with GHC has been doing |
2021-11-26 21:26:47 +0100 | <geekosaur> | where {var1 = f n; var2 = g n} |
2021-11-26 21:26:48 +0100 | <janus> | dminuoso: i suspect there is less bureaucracy around adding warnings than adding extensions since the ghc proposal process got started |
2021-11-26 21:26:57 +0100 | <[itchyjunk]> | oh i see, thanks |
2021-11-26 21:27:05 +0100 | <[itchyjunk]> | turns out i can directly (f n, g n) as well :x |
2021-11-26 21:27:10 +0100 | <geekosaur> | and you don't need the braces if you use indentation |
2021-11-26 21:27:19 +0100 | <geekosaur> | yes |
2021-11-26 21:27:51 +0100 | <geekosaur> | (although if the real `f n` is long I'll still do assignments just to keep stuff from wrapping) |
2021-11-26 21:27:57 +0100 | <dminuoso> | janus: Honestly, I think you have to take the proposal and extension path |
2021-11-26 21:28:04 +0100 | <geekosaur> | s/assignments/bindings/ |
2021-11-26 21:28:07 +0100 | <[itchyjunk]> | hololeap, i managed to solve the exercise but i had to start from scratch and write 2 helper functions for it :< |
2021-11-26 21:28:07 +0100 | <[itchyjunk]> | https://bpa.st/OM6Q |
2021-11-26 21:28:24 +0100 | <dminuoso> | There's just no precedence so far, I think |
2021-11-26 21:28:50 +0100 | <[itchyjunk]> | h "a b cd" gives me ("a","b cd") |
2021-11-26 21:29:04 +0100 | <dminuoso> | janus: And Im still not sure a warning would suffice. |
2021-11-26 21:29:30 +0100 | <dminuoso> | If I look at some source code and see RecordWildCards, I now have to be wary whether or not this could indicate use of unhygenic macros. |
2021-11-26 21:29:42 +0100 | <dminuoso> | Whether or not they are used cannot necessarily be seen inside that same source file |
2021-11-26 21:29:56 +0100 | <dminuoso> | Because now I have to figure out whether the build process sets that warning (and perhaps even promotes it to an error) |
2021-11-26 21:30:09 +0100 | <dminuoso> | It seems too orthogonal |
2021-11-26 21:31:00 +0100 | <janus> | but with language extensions, it also doesn't seem super straightforward to figure out if it is enabled or not |
2021-11-26 21:31:14 +0100 | <dminuoso> | If I dont see RecordWildCards, it's not being used? |
2021-11-26 21:31:35 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 265 seconds) |
2021-11-26 21:31:42 +0100 | <hololeap> | [itchyjunk]: nice! that's exactly how I did it :) |
2021-11-26 21:31:42 +0100 | wagle_ | wagle |
2021-11-26 21:31:55 +0100 | <janus> | well you have to look in the compiler flags, the cabal files, the package.yaml, however it works in nix, and the top of the file |
2021-11-26 21:31:58 +0100 | <hololeap> | well, not quite, because I didn't reverse it |
2021-11-26 21:32:17 +0100 | <hololeap> | but the layout is exactly the same |
2021-11-26 21:32:51 +0100 | hiruji` | (~hiruji@2606:6080:1001:10:3c5b:63ff:df18:8486) (Ping timeout: 245 seconds) |
2021-11-26 21:33:21 +0100 | <dminuoso> | janus: Id have to think about it for a while |
2021-11-26 21:33:32 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) |
2021-11-26 21:34:04 +0100 | <dminuoso> | It doesn't come across as evidently wrong, but it doesn't feel right. If you ever propose this in a GHC issue or on the mailing list, let me know. |
2021-11-26 21:34:13 +0100 | <dminuoso> | I'll definitely spend some thought on it |
2021-11-26 21:34:26 +0100 | dminuoso | has to go take care of some personal business now |
2021-11-26 21:34:29 +0100 | hiruji | (~hiruji@user/hiruji) |
2021-11-26 21:34:32 +0100 | <monochrom> | [itchyjunk]: There is not going to be any progress until you accept that h needs to be recursive on itself. |
2021-11-26 21:34:34 +0100 | <janus> | dminuoso: i made this argument because i saw someone on the GHC proposals repo commenting that something didn't need to be an extension |
2021-11-26 21:34:49 +0100 | <janus> | don't know which thread it was now... |
2021-11-26 21:35:56 +0100 | <hololeap> | [itchyjunk]: yeah h needs to be recursive on itself |
2021-11-26 21:36:10 +0100 | <monochrom> | [itchyjunk]: Err nevermind, I misread. |
2021-11-26 21:36:46 +0100 | <dsal> | [itchyjunk]: Names are pretty good. `f` is often called `dropWhile` and `g` is `takeWhile` (though each with a predicate) |
2021-11-26 21:37:27 +0100 | <dsal> | Actually, I might be confused. Lunch was good, though. |
2021-11-26 21:37:54 +0100 | <dsal> | Yeah, it looks like `f` is `takeWhile` |
2021-11-26 21:38:06 +0100 | <dsal> | > takeWhile (/= ' ') "some list of strings" |
2021-11-26 21:38:08 +0100 | <lambdabot> | "some" |
2021-11-26 21:38:36 +0100 | <tomsmeding> | > span (/= ' ') "some list of strings" |
2021-11-26 21:38:37 +0100 | <lambdabot> | ("some"," list of strings") |
2021-11-26 21:40:40 +0100 | jmorris | (uid433911@id-433911.hampstead.irccloud.com) |
2021-11-26 21:41:43 +0100 | <dsal> | I think DIYing them is a great exercise. I also rant about long names. But… short names can be hard, too. Not a bad idea to encode a bit of intent into a toplevel identifier. |
2021-11-26 21:41:50 +0100 | hiruji | (~hiruji@user/hiruji) (Ping timeout: 268 seconds) |
2021-11-26 21:42:29 +0100 | hiruji | (~hiruji@user/hiruji) |
2021-11-26 21:42:37 +0100 | hiruji | (~hiruji@user/hiruji) (Remote host closed the connection) |
2021-11-26 21:42:38 +0100 | <monochrom> | For the best of both worlds, use unguessable acronyms. >:) |
2021-11-26 21:44:02 +0100 | <dsal> | > let gsaw = foldr (\x o -> if x == ' ' then [] else x:o) [] in gsaw "take the first word from a list of words" |
2021-11-26 21:44:04 +0100 | <lambdabot> | "take" |
2021-11-26 21:45:11 +0100 | <hololeap> | [itchyjunk]: I'll just share with you what I did, although it doesn't reverse anything: http://sprunge.us/CWxlk1 |
2021-11-26 21:46:52 +0100 | hiruji | (~hiruji@user/hiruji) |
2021-11-26 21:47:11 +0100 | boxscape_ | (~boxscape_@p4ff0bb6c.dip0.t-ipconnect.de) |
2021-11-26 21:48:19 +0100 | Sgeo_ | (~Sgeo@user/sgeo) |
2021-11-26 21:48:40 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) |
2021-11-26 21:50:46 +0100 | Sgeo | (~Sgeo@user/sgeo) (Ping timeout: 245 seconds) |
2021-11-26 21:51:59 +0100 | mc47 | (~mc47@xmonad/TheMC47) |
2021-11-26 21:52:51 +0100 | yauhsien | (~yauhsien@61-231-63-167.dynamic-ip.hinet.net) (Ping timeout: 245 seconds) |
2021-11-26 21:54:22 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) (Read error: Connection reset by peer) |
2021-11-26 21:54:27 +0100 | <energizer> | how does operator precedence of `backtick` infix functions work? |
2021-11-26 21:54:31 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) (Ping timeout: 245 seconds) |
2021-11-26 21:55:09 +0100 | <[exa]> | you can assign them normal priorities |
2021-11-26 21:55:16 +0100 | <monochrom> | Just like all infix operators. Default to infixl 9. Can use e.g. infixr 4 `foo` to non-default. |
2021-11-26 21:55:23 +0100 | <[exa]> | by default they are something like ...yeah monochrom finished that. :D |
2021-11-26 21:55:36 +0100 | <xerox> | energizer: «If no fixity declaration is given for ` op ` then it defaults to highest precedence and left associativity (see Section 4.4.2).» |
2021-11-26 21:56:15 +0100 | brettgilio | (~brettgili@x-node.gq) (Ping timeout: 250 seconds) |
2021-11-26 21:57:04 +0100 | <hololeap> | although there are other things that take higher precedence... |
2021-11-26 21:57:28 +0100 | <hololeap> | namely function application and records |
2021-11-26 21:57:35 +0100 | xsperry | (~xs@user/xsperry) |
2021-11-26 21:58:15 +0100 | <monochrom> | \∩/ function application at 10, record at 11. "crank it up to 11" |
2021-11-26 21:58:28 +0100 | <energizer> | ok |
2021-11-26 21:59:16 +0100 | <hololeap> | I wish what is in the backticks could be an expression |
2021-11-26 21:59:26 +0100 | <yushyin> | records are very metal it seems \m/ |
2021-11-26 21:59:42 +0100 | <monochrom> | Yeah, although then the fixity declaration business becomes untractible. |
2021-11-26 21:59:55 +0100 | <hololeap> | that's fair |
2021-11-26 22:00:00 +0100 | <monochrom> | infixr 4 `(.) . (.)` |
2021-11-26 22:00:33 +0100 | <hpc> | ghc needs a language extension to replace `` with $() |
2021-11-26 22:00:37 +0100 | <hpc> | you know, for best practice |
2021-11-26 22:00:42 +0100 | Midjak | (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) |
2021-11-26 22:01:04 +0100 | <hololeap> | bwahaha |
2021-11-26 22:01:11 +0100 | <monochrom> | f $(fmap) g $ x |
2021-11-26 22:01:16 +0100 | <hololeap> | for nesting |
2021-11-26 22:01:24 +0100 | <monochrom> | In fact, let me make it worse. |
2021-11-26 22:01:27 +0100 | <monochrom> | f $(fmap) g $ (x) |
2021-11-26 22:02:33 +0100 | <tomsmeding> | and then template haskell can go cry in a corner? |
2021-11-26 22:02:38 +0100 | tomsmeding | would approve |
2021-11-26 22:03:04 +0100 | <energizer> | what is the issue with fixity? |
2021-11-26 22:03:05 +0100 | <boxscape_> | % A {a = 3} {b = "foo"} {c = True} |
2021-11-26 22:03:06 +0100 | <yahb> | boxscape_: A {a = 3, b = "foo", c = True} |
2021-11-26 22:03:11 +0100 | <boxscape_> | hm I never tried chaining record updates before |
2021-11-26 22:03:20 +0100 | <energizer> | for infix expressions |
2021-11-26 22:03:23 +0100 | <hpc> | i like it |
2021-11-26 22:03:40 +0100 | <hpc> | it's even only a little bit longer |
2021-11-26 22:03:45 +0100 | <hpc> | one character per field |
2021-11-26 22:03:52 +0100 | <boxscape_> | yeah |
2021-11-26 22:04:18 +0100 | <energizer> | i mean what is this problem <monochrom> Yeah, although then the fixity declaration business becomes untractible. |
2021-11-26 22:04:19 +0100 | <geekosaur> | energizer, you can declare a fixity for infix functions like `fmap`. declaring a fixity for an expression is kinda badly defined |
2021-11-26 22:04:56 +0100 | <hpc> | downside though, having to explain to new people that (A 3) is a function and (A {a = 3}) has all the other fields left undefined |
2021-11-26 22:05:07 +0100 | <boxscape_> | % 0 &foldl subtract$ [1..5] -- hololeap sometimes you can get away with combining $ and & instead of `` as an expression |
2021-11-26 22:05:08 +0100 | <yahb> | boxscape_: 3 |
2021-11-26 22:05:11 +0100 | <monochrom> | That was hypothetical on supporting `arbitrary expression here like (.) . (.)` |
2021-11-26 22:05:19 +0100 | <xerox> | O_O |
2021-11-26 22:05:37 +0100 | <boxscape_> | hpc you also have to turn off -Wmissing-fields |
2021-11-26 22:06:04 +0100 | <hpc> | boxscape_: only if you look at warnings :P |
2021-11-26 22:06:15 +0100 | jgeerds | (~jgeerds@55d45b75.access.ecotel.net) |
2021-11-26 22:06:21 +0100 | <boxscape_> | yeah but if you don't turn off the warning in yahb, it *only* shows you the warning :P |
2021-11-26 22:06:24 +0100 | <tomsmeding> | can also technically not work if you do a type-changing record update where multiple fields share the same type (so you need to change them in parallel) |
2021-11-26 22:06:27 +0100 | <monochrom> | A {a = 3} {b = "foo"} is a special case of let x = A{a=3) in x{b="foo"} |
2021-11-26 22:07:01 +0100 | <monochrom> | "Clearly", both A{a=3} and x{b="foo"} are legal and have well-understood semantics. |
2021-11-26 22:07:19 +0100 | <monochrom> | Now apply the cut lemma. |
2021-11-26 22:07:34 +0100 | <tomsmeding> | or consider record update to be a postfix operator |
2021-11-26 22:07:50 +0100 | <tomsmeding> | hey, haskell has postfix operators after all! In fact, an infinitude of them |
2021-11-26 22:07:52 +0100 | <boxscape_> | I think it's not obvious that the fixity works out, i.e. A{a=3}{b="foo"} could be parsed as A({a=3}{b="foo"}). Wouldn't be very useful, but possible |
2021-11-26 22:08:36 +0100 | <monochrom> | I don't have an objection to that. |
2021-11-26 22:09:31 +0100 | alx741 | (~alx741@186.178.109.194) (Ping timeout: 245 seconds) |
2021-11-26 22:09:57 +0100 | <monochrom> | (g y){b="foo"} is also OK but needs those parentheses. |
2021-11-26 22:10:19 +0100 | <hololeap> | xerox: what I was referring to would be something like: [1,2,3] `zipWith (+)` [4,5,6] |
2021-11-26 22:10:26 +0100 | <hololeap> | which you can't do |
2021-11-26 22:10:30 +0100 | alx741 | (~alx741@181.196.69.248) |
2021-11-26 22:10:37 +0100 | <boxscape_> | % [1,2,3] &zipWith (+)$ [4,5,6] |
2021-11-26 22:10:37 +0100 | <yahb> | boxscape_: [5,7,9] |
2021-11-26 22:10:43 +0100 | <monochrom> | I miss "xs `liftA2 op` ys" a lot. |
2021-11-26 22:10:47 +0100 | <hololeap> | you can only put a function name in the backticks |
2021-11-26 22:10:49 +0100 | <xerox> | first time I ever seen that, neat |
2021-11-26 22:11:03 +0100 | <monochrom> | Ugh haha that's evil and helpful. |
2021-11-26 22:11:13 +0100 | <boxscape_> | there's a hackage package that allows you to do [i|xs `op` ys|], but it's broken |
2021-11-26 22:11:22 +0100 | _ht | (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
2021-11-26 22:11:29 +0100 | <dsal> | Instead of using ``, you just have use the & and $ forms of parens. |
2021-11-26 22:11:38 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) |
2021-11-26 22:11:47 +0100 | <boxscape_> | (specifically for liftA2) |
2021-11-26 22:11:52 +0100 | <xerox> | > [2,3] &liftA2 (*)$ [5,7] |
2021-11-26 22:11:53 +0100 | <lambdabot> | [10,14,15,21] |
2021-11-26 22:12:26 +0100 | <monochrom> | xs & f & cross $ g $ ys |
2021-11-26 22:12:52 +0100 | <xerox> | > [2,3] &(\x y -> (+) <$> x <*> y)$ [5,7] |
2021-11-26 22:12:53 +0100 | <lambdabot> | [7,9,8,10] |
2021-11-26 22:13:50 +0100 | <hololeap> | dsal: you should start doing that at work |
2021-11-26 22:14:14 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) (Quit: gone to sleep. ZZZzzz…) |
2021-11-26 22:14:42 +0100 | <hpc> | and then change your font so & is ( and $ is ) |
2021-11-26 22:15:06 +0100 | <dsal> | hololeap: I was just thinking I shouldn't do any work without that |
2021-11-26 22:15:21 +0100 | kjak | (~kjak@pool-108-45-56-21.washdc.fios.verizon.net) |
2021-11-26 22:15:52 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) |
2021-11-26 22:15:53 +0100 | wroathe | (~wroathe@c-68-54-25-135.hsd1.mn.comcast.net) (Changing host) |
2021-11-26 22:15:53 +0100 | wroathe | (~wroathe@user/wroathe) |
2021-11-26 22:16:21 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) |
2021-11-26 22:17:31 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-26 22:17:43 +0100 | Vajb | (~Vajb@hag-jnsbng11-58c3a8-176.dhcp.inet.fi) |
2021-11-26 22:18:44 +0100 | <boxscape_> | Is there a hackage package that uses the GHC API to take in Haskell source code and produce template haskell? (If not I'm thinking about writing it) |
2021-11-26 22:18:57 +0100 | bollu | (uid233390@id-233390.helmsley.irccloud.com) (Quit: Connection closed for inactivity) |
2021-11-26 22:19:07 +0100 | <boxscape_> | s/template haskell/a template haskell AST |
2021-11-26 22:19:25 +0100 | <boxscape_> | I know there is a package that does it for haskell-src-exts |
2021-11-26 22:19:31 +0100 | <boxscape_> | but using the GHC API seems more robust |
2021-11-26 22:19:52 +0100 | <boxscape_> | (that package being haskell-src-meta) |
2021-11-26 22:20:17 +0100 | betelgeuse | (~betelgeus@94-225-47-8.access.telenet.be) |
2021-11-26 22:20:33 +0100 | <geekosaur> | iirc there is not and it's hard enough to do that people use haskell-src-meta instead |
2021-11-26 22:20:55 +0100 | <geekosaur> | also ghc api's ast changes too often |
2021-11-26 22:21:19 +0100 | <boxscape_> | hmm but shouldn't the GHC API essentially already have the functionality to do that, since it must have that somewhere to take the string inside of [| |] and produce a template haskell AST? |
2021-11-26 22:22:20 +0100 | <dsal> | I downloaded all of (the latest version of each package of) hackage today. AMA. Also, apparently my backups have been broken for a week, so now I'm backing them all up again. |
2021-11-26 22:22:34 +0100 | pfurla | (~pfurla@2804:14d:5c81:4104:9c86:91d6:b6fa:287b) |
2021-11-26 22:23:25 +0100 | <dsal> | boxscape_: Isn't that Q? It does something similar. |
2021-11-26 22:23:38 +0100 | <sm> | dsal: which is the best package ? |
2021-11-26 22:23:59 +0100 | <dsal> | Though I've never actually been able to use that stuff directly. I always use to get started and then just write out myown TH stuff. |
2021-11-26 22:24:00 +0100 | <hololeap> | are there any noop packages? |
2021-11-26 22:24:17 +0100 | <hololeap> | like, just a .cabal file |
2021-11-26 22:24:25 +0100 | <boxscape_> | dsal right basically I'm thinking I should be able to take the code that is used for Q and provide a convenient API to it |
2021-11-26 22:24:30 +0100 | <dsal> | sm: Looks like hledger-1.23.tar.gz is as easy as 1,2,3. |
2021-11-26 22:24:55 +0100 | <sm> | hooray ! :-) |
2021-11-26 22:24:58 +0100 | <dsal> | hololeap: yeah |
2021-11-26 22:25:07 +0100 | <dsal> | Well, and a Setup.hs |
2021-11-26 22:25:21 +0100 | <hololeap> | lol I'm really not surprised :p |
2021-11-26 22:25:34 +0100 | <dsal> | e.g., bools-0.1.1.tar.gz |
2021-11-26 22:25:34 +0100 | <sm> | when is the HF going to do something about Setup.hs, eh ?? |
2021-11-26 22:25:34 +0100 | <hpc> | https://hackage.haskell.org/package/acme-one-0.0.2/src/ |
2021-11-26 22:25:50 +0100 | <hpc> | hololeap: ^ |
2021-11-26 22:25:56 +0100 | <dsal> | That's way more complicated than bools |
2021-11-26 22:26:00 +0100 | sm | thinks of HF as the County Council now |
2021-11-26 22:26:13 +0100 | <dsal> | https://hackage.haskell.org/package/bools-0.1.1/src/ |
2021-11-26 22:26:19 +0100 | <hololeap> | rofl |
2021-11-26 22:26:24 +0100 | <hololeap> | hpc |
2021-11-26 22:26:31 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 22:26:56 +0100 | <boxscape_> | so acme-one is the identity element for package dependencies, interesting |
2021-11-26 22:27:45 +0100 | <dsal> | The biggest package is liquidhaskell-0.8.10.7 |
2021-11-26 22:28:07 +0100 | <dsal> | Followed by sugarhaskell-0.1 if you prefer a solid |
2021-11-26 22:28:07 +0100 | <boxscape_> | what is the package with the longest name |
2021-11-26 22:28:27 +0100 | <hpc> | probably some web framework subpackage |
2021-11-26 22:28:47 +0100 | <dsal> | Just kind of eyeing it, phonetic-languages-simplified-generalized-examples-array-0.13.1.0 |
2021-11-26 22:28:52 +0100 | <boxscape_> | nice |
2021-11-26 22:29:43 +0100 | <hololeap> | lol I _knew_ it would be one by that guy |
2021-11-26 22:29:55 +0100 | <hololeap> | looks like phonetic-languages-simplified-generalized-examples-common is longer |
2021-11-26 22:30:10 +0100 | <dsal> | phonetic-languages-simplified-generalized-properties-array |
2021-11-26 22:30:36 +0100 | <hpc> | what's the most deeply nested module name? |
2021-11-26 22:30:44 +0100 | <hpc> | module A.B.C.D.etc |
2021-11-26 22:30:52 +0100 | <dsal> | Oooh. Hmm... |
2021-11-26 22:31:03 +0100 | reumeth | (~reumeth@user/reumeth) (Ping timeout: 260 seconds) |
2021-11-26 22:31:23 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) |
2021-11-26 22:32:40 +0100 | <tomsmeding> | https://hackage.haskell.org/package/liquidhaskell-0.8.10.7/src/TODO.EASY.md |
2021-11-26 22:32:46 +0100 | <EvanR> | sugar haskell + liquid haskell = solution? |
2021-11-26 22:33:02 +0100 | <tomsmeding> | see the last todo item, doesn't sound very easy by that description |
2021-11-26 22:33:03 +0100 | <EvanR> | haskell |
2021-11-26 22:33:29 +0100 | <dsal> | The longest is Network.Google.Resource.Healthcare.Projects.Locations.DataSets.DicomStores.Studies.Series.Instances.Frames.RetrieveRendered |
2021-11-26 22:33:37 +0100 | <dsal> | But I'm not sure that's the most deeply nested. |
2021-11-26 22:33:40 +0100 | <dsal> | Just using shell hackery right now. |
2021-11-26 22:33:44 +0100 | <hololeap> | O_O |
2021-11-26 22:33:46 +0100 | <hpc> | jinkies |
2021-11-26 22:34:03 +0100 | <EvanR> | haskell for healthcare |
2021-11-26 22:34:14 +0100 | <EvanR> | the next killer app |
2021-11-26 22:34:33 +0100 | <dsal> | lol |
2021-11-26 22:34:54 +0100 | <boxscape_> | healthkell |
2021-11-26 22:35:27 +0100 | acidjnk_new | (~acidjnk@p200300d0c7271e35059025bf8f5e09b5.dip0.t-ipconnect.de) |
2021-11-26 22:35:29 +0100 | <EvanR> | 😱 |
2021-11-26 22:35:39 +0100 | <janus> | dminuoso: apropos RecordWildCards. not how Eisenberg is arguing for a new warning and a new way to have warnings in part of a module: https://github.com/ghc-proposals/ghc-proposals/pull/436 |
2021-11-26 22:35:44 +0100 | <janus> | *note |
2021-11-26 22:36:20 +0100 | <janus> | jle`: Also apropos what we talked about |
2021-11-26 22:37:17 +0100 | <janus> | I really don't like the original proposal but what Eisenberg suggests sounds fine to me. Though I mostly care about the new warning, not the selective warnings bit. |
2021-11-26 22:37:25 +0100 | <dsal> | The most deeply nested outside of those Google APIs is Network.API.Telegram.Bot.Object.Update.Message.Content.Poll.Option |
2021-11-26 22:37:44 +0100 | <dsal> | And if we're looking for something that's not a dumb REST API, I think we have Data.Number.ER.RnToRm.UnitDom.Base.Tests.Properties.Ring |
2021-11-26 22:38:45 +0100 | <hololeap> | that sounds like a Henning Thielemann package |
2021-11-26 22:39:24 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 22:39:43 +0100 | <sm> | boxscape_: lol instant classic project name there |
2021-11-26 22:39:54 +0100 | <boxscape_> | yeah |
2021-11-26 22:40:19 +0100 | <sm> | you should register that, I'd like to see it built :) |
2021-11-26 22:40:29 +0100 | <boxscape_> | I don't know what it would do though :/ |
2021-11-26 22:40:44 +0100 | <tomsmeding> | specifically for people with a lisp? |
2021-11-26 22:40:48 +0100 | <janus> | what about crowd-sourcing prostate cancer survival duration |
2021-11-26 22:41:00 +0100 | <boxscape_> | from healthkell to healskell in just 3 weeks |
2021-11-26 22:41:10 +0100 | <janus> | people upload their test results, system correlates with other people, tell you have long you have to live and whether your doctor is a crank |
2021-11-26 22:41:46 +0100 | <janus> | if people stop logging on it means they died |
2021-11-26 22:42:07 +0100 | <tomsmeding> | dsal: is sugarhaskell also the package with the most non-haskell files |
2021-11-26 22:42:13 +0100 | <boxscape_> | I foresee false positives |
2021-11-26 22:42:18 +0100 | <hololeap> | I don't think it has to do anything, computers + "health" = $$$ |
2021-11-26 22:42:36 +0100 | <boxscape_> | I'll just copy acme-one then |
2021-11-26 22:43:02 +0100 | jumper149 | (~jumper149@static.6.71.203.116.clients.your-server.de) (Quit: WeeChat 3.3) |
2021-11-26 22:43:16 +0100 | <tomsmeding> | boxscape_: I'd take acme-zero, at least then you're sure it doesn't do anything |
2021-11-26 22:43:23 +0100 | <dsal> | tomsmeding: I've not actually looked inside any of these, but like... it's a bunch of java? |
2021-11-26 22:43:43 +0100 | <dsal> | Things I didn't expect to find in hackage: compiled class files in a junit directory. |
2021-11-26 22:44:02 +0100 | <dsal> | It was packaged on my birthday, though, so there's that. |
2021-11-26 22:45:00 +0100 | <tomsmeding> | dsal: yeah I look sugarhaskell up on hackage, saw just one module, was puzzled, clicked [browse], saw META-INF, jar files, $class files, and was even more puzzled |
2021-11-26 22:45:41 +0100 | <tomsmeding> | also acme-zero has two versions |
2021-11-26 22:45:50 +0100 | <tomsmeding> | first version was not good enough |
2021-11-26 22:46:15 +0100 | <dsal> | Hard to get it right on the first upload. |
2021-11-26 22:46:22 +0100 | hololeap | makes a package that comes bundled with a debian ISO to run an executable |
2021-11-26 22:46:58 +0100 | <dsal> | I worked at a place where a contractor basically did that. |
2021-11-26 22:47:02 +0100 | slack7679 | (~slack1256@181.42.49.169) (Ping timeout: 240 seconds) |
2021-11-26 22:47:18 +0100 | <Rembane_> | Sounds like Docker but more. |
2021-11-26 22:47:22 +0100 | <dsal> | Checked in an ISO for the thing you needed to run his code. It very much a "Sir, this is a Wendy's" moment. |
2021-11-26 22:48:08 +0100 | <Rembane_> | Putting it in code repository is... yeah... |
2021-11-26 22:48:50 +0100 | <janus> | how would you store your smalltalk images? github seems like a good option |
2021-11-26 22:49:11 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) |
2021-11-26 22:51:41 +0100 | <dsal> | Smalltalk seems pretty neat for "my computer" but I never really figured out how to usefully move code in and out. |
2021-11-26 22:51:54 +0100 | <tomsmeding> | dsal: in the same vein, I guess: how many different file extensions can you find |
2021-11-26 22:52:02 +0100 | <sm> | janus: squeak/pharo have some tools for that |
2021-11-26 22:52:47 +0100 | <janus> | sm: epicea? that looks like good old `.changes`. i think people use git now somehow? |
2021-11-26 22:53:02 +0100 | <sm> | yes, there are tools for it |
2021-11-26 22:53:43 +0100 | <sm> | also of course many native smalltalk alternatives, monticello and envy are two IIRC |
2021-11-26 22:54:38 +0100 | zer0bitz | (~zer0bitz@2001:2003:f6bc:f00:75c5:c6ed:c91:17fe) (Read error: Connection reset by peer) |
2021-11-26 22:54:56 +0100 | <sm> | https://github.com/hpi-swa/Squot seems to be one |
2021-11-26 22:55:30 +0100 | <janus> | oh my , that certainly looks exotic! thanks |
2021-11-26 22:55:41 +0100 | <sm> | wow you nerdsniped me there. We could use more smalltalk in here, but I suppose it is off topic.. np |
2021-11-26 22:55:53 +0100 | <EvanR> | more LambdaMOO obviously |
2021-11-26 22:56:47 +0100 | xkuru | (~xkuru@user/xkuru) |
2021-11-26 22:57:04 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) (Quit: My MacBook has gone to sleep. ZZZzzz…) |
2021-11-26 22:57:24 +0100 | <dsal> | λ> exts = Set.fromList (takeExtension <$> files) |
2021-11-26 22:57:24 +0100 | <dsal> | λ> length exts |
2021-11-26 22:57:25 +0100 | <dsal> | 1301 |
2021-11-26 22:57:38 +0100 | <tomsmeding> | that's a lot |
2021-11-26 22:58:12 +0100 | <dsal> | One of them is "" |
2021-11-26 22:58:13 +0100 | <tomsmeding> | wanted to say, anything interesting, but that's quite the large collection to go through |
2021-11-26 22:58:14 +0100 | <dsal> | So just 1300 |
2021-11-26 22:58:15 +0100 | <boxscape_> | what is `length files`? |
2021-11-26 22:58:24 +0100 | <dsal> | 381164 |
2021-11-26 22:58:27 +0100 | <boxscape_> | I see |
2021-11-26 22:58:55 +0100 | <tomsmeding> | in what position in the frequency ranking is .class |
2021-11-26 22:59:02 +0100 | <dsal> | No obvious bitcoin wallets. |
2021-11-26 22:59:53 +0100 | slice | (~slice@user/slice) (Quit: zzz) |
2021-11-26 23:01:40 +0100 | <dsal> | class is 22164. I need to flip this map around or something to get distributions. |
2021-11-26 23:01:52 +0100 | <boxscape_> | just write `flip files` |
2021-11-26 23:04:00 +0100 | <tomsmeding> | dsal: ordering = sortBy (comparing snd) $ map ((,) <$> head <*> length) $ groupBy ((==) `on` fst) $ sortBy (comparing fst) $ map (\f -> (takeExtension f, f)) files |
2021-11-26 23:04:15 +0100 | <tomsmeding> | imports Data.Ord, Data.Function, Data.List |
2021-11-26 23:04:32 +0100 | <tomsmeding> | oh perhaps a reverse in front |
2021-11-26 23:04:47 +0100 | <dsal> | This would be easier if my ghci worked |
2021-11-26 23:05:03 +0100 | <tomsmeding> | and the resulting list has a filename component but that's just the first occurrence, which is uninteresting |
2021-11-26 23:05:14 +0100 | <tomsmeding> | dsal: many things are easier if ghci works |
2021-11-26 23:06:00 +0100 | <tomsmeding> | replace the 'head' with 'fst . head' in order to get rid of the filename |
2021-11-26 23:06:18 +0100 | <zzz> | is Data.Set.fromList more efficient than Data.Foldable.fromList? |
2021-11-26 23:06:24 +0100 | <hololeap> | tomsmeding: what about walking into Mordor. is that easier? |
2021-11-26 23:06:25 +0100 | <dsal> | The thing I was doing gave me the top 10: [(193776,".hs"),(23899,""),(22164,".class"),(17742,".cabal"),(12902,".md"),(7919,".h"),(6153,".c"),(5231,".yaml"),(5082,".txt"),(4382,".svg")] |
2021-11-26 23:06:51 +0100 | <tomsmeding> | zzz: Data.Foldable doesn't have a fromList? |
2021-11-26 23:06:55 +0100 | <dsal> | "" is at least partially directories... I got rid of the ones that didn't end in / |
2021-11-26 23:07:22 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) |
2021-11-26 23:07:49 +0100 | <tomsmeding> | hololeap: probably. At least you have an excuse if someone asks you why you haven't actually walked into Mordor yet -- laziness bit you |
2021-11-26 23:08:49 +0100 | <tomsmeding> | dsal: Are those numbers the first occurrence in a list of all files sorted by extension ordered on extension prevalence? |
2021-11-26 23:08:54 +0100 | <tomsmeding> | that's an... interesting metric |
2021-11-26 23:09:19 +0100 | <tomsmeding> | oh they are occurrence counts |
2021-11-26 23:09:23 +0100 | <tomsmeding> | that makes so much more sense |
2021-11-26 23:09:51 +0100 | tomsmeding | somehow thought that was the bottom 10, and tried to rationalise the numbers from there |
2021-11-26 23:10:53 +0100 | <dsal> | I started with m = Map.fromListWith (<>) [(takeExtension f, Sum 1) | f <- files] |
2021-11-26 23:10:57 +0100 | <dsal> | And then just flipped it. |
2021-11-26 23:11:02 +0100 | <dsal> | The files list is the output of tar tf |
2021-11-26 23:11:33 +0100 | <tomsmeding> | that's quite a bit neater than my monster of an expression |
2021-11-26 23:11:51 +0100 | <dsal> | Anything I try to edit in GHCI turns into garbage if I do anything other than append. |
2021-11-26 23:11:58 +0100 | <tomsmeding> | I guess I re-implemented Map.fromListWith (<>) |
2021-11-26 23:12:08 +0100 | <dsal> | Yeah, I and I reimplemented + |
2021-11-26 23:12:13 +0100 | <tomsmeding> | :D |
2021-11-26 23:12:22 +0100 | <dsal> | I had grander ideas when I started. |
2021-11-26 23:12:35 +0100 | <EvanR> | rate my format style https://paste.tomsmeding.com/ab9Tfx0x |
2021-11-26 23:12:39 +0100 | <dsal> | By the time I got to `Sum 1` there was no turning back. |
2021-11-26 23:12:50 +0100 | <EvanR> | just kidding, give me a tip on how to make it look like not shit |
2021-11-26 23:13:12 +0100 | <dsal> | lonely comma |
2021-11-26 23:13:30 +0100 | <tomsmeding> | EvanR: put the definitions in a where block, use RecordWildCards and write defaultMini {..} |
2021-11-26 23:13:44 +0100 | <tomsmeding> | except that uses RecordWildCards which is bad |
2021-11-26 23:14:15 +0100 | <geekosaur> | didnt we determine binding {..} doesn't work anyway? |
2021-11-26 23:14:17 +0100 | <dsal> | No, apparently RecordWildCards is good, but where is bad. You should do the same thing in let first and then just {..} it all away. |
2021-11-26 23:14:33 +0100 | <geekosaur> | I should say `binding {..}` |
2021-11-26 23:15:06 +0100 | <dsal> | The Standard™ on this project is `let someTypeNameField1 = 1; someTypeNameField2 = 2 in SomeType{..}` |
2021-11-26 23:16:47 +0100 | CiaoSen | (~Jura@p200300c9570204002a3a4dfffe84dbd5.dip0.t-ipconnect.de) (Ping timeout: 268 seconds) |
2021-11-26 23:17:11 +0100 | <tomsmeding> | EvanR: honestly I'd just write https://paste.tomsmeding.com/ynvT5pJY |
2021-11-26 23:18:50 +0100 | <EvanR> | alright |
2021-11-26 23:19:07 +0100 | <EvanR> | i had a where clause then was mad that I had to come up with alternate names |
2021-11-26 23:19:32 +0100 | Gurkenglas | (~Gurkengla@dslb-002-203-144-204.002.203.pools.vodafone-ip.de) (Ping timeout: 240 seconds) |
2021-11-26 23:19:57 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) |
2021-11-26 23:20:21 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) (Ping timeout: 245 seconds) |
2021-11-26 23:20:43 +0100 | <boxscape_> | (I imagine it's apparent from the conversation so far but to be clear, you don't need alternate names for a where clause https://paste.tomsmeding.com/4Zf5CJVJ ) |
2021-11-26 23:21:05 +0100 | <EvanR> | ok I didn't grok the wildcards suggestion earlier |
2021-11-26 23:21:34 +0100 | <tomsmeding> | boxscape_: doesn't that give shadowing warnings? |
2021-11-26 23:21:40 +0100 | <tomsmeding> | though my suggestion did the same thing |
2021-11-26 23:22:15 +0100 | <boxscape_> | erm don't you not get shadowing warnings for fields if NamedFieldPuns or RecordWildCards is enabled? I could be wrong |
2021-11-26 23:22:22 +0100 | waleee | (~waleee@2001:9b0:216:8200:d457:9189:7843:1dbd) |
2021-11-26 23:22:29 +0100 | <EvanR> | ok this is NamedFieldPuns |
2021-11-26 23:22:39 +0100 | <boxscape_> | yeah |
2021-11-26 23:22:51 +0100 | <EvanR> | it would save me from needing a lambdacase, but ... the puns are weird |
2021-11-26 23:23:07 +0100 | <EvanR> | but maybe its cool |
2021-11-26 23:23:17 +0100 | tomsmeding | doesn't like puns |
2021-11-26 23:23:26 +0100 | <tomsmeding> | well, not in programming languages |
2021-11-26 23:23:39 +0100 | <dsal> | I don't understand this word "pun" |
2021-11-26 23:23:43 +0100 | <monochrom> | You will hate this: |
2021-11-26 23:23:53 +0100 | <monochrom> | @quote monochrom faster.than |
2021-11-26 23:23:53 +0100 | <lambdabot> | monochrom says: einstein's theory implies that haskell cannot be faster than c |
2021-11-26 23:23:55 +0100 | <tomsmeding> | dsal: shadowing |
2021-11-26 23:24:06 +0100 | <dsal> | But why "pun" ? |
2021-11-26 23:24:15 +0100 | <tomsmeding> | monochrom: that's not a pun in a programming language, but I hate it nevertheless |
2021-11-26 23:24:25 +0100 | <geekosaur> | because the same name is being used in two ways |
2021-11-26 23:24:28 +0100 | <EvanR> | pun, the same words means different things |
2021-11-26 23:24:31 +0100 | <xerox> | From Middle English ponnen, ponen, punen, from Old English punian, pūnian (“to pound, beat, bray, bruise, crush, grind”), from Proto-Germanic *punōną (“to break to pieces, pulverize”). See pound. As a kind of word play, from the notion of "beating" the words into place. |
2021-11-26 23:24:32 +0100 | <dsal> | Ooh. I get it. |
2021-11-26 23:24:52 +0100 | <tomsmeding> | ooh ą |
2021-11-26 23:25:11 +0100 | <Rembane_> | It's like hack inverse |
2021-11-26 23:25:14 +0100 | <monochrom> | I thought typographers beat the words into place. |
2021-11-26 23:25:22 +0100 | <monochrom> | or typesetters |
2021-11-26 23:25:33 +0100 | <EvanR> | I was trying to wipe the dirt off my monitor near tomsmeding's ą |
2021-11-26 23:25:41 +0100 | <monochrom> | hahaha |
2021-11-26 23:25:42 +0100 | dsal | too |
2021-11-26 23:26:31 +0100 | <EvanR> | didn't see it in the xerox output |
2021-11-26 23:27:59 +0100 | tromp | (~textual@dhcp-077-249-230-040.chello.nl) (Quit: My iMac has gone to sleep. ZZZzzz…) |
2021-11-26 23:28:14 +0100 | <monochrom> | I think I see what you did there |
2021-11-26 23:28:32 +0100 | DNH | (~DNH@2a02:8108:1100:16d8:6057:883c:398d:9dbd) |
2021-11-26 23:30:46 +0100 | michalz | (~michalz@185.246.204.58) (Remote host closed the connection) |
2021-11-26 23:32:53 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) (Remote host closed the connection) |
2021-11-26 23:33:32 +0100 | deadmarshal | (~deadmarsh@95.38.116.172) (Ping timeout: 240 seconds) |
2021-11-26 23:33:45 +0100 | Flonk | (~Flonk@vps-zap441517-1.zap-srv.com) (Quit: Ping timeout (120 seconds)) |
2021-11-26 23:34:47 +0100 | zincy_ | (~zincy@2a00:23c8:970c:4801:4cc1:c671:40b5:6186) |
2021-11-26 23:34:49 +0100 | Flonk | (~Flonk@vps-zap441517-1.zap-srv.com) |
2021-11-26 23:36:10 +0100 | FinnElija | (~finn_elij@user/finn-elija/x-0085643) |
2021-11-26 23:37:51 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) (Remote host closed the connection) |
2021-11-26 23:38:05 +0100 | <sm> | successful hack: to get around my distaste for changelog editing, I made a tool that accepts an edit for just the oldest unedited pending item. Strangely, it works. Toil averted! |
2021-11-26 23:38:09 +0100 | hskpractice | (~hskpracti@94-255-217-215.cust.bredband2.com) |
2021-11-26 23:38:12 +0100 | kuribas | (~user@ptr-25vy0i8ep4e11jhvxvb.18120a2.ip6.access.telenet.be) (Quit: ERC (IRC client for Emacs 26.3)) |
2021-11-26 23:38:21 +0100 | eggplantade | (~Eggplanta@2600:1700:bef1:5e10:852c:89ad:25b7:fe51) (Remote host closed the connection) |
2021-11-26 23:39:23 +0100 | <dsal> | I wrote a tool while back that would generate changelogs from git tags with fancy little charts and stuff saying who contributed to each release. |
2021-11-26 23:39:30 +0100 | <dsal> | So I just needed to write stuff in my tags. |
2021-11-26 23:39:50 +0100 | <dsal> | ChangeLog files are weird to me because it's another place that you have to write the same stuff, but inside the thing that's taking the changes. |
2021-11-26 23:40:17 +0100 | <[itchyjunk]> | hmm |
2021-11-26 23:40:21 +0100 | <arahael> | dsal: To me, changelogs are more stakeholder focused. |
2021-11-26 23:40:56 +0100 | <arahael> | (Which matters when your stakeholders aren't developers) |
2021-11-26 23:41:10 +0100 | <dsal> | Sure, but I can put that same information in my tag. |
2021-11-26 23:41:14 +0100 | <dsal> | And then just make the changelog on the fly. |
2021-11-26 23:41:20 +0100 | Midjak | (~Midjak@may53-1-78-226-116-92.fbx.proxad.net) (Quit: This computer has gone to sleep) |
2021-11-26 23:41:27 +0100 | <dsal> | Except you can't do that when the changelog is checked in. So you have to copy and paste or something. |
2021-11-26 23:42:12 +0100 | <sm> | dsal: nice. I generate them from commit messages (but they still need editing, hence another tool) |
2021-11-26 23:42:28 +0100 | gehmehgeh_ | (~user@user/gehmehgeh) (Quit: Leaving) |
2021-11-26 23:42:46 +0100 | <EvanR> | the changelog changelog |
2021-11-26 23:43:19 +0100 | <dsal> | Apparently I wrote this in python: https://github.com/dustin/bindir/blob/master/git-htmlchangelog |
2021-11-26 23:43:21 +0100 | <arahael> | dsal: Yeah, that wors as well. |
2021-11-26 23:43:24 +0100 | <arahael> | *works as well. |
2021-11-26 23:43:52 +0100 | <dsal> | And it doesn't work because you need things that probably don't exist anymore. |
2021-11-26 23:44:27 +0100 | <dsal> | I have no idea how to deal with python packages. Guess I'll just not do that. |
2021-11-26 23:45:12 +0100 | <dsal> | Here's an old example of what that would do: http://dustin.github.io/java-memcached-client/changelog.html |
2021-11-26 23:46:57 +0100 | namkeleser | (~namkelese@101.175.102.188) |
2021-11-26 23:47:21 +0100 | <EvanR> | dang... your boss can easily tell who to fire, nice |
2021-11-26 23:47:26 +0100 | dschrempf | (~dominik@070-207.dynamic.dsl.fonira.net) (Quit: WeeChat 3.3) |
2021-11-26 23:47:49 +0100 | <EvanR> | "it has come to my attention that you are not a very big piece of the pie" |
2021-11-26 23:47:58 +0100 | burnsidesLlama | (~burnsides@dhcp168-025.wadham.ox.ac.uk) (Remote host closed the connection) |
2021-11-26 23:49:02 +0100 | <dsal> | I had this cool realtime view of all of our repositories that did something like that. It was pretty neat. I made the most hideous conflation of a pie chart and a bar chart with a stream chart of changes over time. |
2021-11-26 23:50:30 +0100 | <sm> | ooh, pretty |
2021-11-26 23:50:46 +0100 | merijn | (~merijn@83-160-49-249.ip.xs4all.nl) |
2021-11-26 23:51:00 +0100 | <sm> | what are the pie charts.. number of lines changed ? |
2021-11-26 23:51:17 +0100 | <dsal> | Just commits |
2021-11-26 23:51:23 +0100 | <dsal> | shortlog in pacman form |
2021-11-26 23:52:51 +0100 | <dsal> | Here's a tiny screenshot of the "realtime" thing I'd built a while back: http://dustin.sallings.org/images/gerrit-small.png |
2021-11-26 23:53:16 +0100 | <dsal> | It was fun to watch. |
2021-11-26 23:53:38 +0100 | <dsal> | That was for our code review system. Could see all the people doing all the things |
2021-11-26 23:54:44 +0100 | <dsal> | Wish that were still running and/or I had a readable screenshot. The weird chart in the bottom right was a combination of people, projects, activity levels, and something else. |
2021-11-26 23:56:43 +0100 | <tabemann> | I hate project management tools |
2021-11-26 23:57:25 +0100 | <dsal> | Oh, I do. It was project specific, showing how many different people were participating on it and how many changes went in to each project. https://usercontent.irccloud-cdn.com/file/0Jbdncx5/gerrit.png |
2021-11-26 23:57:29 +0100 | slice | (~slice@user/slice) |
2021-11-26 23:57:54 +0100 | <[itchyjunk]> | where { (x,xs) = h s} makes sense right? h s returns a tuple (a,b) |
2021-11-26 23:57:55 +0100 | <dsal> | I really like *implicit* project management tools. I'm writing code. Doing good commits, etc... Let everything observe that and communicate stuff instead of making me do extra work to tell you again what I've done. |
2021-11-26 23:58:25 +0100 | <dsal> | [itchyjunk]: Ask the compiler if it makes sense. |
2021-11-26 23:58:50 +0100 | <dsal> | (but you probably don't need {} unless you're trying to shove a bunch of stuff onto a line) |
2021-11-26 23:59:15 +0100 | wroathe | (~wroathe@user/wroathe) (Ping timeout: 260 seconds) |
2021-11-26 23:59:27 +0100 | <arahael> | Hmm, a bit of newbie help... I've got this error: Data Constructor not in scope: Discover :: Amazonka.Auth.Credentials |
2021-11-26 23:59:33 +0100 | <arahael> | How do I find out where that is, so that I can import it? |
2021-11-26 23:59:49 +0100 | <monochrom> | [itchyjunk]: Yes. It is very useful. |
2021-11-26 23:59:52 +0100 | <arahael> | I've tried searching hoogle, but I think Amazonka 2.0 isn't in stackage yet, so it isn't in hoogle. |