« first day (601 days earlier)      last day (4346 days later) » 

11:00 AM
I wish epic would make again an Unreal style game, never played Gears of War so..
 
@KonradRudolph I don't think my compiler warns in those cases.
 
Ehm #define SCOPED_LOCK(lock) scoped_lock foo(lock)?
Never mind. I don't get the problem.
 
@RMartinhoFernandes Yes, but as I was explaining @awoodland previously, it should warn … I want it to warn
 
Ouh and I love particles!
GPU particles
 
@RadekSlupik this should (but as I’ve seen, actually doesn’t) warn
 
11:01 AM
@KonradRudolph Too late, the cake is already eaten.
 
hmm
the Unreal Engine demo is really quite impressive, but when he said “over one million particles” I had to chuckle … because that’s really nothing compared to reality
but it’s honestly quite impressive already
I’m surprised that such an imprecise model can give such a compelling illusion of reality
whoa, and the visual event editor is just amazing – visual debugging!
 
@KonradRudolph Yeah as he pulled the editor up from within that, I was stunned :P
 
no youtube here =\ and damn slow connection even if it wouldn't be blocked =\
 
@KonradRudolph Boy, one million particles. That's about the width of a human hair!
 
@KonradRudolph I think that has more to do with human beings being unbelievably good at filling in details where there wasn't before
But it is impressive nonetheless
 
11:05 AM
@KonradRudolph real time fluid sim with 1m particles is something if you also have to do a lot of other stuff
 
ok, lunch
 
but I guess the fluid is simulated in a rather non-scientific way
 
’ later
 
@KonradRudolph Game graphics are powered by lies. There's no point in simulating too much to discard it 16ms later.
 
Enjoy your lunch
 
11:05 AM
I read a paper about that some time ago
 
@Nils: The "scientific way" would involve finding solutions to the Navier Stokes equations
 
@KonradRudolph Why doesn't it?
 
which take a long time to do for anything more complicated than a tube in 3D, for example.
 
Maybe your compiler is smart enough to see that you have a scoped lock and it just shuts up.
 
@RadekSlupik Because it has side-effects.
 
11:06 AM
yes that's not what they are doing
 
@Insilico Fluids are a bitch :)
 
@ScarletAmaranth Yes, I should know since I've actually written some finite-element code dealing with them :-)
 
@Insilico o_O wow, he says as his jaw drops
 
@KonradRudolph it is impressive, this paper here also just presents 1m particles: graphics.ethz.ch/Downloads/Publications/Papers/2010/Pfa10/…
 
11:08 AM
Now actually presenting the numerical results was another issue entirely. :-)
 
@Cicada Aha - so you don't mind me seeing it too then :)
 
@sehe cheater
 
@sehe stalkers gonna stalk
 
"So, I'm here to present you one million particles. Say hello to particle #1. And here's particle #2. Particle #3 is just showing up right now. Particle #4 (...)"
 
@Cicada Hey, it was something you said in the first place. I can't do much about that
 
11:10 AM
@ScottW No we're talking about fluid dynamics
 
@ScottW WTF is C++12?
 
@Insilico Why would you assume a normal distribution? Average != median?
 
At least the fake fluid dynamics video games use
 
11:11 AM
@sehe It's not a quote by me.
 
I should sleep
 
@Insilico Wokay. Source?
 
past noon is a good new record for me
 
"viode games" is not a sign of old age.
 
11:12 AM
@RMartinhoFernandes It's a sign of surprising keyboard layout
 
I haven't had my caffeine fix for today yet
 
I'm running on it.
 
I would love to do some more fluid dynamics.
 
@sehe It's a George Carlin quote. Or some bastardized version of it due to my spotty memory
Although the central limit theorem states that large populations can be approximated as a normal distribution anyway
Then again I don't know for certain if the central limit theorem applies in this case.
 
@Insilico thinkexist.com/quotation/… Yup, the quote was correct enough
I don't think the normal distribution can be expected to hold up for subjective things like IQ just because it holds up for many other things
 
11:16 AM
I remember seeing that IQ follows indeed a normal distribution centered around 100
I may be wrong though
 
Is it just me, or is allowing infix syntax in function definitions (in Haskell) really stupid? foo . bar = qux I read it as a function named foo.
 
@sehe: Well, you're going to have to ask a statistician for the answer to that. You're certainly not getting it from me
 
Brb, busy failing last final of the year
See you
 
@Insilico A statistician isn't going to be able to answer that, is the point. Research on IQ should be done, because it depends on how IQ is defined, measured.
 
I'm off bye
 
11:18 AM
@Insilico I could easily define a metric that would not yield a normal distribution, no matter how large you make the sample population
 
@sbi I like their TOS.
 
@sehe: Agreed. I'm just saying that I'm not the one to talk to when it comes to such matters
 
> In addition, you agree that Estatis Inc. shall have the full right to access any resource, data, service or system which depends on User Data for identity checking, and to do whatever Estatis Inc. sees fit with these resources, data, services or systems.
 
> You agree that these Terms and Conditions shall be governed by the laws of the Intergalactic Federation. Any controversies and disputes arising out of or relating to these Terms and Conditions shall be judged by the High Court of Vogsphere, or, in the event of early universe termination, by courts of higher dimensions.
 
facepalm
 
11:19 AM
@sehe Oh, I haven't got that far yet! That's awesome!
> b. You agree to do anything we want. You are now a slave of Estatis Inc.
They even claim your soul, unless you can defeat the Estatis Inc. Retaliatory Creature.
> I'm getting quite bored writing this junk right now, so I'll now cut and paste public domain text instead to make this document seem longer. I hope that you enjoyed this fake service. Estatis Inc. also congratulates you on your reading of these Terms and Conditions.
 
Zing.
 
Now I'm going to read some Frankenstein.
 
11:32 AM
I go to lunch
I return to my desk
Nothing happened
/
It mus be Friday
 
What do integers get promoted to when being passed into variadic function, long?
 
int, I think.
 
So it doesn't work like with printf() ?
 
How do you think it works like with printf?
 
Uuh, i though printf() promotes ints to longs ?
Dat untrue :) ?
 
11:35 AM
Well, then I'm wrong.
 
I'm not sure. :P
 
A float will automatically be promoted to a double. Likewise, arguments of types narrower than an int will be promoted to int or unsigned int. The function receiving the unnamed arguments must expect the promoted type.
So this is incorrect:
0
A: Why is %c used in C?

AttilaThe size of char might be different from the size of int, so you need to specify which one you expect Also, the interpretation of the two formatting is different.

 
Right, thanks, so I'm being a derp.
 
@RadekSlupik Why doesn’t it? I don’t know.
 
stdarg.h is stupid
 
11:37 AM
@KonradRudolph Because it has side-effects.
And there's no easy (or at all) way of making it clear you want it just for side-effects.
 
@RMartinhoFernandes Like I said before, the presence of side effects should be irrelevant here.
 
@ScarletAmaranth being a derp? I thought of that as 'having a derp' or 'being derpy'
 
arrrrrggg why can't I find an OmniGraffle Pro 5 serial number! ><
 
@sehe Mhm, I'm not quite sure :)
 
Because you will use Inkscape
In the same way as the next version of Textmate will make you use ---Emacs--- vim
 
11:38 AM
Inkscape sucks; it uses X11. Its UI is annoying as fuck.
 
@KonradRudolph Well, then I'm confused. If it has side-effects, you may want it just for side-effects. The compiler can't warn about that and keep you sane.
 
@RMartinhoFernandes If a variable is named, the compiler should assume that I want to use it, everything else is unhelpful
 
@RadekSlupik "It uses X11"? Srsly. Do you know what that means?
 
@sehe Yup, it means that it sucks.
 
furthermore, even if I remove the side-effects, there is no warning
 
11:39 AM
@KonradRudolph But there's no simple way of saying you want it just for side-effects.
@KonradRudolph Because in general, you can't know it.
 
@RMartinhoFernandes Of course there is, cast it to void
 
Only for trivial types.
 
Who can help me with this? stackoverflow.com/questions/10947261/…
 
OMG. It uses pixels! Oh noes! It uses a graphics driver
Ponies!
 
@sehe ehm…
 
11:40 AM
@KonradRudolph There's a reason you're trying to get a macro for it.
 
OmniGraffle uses hardware acceleration.
 
Because it's annoying.
 
@RadekSlupik X11 does not induce any kind of UI, really
 
Whatever. The UI ain't native.
 
@RMartinhoFernandes Yes. But I’m more concerned with correctness than with convenience, and I’m mad at the compiler for omitting a perfectly good opportunity to warn me of an error in my code
 
11:41 AM
@Sasha I was trying, but I don't understand your question... how would I get an english character from a keyboard that's not in english?
 
@RadekSlupik zzzz. Good luck finding that key
 
@sehe I found one before.
 
It's not an easy warning: you can't do it in the general case, and it's a very common usage.
Plus, it's a harmless one (unless you're naming your variables with very very similar names; shame on you).
 
@Sasha Or do you just want to get character codes off whatever keyboard a person is using, and blindly read them from the english keyboard set?
 
@sehe Found. :)
TPB comments ftw.
 
11:43 AM
@RMartinhoFernandes It clutters the code. And I still maintain that you can (should) warn in the general case
just assume that every declared variable should get used
 
That's too noisy.
That's a con for taking time to implement a warning.
 
@RMartinhoFernandes In clean code? No.
 
Oh it's used by too many people.
Well, that'll be a firewall for OmniGraffle then huh.
 
@KonradRudolph Wait, you're saying clean code doesn't use scope guards anywhere?
Warning for every scope guard is certainly noisy to me.
 
@PatelRikin Ok.
 
11:45 AM
And you think someone will read that @PatelRikin :) ?
 
@RMartinhoFernandes Well. I concede that C++ lacks a clean way of declaring a scope guard but even in the absence of the warning, a named scope guard rubs me the wrong way. There is a name in the code that doesn’t get used.
 
The number of ignored users just increased by one! :D
 
@RadekSlupik ^^
 
@PatelRikin Perhaps you should start by typing the kind of checksum you want into Google.
 
@KonradRudolph That irks me too. FWIW, I think Johannes once posted some macro madness that generates unique names or something like that.
 
11:47 AM
i am tried but i am not able to getting because i am totally new in this. collin
 
@RMartinhoFernandes Yes, but as far as that goes, I’m actually happy with just using prefix # __LINE__ – since they are locals that should be unique enough
 
@RadekSlupik ...
 
@PatelRikin You're not able to use Google?
@PatelRikin I mean, it would help to know what kind of checksum you're trying to get, and what you've tried
 
@sehe Don't worry. It already works; firewall.
 
@Collin yes you catch my mind.
 
11:48 AM
i m confusion in what is final ans. it is 4 digit or 2 digit.and i am not getting what i will do after sum of all byte chat.stackoverflow.com/users/224286/collin
 
2 messages moved to bin
 
I don't see why a vector graphics editor should eat my bandwidth anyway.
 
@ScottW Sry for delay
 
Arrgh, the sheer volume of answers by Johannes makes it near impossible for me to find anything in them.
 
@Sasha If your mind is an exception, we might catch it :)
 
11:49 AM
@RMartinhoFernandes Ah, got it!
 
=)))
 
@RadekSlupik I don't worry so soon. I just see myself 10 years ago. This will wear you out.
 
@sehe why u moved my question /
 
#define SCOPED_LOCK(lock) \
    scoped_lock __sl_ ## __LINE__ (((void) __sl_ ## __LINE__, lock))
 
@PatelRikin Looks like you want two byte? But you STILL haven't said what kind of checksum you want
 
11:50 AM
Anyway, let me just make clear I'm not arguing against the warning. I'm trying to say that the decision of the compiler implementer to not add it seems quite justifiable to me.
 
@RMartinhoFernandes ^^ does that work?
 
@PatelRikin Because it was not a good fit for chat. Please see the newbie-hints
 
(it seems to work)
 
__sl_ is reserved.
 
I wouldn't mind having such warning on the higher verbosity levels.
 
11:51 AM
(and yes, I know the name is reserved)
 
@KonradRudolph Hmm, I think so.
 
If some implementation defines a macro __sl_, you're fucked.
 
that was surprisingly easy
@RadekSlupik Erm, I append a line number. But even then, this isn’t client code, I’d write such code as part of a standard library extension only
 
It may be technically UB, but I'm sure it will be harmless anywhere but Hell++.
 
11:52 AM
Oh yeah. :P
Ok.
 
I just used it here to make it clear that this name is an implementation detail
 
I'll look in the standard to confirm after lunch.
 
@sehe i am give small explanation then no one understand what i what to know.
 
@KonradRudolph I prefix with _ + library name + detail.
(Underscore at start is valid here: it's not global scope)
 
@RMartinhoFernandes I’m about to do that, but without the leading underscore (that’s also UB, no? names starting with underscore in global namespace (!) are reserved)
forget it :)
it’s not
 
11:54 AM
@PatelRikin Then you should post your question stackoverflow.com This is informal chat, not a Q/A site
 
now, how to generalise this to a DECLARE_UNUSED macro? I don’t think it’s possible … :-(
 
@Collin i am developing driver to communicate with patient test machine so machine send frame like <STX>2Q|1|2^1||||20011001153000<CR><ETX><CHK1><CHK2><CR><LF> with checksum so when received data then i want to verify that all data properly received or not.
 
@KonradRudolph My generic scope guards look like auto stupid_name_goes_here = finally(lambda);, so I can't really generalize from that.
 
@PatelRikin Post your question on SO proper, we're not going to be able to answer here. Especially if you can't tell use what checksum you're using
 
Your friend ^
 
11:57 AM
@RMartinhoFernandes Using lambdas is what I wanted to avoid ;)
 
I think you can do it for general regular guards.
 
Also, why do you even need the variable here?
 
@KonradRudolph To last the whole scope?
Ah fuck it, macros suck more than usual with templates.
 
@Collin ok dear by see u
 
Macros suck. FTFY
 
11:59 AM
@PatelRikin Checksum unfortunately doesn't specify it, are you using a CRC? What are the polynomials? Are you using something like Fletcher16? That would be specified in the documentation for the machine you're interfacing to
 
@RMartinhoFernandes Hmm, then I don’t understand what the code does. does the lambda in your case contain the block or the “deleter”?
 
The deleter.
 
ah, ok, that makes sense then
and it’s a much better pattern of course
but you can still generalise from that, no?
 
@sehe You can't pass a template type to a macro without variadic macros. And you can't have multiple variadic macro argument "packs".
 
#define DECLARE_UNUSED(type, ...) \
    type _klmr_unused_ ## __LINE__ (((void) _klmr_unused_ ## __LINE__, __VA_ARGS__))
and then DECLARE_UNUSED(finally, the_lambda);
 
12:00 PM
Templates.
 
ok, not very readable ;)
 
I can't name the type because I can't name the type of the lambda.
auto is part of the pattern.
 
@RMartinhoFernandes Ah
 
I could use std::function for erasure but...
 
So finally is a function
 
12:01 PM
Yeah.
 
Well, in that case you could still generalise by using auto + initialisier expression instead of the type
 
Oh.
Duh.
That's actually not that bad.
 
@ScottW I like how those Lunix freetards apparently save money to spend on software/charity:
 
@RMartinhoFernandes But doesn’t work in my case, since it requires a copy constructor :/
 
Yeah, I use moves.
 
12:03 PM
so, also not very general
ah, moves to the rescue
 
Well, thanks for the discussion, but I really need to go grab some lunch now. Later.
 
:) see you
@sehe That sounds like irony … which doesn’t make sense, given the numbers
 
@sehe I should really buy that bundle, it looks like a good one
 
@Collin All of them have been REALLY good so far.
 
@ScarletAmaranth I bought one as a gift at christmas time, but I haven't actually gotten one for myself
 
12:10 PM
@Collin Also, even if you pay twice the average or something, you're still saving money.
@Collin Not to mention that you can be a scumbag and pay 1cent.
 
I also need to get Portal 2 already, but I seem to have a much more of a mental block on spending $20 on a game than spending say $100 on stuff for my yard
 
@Collin Technically, you could pirate it, but they so don't deserve it.
 
@ScarletAmaranth Yeah, Portal 2 is cheap, I would buy it, it's not like I can't afford the $20 to play it -- and I'd get $20 of enjoyment out of it I'm sure
 
otherwise, just wait a month, and portal2 will be on sale again
 
@jalf That's what I'll probably wait for
 
12:14 PM
@Collin We have average income of 480$ here in Slovakia (monthly) and yet I don't consider 20bucks much.
@Collin (for Portal 2, to be precise)
 
@ScarletAmaranth No, it's not much at all, in fact games probably have the best money/hours of enjoyment ratio of any type of entertainment I use (netflix may beat it barely) but for some reason my brain thinks it's far more a waste of money than going out and spending $150 on outfitting a guest bedroom we use twice a year
 
@Collin Yeah you're right. Also I've had games that I paid 10bucks for and had 200hours of enjoyment out of.
 
Or heck, going out to eat with my wife, $40 for 2 hours of entertainment and food?
 
@Collin (Both multiplayer and singleplayer actually)
 
@ScarletAmaranth Good lord Minecraft, bought that at alpha, I'm sure I have 100 hours into it
 
12:17 PM
@Collin I played final fantasy IX and VII both for 250 hours +- and paid very little for them. (not new tho, just bought it off a friend)
 
@RMartinhoFernandes Actually, scratch all that. A SCOPED macro should actually provide the following syntax, which can be attained with judicious use of for:
SCOPED(lock_or_lambda) {
    some_action
}
 
@Collin Also there are games I paid 50bucks for, did one playtrough and put them on the shelf for eternal time being. That brings some regrets :)
 
sbi
@RMartinhoFernandes Yeah, I know, those are hilarious, too. I wonder if the puppy knows that he agreed to "pay $ 100,000 for your use of the Estatis Free Password Security Checker", should they ask him to, as "governed by the laws of the Intergalactic Federation."
@RMartinhoFernandes Oh, you and @sehe already had fun with it. Sorry for repeating it.
 
@ScarletAmaranth Yeah, I've decided I'm never paying the $59.99 new games want now, I'll wait till they go on sale. I'm waiting for Skyrim and ME3 to drop
 
@Collin Ohoho, I bought Skyrim right off the bat and never ever have i ever regretted buying it :) (Apart from the fact that it ruined my "productivity" :P)
 
12:28 PM
Free games are the best games
 
@Pubby Bloodline champions is good, League of Legends is decent i guess :)
The best game is chess anyway ;)
 
#define SCOPED(lock) struct _foo { template<class F> _foo(F lambda) { scoped_lock _bar(lock); lambda(); } } _baz = [&]()
SCOPED(my_lock) {
  std::cout << "Hello!\n";
}; // Semicolon :(
 
sbi
@Radek Empty tweets like this one are a sure recipe to get unfollowed by me. And it's not just me.
 
I'm sorry.
 
OpenTTD, Soldat, Wesnoth, Crawl, Saurbraten, and a few others I'm forgetting
 
sbi
12:29 PM
@RadekSlupik No need to. I was merely trying to point it out.
 
Who the hell would name their stuff "Soldat", rofl :)
 
Doesn't that mean soldier in Poland? I think the guy who made it was Polish.
 
sbi
@ScarletAmaranth And why is that considered hilarious given "Sauerbraten" is in that list?
 
Soldat is soldier in German as far as I know.
@sbi Right, dat too :)
 
sbi
@ScarletAmaranth Yep.
 
12:30 PM
I updated description of question. stackoverflow.com/questions/10947261/…
 
Soldat is Rambo and Predator in video game form
Too bad it's fairly dead nowadays
 
@RadekSlupik Yes, the semicolon is unfortunate, and unneeded in the for variant
 
sbi
> I understand that stupidity is a full time job; but have you ever considered taking the day off? — Debbie Howard
 
@KonradRudolph You mean #define SCOPED(lock) for(scoped_lock _foo(lock), bool _bar = true; _bar; _bar = false)? But isn't _foo still in scope then after the block has ended?
 
@RadekSlupik That doesn’t compile
and no, it wouldn’t be in scope, the whole point of for is that it restricts scope
except in VC++6
 
12:40 PM
Oh, I didn't know that.
 
But the macro actually needs some convoluted architecture, because you effectively need to define a useless iterator type for it
 
To be honest, I don't think that such a macro would bring anything but confusion.
 
@RadekSlupik Hmm? Maybe, but my assessment differs
 
sbi
I have no idea what you two are discussing about, but I find it very curious that @Konrad uses the fact that the robot has played with abusing some brand new C++ feature as an argument against such abuse being confusing.
 
@sbi Experts always drive innovation before it becomes mainstream, see the assign-by-value idiom
and using a macro to hide the nitty-gritty actually avoids this particular feature’s confusion behind a semantically meaningful name with pseudo-familiar syntax (because it follows C++’ established scope syntax)
 
12:55 PM
Personally, I'd go with something like #define LOCK_CURRENT_SCOPE(lock) scoped_lock __daknok_scoped_lock_##line (lock), but well.
 
For a non-expert C++ user, it should be clear which of the two following snippets is more readable:
{
    SCOPED_LOCK(lock);
    std::cout << "some action\n";
}

SCOPED(lock) {
    std::cout << "more action\n";
}
 
Neither are; they use macros. :P
 
sbi
@KonradRudolph I wasn't talking about the likes of Dave Abrahams, though. I was talking about the robot. (Who's been happily writing C# code just a while ago.) And I believe you were, too.
 
@RadekSlupik So? Lots of code (especially bad, but some good) uses macros
 
sbi
@RadekSlupik That is only relevant when a nasty error messages leaks out of it. Otherwise — who cares? Did you know you are using a macro when you do assert() in C++?
 
12:57 PM
@sbi I’ve been writing C++ code before C#. And I don’t know what the robot did before but his expertise in C++ features can be seen to be substantial from his Wheels library
 
@sbi Yup, I know.
 
EXAMS ARE OVER I AM NOW FREE LIKE A MOTH
 
EXAMS ARE OVER I AM NOW FREE TO USE CAPS LOCK LIKE AN IDIOT
9
 
sbi
@KonradRudolph Damn, now I bit on my tongue. That comes from having it in your cheek all the time.
 
@sbi Well, I hope it hurt
 
12:59 PM
@Cicada It's only in the summertime that I miss being a student...
 

« first day (601 days earlier)      last day (4346 days later) »