News for hackers. Stuff that matters.
Re:China Grew Two Cotton Leaves on the Moon by ysavir on Monday September 30, 2019 @02:27PM (#21118260)
Sounds nice in theory, but the intention of code block is to capture how code looks--including where the lines break. That aspect of code blocks isn't broken.

The problem is people who use code blocks for what it wasn't intended to do-display quoted content.

Perhaps HN can add support for quotes, but even now there's nothing difficult with indicating a quote by adding a ">" to the start of the paragraph. Most, if not all, of HN readers will know what that means.

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.

Re:China Grew Two Cotton Leaves on the Moon by comex on Monday September 30, 2019 @04:14PM (#21119271)
We know what it means, but it’s still hard to distinguish at a glance what is quoted and what is not. It works in (plaintext) email because emails are traditionally word-wrapped and “>” is inserted at the start of each line – not once at the start of an arbitrarily long paragraph. And even then, email clients often color quoted blocks to further visually distinguish them.
Re:China Grew Two Cotton Leaves on the Moon by hombre_fatal on Monday September 30, 2019 @06:33PM (#21120306)
Never had an issue with it on HN. 99% of quotes occur at the start of the post and the rest of the post is a reply.

Posts that interleave their content with quoted bits are rarely as constructive as they think (almost always just point-by-point bickering) that I find impossible to follow no matter what formatting they could've used for the quotes.

Also a single ">" prefix on a long wrapped line is a bit of internet convention with younger crowds probably thanks to 4chan. I doubt most people using it these days even remember seeing it in emails.

If anything, HN should post-process lines that start with ">" to indent them.