• What Are You Working On August 2012
    2,271 replies, posted
[QUOTE=qqqqqqqq;37382442]I'm not quite sure what you're trying to do here but it sounds like you want some form of associative array, something like std::map. There are probably better solutions though if you'd give details of what your goal is rather than what you're trying to do?[/QUOTE] The goal is an associative array that I can quickly and easily access arbitrary objects by their key, with very little memory overhead. The speed is the main concern, with memory a very close second. Each key is a combination of two (signed) integers (probably two 32-bit combined to a 64-bit) and is fully unique. The objects are a custom class I have that implements a flat interval "tree" (RLE), so it should support resizing the objects quite often (the RLE will have to be recalculated a lot). The goal with the RLE is to minimize memory and improve (iteration) speed. I expect lookups to be considerably more common than insertion/deletion as well. [editline]23rd August 2012[/editline] Of course, I could make the map pointers to the objects instead of the objects themselves...
[QUOTE=Richy19;37383313] Your move chris/dlaor/origamiguy... Quite happy with that, I generate the maze using a variation of the depth first algorithm, then I create a VBO which automatically updates its self to add all walls and such, oh and overlapping walls arent added ie if there are 2 blocks next to eachother [][] then the middle then all that is added would be [ ][/QUOTE] Not this again.. [URL="http://golang.org/"]GO[/URL] AWAY.
[url]http://www.reddit.com/r/Tribes/comments/yqkab/magicchain_fixed_high_ping_chaingun/[/url] lag compensation for tribes: ascend
[QUOTE=ZenX2;37382907]So I decided to give up compiling Astrostruct on Windows and tried it on linux[/QUOTE] Whoa, fantastic! It's much easier to compile on Linux, huh? I'll look into including pre-compiled libs and sources so compiling it isn't so hellish for Windows.
[QUOTE=Naelstrom;37383749]Whoa, fantastic! It's much easier to compile on Linux, huh? I'll look into including pre-compiled libs and sources so compiling it isn't so hellish for Windows.[/QUOTE] Could just slap the library sources into a folder (maybe even your src folder) then include them in the project/makefile/whatever. [editline]24th August 2012[/editline] Also, I think I figured that some ungodly combination of std::pair and std::unordered_map works for my purposes. std::unordered_map< std::pair<int32_t, int32_t>, classnamehere* > Not exactly my favorite type, but it works.
[QUOTE=Hack;37382846]blah blah[/QUOTE] Great! I will definitely try this when I get my copy of Windows8. I think that interface will be cleaner, if you add horizontal and vertical separator (on main screen). Greetings, Sonic96PL
[QUOTE=Sonic96PL;37384864]Great! I will definitely try this when I get my copy of Windows8. I think that interface will be cleaner, if you add horizontal and vertical separator (on main screen). Greetings, Sonic96PL[/QUOTE] Wow, that's a really good job at Markov chains.
So apparently that D I got in ICT.. Meant distinction ( which is A equivalent ). Spent all morning looking at different colleges because I was one A off getting in, phoned the college several times etc.. Fucking who does that, there was no grade scheme attached or anything, just a huge text box with D. [editline]24th August 2012[/editline] Now back to work on my Android game. :dance:
Finished the web interface for OpenFTL. Took exactly 1 month, here is a screenshot of me using it to compute the airflow around a custom NACA wing airfoil using OpenFTL: [img]http://25.media.tumblr.com/tumblr_m999mwWOD41rv1no2o1_1280.png[/img]
The default hashes in C++ for signed 32-bit integers are weird. Apparently all they do is convert them to unsigned. Meanwhile, the unsigned 64-bit ones just truncate them down to unsigned 32-bit... Fuck it, I'm overriding the hash function for 64-bit ints. I guess technically it's not a hash function any more (it just returns the number I'm supposed to generate a hash for, hehe), but considering it's just two signed 32-bit ints slapped together, I need them to not get truncated and lose the entire first 32-bit int. Is this a terrible idea Y/N?
[QUOTE=Matt-;37385153]So apparently that D I got in ICT.. Meant distinction ( which is A equivalent ). Spent all morning looking at different colleges because I was one A off getting in, phoned the college several times etc.. Fucking who does that, there was no grade scheme attached or anything, just a huge text box with D. [editline]24th August 2012[/editline] Now back to work on my Android game. :dance:[/QUOTE] Doesn't your school/college tell you what course your doing? BTEC/A Level etc...
[QUOTE=ECrownofFire;37385561]The default hashes in C++ for signed 32-bit integers are weird. Apparently all they do is convert them to unsigned. Meanwhile, the unsigned 64-bit ones just truncate them down to unsigned 32-bit... Fuck it, I'm overriding the hash function for 64-bit ints. I guess technically it's not a hash function any more (it just returns the number I'm supposed to generate a hash for, hehe), but considering it's just two signed 32-bit ints slapped together, I need them to not get truncated and lose the entire first 32-bit int. Is this a terrible idea Y/N?[/QUOTE] Just truncating them will give you the best possible hashes already, unless you do unusual stuff like only working with multiples of 4294967296 or large factors of that number. Using the whole number is unnecessary at best.
[QUOTE=ECrownofFire;37385561]The default hashes in C++ for signed 32-bit integers are weird. Apparently all they do is convert them to unsigned. Meanwhile, the unsigned 64-bit ones just truncate them down to unsigned 32-bit... Fuck it, I'm overriding the hash function for 64-bit ints. I guess technically it's not a hash function any more (it just returns the number I'm supposed to generate a hash for, hehe), but considering it's just two signed 32-bit ints slapped together, I need them to not get truncated and lose the entire first 32-bit int. Is this a terrible idea Y/N?[/QUOTE] If the hash code has to be 32 bits, I would XOR the first 32 bits with the last 32 bits. That way all of the bits contribute to the hash 'identity' of the number. This is still extremely vulnerable to collisions, since every hash code has a bunch of (2^32?) easily findable keys. This is always going to be a problem when you reduce information entropy like this, though. For 32 bit numbers, the number is already its own hash code. Hash codes are an interesting topic. They're useful as an efficient [url=http://en.wikipedia.org/wiki/Sanity_check]sanity check[/url], because you can know for sure two things aren't identical if their hash codes aren't the same. However, if their hash codes [i]are[/i] the same, you don't know whether or not the two things are identical. It's important to remember that this is exactly how they're supposed to work.
[QUOTE=Sonic96PL;37384864]Great! I will definitely try this when I get my copy of Windows8. I think that interface will be cleaner, if you add horizontal and vertical separator (on main screen). Greetings, Sonic96PL[/QUOTE] Thank you :D
Repost cos end of page [QUOTE=Richy19;37383313][video=youtube;bbrEJESZDA0]http://www.youtube.com/watch?v=bbrEJESZDA0[/video] Your move chris/dlaor/origamiguy... Quite happy with that, I generate the maze using a variation of the depth first algorithm, then I create a VBO which automatically updates its self to add all walls and such, oh and overlapping walls arent added ie if there are 2 blocks next to eachother [][] then the middle then all that is added would be [ ][/QUOTE]
[QUOTE=Smashmaster;37385741]If the hash code has to be 32 bits, I would XOR the first 32 bits with the last 32 bits. That way all of the bits contribute to the hash 'identity' of the number. This is still extremely vulnerable to collisions, since every hash code has a bunch of (2^32?) easily findable keys. This is always going to be a problem when you reduce information entropy like this, though. For 32 bit numbers, the number is already its own hash code. Hash codes are an interesting topic. They're useful as an efficient [url=http://en.wikipedia.org/wiki/Sanity_check]sanity check[/url], because you can know for sure two things aren't identical if their hash codes aren't the same. However, if their hash codes [i]are[/i] the same, you don't know whether or not the two things are identical. It's important to remember that this is exactly how they're supposed to work.[/QUOTE] Eh, I can just use signed 16-bit instead. Smaller, but I don't really expect to use that much anyway. 32-bit was really more of a "just in case somebody decides to do this" kind of thing.
[QUOTE=Tamschi;37385696]Just truncating them will give you the best possible hashes already, unless you do unusual stuff like only working with multiples of 4294967296 or large factors of that number. Using the whole number is unnecessary at best.[/QUOTE] This assumes that you're doing numeric calculations with the numbers.
The best airfoil there ever was: [img]http://i.imgur.com/5eung.png[/img]
[QUOTE=leontodd;37385615]Doesn't your school/college tell you what course your doing? BTEC/A Level etc...[/QUOTE] You would think so, however this is the same school that gets mad at you for using Linux a.k.a "hacker software"
[QUOTE=Richy19;37385789]Repost cos end of page[/QUOTE] Seriously, people [I]need[/I] to stop doing that.
[QUOTE=Asgard;37386520]Seriously, people [I]need[/I] to stop doing that.[/QUOTE] Especially when it's not even a good post, it's not a 3D maze richy has.
[QUOTE=Overv;37386549]Especially when it's not even a good post, it's not a 3D maze richy has.[/QUOTE] rude. But seriously, who doesn't read the last post on a page? Do people get half way through a page then go "fuck it, I'm skipping"?
[QUOTE=Lexic;37386636]rude. But seriously, who doesn't read the last post on a page? Do people get half way through a page then go "fuck it, I'm skipping"?[/QUOTE] It wouldnt be the first or last time I have done it. Specially with 2 pages full of puns
[QUOTE=Lexic;37386636]rude. But seriously, who doesn't read the last post on a page? Do people get half way through a page then go "fuck it, I'm skipping"?[/QUOTE] Yeah. I just look at the pictures Jokes
[QUOTE=Overv;37386549]Especially when it's not even a good post, it's not a 3D maze richy has.[/QUOTE] The content I was showing off wasnt so much the maze itsself but the system to automatically create the VBO
[QUOTE=Asgard;37386520]Seriously, people [I]need[/I] to stop doing that.[/QUOTE] Repost because it was on 3/4th of the page.
I'd think the bottom of the page is a better position than somewhere in the middle. Since you stop there to click the next page.
Lots of people just check the latest page in the thread. They'll see almost all of the posts, except the ones near the end of the previous page. Also, content posted near the end of pages generally gets fewer ratings than comparable content elsewhere. So, it makes sense to strategically position your content in a thread that's mainly about showing people your work. (The best way to do this is to just wait until a new page starts until you post your content. Re-posting is obvious and sort of childlike. Subtlety is key, here.)
[QUOTE=Smashmaster;37387090]Lots of people just check the latest page in the thread.[/QUOTE] What, who? From what I've heard everybody just reads the new posts.
Don't people just keep fp_read open in a tab of its own and refresh that every so often to check for new posts? That way you don't miss anything
Sorry, you need to Log In to post a reply to this thread.