« first day (538 days earlier)      last day (4408 days later) » 

12:04 PM
... erm ... what does it do?
 
obviously, it calls apply<void> with the given arguments
how could you not see that? numpty :P
 
12:21 PM
2 messages moved to bin
 
@CheersandhthAlf why delete?
 
apparently üngood urls with offers from time
 
oh my... was it off-topic or something?
 
@bamboon Bin, not delete
 
still, why?
 
12:22 PM
...?
 
@rubenvb Spammy links
 
@CheersandhthAlf wut?
 
29 secs ago, by Cheers and hth. - Alf
apparently üngood urls with offers from time
 
did I post something offensive or something?
 
they were fine, just some links to a online Time article...
 
12:23 PM
the time 2012 100 ranking is offensive?
 
well, anyway, now room looks alive
 
That's what I think
 
oh now i have to open one of them
 
anyway, it's weird how the Anonymous organization suddenly came on top though..
 
12:24 PM
@bamboon Come one. Get off it! Nobody said anything about offensive
 
@CheersandhthAlf you removed URLs you didn't even know where they went?
 
@IntermediateHacker No it's not. It's what they do: hack!
 
wait, this has been done before too:
Time 100 is an annual list of the 100 most influential people in the world, as assembled by Time. First published in 1999 as a result of a debate among several academics, the list has become an annual event. History and format The list was started with a debate at a symposium in Washington, D.C., on February 1, 1998, with panel participants CBS news anchor Dan Rather, historian Doris Kearns Goodwin, former New York governor Mario Cuomo, then–political science professor Condoleezza Rice, neoconservative publisher Irving Kristol and Time managing editor Walter Isaacson. The list was firs...
 
@rubenvb right. i do not click such urls. especially not time mag
 
@sehe Does it help understanding the snippet if I tell you that variant has type e.g. variant<int, std::string>?
 
12:25 PM
the time 100 got hacked in 2009 too.
 
@sehe I am just asking why they got deleted(moved to bin)
 
@CheersandhthAlf well, why did you take the time to move them?
 
@IntermediateHacker they ignored readers' voting and chose the opposite candidate. they regularly trick my mother into subscribing. they're evil
 
Then don't keep shouting reasons that have **not** been named.
Asking doesn't require coming up with your own out-rageous reasons: that just serves to be outraged
 
@CheersandhthAlf Please don't let your personal experiences cloud your objective moderator judgement
 
12:27 PM
@rubenvb It's called snap judgement for a reason: it doesn't take time.
 
@sehe "time", I get it ;-)!
 
in bin, 8 mins ago, by IntermediateHacker
how the hell did Anonymous get 20,000 votes in a day? They were on 9th in this poll only yesterday.
 
@CheersandhthAlf does this mean, they won't give a damn to the reader's poll, and choose their own selections for the Time 100?
 
in bin, 8 mins ago, by IntermediateHacker
good to see these . three . people though.
 
@sehe markdown fail!
 
12:28 PM
@IntermediateHacker if by chance readers vote for someone they feel OK with, then presumably they will honor the votes
 
hope they include the three people I mentioned though.
 
@rubenvb hehe fixed
 
hey, reddit's Erik Martin is on the list too.
Bill Gates should be on the top 10 too, though.
 
@sehe chill dude, you are the one raging about me. replace "offensive" with any other reason, if you don't like the word. I was just asking a question, no need to go into frenzy mode
 
WTF! Bill hasn't even been nominated, that's just unfair.
 
12:31 PM
@sehe Cool. I was wondering if you knew about its limitations.
I made a simple test program that has several threads increment an ordinary int.
If I install a std::lock_guard or a pthread_spin_lock, helgrind is happy.
However, if I roll my own spinlock using an std::atomic<bool> lock and a while (lock.exchange(true)) spin, helgrind tells me that access to the increment variable is in a race.
 
Tin
hi guys, i don't want to interrupt your conversation, but would like to ask you for some advice, more concretely, it's about generating random numbers using the std::uniform_real_distribution<> function. Could you pls have a look at the following pseudo-code? pastebin.com/qJ2HnFTZ
the thing is that i've a class function myclass::doSomething(), that is called many times
and inside of this function i then generate the random numbers
to do that, i define static engine inside of the myclass::doSomething() method
that is then used for the std::uniform_real_distribution<>
my question is whether the way i'm generating the random numbers is correct?
or if there's somehow biased to some specific values?
@KerrekSB, @CheersandhthAlf do you guys have maybe any suggestions/comments on that?
 
@Tin in my experience, if you let a mathematician loose on your code, he or she will find a bias. :-) i'm not a mathematician
you can run tests though
 
Tin
or let's put the question in another way
could you have a look at line 25, 26
i just wanted to know, if by using a static engine inside of a method that is called many times, makes sense
@rubenvb what is also your impression on that?
 
12:46 PM
@bamboon 'Is the time 2012 100 ranking offensive?' is a question
'the time 2012 100 ranking is offensive?' is an outcry/indignation (can't find a better word in English)
 
Tin
@CheersandhthAlf, the test would be for instance to class the randomDobule() function many times and see what are the generated numbers?
 
aargh
DX SDK why u no work with VS10? epic fail
 
@Tin i don't know. i only know, if you fear that the numbers have an undesirable property X, then test for X. and if you require some property Y, then also test for Y.
 
@Tin there are rather popular standardized test benchmarks for random generators. Google a bit.
Disclaimer - I never got them to work, but then again, I'm not so ambitious to make my own generator
 
Tin
@CheersandhthAlf, @sehe thanks for the suggestions
@sehe, actually i don't want to make my own generator
 
12:51 PM
@Tin my impression on what exaclty?
 
@Tin Yeah, I just found out by looking at your code. As long as it is mt1337 + uniform_int you're doing it the right way :)
 
Tin
@sehe, @rubenvb i just wanted to know whether the way I'm using the std::uniform_real_distribution<>() function is correct in the following link: pastebin.com/qJ2HnFTZ
@sehe, would it be a problem to initialize the seed() or say engine() inside of a method?
 
@Tin, no: you should use the same instance of uniform_real_distribution each time to get uniform distribution, IIRC
 
Tin
that's why i defined it as static: static std::mt19937 engine(rd());
 
@Tin I guess so yes, but I'd move the construction to a seperate line for readability. Too may parentheses.
 
12:56 PM
@Tin No, you don't. You do double curThreshold = randomDoubleEngine(engine, treshmin, treshmax ); and return std::uniform_real_distribution<>( low_bound, high_bound )( engine );
You're not keeping the instance of uniform_real_distribution
 
@sehe he couldn't really, cause the min and max might change between calls.
 
If the only requirement is that the result is within the bounds given, then obviously he's doing it right. Right enough, anyway. But uniform_* is a bit overkill then
 
uh, flat between two boundaries. I haven't looked at all the code. Just the last function and the call to it.
 
Tin
what i need, is basically to generate X random numbers between [a,b], where [a,b] in each call to the function
and that the generated numbers are equally distributed
 
@rubenvb Getting /one/ sample from a certain range cannot possibly be called uniform/biased, as there is no distribution to begin with
 
1:00 PM
@sehe true.
as I said, I have no idea what the big picture is.
 
Tin
i'll try to explain
i'm working with decision binary trees
at each non-leaf node, several random tresholds between [a,b] need to be generated
and the randomDouble(a,b) function is then used to generate this random thresholds
 
@Tin I think the usual pattern is:
struct mygen
{
    mygen(double low, double high) : dist(low, high) {}
    double operator()() { return dist(eng); }
  private:

    std::mt19937 engine;
    std::uniform_real_distribution<> dist;
}
 
mmm... cake
 
To be used as:
/*static*/ mygen(a,b);
while (no_done)
{
	double uniform_random = mygen();
	//
}
@DeadMG really? It's chocolate time of the year
 
that's every time of the year for me
 
1:05 PM
@sehe not necessarily IMO. You don't need a struct at all. Just an engine and a distribution. Then you call the distribution passing the engine as argument
Indirection and all that.
 
Tin
@sehe, thanks I added your struct to my implementation, sth. like: pastebin.com/ijtTBbMU
lines 25, 27
is that correct so?
@rubenvb, i didn't get your suggestion. do you mind in giving an ilustration?
 
@rubenvb I know that. But I thought you could see from the original code that he tries to abstract the moving parts away
 
the parts... THEY'RE ALIVE!
 
The simplest would be:
std::mt19937 engine;
auto mygen = [&engine] () { return std::uniform_real_distribution<>(a,b)(engine); };
 
you failed to capture the engine :P
or the parameters
 
Tin
1:09 PM
@sehe, the /*static*/ mygen(a,b);, i if i would like to use the same engine() all the time, then should i define: static mygen(a,b);?
 
@Tin In my view, yes.
 
Tin
the same here, right? `static std::mt19937 engine;
auto mygen = [&engine] () { return std::uniform_real_distribution<>(a,b)(engine); };`
 
@Tin Just something like this: ideone.com/OZNTx
 
WOAH. Someone is having a field day with my rep:
 
@sehe you just created a random new account and started upvoting yourself
 
Tin
1:12 PM
@rubenvb, but the interval [a,b] changes
 
A _uniformly_ random account, mind you
And I'm continuously annoying you here, as an alibi.
 
@Tin then keep the distribution in the scope of where that interval is determined.
 
Tin
@sehe, i'm not familiar with auto in c++ is there an equivalent definition?
 
I would make the engine even higher scopewise. So that you'd seed it only once per application run
 
@Tin not for lambdas. Use the explicit struct otherwise, it is mainly the same thing
 
1:14 PM
@Tin auto just means "whatever the type of the expression"
Exactly like var in C# if you're familiar with that
 
how could I in pure C free the statc array: int data[10] for example? thanks!
 
Tin
@rubenvb, could i then do the mygen higher scopewise for instance, in the main() and pass it then as a parameter to the method?
 
aarggh
Windows 8 Dev Preview expired
 
@Tin yes, that's what I would do.
 
if only Windows 7 would run on my machine without crashing every 30 seconds
 
Tin
1:16 PM
@jalf, thanks for the explanation
 
@DeadMG consumer preview has been out for quite a while now.
 
@user1131997 you don't need to free it
 
@rubenvb Except this machine will die every 30 seconds with any other operating system.
 
@user1131997 Troll
 
@DeadMG then there's something else wrong and you're just lucky with Win8DevPreview
 
1:17 PM
@DeadMG I feel another machine rebuild coming up?
 
so what? I just want to use the damn machine for one weekend
@sehe Already tried that before :(
 
if i want to:

1). free its values
2). reallocating more space ( expand it from length: 10 to 1000 )
 
Tin
@sehe in the mygen() there's no seed, but in your case @rubenvb, you suggested to seed()
 
@user1131997 troll
4
 
@sehe why am I a troll? :)
 
1:18 PM
who votes for the censorship of that guy?
 
@Tin Of course, seed. If you want detailed answers, post here:
 
why do if you ask help always there are word "troll"? :)
 
@DeadMG Can we? I think I would by now.
 
@sehe I can, remember?
 
@user1131997 Because the questions are ridiculous enough to not be taken seriously.
 
1:19 PM
@DeadMG well.. he brings some lulz, sometimes, IIRC
@user1131997 btw, you can go to "PureC" room to ask such questions there
 
or
 
@Abyx Does it exist?
 
@user1131997 Then it needs to be on the heap, static storage is just that, static - it doesn't change size
 
@user1131997 of course not
 
1:20 PM
@Collin pity
 
@sehe Dunno if my previous message sent, it's still in green, but I can censor him, remember?
 
@Abyx So I will stay here :)
 
@user1131997 You'd rather the software change it's address map at runtime? That would be impressive
 
@user1131997 you can create the room
 
If you mix all them big words into a bowl of insertion bubble Big-O shell gnome stable partition heap array vector callback you'll get a delightful self congratulatory wank fest of pure C.
2
 
1:22 PM
there will be a lot of people wishing to help you with your C
 
Oh and don't forget to post oodles of copied and pasted code into the chat on occasion. Makes you look highly intellectible
 
@Collin I'm looking for dynamicly resizing array in pure C
 
well
I'm sure that the Bin can help you find it
1 message moved to bin
 
:3198052 google: google VLA
 
:3198052 look in ANSI C standard
Puppy, you ate our message
 
1:25 PM
fine, you can have it back
 
The puppy eats too much on occasion...
 
1 message moved from bin
 
@DeadMG No! Keep it :)
 
room topic changed to Lounge<C++>: Not the place for random <insert technology here> questions [c++] [c++11] [c++-faq]
 
@user1131997 So build a module and handle it?
 
1:27 PM
int reset = (int)malloc(length); // doesn't wark always, very often may catch access violation in such code
 
@user1131997 There are like 9 things wrong with that line
 
@Collin what are they? thanks! be more constructive
 
I have no context, but why are you casting malloc to an int, and storing it in an int? int might not be the same size as a pointer, afterall
 
Markdown fail.
 
Also, never cast malloc, it's unnessesary
 
1:29 PM
I know, that I has many times bored and make you angry, but please be patient and more humanly, for me it's difficult right now. I give appologies if someone is very offended on me.
@Collin why is it unnessesary?
 
@user1131997 You should be. You're like LearningC- no matter how many times we tell you to fuck off, you never do.
 
@user1131997 void* is automatically converted to another pointer type. If you cast it, you can hide the fact that you don't have the proper includes
 
@DeadMG @user1131997 To be honest, I don't think people should fuck off. They should try to respect the wishes of the people they choose to approach for help
 
if you can't do that, then some fucking off is involved
or should be
 
@user1131997 See here:
yesterday, by sehe
[Perolex] whispers: can u run me thought a dungeon
To [Perolex]; You didn't ask properly.
[Perolex] whispers: can u plz run me thought a dungeon
To [Perolex]; Six errors still.
[Perolex] whispers: what
[Perolex] whispers: a lvl like 70 dungeon so I can lvl up
[Perolex] whispers: anyone
To [Perolex]: Here. I'll get you started. "U" and "plz" are not words.
[Perolex] whispers: can you please run me tought a dungeon
[Perolex] whispers: thought
[Perolex] whispers: throught
To [Perolex]; There‘s an extra letter on the end.
 
1:32 PM
@KerrekSB: I'm not sure I understood your comment / question: stackoverflow.com/a/10043883
 
@DeadMG Agreed, but just telling people to fuck off isn't constructive (it doesn't tell them what you want, nor why you want it. I think you want to not be annoyed with dumb questions and impatient arguments.)
 
@Collin thank you
 
@TonyTheLion ahoy
 
@sehe What I want is for him to fuck off. The rest is less important.
 
1:33 PM
what's new?
 
@DeadMG Ok...
 
expect the operator new
 
@TonyTheLion Too little
 
@TonyTheLion delete bitch! :P
 
lulz
someone pissed off the puppy again
oh god why?
 
1:34 PM
@DeadMG No, new bitch in fact; that's new: we have a new female collegue. Obviously, she is in administration
 
woof woof
 
@DeadMG seems to be you have problems in real life... I feel sorry for you, best whishes to improve your privacy life, may be you will become more kind
 
@user1131997 It's pretty unlikely that I will ever be kind to someone like you. Get the hint, find another room, and never come back.
 
@DeadMG oh fuck off
If you have to be such a dick, perhaps you should find another room
Just use the ignore list if you don't want to listen to someone. That's what it's for
 
1:37 PM
@DeadMG I like this room , there are good people, which won't stop help me
 
I don't think you need to make it look like we're all as much assholes as you are
 
@DeadMG try the ignore list again. Please?
It works for me
 
Ignore list works for me too :)
 
@user1131997 I flagged that, though, because it isn't going to help. I still think we are right in treating you like a troll. For many many many many occasions.
@user1131997 I don't think you ought to leave, but I do think it would be a good idea if we stopped helping you that much
 
1:41 PM
int reset = (int)malloc(length * sizeof(int)); // this is the way to allocating right size?
 
@user1131997 Perhaps you could try to be more selective, do more research, be a lot more patient about what people are trying to tell you, most of the time.
@TonyTheLion image not found
 
it's trollface
 
@TonyTheLion Ah fixed.
 
@sehe wut? how does FB have anything to do with me posting a picture here
 
No, should be:
`int* reset = malloc(length * sizeof(int));`

malloc returns a pointer
 
1:43 PM
@Collin ahh... thanks
 
Tin
@sehe, I followed your suggestion and posted the question in SO. in case you guys are interested, here is it:
0
Q: random number generation of doubles between two intervals [a,b]

TinI need to generate X random double numbers uniformly distributed between two intervals [a,b], where a and b are also double numbers. Those X numbers need to be generated inside of a class function, say myclass::doSomething(a,b). The thing is that the intervals [a,b] passed to the doSomething(a,b...

 
@user1131997 ^^^^ that's the way to do it
 
@sehe there are a lot of bad books, which book are useful? I think, you are agree , that not such many books are relly good and relative for to read
 
@TonyTheLion Note: or something. You know, tomanthony.co.uk/blog/detect-visitor-social-networks
@user1131997 I didn't say: read books. I don't have to agree or disagree, You can [find out what books are good] yourself.
1019
Q: The Definitive C++ Book Guide and List

grepsedawkThis question attempts to collect the few pearls among the dozens of bad C++ books that are released every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a good C++ book...

@user1131997 I only say: I'd like you to be a little more independent, and more modest in demanding attention. You 'complaining' about books (that I didn't mention) is precisely that behaviour: demanding attention.
I don't have to confirm or deny anything you throw at. I only represent myself in my wish that you'd do more research and generally behave less intrusive in chat.
@Tin I upvoted the comment :)
 
Installing TeXLive is always fun.
 
1:50 PM
@CatPlusPlus pacman -S texlive?
 
That'd be apt-get here, if not for the fact that repo version is two years old.
 
@CatPlusPlus You on arch?
 
These days, it seems like 1/2 the time I drop into this chat room, it's meta conversation about the chatroom... flags, trolls, angry puppies, etc
 
Ubuntu. I was too lazy to install Arch.
 
1:51 PM
I realise I'm not helping that figure :-)
 
Ell
Woahh the atmosphere is tense in here :L
 
Anyway, I'm installing via TeXLive's own installer, and it always takes two hours minimum.
 
> 2011 saw relatively few changes.
 
Tin
@sehe, i updated my original post. the thing is:(1) the engine is not global and (2) the random generated numbers seem not to be uniformly distributed
 
@TonyTheLion Read that a couple of days ago.. I got pretty close with my back-of-the-envelope calculation of how much bandwidth a porn site takes (estimaged 50GB/s, their figure was 60)
 
1:53 PM
It lists 4 'meh' features. It doesn't seem that 1-2years is old in that respect
 
I don't like using outdated stuff.
 
@StackedCrooked could you try pulling the latest version of my lib from the repo? I think it's fixed, so let me know if your test still fails
 
Ell
nor me
 
Especially that some LaTeX packages I use really need to be recent.
 
@Ell What, the cat doesn't like using you?
 
Ell
1:54 PM
@sehe I hope he doesn't use me :O
 
@je4d it's kinda crazy the traffic they deal with
 
@CatPlusPlus isn't there a PPA for texlive, or backports?
 
I don't know, I don't really care.
 
@TonyTheLion yeah.. I based my calculation on 1.5 billion internet users (low to exclude china as it's far more taboo there), of which half watched porn, for an average of 1/2 an hour a day
 
@je4d I suppose it is 'self-regulating' communities. Isn't it like that everywhere? In schoolyards parents are discussing the school policy, who brings whom; in the grocery store people will discuss the acts of politicians and the neighbours. It's my definition of 'chatter', and it doesn't surprise me that it exists in a chat room
 
1:57 PM
Wow, Ubuntu sucks. Texlive 2009 for about 5 releases now.
 
@ScottW mmmmmmmmmmrrrrwafff!
@ScottW aw cute
 

« first day (538 days earlier)      last day (4408 days later) »