« first day (483 days earlier)      last day (4482 days later) » 

11:00 PM
NEVAR
@DeadMG "C is a pile of junk" How... Could... You... Say such a thing... >.< C++ was FOUNDED by C, saying C is a pile of junk is like saying your grandfather doesn't know anything about your family history, it simply must not be done :(
Also linux was coded in C
 
@Hoxieboy The fact that it wasn't junk in 1972 is irrelevant.
@Hoxieboy That's also irrelevant.
 
C++ has almost the same function as C
 
hahahahaha, yeah, right
 
C++ was just updated to keep in step with newer systems, it doesn't mean its better than C
 
RAII and manual memory management, macros and templates, they have so much in common
 
Ell
11:03 PM
Oh gee I can sense this getting nasty
 
or that C is a pile of junk
 
@Hoxieboy C++'s feature set pretty much does mean that it's better than C.
how else would you compare languages except by the features they have?
 
C++ is simply C with a few +'s added
2
nothing special -.-
 
you mean
 
i do mean
 
Ell
11:04 PM
@Hoxieboy lololololol
anyway
im off before it gets too bad
 
+s that are so much better, they almost completely replace the entire core feature set and redefine virtually all good practice
 
if you call cout better practice than print, sure?
 
user457812
+s give it phallic superiority.
 
you mean, "PLEASE BUFFER OVERRUN MY CODE" printf?
 
user457812
My C++ is longer than your C dawg
 
11:06 PM
or "I CAN'T BE EXTENDED AT ALL" printf?
 
remember what i said to john? or whatever his name is, it all depends on the programmer
 
streams have plenty of problems, but printf is utterly broken from start to finish
 
industrial robots that are coded in C can be better than the same robots coded in C++, it simply MATTERS on the coder
 
@Hoxieboy Good languages provide constructs which support the programmer. Else, we'd just use assembly.
C++ offers that, and C doesn't.
C++ can guarantee resource cleanup. C++ can write generic code. C++ can even be faster.
 
Could I say then that python is better than C++, and that C++ is a pile of junk?
no, you like the programming language of C++, therefor you argue because you use it
 
11:08 PM
except they're not even remotely the same
for example, Python is dog slow compared to C++
requires an external interpreter to execute
 
Python is based off of C, and C++ is based from C
i dont think they are as far as you think
 
hardly the same problem domain at all
@Hoxieboy That's really quite irrelevant.
C-derived languages are so varied and ubiquitous, it's meaningless to claim any kind of kindred with C itself
 
and an external interpreter does not make a program slow
the program makes the program slow
 
@Hoxieboy Well, it pretty much does. They can never achieve the same level of speed. More importantly, there are other things like dynamic types and everything-is-a-reference and that sort of thing which pretty much defines that it must be slow.
and surprise- Python implementations don't execute quickly
C++ and Python serve different problem domains
 
no they do not
 
11:10 PM
unlike C and C++, which are similar systems languages
 
@Hoxieboy u sound a teeny tiny bit argumentative
 
python is the swiss army knife of internet+systems programming, you would be surprised how many companies use it...
and yeah, I am kind of argumentative right now, but I'm not a "u" I'm an I, anyways, the discussion is about C, you can not say C is a pile of junk, plain and simple I end it there.
 
I can, and I did, because it is.
 
Sadly, no
 
oh yes
 
11:12 PM
yes, no?
 
well, I can in fact say whatever I want
 
yes
but I dont want you too :)
 
lol
 
hey all
 
I think we left @LearningC behind ._.
hello
 
11:14 PM
47
Q: Why does the use of `new` cause memory leaks in C++?

user1131997I learned C# first, and now I'm starting with C++. As I understand, operator new in C++ is not similar to the one in C#. Can you explain the reason of the memory leak in this sample code? class A { ... }; struct B { ... }; A *object1 = new A(); B object2 = *(new B());

 
well, it's really none of my business if you can't see the truth
 
Have started bounty here:
0
Q: C++ Access violation reading why?

user1131997I'm developing the application, which will get mails from servers via pop/imap protocols using C++/Winsock. Cause, the code is large to paste here , I give you the link on pastebin: http://pastebin.com/uCKcTQsj It doesn't have any compiler errors, so it can be copmpiled well. I'm getting diffe...

 
You cant argue for me though... So...
 
true
but I can say whatever I like and I can choose to discuss the point if Icare
 
For the above, I could implement that in python with about 20 lines of code
1 if I really wanted to use bad grammar :s
 
11:16 PM
what above? there's two questions
 
Here is my quiz:
 
second one
 
"Declare and define a class X and its static data member called 'Y' of type 'int'. The type 'int' shall be named only once."
can you do TAHT!
 
@Hoxieboy poor thing
 
@DeadMG I started bounty for the 2nd one
for the 1st one I already have started
so!
 
11:17 PM
I'm not poor, just misunderstood :P
 
@Hoxieboy Well, from memory, Python just comes with pre-existing libraries for such functions.
 
Can I can start the 2nd bounty for the one topic?
 
which, asfar as I know, would make it 20 lines of code using such a library
 
are there any facebook login parsers for c++?
 
@JohannesSchaublitb struct X { typedef int UNT; static UNT member; }; X::UNT X::member = 42;
 
11:18 PM
not 20 lines of code utilizing the operating system library
 
@DeadMG you could make your own, but as goes the famous programmer slogan: "Why re-invent the wheel when someone has done it for you already"
 
well, my point is that you're making an unfair comparison
 
Nope, you're the one using C++, I'm not
 
you're comparing "Code in C++ writing the OS level" and "Code utilizing a pre-existing library"#
 
@Hoxieboy What? Get out!
 
11:19 PM
@sehe :d
:D
 
@Hoxieboy up arrow to edit? newbiehints <-- 's got only 20 stars
 
Here is the catcher too: I'm not saying C++ is bad, but please, if you are going to be saying C++ redefines the core of C, then how is C a pile of junk?
 
uh, because C++ has a completely new core that makes C's utterly obsolete?
 
redefines? You perhaps meant re-uses or leverages
 
You can't say C and C++ are the same languages then
 
11:21 PM
I didn't
 
@Hoxieboy who did
 
I only said they were the same problem domain
statically typed, high performance, systems languages
 
@Hoxieboy Not that this lounge is not called Lounge<C, C++> for a reason
 
@sehe Where you there when we argued about what makes a language faster
 
@Hoxieboy Nope but the chat has a history, and I'm addicted to reading it
 
11:23 PM
good, I believe I've learned that being statically typed and interpreted makes no difference at all correct?
 
no
 
yes
 
@Hoxieboy You must be correct when you say "I believe". You probably do, and we have no way to verify it
 
please dont start this again
 
both are fairly critical
 
11:24 PM
you forget the same thing i've told you again and again though
it all depends on what the program has inside it, and how it's typed
 
no, I just don't believe you at all
 
you dont have to
 
@Hoxieboy That said, of course it makes all the difference. If you mean that you can program realtime critical stuff in Java, you are right. But that doesn't mean that (not) having intermediate code, JIT, modules, language metadata etc. "makes no difference at all"
 
there's nothing any programmer can do if it takes ten CPU cycles instead of one to add a pair of integers
or if every piece of dynamic memory has to be reference counted, instead of uniquely owned or swapped about
 
do you know that? have you SPECIFICALLY tested that? or are you pulling it out of your ears
 
11:26 PM
last time I checked, Python was actually a great deal more than ten times slower
but it's the general principle that counts
 
@Hoxieboy: If you write text-console-mode tic-tac-toe in it, there is no difference between using Python, Haskell, C, C++ as far as suitability is concerned
 
and when was the last time you checked and where
 
what does it matter?
it doesn't matter if Python addition is two, five, or ten times slower, or twenty or fifty
there's still jack all any programmer using Python can do about it
there's absolutely nothing you can do to overpower the fundamentals of your language
 
you CAN use C libraries in python, you do realize correct
 
so what? that's not Python code, that's C code
 
11:28 PM
so what? how was C++ made then
"system" libraries, the same libraries that C mas made from
 
libraries aren't the problem here, it's the language
 
@DeadMG to be fair, it does depend. Numpy can be pretty damn fast, up there with a Blitz++ implementation. So in fact, if you run wisely, you can use Python to get similar performance. However the core language is always going to be an order of magnitude slower
 
any even hopefully useful language can interact with the C ABI
 
How did we get here again anyways, I thought I said C wasn't a pile of garbage
 
I said it was a pile of junk, and you're disagreeing with me
 
11:29 PM
"any even hopefully useful language can interact with the C ABI" still proves the point that C isnt garbage
 
@Hoxieboy ... especially when things get critical (processor affinity, cache locality: gc and object references really hurt in those areas)
 
no, all it proves is that nobody yet has succeeded on overpowering it's binary standard
 
-.-
 
which is a long way from proving that C as a language isn't utterly useless
 
@Hoxieboy Huh. Non sequitur. Garbage can be enormously useful
 
11:31 PM
@sehe Java reference :3
much like python apparently
the things I like about yes, comparing C++ to python, is that you can essentially do the same things with little code and less time struggling with the basics
 
@DeadMG You are confusing 'practical' usefullness with 'principled' usefullness, IMO. In principle, C hasn't got much merit, anymore. In practice, it does.
 
Gosh. I use C, C++ and Python (and others). Does that make me a bad person?
 
@RichardPennington Yes, no it doesn't, a bit, well maybe not (thats how conversations go here)
 
@Hoxieboy Granted. It's not a shocking statement, but it is mostly true. Of course, with experience, you don't need to 'struggle' with the 'basics'
 
@sehe Well, it's true that there are a few very tiny minorities where the implementation cost of something better isn't very viable
 
I doubt you will be writing professional-grade 3d physics sandbox 24-7 with ANY language so please, if it really doesn't matter how "fast" a programming language is or how it is implemented, then why bother?
 
but then, it's hardly a recommendation of the language to say "We used it because we had no choice."
 
@DeadMG In my mind, that is about all my use cases for C. I will use something else if it is viable. But often it is not. Using C++ over shared library boundaries is hard and fraught with complications. I don't know any good (preferrably portable) substitute except to drop to C ABI
@DeadMG Hear, hear
 
@DeadMG And that's what I love about programming languages, there are JUST SO MANY :D
 
11:36 PM
@Hoxieboy There are many problem domains which benefit from high performance.
 
@DeadMG Like
 
but more relevantly, performance is hardly the only thing on the table here
 
 
for example, static types are safer than dynamic types, and not having to have an interpreter is a plus
 
@sehe no you are naming the type "int" 3 times
you just use the type specifier "int" once
 
11:37 PM
@DeadMG Portability? You wont find much portability in C++
 
@JohannesSchaublitb standardese again. Aw too bad you're probably right
 
@sehe lawl
 
there's a big difference between "X is portable" and "X is portable because we just ship several different Y, which are not at all portable".
There is nothing portable about Python, you must have a platform-specific interpreter to execute it.
 
@DeadMG I like to make only one script, not seven
 
@JohannesSchaublitb struct X { static int member; }; static decltype(X::member) X::member = 42;
 
11:38 PM
the only difference between Python and C++ is that in C++, you pre-compile for different platforms, and in Python, you download a different interpreter for different platforms
@sehe Or use a template.
 
anyone?
 
@DeadMG You could say the same with java, which is the most "Platform independent" language of its time
 
Java is a pathetic joke
it's even worse than C, which is really quite saying something
 
@DeadMG Java can do things C++ users cant hardly dream about, and vice versa
 
@DeadMG again bypassing much of the actual practical value.
 
11:40 PM
Java can't do anything that isn't a garbage-collected inheritance orgasm
which is rather pathetic of it
 
@user1079641 I'm not sure what your saying
You dont need to garbage collect 24-7, contrary to popular belief
 
I never said you did
I merely said that you had absolutely no choice in the matter
 
@Hoxieboy I think @DeadMG is sometimes forgetting that languages exist for other things than evaluating their design. Perhaps because he's in the process of designing a language.
 
the same with inheritance
 
"Java can't do anything that isn't a garbage-collected" I'm pretty sure thats what I heard
 
11:42 PM
they have no lambdas, pathetic generics
 
"heard"
they dont need them?
 
@Hoxieboy Garbage-collected != garbage collection
@Hoxieboy Don't need lambdas or generics? What the hell are you smoking?
Only two of the most useful language features to ever exist.
 
@user1079641 not in this room, it is not possible
@user1079641 Just farking try it?
 
no need to swear
 
or you could simply ask at SO
 
11:43 PM
6 messages moved to bin
 
you said pathetic generics, you don't like them? Sorry, you're breathing in my smoke, nevermind
 
How is java pathetic?
 
Java's generics are pathetic
but generics in general are one of the most useful features ever
no probs
 
it isnt. C++ cronies like to down other languages that have better implementations of what C++ can still do, but worse
 
what, generics aren't useful or Java's implementation of them doesn't suck tremendously?
 
11:45 PM
not ALL C++ cronies @sehe
 
@Hoxieboy could you parse that please
 
@DeadMG +1
 
@AlfPSteinbach lots of things need to be "parsed"
 
@Hoxieboy what do the quotes mean
 
@Hoxieboy I just don't feel the need to explain what sucks about languages. C++ has a lot of suckiness. But fewerimitations than any of the comparison languages mentioned. Which is kind of what @DeadMG likes
 
11:47 PM
nothing, just a programming reference
 
quotes are usually needed during parsing
 
@sehe I know I know, I just don't need the bash on EVERY language making it seem like C* implementations are gods
 
@RayCheng That's a bit meta for a 'Hi' message
 
@Hoxieboy do you like shopping?
 
@AlfPSteinbach not really
why?
 
11:48 PM
@Hoxieboy Well... C++ designers are close to being deified
 
@Hoxieboy why not?
 
@AlfPSteinbach I dont understand the random question is all O.o
 
@Hoxieboy Just go with Socrates for a second
 
@Hoxieboy oh, so now when i say i don't understand something you said, you say you don't understand what i say?
 
@sehe -.-
@AlfPSteinbach A programming reference as in "parse these two str objects together", its nothing really of importance at all
 
11:50 PM
@sehe What is "meta"
 
@RayCheng the second "under" of whatever is primary
 
Meta- (from Greek: μετά = "after", "beyond", "adjacent", "self"), is a prefix used in English (and other Greek-owing languages) to indicate a concept which is an abstraction from another concept, used to complete or add to the latter. In epistemology, the prefix meta is used to mean about (its own category). For example, metadata are data about data (who has produced them, when, what format the data are in and so on). Also, metamemory in psychology means an individual's knowledge about whether or not they would remember something if they concentrated on recalling it. Furthermore, metae...
 
What he said ^
lol
Honestly I really want to get into C++, badly
 
How would you enforce a container's elements cleanup order?
 
@Hoxieboy That's easy. Just start
@wilhelmtell If that's not specified, you'd best ask it as a SO question
My guess is, it is specified but I'm looking it up
 
11:54 PM
how can i create the most secure php file? I tried doing a completely different extension but it didn't work when i tried to "include" that file, how else can i keep the file secure?
 
@sehe Brilliant! ;) I just don't know HOW to start in a way that will keep me occupied, and interested. I'm hoping in school that my computer science class will use C++, so I could get a better understanding of what its used best for, and why (though I think I have a good understanding of why, thanks @DeadMG)
 
actually, writing the question here makes me wonder. maybe i'm asking the wrong question.
it's not specified.
 
@user1079641 I really couldn't tell. Like I said you should take a gander at the question/answer forum of SO (StackOverflow) and post a question there. It will probably get solved faster than asking questions to a bunch of C++ programmers ;)
 
@wilhelmtell The usual answer if you want to control the destruction order of interdependent objects, is to have them reference each other with shared_ptrs (and make sure it is a DAG)
 
np
 
11:57 PM
@user1079641 changing extensions is not going to make things more or less secure
 
I appreciate your help @Hoxieboy but someone told me last time that people here will be able to answer my questions
 
Here's what I'm trying to do:
vector<elem> elems;
for( ... ) {
    raii_type r;
    elems.push_back(r);
}
if r fails to construct I want the elements to destruct in the reverse order they were created.
i mean, imitate the stack, really.
 
@user1079641 @sehe What sehe said is true as well, you would have to encrypt a file to make it anywhere near secure, but then you wouldn't be able to work on a webpage
 
The simplest thing would be to explicitely to std::remove_if(begin, end, [](X&){ return true; }) on it, I guess
 
std::stack doesn't seem to be any better here, even though it's semantically more correct here.
 
11:58 PM
std::stack<T>?
ah
 
@Hoxieboy Which makes it a lot more secure in the case of php
 
@sehe ._. as you can tell I know nothing of PHP
 
@wilhelmtell Oh, replace begin, end by rbegin, rend
 
what should i do then?
 

« first day (483 days earlier)      last day (4482 days later) »