Slides allows you to execute code blocks directly inside your slides!
Just press ctrl+e and the result of the code block will be displayed as virtual text in your slides.
Currently supported languages:
bashzshfishelixirgojavascriptpythonrubyperlrustjavacppswiftdartvnu
lslslsIO.puts "Hello, world!"Use /// to hide verbose code but still allow the ability to execute it.
If you press y to copy (yank) this code block it will return the full snippet.
And, if you press ctrl+e it will run the program without error, even though
what is being displayed is not a valid go program because we have commented out
some boilerplate to focus on the important parts.
///package main
///
import "fmt"
///
///func main() {
fmt.Println("Hello, world!")
///}console.log("Hello, world!")print("Hello, World!")print("Hello, world!")puts "Hello, world!"print ("hello, world");fn main() {
println!("Hello, world!");
}public class Main {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}println("Hello, world!")#include <iostream>
int main() {
std::cout << "Hello, world!" << std::endl;
return 0;
}print("Hello, world!")void main() {
print("Hello, world!");
}println('Hello, world!')//> using dep com.lihaoyi::pprint:0.8.1
object Main extends App {
println("Hello")
}# Basic string output
echo "Hello from Nushell!"# Data manipulation with pipelines
[1, 2, 3, 4, 5] | where $it > 2 | math sum# Working with records
{name: "Alice", age: 30, city: "New York"} | get name