« first day (201 days earlier)      last day (4745 days later) » 

12:28 AM
@FredOverflow Sort of -- while there are random number generation classes in both TR1 and C++11, they've changed quite a lot in the standard.
 
12:43 AM
hi every one
 
allo alllo
 
what does mean by allo allo ?
 
hello hello in a British accent
 
hi
 
ie "allo guvna"
 
12:53 AM
Ah..
 
1:32 AM
it's amazing what you can learn from reading up on BrainFuck
either that, or my brain is, ye know, ****ed
 
lol
not a possibility that I would dismiss out of hand
 
now why would you say a thing like that?
;-)
 
Given I know where a method is defined, I want to know where its called (at runtime). Any debugging advice?
 
>>,[<<+++,>++++<-]>+[>+<-]>.,]
 
@JohnMerlino: set a breakpoint on it and view the backtrace
 
1:42 AM
put a breakpoint in the method and run
 
thanks for response
 
@JohnMerlino: depending on your implementation and forethought, you can inspect the backtrace programmatically in the method whenever it is called and log that somewhere
 
@FredNurk very, very useful
 
I agree thanks for article
 
2:22 AM
hi all
if i have a structuring element B given in this image...and i have an other image A...
what will be the A erosion B...
any one can guide me?
i applied dilated structuring element
0 1 0
1 1 1
0 1 0 with an image A...
and the result is good ... let me post image here
its my result "dilation of A with B".. where B is
0 1 0
1 1 1
0 1 0
A = {1,0,1,0,1,1,1,1,0} B={1,1,1,1,1,1,1,1} what is A dilation B and Arosion B .. any one can tell me please
?
 
 
3 hours later…
5:13 AM
Know Qt? How to send a Structure object via QTcpSocket socket
 
 
1 hour later…
6:17 AM
@RonaldLandheerCieslak @JohnMerlino: btw, I was bored: codepad.org/PtoT59LS
 
@FredNurk interesting
 
hi all
 
Als
6:38 AM
grrr......
Its thursday and the traffic almost killed an hour :(
 
@Als ugh :(
 
Als
@TonyTheTiger: Hola rarity ;)
 
@Als lol
 
Als
@TonyTheTiger: :D Hows you? Came in early at work?
 
@Als no, still at home actually
will be leaving
 
Als
6:49 AM
@TonyTheTiger: I see...
@TonyTheTiger: Hey regarding the thread monitoring, I think I need to discuss out the requirement in detail with the driver developer and the Architect. Specifically, need to know what scenarios are to be handled..How it can be known as to its a error situation & what is the action that should be taken...
I still havent had this requirement of monitoring thrown at me yet...but I see it coming sometime down the line....I think I will sit on the Q with your answer till I can get more updates and then probably take it on from there
 
@Als yes, well I didn't know you had control over the drivers. I think if that is the case, you might be able to get them to notify you if something goes wrong... not sure though, cause you're in user land and they are in kernel mode
 
Als
@TonyTheTiger: The drivers are in-house development....though i really feel someone has messed up things down there....and now want to salvage the situation by pushing the handling to middleware rather than in driver
Yes that control flow of determining error conditions in driver needs to be clarified from driver developer and the architect
 
@Als From usermode there isn't much you can do if it goes wrong in Kernel mode.
except for know about it, perhaps
 
Als
@TonyTheTiger: Very true...And if a driver has gone wrong i really doubt it can convey it back to user space...If it knew it is messing up it could handle it down there in kernel space itself
 
@Als yes, it will have to handle it in kernel space, or crash
depending on whether the system can live without the existence of this driver
ok gotta go, be back later
 
Als
6:59 AM
@TonyTheTiger: okay..travel safe rarity ..there aint many of you guys left out there anyways ;)
 
hi hi hi all
 
7:35 AM
@Als hahah
 
Als
@Miss: Hello..How are you doing?
 
@Als so what's your plans for the day? Got something interesting to work on?
 
Als
@TonyTheTiger: Dont tell me you reached workplace...jus 30mins im jalous i was stuck for an hour in traffic
 
@Als yes I'm at work now
there was traffic too, but not that bad actually
 
oh hi @als: good, fine shine fit fat...:)
 
Als
7:42 AM
@TonyTheTiger: Cool and Yes something intersting, I need to start carving out a control path for playing just audio digital channels..currently we can only play audio-video channels only
 
@Als oh sounds complicated
what kind of company do you work for?
 
Als
With the architecture, I have here its a bit messy...No Open Closed principle...Need to modify hundred places to add a new functionality
I am working on a Set top box product currently
@Miss: Shine fit fat sounds good :)
 
@als yuppi...
 
Als
@TonyTheTiger: If you remember I joined a new job recently...The guy who wrote the framework did so intight timelines & and has left for good :)
@Miss: Sound quite cheerful lately? Whats the matter?
 
hehe..
 
7:52 AM
@Als fun fun
 
Als
@TonyTheTiger @FredNurk: Fun for now, but i fear a code explosion pretty much soon :)
 
@Als oh gosh
 
@als : which code?
 
Als
8:34 AM
@Miss: Code of he product i work on at my workplace
 
@als Ah.. ok ok good luck... have a nice time...:)
 
Als
@Miss: Thank you, have a nice time too :)
@TonyTheTiger: If you dont find me lurking around here for a long time...You can assume i reached martyrdom in the code explosion :)
 
9:12 AM
Hello
 
Als
@Chris: Hello
 
How are you
 
Als
Well thank you
:)
 
Do anyone know perl a little ?
 
double chris. hi
 
9:16 AM
ooo Chris Chris :)
 
@Als ok I hope you don't drown
 
I dont want to submit lame question about perl help, lol :P
And even uncle google dont want me to help fastly
 
@Chris I don't know if you noticed that this is Lounge<C++> ?
 
i know :D
 
@Chris so not sure how you're expecting to get help on Perl in here?
 
9:19 AM
I know :)
But no perl room here
 
@Chris ok so ask on SO proper
morning @sbi !
 
sbi
@TonyTheTiger Morning? It's half past eleven here, and I got up at six thirty!
@TonyTheTiger @Chris Some of us might have a cat that walks across the keyboard once in a while (which is, I was assured, the only approved mode to write Perl), so it's not too far fetched to assume some of us might know a bit about writing Perl.
 
:)
 
sbi
(And before you ask: I don't have a cat. I have kids instead. Those break the keyboard when walking across it. I know for sure, because they've tried and succeeded.)
 
lol :)
 
9:26 AM
@sbi yea, it's still morning though, for me anyways
@sbi oh gosh, your kids don't make your job much easier do they?
 
sbi
@TonyTheTiger That's because you don't have kids. I had my alarm set to 6:45, but was awoken by a little girl sneaking into my bed at 6:20. By 6:30 she was done with cuddling and started kicking. I got the message and started to prepare breakfast.
 
+20 for speed coding :)
 
@sbi yea I don't have kids...
@sbi I used to do something similar to my parents when a little kid :P
 
sbi
@TonyTheTiger Actually, the kids are my job. This here I only do because I'm not used to be sitting around all by myself and would go nuts while they are in kindergarten/school. Well, that, and I do need a little money once in a while.
 
@sbi heheh :)
 
9:30 AM
money r good
 
sbi
Anyway, I do got work to do today, and I slept too little, so I'd better be off the chat today.
See you around!
 
sbi
9:42 AM
Well, here's one for the language lawyers: Is decltype an operator?
 
10:01 AM
why would it be? because it is used like an operator, or because its listed in the list of "these are operators" (which i imagine, it is not).
@Chris make a perl room?
 
@sbi If sizeof is an operator, then I would say decltype is also an operator. The funny thing is that they operate on the type level rather than the value level.
That is, the expressions to which we apply them are never evaluated but rather "etypeuated", if you will.
 
@FredOverflow my head will explode
 
@ChrisBecke On the value or the type level? ;-)
Scotts recent talk on caches is very interesting!
 
sbi
@FredOverflow Ha, found this:
In the C++ programming language, decltype is an operator for querying the type of an expression. It will be included in the upcoming version of the C++ Standard, often referred to as C++0x. Its primary intended use is in generic programming, where it is often difficult, or even impossible, to express types that depend on template parameters. As generic programming techniques became increasingly popular throughout the 1990s, the need for a type-deduction mechanism was recognized. Many compiler vendors implemented their own versions of the operator, typically called typeof, and some portab...
:)
 
Well yeah, if it wasn't an operator, what else would it be?
It maps an input to a result, and it's not a function call.
 
10:17 AM
@FredOverflow but some operators are function calls. so you can't use that as a disambiguator
 
@FredOverflow hmm prob worth a watch then
 
What would the signature of decltype look like if it was a function? :)
 
rephrased as "Caches, or why Linus prefers C to C++"
 
@FredOverflow did you completely watch the one on rvalue refs and move semantics?
 
@FredOverflow and could you overload it?
 
10:21 AM
@ChrisBecke Improbable... what would the signature look like?
 
sbi
@ChrisBecke Operators aren't function calls, but you can overload some operators by implementing a function with a special name, which will then be invoked if that specific overload of the operator is invoked. But there's always been operators in C++ which you cannot overload, like ., ::, sizeof, and ?:. (Read the FAQ entry on operator overloading.)
@FredOverflow Pretty much like sizeof, I guess. (In fact, sizeof would probably be implemented using decltype.)
 
@sbi The signature of a function tells you the types of the formal parameters, but the argument to sizeof does not have such a fixed type.
 
if sizeof were a function, it'd look like template<class T> size_t sizeof(T*=0);
 
I wonder, will invoking UB always lead to a crash eventually?
 
and you'd have to call it as sizeof<T>() for types, or sizeof(obj) for expressions
@TonyTheTiger no
I wonder, does sizeof(T) require typename for dependent types?
 
10:34 AM
@FredNurk so it could go on forever, doing things it feels like?
 
all bets are off if you have UB
 
@FredNurk hmmm interesting
 
@Chris just ask; you are, of course, less likely to get good answers about perl here, but we won't know until you try
 
why would you disapprove that c++0x comes a synonym of c++11 ?
they are the same...
 
sbi
10:38 AM
@FredOverflow I know. That's why I was evading it.
 
@JohannesSchaublitb this is an ongoing cause of befuddlement.
 
sbi
@FredNurk You couldn't pass a type to that.
 
@TonyTheTiger this is mostly to allow implementation leeway (some particular behavior can do exactly what you expect, important for some embedded systems) and remove some shackles on optimizers
 
sbi
@JohannesSchaublitb Ask @Tony, who admitted to be a sodding conservative and wouldn't wnat to switch to the new name. :)
 
10:39 AM
@sbi "and you'd have to call it as sizeof<T>() for types..."
 
sbi
@FredNurk Ah, I see. That would work!
 
in ##c++, the geordi bot uses << TYPE<T> to display the string rep of types and << TYPE(E) to display the string rep of the type of an expression
 
though I messed up, it'd need two overloads instead of the pointer hack: template<class T> size_t sizeof(); and another I can't quite formulate
 
i proposed some weird macro hack to make that work, and Eelis adopted it
 
@JohannesSchaublitb I thought it uses TYPE(T) and ETYPE(expr) macros
 
10:41 AM
that's deprecated xD
TYPE(T) interprets T as an expression
 
is TYPE(T) deprecated or just doesn't work?
 
TYPE(int()) -> "rvalue int" not "function taking no parameters returning int"
 
@sbi you're gonna keep mentioning that for the rest of my existence on the chat, aren't you? :P
 
it works if T is a valid expression lol
but ETYPE(expr) is deprecated, i mean
 
so broken instead of deprecated :); I see, one I mentioned is deprecated
 
10:43 AM
eelis thought the <..> vs (..) distinction is more intuitive
 
@FredNurk You could also go type traits ;-)
template <typename T> struct size_of;
template <> struct size_of<char> { enum { value = 1 }; };
template <> struct size_of<short> { enum { value = 2 }; };
template <> struct size_of<int> { enum { value = 4 }; };
template <> struct size_of<long> { enum { value = 4 }; };
template <> struct size_of<float> { enum { value = 4 }; };
template <> struct size_of<double> { enum { value = 8 }; };
template <> struct size_of<long double> { enum { value = 8 }; };
 
No. Just no.
 
But that does not work for user-defined types unless the template is specialised for those as well.
And you don't know about padding and stuff.
So yeah, I'm not too sad that sizeof is built-in magic :)
 
sbi
@TonyTheTiger In fact, when this chat ceases to exist, I will publish this information elsewhere! :)
 
or you can use a constexpr function called size_of
 
10:50 AM
@sbi I see, interesting :) I'm not too worried tbh
 
except that the argument will then be evaluated, as opposed to sizeof :)
or you use the unevaluated-conditional-love trick
 
hurray, just wrote my first useful Haskell module! An INI file parser, made it with Parsec.
 
@JohannesSchaublitb Exactly. Take sizeof(1/0), for example.
 
but I believe that such will still odr-use the argument, even with conditional-love tricks
 
@GrigoryJavadyan Parsec rings a bell... parser combinator?
Have you watched the new South Park yet? It mocks Germans heavily :)
 
10:53 AM
@FredOverflow yes, like boost::Spirit in C++
 
@FredOverflow i was talking on the llvm-ML that sizeof(1/0) is well-defined some weeks ago. some troll attacked me saying i'm all-wrong and whatnot. then Vandevoorde chimed in and corrected him xD
 
@JohannesSchaublitb ok, that's a name I haven't seen before..
 
@GrigoryJavadyan boost::spirit mocks Germans? How so?
 
@FredOverflow I meant Parsec :) But the SP episode does mock germans, yes :)
 
10:54 AM
@JohannesSchaublitb What was the name of the troll? And what is llvm-ML?
 
@FredOverflow I think there was a race condition between his click and the scroll :)
 
@JohannesSchaublitb You just posted that so I would upvote it! (And I did...)
 
@FredOverflow ohh i'm so in unconditional love with you!
lol
 
@JohannesSchaublitb Hm, I got a little tired of explaining undefined behavior to beginners lately...
 
10:58 AM
@FredOverflow tell them the computer might become self-conscious and overthrow humanity
 
@GrigoryJavadyan some AI researchers disconnect test machines from all networks, just in case...
 
@GrigoryJavadyan By the way, I found the "german" spoken in the episode quite hard to understand. And I'm a German :)
 
I suppose it's a form of optimism
 
@JohannesSchaublitb very, very nice trick. Looks portable too!
 
sbi
@JohannesSchaublitb I love you dermaßen! :)
@FredOverflow Usually I post a link to this: stackoverflow.com/questions/1553382/… :)
Oh, someone must have referred to my operator overloading FAQ, I already got 65 rep from it today. Nice, so I don't have to answer any new questions to earn rep. :)
My rep/question ration isn't all that good among the C++ top-users, but I did answer a lot of question, and those tend to earn you interest after a while.
 
11:19 AM
@sbi UB can make people pregnant? This might explain the conception of Jesus!
 
sbi
Hey, did anyone notice that anon has disappeared from that list? Made us all jump up one place.
 
I'm not in the top 20, must do more repwhoring :(
 
w00t!
why did he disappear just after I kicked him from #1!
 
sbi
@FredOverflow I don't know whether UB can actually make you pregnant, but if it did, this would be conforming behavior according to the C++ standard. :)
 
@sbi condom breakage is Unexpected Behavior
 
11:21 AM
i would call it UB
 
@sbi hopefully N.B. is doing well :(
 
sbi
@FredNurk No need to tell me about condom breakage! I got more kids than some of you have had girlfriends!
 
it's not even defined where you end up a couple of years later. could lie down in hospital, being infected by AIDS
 
@sbi I try to only have one of those at a time, so I hope so!
 
int numbers[9][16];
std::cout << &numbers[1][0] << '\n';
std::cout << &numbers[0][16] << '\n';   // is this legal/well defined?
I get the same address twice. Is this kosher?
 
11:23 AM
@FredOverflow yes
but &numbers[0][17] is UB
 
@JohannesSchaublitb Good, because I claim in my array FAQ that it is :)
 
sbi
@JohannesSchaublitb Well, be glad he didn't disappear before that, or you would have run out of an incentive to post answers much sooner!
 
@JohannesSchaublitb Ah, that might be a problem...
 
@JohannesSchaublitb then [16] would be too
but numbers[0] + 16 wouldn't be
 
if you use 16, you use the after-end address. if you use 17, it's plain UB. you cannot op+ one index after after-end
@FredNurk nope.
 
11:24 AM
But am I not guaranteed that elements are laid out sequentially in memory?
 
@FredOverflow contiguous storage is guaranteed
 
it's well defined if you do *numbers + 16 + 1. but it's UB to do *numbers + (16 + 1)
 
sbi
@FredNurk That's what I though. One past the end is Ok, but not dereferencing!
 
@sbi exactly, numbers[0][16] dereferences, even if the only use of that is address-of
 
sbi
@JohannesSchaublitb Ouch. That made my head hurt.
 
11:26 AM
it's simply how the add operator is defined for pointers and integers
 
@JohannesSchaublitb That's just weird :)
 
if you let it evaluate to a pointer before adding 1 again, then it points to numbers[1][0], and you are allowed to add 1 to that.
a one-past-the-end pointer may well point to another unrelated object that you well may dereference
 
sbi
@JohannesSchaublitb Uh oh. I wonder if knowing such arcane facts will someday lead you to the dark side.
 
it only depends on whether you know it points to such an unrelated object, or whether you don't know it
 
@JohannesSchaublitb You only know that in the case of arrays, right?
 
11:32 AM
i think so.
but it allows you to for_each(numbers[0]+0, numbers[8]+16, ...), I think. If it always steps by incrementing by 1 (as it does when using op++), then I think it's well-defined.
 
@JohannesSchaublitb Well that's something that you might know that you don't know, then there are the things that you don't even know that you don't know.
 
@CharlesBailey what's THIS!
 
@JohannesSchaublitb I'm sure that I don't know!
 
@sbi seems like the chat force was strong within you today:
2 hours ago, by sbi
Anyway, I do got work to do today, and I slept too little, so I'd better be off the chat today.
See you around!
 
11:37 AM
@CharlesBailey Socrates would probably be an awesome C++ programmer.
 
when that happens, I always takek 500ml of redbull and it cures me well
 
@JohannesSchaublitb coffee is what I prefer
 
sbi
@TonyTheTiger This was lunch! I swear!! I'm already off again!!!
 
sometimes I also take coffee xD
 
@JohannesSchaublitb Java coffee? ;)
 
11:39 AM
@sbi oh... forgot us programmers even needed lunch
 
@FredOverflow no, template coffee
 
ubuntu 11.4 the bees knees?
 
@JohannesSchaublitb but it seems not in chronological order
 
they are ordered per-user
my oldes crap comes at first saying "<litb> who is georg zimmer?"
 
11:46 AM
@JohannesSchaublitb I like this: <litb> you guys are all nerdy did you forget about yourself in that case?
 
yes I think so :(
 
@ChrisBecke no, I think 11.04 is natty narwhal
 
@FredNurk who is natty narwhal?
 
ubuntu 11.04
 
<litb> the more you know, the more you know that you cannot know more than you already know since you can ever know more
 
11:53 AM
hm i must have been drunk :(
 
@JohannesSchaublitb I don't think that was the only time that happened... you never talk as much on here
besides the occasional "lol"
 
"<litb> hmm" is popular too
both here and there
 
@FredNurk yea, seems like he's in robot mode when he does that
are you scared to troll here, what you troll there @JohannesSchaublitb ?
@JohannesSchaublitb that explains all I think: " i started with c++ by 15y, and told my mom to ask me the quiz questions of the c++ books all time again. it was so nerdy xD"
 
12:03 PM
haha
 
where is !grab :(
 
12:30 PM
0
Q: INI File Parser in Haskell

Grigory JavadyanHi, I'm learning Haskell at the moment, and have just written my first useful module - a parser fo INI files. I used Parsec. I'd like to know what can be improved here - or maybe I did some things completely wrong and there is a better way. Thanks. module IniFile (iniFileToMap) where import Te...

 
12:46 PM
@GrigoryJavadyan didn't know we did Haskell!
 
@TonyTheTiger Well, there seem to be a couple of people who know it in the room
but anyway, I created a room Haskell users
doubt that anyone would join it, though :(
 
1:30 PM
5 answers and no one was actually able to solve it cleanly... stackoverflow.com/questions/5894940/…
 
@FredNurk The order of construction is strictly defined. There is simply no standard-complying way of doing what you want.
 
@GrigoryJavadyan: my answer does it, and is standard-compliant
"it" being "run arbitrary code before Base's ctor without a nasty hack"
 
@FredNurk I changed the code you pasted a bit to allow it to use operator<<
 
@RonaldLandheerCieslak: just because something should never be negative is not a good enough reason to make it unsigned
similarly for sizes: sometimes sizes are negative
 
1:40 PM
@FredNurk oh, I rather think it is - and how can a size be negative?
especially in this context
 
sbi
For those of you, who still know Roger Pate, one of the earliest users of this room: He's still alive and kicking: stacksbi.wordpress.com/2011/03/20/sbi-is-leaving/#comment-3
2
 
@FredNurk But it's not achieving the same effect as it would if calling base ctor was possible from within derived's ctor when using public inhertitance. Namely, if there were any public methods in Base, they'd become private in Derived
 
@RonaldLandheerCieslak: std::vector<int> v (10); std::vector<int>::size_type x = 3, y = 5; // what's x - y?
@GrigoryJavadyan Base is a public base class of Derived, not private
@GrigoryJavadyan it really is the same effect. how is it different?
 
the difference in sizes - which is the only thing you can meaningfully say about x and y, is 2, and is of a different type
 
@RonaldLandheerCieslak _buffer is not reserved as an identifier for a member
@RonaldLandheerCieslak what is the type of x - y?
 
1:44 PM
@FredNurk in C++, std::size_t, but the point is that it is not meaningful
 
@RonaldLandheerCieslak: the difference between indices in a vector not being meaningful is ridiculous
 
@FredNurk the difference is meaningful, it being size_t isn't
 
ah, Derived is a struct, the default inheritance specifier for structs is public. sorry
 
@sbi I remember him
 
@RonaldLandheerCieslak I didn't add an op<< because it explicitly prints lines rather than a "single item", but if you want to add one, just add op<< in Backtrace; whether to use print() or op<< is stylistic, but I prefer the consistency of not using op<<
@GrigoryJavadyan what other differences do you see? (that would make it "not achieving the same effect")
 
1:48 PM
@FredNurk adding op<< the way I did it makes it a non-member function
 
None at the moment.
 
@RonaldLandheerCieslak: struct Backtrace { friend ostream& operator<<(ostream&, Backtract const&); }; makes it a non-member
 
@FredNurk sure
I just use Serializable in other contexts as well
 
@RonaldLandheerCieslak you have infinite inheritance: complex inherits from serializable<complex> which inherits from complex
 
1:51 PM
@TonyTheTiger that's why I picked this name
 
@TonyTheTiger good catch - thx
 
@FredNurk hehe
@FredNurk I thought it was a real name at first
lol
 
that page is about 90% adverts
 
@DeadMG read the 10% text on there
ignore the adverts
 
I did
it's still hardly worth my time
 
1:52 PM
good
oh gosh
then why are you complaining and thereby wasting more time on the complaint?
 
cause I don't want to have to do work :P
2
 
of something that is really not worth your time? :P
@DeadMG acceptable excuse
taxes are one good reason to stop working
 
@TonyTheTiger but death isn't
 
@FredNurk ?
I can hardly see a better reason to stop working than dying
 
(sarcasm may not carry well over this medium)
 

« first day (201 days earlier)      last day (4745 days later) »