« first day (680 days earlier)      last day (2191 days later) » 

9:19 AM
i have a method checkOnCollision(node, VOLUMETYPE_AABB) which returns an vector of nodes that collided with the given one. i also mark every node (setting a flag) so that i can react on that while traversing the scenegraph. would you also mark the "testing" node ?
 
 
2 hours later…
Ron
11:02 AM
@nwp Appreciate it.
 
 
3 hours later…
1:37 PM
I use an old library to compute the boolean operations. So i have to use temporary their data types. Now it comes that i have to convert\reconvert between my and their data type --> RawMesh <-> MyMesh. I need a good approach to do this.
 
2:09 PM
int main()
{
    void * buff;

    buff = malloc(sizeof(int)*5);

    buff[0] = 3;
}
why i can index buff?
it gives me error saying
13:11: error: 'void*' is not a pointer-to-object type
what does that mean? i tought this should work?
do i need to cast it to int?
do this?
int * buff;
 
you have to cast, when this isnt done implicit....void is typeless
 
an then (int *) malloc(...)
yes i tought that too, ill try it
are templates a c++ thing only?
does C have templates?
 
@FerencRozsa that works yes! thanks
 
@jeyejow cast the void pointer you get as result of malloc
@jeyejow why you dont use the new operator ?
 
2:26 PM
@FerencRozsa i was trying malloc to see if i still remenbered how to use it
i have one question for you, does malloc allocate space in the stack or the heap?
i think it is in the heap because we need to free it
but im not sure and i dont find it saying were it is
 
its heap but it only allocates
no ctor invocation
 
what is ctor?
 
constructor
 
oh ye yes i know
it just allocates
new calls the constructor
 
@jeyejow yes and no with new you ask kernel to allocate the specified space and you get a pointer to the starting byte of that block...now you can construct your concrete objects in that space....for convience this overloaded..but anyway , you have a strict separation between the allocation and constructing.
 
2:57 PM
@jeyejow Storage of dynamic duration, in reality that would always be the heap generally speaking. But it could change based on the system.
 
@Mgetz ohhh ok, thanks!
@FerencRozsa thats nice i didnt knew that!
 
@jeyejow tbf in most systems where it's not the heap... malloc is banned anyway
 
why is that?
 
if you don't have enough memory to have a heap you don't have enough memory to spare with suboptimal allocation strategy
 
@jeyejow because in most of those cases you need to be very careful with memory. For example in kernel mode in windows you generally allocate from a 'tagged pool' that is either pagable or not. In a mars rover you have extremely limited memory and you need to keep as much available to the stack as possible
Honestly despite quite a few engineers understanding the concepts of virtualmemory, I highly doubt very many understand how it actually works in practice
 
3:20 PM
naming is a ..... i need a good name for an interchange type.
 
3:54 PM
regarding to this coliru.stacked-crooked.com/a/50c92cc436a7f2c7 maybe a function for conversation from std::vector<VertexData> to QVector<QVector3D> also fits
 
 
2 hours later…
5:36 PM
Is it valid to have int main(int argc, const char *argv[])?
I mean the const part
 
 
3 hours later…
8:49 PM
@ledonter If and only if that form is defined by your implementation ok now that we've gotten the standard out of the way: probably.
 
 
1 hour later…
10:01 PM
is there something particular about possibly dynamically linked functions having address of 1?
No matter what I get 1.
 
nwp
@OneRaynyDay You are most likely trying to pass a function pointer to std::cout, but std::cout doesn't know how to print function pointers, so you get an implicit conversion to bool.
 
(size_t)func
 
@Mikhail I'd use uintptr_t rather than size_t, but yeah.
 
@Justin for teh job security
 
10:07 PM
?
 
10:28 PM
@Justin if people cannot maintain your code they cannot replace you
 
Yes, but I have no idea what uintptr_t vs size_t has to do for "job security"
 
@nwp bingo. Thanks
 

« first day (680 days earlier)      last day (2191 days later) »