Lower-casing the library

Re: Lower-casing the library
Orion Pobursky Wrote:It's trivial to program for case insensitivity

Of the programs I have access to the code:

Reads “as-is.”
When adding paths, it thinks all directories names of LDraw are lowercase.
Sum-up: trivially fails (as a lot of .dat don’t refer to others in all-lowercase).

Tries all-lower, then all-upper, then as-is, then fails.
The filenames include the paths. So if the files are somewhere like ~/Documents/LDraw/…, only the as-is versions could be found. A lot of LDraw official parts wouldn’t because of the internal mess of the library.
Sum-up: trivially fails.

Reads the parts.lst or all the .dat, stores the model-names in all-upper.
It’s okay because, even if it thinks that all directories and files’ names of LDraw are lowercase (which is only false for LDConfig.ldr), it doesn’t touch the library’s path.
Sum-up: works (except for LDConfig.ldr, for now).

For the other main programs I know of (MLCAD, LDCAD, etc.), either they are Windows only, and the question doesn’t arise (ditto in Wine), or closed-source, and I won’t know.

Orion Pobursky Wrote:and decent programs account for this.

So, either it’s not so trivial or LDView, LPub and LeoCAD are not decent programs.
I’m sure their developers would be happy to know that.

Orion Pobursky Wrote:The official library standard implies it for filenames so maybe we should revise the file spec to require it as well.

Yes, it’s trivial to write a specification that says which filenames are case sensitive and which aren’t and eases the programmers’ job of finding those files.

Orion Pobursky Wrote:Also, I might point out that LeoCAD is not an LDraw compatible program but merely has the ability to import LDraw files.

As another answer says, that is not true anymore since several versions (even the output format has changed from ad-hoc-binary to LDR-with-comments).

But the fact that the problem was raised on the LeoCAD list is not pertinent to the question.
Indeed, LeoCAD is the only one of the three I talked supra that has no problem finding .dat files as they are distributed now. The problem raised on the LeoCAD list was only about its assumptions about LDConfig.ldr. The state of the library was a follow-up.

Sorry if my tone is harsh but “we don’t care about programs and systems we don’t use” is rude too.
« Next Oldest | Next Newest »

Messages In This Thread
Re: Lower-casing the library - by Damien Roux - 2015-09-15, 10:16
Re: Lower-casing the library - by Chris Dee - 2015-09-16, 21:18
Re: Lower-casing the library - by Sylvain Sauvage - 2015-09-18, 21:29

Forum Jump:

Users browsing this thread: 1 Guest(s)