4 ms·
Stepping away from the Algol keyword tradition is obviously a risk. At the same time, after using a keyword-free syntax for a while, reserved words feel really
by urbit 12y ago
Stepping away from the Algol keyword tradition is obviously a risk. At the same time, after using a keyword-free syntax for a while, reserved words feel really weird.
Someone just emailed and pointed out that he couldn't check out Urbit on Windows, because it has a file con.c. Oh, right, reserved filenames. How are reserved words different? The difference is - you're used to them.
Also, perceived usability (while it matters for marketing) is not the same thing as actual usability. Actual usability is something you only find out when you try to actually use something. We have a good bit of experience inflicting the syntax on coders of various abilities and backgrounds, and we're pretty satisfied with the result.
It helps that the syntax is quite a bit more regular than it appears at first glance. It's much more regular than Perl, and it also comes with a vocalization model that makes it easy to say out loud.
For instance, "=+", which more or less declares a variable, is "tislus." A lot of things like "=+" also start with "=", ie, "tis." You wind up learning about a hundred of these digraphs or "runes," which is a lot less than, say, Chinese.
Speaking of Perl, have you heard - Larry Wall is a Christian? I don't think this makes Perl a Christian programming language, though.One of the joys of our engineering inheritance from the 20th century, which was really humanity's golden age of political insanity, is that we get to stand on the shoulders of loons. We fly Christian astronauts into space on Nazi rockets programmed by Communist physicists. And it works...
- Locke1689 12y agoIs the given text your attempt at eliminating reserved keywords by using nonsense as keywords? Other languages have simply decided to use contextual keywords, which preserves familiarity and flexibility.
- urbit 12y agoGood lord, no! Hoon has no reserved words at all. The nonsense words are all names. This is entirely a style choice. The actual name syntax is roughly Lisp's - for instance, (my-long-function arg1 arg2) does the same thing (roughly) in Hoon as in Lisp. In the "lapidary" Hoon in which most of the kernel is written, facets (variable names, roughly) are meaningless TLV strings, usually CVC (consonant-variable-consonant). The user experience is much the same as with Greek letters in math: you remember the binding between symbol and semantics if you know the code you're looking at. If you are learning the code, your first task is to learn that binding. Once you know the code, there is no quasi-semantic intermediary - a meaningful name - between the symbol and the concept. I think our small sum of experience with this daring idea is that sometimes, it works better than other times. Basically, TLV naming is appropriate for code that is simple, but not trivial. (Trivial code, like "++add", is "ultralapidary" and gets OLV names - like "a" and "b".) Ideally all of the Arvo kernel and Hoon self-compiler would meet the TLV standard of quality. All of it is written this way, though. In general, if you should be writing lapidary code, you know it, and if you don't know you shouldn't. (And should use more or less normal names as in any Lisp.)
- likeclockwork 12y agoPlease define "TLV", "OLV", and "lapidary".
- urbit 12y agoThree-letter variable, one-letter variable, http://www.merriam-webster.com/dictionary/lapidary http://www.merriam-webster.com/dictionary/lapidary.
- tromp 12y agoThree/One Letter Variables. Lapidary: (of language) engraved on or suitable for engraving on stone and therefore elegant and concise.
- Locke1689 12y agoIn the "lapidary" Hoon in which most of the kernel is written, facets (variable names, roughly) are meaningless TLV strings, usually CVC (consonant-variable-consonant). The user experience is much the same as with Greek letters in math: you remember the binding between symbol and semantics if you know the code you're looking at. If you are learning the code, your first task is to learn that binding. Once you know the code, there is no quasi-semantic intermediary - a meaningful name - between the symbol and the concept. Have you been reading a lot of Heidegger or was this an independent decision?
- urbit 12y agoThe latter. :-)
- melloclello 12y agoDo you have any examples of what "non-lapidary" Hoon might look like?
- zerker2000 12y agoI'm not sure much strictly non-lapidary hoon exists, but for samples marginally less lapidary than the kernel, I would like to point you to a simple algorithm translation at https://gist.github.com/MichaelBlume/17a227cc839f52f68c97 https://gist.github.com/MichaelBlume/17a227cc839f52f68c97, and the twitter library /main/lib/twitter/core.hook in the standard distribution.
- likeclockwork 12y agohttps://github.com/urbit/urbit/blob/master/urb/zod/arvo/eyre.hoon#L136 https://github.com/urbit/urbit/blob/master/urb/zod/arvo/eyre... What is pimp? What is pest seam marl? What do any of these names mean? What does any of this do? Forget not knowing the syntax, the names look like gibberish.
- urbit 12y agoI think the classic analogy is "grep." But they are commented, at least: ++ pimp :: traced request $: ful=? :: | === HEAD fur=(unit mark) :: type goal hen=duct :: event trace som=seam :: logical request pez=pest :: request state sip=marl :: injected scripts == :: I think this is not at all an unusual data structure for one to find in an HTTP server, no? Now, this style (four-letter lapidary arm names, usually not nonsense strings but nonsense words) works in some places but not others. Frankly, %eyre is not exactly a triumph of the lapidary style...
- likeclockwork 12y agoThis Hoon code is very pretty but the English content of the names is extremely low. I mean.. reading a programming language I don't know, okay.. I don't expect to be able to understand much. But syntax and semantics aside the names are a language of their own with no attempt at referencing anything that might even be a little bit similar. It's as though every time you needed to name a concept you came up with a unique word for it. This reads like poetry in a language I will probably never understand. The docs are written in English but I don't see a lot of signal in here and no real explanation of this vocabulary you've created. I am having a hard time believing any of this. I would need to see an example of non-code communicative writing in this language. An email or chat excerpt, something with someone saying "call pimp with the seam to get the marl" or however you would phrase whatever it is. Do you verb these nouns? DO you use English prepositions and adjectives when discussing them? I mean this is not just reading a programming language I don't know, it's reading a programming language with all the names in a foreign language. So even if I could understand broadly what's going on here.. I cannot. Searching around the repo to try to find out wth `marl` is I found this: The fundamental hoon structure used to generate XML is a manx. A manx is composed of a marx and a marl, representing an XML node Yeah.. this is like esolang-level opaque. I'm afraid to even run this on my computer.
- jrochkind1 12y ago> it also comes with a vocalization model that makes it easy to say out loud. > For instance, "=+", which more or less declares a variable, is "tislus." A lot of things like "=+" also start with "=", ie, "tis." You wind up learning about a hundred of these digraphs or "runes," which is a lot less than, say, Chinese. Uh... you realize this isn't helping to convince anyone? The project may well be brilliant rather than ridiculous, but if so I suspect you're gonna have to come up with a better pitch to get people interested enough to invest the time to see it. Your made up language where every punctuation mark is a phoneme or something... it's not helping. And I should hope any programming language would indeed be easier to learn than Chinese (or just about any natural language).
- urbit 12y agoDon't worry - the test of a system is what it can do. If we were ready to show you what it can do, we'd have released it intentionally instead of unintentionally. It's very difficult for a language, good or bad, to compete on its own merits or even demerits. C is a better language than Pascal, but people didn't start programming in C because of that - they started programming in C because the native language of Unix was C, and they wanted to program in Unix. Why did they want to program in Unix? Because, relative to its competitors in the minicomputer OS market, Unix was a better way to solve their problems. This is the normal way that new languages achieve adoption - they ride on the back of a new platform, which rides on the back of new solutions to (typically) new problems. Today you see a lot of apps like Buffer and Slack, which are very successful in terms of userbase and even revenue. From a certain perspective, the value these apps are adding is very minimal - Buffer is... what, cron? And yet, there is a considerable distance between an AWS box in the cloud and a Buffer instance. A lot of value actually is being added. Most of the code in a product of this type is actually the (usually somewhat) general framework that sits between the Linux ABI and the application logic/UI. Essentially there's a type of Greenspun's Law in play. If you build a layer like this, but as a true operating environment rather than an internal framework, the result is a VM in which the distance from a virgin instance to many of these kinds of apps is much smaller. In a familiar Valley pattern, they then become commoditized and have more trouble extracting rents. If it's possible to provide this kind of value, which we certainly haven't yet demonstrated, I can assure you quite confidently that a flashcard or two is not an obstacle. I'm in my 40s, so I know how hard it is for a middle-aged dog to learn new tricks. But it's not that hard.