Lynx and other commands unavailable in Terminal?
I printed out a list of basic unix commands a few days ago, and I saw a few commands (mostly web) that looked neat. They included lynx (the web browser), Gopher (the database browser) and pine (a simple mailer).So I tried using them, and each one was followed with a 'command not found'. Are these unnavilable in OS X? Or did I print some strange 1970s crap? What gives?
Comments
NOTE: my UNIX terminology is porbably not up to snuff. I am assuming that vi and lynx are commands.
Originally posted by Placebo
Why do UNIX commands/programs have to be ported to X?
There's often very little that needs to be done for a port of small apps like these, actually. In most cases it's a simple recompile for the PPC architecture and Darwin kernel.
The reason you don't have pine, mutt, lynx, etc. is twofold:
One, they are not a part of a 'base' unix/linux distribution. They are not necessary for the system to run, so they are not included by default.
Two, virtually noone using OSX has a use for Pine or lynx or bitch, as Mac users tend to like GUI apps, so Apple has no incentive to install them (by default). Unix-heads or techies will use fink or simply compile from source anyway.
BTW, w3m is way better than lynx. edit: w3m supports tables, frames, even mouse scroll wheels!
Byte order, byte alignment, 64 vs. 32 bit addressing, etc.
Somehow I don't think these apps were designed originally with Darwin 6.6 in mind.
Originally posted by Brad
And "porting" has nothing to do with the operating system it runs on?
Somehow I don't think these apps were designed originally with Darwin 6.6 in mind.
He said: "Porting in the Unix context means getting, say, a linux program to run natively on BSD" (which is basically what you say).
However:
Originally posted by 1337_5L4Xx0R
That's all handled by the compiler.
That's wrong. If you do (low-level) file/network related things, byte-order swapping routines have to be added to the code, it's not done automatically by the compiler. Or try writing complex data structures directly from memory to a file/network (without platform independent marshalling) and read it on another machine...
This is not what you should do if you want your code to be "portable", but many programs have issues like that before being "ported" to another system+architecture for the first time.
The word "port" is used, even if it's the same OS but different architecture (linux x86 vx. linux PowerPC).
I'm using gentoo linux right now, on a TiBook, and my /etc/make.conf has ACCEPT_KEYWORDS="~ppc ~x86"
So far I have encountered one program, armagetron, which has sound endian issues. Out of hundreds, nay thousands of software source code I've compiled in the last 6 months, and on my Wallstreet G3 before that.
Porting in the unix context typically means 'getting linux software to work on BSD' or vice versa, as there are subtle differences between them (ie: /dev/wsmouse vs /dev/input/mice).
Software that is written in assembly or something is not 'ported' to another arch, it is rewritten for that arch. 99.9% of software is written in a high level language, specifically because these are 'portable' languages.
Originally posted by 1337_5L4Xx0R
Okay, we're getting a bit off topic here, but the reason mutt, pine and BitchX, and any app written in a high level language like C, is not shipped w/ OSX, is because Apple decided they weren't neccessary or useful for most users, not because they haven't been 'ported' to Darwin. There's no 'porting' to do; a simple recompile will do the trick.
As I said before, this will work if the code is already portable. Just because something's written in C, that doesn't make it portable in the sense that a simple recompile will always work on a different arch (same OS). You might have to add swapping routines (eg, in media players) or have to take care of 64/32 bit ints, depending on what the program does.
Originally posted by 1337_5L4Xx0R
Software that is written in assembly or something is not 'ported' to another arch, it is rewritten for that arch. 99.9% of software is written in a high level language, specifically because these are 'portable' languages. [/B]
"portable languages"? So a high level language is portable and a low level language is not? Doesn't that mean that being "portable" has something to do with hardware abstraction? So, wouldn't you say that "to port" obviously goes beyond OS environment but includes architecture as well?
There's not much software that is written in 100% assembly. Everything else that's written in a higher level language and (if at all) contains little assembly is not "rewritten" but is "ported". Linux has not been "rewritten" for the PPC, it also was not just recompiled, it was "ported".
Peterson$ which pine
/sw/bin/pine
Peterson$ which lynx
/sw/bin/lynx
Peterson$
Had I read the thread more carefully, I'd've realised Brad & I were saying the same thing, slightly differently. D'oh.
And yes, 123 you are right about porting. So I will stop posting now...