I fucking hate programming in Linux

What the hell is wrong with the Linux developers? C is a semi-archaic language, but they keep writing the goddamn library functions with it. I have this giant fucking 5 ton book full of functions with names that differ by like 3 characters, and 10,000 different parameter lists. Hello, there’s this thing called C++ for non-sadomasochists, can you please stop blugeoning my poor miserable brain with your overwrought ancient manuscripts? Welcome to the 21st century, you pitiful bunch of hunchbacked medieval monks. It’s hard enough trying to write a MAC protocol without functions that look like they got hit by a fucking bullet train:


setsockopt (sock, SOL_SOCKET, SO_BROADCAST, (void *) &bcastpermission, sizeof (bcastpermission)
bcastaddr.sin_family = AF_INET
bcastaddr.sin_addr.s_addr = inet_addr (bcastIP);
bcastaddr.sin_port = htons (bcastport);
recvfrom(int  s,  void  *buf,  size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)

For those of you who don’t know what all this incoherent babbling is that flows forth from my gnarled, cracked, and twisted hands, I envy you. Bastards. And if you laugh at my ignorance, well you can eat my spent printer cartriges.

10 PRINT “BASIC RULES!!!”;
20 GOTO 10

And it’s hard enough to read what you posted, since it’s all spread out like that. Or is it just me?

The argument I’ve always heard is that the overhead of C++, enforcing inheritance, encapsulation and polymorphism (and variable scope and friends and templates and and and), is too great for it to be used for system programming.

I’m mostly coding in Java these days, and it’s the same as for any OO language - once an object works, it stays working!

There’s also some sort of techno-machismo with using the lowest level language possible. At least Linux is portable so assembler is out!

I believe O’Reilly has an excellent book all about socket programming with C. Anyhoo, there are C++ compilers and libraries available for Linux. Why don’t you get them? If you’re doing any kind of low level systems programming, drivers, networking stacks, etc, you’ll need to use C, though. The environment overhead for C++ is too much to deal with at that level.

And I think the fact that C has survived 30-some years shows that it’s not archaic. It’s a very small, elegant design that is easy to adapt to new technologies. Look at what happened to languages like COBOL, Pascal, Fortran and even LISP - technology simply outgrew those environments.

friedo, I hate to have to point this out, but I was at this presentation by a guy from Microsoft yesterday, and, according to some survey or other, there are about as many COBOL developers out there as there are Java types (a bit under 2 million of each).

He was even kind enough to show us all an example of the new .NET technology being used in conjunction with COBOL to generate web pages. Wonderful stuff. I’m not sure what this was supposed to illustrate, because I managed to gnaw through my own ankle and make my escape around that point. But the web page looked pretty spiffy. For COBOL.

Well I’m not much of a Java fan either. Technology outgrew that idea before it made it out the door of Sun. It will be this decade’s Pascal, mark my words.

I’m surprised that people are actually creating with COBOL these days. All the people I know who have worked with COBOL professionally have been maintaining legacy systems.

A man after my own heart. Wrote a short program (impossible in C++!) that extracted data from a couple .CSV files and created a new one. In QBASIC it took about a second. In BASICA it took half again as long.

As for COBOL vs Java/C++/C, AT LEAST YOU CAN SEE WHAT IT’S GOING TO DO JUST BY LOOKING AT IT! Yeah, there’s a shitload of typing involved in programming it, but that won’t kill you. And modern machinery should run it just fine. I’m tired of jumping through hoops to extract the last cycle out of a program when the hardware runs, subjectively, it just as fast.

COBOL is doing just fine in the mainframe world, and despite what Bill Gates likes to think mainframes are not going away any time soon.

As to C/C++. C is a finel-honed blade, applicable to any number of problems but potentially dangerous to both object and wielder. C++ is a suit of armor with a blade grafted into one gauntlet. Once you get it on, it makes a number of problems less threatening, but the encumberance can kill you.

Yes yes yes, I know all about the relative merits of different languages under different conditions. But you see, as a CS student working on final projects I have a License To Bitch. Systems programming and network protocols are exactly what I’m doing, so C it is. I’m nearly done though, thank god. My professors keep trying to get me to go for my Master’s, but I am really burned out on school.

As for Java vs. Pascal, Pascal was only intended to be a teaching language, while Java was attempting to be a real world language. But what the hell are you really supposed to do with an anonymous inner class? And who named the functions final, finally, and finalize? You’re already object oriented, how about using one name and overloading it?

Always thought overloading was further proof that C was really a joke that got away. (Yeah, the second section at this link, “Creators Admit UNIX, C Hoax,” is a hoax, but it’s so darned BELIEVABLE!) How the hell are you supposed to maintain a program with overloading in it?

[hijack]Impossible in C++? I’d be real curious to know how that works out. Mind you, I’m not defending the merits of C++ here; I’m just curious as to how you came to the above conclusion.[/hijack]

I think DZ was trying to say that it was impossible to make the program SHORT in C++, not that it was impossible to make a program that did that.

I gave up on programming at QBASIC. I was introduced to it when I was 19 or so, and I had been using line numbers for so long (11 years) that it just threw me completely off when I tried to learn a language that didn’t use them. Yes, I know you can still use line numbers in QBASIC, but for some reason I didn’t want to use them if they weren’t necessary, but didn’t feel like learning the newer way of doing things. My best programming days were far behind me anyway, lack the patience to do anything much more complicated than a 150 line Eliza clone or Medieval Kingdom/Space Colony/Crack House simulator (except in TI Basic, which had neat subroutines that allowed me to make a few ‘action’ games with primitive graphics).

Hmm, I wonder if I could find a version of TI Basic that would run on a modern computer…

The Berzerkley socket API is ugly as a dead whore. Though I am a C bigot, "I feel your pain"™. For the sake of all humanity, DO NOT look into programming for X-windows…
-Ben

How so?

I think Java is pitched at just the right level: not too low (with pointers and so on) and not too high (like PowerBuilder and VB, for example) The API is rich but not too complex, and it works the way you would have designed it yourself if you had the time.

  1. Precisely. Worked with a fellow who denigrated my 100-line BASIC programs because that’s small for a C program. Since one can barely sneeze in under 100 lines in C I thought that was a false superiority.

  2. Would you like that in Windows, MS-DOS, Linux, or Amiga DOS? With a PIII maybe you could get some speed out of that godawful interpreter the TI99 had. :wink:

It’s outgrown because it’s impossible to adapt. It comes with a class for everything, and for precisely that reason, it’s useless. Want to write a simulation of duck sex? Use the animals.duck.procreation class. Want to write a program to tell fortunes? Use the mystic.madame.cleo class. You know what I mean? No control over anything. Writing in Java is like being babysat. Or perhaps sat upon.

When the environment changes, and it does have a tendency to do that, the only way Java will survive is to build new class libraries.

C can adapt to any environment because you can control your abstraction layers precisely, without having to rely on some burnt out Sun engineer.

That I can believe, no problem. Yeah, I can’t remember the last time I wrote a C/C++ program that was under 100 lines–probably the first “Hello world” I did back in CS 101.

That’s odd - I find X programming to be not that difficult to grok. Sockets OTOH, fuggedaboutit. You might as well be talking in Hindi. (Probably because I lack a basic understanding of sockets and network programming in general.)

Of course, unless I have to write it in C, I write it in Python anyways, so moot point.

Python? Porcupine is another Python programmer. And we have several Esperantisti here. And from the Twin Cities! A natural Doper!

I, OTOH, don’t know why I’m hanging out in this thread since:

  1. As I tell my bosses when a program doesn’t work, “I’m a draftsman. I’m not a programmer.”

  2. I gave up doing stuff just to prove I could a few years ago. Now I try to only do things to get them done, which makes Linux and C and OOPS and all that shit FAR too much trouble.