Logs: liberachat/#haskell
| 2021-07-13 19:59:57 | <Profpatsch> | it will always give you a normalized layout |
| 2021-07-13 20:00:08 | <Profpatsch> | davean: it is semantically indentet |
| 2021-07-13 20:00:08 | <davean> | Profpatsch: yes, which will lose all the insite into what goes toegehr |
| 2021-07-13 20:00:11 | <Profpatsch> | *d |
| 2021-07-13 20:00:16 | <davean> | no, its syntacticly indented |
| 2021-07-13 20:00:18 | × | neceve quits (~quassel@2a02:c7f:607e:d600:f762:20dd:304e:4b1f) (Ping timeout: 276 seconds) |
| 2021-07-13 20:00:21 | <monochrom> | Local consistency matters. Global consistency? Would you even notice? |
| 2021-07-13 20:00:22 | <davean> | Those are VERY different |
| 2021-07-13 20:00:25 | × | Erutuon quits (~Erutuon@user/erutuon) (Client Quit) |
| 2021-07-13 20:00:37 | <Profpatsch> | davean: you mean newlines between lines? |
| 2021-07-13 20:00:59 | <davean> | no, though that can come into it |
| 2021-07-13 20:01:06 | <Profpatsch> | davean: I mean, give an example |
| 2021-07-13 20:01:09 | <Profpatsch> | I don’t know of one |
| 2021-07-13 20:01:22 | <maerwald> | monochrom: if you have sudden changes in indenting/style within a single function, it's a good sign that you want to read blame/git log of said function. Why remove that information? |
| 2021-07-13 20:01:31 | <davean> | Like aligning parallel parts of code to show the relation between the lines |
| 2021-07-13 20:01:57 | <Profpatsch> | davean: you mean aligning symbools? |
| 2021-07-13 20:02:01 | <davean> | Profpatsch: a fairly trivial one would be to make all the "action" parts of a conditional structure at the same depth so you can scan them |
| 2021-07-13 20:02:04 | <dminuoso> | I only use stylish-haskell for a single thing: sorting and formatting imports, and that's because its formatting style coincides with mine. So this tool assists me. |
| 2021-07-13 20:02:09 | <Profpatsch> | Sorry, but that’s never worth it |
| 2021-07-13 20:02:23 | <davean> | I said it was trivial |
| 2021-07-13 20:02:35 | <Profpatsch> | It will mess with line diffs, it will mess with automatic formatters, which are just extreme time and brain cycle savers |
| 2021-07-13 20:02:35 | <davean> | You wanted an example that fits in IRC though |
| 2021-07-13 20:02:46 | × | Hanicef quits (~hanicef@90-229-213-50-no68.tbcn.telia.com) (Quit: leaving) |
| 2021-07-13 20:02:47 | <Profpatsch> | davean: nah, can be a paste if you want |
| 2021-07-13 20:02:48 | <davean> | So what about diffs? we read code, diffs are an implimentation detail |
| 2021-07-13 20:02:50 | <maerwald> | coding isn't just talking to the PC, it's talking to each other and expressing yourself... all of those convey information. Inconsistency conveys information, personaly style conveys information |
| 2021-07-13 20:02:55 | → | nuncanada joins (~dude@179.235.162.215) |
| 2021-07-13 20:02:59 | <Profpatsch> | davean: I read more diffs than code |
| 2021-07-13 20:03:04 | × | nuncanada quits (~dude@179.235.162.215) (Remote host closed the connection) |
| 2021-07-13 20:03:09 | <Profpatsch> | as does anybody working in a team |
| 2021-07-13 20:03:17 | <maerwald> | If your goal is to read "as fast as possible", then I'm not even sure that's a good goal |
| 2021-07-13 20:03:24 | <Profpatsch> | maerwald: that’s a strawman |
| 2021-07-13 20:03:34 | <davean> | You should understand as fast as possible, not read as fast as possible |
| 2021-07-13 20:03:53 | <Profpatsch> | ormolu helps both, speed of expressing ideas and speed of understanding code |
| 2021-07-13 20:04:02 | <Profpatsch> | not reading code, understanding code |
| 2021-07-13 20:04:05 | <davean> | no, ormolu makes code a mush |
| 2021-07-13 20:04:22 | <maerwald> | I've looked at ormolu formatted code and it looked stripped of information |
| 2021-07-13 20:04:22 | <Profpatsch> | have you … written production code? |
| 2021-07-13 20:04:30 | <dminuoso> | Profpatsch: You can assume they have. |
| 2021-07-13 20:04:32 | <davean> | Yes, of course I have |
| 2021-07-13 20:04:37 | <maerwald> | a bit :D |
| 2021-07-13 20:04:48 | <[exa]> | there's fourmolu to fix some of ormolu problems |
| 2021-07-13 20:04:50 | <davean> | Profpatsch: given you're in this community, I expect i've writen code you use |
| 2021-07-13 20:05:07 | × | juhp quits (~juhp@128.106.188.66) (Ping timeout: 245 seconds) |
| 2021-07-13 20:05:10 | <dminuoso> | I tend to agree with davean. Indenting is highly contextual - a blanket rule cannot reasonably assist understanding in general, because the meaning of what code even means is very.. well.. contextual. |
| 2021-07-13 20:05:18 | <Profpatsch> | davean: I mean a library is usually written by one or two people |
| 2021-07-13 20:05:24 | <[exa]> | still, a proper set oneliners never requires formatting. |
| 2021-07-13 20:05:51 | <maerwald> | Profpatsch: I've worked at a 300 modules proprietary project. We didn't have a formatter and it was mostly anarchy wrt style. It never imposed a problem. |
| 2021-07-13 20:06:08 | <Profpatsch> | maerwald: have you, like, tried it out in seriousness? |
| 2021-07-13 20:06:15 | <maerwald> | tried what |
| 2021-07-13 20:06:17 | <Profpatsch> | Or just looked at it for a few minutes and decided against it? |
| 2021-07-13 20:06:24 | <Profpatsch> | ormolu, or any formatter without configuration |
| 2021-07-13 20:06:25 | <maerwald> | formatters? Yes, all. |
| 2021-07-13 20:06:31 | <davean> | Profpatsch: formaters are for where you don't have quality contributors - specificly like google |
| 2021-07-13 20:06:44 | <Profpatsch> | okay, I’ll stop now |
| 2021-07-13 20:06:47 | <davean> | It patches over horrid team management |
| 2021-07-13 20:06:50 | <dminuoso> | Profpatsch: Formatters begin with a big problem. If I want to communicate something with a particular style that your formatter disagrees with, what do we do now? |
| 2021-07-13 20:06:53 | <maerwald> | I got stuck with brittany and opened a bazillion issues on the issue tracker, until I gave up |
| 2021-07-13 20:06:56 | <Profpatsch> | The takes are getting worse lol |
| 2021-07-13 20:07:10 | <Profpatsch> | syntax is the least important part, but people like to bikeshed |
| 2021-07-13 20:07:10 | <maerwald> | And now I'm free of formatters and it feels good |
| 2021-07-13 20:07:16 | <davean> | Profpatsch: I'm quite serious about where it comes from |
| 2021-07-13 20:07:24 | <Profpatsch> | since it touches identity and strongly held beliefs |
| 2021-07-13 20:07:32 | <davean> | No, its not about identity |
| 2021-07-13 20:08:00 | <maerwald> | I identify as an ormolu? |
| 2021-07-13 20:08:17 | → | juhp joins (~juhp@128.106.188.66) |
| 2021-07-13 20:09:50 | <Profpatsch> | I stick with “use ormolu and don’t complain, since it’s not worth the overhead of aligning things by hand” |
| 2021-07-13 20:10:13 | <dminuoso> | Does the ormolu style always exactly indent it as you would have to communicate a particular code structure? |
| 2021-07-13 20:10:24 | <dminuoso> | If you answer with yes, then the tool seems genuinely useful. |
| 2021-07-13 20:10:40 | <maerwald> | Profpatsch: well, I agree with you that there's something worse than formatters: PR discussions about formatting. These make me furious. |
| 2021-07-13 20:11:00 | <Profpatsch> | dminuoso: I’ve written hundreds if not thousands of lines with it and I’ve never once had a problem with the indentation |
| 2021-07-13 20:11:16 | <davean> | ... hundreads? |
| 2021-07-13 20:11:22 | <dminuoso> | Profpatsch: That could perhaps just be indicative of you not caring what indention communicates, or what you could communicate with different styles. |
| 2021-07-13 20:11:25 | <davean> | So you've barely used it? |
| 2021-07-13 20:11:31 | <maerwald> | Especially because you have a limited focus capacity per day and then half of it is eaten up by formatting and style discussions, before you even manage to get to anything useful |
| 2021-07-13 20:11:56 | <davean> | Theres more than 100 different things to lay out |
| 2021-07-13 20:12:12 | × | _ht quits (~quassel@82-169-194-8.biz.kpn.net) (Remote host closed the connection) |
| 2021-07-13 20:12:52 | → | ukari joins (~ukari@user/ukari) |
| 2021-07-13 20:12:52 | <dminuoso> | As one example, I find myself using SPJ-style do-notation from time to time - in some situation it improves readability with nested do-blocks. But it's nothing I would argue "should be done always" |
| 2021-07-13 20:12:56 | <Profpatsch> | davean: not really, a few dozen |
| 2021-07-13 20:13:15 | <dminuoso> | Most of the time I find it noisy and distracting. |
| 2021-07-13 20:13:21 | <davean> | Profpatsch: I can list a few dozen off the top of my head |
| 2021-07-13 20:13:21 | → | acidjnk joins (~acidjnk@p200300d0c72b9557fc98475d99842c11.dip0.t-ipconnect.de) |
| 2021-07-13 20:14:10 | <davean> | Profpatsch: we have more than a few dozen language extensions, and many introduce more than one piece of syntax |
| 2021-07-13 20:14:49 | → | drd joins (~drd@93-39-151-19.ip76.fastwebnet.it) |
| 2021-07-13 20:18:26 | <[exa]> | I often hope that tabs could be restored to align proper tabular code, like if you want elements of 2 lists below each other to be aligned for clarity |
| 2021-07-13 20:18:45 | <davean> | [exa]: mmm, sadly tabs aren't reliable |
| 2021-07-13 20:18:49 | <davean> | so sometimes we do it with spaces ... |
| 2021-07-13 20:19:15 | <maerwald> | haskell with tabs and snake case, yay |
| 2021-07-13 20:19:48 | × | cfricke quits (~cfricke@user/cfricke) (Ping timeout: 276 seconds) |
| 2021-07-13 20:20:14 | <dminuoso> | maerwald: Hah, I have that! |
| 2021-07-13 20:20:56 | → | chomwitt joins (~Pitsikoko@2a02:587:dc04:e00:12c3:7bff:fe6d:d374) |
| 2021-07-13 20:22:33 | <maerwald> | end goal: build a haskell company where this style is mandatory |
| 2021-07-13 20:23:09 | <davean> | maerwald: I think we should select the style of the name based on the modulus of the line its defined on |
| 2021-07-13 20:23:20 | <davean> | and if you change the line number, you have to change the style. |
| 2021-07-13 20:23:48 | <maerwald> | can we auto-format that please? |
| 2021-07-13 20:23:59 | maerwald | writes a patch for ormolu |
| 2021-07-13 20:24:32 | → | dre joins (~dre@2001:8003:c932:c301:b299:b352:c4c4:74a1) |
| 2021-07-13 20:25:08 | × | falafel quits (~falafel@pool-96-255-70-50.washdc.fios.verizon.net) (Ping timeout: 272 seconds) |
| 2021-07-13 20:25:37 | → | warnz joins (~warnz@2600:1700:77c0:5610:9856:f279:a598:9845) |
All times are in UTC.