News for hackers. Stuff that matters.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by juanbyrge on Friday May 29, 2020 @07:14PM (#23356696)
I remember bikeshedding with my coworkers about this topic a few years back while coming up with lint settings. We ended up analyzing all current line widths and realized that something like 98% of lines were under 110 characters, so that is what we ended up using.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by RHSeeger on Saturday May 30, 2020 @12:32AM (#23358494)
But the thing to remember is that you don't need to have a rule of "lines must be no longer than this". Instead, it should be "aim for lines no longer than this", and then sometimes, you need longer because it makes sense in that specific case.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by _ZeD_ on Saturday May 30, 2020 @01:03AM (#23358627)
How can you make a linter for this?
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by erik_seaberg on Saturday May 30, 2020 @01:42AM (#23358784)
If the author thinks it's okay, and the reviewer thinks it's okay, a robot that can't actually understand code doesn't need a vote.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by SenHeng on Saturday May 30, 2020 @03:18PM (#23363825)
The reason for the robot is to have an impartial judge where neither author nor reviewer are okay with the opposing judgement. At the end of the day, a human’s judgement cycle is better reserved for something of a higher priority/use.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by erik_seaberg on Sunday May 31, 2020 @05:55PM (#23373141)
Both parties should be able to cede style arguments graciously. You can't really win the argument by quoting policy, only postpone the argument and burn team goodwill.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by alanbernstein on Saturday May 30, 2020 @01:06AM (#23358639)
Use warnings for long lines instead of errors?
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by pas on Saturday May 30, 2020 @05:21AM (#23359748)
Annotate the long line to ignore that particular linter rule. This makes it clear that it's not because the coder was lazy, ignorant, etc.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by zeroimpl on Saturday May 30, 2020 @11:03AM (#23361665)
Wouldn’t that make the code less readable?

I think the point is that if 98% of your code fit under 110 chars when you weren’t using a linter, then maybe you don’t need a linter checking line length.

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by pas on Sunday May 31, 2020 @10:02AM (#23369651)
You can disable the max line length rule too.

I find linters helpful. Just yesterday it helped me catch a serious bug in Python. After fixing all linter warnings. The last one was a unused variable. Turns out it should have been used.

Sure, the line length is not as severe as a unused var, but that's why the important thing is to have a systematic approach to thinking about maybe-problems that the "compiler" doesn't care about.

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by krferriter on Friday May 29, 2020 @07:17PM (#23356714)
I think a lot of terminals just set that as the default window width. No real reason for it, I usually snap to half the screen width immediately anyways. That turns out to about 105-120 characters width. Some people might just not resize it most of the time. Especially on Mac where efficient window management just isn't a thing.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by winrid on Friday May 29, 2020 @07:21PM (#23356745)
A note on your last sentence. Once I used my Win10 laptop at an interview at Apple. The interviewer saw me drag one window the the side, snap it, and then select another window to fill in the space.

He said, wow, Windows is really nice! :)

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by kstrauser on Friday May 29, 2020 @07:24PM (#23356775)
The #3 productivity app on the Mac App Store is a $2 app that enables this on Apples: https://apps.apple.com/us/app/magnet/id441258766?mt=12
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by thedirt0115 on Friday May 29, 2020 @07:26PM (#23356807)
Hammerspoon can do this (and way more!) for free :)

https://www.hammerspoon.org/go/#winresize

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by andai on Friday May 29, 2020 @07:33PM (#23356873)
I ended up with Hammerspoon when looking for an AutoHotKey alternative. Highly recommend.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by kstrauser on Friday May 29, 2020 @07:50PM (#23357005)
Oh, nice! I really prefer the window dragging method, though, and it doesn't seem like Hammerspoon supports that.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by sorum on Friday May 29, 2020 @08:59PM (#23357445)
It’s _literally_ the first app that gets installed on a fresh machine for me.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by winrid on Friday May 29, 2020 @07:28PM (#23356824)
I'll have to try this.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by cpeterso on Friday May 29, 2020 @07:40PM (#23356923)
I recommend the open-source macOS window manager "Rectangles". You can install it using Homebrew or download it from their website:

https://github.com/rxhanson/Rectangle

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by ObsoleteNerd on Friday May 29, 2020 @07:35PM (#23356889)
Have you seen Powertoys[0] FancyZones? It’s honestly in my top 5 Windows 10 apps of all time and it’s free. Fully customisable window zone manager allowing different zone layouts on each monitor and with hot key support.

This should be standard in Windows IMO. It has absolutely transformed how I work and noticeably increased my productivity.

[0] https://github.com/microsoft/PowerToys

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by chipotle_coyote on Friday May 29, 2020 @07:58PM (#23357063)
I've gotten used to doing that not with the mouse but keyboard shortcuts, using an, um, let's call it venerable third-party Mac program called Moom. Moom has a drag-to-snap feature similar to Windows' functionality, but whenever I enable it, I find myself constantly resizing windows by accident. This is funny to me only in that it seems really ironic that as a long-time Mac user who's been known to argue with the "only use the keyboard" crew over the relative virtues of pointing devices, this is something I do way better with the keyboard.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by _jal on Friday May 29, 2020 @07:33PM (#23356871)
I actually really hate that behavior.

I arrange windows to provide the information I need. That's usually a strip on the left to show the mailbox pane of my mail window, a strip below that for slack channels, and a finder window on a scratch directory.

To the right are my work windows.

Window snapping makes that impossible, about the only thing you can do is pretend you're using a tiling WM and cmd-tab any time you need to see anything, or waste an inflexible chunk of screen on it.

Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by _ZeD_ on Saturday May 30, 2020 @01:07AM (#23358641)
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by JoshTriplett on Friday May 29, 2020 @07:23PM (#23356770)
I use keyboard shortcuts for that: Win+left and Win+right will maximize a window on that half of the screen. That makes it easy to quickly have a terminal or editor on one half and something else (like a browser or PDF) on the other half, using only the keyboard.
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by andai on Friday May 29, 2020 @07:33PM (#23356865)
To clarify, these are built in (everyone running Windows has them).
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by winrid on Friday May 29, 2020 @09:54PM (#23357780)
Yeah I typically use keyboard shortcuts for them too, good point!
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by ken on Friday May 29, 2020 @07:39PM (#23356912)
macOS has supported left-and-right snapping ("Split View") since 10.14. Maybe your accidental demo was the inspiration!
Re:But no, 80-column terminals in 2020 isn't “reasonable” an... by rbanffy on Saturday May 30, 2020 @06:33AM (#23360089)
Macs have been doing that for ages.