HSL ~2022.2 %hw1
Homework #1 for Hoon School Live.

Homework exercises have two purposes for us: to help validate that you have learned the material that corresponds to a particular lesson, and to stretch you in grasping and applying the relevant concepts.

In particular, you learned about the following runes:

- `%-` cenhep, for applying a function
- `^-` kethep, for enforcing or converting the type of a value
- `:-` colhep, for making a cell (pair of nouns)
- `=/` tisfas, for assigning a name to a value
- `?:` wutcol, for making a decision
adambrettmalin@gmail.com Switch account
Email *
What is your planet or comet? (Type "our" in the Dojo of your ship to identify if you're not sure—your ship, not your fakeship.) *
Atoms
Atoms are bare values, but they have a type or aura which lets you distinguish, say, a 1 in binary 0b1 from a 1 in hexadecimal 0x1.
Find your planet's number by converting your ship’s name to a `@ud` aura. *
Find your planet's hexadecimal number by converting your ship’s name to a `@ux` aura. *
What are the types (auras) of each of the following atoms? *
@ud
@ub
@ux
@t
@da
@rs
@p
1.000
0x7fa.45e2
.2.718281828
0b11.1001
~1992.1.12..15.05.00
'hello Mars'
~sampel-palnet
Cells
Read about the `:` col family of runes in the docs:

https://urbit.org/docs/hoon/reference/rune/col

These build cells of various sizes (e.g. [1 [2 3]], etc.).
Create a duple, or 2-tuple, of 1 and 2, using a single col rune. *
Create a triple, or 3-tuple, of 'a', 'b', and 'c', using a single col rune. *
Create a quadruple, or 4-tuple, of ~zod, ~nec, ~bud, and ~wes, using a single col rune. *
Pinning Values
The =/ tisfas rune is helpful for preserving (“pinning”) values with names for use in subsequent expressions. For each of these, you should respond with the Hoon expression, not the resulting value.
In one expression, pin a value `three` and calculate 3×3 using the ++mul function (gate). *
In one expression, pin two values `ten` and `hundred` and calculate 10¹⁰⁰ using the ++pow function (gate). *
Making Decisions
We can cause a computation to choose between two alternatives using the `?:` wutcol rune.
Implement the piecewise boxcar function. Since we can't store expressions for future use yet, use 4 for the example input value (but pin it to a face `x`). (:= is not a rune, it's the mathematical symbols for "defined as". You can read it as an equals sign.) *
Captionless Image
Implement the piecewise triangle function. Since we can't store expressions for future use yet, use 2 for the example input value (but pin it to a face `x`). *
Captionless Image
Hoon Pronunciation
What are the pronounced names of each of the following runes?
%= *
$: *
:* *
~& *
|- *
What are your biggest remaining concerns, points of misunderstanding or fuzzy understanding, or other feedback on Lesson 1?
A copy of your responses will be emailed to the address you provided.
Submit
Clear form
Never submit passwords through Google Forms.
reCAPTCHA
This form was created inside of Tlon Corporation. Report Abuse