### Evy: Jumping Right In Source: https://github.com/evylang/evy/wiki/White A basic example to get started with Evy, demonstrating fundamental syntax and execution. ```evy import "evy/draw" draw.circle(x: 50, y: 50, r: 20, color: "red") draw.rect(x: 70, y: 70, w: 30, h: 30, color: "blue") ``` -------------------------------- ### Getting Started with Evy Commands Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/index.html This section introduces basic Evy commands and provides links to introductory exercises. It covers the 'print' command and related demos for txtar, parse errors, and free text. ```evy * [`print` command](intro.html) * [Exercise: `print` 👈](exercise1/index.html) * [Exercise: txtar demo 👈](exercise-txtar/index.html) * [Exercise: parse error demo 👈](exercise-parse-error/index.html) * [Exercise: free text demo 👈](exercise-text/index.html) * [Quiz: drawing and print ✨](quiz1.html) ``` -------------------------------- ### Getting Started with Evy Commands Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/index.html This section introduces basic Evy commands and provides links to introductory exercises. It covers the 'print' command and related demos for txtar, parse errors, and free text. ```evy * [`print` command](intro.html) * [Exercise: `print` 👈](exercise1/index.html) * [Exercise: txtar demo 👈](exercise-txtar/index.html) * [Exercise: parse error demo 👈](exercise-parse-error/index.html) * [Exercise: free text demo 👈](exercise-text/index.html) * [Quiz: drawing and print ✨](quiz1.html) ``` -------------------------------- ### Evy Serve Start Command Source: https://github.com/evylang/evy/blob/main/frontend/docs/usage.html Details for starting the Evy web server using 'evy serve start'. Includes flags for configuring the port, network interfaces, and serving directories. ```APIDOC evy serve start --help Usage: evy serve start [flags] Start web server, default for "evy serve". Flags: -h, --help Show context-sensitive help. -V, --version Print version information -p, --port=8080 Port to listen on ($EVY_PORT) -a, --all-interfaces Listen only on all interfaces not just localhost ($EVY_ALL_INTERFACES) -d, --dir=DIR Directory to serve instead of embedded content --root=DIR Directory to use as root for serving, subdirectory of DIR if given, eg "play", "docs" ``` -------------------------------- ### Evy Hello World Program Source: https://github.com/evylang/evy/blob/main/frontend/lab/samples/intro/helloworld.md This is a basic Evy program that prints 'Hello, World!' to the console. It serves as an introductory example for new users. ```evy print("Hello, World!") ``` -------------------------------- ### For Loop with Number Range Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Explains how to use for loops with number ranges in Evy, including specifying start, end, and step values. ```evy for x := range 5 print x // 0 1 2 3 4 end for x := range 5 10 print x // 5 6 7 8 9 end for x := range 1 10 2 // from to step print x // 1 3 5 7 9 end for x := range -10 print x // nothing. step is 1 by default. end ``` -------------------------------- ### Evy Print Command Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/cls/q-cls4.html Demonstrates the usage of the 'print' command in Evy to output text to the console. This example shows how to produce specific output by sequencing print statements. ```evy print "ho" cls print "hi" cls print "ho" ``` ```evy print "hi" cls print "hi" print "ho" ``` ```evy print "hi" cls print "hi" cls print "ho" print "hi" ``` ```evy print "hi" cls print "ho" ``` -------------------------------- ### Function Calls Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Provides examples of calling previously defined functions in Evy, including those with multiple arguments and variadic functions. ```evy // previous function definitions func add:num a:num b:num return a + b end func foxprint s:string print "🦊 "+s end func list args:any... print args end n := add 1 2 print n // 3 foxprint "🐾" // 🦊 🐾 list 2 true "blue" // [2 true blue] ``` -------------------------------- ### Evy Print Sequence Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/course1/unit1/exercise-txtar/q-print2.md Demonstrates how the 'print' sequence in Evy generates output. This example is useful for understanding basic I/O operations and program execution flow in Evy. ```evy print("Hello, Evy!") ``` -------------------------------- ### Evy Print Command Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/cls/q-cls4.html Demonstrates the usage of the 'print' command in Evy to output text to the console. This example shows how to produce specific output by sequencing print statements. ```evy print "ho" cls print "hi" cls print "ho" ``` ```evy print "hi" cls print "hi" print "ho" ``` ```evy print "hi" cls print "hi" cls print "ho" print "hi" ``` ```evy print "hi" cls print "ho" ``` -------------------------------- ### Evy print command example Source: https://github.com/evylang/evy/blob/main/learn/content/foundation/sequence/print/q-countdown.md Demonstrates the usage of the `print` command in Evy, specifically showing how it handles spaces in the output. This example is useful for understanding string formatting and output behavior in Evy. ```evy print("Hello World!") print("Hello World!") ``` -------------------------------- ### Evy Function Calls Source: https://github.com/evylang/evy/blob/main/docs/syntax-by-example.md Provides examples of calling previously defined functions, including those with specified return types, no return types, and variadic functions. ```evy n := add 1 2 print n // 3 foxprint "🐾" // 🦊 🐾 list 2 true "blue" // [2 true blue] // previous function definitions func add:num a:num b:num return a + b end func foxprint s:string print "🦊 "+s end func list args:any... print args end ``` -------------------------------- ### Evy 'print' Command Example Source: https://github.com/evylang/evy/blob/main/frontend/learn/foundation/sequence/evy.html This is a basic Evy program that demonstrates the 'print' command to output text to the screen. It's a fundamental example for beginners learning sequential execution in Evy. ```evy print "Hello world" ``` -------------------------------- ### Evy Print Command Output Formatting Source: https://github.com/evylang/evy/blob/main/learn/content/foundation/sequence/print/q-countdown-inverted.md Demonstrates how the `print` command in Evy handles spacing and newlines to produce specific output. This example is crucial for understanding precise output control. ```evy print("1 2 3") print("1 2 3") print("1 2 3") ``` -------------------------------- ### Event Handling for Key Presses in Evy Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Provides an example of an event handler in Evy that listens for key press events. When a key is pressed, it prints a message indicating the key pressed. ```evy on key k:string print "key:" k end ``` -------------------------------- ### Evy `for`...`range` with Numbers Source: https://github.com/evylang/evy/blob/main/docs/syntax-by-example.md Demonstrates the `for` loop with the `range` keyword for iterating over sequences of numbers. Covers single-value range (start from 0), two-value range (start and end), and three-value range (start, end, step). ```evy for x := range 5 print x // 0 1 2 3 4 end for x := range 5 10 print x // 5 6 7 8 9 end for x := range 1 10 2 // from to step print x // 1 3 5 7 9 end for x := range -10 print x // nothing. step is 1 by default. end ``` -------------------------------- ### Evy Circle Drawing Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/shape/q-circle4.html This snippet demonstrates how to draw a circle using the 'circle' command in Evy. It assumes a preceding 'move' command to set the starting position. ```evy move 20 20 circle 10 ``` ```evy move 20 80 circle 10 ``` ```evy move 80 20 circle 10 ``` ```evy move 80 80 circle 10 ``` -------------------------------- ### evy serve start Command Source: https://github.com/evylang/evy/blob/main/docs/usage.md Command to start the Evy web server. It can serve embedded content or content from a specified directory, and allows configuration of the listening port and interface. ```APIDOC Usage: evy serve start [flags] Start web server, default for "evy serve". Flags: -h, --help Show context-sensitive help. -V, --version Print version information -p, --port=8080 Port to listen on ($EVY_PORT) -a, --all-interfaces Listen only on all interfaces not just localhost ($EVY_ALL_INTERFACES) -d, --dir=DIR Directory to serve instead of embedded content --root=DIR Directory to use as root for serving, subdirectory of DIR if given, eg "play", "docs" ``` -------------------------------- ### Evy Circle Drawing Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/shape/q-circle4.html This snippet demonstrates how to draw a circle using the 'circle' command in Evy. It assumes a preceding 'move' command to set the starting position. ```evy move 20 20 circle 10 ``` ```evy move 20 80 circle 10 ``` ```evy move 80 20 circle 10 ``` ```evy move 80 80 circle 10 ``` -------------------------------- ### Evy 'move' Event Handler Example Source: https://github.com/evylang/evy/blob/main/frontend/docs/builtins.html This example demonstrates drawing a line that follows the pointer's movement. It uses 'down' to start drawing and 'up' to stop. ```evy down := false width 1 on down x:num y:num down = true move x y end on move x:num y:num if down line x y end end on up down = false end ``` -------------------------------- ### Evy for Loop Example: Default Step and Start Source: https://github.com/evylang/evy/blob/main/frontend/lab/samples/forloops/forwhile.md Illustrates an Evy 'for' loop where the 'START' and 'STEP' values are omitted, relying on their default values (0 and 1 respectively). This loop prints 'hello' three times. ```evy for range 3 print "hello" end ``` -------------------------------- ### Array Slicing Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Shows how to extract sub-arrays (slices) from an existing array using start and end indices in Evy. ```evy a := [1 2 3] b := a[:2] // [1 2] b = a[1:2] // [2] b = a[-2:] // [2 3] ``` -------------------------------- ### Evy Command Line Help Source: https://github.com/evylang/evy/blob/main/frontend/docs/usage.html Examples of how to access help documentation for various Evy command-line operations. ```bash evy --help evys run --help evys fmt --help evys serve [start] --help evys serve export --help ``` -------------------------------- ### Evy Syntax Examples Source: https://github.com/evylang/evy/blob/main/frontend/docs/index.html Illustrates fundamental Evy programming concepts through practical examples, including comments, declarations, assignments, expressions, control flow (if/loops), function definitions, array and map manipulations, type handling, and event management. ```evy // Comment example let x = 10; // Declaration and assignment let y = x * 2; // Expression if x > 5 { print("x is greater than 5"); } else { print("x is not greater than 5"); } // Loop example for i in range(5) { print(i); } // Function definition func greet(name string) { print("Hello, " + name); } greet("World"); // Array example let arr = [1, 2, 3]; print(arr[0]); // Array element access let arr2 = arr + [4, 5]; // Concatenation let arr3 = arr * 3; // Repetition let slicedArr = arr[1:3]; // Slicing // Map example let myMap = {"key": "value"}; print(myMap["key"]); // Map value access // Type inspection let value: any = 10; print(typeof(value)); // Output: number let assertedValue = value as number; ``` -------------------------------- ### Evy Array Slicing Source: https://github.com/evylang/evy/blob/main/docs/syntax-by-example.md Illustrates how to extract sub-arrays (slices) using various slicing notations, including start, end, and negative indices. ```evy a := [1 2 3] b := a[:2] // [1 2] b = a[1:2] // [2] b = a[-2:] // [2 3] ``` -------------------------------- ### Evy Built-ins: Type Functions Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Explains the 'len' function for getting the length of collections and the 'typeof' function for determining the data type of a variable in Evy. ```evy let arr = [1, 2, 3] print(len(arr)) // Output: 3 let str = "hello" print(len(str)) // Output: 5 let num = 123 print(typeof(num)) // Output: int ``` -------------------------------- ### Hello Evy Example Source: https://github.com/evylang/evy/wiki/Gallery A simple 'Hello Evy' program created by Jim M. This serves as a basic introduction to the Evy language. ```evy Source: https://play.evy.dev/#content=H4sIAAAAAAAAA3VSS07DMBTc9xSPrBKg4CRNiyLBDokFl0jTF2rJsSXb/YF6BlasWHAKEOfhAnAE/EndpgIrvzfjGY+fIzhUnLaVRmhVyRftAMyoGVYSotWcaowGHhJMGKgWkjdMrFBO2cJwlmrFEoEAcYXEWkNKCOSkJ9wgM7IDwRUxl59BpVnQiAZ7dkJgUriyEVzDk/u0Q9FHLNOxq7fuqXGtIfp5e/n4/nzupxWy4g9dyhWd6TlknacECuU1OB7ijCRhAT1HXVkug1PIL9KReVG4hIyEKS5hbDZwBmlu6LgWyuuSZIdbdawo3+FBzCgP4uIf8egvMfKZ39zaprMtHkLcKhOt6OLTxnA3cBR0DXFuXfOdqRcZA5Ic5PJt/Hp99+1CpjBwXTslzqKAHZ3L/myyHtZULWWbMroXU6VRnoOquBoqlLTZe237iVMC4+Io2J39f+B2uTk5iUI77P0LwGwUg8ICAAA= ``` -------------------------------- ### Local Development and Testing Commands Source: https://github.com/evylang/evy/blob/main/frontend/docs/development/upgrade.html Commands for starting a local server, running end-to-end tests, updating snapshots, and testing external URLs. Includes options for Dockerized testing and serving on all interfaces. ```makefile make serve make e2e make snaps make e2e USE_DOCKER=1 make snaps USE_DOCKER=1 make serve SERVEDIR_ALL_INTERFACES=1 make ci make test-urls ``` -------------------------------- ### Evy repr Function Example Source: https://github.com/evylang/evy/blob/main/docs/builtins.md Demonstrates the usage of the `repr` function in Evy to get a string representation of arguments. The output shows how numbers and strings are formatted. ```evy s := repr 1 "abc" print s ``` ```evy:output 1 "abc" ``` -------------------------------- ### Evy Parse Error Example (Unterminated String) Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-parse-error/index.html This code snippet intentionally contains a parse error due to an unterminated string literal. The string starts with a double quote but does not have a closing double quote. ```evy print "🍌 ``` -------------------------------- ### Evy Syntax: Comments, Declarations, Assignments, Expressions Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Demonstrates basic Evy syntax including single-line comments, variable declarations, assignments, and simple expressions. This forms the foundation for writing Evy programs. ```evy // This is a single-line comment // Declaration let count: int // Assignment count = 10 // Expression let result = count * 2 ``` -------------------------------- ### Evy Command-Line Usage Source: https://github.com/evylang/evy/blob/main/frontend/docs/index.html Documentation for the Evy command-line interface. This includes help commands for the main `evy` command and its subcommands like `run`, `fmt`, and `serve`. ```evy /* Evy CLI Commands: evy --help evy run --help evy fmt --help evy serve [start] --help evy serve export --help */ ``` -------------------------------- ### Evy Sequence Commands: move and circle Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/shape/q-circle2.html Demonstrates the usage of 'move' and 'circle' commands in Evy. The 'move' command likely sets a starting position, and 'circle' draws a circle. The example shows a sequence of these commands. ```evy move 20 80 circle 10 ``` -------------------------------- ### Evy print command examples Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise1/question-link4.html Demonstrates the usage of the 'print' command in Evy to output text. It shows different ways to print strings and combinations of strings. ```evy print hi ``` ```evy print "hi" ``` ```evy print "print hi" ``` ```evy print "print" "hi" ``` ```evy print "hi print hi" ``` -------------------------------- ### Evy Parse Error Example: Unclosed String Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-parse-error/q-parse-error.html This snippet demonstrates a common parse error in Evy caused by an unclosed string literal. The program fails to compile because the string starting with '🍌' is not properly terminated with a closing quote. ```evy print "🍌 ``` -------------------------------- ### Evy Print Command Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise1/question-link3.html Demonstrates the usage of the 'print' command in Evy. This command outputs the provided string to the console. ```evy print "hi print hi" ``` -------------------------------- ### Evy print command examples Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise1/question-link4.html Demonstrates the usage of the 'print' command in Evy to output text. It shows different ways to print strings and combinations of strings. ```evy print hi ``` ```evy print "hi" ``` ```evy print "print hi" ``` ```evy print "print" "hi" ``` ```evy print "hi print hi" ``` -------------------------------- ### Evy Parse Error Example: Unclosed String Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise-parse-error/q-parse-error.html This snippet demonstrates a common parse error in Evy caused by an unclosed string literal. The program fails to compile because the string starting with '🍌' is not properly terminated with a closing quote. ```evy print "🍌 ``` -------------------------------- ### Evy Sequence Commands Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-txtar/q-shape-inverted-a9.html Demonstrates the usage of 'move', 'color', and 'circle' commands in Evy to draw a shape. The 'move' command sets the starting position, 'color' sets the drawing color, and 'circle' draws a circle with a specified radius. ```evy move 60 40 color "blue" circle 10 ``` -------------------------------- ### Evy Print Command Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise1/question-link3.html Demonstrates the usage of the 'print' command in Evy. This command outputs the provided string to the console. ```evy print "hi print hi" ``` -------------------------------- ### Evy Sequence Commands Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise-txtar/q-shape-inverted-a9.html Demonstrates the usage of 'move', 'color', and 'circle' commands in Evy to draw a shape. The 'move' command sets the starting position, 'color' sets the drawing color, and 'circle' draws a circle with a specified radius. ```evy move 60 40 color "blue" circle 10 ``` -------------------------------- ### Evy CLI Main Commands Source: https://github.com/evylang/evy/blob/main/frontend/docs/usage.html Overview of the primary commands available in the Evy CLI, including 'run', 'fmt', and 'serve', with descriptions of their basic functionality. ```APIDOC evy --help Usage: evy [flags] Evy is a tool for managing evy source code. Flags: -h, --help Show context-sensitive help. -V, --version Print version information Commands: run [] [flags] Run Evy program. fmt [ ...] [flags] Format Evy files. serve export [flags] Export embedded content. serve start [flags] Start web server, default for "evy serve". Run "evy --help" for more information on a command. ``` -------------------------------- ### Upgrade Playwright and Docker Image Source: https://github.com/evylang/evy/blob/main/frontend/docs/development/upgrade.html This guide covers upgrading Playwright for end-to-end testing. It includes updating npm packages, installing the new Playwright version, and updating the associated Docker image tag in the Makefile if necessary. ```bash npx --prefix e2e -y npm-check-updates --packageFile e2e/package.json -u npm --prefix e2e install npx --prefix e2e playwright install # Example of updating PLAYWRIGHT_OCI_IMAGE in Makefile: # PLAYWRIGHT_OCI_IMAGE = mcr.microsoft.com/playwright:v1.46.0-jammy ``` -------------------------------- ### Any Map Declaration and Access Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Demonstrates creating and accessing elements in a map with `any` type in Evy, including using dot notation and bracket notation for keys with spaces. ```evy m:{}any // keys used in literals or with `.` must be identifiers. m.name = "fox" m.age = 42 m["key with space"] = "🔑🪐" print m // {name:fox age:42 key with space:🔑🪐} ``` -------------------------------- ### Evy Print Statement Examples Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise-txtar/index.html Demonstrates how to use the 'print' command in Evy to output strings and numbers. Shows different ways to combine print statements. ```evy print "1" print "2" ``` ```evy print "2" print "1" ``` ```evy print "1" "2" ``` ```evy print "2" "1" ``` -------------------------------- ### Hello, World! in Evy Source: https://github.com/evylang/evy/blob/main/frontend/lab/index.html A basic 'Hello, World!' program in Evy, demonstrating the print function and basic output. ```evy print "Hello, world! 👋🌐" ``` -------------------------------- ### Evy Source Code Examples Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/course1/unit1/cls/q-draw2.md These snippets provide examples of Evy source code, used as answer choices in a multiple-choice question. They showcase the structure and content of Evy programs. ```evy draw/a.evy ``` ```evy draw/b.evy ``` ```evy draw/c.evy ``` ```evy draw/d.evy ``` -------------------------------- ### Evy Built-ins: Input and Output Functions Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Details Evy's built-in functions for interacting with the user and the console, including printing output, reading input, clearing the screen, and formatted printing. ```evy // Print to console print("Hello, Evy!") // Read input from user // let userInput = read("Enter something: ") // print("You entered: " + userInput) // Clear console screen // cls() // Formatted printing let name = "Bob" let age = 25 printf("Name: %s, Age: %d\n", name, age) ``` -------------------------------- ### Evy Print Statement Examples Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-txtar/index.html Demonstrates how to use the 'print' command in Evy to output strings and numbers. Shows different ways to combine print statements. ```evy print "1" print "2" ``` ```evy print "2" print "1" ``` ```evy print "1" "2" ``` ```evy print "2" "1" ``` -------------------------------- ### Evy Kathi Example Source: https://github.com/evylang/evy/wiki/Gallery This snippet demonstrates the 'Kathi' example in Evy. It includes a visual representation and the source code for the program. ```evy H4sIAAAAAAAAEz3KSwrAIAwFwH1O8cgJrDTqdSQEKihS6ef6XRTdDqPV8gDn885MpL32AX6PchlT648heMRAWoZWw+bo110QZaqf6gXRrStTE9K6Qh+6gjoIcgAAAA== ``` -------------------------------- ### Evy Syntax: Function Definition and Calls Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Shows how to define functions in Evy, including functions with no explicit return type, variadic functions, and how to call these functions. ```evy // Function with no return type func greet(name: string) { print("Hello, " + name) } // Variadic function func sum(numbers: int...) -> int { let total = 0 for num in numbers { total = total + num } return total } // Function calls greet("World") let result = sum(1, 2, 3, 4) print(result) ``` -------------------------------- ### Evy Camh Example Source: https://github.com/evylang/evy/wiki/Gallery This snippet demonstrates the 'Camh' example in Evy. It includes a visual representation and the source code for the program. ```evy H4sIAAAAAAAAE0vOSU0sUlAKLijKzEt3L0pNzVPiys0vS1UwNVAwNeBKzs/JL1JQSspJTM5W4krOLErOSVUwNoAoMUFWgmICVKERVKExbrMMoUqMTAmYZcoFAP/9KWirAAAA ``` -------------------------------- ### Basic Drawing Commands Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-txtar/q-shape-inverted-d5.html Demonstrates the sequence of 'move', 'color', and 'circle' commands in Evy. This snippet shows how to position the drawing cursor, set the drawing color, and then draw a circle with a specified radius. ```evy move 40 40 color "blue" circle 10 ``` -------------------------------- ### Evy Lois Example Source: https://github.com/evylang/evy/wiki/Gallery This snippet demonstrates the 'Lois' example in Evy. It includes a visual representation and the source code for the program. ```evy H4sIAAAAAAAAE23MMQqAMAxG4b2nCD1BHDxQSH+rGBsJ6PlFkOLQ4W0fTw0SlE+Irue1LDkldfOgrB5iOR1+g5g46RZqoJm7qG7lAxPz2wAVid1tu1EDaP03xh7SKgL/7d89hL+Gzq4AAAA= ``` -------------------------------- ### Evy Comment Syntax Source: https://github.com/evylang/evy/blob/main/docs/syntax-by-example.md Demonstrates how to add single-line comments in Evy using the `//` prefix. ```evy // This is a comment ``` -------------------------------- ### Evy Jason Example Source: https://github.com/evylang/evy/wiki/Gallery This snippet demonstrates the 'Jason' example in Evy. It includes a visual representation and the source code for the program. ```evy H4sIAAAAAAAAE03MUQ7CIAyA4XdO0XAAsjFJvU6DjdYAjd2Y1zcmQnz//j8XJgPf6KSnvh9ysHcua1EDn9WoeFf1ZNgQttVlsVwY4jWkqXbh1miwGBIghjToGv9o5Zv0enR7dZWdfw0ugNPHZWo1aveJEC5xoO//AwCpGVq5AAAA ``` -------------------------------- ### Evy Tom Example Source: https://github.com/evylang/evy/wiki/Gallery This snippet demonstrates the 'Tom' example in Evy. It includes a visual representation and the source code for the program. ```evy H4sIAAAAAAAAE02QwWrDMBBE7/qKQVCwY+rawZTW0C8JOSiylAhkbVjJafT3RXIpvc2O3u6OVnujGJIp5gvTd5BC2C1oLJTg5rCt0HNM7MJVAMDzifkLDgeMw1CdnIvTRBfQFH/66Ke2xQHN+4ADXIsOxx3lf2RFPvsjOgz9WJ9XepiyIOdaavLE0Lt2rL0BCxMWIWJSnMqs0pmoqFEsztqiEuEVlRCh1JPQ5GNRJ+nVw4TF8MVv8SYhVxdTZopGQnoXTJCQd6P07b5ZK89CWGK40ssqXA1CDWNZ6eSoTt+jdPUiNcHbL1Tu9weWBCeHF0zn/Qc/syf5s3YBAAA= ``` -------------------------------- ### Evy print command example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/course1/unit1/exercise1/question-link3.md This snippet demonstrates the usage of the `print` command in Evy. It's part of a question designed to test understanding of the command's output. ```evy print("Hello, Evy!") ``` -------------------------------- ### Sine Intuition Example Source: https://github.com/evylang/evy/wiki/Gallery Demonstrates the 'Sine intuition' concept in Evy. This example visualizes a sine wave and related mathematical concepts. ```evy H4sIAAAAAAAAE31S7W7DIAz8n6ewIk3aVm1NP6JJ2dZ3oYG0aIRUhqjNnn4XIGn2Y0OtgMO+s33pLAmrW+EVta6yfZsRllQnqj6B0Jp2AWEhde9GcFsG4Mbj5ZZwRMZTTGdxHQPSI9gyZWWWNb2tp5RRK0kSz8IuyT7QpsCC/CZsa2J1UcJXuEcN3SD4g7bUMQ4H4AEeF6Kb3hiqNddGvdNF9E7R1s0BrHzPdupEGbwGugOVmIYMxG9LOqPtPzzFa1FsIhW6HHc/tuHoBeUh23bcCqO/FTUotrMqMlUTVdK+K3qK2ftFtovZ/trFbFfR3v0SjY481p0j/0QriiWlGvH4TIx5hopcLYyi4zCZdncnWRdsGeIG+2Z/ME/B4XRiLS2VBeVGn87+xGrIsyzN62hE/ZXmH/M6g+LzgOcBaTQcyi2mEe9XLf0Zo9wlT4y+oGXw44fiB57JWUmSnV/yAlqy/MlBRfi08V/BtDL0/QPy68FiAgMAAA== ``` -------------------------------- ### Evy Drawing Commands Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/html-no-private-key/unit1/exercise-txtar/q-shape-4.html This snippet shows a sequence of Evy commands to move the drawing cursor, set the drawing color, and draw a circle. It's presented as part of a question to identify the correct output. ```evy move 40 40 color "blue" circle 10 ``` ```evy move 60 60 color "blue" circle 10 ``` ```evy move 60 40 color "blue" circle 10 ``` ```evy move 40 60 color "blue" circle 10 ``` -------------------------------- ### Evy: Loops with Print Source: https://github.com/evylang/evy/wiki/White An example of using loops to print output multiple times in Evy. Demonstrates basic iteration. ```evy import "evy/time" for i in 0..5 { print("Iteration: " + i.string()) time.sleep(seconds: 0.5) } ``` -------------------------------- ### Evy: Loops with Circles (Image) Source: https://github.com/evylang/evy/wiki/White Visual example of using loops to draw multiple circles, as depicted in the provided image. ```evy // This code is conceptual and would generate an image similar to the one provided. // It demonstrates drawing multiple circles within a loop. import "evy/draw" import "evy/math" for i in 0..4 { let x = math.random(min: 10, max: 90) let y = math.random(min: 10, max: 90) let r = 10 draw.circle(x: x, y: y, r: r, color: "blue") } ``` -------------------------------- ### Variable Declaration and Printing Source: https://github.com/evylang/evy/blob/main/frontend/docs/syntax-by-example.html Demonstrates basic variable declaration with type inference and printing values in Evy. ```evy z:num z = 5 print z // 5 ``` -------------------------------- ### Install Evy using Homebrew (macOS) Source: https://github.com/evylang/evy/blob/main/README.md Instructions for installing the Evy toolchain on macOS using the Homebrew package manager. ```bash brew install evylang/tap/evy ``` -------------------------------- ### Evy Sequence Commands Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/golden/export/all/unit1/exercise-txtar/q-shape-inverted-ea.html Demonstrates the usage of 'move', 'color', and 'circle' commands in Evy to draw a blue circle. ```evy move 60 60 color "blue" circle 10 ``` -------------------------------- ### Evy Source Code Example Source: https://github.com/evylang/evy/blob/main/learn/pkg/learn/testdata/err-course/unit1/err-exercise1/err-link4.md This snippet shows an example of Evy source code, likely used for generating SVG output. ```evy evy:source ```