1. 13

I wanted to share this article to get some feedback on a side-by-side text format which I’m working on at the moment. However, I think the article stands on its own merits. Thank you!

  1.  

  2. 2

    Some feedback on the site design: it’s flashy but not that functional. Often when scrolling, I end up between two slides, and scrolling up vs. scrolling down pulls the bottom slide down while pinning the top slide to the top of the screen.

    This is pretty disorienting when scanning back and forth. I’d rather this just be a static page. Neat crate though.

    1. 2

      Some feedback on the site design: all I see is a blank white page. ;-)

      1. 1

        Browser, version, etc?

        Maybe it’s for the best that you can’t see it judging by imode haha

        1. 1

          “Chrome on Android, stable”, but don’t worry; it’s a comment on the site requiring JavaScript, not a real bug report.

      2. 1

        I see! I’ll work on readability/scanning.

        Thank you

      3. 1

        I didn’t even notice the special layout because on my iPad in portrait mode the page uses a single column as usual. Thanks for using a responsive layout! When I turned the iPad sideways I saw the columns.

        In some trees there will be some nodes which naturally have multiple parents … We can solve this using a transposition table: define a hash function for each node, and use it to check if a node has already been added to the tree. If it has, we can redirect to the first instance of the node.

        That rang a bell for me: I did something like this in a query-language parser I wrote a few years ago. I did common subexpression elimination (CSE) by detecting identical subtrees and merging them, so the code for that tree is only run once and its result reused.

        This might not be the same as what you did, because I didn’t hash on just the node itself, but rather the subtree it roots. (In practice it’s not that different because I made a node’s hash be a combination of its own data and its children’s hashes.)

        1. 1

          It’s exactly the same save for the difference between hashing on sub-trees and the parent node. The nice thing about procedurally generated trees like this is that they’re deterministic - two identical parents will always produce the same children, so we can merge them without looking at their sub-trees.

          Unfortunately, you’ve now made me think of stochastic children functions which may break with hashing. Good thing I just used the Hashable trait so it should never be an issue when it matters most.

        2. 1

          @lew

          Searching through a hash table for a node is O(n)

          Are you sure?

          1. 1

            I’m now sure I’m wrong. Will update in the morning - thank you for pointing it out!

          2. 1

            Feedback: The window is always a few percent too narrow and creates a bottom scroll bar, no matter what size I make it. (Firefox on Windows.)

            Also IMO the gradual fade-in of content adds nothing and breaks reader mode, but I’m a luddite.

            1. 1

              Damn, I’ve had the content bleed slightly to the right before.

              I’ll try and reduce the effect and try and make it work with reader mode.

              Side note: did you used to be active on rizon #rice?

              1. 1

                did you used to be active on rizon #rice?

                Nope, sorry. I used to be present on rizon, long ago, but not in #rice.

            2. 1

              I found the title intriguing, but I’m not sure I’m any wiser. Sure, the post is about large trees, but where does the counting bit come in?

              1. 2

                Ok, maybe the title is a bit of a misnomer. It should probably be: Trees to Large to Load and Manipulate in Their Entirety. “Trees Too Large to Load” is maybe better?

                1. 1

                  Yes, much better. Thanks for confirming that it wasn’t my reading comprehension that is at fault! :-)

                  (Apologies if my previous comment came across as a grumpy-gram.)