« first day (236 days earlier)      last day (4720 days later) » 

3:00 PM
There's more to a language than just syntax.
 
3:17 PM
Ugh, just realized I have 2 upvotes in .
I feel dirty.
 
I have 31. :(
 
Correction, I have 8. I can't fathom what the hell I was thinking back then.
 
Also 45 upboats left to silver badge, and 80 to .
 
I'm 40 upboats from a bronze .
 
How do you write tags like that in the chat
 
3:21 PM
You guys are damn fast.
@FredOverflow [tag:foo]
 
[tag:foo]
And I think .
 
@StackedCrooked Herb says C++ and C# are basically the same language, if you compare them to Scheme or Prolog :)
 
Hmm, I see now. Most of them are just or questions that happen to have have .
I haven't sinned. I can still go to heaven.
 
@MartinhoFernandes Why would you want to go to heaven? You're already in the C++ lounge!
 
I have 26 on thanks to this question, lol.
 
3:26 PM
WTF? There's a philosophy tag?
Hmmm, what can I write on the tag wiki...
 
(BTW, upvote that accepted answer a bit, it's very good :P).
 
@CatPlusPlus I can't. At work, JavaScript doesn't work on SO proper.
@CatPlusPlus And I won't give you a populist badge for what is almost a comment :P
 
This one better? ;)
Argh, stupid, addictive badges. Evil, evil.
I need to do something useful today. Let's try making a better build system for the project.
 
I'm reaching the end of it though. There are only a couple of badges left that are attainable for me.
 
Well, I don't have or care about any from bounties or questions, because I don't do either.
 
3:35 PM
has the tag addiction come back to the chat?
 
I'm missing tag badges for c++, c#, linq, .net, exception, Copy Editor and then the repcap badges.
After that I'm free from this addiction.
 
I could probably go for the "Up voted 100 competing answers" one.
 
I like reddit.com
 
Edits are counted funny, so I probably won't get those either.
 
@TonyTheTiger So, while trying to give up procrastinating here in the chat, you've been doing it on reddit...
<insert one of Johannes top three messages here>
 
3:37 PM
Reddit is more dangerous, it leads to tab explosion, like certain site I won't link to this time. :P
 
@CatPlusPlus lol
 
Gosh, I don't have my TVTropes blocking script installed here at work!
 
@MartinhoFernandes I don't go there until after hours
 
I'm in terrible danger.
 
Hello :)
 
3:39 PM
Hi.
 
Can someone answer me a really simple question? If i have a prototype that looks like this: void someFunc(const char *); could i call it with someFunc("jim") ?
 
@CatPlusPlus Hm, I only opened 5 tabs before I got bored.
@Graeme Yes. The string literal will decay from a constant char array to a pointer-to-const char, as usual.
 
@Graeme Yes.
 
Doh -.-
That means its not building for a reason i don't know! :D
 
Though you really should use std::string if you're not doing C interop.
 
3:41 PM
@Graeme Show us the compiler error.
 
EasyLogging.cpp:7: undefined reference to `__android_log_write'
 
Well, it's a linker error.
Check whether you link with all required libraries.
 
I'm including the header file which has this prototype:
int __android_log_write(int prio, const char *tag, const char *text);
 
Including headers files and linking are completely different beasts.
 
oh...
 
3:43 PM
@Graeme How do you compile your project, do you use an IDE like Visual Studio?
 
Nope, its native code building for android phones. It uses ndk-build which i think uses a gcc make compiler?
(Hopefully that sounded like i know what i'm talking about because i'm on very thin ice as a Java programmer)
 
I'm now gonna link to that controversial answer from the other day, even though I was told it's not very good.
9
A: How does the compilation, linking process work?

Martinho FernandesThe compilation of a C++ program involves several steps: Preprocessing: the preprocessor takes a C++ source code file and deals with the #includes, #defines and other preprocessor directives. The output of this step is a "pure" C++ file without pre-processor directives; Compilation: the compile...

 
@Graeme Well, then you need to learn how to tell ndk-build where the libraries are.
 
@FredOverflow I don't get why people keep saying Java is somehow "more free" than C#
 
@jalf Because they're ignorant/fanboys/ms-haters/blind?
 
3:46 PM
@jalf Well, Java is certainly "more free" of language features than C# :)
 
but when I come across it, I usually take it to mean "you can stop reading now, you won't miss anything important"
 
All C header files used by ndk-build are in the same place (string.h and android/log.h are in the same directory for example)
So it isn't a problem that it can't find the file
 
Headers are irrelevant to the linking.
 
@Graeme The problem is not the headers.
 
(I say confidently)
 
3:47 PM
where is that C++ compilation process FAQ someone wrote the other day?
 
If the compiler wouldn't find a header, it'd bork out long before linking.
 
3 mins ago, by Martinho Fernandes
9
A: How does the compilation, linking process work?

Martinho FernandesThe compilation of a C++ program involves several steps: Preprocessing: the preprocessor takes a C++ source code file and deals with the #includes, #defines and other preprocessor directives. The output of this step is a "pure" C++ file without pre-processor directives; Compilation: the compile...

 
Several lines up. :P
 
The binaries described by the headers are included in the namespace automatically and can't be changed.
 
@Graeme the compiler deals with headers, and outputs translation units, which are linked together (with each others, and with any external libraries you use
 
3:48 PM
> So, what's fundamentally wrong with JS? Not a lot.
This guy must be kidding!
 
so when you get linker errors, it is because the library, not the header is missing
 
@jalf You are missing a closing parenthesis.
 
Ahh, the horror.
 
@FredOverflow pf, I don't need them!
 
@jalf Graeme probably has a different notion of library than us C++ programmers ;)
 
3:49 PM
@FredOverflow Too soon, man! You should wait two minutes before pointing out errors in other's messages!
 
@jalf I'm gonna send you back to the LISP camp!
 
MUST BALANCE PARENTHESES.
 
Ok.... But... the library is a standard android c library that is always included. You couldn't not include it if you tried (Thats obviously a lie, but you'd have a job not breaking everything at the same time)
 
@FredOverflow hence why I'm pointing out that they're different things ;)
 
Library is not a header. Header is not a library.
 
3:50 PM
@Fre
 
@Graeme You have to tell the linker "look in this directory for .lib and .dll files". That's what we're talking about.
 
@FredOverflow Believe me I do. Today has been one long mind bending learning curve
 
or .a files. Android probably doesn't use .dll's ;)
given that it's based on linux
 
Library is either a shared executable image (DLL, so or whatever your platform uses, if it even supports shared libraries), or a collection of precompiled object files.
 
Oops :)
 
3:51 PM
@sbi Never put off 'til tomorrow what you might be able to get out of doing at all.
 
Ok, I believe you that its a linking error. But there is no way android/log.h and its library has not been included in the space ndk-build is looking for.
Could it be because i haven't done an extern "C" ?
 
It's not a problem whether it's in the search path.
 
@Graeme yes
 
Since i'm in a .cpp file ?
 
It might not be included in the compilation command.
If it were, and linker couldn't find, you'd get "cannot open -lsomething" or whatever.
 
3:53 PM
@Graeme yep, if you don't specify extern "C", the linker looks for C++ symbols with the specified names, which are typically mangled
C symbols typically aren't, so the name the linker tries to find differs based on whether it is expected to be a C or C++ symbol
 
Or that. But it's kinda stupid that those headers don't do that themselves.
 
@CatPlusPlus aye
 
If I'm writing a C API, why should I care about stupid glorious C++ programmers?
 
Because.
 
No, you're right, the header does do that...
So i'm back to not knowing whats going on.
 
3:56 PM
Check the linker invocation.
Those magic words that say "let there be executable, or shit".
 
Try setting your environment variable LD_LIBRARY_PATH to the lib directory and try again. (Close all your consoles first.)
 
LD_LIBRARY_PATH affects only runtime AFAIK.
 
Ok, but, if string works and is in the same library as android/log why would that be a problem?
 
Has always worked for me at link time, IIRC.
@Graeme string is probably header-only code. Are you talking about std::string?
 
And even if, it's a cross-compiler to Android, it probably doesn't use any dynamic libraries.
 
3:58 PM
Running the __android_log_write from a "C" file in a different project (with the same libraries) works fine.
 
Oh, so the D stands for "dynamic"? Then maybe there's a different environment variable for that, dunno.
 
@fredoverflow yup
 
@Graeme And those projects are setup identically?
 
Yup
 
Is there an #ifdef around the extern "C" part?
 
3:59 PM
@Graeme Can you post the complete error message again?
 
Arg!!! Got it
 
Well, there must be, if it's meant to be usable from both C and C++.
 
@Graeme So, what was it?
 
@Graeme Do tell, please.
 
No they weren't setup the same, you were right. They were set up the same appart from what difference. The project which didn't work didn't have this line in the .mk file:
LOCAL_LDLIBS := -llog
 
4:01 PM
So, it was the linker invocation after all.
 
"They were set up the same appart from what difference" == "They were set up the same apart from one difference"
Yes it was
 
@MartinhoFernandes Of course it was, it always is!
 
Should have listened to the masters
Well, home time. Least it means I can start with coding in the morning rather than starting on a problem (I hate that).
Thank you very much for your help
 
Gimme linker errors every day over 5kb-long horrific template errors.
 
4:03 PM
Meh, template errors point to the source, even if it's buried underneath 1000 lines of nothing interesting. Linker errors are usually more cryptic.
Funniest errors with g++ are internal compiler errors related to precompiled headers.
Those are just totally random.
 
The funniest compiler errors are of the form could not convert X to X, where the first and second X are different types with the exact same name. Curse you, shadowing!
 
(I get that from time to time with Java generics.)
-22 arguments? What did you do? :)
 
Granted, it was C.
@FredOverflow Can't quite remember.
I mean, I have no idea. It was a long time ago. I found the screenshot in my hard drive amongs the dust and the cobwebs.
But someone commented on my answer that he came across the same error.
I'm leaning towards integer overflow in the compiler, but I'm not sure how you can accomplish that without totally insane code.
 
@FredOverflow I always liked Visual Studio's "error C4430: missing type specifier - int assumed. Note: C++ does not support default-int" because it's such a mess. It's a warning, issued as an error, and the text makes it sound like the compiler is able to recover
and then hey, there's a "Note" in the mix too
 
4:12 PM
Anyone else annoyed by people that use "classic OOP" when they mean "Java-like OOP"?
2
 
Good evening.
 
@MartinhoFernandes Was is classic OOP, exactly? Smalltalk OO?
Or maybe "classic OO" simply means "OO supported by the class keyword". You know, classic.
 
@FredOverflow I don't like the term "classic OOP" for starters, but I dislike it even more when it means Java.
 
Clbuttic.
 
But yes, Smalltalk OO is surely classicaller than Java's.
@CatPlusPlus ?
 
4:15 PM
Oh wait, I think the classic OO is actually Simula, not Smalltalk. I always confuse the too.
Simula is what inspired Bjarne, right?
 
I think "mainstream OO" could be more accurate.
 
Is there anything fancy about Java's OO model? Except for reflection, maybe?
 
Define "fancy".
 
4:17 PM
Not really.
 
@MartinhoFernandes "fancy" as in "makes Cat Plus excited"
 
sbi
@JerryCoffin :)
 
@FredOverflow Huh, I don't think I know him that well.
 
But I supposedly don't know anything about OO, because I don't pack stateless algorithms in their own classes in Java.
:(
 
@FredOverflow well, it's basically almost entirely wrong. Does that count? ;)
 
4:20 PM
@CatPlusPlus Did anyone criticize you for that? Did you have a fight with Uncle Bob? :)
@jalf Well, you can be wrong in a fancy way... I'm sure everybody in this chat room can relate to that in one way or another... :)
 
But let's see. Java has: classes forced down your throat, single inheritance, multiple interface implementation, everything virtual by default.
 
@FredOverflow Yeah, that's my philosophy. If you're going to be wrong anyway, you might as well be spectacularly wrong!
 
@FredOverflow Yeah, someone. I tried to argue but then just nodded and agreed and left.
I'm never going to work with Java for anything other than those damn academic assignments.
Even if it means I starve to death. You need to have some rules in life.
 
@CatPlusPlus My Java assignments consisted of using its not so good OO model to build stupid class hierarchies.
 
@CatPlusPlus You can always sell your blood for money!
 
4:23 PM
Like Boat, PassengerBoat, CargoBoat.
 
@MartinhoFernandes Like Dog extends Animal? :)
 
@FredOverflow Yeah, that too.
 
@MartinhoFernandes And what kind of program was that? A boat simulation?
 
Forcing the stupidly broken "is-a"/"has-a" rules down your throat.
 
@FredOverflow The term OO was invented by the inventor of SmallTalk for his language.
 
4:25 PM
@AProgrammer Cool, so what terms did the Norwegians use for Simula?
 
@FredOverflow A pseudo-"shipyard management system".
And my teacher was one of the worst possible.
 
I don't think they had a special term for it. Simula was a simulation language and the OO part is very tied to the simulation idea.
 
> If you don't know what it is, call it a system. If you don't know what it does, call it a process.
2
 
Apparently putting algorithms in the classes make them more testable.
 
How?
 
4:26 PM
Hell if I know. :P
 
Well, you could mock them... but who would do such a thing?
 
I don't know. I don't think I've ever used mocks in tests, I don't really see an use for them.
 
I still don't believe in that TDD, mocking & co. business.
 
Really, writing test and then object prepared to pass the test. I mean, what's the point of that, testing the test?
 
Testing algorithms is a dream: you don't have to set up any state. Just call the algorithm once with some input and compare the output to what you would expect.
 
4:28 PM
Who's going to test the test that tests the test, then.
 
All classes, no exception, shall have: a default constructor, a copy constructor, a constructor that takes all fields as arguments, even if it means taking 2456 arguments, a toString() method that prints all the fields of the class in the format "name: value", an equals() method (but forget that there is hashCode() and if you don't override both your class is essentially broken), and a deep clone() method.
 
@FredOverflow what, I quite like mocking OO
 
Is it just me or the whole Agile development fad is a fantasy?
 
@CatPlusPlus The point of TDD is to write simple APIs. First think about usage, then implementation.
@jalf I mean mocking algorithms there, not mocking in general.
 
I know
it was a joke! :p
 
4:30 PM
@FredOverflow Well, I do. I write a header first and then see if it makes any sense. Still no mocks.
 
@CatPlusPlus Writing the interface is not the same as writing user code.
 
@FredOverflow yeah, I agree with the purpose of TDD. There's a lot of value in writing your code towards a specific usage. I do that a lot, even if it's not precisely in the way prescribed by TDD gurus
 
Plus I don't like switching hats all the time :)
 
@CatPlusPlus the point is that you know that the code you write is useful, and does what you want it to do
 
@FredOverflow I have the image of the user code in my head when I design an API.
 
4:31 PM
In pure TDD, you switch hats like every five minutes.
 
@CatPlusPlus Is she naked?
 
@MartinhoFernandes Always.
 
@CatPlusPlus Then maybe you're smarter than average Joe.
 
@CatPlusPlus I find that such an image never holds up in real life. It looks so nice and straightforward and intuitive in my head
 
@MartinhoFernandes How can user code be female and naked?
 
4:32 PM
I'm not saying I'm an API expert, or anything, but I think I can manage to do a simple API.
 
then I write it out, and discover all the weird corner cases I have to build into the API
 
@FredOverflow Ooops. He changed it! He didn't write the word "code" there! He changed it and cleared the history!
 
to me, at least, it seems to work a lot better if I start out writing some code to use the class/function/component I'm about to design
 
Well, you can forge the API as long as it's hot.
 
4:33 PM
@CatPlusPlus Oh, so it's the API that is naked then.
 
TDD fanatics would say you have to use unit tests to do that. I don't really care what it is, it's just convenient to have some usage code ready to plug into
 
@MartinhoFernandes Yes, I don't like too many layers bolted onto my APIs.
 
@KhaledNassar there's a lot of value in it. But I hope the religion part of it is going to pass soon
 
@jalf Even fanatics can be wrong sometimes ;)
 
@FredOverflow quite often
 
4:34 PM
Always?
 
But more importantly, they occasionally do stumble across a good idea
even if it's by accident
 
Meh, I was supposed to be working on that build system.
 
@CatPlusPlus what build system?
 
@MartinhoFernandes Na, that view would be too fanatical.
@jalf He probably means the Build engine used in Duke Nukem 3D. Come, hurry up Cat Plus Plus, the game is supposed to ship tomorrow ;)
 
@jalf My BJam solution is starting to get arcane in some of the places, g++ barfs out when PCH is used, because some of the compilation options somehow end up being different.
 
4:36 PM
@CatPlusPlus oh
 
@FredOverflow Duke Nukem 3D shipped years ago. Duke Nukem Forever is on sale on Steam today.
Or maybe it isn't.
 
Sounds wonderful
 
Incompatible software? What cruel world are we living in? :(
@MartinhoFernandes Whatever, I don't play games anymore.
 
DNF is not Duke Nukem, it's a poorly done console parody.
 
@CatPlusPlus because it doesn't live up to the 14-year-old memory?
 
4:37 PM
Can you still piss in the bathroom?
 
It has two-weapons-at-the-time system. I mean, come on.
 
@CatPlusPlus Old DN3D had that too. Except it only worked with your feet.
 
eh, from what I've seen, read and heard, it is Duke Nukem, it just hasn't evolved to keep up with every other shooter since then
 
@FredOverflow I didn't know he said that! He's almost as awesome as me!
 
but then I was never a huge fan of duke nukem
 
4:38 PM
@CatPlusPlus You should wait for the game "Johan Litb Forever". The character only has a single weapon named "TMP".
 
well, the old platformers were pretty cool :D
but you can keep the 3d one
 
@FredOverflow And kills evil substitution failures from outer namespace?
 
@FredOverflow That game would be so hard that nobody gets past level 1.
 
@CatPlusPlus And what does "nobody steal from us and lives" in this JLF game?
 
4:40 PM
@jalf Have you ever played Turrican 2? :)
@StackedCrooked Most players wouldn't even survive the intro!
 
@MartinhoFernandes Nobody's using from us and compiles?
 
@MartinhoFernandes Conform or die!
 
@FredOverflow A weapon whose full power could destroy the entire solar system -- but takes a genius to turn off the safety.
 
Half the users of the game are fortunate to get a free manual. The rest rely on word of mouth. The manual is 2,000 pages.
Each time they debug the game, a new manual comes out which is twice as long.
 
> Java projects sport a byzantine complexity.
Java projects sport an overly complex complexity.
 
4:53 PM
Java projects are defined as a tuple of (set of XML files, an operating system with a compiler that converts those XML files into the program).
 
@FredOverflow wow, that Go article you mentioned earlier constrasts C# with TeX for some obscure reason.
 
@JerryCoffin What safety? :)
 
So many pencils here today. It's a pencil day!
@FredOverflow Type safety.
 

« first day (236 days earlier)      last day (4720 days later) »