« first day (909 days earlier)      last day (4037 days later) » 

7:02 AM
@Rapptz It's a horrible feature and I hate it.
I don't know why it has to be in a translation unit./
 
It doesn't like you either.
 
It might as well just be defined once in the header.
But noooooooo.
 
@Zoidberg Oh aha. Somehow this user was more of a fan of you. Let me guess. A Ruby affacionado?
There was a SO chat glitch just now. I couldn't post anything from both browsers unless I refreshed the chat window
@ThePhD "defined once" <-> "in a header" (hint: these two are pretty much mutually exclusive, unless there's only one TU that includes the header)
 
@sehe C++ should automatically, behind-the-scenes, take all const static declarations and put them into one "TU", compiled before everything else.
 
Based on what?
 
7:07 AM
Based on making it easy on me, so I don't have to declare them in another file. :c
 
This will work splendidly with static libraries, shared libraries and whatnot. Cough
 
Well, other languages manage to do it!
There has to be a way to make C++ play nice.
In fact, why stop at const static data members?
Inline all the things, offset TU's to be the very last thing any code needs.
Generate one giant declaration file for all the code, then generate one giant TU.
One compile. One declaration.
See? Simple!
 
@DeadMG Did you give up on the sha2 cracking efforts? :D
 
If we want to keep compilation times down for when we only change small parts of the code, it'll be the compiler's job to separate out the TUs into small, edible pieces that it can chomp through.
The point is: managing TU's vs. Headers is not the job of the programmer.
It should be the compiler's job.
Especially if the compiler has such strict rules about it in the first place (the compiler can't violate its own rules, now can it?)
 
user142019
Hey motherfuckers.
 
Xeo
7:14 AM
@ThePhD Aaaaand.... how would recompiling just one .cpp go about?
 
user142019
Oh great, I have to make an ERD… with one entity.
 
user142019
How incredibly pointless.
 
@ThePhD Modules.
@ThePhD Modules
@ThePhD Modules
 
user142019
@sehe copy paste fail.
 
Okay I get it. :c
 
user142019
7:16 AM
:8813584 copy paste fail again.
 
@ThePhD Me too
 
@Xeo Well, for my giant project, a rebuild with multiple .cpp files takes on the order of several minutes (5+). Unity-building the whole thing, it takes less than 20 seconds.
 
user142019
@sehe that's my joke.
 
Here's a penny
 
Of course, I'm not calculating the optimal build path for all my CPPs and headers.
A compiler could do a much better job than I ever could.
And a compiler should.
 
7:17 AM
@ThePhD That's (a) not an answer (b) very very old news
@ThePhD The compilation model is such that it can't unless it recompiles everything.
 
@sehe Only because I've manually split up my stuff by myself. If I create modules and have C++ use modules only, then the compiler can take care of where to split TU's and how to do it and how to get the best available build time for any changes, big or small.
Of course, I'm thinking of modules being implemented in terms of the old compilation model.
 
@ThePhD "if I create modules" - wait, are you using the experimental Clang branch?
 
There could be another way that's entirely different that makes it have the best of everything.
@sehe Maybe. >_>
 
There are repeated glitches in the server timezone for SO chat and the main site
 
user142019
Okay, let's see.
 
user142019
7:22 AM
I have half an hour to fix an arcane Heisenbug.
 
user142019
In about an hour.
 
user1357851
bye doggie
 
Byyye.
 
@Zoidberg A few seconds ago would have been your moment. A chat message of about 14 s later was marked as "1 hour later"...
 
user142019
There appear to be repeated glitches in the server timezone for @stackoverflow chat/main site. Invalid cookies and funny timestamps ensue
 
7:24 AM
really?
I don't see nothin'
 
user142019
@sehetw I don't have any problems. Blame Opera. :>
 
i'm actually on Opera
 
user142019
No, you're on drugs.
 
YOLO
 
user142019
No, you reincarnate.
 
7:28 AM
I normalize all my lives to 1 for example Integrate[lives[x],{x,-Inifnity,Infinity}] =1
YOLO
 
user1357851
and reincarnated into a donkey instead
 
user1357851
fall into a hole
 
user142019
Vimium and Gmail = heaven.
 
user1357851
but the hole got blamed instead, coz you made it an asshole
 
@Zoidberg is vimium something like vimperator?
 
user142019
7:34 AM
What is Vimperator?
 
user142019
Vimium is Vim shortcuts for Chrome. Because fuck mice.
 
a firefox vim plugin
 
@Telkitty That was actually pretty good.
 
user142019
Scroll with J/K or GTFO.
 
Question.
Would you rather bound your 3d models with a BoundingBox, or a BoundingSphere ?
 
user142019
7:37 AM
Depends on the model.
 
user142019
If the model is a sphere, a boundingsphere. If the model is box-like, a boundingbox.
 
:3c
That's so helpful.
 
user142019
It's like asking whether you like a perfectly cubical box for an object or a flat box.
 
user142019
Like, for what object.
 
I don't get to decide "what object"
This loads "models". I'm not going to introduce a runtime class for "maybe it's a sphere, or maybe it's a box!"
I'll just go with Box.
Because, Boxes are nice.
 
7:40 AM
bounding box, never heard of a bounding sphere
 
user142019
Make it a parameter.
 
... A wha...?
Oh, wait.
I got it.
union {
     BoundingBox box;
     BoundingSphere sphere;
}
byte Type;
Beautiful, isn't it? <3
 
user142019
boost::variant<BoundingBox, BoundingSphere> FTFY
 
How does Boost::variant describe the last type written to?
 
user142019
And if you do it the ugly union-way, make Type an enum.
 
user142019
7:42 AM
@ThePhD it stores the index of the template parameter, IIRC.
 
Ah.
A byte? An int32?
 
user142019
Do I know.
 
Probably byte.
No reason to use an uint64, lulz.
 
user142019
There is no byte. It's called char.
 
unsigned char, there.
 
7:43 AM
He typedef'd it probably
 
user142019
Also, unless you're going to load millions of models, you shouldn't care about that.
 
user142019
(And I hope you reuse models if you need to draw them multiple times.)
 
=l
 
int vectorizes better and might give better performance...
 
Padding will always fill the space anyhow.
 
7:46 AM
@Mikhail What are we talking about?
 
@Mysticial this is an overall good question...
 
When I see the word "vectorize", I get excited.
2
 
@Mysticial boost::variant, and whether the index value should be a byte or an int.
 
ah
 
IMO I'd try to use size deducation with some TMP to pick the best index value,
but the accessor would always return a std::size_t
 
7:48 AM
@Mysticial nope, I'm sorry. But MSVC doesn't really do strict aliasing at all, so type punning kind of works by default
 
@jalf aww... :(
 
@jalf Unions? <3 I can haz them then? <3
 
There might be an official word on it somewhere, but I don't know where
@ThePhD what about them?
 
union { float f; int i; }; // <333
 
> learnfun & playfun: A general technique for automating NES games cs.cmu.edu/~tom7/mario
 
7:51 AM
@ThePhD yeah, undefined behavior (which just so happens to work because a lot of code uses it)
 
<3
 
do you have some kind of love affair with unions? :|
that's mildly disturbing
I mean, how often do you need to do this kind of type punning?
 
@jalf It's a never-ending debate between the engineers and the language pedants.
 
@sehe would be cool if they used NOMAD
 
@Mysticial Oh, I was talking to @ThePhD :)
 
7:54 AM
@Mikhail "they"?
 
@jalf It's part of my engine now. <3
 
@jalf I know, but I thought I'd jump in. :)
 
7 hours ago, by ThePhD
user image
 
Xeo
@ThePhD Your engine sucks.
2
 
@ThePhD for what? I mean, do you often do type punning between int and float just for the heck of it?
 
7:54 AM
@Xeo <333 cowboy_cast, ftw <33
 
user868935
anyone ever run into a lnk1104: cannot open file 'LIBC.lib' error?
 
presumably the unions serve some kind of purpose?
 
Xeo
@jalf He plans to type-pun ALL the things
 
@jalf Actually, the only reason I use unions myself is to type-pun.
All but one of my uses of union in my entire pi-program is for type-punning.
 
yeah but how often do you do that? He sounds like it's a major part of his code :)
 
7:55 AM
> If you want absolutely nothing said or done, ask a Cat
 
Usually between SSE and scalar types.
 
Some people have asked for the source code to my “left-arrow operator”. So, written hastily last night: http://ideone.com/jWHxu2 #accu2013
^also hilarious
 
@sehe woah...
 
@ThePhD What. The. Fuck.
 
@sehe #thatissocool
:D
 
7:58 AM
:)
 
@Mysticial That's the kind of quasi-standard thing that's not too far away from being blessed, yes, and that is well within the spirit of e.g. common initial subsequences. The problem I have with 'defusing' unions is that I don't want to make it look like using them with pointers is innocuous.
Don't try this at home.
 
@jalf Which implies major parts of his code are basically UB, no? :)
 
@BartekBanachewicz technically all of it.
There's no such thing as partially UB, after all
If a program exhibits UB, it's UB, end of story
 
@LucDanton What does "common initial subsequences" mean in this case?
 
UB is viral :)
 
8:02 AM
@Mysticial If you have struct small { int i; }; struct big { int big_i; int j; }; then it's fine to do p->i even if p is a big* in disguise.
It's also transitive so it can get quite elaborate.
 
@LucDanton Ah. But that case is explicitly specified by both C and C++ standards right?
 
@BartekBanachewicz Beautiful, isn't it?
 
@Mysticial Yup. Hence I wouldn't be surprised if some of the unions restrictions were either relaxed or 'reified' into something -- if it's something almost every implementations has, and it is useful, it ends up in the standards at some point.
 
@ThePhD makes my eyes bleed. And not because of the type-punning union
 
@jalf :3c
I think it's wonderful~
 
8:05 AM
@LucDanton Ah. I'd certainly hope that the union type-punning gets extended to C++.
 
I'm going to cowboy_cast everything~
 
Xeo
Please go out lemming-style right now.
 
Also something quasi-standard everyone uses is shared libraries.
 
:) yup. casting a random 'void*' to a function pointer and then call it. Craziness
 
@sehe Nah that's non-standard. You have to bitblast one into the other. Crazierness!
 
8:09 AM
I think I have one other type-union that I use in one place, though.
 
user142019
@sehe LLVM's JIT-compiler makes you do that. :v
 
@LucDanton Hmmm. What's the difference? Or what are you referrring to as 'bitblast' (address fixup at runtime link/image load?)
@Zoidberg Anything with dynamic load ability makes you do that. Turbo Pascal 4 'Overlays' did that
 
^ My favorite. <3
 
user142019
What the fuck.
 
user142019
Die.
 
Xeo
8:11 AM
@ThePhD Uhm... guy.... FUCKING BOOST VARIANT
 
@sehe void* -> void(*)() is not in the Standard. man dlopen recommends writing to *(void**)&my_function_pointer, but I'm a stickler to aliasing rules so I can only ever recommend copying the bytes of the one pointer to the other.
 
@Xeo But why? This is so much more fun!!! <3
 
Xeo
Although I'd really like to know why you need that thing at all.
5 mins ago, by Xeo
Please go out lemming-style right now.
 
I think I actually use this one in a single place, though.
Um, lemme see...
Huh
 
@LucDanton Ah. That way. So, you're saying you can't even use the cast I implied. I didn't actually have that in mind as a cast. memcpy would be more idiomatic
 
8:13 AM
I can't find any uses of it...
 
user142019
ThePhD, act normal and stop abusing unions you idiot, or else I'll union-cast you to a pile of poo.
 
IMO unions are from another age
 
I have a silly module class over libdl and I do that.
 
@ThePhD That might be your worst pitfall. Just observe the sheer amount of oddball commenting, naming and so on in your code and it might become clear that this is sometimes quite a morbid design force
3
 
@BartekBanachewicz
 
8:15 AM
@ThePhD Telkitty also calls her pictures beautiful. This code sucks, is bad and you should feel bad. If you are posting this just to troll, then fuck you.
 
OH WAIT
 
@sehe Yeah. The fun should reside in problem-solving, not in lulz-coding - cc @ThePhD
 
@kbok Aye?
 
I found a usage! <33
 
@BartekBanachewicz Re. variadics: msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx Also, lua room
 
8:16 AM
Aww, wait, damnit...
I use reinterpret_cast like a good boy...
 
15 hours ago, by Bartek Banachewicz
@ThePhD You might also want to consider the possibility that your project might turn out as total crap. There's always that possibility
 
That's no fun.... =/
 
@sehe yeah, that, pretty much. The amount of garbage comments in the code just indicate to me that "I don't have a clue what I'm doing, but it looks hackish and therefore it is cool", which translates to "my code is useless and I don't take it seriously and it is not worth using, by me or anyone else. I also have no confidence in it myself, or I wouldn't need all those "ironic" comments"
2
 
To me it's just about a lack of rigidity/efficacy. Lemme browse for the example when I concluded this (some time ago)
 
@jalf Which is annoying when posted continuously. Oh my god finally someone said that.
 
8:20 AM
That might actually be one of the strongest arguments in favor of self-documenting code. You can't rely on comments to explain away the idiocy of your code, or to distance yourself from it.
 
@jalf I think by that definition, I have the worst code in the world. :)
Anyways, 3:20 AM here, off to bed.
 
Niiiiight. <3
 
@Mysticial don't we all? :)
 
:)
 
also, it wasn't a definition :)
 
user142019
8:22 AM
 
cowboy_casting shall carry us into a new age, Zoidberg. <3
An age of UB and terrible, horrible messes.
 
@ThePhD we're already there
 
If a stranger noob went in and shown that code hell would break loose.
 
I'm waiting for the next union question so I can post that code.
I will get downvoted to oblivion, but it'll be worth it.
 
@BartekBanachewicz I can't really find it but ideone.com/MOJGgE is another example. What that needed to have was test cases (at least with asserts), instead of "funny output" that no-one will be able to validate unless he wrote it himself <30s ago. /cc @ThePhD
 
user142019
8:26 AM
#define union thephdyousuck problem solved.
 
@sehe Asserts and real tests are boring. =[
 
@Zoidberg #define thephdyousuck thephsyduck // hola
 
Besides, did we really need asserts and test cases?
 
@ThePhD Ok know it now. You can stop drowning out the message.
@ThePhD You tell me
 
user142019
8:28 AM
What the fuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuck.
 
user142019
The code part of this project counts only for 20%.
 
@ThePhD Please tell me you are trolling
 
user142019
The remaining 80% is that article about social media.
 
user142019
Kill me.
 
user1357851
Are you sure you want to quit life: [YES]/NO
 
8:30 AM
accu sounds like fun. Why am I not there?
2
 
user142019
Because you are where you are right now.
 
By the time that ideone came around, sbi, yourself, Robot, and Insilico had helped me forumulate the core idea. We didn't need real tests because the requirements were simple: callbacks that we didn't need to have tokens for. The tests were built into the code from the start: CATCH, well-written tests, and other stuff was far from necessary.
 
@sehe Say, I'm starting to pass some stdin input via Vim when running test programs via :make. a) is it wrong? b) what's this feature called so that I can look it up in the help and/or look up some plugins that improve the experience
 
In the saner part of the world, Lundi will be under Continuous Integration
 
@BartekBanachewicz <3
 
8:34 AM
@LucDanton Mmm. Not sure I completely follow. What exactly do you do? AFAICT :make doesn't allow input redirection?
 
user142019
Ohhh tomorrow GCJ starts.
 
@ThePhD You have less meaning in your posts than a box of cereal lately.
 
@sehe Doesn't it? If I run :make with a simple executable that waits on stdin then I can give some input.
 
@Zoidberg Can we have the lobster back?
 
user142019
 
8:36 AM
That's me banging on the keyboard, not feeding some other data.
 
@LucDanton yeah, but there wouldn't really be a way to supply that input automatically, then?
 
@sehe Oh, don't know about that. The premise was user (i.e. me) input, sorry.
 
user142019
It's feels my school lacks something…
 
user142019
goodness?
 
Xeo
@LucDanton Isn't :make like running that thing the normal way?
 
8:37 AM
@LucDanton Okay, yeah, that's possible. You could just try :'<,'>!make instead? Is there a difference? I presume what you're running into is the fact that there is no terminal emulation in that mode
 
user142019
@Xeo I think you mean :!make. :v
 
@Xeo "the normal way"? Running a process can be done in a myriad normal ways :)
 
@sehe I'm not using make though.
 
Snarky guy in coffee queue eyes off my Bioshock Infinite t-shirt, suggests I "probably haven't even played it". So I told him the ending.
It's like, the best tweet of the month
 
@LucDanton Ok. s/make/\=&makeprg/g then
@kbok Really? So, she has heard the ending from a friend. Meh :)
@BartekBanachewicz Heh. I was playing that prelude earlier this week. Anyways, I agree with the first comment
 
8:41 AM
@sehe Actually I heard Biosock Infinite is easy enough for a woman to finish. :)
 
@kbok looooooooooooooooooool
 
(Actually, I play it in hard mode and it's actually hard. No bad surprises here)
 
@sehe Same effect.
(Took me time because I blasted some open buffers with scons output >.>)
 
user142019
How can I find a value in an std::unordered_map? std::find?
 
user142019
I don't know the key.
 
8:43 AM
@LucDanton So... what is the effect? (lame non-terminal behaviour?)
 
Yes.
 
@Zoidberg Duh. Go search on Stack Overflow
@LucDanton u :)
 
Xeo
@Zoidberg If you don't know the key, the only way is to go through and look for the value manually, so yeah
 
@Zoidberg (std::next(map.begin(), rand() % map.size()))->second
 
user142019
lol
 
Xeo
8:45 AM
@sehe quantum bogo-search!
 
user142019
Oh wait, nevermind. I need an std::unordered_set. :derp:
 
...
 
user142019
xD
 
lol @ "My startup failed" guy. He made, like, every error in the book: news.ycombinator.com/item?id=5534999
 
8:46 AM
@LucDanton well, I'd "just" avoid that. Perhaps you can just ^Z to the alternate terminal and make (or equiv) there
Otherwise, you could prepend :!xterm -c or something
 
user142019
Coño, I suck.
 
@sehe Sounds exactly like what I want.
> xterm: bad command line option "-c"
What did you had in mind here?
 
@LucDanton I knew it, -x probably. Or :!gnome-terminal -[cxwhatnot]. In essence man xterm":)
 
Equivalent to bash -c?
 
Similar, not equivalent
 
8:49 AM
k
 
Anyways, even coolor is :!screen -S mytest-console -X make fluff
 
Good point.
 
Sucks to be on Win8 - no manpages...
 
@sehe go VM go
 
user142019
 
8:52 AM
Ack
Ack
 
user142019
Wat does that mean!
 
SYN/ACK? ACK used to be an ATZ modem response too IRC
And ISTR there's a popular find+grep replacement named ack too
 
user142019
Do I know, I'm from `94.
 
@sehe Is coolor a mix between color and cooler?
 
user142019
Real people use colour.
 
8:54 AM
coolour then
 
@kbok ...
couleur
 
user142019
kleur
 
user142019
Lacking a beard feels weard.
 
 
user142019
Dat note.
 
8:57 AM
@Zoidberg A beird
 
user142019
 

« first day (909 days earlier)      last day (4037 days later) »