2 ms·
So, 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 cycle
by ajkjk 11y ago
So, 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
- stcredzero 11y agoAbstractly, a noun as defined is a tree and trees don't have cycles. So there! :-) You shouldn't require the reader to make this inference. The 2nd order implications are far less obvious to the reader than to the writer. A good writer should never assume the reader will get it on the 1st mention. In fact, I'd hazard a guess that most of the time, when you've made such inferences while reading, that an author has subtly primed you to do so beforehand.