Vibescript Showcase runnable

Approval chain

Build a release approval process with states and deadlines.

Vibescript Showcase runnable

Batch enrichment

Add fields to many records at the same time with Tasks.map.

Vibescript Showcase runnable

Batch pipeline

Split records into batches, process them at the same time, and sort the results.

Vibescript Showcase runnable

Big integers

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

Vibescript Showcase runnable

Bounded fanout

Limit how many tasks run at once with max:.

Vibescript Showcase runnable

Chudnovsky π

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

Vibescript Showcase runnable

Concurrent scoring

Score many records at the same time with Tasks.map.

Vibescript Showcase runnable

Digest schedule

Schedule digest jobs from a cadence and a time window.

Vibescript Showcase runnable

Escalation policy

Route support tickets from their severity and response deadline.

Vibescript Showcase runnable

Event timestamps

Format RFC3339 timestamps with whole or fractional seconds.

Vibescript Showcase runnable

Hash projection

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

Vibescript Showcase runnable

Late fee

Calculate a late fee from an overdue duration.

Vibescript Showcase runnable

Late fee policy

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

Vibescript Showcase runnable

Log digest

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

Vibescript Showcase runnable

Maintenance window

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

Vibescript Showcase runnable

Matrix report

Turn rows of daily metrics into totals for each metric.

Vibescript Showcase runnable

Numeric literals and rounding

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

Vibescript Showcase runnable

On-call handoff

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

Vibescript Showcase runnable

Parallel preparation

Run independent functions in one Tasks.run block and combine their results.

Vibescript Showcase runnable

Payout schedule

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

Vibescript Showcase runnable

Quote approval

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

Vibescript Showcase runnable

Refund decision

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

Vibescript Showcase runnable

Release readiness

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

Vibescript Showcase runnable

Reminder schedule

Schedule reminders from a channel and lead time.

Vibescript Showcase runnable

Reshape a list

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

Vibescript Showcase runnable

Resilient lookups

Recover from missing hash keys and check float edge cases.

Vibescript Showcase runnable

Retry backoff schedule

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

Vibescript Showcase runnable

Session expiry

Set a session expiry time from its risk level.

Vibescript Showcase runnable

Shipping quote

Calculate delivery dates and prices for each shipping speed.

Vibescript Showcase runnable

Staged barrier

Start a batch of tasks, wait for all of them, then total the results.

Vibescript Showcase runnable

Statement grid

Turn rows of money values into totals for each category.

Vibescript Showcase runnable

Subscription billing

Price a subscription invoice from the plan and quantity.

Vibescript Showcase runnable

Task error propagation

Catch a task error by wrapping Tasks.run in begin and rescue.

Vibescript Showcase runnable

Text toolkit

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

Vibescript Showcase runnable

Trial offer

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

Vibescript Showcase runnable

Word and symbol arrays

Build string and symbol arrays with %w, %i, %W, and %I.

Arrays runnable

Extras

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

Background runnable

Jobs And Events

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

Basics runnable

Functions And Calls

Define functions, call other functions, and return values.

Basics runnable

Literals And Operators

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

Blocks runnable

Blocks Advanced

Filter, group, and reduce data with blocks.

Blocks runnable

Blocks Transformations

Map, filter, and reduce collections with blocks.

Blocks runnable

Enumerable Reports

Group donations and total the money in each currency.

Blocks runnable

Yield Patterns

Write functions that accept and yield to blocks.

Capabilities runnable

Capabilities Iteration

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

Capabilities runnable

Context Access

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

Capabilities runnable

Database Queries

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

Collections runnable

Collections Arrays

Read, build, and update arrays.

Collections runnable

Hashes

Build, update, and read nested hashes.

Collections runnable

Symbols

Use symbols as stable hash keys.

Control Flow runnable

Case When

Match values and ranges with case and when.

Control Flow runnable

Conditionals

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

Control Flow runnable

Loop Control

Skip and stop loop iterations with next and break.

Control Flow runnable

Recursion

Write factorial and Fibonacci functions with recursion.

Control Flow runnable

Until Loop

Repeat work with an until loop.

Control Flow runnable

While Loop

Repeat work with a while loop.

Durations runnable

Durations

Create durations and add them together.

Enums runnable

Enums Operations

Define enums and inspect their values.

Errors runnable

Assertions

Check inputs with assertions.

Hashes runnable

Hashes Operations

Merge, search, and count values in hashes.

Hashes runnable

Hashes Transformations

Rename, filter, and transform hash keys and values.

Loops runnable

Fizzbuzz

Write FizzBuzz with a loop and conditionals.

Loops runnable

Loops Advanced

Nest loops and stop early with break.

Loops runnable

Loops Iteration

Iterate over ranges and arrays with common loop helpers.

Money runnable

Money Operations

Add, subtract, and compare money values.

Policies runnable

Access Control

Write access rules as small functions.

Ranges runnable

Usage

Create ascending and descending ranges, then filter their values.

Stdlib runnable

Core Utilities

Parse JSON and time values, then create IDs.

Strings runnable

Strings Operations

Normalize, split, search, and inspect strings.

Tasks runnable

Scoring

Run independent scoring and preparation functions at the same time.

Time runnable

Duration

Add durations to times and use duration arithmetic.

Rosetta Code runnable

100 doors

Toggle one hundred doors and return the open door numbers.

Rosetta Code runnable

99 Bottles of Beer

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

Rosetta Code runnable

Abbreviations, automatic

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

Rosetta Code runnable

Abbreviations, simple

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

Rosetta Code runnable

Abundant odd numbers

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

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

Rosetta Code runnable

Align columns

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

Rosetta Code runnable

Aliquot sequence classifications

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

Rosetta Code runnable

Anagrams

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

Rosetta Code runnable

Angle difference between two bearings

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

Rosetta Code runnable

Angles (geometric), normalization and conversion

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

Rosetta Code runnable

Bacon cipher

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

Rosetta Code runnable

Balanced ternary

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

Rosetta Code runnable

Best shuffle

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

Rosetta Code runnable

Binary digits

Convert fixed non-negative integers into binary strings.

Rosetta Code runnable

Binary strings

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

Rosetta Code runnable

Bitwise operations

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

Rosetta Code runnable

Box the compass

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

Rosetta Code runnable

Brazilian numbers

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

Rosetta Code runnable

Bubble sort

Sort an array of integers using the bubble sort algorithm.

Rosetta Code runnable

Call a function

Call functions with positional arguments and combine their results.

Rosetta Code runnable

Cartesian product of two or more lists

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

Rosetta Code runnable

Catalan numbers

Generate the opening Catalan numbers with the standard multiplicative recurrence.

Rosetta Code runnable

Chinese zodiac

Map sample years to their Chinese zodiac animal and element.

Rosetta Code runnable

Conditional structures

Classify values with if, elsif, and else branches.

Rosetta Code runnable

Day of the week

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

Rosetta Code runnable

Determine if a string is numeric

Recognize simple signed integer and decimal strings.

Rosetta Code runnable

Determine if a string is squeezable

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

Rosetta Code runnable

Digital root

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

Rosetta Code runnable

Discordian date

Convert Gregorian dates into the Discordian calendar.

Rosetta Code runnable

Dot product

Compute the dot product of two vectors of equal length.

Rosetta Code runnable

Ethiopian multiplication

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

Rosetta Code runnable

Factorial

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

Rosetta Code runnable

Factors of an integer

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

Rosetta Code runnable

Farey sequence

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

Rosetta Code runnable

Fibonacci n-step number sequences

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

Rosetta Code runnable

Fibonacci sequence

Produce the opening terms of the Fibonacci sequence iteratively.

Rosetta Code runnable

Fibonacci word

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

Rosetta Code runnable

Find palindromic numbers in both binary and ternary bases

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

Rosetta Code runnable

Find words which contain the most consonants

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

Rosetta Code runnable

FizzBuzz

Emit the classic FizzBuzz sequence up to a chosen limit.

Rosetta Code runnable

Floyd's triangle

Generate the opening rows of Floyd's triangle.

Rosetta Code runnable

Four bit adder

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

Rosetta Code runnable

Fraction reduction

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

Rosetta Code runnable

Gray code

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

Rosetta Code runnable

Greatest common divisor

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

Rosetta Code runnable

Greedy algorithm for Egyptian fractions

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

Build a hailstone sequence and report its length.

Rosetta Code runnable

Hamming numbers

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

Rosetta Code runnable

Happy numbers

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

Rosetta Code runnable

Harshad or Niven series

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

Rosetta Code runnable

Heronian triangles

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

Rosetta Code runnable

Humble numbers

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

Rosetta Code runnable

I before E except after C

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

Rosetta Code runnable

Insertion sort

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

Rosetta Code runnable

Isqrt (integer square root) of X

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

Rosetta Code runnable

Josephus problem

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

Rosetta Code runnable

Kaprekar numbers

Test fixed integers for the Kaprekar split-square property.

Rosetta Code runnable

Kaprekar routine

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

Rosetta Code runnable

Last letter-first letter

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

Rosetta Code runnable

Leap year

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

Rosetta Code runnable

Letter frequency

Count alphabetic character frequencies in a sample phrase.

Rosetta Code runnable

Levenshtein distance

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

Rosetta Code runnable

Long multiplication

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

Rosetta Code runnable

Look-and-say sequence

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

Validate account numbers with the Luhn checksum.

Rosetta Code runnable

Lychrel numbers

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

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

Rosetta Code runnable

Matrix multiplication

Multiply two small matrices.

Rosetta Code runnable

Matrix transposition

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

Rosetta Code runnable

Middle three digits

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

Search small multiples until the digit sum matches the divisor.

Rosetta Code runnable

Morse code

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

Rosetta Code runnable

Multiplication tables

Build a small multiplication table as nested arrays.

Rosetta Code runnable

N-smooth numbers

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

Rosetta Code runnable

Narcissistic decimal number

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

Rosetta Code runnable

Natural sorting

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

Rosetta Code runnable

Number names

Spell small whole numbers in English.

Rosetta Code runnable

Numerical integration

Approximate definite integrals with the trapezoidal rule over fixed functions.

Rosetta Code runnable

Palindrome detection

Detect palindromes after normalizing letters and digits to lowercase.

Rosetta Code runnable

Palindromic gapful numbers

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

Rosetta Code runnable

Pangram checker

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

Rosetta Code runnable

Parse an IP Address

Parse dotted IPv4 strings into four validated octets.

Rosetta Code runnable

Pascal's triangle

Generate the opening rows of Pascal's triangle iteratively.

Rosetta Code runnable

Permutations

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

Rosetta Code runnable

Pig Latin

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

Rosetta Code runnable

Playing cards

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

Rosetta Code runnable

Prime decomposition

Find the prime factors of composite integers with trial division.

Rosetta Code runnable

Priority queue

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

Rosetta Code runnable

Pythagorean triples

Enumerate small Pythagorean triples with bounded hypotenuse.

Rosetta Code runnable

Range extraction

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

Rosetta Code runnable

Roman numerals/Decode

Convert a Roman numeral string back to its integer value.

Rosetta Code runnable

Roman numerals/Encode

Convert an integer to its Roman numeral representation.

Rosetta Code runnable

Rosetta Code A+B

Add fixed integer pairs and return the resulting sums.

Rosetta Code runnable

Rosetta Code A+B

Return the sum of integer pairs.

Rosetta Code runnable

Rosetta Code Arrays

Create, index, append to, and total arrays.

Rosetta Code runnable

Rot-13

Encode and decode text by rotating letters by thirteen positions.

Rosetta Code runnable

Run-length encoding

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

Rosetta Code runnable

Selection sort

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

Rosetta Code runnable

Sequence of primorial primes

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

Rosetta Code runnable

Set

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

Rosetta Code runnable

Show ASCII table

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

Rosetta Code runnable

Sieve of Eratosthenes

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

Rosetta Code runnable

Smith numbers

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

Fill a square matrix in clockwise spiral order.

Rosetta Code runnable

Square-free integers

List the square-free integers up to thirty.

Rosetta Code runnable

Stack

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

Rosetta Code runnable

String comparison

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

Rosetta Code runnable

String matching

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

Rosetta Code runnable

Substring

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

Rosetta Code runnable

Sum multiples of 3 and 5

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

Rosetta Code runnable

Taxicab numbers

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

Rosetta Code runnable

Temperature conversion

Convert values between Celsius and Fahrenheit.

Rosetta Code runnable

Ternary logic

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

Rosetta Code runnable

Top rank per group

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

Rosetta Code runnable

Topological sort

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

Rosetta Code runnable

Total circles area

Sum the areas of several circles from their radii.

Rosetta Code runnable

Towers of Hanoi

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

Rosetta Code runnable

Tree traversal

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

Rosetta Code runnable

Truth table

Enumerate boolean combinations for common logical operators.

Rosetta Code runnable

UPC

Validate sample UPC codes with the standard checksum rule.

Rosetta Code runnable

URL parser

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

Rosetta Code runnable

UTF-8 encode and decode

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

Rosetta Code runnable

Variables

Show variable assignment, reassignment, and derived values.

Rosetta Code runnable

Vector products

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

Rosetta Code runnable

Vigenère cipher

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

Rosetta Code runnable

Word frequency

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

Rosetta Code runnable

Word wrap

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

Rosetta Code runnable

Zeckendorf number representation

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

Rosetta Code runnable

Zig-zag matrix

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

Rosetta Code Popular runnable

ABC Problem

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

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

Rosetta Code Popular runnable

Balanced Brackets

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

Rosetta Code Popular runnable

Binary Search

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

Rosetta Code Popular runnable

Caesar Cipher

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