From 1f25fa9ce350dd200977039e844236a408971c70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingy=20d=C3=B6t=20Net?= Date: Fri, 29 Nov 2024 15:38:52 -0600 Subject: [PATCH] Fri 29 Nov 2024 03:38:52 PM CST --- blog/index.html | 2 +- feed.xml | 4 ---- index.html | 2 +- posts/2024-11-29/index.html | 4 ++-- tags/blog/index.html | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/blog/index.html b/blog/index.html index 99b8eb2b2..4638d84c9 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1,4 +1,4 @@ YAMLScript

All Posts

  • | 8 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
  • | 2 min read
    #blog #advent-2023

    YAML, Python and the Holy Graal

    Which has a greater airspeed velocity... an unladen swallow or Santa's sleigh? Well, that depends... are we talking about an African or European swallow?   Huh?   Welcome to Day 21 of the...

    read article
  • | 4 min read
    #blog #advent-2023

    Godspeed

    I wonder if Santa has a Hemi? Supercharged, Turbocharged? Maybe a Nitro Burning Funny Sleigh? Dude's got to get around the world in one night. Godspeed, my festive friend! Welcome to Day 20 of the...

    read article
  • | 3 min read
    #blog #advent-2023

    Reindeer All The Way Down

    Santa is in charge of Christmas. He's the one who makes sure that all the children get presents. But who is in charge of getting Santa his presents? That's where the reindeer come in. They are the...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's in d'buggy

    With one week to go, Santa's gotta get his sleigh in top shape. Can't have any breakdowns on the big night. His sleigh might look like a simple wooden buggy, but it's more temperamental and buggy than...

    read article
  • | 3 min read
    #blog #advent-2023

    Rosetta Code

    How does Santa read all the signs in all the languages of the world? That's a lot of languages to know on top of all the other things he has to do. Luckily he has his trusty polyglot elf, Rosetta, at...

    read article
  • | 4 min read
    #blog #advent-2023

    Let Lambda Come Over

    We know the names of Santa's reindeer: Dasher, Dancer, Prancer, Vixen, Comet, Cupid, Donner, Blitzen and Rudolph. And his elves: Alabaster Snowball, Bushy Evergreen, Pepper Minstix, Shinny Upatree,...

    read article
  • | 6 min read
    #blog #advent-2023

    Naughty is Nice!

    As the architect of a major world holiday, Santa Claus has hard design choices to make. What is Suki going to get this year? He keeps it simple with the standard Naughty-Or-Nice algorithm. As...

    read article
  • | 5 min read
    #blog #advent-2023

    Stocking Stuffers

    It's always nice to get a little something extra in your stocking whilst waiting for the big guy to show up on the big day. Learning eveything you need to know about YAMLScript in 24 days is a tall...

    read article
  • | 4 min read
    #blog #advent-2023

    History Lesson

    Santa is Legend. Legends have histories. The histories of Santa are many and varied, some going back to the 4th century AD. YAMLScript's history is much shorter, but it's still a history. Today I'd...

    read article
  • | 2 min read
    #blog #advent-2023

    Future Proof

    Santa has very little margin for error. He has to get everything just right all in one night. YAMLScript is a work in progress, and will be for a long time. I'm trying to get it right, but I'm no...

    read article
  • | 3 min read
    #blog #advent-2023

    The YeS Express

    Santa's got a lot of ground to cover in a short amount of time. He doesn't have time to deal with confusing maps and directions. Lisp has other-worldly powers of abstraction, but when it comes to...

    read article
  • | 6 min read
    #blog #advent-2023

    States and Ladders

    Santa is a busy guy. He has a lot of work to do. He has to make a list and check it twice. He has to find out who's naughty and nice. He has the monumental task of transforming wishes into...

    read article
  • | 3 min read
    #blog #advent-2023

    Coding with Style

    What's the best thing about Rudolph's nose? Is it that lights the way for Santa's sleigh? I'm calling BS on that. I'd say it's the main thing that gives the whole Sanata Story some Serious Style! Good...

    read article
  • | 3 min read
    #blog #advent-2023

    Going to the Library

    Programming in YAMLScript is as easy as reading a book. The only thing you really need is some good books! For that let's go to the library. By books of course I mean YAMLScript functions. And by...

    read article
  • | 4 min read
    #blog #advent-2023

    Sharpen Your Tools

    Wanna make some fun toys with YAMLScript? 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...

    read article
  • | 3 min read
    #blog #advent-2023

    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 YAMLScript, data gets...

    read article
  • | 3 min read
    #blog #advent-2023

    Unwrapping Gifts

    It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's Big Secret

    I've got a little secret to tell you. I've been hiding a little something from you. Even that's a lie. I've actually been hiding something very very big something from you. *** YAMLScript is a Lisp!...

    read article
  • | 5 min read
    #blog #advent-2023

    Load em Up!

    On the 3rd day of Advent, my YS 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...

    read article
  • | 7 min read
    #blog #advent-2023

    Twas a Bit

    '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...

    read article
  • | 3 min read
    #blog #advent-2023

    YAMLScript Advent 2023

    Seasons Greetings, my YAML friends! What if I told you that you could write a program in YAML that would generate a Christmas tree? Well, you can! Here's how: #!/usr/bin/env ys-0defn main(width=5): ...

    read article
  • | 1 min read
    #blog #about

    Welcome to the YAMLScript Blog

    Greetings! Welcome to the YAMLScript blog. This is where we will introduce you to novel concepts about YAMLScript as the language...

    read article
\ No newline at end of file + gtag('config', 'G-44C9DS3Q80');YAMLScript

All Posts

  • | 7 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
  • | 2 min read
    #blog #advent-2023

    YAML, Python and the Holy Graal

    Which has a greater airspeed velocity... an unladen swallow or Santa's sleigh? Well, that depends... are we talking about an African or European swallow?   Huh?   Welcome to Day 21 of the...

    read article
  • | 4 min read
    #blog #advent-2023

    Godspeed

    I wonder if Santa has a Hemi? Supercharged, Turbocharged? Maybe a Nitro Burning Funny Sleigh? Dude's got to get around the world in one night. Godspeed, my festive friend! Welcome to Day 20 of the...

    read article
  • | 3 min read
    #blog #advent-2023

    Reindeer All The Way Down

    Santa is in charge of Christmas. He's the one who makes sure that all the children get presents. But who is in charge of getting Santa his presents? That's where the reindeer come in. They are the...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's in d'buggy

    With one week to go, Santa's gotta get his sleigh in top shape. Can't have any breakdowns on the big night. His sleigh might look like a simple wooden buggy, but it's more temperamental and buggy than...

    read article
  • | 3 min read
    #blog #advent-2023

    Rosetta Code

    How does Santa read all the signs in all the languages of the world? That's a lot of languages to know on top of all the other things he has to do. Luckily he has his trusty polyglot elf, Rosetta, at...

    read article
  • | 4 min read
    #blog #advent-2023

    Let Lambda Come Over

    We know the names of Santa's reindeer: Dasher, Dancer, Prancer, Vixen, Comet, Cupid, Donner, Blitzen and Rudolph. And his elves: Alabaster Snowball, Bushy Evergreen, Pepper Minstix, Shinny Upatree,...

    read article
  • | 6 min read
    #blog #advent-2023

    Naughty is Nice!

    As the architect of a major world holiday, Santa Claus has hard design choices to make. What is Suki going to get this year? He keeps it simple with the standard Naughty-Or-Nice algorithm. As...

    read article
  • | 5 min read
    #blog #advent-2023

    Stocking Stuffers

    It's always nice to get a little something extra in your stocking whilst waiting for the big guy to show up on the big day. Learning eveything you need to know about YAMLScript in 24 days is a tall...

    read article
  • | 4 min read
    #blog #advent-2023

    History Lesson

    Santa is Legend. Legends have histories. The histories of Santa are many and varied, some going back to the 4th century AD. YAMLScript's history is much shorter, but it's still a history. Today I'd...

    read article
  • | 2 min read
    #blog #advent-2023

    Future Proof

    Santa has very little margin for error. He has to get everything just right all in one night. YAMLScript is a work in progress, and will be for a long time. I'm trying to get it right, but I'm no...

    read article
  • | 3 min read
    #blog #advent-2023

    The YeS Express

    Santa's got a lot of ground to cover in a short amount of time. He doesn't have time to deal with confusing maps and directions. Lisp has other-worldly powers of abstraction, but when it comes to...

    read article
  • | 6 min read
    #blog #advent-2023

    States and Ladders

    Santa is a busy guy. He has a lot of work to do. He has to make a list and check it twice. He has to find out who's naughty and nice. He has the monumental task of transforming wishes into...

    read article
  • | 3 min read
    #blog #advent-2023

    Coding with Style

    What's the best thing about Rudolph's nose? Is it that lights the way for Santa's sleigh? I'm calling BS on that. I'd say it's the main thing that gives the whole Sanata Story some Serious Style! Good...

    read article
  • | 3 min read
    #blog #advent-2023

    Going to the Library

    Programming in YAMLScript is as easy as reading a book. The only thing you really need is some good books! For that let's go to the library. By books of course I mean YAMLScript functions. And by...

    read article
  • | 4 min read
    #blog #advent-2023

    Sharpen Your Tools

    Wanna make some fun toys with YAMLScript? 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...

    read article
  • | 3 min read
    #blog #advent-2023

    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 YAMLScript, data gets...

    read article
  • | 3 min read
    #blog #advent-2023

    Unwrapping Gifts

    It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's Big Secret

    I've got a little secret to tell you. I've been hiding a little something from you. Even that's a lie. I've actually been hiding something very very big something from you. *** YAMLScript is a Lisp!...

    read article
  • | 5 min read
    #blog #advent-2023

    Load em Up!

    On the 3rd day of Advent, my YS 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...

    read article
  • | 7 min read
    #blog #advent-2023

    Twas a Bit

    '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...

    read article
  • | 3 min read
    #blog #advent-2023

    YAMLScript Advent 2023

    Seasons Greetings, my YAML friends! What if I told you that you could write a program in YAML that would generate a Christmas tree? Well, you can! Here's how: #!/usr/bin/env ys-0defn main(width=5): ...

    read article
  • | 1 min read
    #blog #about

    Welcome to the YAMLScript Blog

    Greetings! Welcome to the YAMLScript blog. This is where we will introduce you to novel concepts about YAMLScript as the language...

    read article
\ No newline at end of file diff --git a/feed.xml b/feed.xml index 1d94411ff..01a417eb5 100644 --- a/feed.xml +++ b/feed.xml @@ -3935,10 +3935,6 @@ variable there.

indent the data you are applying the function to.

YAMLScript lets you put a function in a tag if you prefix it with a::

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person: !:merge
- ! map1
- likes:: list1
-

In this case we can simplify it even more by adding : to the end of the tag, -thus switching to code mode:

-
person: !:merge: -[map1, {'likes' list1}]
-

But I digress…

Conditional Insertions in Mappings and Sequences

A big missing feature (and one definitely needed for Helm charts) was the ability to conditionally insert key/value pairs into mappings depending on some diff --git a/index.html b/index.html index e797f9b78..48a59e846 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ YAMLScript.org | YAMLScript

Program in YAML — Code is Data

YAMLScript is a new functional programming language with a clean syntax that is also 100% valid YAML. It was designed to be easily embedded into existing YAML files in order to provide the logic, interpolation and data transformation capabilities that many YAML users need. Created by YAML inventor and lead maintainer, Ingy döt Net, YAMLScript solves these needs beautifully for all YAML users and uses.

YAMLScript is now available as a programming language learning track on Exercism. It's a great way to learn YAMLScript and get feedback from experienced mentors. Check it out!

If you work with apps and frameworks that use YAML for configuration, you can simplify your complex YAML files using YAMLScript, even if the app or framework does not support it natively. YAMLScript lets you include data from external files and other sources, make use of hundreds of existing standard functions, and even define your own variables and functions. You can filter, map, merge, reduce, generate, concatenate, interpolate and manipulate your data as you wish. YAMLScript provides these things with syntax that is minimal and unobtrusive, keeping your clean YAML data clean.

Slides and information from Ingy's KubeCon 2024 talk are available here. The highlight was HelmYS a new Helm post-renderer that lets you template Helm charts with YAMLScript (which is actual YAML).

Like many new languages, YAMLScript was built over an existing robust language, Clojure, which in turn was built over Java. The power of Clojure and Java is available to YAMLScript users via the YAMLScript runtime interpreter, ys. However, the ys command is compiled into a single standalone native binary executable file. This means that No Java or JVM installation is required to use YAMLScript, and startup/execution speed is very fast.

YAMLScript also produces the libyamlscript.so shared library. It has binding modules for 10 programming languages including Go, JavaScript, Python and Rust, with many more on the way. These modules can be used in your programs to load normal YAML files as well as YAMLScript enhanced ones.

There are many ways to use YAMLScript:


YAMLScript Resources


YAMLScript Links


Recent Posts

  • | 8 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
View All Posts
\ No newline at end of file + gtag('config', 'G-44C9DS3Q80');YAMLScript.org | YAMLScript

Program in YAML — Code is Data

YAMLScript is a new functional programming language with a clean syntax that is also 100% valid YAML. It was designed to be easily embedded into existing YAML files in order to provide the logic, interpolation and data transformation capabilities that many YAML users need. Created by YAML inventor and lead maintainer, Ingy döt Net, YAMLScript solves these needs beautifully for all YAML users and uses.

YAMLScript is now available as a programming language learning track on Exercism. It's a great way to learn YAMLScript and get feedback from experienced mentors. Check it out!

If you work with apps and frameworks that use YAML for configuration, you can simplify your complex YAML files using YAMLScript, even if the app or framework does not support it natively. YAMLScript lets you include data from external files and other sources, make use of hundreds of existing standard functions, and even define your own variables and functions. You can filter, map, merge, reduce, generate, concatenate, interpolate and manipulate your data as you wish. YAMLScript provides these things with syntax that is minimal and unobtrusive, keeping your clean YAML data clean.

Slides and information from Ingy's KubeCon 2024 talk are available here. The highlight was HelmYS a new Helm post-renderer that lets you template Helm charts with YAMLScript (which is actual YAML).

Like many new languages, YAMLScript was built over an existing robust language, Clojure, which in turn was built over Java. The power of Clojure and Java is available to YAMLScript users via the YAMLScript runtime interpreter, ys. However, the ys command is compiled into a single standalone native binary executable file. This means that No Java or JVM installation is required to use YAMLScript, and startup/execution speed is very fast.

YAMLScript also produces the libyamlscript.so shared library. It has binding modules for 10 programming languages including Go, JavaScript, Python and Rust, with many more on the way. These modules can be used in your programs to load normal YAML files as well as YAMLScript enhanced ones.

There are many ways to use YAMLScript:


YAMLScript Resources


YAMLScript Links


Recent Posts

  • | 7 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
View All Posts
\ No newline at end of file diff --git a/posts/2024-11-29/index.html b/posts/2024-11-29/index.html index d8ce98e9d..de8afc307 100644 --- a/posts/2024-11-29/index.html +++ b/posts/2024-11-29/index.html @@ -1,7 +1,7 @@ The Kubernetes Effect | YAMLScript

The Kubernetes Effect

by Ingy döt Net | | 8 min read

In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation.

In the last post, I mentioned that I was going to present a 90 minute YAMLScript tutorial at KubeCon (November 15th in Salt Lake City).

The conference was amazing and the YAMLScript tutorial was a huge success. I came away with the feeling that YAML and YAMLScript had found their community. KubeCon felt like YAMLCon!

But today's post is about the work leading up to the conference and the new data oriented features that were added to YAMLScript as a result.

At the start of October we realized there were a few things we wanted to add to the language to make it great for defining dynamic data in YAML files.

YAMLScript is a complete programming language and while you could already do almost anything with it, we knew that it had blend smoothly into the existing YAML files that people use for Kubernetes and other uses. We started by focusing on Helm charts, and seeing how well YAMLScript could fit along side the Go templating system (or replace it entirely). In the end it all worked out very well, but a few things needed to be added before tutorial time.

TL;DR for Helm Users: https://yamlscript.org/doc/helmys

In this post I want to cover some of the new (and old) features of YAMLScript that you can use to do cool things in your YAML files that are not possible with YAML alone. And remember, your YAML files are already valid YAMLScript files; but if you load them (or preprocess them) with YAMLScript, you can do a lot more in there.

What YAML Can Do Now

YAML 1.2 has a few things that let you do things a bit fancier than with a data only format like JSON:

  • YAML has anchors and aliases for reusing specific nodes by naming them, and then later referring to them by name.
  • YAML has a special << "merge key" that you can use to merge mappings. This was actually removed from the 1.2 spec but many popular implementations still support it (albeit with inconsistent behavior between implementations).
  • YAML allows you to tag nodes and this can sometimes be used creatively, though not consistently across different YAML implementations.
  • YAML supports multiple "documents" in a single file or stream, although unfortunately the spec doesn't allow you to alias nodes across documents.

YAMLScript supports all of these features too. It needs to since it claims to support the current YAML files of the world. But YAMLScript being a complete programming language lets you go so much further!

Let's take a closer look…

External (and Internal) Data Sources

Even though YAML lets you reuse nodes by name, those nodes need to be part of your YAML document. Say you have a section at the top of your YAML file that defines some default values and names them with anchors, to be aliased later throughout the file.

This is problematic because the node of defaults is also going to be a part of your data when you load it. It would be nice if you could have 2 documents in a YAML file where you define the data sources to be referred to in the first document, and then refer to them in the second document. If the loader returned the final (second) document then you could get the data you wanted without also getting the data that you don't.

Let's try it out:

# file.yaml
---
- &map1
name: Bobbi Datamon
- &list1
- fun
- games
- more: stuff

--- !yamlscript/v0:
person:
<<: *map1
likes: *list1

Now we can load it with the YAMLScript command line interpreter, ys:

$ ys --load file.yaml
+      gtag('config', 'G-44C9DS3Q80');The Kubernetes Effect | YAMLScript

The Kubernetes Effect

by Ingy döt Net | | 7 min read

In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation.

In the last post, I mentioned that I was going to present a 90 minute YAMLScript tutorial at KubeCon (November 15th in Salt Lake City).

The conference was amazing and the YAMLScript tutorial was a huge success. I came away with the feeling that YAML and YAMLScript had found their community. KubeCon felt like YAMLCon!

But today's post is about the work leading up to the conference and the new data oriented features that were added to YAMLScript as a result.

At the start of October we realized there were a few things we wanted to add to the language to make it great for defining dynamic data in YAML files.

YAMLScript is a complete programming language and while you could already do almost anything with it, we knew that it had blend smoothly into the existing YAML files that people use for Kubernetes and other uses. We started by focusing on Helm charts, and seeing how well YAMLScript could fit along side the Go templating system (or replace it entirely). In the end it all worked out very well, but a few things needed to be added before tutorial time.

TL;DR for Helm Users: https://yamlscript.org/doc/helmys

In this post I want to cover some of the new (and old) features of YAMLScript that you can use to do cool things in your YAML files that are not possible with YAML alone. And remember, your YAML files are already valid YAMLScript files; but if you load them (or preprocess them) with YAMLScript, you can do a lot more in there.

What YAML Can Do Now

YAML 1.2 has a few things that let you do things a bit fancier than with a data only format like JSON:

  • YAML has anchors and aliases for reusing specific nodes by naming them, and then later referring to them by name.
  • YAML has a special << "merge key" that you can use to merge mappings. This was actually removed from the 1.2 spec but many popular implementations still support it (albeit with inconsistent behavior between implementations).
  • YAML allows you to tag nodes and this can sometimes be used creatively, though not consistently across different YAML implementations.
  • YAML supports multiple "documents" in a single file or stream, although unfortunately the spec doesn't allow you to alias nodes across documents.

YAMLScript supports all of these features too. It needs to since it claims to support the current YAML files of the world. But YAMLScript being a complete programming language lets you go so much further!

Let's take a closer look…

External (and Internal) Data Sources

Even though YAML lets you reuse nodes by name, those nodes need to be part of your YAML document. Say you have a section at the top of your YAML file that defines some default values and names them with anchors, to be aliased later throughout the file.

This is problematic because the node of defaults is also going to be a part of your data when you load it. It would be nice if you could have 2 documents in a YAML file where you define the data sources to be referred to in the first document, and then refer to them in the second document. If the loader returned the final (second) document then you could get the data you wanted without also getting the data that you don't.

Let's try it out:

# file.yaml
---
- &map1
name: Bobbi Datamon
- &list1
- fun
- games
- more: stuff

--- !yamlscript/v0:
person:
<<: *map1
likes: *list1

Now we can load it with the YAMLScript command line interpreter, ys:

$ ys --load file.yaml
 {"person":{"name":"Bobbi Datamon","likes":["fun","games"]}}
 

Looks like it worked, but ys --load prints the result in compact JSON. Before we discuss what happened, let's show the result in YAML:

$ ys --load --yaml file.yaml
 person:
@@ -9,7 +9,7 @@
   likes:
   - fun
   - games
-

Nice! ys --load gave us the data from the final document that included data from the first document.

More about loading YAMLScript

You can just use ys --yaml (or even ys -Y) instead of ys --load --yaml. Use -J (for --json) to format --load output as a prettier JSON.

YAMLScript's "load" operation defaults to JSON because YAMLScript's load operation is designed to output data in an interoperable form. JSON is very interoperable and the JSON data model is a subset of the YAML data model.

Instead of using ys to load YAML/YAMLScript files, you can use a YAMLScript library to replace other YAML loaders in 10 (and counting) common programming languages, including Python, Go, Ruby, Rust, Java and JavaScript.

For example, in Python you could do this:

from yamlscript import YAMLScript
ys = yamlscript.YAMLScript()
text = open("db-config.yaml").read()
data = ys.load(text)

and similar in any other language that has a YAMLScript binding library.

The careful reader will have noticed that we broke the rules of YAML. We aliased nodes that were anchored in a different document. What's up?

Well, the two YAMLScript documents each have a different YAMLScript mode and that makes things work differently.

The first document has no !yamlscript/v0 tag and thus is in "bare mode". In bare mode all the rules are the same as YAML 1.2 (using the Core schema).

The second document has the !yamlscript/v0: tag. The !yamlscript/v0 tag tells YAMLScript that the document is in "code mode" (the content starts as code but can switch to data mode at any time). The : in !yamlscript/v0: tells YAMLScript to switch to data mode right away.

In code mode and data mode, aliases are very different than in bare mode. They can access anchored nodes in the same document or any previous document. Not only that, you can access parts of the anchored node with a path syntax. For instance *map1.name would produce the string "Bobbi Datamon" and *list1.1 would produce the string "games".

That means that this works the same way as the previous example:

--- &data
map1:
name: Bobbi Datamon
list1:
- fun
- games
more: stuff

--- !yamlscript/v0:
person:
<<:: -*data.map1
likes:: -*data.list1

Here we only anchored the entire first document and then used the path syntax to access the parts we wanted. Note that to do this we used :: to switch to code mode and we also needed to used - to escape the values and have them be treated as YAMLScript expressions.

YAMLScript has special +++ symbol that evaluates to an array of all the prior documents in the stream. That means we don't need anchors at all:

map1:
name: Bobbi Datamon
list1:
- fun
- games
more: stuff

--- !yamlscript/v0:
person:
<<:: +++.last().map1
likes:: +++.$.list1

The +++.last() function returns the last document in the stream so far (the first document in this case) The +++.$ is a shorthand for +++.last().

Another approach to take here is to make the first document use YAMLScript in code mode and define variables to use in the second document:

--- !yamlscript/v0
map1 =::
name: Bobbi Datamon
list1 =::
- fun
- games

--- !yamlscript/v0:
person:
<<:: map1
likes:: list1

We use =: for assignment expressions in YAMLScript. And =:: does the same thing but toggles the mode of the value.

What if list1 was a huge list and you really wanted to keep it in a separate file?

No problem:

# big-list.yaml
- fun
- games
# ...

Now we just change the first document to load the list from the file:

--- !yamlscript/v0
map1 =::
name: Bobbi Datamon
list1 =: load('big-list.yaml')

Not only can we access external data from a file, YAMLScript supports fetching data from the web with the curl function and also getting data from databases!

Inline Code in Data Mode

We can do the same things in a single data mode document. The trick is that we need to have a way to evaluate code in a way that doesn't affect the data.

The :: syntax is our new friend here.

This lets us do code things like define variables and even define new functions in a way that doesn't affect the data we are defining.

--- !yamlscript/v0:
::
defn flip(array):
reverse: array

map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person:
<<:: map1
likes:: list1:flip

We defined a new function called flip which is a bit contrived since we could have called reverse directly; but it proves the point.

We also defined our data variables. We can actually define variables without :::

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person:
<<:: map1
likes:: list1

In a big document, it's sometimes nice to define the data variables closer to where they are used.

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon

person:
<<:: map1
list1 =: load("big-list.yaml")
likes:: list1

In fact, since we only use map1 and list1 once, we could have just inlined them:

--- !yamlscript/v0:
person:
<<:
name: Bobbi Datamon
likes:: load("big-list.yaml")

How Do I merge Thee?

Let me count the ways :)

We are still using the << merge key to merge mappings, but YAMLScript has a a standard merge function (among 100s of others).

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person::
merge::
- ! map1
- likes:: list1

Note the ! in front of map1. It toggles from data mode to code mode. We need to use ! for that purpose in data mode sequences. For mappings we can use key:: variable but it is just a shorthand for key: ! variable.

Another way to write that is:

person::
merge map1::
likes:: list1

Since the merge key is already in code mode we can just put the map1 variable there.

Sometimes you want to use a function like merge without needing to further indent the data you are applying the function to.

YAMLScript lets you put a function in a tag if you prefix it with a::

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person: !:merge
- ! map1
- likes:: list1

In this case we can simplify it even more by adding : to the end of the tag, thus switching to code mode:

person: !:merge: -[map1, {'likes' list1}]

But I digress…

Conditional Insertions in Mappings and Sequences

A big missing feature (and one definitely needed for Helm charts) was the ability to conditionally insert key/value pairs into mappings depending on some value being true or false.

Functionally that's a bit weird for a data language. You can always apply any function to any data node to change its value, but how do you make it control whether or not it exists at all?

You really need to apply a function to its parent mapping to make that happen…

…or do you?

YAMLScript ended up solving this using the :: syntax, with a special rule.

!yamlscript/v0:
+

Nice! ys --load gave us the data from the final document that included data from the first document.

More about loading YAMLScript

You can just use ys --yaml (or even ys -Y) instead of ys --load --yaml. Use -J (for --json) to format --load output as a prettier JSON.

YAMLScript's "load" operation defaults to JSON because YAMLScript's load operation is designed to output data in an interoperable form. JSON is very interoperable and the JSON data model is a subset of the YAML data model.

Instead of using ys to load YAML/YAMLScript files, you can use a YAMLScript library to replace other YAML loaders in 10 (and counting) common programming languages, including Python, Go, Ruby, Rust, Java and JavaScript.

For example, in Python you could do this:

from yamlscript import YAMLScript
ys = yamlscript.YAMLScript()
text = open("db-config.yaml").read()
data = ys.load(text)

and similar in any other language that has a YAMLScript binding library.

The careful reader will have noticed that we broke the rules of YAML. We aliased nodes that were anchored in a different document. What's up?

Well, the two YAMLScript documents each have a different YAMLScript mode and that makes things work differently.

The first document has no !yamlscript/v0 tag and thus is in "bare mode". In bare mode all the rules are the same as YAML 1.2 (using the Core schema).

The second document has the !yamlscript/v0: tag. The !yamlscript/v0 tag tells YAMLScript that the document is in "code mode" (the content starts as code but can switch to data mode at any time). The : in !yamlscript/v0: tells YAMLScript to switch to data mode right away.

In code mode and data mode, aliases are very different than in bare mode. They can access anchored nodes in the same document or any previous document. Not only that, you can access parts of the anchored node with a path syntax. For instance *map1.name would produce the string "Bobbi Datamon" and *list1.1 would produce the string "games".

That means that this works the same way as the previous example:

--- &data
map1:
name: Bobbi Datamon
list1:
- fun
- games
more: stuff

--- !yamlscript/v0:
person:
<<:: -*data.map1
likes:: -*data.list1

Here we only anchored the entire first document and then used the path syntax to access the parts we wanted. Note that to do this we used :: to switch to code mode and we also needed to used - to escape the values and have them be treated as YAMLScript expressions.

YAMLScript has special +++ symbol that evaluates to an array of all the prior documents in the stream. That means we don't need anchors at all:

map1:
name: Bobbi Datamon
list1:
- fun
- games
more: stuff

--- !yamlscript/v0:
person:
<<:: +++.last().map1
likes:: +++.$.list1

The +++.last() function returns the last document in the stream so far (the first document in this case) The +++.$ is a shorthand for +++.last().

Another approach to take here is to make the first document use YAMLScript in code mode and define variables to use in the second document:

--- !yamlscript/v0
map1 =::
name: Bobbi Datamon
list1 =::
- fun
- games

--- !yamlscript/v0:
person:
<<:: map1
likes:: list1

We use =: for assignment expressions in YAMLScript. And =:: does the same thing but toggles the mode of the value.

What if list1 was a huge list and you really wanted to keep it in a separate file?

No problem:

# big-list.yaml
- fun
- games
# ...

Now we just change the first document to load the list from the file:

--- !yamlscript/v0
map1 =::
name: Bobbi Datamon
list1 =: load('big-list.yaml')

Not only can we access external data from a file, YAMLScript supports fetching data from the web with the curl function and also getting data from databases!

Inline Code in Data Mode

We can do the same things in a single data mode document. The trick is that we need to have a way to evaluate code in a way that doesn't affect the data.

The :: syntax is our new friend here.

This lets us do code things like define variables and even define new functions in a way that doesn't affect the data we are defining.

--- !yamlscript/v0:
::
defn flip(array):
reverse: array

map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person:
<<:: map1
likes:: list1:flip

We defined a new function called flip which is a bit contrived since we could have called reverse directly; but it proves the point.

We also defined our data variables. We can actually define variables without :::

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person:
<<:: map1
likes:: list1

In a big document, it's sometimes nice to define the data variables closer to where they are used.

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon

person:
<<:: map1
list1 =: load("big-list.yaml")
likes:: list1

In fact, since we only use map1 and list1 once, we could have just inlined them:

--- !yamlscript/v0:
person:
<<:
name: Bobbi Datamon
likes:: load("big-list.yaml")

How Do I merge Thee?

Let me count the ways :)

We are still using the << merge key to merge mappings, but YAMLScript has a a standard merge function (among 100s of others).

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person::
merge::
- ! map1
- likes:: list1

Note the ! in front of map1. It toggles from data mode to code mode. We need to use ! for that purpose in data mode sequences. For mappings we can use key:: variable but it is just a shorthand for key: ! variable.

Another way to write that is:

person::
merge map1::
likes:: list1

Since the merge key is already in code mode we can just put the map1 variable there.

Sometimes you want to use a function like merge without needing to further indent the data you are applying the function to.

YAMLScript lets you put a function in a tag if you prefix it with a::

--- !yamlscript/v0:
map1 =::
name: Bobbi Datamon
list1 =: load("big-list.yaml")

person: !:merge
- ! map1
- likes:: list1

Conditional Insertions in Mappings and Sequences

A big missing feature (and one definitely needed for Helm charts) was the ability to conditionally insert key/value pairs into mappings depending on some value being true or false.

Functionally that's a bit weird for a data language. You can always apply any function to any data node to change its value, but how do you make it control whether or not it exists at all?

You really need to apply a function to its parent mapping to make that happen…

…or do you?

YAMLScript ended up solving this using the :: syntax, with a special rule.

!yamlscript/v0:
 foo: 111
 ::
   when a > b::
diff --git a/tags/blog/index.html b/tags/blog/index.html
index 03ec89a6f..313ab10d2 100644
--- a/tags/blog/index.html
+++ b/tags/blog/index.html
@@ -1,4 +1,4 @@
 Blog | YAMLScript

Blog

  • | 8 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
  • | 2 min read
    #blog #advent-2023

    YAML, Python and the Holy Graal

    Which has a greater airspeed velocity... an unladen swallow or Santa's sleigh? Well, that depends... are we talking about an African or European swallow?   Huh?   Welcome to Day 21 of the...

    read article
  • | 4 min read
    #blog #advent-2023

    Godspeed

    I wonder if Santa has a Hemi? Supercharged, Turbocharged? Maybe a Nitro Burning Funny Sleigh? Dude's got to get around the world in one night. Godspeed, my festive friend! Welcome to Day 20 of the...

    read article
  • | 3 min read
    #blog #advent-2023

    Reindeer All The Way Down

    Santa is in charge of Christmas. He's the one who makes sure that all the children get presents. But who is in charge of getting Santa his presents? That's where the reindeer come in. They are the...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's in d'buggy

    With one week to go, Santa's gotta get his sleigh in top shape. Can't have any breakdowns on the big night. His sleigh might look like a simple wooden buggy, but it's more temperamental and buggy than...

    read article
  • | 3 min read
    #blog #advent-2023

    Rosetta Code

    How does Santa read all the signs in all the languages of the world? That's a lot of languages to know on top of all the other things he has to do. Luckily he has his trusty polyglot elf, Rosetta, at...

    read article
  • | 4 min read
    #blog #advent-2023

    Let Lambda Come Over

    We know the names of Santa's reindeer: Dasher, Dancer, Prancer, Vixen, Comet, Cupid, Donner, Blitzen and Rudolph. And his elves: Alabaster Snowball, Bushy Evergreen, Pepper Minstix, Shinny Upatree,...

    read article
  • | 6 min read
    #blog #advent-2023

    Naughty is Nice!

    As the architect of a major world holiday, Santa Claus has hard design choices to make. What is Suki going to get this year? He keeps it simple with the standard Naughty-Or-Nice algorithm. As...

    read article
  • | 5 min read
    #blog #advent-2023

    Stocking Stuffers

    It's always nice to get a little something extra in your stocking whilst waiting for the big guy to show up on the big day. Learning eveything you need to know about YAMLScript in 24 days is a tall...

    read article
  • | 4 min read
    #blog #advent-2023

    History Lesson

    Santa is Legend. Legends have histories. The histories of Santa are many and varied, some going back to the 4th century AD. YAMLScript's history is much shorter, but it's still a history. Today I'd...

    read article
  • | 2 min read
    #blog #advent-2023

    Future Proof

    Santa has very little margin for error. He has to get everything just right all in one night. YAMLScript is a work in progress, and will be for a long time. I'm trying to get it right, but I'm no...

    read article
  • | 3 min read
    #blog #advent-2023

    The YeS Express

    Santa's got a lot of ground to cover in a short amount of time. He doesn't have time to deal with confusing maps and directions. Lisp has other-worldly powers of abstraction, but when it comes to...

    read article
  • | 6 min read
    #blog #advent-2023

    States and Ladders

    Santa is a busy guy. He has a lot of work to do. He has to make a list and check it twice. He has to find out who's naughty and nice. He has the monumental task of transforming wishes into...

    read article
  • | 3 min read
    #blog #advent-2023

    Coding with Style

    What's the best thing about Rudolph's nose? Is it that lights the way for Santa's sleigh? I'm calling BS on that. I'd say it's the main thing that gives the whole Sanata Story some Serious Style! Good...

    read article
  • | 3 min read
    #blog #advent-2023

    Going to the Library

    Programming in YAMLScript is as easy as reading a book. The only thing you really need is some good books! For that let's go to the library. By books of course I mean YAMLScript functions. And by...

    read article
  • | 4 min read
    #blog #advent-2023

    Sharpen Your Tools

    Wanna make some fun toys with YAMLScript? 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...

    read article
  • | 3 min read
    #blog #advent-2023

    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 YAMLScript, data gets...

    read article
  • | 3 min read
    #blog #advent-2023

    Unwrapping Gifts

    It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's Big Secret

    I've got a little secret to tell you. I've been hiding a little something from you. Even that's a lie. I've actually been hiding something very very big something from you. *** YAMLScript is a Lisp!...

    read article
  • | 5 min read
    #blog #advent-2023

    Load em Up!

    On the 3rd day of Advent, my YS 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...

    read article
  • | 7 min read
    #blog #advent-2023

    Twas a Bit

    '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...

    read article
  • | 3 min read
    #blog #advent-2023

    YAMLScript Advent 2023

    Seasons Greetings, my YAML friends! What if I told you that you could write a program in YAML that would generate a Christmas tree? Well, you can! Here's how: #!/usr/bin/env ys-0defn main(width=5): ...

    read article
  • | 1 min read
    #blog #about

    Welcome to the YAMLScript Blog

    Greetings! Welcome to the YAMLScript blog. This is where we will introduce you to novel concepts about YAMLScript as the language...

    read article
\ No newline at end of file + gtag('config', 'G-44C9DS3Q80');Blog | YAMLScript

Blog

  • | 7 min read
    #blog

    The Kubernetes Effect

    In my many years of creating Open Source software and talking about it at conferences, some of the most productive development times are often those leading up to the presentation. In the last post, I...

    read article
  • | 5 min read
    #blog

    The Fall of YAMLScript!

    (or Exciting YAMLScript News for Fall 2024!) Greetings! It's been over 3 months since the last blog post here. Just to be clear, the YAMLScript project is alive and fantastic! We've just been busy as...

    read article
  • | 2 min read
    #blog

    Go Julia!

    Last week two new language bindings were added to the YAMLScript family: Go and Julia. Go The Go binding has been a long time coming. Several people have been working on it this year but it was Andrew...

    read article
  • | 5 min read
    #blog

    Dr. StrangeYAML or How I Learned to Stop Worrying and Love the LLM

    Well now, what happened is, uh, one of our data scientists, uh, well, he went a little funny in the head. You know. Just a little funny. And uh, he went and did a silly thing. Well, I'll tell you...

    read article
  • | 6 min read
    #blog

    YAMLScript Spring Update

    It's been a while since I let you know what's been happening with YAMLScript. I've been busy working on it every day this year and I have a lot to tell you about! YAMLScript Activity in 2024 Let me...

    read article
  • | 3 min read
    #blog

    YAMLScript Firsts

    Remember Your First Time? Do you remember the first time you wrote a program in a new language? For YAMLScript, mine was yesterday! This is my first post of 2024. I've been working on YAMLScript...

    read article
  • | 1 min read
    #blog #advent-2023

    2023 Advent Index

    Welcome to the 2023 YAMLScript Advent Blog!   Dec 24 - Wrapped and Ready Dec 23 - Perl to Rust Dec 22 - Flip Flops Dec 21 - YAML, Python and the Holy Graal Dec 20 - Godspeed Dec 19 - Reindeer All...

    read article
  • | 3 min read
    #blog #advent-2023

    Wrapped and Ready

    The Elves have everything wrapped up. Literally! Tonight's the big night. It's Time to Deliver! Welcome to Day 24 of the YAMLScript Advent Calendar It's also time to wrap up this year's YAMLScript...

    read article
  • | 4 min read
    #blog #advent-2023

    Perl to Rust

    When Santa is doing his job in the Luxembourg area, I've always wondered how he gets from Perl to Rust. Maybe he takes this route! Welcome to Day 23 of the YAMLScript Advent Blog! A couple of days ago...

    read article
  • | 3 min read
    #blog #advent-2023

    Flip Flops

    Can you imagine Santa walking around in flip flops? I've never been up to the North Pole, but I'm pretty sure there's no beaches. I always pictured Santa wearing moon boots around the...

    read article
  • | 2 min read
    #blog #advent-2023

    YAML, Python and the Holy Graal

    Which has a greater airspeed velocity... an unladen swallow or Santa's sleigh? Well, that depends... are we talking about an African or European swallow?   Huh?   Welcome to Day 21 of the...

    read article
  • | 4 min read
    #blog #advent-2023

    Godspeed

    I wonder if Santa has a Hemi? Supercharged, Turbocharged? Maybe a Nitro Burning Funny Sleigh? Dude's got to get around the world in one night. Godspeed, my festive friend! Welcome to Day 20 of the...

    read article
  • | 3 min read
    #blog #advent-2023

    Reindeer All The Way Down

    Santa is in charge of Christmas. He's the one who makes sure that all the children get presents. But who is in charge of getting Santa his presents? That's where the reindeer come in. They are the...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's in d'buggy

    With one week to go, Santa's gotta get his sleigh in top shape. Can't have any breakdowns on the big night. His sleigh might look like a simple wooden buggy, but it's more temperamental and buggy than...

    read article
  • | 3 min read
    #blog #advent-2023

    Rosetta Code

    How does Santa read all the signs in all the languages of the world? That's a lot of languages to know on top of all the other things he has to do. Luckily he has his trusty polyglot elf, Rosetta, at...

    read article
  • | 4 min read
    #blog #advent-2023

    Let Lambda Come Over

    We know the names of Santa's reindeer: Dasher, Dancer, Prancer, Vixen, Comet, Cupid, Donner, Blitzen and Rudolph. And his elves: Alabaster Snowball, Bushy Evergreen, Pepper Minstix, Shinny Upatree,...

    read article
  • | 6 min read
    #blog #advent-2023

    Naughty is Nice!

    As the architect of a major world holiday, Santa Claus has hard design choices to make. What is Suki going to get this year? He keeps it simple with the standard Naughty-Or-Nice algorithm. As...

    read article
  • | 5 min read
    #blog #advent-2023

    Stocking Stuffers

    It's always nice to get a little something extra in your stocking whilst waiting for the big guy to show up on the big day. Learning eveything you need to know about YAMLScript in 24 days is a tall...

    read article
  • | 4 min read
    #blog #advent-2023

    History Lesson

    Santa is Legend. Legends have histories. The histories of Santa are many and varied, some going back to the 4th century AD. YAMLScript's history is much shorter, but it's still a history. Today I'd...

    read article
  • | 2 min read
    #blog #advent-2023

    Future Proof

    Santa has very little margin for error. He has to get everything just right all in one night. YAMLScript is a work in progress, and will be for a long time. I'm trying to get it right, but I'm no...

    read article
  • | 3 min read
    #blog #advent-2023

    The YeS Express

    Santa's got a lot of ground to cover in a short amount of time. He doesn't have time to deal with confusing maps and directions. Lisp has other-worldly powers of abstraction, but when it comes to...

    read article
  • | 6 min read
    #blog #advent-2023

    States and Ladders

    Santa is a busy guy. He has a lot of work to do. He has to make a list and check it twice. He has to find out who's naughty and nice. He has the monumental task of transforming wishes into...

    read article
  • | 3 min read
    #blog #advent-2023

    Coding with Style

    What's the best thing about Rudolph's nose? Is it that lights the way for Santa's sleigh? I'm calling BS on that. I'd say it's the main thing that gives the whole Sanata Story some Serious Style! Good...

    read article
  • | 3 min read
    #blog #advent-2023

    Going to the Library

    Programming in YAMLScript is as easy as reading a book. The only thing you really need is some good books! For that let's go to the library. By books of course I mean YAMLScript functions. And by...

    read article
  • | 4 min read
    #blog #advent-2023

    Sharpen Your Tools

    Wanna make some fun toys with YAMLScript? 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...

    read article
  • | 3 min read
    #blog #advent-2023

    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 YAMLScript, data gets...

    read article
  • | 3 min read
    #blog #advent-2023

    Unwrapping Gifts

    It's certainly a relief now that I've told you the big secret about YAMLScript. Now that you know that YAMLScript is really Clojure, I don't have to dance around the subject anymore. I didn't want to...

    read article
  • | 5 min read
    #blog #advent-2023

    Santa's Big Secret

    I've got a little secret to tell you. I've been hiding a little something from you. Even that's a lie. I've actually been hiding something very very big something from you. *** YAMLScript is a Lisp!...

    read article
  • | 5 min read
    #blog #advent-2023

    Load em Up!

    On the 3rd day of Advent, my YS 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...

    read article
  • | 7 min read
    #blog #advent-2023

    Twas a Bit

    '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...

    read article
  • | 3 min read
    #blog #advent-2023

    YAMLScript Advent 2023

    Seasons Greetings, my YAML friends! What if I told you that you could write a program in YAML that would generate a Christmas tree? Well, you can! Here's how: #!/usr/bin/env ys-0defn main(width=5): ...

    read article
  • | 1 min read
    #blog #about

    Welcome to the YAMLScript Blog

    Greetings! Welcome to the YAMLScript blog. This is where we will introduce you to novel concepts about YAMLScript as the language...

    read article
\ No newline at end of file