|Home » Learning Curve
Way the F out there.
16384 pixels. Your computer screen is probably not that wide or high. The pinheads at Apple have been counting on that for some time now.
What is magic about 16384?
Let's look at what our trusty Calculator can tell us. There's 16384 at the left, in the decimal radix. The same number in the hexadecimal radix is displayed at the right, but that's not what's important. Look instead at the binary representation.
You should see a '1' at the 14th bit (from the right). This would indicate (hint) that the number 16384 is to be regarded as a signed 16-bit integer. If that was your guess too, you'd probably be right.
(Set the 15th bit and the number goes negative - that's how signed integers work, in case you're wondering.)
This all relates to so-called Finder flags of course. Here's where the Rixstep utility FileInfo displays the 'file info' for the mysterious root directory '.HFS+ Private Directory Data?'. But right away we happen upon another stumbling block: what is that '?' at the end? Is that really a question mark in the directory name?
No it's not. The question mark is in this instance a placeholder for a character that cannot be displayed. The actual character is the ASCII carriage return character.
So we need to backtrack further to explain what that's about.
ASCII is the original character set used for computers (except for IBM computers which use something called EBCDIC). ASCII is a very useful 7-bit character set that fortuitously streamlined a lot of computer operations not foreseen at the time.
But at the low end of ASCII, lower in the table than the first visible character, the space character, are 32 invisible characters which were originally used for control of teletype machines. (Unix was developed on teletype terminals.) Those characters sent commands such as 'BELL' which would make the teletype machine ring a bell, and so forth.
Vital to proper operation were the commands to push the carriage - that part of the machine, a roller, that held the paper the machine printed on - all the way back left again so the machine could print more on a new line.
To make the machine advance to a new line (so it didn't overwrite what was already there) another command was sent - the line feed command.
These two commands, carriage return and line feed, were initially separate commands because, of course, they could be used separately. One might want to scroll up more than one line. One might want to actually reverse the carriage without advancing the line. And so forth.
All of which became moot with the introduction of computer monitors. Using two characters, to carry on at the far left of the next line, was unnecessary.
The entire world decided to go with the line feed character for this single-character shorthand. The entire world, that is, except Apple.
So whilst everyone started using ASCII code 10, Apple stuck with another code. Apple and only Apple.
The entire world outside EBCDIC means Unix. All of Unix uses code 10. Denoted in C code as '\n', or the 'newline' escape character.
All was fine and good as long as Apple didn't bother anyone. And they never did. And no one could give a F what Apple did either.
Then Apple failed at creating their own 32-bit OS, the people from Be were brought in to discuss sharing their system, they asked too much, so Apple went with Steve Jobs who wanted even more, and suddenly Apple went Unix. And with Unix meant using code 10 and not what Apple had used up to now.
What all this means is that the '\r' character, the ASCII carriage return character, cannot be displayed, and in fact means nothing - it's automatically parsed out. Strange thing to happen to an ASCII veteran.
So Apple can put a '\r' at the end of a filename in a Unix system, and only their own archaic routines will pick it up. You can't input that character yourself. You need Apple's old code to do it.
So that means that this directory '.HFS+ Private Directory Data?' can't be accessed from Unix, or at least from a command line, without going through a number of hoops (such as octal input, additional silly flags, and so forth).
Someone's counting on someone else not knowing how to input octal from a command line? Probably. There's a lot in that filename which smacks of it. The people at Apple are putting as many objects of sundry debris in your path as possible, in order to make it as impossible as possible for you to get where you want to go. But why?
Let's look at that 16384 again. It's denoted as 'location.h' and 'location.v' in the 'finderFlags'. These are gunk that's attached to files in an Apple filesystem. And this means nothing to anyone except to Apple's file manager Finder. No one else.
The values 'location.h' and 'location.v' tell Finder where in a window to display an icon for a file. Using the value 16384 for both the horizontal and vertical coordinates means 'put it way the fuck out there'. Off-screen hopefully. Apple would probably love to make those coordinates 'a zillion gajillion' but the fields are 16-bit only.
So now you know.
Stockholm/London-based Rixstep are a constellation of programmers and support staff from Radsoft Laboratories who tired of Windows vulnerabilities, Linux driver issues, and cursing x86 hardware all day long. Rixstep have many years of experience behind their efforts, with teaching and consulting credentials from the likes of British Aerospace, General Electric, Lockheed Martin, Lloyds TSB, SAAB Defence Systems, British Broadcasting Corporation, Barclays Bank, IBM, Microsoft, and Sony/Ericsson.
Rixstep and Radsoft products are or have been in use by Sweden's Royal Mail, Sony/Ericsson, the US Department of Defense, the offices of the US Supreme Court, the Government of Western Australia, the German Federal Police, Verizon Wireless, Los Alamos National Laboratory, Microsoft Corporation, the New York Times, Apple Inc, Oxford University, and hundreds of research institutes around the globe. See here.
All Content and Software Copyright © Rixstep. All Rights Reserved.