Vibescript Showcase runnable

Approval chain

Showcase

Build a release approval process with states and deadlines.

Vibescript Showcase runnable

Big integers

Showcase

Calculate factorials, Fibonacci numbers, and powers larger than 64 bits.

Vibescript Showcase runnable

Chudnovsky π

Showcase

Calculate 100 digits of π with the Chudnovsky formula and big integers.

Vibescript Showcase runnable

Digest schedule

Showcase

Schedule digest jobs from a cadence and a time window.

Vibescript Showcase runnable

Escalation policy

Showcase

Route support tickets from their severity and response deadline.

Vibescript Showcase runnable

Event timestamps

Showcase

Format RFC3339 timestamps with whole or fractional seconds.

Vibescript Showcase runnable

Hash projection

Showcase

Remove, select, merge, and fetch fields from a hash.

Vibescript Showcase runnable

Late fee

Showcase

Calculate a late fee from an overdue duration.

Vibescript Showcase runnable

Late fee policy

Showcase

Choose a late fee from the account standing and days overdue.

Vibescript Showcase runnable

Log digest

Showcase

Parse log lines, group them by level, and count each group.

Vibescript Showcase runnable

Maintenance window

Showcase

Plan a maintenance window with environment rules, freeze notices, and durations.

Vibescript Showcase runnable

Matrix report

Showcase

Turn rows of daily metrics into totals for each metric.

Vibescript Showcase runnable

Numeric literals and rounding

Showcase

Read hex, octal, binary, and scientific numbers, then round them.

Vibescript Showcase runnable

On-call handoff

Showcase

Build an on-call handoff from the coverage level and shift length.

Vibescript Showcase runnable

Payout schedule

Showcase

Schedule payouts from the amount, cadence, and settlement delay.

Vibescript Showcase runnable

Quote approval

Showcase

Send each quote to the right approval step based on its total.

Vibescript Showcase runnable

Refund decision

Showcase

Use enums, money, and durations to decide whether to refund an order.

Vibescript Showcase runnable

Release readiness

Showcase

Report whether a release is ready from its state, approvals, and schedule.

Vibescript Showcase runnable

Reminder schedule

Showcase

Schedule reminders from a channel and lead time.

Vibescript Showcase runnable

Reshape a list

Showcase

Split a list into pages and rolling windows, then sample values.

Vibescript Showcase runnable

Resilient lookups

Showcase

Recover from missing hash keys and check float edge cases.

Vibescript Showcase runnable

Retry backoff schedule

Showcase

Build an exponential retry schedule with enums, durations, and timestamps.

Vibescript Showcase runnable

Send an email

Embedding

Build a welcome email and send it through a host email capability.

Vibescript Showcase runnable

Send an SMS

Embedding

Write a delivery update and send it through a host SMS capability.

Vibescript Showcase runnable

Session expiry

Showcase

Set a session expiry time from its risk level.

Vibescript Showcase runnable

Shipping quote

Showcase

Calculate delivery dates and prices for each shipping speed.

Vibescript Showcase runnable

Statement grid

Showcase

Turn rows of money values into totals for each category.

Vibescript Showcase runnable

Subscription billing

Showcase

Price a subscription invoice from the plan and quantity.

Vibescript Showcase runnable

Synchronous blocks

Showcase

Pass short-lived behavior directly to the function that uses it.

Vibescript Showcase runnable

Text toolkit

Showcase

Split, align, and inspect text with Ruby-style string helpers.

Vibescript Showcase runnable

Trial offer

Showcase

Build a trial offer from the account type and trial length.

Vibescript Showcase runnable

Value boundaries

Showcase

Update arrays and hashes without changing the values held by aliases.

Vibescript Showcase runnable

Word and symbol arrays

Showcase

Build explicit string and symbol arrays, with interpolation for generated names.

Arrays runnable

Extras

Reference

Use array helpers to search, sort, combine, and inspect values.

Background runnable

Jobs and Events

Reference

Queue jobs and publish events through APIs from the host app.

Basics runnable

Functions and Calls

Reference

Define functions, call other functions, and return values.

Basics runnable

Literals and Operators

Reference

Work with numbers, strings, arrays, hashes, and common operators.

Basics runnable

Namespaces

Reference

Group constants and module functions under a namespace.

Blocks runnable

Blocks Advanced

Reference

Filter, group, and reduce data with blocks.

Blocks runnable

Enumerable Reports

Reference

Group donations and total the money in each currency.

Blocks runnable

Blocks Transformations

Reference

Map, filter, and reduce collections with blocks.

Blocks runnable

Yield Patterns

Reference

Write functions that accept and yield to blocks.

Capabilities runnable

Context Access

Reference

Read the current user from context provided by the host app.

Capabilities runnable

Database Queries

Reference

Query and update data through a database API from the host app.

Capabilities runnable

Capabilities Iteration

Reference

Iterate over records returned by an API from the host app.

Collections runnable

Collections Arrays

Reference

Read, build, and update arrays.

Collections runnable

Hashes

Reference

Build, update, and read nested hashes.

Collections runnable

Symbols

Reference

Use labels, strings, and symbols in one string-key hash space.

Control Flow runnable

Case When

Reference

Match values and ranges with case and when.

Control Flow runnable

Conditionals

Reference

Choose values with if, elsif, else, and unless.

Control Flow runnable

Loop Control

Reference

Skip and stop loop iterations with next and break.

Control Flow runnable

Recursion

Reference

Write factorial and Fibonacci functions with recursion.

Control Flow runnable

Until Loop

Reference

Repeat work with an until loop.

Control Flow runnable

While Loop

Reference

Repeat work with a while loop.

Durations runnable

Durations

Reference

Create durations and add them together.

Enums runnable

Enums Operations

Reference

Define enums and inspect their values.

Errors runnable

Assertions

Reference

Check inputs with assertions.

Hashes runnable

Hashes Operations

Reference

Merge, search, and count values in hashes.

Hashes runnable

Hashes Transformations

Reference

Rename, filter, and transform hash keys and values.

Loops runnable

Loops Advanced

Reference

Nest loops and stop early with break.

Loops runnable

Fizzbuzz

Reference

Write FizzBuzz with a loop and conditionals.

Loops runnable

Loops Iteration

Reference

Iterate over ranges and arrays with common loop helpers.

Money runnable

Money Operations

Reference

Add, subtract, and compare money values.

Policies runnable

Access Control

Reference

Write access rules as small functions.

Ranges runnable

Usage

Reference

Create ascending and descending ranges, then filter their values.

Stdlib runnable

Core Utilities

Reference

Parse JSON and time values, then create IDs.

Strings runnable

Strings Operations

Reference

Normalize, split, search, and inspect strings.

Time runnable

Duration

Reference

Add durations to times and use duration arithmetic.

Rosetta Code Popular runnable

ABC Problem

Intermediate

Determine whether a word can be formed from a fixed set of two-letter blocks without reusing a block.

Rosetta Code Popular runnable

Ackermann Function

Intermediate

Run the Ackermann function on small inputs to show deep recursion.

Rosetta Code Popular runnable

Balanced Brackets

Easy

Check whether bracket pairs are properly nested and closed by scanning the text with a stack.

Rosetta Code Popular runnable

Binary Search

Easy

Locate values in a sorted array by repeatedly halving the remaining search interval.

Rosetta Code Popular runnable

Caesar Cipher

Easy

Encode and decode text by rotating alphabetic characters through a fixed shift.

Rosetta Code runnable

100 doors

Intro

Toggle one hundred doors and return the open door numbers.

Rosetta Code runnable

99 Bottles of Beer

beginner

Generate the full 99 Bottles of Beer song from 99 down to 0.

Rosetta Code runnable

Rosetta Code A+B

Intro

Add fixed integer pairs and return the resulting sums.

Rosetta Code runnable

Rosetta Code A+B

Intro

Return the sum of integer pairs.

Rosetta Code runnable

Abbreviations, automatic

Intro

Compute the shortest unique command prefixes for a fixed command set and resolve sample abbreviations.

Rosetta Code runnable

Abbreviations, simple

Intro

Resolve simple command abbreviations by matching unique prefixes from a fixed command list.

Rosetta Code runnable

Abundant odd numbers

Intro

Check a few well-known odd abundant numbers by comparing them with their proper divisor sums.

Rosetta Code runnable

Abundant, deficient and perfect number classifications

Intro

Classify sample integers by comparing them with the sum of their proper divisors.

Rosetta Code runnable

Align columns

Medium

Align Rosetta Code's dollar-delimited sample text into left, right, and centered columns.

Rosetta Code runnable

Aliquot sequence classifications

Medium

Build short aliquot sequences and classify whether they terminate, loop, or are perfect.

Rosetta Code runnable

Anagrams

Intro

Group a fixed word list into anagram sets using sorted-letter signatures.

Rosetta Code runnable

Angle difference between two bearings

Intro

Compute the smallest signed turn needed to move from one bearing to another.

Rosetta Code runnable

Angles (geometric), normalization and conversion

Intro

Normalize degree angles and convert between degrees and radians for fixed sample values.

Rosetta Code runnable

Rosetta Code Arrays

Intro

Create, index, append to, and total arrays.

Rosetta Code runnable

Bacon cipher

Medium

Encode and decode short messages with Bacon's five-letter A/B cipher.

Rosetta Code runnable

Balanced ternary

Intermediate

Convert small signed integers into balanced ternary using 1, 0, and T digits.

Rosetta Code runnable

Best shuffle

Medium

Produce a low-fixed-point shuffle by rotating the sorted characters of a word.

Rosetta Code runnable

Binary digits

Intro

Convert fixed non-negative integers into binary strings.

Rosetta Code runnable

Binary strings

Intro

Generate all binary strings of a fixed length with a simple recursive builder.

Rosetta Code runnable

Bitwise operations

Medium

Run common bitwise operations with a hand-built 8-bit model.

Rosetta Code runnable

Box the compass

Medium

Map degree headings to the correct 32-point compass names for the Rosetta Code sample bearings.

Rosetta Code runnable

Brazilian numbers

Medium

Find the first Brazilian numbers by searching for bases whose representation uses one repeated digit.

Rosetta Code runnable

Bubble sort

Easy

Sort an array of integers using the bubble sort algorithm.

Rosetta Code runnable

Call a function

Intro

Call functions with positional arguments and combine their results.

Rosetta Code runnable

Cartesian product of two or more lists

Intro

Build Cartesian products iteratively for a pair of lists and a three-list input.

Rosetta Code runnable

Catalan numbers

Intro

Generate the opening Catalan numbers with the standard multiplicative recurrence.

Rosetta Code runnable

Chinese zodiac

Intro

Map sample years to their Chinese zodiac animal and element.

Rosetta Code runnable

Conditional structures

Intro

Classify values with if, elsif, and else branches.

Rosetta Code runnable

Day of the week

Intro

Compute weekdays for fixed Gregorian dates with Zeller's congruence.

Rosetta Code runnable

Determine if a string is numeric

Intro

Recognize simple signed integer and decimal strings.

Rosetta Code runnable

Determine if a string is squeezable

Intro

Collapse repeated adjacent characters and compare the squeezed result with a target string.

Rosetta Code runnable

Digital root

Easy

Compute the digital root and additive persistence of a non-negative integer.

Rosetta Code runnable

Discordian date

Medium

Convert Gregorian dates into the Discordian calendar.

Rosetta Code runnable

Dot product

Intro

Compute the dot product of two vectors of equal length.

Rosetta Code runnable

Ethiopian multiplication

Intro

Multiply two integers by repeated halving, doubling, and summing odd rows.

Rosetta Code runnable

Factorial

Intro

Compute factorial values both recursively and iteratively, well past the 64-bit range.

Rosetta Code runnable

Factors of an integer

Intro

Compute all positive factors of a small positive integer with trial division up to its square root.

Rosetta Code runnable

Farey sequence

Medium

Generate Farey sequences of small orders with the classic iterative recurrence.

Rosetta Code runnable

Fibonacci n-step number sequences

Intro

Generate Tribonacci and Tetranacci sequences by summing the previous n terms.

Rosetta Code runnable

Fibonacci sequence

Intro

Produce the opening terms of the Fibonacci sequence iteratively.

Rosetta Code runnable

Fibonacci word

Intro

Build the opening Fibonacci words by concatenating the two previous terms.

Rosetta Code runnable

Find palindromic numbers in both binary and ternary bases

Medium

Search for numbers whose binary and ternary representations are both palindromes.

Rosetta Code runnable

Find words which contain the most consonants

Intro

Count consonants in a fixed word list and return the words with the highest totals.

Rosetta Code runnable

FizzBuzz

Intro

Emit the classic FizzBuzz sequence up to a chosen limit.

Rosetta Code runnable

Floyd's triangle

Intro

Generate the opening rows of Floyd's triangle.

Rosetta Code runnable

Four bit adder

Easy

Add two four-bit binary values and return the carry with the result bits.

Rosetta Code runnable

Fraction reduction

Intro

Reduce sample fractions to lowest terms with Euclid's algorithm.

Rosetta Code runnable

Gray code

Medium

Generate the 4-bit Gray code sequence with the standard reflective construction.

Rosetta Code runnable

Greatest common divisor

Intro

Compute greatest common divisors with the iterative Euclidean algorithm on a fixed sample set.

Rosetta Code runnable

Greedy algorithm for Egyptian fractions

Medium

Decompose sample rational numbers into Egyptian fractions with the standard greedy method, including inputs whose unit-fraction denominators run to 25 digits.

Rosetta Code runnable

Hailstone sequence

Intro

Build a hailstone sequence and report its length.

Rosetta Code runnable

Hamming numbers

Intermediate

Generate the opening Hamming numbers with the classic 2-3-5 pointer technique.

Rosetta Code runnable

Happy numbers

Intro

Classify happy numbers by iterating the sum-of-squares process and list the first twelve.

Rosetta Code runnable

Harshad or Niven series

Easy

Find Harshad (Niven) numbers, which are divisible by the sum of their digits.

Rosetta Code runnable

Heronian triangles

Medium

Search a small side-length range for Heronian triangles with integer area.

Rosetta Code runnable

Humble numbers

Intermediate

Generate humble numbers with the standard 2-3-5-7 pointer technique.

Rosetta Code runnable

I before E except after C

Intro

Check sample words against the classic “i before e except after c” spelling rule.

Rosetta Code runnable

Insertion sort

Easy

Sort an array by repeatedly inserting each element into its correct position.

Rosetta Code runnable

Isqrt (integer square root) of X

Intro

Compute integer square roots with a binary search over fixed sample inputs.

Rosetta Code runnable

Josephus problem

Medium

Find the survivor position in the Josephus problem for n people counting every k-th.

Rosetta Code runnable

Kaprekar numbers

Intro

Test fixed integers for the Kaprekar split-square property.

Rosetta Code runnable

Kaprekar routine

Medium

Apply the Kaprekar routine to a 4-digit number and watch it converge to 6174.

Rosetta Code runnable

Last letter-first letter

Intermediate

Build a word chain where each next word starts with the previous word's last letter.

Rosetta Code runnable

Leap year

Intro

Determine whether a given year is a leap year using the Gregorian calendar rules.

Rosetta Code runnable

Letter frequency

Intro

Count alphabetic character frequencies in a sample phrase.

Rosetta Code runnable

Levenshtein distance

Medium

Compute edit distance with insert, delete, and substitute operations using a single rolling row.

Rosetta Code runnable

Long multiplication

Intro

Break a multiplication problem into the partial products used by long multiplication.

Rosetta Code runnable

Look-and-say sequence

Easy

Generate terms of the look-and-say sequence where each term describes the digits of the previous one.

Rosetta Code runnable

Luhn test of credit card numbers

Easy

Validate account numbers with the Luhn checksum.

Rosetta Code runnable

Lychrel numbers

Intro

Check sample numbers for palindrome formation under 200 rounds of the reverse-and-add process, where sums grow far past 64 bits.

Rosetta Code runnable

Magic squares of odd order

Medium

Build a 3x3 magic square with the classic Siamese method.

Rosetta Code runnable

Matrix multiplication

Medium

Multiply two small matrices.

Rosetta Code runnable

Matrix transposition

Easy

Transpose a matrix by swapping its rows and columns with the built-in Array#transpose.

Rosetta Code runnable

Middle three digits

Intro

Return the middle three digits of integers that have an odd number of digits.

Rosetta Code runnable

Minimum multiple of m where digital sum equals m

Intro

Search small multiples until the digit sum matches the divisor.

Rosetta Code runnable

Morse code

Easy

Encode text to Morse code using a fixed A-Z and digit lookup table.

Rosetta Code runnable

Multiplication tables

Intro

Build a small multiplication table as nested arrays.

Rosetta Code runnable

N-smooth numbers

Intro

Generate the first twenty 5-smooth numbers by stripping allowed small factors.

Rosetta Code runnable

Narcissistic decimal number

Intro

Identify fixed sample numbers that equal the sum of their digits raised to the digit count.

Rosetta Code runnable

Natural sorting

Medium

Sort filenames by comparing embedded digit runs numerically instead of lexicographically.

Rosetta Code runnable

Number names

Intermediate

Spell small whole numbers in English.

Rosetta Code runnable

Numerical integration

Intro

Approximate definite integrals with the trapezoidal rule over fixed functions.

Rosetta Code runnable

Palindrome detection

Intro

Detect palindromes after normalizing letters and digits to lowercase.

Rosetta Code runnable

Palindromic gapful numbers

Medium

Find the first palindromic gapful numbers in a bounded decimal range.

Rosetta Code runnable

Pangram checker

Intro

Check whether a sentence contains every letter of the alphabet at least once.

Rosetta Code runnable

Parse an IP Address

Easy

Parse dotted IPv4 strings into four validated octets.

Rosetta Code runnable

Pascal's triangle

Intro

Generate the opening rows of Pascal's triangle iteratively.

Rosetta Code runnable

Permutations

Intro

Generate every permutation of three items with a simple recursive backtracking routine.

Rosetta Code runnable

Pig Latin

Easy

Translate English words into Pig Latin by moving leading consonants and appending ay.

Rosetta Code runnable

Playing cards

Intro

Construct a standard 52-card deck from suit and rank combinations.

Rosetta Code runnable

Prime decomposition

Medium

Find the prime factors of composite integers with trial division.

Rosetta Code runnable

Priority queue

Medium

Model a simple highest-priority-first queue with sorted insertion over an array-backed store.

Rosetta Code runnable

Pythagorean triples

Intro

Enumerate small Pythagorean triples with bounded hypotenuse.

Rosetta Code runnable

Range extraction

Medium

Compress an ordered list of integers into Rosetta Code's comma-and-range string format.

Rosetta Code runnable

Roman numerals/Decode

Easy

Convert a Roman numeral string back to its integer value.

Rosetta Code runnable

Roman numerals/Encode

Easy

Convert an integer to its Roman numeral representation.

Rosetta Code runnable

Rot-13

Intro

Encode and decode text by rotating letters by thirteen positions.

Rosetta Code runnable

Run-length encoding

Easy

Encode and decode a short sample string with classic run-length encoding.

Rosetta Code runnable

Selection sort

Easy

Sort an array by repeatedly selecting the minimum element from the unsorted portion.

Rosetta Code runnable

Sequence of primorial primes

Medium

Check primorial minus one and plus one values for primality over a short prime prefix.

Rosetta Code runnable

Set

Intro

Find the union, intersection, and difference of array-backed sets.

Rosetta Code runnable

Show ASCII table

Intro

Return a compact slice of ASCII rows with code, character, and ordinal data.

Rosetta Code runnable

Sieve of Eratosthenes

Intro

Generate the prime numbers up to fifty with the classic sieve.

Rosetta Code runnable

Smith numbers

Medium

Detect Smith numbers by comparing the digit sum of a composite integer with the digit sum of its prime factors.

Rosetta Code runnable

Spiral matrix

Medium

Fill a square matrix in clockwise spiral order.

Rosetta Code runnable

Square-free integers

Intro

List the square-free integers up to thirty.

Rosetta Code runnable

Stack

Easy

Model a small LIFO stack with push, pop, and peek over an array-backed store.

Rosetta Code runnable

String comparison

Intro

Compare sample string pairs lexicographically and report the sign of each comparison.

Rosetta Code runnable

String matching

Intro

Find every starting index of a pattern inside a fixed string with a naive scan.

Rosetta Code runnable

Substring

Intro

Extract substrings from a source string using start offsets and lengths.

Rosetta Code runnable

Sum multiples of 3 and 5

Intro

Sum the integers below fixed limits that are divisible by three or five.

Rosetta Code runnable

Taxicab numbers

Medium

Search a small cube-sum table for numbers that can be written as two sums of two cubes.

Rosetta Code runnable

Temperature conversion

Intro

Convert values between Celsius and Fahrenheit.

Rosetta Code runnable

Ternary logic

Medium

Build a small truth table for three-valued logic with true, maybe, and false states.

Rosetta Code runnable

Top rank per group

Intro

Pick the highest-scoring row from each group with a stable tie-break on name.

Rosetta Code runnable

Topological sort

Medium

Topologically sort a small dependency graph with Kahn's algorithm.

Rosetta Code runnable

Total circles area

Intro

Sum the areas of several circles from their radii.

Rosetta Code runnable

Towers of Hanoi

Medium

Solve Towers of Hanoi recursively and return each move in order.

Rosetta Code runnable

Tree traversal

Medium

Traverse a small binary tree in preorder, inorder, postorder, and level order.

Rosetta Code runnable

Truth table

Intro

Enumerate boolean combinations for common logical operators.

Rosetta Code runnable

UPC

Intro

Validate sample UPC codes with the standard checksum rule.

Rosetta Code runnable

URL parser

Intro

Parse a fixed URL into scheme, host, path, and query parameters.

Rosetta Code runnable

UTF-8 encode and decode

Medium

Encode fixed code points into UTF-8 byte arrays and decode them back.

Rosetta Code runnable

Variables

Intro

Show variable assignment, reassignment, and derived values.

Rosetta Code runnable

Vector products

Intro

Compute the dot product and cross product of two fixed three-dimensional vectors.

Rosetta Code runnable

Vigenère cipher

Medium

Encode and decode a short uppercase message with a fixed Vigenère key.

Rosetta Code runnable

Word frequency

Intro

Count the frequency of normalized words in a short sample passage.

Rosetta Code runnable

Word wrap

Intro

Wrap a paragraph with the standard greedy algorithm at two different column widths.

Rosetta Code runnable

Zeckendorf number representation

Medium

Represent integers as sums of non-consecutive Fibonacci numbers using Zeckendorf's theorem.

Rosetta Code runnable

Zig-zag matrix

Medium

Fill a small square matrix with zig-zag diagonal ordering.