News for hackers. Stuff that matters.
Re:China Grew Two Cotton Leaves on the Moon by reaperducer on Monday September 30, 2019 @02:33PM (#21118327)
The problem is people who use code blocks for what it wasn't intended to do-display quoted content.

The problem is that it doesn't work, even on mobile, whether you're posting code or the Declaration of Independence.

At its heart, this web site is about communicating information. The current state of the code block fails at that mission.

Would you use an IDE without word wrap?

Re:China Grew Two Cotton Leaves on the Moon by ilikehurdles on Monday September 30, 2019 @03:11PM (#21118666)
> Would you use an IDE without word wrap?

I wasn't aware it was controversial to use an IDE without word-wrap. I do not have it enabled on any of my editors.

Re:China Grew Two Cotton Leaves on the Moon by reaperducer on Monday September 30, 2019 @03:12PM (#21118668)
"Enabled" is one thing. But it should be available. In HN's code blocks, it's not even an option.
Re:China Grew Two Cotton Leaves on the Moon by baby on Monday September 30, 2019 @03:14PM (#21118700)
How do you read code from codebases that don’t respect the arbitrary column limit?
Re:China Grew Two Cotton Leaves on the Moon by loeg on Monday September 30, 2019 @04:31PM (#21119394)
I am flexible about how wide my editor is. Pretty much all code I read bounds itself to some sort of limit around 80-120 characters. If there are a few individual lines that exceed the current editor width, I can scroll. I don't have to work with any codebases that have ridiculously long lines.
Re:China Grew Two Cotton Leaves on the Moon by ilikehurdles on Monday September 30, 2019 @03:31PM (#21118867)
To be honest, I don't often read such code, or I try to run it through a formatter prior to reading. I guess I should have said that I _generally_ don't have soft wraps enabled. Sometimes I just have to plug my nose and soft-wrap.
Re:China Grew Two Cotton Leaves on the Moon by kelnos on Monday September 30, 2019 @05:13PM (#21119702)
I just suck it up and scroll like a normal person.
Re:China Grew Two Cotton Leaves on the Moon by baby on Monday September 30, 2019 @07:30PM (#21120644)
A normal person has word wrap toggled
Re:China Grew Two Cotton Leaves on the Moon by dkersten on Monday September 30, 2019 @03:39PM (#21118958)
> Would you use an IDE without word wrap?

Yes? I find word wrap in code really weird.

Re:China Grew Two Cotton Leaves on the Moon by OJFord on Monday September 30, 2019 @04:53PM (#21119572)
Long lines are just annoying, wrap or no wrap.

I don't want to hit 'j' and drop down two 'lines' because what I thought was the next line was actually the end of this line.

I also don't want to hit '$' and go not to the end of the 'line' but somewhere below (and potentially left) because of the same.

But I also don't want to hit '$' and go out into space to the right and lose context from the surrounding reasonably-lengthed lines.

Just use the return key and nobody has to worry about whether to wrap or not to wrap.