Skip to content

Index🔗

Sharpen Your Tools

Wanna make some fun toys with YS? You'll need some sharp tools. You think those elves make all those toys with dull tools?

The CLI tool ys is the main tool you'll use to work with YS. Today we'll learn about all the things you can do with it.

Modes of Transportation

How do you get around? Some people walk, some ride bikes, some drive cars (or the cars drive them), some take trains, some in planes, so many ways, even some in sleighs.

In YS, data gets around via various modes of transportation... 3 modes to be exact.

Rememeber back on December 3rd when we talked about the 2 different states that a YS program can be in? In one state say is a function, and in the other it's just a plain string.

We call these states "modes", and there is actually three of them.

Unwrapping Gifts

It's certainly a relief now that I've told you the big secret about YS. Now that you know that YS is really Clojure, I don't have to dance around the subject anymore. I didn't want to scare you away by going Full-Lisp on you from the start!

Now we can just get into it. We can write, run and load YS until the cows come home.

But wait... How do we do that? You don't even have YS installed yet!

Load em Up!

On the 3rd day of Advent, my YS code gave to me...
A sequence in a map tree!

Did you know that all JSON is YAML? You should, because I told you that yesterday!

It's true. YAML is a superset of JSON. Both in terms of syntax and data model.

This means that any possible valid JSON input is also valid as a YAML input. A proper YAML loader and a JSON loader should produce the same data structure from the same JSON input.

Note

Assuming a YAML 1.2 loader using the YAML 1.2 JSON Schema

Twas a Bit

Quote

'Twas a bit before Hanukkah, and all through the igloo,
not a creature was stirring, not even a frog.
The stockings were hung by the window with care,
In hopes that St. Krampus soon would be there.
The offspring were nestled all snug in their bunks,
While visions of spicy-cookies danced in their heads.
And cuz in their 'kerchief, and I in my bonnet,
Had just settled down for a long winter's snooze.
When out on the lawn there arose such a clatter,
I sprang from my bench to see what was the matter.
Away to the window, I flew like a jet,
Tore open the shutters and threw up the curtain.
The asteroid on the breast of the new-fallen frost,
Gave the lustre of mid-day to dirt below.
When what to my wondering eyes should materialize?
But a miniature car, and eight tiny elephants.

Well that was a bit weird. Let's try again. Don't worry, it's not that hard to write Winter holiday poetry when you have YS on your side!

Welcome to the YS Blog

Greetings!

Welcome to the YS blog.

This is where we will introduce you to novel concepts about YS as the language evolves.