From: Mark Jamsek Subject: Re: gotd: handle early client disconnections To: Omar Polo Cc: gameoftrees@openbsd.org Date: Mon, 23 Jan 2023 21:14:13 +1100 On 23-01-23 10:29AM, Omar Polo wrote: > On 2023/01/23 19:09:59 +1100, Mark Jamsek wrote: > > > > > > I can't see why the line has been wrapped; chattygot fits on the above > > > > > > line? > > > > > > > > > > the above line is 79 columns, that was 80 :) > > > > > > > > Oh whoops, I've been doing it wrong! I always thought it was [1,80] not > > > > [1,80) :) > > honestly I never cared too much about the exact column length, but a > line that's 80+ chars long is shown as if it continues on mg(1) in a > 80x24 xterm (the '$' character at EOL) so that's why I fold them. > most of the times i just do it manually as i read the code, just to > see how much stuff there's after (mg doesn't split overflowing lines.) > > hope it's not annoying. > > maybe i should just use another editor (and sometimes I even do) but > mg is a pleasure to use :) Definitely not annoying! I hope my comments haven't sounded like I was complaining or anything other than sincere curiosity. It's funny you mention your editor, because that's exactly why I even noticed and said something in the first place. I have vim show line and column markers[0], and I saw the unwrapped line finished on the limit which is why I thought it complied with style(9). It is interesting and I'm surprised I never thought of it before-- whether it's 80] or 80). If the line continuation char ($) wasn't there to show the line continued, an 80 character line would fit in the 80 columns, but if they did that, then you won't know if a line extends beyond 80 characters! lol > > > style(9) says "All code should fit in 80 columns." > > > I don't know if that includes code in diffs which has an extra column > > > at the beginning. > > nitpick: per style code is indented with tabs (except for places where > it's not) so the extra column added at the beginning doesn't count > > > > I usually try to wrap at less than 80 but there are > > > cases where I just let run up to 80. In any case, not a big deal. > > > > I'm really not sure about the diff part either, but I always interpreted > > that line in style(9) to be 80 columns inclusive because it's 1-based; > > that is, if the last character is on column 80 that's ok. But it sounds > > like it's exclusive. > > > > Like you say, not a big deal, but I never even considered it was [1,80) > > till I read op's reply so it's good to now know! > > yeah, i didn't want to nitpick and don't want to sound annoying nor > religously attached to the 80 columns or style(9). I just prefer to > being able to read the code/diffs in my 80x24 xterm 8-) I'm going to move my line marker back one column to 79 so I can make sure my diffs fit in your xterm :) [0]: http://ss.jamsek.net/20230123-210037-ss.jpg -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68