BlockDoc - A Blockland coding wiki

Author Topic: BlockDoc - A Blockland coding wiki  (Read 5588 times)

Alright, so how do hash table lookups work? How are they so fast?

It basically takes the address of the variable's name and does (pseudocode)

Code: [Select]
entry = table[(stringAddress >> 2) % tableSize];

while(entry != null)
{
     if(entry.stringAddress == stringAddress)
          return entry;
     else
          entry = entry.nextEntry;
}

The engine guarantees that two like strings will have the same address when used pretty much anywhere, so this works out nicely.

Of course you'll get a better understanding if you just look inside the engine yourself, it's fairly easy to read and will help you understand how it works a lot better than I can in posts.

On a related note, Port discovered that using local variables is just as taxing on the engine as using global variables.

Er.. where? What? The linear search applies to certain string table operations.
« Last Edit: July 11, 2015, 04:09:33 AM by portify »

It seems the server is having trouble, some sort of "limit", I'd assume it's a bandwidth limit

Wiki got overrun with spambots. I'll see what can be done. 403'd for now.

Fixed. Learned a lot about SQL lol. 403 will remain up for a few days, but you can access the site by using 'guest' and 'password' to log in. I've added a QuestyCaptcha challenge to hopefully prevent the spambots again in the future.
« Last Edit: August 04, 2015, 05:33:56 AM by Pecon »

Wow the syntax guide helped me greatly with understanding what everything means now. Hopefully I can expand on this and start coding myself.

The site is fully available again. If you have any troubles with getting to the site or the questions on the questycaptcha, post here and ask.

im sorry but the captcha thing is really, really annoying
add a cooldown instead, maybe?
also, im making a heebejesus of pages on simple things
« Last Edit: August 08, 2015, 02:58:52 PM by -Setro- »

You really should add some uh... extra answers to the catchpa questions. I tried answering "Print Gun" to one and it rejected me :(

You really should add some uh... extra answers to the catchpa questions. I tried answering "Print Gun" to one and it rejected me :(
Yeah, I'll add some more alternate answers. The tool ones right now just use the literal names, hammer wrench and printer.

Yeah, I'll add some more alternate answers. The tool ones right now just use the literal names, hammer wrench and printer.
the "what did kompressor eat" thing really got me.
is it maps? interiors? terrain?

the "what did kompressor eat" thing really got me.
is it maps? interiors? terrain?

That one was "bedroom" or "the bedroom". I'll add more alternate answers later.

It really bothers me when you have to answer a question everytime you edit something, and I keep forgetting to answer the questions

Just make it to where you have to have an account to edit and create pages. The registered account would have to be verified and solve a captcha only on registration.

You may have to manually verify accounts to prevent spammers and people who write false info.

Just make it to where you have to have an account to edit and create pages. The registered account would have to be verified and solve a captcha only on registration.

You may have to manually verify accounts to prevent spammers and people who write false info.
This sounds like a much more permanent solution.