I'm writing a simple Minecraft like game to test out a few world gen algorithms and to learn more about OpenGL. My first render code was glBegin() ... glEnd() style. Very ineficient and slow. I started learning VBOs for a heightmap project but using VBOs will force me to update the whole VBO of the chunk if something is added or removed due to it's size changing. That also sounds ineficient. The most plausable theory so far I can think of is instancing but even this isn't good due to multiple render types.  When I've been modding Minecraft all the render code i've seen there (and written my self) has been glBegin() ... glEnd() style. Is it really that? It just feels so wrong since it can render 64 chunks 20 fps no problem on an Intel intergrated GPU.
I found Minecraft's marvelous large worlds extremely slow to navigate, even with a quad core and meaty graphics card.  I assume Minecraft's slowness comes from:   Java, as spatial partitioning and memory management are faster in native C++. Weak world partitioning.   I could be wrong on both assumptions. However, this got me thinking about the best way to manage large voxel worlds. As it is a true 3D world, where a block can exist in any part of the world, it is basically a big 3D array [x][y][z], where each block in the world has a type (i.e BlockType.Empty = 0, BlockType.Dirt = 1, etc.)  I assume that to make this sort of world perform well, you would need to:   Use a tree of some variety (//) to split all the cubes out; it seems like an oct/kd would be the better option, as you can just partition on a per cube level not a per triangle level. Use some algorithm to work out which blocks can currently be seen, as blocks closer to the user could obfuscate the blocks behind, making it pointless to render them. Keep the block object themselves lightweight, so it is quick to add and remove them from the trees.   I guess there is no right answer to this, but I would be interested to see peoples' opinions on the subject.  How would you improve performance in a large voxel-based world?
GroupBy a list of associations with their keys How could Argus Filch clean up the whole castle by himself without magic? Short story with spaceship and humanity not realising they should be on it The plot is about:   A spaceship travelling through the universe Earth is a rogue planet whose inhabitants have been cut off and don't realise that their true purpose is to be part of the spaceship   The reason earth was in turmoil (wars etc.) was that they didn't realise that their true role was to fit into the ship  The ship contained 3 or 4 beings that made the thing work Planets throughout the universe are populated with the various beings which are components of the space craft   I seem to remember like an eye shaped being Each of them fulfil their role Humans are part of that as well.  There are loads of planets with humans on but earth has gotten overlooked so it never realised that's what they were designed for The story concludes with the ships picking up someone from Earth   and with the "human" realising that this is what they should really be doing  Humans have a different name that explains their role in the ship.   I probably read it around 30 years ago in English in a sci-fi collection book. Let's say I have two planets that are one hundred thousand lightyears away from each other. I and my immortal friend on the other planet want to communicate, with a strong laser and a tachyon communication device.  I record a message on the tachyon communication device and release the message at exactly the same time as I activate the laser, both of which are directed to the other planet which is one hundred thousand lightyears away. Say it is the year 0 for both of us at the time I did this.  If tachyons existed, then the message would arrive to my friend before the photons in the laser. It would arrive, say, a thousand years earlier. From my vantage point, that message will arrive to her at year 99,999; the same would be true for my friend's vantage point. However, she will only see the laser at year 100,000.  So since she got the message at year 99,999, she immediately sends me a reply back going through the same procedure as I did. She records a message and releases it at the same time as the laser. The tachyons will arrive 1,000 years earlier than the laser, so for me, I will receive the message at year 199,998. I will receive the laser, however, at year 199,999.  It seems to me that communication this way does not violate causality. I will still have received the message after I had sent it.   If tachyons truly violated causality, though, I realize it should arrive at year -1 for her, and so she can reply to me at year -2, which would mess me up by year 0 as I will ask her how she knew I was planning on sending her a message before I sent it. I could send her a different message, which she would end up receiving at year -1, and will end up confusing her as she would have received one message asking her out, and the other asking her how did she know I was asking her out. She then decides I am crazy and sends me a message at year -2 that she does not want to date me, and so she will have both turned me down and entertained me before I have even asked her out.  On the other hand, let's go back to year 0 and add a third device to our list: an Alcubierre drive. After I send out the message and the laser, I get impatient and do not feel like waiting 99,999 years, so I get on my Alcubierre drive spaceship and arrive on her planet at the same year 0. My friend is not in her office, so I leave a note to her also immortal secretary saying I dropped by and that she should expect a message for her in year 99,999.  I then get back on my Alcubierre drive and land back on my planet, still on year 0. Meanwhile, the tachyons and photons I sent out are still racing to arrive to her. By year 99,999, she receives the message just as I Alcubierre drive back to her, and I pick her up for dinner.  But the point of my question is, it seems to me that just going faster than light, if that alone was what you had, would not violate causality. It must be something else. I understand time dilation and that things with mass cannot travel at the speed of light, but using the Alcubierre drive, hypothetically speaking, I was still able to outpace the photons while also having mass. It still did not produce causality problems. Alcubierre drives are also valid solutions to GR.  It seems circular to me to say that what makes traveling faster than light violate causality is because it violates causality (if faster than light communication was divorced from causality problems, then the causality problem would cause itself -- thereby violating causality and, hence, we would scrap it and conclude that there is no causality problem after all).  What is it that I am missing? If someone could help me out, that would be excellent. I've been itching to ask my friend out for a few millenia now. :) What are reserved filenames for various platforms? If A is an infinite set and B is at most countable set, prove that A and $A \cup B$ have the same cardinality I am trying to prove: If A is an infinite set and B is at most countable set, prove that A and $A \cup B$ have the same cardinality.  Set definitions here are from baby Rudin.   Attempt: There are 4 possible cases:  1.A is countable and B is finite.  2.A is countable and B is countable.  3.A is uncountable and B is finite.  4.A is uncountable and B is countable.  Then for each case I need to show that $A \cup B \sim A$. I can prove 1-3, but I am unsure how to prove case 4. And in general, it seems that my proof strategy is inefficient and there exist much faster proof then proof by cases. Howto wildcard SELECT * to query all fields of objects in APEX? I have created sObject and I need all the fields and I have many. Is there a way I can directly get all of them rather then typing each one of them. Is there a way to prevent those pesky .DS_Store files from being ever created? Is there a way (eg. a binary hack into Finder) to stop it from creating .DS-Stores on LOCAL Volumes?   I am using Leopard, therefore these don't work:    (requires Lion)  (requires Snow Leopard)   Also,  slows down my computer. Can store bought salmon be used for sashimi? Is it safe to consume raw fish purchased at the fish counter of a typical suburban grocery store? If not, do you have any tips for finding sushi grade fish. Also, are there requirements for safe sushi/sashimi beyond the use of safe fish? Count the number of fish caught in total if we are given the number of fishermen who caught at least $n$ fish. Some fishermen caught some fish. No one caught more than 20 fish. $a_i$ is the number of fishermen who caught at least $i$ fish. How many fish were caught?   So my guess is that the number of fish caught has to be $$ a_1+a_2+\ldots + a_{20}$$  I reason that if a fisher man caught $n$ fish then he will appear in the tally $n$ times.   Is this logic correct? What happens when I terminate a process and the socket send buffer is not empty? In Windows (and probably in other operating systems), if a process has a TCP connection with another process on another machine, and then I terminate the process, an RST packet will be sent to the other machine to indicate the end of the connection.  Now imagine that when the process is terminated, there were still some data left in the send buffer. What will happen in this case, will these remaining data be sent to the other machine followed by an RST packet, or will these remaining data be ignored and only an RST packet is sent? Why can't I install Ubuntu or Wubi on a Windows Dynamic Disk? I've been trying to install 12.04 for a while now, I'm running on Windows 7 and I already made the partition (it's dynamic). I've tried booting from a disc and also the Windows installer. I haven't tried used any repair-boot programs or anything. Every time I tried to load from either, I get an error:  command=C:\windows\sysnative\bcdedit.exe /set {03f9077f-661f-11e1-845a-d08b36406c3d} device partition=U;  retval=1  stderr=An error has occured setting the element data. The request isn't supported  stdout=   Then after that, it makes a log file with information that I don't understand.  If it is simply due to the fact of it being a dynamic partition, someone please help. If it is more extensive, anyone with details on possible solutions or definite ones please express them. Does a man contain all the genes needed to make a woman? This question is brought on by a Sci Fi novel I am thinking about writing. The plot device involves a colonist in charge of building a population on a new planet who loses his supply of embryos and so forth in the landing. With the artificial "wombs" intact, he populates the planet with clones of himself.  If he wanted to introduce enough variation (without making up new genes, only rearranging) in the population to allow them to be able to reproduce naturally without inbreeding problems, would he be able to? In particular, could he make a woman?  Alternately, could a woman (without a Y chromosome) do the the inverse?  At the risk of introducing bias into the answers, the plot as it stands assumes he is a male and he CAN'T do any of the above and he is restricted to clones. Master database is corrupt, instance won't start - what are my options? Help! My master database is corrupt, I can't even bring the SQL instance online! What are my options to get my server back up?   I do have a backup of master, but the  asks me to start the instance in single-user mode, which I can't do!  (Note: I'm leaving this question unspecified as to SQL version, so as to be a more widely-applicable reference. There are some similar questions on DBA.SE, but none that involve the server unable to start.) Assuming I have no infinite scroll or anything else going on in my theme: Is there a way to enqueue my custom Gutenberg block styles and scripts so they are only (lazy) loaded in the front-end when the block is really used? Something like is_active_widget, just for blocks?  If I enqueue them inside a enqueue_block_assets function they're added to any site.  On github, I found this  , but it sounds like it's more on bundling than conditional load, so I still hope they didn't leave that optimization opportunity out - otherwise any other site will soon be junked with 20 additional scripts from numerous Gutenberg block plugins people install and only use once on a page (think of large image gallery block scripts for example).  Thanks &amp; Regards! How to remove Ubuntu from dual boot system with Windows? I wish to remove Ubuntu and I'm not quite sure how. I know it has something to do with partitions. I have 3 partitions. 1. OS [683 GB]  2. Recovery [14 GB] 3. Ubuntu 12.04 LTS (E:)  I know it says Ubuntu but when I installed Ubuntu I think I put 14 gigabytes for it so I think its the recovery one but I'm not sure. I could have sworn I put more than 700 megabytes for it.  I have googled this and I can't seem to find an answer. Any help would be nice. How to remove local (untracked) files from the current Git working tree What is the best way to dump entire objects to a log in C#? So for viewing a current object's state at runtime, I really like what the Visual Studio Immediate window gives me.  Just doing a simple  ? objectname   Will give me a nicely formatted 'dump' of the object.    Is there an easy way to do this in code, so I can do something similar when logging? Why do you need explicitly have the "self" argument in a Python method? I am looking for information on Heinrich Märte (my grandfather) and his family. He was born on July 1, 1912 in Sipplingen and died On April 19, 1944 when the military plane crashed in Geierswalde because its engine failed.  I am not sure if his family knows that he fathered my dad. I am hoping someone knows of him or his family. I would love to know how he met my grandmother or any further information on him.   We have always had two photo's of him, but never knew his name. We have only just found out about him and it has opened so many more questions.  How can I determine Heinrich's parents and siblings, and then locate any living family members?