7 ms·
>But I get the feeling they are trying to be intentionally obtuse, either to show off cleverness or as performance art Same here. I really don't see the point
by gclaramunt 11y ago
>But I get the feeling they are trying to be intentionally obtuse, either to show off cleverness or as performance art
Same here. I really don't see the point of renaming well known and defined concepts
- pcmonk 11y agoWe're not trying to be intentionally obtuse. In general, we try to only create new names when the old names are for a sufficiently different concept. Perhaps we go slightly too far in doing this, but much of the "the terms are alien" feeling comes from the concepts beings actually different than you're used to. This is the start of a bottom-up style tutorial, but if you're interested in a top-down tutorial, may I suggest this one from one of our open-source contributors: http://hidduc-posmeg.urbit.org/home/pub/hoon-intro/ http://hidduc-posmeg.urbit.org/home/pub/hoon-intro/
- Avshalom 11y agoWell I mean of course you have to say that, kinda ruins the joke if you keep elbowing people and going "pretty clever of us eh?"
- cwyers 11y ago> In general, we try to only create new names when the old names are for a sufficiently different concept. You renamed the godforsaken PUNCTUATION, man. What exactly is the different concept behind an equals sign in Urbit that you have to call it tis? Or the colon, what conceptually did you change about the colon that it's got to be a col or the comma that it's a com?
- pcmonk 11y agoThis is true and is an exception. Even though punctuation is punctutation, we speak it so much more than most other people, so we've found it convenient to give it convenient, one-syllable names. Using the new names is, of course, completely optional. End-users will never even see them.
- urbit 11y agoHow many times a day do you want to say "percent equals" or "tilde ampersand," rather than "centis" or "sigpam"? Worse, you may not spend a lot of time reading code out loud, but when you read your brain still thinks the sounds. Of course, you're free to prefer keywords to digraphs. But sometimes I worry that there's a reason the 787 looks just like the 707 [1], and it's not at all about airplanes... [1] http://idlewords.com/talks/web_design_first_100_years.htm http://idlewords.com/talks/web_design_first_100_years.htm
- JoshTriplett 11y ago> How many times a day do you want to say "percent equals" or "tilde ampersand," Zero if I can help it. Even if I'm talking about code aloud, I normally do so semantically, saying what the code is doing, because people are more than capable of reading the code itself. (Same premise as commenting code.) If I'm actually reading the exact symbols aloud, a rare occurrence, then I'll say things like "mod equal" or "mod eq", "tilde and", etc. If I'm reading "#include <stdio.h>", I'll say "include standard I O", not "pound include space angle s t d i o dot h angle newline". > Worse, you may not spend a lot of time reading code out loud, but when you read your brain still thinks the sounds. No, it absolutely doesn't. Learning to avoid reading-aloud internally is one of the first things taught in speed-reading of prose, and the same concept applies to programming. > Of course, you're free to prefer keywords to digraphs. But sometimes I worry that there's a reason the 787 looks just like the 707 [1], and it's not at all about airplanes... That may be, but what you've done here is on par with APL saying "you need a completely non-standard keyboard and character set to program this language", but worse. If you want to introduce new names for symbols, that's a separate exercise from trying to make a new programming language; the latter is quite hard enough.
- urbit 11y agoBut worse? I assure you that we're not shipping Urbit with non-standard keyboards printed with "com" rather than ",". If these syllables rub you the wrong way, you're perfectly free to pronounce them any way you like. Most people aren't speed-readers. I am, but only because I learned at an early age. I don't know anyone who speed-reads code in the sense you mean.
- melloclello 11y agoI found this tutorial somewhat more cogent than most of the previous literature... I don't mean to be a dick but did Curtis write this one or someone else?
- mst 11y agoHaving watched the mental carnage caused by git's re-use of names that older VCSen used for different things afflict multiple people (myself included) I do rather see your point. On the other hand, I really, really think that a set of englishified versions would be helpful as a newbie tool - in the same way that I often encourage early stage perl hackers to 'use English;' until the shorter names wedge themselves into their brain. Would doing that be as simple as something like += if ?: and etc. and etc. ? I think I can appreciate that once you're used to the runic versions everything is fine but, well, when I talked about urbit having a vi-like cliff-ish learning curve curtis replied talking about putting up ropes, and this seems like a pretty reasonable rope.
- juped 11y agoWe definitely don't have Linus's streak of user-interface malice. (Git-related mental carnage has taken its toll on many urbit developers as well, alas.) What you suggest reminds me of Lisp's infamous "M-expressions", but worse, because the lack of reserved words in Hoon is the most immediate tangible benefit of our syntax. We're homoiconic, and syntax looks unambiguously like syntax (and is actually extremely regular). It's difficult to make the assertion that there really isn't much of a learning curve stick in a HN comment, unfortunately - it's based on experience learning the system myself, and helping others learn it on talk. It hasn't been anything syntax-related that trips up people actually learning the language, certainly - it's just something superficial that's easy to comment on on websites, as we've all seen around Lisp or Perl or even Python (whitespace-indented blocks). To answer you directly, runes are the tag in the tagged union that is the type of our AST, not any kind of identifier. (Perl would probably let you assign pieces of syntax to identifiers, of course...) For example, if you have the following Hoon: |= a=@ ?~ a ~| %decrement-underflow !! =| b=@ |- ^- @ ?: =(+(b) a) b $(b +(b)) the associated AST (a noun of type ++twig) is [ %brts p=[%bark p=%a q=[%axil p=[%atom p=~.]]] q [ %wtsz p=[%.y p=~ q=~[%a]] q [ %sgbr p [ %dtzz p=%tas q=2.663.495.029.034.430.894.880.199.458.246.708.989.383.632.228 ] q=[%zpzp ~] ] r [ %tsbr p=[%bark p=%b q=[%axil p=[%atom p=~.]]] q [ %brhp p [ %kthp p=[%axil p=[%atom p=~.]] q [ %wtcl p=[%dtts p=[%dtls p=[%cnzz p=~[%b]]] q=[%cnzz p=~[%a]]] q=[%cnzz p=~[%b]] r=[%cnts p=~[%$] q=~[[p=~[%b] q=[%dtls p=[%cnzz p=~[%b]]]]]] ] ] ] ] ] ] (To get this, I just ran ++ream, our compiler's frontend, on that code sample.) It would be as simple as dropping in an alternate parser there that looked for, e.g., 'if' rather than '?:', which isn't actually hard because our parser combinators are really easy to use. (The actual Hoon parser is very old and due for a cleanup, unfortunately, but conceptually is not very complicated.) I wouldn't endorse it myself, but perhaps in the future of the project someone will find it a useful thing to do and do it. It would definitely clash with the language's design sensibilities in a way that "use English" doesn't clash with Perl's - Hoon is somewhat more picky (though, what language isn't?). Edit: I completely forgot that I was going to include a hypothetical version of the above with keywords. Here: defgate a=@ nil? a error %decrement-underflow dim b=@ runtrap cast-to @ if inc(b) == a b replace b with inc(b) in this (The keywords are silly, but please imagine better ones.)
- chc4 11y agoI really like the idea of a binary tree memory model, especially an acyclic one. It appeals to the mind in the same way Lisp s-exprs do, and possibly even more: everything is either [head tail] or a number! How stupid! As far as I know, a lot of this stuff is fairly novel as well. Imagine you could simply mmap() bytes into your process from the network, verify that it nests inside your type definition (including recursive members!), and not have to worry about following evil pointers while still allowing arbitrary-sized members. This actually happens in urbit: all network messages to apps, including those sent from a web browser to your personal planet, are just ++jam nouns with something like an executable mime type plus autogenerated type verification function Of course, I'm pretty biased about Urbit, so your enthusiasm may vary.
- openasocket 11y agoIt sounds a lot like google protocol buffers, or one of the many java serialization frameworks. This "jam" thing may be better integrated into the urbit architecture, but without any portability/interop with other systems/languages.
- urbit 11y agoSee the comment above; it's nice not to need a separate framework. At least, for Urbit to Urbit networking. Of course there's nothing stopping you from encoding or decoding anyone else's protocols in Urbit. Or vice versa. Actually, using bit functions on bigints is a fairly pleasant way of handling binary protocols. There's also no particular problem in generating or decoding jammed nouns on non-Urbit systems. It's a binary encoding, but the decoder is a page of code. Perhaps jam:ASN.1 as JSON:SGML. :-)
- simcop2387 11y agoThat's just about how it works with Cap'n Proto, https://capnproto.org/ https://capnproto.org/ No idea about if you could do it with mmap from the network, that'd be an OS thing and I suspect not possible to do from a streaming protocol like TCP in most places.
- 11y ago
- urbit 11y agoFrom OP: One obstacle to learning Hoon is that it has two quite distinct concepts that might equally be called a "type." Worse, most other typed functional languages are mathy and share a basically mathematical concept of "type." Hoon does not have this concept at all. It'd be useful to hear what's unclear about this.
- Avshalom 11y agoKinda giving away the game there.
- morsch 11y agoAll of that is unclear: The two distinct concepts are only (very opaquely) introduced in the next paragraph. The reference to the mathy concept of type in other FP languages is vague (basically incomprehensible to me). Consequently the final sentence carries very little information; the reference ("this") is also ambiguous. I'd drop the quoted text and maybe the entire section ("A type system for nouns"), alternatively, move it down a few sections. I understood the examples for the most part. I still have no idea at all what a mold is.
- urbit 11y agoHappy 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 ago
- djfm 11y ago>Same here. I really don't see the point of renaming well known and defined concepts I kind of like this whole renaming things thing that a few projects have been playing with lately. I think of elixir/phoenix with all their "hex" "mix" ".ex" files and other disturbing things, Rust with "crates", "cargo"... Words carry too much weight, sometimes changing a few words can force you to make the effort to learn again and you may learn something new
- MichaelGG 11y agoWhat else would you call cargo? It's a tool that only works for Rust. So any name is gonna be pretty much just a name, unless you take the MS approach and call it "Rust Package Manager" (RPM... oh wait.) I do think it's fine to pick up new names when things vary significantly. In my own projects, I will often eschew names that are too generic if it'll help clarity. Like CustomerUpdateAgent. If the program mainly revolves around that, and there's even a slight bit of ambiguity over what that might mean, then give it a name that conveys "you need to know what this is, don't assume based on the name". So, perhaps in that case, "Freshmaker" is a good name for CustomerUpdateAgent.
- murbard2 11y agoTo quote the great Scott Alexander: "because Neoreactionaries react to comprehensibility the same way as vampires to sunlight." Joke aside, I do like what I'm reading so far about Hoon. I sense a mix of APL and LISP, but with more typing.