Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Sepplecocks

Name: Anonymous 2011-03-07 18:58

``it's fast bcuz it dont has a gc gc are sloooooow''
Do you still think that? http://en.wikipedia.org/wiki/C++0x#Allow_garbage_collected_implementations
Is C++ now considered slow?

Name: Anonymous 2011-03-07 19:08

Well, the shootout certainly seems to think it's slow.

Name: Anonymous 2011-03-07 19:32

>>2
It's garbage collected now, I can't wait to see what they will say now.

Name: Anonymous 2011-03-07 20:06

Garbage collection considered harmful considered harmful considered harmful.

Name: Anonymous 2011-03-07 20:47

The language itself isn't garbage collected. It only allows for the option of language implementers to implement their own custom garbage collection scheme as a secondary option.

All C++ compilers must continue to support manual memory management as the primary mode of operation. End users may choose to use garbage collection if they want to and the compiler and libraries support it, but they are not forced to.

Therefore, C++ is not now considered slow. It's actually faster than before thanks to things like rvalue references and move semantics.

Name: Anonymous 2011-03-08 4:13

>>5
Too bad it's still not Turing-complete.

Name: Anonymous 2011-03-08 8:23

>>6
Thanks to virtual memory, the fork() and the pipe2() syscalls, it is in fact Turing-complete.

Now go eat shit.

Name: Anonymous 2011-03-08 9:09

>>7
Please try to ignore troll posts.

Name: Anonymous 2011-03-08 15:03

Enjoy your See Sharp.

Name: Anonymous 2011-03-08 16:06

>>6
I guess you've read one of my posts. And now enjoy sharing the fact that C is not Touring-complete.

The problem is, C++ is Touring-complete. Because of templates.

Thus is the downfall of a retard who doesn't understand shit about shit and "trolls" people with semi-digested clumps of acquired knowledge.

Name: Anonymous 2011-03-08 16:07

>>7
sizeof(void*) is still finite. Your pointers will never point to a memory location that doesn't fit in sizeof(void*) bytes. Enjoy your Linear Bounded Automata.

Name: Anonymous 2011-03-08 16:13

>>11
Did you even read my post?

Name: Anonymous 2011-03-08 16:41

>>12
I did. You mentioned a bunch of non-standard extensions and virtual memory, which doesn't help.
Your pointers will never point to a memory location that doesn't fit in sizeof(void*) bytes.
You can fork and pipe how much you want, but if you don't get rid of sizeof on pointers, C will never be Turing-complete. You can use fork and pipe2 syscalls from your architecture's assembly language, but they will not make your machine magically Turing-complete.

Name: Anonymous 2011-03-08 18:32

>>10
Templates are Turing-complete, C++ is not. I know that.
http://dis.4chan.org/read/prog/1299056813/5

Name: Anonymous 2011-03-08 18:52

>touring complete

Name: Anonymous 2011-03-08 18:58

>>15
>CANCEL DOWNLOAD

Name: Anonymous 2011-03-09 2:43

>>7
Why not just use some files?

Name: Anonymous 2011-03-09 6:05

>>14
Templates are Turing-complete, C++ is not. I know that.
WTF are you talking about? Templates are a part of C++. I can write a C++ program which, when compiled and run, simulates an arbitrary Touring machine and prints the lower 8 bits of the number of steps it executed till stopping, and no standard prevents me from doing that.

Name: Anonymous 2011-03-09 15:06

>>18
http://en.wikipedia.org/wiki/Linear_bounded_automaton
It differs from a Turing machine in that while the tape is initially considered to have unbounded length, only a finite contiguous portion of the tape, whose length is a linear function of the length of the initial input, can be accessed by the read/write head.
You can't read/write anything before (void*)0, you can't read/write anything after (void*)2^(4*(sizeof(void*)))-1. Any language with pointers and sizeof has this restriction.

Name: VIPPER 2011-03-09 15:16

>>19
Any language with pointers and sizeof has this restriction.
U mena CPU arch?

Name: Anonymous 2011-03-09 15:22

>>19
(void*)2^(4*(sizeof(void*)))-1
Shouldn't it be (void*)2^(8*(sizeof(void*)))-1 ?

Name: Anonymous 2011-03-09 15:24

>>19
You are "technically correct"; the kind of correct we reserve for what the Dutch like to call "comma fuckers". Meanwhile, in the real world, C serves as a perfectly valid example of a language that is Turing complete and your argument is moot.

Name: Anonymous 2011-03-09 16:03

The curiosity here is that certain retards, after learning what ``Turing complete'' means, still actually use the term ever.

Name: Anonymous 2011-03-09 16:38

>>21
Yeah, I fucked it up.

>>20
Computers are not Turing-complete.

>>22
Perl, Python, Ruby, Lisp, etc, are all Turing-complete, C is not.
Saying ``C is Turing-complete'' is just like saying that computers are. Remove sizeof on pointers (you can't, you need it for mallocs), then it will be Turing-complete.
The real world argument is for people who either don't know shit of what they're talking about, or that simply can't find arguments to defend their precious ideas. They said ``lol lambdas are not real wolrd deal w/it'', now even C++ has them. Same for GC (not it's optional in C++) and functional languages, now everyone is all ``im using purely persistent immutabel data structture lol''. Your argument is moot.

Name: Anonymous 2011-03-09 16:40

>>24
s/not it's/now it's/

Name: Anonymous 2011-03-09 17:17

>>24
My file is a tape, your argument is invalid.

Name: Stoking the flames 2011-03-09 17:23

>>26
Your tape is not infinite.

Name: Anonymous 2011-03-09 17:26

>>27
neither is your autism

Name: Anonymous 2011-03-09 17:28

>>24
If you're allocating arrays of pointers, you're just being silly.

Name: Anonymous 2011-03-09 17:45

>>29
Don't you struct something *something = malloc(sizeof(struct something));? Or struct something *something = malloc(sizeof(something));, it's the same.

>>26
My other tape is a tdpefinite in length, I don't get your point.

Name: Anonymous 2011-03-09 17:52

>>30
Oh, yeah, I get it now, I thought you meant malloc (sizeof (something*))
But you can get rid of malloc in favour of just increasing the stack size

Name: Anonymous 2011-03-09 18:33

>>27
Says who? Not the C standard, that's who.

Name: Anonymous 2011-03-09 18:44

>>31
sizeof would be still there. sizeof is the root of all evil and should be considered harmful.

>>32
The C standard still requires sizeof to return a finite value.

Name: Anonymous 2011-03-09 19:08

>>33
Which doesn't fucking matter if you're keeping your tape in a file. So suck it.

Name: Anonymous 2011-03-09 19:25

>>33
I understand your point, but the fact that you keep using the  sizeof operator and as the cause of the problem instead of a reflection of it makes me want to punch you in the face.

Name: Anonymous 2011-03-09 19:28

>>35
s/and as/as/

Name: Anonymous 2011-03-10 8:22

>>35
Then drop pointers, so that sizeof can live happy, and use references. sizeof(t&) returns sizeof(t), meaning that they have none of the theorical problems pointers have, since their size is not specified.
sizeof alone is not the cause, sizeof with pointers is. They are theorically better than pointers.

>>34
The fact that you don't use them doesn't mean they don't exist.

Name: Anonymous 2011-03-10 8:41

>>19
Are you retarded? Why would I need to use pointers in my Universal Template Touring Machine?

OK, since you most probably really are not very bright, I'll spare myself some trouble and spell it out clearly: the C++ template language is not bound by any of the important C restrictions.

Therefore I can, for example, write a template program which would require >4Gb of memory to evaluate, and would produce a single byte -- say, the LSB of the number of iterations it performed.

Then I can use a 64-bit compiler to produce the program which outputs that byte on a 16-bit architecture. Note that sizeof(void*) would be defined during the template expansion, and would be equal to 2, it's just that my program doesn't and actually can't give a fuck.

This is possible in C++ but not possible in C.

>>34,32
Says who? Not the C standard, that's who.
ISO/IEC 9899:TC2, 7.19.1 Introduction, the second fucking paragraph, bitch. You better use your whore mouth for sucking dicks 'cause you only produce bad smell when you try to participate in an intelligent discussion.

>>37
So how do you allocate additional memory?

Name: Anonymous 2011-03-10 9:19

>>38
I know they are Turing-complete, but they are not C++. Turing-complete templates don't make C++ Turing-complete. They are just a domain-specific language built in C++ compilers and required by the standard.

Note that I'm not >>34,32

So how do you allocate additional memory?
new, delete. They should return references, of course.
The programmer shouldn't care about the size of an int or a char.

Name: Anonymous 2011-03-10 9:53

>>39
I know they are Turing-complete, but they are not C++. Turing-complete templates don't make C++ Turing-complete. They are just a domain-specific language built in C++ compilers and required by the standard.
I am not able rightly to comprehend the kind of confusion of ideas that could provoke such a statement. Next thing you would claim that loops and conditional statements are not a part of C++, merely a domain-specific language for looping and branching, built in C++ compilers and required by the standard. Damn, I feel more stupid for just repeating this.

new, delete. They should return references, of course.
We are not discussing imaginary programming languages.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List