homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam

The Geek Culture Forums


  New Poll  
my profile | directory login | | search | faq | forum home
  next oldest topic   next newest topic
» The Geek Culture Forums   » The Archives   » The Big Archives   » Better but in the minority: Mac OS, Whoppers, RPN, Betamax,... (Page 2)

 - UBBFriend: Email this page to someone!  
This topic comprises 2 pages: 1  2 
 
Author Topic: Better but in the minority: Mac OS, Whoppers, RPN, Betamax,...
TouchStone
Mini Geek
Member # 1453

Member Rated:
5
Icon 3 posted June 22, 2003 15:17      Profile for TouchStone     Send New Private Message       Edit/Delete Post 
Great topic!

Yes. Examples:

Macs
Subway vs. McDonalds, Burger King, etc
RX-7 Rotary engine vs pistons
Handspring vs Palm (way back when I got mine)
Mac Addict with an MCSE

That's all I can think of right now . . . [Smile]

Posts: 81 | From: Behind a coffee cup | Registered: Jun 2002  |  IP: Logged
greycat

Member # 945

Member Rated:
5
Icon 1 posted June 23, 2003 13:30      Profile for greycat   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by uilleann:
Mac format text files - I mean, they use 0x0D as the line break char, and after all, what key do you press to start a new line? (hah, maybe *NIX machines map Enter to 0x0A to be thoroughly perverse).

That's actually quite close to the truth. The keyboard sends 0x0D (Ctrl-M) to the terminal driver when Enter is pressed in a terminal (or terminal emulation window). But the terminal subsystem has a set of flags (man stty), among which is icrnl, enabled in a sane configuration, which translates CR to NL on input.

If you've ever seen a Unix FAQ that tells you to type "Ctrl-J stty sane Ctrl-J" when your terminal is messed up... this is the reason. (In Linux, you can generally use the "reset" command instead, but in a traditional Unix, that command doesn't exist.)

Things start to get even more interesting when you look at the Backspace/Delete key. That's when most people learn about the stty command. [Beard of Peter Gabriel!]

Posts: 1522 | From: Ohio, USA | Registered: Oct 2001  |  IP: Logged
uilleann
Discontinued


Icon 1 posted June 23, 2003 16:38            Edit/Delete Post 
That is to do with whoever decided it was clever to make the delete key be backspace, forcing software to map backspace to delete to make backspace work? And why you get all that ^H (or whatever) stuff come up when Telnet isn't doing the mapping?

Then you have Mac OS, with it's cute enter key - return (regular enter key) is 0x0D, but enter (numeric pad enter) is 0x03 - a number of programs actually forget to map that key at all, so it doesn't do anything (I know I've done that too). But I do like how I can use return for newline in AIM/ICQ, and enter for send IM - it's a handy distinction.

Actually, Mac OS does something odd with the delete and backspace keys, too - I forget what, now.

IP: Logged
Coffee_geek
Assimilated
Member # 1608

Member Rated:
5
Icon 1 posted June 23, 2003 21:37      Profile for Coffee_geek   Author's Homepage     Send New Private Message       Edit/Delete Post 
Well... I must confess my secret shame, we /do/ run windows on the gaming box. But...

I prefer Linux to anything.
I prefer Local to Starbucks.
I generally listen to more obscure music
While I universally condemn most fast food, I do prefer Wendys to MacDonalds.

Good thread.

Seeming and Dreaming,
Coffee

--------------------
We got, ten minutes to get there
We got, ten minutes to go
Throw this one in for the money
Cause the next one's for the next show

Posts: 464 | From: Varies | Registered: Aug 2002  |  IP: Logged
greycat

Member # 945

Member Rated:
5
Icon 1 posted June 24, 2003 08:56      Profile for greycat   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by uilleann:
And why you get all that ^H (or whatever) stuff come up when Telnet isn't doing the mapping?

Ah, I should have known you'd want all the details. [Wink]

Once upon a time, there was a company called Digital Equipment Corporation, and they made ASCII terminals. And on their terminals, they had a Delete key (ee-i-ee-i-o). And the delete key, when pressed, caused a series of 0's and 1's to be sent to the host, and the 0's and 1's could be deciphered as a number: 0177 (octal, of course, because people only had 8 fingers back then). And the software on the host knew that 0177 meant "erase the previous character".

Meanwhile, there was another company called International Business Machines, and they made terminals too! Only theirs weren't ASCII terminals... but later they made ASCII terminals. But more importantly, they told other people how to make ASCII terminals. And they decided that their terminals should have Backspace keys, and that the Backspace key, when pressed, should send a series of 0's and 1's that could be decoded as 0010 (octal). And the software on the host knew that 0010 meant "erase the previous character".

Years went by, and many companies made many terminals. And some of them followed the DEC VT series, and used Delete keys that sent 0177. And the others followed IBM and used Backspace keys that sent 0010. And never the twain should meet.

Then a bunch of crazy people decided that they wanted to be able to hook a terminal from one vendor, and a terminal from another vendor, to the same computer at the same time! So they needed to be able to accomodate all the differences between these terminals, among which was the Backspace/Delete discrepancy. (There were many, many other differences, mostly dealing with what codes you had to send to the terminal to make it do fancy things like clearing the screen. But being able to erase your mistakes is fundamental because people suck at typing.)

So, among other things, they invented a system in which you could tell the underlying driver what the value of the "erase previous character" key should be. (On Unix, you can have your terminal input pre-processed ("cooked") or not ("raw"). The underlying tty driver does the backspace/delete handling for you if you're in "cooked" mode, which is the default. If your application prefers to read character-by-character, then this doesn't apply.) This is done (at the command line level) with stty(1). At the programming level, it's a byte in an array which is a field in a struct which you hand to the driver with ioctl(2).

Now, that's all good, but what happens when you take a user who doesn't know anything about octals and ioctls, and give her an account on a Unix system? Well, if it's 1980, then the sysadmin has already told the system that input on serial port number 7 is done with a vt100 terminal, which has a Delete key, so there's usually no problem. But it's not 1980 any more -- it's 2003, and she's probably accessing her shell account remotely over a network. So the Unix system has no idea what sort of terminal she's using, until her client communicates this information. And the only way the client can communicate it is by sending a single piece of information -- the TERM environment variable -- which is supposed to embody everything there is to embody about a terminal, including all the keymappings, all the command codes, the size, the number of colors, the bugs, etc. The Unix host has a database that maps the TERM variable ("vt100") to a set of features. Some Unix hosts even have two of these databases, because two conflicting standards are better than one.

But remember, there are multiple layers here. The TERM variable lets an application program decide that a user must have pressed the F11 key when it sees "ESC [ 2 3 ~" coming in. But if the application wants to use "cooked" I/O, then the underlying tty driver has to know whether it should treat 0010 or 0177 as the "erase previous character" key, and the tty driver doesn't know anything about TERM variables or termcap/terminfo databases.

So, what most Unix systems do is basically guess, one or the other. Well, some of them are absolutely insane, and they guess wild things like "Oh, all users have a terminal which sends a # character for Backspace", but most of the newer ones guess either 0010 (BS, Ctrl-H) or 0177 (DEL). And if they happen to guess right, then you win! And if they happen to guess wrong, then you get to type "stty erase ^h" or "stty erase ^?" by hand, except you have to type it correctly without backspacing, because you can't backspace yet, because your backspace key isn't correctly identified yet. If you screw up, you get an error message, and you get to start over. (Or, you could be terribly clever and remap your terminal emulator's backspace key binding. Which gives you a feeling of triumphant pleasure, for about 10 minutes, until you ssh or telnet or rlogin from your current shell account to some other system, which guesses the other binding, and then you realize you can't have both at once. You really, really do have to run stty.)

quote:
Then you have Mac OS, with it's cute enter key - return (regular enter key) is 0x0D, but enter (numeric pad enter) is 0x03 - a number of programs actually forget to map that key at all, so it doesn't do anything (I know I've done that too).
The X window system has separate keysyms for these two keys as well. The primary Enter key is called XK_Return, and the other Enter key is called XK_KP_Enter. I've seen a large number of X applications in which the KP_Enter key doesn't do what you expect.

But if you're on a terminal, they both typically send 0015 (CR, Ctrl-M).

[Beard of Peter Gabriel!]

Posts: 1522 | From: Ohio, USA | Registered: Oct 2001  |  IP: Logged
Xanthine

Solid Nitrozanium SuperFan!
Member # 736

Member Rated:
5
Icon 1 posted June 24, 2003 15:11      Profile for Xanthine     Send New Private Message       Edit/Delete Post 
Of course you can also do what I do and use the delete key. [Smile]

My school's mail server used to be IRIX, and back then it recognized backspace at the login. Now they've got SunOS 5.8 and it doesn't like backspace anymore (though PINE still behaves the same).

--------------------
And it's one, two, three / On the wrong side of the lee / What were you meant for? / What were you meant for?
- The Decemberists

Posts: 7670 | From: the lab | Registered: Mar 2001  |  IP: Logged
uilleann
Discontinued


Icon 1 posted June 24, 2003 15:44            Edit/Delete Post 
Greycat:
Hmm...I don't ever recall return and enter operating differently under X, but then, I was probably using apps that treated them the same. I know that when the iCab 2.9.5 private beta came out, with a rebuilt toolbar system, it was not possible to launch a URL in the URL bar with enter (only return). Reported and fixed.

It's quite a pity how much the computing world (and the rest of the world) is bent on competing with each other instead of working together. Instead of one browser with lots of features, I get to choose Mozilla for CSS (but is slow as hell), or iCab (for features, but sucks at CSS), or IE which is faster than Mozilla, doesn't do CSS too badly, and has no features. Seeing Safari come out annoyed me - all the effort going into a new browser, instead of going into making an existing one better.

So then it takes all sorts of extra effort and complication needed to make everything work together well and play nice - like the joyous fun yall get to have with terminals.

Not that I'm any better - I always prefer to write my own, specialised program =) (then again, I'm not a C programmer, so I can't work with anyone else's anyhow.)

After all - the topic itself - better but in the minority - competition, and where people aren't working together for a better end.

IP: Logged
greycat

Member # 945

Member Rated:
5
Icon 1 posted June 25, 2003 07:29      Profile for greycat   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by Xanthine:
Of course you can also do what I do and use the delete key. [Smile]

If you have one. [Wink]

quote:

My school's mail server used to be IRIX, and back then it recognized backspace at the login. Now they've got SunOS 5.8 and it doesn't like backspace anymore (though PINE still behaves the same).

I glossed over this point originally. Unix can be quite brain-dead in some ways, and this is one of them. A lot of Unix systems actually use a different set of key mappings at the telnetd or console login prompt than they do once you're logged in. I'm working on a system like that right now -- HP-UX 10.20.

I don't know whether SunOS is the same (though I suspect it is), but HP-UX 10.20 uses the truly ancient "by god, we'll pick a key that every teletype has!" key mappings at the login prompt, which means it uses # (pound) for backspace and @ (at) for kill. It will also switch into ALL CAPS MODE IF YOU ACCIDENTALLY LOG IN WITH ALL CAPITAL LETTERS, BECAUSE IT ASSUMES THAT YOUR TELETYPE IS NOT CAPABLE OF PRODUCING LOWER CASE LETTERS. (Read "man stty" some time; there are flags to translate all input from upper case to lower case, and so on. These get switched on by some login programs, even on some Linux distros, if you type all caps. If you ever get stuck in this mode, you can use stty to get back to normal, or you can just logout and try again. Most people end up doing the latter.)

Anyway, try using # as backspace and see if that works. If so, then @ will probably work as "kill the whole bloody line" which is normally Ctrl-U on more modern systems. And by the way, never ever put a # or @ in your password on one of those types of systems. I made that mistake once. It made logging in very, very difficult.

On the other hand, people should be moving away from telnetd and rlogind by now, in favor of ssh. Since ssh only prompts for password authentication in the client, it will use the local system's key bindings, not the server's guess as to what your key bindings might be.

Posts: 1522 | From: Ohio, USA | Registered: Oct 2001  |  IP: Logged
shentzu
Geek
Member # 2253

Member Rated:
5
Icon 10 posted June 25, 2003 07:54      Profile for shentzu     Send New Private Message       Edit/Delete Post 
well, i married a redhead, and they are clearly a better product, and she is very refined, but i think the reason you see less of them is not due to sales..........

--------------------
Set a man by a fire and you keep him warm for a day, but set a man on fire and you keep him warm for the rest of his life.

Posts: 108 | From: here and there | Registered: Jun 2003  |  IP: Logged
Xanthine

Solid Nitrozanium SuperFan!
Member # 736

Member Rated:
5
Icon 1 posted June 25, 2003 08:07      Profile for Xanthine     Send New Private Message       Edit/Delete Post 
Nah, that's just genetics. My dad was hoping one of us kids would be a redhead. Alas, the genes are there, but dominated by brown.

--------------------
And it's one, two, three / On the wrong side of the lee / What were you meant for? / What were you meant for?
- The Decemberists

Posts: 7670 | From: the lab | Registered: Mar 2001  |  IP: Logged
dragonman97

SuperFan!
Member # 780

Member Rated:
4
Icon 1 posted June 25, 2003 08:14      Profile for dragonman97   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by greycat:

On the other hand, people should be moving away from telnetd and rlogind by now, in favor of ssh. Since ssh only prompts for password authentication in the client, it will use the local system's key bindings, not the server's guess as to what your key bindings might be.

Hear, hear! I banished telnet from our Linux boxen about a year ago (I am rather concerned about the fact that one of our *nix mainframes is still running telnet, though :-/). In addition to the security concerns, SSH just allows for a better remote 'experience,' for lack of better words. Ironically, I learned about running color telnet a few weeks before I started using SSH, way back when, and it was a nuisance. These days, I'm just loving public/private key authentication, and I'm SSH'd into my home box right now, reading my e-mail through my client of choice, mutt - via PuTTY.

--------------------
There are three things you can be sure of in life: Death, taxes, and reading about fake illnesses online...

Posts: 9331 | From: Westchester County, New York | Registered: May 2001  |  IP: Logged
Callipygous
BlabberMouth, a Blabber Odyssey
Member # 2071

Member Rated:
4
Icon 1 posted June 25, 2003 08:31      Profile for Callipygous     Send New Private Message       Edit/Delete Post 
MacDonalds v Burger King - I favour the former as it has better facilities for the only things I visit them for - a MacDump occasionally with a MacWee on the side.

Back to your Unix chat now boys......

--------------------
"Knowledge is Power. France is Bacon" - Milton

Posts: 2922 | From: Brighton - UK | Registered: Mar 2003  |  IP: Logged
spungo
BlabberMouth, a Blabber Odyssey
Member # 1089

Member Rated:
4
Icon 1 posted June 25, 2003 08:45      Profile for spungo     Send New Private Message       Edit/Delete Post 
Yeah, PuTTy is a sexy bitch - Microsoft telnet is just the most infuriating bag of vom ever. All hail PuTTy.

--------------------
Shameless plug. (Please forgive me.)

Posts: 6529 | From: Noba Scoba | Registered: Jan 2002  |  IP: Logged
TouchStone
Mini Geek
Member # 1453

Member Rated:
5
Icon 12 posted June 25, 2003 09:12      Profile for TouchStone     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by Coffee_geek:

I prefer Local to Starbucks.
I generally listen to more obscure music

I fully agree. I go to a local coffee place, also. First, it's cheaper. Second, when I go to Starbucks and ask for a large coffee. They ask me if I want a "venti drip." What on God's green earth is a venti drip. It doesn't exactly sound like something I want to drink! [Razz]

Obscure music, definatly!

Posts: 81 | From: Behind a coffee cup | Registered: Jun 2002  |  IP: Logged
GameMaster
BlabberMouth, a Blabber Odyssey
Member # 1173

Member Rated:
4
Icon 1 posted June 25, 2003 12:59      Profile for GameMaster   Author's Homepage     Send New Private Message       Edit/Delete Post 
quote:
Originally posted by spungo:
Yeah, PuTTy is a sexy bitch - Microsoft telnet is just the most infuriating bag of vom ever. All hail PuTTy.

PUTTy is great... Indeed.


pre- and post- fix notations bug me... I can deal with lisp (barely), but RPN is really too far.

Beta was before my time... I prefer DVD.

The Clie is cool.

A burger is a burger. Unless it's Cops or Culver's... (I mean the Cops here in Milwaukee, I know there is a Kops or Cops chain, but this is a seperate entity... with GREAT burgers)

--------------------
My Site

Posts: 3038 | From: State of insanity | Registered: Mar 2002  |  IP: Logged
GMx

Solid Nitrozanium SuperFan!
Member # 1523

Member Rated:
4
Icon 1 posted June 25, 2003 15:02      Profile for GMx     Send New Private Message       Edit/Delete Post 
I've always preferred Quentin Collins over Barnabas Collins in Dark Shadows.
Posts: 5844 | From: S-4, Area 51 | Registered: Jul 2002  |  IP: Logged


All times are Eastern Time
This topic comprises 2 pages: 1  2 
 
  New Poll   Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:

Contact Us | Geek Culture Home Page

2015 Geek Culture

Powered by Infopop Corporation
UBB.classicTM 6.4.0



homeGeek CultureWebstoreeCards!Forums!Joy of Tech!AY2K!webcam