DigitalDelusion

Members
  • Content count

    1663
  • Joined

  • Last visited

Community Reputation

874 Good

About DigitalDelusion

  • Rank
    Contributor
  1. ThumbView2 preview

    This is so friggin cool! I'll download your test images and start working on accaptance tests for beermap with additional compatibility for missing formats! :D
  2. New shell extension project: MediatorMenu

    Darn you're getting good at this writing stuffage. :D Now get your ass online so I can talk to ya.
  3. Which would be more efficient/better practise?

    struct vector2d { float x, y; }; struct particle { struct vector2d pos, vel; }; struct firework { struct particle part; }; struct firework_particle { struct particle part; }; void particle_update(struct particle *p, float timeStep) { p->pos.x += timeStep * p->vel.x; p->pos.y += timeStep * p->vel.y; } then simply do: struct firework fw; struct firework_particle fwp; particle_update( &fw.part); particle_update( &fwp.part); /* not that if you make sure to put the particle struct as the first member you could safely do */ particle_update( &fw); particle_update( &fwp); /* both saving some typing and giving an illusion of polymorphism in plain C :) */
  4. Programming for multi processors chipset computers

    Quote:Original post by The C modest god So the question is, do you need to make an extra effort to write a program optimzed for multicput computers? or would the compiler's optimizations take car of it? I think it should be more sensible that the compiler will take care of most of the optimizations, because a user programmer never knows how exactly the chipset works. The people who write the compilers know better how the chipset works and therefore can do better optimizations. Well the problem isn't really that simple. Transforming sequential programs and algorithms to work well in parallel simply isn't a transformation that compilers are very good at, mostly because the algorithms aren't designed for concurrency to begin with. Compilers are decent at vectorization but that's really a far cry from actually being able to turn stuff into inherently concurrent computation. Writing fast (without needless synchronization) reliable (without deadlocks and reace condidtions) concurrent code is very hard because you need to think about it in a completly diffrent way, a way that most programming languages simply aren't designed around so they lack facilities for it forcing programmers to manage it by themself. Btw, doing concurrent work as daunting at it may seem is almost as fun as fiddling with asm :D
  5. Take the geek test

    43.98% I need to start playin magic the gathering and collecting usless stuff.
  6. Memory

    Quote:Original post by Black Ace the mesh viewer that came with directX takes about 7mb opening so i think its my machine ;) thats better than the code being the problem. Yeah, meshview without opening anything takes about 6mb. or 6.7 when opening that file.
  7. Memory

    Uh, I don't particulary have any of my own code that's able to view .x files although meshview seems to eat up about 600k when loading it so yeah 6mb seems a bit heavy then.
  8. Memory

    Well that kinda depends, what model format are you using? How many vertices are there, etc. But you're probably doing just fine.
  9. Flipping an image around the X axis

    i+(Width*(Height - j - 1)) + (Width*Height*k)
  10. Strange Code

    Quote:Original post by Bregma You should always strive to have your code compile warning-free at the highest possible warning level. Really. Quoted for emphasis.
  11. Fastest Float Comparation

    Basicly you probably don't want to rely on a float value being zero, but that has already been debated to death. const unsigned FLOAT_SIGN_BIT = 0x80000000; inline bool is_zero(float f) { return !((*(unsigned*)&f) & ~FLOAT_SIGN_BIT); }
  12. Data-Structure with mult. keys

    I would suggest using a "dictionary" (probably a balanced tree or hash map) of keys where each key has a list (probably of the linked variaty, dynamic array would also do) containing all the nodes & position of the key Nodes then become lists of pointers to keys. Doing a lookup is as easy as doing N lookups into your dictionary. For your example: dictionary: (id, key, node list) 0, "key1", {{0,0}} 1, "key2", {{1,0} 2, "key3", {{0,2}} nodes: (id, members) 0, {0, 2} 1, {1} say we want to lookup ["key1", "key2", "fish stick"] Then we do: lookup "key1" and examine it's node list for entries where it's first, that gives node 0. lookup "key2" in the same way, that gives us node 1. "fish stick" not found in dictionary, or no matchin node so ignore. Then we have the node-set {0,1}. You probably want to keep the nodelists sorted to avoid a linear search through them when doing positional matching.
  13. What is this? Another online quiz?

    Quote:Original post by evelyn 43% gay, which makes me a 'heterosexual babe' apparantly ...and I agree there's no leeway with the questions but, hey-ho [smile] Hm, wait just a sec here, that would make you what 57% babe? Then Im actually more chick than you with my 66% then? This test is really freaking me out ;)
  14. What is this? Another online quiz?

    66% Gay. "Women like you don't they? Little do they know you're a wolf in sheeps clothing ready to pounce!" Just for the record, I got a GF. But people tend to sometimes assume that Im either gay or bisexual, oh and yeah, women likes me :)
  15. A C90 Standards Idiom

    Quote:Original post by Dave /* headers */ const unsigned int secondsInHour = 3600; const unsigned int secondsInDay = secondsInHour * 24; /* rest of code */ It's legal C++ but not legal C89.