« first day (376 days earlier)      last day (4555 days later) » 

7:00 PM
Actually allocating all of it in a single std::vector might improve performance due to memory locality.
 
Or just put them in a std::array.
 
I should try that.
My compiler doesn't support C++11 yet.
 
boost::array.
 
A Tetris with Performance problems? :)
 
Why bother?
 
7:02 PM
How about a good old C style array then?
 
My Tetris runs in 800FPS. Granted, it only renders two static triangles and doesn't do anything else, but still.
 
@FredOverflow that's what I am doing. An array of vectors. But it can be improved by stuffing it all into a single array or a single vector.
 
sbi
Whoa, now Eric Lippert is going to rise on DIY, too!
 
@CatPlusPlus That's not Tetris. I'm sorry if I shattered any of your dreams.
 
@RMartinhoFernandes It's higher order Tetris.
 
7:04 PM
My Tetris gets max 60fps. But that seems to be the limit of Qt's canvas view (probably non-accelerated).
 
Or you just have vsync on.
 
@FredOverflow Memory problems too. Windows kicked my program when it tried to exceed the 2GB limit.
 
@StackedCrooked Do you have a 32 bit or 64 bit OS?
Why does your Tetris need so much memory? Does each leaf node have its own copy of the Tetris board?
 
If you compile programs as 32-bit, then even 64-bit OS doesn't change the fact it'll die at 2GB.
 
@FredOverflow Back then it was 32-bit. Now it is 64-bit. But the 2GB limit per process has remained. (Btw, 32-bit allows for 4GB allocation.)
 
7:06 PM
32-bit with PAE allows for bit more than 4GB.
 
@FredOverflow Sharing of immutable fluff would probably help :)
 
But Windows still limits usable address space to 2 or 3GB, depending on boot settings.
 
Tetris AI worked pretty well on NES. Why the heck do you need more than 2 GB? :)
 
@FredOverflow His AI plays Tetris and go at the same time.
 
@FredOverflow I allow my AI to keep expanding its search tree until it's almost too late or the block will hit the floor.
 
7:07 PM
@RMartinhoFernandes Hehe, watching a video on Clojure right now with Rich Hickey emphasizing its immutable, persistent data structures :)
 
I have some recent binaries here. It's not that interesting though.
 
My supervisor corrected me by telling me not to call .NET *.dll files DLLs and call them assemblies. What's the merit for this change in name?
 
@StackedCrooked Does your AI work in the background? Does it get smarter with faster computers?
 
@FredOverflow I also made a Tetris in clojure :)
@FredOverflow Yes. Yes. (See link to binaries above for proof :D)
 
@Xaade Well, it applies to .EXEs as well.
 
7:09 PM
@StackedCrooked I made several Tetris clones in Pascal, C with classes, x86 and Java.
 
I made one in my calculator!
 
@Xaade It sounds more academic thereby increasing the perceived quality of the product.
 
High-school. Good times.
 
@FredOverflow I already played on of your clones. The one with slippery blocks.
 
I also used to play Tetris on paper in school when I was extremely bored :)
 
7:10 PM
@FredOverflow It supports human, computer, human vs computer and computer vs computer.
 
@StackedCrooked That was my latest clone in Java. After that, I lost motivation, because I felt I had finished implementing everything I ever wanted to have in a Tetis clone.
 
@FredOverflow OMG.
@sbi He rep-capped on his first day! With a single answer.
 
Hah, it's a bit of a trap to keep rewriting the same program. You don't learn that much. (It's a trap I tend to fall it.)
 
@StackedCrooked Hmm... well, DLLs aren't necessarily DLLed.... Implicit dependencies are dynamically loaded... implicitly.
 
7:12 PM
 
@RMartinhoFernandes I never figured out how to do cool stuff with my calculator.
 
The grammar assignments were interesting, and then wham, something about Oz kernel language.
 
@FredOverflow ...? What, like, turn page, drop object one line?
 
@StackedCrooked My first programmable calculator was very limited. I wrote a Tic-Tac-Toe with a smart opponent, and could not run it.
 
This is a language that's been designed to be hated.
 
7:14 PM
I had to remove a couple of smarts from it to get enough memory to run it.
 
@Xaade Nope, I just drew random Pieces. Really not much to it :)
 
I learned a few tricks by observing the AI though.
 
That's great. Can the AI learn tricks by observing itself? ;)
 
@FredOverflow I hope not.
 
The AI doesn't care about a neat game state, only the last one counts. If it has calculated 7 moves ahead then it may do some seemingly stupid moves in the beginning. But it knows that it will benefit in the end.
 
7:17 PM
How does it know?
You can only see one piece ahead.
Unless the AI cheats.
 
My AI can see infinite moves ahead. In my sample application the human player can currently only see 3 moves ahead. But the API doesn't impose a limit.
 
The intention to write this game was to experiment with massive concurrency.
 
And cheating.
 
Btw, you want an API that limits the number of moves that can be seen ahead? That would be bad design.
 
7:19 PM
No, it would be a "one" in the "zero-one-infinity" rule.
 
Thankfully, the compiler has an option to show the kernel code.
 
I only implemented the "human player"-mode in the end to make the demo app a little more interesting.
@RMartinhoFernandes It's infinity in my case.
Infinity > 1.
 
Infinity != 1.
Sometimes "1" is perfectly fine.
 
Sometimes however, it is not.
 
@StackedCrooked Haha my AI used to have the exact same problem :)
Hehe, just found a 15 year old Tetris clone I did in Pascal. The exectuable is only 6 KB large :)
 
7:21 PM
@FredOverflow One way to make it seem more human-like is by limiting the "search width".
 
no source code though :(
@StackedCrooked or do stupid things once in a while ;)
 
Or not letting it cheat!
 
It's not cheating.
If you really want to. You can checkout my source code and modify one line of code and you'll have your non-cheating AI. You can improve it's results by maxing the search width and writing an "Evaluator" object that is better suited to this job.
Do you use chmod +x or chmod 755 to make a file executable?
 
$ chmod +x
No need to mess with other permissions.
 
Makes sense.
 
7:33 PM
Some people use the octal notation because it makes them cooler or something, but it's less powerful because you must set all permissions with it.
 
Does chmod +x lead to different results when run as sudo vs when run as user?
 
Yes, if the current user cannot change the permissions :)
Other than that, it's the same.
 
cpx
B
 
@cpx Are you picking an answer at random, or claiming the chances are 50%?
 
7:39 PM
I say 100% too.
Because I am always correct.
 
cpx
at random.
 
sbi
@StackedCrooked Are you a puppy, too??
 
0% makes sense.
There are no correct answers, so whatever answer you pick is incorrect.
 
> puppy: a young dog. informal, dated: a conceited or arrogant young man: you ungrateful puppy.
2
 
OMG, that's true.
 
7:42 PM
@sbi Apparently, yes.
 
Has anyone here written a compiler?
 
I wrote a Brainfuck.NET compiler once
 
For a simple language on a school assignment.
 
What's a simple language?
 
Brainfuck
 
7:45 PM
It was called MSP (Mais Simples Possível - Most Simple Possible). Imperative.
 
ok =D
 
Reminds me of Rich Programmer Food by Steve Yegge.
 
With arithmetic operators, variables and assignments. I extended it with loops and conditionals for extra credit.
 
cool
I'm taking a compiler design course right now, it has just started
It will be theoretical only and for imperative languages only
the course after that will be more advanced, more credits and OO
 
7:49 PM
@StackedCrooked There are only five possible answers: 0, 25%, 50%, 75%, and 100%. Clearly 100% is not the correct answer, because it's not there, and if the chances were 100%, all possibilities would have to be 100%. 75% can't be either, because it would require three possibilities to be 75%. 50% cannot be because there aren't two 50%s. And 25% can't be because there isn't exactly one 25%. That leaves 0%, which is true, because there's no 0% there.
 
and the second course will also be solely based on a project =)
 
@RMartinhoFernandes There is not even a definition provided for what "Correct Answer" means. It's nothing more than a brain-fuck question IMO.
 
@DeadMG Btw, why Brainfuck? =)
Too much spare time? ;)
 
because it's nice and small, easy to implement
 
Couple of lines in C.
 
7:52 PM
and totally useless =D
 
so what? technique's the same
 
I also wrote a BrainFuck interpreter in Haskell for school.
 
sbi
@StackedCrooked Oh, Steve Yegge. I didn't know that guy still blogs. But apparently he does, once in a while, and just reading the first few lines of his latest three blog entries makes me giggle and mark it all up for later reading.
 
Does he still drink?
 
7:57 PM
@sbi He doesn't write much anymore. About think his blogging frequency has dropped to 1 post per year.
@RMartinhoFernandes One can only live for 3 days without water.
 
That's surviving, not drinking.
:P
 
Do you mean he is/was an alcoholic?
 
sbi
@StackedCrooked Yeah, but that Yegge's blog per year is worth just as much as a year's worth of blogging of some random blogger producing thre entries a week.
@StackedCrooked he used to boast that he writes his blog entries while drinking red wine.
 
I think recall I him mentioning in one of his posts that he found it hard to write a certain post and that it went better after cracking open a bottle of wine.
@sbi Ah. I had the impression from your previous comment that you didn't like his posts anymore.
His latest criticism on Google+ is required reading though.
 
sbi
@StackedCrooked Is that why I would mark it up for later reading?
 
8:01 PM
@StackedCrooked Originally, his "blog" was titled "Stevey's Drunken Blog Rants".
 
sbi
@RMartinhoFernandes Right! I forgot that. Trust the robot to bring up such old facts.
 
@sbi That's what you do when something isn't interesting enough to read it right now.
@RMartinhoFernandes Ah yes, I almost forgot.
 
sbi
@StackedCrooked I do it when something is interesting. I rarely ever have the time to read something right now. :( Right now, I need to go to bed. But I have about five more articles to read that I had marked earlier today...
 
Bye. See you tomorrow for lunch :)
 
Lately you've been going to bed earlier. Is old age affecting you?
 
sbi
8:03 PM
@RMartinhoFernandes Don't forget to go shopping!
 
I won't :)
 
That probably sounded meaner than I intended to.
 
sbi
@StackedCrooked I go to bed early when I need to get to school in the next morning that one kid of mine who just started school. On those days I have to get up before 6am, and that requires that I go to bed before midnight.
@StackedCrooked Don't worry, I wasn't offended. I am much older than most here, after all.
 
Ideally I have 7:30 hours of sleep. If I were in your situtation that would mean I have to go to bed around 22:30. Pretty close. Good, you are off the hook.
 
sbi
@StackedCrooked Thanks. Gosh, that was close!
 
8:06 PM
Be more careful next time.
 
sbi
@StackedCrooked I am. I have enough kids. (Or what are you referring to?)
 
I have no kids. But in my case this is an issue orthogonal to carefulness.
 
sbi
@StackedCrooked You gay?
 
Last time I did introspection the answer was no.
My mother tells me I'm good looking. I don't understand the problem.
Lol.
 
sbi
8:09 PM
@StackedCrooked Then I don't know what to make of your statement. (I like the way you phrased your answer, BTW, because it's true that we never know for sure.)
 
@StackedCrooked You have to say J't'emmerde to the ladies
 
I haven't eaten in 24 hours
starting to feel better now
 
@sbi A psychiatrist once told me that this can be tested by having a probe attached to your penis while watching homosexual pornography.
Not kidding.
 
@DeadMG Why? =(
 
no stomach issues and no treks in the cold to get food
 
8:12 PM
Gonna watch American History X now
classic!
See you guys
 
Hack/slash.
 
sbi
@StackedCrooked I don't believe this. I met this old school buddy of mine a few years ago. When we were in school, he was with this girl from our class almost all the time. They would split for a few months, and then they'd be a couple again. For years. I had expected them to become a married couple. But they didn't, he had a child with another woman. He told me that, when that child was around 5, he fell in love with a guy. Totally unexpected. He's now married to that guy. Life is strange, sometimes.
I bet that method would have detected nothing with him 25 years ago.
 
@sbi Honestly I suspect this methodology is not very reliable either. I think it could lead to false positives as well.
 
sbi
@StackedCrooked Yeah, this could well be.
 
@sbi However, I don't think this gay became guy at late age. He probably had been denying it for a long time. (My intuitive guess.)
 
sbi
8:15 PM
@StackedCrooked (gay <=> guy)
 
Yeah. Muscle memory.
I find it very hard to write "anonymous". I always tend to write "anonymouse".
 
I have a terrible habit of trying to say Vistual Studio
 
@DeadMG that's funny somehow. Given the epic failure that Vista was.
 
sbi
@StackedCrooked Erm. "This guy became gay", not the other way around.
 
not really
the cause is obvious- the two words run together
 
8:18 PM
@sbi Dammit! I didn't notice that.
How silly.
@DeadMG Which two words? Visual and ...?
 
Studio, obviously
 
Vi Studio.
 
sbi
@StackedCrooked Probably. I honestly don't know. Looking back, I'm not surprised. But back then, I would have sworn he's hetero. (We actually shared a tent, when they, you know, for the first time. :) I remember being quite annoyed and asking them to be quieter.)
 
@sbi Quieter at what? Masturbation?
 
sbi
@StackedCrooked They were two, a boy and a girl, and had all night. No need for masturbation.
 
8:21 PM
@sbi Oh I see.
You should have started moaning along.
It would probably be more effective.
 
Nothing that could go wrong.
 
kinda up da ass init
 
At team event we had to share rooms with colleagues. Turned out each room has one two-person bed. Awkward, but ok, just go to sleep. Then I felt this repetitive trembling going on on the other side of the bed. Eeew.
 
sbi
@StackedCrooked There were five or six of us in that tent. The two of them were on one of the sides. I was right next to them, the other sleeping on my other side. We had drunk a bit too much alcohol and stayed up way too late. Most were snoring impressively. I was genuinely tired. I just wanted to sleep.
 
8:27 PM
@sbi The heart is fickle.
 
@sbi Did the repetitive movements and sounds put you in a trance-like state that provoked sleep?
 
People mistake butterfly stomach for love.
And then natural social instincts take over, as two people learn to make a relationship work.
 
@Xaade Butterflies in your stomach are being burned alive by your stomach acid. There's nothing romantic about it.
9
 
That's like most of the gay guys I meet.
 
sbi
@StackedCrooked Urgh. A company I worked for once had that pre-Christmas event. We were to meet at the airport at a certain time in Sat morning, and didn't even know where the flight would go to. In the end it went to Munich, and spend an interesting 36hrs there. We had to share beds, too, and were pre-assigned by the girls in the office. But it was Ok.
 
8:29 PM
You see something, your heart involuntarily flutters, then you choose to pursue that or not.
 
Can anybody here answer my question to John in the comments here? stackoverflow.com/questions/7921380/…
 
@sbi Well. It my company it happens each year. I've done it two times. And in both times I heard/felt strange sounds/movement patterns.
 
Homosexuality, Heterosexuality, Grand Theft Auto, etc. It's all the same. Heart flutters, you think it's something more than that, then you pursue.
 
It doesn't help that I lay awake for about 6 hour before finally falling asleep.
 
sbi
@StackedCrooked In that company they also do this every year, but I was only with them for that one Christmas. :)
 
8:31 PM
@StackedCrooked Haunted Mansion!!!
 
sbi
@StackedCrooked From what I remember (I was drunk, I was tired, it's a considerable part of a century ago) they weren't all that repetitive, it being their first time, and all.
 
Otherwise, those movements shouldn't be strange.
 
@sbi Ah. You got to share this beautiful moment with them. How lucky you are :)
 
@sbi Repetitive is lack of skill, or over-accustomed to one-night-stands.
Skill is dynamic
 
I'm annoyed by sounds from behind a wall. I'd be very angry if said people were in the same room.
 
sbi
8:34 PM
@StackedCrooked Sex isn't beautiful at all unless you're doing it yourself.
 
@sbi :D
Come on, you never saw the Lion King? :D
It's beautiful, with music and all.
 
sbi
@StackedCrooked I did, I think. Is that this animated movie about a lion baby? I think I watched it with some of my kids, many years ago.
What about it?
 
It features lions having sex in the missionary position. Nothing else that stands out though.
 
Something for @Tony.
 
sbi
@StackedCrooked Oh, I don't remember that. I should ask my daughter about it.
 
8:37 PM
With heavily featured Elton John music
@sbi She'll know.
 
sbi
@StackedCrooked You never know. At the age they like to watch such movies, they might just take it for the two caressing each other.
 
@sbi Who knows. Actually I don't remember how I interpreted it.
 
sbi
I once saw lions having sex in the zoo. There's nothing missionary about that at all. Since then I hope I would never be reincarnated as a lioness.
 
@sbi I saw it too in the zoo! I thought I was witnessing a rare event.
We were in a tourist train at the moment.
And indeed, the lioness was grabbed firmly at the back of its neck by the male lion.
 
sbi
8:41 PM
@StackedCrooked Lions have been bred in zoos for at least a century, so I doubt it's rare.
 
OK :(
Perhaps the lions are trained to do it everytime the visitor train goes by.
 
sbi
@StackedCrooked I remember that I saw Amélie with my daughter, when she was about eleven(?), and she loved the movie. We saw it again recently, and she was surprised about the sex scenes in the beginning, because she had no memory at all about htem. Children have this wonderful ability to blank out whatever they cannot deal with.
 
@sbi At young age I guess they sort of absorb it. Evaluation comes at a later age. (You're talking about the guessing of orgasm count at a certain moment right?)
 
sbi
@StackedCrooked Yeah, a wonderful scene.
 
I saw that movie at the movie theatre. I went back six months later and they were still playing it. So I went to see it a second time.
By now I've seen it many times.
My favorite movie is probably Fargo though. (But that is orthogonal to the current discussion, I just can't help myself.)
 
8:47 PM
fargo is awesome (not my fav though)
 
sbi
@StackedCrooked So have I. And it seems everyone loves that movie.
@StackedCrooked I haven't seen that.
 
ok
I stood up, and I realized why I spent the whole day sitting down
 
@sbi Actually I've met people who don't like the movie. They watched it for a while and then stopped. They told me it was "weird".
 
sbi
Anyway, before we stray too far from the lions, here's an anecdote:
Before WWII (and maybe even before WWI, I forgot), the zoo in Leipzig was already well-known for its successful breeding of lions. It is said that the zoo director (I forgot his name, but let's call him Schneider, it's a good guess in Germany) would place a small ad in the local newspaper whenever a lioness was in heat: "Heute Löwen!" ("Lions today!") When that director later married, someone put an ad into the local newspaper: "Heute Schneider!" ("Schneider today!"). :)
 
@DeadMG one of those headaches? Those are the worst. Well maybe not the worst, but pretty bad
 
8:48 PM
I get them every time I have a cold
 
@sbi Please watch it and tell me what you think of it afterwards.
 
I get that every time I'm drunk.
 
sbi
@StackedCrooked You've met the wrong people then. :)
 
@sbi They were members of the evangelical church I was unfortunately a member of back then.
 
sbi
@StackedCrooked Isn't that by the Coen brothers?
 
8:50 PM
@sbi Indeed. But I didn't now that when I first saw it.
It's unlike their other movies I think.
 
sbi
@StackedCrooked Well, anything from them is on my todo list. But that's a long list, and I have little time, so don't expect too much from me...
 
@DeadMG I think not sleeping enough causes a headache like that for me. If I lay down and stay fairly still I am ok, but when I stand up i get throbbing for a few seconds, then just a dull ache
 
sbi
OMG, I just spent an hour discussing sex, lions, and movies, but I need to go to bed!
 
well, I gotta run. Later
 
@sbi No worries.
@sbi You probably won't regret seeing it.
 
8:54 PM
Trivia: did you know that starred messages with more than one star didn't start until I joined the room?
(Yes, I'm that bored.)
 
sbi
@StackedCrooked I probably won't. But I will regret if I'm not off to bed right now.
Good night!
 
@CatPlusPlus What?
 
@sbi Alright. Good night! :)
 
@sbi You're still here?
Good night.
 
Oh, the star list thingy doesn't order by date.
 
8:55 PM
> error C2663: 'QPainter::drawRects' : 4 overloads have no legal conversion for 'this' pointer
 
sbi
@RMartinhoFernandes No, I'm not!
 
Or orders by date up to some point.
 
I'm trying to use a QPainter to call drawRect() in my class and I get the above error
I don't get it
 
Nevermind then!
 
@TonyTheLion Probably a const thing.
 
sbi
8:56 PM
@CatPlusPlus Actually, it does. But not only by date.
 
@CatPlusPlus It's a rating algorithm.
 
We could use a ranting algorithm.
 
Numbers of stars is used as an exponent somewhere.
 
But still, messages with more than one star start on the same page as my starred messages!
 
void rant(const std::string& msg)
 
8:57 PM
I like how a rant returns void.
 
lol, what else should it return? a scream type?
 
No, it's nice, because a rant usually has no useful result.
But I'd expect it to be void rant(...);, because, well, we can rant about anything.
 

« first day (376 days earlier)      last day (4555 days later) »