To the non-retarded programmers on this forum

Everything todo with programming goes HERE.

Is C a low level language?

Yes
4
50%
No
4
50%
 
Total votes: 8

Pirate
On Lightcycle Grid
Posts: 31
Joined: Mon Nov 15, 2004 2:03 am

To the non-retarded programmers on this forum

Post by Pirate »

Is C a low level language?

oh, and if your not sure, let me help you out.
http://www.webopedia.com/TERM/h/high_le ... guage.html
Last edited by Pirate on Wed Mar 16, 2005 10:56 pm, edited 1 time in total.
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Moved to the programming section.
Image
ishAdmin
Match Winner
Posts: 625
Joined: Sun Jul 04, 2004 12:11 am
Contact:

Post by ishAdmin »

Do you have to say things like 'non-retarded'? If you were joking, then fine, but you don't strike me a the joking type.

And c supports both high level as well as low level programming. I guess it's really up to the programmer.
Image
Pirate
On Lightcycle Grid
Posts: 31
Joined: Mon Nov 15, 2004 2:03 am

Post by Pirate »

why, are you offended?
User avatar
Z-Man
God & Project Admin
Posts: 11587
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Low/High level is relative. Compared to most other languages I know, C is very low level ( reading close to the metal and lacking higher abstractions ). It's lower level than Python, C++, Java, C#. It's on the same level as Fortran. It's higher level than Assembler which barely qualifies as a language at all. That's 3-1 for low level for me, counting the languages I would trust myself to write more than a few lines in. Edit: Whoops. It was not my intention to put a bias on the poll by disclosing my vote.

Logically, calling this a poll for non-retarded programmers is not an offense. Especially since it implies that non-retarded programmers actually are allowed to have differing opinions on this in Pirate's view, otherwise it would not be a poll. But it is kind of redundant and, sorry, emotional. <imagine mister Spock raised eyebrow here >
Last edited by Z-Man on Wed Mar 16, 2005 11:39 pm, edited 1 time in total.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Better check out your reading comprehension, Pirate. This took me all of 5 seconds to google up.

http://www.engin.umd.umich.edu/CIS/cour ... 0/c/c.html

Since I already know ahead of time you're too lazy to read the link, here's a quote for you:
The Article wrote: It allows low level access to information and commands while still retaining the portability and syntax of a high level language.

...

C's power and fast program execution come from it's ability to access low level commands, similar to assembly language, but with high level syntax.
Now, since you're reading comprehension is so impaired, I'll spell it out for you:

I never said C was a low-level language. I said it was *LIKE* a low-level language. Those two quotes I provided show how it is "like" a low-level language.

Even then, you got a CS degree without ever learning about similes and metaphors?

/me wants Pirate to scan his CS certificate and post it to prove he actually has this degree.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

A more interesting question would be: do you think computers are better than humans at writing/translating to a low level language?

I'd vote Yes on that and let everyone who would vote no type (and correct) assembler till their fingers bleed. I don't mind them being happy to do it just like I'm impressed by people building large structures out of matchsticks but in no way will I force anyone (least of all me) to do either of those things.

My father wrote assembler for IBM (at their valley outside Nice, France) in the sixties using 4 byte commands, but that was forty years ago - things have changed in most programming environments.

Ish and Lucifer are right: C is mostly used and intended as a highlevel language, afaik the lowlevel opportunities in C are for flexibility/choice and to some degree because of the age of the language. What's interesting is that the move in computing languages is definetly towards higher and higher language types (Python and Ruby anyone?) and that the biggest gripe about C is their detailed (and cumbersome) memory management which has been replaced in later major languages.

I'm not spitting at assemblerites, I know why they like it, it's the same reason I write html as text instead of using a wysiwig editor, control and accuracy at the sacrifice of spending a lot more time, but that just doesn't mean that it's always the perfect choice in any situation for anyone.

Retarded programmers are those who think their language of choice is the one-for-all-be-all God's gift to all computers. In other words: all programmers :mrgreen:

Edit: inserted missing word
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

n54 wrote: Retarded programmers those who think their language of choice is the one-for-all-be-all God's gift to all computers. In other words: all programmers :mrgreen:
You trying to say Python sucks? Them's fightin' words n54....

*rereads n54's post*

OH yeah, nevermind. Carry on!
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
n54
MVP
Posts: 1587
Joined: Sun Dec 21, 2003 12:40 pm

Post by n54 »

Lucifer wrote:
n54 wrote: Retarded programmers those who think their language of choice is the one-for-all-be-all God's gift to all computers. In other words: all programmers :mrgreen:
You trying to say Python sucks? Them's fightin' words n54....

*rereads n54's post*

OH yeah, nevermind. Carry on!
Lol just proves you're a programmer hehe :twisted:

Btw Ruby is better *nyah nyah nyah!* :mrgreen:
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Oh yeah, and Pirate, even though I already know you're too lazy to read this stuff, but I found 3 different webpages discussing how C compilers generate assembly code and then assemble that into object code before the link step.

An answer to an FAQ about their compiler product:
http://www.grantronics.com.au/micro-c.html#Q3

Looks like coursework for a college course:
http://www.cs.cf.ac.uk/Dave/C/node3.html

A homework assignment that just happens to include the switch you give to GCC that'll stop it after generating the assembly code so you can read the assembly code:
http://www.cs.purdue.edu/homes/hosking/352/052/hw2.html

Anybody besides me remember the days when you bought a C compiler and then had to find an assembler to match?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Pirate
On Lightcycle Grid
Posts: 31
Joined: Mon Nov 15, 2004 2:03 am

Post by Pirate »

and i just found 14 million sites that disagree.
http://www.google.com/search?hl=en&q=c+ ... gle+Search
The thing about C and C++ both is that they're very low level. Not as low as assembly, but there's *so* much code written that is as low-level as assembly that there's no need anymore to do this sort of optimization.
i dont think i misunderstood anything, and oh by the way binary boy, let me know what c call i use to mov a 32bit datastrcture to the eax register?
If you want me to go look up more stupid shit you said previously it would be my pleasure.
A homework assignment that just happens to include the switch you give to GCC that'll stop it after generating the assembly code so you can read the assembly code:
http://www.cs.purdue.edu/homes/hosking/352/052/hw2.html
sorry to break it to you, theres not one ounce of asm in that whole article.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Pirate wrote: sorry to break it to you, theres not one ounce of asm in that whole article.
This article?
The article wrote: Homework 2
Due in class Thursday March 24th

In the following questions you must compile C program fragments using the gcc compiler on davros.cs.purdue.edu, invoked with the following flags

* -O
Optimize. Optimizing compilation takes somewhat more time, and a lot more memory for a large function.

With -O, the compiler tries to reduce code size and execution time, without performing any optimizations that take a great deal of compilation time.
* -S
Stop after the stage of compilation proper; do not assemble. The output is in the form of an assembler code file for each non-assembler input file specified.

By default, the assembler file name for a source file is made by replacing the suffix `.c', `.i', etc, with `.s'.


Input files that don't require compilation are ignored.
* -static
Produce code without linkage fragments needed for dynamic linking.

1. Compile the following code fragment:

int f(int a) { int b=a+1; g(); h(b); return b+2; }

Now compile the same code without the -O option. What is the difference in the generated assembler? Specifically, how does -O speed up the program in the way variable b is stored and used.
2. Compile the following code fragment (with optimization turned on):

void h(int y) { int x = y + 1; f(x); f(2); }

What is the difference in how variable x is stored here, as compared to variable b in the previous question?
3. Compile the following code fragment (with optimization turned on):

void m(int x, int y) { h(y,y); h(x,x); }

On the PowerPC the first two arguments are passed in registers 3 and 4, respectively. Describe how gcc moves x out of register 3 so as to call h(y,y)?
4. Compile the following code fragment (with optimization turned on):

int f(int a, int b) {
int c[3], d, e;
d = a + 1;
e = g(c, &b);
return e+c[1]+b; }

Explain how each variable in this program (ie, a, b, c, d, e) is stored.
5. Compile the following code fragments (with optimization turned on):

int leaf (int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) {
return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8; }

int nonleaf (int a0, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8) {
foo(); return a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8; }

In the output assembly code, identify all the components of the calling sequence (the prologue and the epilogue), and explain what each line of assembly language does.
6. Compile the following code fragment (with optimization turned on):

int foo () {
int x;
int bar() { return x; }
return bar(); }

Annotate the assembly code for the call to bar and its body to explain how function bar accesses and returns the value of variable x.
You're an idiot Pirate. As far as this goes:
The Sourceforge Article wrote: "Pirate" was messeging repeatedly that he's a Nazi and
a jew hater. I told him that if he's going to type in
horrible nonsense like this for no reason but to hate,
people won't want him there. He continued, but he was
ignored and booted a few times.

Eventually it seems that he got another one of his
friends in the room ("Newb Slayer") supporting his
hateful messages and was even more hash, giving me
explicit sexual messages of things he'd do to me. I'm
a girl, so this is no fun. I also barely have time to
play this game too. Later on, I was getting booted out
of the game by them, though they were too, and kept
coming back.

I don't want to play this game if hating people are
going to team up on me and harass me. It seems like
theres nothing I can do, because even if they get
booted out, they come back.
Until now, I was your only friend. Too bad for you, later.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Pirate
On Lightcycle Grid
Posts: 31
Joined: Mon Nov 15, 2004 2:03 am

Post by Pirate »

lol lucifer, you humor me with your idiocy. Please please no no be my friend! :lol: And are you blind show me one statement in that whole article thats in asm.

just so you know, there is no return instruction, nor = sign nor +, -, calling method, nor any of the code your showing me in asm. sorry. here take a look at any one of these assembly files http://www.vsbrown.com/asm.asp if your interested in seeing what real asm should look like. Your problem is that you can tell the difference between code poeple think is asm, and code that really is asm. Why are we even talking about asm anyway? This is about how C is a high level language. Meh w/e, i like proving you wrong anyway.

and regarding about what's his face said, i only read like the first sentence, and then figured it was too stupid to go on. yeah sorry, never happened, cry to someone else with your bullshit. You're problem is you think everybody else is like you. All those long emotional posts you have would be great if they had any accuracy whatsoever. It's like everytime you talk you just throw out more nonsence hoping people will believe what you have to say. The only flaw with that is, when there's people who actually know what is being talked about. And careful who you call an idiot, im not the one who claimed he wrote programs in straight binary.
Last edited by Pirate on Thu Mar 17, 2005 3:43 am, edited 1 time in total.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

The Idiot wrote:And are you blind show me one statement in that whole article thats in asm.
The purpose of the assignment was to generate asm from C code, using GCC, the very compiler that built your OS. So of course there wasn't any actual asm in the article, instead you were provided directions on how to generate it by just stopping the compiler at that point. Earlier on Swampland, you told me it was impossible for a C compiler to translate C to asm and then assemble that, link, and so forth. So that's where that came from.
The idiot wrote:i like proving you wrong anyway.
You have an interesting definition of "proof", considering that all you've offered so far are search results you couldn't even be bothered to check what they said. You haven't offered any explanation for any of your denials of anything I've said.

Seriously, either you can't read or you've got ADHD or something. I'll believe the ADHD, your ego has obviously invoked the "White Supremacist" mentality as a defense mechanism against me. What are you afraid of? Don't bother answering, I already know your answer is "I'm not afraid of you Lucifer, you are the suxxorrr and I am the Gentoo Master!". Doesn't change the fact that you're responding defensively, and of course you can't be bothered to ever say anything besides "I know better than you." Why bother talking if that's all you got to say?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Pirate
On Lightcycle Grid
Posts: 31
Joined: Mon Nov 15, 2004 2:03 am

Post by Pirate »

i cant resist.. *takes out his whiip* lol.
Locked