3 ms·
I'm finding this tutorial really hard to follow. It doesn't track my mental state very well; each successive sentence that qualifies an idea doesn't follow from
by ajkjk 11y ago
I'm finding this tutorial really hard to follow. It doesn't track my mental state very well; each successive sentence that qualifies an idea doesn't follow from the last one to me.
I'm struggling to describe this phenomenon exactly, but I want to try because I'm interested in quantifying it. So here's an attempt:
When I'm reading a tutorial to a new idea, a qualification needs to follow naturally. If you tell me "this is an A", and then follow it with "note: it's not a B", that qualification only works if I would have thought, in my head "oh, is it also a B?" after the first sentence. Otherwise, I'm left in a tough spot: I believe you that it's an A, but I don't trust that I know what an A is, because I'm apparently supposed to have realized that that suggested it could have been a B as well - because you just jumped in and pointed out that it wasn't!
So such a qualification is not just a clarification; it's also narrowing down the possible meanings of A. But I didn't know about all those meanings, because all I have is the word 'A' right now, and I don't understand the complexity of that yet.
Here's a specific example:
"A noun is an atom or a cell. An atom is any unsigned integer. A cell is an ordered pair of nouns.
The noun is an intentionally boring data model. Nouns don't have cycles (although a noun implementation should take advantage of acyclic graph structure)."
As of sentence #3, it looks like a noun can contain cycles. I mean, it can be a cell, and a cell can contain nouns, so that seems like a cycle. Then, in sentence #5, I'm told they don't have cycles. What? Now I don't know what to believe. I thought I understood nouns, but I don't anymore. Then, in the parens, even more concepts are thrown in. Now we're talking implementations - but I don't know what we're implementing. And we're taking advantage of acylic graph structures. Taking advantage? To do what? And the word 'although' shows up. They 'don't' have cycles, 'although' we should take advantage of their not having cycles? Either this is mis-worded or there's even more context I'm missing.
.. anyway, that got wordy. Point is, almost every sentence in this article confuses me further, instead of confusing me less. There are no 'ah-ha' moments. It's just "huh?" after "huh?".
- urbit 11y agoThanks for the detailed feedback! As of sentence #3, it looks like a noun can contain cycles. I mean, it can be a cell, and a cell can contain nouns, so that seems like a cycle. Then, in sentence #5, I'm told they don't have cycles. What? If we used the word "tree" and "leaf" here instead of "noun," would that help? "A tree is a leaf or a cell. A leaf is any unsigned integer. A cell is an ordered pair of trees." It doesn't strike me that anyone reading this definition, even not knowing what a "tree" and a "leaf" are, would assume that a tree can have cycles. And then, two sentences later, if we say that a tree doesn't have cycles, I'd hope that that would settle the matter. It's probably a mistake to bring implementation issues (like the fact that you can share a pointer rather than copying a subtree, thus creating a DAG [1]) into a discussion of this level, though. All kinds of people have different kinds of CS backgrounds... [1] https://en.wikipedia.org/wiki/Directed_acyclic_graph https://en.wikipedia.org/wiki/Directed_acyclic_graph
- urbit 11y agoAs soon as the nginx cache times out, the offending text will read: A noun is an atom or a cell. An atom is any unsigned integer. A cell is an ordered pair of nouns. Nouns are trees; they have no cycles. Noun comparison is always by value (the programmer can't test pointer equality). Nouns are strict; there is no such thing as an infinite noun. And nouns are immutable. There's just no way to have any real fun with nouns. I hope this is a little less confusing. Thanks again for your feedback!
- ajkjk 11y agoSo, on this noun/cell/thing.. As I'm reading it, noun := atom | cell atom := integer cell := (noun, noun) So when you say "nouns don't have cycles", my problem is that I don't know what you mean by "don't". Do you mean they're not able to have cycles? (am I unable to write A = (A, A)?) or do you mean that you prohibit it? (that you check validate nouns to avoid cycles?) or do you mean that model prohibits cycles? (it appears to allow for A = (A,A), so I don't see that). It helps to tell me it's a tree. It's okay to use the word 'noun' if that's the word for it, but telling me "nouns make a tree, where the leaves are called atoms and the non-leaves are called cells" - that's far more useful than describing properties of trees without using the word tree. When you mention the implementation details in "although a noun implementation should take advantage of acyclic graph structure", do you mean to say "therefore" instead of "although"? Because if nouns don't have cycles it makes sense that you can take advantage of that. The word "although", however, signals an exception, and the "although.." clause should say something that is somehow in opposition to the first part of the sentence. The nod to implementation details is probably unnecessary,but it would be harmless if not for that confusing word "although" that makes me think I've misunderstood something. .. though, I'm really sleep-deprived today, so perhaps I am struggling to understand things that I would otherwise be able to parse. I dunno.
- urbit 11y ago"Nouns don't have cycles" in two senses. Abstractly, a noun as defined is a tree and trees don't have cycles. So there! :-) Concretely, the Nock interpreter, which Hoon compiles itself to, has no way to construct a "noun with cycles," like your A == [A A]. I sense that this is what's really bugging you. :-) Of course, Nock is written in C and uses a C data structure. When we manipulate this data structure from C, we can certainly construct all the degenerate "nouns" we like. This generally results in a quick trip to the noun hospital. I'm genuinely surprised at how few acyclic programming languages exist. True, there are plenty of algorithms with faster asymptotic runtime given cyclic/mutable data structures. There are lots of ways to manage this problem, though. And both for persistence and network transmission, acyclic structures are just much easier to handle. You'll notice that all major network data models (XML, JSON) are acyclic, as are SQL and NoSQL databases alike. Cyclic databases exist [1] [2], but they're very much the exception. And of course, acyclic data models mean you don't need a tracing garbage collector. Are doubly linked lists, etc, really worth a tracing garbage collector? Anyway, in a language/OS where transmitting and persisting state are core features, acyclic data seems like a pretty easy choice. [1] https://en.wikipedia.org/wiki/Network_model https://en.wikipedia.org/wiki/Network_model [2] https://en.wikipedia.org/wiki/Object_database https://en.wikipedia.org/wiki/Object_database