473,789 Members | 3,067 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

UNIX, C, Perl

Given that UNIX, including networking, is almost entirely coded in C,
how come so many things are almost impossible in ordinary C? Examples:
Network and internet access, access to UNIX interprocess controls and
communication, locale determination, EBCDIC/ASCII discrimination, etc.

Almost all of these are easy in Perl. Why isn't there a mechanism like
perl modules to allow easy extentions for facilities like these? Isn't
anyone working on this problem? or is it all being left for proprietary
systems?
Sep 2 '08
223 7384
Ian Collins said:

<snip>
C has lost the
mindshare in hosted applications programming and there's little point in
trying to win it back.
Am I the only one who isn't particularly bothered about this? Let people
write applications in whatever language /they/ want, as long as they leave
me to write them in whatever language /I/ want. I choose C (often - not
always). If they want to use C# or F# or Eb or D minor, that's up to them
- who cares?
To do so invites comparisons with that great
English hero King Canute.
A much-misunderstood man, who had a far better understanding of reality
than did his courtiers.
One only has to compare the activities of the current C++ and C
committees to see which one is working on an evolving language. I'd be
pleasantly surprised to see the C programming community get as excited
about the next C standard as the C++ programming community is about
theirs.
The principal advantage of an unstable language is that you can add bits to
it. The principal advantage of a stable language is that you know what all
the bits are. Both are good, but you can't have both in the same language.

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 4 '08 #71
Richard Heathfield wrote:
Ian Collins said:

<snip>
>C has lost the
mindshare in hosted applications programming and there's little point in
trying to win it back.

Am I the only one who isn't particularly bothered about this? Let people
write applications in whatever language /they/ want, as long as they leave
me to write them in whatever language /I/ want. I choose C (often - not
always). If they want to use C# or F# or Eb or D minor, that's up to them
- who cares?
No me. I just use the most appropriate tool for the job.
>
>One only has to compare the activities of the current C++ and C
committees to see which one is working on an evolving language. I'd be
pleasantly surprised to see the C programming community get as excited
about the next C standard as the C++ programming community is about
theirs.

The principal advantage of an unstable language is that you can add bits to
it. The principal advantage of a stable language is that you know what all
the bits are. Both are good, but you can't have both in the same language.
A bit like Latin and English?

I think the activities of the two committees reflect the desire for
change in the user communities. Well before the 1998 C++ standard was
published, most compiler vendors were shipping compilers with most of
the new features. This was followed by a post standard rush to bring
out conforming compilers. Contrast this with C99.

It wasn't only the desire for change, but the nature of the changes.
Most C++ programmers wanted the new features, hardly any C programmers
appear to want most of C99.

So my point is C fills its (large) niche very well and the only
worthwhile changes are small improvements (like mandating function
prototypes and expunging gets) to improve the quality of C code.

--
Ian Collins.
Sep 4 '08 #72
Ian Collins said:
Richard Heathfield wrote:
<snip>
>The principal advantage of an unstable language is that you can add bits
to it. The principal advantage of a stable language is that you know
what all the bits are. Both are good, but you can't have both in the
same language.
A bit like Latin and English?
Quidquid C dictum sit, altum viditur.
I think the activities of the two committees reflect the desire for
change in the user communities. Well before the 1998 C++ standard was
published, most compiler vendors were shipping compilers with most of
the new features. This was followed by a post standard rush to bring
out conforming compilers. Contrast this with C99.
Perhaps fairer to compare it with C*8*9, where there was a *pre*-standard
rush to bring out conforming compilers.
>
It wasn't only the desire for change, but the nature of the changes.
Most C++ programmers wanted the new features, hardly any C programmers
appear to want most of C99.
That's because C99's changes were the *wrong* changes.
So my point is C fills its (large) niche very well and the only
worthwhile changes are small improvements (like mandating function
prototypes and expunging gets) to improve the quality of C code.
Actually, the really worthwhile changes are never going to happen. For
example, I do actually think it would be worth adding operator overloading
to C - but I know that ISO is never going to buy that, and I don't see any
point in fighting a losi... well, not /that/ losing battle, anyway.

--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Sep 4 '08 #73
jacob navia <ja***@nospam.c omwrote:
Kenny McCormack wrote:
Calm down. Take your medicine. You'll feel better soon.

Kenny, you did not answer my post...
So, you take a slug of your own medicine... like it, do you?

Richard
Sep 4 '08 #74
Richard Heathfield wrote:
Ian Collins said:
>So my point is C fills its (large) niche very well and the only
worthwhile changes are small improvements (like mandating function
prototypes and expunging gets) to improve the quality of C code.

Actually, the really worthwhile changes are never going to happen. For
example, I do actually think it would be worth adding operator overloading
to C - but I know that ISO is never going to buy that, and I don't see any
point in fighting a losi... well, not /that/ losing battle, anyway.
I'm sure they would be, but how many embedded C compiler vendors are
offering operator overloading as an extension? It's probably fair to
assume they have the finger on the pulse of what a large percentage of
C programmers want. The useful subset of C99 additions had been
extensions in a lot of compilers for years before they were standardised.

--
Ian Collins.
Sep 4 '08 #75
Ian Collins wrote:
Richard Heathfield wrote:
>Ian Collins said:
>>So my point is C fills its (large) niche very well and the only
worthwhile changes are small improvements (like mandating function
prototypes and expunging gets) to improve the quality of C code.
Actually, the really worthwhile changes are never going to happen. For
example, I do actually think it would be worth adding operator overloading
to C - but I know that ISO is never going to buy that, and I don't see any
point in fighting a losi... well, not /that/ losing battle, anyway.
I'm sure they would be, but how many embedded C compiler vendors are
offering operator overloading as an extension?
Operator overloading is not an objective per se. It is a means of making
libraries that use lists, flexible arrays and other sequential
containers interoperable using the same notation:

data[2]

to acces the third element of a list/array/other

Operator overloading is needed to implement fixed point arithmetic, what
is needed in many small CPUs that do not implement floating point.

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Sep 4 '08 #76
jacob navia wrote:
Ian Collins wrote:
>Richard Heathfield wrote:
>>Ian Collins said:

So my point is C fills its (large) niche very well and the only
worthwhile changes are small improvements (like mandating function
prototypes and expunging gets) to improve the quality of C code.
Actually, the really worthwhile changes are never going to happen.
For example, I do actually think it would be worth adding operator
overloading to C - but I know that ISO is never going to buy that,
and I don't see any point in fighting a losi... well, not /that/
losing battle, anyway.
I'm sure they would be, but how many embedded C compiler vendors are
offering operator overloading as an extension?

Operator overloading is not an objective per se. It is a means of making
libraries that use lists, flexible arrays and other sequential
containers interoperable using the same notation:

data[2]

to acces the third element of a list/array/other

Operator overloading is needed to implement fixed point arithmetic, what
is needed in many small CPUs that do not implement floating point.
As I said, I don't dispute the utility of operator overloading. What I
do dispute is the demand. As I said in the bit you snipped, the good
bits of C99 where around for a long time before they were standardised
because there was a demand for them. What extensions are most vendors
offering now?

--
Ian Collins.
Sep 4 '08 #77
Bartc wrote:
"Keith Thompson" <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
>jacob navia <ja***@nospam.c omwrites:
....
>>Yes, you read correctly.
"Much new development really ought to use higher level languages"
than C.

This is in essence what I said.

Nonsense.

Reading the quoted text of Mr Gwyn, it does appear to show considerable
bias against interesting new developments in C, in fact appearing to be
backward looking rather than forward looking.
It's not clear, however, whether the bias he shows is excessive, or a
bias that is entirely appropriate. From my experience with him, my
impression is that he's very much a defender of the words of the current
standard against most changes - but that's primarily because he thinks
that most of the many defects in the standard should be dealt with by
having the reader apply a bizarre mind-reading technique which he calls
"common sense", rather than by having the committee fix the words of the
standard to say what it was actually intended to say.

However, he's not against change itself. He just thinks it should occur
slower and with more consideration and in a different direction than
what jacob wants.
The attitude seemed to be that there's no point in adding new stuff to C
You're making exactly the same mistake jacob did. You're converting
statements that favor making few changes into statements that favor
making no change, and that's a misrepresentati on of Doug's position.
because (a) it's not much use for programmers maintaining existing code;
(b) for new code, it's better to use a 'better' language. So, forget it.
Again, you're misrepresenting him by converting statements that say that
"much" code should be done in other languages into statements that "all"
code should be done in other languages.
And, C apparently only just cuts it for systems programming, let alone
general programming. In it's present standard form, he might be right,
but seemed completely against the idea of improving C to make it more
suitable, which is what Jacob is trying to do.
No - he's in favor of improving C, and disagrees with jacob about
whether jacob's proposed changes would have that effect. Since a lot of
other smart people who like programming in C agree with him in that
regard, you might want to consider the possibility that it's the nature
of the proposed change that is the problem, not just the simple fact
that it is a change.
>>C is good only for systems work, etc etc, new development or
application dveelopment should be done in better languages, etc.

Which, one more time, is not what he said.

Er, I think he did:

"
It is (in my opinion) a mistake to try to push C (in any variant)
as a general solution for all programming problems. It's a
good choice for the systems programming that it was designed for,
although it still has deficiencies even for that. I would rather
the time spent discussing directions for C concentrate more on
remedies for its remaining deficiencies for systems work than on
trying to support applications where there are better choices.
"
Once again, you're converting non-absolute statements into absolute
ones. To show you how you've misinterpreted, I'll rewrite it so that it
actually supports your misinterpretati on:

DISCLAIMER: THIS IS NOT MY OPINION - IT IS NOT DOUG'S OPINION - IT IS
NOT ANYONE'S OPINION, AFAIK:
"It is a mistake to try to push C (in any variant) as a solution for any
programming problem other than the systems programming tasks that it was
designed for, although it still has deficiencies even for that. Time
spent discussing directions for C should be exclusively spend on
remedying its remaining deficiencies for systems work, and not on trying
to support applications where there is always a better choice."

Can you see the difference between my re-write and what he actually
said? Do you understand that your statements apply only to my rewrite,
and not to the original? I only changed a few words, but the result is
that it converts a legitimate point of view (which I don't fully share)
into a statement that could only be made by an idiot.
Sep 4 '08 #78
On 4 Sep 2008 at 2:06, Keith Thompson wrote:
Perhaps, but there's a clear contradiction between what Doug Gwyn
actually said and what jacob nava claims Doug Gwyn said.

Doug Gywn said that "Much new development really ought to use
higher-level languages in the first place."

jacob navia claimed that Doug Gwyn said that "their [the committee's]
main objective is to preserve C as a language that should run legacy
code with no new development".

You can agree or disagree with what Doug actually said, but it's very
different from jacob's (deliberate?) misrepresentati on.
Bullshit. It's strikingly similar. If you remove your fundamentalist
glasses for a second, you'll see that Jacob has expressed the same
thought in different words. It's called paraphrase, and that doesn't
make it a misrepresentati on.

Sep 4 '08 #79
On 4 Sep 2008 at 6:07, Richard Heathfield wrote:
Quidquid C dictum sit, altum viditur.
You mean videtur.

If you're going to ponce around like a pretentious dick, at least get it
right.

Sep 4 '08 #80

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6557
by: dpackwood | last post by:
Hello, I have two different scripts that do pretty much the same thing. The main perl script is on Windows. It runs and in the middle of it, it then calls out another perl script that then should run on a Unix box I have. Both scripts run ok, except for the part when Windows try's to call out the Unix script. I have it set up where the Unix is mapped through a drive letter and can drop stuff into the Unix box. It is going through another...
2
5673
by: Mohsin | last post by:
Hi all, I have a perl program which makes a user exit to the O/S (unix, solaris) to issue a O/S command. I know that the shell it invokes is NOT a korn shell, because I captured the shell info into a file with a 'ps' command. My question is "How to explicitly specify a Korn shell to be used by perl?" Eg of my perl code: ## Begin code snippet..
0
6448
by: Danny Jensen | last post by:
I need to test if certain processes on a unix box were running. I wanted to use whatsup gold to do the testing. First I needed to go to the whatsup configure>monitors & services menu to add this tcp/ip port 1555 service with the folowing lines: Send=psef /dj/myco/rf.monitor\r\n Expect=~1 the psef above is a command that the unix server executes. The unix box communicates back a 1 if the test is successful and a 0 if it is
1
17721
by: Al Belden | last post by:
Hi all, I've been working on a problem that I thought might be of interest: I'm trying to replace some korn shell scripts that search source code files with perl scripts to gain certain features such as: More powerful regular expressions available in perl Ability to print out lines before and after matches (gnu grep supports this but is not availble on our Digital Unix and AIX platforms) Make searches case insensitive by default (yes, I...
6
1671
by: asimorio | last post by:
Hi folks, Recently, I am investigatin a memory leak issue. I have written a simple C++ program and a Perl script to test on UNIX environment machine. I do a for loop to new up 20 char of size 32768 bytes, then delete them. Please see below: //// part of the code start //// for (i=0; i<20; i++) { ptrA = new (std::nothrow) char;
2
4275
by: perlnewbie | last post by:
Hi everyone I am new to perl and I am writing a perl script to invoke a set of commands on UNIX clearcase vob however I am having trouble after setting the view and mounting the vob I want to change the directory into the vob and then using Cwd or pwd to confirm I am in the vob to continue the CC functions. Sample code in perl : $Result = system 'cleartool setview admin_view'; $Result = system ('cleartool mount /vobs/test');
4
3792
by: jane007 | last post by:
Hello everybody: I am having a problem. On Unix platform, there is a script that need user to input data from console, then when I call Unix perl script from Windows, these is an issue occurs, when I input data and enter "enter" so fast, the Windows console is freezed, I don't know why, does anybody know?Thank you very much. My code like follows:
4
4274
by: mdshafi01 | last post by:
Hi , I am trying to send mail from unix perl. I am using following code to send mail. It is not triggering mail and also it is not giving any error. please tell me any special settings are required or this program should be executed from special user with higher permission or something. please tell me.
1
3983
by: dxz | last post by:
I have a perl script to run on both UNIX and Windows. How should I write the Shabang line: On UNIX, it is #!/usr/bin/perl On Windows, it is #!C:\perl\bin\perl.exe Which one should I use? Should I combine them? If yes, how?
0
9665
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5417
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.