Runes Flashcards

1
Q

.+

A

Increment an atom.

e.g. .+(1) produces 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

.=

A

Test for equality. If equal, produces %.y; otherwise %.n.

e.g. .=(1 1) produces %.y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

.?

A

Test for cell or atom. Produces %.y if p is a cell; otherwise %.n.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

?>

A

Positive assertion. If p = q then return %.y; otherwise force crash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

?:

A

Branch on a boolean test. If p produces yes, %.y, then q. If p produces no, %.n, then r.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

?.

A

Branch on a boolean test, inverted. For when yes-case is much taller / wider than the no-case; aesthetic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

?[gal]

A

Negative assertion. If %.y, force crash.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

?&

A

Boolean AND.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

?=

A

Test type. Returns %.y or %.n.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

?!

A

Boolean NOT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

|=

A

Create a gate (aka a function)

e.g. |= end=@

Creates function, specifying it takes one argument, which we named “end”, and “@” specifies the input is an atom.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

=/

A

Store a value with a name and a specified type

e.g. =/ count=@ 1

count=@ (the first child) stores 1 (the second child) as count and specifies that it has the @ type

This is as close as you’ll get to a variable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

|-

A

Produce a trap (a core with one arm $) and evaluate it. Can be thought of as a ‘recursion point’ or a ‘loop starting point’.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

^-

A

Use in a gate to constrain output to a certain type

e.g. ^- (list @)

Specifies that our gate’s output must be (list @) — that is, a list of atoms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

:-

A

Create a cell.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

+|

A

Provides a label for the arms that follow.

The arms of a core can be divided into chapters for ‘organization’. Chapter labels aren’t part of the underlying noun of the core; they’re stored as type system metadata only.

e.g. +| %math

17
Q

++

A

Produce a normal arm.

e.g.
\++  add
  ~/  %add
  ::  unsigned addition
  ::
  ::  a: augend
  ::  b: addend
  |=  [a=@ b=@]
  ::  sum
  ^-  @
  ?:  =(0 a)  b
  $(a (dec a), b +(b))
18
Q

|%

A

Produces a core.

19
Q

A

Indicate there are no more arms to be defined.

20
Q

=.

A

Changes the leg of the subject to something else.

21
Q

=

A

Compose two expressions, inverted for aesthetic reasons.

22
Q

=>

A

Compose two expressions.

23
Q

=~

A

Compose multiple expressions.

24
Q

/-

A

Import library from sur

25
Q

/+

A

Import library from lib

26
Q

=,

A

Expose a namespace.