1.1 Introduction

1.1.1 Welcome!

Welcome to the Beginning Hoon course of Hooniversity, an onboarding to the Hoon programming language of Urbit. We intend to introduce new concepts gradually and linearly, in order to ease the learner into the many varied and nuanced concepts that make up Hoon.

Because Hoon is a computing language which was conceived to accommodate the unique data structure of Urbit (Nock), it contains concepts and structure which are totally novel and can be disorienting at first. We hope the structure presented will help you get through that disorientation to a level of understanding and competency.

This course is geared toward two types of non-career coders: 1) the individual who has very little programming experience, but has a basic or intermediate level of comfort with Microsoft Excel, which uses many basic elements of functional programming, or 2) someone with a moderate amount of coding experience in other languages, but perhaps because of a demanding life schedule, needs to bite off Hoon learning in smaller pieces as they work their way towards becoming a competent Hooner.

1.1.2 So what are we going to learn in this course, Beginning Hoon?

It is easiest to capture what you’ll learn in Beginning Hoon by describing the starting point and ending point. For the non-coders amongst you, this is where we are expecting you to start with interest and commitment:

You are expected to start with no understanding of how programming works, with no familiarity with programming languages (outside of maybe basic excel formulas). You are serious about learning and willing to put in 30 minutes to an hour, over and over again, as you progress toward learning the basics of this language.

For the individuals who are not new to coding, you are welcome to skip the sections more relevant to noobies, though we still expect you to go through the lessons and exercises.

Here is an overview of what we are going to do together, and how it will look from your end:

  • You will progress through learning the basic concepts of programming and the ‘thought process’ that programmers use to get their brains around programming a computer.
  • You will learn many of the essential building blocks of hoon, “runes,” which are somewhat like commands in other computer languages, or functions in Microsoft Excel.
  • You will begin to create basic programs, and add to your toolkit Hoon’s built-in operations (called the Standard Library, which are ‘subroutines’ with specific rules on how they can be used), and “methods” you can use to combine your basic programs and elements of the standard library into more complex programs with multiple operational steps.
  • You will learn tactics for reading hoon code and how to best isolate parts of hoon code that you do not understand, separating them from that which you do understand, better preparing you for advanced courses.
  • You will end, having created a complex text-manipulation program. A “Text String”is a relatively complex type of data. Working with Strings will prepare us to understand other more complex types of data later. Additionally, Strings are easily legible to humans, which makes them pleasing to work with.
    • It will allow you to make sarcastic “SpOnGeBoB tExT” from “Spongebob Text” (alternating lower and upper case letters has come to denote “sarcasm” in memes)
    • It will allow you to do a simple number substitution code “ABC” => “123” and to decode same
    • It will allow you to do a simple reverse substitution code “ABC” => “ZYX” and to decode same

Seasoned programmers might consider independently doing the Hoon Tutorials start to finish.