# Rockstar Introduction

## Basic Concepts

### We have one way to make comments...

```				```
shout "This is Rockstar"

whisper "This is Rockstar"

(This is a Rockstar comment)
``````

## Variables

### This can be weird...but interesting...

```				```
The sun was hot

("The sun" is the variable, and "hot" is the value)

Shout the sun

( 3 )

Davey was a fine man

("Davey" is the variable, and "a fine man"

is the value)

Shout Davey

( 143 )

``````

## User input

### To get user input...we need to listen to it...

```				```
Whisper "What's your name?"

Listen to your heart

Shout your heart
``````

### Arrays are easy...although not exactly what we would expect

```				```
Let the clock at 0 be 1

Let the clock at 1 be 2

Let the clock at 2 be 3

Shout the clock at 1

( 2 )
``````

## Looping

### We have only one way to loop

```				```
Let the clock at 0 be 1

Let the clock at 1 be 2

Let the clock at 2 be 3

The time was 0

While the time is weaker than 3 (weaker = less than)

Shout the clock at the time

Build the time up (add 1 to the time)

(space to end the while)

( 1 )

( 2 )

( 3 )
``````

## Functions

### Functions always return a value...

```				```
Sum takes first and second

Put first with second into third (Could be "plus")

give back third

Shout Sum taking 5, 4

( 9 )
``````

## The "Stack"

### FIFO (First In, First Out)

```				```
Rock the casbah with 1

Rock the casbah with 2

Rock the casbah with 3

Shout Roll the casbah

( 1 )

Shout Roll the casbah

( 2 )
``````

## Fibonacci List

### Name your file "fibonacci.rock"

```				```
Fibo takes the stone and water and dirt

If water is nothing

Put water plus dirt into mud

Rock the mountain with water, dirt, mud

Knock the stone down

Give back fibo taking the stone mud dirt

(empty space to end the function)
``````
```				```
If water is stronger than nothing and

the stone is stronger than 1

Put water plus dirt into mud

Rock the mountain with mud

Knock the stone down

Give back fibo taking the stone mud water

Else

Unite the mountain into the rock with " "

Give back the rock

(empty space to end the IF-ELSE)
``````
```				```
say "Enter a number: "

Listen to the stone

Say Fibo taking the stone, 0, 1
``````

## Making an LED Number App

### Name your file "LED_Numbers.rock"

```				```
Let the led at 0 be " _  ,| | ,|_| "

Let the led at 1 be "  ,| ,| "

Let the led at 2 be " _  , _| ,|_  "

Let the led at 3 be "_  ,_| ,_| "

Let the led at 4 be "    ,|_| ,  | "

Let the led at 5 be " _  ,|_  , _| "

Let the led at 6 be " _  ,|_  ,|_| "

Let the led at 7 be "_   , |  , |  "

Let the led at 8 be " _  ,|_| ,|_| "

Let the led at 9 be " _  ,|_| , _| "
``````
```				```
Night takes Moon and Sky

Put Sky into Big Sky

While Big Sky is less than Moon

Put Big Sky times 2 into Big Sky

(empty space to end while)

While Big Sky is as high as Sky

If Moon is as high as Big Sky

Put Moon minus Big Sky into Moon

(empty space to end while)

Put Big Sky over 2 into Big Sky

Give back Moon

(empty space to end function)
``````
```				```
say "Enter a number: "

Listen to the sound

The moon was a complexity

The sun was 0

The sunset was 1

The zero was 0

The one was 1

The two was 2

While the sound is higher than nothing

Put Night taking the sound, the moon into the stars

Put the sound over the moon into the sound

Turn down the sound

Let the rock at the sunset be the stars

Build the sunset up

(empty space to end the while)
``````
```				```
Put the sunset without 1 into rocker

While rocker is higher than nothing

Put the rock at rocker into the line

Put the led at the line into the stone

Cut the stone into pebbles with ","

Let the first at the sun be pebbles at the zero

Let the second at the sun be pebbles at the one

Let the third at the sun be pebbles at the two

Knock rocker down

Build the sun up

(empty space to end the while)
``````
```				```
Unite the first into uno with " "

Unite the second into dos with " "

Unite the third into tres with " "

Shout uno

Shout dos

Shout tres
``````

## Random Names

### Rockstar doesn't have Random Numbers, so I'm using pseudo ones...

```				```
Let the first at 0 be "Anne"

Let the first at 1 be "Gigi"

Let the first at 2 be "Blag"

Let the first at 3 be "Juergen"

Let the first at 4 be "Marek"

Let the first at 5 be "Ingo"

Let the first at 6 be "Lars"

Let the first at 7 be "Julia"

Let the first at 8 be "Danielle"

Let the first at 9 be "Rocky"

Let the first at 10 be "Julien"

Let the first at 11 be "Uwe"

Let the first at 12 be "Myles"

Let the first at 13 be "Mike"

Let the first at 14 be "Steven"

Let the first at 15 be "Fanny"
``````
```				```
Let the last at 0 be "Hardy"

Let the last at 1 be "Read"

Let the last at 2 be "Tejada"

Let the last at 3 be "Schmerder"

Let the last at 4 be "Kowalkiewicz"

Let the last at 5 be "Sauerzapf"

Let the last at 6 be "Karg"

Let the last at 7 be "Satsuta"

Let the last at 8 be "Keene"

Let the last at 9 be "Ongkowidjojo"

Let the last at 10 be "Vayssiere"

Let the last at 11 be "Kylau"

Let the last at 12 be "Fenlon"

Let the last at 13 be "Flynn"

Let the last at 14 be "Taylor"

Let the last at 15 be "Tan"
``````
```				```
Night takes Moon and Sky

Put Sky into Big Sky

While Big Sky is less than Moon

Put Big Sky times 2 into Big Sky

(space to finish the while)

While Big Sky is as high as Sky

If Moon is as high as Big Sky

Put Moon minus Big Sky into Moon

(space to finish the if)

Put Big Sky over 2 into Big Sky

(space to finish the while)

Give back Moon

(space to finish the function)
``````
```				```
The sound was 0

The time was 0

The power was 0

The seed was 0

The answer was 0

The seedless was 0

The answerless was 0

The note is power heartbroken

The noteless is damn brokentime

While the power is weaker than 100

Put 0 into the time
``````
```				```
While the time is weaker than 1000

Put Night taking the sound, the note into the seed

Put the seed of 7 into the seed

Knock the seed down

Put Night taking the seed, 15 into the answer

Put the answer plus 1 into the answer

Put Night taking the sound, the noteless into the seedless

Put the seedless of 7 into the seedless

Knock the seedless down

Put Night taking the seedless, 15 into the answerless

Put the answerless plus 1 into the answerless

Let the music at the sound be the first at the answer plus " " plus the last at the answerless

Build the time up

Build the sound up

(space to finish the while)
``````
```				```
Build the power up

(space to finish the while)
``````

## Decimal to Romans

### Name your file "Decimal_to_Roman.rock"

```				```
Let the roman at 0 be "M"

Let the roman at 1 be "CM"

Let the roman at 2 be "D"

Let the roman at 3 be "CD"

Let the roman at 4 be "C"

Let the roman at 5 be "XC"

Let the roman at 6 be "L"

Let the roman at 7 be "XL"

Let the roman at 8 be "X"

Let the roman at 9 be "IX"

Let the roman at 10 be "V"

Let the roman at 11 be "IV"

Let the roman at 12 be "I"
``````
```				```
Let the keys at 0 be 1000

Let the keys at 1 be 900

Let the keys at 2 be 500

Let the keys at 3 be 400

Let the keys at 4 be 100

Let the keys at 5 be 90

Let the keys at 6 be 50

Let the keys at 7 be 40

Let the keys at 8 be 10

Let the keys at 9 be 9

Let the keys at 10 be 5

Let the keys at 11 be 4

Let the keys at 12 be 1
``````
```				```
say "Enter a number: "

Listen to the sound

The key was a day

The funk was 0

While the sound is higher than nothing

The counter was 0

While the funk is weaker than the key

If the sound is as strong as the keys at the counter

Let the music at the funk be the roman at the counter

Put the sound without the keys at the counter into the sound

Build the funk up

Break it down

(Space to finish the while)
``````
```				```
Build the counter up

(Space to finish the while)

Shout ""

Unite the music into the grace with ""

Shout the grace
``````