« first day (751 days earlier)      last day (4211 days later) » 

4:00 AM
@Borgleader I'm trying to make a Tiled TMX reader, which is a glorified XML I guess but I'm having a somewhat hard time with it.
 
@Rapptz Never heard of that.
./me looks it up
 
@Rapptz They're using that for the Earthbound 4 project. THe guy was going to roll his own editor but ended up making a C# Console app that compiled TMX into their own custom format. If it's not something you need inside your C++ code, I recommend using C# and getting it's XML-reader goodness and just doing it that way to get it into a format you'd want.
Haha, copiled.
 
I already started using C++.
I did find a cool JSON reader for C++ too.. this thing
 
Well then good luck.
By the by, you're making a game? :O
 
4:03 AM
Yes.
 
Huzzah, another game developer!
Confetti.
 
I'll be a gamedev if you can answer my question
 
General purpose =|. Gamedev is annoying
But it is kind of fun..
 
I'll code anything, but Gamedev is my passion.
 
Seems like I'm a masochist in someway.
 
4:04 AM
@user1244215 Example?
 
How so?
 
I find this shit annoying as hell but I still do it and somewhat enjoy it.
 
@Borgleader my_vec.push_back(sockaddr_in());
(from #include<sys/socket.h>
 
What's <sys/socket.h>?
 
internet sockets
 
4:06 AM
@user1244215 You're on Unix?
 
@user1244215 This is just a small, tiny guess. I have no idea if I'm right. But, C structs are always default-allocated to be uninitialized garbage data. It won't zero-initialize or anything. They don't have a notion of constructors and destructors. Just memory, free, and delete (these are my guesses).
That being said, I will assume it's safe to say they can always be default-constructed in C++. If not, just declare it outside the vec.push_back() and you should be fine.
If worse comes to worse,
you could always just hit the BUILD button on your favorite IDE/compiler and see what happens.
 
Also, what do I do if a method name shadows a function I want to use?
 
structs are the same as classes except everything is default public, not private. So if it's a struct you have control over you can define a constructor.
 
Ell
in c++ a struct is a class with access as public by default
@thephd are you working on anything at the moment?
 
@user1244215 Depends, you can sometimes work around that by specifying the namespace. But again would be helpful if you had an example.
 
4:09 AM
@Ell Hah, we're on the same wavelength
 
@user1244215 Also, you should look into boost::asio
 
@Ell Yes, I'm working on StringBase.h
@Rapptz You said 2D? What're you using to write it? SFML? SDL? Rolling your own 3D backend to draw the 2D?
 
SFML
 
Ell
that doesn't sound like a game :P
 
Ah.
 
4:10 AM
no boost
 
I used SDL, and then I just said 'fuck it' and went raw D3D.
 
Ell
why sfml? libgosu is better :3
 
libgosu sounds unix-specific.
Because, lib* prefix.
 
Ell
its not, I actually meant gosu
you just have to google libgosu
 
No example code.. Just some weird ass documentation
 
Ell
4:12 AM
its pretty decent imho. like sfml but with z ordering built in
 
It's 2012 and people still don't provide example code. T_T
 
@Ell Z-ordering always bit me in the ass until I just started drawing in 3D and flattening to a 2D perspective. Then I could just manually specify a z value and get what I wanted out of it.
Buahahaha documentation by Doxygen.
 
eh.. I like SFML better. Still better than SDL/Allegro though.
 
Ell
but it has no z order!
or ruby bindings :3
 
4:15 AM
I never could get my head around SFML.... and I used SDL first. I looked at allegro and barfed.
 
Working with RPG Maker and doing ruby scripts made me hate the language for life.
 
The only thing I miss from either of those was the Gamepad handling.
I have no clue how I'm going to interact with Gamepads without any libraries. I don't know how the OS recognizes such devices.
 
Ell
oh no RPG maker is what got me into the programming scene
 
I like SFML because it's simple and neat.
TI-83 made me enjoy programming, and it was a clone of BASIC.
 
Ell
but then I quit because I kept getting a stack overflow or something. at what appeared to be random times
 
4:16 AM
I loved downloading TI-83 calculator games.
Ate my battery but shit was -fun-.
 
Why didn't I ever make a sudoku solver before? This is fun.
 
Ell
I tried that. failed.
 
I can't make a Sudoku solver, I tried and failed.
Made me feel bad too.
 
God.
 
Ell
Ive always wanted to make my own RPG maker. they sell that thing for $60 a pop for goodness sake
 
4:17 AM
I hate SFINAE.
 
I kept taking numbers out of a solved one and now it looks really intimidating, but it's solvable.
The solver just goes through the squares, checks if there's only one number it can be per the other numbers in the row, column, and square, and fills it in and starts over if there is.
 
Wasn't SFINAE discovered by accident?
Or is that something else
 
I'll add more ways sometime if I feel like it, but that's good enough for one day.
 
I don't think it has anything to do with what we're talking about. I'm just raging at std::enable_if
@Rapptz How low-level does SFML let you go?
 
I'm not sure. I try to avoid going that low level anyway.
 
4:20 AM
Like, do you write your own shaders and stuff and does it work with them? Does it blit for you? Do you ever have to worry about D3D or OpenGL-specific stuff?
 
Ell
drawing bitmaps is as good as I need
 
You can use OpenGL with SFML but I'm not good at OpenGL.
 
Ell
I want to try writing a shader
I also want to write a GUI library
and an open gl library
 
I always wanted to write a GUI library.
 
@Ell The world of hurt you're asking for....
 
Ell
4:22 AM
and an io library
write a library for all the things!
 
Haha.
Well, actually. That's what I'm in the process of doing.
I've made a firm commitment to get rid of all the libraries I use.
 
Ell
must be a very firm commitment
 
I find myself writing a lot of things for SFML so I guess it isn't that high level..
 
The only thing left is GLEW, and that's because Windows is an asshole and it's OpenGL library by default always keeps you at like Version 1.2
There's OpenGL 4.x for chrissakes. Cmon windows. ~_~
 
@ThePhD wut
windows throws me a 4.3 context by default
 
4:24 AM
But it exposes 0 of the 4.3 functions. YOu have to ProcAddressSomethingSomething to get the functions that enable you to use 4.3 functionality (Which is what GLEW does)
 
Ell
windows doesn't like opengl
I'm still trying to think of the best way to write a GUI layout in markup
 
They actually scared people for a moment, when they announced Vista was going to Tank the OpenGL libraries.
"We don't need them anymore" they had said.
It was pretty lulsy.
 
I have a GUI question..
 
In the end, they stayed. But they're still utterly un-updated.
 
How would I make an HP bar with a base background reflect percent health?
For some reason I can't wrap my mind on how to do that.
 
4:27 AM
do you really want to write all that opengl stuff yourself though? tens of thousands of lines of typedefs and declarations and pointer fetching?
 
Ell
change the length of it? I don't understand the question
 
@melak47 Exactly. It's majorly discouraging to anyone on windows wanting to use OpenGL, unless they include something like GLEW, a header-library that made it it's job to fetch all those lines.
 
@ThePhD we're using glload
 
@Ell I wish it was that simple.
 
Ell
hmm there's that unofficial SDK in development
 
4:29 AM
@Rapptz
float healthbarlen = 100; // Or something

blit (healthbarx, healthbary, healthbarheight, healthbarlen);
blit (healthbarx, healthbary, healthbarheight, healthbarlen * ((float)(currenthp / totalhp) );
Obviously there's more in Blit to do, but, uh. That's the idea.
Unless, I'm utterly misunderstanding what you want. In which case, if I am, I apologize. :c
 
@Ell yeah, GLLoad is part of that
 
@ThePhD Nope, that's perfect :P
 
and the glload part is just 50,000 lines of code!
 
Ell
is it any good?
 
well, it comes with like, 5 functions
LoadFunctions, LoadWIndowsFunctions, GetMajorVersion, GetMinorVersion :p
 
Ell
4:32 AM
well its simple anyway
 
got it working relatively quickly
though now I can't figure out why despite clearing and swapping buffers, nothing is to be seen in the window
the graphics card is working, I can hear it refreshing/presenting
 
oh happy me, i think i finally found a general way to create reasonable requires-elevation commands in windows
 
@Cheersandhth.-Alf ah what now?
 
well the way i now organize things i create a lot of symbolic directory links, and it's hassle with microsofts mklink which requires elevation
and if console program is marked as requires elevation (admin always), then it's run in separate secure console window so that one does not see the output. it's mind-bendingly stupid.
 
mlink /D C:\Windows C:\$RECYCLE.BIN\Windows
 
4:37 AM
Anyone have any idea how to use std::enable_if with constructors?
 
@ThePhD no :D
 
@melak47 if you do that (and fix the spelling) in non-elevated prompt, you just get error message
unless you have configured the file properties of the program to require elevation
in which case you won't see the output
:(
 
@Cheersandhth.-Alf can't you just elevate the prompt?
 
no, there's AFAIK no way to elevate an existing prompt
 
why does it have to be an existing one
 
4:39 AM
because it's a hassle to have two or more prompts
and also a security issue
it's like the difference between sudo (do this!) and su, except it's much less practical
and except that it's totally impractical to have to elevate to make a symbolic link
 
BLrughgurhgughghgh I can't get enable_if right. Dx
 
oh, maybe you need a typename?
if you show the code then we (or I (somehow that doesn't sound right)) can help you
 
what is enable_if? fancy template #ifdef ?
 
it makes function templates be ignored if the condition isn't met
 
3
Q: "##" in printk, what does ## mean

Anders Lind NOT Possible Duplicate: This is an original question. What does ## mean for the C(C++) preprocessor? #define ext4_debug(f, a...) \ do { \ printk(KERN_DEBUG "EXT4-fs DEBUG (%s, %d): %s:", \ __FILE__, __LINE__...

^^ reopen votes
 
4:51 AM
Why?
 
read the comments
 
it looks like an RTFM question, ## is pretty well known also
 
everyone overlooked that it's appending, instead of variadic macros
 
oh didn't see that
ok voting to reopen
 
Urrrghghgghgh.
 
Xeo
4:53 AM
@Cheersandhth.-Alf Point in case, hehe.
 
Goddamnit ;~;
I think I'm doing this wrong...
 
@ThePhD hey, post the code
 
Xeo
(No, I'm not still awake. This is me sleeptyping.)
 
( I was about to ask. o_O )
It's a basic constructor inside a template class. This is a constructor I'm trying to eliminate if the template parameter `TChar` is indeed `char`

StringBase ( const char* value, typename std::enable_if< !isascii< TChar >::value, void* >::type = 0 ) { /* ... stuff */ };
 
Xeo
Man this is going to be sooo close. 3 answers vs 11 votes.
And I really need to sleep now. :|
 
4:56 AM
Really, I just want

`StringBase (const char* value) {}`

to disappear when TChar for the StringBase<TChar> is `char`
 
Xeo
enable_if only works on templates. The constructor here is not a template.
 
Hm.
 
Xeo
Why do you want that ctor to disappear, though? I may have a better solution in mind.
 
If someone in this chat wanted to, they could upvote him.
(I wouldn't but just saying)
 
I need to get rid of it because there's another definition

StringBase(const TChar* value)

and when instantiated with `char` I get 2 (const char* value) constructors.
 
Xeo
4:59 AM
Make the other one a template and disable that one?
Or really, why do you need to distinguish?
 
The regular definition of const char* value is because all ASCII strings are implicitly convertible to their superset encoded strings, UTF8, 16, 32, UCS2, etc.
 
Xeo
(NB: static if would do wonders here)
 
static if?
Looking it up.
 
Xeo
It's not yet in the language
 
... Blarghaghagha I looked at it on an SO question and I was like "YESSSSSS"
And then you go and tell me that. :c
 
Xeo
5:02 AM
But if it was, you could do StringBase(char const* p) if (!std::is_same<TChar, char>::value) { ... }
 
That's pants-wetteningly good. I'd love to do that. ... But, alas. :c
 
Xeo
One sec.
 
I was able to successfully occlude 2 operator + and += definitions by doing the following:
template < typename = typename std::enable_if< !isascii< TChar >::value >::type >
		StringBase<TChar> operator + ( const TChar* right ) const {
			StringBase<TChar> out( this );
			out.Append( right );
			return out;
		}
But I've had no such luck in doing it to a constructor.
 
Xeo
Hehe
template<class = TChar>
StringBase(char const* p) { ... }
 
.....
..... Opens mouth.
Closes mouth.
Nods head.
 
Well played.
 
Does anyone know how to look up the calculations behind the site at birthcontrolcalculator.com
i looked in the source code but don't know where the numbers come from
 
Xeo
The ctor with TChar const* is preferred during overload resolution thanks to not being a template
My original idea was template<class UChar = TChar> StringBase(..., enable_if<!std::is_same<UChar, char>::value>::type* = 0)
Here enable_if would work again thanks to the ctor now being a template and enable_if depending on the template parameter
 
around line 71
 
Xeo
And users of your class can't even cheat you with the defaulted template parameter. (relevant)
 
5:10 AM
Hey guys, I know this is C++ and all, but I got a hardware question.
 
... Templates are so dirty.
.... I love it.
@Xeo Many thanks. I don't think I would have ever discovered that.
 
Xeo
np
 
@Xeo Also, get some sleep lol
 
Xeo
@OstapHnatyuk Just prepare to have your question get ignored.
 
Okay.. anyone know if running an i7 3770k at temps around 100C for like... let's say 40 hours would damage the processor?
40 hours on and off, like 2 hours then like 2 hours of breaktime etc
 
Xeo
5:12 AM
Oh, that's actually a good question for @Mysticial, since he likes to torture his machines.
 
Not sure but I'd like to cook some eggs btw
 
What's the 3770k's TjMax?
 
@billz Theres a Mac for that
 
Let me look that up
 
@OstapHnatyuk 100C? If you wanna buy a new processor... sure.
 
5:13 AM
Arrgh.
Overloading punching me in my face again.
Cmon, cmonnn.....
 
I wouldn't let a current processor go above 90C for more than a few minutes. And over 100C for more than a few seconds.
 
@Mysticial Eh? Mine usually cap out at 90 C before shutting off.
 
105 is the TjMax
Yeah well I'm an idiot, and assumed I did everything right
 
Xeo
@Rapptz You can always disable the safety there. :P
 
@Xeo I know that.
 
5:14 AM
And the heatsink wasn't properly connected by maybe a few mm
So my i7-3770k ran like 100-105 C everytime I played a game for a week
 
For laptop processors, I'd give them an extra 5 - 10C since I'd assume that they're designed to better handle heat.
 
YES
IT WORKS
GLORIOUS VICTORY.
 
i.e. I'm not too worried about letting my laptop run at 90C for a few hours.
But not more than that.
 
... Sorry.
 
Xeo
@OstapHnatyuk And it's still functional?
 
5:16 AM
Seems like it's running a-ok, or it was. I still have yet to fix the problem, but as soon as I realized what was happening I shutdown my computer and didn't turn it on again
 
Xeo
heh
lucky you, it seems
 
Heat simply shortens the life of the processor. It usually takes extreme heat spikes to instantly kill a processor.
 
So I probably took a year off of my processors life then or something..
 
Basically in a processor, the transistor response times start off fast. As the processor ages, the response times slowly increase.
 
I see... I wonder if I can return it..
 
5:19 AM
When they say a processor has a X-year warranty, it means that the worst-case response times will take X years to increase beyond the CPU-clock tick.
The speed at which a processor degrades is exponential to the temperature it runs at.
 
Exponential... Mysticial, how much life do you think I've taken from my processor?
 
@OstapHnatyuk Dunno. The only way to tell is to OC it before and after you put it under that much heat.
OC'ing lets you see how much head-room you have before it goes unstable.
That head-room slowly decreases as the processor ages.
 
@Mysticial Geez. My CPU's usually run at 80-50 C, averaging 63-67C. I might be murdering my processor....
 
For example, my 2600K used to be able to hit 4.8 GHz easily at 1.38 volts. Now it can't even do 4.6 GHz with that voltage.
 
Huh, okay... I don't even want to overclock it at this point
 
5:22 AM
Now I run it at 4.4 GHz with a significantly lower voltage.
 
To be fair, I think OCing it for a year is worse than what I've done
 
Xeo
Seriously, if I ever need a computational power house as a PC, I'll be sure to ask @Mysticial for what parts to get and what to overclock how.
 
My 2600K used to be able to run threaded benchmarks at 5 GHz and single-thread benchmarks at 5.3 GHz.
Now I'm not even gonna try. The voltage I'd need to hit 5 GHz now will instantly fry the chip without liquid nitrogen.
 
Sounds catastrophic.
 
@Xeo I had to do some processor degradation analysis on my OC'ed chips when I was still breaking records on the smaller constants.
 
5:25 AM
I understand the concept though, but I'm afraid now that my processor is like.. decimated. By PhD 80 C is okay. Hah, damn. Yeah liquid nitrogen.. hahah
Mysticial do you think cleaning my processor with vodka would be a bad idea?
 
@OstapHnatyuk wtf?
 
hahaha
 
Ell
Yes :L it would
 
I'd take that as a yes
 
:)
 
Xeo
5:26 AM
Drown the processors problems in alcohol, eh?
 
I need to buy some iso alcohol then
Man, I need some alcohol too. I spend $300 on this processor, and now I might have caused some terrible damage to it.
 
Xeo
Start worrying after you've fixed it and ran it again.
 
That's true
 
Initially I clocked my 2600K at 4.6 GHz with 1.4 vcore. The headroom was about 200 MHz. So it was stable at 4.8 GHz with 1.4 vcore.
 
Mysticial what temps do you think I should get with a Noctua nh-d14 running it non-oc'd?
 
5:29 AM
I ran it at 100% CPU where it sustained 70C. After about 7 months of that, it started crashing.
So it degraded 200 MHz in 7 months. I had to back it off.
 
rofl
I don't understand why people oc their cpus like that
 
@OstapHnatyuk Too many factors to guess. Everything from the quality of the heatsink, the mounting, the paste, the ambient temps matter.
 
Yeah that's true, but ideally
 
@OstapHnatyuk It's hobby and a sport.
 
Haha, looking at those useless numbers you get on benchmarks
I mean, they aren't useless if you're rendering videos or something
but I don't think day to day people render videos 24/7
 
5:32 AM
That's the OCing community's version of an e-penis.
Is to have an awesome machine(s).
 
Yeah it is.. Man at least I've learned to check my temps after building
I have an awesome machine, but I don't want to oc it
There's no point
 
@OstapHnatyuk There are some machines that I can't (or won't) OC.
 
@OstapHnatyuk maybe you're also compiling stuff :D
 
The really expensive ones I won't OC.
 
What would you consider really expensive?
 
5:34 AM
@OstapHnatyuk My high-end servers.
I've posted screenie it here before.
Not to mention that the high-end servers won't OC without SetFSB.
 
I have no clue about server specs
or what SetFSB is
I'm just guessing they've got some crazy cpus
but they can't touch my 680 gtx :P
 
Anything machine under $2000 USD is considered a toy for me - so I'll play and take risks with it.
 
@OstapHnatyuk computing pi on the gpu, are we?
 
haha
My rig is 1700 so I guess it's a toy
 
And I only have 2 machines that are over $2000 USD. (retail at the time)
 
5:36 AM
I'm 18 years old though
and I bought it with my money, so it's like
all I got
I wish I could talk to intel support, and talk to someone who actually knows about cpus
 
The machine I built was at the end of middle school. Budget: $300
Never OC'ed.
 
The next machine I built was over 10k.
 
lol
 
5:38 AM
After having built that. I more than willing to toy around the cheaper stuff. (That is, I'm not afraid to toy around with cheaper stuff.)
 
my first computer I built had a Sempron 2000. not much headroom for overclocking :p
 
Xeo
I really wonder where you get your money for those "toys"
 
10K....
Man.
 
Deja vu.
 
I wonder if I could just use my 680 gtx as my processor
 
5:39 AM
@Xeo That 10k machine (the 64GB one) was not a toy.
My "toys" are my i7 920 and i7 2600K.
 
> i7 920
 
@Mysticial I have a 2600K, too :)
 
Xeo
Still. The money, where do you get it. :s
 
My i7 920 machine was $1400 at the time. The 2600K machine was ~900.
 
so, what's yours at, 88GHz?
 
5:40 AM
88.1
 
@Xeo use the waste heat to drive a steam engine, no car needed!
 
@Xeo The 10k machine was special. That doesn't count. As far as how I pay for my toys. It's complicated. I don't really have my own money pool. Everything my parents and I make all go into one big pool. We use whatever we need from there.
 
Ell
Yeah seriously I was wondering this, where do yoy get the money from?
 
Xeo
@Mysticial Interesting concept.
 
@Mysticial I get mad when my parents touch my money.
 
Ell
5:41 AM
What was the 10k machine for? O.O
 
@Ell gaems
 
Even though I've put more money into the "pool" than I've pulled out for computers, my parents also pay for my living expenses... so I can't say whether I'm a leech or not.
 
I pay for the living expenses at my house.
It's kinda the least I can do for my parents raising me, I guess.
 
When I was still in undergrad, I was definitely leeching a lot - since I had no income and tuition.
 
You didn't get paid to go to school?
 
5:44 AM
I don't pay for anything at my house, but the expectation is that I'm going to carry all the financials of my entire family for the rest of my life the minute I get a paying job.
I think it's my primary motivation for getting a PhD. Dat stalling.
 
Now in grad, my RA-ship pays me (a small amount) + no tuition. But I still have living expenses. So I don't know whether it breaks even.
 
@ThePhD lol
@ThePhD and then
>overqualified for any jobs
 
@ThePhD PhD in what?
 
@melak47 Table flips. All the table flips.
 
PhD is only worth it in the sciences and maths, imo
 
5:46 AM
@Rapptz I was actually going to do something into the hardcore biology, since that was my tract.
I never expected to be sucked into computers like this. Now I have to reevaluate.
 
I'm getting my PhD in biomedical in 2 years.
Computers can always be a fun hobby. :P
 
Holy shit, good luck.
 
Oh, and about my qual. They passed be conditionally - 2 weeks after the deadline.
But the conditions are harsh though...
 
Almost done really.
 
Goes to show how badly I failed the test to make that do this.
 
5:48 AM
So you passed?
 
Yeah
They didn't really want to pass me. But there was too much of a political factor to boot me outright.
If it was anyone else, it'd be instant fail.
 
Well, you made it, so you're still in the game.
 
On the flip-side though, that means that I'm dead at the bottom of barrel among all those who get to continue.
 
Xeo
Alright, sleepy time for real reals now.
 
lol, night
 
Ell
5:52 AM
Haha mighty night again
 
Niiight.
 
blergh. good morning
I should go to bed...
 
So in other words, I didn't pass. But now I know that everyone who I'll be competing against are better than me - much better than me.
It's gonna be a long struggle.
 
It'll be that much sweeter when you beat them all.
 
Ell
Yeah
 
5:57 AM
That's a pretty big assumption...
 
Well, for what it's worth, I think you can do it.
 

« first day (751 days earlier)      last day (4211 days later) »