Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Use of .pl versus .plx file extensions

by submersible_toaster (Chaplain)
on Mar 17, 2004 at 12:58 UTC ( #337308=note: print w/replies, xml ) Need Help??


in reply to Re: Use of .pl versus .plx file extensions
in thread Use of .pl versus .plx file extensions

Store the MIME type ? It's a derivitive of the file's essence - keeping that information in sync is a nasty problem. Have you experienced HFS idea of storing meta-information?

Sorry. I hate to be a miserable pedant, but I was agreeing with you right up to the last point. Damn and blast these file extentions, but let a file be a file , not several streams of info that stay relevant to each other until after the first :w!


I can't believe it's not psellchecked
  • Comment on Re: Re: Use of .pl versus .plx file extensions

Replies are listed 'Best First'.
Re: Re: Re: Use of .pl versus .plx file extensions
by QwertyD (Pilgrim) on Mar 22, 2004 at 01:58 UTC
    let a file be a file , not several streams of info that stay relevant to each other until after the first :w!

    I have to disagree with you here. Certain useful metadata must be kept in sync with a file's contents. The length of the file, and the file's last modified date, for example. While you could argue that these are unneccessary, it's extremely difficult to live without them. Sure, you could have null-terminated files, but then you couldn't store binary data. (You could get around this by backslash-escaping non-terminating nulls, and then backslash-escaping every backslash, but I shudder to think of a filesystem that required any of that.). Sure, you don't *need* to know when a file was last modified, but then it's a lot harder to do incremental backups.

    With those two examples, the operating system deals with keeping the metadata in sync with the file. But what about a program? In UNIX, the hasbang line we all know and love acts as metadata, because it says what program should be used to run the file (I'm a UNIX newbie, so correct me if I'm wrong about this). Port a shell script to Perl, but leave a #!/bin/sh at the top, and it's not going to work correctly if you try to execute the file.

    So now that we've found an instance in which it is more convenient to store metadata about what program can understand a file, why not extend that to storing metadata about what kind of file it is? Suddenly, you can have the OS figure out what to do with the file when you open it (even more so if you store creator AND filetype metadata). Applications can figure out on their own which files they can open and process. Searching can be done for certain kinds of files.

    The benefits of all this kind of metadata far outweigh the costs of maintaining it. Besides, is it even that common to have one file whose type changes often?

    For more info, read John Siracusa's Metadata, The Mac, and You at ArsTechnica.


    Once it's Turing complete, everything else is just syntactic sugar.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://337308]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2019-06-19 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Is there a future for codeless software?



    Results (84 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!