From: David Brown on
Richard Tobin wrote:
> In article <87ska5ezlg.fsf(a)fever.mssgmbh.com>,
> Rainer Weikusat <rweikusat(a)mssgmbh.com> wrote:
>
>> UNIX(*) has a single type of 'interactive command processor/ simple
>> scripting language' and its features are described by an IEEE
>> standard.
>
> This is pedantry of the most pointless kind. You're welcome to
> your "UNIX(*)", but don't pretend that your comments have anything
> to do with the real world.
>

Actually, his comment /does/ have a lot to do with the real world - it
was just very badly expressed. There is a posix standard for shells,
which gives a standard base for almost all shells in the *nix (Linux,
BSD, "real" unix, etc.) world. Most shells have features beyond the
posix base, and those are often incompatible, but if you stick to the
posix subset your scripts should work under any shell.

Of course, this is getting /way/ off topic for this thread...
From: Pascal J. Bourguignon on
David Brown <david(a)westcontrol.removethisbit.com> writes:

> Richard Tobin wrote:
>> In article <87ska5ezlg.fsf(a)fever.mssgmbh.com>,
>> Rainer Weikusat <rweikusat(a)mssgmbh.com> wrote:
>>
>>> UNIX(*) has a single type of 'interactive command processor/ simple
>>> scripting language' and its features are described by an IEEE
>>> standard.
>>
>> This is pedantry of the most pointless kind. You're welcome to
>> your "UNIX(*)", but don't pretend that your comments have anything
>> to do with the real world.
>>
>
> Actually, his comment /does/ have a lot to do with the real world - it
> was just very badly expressed. There is a posix standard for shells,
> which gives a standard base for almost all shells in the *nix (Linux,
> BSD, "real" unix, etc.) world. Most shells have features beyond the
> posix base, and those are often incompatible, but if you stick to the
> posix subset your scripts should work under any shell.

You changed the context. It wasn't scripts, it was interactive use.

You're forgetting chsh, and the fact that not all shells are designed
to be somewhat compatible with POSIX shell.


> Of course, this is getting /way/ off topic for this thread...

Let's put it back on-topic:

chsh /usr/bin/emacs

Et voil�! Instant "word" processor shell...

--
__Pascal Bourguignon__ http://www.informatimago.com/
From: Richard Bos on
dj3vande(a)csclub.uwaterloo.ca.invalid wrote:

> Nick Keighley <nick_keighley_nospam(a)hotmail.com> wrote:
> >On 13 Jan, 16:43, dj3va...(a)csclub.uwaterloo.ca.invalid wrote:
> >> Unix people call this a "shell".
> >
> >I'm guessing you're trying to be funny/ironic. But in case you aren't,
> >Unix has dozens of stranglely incompatible Command Line Interfaces
> >that Unix people call "shells". None of them are word processors.
>
> Right.
> But all of them have the property that I can get a word processor by
> typing the name of a word processor that's installed on the system.
>
> My point was that the "primitives" provided by a shell (the programs
> installed on the system) give a pretty good approximation to
> [Jongware]'s suggestion of "type 'word processor' and get a word
> processor".

That is an iffy comparison, because you need to install the word
processor separately from the shell before you can call it. In other
words, the programs you install are much more like third-party libraries
in a programming language, not like the primitives. In this respect, a
normal programming language like C is no different from a shell: from C,
you can also call the function process_words() - or if you wish,
system("wordprocessor");

Richard
From: [Jongware] on
Richard Bos wrote:
> dj3vande(a)csclub.uwaterloo.ca.invalid wrote:
>
>> Nick Keighley <nick_keighley_nospam(a)hotmail.com> wrote:
>>> On 13 Jan, 16:43, dj3va...(a)csclub.uwaterloo.ca.invalid wrote:
>>>> Unix people call this a "shell".
>>> I'm guessing you're trying to be funny/ironic. But in case you aren't,
>>> Unix has dozens of stranglely incompatible Command Line Interfaces
>>> that Unix people call "shells". None of them are word processors.
>> Right.
>> But all of them have the property that I can get a word processor by
>> typing the name of a word processor that's installed on the system.
>>
>> My point was that the "primitives" provided by a shell (the programs
>> installed on the system) give a pretty good approximation to
>> [Jongware]'s suggestion of "type 'word processor' and get a word
>> processor".
>
> That is an iffy comparison, because you need to install the word
> processor separately from the shell before you can call it. In other
> words, the programs you install are much more like third-party libraries
> in a programming language, not like the primitives. In this respect, a
> normal programming language like C is no different from a shell: from C,
> you can also call the function process_words() - or if you wish,
> system("wordprocessor");

It was a deliberate exaggeration, referring to the OP's idea: a compiler
sees someone struggling with an unsigned array of characters, save and
load routines, and display and edit stuff. On compiling, it simplifies
the entire program to "system("wordprocessor);"

Compilers can use clock cycle optimizations to speed up programs -- and
it optimizes *everything* -- where a human could eyeball it and speed up
an entire program by using a different algorithm for a single routine. I
can't see how counting clock cycles could do *that*!

Oh, apart from a genetic algorithm that simply tries out everything, or
a smarter compiler that *can* infer O(n) count from looking at code.

Perhaps it'll also understand "Tea -- Earl Grey, hot."

[Jw]
From: Josef Moellers on
karthikbalaguru wrote:

> My query is 'A tool that suggests
> optimized logic for a piece of
> code/module/function' . I am

Define "optimized"!

Optimized for speed, optimized for memory requirement, optimized to
handle extreme situations, optimized to handle easy situations?

You can try explaining "optimized" to a human being. Then try to eplain
that to a computer program.

Josef
--
These are my personal views and not those of Fujitsu Technology Solutions!
Josef M�llers (Pinguinpfleger bei FTS)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://de.ts.fujitsu.com/imprint.html