« first day (703 days earlier)      last day (4260 days later) » 

3:00 PM
@sbi ¬_¬
 
> But I think it's not the "purely" clang.
 
@TonyTheLion lol @ clang nazi wrt "pure clang"
 
@kbok it's kinda hilarious
 
@TonyTheLion Totally :) Also, that would not be completely pure since the clang used to build clang was not built with clang.
 
3:02 PM
One would need to recursively build clang until he finds no difference between one binary and the next.
2
 
4
Q: is x+=a quicker than x=x+a?

ChiffaI was reading Stroustrup's "The C++ Programming Language", where he says that ot of two ways to add somethnig to a variable x=x+a; and x+=a; he prefers +=, because it is most likely better implemented. I think he means that it works faster, too. But does it really? If it depends on the comp...

hmmm
 
@kbok But then that would just be a perfectly tainted clang.
 
"The C++ Programming Language" was first published in 1985. The most recent version was published in 1997, and a special edition of the 1997 version was published in 2000. As a consequence, some parts are hugely out of date. — Joe Gauterin 9 mins ago
^ this
 
it's sort of odd to think that at some stage, some had to hand write the binary code for the first compilers... clearly not turtles all the way down, but for the most part
 
3:04 PM
turtles ?
what do turtles have to do with binary code?
 
sbi
I do believe a compiler should be self-hosting. Well, a C++ compiler, anyway. I have no opinion re VB compilers.
 
@R.MartinhoFernandes Yeah, a "pure" clang in disguise.
 
> I have no opinion re VB compilers.
 
sbi
@kbok Isn't that homeopathic, then?
 
I'm sure you do
 
3:04 PM
The difference between the two is going to be so miniscule that it doesn't even matter, then.
 
@sbi hehe. You'd have to shake it between compilations to get the potentization effect.
 
To obtain a truly pure clang, you have to travel to the future to obtain the pure clang your future self just built and build clang with it.
 
I mean unless you're running on 20 year old machines
 
@TonyTheLion everything
@jornak if the difference is there, and you are using that operation enough, it can start to factor
 
Can I access an enum from an object instead of a class ? I cannot use decltype
 
3:06 PM
some what relevent
 
@thecoshman Yeah, I thought about that :)
 
sbi
Now I remember a paper by...mhmm, was it Knuth? or Richie? about malicious compilers. That would make this relevant.
 
Notice how he creates the age-reversing potion AND the flux capacitor in one day.
 
@thecoshman I find it highly offensive that he needs more than twice the number of books to learn biology than he needs to learn physics
 
@thecoshman lol
 
3:09 PM
@sbi Ken Thompson.
 
@NikiC clearly he was already well read on physics, thus required less books
 
oh mann coding in the dark is so trippy. i dont even know where the hell I am right now
 
@thecoshman Then it makes sense :)
 
@sbi Sure. With "malicious tainting", the recursive solution doesn't solve the issue.
 
@AmadoMartinez Mariana trench?
 
sbi
3:10 PM
@R.MartinhoFernandes Ah, I forgot. Anyway, IIRC, then, according to said paper, clang having been compiled with a malicious compiler (that would be VC, I guess?) according to the article would make sure that, no matter how often clang compiled itself, the malicious code would always be present.
 
@NikiC You're silly. He just kept the physics books on the table.
 
This is so totally going in my todo list.
 
@sbi No, not really.
 
@R.MartinhoFernandes But even in that case there would be more biology books ;)
 
The malicious compiler would have to be designed to taint the compilers it produces so they can continue spreading it.
 
3:12 PM
feel like im in a bomb shelter or in a fuckin time capsule
 
@NikiC there is also no indication which books are which, you are simply inferring
 
@R.MartinhoFernandes Which is theoretically possible.
 
sbi
@R.MartinhoFernandes "...a malicious compiler according to the article..."
 
@kbok Ken did it.
 
@R.MartinhoFernandes Of course by the time it took me to do a search you would have already said something. In my defense I have a link.
 
3:12 PM
@thecoshman Well, we all like type inference, don't we?
 
I had exactly the same question a few days ago:
1
Q: Why == overloading can access private members of argument

WeaklyTypedConsider the following (partial) code: class Group { private: int id; public: void set_id(int); int get_id(); bool operator==(const Group&); }; bool Group::operator==(const Group& g) { if(g.id == this->id) { /* id is private? */ retu...

 
-1
Q: I enjoy weeping, can you help me?

John SmithI am currently working on a natural language processing program and need some help. I do not want to build a Spanish-English dictionary from ground up and would like to know if there is a downloadable open source dictionary that I can get. I am using C# in my program so I would prefer if the dict...

 
@NikiC irrelevant
 
Oh noes, John Smith.
 
-15 already... damn.
 
sbi
3:15 PM
@Mysticial Now what does the name "John Smith" remind me of?
@R.MartinhoFernandes Oops.
 
@sbi Pocahontas :P
 
@sbi Matrix of course
 
@sbi Yeah... we've quite a bit of those...
 
@TonyTheLion Wut.
 
@R.MartinhoFernandes wasn't there a character called that in the film.
for some reason I seem to think that
 
3:16 PM
@TonyTheLion how the devil do you draw that connection, there was no John Smith in it
 
I haven't watched it in ages
@thecoshman maybe there was in the Dutch version I watched?!
 
lol, as usual, TRWTF is in the comments. According to comments in TDWTF, there is no exact value for the square root of 2.
 
who do you think is this 'John Smith' guy
@TonyTheLion perhaps... but I care not watch it, let alone in Duth
 
@thecoshman John Smith obviously
 
@TonyTheLion smart arse
 
3:17 PM
@thecoshman The guy in The Matrix was named "Agent", not "John".
 
@R.MartinhoFernandes but the Smith part make me think of the Matrix
 
sbi
No, it was this idiot. /cc @Tony, @thecosh, @Mysticial
 
and besides, his first name could have been John
 
@sbi oh
 
3:19 PM
@R.MartinhoFernandes Also 3. + 5. is inexact.
I think I stopped reading the comments earlier than you did.
 
sbi
Yeah, and we actually had to lock the room down, because he's so full of himself, he completely wrecked it. I now voted to close this question (not constructive), because I see no way to convince him he's overdoing this, and all this ongoing debate here does is keeping his wounds open. — sbi Jun 4 at 15:56
 
@sbi he he he, good times
 
sbi
@thecoshman You must be a pervert.
 
@thecoshman His first name was Agent.
 
Hey people, is there a preferred way to organize files in C++? For example, all .cpp in source/, all .hpp files in headers/ etc...
 
sbi
3:20 PM
@Bane As with all things regarding C++, there are many preferred ways. Pick one of the saner ones.
 
@sbi how so?
@R.MartinhoFernandes citation needed
 
@sbi, and that would be? Any suggestions?
 
sbi
@thecoshman You consider this good times.
 
any ways... I shall head the jolly old place I call, not work
@sbi I look back at it and think it was amusing, how is that not good?
 
@thecoshman did you do any work today then?
 
3:21 PM
still, heading home
@TonyTheLion just about, signed a form don't you know
peace pirate out!
 
@thecoshman lol
 
Agent Smith: The great Morpheus. We meet at last.
Morpheus: And you are?
Agent Smith: A Smith. Agent Smith. [see, like Bond, James Bond]
Morpheus: You all look the same to me.
 
sbi
@Bane One project I worked with had a policy I liked: Code organized in modules, which go into their own folders; headers directly in those folders, cpp files in a folder (_imp) in there. Include all headers as "module/header.h". If you want to sell an API, delete all the source code (_imp) folders, and you have your headers ready.
 
@LucDanton Man, it gets even better!
 
I believe the word is "snooty"
He was snooty
 
3:24 PM
@sbi heh, sounds good.
 
Also, when I want other people to be able to include my library, I need to package in the headers and .o files, right?
 
@R.MartinhoFernandes Hey I stopped reading for a reason.
 
sbi
@Bane You would create a .lib file, which is a, uh, library of object files.
 
Jun 1 at 13:46, by John Smith
i'm not a math genius; i just don't appreciate unnecessary snark in my direction for absolutely no reason
Snooty
 
The .lib file is actually a directory, right?
 
3:25 PM
Jun 1 at 13:47, by thecoshman
@JohnSmith we don't appreciate people expecting help. Think of this as a pub, we are just trying to hang out and have a few pints, you are fucking us off with shitty boot leg DVDS
 
sbi
@Neil You got that wrong. He is an idiot.
 
Aaaaaand.. that's where it really went downhill
Even if that was a harmless statement, he misinterpreted it bigtime
 
sbi
@Bane Nope, a lib file is, like, er, you know, a file.
 
Oh, OK. I'll have to google around to find out how to create those...
 
compile
 
sbi
3:27 PM
@Bane What platform/compiler/buld system?
 
@sbi
 
sbi
@TonyTheLion lib tool
@Bane Yeah, that's me. I know. :)
 
oh there's a lib tool? Meh I always learn something
 
@Neil Wow... this place sure attaracts....
 
@JonathanSeng idiots
yes, it does
 
3:28 PM
@TonyTheLion Careful that you discriminate yourself out when making such a statement ;-)
 
user784668
@sbi A file that's an archive, and therefore quite a lot like a directory.
 
@sbi Sorry, connection problems... Anyway, I'm using Ubuntu Linux and GCC (invoked with G++, don't know if that matters).
 
sbi
@TonyTheLion Traditionally, there is. Throwing object files together into a lib isn't really linking, as no references are resolved.
 
@JonathanSeng I've been called an idiot before, I don't mind, especially if I do it myself :P
@sbi ah, i see. I didn't know that
 
@TonyTheLion And everyone else attracted into this room? :-)
 
sbi
3:29 PM
@Bane I'm not a Unix/commandline aficionado, so I can't help here, but I think there would be a command line tool to create a lib from obj files. ICBWT. (@sehe?)
 
@JonathanSeng The regulars are all good and smart people, for the others, I don't really know.
 
ar for static libs (aka archives; go figure).
 
@sbi g++ can do that too.
 
user784668
@Bane What @R.MartinhoFernandes said.
 
sbi
@TonyTheLion Let's just say most of us are, somewhat, smart. :-/
 
3:31 PM
> must of us
wut ^
 
Thanks, @R.MartinhoFernandes, I'll check it out.
 
sbi
@TonyTheLion :(
 
@sbi well, I was trying to be nice.
lol
 
In make files, we typically separate compiling source to object (with the -c option) from the linking. The nice thing with g++ is that it doesn't care if the input is a source or object file. It just does the right thing.
 
@TonyTheLion And the ape was trying to be grumpy. How surprising.
 
sbi
3:31 PM
@JonathanSeng Ah, you mean you can tell it to create a lib and it would invoke the lib tool itself?
@R.MartinhoFernandes Oh, you already said that.
 
Fuuunnn with cuuube maps.
 
@sbi I think I misread, my apollogies.
 
@R.MartinhoFernandes I occasionally hope he won't be grumpy :/
 
@sbi Not for static libs, AFAIK.
6
Q: How to create a static library with g++?

linuxxCan someone please tell me how to create a static library from a .cpp and a .hpp file? Do I need to create the .o and the the .a? I would also like to know how can I compile a static library in another .cpp code. I have header.cpp, header.hpp . I would like to create header.a. Test the header.a i...

 
sbi
@JonathanSeng Would that be Apollo 13?
 
3:33 PM
lol
 
@sbi Yes, I misread. ar is the tool to use
 
man, I'm tired
 
sbi
@JonathanSeng No, you mist-typed.
 
ar is annoying cryptic.
 
3:34 PM
@sbi I'd like to say that's true, but I mis-read what was asked, plain and simple.
 
user784668
@sbi link fail
 
sbi
@JonathanSeng Who is that cryptic you speak of, and why is he annoyed by ar?
@JonathanSeng It's apologies, not apollogies.
 
@sbi point taken.
still doesn't wake me up though :P
 
sbi
@TonyTheLion Should I look when you logged out here last night? :-o
 
3:36 PM
@sbi no. I know exactly when that was. Too late.
 
Our application crashes if we scroll too fast.
 
@sbi You know, I think I'm just too distracted to keep up with you ;-)
 
sbi
@R.MartinhoFernandes Scroll slower.
 
@sbi Well, by "too fast" I mean "normal".
 
oh god :/
 
3:39 PM
You need to be extra gentle.
 
sbi
@R.MartinhoFernandes Scroll extra gently.
 
scrolling sucks
use bigger screens
 
Otherwise it starts leaking like a net and eventually out-of-memories.
No cause in sight :(
 
sbi
3:40 PM
@R.MartinhoFernandes Is that Windows?
 
@sbi Android.
 
sbi
@R.MartinhoFernandes I pass.
 
sbi
I think the common idiom is "leaking like a sieve".
 
But the holes in a sieve are too small for this example.
 
user784668
3:42 PM
@R.MartinhoFernandes It starts leaking like .NET?
 
Erm.
Ok, you win.
 
Is there a tool I can use to find out which character encodings encode é as 0x017D?
 
user784668
3:48 PM
@R.MartinhoFernandes As in sequence of bytes or as in code point?
 
Sequence of bytes.
 
Dunno. If you have encoding tables available then you could hack something together yourself with your scripting skills.
 
sbi
You didn't forget a word.
 
I used to a word.
 
word a word
 
3:50 PM
word
now
 
sbi
Garp!
 
user784668
diw
 
sbi
Oh, @Jerry is awake. I should leave.
 
Hmmm, seems it's something Notepad2 calls "Western European (Mac)".
 
@sbi No, I'm really not (only ~3 hours of sleep last night -- and in this case, the ~ is in the "approximately" sense, not the bitwise not sense, I'm afraid -- though I feel like the latter is closer to what I need).
 
3:52 PM
I should have figured that out, given the Mac line endings that not even Macs uses these days.
 
@JerryCoffin Coffee
 
I hate how the code I have to write is 98% boilerplate.
 
@kbok Isn't that how it always is in C++?
 
@JerryCoffin Chug a few red bulls.
 
@JerryCoffin How many bits?
 
3:53 PM
@TonyTheLion Never. When I need caffeine badly enough, I do the Dew!
 
@JerryCoffin Baby keeping you awake?
 
user784668
@R.MartinhoFernandes 12
 
@TonyTheLion Take a boilerplate-ridden C++ code, translate it in C.
 
@JerryCoffin oh :/
@kbok sounds fun, NOT
 
@R.MartinhoFernandes Worked way too late, and just as I was ready to lay down and die, my wife decided I needed to get the baby to sleep...
 
3:54 PM
@TonyTheLion Erm, C++ is quite well-equipped in the boilerplate-removal department. As a last resort, there's always macros.
 
user784668
@kbok Thou shalt not mention C.
 
@kbok Incidentally that would be an extremely good recipe to forcefully induce sleep
 
@TonyTheLion I'm not exactly having my happy face right now.
 
@R.MartinhoFernandes templates?
LOL
 
@jornak As my kids would say: "Expeliarma!"
 
3:55 PM
@JerryCoffin You mean "Expelliarmus"
 
sbi
1 message moved to bin
 
@JerryCoffin Hah. I know how that feels. You pull a (big-part-of-)nighter and then a kid turns out to have a fever, wet the bed or just generally wake up too early (which rarely happens, knock wood)
 
@TonyTheLion IMO templates would actually do an excellent job in my case.
 
@jornak Expelleamus C
 
@sehe Wait what?
 
3:56 PM
@jornak Probably -- I don't pay that close of attention when they start with the Harry Potter stuff.
 
@TonyTheLion Yes, that too.
 
sbi
@jornak HP
 
@jornak "May we/let's expel C!"
 
@sehe You're doing it wrong. It cannot be correct latin.
 
@sehe Expelliarmus is a disarming spell.
 
3:57 PM
@R.MartinhoFernandes Ok. I dunno about pottery
@jornak Yeah I saw it without the plinctus
 
lol, plinctus.
 
@sehe Thankfully, in this case he just needed feeding, burping, some good old fashioned cuddling, and a lullaby or two.
 
@sehe ... plinctus?
 
plink
when someone mentions you the system makes a sound
if you're not careful though you may get a plonk
 
vere enim!
 
3:58 PM
@jornak Backported latin for "plink".
 
user784668
@sehe vim?
 
@R.MartinhoFernandes, why not? -mus seems to be the plural, first form, it is kinda weird to say, but it seems correct...
 
@Fanael vis, vim: power, force
 
user784668
@sehe emacs?
 
(Also, why do people here know Latin?! Myself including, kinda...)
 

« first day (703 days earlier)      last day (4260 days later) »