« first day (889 days earlier)      last day (4067 days later) » 

7:07 PM
@Mysticial I suppose trying to tell the compiler a pointer is 128-bit aligned is not really that big of a deal, since it'll figure it out in the branch prediction logic anyway in a repeated loop?
 
@StephenLin What are you trying to do?
 
align the arrays, and then only call the optimized version for aligned arrays
the compiler doesn't know it's aligned (well, it should, but it doesn't apparently)
since it can't even figure out my simple case originally posted
but i suppose it doesn't matter
 
So you eat the misprediction for the initial check. Afterwards it's all good.
 
and it's the same instruction every time
so it'll work across calls
 
@Mysticial "each" is not a verb.
 
7:09 PM
assuming functions stay at fixed addresses
 
@R.MartinhoFernandes damn you
 
:)
 
user784668
@R.MartinhoFernandes he eachs a lot
 
7:13 PM
> -30 User was removed
MAH REP
 
@CatPlusPlus Bitch about it here: :)
86
Q: Wiping votes on deletion of highly active accounts (-865 points on "User was removed")

seheUpdate As MadScientist quite aptly pointed out this is also highly relevant: Don't throw away all votes when a user is deleted at +395 votes, feature-request I was greeted by this screen just an hour ago: After a little bit of digging and conjecturing, I worked out that the user remove...

 
The nice thing about have low rep is that you have less chances of losing some when a user gets removed
 
Uh.
Hey guys, question.
It's impossible to tell if std::thread has finished execution without having a flagging boolean, right?
 
@ThePhD Sounds like you need a future.
 
Sort of? I don't know what future entails.
At the moment, I just have a thread that spins and does work until all objects of X type that require that work die.
When they all die, the thread stops its loop.
And the function exits.
If a new object of X type is created, it tries to re-spawn the thread (if the thread is dead)
 
@ThePhD Nobody does
2
 
Oh... I'd have to use std::future and std::async.
 
@ThePhD Won't that risk spawning one thread per object?
 
7:27 PM
@CatPlusPlus can't predict the future man (I assume that was the joke and I'm ruining it)
 
@R.MartinhoFernandes Well, I have a std::atomic<bool> threaddone variable. I use it to make sure the thread si actually dead.
It, uh
It looks like this (object's constructor):
    if ( threaddone ) {
    	if ( scanthread.get_id() != std::thread::id() )
    	scanthread.join();
    scanthread = std::thread( ThreadedScan );
   }
I hate markdown. :c
 
@ThePhD I don't see how that changes anything.
If that thread is done before the next object comes along, you ill spawn a new one.
 
evening fellas
 
Why not keep it alive?
 
Well, I thought that keeping an infinitely-spinning thread alive would be a waste of CPU resources, which is why I kill it after the last object is destructed, or create one the first time an object is created.
 
7:31 PM
Why would it be spinning?
 
How else would the thread not die?
 
By blocking.
 
while (true) { /* ... */ } <--- this generally can shoot your CPU usage up to 100% when ti spins indefinitely.
I could potentially use a ManualResetEvent on the thread to keep it's CPU usage to 0, but I thought having it die and not be used (or just never exist if the person never makes an object in the first place).
 
Just put a queue there.
 
I.. sort of do that already?
I think.
 
7:36 PM
@StephenLin Yes
 
@CatPlusPlus sorry, then, for being square
 
This is, uh. What the ThreadedScan looks like: coliru.stacked-crooked.com/…
 
0
Q: Java - Get minute difference between two second values

user2203078I have two values ​​in seconds. One value is the current time in seconds, the other is a time in the past in seconds. How can I get the difference in minutes between these two values​​ in java? Thanks, I hope this isn't a duplicate I just found some questions with milliseconds or others

Really.
 
I have 2 lists of pending objects to be either added or removed. I add them to the active list and I do work on the separate thread. When all the objects are dead, I kill the thread. By Robot's suggestion, I could just never kill the thread and use a ManualResetEvent to keep the CPUUsage to 0 before I trigger it off again...
 
7:39 PM
Woah, deja vu. I feel like someone asked how to subtract before and then a picture of a cat was posted.
 
But how do I get from base 42 to base 88 without using base 69
 
That was a ridiculous conversation, roflmao.
 
@CatPlusPlus I asked @DogPlusPlus already if you two were a team, and he claimed to be your superior officer
@CatPlusPlus is that accurate?
 
do dogs rule over cats?
 
7:42 PM
Can you pass arguments to a std::thread ?
Or does it always run off a void work (void) function?
 
@ThePhD yes, it's just like std::bind
stackoverflow.com/questions/15080015/… (see the answer, not the question)
it's even defined in the same way in the standard
 
MMmm.
Okay.
 
just watch out for the gcc bug
 
Eh.
 
oh gross
 
7:46 PM
I'll get into forwarding template variadic nonsense later.
 
4
A: GCC 4.7.2: std::thread with pointer to member function

Andy ProwlSeems like tonight it's GCC Bug Party :-) Jokes aside, this is most certainly a bug. My answer to the linked question actually contains the proof, but since it is not emphasized, I will repeat it here. This is how the INVOKE facility, in terms of which the behavior of std::thread's constructor ...

 
Right now, what I have works.
 
those carets are in GCC 4.8.0 I forgot
 
I just need to make a few changes so I can monitor groups of 64 wait objects at once
For maximum responsiveness and performance.
Honestly wouldn't be this much of a problem, though, if I could just use Change Journals ._.
 
gah, I now need to implement Isomap in Matlab for a uni assignment
 
Ell
8:00 PM
I'm attempting java decompilation again
So many errors xD
 
Wtf... D3D_FEATURE_LEVEL_11_1 is an invalid argument...
 
It's not allowed on non-Windows-8 hardware.
Period.
 
Oh really?
 
Yep.
 
Good to know
 
8:07 PM
Chain your requests.
 
If creating at a specific feature level doesn't work, downgrade and change parameters until something works.
 
Lol.
 
@ThePhD Well I had D3D_FEATURE_LEVEL featureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0 };
 
8:08 PM
Google is really trimming a lot of its services.
 
Maybe they will discontinue search tomorrow.
 
and it kept failing until i removed 11_1
 
@Borgleader ... That's the same feature level for both. o_O
Lulz.
You can specify NULL
and it'll just choose the best one out of all the feature levels.
 
Ah
The thing is, I want my engine to be D3D11 only
 
Though, I think for Windows 8, you must SPECIFICALLY request D3D_FEATURE_LEVEL_11
 
8:09 PM
so it has to fail if that one doesnt work
 
That depends.
 
also fuck windows 8
 
If you're not using Tessellation Wankery, you can still use the D3D11 Api
 
That didn't make much sense.
 
I hate the UI
 
8:11 PM
Anyhow, you can simply chain requests like this: coliru.stacked-crooked.com/…
 
Ell
regex s don't backtrack do they? o.O
That code looks extremely dense
 
In this case, I have a variable "featurelevel" that requests the specific feature level I want to create with. In the end, after initialization, I can check GraphicsDevice->FeatureLevel() to see if it meets or exceeds my FeatureLevel.
 
Ell
Meh my regex works on regexr but not netbeans >.<
 
At the moment, I'm not using any fancy D3D features and my engine is working on d3d 10 capable hardware.
I have not tried it on a strictly 9.0c (9_3) graphics card.
 
My goal is to 1up my teacher's game engine. Which is a stupid goal because I'm an idiot :P
 
8:14 PM
Ah.
Good luck.
I sent that guy an e-mail and he's just never ever gotten back to me.
What is with people and not getting back to me? =[
 
@ThePhD Who?
 
Even Havok hasn't gotten back to me.
@Borgleader Person I am trying to recruit for my game project, of course.
 
The artists always respond fast.
The programmers? Never ever hear from them.
The last person I sent an e-mail too just didn't even bother to send me a reply back.
It looks like this person is going to do the same too.
 
they probably think it's spam
 
8:18 PM
@ThePhD Duuuuuude. Return codes?!
 
That can't be the case, because before I send these people e-mails I meet with them in person. I give them all my contact information.
 
oh wait, those are the raw D3D APIs.
 
@DeadMG It's D3D, what do you want me to do. D:
 
my mistake.
 
If you notice, though. I do throw if all creation has failed.
See? I am learning!
 
8:19 PM
@ThePhD Maybe you give it wrong?
 
Maybe... I don't know, though, because the artists get back to me. :c
I think the programmers just don't like me or maybe they're busy or something.
Hell if I know. ;~;
 
> "Liberté, Égalité, Fraternité" (or, in bastardized form, Freedom, Equality of Opportunity [to make money], and Patriotism).
 
Okay.
Now I need to apply std::regex
er, boost::regex
Because std::regex is apparently bollocks on GCC
 
Xeo
Hm. I found two Coliru tabs just now, and I have no fucking clue wtf I was trying to do in them
 
lol
 
8:27 PM
Perhaps your German Sleeptalking has advanced into a Super Secret German Talent: Sleep Coding!
 
Do you guys know of other good resources for games (aside from GDC Vault and Gamasutra) ?
 
None.
They all blow dick.
 
Damnit :(
 
@Borgleader Better, start with: what are you trying to do?'
 
@ScottW If you like the genre, may I suggest you House of Cards?
 
8:30 PM
Any windows programmers here?
 
Nope.
 
ye
 
Ell
@kbok I'm not, but I'm interested anyway
 
What do you use as hinstance when registering a window class? Is GetModuleHandle(0) ok? What's up with ((HINSTANCE)&__ImageBase)?
 
@ThePhD I want to make a game engine using D3D11 for graphics (I plan to wrap the shader API neatly so it's easy to add shaders and post process effects), PhysX for well... physics (again I'll wrap/abstract it so it's easy to add things like triggers, physics actors, etc), and Wwise for sound (this one isn't free for commericial use but i dont plan on making any money)
 
8:32 PM
@Borgleader Ooookay. What're you going to make with it?
Something 2D? Something 3D?
2D physics is different from 3D physics.
 
raymond chen covers those best
he has an article on it
 
@ThePhD 3D
But I'm more interested in making the engine than a game with the engine (oddly enough)
If at all, what I'll make is a tech demo just to show what the engine can do
 
Mmm.
Think of a situation of what you want the engine to do.
 
If I wanted to make a game I'd just use UDK/CryEngine
 
Then, start building to make something like that. Along the way, you will have to acquire the skills and technical prowess to make it work out.
Just starting out with "I want to make an engine" almost never works, because you have no idea what to test it against.
 
8:35 PM
Oh and if I have time I want to make an editor to go with it
 
:3c
And editor to do whaaat?
 
(this is the part where you go "You're batshit crazy")
 
You're not crazy.
 
Well you know, level editor, UDK style
to create levels, place objects in levels, etc
 
It's just this: until you can fill in the "I want to make an engine {To Do This}", then you're going to have a very hard time keeping to the project and building it all the way up.
If you're doing D3D11 graphics, cool: figure out something you'd like to see made with those graphics and then try to make that.
You'll have to build the basics of an engine along the way.
And it becomes much easier when you have a tangible picture in your head of something you'd like to make.
 
8:37 PM
You're not crazy, just ambitious.
 
Well, see, like I said, there's an engine I want to "one-up". And here's what it can do: equals-forty-two.com/2012/04/15/inf4715-this-year-projects-2012
 
It's interesting that a year ago everyone was trying to make one game/engine/whatever-the-hell-that-thing-would-be. Today everyone is trying to make their own instead.
 
How do you one-up that, exactly?
 
Keep in mind those examples are made by teams of 4-5 students who have other classes to attend.
 
More features?
 
8:39 PM
I'm not thinking properly at the moment. Am I crazy or am I right? stackoverflow.com/a/15591741/150634
 
I don't understand how this mingw build is structured.
the mingw64/include dir is basically empty and they're all under mingw64/lib/gcc/.../include
O_o
 
@ThePhD More or less yes.
 
@Borgleader bloattttttttttttt
 
The thing is, shaders are rather hard to use in that engine.
And animations are really annoying to work with because it uses the .x format which is no longer supported
 
Command field in Coliru is now resizable. Slightly awkward though...
Lol, I'm doing web dev so wrong.
 
8:41 PM
If Coliru is wrong,
I never want to be right. <3
 
So there are things I want to streamline. Also, making the move to D3D11 (that engine is D3D9) will give me access to geometry shaders and tesselation
 
@StackedCrooked "awkward" is a bit of an understatement.
 
Blame the technology.
 
Also good job on finally changing the colour of the output box.
 
@R.MartinhoFernandes The natural way would be use the margins as grippers. However, that is very difficult. It requires emulating drag action JavaScript.
 
8:43 PM
> I decided to go through my entire include and change it all to unicode.. probably the dumbest thing I've ever done :S
 
But the buttons getting bigger is really silly.
I agree.
 
> how do you read a bitmap using unicode?
Oh boy.
 
LOL
 
@R.MartinhoFernandes ROFL
 
:3c
Well, it's a Unicode Question~
You should go answer it, Robot~
 
8:44 PM
Where do you find this stuff?
 
0
Q: Unicode problems

CantChooseUsernamesI decided to go through my entire include and change it all to unicode.. probably the dumbest thing I've ever done :S I used the following: #define UNICODE #define _UNICODE #ifdef UNICODE typedef std::wstring string_type; typedef wchar_t char_type; typedef std::wfstream fstream_typ...

 
I'm pretty sure the stream objects don't change how they read files if you're just reading bytes.
 
@CatPlusPlus who was wanting access to what now?
@TonyTheLion oh, turns out my family are not utter idiots, England is back on :P
 
user142019
Yay.
 
user142019
I have the Guru badge.
 
8:48 PM
 
A wild Zoidberg appeared!
 
Hi all. I'm going to quickly imgur an image for a meta comment here, hang on
 
@Zoidberg Congratulations, that badge no longer means anything. "Oh hey I got the guru badge, the one even Zoidberg can get". :P
11
 
user142019
@KonradRudolph ;_;
 
How often do you guys see account removals? i.stack.imgur.com/hj0NJ.png
 
8:49 PM
void main … o.0
 
user142019
@KonradRudolph That's Java.
 
@sehe my lord! I think it really is broken that you lose all the rep when a user is removed
 
user142019
We got that exact example in Java class at school. xD
 
@sehe Whoa, that’s pretty bad … I lost a few rep points yesterday because of that, but not nearly as many
 
@sehe Not often. Quitters don't upvote me.
 
8:50 PM
@NickCraver And, guessing from the frequency of events like these, I'd be willing to bet this seems to be the rule, rather than the exception: no less than 6 account deletions registered in just about 6 weeks, just for me - or is it a symptom of some kind of cleanup campaign? — sehe 44 secs ago
 
I have to say
Working with the win32 api and COM is a breeze compared to Objective-C
 
@R.MartinhoFernandes Yeah. I'm answering the wrong type of question, apparently :)
 
@kbok This.
 
Ell
(new class_2158).method_8604("REG_DWORD_BIG_ENDIAN", 5);
var10000 = new class_2158("REG_DWORD_LITTLE_ENDIAN", 4);
field_5188 = var10000;
Hmm. Now what does that do? xD
 
It shows awkward variable naming
 
8:51 PM
@Ell Leaks memory.
 
Ell
It's decompiled bytecode
Ooops. I forgot to mention. It's errm... java
 
Java?
 
Ell
runs away
 
@kbok REG_DWORD_LITTLE_ENDIAN
 
Ell
I'm just curious as to what that top line could do
 
8:53 PM
It's obviously allocating a class_2158 and calling method_8604
 
@Ell Creates an object of type class_2158 and calls method_8604 on it.
 
I'm trying to understand the constraints on the gcc asm instruction. In particular, this statement from the docs "You should only use read-write operands when the constraints for the operand [...] allow a register." Does this mean that using "+rm" as an output is forbidden? Or is it just "+m" that's not allowed? Or am I totally misunderstanding what they're trying to say?
 
Hello world!
 
8:54 PM
Ahoy
 
Ell
@R.MartinhoFernandes yes. but method_8604 is actually a constructor, so the code actually looks like new class_2158("REG_DWORD_BIG_ENDIAN", 5);
But then nothing is done with that o.O
 
@R.MartinhoFernandes Too long!
 
@Ell Your decompiler sucks?
 
Ell
@R.MartinhoFernandes It's the best one I can find :'(
none of them give error-less output though, which sucks
 
@R.MartinhoFernandes it's too important to be polite
 
8:55 PM
> [about manual memory management] it’s becoming clear that modern C++ can largely do away with it, [...]
I'll just say that if that is true, you C++ programmers are a bunch of idiots.
 
Ell
@R.MartinhoFernandes why?
 
I've been doing that thing you guys do with includes
 
that thing these guys do with includes!? wahhhhhh?
 
@Rapptz Sounds kinky.
 
lol
I was bored and wanted to see if that works
 
8:58 PM
@Ell There is no other explanation for taking twenty years for it to be "becoming clear".
 
but I meant including things half way through
 
@Rapptz Ah. I do that often in demos.
 
user142019
@R.MartinhoFernandes sauce?
 
But what they were talking the other day was different: it was #include stuff in the middle of a class.
 
Any still have that starry stroustrup picture?
 
8:59 PM
@R.MartinhoFernandes I've seen things like #include "mytxtfile.txt"
 

« first day (889 days earlier)      last day (4067 days later) »