1. 4

    I haven’t taken more than a brief glance at the source code, so if anyone is more familiar with this project, does it use cubic chunks (instead of “pillars” like Minecraft)? I’ve been interested in exploring procedural generation in voxel worlds like these and the issue with non-cubic chunks is that blocks that are far above or below the camera (completely out of sight) must be stored in memory, making worlds of extreme height really difficult to generate.

    It also appears that worlds are pre-generated, meaning that they are of a fixed size, yes? I wonder how hard it would be to convert this to generating each chunk as it is loaded.

      1. 1

        Oh. Yes, it does. Thank you!

    1. 12

      This appeals to me. However:

      But how can I then keep the style and layout of all my posts and pages in sync? Simple: don’t! It’s more fun that way. Look at this website: if you read any previous blog post, you’ll notice that they have a different stylesheet. This is because they were written at different times. As such, they’re like time capsules.

      While that’s kind of cool in its own way, I don’t prefer it. Especially when it comes to a site menu.

      My first web sites were hand-coded HTML. My motivation to learn PHP was that I wanted a consistent menu across all pages, and copy-paste was not maintainable, so I landed on PHP’s include. From there it was down the rabbit hole to becoming a web developer.

      I use a static site generator now for nathanmlong.com, which I mostly write in Markdown. It wouldn’t kill me to write HTML, but I don’t want to copy and paste a menu everywhere.

      1. 8

        Case in point about the downsides, the cv link is correct on the author’s homepage. It is not correct on this page. That’s an easy mistake to make, and I’ve definitely made versions of it. However, it’s much more pleasant to fix when you can fix it everywhere by updating a template.

        1. 3

          Thanks for the heads up :-)

          Edit: Solved by sed -i 's,href="cv",href="../cv",' */*.html. In my mind, simpler than a CMS or static site generator.

          1. 3

            “Simpler”, sure, maybe. At least for now. But maybe it won’t always be such a trivial sed command. Maybe you wrote the html slightly different in certain spots.

            A simple or custom-built static site generator would avoid mistakes like this altogether. You could have one file for your head element. Nicer menus, sidebar, etc. And you could still write most or all of it in pure html if you wanted to.

            Simpler doesn’t necessarily mean better.

            1. 1

              If you need the same template for all of your pages, then yes – a templating engine is a good idea.

              But if you don’t need this, then a templating system makes the process unnecessarily complicated. Creating a template in a special language and fitting all pages to the same mold takes much more effort than most realize, especially in comparison with just writing single HTML pages.

              For example, look at my software page. I have some fancy HTML and CSS to render sidenotes in the margin (unless you use a small screen). Because the page is “self-contained”, I don’t have to worry if I ever edit the style sheet for other posts. But if I used a templating engine, I would have to worry about it.

        2. 5

          Everything old is new again (or something like that)… you can always use server side includes for common elements.

          1. 2

            I like keeping my content and the final HTML site separate, and using the content to generate the site. It makes my content more flexible, but also makes generating the global menus easy, which is important to me so that my readers get a good experience.

            1. 2

              I haven’t actually used it but the caddy web server appears to have built-in templating features: https://caddyserver.com/docs/template-actions

              1. 1

                Dreamweaver supported keeping sites’ themes consistent when I tried it long ago. It was templates or something. Maybe one of the open editors can do that, too. Otherwise, it would be a good feature for them to add.

                1. 1

                  I hear you. I think the obvious solution then is to use something like PHP or SSI. Of course, that’s another layer of complexity, but not as much as a static site generator or CSS.

                1. 6

                  I think this article is pretty deceiving. You would never tune piano like this. At the bottom, it states:

                  This tuning is called twelve-tone equal temperament. It’s “the most common tuning system since the 18th century”

                  However, pianos are not tuned using twelve-tone equal temperament. They’re stretch tuned. Some electric pianos are also stretch tuned, and any piano sample plugin will also be stretched tuned. And indeed, the Wikipedia article Piano Key Frequencies that’s linked at the bottom says:

                  This list of frequencies is for a theoretically ideal piano. On an actual piano the ratio between semitones is slightly larger, especially at the high and low ends, where string stiffness causes inharmonicity, i.e., the tendency for the harmonic makeup of each note to run sharp. To compensate for this, octaves are tuned slightly wide, stretched according to the inharmonic characteristics of each instrument. This deviation from equal temperament is called the Railsback curve.

                  (I also take issue with the phrasing “theoretically ideal piano”. An “ideal” piano that’s used for actual music will be stretch tuned.)

                  Further reading: http://piano.detwiler.us/

                  edit: some comments on Hacker News also discuss this: https://news.ycombinator.com/item?id=19305258

                  1. 10

                    I really loved the spirit of this article, particularly this bit from the conclusion:

                    No matter how much data you have you still have to ask the right questions. It’s painfully easy to have good intentions but ask the wrong question and find the wrong answer.

                    And I especially loved the example given in the bonus section. I don’t think I would’ve ever thought that geography (or rather, download speed) was the cause of the increase in average page load time. While it’s such a simple answer, thinking about how to arrive there (or: find the right question) just feels so far out there to me. It reminds me of the Ultimate Answer/Question from The Hitchhiker’s Guide to the Galaxy. Deep Thought is able to arrive at the Answer (“42”), yet a much more powerful computer must be designed and run for even longer in order to find the Ultimate Question.