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

07:02
@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?
07:07
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
Xeo
07:14
@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
07:16
: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.
07:17
@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
07:22
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
07:24
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.
07:28
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
07:34
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
07:37
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.
07:40
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
07:42
@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.
07:43
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.)
int vectorizes better and might give better performance...
Padding will always fill the space anyhow.
07:46
@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.
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
07:48
@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
07:51
@ThePhD yeah, undefined behavior (which just so happens to work because a lot of code uses it)
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 :)
07:54
@Mikhail "they"?
@jalf It's part of my engine now. <3
@jalf I know, but I thought I'd jump in. :)
Xeo
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?
07:54
@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
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 :)
07:55
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
07:58
:)
@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 :)
08:02
@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~
08:05
@LucDanton Ah. I'd certainly hope that the union type-punning gets extended to C++.
I'm going to cowboy_cast everything~
Xeo
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!
08:09
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
Xeo
08:11
@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
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
08:13
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
08:15
@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
I found a usage! <33
@BartekBanachewicz Re. variadics: msdn.microsoft.com/en-us/library/vstudio/hh567368.aspx Also, lua room
08:16
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.
08:20
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
08:22
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
08:26
#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
08:28
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
08:30
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
08:34
@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
08:36
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
Xeo
@LucDanton Isn't :make like running that thing the normal way?
08:37
@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
08:41
@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.
08:43
@LucDanton So... what is the effect? (lame non-terminal behaviour?)
@Zoidberg Duh. Go search on Stack Overflow
@LucDanton u :)
Xeo
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
Xeo
08:45
@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
08:46
@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
08:49
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
08:52
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.
08:54
coolour then
@kbok ...
couleur
user142019
kleur
user142019
Lacking a beard feels weard.
user142019
Dat note.
08:57
@Zoidberg A beird
user142019

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