« first day (1093 days earlier)      last day (3854 days later) » 

6:00 PM
freak
 
I saw the D3D9 version of that game programming book.
the programming was terrible.
truly terrible.
but the game part wasn't too bad.
 
user1804599
Wait ugh lolwut.
 
user1804599
cstddef:51:11: error: '::max_align_t' has not been declared
   using ::max_align_t;
 
<cstddef> doesn't guarantee global namespace names.
it would have to be std::max_align_t.
 
user1804599
6:05 PM
This error is inside of cstddef.
 
user1804599
Hmm.
 
@DeadMG Not that it's worth much but all of the bad reviews on the book (the ones I bothered reading anyway) were written by idiots. One particular guy gave it a 2/5 because he thought the accompanying DVD had video tutorials on it which it didn't (obviously it had the source code files)
 
user1804599
It works if I include <boost/variant.hpp> before it. :P
 
I've been eating only cookies for the whole day :|
 
user1804599
 
6:14 PM
lol
 
@not-rightfold lol
 
Ell
@Borgleader directx? pfft, you capitalist.
 
@Borgleader I wasted my book budget for this month on being dumb.
 
@R.MartinhoFernandes What did you buy?
@Ell Right, because OpenGL/WPF is going to be a good idea
 
Ell
@Borgleader Worth a try :D
 
6:19 PM
@Borgleader Nothing. I left some cash at an ATM.
 
Oh right, that...
 
Ell
@FredOverflow they are all my action tag types
I want to store them all in a vector. Alternatively I could make them all inherit a base Tag class with just an id
 
user1804599
UGH.
 
user1804599
I’m such an idiot.
5
 
user1804599
elements.emplace(
    parse_expression(lexer, gc),
    parse_expression(lexer, gc)
);
 
user1804599
6:22 PM
And I was wondering why the second parse call happened first. :|
 
: )
 
Ell
:P
 
What's gc?
 
user1804599
Garbage collector.
 
6:23 PM
bad rightfold!
 
gc is an instance of a giant class
 
Who is it that cites memory management as the main advantage, say, C++->C#?
 
These cookies are nice.
 
I read somewhere that when you recompile a program, which declares a variable, that variable is initialized with the value that was last stored in that memory location in RAM. I was always under the impression that it was initialized with just some garbage numbers.
 
i come here just to let it out.... I hate windows!!! and all its related product
 
6:29 PM
Thanks.
@JohnMerlino What's the difference?
 
@Tiina define related products.
 
@Tiina switch to *ix then : )
 
In terms of how the program runs, there is no difference. But it was just an interesting titbit that I didn't know whether was true or not.
 
I am pretty sure things are not initialized to garbage values.
Why would they be?
They are garbage because they aren't initialized.
 
@Pawnguy7 hotmail, visual studio, winphone, help workshop...
 
6:31 PM
Visual studio is OK
 
@BartoszKP *ix?
 
@Tiina I meant unix, linux etc.
 
@BartoszKP hah, thought it a room here..
 
@Tiina What alternatives do you prefer?
Though of those, I have only used Visual Studio.
What is help workshop?
 
@Pawnguy7 good question! help workshop is used to write help doc
 
6:33 PM
IIRC hotmail is something that predates the glacial period
 
@Tiina do you hate the help itself, or what is used to make it?
 
@Pawnguy7 it only supports ascii I guess... at least the one that I have it displayed normally in html, would be random in help ws
 
Ah.
 
even for a tiny change, I would have to open another one to modify ...
 
6:36 PM
So, alternatives?
 
I quit writing help
 
@DeadMG I suppose you meant "super sick"?
 
In my experience, which is limited.
Help files are not helpful.
I never seem to find what I am looking for :\
 
damn, I think sehe rolled a natural 20 there
2
 
6:43 PM
Hm?
 
That reminds me. Played CoC again this weekend, and my character survived.
 
Ell
@Pawnguy7 rolling a 20 on a d20
 
@Ell are they playing a game?
 
I agree with @Pawnguy7, intuitive and clear GUI is much better than documentation/help files.
 
6:49 PM
Indeed. By the time I go looking for the help files, you have already lost.
 
well
I am seeing my doctor tomorrow morning
 
he will likely be of no fucking use whatsoever as usual.
 
Did that get pushed up?
 
no.
 
6:51 PM
@DeadMG I'm betting on the quatum probability that he will be accidentally useful
 
lol
not sure how
unless he changes his diagnosis and gives me a prescription for a wonder drug treatment
so far, I'm putting my future bet on the hospital consultant
but if I want to claim sickness benefit then I need my doctor's approval
a prospect that does not fill me with hope.
 
sorry, maybe
I've decided that it's always best to laugh about things, some 20 years ago. I hope you concur sometimes
 
eh
if I was sensitive about being sick, I wouldn't mention it so often.
 
Damnit... First time In ever that a foreigner reaches in a SC2 final... but it's fucking naniwa
 
@Borgleader Of course it's Naniwa. Since Stephano left, there's no other foreigner who could.
 
7:03 PM
@DeadMG good. and good luck tomorrow
 
@DeadMG idk, maybe Scarlett some day
 
Scarlett's good, but she's not that good.
at least not right now.
 
hence "some day"
but yeah as of now, no
 
and ThorZaiN
 
hope some day I'll buy a machine that will run SC2 :0
 
7:04 PM
frankly, he was seriously inconsistent even in WoL
 
yeah =/
 
and since HotS, I haven't really seen any indication that he's even inconsistently very good.
 
OS: Windows® XP/Windows Vista®/Windows® 7/Windows® 8 (Updated with the latest Service Packs) with DirectX® 9.0c
Processor: Intel® Pentium® D or AMD Athlon™ 64 X2
Video: NVIDIA® GeForce® 7600 GT or ATI™ Radeon™ X800 XT or better
Memory: 1.5 GB RAM
A machine that runs SC2 is not very expensive Sauce
IEM is happening at comiccon apparently xD
 
@Borgleader Thanks, I've read these, however I don't want to buy something just to run SC2, a new machine must be really NEW ; )
+ no time for this
but lots of time to sit on chat I guess :|
 
I have most of my settings on ultra, I run the game on only 1 monitor (though i have 3) and that runs very well on i7-3770/GTX670/8GB RAM
 
7:15 PM
Is there a way I can get an index from an iterator?
 
std::distance ?
 
Unfortunately for me I have a old HP with integrated graphics card ;0
 
user1804599
@Pawnguy7 no.
 
user1804599
You need an iterator pair.
 
user1804599
Then it’s a matter of std::distance(begin, it).
 
7:18 PM
Well, yes, I have that.
 
user1804599
Well woop.
 
Maybe I should just use pointers.
I was making a list of things to be removed after an update.
 
Maybe you should just use assembler ; )
 
But I don't want to make copies of each instance.
I was going for storing the indices.
Pointers might be simpler though.
 
Seems ok, as long as you sort the indices descending and remove in this order
 
Xeo
7:21 PM
Whee, Tomb of Horrors, first half survived! /cc @R.MartinhoFernandes
 
Xeo
We lost one character though, in the first room.
 
@BartoszKP is the order important?
 
Not surprised :)
 
@Pawnguy7 If you remove lesser indices first, the larger ones become invalid
 
Xeo
7:23 PM
Well, he decided that it was a good idea to climb into the Gaping Maw at the end of the hall.
 
I am removing them all at once after, for this reason.
 
Xeo
@Pawnguy7 There is no "all at once"
 
@Xeo I mean to say, I am not updating until all in the list are removed.
 
@Pawnguy7 Which container gives you ability to remove more then one indexed element at once?
 
Xeo
I have to say, I really like the ToH so far
 
7:24 PM
I just said it doesn't?
 
Sorry, seems I don't follow then : )
 
Here is my situation:
I am going through several instances with a foreach.
I make a list of those to be removed.
After I am done with that foreach, I remove each one in the list.
 
Yes, and how do you do the "each one" part?
(from the last line of your description)
 
@Pawnguy7 Iterators, nubbins.
 
@BartoszKP depends what the list of removals is.
Assuming it is a list of indices.
 
7:28 PM
So, if the list of removals contains indices, you must remove in the descending order, because when you remove one element all following elements get shifted.
 
Oh, right.
Now I remember why I didn't do this before :D
Pointers it is.
 
Xeo
@R.MartinhoFernandes FWIW, we basically skipped the first hall - the one with all the hints and helping points. :s
 
@Pawnguy7 Iterators.
 
@DeadMG do tell
 
@Pawnguy7 You should use iterators rather than pointers or indices when dealing with containers.
in general, of course, some bits of code are fiddly if you go iterator.
 
7:29 PM
They will be invalid after I remove things.
 
so will pointers.
 
Oh.
I hadn't thought of that.
 
But not indices - if descending order is maintained ; )
 
Everything gets copied down, doesn't it?
 
stable_partition
 
7:30 PM
I assume you're referring to vector or deque here?
 
Or remove-erase.
 
vector.
 
the Standard does not guarantee that vector will not reallocate and simply copy in all the valid elements.
that would be a Hell++-grade implementation, but not illegal.
 
It might be cheaper to create a new collection omitting the ones to remove
 
any mutating operation may invalidate all pointers and references.
 
7:31 PM
Just remove-erase.
 
hell, the Standard is explicitly designed to permit T* as std::vector<T>::iterator.
the iterator invalidation rules for vector are pointer invalidation rules.
 
So, indices in descending order?
 
Remove-erase.
 
Or do you have something else in mind?
 
also.
just use remove-erase.
 
7:32 PM
What is that?
 
Xeo
I like how he just ignores the Robot
 
Don't use loops.
Use algorithms.
 
@Pawnguy7 It's been a little while since I did it, but the long and short is "A Standard algorithm explicitly designed to do what you're trying to do".
 
Xeo
v.erase(std::remove_if(v.begin(), v.end(), pred), v.end());
I actually meant that
 
fail
aaah, the usual feeling
 
7:37 PM
I am confused.
 
I'm super-tired, need to get up early tomorrow, but don't want to go to bed because I'm afraid of the sickness.
 
i feel like eating ramen
what are you guys having for dinner?
 
another bag of cookies
 
I had nothing.
fuck you, asshole, I want cookies :(
 
none left, sorry ;0
I wanted an ordinary dinner, but I don't eat anything without bread. And I'm out of bread and too lazy to go buy some
oh wait, is that another bag of cookies? ;0
 
7:39 PM
Actually, you cant eat ramen. You slurp the shit down! :P
 
looks nice
 
I'm bored. Again.
 
Xeo
Play Terraria
 
Still haven't solved my Steam money problem.
 
take a quiz: ikeaordeath.com
 
7:40 PM
@Xeo I might actually take that advice.
 
user1804599
@BartoszKP lol
 
Terraria feels like a minecraft clone with rpg elements.
 
Xeo
It's not
 
Can you explain it to me so I understand this "remove-erase"?
 
It's an RPG clone with Minecraft elements.
 
7:43 PM
Oh, so I got the ordering wrong.
Oh well.
 
@Pawnguy7 It's just the thing you should do, when you want to remove certain elements (hence "pred" in @Xeo 's example) from a container
The erase-remove idiom is a common C++ technique to eliminate elements that fulfill a certain criterion from a C++ Standard Library container. Motivation A common programming task is remove all elements that have a certain value or fulfill a certain criterion from a collection. In C++, this could be achieved using a hand-written loop. It is, however, preferred to use an algorithm from the C++ Standard Library for such tasks. The algorithm library provides the remove and remove_if algorithms for this. Because these algorithms operate on a range of elements denoted by two forward itera...
 
user1804599
@Pawnguy7 std::remove removes the elements by shifting the next elements back (overwriting the originals there) and then returning a new iterator. That iterator is passed to erase.
 
lol, what's with this preview thing : |
 
Nevermind.
 
Xeo
7:45 PM
@R.MartinhoFernandes std::remove may overwrite the "bad" elements, IIRC
 
Confused with stable_partition.
 
lol, I'm fucked. The Finder is broken: it shows me files that were deleted (and are not there if I do ls -a in the Terminal).
 
Cue Cat saying Apple is bad at computers.
 
@R.MartinhoFernandes They are :P
 
For the above reason I've spent 4 hours trying to debug a program that had old object files mixed to other new object files constantly ending up in SF.
Then I deleted all objects files and made a clean compilation and everything worked just fine.
FML.
 
user1804599
7:51 PM
Yum, ice cream.
 
user1804599
@Jefffrey $ killall Finder
 
@Jefffrey Congratulations. You just levelled up in the Programmer class. Now you can use the Clean Build skill to solve problems.
 
So as I understand this.
It reorders it sort of like this:
 
@R.MartinhoFernandes I was using Makefile though.
 
user1804599
So?
 
7:53 PM
clean:
    $(RM) *.o $(TARGET)
 
[V][V][V][V][I][I] (Valid/invalid), returning an iterator to the first I, so you can then remove all the elements you didn't want?
 
Xeo
ya
 
yes, removed elements go at the end of the range
 
@not-rightfold Doesn't fix it. If I later built it again and clean up all object files, the object files are not removed from the finder view, unless I explicitly select one of them.
 
user1804599
Works on my machine. vOv
 
user1804599
7:57 PM
What happens if you delete them using Finder?
 
user1804599
Also, reboot.
 
When I write classes that compute some kind of aggregations I always make them have Consume method. However, I'm always tempted to call it Swallow ;0
 
user1804599
A class can’t compute.
 
Hmm, classes that compute things
 
My classes can ;0
 
8:01 PM
Where would I make use of remove in this situation?
The removal criteria.
Currently, it is like so:
if (snake.move(snakeMap) == MoveStatus::HIT_WALL) //add to remove list
 
Create a predicate with the condition that's inside the if
 
Predicate meaning function?
 
user1804599
@Pawnguy7 Can you provide more context?
 
user1804599
I’m not sure std::remove will work well here.
 
user1804599
At least, not using std::remove(begin, end, [](… s) {return s.move(…) == …;}).
 
8:04 PM
Not very well, no
snakeMap here, changes every iteration.
Basically, I have a snake level.
And before every snakes moves, I make their bodies solid, sort of.
So after one moves, I need to remake it again.
 
So it's possible to mark one item for removal for a different reason then another item?
 
GLaDos ftw! :P
 
@BartoszKP the reason is the same (it hit the wall), but the information used to deduce this changes.
 
ok, but why do you need to accumulate elements to remove, instead of removing them at once? (if something hits the wall it should be removed right away, right?)
 
Yes. I didn't want to invalidate the iteration.
 
8:11 PM
@not-rightfold I've rebooted but nothing changed. I'm following now point 2 of that answer and my .DS_store file seems gone forever, for that folder (I tried killall Finder + manual restart + editing files, and the .DS_Store file is not coming back anymore).
 
@Pawnguy7 Ok, I don't follow, nevertheless you can have the predicate to hold a pointer to your snakeMap and work even if the conditions change. Read the links above, and read about predicates in C++
 
user1804599
@Jefffrey lol
 
Yeah, I'm screwed.
 
> I hate to keep doing this, but have you Googled "C++ predicate"?
On SO question I got to by googling "C++ predicate".
 
user1804599
@Jefffrey Open /Application/Utilities/Disk Utility.app
 
8:12 PM
: DDD
 
user1804599
Select your volume.
 
user1804599
Click Verify Disk and then try Repair Disk Permissions.
 
Ok.
 
@Pawnguy7 Looks like you need to improve your googling skill a bit :P stackoverflow.com/questions/6854039/… ; en.cppreference.com/w/cpp/utility/functional ; ...
 
@BartoszKP hm? nothing was wrong with the question.
 
8:14 PM
@Xeo: you're an asshole. Thanks.
 
Xeo
:)
 
I know what the concept is, just not by the name "predicate".
 
Xeo
No excuses now.
 
@Pawnguy7 ? Maybe I've misunderstood you, I assumed that you can't find information about it
 
@BartoszKP Then yes. Let me get a picture.
6
Q: What is predicate in C++?

munishCan you give some example or a link to a topic.

nevermind. Just look at that.
 
8:21 PM
@Pawnguy7 I dont really get what's your problem now : )
 
Hello Lounge!
 
@BartoszKP didn't say it was one
 
@Pawnguy7 it? I was referring to "look at that" - look at what? I can't see anything peculiar ;0
 
Kind of quiet in here today
 
8:29 PM
But the answers below note what a predicate is.
 
Did you check the timestamps?
The answers were all posted either at the exact same time or after the comment.
 
omg, I had a such a nice and clean solution, made with TDD and elegance. And then I needed to try quickly if something works, and then another thing..., and it's a complete mess now :|
 
appropriate visualization ;0
Sadly, librarians can't do "revert" on the whole building ; )
 
@not-rightfold Nothing. The disc is OK. The permissions were a little fucked up around the iTunes.app folder but has been repaired correctly. And, the problem still stand.
I better go drink something.
 
user1804599
8:38 PM
Weird.
 
Why do we have a room description that isn't related to Belgium?
 
user1804599
come on, be Belgian, you have to admit…
2
 
room topic changed to Lounge<C++>: We all live in a yellow subroutine. [c++] [c++11] [c++-faq] [no-questions]
5
Been wanting to do this since Friday, but I guess I forgot.
 
room topic changed to Lounge<C++>: We all live in a yellow subroutine in Belgium. [c++] [c++11] [c++-faq] [no-questions]
 
: D
 
8:40 PM
@EtiennedeMartel Belgian subroutine
 
Hijacked yours.
 
Good evening.
 
Aaaah it's that guy with that name!
 
@not-rightfold Well. Thanks for trying. I'll go drink some wine and I'll see if I can figure that out. :(
 
user1804599
Install Gentoo.
 
8:43 PM
At least the .DS_Store file is back.
2
 
user1804599
First time ever somebody is happy about that.
 
; d
 
Dammit.
YIL unkaputtbar.
 
Xeo
room topic changed to Lounge<C++>: We all live in a yellow subpoutine in Belgium. [c++] [c++11] [c++-faq] [no-questions]
 
8:55 PM
@Xeo Is that a typo, or a greek "ro"? ;0
 
Xeo
Neither. /cc @Etienne
 
hey
@Xeo still a Ranger? here's a pretty meh article from the latest ACCU journal
 
Xeo
"Elevating iterators" - "ugh" already
 
it goes on for quite a while
 

« first day (1093 days earlier)      last day (3854 days later) »