Newest at the top
| 2025-12-01 17:27:22 +0100 | <lucabtz> | sad |
| 2025-12-01 17:27:14 +0100 | <tomsmeding> | no |
| 2025-12-01 17:27:00 +0100 | <lucabtz> | there is no [a] -> Int -> Maybe a safe list indexing in base? |
| 2025-12-01 17:26:46 +0100 | machinedgod | (~machinedg@d75-159-126-101.abhsia.telus.net) machinedgod |
| 2025-12-01 17:26:45 +0100 | <merijn> | Proportional font should be a crime |
| 2025-12-01 17:26:07 +0100 | <lucabtz> | though if you have only one binding i think your style is more readable |
| 2025-12-01 17:25:54 +0100 | <tomsmeding> | programming haskell with a proportional font is mostly feasible only if you only read your own code though :p |
| 2025-12-01 17:25:33 +0100 | <tomsmeding> | a colleague of mine does that |
| 2025-12-01 17:25:29 +0100 | <tomsmeding> | another reason to not use my style: if you program with a proportional font |
| 2025-12-01 17:25:12 +0100 | <lucabtz> | :p |
| 2025-12-01 17:24:55 +0100 | <tomsmeding> | I don't have that opinion but I respect you having it :p |
| 2025-12-01 17:24:32 +0100 | <tomsmeding> | I see |
| 2025-12-01 17:24:27 +0100 | <lucabtz> | it is 4 but i dont like that the style imposes 4 to be used |
| 2025-12-01 17:23:52 +0100 | <tomsmeding> | yeah also possible |
| 2025-12-01 17:23:35 +0100 | <tomsmeding> | lucabtz: what's your preferred indentation size? |
| 2025-12-01 17:23:35 +0100 | <merijn> | tomsmeding: tbh, I'd probably rewrite that to use `concat` to simplify line-wrapping the string too |
| 2025-12-01 17:23:15 +0100 | <lucabtz> | so for one binding that option works well, but for multiple ones idk |
| 2025-12-01 17:23:11 +0100 | <tomsmeding> | #rekt takes me back to high school |
| 2025-12-01 17:22:54 +0100 | <tomsmeding> | :p |
| 2025-12-01 17:22:52 +0100 | <tomsmeding> | I guess, yes, in this case |
| 2025-12-01 17:22:51 +0100 | <merijn> | #rekt |
| 2025-12-01 17:22:46 +0100 | <tomsmeding> | oh |
| 2025-12-01 17:22:39 +0100 | <merijn> | tomsmeding: Your return type is IO? |
| 2025-12-01 17:22:37 +0100 | <tomsmeding> | lucabtz: yep, true |
| 2025-12-01 17:22:26 +0100 | <tomsmeding> | it suggests a monad where there is none |
| 2025-12-01 17:22:21 +0100 | <tomsmeding> | I disagree with "simplified" |
| 2025-12-01 17:22:20 +0100 | <lucabtz> | if you put let x = y \n then in the new line the alignment works well only if you tab with four spaces |
| 2025-12-01 17:22:12 +0100 | <tomsmeding> | and that is better how? :P |
| 2025-12-01 17:22:02 +0100 | <merijn> | tomsmeding: Also, that example is trivially simplified by using do and it's let sugar, letting you skip the in entirely :p |
| 2025-12-01 17:22:02 +0100 | <tomsmeding> | merijn: ah |
| 2025-12-01 17:21:42 +0100 | <merijn> | tomsmeding: No, not top level nested in the where of printStats |
| 2025-12-01 17:21:41 +0100 | <lucabtz> | if you have a new-line and indentation it works with any kind of indentation you have |
| 2025-12-01 17:21:28 +0100 | <tomsmeding> | but 'let' already syntactically requires the bindings to be aligned |
| 2025-12-01 17:21:21 +0100 | <tomsmeding> | oh for sure |
| 2025-12-01 17:21:15 +0100 | <lucabtz> | i didnt mean to align the body with the bindings, just the bidings need to be aligned |
| 2025-12-01 17:20:56 +0100 | <tomsmeding> | right, that's possible |
| 2025-12-01 17:20:50 +0100 | <tomsmeding> | merijn: more top-level functions you mean? |
| 2025-12-01 17:20:21 +0100 | <tomsmeding> | hence my preference for using "in x", not "in x" or " in x" as some people do; I would accept "in x" if your argument is "I want the body to be indented at a multiple of 2 spaces" |
| 2025-12-01 17:20:17 +0100 | <merijn> | lucabtz: The problem is the in :p |
| 2025-12-01 17:19:59 +0100 | <merijn> | defining a name implementation per case, with their own where :p |
| 2025-12-01 17:19:37 +0100 | <merijn> | tomsmeding: That's solved easily by using more where |
| 2025-12-01 17:19:26 +0100 | <tomsmeding> | on the contrary! The body of the let-binding is _not_ part of the list of bindings, so my opinion is that by aligning them, you're incorrectly suggesting a relationship that's not there |
| 2025-12-01 17:19:14 +0100 | <lucabtz> | however conveniently "let " is four characters and if you use 4 spaces indentation it is actually simple to align them your way too |
| 2025-12-01 17:18:40 +0100 | <lucabtz> | tomsmeding if there is a single binding your style looks good, but when you have multiple bindings with Leary's way it is simpler to align them |
| 2025-12-01 17:14:22 +0100 | <tomsmeding> | yes, you can write this as a 'where', but then it's scoped over the whole functoin, not just this guard branch |
| 2025-12-01 17:14:04 +0100 | <tomsmeding> | merijn: ok I selected a very untyped function to not land in your "almost never" niche of "typed code with too many existentials" (which is 50% of my codebase): the printStats function here https://git.tomsmeding.com/chad-fast/tree/test-framework/Test/Framework.hs#n464 |
| 2025-12-01 17:12:47 +0100 | <merijn> | I mean, you're almost never in a context where you can't use where, so I don't really see that as much of a limitation |
| 2025-12-01 17:11:51 +0100 | <fgarcia> | here i would expect that code to run inside main. most functions are able to be written with 'where'. to me it signals, even if not true, that it is expected stateful effects will happen when using 'let' |
| 2025-12-01 17:11:26 +0100 | Googulator | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) (Quit: Client closed) |
| 2025-12-01 17:11:12 +0100 | Googulator76 | (~Googulato@2a01-036d-0106-4ad8-d9ec-010d-f188-ffcb.pool6.digikabel.hu) |