this post was submitted on 12 Jul 2026
48 points (96.2% liked)

No Stupid Questions

48947 readers
1575 users here now

No such thing. Ask away!

!nostupidquestions is a community dedicated to being helpful and answering each others' questions on various topics.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules (interactive)


Rule 1- All posts must be legitimate questions. All post titles must include a question.

All posts must be legitimate questions, and all post titles must include a question. Questions that are joke or trolling questions, memes, song lyrics as title, etc. are not allowed here. See Rule 6 for all exceptions.



Rule 2- Your question subject cannot be illegal or NSFW material.

Your question subject cannot be illegal or NSFW material. You will be warned first, banned second.



Rule 3- Do not seek mental, medical and professional help here.

Do not seek mental, medical and professional help here. Breaking this rule will not get you or your post removed, but it will put you at risk, and possibly in danger.



Rule 4- No self promotion or upvote-farming of any kind.

That's it.



Rule 5- No baiting or sealioning or promoting an agenda.

Questions which, instead of being of an innocuous nature, are specifically intended (based on reports and in the opinion of our crack moderation team) to bait users into ideological wars on charged political topics will be removed and the authors warned - or banned - depending on severity.



Rule 6- Regarding META posts and joke questions.

Provided it is about the community itself, you may post non-question posts using the [META] tag on your post title.

On fridays, you are allowed to post meme and troll questions, on the condition that it's in text format only, and conforms with our other rules. These posts MUST include the [NSQ Friday] tag in their title.

If you post a serious question on friday and are looking only for legitimate answers, then please include the [Serious] tag on your post. Irrelevant replies will then be removed by moderators.



Rule 7- You can't intentionally annoy, mock, or harass other members.

If you intentionally annoy, mock, harass, or discriminate against any individual member, you will be removed.

Likewise, if you are a member, sympathiser or a resemblant of a movement that is known to largely hate, mock, discriminate against, and/or want to take lives of a group of people, and you were provably vocal about your hate, then you will be banned on sight.



Rule 8- All comments should try to stay relevant to their parent content.



Rule 9- Reposts from other platforms are not allowed.

Let everyone have their own content.



Rule 10- Majority of bots aren't allowed to participate here. This includes using AI responses and summaries.



Credits

Our breathtaking icon was bestowed upon us by @Cevilia!

The greatest banner of all time: by @TheOneWithTheHair!

founded 3 years ago
MODERATORS
 

Sometimes you want to write something with broken lines and you write in the editor:

That's right I'm Sokka
It's pronounced with an Okka
Young Ladies, I rocked ya!

But it ends up looking like this:

That's right I'm Sokka It's pronounced with an Okka Young Ladies, I rocked ya!

The fix is to add two spaces between the final character and the carriage return.

I don't understand what the problem is. CR should be easy enough to translate, and the users intentions are clearly confirmed because they're looking right at what the expect it to look like when they hit submit.

Why does the user have to add two spaces? Why is the universe like this?

Edit: Holy Shit, look, I'm just an idiot typing text expecting WYSIWYG and I don't see a good reason for why I'm not getting it other than that programmers lack theory of mind.

you are viewing a single comment's thread
view the rest of the comments
[–] marcos@lemmy.world 6 points 3 days ago* (last edited 3 days ago) (2 children)

Is this a rant about typewriters, computer character encodings, or some computer file format?

Why are you getting files with bare CR characters not followed by a LF? (Is this about last millennium Apple computers?)

[–] TootSweet@lemmy.world 7 points 3 days ago (1 children)

I think they're talking largely (mostly?) about Markdown. (For instance, in Lemmy, when you stick a newline there, it doesn't give you a line break in the flow of the text.) And when they say "Carriage Return", they don't know what they're talking about. If I'm interpreting them correctly, I think they just mean "newline". And when they say "two spaces", I think they mean two newlines.

[–] schipelblorp@sh.itjust.works 3 points 3 days ago (2 children)

Yes, I may not be using the right terminology. The "return" button on the keyboard.

I also gave an example, so I'm not sure why there's so much confusion.

[–] TootSweet@lemmy.world 3 points 3 days ago (1 children)

I’m not sure why there’s so much confusion.

Because you're not using the right terminology. ;)

[–] schipelblorp@sh.itjust.works 2 points 3 days ago (1 children)

Yeah, but if someone said, "I sharpened a steel bowl and used it to cut my steak, and here's a picture of my bowl" and you see a knife, wouldn't you know what they mean?

Maybe it is I that lacks theory of mind.

[–] Zier@fedia.io 2 points 3 days ago

Because it's Markdown it gets confusing. Here is some help. Line Breaks

[–] schipelblorp@sh.itjust.works 4 points 3 days ago (2 children)

This is a question about a behavior that the text editor of both Reddit and Lemmy seem to share.

I might be incorrect calling it a carriage return--it's the return button on the keyboard that creates a new line on the editor--I think it's called a line break, but apparently you need two to create an actual new line in the final text. See the other comment for details about how markdown approaches it.

[–] marcos@lemmy.world 2 points 3 days ago

So, it is about markdown.

It's this way because people want to break their editable text into lines without making the final text break paragraphs. People write entire books in markdown, but it does become unsettling when you use in social media comments.

[–] historicaldocuments@lemmy.world 1 points 3 days ago (1 children)

There is Carriage Return (CR), and also Line Feed (LF, often called New Line). If you think about old mechanical printers with the metal arm sticking out, a CR operation would move the type head to the far left column, and a LF operation would advance the paper by one line. Variously through the years depending on hardware (typewriter, teletype, those early CRTs that you had to refresh the screen, or modern computers) you would get one or both of those if you pressed Return/Enter, and it's configurable in software, depending on the software. I don't know what windows does these days with notepad, but at one time the Enter key sent both (CRLF). UNIX style systems tended to use LF, and older Macs as someone else referenced used CR. If you wrote a generic program to handle anything you had to account for all of them. Mostly these days it gets abstracted away which generally works well enough unless a team of people used a random collection of software to edit a text file.

printf "\r\nHexadecimal, like that scene from The Martian.\n" | hexdump -C
00000000  0d 0a 48 65 78 61 64 65  63 69 6d 61 6c 2c 20 6c  |..Hexadecimal, l|
00000010  69 6b 65 20 74 68 61 74  20 73 63 65 6e 65 20 66  |ike that scene f|
00000020  72 6f 6d 20 54 68 65 20  4d 61 72 74 69 61 6e 2e  |rom The Martian.|
00000030  0a                                                |.|
00000031

The 0a is a Line Feed character, and the 0d is a Carriage Return character. In my terminal without piping it through hexdump you get:

printf "\r\nHexadecimal, like that scene from The Martian.\n"

Hexadecimal, like that scene from The Martian.

The LF at the end of the string makes it so that the prompt at the terminal doesn't appear on the same line as the output, and the blank line before the text is caused by the LF at the beginning. I don't know/care/have to worry about what eats the CR.

[–] schipelblorp@sh.itjust.works 1 points 3 days ago (1 children)

Ah! Thank you for explaining it in terms of typewriters, now it's much clearer in my mind!

The confusion still lingers. I used to cut and paste websites to print. One part of the condensation process, in addition to removing ads, was removing all the two-space line breaks of CRCR or LFLF; I still have to search for both.

You could probably get 80% of that process done by learning some python. If you have a string "s", then replacing double newlines with a single newline is as easy as

re.sub("\n\n", "\n", s)

where "\n" is an LF in many programming languages. A CR is often "\r" in the same vein. Just be aware that regular expressions can be very, very frustrating; and every webpage is going to be a new adventure in how it got formatted. If you use something like spyder it'll allow you to see what the data looks like inside the python process so you get a chance to iterate.