« first day (1011 days earlier)      last day (3941 days later) » 

8:00 PM
@EiyrioüvonKauyf I don't understand why you think volatile would have a general pattern
I also don't understand what a "general pattern" is
 
nevermind then; and i mean general design rule; there are always general rules / styles
 
@EiyrioüvonKauyf about volatile - jeremymanson.blogspot.com/2008/11/…
 
@EiyrioüvonKauyf mark a variable as volatile if other threads will read/write the variable as well. If you're dealing with more than one variable, use proper synchonization.
 
iirc you wouldn't really need it unless you were doing "low-level" concurrency, ie implementing a lock or something
otherwise use atomic variables / locks / other synchronization structures
 
@LostSalad he's writing C code
 
8:03 PM
@MooingDuck ah
 
well i'm not but that asker was; i just use my locks
 
@jalf I somehow read that as DnD3e. Still not sure how I did that.
 
@MooingDuck volatile in C is about as useful as volatile in C++. You should use locks and atomic variables.
 
@EiyrioüvonKauyf whoops, you aren't the same person :(
 
8:07 PM
super cool, it compiled
> everyone is good at security
 
Very good.
 
So, erm, what is the agreeable way to convert a string (filename) to lower case?
 
@StackedCrooked icu
 
Theres probably multiple ways of doing it, I can think of 2
 
Did C++11 add any fancy stuff for this?
 
8:11 PM
No. Use ICU.
 
@CatPlusPlus wow. The U.S Military won
 
What is icu?
 
I just want to check if file extension is JPG or jpg
Do I really need icu for that?
 
@StackedCrooked if you're only supporting english, then std::transform(first, last, ::tolower)
 
8:14 PM
^ thats one of the ways i was thinking of earlier
 
@MooingDuck ASCII, not English.
 
@CatPlusPlus meh
 
user142019
@StackedCrooked How about jpeg?
 
user142019
And JpG.
 
MFC also claims it's able to to toLower.
 
8:15 PM
Also don't identify files via extensions.
 
user142019
$path =~ /\.j(e?)pg$/i; woop woop.
 
@rightfold jpeg too
 
Ell
@CatPlusPlus how would you identify on for an example, an open file dialogue?
 
User-level filtering != identifying.
 
user142019
@Ell callback for each regular file or symbolic link in the dialog.
 
8:18 PM
FFS Windows "Parameters: lpsz Type: LPTSTR. A null-terminated string, or specifies a single character. "
 
yay it linked
and crashed, obviously
 
any way to define a variable to be accessed like a variable but to actually be a returned value recomputed every time?
 
@EiyrioüvonKauyf not in C
 
so in python you can do @property def cat(){//method stuff} and then do class.cat like normal; dam k
 
user142019
8:20 PM
@EiyrioüvonKauyf Just use a member function.
 
user142019
For example, std::vector::size().
 
@MooingDuck Converting to lowercase is not 1 in 1 out operation.
 
yeah but dynamic variables are nice
 
user142019
Then use a language that supports them. Such as C#.
 
user142019
8:20 PM
Also the proper terminology is "properties".
 
user142019
Even better use lenses. :zoomed orgasm:
 
Ell
dynamic variables aren't properties o.O
wait a second.
I'm confused o.O
 
user142019
He is referring to properties.
 
user142019
See his sample code.
 
great. my code crashes on the beginning of constructor
 
Ell
8:22 PM
@BartekBanachewicz what platform?
 
user142019
Personal computer.
 
@Ell windows ICC 13
 
user142019
@Ell I can tell from the retarded smiley.
 
g++ for some reason can't link it
fuck
and of course Premake4 generates totally retarded Makefile
 
8:30 PM
o__o euhhh everything in my code is starting to sound the same; why is end and last so popular?; like STLcontainer.end()
 
user142019
I used new for the first time in Go.
 
What's premake4?
 
@EiyrioüvonKauyf because you can't use range-for?
 
user142019
A build system.
 
@kbok lua-based build system
fuck it I have to set up Scons build for GLLoad anyway
Coshman made some scripts for his retarded system, but they are obviously useless
 
8:33 PM
@BartekBanachewicz uhh no i use iterators for everything i don't use boost range if that's what you mean
no need to
 
@EiyrioüvonKauyf no, I don't mean boost range. I mean range for.
std::vector<int> foo;
for (auto i : foo) {
    // do stuff with i
}
 
Xeo
Fuck. I fell asleep 3h ago. :(
 
@BartekBanachewicz yeah this isn't C++11 again; this is gcc 4.4 and i don't remember if it's even implemented
 
Nice nap. You should be proud.
 
@Xeo At work?
 
Xeo
8:35 PM
@Borgleader lol, no
it's 10:30 pm here
 
@EiyrioüvonKauyf then stop whining or use BOOST_FOREACH
 
looking for opinions, cant really ask this question on SO.. OpenGL, Direct3D or Direct2D for a new 2D game, and why.
 
Direct2D is the only one of those that's actually a 2D API
 
@bizzehdee neither of them
 
and why?
 
8:38 PM
@bizzehdee if you have to ask, you shouldn't use low-level APIs
 
@CatPlusPlus I'm aware
 
@BartekBanachewicz Everyone had to find out somewhere.
 
@DeadMG: you can draw 2d in direct3d, and in opengl.. infact, direct2d is a layer on top of direct3d
 
@DeadMG yeah, but if you can't even pick one, then, uh.
 
8:39 PM
@EiyrioüvonKauyf end() always returns the last iterator
 
^ yeah but i have a bunch of them
 
@bizzehdee You can do, but it's not anywhere near as useful as D2D. As in, there's a reason why Microsoft wrote that layer.
 
so i'm also running out of var names
 
@BartekBanachewicz: im not asking for your thoughts on my potential ability, im asking what are peoples opinions on these 3 apis and that is it
 
@DeadMG 2D in OpenGL is very nice, so I don't see why 2D in Direct3D should be worse
 
8:41 PM
@BartekBanachewicz Oh yeah?
 
@bizzehdee My personal opinion is that I like OpenGL.
 
what text rendering API does it ship with?
 
um, how is that relevant to anything?
 
@DeadMG: text rendering is why im personally leaning towards ogl or d2d
 
it's a pretty shitty 2D API that can't even render some text.
whereas D2D has DirectWrite
 
Ell
8:41 PM
using pango+cairo isn't very difficult at all
 
@DeadMG look at all these 3D games that render text somehow
OMG but D3D and OGL have no text rendering impossibru
 
@BartekBanachewicz Yeah- almost all of them use Direct3D.
 
@BartekBanachewicz: you need to write your own text rendering engine in d3d
or use an existing library
d2d has it built in
 
@DeadMG which as you said has no text rendering.
 
You can perfectly well use DirectWrite with D3D
 
8:42 PM
well, that's not true.
Direct3D10 and 11 can use DirectWrite.
and D3D9 had ID3DXFont
 
Since when does OpenGL not have text rendering API?
 
@Rapptz since ever.
 
ID3DXFont kinda sucked, of course.
 
@DeadMG so why is D3D not suitable for a 2D game again?
 
how can i give a different process access to a lock ... as in a different program through a library call
 
8:43 PM
but then, so did most aspects of those APIs..
 
Some lower-budget games have really nice visuals, except for the text rendering, for no obvious reason. I suppose that's why.
 
@BartekBanachewicz What's the point in hacking a 3D API to work in 2D when you could just use a library shipped by the vendor of that API that did all the work for you already?
 
so now, d2d vs d3d 11, (as im aiming at win7 and above, dont really care about systems older than that)
 
@Rapptz I mean, there are wglCreateBitmapFont and all that shit
 
@bizzehdee D2D works with D3D11 now so there's no reason to choose.
 
8:44 PM
I'm using OLE DB at work. It's ...rusty.
 
@bizzehdee are you sure you want to use such a low-level API?
 
I speak from experience when I say that bitmap fonts in OpenGL look shit, and are unreasonably slow.
 
@Rapptz Since always?
 
@TomW then your experience is pretty limited
 
I didn't code it myself, but I kind of trusted that the guy who did knew what he was talking about
 
8:45 PM
then he didn't. If you implement it badly the result will be bad. Simple as that.
 
@MooingDuck Doesn't it return the past end iterator?
 
Most people don't know what they're talking about
 
@BartekBanachewicz: wrote 3 apps today, one D2D, one D3D9, one OGL, all 3 just rendered a red qube with lighting, and allowed me to rotate the cube with the mouse and display the framerate. so yeah, low level doesnt bother me at all
 
Once I wrote hello world in assembly so I can totally write a game in it
 
@bizzehdee displaying cube and creating a whole rendering system for a game is a different thing
@kbok yeah, pretty much that
 
8:46 PM
@bizzehdee Don't use D3D9.
 
room topic changed to Lounge<C++>: DANGER: wild low-level programmers [c++] [c++11] [c++-faq] [no-helpdesk]
 
@CatPlusPlus low level savages
 
@BartekBanachewicz: im more or less going to be replicating windows forms from .net, but all controls will be hardware rendered
its a management sim game
 
@bizzehdee this takes time, FYI
 
so im not that worried about rendering anything too complex
 
8:48 PM
don't forget to make your controls open-source because finding hardware rendered controls that aren't built on Singletons is impossible.
 
@DeadMG I wrote a lib for that. Except it used old GL, and my friend is converting it to prog. pipeline
 
Don't forget to not build your controls on singletons also
 
yeah... I doubt that it works with D3D11 :P
 
@DeadMG :)
 
@kbok what then?
 
8:49 PM
also I'm not working on my game system right now.
 
Hey graphics expert guys
 
@DeadMG: ill consider moving the gui engine to its own lib to do that
 
@bizzehdee yeah then make it opensource
 
hell, frankly, I'm not even working on Wide right now.
 
user142019
@bizzehdee Is it for a video game?
 
8:49 PM
Is it reasonable to implement a scroll view by rendering the inset into a bitmap? Or should I just clip everything at the borders
 
user142019
Because if it's for regular GUI applications, I wish good luck to blind people who want to use your applications.
 
@kbok you can use stencil buffer for that.
 
> -10 8 mins ago removed User was removed
 
spent the last 2 months writing a rugby game simulation engine, and based on the teams, players and stats for those i give it, it now gives realistic scores every time, with some randomness thrown in for good measure. not given the gui a single thought until today
 
@BartekBanachewicz What is it?
 
8:50 PM
@LostSalad who'd have thunk. eclipse!
 
@bizzehdee nice. Just the way it should be
 
@kbok a bit-based buffer which you can && with. DirectX should have something like that
 
The greatest mystery being: why do you want accelerated graphics for a management sim game?
 
@Jeffrey yes, which is the last iterator
 
Xeo
Hmmm, listening to Nightwish after a long time again is nice.
 
8:52 PM
@Xeo good idea
 
@BartekBanachewicz I'm not sure I have such a thing
 
Ell
I would go with opengl starting a new project
 
@kbok here (the answer has two solutions that are relevant)
 
Ell
may as well make it cross platform when the choice is arbitrary
 
@BartekBanachewicz D3D does have a stencil buffer.
 
8:53 PM
started off writing a football manager game, but a friend pointed out, it will be near impossible to get any sort of market visability against sports interactive, and mentioned doing a rugby sim (hes a semi pro player, and we have a few ex-pro player friends), so we mapped out an event tree and i began coding it. now it works well, and they want "sporting consultant" credits :D
 
or at least, it did in D3D9.
 
> as such, you generally shouldn't expect to be able to set something in D3D and have it apply in D2D.
 
AFAIK it's more of an old FF thing.
 
@DeadMG kbok uses D2D
 
argument was "there are millions of rugby fans, union and league, and almost no games to exploit that market"
 
8:53 PM
Oh that's a new one: "Mooring Duck"
 
well, IIRC D2D simply permits you to set a clipping rect.
 
Ell
Moorish Duck
 
@DeadMG if he suddenly wants something other than a rectangle, it might be useful to know that technique anyway
 
-20 rep user was removed /sadface, anybody else lost rep?
 
@BartekBanachewicz YAGNI.
 
8:54 PM
@BartekBanachewicz Clipping with layers should do the trick
 
Xeo
lost nothin
 
@Borgleader Did too.
-10, 16 minutes ago
 
I lost 10.
 
@kbok because i want to move any cpu usage away from the cpu that i can, ie. no software rendering, only hardware rendering, freeing up cycles for simulation and generating more realistic random numbers
 
@bizzehdee then perhaps you shouldn't use Ruby? Because the gain on rendering will be minimal compared to the gain of using a language that's fast.
 
8:58 PM
who said i was using ruby?
 
@BartekBanachewicz Rugby
 
@BartekBanachewicz lol, why Ruby suddenly appear?
 
nevermind me, I'm stuck in build scripts
 
I'm tempted to alter my JNI exception handling code to make a stack trace.
 
8:58 PM
> Hilarious misunderstanding
 
@Jeffrey every time is a good time to bash Ruby
 
you wish :P
 
Barteks brain: "I HATE RUBY... wait thats this about a rugby thing? nvm its close enough... RUBY SUCKS"
 
@bizzehdee What kind of device could ever 1) Support D3D10 and 2) Be overwhelmed by a management sim game's calculations
 
@Borgleader pretty much that
 

« first day (1011 days earlier)      last day (3941 days later) »