« first day (731 days earlier)      last day (4223 days later) » 

6:01 PM
Life? as in Conway's Game Of?
 
That's saying a lot.
 
@DeadMG Yes.
@thecoshman What do you want admin for? I can give you one, but there isn't much to do. vOv
 
@CatPlusPlus not sure if I need admin rights, just so I can approve people whilst you are away
 
Being sick sucks.
 
I might open the registration, but make DDD hidden to non-verified people.
 
6:04 PM
I have a cold, and it's raining, and I need to go out to buy stuff.
And I don't seem to have an umbrella around here.
Fuck.
 
Wow.
Ok, rain seems to have stopped, so I'm making a run for it. Later. If I survive.
 
hmm
not all of my newlines are showing up properly
 
user1174868
Are written tests common for computer science courses? Because I just cant do them
 
@Jordan writing on paper? yes. writing an essay? no. writing a paragraph? yes
 
6:13 PM
@Jordan Yes
 
user1174868
I mean writing code on paper
 
user1174868
I can't do that at all, I always do poorly
 
@Jordan code on paper is rare, but pseudocode is normal
 
user1174868
I guess from now on I have to write code on paper and then put it into a compiler or whatever
 
the frick? DNA computing?
 
6:15 PM
@Jordan That's asked in job interviews, so get the habbit
 
"In 2008, a group of undergraduates built a bacterial computer that can solve a simple example of the burnt pancake problem by programming E. coli to flip segments of DNA which are analogous to burnt pancakes.[6][7] DNA has an orientation (5' and 3') and an order (promoter before coding). Even though the processing power expressed by DNA flips is low, the high number of bacteria in a culture provides a large parallel computing platform."
 
user1174868
It is just so frustrating, I always make little mistakes in writing it down that would never be a problem because a compiler will tell you syntax errors
 
@Jordan right, that's why only pseudo-code should be written.
 
@Jordan It is okay to make some minor mistakes
 
user1174868
I failed my quiz because of syntax errors, I have to pass my classes :P
 
6:18 PM
Maybe this requirement falls into that category, where people being smart enough to want it, are better suited to implement it by them selves than to answer to the lesser souls at stackoverflow what is happening... — Aki Suihkonen 21 mins ago
 
wtf, your prof failed you for minor syntactic errors?
 
^^ huh?
 
user1174868
well the program wouldn't run in a compiler so I failed
 
user1174868
one problem I did actually mess up, but the others were just syntax errors
 
@Mysticial subtle
 
6:20 PM
@Mysticial looks like he's saying the people that know why compilers don't optimize floating point math are too smart to bother with Stack Overflow.
 
woop, fixed another annoying corner case in my Python script
 
@MooingDuck that's BS...
 
not least because Mysticial explained it quite well
 
@CatPlusPlus I think you should
 
damn
why is some of the BSG soundtrack so fucking good
 
Ell
6:25 PM
hi
 
Apparently the most significant factor is the number of bytes the compiler writes out to the resulting file. — H2CO3 2 mins ago
 
@Mysticial THIS IS NOT A FUCKING JOKE SITE
 
@DeadCicada best said, by flipping a table
 
People caring about executable size.
 
It does matter in some niche cases.
 
6:29 PM
@DeadCicada like five
 
@CatPlusPlus That was the attitude I had for a while - until it actually became a problem in one of my apps.
 
Besides, 26kB for /bin/false, what?
 
I can understand looking for a solution when it's an actual problem for some reason
 
user1174868
How different is basic java from basic c++? My school uses java for the intro courses but I am learning c++ now
 
Hey guys
I have an important question about memcpy
 
6:30 PM
@Jordan define basic?
@ThePhD You have are? Does it hurt?
 
But that's so fucking uncommon, I doubt OP have a problem. Other than OCD, of course.
 
@DeadCicada It hurts greatly. =[
 
@Jordan Completely.
 
owow wtf - Dubstep remix of double rainbow
 
user1174868
@DeadCicada The kind they would teach in an intro course forcomputer science
 
6:30 PM
Though, for realsies: Is it always implemented as a byte-by-byte copy?
 
Assuming there's any sort of semblance between the two is a big mistake.
 
@Jordan well, they use similar things, like code blocks are done with braces {} but its more about how you work with stuff
 
@ThePhD Uh, almost never.
 
Or do certain implementations optomize to copy by the 64bit or 32bit boundary?
Oh.
 
user1174868
6:31 PM
That sucks, I guess I should stop learning c++, I just got the primer
 
@ThePhD Don't use it.
 
Generally you'd copy as much as your bus can, then half and so on until 1 byte.
 
Every implementation optomzies.
 
@Jordan The syntax is similar.
 
Well that's reassuring. Gonna use memcpy the-
 
6:31 PM
Don't use memcpy.
 
... Um.
 
@CatPlusPlus optomzies
 
@CatPlusPlus lulzies
 
Why not? D:
 
@Jordan if you are going to learn C++, learn it properly
 
6:31 PM
@CatPlusPlus Beat you to it.
 
@DeadCicada Optomizes, sorry.
 
It's starting to look like a triple rainbow
 
@ThePhD No, let's turn it around. Why would you need it?
 
@Jordan Keep in mind that C++ is the most badly taught language in the world.
 
It's also one of the most badly designed languages in the world.
But that's a digression.
 
user1174868
6:32 PM
I dont understand that really because I was taught bad c++ and I dont know what good c++ is but I assume the primer should be good
 
Anyway, protip: if there's an optimization that works in the general case and brings great benefits, any decent implementation will do it.
 
Ell
c++ primer 4th edition is good :D
 
@R.MartinhoFernandes I am working with Constant Buffers in D3D. I need to slap a cache'd array of data - it can be any type, but the individual bytes are used to be compatible with the whole buffer, since a buffer can contain multiple types (sorry for repeating if you already knew) -
so I need to take cache'd data A and slap it over ConstantBuffer DataSpot B.
Which is why I was using memcpy.
... I'm not sure why I spell cached cache'd....
 
@ThePhD you can edit if you press 'up'
 
@ThePhD sounds like you need placement new
 
6:35 PM
Oh btw, it didn't start raining again. I survived.
 
@MooingDuck ... Uh. Placement new?
 
Warning: MATLAB did not appear to successfully set the search path.
I managed to break it before I even used it, great.
 
@ThePhD I'm not sure what your problem is, so I'm not certain.
 
@ThePhD don't make me google that for you
 
0
Q: Recognition facial with kinect and save a unique data in a DB

lightless07I'm working on an app for Kinect that can recognize one person, save his face's unique data of to a database and later if another person is recognized for that Kinect save the new information to the DB as well. I don't have any idea how to write an algorithm to save a unique pattern of facial fe...

 
6:36 PM
@CatPlusPlus You're good.
 
@MooingDuck buffer data on graphics cards has to be done via memcpy, AFAIK it's the only way
 
^ For a second there I was, wondering whether he going for the ultimate cumshot camera setup
 
@MooingDuck It's not a problem. I'm just wondering if it's okay to use memcpy to copy an arbitrary void* to another void* (or rather, a byte* to a void*, since D3D has the void* and I'm using a byte* Array<>)
 
@thecoshman cars?! cdrs too, surely?
 
@Jordan Well, look. Here, we have a rule: if it's not on The List, it sucks.
 
6:37 PM
Copying pointers is fine.
A void* is a pointer not a buffer.
 
user1174868
@EtiennedeMartel Is there a list like that for Java? And yeah my c++ intro course book was not on that
 
Why are you memcpying buffer data in the first place
 
@sehe ¬_¬
 
It's a void* that represents a buffer of data. But it has to be polymorphic with everything in existance, so it's just void*
 
@ThePhD AFAIK this is the only way you can do it
 
6:38 PM
No.
 
@CatPlusPlus he says D3D API
 
@MooingDuck So?
 
@CatPlusPlus It's for D3D. The Constant Buffer. Um. Lemme see if I can ideone an example.
 
@ThePhD You're missing the point. You don't want to copy a void*. You want to copy a buffer of something to another buffer of something else. No one what "something" and "something else" are.
 
@CatPlusPlus one last time, only way you can do it
 
6:39 PM
For arbitrary instances of "something" and "something else", no, you cannot use memcpy.
 
@Jordan I don't know. We don't like Java here.
 
Yes, the only way to memcpy something is to memcpy something.
 
You may get a different answer if you ask the right question.
 
That doesn't explain why the fuck are you memcpying it in the first place.
Buffer sits in one place, and then you upload it.
 
@Jordan There is.
 
6:40 PM
There is no fucking memcpy needed at any point of that.
 
@CatPlusPlus have they changed the way it works?
 
@EtiennedeMartel A circular argument
 
@SethCarnegie Hm?
 
last time I actually buffered data on graphics cards, you had to loack the region, giving you a void* and memcpy you data to it
 
6:41 PM
@SethCarnegie No, it's not.
 
@ThePhD There's nothing wrong with std::copy or memcpy in such a situation. But usually, you cast the result into a T*, where T is the type (e.g. struct) you use to represent the constants, then you just copy them from a std::vector<T> or wherever they came from.
@thecoshman Still do.
 
@thecoshman Cat means you should cast the destination pointer to a something-else pointer, then use normal C++ stuff instead of memcpy. (I think)
 
@Etienne If a book isn't on the list, it sucks, and books that suck aren't on the list, so no book could ever get on the list without already being on it.
 
Bah, mapping. You don't have to mmap buffers.
If you are copying them with memcpy instead of writing to that memory directly, there is no benefit over API upload anyway.
 
@DeadMG oh few, so I still know something relevant about graphics programming
 
6:42 PM
@SethCarnegie Don't worry, we can cope with that.
 
> Anyone who answers this instead of flagging for deletion is officially a repwhore – Etienne de Martel 1 hour ago
 
@CatPlusPlus what API upload?
 
@sehe Yeah.
 
Nice
 
I might be a rather aggressive repwhore hunter.
 
6:42 PM
@thecoshman std::copy
 
No, not that.
 
@MooingDuck bah, fancy C++11 nonsense
 
@thecoshman that's... C++03.
 
Unless D3D in its glorious OOPyness only offers mmapping in which case I have no words.
 
@MooingDuck bah, fancy C++03 nonsense
 
6:43 PM
@thecoshman WTF man.
 
@R.MartinhoFernandes Ah I forgot, Lounge<C++> can sustain paradoxi like the TARDIS
 
@CatPlusPlus D3D is OOP?
 
I think an IDEone might clarifying what the hell I'm trying to do. Um...
 
@CatPlusPlus I actually don't know wtf you mean by mmapping, or what the alternative is.
 
There's no reason to use memcpy in C++. Use std::copy if you really need to do this shit.
2
 
6:44 PM
..... Mother fucker, it happened again. D:
 
uFail
 
Aha, I fixed it!
 
@thecoshman Well....it uses COM, and its retarded imitation of OOP anyway.
 
@CatPlusPlus There is.
memcpy takes void* arguments.
std::copy is strongly typed.
 
@CatPlusPlus why would D3D offer memcpy facilities
 
6:46 PM
@R.MartinhoFernandes That's a reason?
Because memcpy is not typesafe?
Or what.
I don't know.
 
IIRC when you lock a D3D buffer, you only get a void* for the ram to copy to
 
@thecoshman yep
but if you have a buffer of T, the safe approach is to cast to T* and then std::copy from your favourite source of T, not memcpy over
 
What a unique way of trying to create an object or whatever he's trying to do
1
Q: Class cannot access public members c++

7c00hi'm writing a program which requires a table, which i am emulating using a vector array, which i have made a custom class to create the table. however i cannot see any of the items in class table, except for vec_data. Why can't i access the public members in this class? for some reason, MSVC++ In...

 
there's a documentary about @sehe's species on TV soon.
 
@CatPlusPlus As if slapping a cast on it adds type-safety.
 
6:47 PM
@DeadMG So I should cast it to T* and just use std::copy rather than memcpy?
 
Because you can't do this with std::copy without a cast.
 
I don't use either really.
 
D3D doesn't give a shit about typesafety
 
So, I prefer memcpy because it doesn't pretend it's safe.
 
... I wonder. Does std::copy just use memcpy underneath?
 
6:48 PM
If possible, yes.
15 mins ago, by R. Martinho Fernandes
Anyway, protip: if there's an optimization that works in the general case and brings great benefits, any decent implementation will do it.
 
Right. I need to remember that.
memcpy it is.
 
well, std::memcpy...
 
Not remembering that is a bit like insulting the intelligence of the compiler/stdlib writers.
 
... There's a std::memcpy ?
 
lol
 
6:49 PM
as opposed to just memcpy?
 
@R.MartinhoFernandes oh and we're not allowed to do that? :P
 
Or, amybe I'm using std::memcpy and I just don't know it.
 
lol
 
6:50 PM
@TonyTheLion If you're not dead sure of it, no. Not without making an ass of yourself.
 
@ThePhD they're the same thing
 
@R.MartinhoFernandes I wouldn't be so sure. Remember, no std::make_unique, and in the MSVC implementation there's things like the useless std::deque
 
@DeadMG I wish the deque would at least make the useless part into fixable macro :(
 
@ThePhD The C++ standard includes the C standard library.
 
@R.MartinhoFernandes lol
 
6:51 PM
and std::vector::pop checks for empty() before popping
 
@DeadMG make_unique is an oversight of the committee, not the library writers. And what you just said only means Microsoft's implementation is not decent.
Yes, I took care to qualify my statement with "decent" above because I knew someone would point out crap like this.
 
right, but it does mean that you can't just assume that your implementation is, in fact, decent.
 
Yeah. In that case you have all the right to insult their intelligence.
 
fair 'nuff
 
what's wrong with msvc's deque ?
 
6:53 PM
If you're using something like D3D, you're probably definitely using Microsoft's implementation, so I guess it helps to knowhow Microsoft does stuff.
 
Xeo
@kbok Too small block size
 
@kbok The block size is uselessly small.
 
isn't that customizable ?
 
@kbok it allocates objects in blocks of 16 bytes.
 
Xeo
no
 
6:54 PM
@kbok nope
 
@kbok It degenerates into a vector of pointers, or something.
 
as in, it degenerates to std::vector<unique_ptr<T>>
basically
 
what happens in MSVC if a macro is defined twice differently I wonder...
 
I get the sneaking feeling MSVC has a problem with std::dequeue
 
Xeo
#define _DEQUEMAPSIZ	8	/* minimum map size, at least 1 */
#define _DEQUESIZ	(sizeof (value_type) <= 1 ? 16 \
	: sizeof (value_type) <= 2 ? 8 \
	: sizeof (value_type) <= 4 ? 4 \
	: sizeof (value_type) <= 8 ? 2 \
	: 1)	/* elements per block (a power of 2) */
 
6:54 PM
I think you can use D3D with MinGW.
 
Xeo
@MooingDuck error.
 
What?
No, it just redefines it.
 
Ah, shit
 
Xeo
Eh?
 
#define FOO 1
#define FOO 2
 
6:55 PM
Well, Meyers advises to use deque whenever possible
 
Xeo
Standard forbids redifinition of a macro if it doesn't have the exact same content.
 
Redefinition is only a warning.
 
#define Xeo rocks
#define Xeo sucks
 
Xeo
wat.
 
@Xeo And nobody cares.
What a shocker.
 
6:56 PM
perfectly legal
 
@R.MartinhoFernandes Cool. But what would be the point then? D3D only works on Windows, so if you're using MinGW you'd usually take the OpenGL cake with it, right?
 
damn typos spoiling my fun
 
@kbok That's more of an "on principle" thing.
 
@ThePhD No idea. Some people are weird.
 
6:57 PM
@kbok stroustrup advises vector
 
@ThePhD OpenGL is cake? I prefer to think of it as poison
 
@ThePhD Er, no?
 
@thecoshman I don't htink so
 
@MooingDuck Was it Sutter then ?
 
@DeadMG I never said what the cake was filled with...
 
6:57 PM
I dunno
 
some one hit liverworkspace, too lazy
 
@MooingDuck Let's advise string
 
Choice of compiler has nothing to do with what stupid low-level graphics API you want to use.
 
@DeadMG Poison?
 
And I wouldn't pick MSVC for anything now, really.
 
6:57 PM
@DeadMG ah now, all the best things are poisonous
 
I don't do it anyway, since large collections of objects generally need C compat in my codebase
 
@Pubby Cue "because it has a C interface".
 
@CatPlusPlus TBH MinGW sucks really hard too
 
@Pubby he just bums DX
 
@kbok At least it implements C++11.
Not that I'd pick C++ for anything now, really.
 
6:58 PM
@CatPlusPlus There's nothing to it if you don't have your OS's API
 
@kbok Eh?
 
AFAIK MinGW supports the WinAPI.
 
It's incomplete.
 
Not that I've ever done any Windows development, but I've seen it there.
 
What's missing you can define yourself.
 
6:59 PM
@R.MartinhoFernandes What do you develop primarily in? Linux?
 
how well does Clang support the Windows API?
 

« first day (731 days earlier)      last day (4223 days later) »