« first day (689 days earlier)      last day (4250 days later) » 

10:00 AM
yup. So if you want to start upgrade at a given time
you must provide necessary resources
script wouldn't be able to do that, because there's no "make this up at 16:00 every game"
 
uh, there pretty much is.
 
your opponents make changes to these plans
 
"My current resource income is, 800 minerals per minute. I need 100 minerals for upgrades and have 0 in the bank. Therefore, pause production for 1/8th of a minute to pay for upgrades."
 
you have to be flexible; scripts arent
 
except the vast majority of the time, they don't
if you watch pros play, mostly it's about executing pre-defined builds
they don't go jacking off building random shit
 
10:02 AM
but they have a shitload of these builds, which differ
based on the opponent playstyle in the game
 
Sometimes people really make me despair
 
@BartekBanachewicz So what? Run a different set of scripts, or turn one off or on.
 
@FrankB Uhm … could you elaborate? After all, this isn’t an opinion with which to agree or disagree, it’s a fact – facts can’t be disagreed with, only their evaluation. If you think I’ve made a mistake in the facts or their evaluation then please tell me so and I’ll correct that. — Konrad Rudolph 43 secs ago
 
@DeadMG tell me why AI can't win with humans, then
 
@BartekBanachewicz Actually, a well-written AI can beat most humans.
but more importantly, I'm not suggesting that an AI plays the game for you. Merely that you actually play the game, and let the scripts worry about the boring implementation details.
 
10:04 AM
but there are subtle differences that matter
and pros can use them to win over AI
 
meh
what the fuck do I care about the pros?
 
even though AI outperforms their APM 2 or 3 times
 
I'm not a pro, I never will be a pro, and I don't give a shit about what they do.
their experiences will not make my experience of the game fun.
 
but you can't change that the game is tuned for pros :P
 
they constitute a massive minority of the playerbase and are, effectively, irrelevant.
@BartekBanachewicz No, it just makes that tuning fucking stupid.
would you profile and pick the 0.01% of code that occupies the least amount of time?
 
10:05 AM
@DeadMG apparently, they do it
 
meh
I left my phone at home
 
@BartekBanachewicz That I don't disagree with. My whole argument is that it's a stupid thing to do which pisses on the gameplay experience for everyone else.
 
meaning I cannot listen to music
 
k, enough spamming already. agree to disagree?
 
Howdy.
I need help with a kd-tree.
 
10:11 AM
you should ask that question now!
 
argh
I hate having to be places at times
ever since I was late for my Oxford interview
 
Sounds bad.
 
kinda
not that I'd want to go to Oxford
 
@DeadMG I share your feelings entirely, I hate it too
 
anyways, I've got an interview to the government people for benefits and shit, and I've got to be there at 13:30
but I've been feeling paranoid about it ever since I woke up at 8am
 
10:15 AM
Sounds normal.
 
it was in 5 hours. Even I can check the time once every five hours.
also, I discovered an interesting, if curious, fact
all the C++ tuts I've seen are like, hello world, then variables and input
but I did escape sequences after hello world
it just seemed much more natural
 
@DeadMG They've been watching you all this time, you know
 
@DeadMG Where can I see this (not really) famous tutorials?
 
@R.MartinhoFernandes Nowhere yet.
iz on mah hard drive
 
:(
I don't have access to your hard drive.
 
10:22 AM
no, rly?
:P
 
fine
I'll link to them from my Wide homepage
by the way, the formatting is gonna suck
 
I'm not surprised.
:)
 
lol
alright
 
yes! I have just reached my rep-cap. Work done for today
 
10:34 AM
you can view the bad-formatted shit now
 
Oh gawd, you call that bad-formatted?
That's more like not-formatted-at-all.
You just dropped your text files into the HTML body, didn't you?
 
not exactly but close
 
Have you considered that MarkdownPad thingy that sbi linked to the other day?
 
no
but gotta admit, I'm more familiar with Morkdown than HTML
 
Well, when your pages are more readable by looking at the source...
:P
 
10:38 AM
I'm just not used to not having my linebreaks reflected in the output
 
argh
y it set the title to the filename of the markdown file it came from?
that's just le irritating
 
Dunno, I never used it. I just thought you might find it nice. I use a command-line tool to convert my Markdown sources, but somehow I have a feeling you won't like that.
 
dead right
 
no DeadMG
lol
 
10:44 AM
lol
so what did you think of the actual content?
 
@DeadMG I'll read them after lunch. I'm busy writing freaking Android Adapters.
 
lol
 
Basically, you have to implement the functionality you would expect from a decent list control yourself.
 
@R.MartinhoFernandes oh joy, Android. :P
 
lovely
 
10:49 AM
WPF would be so much better than this.
 
Windows Y U NO GIVE ME FULL PATH OF EXECUTABLE
 
I'm thinking more and more that WPF has all the right ideas.
 
holy shit, they put a path in a tiny non-resizable dialog
 
It's just the execution that isn't stellar.
 
user784668
@TonyTheLion Android is still a saner OS than Emacs.
 
10:53 AM
std::list everywhere I look
I guess someone doesn't know about std::vector
 
user784668
@TonyTheLion Or that person loves functional languages.
 
But std::list doesn't provide a head-tail interface, so not even that is an excuse.
 
user784668
@R.MartinhoFernandes Well, it's trivial to make one.
 
Just as it's trivial to make one out of vector.
They share the same interface by design.
 
user784668
10:55 AM
But arrays are so non-FP (even though I use them all the time in Haskell).
 
That's an implementation detail.
It's the recursive nature of the interface that matters.
 
I think there's only very few real use cases for justifying a std::list
 
user784668
And arrays don't kill the CPU caches. We all know killing the CPU caches is cool.
 
Linked lists are nice for concurrent collections.
But std::list is not of much use for that.
 
10:59 AM
so even that's no reason to use it
 
The only reason to use it is splice.
 
@R.MartinhoFernandes and stable pointers to elements
 
@R.MartinhoFernandes a movie?
@Abyx stable pointers? What do you mean by that?
 
user784668
@Abyx With vector you have stale pointers to elements. That's only one letter difference.
 
@Abyx Oh, yeah, that helps too.
Doesn't deque provide that also, though?
 
user784668
11:02 AM
@TonyTheLion The objects don't move in memory when you resize the container.
 
I mean that pointers will be the same after push/pop
 
@Fanael ah right
 
@R.MartinhoFernandes Depends on what mutation you did.
front/back guaranteed not to invalidate pointers or references, otherwise no guarantee.
 
LibreOffice Y U ARE SUCH A CRAP?!
 
11:09 AM
I didn't realize things could be a crap
 
@DeadMG crap is a crap
 
What's up with this UDID thingy?
 
UDID?
 
Some iPhone unique identifier thing that was leaked.
 
unique device id? dunno
 
11:12 AM
@R.MartinhoFernandes That doesn't sound like the kind of thing worth leaking. I mean, each device has a unique serial number, so...
 
user784668
@R.MartinhoFernandes Apple spying on their customers. Nothing interesting, carry on.
 
They're used for authentication or someshit.
 
do you care about that apple stuff?
 
Seems the FBI got their hands on a million of those, and then they got hacked...
 
How would mighty provisioning machinery work if there weren't an unique identifier for each device.
 
user784668
11:13 AM
@CatPlusPlus By guessing.
 
@R.MartinhoFernandes how does that not surprise me
 
what?
 
That looks... decent.
 
11:21 AM
lol
if only I could make the title be something other than the Morkdown file it was exported from
 
You can changed it manually, no?
 
not as far as I can tell
inserted a <title> element but it had no effect
 
Hmm, name the files as per the title you want? :P
 
lol
 
Xeo
1
A: Singleton with multithreads

Pete BeckerAs @piokuc suggested, you can also use a once function here. If you have C++11: #include <mutex> static void init_singleton() { singletonInstance = new Singleton; } static std::once_flag singleton_flag; Singleton* getSingletonInstance() { std::call_once(singleton_flag, init_singl...

Interesting thing this std::call_once function
 
11:33 AM
cool
good to know about that std::call_once
 
Ugh, that title alone...
 
2
A: Singleton with multithreads

Mike SeymourIn C++11, the following is guaranteed to perform thread-safe initialisation: static Singleton* getSingletonInstance() { static Singleton instance; return &instance; } In C++03, a common approach was to use double-checked locking; checking a flag (or the pointer itself) to see if th...

Bare with me cause multi-threading isn't my strong spot... so C++11 guarantees the local static is only initialized once, C++03 doesn't?
 
user784668
@LuchianGrigore Yes. Also, s/bare/bear/.
 
C++03 won't guarantee any fuckin' thing when threads are involved.
 
I wouldn't mind baring with a nice girl.
 
11:36 AM
but C++11 guarantees that lazy static initialization is safe even in concurrent entry to the function
 
user784668
@R.MartinhoFernandes But he's not a nice girl.
 
@R.MartinhoFernandes I don't think Luchian is a nice girl. She's a bitch :P
 
Xeo
@LuchianGrigore See my linked answer in a comment to Pete's answer
 
@DeadMG lazy static init? What's the lazy meaning here?
 
Xeo
@TonyTheLion It's initialized when the function is first called
 
11:38 AM
@TonyTheLion Initialized only when needed.
 
@TonyTheLion It means I don't want to wake up.
 
@Xeo gotcha
 
0
Q: implementing binomial heap

vaxo datuashviligood afternoon guys,i am new on this site and happy for finding it online,my aim is to construct binomial heap,here is my code which i have written right now #include<iostream> using namespace std; void maxheapify(int a[],int length,int i) { int left=2*i; int right=2*i+1; int ...

who wants to bet dato smurf?
 
@DeadMG hahah
 
-1
Q: how to create a vector from -3000 to 3000 with 128 elements

SamuelNLPhow to create this in c++? this is in matlab. I've searched on google but I couldn't find this out. Can someone who knows this help me? a = linspace(-3000, 3000, 128) this is a vector from -3000 to 3000 with 128 elements.

Why was this question downvoted ?
Anyone has a clue ?
(Not that I care much, just wondering)
 
11:41 AM
@DeadMG Dunno, there are plenty of crappy new users coming in every day.
 
user784668
@ereOn Because two people clicked on the down arrow.
 
@DeadMG I made a comment
 
@Fanael That explains how, not why ;)
 
user784668
Now I wonder if there's a Haskell thingy called "down arrow".
 
well, I'm off
foods to eat, interviews with irritating government beaurocrats
 
11:45 AM
Have fun.
:P
 
Sounds like a good afternoon.
 
@Neil I'm gonna back this up. writing lexers is generally trivial. The reason people will delegate to a parser generator is because it's tedious. It's especially Rotten™ if your grammar ever changes. Which is usually the case. It's much the same reason, for me, why people defer to a calculator to multiply 5-digit numbers. You can trivially do it yourself, but it is a chore. /cc @DeadMG
@Fanael that'd be APL
 
2 000 lines of code whose sole purpose is to output a string like {id 34 {{name bobby}{}}}.
I so love that.
 
Xeo
wat
 
It involves a several abstraction layers which allow for a exceptional modularity (which is and will never ever be needed, but still)
Took me only 4 hours to find where I was supposed to make a change.
Who said over-engineering was a bad thing ?!
 
11:56 AM
 
 
I feel like this at the moment
 
Timing!
 
@ereOn Over-engineering is bad thing. By definition!
 
11:57 AM
0
Q: Is a static boost::wregex instance thread-safe?

snowdudeIs it safe to declare a static/global variable with a fixed boost::wregex and then use it from multiple threads without worrying about the regex's internal state (if Boost has been compiled with BOOST_HAS_THREADS)? e.g. boost::wregex g_regex( L"common|test" ); then have multiple threads calli...

wregex reminds me of the Krogan dude from Mass Effect.
4
 
@ereOn erm, faux-serialization or structured logging?
 
If that wasn't clear enough : I was being sarcastic : I hate the codebase i have to work on these days
@sehe I love that one :D
 
user image
5
"It's downloading" is missing.
 
"I'm chatting" is missing.
Oh, wait.
 
Xeo
heh
Rendering does take a shitload of time, though
 
12:06 PM
@Xeo nah, you just need more giga hurtz
 
Xeo
0
Q: Recursive template for pointer generation

lazy_bananaI want to create a template which takes a type T and a parameter N as arguments and 'gives' a pointer of Nth grade for T(eg. if T is int and N is 2 it should give int**) My code so far is: template<class T,int N> struct ptr { typedef ptr<T*,N-1>::t t; }; template<class T> s...

close votes
 
12:31 PM
In Apple world, 1.2.2 is earlier version than 1.08.
 
Xeo
 
@CatPlusPlus than 1.8.0, right
 
Xeo
Hm. How exactly do you calculate an annual salary from a monthly one?
Simply times twelve?
 
Unless you live on Mars.
 
assuming a fixed salary every month, and that there are twelve months in the year?
 
Xeo
12:41 PM
uhm, yeah, I guess.
 
multiplying by twelve sounds good then ;)
 
Xeo
Well, I have a rough estimate of what I want per month
 
Here we get fourteen salaries a year.
I don't see how the number of months in a year are relevant. </sarcasm>
 
@Xeo depends. you might be paid ever 4 weeks, so for annual salary times by 13. If you are paid per calendar month, you need to see if it is scaled such that on short months you get a bit less then longer months
 
Xeo
Though I'm still not completely confident in that number. Don't want to be underpayed, but I also don't want to appear.. mm... arrogant for asking for too high a salary
 
12:46 PM
"gimme all your money"
 
Xeo
@thecoshman It's an online application, and they're only asking for annual salary :/
 
@Xeo how much are you looking for & where? (what country)
 
@Xeo you also need to consider how much they are going to give raises, I would rather work for €10,000 if each yeah my salary doubled
 
Xeo
And it's an obligatory field, can't just leave it blank (that's what I usually do for written applications)
 
@Xeo what sort of job are you look at? some where between €25,000 and €30,000 seems 'ok' for a starting salary, I would say I was expecting the latter
 
Xeo
12:48 PM
@LuchianGrigore Germany, entry / junior level, and I'm currently fixated on around 2.2-2.5, after researching / looking around a bit.
 
@Xeo just write ~0u
I hope they understand C++ syntax
 
Xeo
@thecoshman Hopefully something in the game industry :)
@Abyx clever
(uint16_t)-1
 
@Xeo ¬_¬ jelly
 
Xeo
12:49 PM
should give an OK number :)
 
The game industry usually have really bad salaries
 
Xeo
@ManofOneWay I heard the opposite
 
@ManofOneWay depends... if you're developing farmville, probably :P
 
gamedev == singletons
2
 
Xeo
12:52 PM
Hm, and I wonder what I should put in for "earliest starting date" - "immediately" would apply for my current situation, but I need to take moving etc into account. :/
 
ugh farmville
 
Xeo
@Abyx lol, no
 
I went to a fair talking to different companies, one was a subcompany to EA. I asked about salaries, and they told me the were much lower than other companies. For instance, they could basically get summer workers for free because people volunteered just to get into the industry.
 
every game engine use'em
 
@Xeo immediately applies... they mostly want to know whether you need time before you can quit your current job
 
12:53 PM
@Xeo From what I see on Game Development, yes.
 
Indie or bust.
 
In Sweden, a regular starting salary is around 30k SEK. Their salary was 23-24K SEK.
 
Xeo
What scares me is that they have (DD.MM.YYYY) after that field, which would suggest I use that format, and they may sort with that or something
 
It was this company: dice.se
 
1
Q: In C, given a list of arguments, how to construct a function call using them?

ChicoSuppose there's a list of arguments stored somehow, in a array for example. Given a function pointer, how could I make a call to it passing the stored list of arguments? The only way I see how to do that is by employing assembly. Is there a portable manner? Several script languages are able to...

 
12:55 PM
The battlefield creators
 
Hmm not sure if I even understand what OP is asking here
 
@TonyTheLion It's like, you know man.. when you need to eat food and all you've got to use is your mouth..
 
Xeo
Gah, guessed as much, put in "Immediately" and got "Please input a valid date" :(
 
It's trippy like that
 
@TonyTheLion boost::fusion::invoke maybe
 
12:59 PM
@Abyx in C?
 
@Xeo what website?
 
@TonyTheLion yep, he wants it in C
 
Xeo
@LuchianGrigore ?
 
@Xeo "Gah, guessed as much, put in \"Immediately\" and got \"Please input a valid date\" :("
Let me correct that
 
Xeo
The online application
 
1:04 PM
@Xeo yeah, online... so there's a website involved, right? :D
 
Xeo
lol for the correction
:P
 
Wait, "Learn C the hard way" teaches C++ instead of C? — R. Martinho Fernandes 13 secs ago
 
lol
This guy seems to be writing a bunch of mediocre "the hard way" books since the python version got famous
 
@R.MartinhoFernandes that is hard!
 
@kbok Yeah.
I never looked into them, but now I'm curious.
 
1:19 PM
LPTHW is famous in non-programmer circles.
 
Hmm, "is famous in non-programmer circles"? That sounds like an euphemism for "sucks".
 
@R.MartinhoFernandes Spot on :)
 
So yeah, I follow the 'realtimeWWII' tweets. Hitler was a man for words alright
 
i r the back
 
Is there a way to execute specific code before any function/method in a given file is called, but after main() has started ?
Hint: I'm trying to work around a terrible architecture
 
sbi
1:32 PM
@DeadMG And I thought you're the front.
 
@kbok Ouch, you have my sympathies
 
lol
@kbok Not without calling it explicitly.
obtw sbi
 
@DeadMG This is the current method, but seriously it sucks
 
I'm using that Markdown Pad thing you recommended
do you know how to change the title of the exported HTML document to be something other than the name of the input Markdown file?
@kbok It seems to me that the problem is the reason you want to do this in the first place.
 
@DeadMG Well, the code is in this state right now, so I'm looking for a less anoying way of doing this
 
1:38 PM
well, unfortunately, there pretty much is none.
 
Why they decided to do it that way, though, is beyond my understanding
 
I'm sorry I can't be of further assistance
 
I love how cyclic the reasoning behind they shitty workflow is here
@DeadMG edit the exported HTML...
 
@DeadMG I'll just assume there is no solution then. Sometimes the design sucks so much that you have no other way that to bear with it.
 
@thecoshman For every export of every file?
 
1:41 PM
@DeadMG <insert preferred 'scripting' language>
 
heh
I'd hardly be averse to using C++ to perform such an edit :P
but then I'd have to get an HTML parsing and editing library
 
@DeadMG hardly. You can just pass it as lines of text
 
Xeo
@DeadMG Regex! :D
 
also
I've been writing some C++ tutorials, up at wide-language.com/cpptuts/index.html
feel free to tell me all about the various kinds of cock they currently suck
 
@DeadMG camel cock
 
1:44 PM
maybe we need like, a cock grading system
 
Well, for starters, the index sucks.
 
so like, sucking cockroach cock > dog cock > camel cock > donkey cock
 
Xeo
@kbok I'd generalize that to "navigation sucks"
 
@kbok More shpeshifically?
 
user784668
@DeadMG Donkey cock has the highest suckability, right?
 
1:45 PM
@Fanael I don't actually know.
 
sbi
@DeadMG James recommended that, not me. And, no, not having used it, I know next to nothing about it.
 
@sbi Ah. The robot, he got some chat history wrong. This is the coming of the Burning Hells.
 
sbi
@DeadMG Well, I did drop the thing here, but I learned it from @James at Twitter.
 
@DeadMG There are no explanations about what the tutorials are (expect "C++"), who the audience is or (the most important IMO) in which order the topics should be read
 
oic
 
1:49 PM
I think you need to define the target audience if you want feedback. Are the tutorials for noobs, Java programmers, CS students ?
 
sbi
BTW, since the room is so well-filled right now, can I use the opportunity to make you guys aware of the ongoing discussion with Ira Baxter, who seems to have skipped a night in order to defend his spamming of the site with links to his company.
 
Xeo
@sbi It's pinned on the starboard.
 
@kbok All of the above. Pretty much anyone who isn't already experienced in C++.
 
sbi
@Xeo Oh, I see! Nice.
 
Xeo
Oh, you linked specifically to a comment
 
sbi
1:50 PM
@Xeo Indeed. "Ongoing discussion." :)
 
Xeo
I like how he doesn't respond to the Usenet spamming in any way (or I overlooked it)
 
@DeadMG Also I don't think anyone is going to read "before you begin" before "the beginning"
 
greetings. How is everybody?
 
sbi
@Chimera Everybody is grumpy. Go away.
 
@sbi Y U Grumpy?
 
1:55 PM
I'm not so grumpy
 
Hey @DeadMG
 
Xeo
@sbi: you misspelled "casper", therefore your argument is invalid. /s — Fanael 3 mins ago
lol
 
sbi
@Chimera Because otherwise I wouldn't be the Grumpy Old Man?
@Xeo Yeah, just saw that, too. Not sure what to make of it.
 
Xeo
I think he wanted to type /sarcasm
 
@sbi Makes sense. :-)
 
user784668
1:56 PM
@Xeo Well, /sarcasm is exactly what /s means.
 
Xeo
6
Q: Why is my program slow when looping over exactly 8192 elements?

user1615209Here is the extract from the program in question. The matrix img[][] has size SIZExSIZE, and is initialized at: img[j][i] = 2 * j + i Then, you make a matrix res[][], and each field in here is made to be the average of the 9 fields around it in the img matrix. The border is left at 0 for simpli...

Oh crap, a question for @Mysticial
 
user784668
@sbi Oh, it's three hours too late for you to edit that typo.
 
@kbok Might change that to "Before you code" or something like that
 
Xeo
@Fanael Oh :)
 
@DeadMG Also I like the "helpful"/"not helpful" thing
 
sbi
1:59 PM
@Fanael Did I mention the guy hasn't slept (his company is in Texas), but keeps debating?
 
@kbok I thought it was a pretty apt description
 

« first day (689 days earlier)      last day (4250 days later) »