« first day (504 days earlier)      last day (4427 days later) » 

12:01 AM
Let's make fun of new PHP.
 
@CatPlusPlus the inheritance model? =)
 
82 unit-test failures.
And 1119 compile warnings.
 
@CatPlusPlus Still not a compelling argument why not to make fun of the old PHP.
 
They worked so hard to produce new things for us to mock.
 
@CatPlusPlus they did leave us with great awesomeness though, the date functions where you can "I want one week from now, please consider leap stuff"
Just nudging Azure for good measure.
 
12:12 AM
hehe nice
 
12:24 AM
vector<int> v(a, a+ size) - vector<int> v{2 3}
 
hello. Someboy has a good class to use binary trees?
 
could somewone help me with a binary tree problem ? :)
 
12:41 AM
what do you need? I need help with binary tress too! Maybe i can help you
 
Xeo
std::set / std::map
 
sbi
 
Xeo
And now all your problems are gone.
 
Its about inserting a node into a binary search tree ... stackoverflow.com/questions/9523394/…
i get runtime error :(
 
Xeo
std::set::insert :)
(Yes, I know, your own implementation.)
 
12:48 AM
you're still peddling that question here?
 
@DeadMG he working on bst's he might be able to help me ? :)
 
1:02 AM
@sbi Heh. Well, shucks.
 
@Beginnernato Many smileys still don't work :(
Anyways, a valgrind error is not a runtime error (ideone.com/xhxb6)
It just means you are leaking memory. That's bad too, but not a runtime error
 
1:19 AM
@sehe yea i hve memeory leaks... im guessing due to my recursive calls on BSTmake ... i want to remember the the tree's right node and recurse the left or vice versa depending on i ? :S .... any ideas
 
1:43 AM
Anyone know good opensource C++ audio libraries?
 
@Pubby libsox, dunno whether it has c++ bindings, but google for sox++ anyways
@Pubby gstreamer has c++ bindings but I don't know whether it will fit your needs?
@Pubby According to debian, libjack-jackd2-0 also depends on libstdc++ so good chance there is some c++ support there. libjack, however, is mainly on the transport and infra level, but you can hook it to most any audio software/hardware module/filter etc
 
Hello. I want to start working with C++. What compiler would you suggest to me?
 
@sehe A C library would be fine - I just want a portable way to play sounds
@IneedHelp Maybe Clang?
 
Someone's having a little too much fun with the new system... lol
 
@Pubby in that case, libsox has playback capabilities, or you could look what aplay is based on (alsa-player)
 
1:57 AM
@Pubby Thanks, I'll try it.
 
@IneedHelp depending on your system. Mac -> Clang, Win -> MSVC Express, Other: GCC
 
Oh, I'm on Windows.
 
@IneedHelp If you want to play it easy, download MSVC++ express edition. It is ok and comes with the nice IDE (if you like IDE's). Otherwise, do look at Mingw(64) since gcc supports more of c++11. There are some nice IDEs to use with Mingw (Code::Blocks seems to be the more popular, Eclipse CDT is doing nicely)
 
I'll go with MSVC, thank you for the information!
 
cheers
 
2:16 AM
Vim block editing FTW.
 
why is it I continue to eat things that I know make me sick?
 
@DeadMG I guess because the anticipated pleasure of eating exceeds your memory of the pain it caused last time.
Probably.
So either the pain must become worse, or the pleasure must become less in order for you to stop doing it.
But I assume it was a rhetorical question to begin with :)
 
@CatPlusPlus +1. And command mode (:'<,'>Align, then :*s/foo/bar/g on the same selection). After over 10 years I'm still getting more productive with vim - today did similar edits to 24 configuration files. It was a lot of fun to have vim do the work.
argdo 3p worked miracles, e.g. inserting the same text at line three in all of them files
k guys, off to bed (@StackedCrooked shouldn't you be heading there by now? Oh noes, you're a student, right?)
 
@sehe Nope, working person.
And it's weekend.
 
Weeeeeeeeeeekend.
Which also means it's only 2 days until Monday.
Which sucks.
 
2:30 AM
Way to ruin the mood.
Lol
 
Life sucks.
 
@StackedCrooked The problem is more that I don't seem to access any memory when I'm in the food shop
 
I'm trying to build GC with MinGW one last time. If it still crashes inside Boost.Filesystem for no reason, then screw MinGW.
 
GC?
 
Goblin Camp.
 
2:32 AM
aah
oh yes, I meant to ask you about that
do you have any significant 3D experience?
 
Not significant.
Tiny bit.
I did way more 2D than ever 3D.
 
ah ok
 
I'm doing UI for a game at work, but it's still 2D overlayed on 3D scene.
 
I assume that you'd be using OGL or a wrapper anyway instead of DX
 
Well, right now I'm using Unity, so I don't even go to that level.
 
2:35 AM
aha
 
@DeadMG I discovered a trick that helps me to remember to buy things in the shop. Last time I had to remember that I needed to buy toilet paper. While still at home I visioned grabbing a shopping basket at the entrance as usual and added "I have to buy toliet paper!" as a sort of strong mental shout. It worked, when I entered the shop and grabbed the basket the memory instantly reappeared.
 
But yeah, mainly OpenGL, because I'm lazy and like my software cross-platform.
 
@StackedCrooked I have never, ever, managed to summon that kind of memory.
 
I sometimes remember next day that I had to buy something.
 
if it's not a concept, then I struggle, and if I'm supposed to remember at a specific point, then it's just never gonna happen, and if I'm actively thinking about something else, then snowballs chance in hell
 
2:36 AM
But I always end up with tortillas and bunch of candy.
 
Well, I think the key is to connect it with a certain habitual action (like the grabbing of the basket). I've used it two times now. Perhaps it was just a lucky shot.
 
well
 
Shopping is hard, let's go programming.
 
right now, I'm working on my skeletally animated 3D mesh rendering system
and I just can't continue and I don't know why
 
The second time that I used is was when I needed to remember to buy rubber bands to tie up my hair. (I never used or bought those before.)
 
2:38 AM
Lol.
make -j4 does nothing.
Stupid piece of shit.
You know you can just write stuff to buy down, right?
 
lol
yes, I should do hat
the thing is, I do much better at talking than writing
but I don't have anyone to talk to whilst food shopping :P
 
I hate talking and hand-writing.
 
I do
it's not quite as effective
 
Yeah, look crazy.
 
well, I never shut up
except I tend to clam up quite heavily around people I don't quite trust
 
2:40 AM
Cleaning up the Tetris AI search tree is expensive. It's currently stored as a shared_ptr. So perhaps I can just schedule the cleanup in a separate thread using something like: std::async([my_tree](){} or std::async([=](){my_tree.reset();});. Does that sound reasonable?
 
so are you Francis Rammeloo?
 
Yeah.
You hadn't figured yet? :D
 
nope
 
The first one isn't guaranteed to actually clean it up, is it?
 
I figured that everyone would have posed under their Lounge names
 
2:42 AM
@CatPlusPlus I don't know. It captures by value, and then...?
 
If it runs while there are still live references, then it'll do nothing.
 
Yeah, that's right.
 
But then again, reset will probably do the same.
 
@DeadMG I'm refactoring it to use Jalf's STM library instead of locks.
 
yeah, I figured that :P
 
2:44 AM
Linking time = infinity/2.
So annoying.
Third time the charm.
 
I made an interesting observation today.
 
when I finish inventing Wide, it shall come from the heavens and solve all your annoying linker problems, and it shall set you free with it's simple, effective systems, and you shall make a monthly tithe, and in return, it shall protect you from program change, error, and Java. It shall slay the demons of "Internal Compiler Error" and "Use of undeclared function" and "Only C interfaces are binary compatible!".
 
By that time, everything will run on Haskell.
And compiler flags.
 
When making my Tetris search tree I usually go for a "search width" of 5 and a "search depth" of 8. But I found that a search width is 2 is sufficient and allows for a higher search depth. And extra depth helps the AI to not make non-Tetris lines.
@DeadMG Perhaps I'll code my Tetris in it :p
 
lol
 
2:50 AM
@DeadMG You linked B and C, but not A and B?
 
Just like GCC.
Sorry, ld.
Same level of crappiness.
 
@StackedCrooked I never really saw A and C together either.
 
Ah. That was the missing link then.
 
Also, I reached the conclusion that glwnd wouldn't work too well, and it does need some basic event reactor and platform-specific input sources.
I shall rename it to glskel.
(From 'skeleton', geddit?)
 
glskel..eton?
 
2:53 AM
For the OpenGL Window utility?
 
It'd have creating windows and handling input.
Well, not handling.
 
Keyboard and mouse input I assume?
Not really buttons etc.
 
Sourcing and exposing for further processing.
 
@StackedCrooked I actually don't see what the width and depth correspond to here. Surely there are only a few, fixed, ways of placing each piece.
 
Yeah.
 
2:55 AM
well, that sounds a little like my project
except I fleshed out my rendering abstraction a little more, rather than OGL specific
 
I'll keep it minimal.
 
also, I need to design my Button class some more
 
@DeadMG If you play Tetris you have a number of options where to put your first block. The same goes for the second block etc. The tree width is defined by limiting the number of options where I can put a block. The tree depth is the number of blocks that I am playing.
 
no matter how I put it together, it's always dissatisfactory
@StackedCrooked Ah, the number of blocks. Logically, though, you can never go deeper than 2, because the game never tells you what the nth piece is.
 
Actually the tree width is already a form of applying heuristics.
 
2:57 AM
although, I guess that you could just branch for receiving every piece
 
@DeadMG Yes, but in my Tetris you can see more than one block ahead.
 
oh
 
Without that requirement I wouldn't be able to do interesting stuff.
So the computer tries all positions of a block and then keeps the 5 best ones and throws away the rest. The 5 remaining ones are then used to recursively deepen the tree.
The higher the width and depth parameters the bigger the three will become and the better the results. But the cool thing I found is that a width of 2 and height of 8+ gets really good results.
Especially when you want the AI to create Tetrises.
Ah well.
 
surely a modern CPU can cope with much larger both widths and depths
 
It's a memory constraint. Windows has 2GB per process limit. Don't now exactly for Mac.
So I try to stay below that.
 
3:04 AM
ah
just compile for x64?
 
On Windows yeah. On Mac and Linux I build x86_64.
 
It's the same thing.
 
Ah.
However, I think that Windows enforces the 2GB per process limit regardless of 32/64-bit.
 
No.
 
3:07 AM
2/2GB or 3/1GB split only applies to 32-bit processes.
 
if you're an x64 process, then you get 8TB or so on consumer Windows x64
if you're a 32bit process and you flag /LARGEADDRESSAWARE on a 64bit OS, you can have all 4GB, I think, or 3/1GB.
 
64-bit address space is large enough for kernel-reserved space to be unnoticeable.
 
so you need to flag /LARGEADDRESSAWARE to get more than 2GB
 
I used to hit the 2GB a lot in the beginning. Then I changed my grid cell type from int to char and memory use reduced to 1/4.
 
3:10 AM
lol
 
:D
However, given the exponential nature of the algorithm that's not a very big win.
 
man
so many const_casts
 
Humpf, with MSVC it works.
Stupid compilers.
 
lol
MSVC has a habit of going too far out of it's way to make code work
 
Automatic ; insertion?
 
3:20 AM
heh, not that bad
 
MinGW-compiled code crashes for no reason on some string manipulation.
 
I would have hoped that string manipulation would be the kind of thing we could get right in 2012
 
Now that I think about it, I'm compiling with _GLIBCXX_DEBUG.
Maybe that's broken.
 
that's no British accent.
I'd place it more as Eastern European,
 
3:25 AM
I gave myself some leeway by calling it a 'peculiar' accent.
 
yeah
but it's not from any part of Britain
 
I heard a British accent when I wasn't listening intently.
Now that I do it doesn't sound British anymore.
 
I have a very strong English accent, and I've heard strong Scottish and Welsh accents, and a few other regionals, and it's definitely not a match for any of them
 
Definitely not British.
 
Al English I've heard is from British TV series.
 
3:28 AM
eh
some of that is accurate, but it's mostly exaggerated
as with everything else in TV
 
But PJ Harvey is British right?
 
'ello, guv'nor.
 
PJ Harvey is also a woman.
the person in the video clearly is not
 
British: Give me some wa'er.
 
3:30 AM
so logically, that ain't PJ Harvey you're lis'enin to
 
@DeadMG I'm referring to the singer.
 
oh
there's a song?
 
It starts around 1:20.
 
my God, it's terrible
 
3:31 AM
It's British.
Who invented fish and chips.
 
And tea.
 
And pour vinegar on french fries.
 
mmm, fish and chips
 
British Tea is ok I guess. But they didn't actually invent it.
 
Fish is worst food ever.
 
3:33 AM
we stole plenty of our culture from the colonies during the British Empire
and you're right, tea doesn't even grow here last time I checked
 
And the beer is served without the white stuff on top (forgot the English word). And it's not served cold.
 
Nope, doesn't work without _GLIBCXX_DEBUG, either.
Foam, it's called.
 
Yeah, foam.
 
@StackedCrooked Wot?
I'm not a beer drinker, but I know of no establishment here that would serve non-cold beer of any form voluntarily
 
> One common misconception of beer served in the United Kingdom concerns the serving temperature: it is believed that British beer is served warm. In reality, beer in the UK is usually served at cellar temperature (between 10–14 °C (50–57 °F))
Ok, but cellar temperature is still not very cold.
 
3:36 AM
I'm pretty sure it's served colder in the modern pub
 
I guess it depends on what you order.
 
true
although, to be entirely fair, I drink no forms of beer
so it's of little consequence to me
 
However, according to Michael Jackson the beer in England is pretty good. He said that in an interview in Belgium. Serving beer cold and with foam is considered pretty important here. He said we should learn to appreciate it.
@DeadMG In this country there's always a lot of beer talk.
 
usually here, too, it's just not my consideration
 
Hello! I scripted a lot in ActionScript3 and after checking C# I noticed a lot of similarities. Should I begin learning C# instead of C++?
 
3:40 AM
whether or not you need C# or C++ really depends on whether or not you have huge, manly, balls or not
if yes, learn C++
 
Isn't C# built on top of C++?
 
@IneedHelp C# and C++ are used for different things. First ask yourself what things you want to do.
 
heh
no, not really
 
I want to create windows applciations
 
C# and C++ are radically different languages
 
3:42 AM
applications*
I have used AutoIt for a long time and wanted to get on a higher level.
 
C#: Everything is done for you. Upside: You don't have to do it yourself. Downside: If you need to do it a different way, you're fucked six ways from Sunday.
 
Okay, so which would be better for casual Windows applications?
 
probably C#
 
@IneedHelp You can learn C# quickly and start building applications. Learning C++ will be more like taking the path of the samurai, where you are only allowed to punch after 10 years of training.
 
C++, C# and ActionScript all have basically nothing in common.
Also, CMake doesn't support C# natively. I'm sad.
 
3:45 AM
as if CMake is a program anyone wants to go near, ever
 
They all suck.
 
@CatPlusPlus Neither does it support C++.
 
true true
 
@StackedCrooked Meh, it can build it, and generate projects for it.
 
man
 
3:47 AM
@CatPlusPlus ActionScript3 works with classes and methods too, namespaces and all that stuff, that's why I said C# looks more familiar to me.
 
sometimes I wish that I had a technologically adept mother
then I could say "Even my mother can do X!"
 
Rule #1: syntax doesn't matter. Rule #2: basic OOP concepts don't really matter either.
 
every language has classes, methods, and namespaces
 
Well, not every.
 
even C, if you're willing to accept the "We hacked it together" approach
 
3:48 AM
Anyway, I understand that for small applications with narrow purposes C# it is better to start learning C#. Thank you for the information.
 
Haskell classes aren't anywhere near OOP classes.
 
@DeadMG DOS?
 
And no methods.
 
@StackedCrooked DOS is a language?
 
I don't know the right terms here.
 
3:49 AM
Dammit, I have a crash reporter thingy in C#, and I can't build it, because none of fucking build systems can do it out of box.
Rrrrrgh.
 
build systems suck
 
Well, MSBuild can, but that doesn't help me one bit.
 
in Wide, you can write your build scripts in Wide!
 
Very useful.
 
kek
 
3:51 AM
I wanted to try to remake scripting, but I just can't get myself to work with this codebase.
 
IMO
I don't see the point of all these EDSLs
a simple general-purpose script language like Lua or JS would be fine
 
I know DSL, but what is EDSL?
 
oh, wait, I meant DSL
 
Apparently EDSL means Embedded DSL.
 
an EDSL is an embedded DSL- so something like expression templates, Spirit, that sort of thing
which is embedded into C++
man
I have one class which inherits from three others
 
4:02 AM
So?
 
MI makes me nervous
 
I often have multipe base classes. But usually there is only one conceptual base and the others are more like utility mixins. Like noncopyable, CountedInstance (for leak detection), etc.
But to be honest true multiple inheritance scares me as well.
 
two interfaces and a mixin
 
Doesn't sound excessive.
 
nah
 
4:09 AM
I actually have a: class ComputerPlayer : public Computer, public Player {};. :D
 
lol
 
It's very silly.
It's because I once kept coding while being sleep deprived. And now I'm left with a mess that is hard to change.
 
I once had class ReadWriteTexture : public ReadTexture, WriteTexture {};
 
Yeah, that's similar to io stream.
 
yeah
I fixed it, though
but I did lose some possible semantics
now all 2D scenes are rendered straight to the backbuffer, and 3D scenes cannot be rendered to the backbuffer
 
4:12 AM
I might end up with something like class ReadWriteStructure : public Structure, public Readable, public Writable {};
Which makes it 3 bases.
 
it creates a terrible mess if you ever need something like D3DReadWriteStructure, D3DWriteStructure, D3DReadStructure
trust me
you end up with some terrifically icky inheritance
 
Exponential increase of classes is a very clear sign that something is wrong.
 
yes
 
@DeadMG This sounds like match for the Bridge Pattern.
Sorry for bringing up design patttern here. It's lack for a better word.
 
well, in that design, I ended up cutting ReadWriteTexture and just returned std::pair<ReadTexture*, WriteTexture*> and guaranteeing they pointed to the same object
 
4:15 AM
You might as well have used MI then.
 
actually, it saved me fairly considerable hassle
of course, I still ended up rejecting it in favour of my new design, which does not require exposing the existence of textures that cannot be read
of course, on reflection, Scene : ReadTexture was always the better way to go compared to having a separate WriteTexture
I could probably completely cope with exposing some more complex render-to-texture semantics now
 
This is nothing new to you, but I like to think of these sets of choices as algebraic spaces. For example posix locks are Read/Write, Spin/Regular, Recursive/NonRecursive. The carthesian product is a list of tuples (Write, Regular, NonRecursive), (Write, Regular, Recursive), etc... Using policy based design I should be able to define any combination. Some of these combinations however are impossible. For example a spinlock can't be recursive. But these can be disabled using specialization.
I have never implemented something using this philosophy though.
But it seems like a cool thing to do.
 
I wouldn't at all mind doing that
the problem is that my rendering abstraction must occur at run-time, not compile-time :P
 
Ah, yeah I tend to forget about that even in my own code .
Template instantiation.
 
4:45 AM
Well, you could build separate executables for different renderers.
Some games do it.
Move common logic to a DLL, and they shouldn't be too big.
 
sure, but you're still talking about a binary interface between exe and DLL
 
5:12 AM
right
I think that my gut might have calmed down enough for me to sleep
nighty-nighty-morning everyone
 
Good night.
 
 
3 hours later…
7:46 AM
no one awake?
yay! good morning.
@ScottW sure, with GCC-arm?
@ScottW nah, I meant game-boy advance.
someone even made an IDE for GBA development.
I use the HAM SDK.
one thing that bugs me though, is that the GBA has no filesystem.
@ScottW seriously? how?
anyway, got to go now. I was supposed to be studying photosynthesis. thanks. :)
 
8:31 AM
Howdy!
Which book is this?
0
Q: C++ Selection Sort on Array of Structures

nikI am working through a C++ book, and I am a little stuck on one of the challenge questions. I'm working on learning about pointers, and in this particular problem I need to sort an array of structures (using pointers) with a string of a student's name and a double of their score. After the sort...

Sorting in C++ using pointers…
 
sbi
8:48 AM
I wonder how many top contributors have to complain before the moderators start listening http://meta.stackoverflow.com/questions/124366/whats-up-with-the-recent-close-deletes-of-old-questions #StackOverflow
@JamesMcNellis Yes, I'm strongly considering leaving at this point due to this behavior.
 

« first day (504 days earlier)      last day (4427 days later) »