« first day (754 days earlier)      last day (4199 days later) » 

3:00 AM
also i'm a bit decision-challenged re choice of syntax
^ I think variadic templates like foo gives cleanest syntax for building up the thing, but recursive code. OTOH. initializer list like in bar yields clean code but more ugly syntax?
in old C++ like ten years ago I just used << operator, but no need for that now
 
oh lord - i have a logic error.
coffee time
 
@Cheersandhth.-Alf foo will take any type of arguments (after the first), bar won't. Does that make the decision easier?
Well, foo will fail to compile with wrong argument type, but what does the error message look like?
 
not sure. i don't think i need heterogeneous arguments, just ordinary polymorphism
 
that black background hurts my eyes
 
u can choose theme at upper right
 
3:09 AM
ah - slate looks better and colbolt
my eyes are no longer bleeding :P
wheres rapptz gone
he knows his sfml
 
Ell
Hah ruby on android, how awesome
 
@Dave ?
 
u got time to take a look at a Q i have?
 
ok
 
im on 2.0 btw if that matters
 
3:16 AM
@Dave Is your image in the file directory?
It has to be where the .exe is.
 
yeh it was loading before till i made the function to create it and return it
if i do it in my loop directly it loads
 
Oh I see why
 
Ell
See my comment Dave
 
yeh i seen it - not sure i understand, cos that means i can never use a function to load sprites?
 
@Ell That's not it.
No, your function is wrong.
 
3:21 AM
am i using the wrong data type or return type ?
 
You can't return sf::Sprite
 
Ell
Why Can't he?
 
I don't think sf::Sprite has an assignment or copy like that.
Could check docs though to be sure.
 
Ell
I'm quite sure its because its Trying to draw from a texture that is out of scope
 
how is texture becoming out of scope in the function ?
 
3:25 AM
@Ell Oh, that's right. That can also be it.
You said the image went out of scope, which didn't really make sense to me, lol.
 
Ell
Because you define the texture in the function, when the function is over the texture gets destructed from memory
 
Because it's creating a copy for that function only and it gets deleted once the function ends.
 
yeh but i use the texture and add it to sprite.. so doesn't sprite hold the information at that point thus not needing texture?
 
Ell
no
The sprite just contains where abouts in the image to look
 
Sprite is also made in that function and gets exploded the minute loadBG() ends.
 
Ell
3:27 AM
Otherwise, let's say you have hundreds of sprites, for let's say snow
Then every sprite would have a copy of the texture
So to make it faster and more memory efficient, the sprite just contains a reference to the texture, and the rectangle to draw from it
So instead of having its own copy, it looks at the texture object you gave it, and takes the pixels from there
 
0
A: C++ Sprite not displaying - no errors either

RapptzYour sf::Texture is out of scope. Try the following code instead (no error checking): void loadBG(sf::Texture& texture, sf::Sprite& sprite, const std::string& img) { if(texture.loadFromFile(img)) sprite.setTexture(texture); }

eek.
 
@JerryCoffin Just again if on a 64bit machine you compile with VC a 32bit exe is it actually compiling / runing at 32 bit? Seems silly and slower if so...
 
Ell
So what is happening is, at the end of the function the Texture object is being destructed and the sprite is trying to get the pixel data from it but it can't
 
would main file also need to have:

sf::Sprite background = loadBG(theme["Background"],sf::Texture texture, sf::Sprite sprite);
 
Ell
this function takes a reference to a texture, then puts whatever image you want into that texture. It then takes a sprite and assigns it to a sprite of the texture
 
3:31 AM
Yep.
 
ah so that removes the need to use return
 
Though I'm still trying to find out how to get multiple sprites to show up on a texture, if possible..
 
Ell
Sf::sprite s;
Sf::texture t;
loadBG(theme["background"], t, s);
 
It's loadBG(t,s,theme["background"]) for my order :P
 
Ell
@rapptz multiple sprites on a texture? What do you mean?
 
3:33 AM
I can't assign other sprite objects into one texture.
 
can i not:
loadBG(sf::sprite,sf::texture,theme['background']) ;
 
Nope.
 
@Cheersandhth.-Alf Sorry, had to leave for a while. Honestly, I'm not sure.
 
Ell
Oh yeha sorry, I'm on ky phone and it has a tendancy to reset the box when I saith. Tabs and writing code takes ages :l
 
Also, it never crossed my mind that your name would be Elliot.
 
Ell
3:34 AM
really? Did you assume Ellie? Or something such?
 
@sabgenton I believe it's a 32-bit executable, yes. I doubt it's much (if any) slower though. For a lot of what a compiler does, 64-bit may well be slower (e.g., more memory and bandwidth used for pointers).
 
No I straight up assumed Ell
 
Ell
How about std::map<std::string, sf::texture>
Then he can create sprites from that
 
Why is choosing a wireless router so damn difficult... urgh....
 
@Borgleader Pick any!
You can do what I did when I picked majors in college. Roll a dice!
 
3:36 AM
But but, it has to be good, and have dual band, and ideally have guest network and not cost 150+$
 
Ell
@rapptz how did you find that out? Not that im hiding it, just wondering from which document you got it
 
@Borgleader You mean a cheap Linksys dual-band router?
 
@Ell I have a large photographic memory and I was remembering that page you sent me your homework in. In the corner it said Elliot.
 
Ell
Oh wow that's awesome
 
user1357851
anyone knows anything about window phone 7 app certification process
 
Ell
3:38 AM
If I recall correctly your name is Dan, I could be wrong and apologies If I am
 
user1357851
I am getting insane
 
Yes. Dan, Danny. Whichever.
 
user1357851
they take forever
 
@ThePhD I heard bad things about Linksys I may go Netgear
 
@Borgleader Well, okay.
const MagicNumber MagicNumbers::DDS( ".dds", MagicIdentity::DDS, { (byte)'D', (byte)'D', (byte)'S', (byte)' ' }, 4 );
 
user1357851
3:38 AM
and reject app on most retarded reasons
 
user1357851
then make me wait another week after I modify my app
 
I want to pass an array into a constructor like that for a const static object, but I can't seem to figure out how.
 
Ell
@borgleader I would take into consideration whether it supports dd-rt
Or whatever its called
 
dd-wrt
 
Maybe I need to create a function that returns a statically sized array?
 
user1357851
3:40 AM
object::object(Element * element) wont do?
 
I think this is where variadic templates come into play, but the variadic template master Xeo isn't here to show me how. Dx
 
user1357851
I am not sure object::object(Element element[]) works
 
Hm. To the internet!
 
@JerryCoffin i'm using the old and well-tried approach of just coding away... :-)
design? huh, what's that?
 
-5
Q: how do i create a dragon curve?

Joshua BeckI cant seem to figure out why my dragon curve is not working. i must use this as my dragon curve: NESESWSE 100 100 NESESWSESWNWSWSESWNWNENWSWNWSWSESWNWNENWNESENENWSWNWNENWSWNWSWSE 500 500 NESESWSESWNWSWSESWNWNENWSWNWSWSESWNWNENWNESENENWSWNWNENWSWNWSWSESWNWNENWNESENENWNESESWSENESENENWSWNWNENWNESE...

 
3:44 AM
Yeah, I can't see to figure this one out...
 
^^ wow
 
"Obama Barrack - DMZ" what hell the fuck?
 
@Borgleader Buffalo has served me well router-wise. They even offer "factory" dd-wrt firmware
 
@Mysticial my sides
I can't stop laughing
 
@Mysticial I... I don't get it =.=
 
3:45 AM
dammit, I can't fit that in one screenie - even about double monitor height
 
Ell
Anyway
 
@Mysticial I laughed my ass off.
 
Ell
School in 5 hours
 
@Borgleader He posted on meta instead of regular SO. But his question is so ridiculous, it's hilarious.
 
Ell
Nighty night all :)
 
3:45 AM
@Mysticial best part is he posted on meta :D
 
@Mysticial dragon curve in python is like 5 lines. jeez. also, posting on meta
 
What is a dragon curve, anyways?
 
@ThePhD I'm sure you've seen it
Just probably not by name
 
hey, new update to notepad++!
 
Ah, shiny!
 
3:47 AM
@Cheersandhth.-Alf Normally I'd care... but I use Sublime Text 2 now
 
Hm.
 
@Borgleader Same.
 
I could use va_args to construct the array from a parameter list
maybe that would help
I just can't wrap my head on how to initialize a statically-sized array on the global scope.
Or at least, a non-named statically sized array on the global scope.
 
Man I've been feeling depressed the past few days. It's killing me.
 
@Rapptz Why so? D:
 
3:52 AM
It's a long story, I'll tell you if you're interested though since I feel like venting.
 
I could use a story
 
A personal story? Dang, I didn't know people liked those.
 
Has a drink, and a seat.
Actually it's a bed but the point is there's listening that's about to go down in this bitch.
 
In hindsight, it seemed like a good idea but it probably isn't. Especially since chats are public and this is the Lounge.
 
Ah, well.
 
3:56 AM
What're people gonna do, come back, re-read the whole transcript and flame you for letting it all off your chest?
At some ungodly hour of the night?
And even then: DOESN'T MATTER, had listens.
 
I can't get over my ex-girlfriend. It shouldn't bother me but it does.
 
user1357851
@Rapptz same here
 
user1357851
especially when the trolling 10 years ago came back and bite me
 
any idea why font output can be so blurry and poor quality ?
 
because all home-made fonts have an ideal size.
 
user1357851
3:58 AM
?buy better monitor
 
bad subpixel positioning?
 
@Dave It's made out of textures. Textures stretched and resized will result in pixellated or blurred stuff.
 
bad aliasing?
 
ill try 18 instead of 16 then
 
@Rapptz Well, what's been naggin at you about the whole situation?
 
user1357851
3:59 AM
what is the point of public forum/lounge/room when you can not troll
 
hmm the ttf file shows 18 nice and clear but on my app its blurry as sin and im not drunk :P
 
Probably not a problem for other fonts, like the ones provided by MS, but I know a lot of fonts have an "ideal size" of like 16, 24 pixels or something. I doubt that's it though if you're using another font.
 
user1357851
its either the monitor or you need glasses >_<
 
well its clear when im using the font in photoshop or word doc
 
user1357851
maybe you are allergic to coding :D
 
user1357851
4:01 AM
do you have tearing eyes?
 
lol
 
user1357851
when using your coding editor?
 
i think its something to do with how its rendering the font
 
user1357851
I seriously need to stop chatting here and get some work done
 
i48.tinypic.com/30219ok.jpg this look blurry to you guys
 
4:05 AM
No. Just JPG artifacts.
 
@JerryCoffin apparently VS is consider 32bit
1
A: 64 bit visual studio not available on website spark

Ondrej TucnyThere's no 64bit version of Visual Studio because it uses a combination of 32bit and 64bit DLLs as it needs in respect to programs you are developing (and debugging). You can install it on both 32bit and 64bit systems and will work.

strange surfing around I now find msdn subscriptions to x86 versions but then other times they do say x86_x64
don't know if one is better than the other..
 
lols my game menu is slow as hell xD
 
I'm crashing the visual c++ november compiler
ice
 
@sabgenton The IDE itself (most of it, anyway) is 32-bit. The compiler is an external executable that it runs.
 
^ what is correct syntax for the thing in cppMain?
 
4:24 AM
@JerryCoffin I can show you sites where there are msdn subsriptions like :
en_visual_studio_professional_2012_x86_dvd_920779.iso
and then conversly like:
en_visual_studio_express_2012_for_windows_8_x86_x64_dvd_920749.iso
:S
 
one is for visual studio full version
 
the first one fits the bill the second not so much
 
the other is for visual studio express
 
@sabgenton I'll take your word for it -- without doing some looking, I'm not sure of the exact difference between the two (and it's definitely true that their description on MSDN can be anywhere from crappy to nonexistent).
 
as you can imagine, it's not the case that visual studio express has more bundled with it than the professional version
 
4:27 AM
@Cheersandhth.-Alf I think I have seen a full version saying x86_x64
 
the only vs installer i have on this machine is [en_visual_studio_premium_2012_x86_dvd_920758.iso]
 
@JerryCoffin what the crap does it all mean though -64 +64
 
it has both 32-bit and 64-bit compilers
why are you asking if you're refusing to trust us
that's dumb
i think for that matter it was dumb of me to install the premium version
i just had a vague idea that it might be somewhat smaller in download size than universal
 
no I just don't understand once I know what is ment then I'll be able to trust
 
4:32 AM
@sabgenton Oh, looking at things, the second is for Windows 8. For Windows 8, you can target ARM in addition to Intel. At least from the looks of the file name, this is saying it's the one to target Intel (32- or 64-bit). The alternative would be to target (maybe even run on?) ARM-based tablets. I neither have nor care about tablets, so I've never looked into that at all.
 
^ This one compiles with g++ 4.7, but still crashes the visual c++ compiler... :-(
 
@Cheersandhth.-Alf the question I linked to above concludes that the guy download x86 because 64 doesn't exist
 
@sabgenton oh, ok: apparently you have a basic confusion. an IDE (which Visual Studio is), Integrated Development Environment, runs compiler and editor and other tools for you. And integrate them, e.g. jump to last compilation error in the editor. The IDE is only 32-bit. It runs 32-bit and 64-bit compilers for you, generating 32-bit and 64-bit executables. OK?
 
@Cheersandhth.-Alf "it has both 32-bit and 64-bit compilers"
that is history
 
4:41 AM
I get all that now
I just don't get why some versions of VS are labled x86 and some are labled x64
 
@jerry have you any idea for my little test program that not only ICEs but actually crashes the visual c++ compiler?
 
this guy stackoverflow.com/q/12664048/790359 gets told there is no 64 version when he complains he is sold a (x86) version
I just don't know why M$ lable there releases x86 and other times x86 x64
 
any tips on how i can look for areas which are causing my scripts to run slow?
 
@Cheersandhth.-Alf unless they remove the 64bit compilers in the x86 version or somthing but no info I can find
 
no, they're not removing compilers
 
4:48 AM
Do you know what is removed?
(if there not exactly the same)
 
nothing is removed. why don't you link to a version that you're interested in. then we can find out what it provides
keep in mind that microsoft is not known for consistency, especially wrt. naming
 
I can't I don't have a MSDN subscription I just found other forums referring to those versions.
yeah maybe it's just a glitch and there is nothing missing or different.
 
5:03 AM
Have i got the correct syntax here:

		sf::Sprite result;
		if(result ( IsIn(mouseX,mouseY) ) ? button_on : button );
		result.setPosition( m_x , m_y );
		destination.draw(result);
 
Ternary conditional inside an if?
And there's no body to the if?
 
it doesn't like if(result )
the idea was if true set sprite "button_on" to result else "button"
then use result to draw
 
@Dave Why is there a ; after the if?
 
well result and draw are after the if
isnt the "?" part of it saying if true do else do
 
The if does that too
 
5:06 AM
yeh its meant to assign either button or button_on to result
 
There's no assignment there though
 
well i tried result =
didnt like that either
 
you want

result = IsIn(mouseX, mouseY) ? button_on : button;
 
no if () ?
 
no if. the ? is the if.
 
5:07 AM
ah i see
ok that fixed the errors
just didnt do what i'd hoped :P
 
what were you hoping?
 
i send the sprite like this:

btn_quit.RenderBttn(window,mouseX,mouseY,button,button_on);

button and button_on are sf::Sprite
then it was meant to load the button but it doesn't display
its recieved here:

void Button::RenderBttn(sf::RenderWindow& destination,int &mouseX, int &mouseY,sf::Sprite& button, sf::Sprite& button_on)
think it might be a scope issue again
 
^ Bug report on initializer_list ICE for msvc 11.0, feel free to upvote
 
Yawn!!
 
@Cheersandhth.-Alf my apologies they all end in just x86 I was looking at "Visual Studio Team Foundation Server 2012 x86 x64"
I am an ass.
The only x86 x64 versions were express for web and express for windows 8 so they probably just have other stuff in them.
 
5:20 AM
@Cheersandhth.-Alf Sorry, had to disappear and get kids to bed. Looking at the code, 1) when I compile it, I get errors, but no ICE. Problem is, the errors don't make much (any) sense. It's complaining that: "initialization with {...} is not allowed for object of type registry::Key". Given the registry::key defines a ctor taking an initializer_list<ValuePtr>, it certainly seems like it should allow brace-initialization.
 
All full versions are just x86
 
@JerryCoffin huh
 
@Cheersandhth.-Alf About all I can guess at this point is "technology preview" -- not a finished product...
 
[D:\dev\test\vs_variadic_templates]
> set path=c:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\bin;%path%

[D:\dev\test\vs_variadic_templates]
> (cl /nologo- 2>&1) | find "++"
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.51025 for x86

[D:\dev\test\vs_variadic_templates]
> setcl
CL=/nologo /EHsc /GR /W4

[D:\dev\test\vs_variadic_templates]
> cl main.cpp
main.cpp
main.cpp(1) : fatal error C1083: Cannot open include file: 'initializer_list': No such file or directory

[D:\dev\test\vs_variadic_templates]
 
Xeo
The CTP is extremely buggy wrt variadic templates.
I indirectly filed 11 bugs regarding variadic templates and their unpacking mechanics.
 
5:28 AM
@Xeo Pssssssssst, Xeo.
 
Xeo
Btw @Cheersandhth.-Alf, couldn't you have just inlined the code in main.cpp?
 
@Xeo i don't understand?
 
Xeo
There is a "steps to reproduce" section, could've just pasted the code there.
I assume atleast it's not more than a few lines?
 
i did paste the code there but it didn't accept it
so removed and attached as file
 
Xeo
Oh, I see.
Okay, wait, that's rather huge file...
Couldn't you have... downsized the repro a bit?
 
5:34 AM
i did
but no-one is going to be helped by me wasting time on downsizing a trivially small file
the way i see it, a handful of lines is already minimal size (enough) :-)
i guess this means that i will have to use variadic templates instead
good plan: create an argument list out of the arguments instead of doing recursive main logic
 
Xeo
It's not about the size, it's about removing unnecessary parts of the code. Like the exception handling stuff. Or all the ValuePtr internals.
 
so who you think is going to be helped by that?
the folks on the compiler team are not dumb
there is no point in wasting time on that
 
i'm not angry at all
 
Hint: if there's no @ in my message, it's probably not a reply.
 
5:46 AM
oh
 
I just found that video. I'm still perplexed.
 
Xeo
@Cheersandhth.-Alf Eh... it immensely helps pin-point why it is failing.
 
no
here is what happens
someone is going to look at it
 
> The United States of America is now officially a socialist country
What thheeee fuuuck.
 
the person compiles the example and check where the compiler crashes
 
5:48 AM
> officially
 
in the compiler's own source code
 
Huh?
 
I stopped at 5 minutes. This video is painful.
 
the immediate context of what it was doing is helpful for that
it was parsing a declaration
with a {} list
 
(@Pubby look at the thing I just linked)
 
5:49 AM
the rest -- the person checking this is not going to waste time looking at the rest of the source code
that rest of the source code is only there to support the little part that causes the crash
it is about one intelligent person communicating to another one
the thing about reduction to minimal size, that is a mechanical rule for newbies on SO
 
@EtiennedeMartel lol
 
not something one should waste time on in life outside SO
but SO users can't be trusted to provide examples that are even relevant
 
People who get mad like that shouldn't get into politics
 
so for them it is almost a necessity that they reduce their examples completely
otherwise, there is a high chance of just nonsense and irrelevant code
 
why is this woman raging about obama haha cant even show her face
 
5:52 AM
this is not so for a bug report about an internal compiler error, submitted by an experienced programmer
there, it is known that the code is relevant
it is no problem finding the exact relevant line of code (it crashes)
in short, the rules are different because both the situation and the people are different
 
Xeo
@EtiennedeMartel So... what the fuck is she actually complaining about? I can't get the sense out of the amount of BS she's shouting.
 
she dont like socialists
 
hey guys, in a non-static method it's possible to use typeof(*this) to get the (non-polymorphic) type of the class
 
she also wrong thinking britain is trying to get rid of the NHS
 
is there something equivalent that I can use inside static methods?
 
5:57 AM
and just to remove another possible misconception
upvoting a bug report does not say that one thinks it is formulated in a good way
it says, "i want this to be fixed!"
 
lmao she says "figure out to use the internet and get the hell off it"
no point in figuring it out then :P
 
@zneak why?
 
because I'm lazy and that would let me copy-paste static methods to 4-5 classes
 
Xeo
@Cheersandhth.-Alf Right, I did forget to upvote it. Thanks for reminding me.
 
There are better ways of doing that you know
 
5:59 AM
I could set up something using the curiously recursive template pattern but that won't save me a lot of time
 
@Xeo As I said, I stopped at 5 minutes.
 

« first day (754 days earlier)      last day (4199 days later) »