« first day (491 days earlier)      last day (4440 days later) » 

10:00 PM
guys
 
@CatPlusPlus Yeah, but I don't see how to use then in stack-based language.
 
@Pubby i had no choice but to unaccept your answer and accept Richard's :/
wie schmeckt es denn
 
@Pubby As far as I can see, exception handling uses continuations to restore data stack. But again, haven't played with that yet.
 
10:03 PM
@JohannesSchaublitb Yeah, his was a better answer, not to mention correct!
 
Ell
How can I avoid dynamically allocating because I need to try{}catch(){} with the constructor?
 
@Ell Hm?
We'll need more details for that.
 
cpx
@JohannesSchaublitb oh your new picture looks very nerdy.
 
@CatPlusPlus Yeah, although the implementation seems hidden. Guess I'll play around and see if I can do anything cool.
 
in FFM main train station there was a public phone with Windows on the screen.
 
10:04 PM
Do you always get the capatchas when you submit a question/answer? :(
 
Ell
If I need to catch exceptions with a constructor, but I only want to surround the constructor with the try...catch it means at the end of the try, it will go out of scope and destruct, besides dynamically allocating, is there any way to avoid this?
 
apparently their software crashed. and you could enter stuff into the cmd.exe xD
of course I took a pic with my cam D
 
What is anyone going to do with cmd.exe? Run batch files?
 
@KianMayne "capatcha" sounds like a name of some sort of Spanish animal.
 
@Pubby among other things :)
 
10:08 PM
@EtiennedeMartel Spanish is my favourite language
 
@Ell Still doesn't make lots of sense.
 
@Pubby looking like a terrorist to the old grannies that walk by xD "ohh he hacked the system! police!!!^1^"
 
Well, my favourite foreign language
 
Ell
@EtiennedeMartel sorry I will write a little example, give me a second
 
thats neat
 
10:09 PM
If you need to manually deallocate in catch handlers, you're doing it wrong.
 
@JohannesSchaublitb :L Whenever I open a command prompt I get people like OMG WHAT ARE YOU DOING
 
you only need to include fstream, not iostream and fstream, they have been combined
 
@Ell That's a Bad Thing™. There's a reason that try is structured this way.
 
@KianMayne i bet they will ask "Is that the matrix!?"
2
 
if the constructor throws, you cannot ever use the variable again, so going out of scope is the best way to deal with it
 
Ell
10:10 PM
@DeadMG Oh :S what is that reason? stack unwinding?
oh kk
 
no, because the variable is garbage since it's constructor failed
there is no useful operation you can perform on such a thing
 
Ell
doesn't the function return though? after an exception is thrown?
 
@Ell What function?
 
@JohannesSchaublitb Haha, I was sshing into my linux server the other day watching yum doing some stuff and I got a "are you on the matrix or something?" :')
 
@DeadMG for file io in C++, is it good to do fout << flush; if fout was the instance?
 
10:12 PM
@ScottW Why not? Don't you just love all the random crazy things like "rough, though, thought"? :D
 
@Hoxieboy If you ... need to flush it
 
Ell
@DeadMG constructor?
 
@KianMayne trough, bough (which is both a name pronounced "buff" and a part of a tree pronounced "bow")
 
@Ell Exit-by-exception is most definitely not returning.
 
@DeadMG whats its purpose though? freeing sys resources after opening a big file?
 
10:13 PM
hell, the whole point of throwing an exception is to prevent the need to return.
 
std::toilet << std::flush;
6
 
Ell
sorry I thought you could use the term return just to mean exit
 
@Ell If the constructor threw an exception, do as if the object was never constructed.
 
@Hoxieboy Ensure that the buffer is written before some potentially catastrophic event.
 
@CatPlusPlus lol, your humor impresses me
 
10:13 PM
@Ell No. return and exit-by-exception are definitely two completely separate things
 
It's toilet humour.
 
Ell
Yeah sorry I just got the terminology wrong, I hope :L
 
an object whose constructor threw never existed in the first place
and most definitely cannot ever be used for anything, at all
 
It wonked out of existence.
 
the reason try is structured like it is is because the scoping rules naturally lend themselves to expressing this fact
 
10:15 PM
@KianMayne I tend to fullscreen my shells so there is literally nothing else in view. Works wonders with mintty/screen/vim. My collegues worry about me, yes
 
@sehe Well they won't be so surprised when Win 8 comes out ;) Public beta's soon isn't it?
 
@KianMayne Yes. Don't remember exactly when, but Soon™.
 
@ScottW a fullscreen terminal is still a gui to me. And a very efficient one
 
@DeadMG It was meant to be in February but I'm guessing they'll keep it till later on in the month
 
@KianMayne Why's that? Do they include ssh, screen and vim? Or do they fully support headless?
 
10:18 PM
@sehe Because Metro apps are fullscreen so that kind of look is probably going to come up
 
@KianMayne oh. metro. meh. reminds me of Canonicals unexplainable Unity window manager
 
How do you do square roots in MathJaX?
 
I mean, when I want a window manager, I want to to actually manage my windows. If I want a tiling engine, I'll run RatPoision (or Divy on win32)
@KianMayne \sqrt(23234)
 
@sehe Thanks
 
2 days ago, by sehe
@DeadMG This worked for me... ? ` $c^2 = \sqrt (a^2 + b^2)$`
 
10:24 PM
Has @Martinho disappeared again?
 
XD
derp sqrt not squared :s
 
Look how regular is activity curve is O.o chat.stackoverflow.com/users/46642/r-martinho-fernandes
 
he has internets problems
 
Can someone upvote this math question so that I can upvote the guy who helped me with an answer - I've only got 10 rep
 
lol I'm creating a database program in C++ to monitor the activities on my computer :)
 
10:37 PM
@KianMayne You get 100 rep for linking your account with Stack Overflow
 
@DeadMG All my accounts are "Sign in with Facebook" ones across all of stackexchange
 
@ScottW Not as far as I know.
 
I've actually got more rep across SE in like a hour than ever before :L
@CatPlusPlus I lost your upboat || downpoo user script :( Can I have the link?
 
10:52 PM
Aug 26 '11 at 13:47, by Cat Plus Plus
@namespace url(http://www.w3.org/1999/xhtml);

@-moz-document domain("stackoverflow.com") {
    .vote-down-off, .vote-down-on, .vote-up-off, .vote-up-on { background: none !important; font-size: 1.8em !important; text-indent: 0 !important; font-weight: bold !important; }
    .vote-down-off:hover, .vote-down-up:hover, .vote-up-off:hover, .vote-up-on:hover { text-decoration: none !important; }
    .vote-down-off, .vote-up-off { color: gray !important; }
    .vote-down-on, .vote-up-on { color: orange !important; }
That was google upboat downpoo -> second hit
 
@sehe :L I didn't think that would work but thanks!
 
@KianMayne My reasoning going roughly like this: wtf is upboat, wtf is downpoo -> must be googleable;
 
Haha
 
I've heard of upboat but I've never seen downpoo before
 
@KianMayne The words that never get used, are the easiest to google. The same goes for the hash of your password: google d274e90ab1ce1cda647f5685a02f4451 and you'll know kristian.larsson <AT> macrobondfinancial.com's username and password :)
 
10:57 PM
@sehe Not for my passwords ;)
 
lol
 
@KianMayne I know. Good passwords, safe sites, salts, expensive hashes; it all helps,
but the power of the web is routinely underestimated by legions
 
man
so much code to write
 
@sehe Yeah, I'm talking plain hashes without salts - people just don't publically compute the randomer things
@DeadMG The life of a programmer in one sentence ;)
 
lol
if only I had a more efficient interface
I can think way faster than I can type
 
11:00 PM
@KianMayne Thing is you can't control how F*ckBook hashes your pass, can you?
 
@sehe You mean, Fuckbook?
I didn't realize you were on there
 
@DeadMG That may be true, but in my experience the keyboard slowdown helps. Makes me correct fewer thinkos (at the cost of more typos)
 
@sehe But my passwords aren't hashed on the net - I've checked
 
@DeadMG I'm not. For the same reasons (among others)
 
@DeadMG I always type things and miss out words - the same happens when I'm handwriting (even in my cryptic scrawl)
 
11:02 PM
@KianMayne I haven't handwritten anything in months, if not years
except during my exams
 
@DeadMG Isn't that an adult spin on Facebook? :L
 
@KianMayne That's exactly what I was thinking. You see advertisements for it every time you use The Pirate Bay or Failblog or someplace desperate for ad revenue
 
Yeah
 
@KianMayne You've ... what? Ah nevermind. You can't. But I assume you mean something else. Thing is xyz.com is perfectly entitled to store your pass in plaintext, or use crappy unsalted hashes. They are even liable to use them out in the open in a tamper-prone cookie. Also, their' hash databases can and will be hacked and get publicized on the web and then it is only a sinlge rainbow table lookup :)
 
How do you get the Analytical badge?
 
11:03 PM
"Visited every section of the FAQ"
 
@KianMayne Wear nerdy glasses and co-act in the move "Analyze That"
 
Yeah but does that involve clicking on all the links in the sidebar?
 
@sehe Bad idea to have a password included in any feasible rainbow table
 
I'm not sure
The badges are not awarded automatically so it's hard to test
There's a chron job somewhere in the SE servers that awards badges
 
@DeadMG Or just accept that passwords on the web aren't really worth their... salt
 
11:05 PM
lol
 
And use different ones, for all sites.
 
@sehe Oooh.
 
@sehe Password database win
 
@DeadMG Again.
 
Brute forcing is easy now that we have GPUs.
Or that we can rent a botnet.
 
11:07 PM
It would be nice if sites could properly implement two-factor authentication
 
@EtiennedeMartel That's where the expensive hash function comes in
@Insilico Kind of. Read Bruce Schneier, though
 
A password + three security question is not two factor
 
Yeah Lastpass gave me a 32 random character password. I think that it's a bit more secure than "correct horse battery staple" even if I do have to log in to Lastpass to get into fbook
 
I came across an article that recommended to use bcrypt especially because it's slow as hell.
 
@Insilico Facebook does, and google does
 
11:08 PM
@Insilico No, it is a account with an extra vulnerability (now people can't just guess the password, they can gues the secret Q/A too)
 
I think the point of having a passowrd like "correct horse battery staple" is that it's something you can actually remember
 
@EtiennedeMartel In the PHP room IRCMaxwell (or something like that) wrote an article on good PHP password hashing
 
@EtiennedeMartel It's what it's for
 
@sehe: Don't you need both for authentication to work?
 
11:08 PM
@Insilico Yeah but it's meant to be more secure than a shorter, random char password
 
At least the last time I remembered two factor meant you needed both pieces
 
Please test RB-tree in code upper, please ctitise the code :) thanks a lot ;)
 
@Insilico Huh. What is that a response to?
 
Oh @DeadMG:
 
@Insilico Something you have, and something you know.
 
11:09 PM
> If you are an experienced Stack Exchange network user with 200 or more reputation on at least one site, you will receive a starting +100 reputation bonus to get you past basic new user restrictions.
 
Having two things you know, isn't any advantage
 
@sehe: "No, it is a account with an extra vulnerability (now people can't just guess the password, they can gues the secret Q/A too)"
Oh nvm
 
@Insilico The way I encouter it, security question are used as a fallback for when the password was lost/forgotten?
 
@sehe: Yeah, what I was saying that having additional security questions do not make something two-factor
@user1131997: I haven't run it, but I think it would be best to put the enum into the struct
But I don't know C rules as well as C++ rules, so I don't even know if that's something you're supposed to do
 
@Insilico please, give more advice where exactly? thanks a lot
 
11:13 PM
Well, if I was writing up a RB tree, I would try to keep the internal details internal
 
@Insilico code is only for pure C, cause of Minix, the C++ compiler for Minix isn't good, it has a lot of leaks, bugs etc...
 
@user1131997 Then find a C room.
 
@DeadMG C is a part of C++
 
@user1131997 Oh dear.
 
@user1131997: Yeah, but the techniques are unbelievebly different
 
11:14 PM
@user1131997 A tiny, insignificant, irrelevant part.
 
Actually that's not even true
 
The C library is a part of the C++ library, yes. Aside from that, they share a small part of their syntax. But that's it.
 
Not all valid C code is valid C++ code
 
such an unbelievably worthless fraction that C++'s good practices totally supersedes C's in virtually every case
 
Simply put, C != C++
 
11:15 PM
If you give some of your rep away as a bounty can you lose privileges?
 
@DeadMG where do I equal them? I said "part"
@DeadMG one can be the subset of other by concept , etc
 
@user1131997 A part that has no bearing on anything.
 
@user1131997 Will you stop wasting our time. That code (pastebin.com/sNKqUnsH) is an exact copy paste from here: cs.auckland.ac.nz/~jmor159/PLDS210/niemann/s_rbt.txt
 
@user1131997 Except anyone only ever codes in the best concepts
 
The "C++ has C parts" thing is for backwards compatibility
 
11:16 PM
that exclusively precludes almost every C concept in C++
 
@DeadMG then, I may be prefer to use C++ on Minix, if there was good C++ compiler
 
Not so you can continue coding like C in C++
 
@user1131997 Well, that's really not my problem.
but don't come in here waving your C code like I should care more than if it was Lua or Bash or Haskell or Brainfuck or Prolog or Erlang
 
obligatory BF reference. You forgot to meta-quote it :)
 
@sehe nice catch
 
11:19 PM
@DeadMG I suspected the same for about half of the other code bombs he dropped. This time I thought I'd follow my hunch for once
 
@sehe: Why do people think we won't find code that has been copied-and-pasted from some other site?
It's not like we don't know how to use search engines
 
@Insilico I hesitate to say... trolls?
 
I mean if you're going to copy-and-paste don't "turn it in" verbatim
 
@Insilico Let's give the guy a handbook ...
 
@sehe: I suspect that won't help a bit...
 
11:21 PM
@sehe Wait, what?
Now I feel responsible. It's because I told him that std::maps were generally implemented as red-black trees, right?
 
@EtiennedeMartel What's unclear there? I had the suspicion multiple times before. I don't know whether I was right on those occasions, because I didn't bother to check.
 
@EtiennedeMartel That code is only even roughly equivalent to std::set<T> anyway
 
@EtiennedeMartel: Well, it's hardly your fault for telling something that is true
 
@DeadMG Well, std::map can be seen as a set of pairs.
 
@EtiennedeMartel Could be. In my view, the guy comes up with totally unrelated CS questions once every 7 hours, so I wouldn't think you have much to do with that
@EtiennedeMartel With a selective ordering predicate :)
 
11:24 PM
@sehe Yeah, that's about it.
 
ah
I don't need that extra functionality right now
I'll just get back to it
 
@DeadMG @EtiennedeMartel chat.stackoverflow.com/transcript/10?m=2684513#2684513 - that was before that post :)
 
lol
ok
 
Wait, you mean he comes here, he dumps plagiarized code, and...?
 
now I'm really feeling like whacking him with the move-messages-to-bin-hammer
 
11:30 PM
@EtiennedeMartel Not that simple.
 
@sehe Yeah, if it were simple...
 
@DeadMG You already do, quite frequently (at least three times now) because he posts walls of code
 
I seem to be almost the only room owner who remembers that you can do that
 
@EtiennedeMartel I can't look into his soul, perhaps he's really studying CS very hard and in all directions, but his pattern of questioning (and mostly 'handling the responses') struck me.
@DeadMG Also, the fact that if his messages get binned, there is (at least sometimes) no response whatsoever from his side. He seems to not even notice. That seems unnatural. Makes me question hist motives for asking.
 
well, he seems to be rather elaborate for a troll, though
I can't exactly imagine him jacking off at how pissed off we are
 
11:33 PM
I have theories, but again, I can't look into his soul.
@DeadMG Yeah, he knows 'stuff', but not very well. Seems he really craves 'highlevel' conversation about it.
@ScottW Which repo?
Hahahahaha. ROFL
 
@ScottW I'm not going to go checking out a bunch of random repos of undefined size for a platform I don't own or develop for
 
Yes, because we all have no lives, therefore we will be more than willing to give you a detailed review of all your repositories, FOR FREE!!!
 
Hahaha
 
oh
in that case, yes, joke fail :D
 
Well, I would be just as sarcastic even if you were serious. :-P
 
11:38 PM
Oh the joys of unavoidably writing repetitive code because the language is so crap. (VBA)
 
@ScottW no need
@KianMayne Point in case? I have the dubious honour of remembering quite a bit of advanced VB/VBA
> One fool can ask more questions in a minute than twelve wise men can answer in an hour
 
@sehe Creating a bunch load of properties
I'll post an IDEone link if you want?
 
@KianMayne Oh like that. Unless you are willing to replace by a keyed dictionary (let me try to remember correctly), but you could achieve property-like syntax like so:
  myobject!Property1
  myobject!Property2
"Property1" and "Property2" would get passed as parameter to the default property get (get_Item in standard ICollection IIRC)
This would assume you don't need to strongly type the properties and are ok with late binding by name
 
Good afternoon people.
i have a quick question here:


codepad.org/Z5sD5IaV
 
@sehe To be honest I have gone a bit over the top with this; it's a spreadsheet model that we have to do for our A Level IT - one thing it has to include is a customer registration form, and while most people everyone else just used a cleverly formatted sheet, I built a whole userform and implemented regex and a SHA-1 password hash
 
11:43 PM
@Leoheart: Presumably your question is "Why I'm getting these compiler errors"?
 
I am trying to understand the "why this size" for these objects
 
Btw, It's this kind of thing: ideone.com/1Twtg
 
@KianMayne Never gonna be remotely secure inside an excel workbook ...
 
noo its compiled
Oh, sorry, i copied pasted the wrong link. Please check this one
 
@sehe Obviously but it was more of an experiment than anything
@Leoheart Edit your post
 
11:45 PM
@Leoheart: Almost certainly it's because your compiler is adding padding for alignment
 
Okkay.
HEre are my questions.
 
Or because your class has virtual functions
 
Please look at the football class.
Why its size isonly 4
Doesnt it count the size of function and constructor...
or size is always for the data member only
 
Yeah
That's exactly what's supposed to happen
The functions are not "part" of the size of a structure
 
what exactly ?
 
11:46 PM
@KianMayne At least leverage named ranges. They rock. So you define a name (Insert Name, or Define Names for a whole table with row/column headers) and refer to is in code like customerDBSheet!MyName.Value instead of the annoying customerDBSheet.Range("L3").Value stuff.
 
ohh okay
 
Well, when your compiler compiles your code
 
then why Sports class's object is size 8
 
It compiles it kind of like this:
 
because of virtual pointer?
 
11:47 PM
@sehe I've used them elsewhere but things start getting weird when I looked into formatting as an autotable - It's not completely finished yet
 
because virtual pointer gets added and increases the size by 4 bytes making sport's object as 8
 
@KianMayne Apart from that the code looks relatively sane. I'd leave it as is
 
gotchya
 
struct Football
{
int bowl_count;
};

void Football_play(Football* this) { /*...*/ }
 
ok?
 
11:48 PM
@KianMayne You mean actually an autotable (auto formatting?), or Data/AutoFilter?
 
I think maybe IRC was a bit more tidy
 
size of football object would be size of int on that machine
 
@Leoheart: The functions "occupy" a different space from the structure itself
 
@sehe Autoformatting, but with a custom format
 
got it.
 
11:49 PM
@KianMayne Ok. Clear
 
@Leoheart: But when you have virtual functions
There needs to be room for something called a vtable pointer
 
yaa it adds a pointer to vtable in that class automatially in class
 
A football is an inflated ball used to play one of the various sports known as football. The first balls were made of natural materials, such as an inflated pig bladder, sometimes inside a leather cover. (This has given rise to the United States slang-term "pigskin".) Modern balls are designed by teams of engineers to exacting specifications, with rubber or plastic bladders, and often with plastic covers. Various leagues and games use different balls, though they all have one of the following basic shapes: # a sphere: used in :Association football (also called soccer in some countries) and...
 
And this vtable is what allows polymorphism to work
 
@KianMayne It seems that you have your act together, and I wouldn't (want to) improve on the VBA snippet you posted. HTH
 
11:50 PM
got it
i have 1 more question...
 
That's why the sizeof operator exists
 
@sehe The most annoying thing is though, that all this cool stuff I've done was at best, for fun and wouldn't separate me from any other candidate
 
yup
 
Because it's IT not CS
 
@KianMayne candidate for what? I think I'm missing context
 
11:51 PM
@Insilico no, C++ has never required a vtable. and it is not necessary. it is just the most practical way to do things, used by all or nearly all extant compilers.
 
so my other question is.
Would the Dervied class destructor will always be called first and then base class destructor, when deleting a derived class object
 
@sehe It's part of an A Level IT qualification - exam candidate
 
@AlfPSteinbach: Well, it technically doesn't, but every compiler I've seen does it that way
 
@Alf P. True that's why sir Bjarne never said anything about vtable
and its totally depends on compiler
 
@AlfPSteinbach: But I am talking to someone who hasn't quite got a hang of the C++ language yet
And who looks genuinely interested to learn
 
11:52 PM
@KianMayne Oh. It depends on the norms/values of the judges. In real life, the IT factor is often most important (getting things done). Too many people shy away from actually coding things in, say, an office tool because 'it is not pretty like Fermat's Theorem'
 
nothing makes me happier than devising a nice generic solution to a problem that previously irked me significantly
 
Having conversations interleave like this is confusing as hell
 
so my other question is.
Would the Derived class destructor will always be called first and then base class destructor, when deleting a derived class object
 
@KianMayne No doubt there is a balance to find, but in real life, the IT factor should earn you points (perhaps not with the employer you are aiming for, so check your ambitions)
 
To use libclang, do you just download the whole of llvm and clang, or what
 
11:53 PM
@Leoheart: Correct
 
@Insilico No, the Derived destructor always goes first
 
always..
 
always
 
destruction is exactly the reverse of the order of construction
 
@Insilico My browser has a shortcut that restores order in the universe: ^W
 
11:54 PM
Got it.
 
@DeadMG: Yes, it is required by the standard
 
and the Derived class constructor always goes after the Base one
 
If the compiler does it differently, it's a bug
 
@sehe Yeah I understand, I don't know if you read what I posted a while back but when we were tasked with creating a macro for navigation (specifically moving to "the next page") I was discouraged from creating a mathematically efficient solution:
 
@Leoheart always (love beating a dead horse :))
 
11:54 PM
@DeadMG: that answer sounds straight from heart.
 
Sub gotoNext()
Sheets(ActiveSheet.Index + 1).Select
End Sub
 
:)
 
I clearly can't read today, sorry
 
and instead one for each page which I found strange
 
@Leoheart It's trivial to prove that this is the case and prove why it has to be.
 
11:55 PM
@DeadMG: i proved here codepad.org/Z5sD5IaV
but just wanted to ensure that there is no exception
 
@KianMayne link? I can envision pragmatics and readability coming into play, but I'm not sure what the actual problem looked like
 
@Leoheart why is much more important than that it is
 
can you please explain why?
i never pondered about it
 
Well, to use a physical analogy:
 
@sehe I'll upload to my webserver, 1 sec
 
11:56 PM
Say you have a car like this: class car { engine e; };
 
@Leoheart How could a derived class safely operate (to do it's destruction) when the base class part might already have gone missing?
 
Do you build the engine first or the car?
 
@KianMayne Oh, I don't have excel handy :)
 
11:57 PM
Now I know how some users have ridiculous rep counts: they answer duplicates.
 
engine
 
@Insilico that's a horrible example :)
 
@DeadMG good it's only harmless VBA mods
 
@sehe It's just the BAS file, rendered as plaintext
 
if the Derived constructor ran before the Base constructor, you could access many member variables and member functions before they are constructed
which, trivially, is extremely bad
 
11:57 PM
@Leoheart: There you go.
 
@Insilico engine does not derive from car
 
@KianMayne Ok, they apparently wanted readability. What was your suggestion, then?
 
and also violates the Liskov Substitution Principle
 
@sehe The bottom two functions
 
@KianMayne You don't say they wanted gotoNext and gotoPrevious defined for each worksheet?!
 
11:58 PM
got it.
 
Sheets(ActiveSheet.Index + 1).Select is readable!
 
@SethCarnegie: Well, the engine is built first before the car class.
 
Oh my.
 
Now i have 1more question
 
Too many people use inheritance when they should be using composition.
 
11:59 PM
One guy few days before asked me(manager from a consumer company) what do you do as a programm to write a deadlock free code
 

« first day (491 days earlier)      last day (4440 days later) »