6 ms·
Happy to take PRs if you feel you can write it better. One of these paragraphs has to come before the other. "Mathy" probably should have a link to https://en
by urbit 11y ago
Happy to take PRs if you feel you can write it better. One of these paragraphs has to come before the other.
"Mathy" probably should have a link to https://en.wikipedia.org/wiki/Type_theory https://en.wikipedia.org/wiki/Type_theory. My experience is that if you say "type" in the context of functional programming, people expect Bertrand Russell and have a right to expect Bertrand Russell. We're not delivering Bertrand Russell, so it would seem like false advertising.
A mold is a function whose range is some useful span. A mold is always idempotent (for any noun x, f(x) equals f(f(x))), and its domain is any noun.
I stared at this for a moment but was unable to make it any clearer. Suppose your span is the set of all cells. A mold for this span is a function that maps any cell to itself, and any atom to a trivial cell like [0 0]. Does that help?
- morsch 11y agoThe definition of a mold is clear (to anyone who has had higher education in mathematics, which seems a prerequisite for this introduction). What I don't have is any intuition about what a mold is. The example helps a little. The tutorial seems to have another example of a mold in the final section, but I'm only guessing so because of that section's title. I'll be damned if I can tell where the mold is in that section and I cannot relate it at all to the example in your comment.
- urbit 11y agoFrom OP, in the section "Our first mold": After seeing a few span examples, are we ready to describe the set of all spans with a Hoon mold? Well, no, but let's try it anyway. Ignore the syntax (which we'll explain later; this is a tutorial, not a reference manual), and you'll get the idea: ++ span $% [%atom p=@tas] [%cell p=span q=span] [%cube p=* q=span] == This mold is not the entire definition of a Hoon span, just the cases we've seen so far. In English, a valid span is either: - a cell with head `%atom`, and tail some symbol. - a cell with head `%cell`, and tail some pair of spans. - a cell with head `%cube`, and tail a noun-span pair. I do think this is clear enough. I'm not sure it's intuitive enough. The following chapters should help with that; sorry.
- evanpw 11y agoBut is this a representation of a mold or span? It seems to describe a set rather than define a function, so the latter seems more likely, but the section header implies otherwise.
- urbit 11y agoThat's pretty much what a mold is. The syntax is written to look as much as possible like the description of a set, but the semantics are that you're actually defining a function.
- evanpw 11y ago> A mold is a function whose range is some useful span. A mold is always idempotent (for any noun x, f(x) equals f(f(x))), and its domain is any noun. I think using the magic word "projection" would make this clearer. Basically, a span is a set of nouns concretely defined by a projection operator ("mold") on the set of all nouns, right?
- urbit 11y agoMy own math background is limited enough that this magic word doesn't naturally occur to me, though I do know what it means. That's usually a red flag for me; I want to keep the level of modern math required really, really low. In fact, when I use math-ese in the doc, the goal is to avoid confusing people who do actually know math. As this discussion illustrates, that's quite a bit harder than one might expect.
- e12e 11y agoWait, you want to use concept that occurs in modern math, but to keep things simple, you invent new names for these concepts? I see nothing wrong with crossing symbolic landscapes that have been trodden before, finding new (or rediscovering old) uses, techniques etc. But I think researching existing taxonomy/nomeclature can be very useful. Eg: ref other comments here: a tree is a graph that doesn't have cycles. If you say something is a tree, then that is pretty clear. Sure you can go on to define what a tree is, for those that have no background in basic graph theory -- but stacking somewhat redundant, special-purpose terms strikes me as being mostly confusing. (Again, wrt. the symbols vs terms/concise vs verbose I'm not entirely sure I think that whole concept is a wise direction, but I'll happily defer judgement on that a decade or so) [ed: After reading the actual article, not just the comments :-) -- it's not as bad as the comments indicate, by any means. I think the clarification on trees/cells really helped. That said, I think it would benefit from a couple of complete rewrites. It still feels like a rough draft (which is ok. Sharing is caring, share early for feedback, posting now is better than editing forever in secret etc). For me the strongest points are probably the direct contrasts with lisp, the part about trees etc. Basically, trust in the ideas: they are not revolutionary, they are small changes on old ideas. That's fine. The sum of the system can still be revolutionary. But I think the "soft sell" would end up in a much stronger message here. And more people would grasp at least some parts of what you're trying to say/do ;-) ]
- eru 11y agoWhy don't you call it a projection?
- tel 11y agoIf you're willing to introduce the term "projection" then I think it's illustrative and has a good connection to other metaphorically identical connected projection concepts. "A mold is a projection function ranging over a span. As a projection function it converts any noun to the 'nearest' point in the span and is idempotent." (Edit: just realized that everyone under the sun whose had a dose of algebra is suggesting this term. I mean to go further when descrbing it as "taking nouns to the nearest thing in the span". A mathematician or sufficiently picky reader will ask what "nearest" means—and this may be exactly the right question—but the intuitive image may be more clear.)