LDraw.org Discussion Forums

Full Version: Re: line endings in LDRAW files (CRLF vs. LF vs. CR)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I just wanted to reply to http://forums.ldraw.org/showthread.php?tid=4401,4401
, but couldn't, so I am forced to post here.

I think that that voting is on a good way, but I think that the Mac users have been forgotten.
The currently suggested new text says
"it is recommended that applications understand CRLF and LF as line endings".
I think that that should be instead
"it is recommended that applications understand CRLF and LF and CR as line endings".
To the best of my knowledge, Macs haven't use CR as a line ending since OS X was released 11 years ago.
Additionally, there are no non-OSX compatible LDraw spec compliant programs.
That said, I may have missed the relevant discussion but why are we moving this into the spec at all? Isn't the restriction on official parts good enough? When I wrote the original draft for 1.0.0 I tried to leave the actual text file portion as open as possible. Not to mention that the end user isn't going to care about line endings if they create or edit an LDraw file in a non-LDraw text editor. If anything we should specify that any line ending is compliant and a LDraw compatible editor must be able to handle them.
> we should specify that any line ending is compliant and a LDraw compatible editor must be able to handle them

fully agreeing here
I was thinking the same thing, and because it's only a hint to new software authors I don't think it's fair to burden them with supporting something that's never been used in practice. They still can if they want to of course but as a base 'advise' I don't think it's necessary.
What about LFCR? I don't want my Acorn being ignored Wink

Tim
Steffen Wrote:I think that that voting is on a good way, but I think that the Mac users have been forgotten.

If I were at all concerned about this, I would have raised the issue. But I am not concerned in the least.

Mac OS 9-style line endings are an endangered species on the way to functional extinction. They are seldom encountered in any file nowadays; even less so in newly-created files. The only LDraw program which ever used CR line endings was BrickDraw3D, and that project never got far enough along in development to create a model with it. (I couldn't even get it to run recently when I was trying to provide a screenshot of it for a recent comment thread.)

Bricksmith will read CR files, but only to be polite just in case. Any other software author is free to do likewise. But creating a CR-ended LDraw file would be highly inadvisable.

Allen
Orion Pobursky Wrote:That said, I may have missed the relevant discussion but why are we moving this into the spec at all? Isn't the restriction on official parts good enough? When I wrote the original draft for 1.0.0 I tried to leave the actual text file portion as open as possible. Not to mention that the end user isn't going to care about line endings if they create or edit an LDraw file in a non-LDraw text editor. If anything we should specify that any line ending is compliant and a LDraw compatible editor must be able to handle them.

In an ideal world, I would agree with you. However, I don't think that's how the ecosystem developed.

I view the spec as a means of assisting prospective developers to read and create well-behaved LDraw files. Unfortunately, a discussion of line endings is necessary to that end. For example, an LDraw program which did not read CRLF files would be useless. And an LDraw program which did not write CRLF files might produce output incompatible with other LDraw programs. I think it's fair to say there's a community expectation of using CRLF, and thus I think it's reasonable to specify using it.

Allen
Point taken. Why not then specify (i.e. require) that a LDraw compliant program be able to read all line endings but write CRLF? That makes more sense to me and in the end is less restrictive on the end user.
That's pretty much what the current vote is about (minus the cr as result of being 'old')
Pages: 1 2 3