« first day (257 days earlier)      last day (4708 days later) » 

3:00 PM
im confused now
i guess it's the coffee im missing
 
I have to go, wish me luck
 
May the Hypnotoad be with you.
 
Remember cthulu loves you.... in a sandwich
 
he proudly reports
17:04 < tomalak> litb: http://stackoverflow.com/questions/6534464/is-this-a-bug-in-gcc Reversal :D
17:04 < litb> tomalak: http://chat.stackoverflow.com/transcript/message/936020#936020
 
20 upvotes for a "its a typo"
 
3:07 PM
Oh here we go again.
 
Stupid questions are karma trains.
If you're fast enough to get a seat.
Woo, new personal rep record. 260.
 
in a day or an answer?
 
Mine is 275 :P
 
A day.
I got most in the morning.
 
3:15 PM
man, im gonna learn cobol and code for the big bucks
 
You don't know what you're talking about, right?
Have you seen the thing?
 
Why is it that the most interesting questions always get closed? Like this one: stackoverflow.com/questions/778676/…
 
@StackedCrooked I think it should have been migrated to Programmers. But it will probably be a duplicate there.
But maybe there was no programmers.se at the time.
And personally, I don't find it that interesting.
 
@MartinhoFernandes Perhaps not.
 
0
Q: Callback into singleton class

DanSI am using a singleton class with a thread that calls into the singleton. I was asked during a review why I used the this pointer instead of the singleton instance. My code with the suggested changes. class myClass : public threadWrapper { public: static myClass& instance() { ...

Ugh.
WTF?
Just found a new chat feature.
You can't repeat the last message.
 
3:28 PM
trust me, I found that one long ago
along with the timeouts
 
@DeadMG I believe you.
 
@MartinhoFernandes Doesn't he need to do a reinterpret_cast instead of static_cast?
 
@StackedCrooked I'm too revulsed by the whole mix that I can't think properly.
 
"I am using a singleton class with a thread that calls into the singleton." pretty much sums up the question.
 
Singletons + multithreading + pointless performance question + whatever that sataic const int in the end is.
 
3:34 PM
satanic const int x = 666;
 
shouldn't they have asked him why he uses singleton?
@CatPlusPlus how does that compile for you? :)
 
@Default Evil-ly.
 
#define satanic
There, now it works.
 
:D
 
#define satanic __declspec(thread), now it's a bit more arcane.
 
3:36 PM
what does that do?
 
Makes a thread local variable in MSVC.
 
@DeadMG you didn't sound that impressed by his code :D
 
COOKIES!
 
cookies?
 
3:39 PM
@CatPlusPlus Haha, I've seen that one a while before!
 
COOKIES!
 
It could be worse.
Imagine you are robbed.
And then "I wish I could have all my crap back."
 
hahaha
 
3:41 PM
@MartinhoFernandes Be careful what you wish for! :D
 
@MartinhoFernandes sry for the edit, I wrote it before you wrote your last line
 
I've successfully implemented a C# control on a MFC form. I also have the ability to do the opposite.
What I don't know is if hooking into the message queue in the form would catch descending events into the children controls, because in this case of interlanguage GUIs, the controls run on a separate thread.
 
@Default: That's because Singletons are horrific and should be banned
 
That changing history thing disturbs me greatly. Bloody time travelers.
 
@DeadMG Singleton = globally scoped object?
 
3:43 PM
Singleton = Single tonne of crap.
3
It's a shortcut.
 
@Xaade Not quite. Globals are not half as bad as singletons.
 
@Xaade: A Singleton is a global object where one instance is enforced
I mean, one instance of thatclass
 
I don't see the problem.
 
if you've never seen the Singleton pattern, you should be grateful, and avert your eyes
well, it's horrifically unmaintainable, just like normal globals
 
It's pain to test. It hides dependencies.
 
3:44 PM
then it's even more unmaintainable because normal sane people can't just use an instance- everyone has to use the same instance, even if they know better
then it's horrendously unmaintainable because do you know what a bitch and performance waste it is to make it thread-safe to access and initialize?
 
I used singletons before (guess who taught me to use it :]) but then I came to SO
 
Thread safety is for wusses.
 
@Default Your teacher? Erich Gamma and his troupe?
 
Who taught you to use it?
 
@MartinhoFernandes my teachers indead :)
 
3:46 PM
So you killed them?
 
@Default Indead!
 
and then it's unimaginably horrific because the requirements changed and now you need two instances
 
whoops
indeed
 
@CatPlusPlus Well, they deserved it.
 
He confessed!
 
3:47 PM
@DeadMG That's what a Multiton is for!
 
Tupleton.
 
and then it gets even worse because it's global and on many systems, e.g. Windows, it's illegal to do some things in some global code in some cases
 
I love how specific you are.
 
so your EXE which works perfectly gets ported to a DLL for some reason and oh man, I hope you weren't trying to initialize a mutex in your DLL main initializing your Singleton because that's UNDEFINED BEHAVIOUR or a million other system functions you can't use from DLLMain
 
0
Q: Python: Making a beep noise

Marc BrighamI'm trying to get the program to give me a beeping noise. I'm on a windows machine. I've looked at http://docs.python.org/library/winsound.html But not sure how I can program this with a barcode scanner. Here is my code for the serial barcode scanner. ser = serial.Serial() ser.baudrate = 960...

 
3:49 PM
So what? She can always make an abortion.
 
I just... where people come up with those questions.
"Here is my barcode scanner, it sends 'Hello' through a COM port."
WHY DO YOU EVEN CALL IT BARCODE SCANNER.
That's lack of sleep kicking in, ladies and gentlemen.
 
Just drink more coffee Cat
 
I find text underfeatured for full snarkiness mode.
I can't do funny voices.
Just freaking italics.
AND LOUD NOISES.
Coffee sucks.
 
That's what extended-pseudo-HTML is for.
 
@CatPlusPlus you're funny :)
 
3:52 PM
that's why modern humanity communicates over the internets purely in images
 
* ** I can do bold italics maybe? ** *
 
@Default No, he's just crazy.
 
boltalics
 
*** I can do bold italics maybe? ***
 
It's my superpower, sorry.
 
3:53 PM
No fair
 
awwww
can't edit other peoples messages in the chat
 
you have to have a non-white character after the * Collecter
 
__Maybe combining the ways to do it__
 
@DeadMG that would be awesome
 
@Default Glad to hear that. :P
 
3:54 PM
lol
 
I give up for now
 
magic disappearing asterisks!
 
Fourth time the charm.
Or something.
 
***lol*** works fine
 
whoa! where did all the asterisks go!?
 
3:55 PM
I guess, not sure why it did not register the other way
 
I promised the chat implementation that we could have sexual relations later if it played nice for you
 
Anyone here know the going price for an atari 7800? it has no controllers but i believe has its cords
 
4:07 PM
why, are you.. collecting.. some?
a hahaha.. I am soo funny ^^
 
I do collect things, and yes I am looking to pick one up. :P
I have also started modding things. Trying to make a handheld N64 at the moment
 
Reached 10k rep, finally.
 
well.. I started writing an answer. Then a Jon Skeet appeared. :)
congrats @karlphillip
 
You know what? 10k is overrated.
 
Yeah.
 
4:16 PM
i think 10k is rated about 10k
 
@MartinhoFernandes is that the magic border? :)
 
gimme a bounty of 10k so i can see for myself
 
soo... what should we flag for @karlphillip?
 
and grats @karlphillip
 
I mean it.
That's what my top bar looks like.
See those annoying and completely inaesthetic numbers?
 
4:17 PM
yup
 
15,467 looks really ugly indeed
 
should be 14567
 
Those are telling you "hey, we want you to look through some stupid flags"
91 of them.
 
Not to mention flags here.
 
:D
what's that little fairy in link that goes "hey! hey! link! over here! hey!"
 
4:19 PM
Navi.
 
someone should implement something like that for @MartinhoFernandes that runs around on his/her screen ;D
 
"hey! hey! @MartinhoFernandes look at this flag! hey!"
now look at this one!
 
It's there already. It's that damn orange square.
 
it should read 91 fools
 
4:21 PM
That's all you get from being 10k.
 
you also get more upvotes
 
I would never let myself get to the point to review flags if it put a Navi like being in your browser
purposely submit crap to get downvoted
 
10.1k <yellow badge>
i'd upvote for that guy
 
@MartinhoFernandes can't you hide it? otherwise, I guess you'll have to bounty away 5k rep
 
Indeed, I don't feel more happy or special than I was 15 min ago with 9,999 rep.
 
4:22 PM
dude, you should
 
@Default I think I know enough JavaScript to kill it.
Hmmm.
 
Bounty it all away to us.
 
ask on meta perhaps?
 
privileges page say: "As one of our most experienced users, we're counting on you to guide the community and lead by example."
 
The last worthy privilege you ever get is at 3k: vote to close/reopen.
 
4:23 PM
I'll be a candidate at the next election. Not for governor of California.
I might* be.
Arnold should candidate for moderator of Stackoverflow. I think he'll fit right in.
 
@karlphillip how so?
 
@hexa 15467 is not ugly. It's a prime!
 
Does anyone know why svn repository browsing (using tortoise or svn list commands)) is so incredibly slow?
 
Because it's svn?
 
@MartinhoFernandes Makes sense.
Is git faster in this regard?
 
4:30 PM
What does svn list do?
 
@MartinhoFernandes it's like the ls command but on a url to an svn repo, for example: svn list https://stacked-crooked.googlecode.com/svn/trunk
 
Oh, then that would be because svn is not very network efficient.
Any operation that needs the network in svn is terribly slow.
And unfortunately lots of svn operations use the network.
 
Not very network efficient? I would think the cause is deeper, in the querying of the db itself.
 
It uses BerkeleyDB or something right?
 
I don't know.
 
4:33 PM
Oh wait, it's either BerkeleyDB or FSFS, whatever that one is.
But BerkeleyDB seems pretty solid.
As for whether git is faster doing that I have no idea, but given what I've seen I'd put my money on yes.
 
DVCSes don't hit the network, that's one speedup.
 
4:53 PM
Nice attempt of Japanese singing latino style youtube.com/watch?v=p1w1AH7_48Q
 
@MartinhoFernandes hahaha nice prime rep :P
wasn't git made by Linus?
 
@hexa yep
 
He named it after himself.
 
so you guys prolly hate it right? pretentious source control
after himself?
Git = git is torvalds? olol
 
4:55 PM
Git is mild profanity with origins in British English for a silly, incompetent, stupid, annoying, senile elderly or childish person. It is usually an insult, more severe than ' or idiot but less severe than wanker or arsehole. The word git first appeared in print in 1946, but is undoubtedly older. It is originally an alteration of the word get, dating back to the 14th century. A shortening of beget, get insinuates that the recipient is someone's misbegotten offspring and therefore a bastard. In parts of northern England, Northern Ireland and Scotland get is still used in preference to g...
 
@hexa I don't hate Linus. I respect him for being able to "walk the walk", and not just "talk the talk".
 
> I'm an egotistical bastard, and I name all my projects after myself. First Linux, now git.
 
hahaha, nice
 
It's not like I hate git, but I prefer hg.
 
I seriously need to learn git
seriously. i commit every time i remember, but thats like once in a month
and i never do anything with it
 
4:59 PM
honestly? I hate to admit this, but my idea of source control is my hard drive
 
The first source control application I learned to use was Perforce.
 
@DeadMG You code naked?
 
I even pay hosting for some websites, and i have almost full ssh access, so i can install a proper repository for myself, and also instal gitweb
i just cant make myself do it
 
@Martinho: I do that too
after all, I code in my own room on my own time and have every right to code with no clothes on
 
@DeadMG Local subversion? Or just plain folder access?
 
5:00 PM
There's no excuse for not using source control.
5
 
i have a script that makes: project-X.X.X-tar.gz and project-X.X.X-source.tar.gz
thats my source control right there
 
No that's not.
That's backups.
 
@MartinhoFernandes "I don't want to" is a valid excuse for me. People are free to do what they want.
 
Which is not source control.
 
i guess i could, with some effort, commit every source.tar.gz
and then have a proper source control
 
5:03 PM
I think you could use rsync as a poor-man's source control.
 
Very poor man: rsync doesn't keep history.
 
as I said, i need to take the time and learn git properly.
any git gurus here?
 
@hexa I'm actually Linus Torvalds, but don't tell anyone.
 
@StackedCrooked you piece of shit.
 
Ok, that was a lame joke.
 
5:04 PM
I know some git because I tried it before hg.
 
:D
 
Hey everybody, stackedcrooked is linus torvalds
 
@hexa, the piece of shit is YOU!
@hexa That was my Linus imitation.
 
@StackedCrooked nice one :D
@MartinhoFernandes so like, the only thing i need to make a proper repository is ssh access?
 
No.
You can create local git repos.
All you need is git.
 
5:06 PM
Ok... i meant remote repositories
 
In that case, yes.
 
oh so thats why every C++ programmer hates Linus.
first time im seeing that email
 
I have to admit that I agree with him that C++ is a horrible language.
Because it is.
But I like it.
 
@hexa It's an interesting/entertaining discussion. It also has a few posts by Walter Bright.
 
5:14 PM
@MartinhoFernandes Now why exactly is C++ a horrible language
 
pardon my ignorance, but who is Walter Bright? @StackedCrooked
@Collecter I think it's pretty obvious. It's not C.
 
Walter Bright is the author of the D programming language. He also created a C++ compiler. This alone makes him probably the most knowledgeable person in that thread.
 
@hexa Inventor of the D programming language, as well as author of the Digital Mars/Symantec/Zortech C and C++ compilers.
 
@hexa Actually, it's mostly the C that makes it horrible.
 
@Collecter Very hard to parse for both people and programs
 
5:15 PM
@MartinhoFernandes I said that just to piss you off :D
 
I will admit, I am new to programming compared to where you guys seem to be. Explain more?
 
Unfortunately, in this thread he didn't defend C++ and instead promoted his own D language.
 
@hexa It is, however, largely true -- but as Bjarne has pointed out repeatedly, there are lots of cleaner languages that were invented around the same time as C++, but they're all essentially dead, because they're not (as) compatible with C. C++ puts up with a lot of ugliness, but it's a large part of why it's still being used.
 
"I can appreciate that. I originally got into writing compilers because
my game (Empire) ran too slowly and I thought the existing compilers
could be dramatically improved." - Walter Bright
thumbs up for this guy, for being a gamer ofc
 
@Collecter Explain more of what exactly?
 
5:17 PM
Why C++ is a horrible language, why C is so better, or however you guys view them. I have learned some C, C++, Java, etc.
Still trying to figure out what i want to learn a lot more of first
 
Ok, (I hope) no one here was trying to say C is better.
 
I was joking. I didn't really want to say C is better, I really don't know if it is. But really like it
 
Alright
 
@StackedCrooked Probably a reasonable move -- when somebody's that bigoted, they're unlikely to listen to reason or be swayed by facts anyway.
 
Sometimes jokes and sarcasm are hard for me online.
 
5:19 PM
I'm in the process of learing C++. I'm using C++ for over a year now, but i have this approach of "C with classes" and now im realizing i need more, i need proper C++ and im really liking it
 
@Collecter So you know a bit of C, a bit of C++ and a bit of Java. Which of those did you find simpler?
That's one point: C++ is extremely complicated.
 
Well I started with C++, moved to Java, and have done a bit of C now.
I have not found any particularly hard for what I have used them for
 
If you want to see for yourself you can look at some of the questions on on the site.
 
I want to go into AI eventually. (just finished my first year of college)
I really need to decide where in AI to choose a language though.
 
Grab yourself some LISP. I heard it's popular there.
And even if not, it's an interesting language.
Gotta go now.
 
5:26 PM
See ya
 
My first Clojure project was fun.
 
I am seeing a lot of parenthesis.
 
In Lisp you have to put your statements in a data structure, and then evaluate that data structure. You are always metaprogramming.
 
it is a shame the M-expression didn't survive. I like [] a lot more than ()
I cannot read lisp without thinking of the sound. This could get annoying. xD
 
5:41 PM
Create a window and paint a blue rectangle in Clojure:
(import javax.swing.JFrame)
(def f (new JFrame))
(doto f (.setSize 200 200)
        (.show))
(def g (.getGraphics (.getContentPane f)))
(doto g (.setColor (java.awt.Color/BLUE))
        (.fillRect 0 0 200 200))
(.fillRect g 50 50 100 100)
It's much more concise than Java :D
 
Yes it is.
 
And this would be Lisp's answer to RAII:
; write "hello" to "data.txt"
; calls w.close() in internally created finally block
(with-open [w (new java.io.PrintWriter "data.txt")]
  (.print w "hello"))
 
RAII is basically just memory cleanup right?
 
Far, far from it. Not trying to put you down, sorry.
RAII is really important in that it allows one to set up class invariants. That's very powerful when it comes to design.
 
@LucDanton Explain please then. I have not really heard much/anything about it
 
5:49 PM
@Collecter: You can put whatever logic you want in the destructor
which effectively means that you can make arbitrary logic automatically happen independent of exceptions at pretty much any time
 
That is cool. I wonder why i have not heard of it yet.
 
only really exsts in C++
 
@Collecter Invariants or RAII?
 
both actually
looked up invariants just now
 
For RAII it's not surprising given that AFAIK it's C++-speak. Variants come up in related domains (e.g. 'always initialize at the site of first use')
Personally I was taught invariants in a course about abstract data types (in particular when designing them)
 
5:53 PM
@Collecter pro tip: mentioning RAII makes C++ people feel very excited :)
 
I have really only taken a logic course, and intro to C and separately, Java.
@StackedCrooked Noted.
 
RAII is what makes C++ special
well, part of it, at least
 
RAII is also what makes C++ interesting and fun.
 
I will be honest, do not remember too much C++, it had been like 4 years.
The syntax shouldn't be too hard to pick back up though
 
@Collecter RAII is typically not taught at school. They teach you to new and delete properly. But that's not exception-safe.
@Collecter Let's start with a function that takes a template type and an associated method as arguments. Syntax shouldn't trouble you too much :D
 
5:59 PM
@StackedCrooked Alright. My C++ instructor in high school died before he could teach us more. I still need to crash Bjarne's comp for him.
 

« first day (257 days earlier)      last day (4708 days later) »