« first day (696 days earlier)      last day (4261 days later) » 

7:00 PM
@daknøk Good idea. Sick kid isn't going to let me do much hacking anyway. Got tele in the bedroom. I might go and watch. Who's on? Rutte/Samson/Wilders/Buma/Pechtold or smaller lineups?
 
@sehe I know Wilders is there.
 
@daknøk I'll have a look see. Curiosity. Not on mars. And I hope it doesn't kill the cat.
 
At least also Rutte, Samsom (with an M, it’s not Samson en Gert but Samsom en Geert) and Pechtold.
 
Something to procrastinate reading tomorrow: 6 things that will make you more productive
 
7:04 PM
@sehe #7 Going back in time and shooting the silly engineers at Google that wrote Android?
 
Good idea
and shoot the inventors of PHP too
 
@R.MartinhoFernandes Doesn't work for me. I don't spend any time at all on my phone. Do you?
 
@TonyTheLion You know, if there is somebody I really hate from deep within my heart, besides the Cat, it’s the creator of PHP.
 
My phone acts as a facilitator, really. I use it for music - to avoid interruption/distraction
 
And killing the creator of PHP would be really worth the (probably less than) four years in jail.
 
7:06 PM
@daknøk You don't know him
 
@daknøk why would you hate the Cat?
 
Because he dislikes Objective-C. :<
 
@sehe I was venting my new found dislike for the platform from a development point of view. You can't be productive in it at all.
 
@daknøk Justifiable homicide. 30 days probation, which will be waived if you can hunt down the perpetrators of Prolog...
 
7:07 PM
@R.MartinhoFernandes True. Okay, off. Kid crying again. Won't be back. Night all
 
@sehe A sehe fork? Cool :)
 
@sehe Have fun.
 
@R.MartinhoFernandes Actually, Google bought Android after it was (at least mostly) complete.
@sehe G'night.
 
sbi
That's from @sehe's link.
 
@JerryCoffin Oh well...
 
7:10 PM
@sbi both look male.
 
sbi
@daknøk Maybe from a Dutch POV they indeed do. I wouldn't know.
 
@daknøk "round" hair = female.
 
ah damn, I got downvoted again. Happening more frequently recently. I must be doing something right
 
sbi
@KonradRudolph Depends on your weltanschauung.
 
@sbi “if you ain’t pissing people off, you’re doing it wrong”
 
sbi
7:12 PM
@KonradRudolph I thought so.
 
well you know me
today I learned that my facility’s internal health scheme covers scam treatments
I’m hugely disappointed
 
we’re a biotech / life sciences research institute at the cutting edge of scientific research, why do we support pseudoscience?
 
@KonradRudolph Same answer also got upvoted, so it must not have been all right. Then again, probably the upvoter was an ignorant fool!
 
must have
 
sbi
7:15 PM
Aren't "downvoter" and "ignorant fool" synonyms on SO?
 
no way
only when they downvote me
then, sure!
and Stack Overflow’s font doesn’t support Unicode “CRYING FACE” :/
 
@KonradRudolph That's not a browser issue?
 
ಥ_ಥ
 
@Mysticial I think the browser probably supports the character, given the right font. Haven’t tried it though
 
Do you see the face I posted?
 
7:18 PM
@Rapptz Yes, but that’s not what I meant
 
I know. :P
 
A lot of the fonts in this answer don't show up either for me. I thought I'm just missing the fonts.
 
I meant CRYING FACE U+1F622
ah, rats, too slow by far
 
@Mysticial I like how the answers there are all <= 1, except for the first one.
 
7:22 PM
@R.MartinhoFernandes I linked it on meta and apparently it got 30 upvotes from it. :)
 
sbi
@TonyTheLion Actually, that's not safe at work.
 
lol, the one time you post a safe for work picture, you label it as NSFW ;P
 
a breaking chair is Not Safe For Work, no?
 
@TonyTheLion My wife approved of it -- didn't seem to like his hair much.
 
7:23 PM
lol
 
Pete Becker claims it’s hard to ensure a function doesn’t exit without return!?
@R.MartinhoFernandes Nonsense.
 
@KonradRudolph does terminate count?
 
@KonradRudolph int f() { function_that_calls_exit_or_throws_and_is_past_a_binary_boundary(); }
 
@MooingDuck Ah hmm. Well, to be honest the few functions which could cause termination could be known to the compiler but then simply wrapping the function call would once again make that untractable
@R.MartinhoFernandes See my previous message, yes, I see the problem
 
7:28 PM
The best you can do is what C# and Java do.
 
But I honestly think that’s the smaller evil.
 
just put a assert(false) after exit.
 
Make it an error and force my example to be int f() { function_that_calls_exit_or_throws_and_is_past_a_binary_boundary(); throw "fuck"; }. No harm done.
 
yes, or like that
 
7:30 PM
I find it so annoying that some functions that don’t ever return are not labelled [[noreturn]]
 
@daknøk Like?
 
@R.MartinhoFernandes some functions from libraries.
 
@daknøk Probably because the support for annotations is still … hmm. Not quite there.
 
anyone heard of ViHart ?
 
@daknøk Erm ,what compiler implements [[noreturn]]?
 
7:33 PM
@R.MartinhoFernandes clang.
 
Only Borland's AFAIK.
@daknøk Not according to their own page.
 
It does according to the warnings it shows me.
 
@R.MartinhoFernandes clang has been known to have features they claim they don't have.
 
@MooingDuck Probably because they're incomplete or at alpha stages.
 
daknok% cat foo.cc
[[noreturn]]
void foo() {}
% clang++ foo.cc -std=c++11
foo.cc:2:13: warning: function declared 'noreturn' should not return
      [-Winvalid-noreturn]
void foo() {}
            ^
1 warning generated.
 
7:34 PM
What version is that?
 
% clang -v
Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin12.1.0
Thread model: posix
Based on 3.1.
But I remember the official 3.1 release.
 
It's not in the official 3.1 release.
I'm running a 3.2 trunk build that doesn't have it.
 
hmm
Strange.
Ah maybe only in Apple’s version then.
 
@R.MartinhoFernandes: I think that is a bit of an over-sophistication. If there is a control path that leads to no return, then the caller if at all cares about using the return value will most likely lead to something malfunctioning sooner or later (depending on the junk and the caller's code). Talking about C, enforcing this seems useless and annoying. — dmp 3 mins ago
Oh well. Useless and annoying. What can I say. // cc @Konrad.
 
My roommates attempted to convince me that Benjamin Franklin discovered electricity.
 
7:43 PM
@daknøk Anyway, I don't see how you can find this so annoying. How often do you interact with non-returning functions? Are you by any chance writing your code in CPS?
@MooingDuck Duh, Thomas Edison did.
 
@R.MartinhoFernandes infinite loops, sometimes.
But I agree, it’s very rare.
 
Should i learn more than one programming language at a time?
 
@MohamedAhmedNabil probably not, too easy to mix them up
 
@R.MartinhoFernandes I think you’ll find that it was Albert Einstein. That’s how he got his Nobel
 
Thomas Edison was a business man.
 
7:55 PM
@MohamedAhmedNabil you could if they were very very different. Like C++ and lua or haskell or lisp
 
damn
I've been sitting here waiting for something to happen all night
but I don't know what it is
 
@DeadMG zombies
 
God?
Earthquake?
Magic?
Orgasm?
 
A call back from Google
 
@Rapptz No.
 
sbi
@R.MartinhoFernandes I might not possess Balpha's sense of humor, but I failed at finding this funny.
 
I want to supply stdin as is done in ideone.com for single file programs. What should I use. I use C++ and I don't want to edit the code by adding freopen commands
 
@sbi The assumption that everyone can read English text in the question posed by the lawyer, and the pointing out of that assumption by the witness (there, frog successfully murdered).
 
sbi
@R.MartinhoFernandes Mhmm. Oh well.
Reading English isn't hard anyway. Understanding what you read is much harder.
 
8:07 PM
@R.MartinhoFernandes That's reasonable IMO.
 
I find the rest of the site funny too :)
 
@user1112010 from the command line it's just myprogram <filetouseasstdin.txt or something.
 
taking weather conditions to your advantage ^
 
@TonyTheLion home again home again
 
@TonyTheLion Nice!
 
sbi
8:08 PM
@MooingDuck That's a line by the Tindersticks.
 
Should i just make on fstream object or should i make 1ifstream and 1 ofstream?
 
I remember that gif
 
@MooingDuck Agreed. But then I will need to create that file first and edit the run command in my IDE. I need it for programming contests..so don't want to really waste time creating a file and running the my program through the command line with the required parameters. I am open to code a plugin for my IDE for this but I just don't know where to start.
 
8:14 PM
@Rapptz I've seen it before too
 
@MohamedAhmedNabil always have seperate streams.
 
If there can be a way I could have copy paste text to the console window, it would have been great
 
@user1112010 I usually just make a batch file, and set it as a post-build step. Then the batch file calls my program over and over with different input files to test it.
@user1112010 or you just copy paste the text to the console window
 
@MooingDuck why?
 
@MohamedAhmedNabil writing to a stream that you're also reading from is hard.
 
8:16 PM
@user1112010 right click > paste
 
user image
4
Most applicable meme ever!
 
@R.MartinhoFernandes I think the conversation in itself is funnier than the typo. Esp the Wait a minute. Float?
Also I don't see how it is relevant to the case.
 
@MooingDuck What if i put it into functions?
 
@StackedCrooked It seems the witnesses had to educate the lawyers and judges about what programming is.
@StackedCrooked Yeah, I imagine what the judge was thinking.
 
8:17 PM
He was thinking: What the hell?
 
@MohamedAhmedNabil In what context? You could have limited scope
 
> What the fuck is a "float"?
 
@MohamedAhmedNabil I don't know what functions have to do with anything
 
@Rapptz Right click is not allowed in the console application window that is generated by codeblocks and thus I am not able to paste
 
Seen from the outside, having double, float, long, short, bullion, as our most basic tools... Well, it looks like we programmers are just a bunch of crazy wackos
 
8:19 PM
@user1112010 and ctrl+v doesn't work?
 
@MooingDuck I was thinking one fstream and then send use the funstions ,setfile, resetfile , readrecord, writerecord. And i would pass to each fstream by refrence
 
sbi
@R.MartinhoFernandes Wasn't that the case where the judge learned programming Java in order to understand what he was judging about?
 
it's wierd how many C++ guys think that char is the same type as either unsigned char or signed char, and don't realize how magic char is.
 
@MohamedAhmedNabil pastebin.com/mmDw9Gmj ?
 
8:20 PM
@MohamedAhmedNabil oh, if you're doing binary fixed-field-what-do-you-call-it files then you should be fine with one stream.
 
@MooingDuck because passing 2 streams by refrence to the resetfile and setfile would be a pain
@MooingDuck Oh ok
 
@user1112010 I just compiled a project, you can right click and paste on Windows 7.
 
Does anybody else hate that Gangnam Style video that's gone viral already?
 
Also that you can do binary copies into and out of char and unsigned char buffers, but not signed char buffers, even if char is signed.
 
8:22 PM
@TonyTheLion Yes.
 
@Rapptz Something like that
 
Good :)
 
@MooingDuck When shouldnt i use 1 stream
 
@TonyTheLion From the get-go I thought he was saying "condom style" which sorta ruined it for me
@MohamedAhmedNabil normally reading and writing to the same file at the same time is rare. I've never done it. So: virtually always.
 
I should rewrite that. It's pretty ugly.
 
8:23 PM
static libs dont show what CRT they are utilizing how do i find that out in vs2008 sp1? any clues?
 
@MooingDuck so now we can invoke Tony's Law on this?
 
@Rapptz I can't. I am also using Windows 7 and Code::blocks 10.05
 
i tried tools like dumpbin.exe (which def does not work) or dependancy walker
 
@user1112010 I'm using a nightly build. SVN 8150.
 
8:24 PM
etc but on a static lib...can't fig it out
any clues on this?
 
@DavePowell I don't think theres a way in visual studio
@DavePowell they work fine
@DavePowell oh, a static library. Yeah, I misunderstood what you were asking before
@DavePowell project properties->configuration properties->linker->general->show progress->/VERBOSE
 
Okay well I have to go
I'll be back later I guess
 
laters
 
8:29 PM
@MooingDuck i enabled that but it just shows each obj file it created still does not show what CRT its using when creating that library.
@MooingDuck in the directory there is something called rebuild dependency file vc90.idb but i have no way of opening that file.
 
@Rapptz I am downloading the nightly build.
 
@DavePowell Is your app failing to run because whatever CRT version it's linked to does not exist on the computer you've deployed it to?
if so, you can go look at the event viewer (type eventvwr.msc into the run box) for version numbers of the SxS assemblies that are missing
 
@Rapptz No wait. Try pasting it before the process has ended. After the process ends, I can also right click.
 
@Prætorian actually on my computer it works. no issues. but when i shared my static lib with client he started complaining about lnk2005 msvcrt.lib(MSVCR90.dll) errors. this is after they told me to use the MFC with shared dll option and /MD on my static lib
@Prætorian the only thing i am thinking that there might be a CRT version mismatch if the correct /MD option is used?
 
only about 400 points away from 2K.. woot woot
 
8:34 PM
@p
 
@DavePowell Does your static lib link to MFC?
 
@Prætorian well i am not using MFC but they are. i have not created an MFC dll project yet.
@Prætorian they are stating the following: Specifically linking is failing due to the fact that the static library is statically linking with many libraries common with the larger
manufacturing tool chain build. These common library functions are being exported by the static library causing the linking conflicts.
 
@DavePowell Ok, takes MFC out of the equation. How about the CRT? What option are you using to link to it?
 
@Prætorian i am using /MD option
@Prætorian and it is for a release build. so no mismatches in debug vs release either
 
@DavePowell Hmm, I'm confused. This seems to claim that the culprits are some other libraries (larger manufacturing tool chain); why do you suspect it has anything to do with the CRT?
 
@Prætorian In order to resolve this problem the static library can only expose the functions associated with the API itself in order to guarantee
no linking conflicts result. Exported functions can be manipulated when the static library is built using a combination of linker options
and module definition (.def file) statements.
@Prætorian this is their solution but it does not make sense why they are asking me to do anything. i am just suspecting a crt issue because of the linker errors they are getting
@Prætorian seems to me its an issue on their end. now what that issue is IS what i am trying to figure out...i am in a dicey situation so trying to help them out.
@Prætorian if there are lnk2005 errors as stated earlier then those usually happen due to CRT mismatches dont you think? or options mismatch debug vs release or /mt vs /md
 
@DavePowell CRT version mismatches I've seen usually happen at runtime, when Windows tries to load the SxS assembly that the executable has been linked with, and it fails to find them on the target machine
Do you have whatever libraries they're complaining about listed in the linker options for your static library?
 
Xeo
@R.MartinhoFernandes I think something is broken
 
Nevermind.
 
8:54 PM
@Prætorian no. i dont. the line you saw xyz already defined in msvcrt.lib(MSVCR90.dll) is all what they sent me.
@Prætorian so do you think i need to put that lib as part of the exclusions? because if i do that what would that mean in context of my static lib? as it has dependencies o n a third party static lib i am using as well. will that be a problem? if i remove the msvcrt.lib
 
@DavePowell I haven't built many static libs, so I could be wrong about this, but I was always under the impression that the libraries that a static lib itself links to need not be resolved when the static lib is built. All the dependencies can be linked by the executable that is using these libs
In that case you shouldn't have to link to the 3rd party library, your user can link to it himself when creating the final executable
Have you tried describing the problem on SO?
 
@Prætorian well my code in the static lib utilizes the third party static lib. plus as u can tell i am not sharing my code with them. just the lib. so i have to provide a full static lib to them. i just dont know if i can just simply comply to their request and remove the crt as my own code does utilize standard c functions etc for which the crt is needed.
@p
@Prætorian as far as SO i did not post anything i did find some stuff like stackoverflow.com/questions/8097733/… which is where i got the initial idea
 
@DavePowell I don't think the CRT is the problem at all, since you're using the /MD option. So your library is dynamically linking to it, and shouldn't conflict with their CRT since they're using the same option.
@DavePowell It is possible that you've applied some VC++ runtime update to your machine, causing it to look for a newer version of the CRT than is available on your client's machine
 
9:10 PM
@Prætorian like that SO post suggests I created a test dll to try my static lib with and when i build it IT creates a manifest file which revealed to me that i was still using the older vs2008 9.0.21022.8 CRT version. when i go to the actual vs2008 directory Microsoft.VC90.CRT to check the CRT version it had been updated to 9.0.30729.4148
@Prætorian then i read the following link nuonsoft.com/blog/2008/10/29/…
@Prætorian which lead got me thinking that since i did not make any changes and by default it was going to use the older CRT anyway could it be that they are using the latest? thus CRT version mismatch?
@Prætorian this could explain the lnk2005 type issues which if technically we are using the same CRT option /MD and version should never happen correct?
@Prætorian but to be 100% sure i am using the correct msvcrt.lib(MSVCR90.dll) i needed to find out what was being used when i built my static lib. but i can't seem to find that anywhere.
@Prætorian and by that i mean the CRT version ofcourse
 
9:30 PM
@DavePowell AFAIK, CRT versions are backward compatible, and so if your client is using a newer version than you are, it should be ok, it's the other way around that causes problems
@DavePowell That is very interesting, I had no idea it does that
 
@Prætorian so then i am really lost as to what the issue could be then....i dont know if i can just do like they are asking and just remove that lib.
@Prætorian yea it was an eye opener for me as well lolol
 
@DavePowell You could try it
I'd try posting the entire problem on SO. Make up names for your lib, the lib you're linking to and your client's app and be as descriptive as possible
 
@Prætorian hmm i will. so if you had to take a best guess? what do you think that would be? hehe
 
@DavePowell My guess is it has something to with the 3rd party library you and your client are both linking to
 
@Prætorian well when i had to provide this static.lib which has an other static lib i made sure i built them all from scratch. with the correct options etc. i have shared this with other clients but as /MT and mfc with static lib this is my first time with /md
with mfc shared dll.
 
9:42 PM
0
Q: C++ code which is slower than its C equivalent?

user997112Are there any aspects to the C++ programming language where the code is known to be slower than the equivalent C language? Obviously this would be excluding the OO features like virtual functions and vtable features etc. I am wondering whether, when you are programming in a latency-critical area...

 
@Chimera I could possibly throw together some very dirty code that uses VLAs in C and std::vector in C++ and show that the memory allocation in std::vector kills performance.
But I'm not bored enough to do that.
 
@Mysticial Yeah, I thought this question might find interest in this room.
 
Or rather, I have too much shit to do these coming months to spend too much time thinking about and answering any single question - unless of course I see a potential for it go 100+.
 
@Mysticial I could also show how std::sort wrecks the shit out of qsort.
 
Haha qsort.
 
9:51 PM
What's the difference between them anyways? Besides that qsort() implies quick sort?
 
@Mysticial Considering that it's possible to best alloca with a memory arena, I think you'd more win the meaningless-benchmark award
 
@DeadMG I make a living off of meaningless benchmarks. :)
 
lol
 
@Mysticial qsort takes a function pointer for comparison, so it can't inline it.
 
@EtiennedeMartel ah...
 
9:54 PM
A C++ compiler can do much more stuff at compile time.
 
@EtiennedeMartel Because the language is flexible enough to allow it.
 
So, I'd expect C++ code to be faster than its C equivalent.
And if you compare VLAs to vector, sure, but it's not exactly fair, since a vector is much more powerful, and that flexibility comes with a price.
 
@EtiennedeMartel What else is there other than vector?
 
0
Q: C++ < vs <= vs ==, what comparison is faster?

Lukas SalichWhat is the fastest comparison in C++? Does optimalization make all of them same fast?

 
not again
 
9:57 PM
@Mysticial qsort is terrible.
And not type safe.
Well, okay, that's pretty much redundant. It's terrible.
 
damn that went down fast...
 
@Mysticial No kidding, closed before I found the dupe
 
That question is so stupid.
I can't even begin to imagine the thought process behind it.
 
@CatPlusPlus Which one? The highly upvoted one?
 

« first day (696 days earlier)      last day (4261 days later) »