News for hackers. Stuff that matters.
Re:Responsible Open Source Code Parenting by billpg on Tuesday December 29, 2009 @09:06AM (#1020467)
"Item #3, the conversion of returns to linebreaks, is somewhat more debatable. I'm on the fence on that one, but I do believe it's significant enough to warrant an explicit choice either way."

Really?

Has anyone ever typed stuff, hit enter once, then typed more stuff, ever not intended a line break?

"Oh no, I kept hitting Enter between words instead of using the space-bar! If only pressing Enter was interpreted as a space character unless it was prefixed by four spaces. What a world! What a world!"

Re:Responsible Open Source Code Parenting by telemachos on Tuesday December 29, 2009 @09:22AM (#1020498)
I'm not sure of the origin of the convention, but using two newlines consistently to mark new paragraphs (rather than indentation or just one newline) seems awfully common to me in technical writing. So the Markdown rule has always made sense to me. Or to put it another way, it was immediately natural to do it that way.

Edit: to answer the question of the comment below this, poems need to be handled specially in Markdown as in HTML. It's an issue more generally, and I think that the standard solution is <p> for the poem as a whole and <br> (or <br /> depending on your markup flavor preference) for the lines. It's a known thing: http://blog.signified.com.au/a-poem-element-for-html5/

Re:Responsible Open Source Code Parenting by nollidge on Tuesday December 29, 2009 @09:32AM (#1020514)
But what if you want a newline for a reason other than for paragraphs, like a poem or something?
Re:Responsible Open Source Code Parenting by nostrademons on Tuesday December 29, 2009 @04:02PM (#1021302)
I always just indent poems 4 spaces, making them into preformatted text.

In published work, poems are usually set apart from the prose and rendered in a different font anyway, so this seems natural enough to me. Courier isn't exactly my first choice for a poetic font, but it's good enough and gets the formatting across.

Re:Responsible Open Source Code Parenting by technomancy on Tuesday December 29, 2009 @12:39PM (#1020833)
Then you end the line in two spaces.
Re:Responsible Open Source Code Parenting by StrawberryFrog on Tuesday December 29, 2009 @03:45PM (#1021272)
How obvious!
Re:Responsible Open Source Code Parenting by fr0sty on Tuesday December 29, 2009 @09:30AM (#1020508)
Alternatively:

"Oh no, I'm trying to paste this block of text from an email and it thinks every line is a new paragraph!"

Besides, Markdown was designed to be readable as plaintext and test written with the expectation that single return -> linebreak is not easily readable (unless people are in the habit of indenting the first line of their paragraphs.

Re:Responsible Open Source Code Parenting by billpg on Tuesday December 29, 2009 @09:33AM (#1020517)
That still happens? Have I been watching Doctor Who too much and I've been transported back to the 90s?
Re:Responsible Open Source Code Parenting by almost on Tuesday December 29, 2009 @09:25AM (#1020502)
Very much so. One of the cool things about markdown is it looks good in source form as well as after processing to HTML. In order to keep that looking good you of course keep your lines to under 80 characters. That makes sense in fixed width ASCII but no so much once it's gone to HTML.
Re:Responsible Open Source Code Parenting by lutorm on Tuesday December 29, 2009 @09:23AM (#1020500)
Yes, I have. When you hit alt-q in emacs, you do, too. It goes with the theme of "making it look like you write ascii files". Have you never tried to read an ascii file that's written without line breaks in an xterm?

When programming, do you never cut lines with enter except after the semicolon either?

Re:Responsible Open Source Code Parenting by billpg on Tuesday December 29, 2009 @10:03AM (#1020548)
When writing code, I hit enter to add a line-break in order to make the code look nice. I would consider it a bad thing if next time someone looked at the code, those line-breaks were removed and changed to spaces, even if the code was technically equivalent.

Compilers (except maybe Python) don't care about layout.

Re:Responsible Open Source Code Parenting by stevelosh on Tuesday December 29, 2009 @01:17PM (#1020933)
> Has anyone ever typed stuff, hit enter once, then typed more stuff, ever not intended a line break?

Yes. It makes diffs of version-controlled documentation far, far more readable (and efficient).

^Q in TextMate does it for you, so it's not even much extra effort. Type your paragraph, ^Q to wrap it to 78/80/whatever characters. I think someone else mentioned that emacs has a similar feature, and I'm sure vim does too.

Re:Responsible Open Source Code Parenting by andrewcooke on Tuesday December 29, 2009 @09:17AM (#1020486)
some people hit return when the text is nearing the end of the input box. as in this text, which has "return" after "end of".
Re:Responsible Open Source Code Parenting by billpg on Tuesday December 29, 2009 @09:30AM (#1020512)
(Edit: I think I was a bit rash in this message, stemming from my sense of sheer disbelief. While I stand by my overall point, I would like to apologize for my tone.)

Really? I can't recall the last time I saw a multi-line text box that didn't word-wrap.

That may have made sense back in the day when TEXTAREA form elements didn't wrap and there was no way to switch the wrapping on, but its been over 10 years since that was the case. Do people still do that?

Even in the presence of people needlessly hitting enter because they don't realise the input box will word-wrap, the effect of doing the-wrong-thing still seems preferable with turning enter key presses into line breaks.

The worst that happens when you hit enter at the end of the input box is a narrow column of text.

If you expect hitting Enter to result in a line-break, doing the-wrong-thing results in text being wrongly joined together into one paragraph.

Re:Responsible Open Source Code Parenting by andrewcooke on Tuesday December 29, 2009 @09:37AM (#1020526)
dude, i'm telling you what people do.

perhaps your problem is confusing people with computers?

Re:Responsible Open Source Code Parenting by billpg on Tuesday December 29, 2009 @09:53AM (#1020537)
Fair enough. My point would be that if people are still doing that, they don't have to anymore.

Also, my earlier response was written a little rashly, stemming for my sense of sheer disbelief. While I stand by my overall point, I'd like to apologise for my tone.

Re:Responsible Open Source Code Parenting by rapind on Tuesday December 29, 2009 @12:12PM (#1020776)
I agree. This is frustrating in many markup formats. A carriage return should turn into a br tag and two carriage returns should start a new paragraph. Simple, intuitive, where's the problem??

IMO any situation where that behaviour is undesirable is an edge case and should require more effort to work around.