From 1555738be40d8fceb1d5888ba47c3bac84f5d2c1 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 01:37:31 -0500 Subject: Fixed issues with building Sloth - Made Sloth build with Rust stable again - Made a rust-toolchain file so everyone uses the same version of Rust - Fixed the GitHub Actions to have LLVM so it can actually build - Fixed the Nix package to have LLVM so it can actually build --- .github/workflows/linting.yml | 28 ++++++++++++++++++++++++++-- .github/workflows/testing.yml | 13 ++++++++++++- Cargo.toml | 1 + flake.nix | 27 ++++++++++++++++++--------- rust-toolchain.toml | 5 ++++- sloth/src/analysis/mod.rs | 22 ++++++++++++++++++---- sloth/src/main.rs | 1 - 7 files changed, 79 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 685b93a..470a576 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,6 +7,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: rm rust-toolchain.toml - uses: EmbarkStudios/cargo-deny-action@v1 with: arguments: --all-features @@ -16,9 +24,17 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly + toolchain: nightly-2023-06-19 components: clippy, rust-src - run: cargo clippy --all-features -- --deny warnings code-format: @@ -26,8 +42,16 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly + toolchain: nightly-2023-06-19 components: rustfmt, rust-src - run: cargo fmt -- --check diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index e4994ea..09de330 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -12,12 +12,23 @@ jobs: - macos rust: - stable - - nightly + - nightly-2023-06-19 name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }} runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "15.0" - run: cargo test --all-features --no-fail-fast diff --git a/Cargo.toml b/Cargo.toml index cd103f5..62c6d45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,5 @@ [workspace] +resolver = "2" members = [ "sloth" ] [workspace.package] diff --git a/flake.nix b/flake.nix index 5c82957..5143ddf 100644 --- a/flake.nix +++ b/flake.nix @@ -27,9 +27,17 @@ rustc = rustStable; }; in + let + baseNativeBuildInputs = with pkgs; [ pkg-config ]; + baseBuildInputs = with pkgs; [ + llvmPackages_15.libllvm + libffi + libxml2 + ]; + in with pkgs; { - packages.default = rustPlatform.buildRustPackage rec { + packages.default = rustPlatform.buildRustPackage { pname = "sloth"; version = "0.1.0"; src = ./.; @@ -40,14 +48,20 @@ lockFile = ./Cargo.lock; }; + nativeBuildInputs = baseNativeBuildInputs; + buildInputs = baseBuildInputs; + meta = with lib; { description = "The Sloth programming language"; homepage = "https://slothlang.tech"; license = with licenses; [ mit asl20 ]; }; + + LLVM_SYS_150_PREFIX = "${llvmPackages_15.libllvm.dev}"; }; devShells.default = mkShell { - buildInputs = [ + nativeBuildInputs = baseNativeBuildInputs; + buildInputs = baseBuildInputs ++ [ (rustNightly.override { extensions = [ "rust-src" "rust-analyzer" ]; targets = [ "wasm32-unknown-unknown" ]; @@ -57,16 +71,11 @@ cargo-deny cargo-release - pkg-config - - # Packages required for LLVM - llvmPackages_15.libllvm - libffi - libxml2 - # C compiler for debugging clang ]; + + RUST_BACKTRACE = 1; }; } ); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 4e70b08..0a8868e 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,2 +1,5 @@ [toolchain] -channel = "nightly-2023-06-15" +channel = "nightly-2023-06-19" +components = [ "rust-src", "rust-analyzer" ] +targets = [ "wasm32-unknown-unknown" ] +profile = "default" diff --git a/sloth/src/analysis/mod.rs b/sloth/src/analysis/mod.rs index 1c2f0d2..a569c50 100644 --- a/sloth/src/analysis/mod.rs +++ b/sloth/src/analysis/mod.rs @@ -34,12 +34,26 @@ pub fn analyze(root: &mut Stmt) -> Result<(), AnalysisError> { } fn check_usage(node: &AstNode) -> Result<(), AnalysisError> { - if let AstNode::Expr(expr) = node && let ExprKind::Identifier(identifier) = &expr.kind && !expr.symtable.clone().contains(identifier) { - return Err(AnalysisError::UnknownIdentifier(expr.line, identifier.clone())); + if let AstNode::Expr(expr) = node { + if let ExprKind::Identifier(identifier) = &expr.kind { + if !expr.symtable.clone().contains(identifier) { + return Err(AnalysisError::UnknownIdentifier( + expr.line, + identifier.clone(), + )); + } + } } - if let AstNode::Stmt(stmt) = node && let StmtKind::AssignVariable { identifier, .. } = &stmt.kind && !stmt.symtable.clone().contains(identifier) { - return Err(AnalysisError::UnknownIdentifier(stmt.line, identifier.clone())); + if let AstNode::Stmt(stmt) = node { + if let StmtKind::AssignVariable { identifier, .. } = &stmt.kind { + if !stmt.symtable.clone().contains(identifier) { + return Err(AnalysisError::UnknownIdentifier( + stmt.line, + identifier.clone(), + )); + } + } } for child in node.children() { diff --git a/sloth/src/main.rs b/sloth/src/main.rs index b34dd4f..c181a3b 100644 --- a/sloth/src/main.rs +++ b/sloth/src/main.rs @@ -1,4 +1,3 @@ -#![feature(let_chains)] #![warn( clippy::wildcard_imports, clippy::string_add, -- cgit v1.2.3 From b5650df341bbc99fe6b4cba9a9361abb430ad54b Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 01:46:11 -0500 Subject: Who needs to compile on Windows anyways? :3 --- .github/workflows/linting.yml | 3 +++ .github/workflows/testing.yml | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 470a576..1a72dbc 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -36,6 +36,9 @@ jobs: with: toolchain: nightly-2023-06-19 components: clippy, rust-src + - uses: KyleMayes/install-llvm-action@v1 + with: + version: "15.0" - run: cargo clippy --all-features -- --deny warnings code-format: name: Check formatting diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 09de330..49f3799 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -8,7 +8,6 @@ jobs: matrix: os: - ubuntu - - windows - macos rust: - stable -- cgit v1.2.3 From a43a6c01d7d28c050967d13ca29af952a2ef4b9b Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 01:51:59 -0500 Subject: Fix caching --- .github/workflows/linting.yml | 6 +++--- .github/workflows/testing.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 1a72dbc..42b6707 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -13,7 +13,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-deplint - run: rm rust-toolchain.toml - uses: EmbarkStudios/cargo-deny-action@v1 with: @@ -30,7 +30,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-lint - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: @@ -51,7 +51,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-fmt - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 49f3799..96150cf 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,7 +22,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: -- cgit v1.2.3 From c51d6dd7a8113f517c6f097f05cd7ac56d986400 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 02:00:11 -0500 Subject: Updated actions/checkout & actions/cache --- .github/workflows/linting.yml | 12 ++++++------ .github/workflows/testing.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 42b6707..ba82e51 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -6,8 +6,8 @@ jobs: name: Dependency linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cargo/registry @@ -23,8 +23,8 @@ jobs: name: Code linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cargo/registry @@ -44,8 +44,8 @@ jobs: name: Check formatting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cargo/registry diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 96150cf..6e3269d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,8 +15,8 @@ jobs: name: Test Rust ${{ matrix.rust }} on ${{ matrix.os }} runs-on: ${{ matrix.os }}-latest steps: - - uses: actions/checkout@v2 - - uses: actions/cache@v2 + - uses: actions/checkout@v3 + - uses: actions/cache@v3 with: path: | ~/.cargo/registry -- cgit v1.2.3 From d72b8872c192da2136b605c8ff1b9f9f82ee8a1c Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 02:13:34 -0500 Subject: Ugggg workflows are so annoying --- .github/workflows/linting.yml | 31 +++++++++++++------------------ .github/workflows/testing.yml | 13 ++++++++++++- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index ba82e51..9a05bf1 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -7,13 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-deplint - run: rm rust-toolchain.toml - uses: EmbarkStudios/cargo-deny-action@v1 with: @@ -24,34 +17,36 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml + + # Cache files like by target directory - uses: actions/cache@v3 with: path: | ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-lint - - run: rm rust-toolchain.toml + key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - uses: actions/cache@v3 + with: + path: llvm + key: ${{ runner.os }}-llvm-15 + + # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2023-06-19 - components: clippy, rust-src + toolchain: ${{ matrix.rust }} - uses: KyleMayes/install-llvm-action@v1 with: version: "15.0" + - run: cargo clippy --all-features -- --deny warnings code-format: name: Check formatting runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: | - ~/.cargo/registry - ~/.cargo/git - target - key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}-fmt - run: rm rust-toolchain.toml - uses: dtolnay/rust-toolchain@stable with: diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6e3269d..66e67a9 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -16,6 +16,9 @@ jobs: runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v3 + - run: rm rust-toolchain.toml + + # Cache files like by target directory - uses: actions/cache@v3 with: path: | @@ -23,11 +26,19 @@ jobs: ~/.cargo/git target key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - run: rm rust-toolchain.toml + + - uses: actions/cache@v3 + with: + path: llvm + key: ${{ runner.os }}-llvm-15 + + # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.rust }} - uses: KyleMayes/install-llvm-action@v1 with: version: "15.0" + + - run: cargo build --all-features - run: cargo test --all-features --no-fail-fast -- cgit v1.2.3 From 22e683f3f9832f47a8347b9510c80ace733a3d6b Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 02:17:59 -0500 Subject: Last commit??? --- .github/workflows/linting.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 9a05bf1..4526c5c 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -36,7 +36,8 @@ jobs: # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: - toolchain: ${{ matrix.rust }} + toolchain: nightly-2023-06-19 + components: clippy, rust-src - uses: KyleMayes/install-llvm-action@v1 with: version: "15.0" -- cgit v1.2.3 From 507dc8d7996ce0bd1511451d9410c87bf9477a22 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 02:21:12 -0500 Subject: Good enough... --- .github/workflows/linting.yml | 7 +------ .github/workflows/testing.yml | 5 ----- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index 4526c5c..473f58f 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -26,12 +26,7 @@ jobs: ~/.cargo/registry ~/.cargo/git target - key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - uses: actions/cache@v3 - with: - path: llvm - key: ${{ runner.os }}-llvm-15 + key: ${{ runner.os }}-rustc-nightly-2023-06-19-cargo-${{ hashFiles('**/Cargo.lock') }}-linting # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 66e67a9..ad93c36 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -27,11 +27,6 @@ jobs: target key: ${{ runner.os }}-rustc-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - uses: actions/cache@v3 - with: - path: llvm - key: ${{ runner.os }}-llvm-15 - # Prepare toolchain related stuff - uses: dtolnay/rust-toolchain@stable with: -- cgit v1.2.3 From 7b13e324a8dfea59f8cd1c82fbb3ea3571e64ef4 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 28 Jul 2023 02:25:06 -0500 Subject: Tests now run in release build --- flake.nix | 2 -- 1 file changed, 2 deletions(-) diff --git a/flake.nix b/flake.nix index 5143ddf..a4f64b4 100644 --- a/flake.nix +++ b/flake.nix @@ -42,8 +42,6 @@ version = "0.1.0"; src = ./.; - # FIXME: Tests do not run in release mode - checkType = "debug"; cargoLock = { lockFile = ./Cargo.lock; }; -- cgit v1.2.3 From 7cd943581febdf20f4f0590907cfc05986453f53 Mon Sep 17 00:00:00 2001 From: Nic Gaffney Date: Sat, 29 Jul 2023 10:12:34 -0500 Subject: general updates --- .gitignore | 2 +- examples/mandelbrot.sloth | 24 ++++++++++----------- examples/webserver.html | 10 +++++++++ examples/webserver.sloth | 12 +++++++++++ std/testing.sloth | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 89 insertions(+), 13 deletions(-) create mode 100644 examples/webserver.html create mode 100644 examples/webserver.sloth create mode 100644 std/testing.sloth diff --git a/.gitignore b/.gitignore index 982e9ba..b9e98f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ node_modules/ *.vsix - +cbuild.sh # Added by cargo /target diff --git a/examples/mandelbrot.sloth b/examples/mandelbrot.sloth index 525f5eb..fc2edaa 100644 --- a/examples/mandelbrot.sloth +++ b/examples/mandelbrot.sloth @@ -1,25 +1,25 @@ fn main() Int{ # Configure - var size: Float = 1000.0; - var maxVal: Float = 4.0; - var maxIter: Float = 50.0; - var plane: Float = 4.0; + var size = 1000.0; + var maxVal = 4.0; + var maxIter = 50.0; + var plane = 4.0; # loop over coordinates - var x: Float = 0.0; + var x = 0.0; while x < size { - var y: Float = 0.0; + var y = 0.0; while y < size { # Initialize - var cReal: Float = (x * plane / size) - 2.0; - var cImg: Float = (y * plane / size) - 2.0; - var zReal: Float = 0.0; - var zImg: Float = 0.0; - var count: Float = 0.0; + var cReal = (x * plane / size) - 2.0; + var cImg = (y * plane / size) - 2.0; + var zReal = 0.0; + var zImg = 0.0; + var count = 0.0; # Calculate while (zReal * zReal + zImg * zImg) <= maxVal && count < maxIter { - var temp: Float = (zReal * zReal) - (zImg * zImg) + cReal; + var temp = (zReal * zReal) - (zImg * zImg) + cReal; zImg = 2.0 * zReal * zImg + cImg; zReal = temp; count = count + 1.0; diff --git a/examples/webserver.html b/examples/webserver.html new file mode 100644 index 0000000..a934b67 --- /dev/null +++ b/examples/webserver.html @@ -0,0 +1,10 @@ + + + sloth + + + +

Sloth

+

paragraph

+ + diff --git a/examples/webserver.sloth b/examples/webserver.sloth new file mode 100644 index 0000000..a0c7f17 --- /dev/null +++ b/examples/webserver.sloth @@ -0,0 +1,12 @@ +fn main() Int { + var port: Int = 8080; + var addr: String = "auto"; + while true { + var server: Int = serversock(port, addr, 10, true); + sendsock("HTTP/1.0 200 OK\r\nServer: webserver-c\r\nContent-type: text/html\r\n\r\nhello, world\r\n", server); + wait(0.5); + closesock(server, false); + } + + return 0; +} diff --git a/std/testing.sloth b/std/testing.sloth new file mode 100644 index 0000000..8a13283 --- /dev/null +++ b/std/testing.sloth @@ -0,0 +1,54 @@ +fn main() Int { + print("print()"); + println("println()"); + var read: String = readln(); + println(read); + var file: String = filer("std/testing.sloth"); + println(file); + curshide(); + readln(); + cursshow(); + readln(); + wait(3); + var sle: Int = slen("Sloth"); + println(istr(sle)); + var parse: Int = parse_int("45"); + if sequals("Sloth", "Sloth") { + println("sequals"); + } + if sequals("sloth", "Sloth") { + println("sequals error"); + } + var asint: Int = as_int(3.0); + system("echo hello_echo"); + wait(5); + termclear(); + print("randGen: "); + println(istr(randGen(0,10))); + print("abs: "); + println(istr(abs(-5))); + print("fabs: "); + println(istr(as_int(fabs(-3.0)))); + print("max: "); + println(istr(max(3, 10))); + print("min: "); + println(istr(min(3, 10))); + print("fmax: "); + println(istr(as_int(fmax(3.0, 10.0)))); + print("fmin: "); + println(istr(as_int(fmin(3.0, 10.0)))); + print("pow: "); + println(istr(as_int(pow(5.0, 2.0)))); + print("floor: "); + println(istr(floor(3.7))); + print("ceil: "); + println(istr(ceil(3.3))); + print("round: "); + println(istr(round(3.5))); + print("round: "); + println(istr(round(3.4))); + print("round: "); + println(istr(round(3.6))); + + return 0; +} -- cgit v1.2.3