From 841f007b444463d2f396208fa6059c9bb6f85d69 Mon Sep 17 00:00:00 2001 From: Natapat Samutpong Date: Tue, 8 Feb 2022 23:04:47 +0700 Subject: [PATCH] rebrand: vy --- Cargo.lock | 16 +++++----- Cargo.toml | 2 +- Makefile | 12 +++---- README.md | 19 ++++++----- assets/icon.png | Bin 3349 -> 0 bytes example/{hello.blsp => hello.vy} | 0 example/{if.blsp => if.vy} | 0 example/{input.blsp => input.vy} | 0 example/{quine.blsp => quine.vy} | 0 example/{quote.blsp => quote.vy} | 0 example/{throw.blsp => throw.vy} | 0 .../{truth_machine.blsp => truth_machine.vy} | 0 example/{var.blsp => var.vy} | 0 install.sh | 30 ++++++++---------- test.sh | 14 ++++---- {blspc => vyc}/.gitignore | 0 {blspc => vyc}/Cargo.lock | 0 {blspc => vyc}/Cargo.toml | 9 +++--- {blspc => vyc}/src/args.rs | 2 +- {blspc => vyc}/src/compiler/compile.rs | 0 {blspc => vyc}/src/compiler/mod.rs | 0 {blspc => vyc}/src/compiler/parser.rs | 0 {blspc => vyc}/src/main.rs | 0 {blspc => vyc}/src/util.rs | 0 {blspc => vyc}/src/vm/instr.rs | 0 {blspc => vyc}/src/vm/mod.rs | 0 {blspc => vyc}/src/vm/parser.rs | 0 {blspc => vyc}/src/vm/types.rs | 0 {blspc => vyc}/src/vm/vm.rs | 0 29 files changed, 49 insertions(+), 55 deletions(-) delete mode 100644 assets/icon.png rename example/{hello.blsp => hello.vy} (100%) rename example/{if.blsp => if.vy} (100%) rename example/{input.blsp => input.vy} (100%) rename example/{quine.blsp => quine.vy} (100%) rename example/{quote.blsp => quote.vy} (100%) rename example/{throw.blsp => throw.vy} (100%) rename example/{truth_machine.blsp => truth_machine.vy} (100%) rename example/{var.blsp => var.vy} (100%) rename {blspc => vyc}/.gitignore (100%) rename {blspc => vyc}/Cargo.lock (100%) rename {blspc => vyc}/Cargo.toml (54%) rename {blspc => vyc}/src/args.rs (97%) rename {blspc => vyc}/src/compiler/compile.rs (100%) rename {blspc => vyc}/src/compiler/mod.rs (100%) rename {blspc => vyc}/src/compiler/parser.rs (100%) rename {blspc => vyc}/src/main.rs (100%) rename {blspc => vyc}/src/util.rs (100%) rename {blspc => vyc}/src/vm/instr.rs (100%) rename {blspc => vyc}/src/vm/mod.rs (100%) rename {blspc => vyc}/src/vm/parser.rs (100%) rename {blspc => vyc}/src/vm/types.rs (100%) rename {blspc => vyc}/src/vm/vm.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 87c1f9f..29a117b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,14 +37,6 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" -[[package]] -name = "blspc" -version = "0.1.0" -dependencies = [ - "regex", - "structopt", -] - [[package]] name = "clap" version = "2.34.0" @@ -235,6 +227,14 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "vyc" +version = "0.1.0" +dependencies = [ + "regex", + "structopt", +] + [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index dd98273..b60f76f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,4 @@ [workspace] members = [ - "blspc", + "vyc", ] diff --git a/Makefile b/Makefile index 047f001..0a2d703 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,11 @@ all: build debug: build-debug build: - cd ./blspc; cargo build --release - rm ~/bin/blspc -f - mv ./target/release/blspc ~/bin/blspc + cd ./vyc; cargo build --release + rm ~/bin/vyc -f + mv ./target/release/vyc ~/bin/vyc build-debug: - cd ./blspc; cargo build - rm ~/bin/blspc -f - mv ./target/debug/blspc ~/bin/blspc + cd ./vyc; cargo build + rm ~/bin/vyc -f + mv ./target/debug/vyc ~/bin/vyc diff --git a/README.md b/README.md index 88a7852..b1e012e 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,23 @@ -# bobbylisp +# vy another lisp dialect -> Also available on https://git.ablecorp.us/azur/bobbylisp -## Installation +## Installation ```console -$ bash <(curl -s https://raw.githubusercontent.com/azur1s/bobbylisp/master/install.sh) +$ bash <(curl -s https://raw.githubusercontent.com/azur1s/vy/master/install.sh) ``` -The binary will be installed in `~/bin/blspc` run it with: +The binary will be installed in `~/bin/vyc` run it with: ```console -$ blspc help +$ vyc help ``` -### Example +### Example ```console -$ blspc compile ./example/hello.blsp -$ blspc run ./hello.bsm +$ vyc compile ./example/hello.vy +$ vyc run ./hello.bsm Hello, World! ``` -## Progress: +## Progress: DONE: - Parsing, Compiling, Running(VM) - Intrinsic: diff --git a/assets/icon.png b/assets/icon.png deleted file mode 100644 index 0a0d62e7eed6816ed7c6fbbda1aadcf5c330beb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3349 zcmb`J=Q|q=7seCRR;%`&NzEv2kr;`+HzjthpjMuuRbt1k(t%J)RcxN1C}P#FQ8Tqm zX=$n28oZwW;k~cxzJJ#_-_H4TC!3qS`#1t8i| z4*?_%%3!Vrx*&afGyuTB{-1$>ynODf<(Rp#wayivMLWku1bBLS1_huTkw|N6D_@kC zHe6NarWislj}inNiuR|VqJ`ZScQOV?dB|b?6*7aB(gJP;Bc;uC zWF|{BFM8o;M2-Cqng<^=el;UXlFS#Y;N*Uz>NLGg0=(@dV!H{^i-Q|!DI%aU@3XZ` zwB>Q}b|~wcbJL%;x3>-s4#;Hk^1{sWMD3?Hn(J$;E7PrRX5gin9!&Uyc$EB5p{AE5 z*w@K)bD{w22X(qREgcT34nJTfI835v*>P|^ddlH2BYQ6-4L6U|{d8?hf09Dvd9YkV(5OVc?6A_#1+!10r;(&#f{`!o zZedEOA8Vqo%5#>lt@NFf_%%rb`4iLGP?*AT0-Go;a%I)fSFku*30Yc z3SfF!BtS^lX>+KZHQS!ve`f#;X?mKJV;K1h0-*pM{+2P1X>?%cpqelag6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HIyMwwt<|GT1Wt4vne+bQ6AL?{e$XU|0-t7qR_dV%W2(EWqshNF!Tug43T3DJ* zX#MbFq3*@ZF6z}lh~(i9e17D~+7dYL;IG>p&4kX8&zGaDh~bqV9Ad-vr=*96tF=A3 z+mQ`VGDXP8kbs9P_p_FgzifCr`?!$LKfVi3rwY`id!3?>xj%J5-rhHwZ1Be!zH~>y z+DeVp$Fd|oQ&|uH>p0)!L@uK!40&{3CBvKS_-E%5AaMlvIQHQCt*fdJFwim8u0goQ F{tq&VXzTz0 diff --git a/example/hello.blsp b/example/hello.vy similarity index 100% rename from example/hello.blsp rename to example/hello.vy diff --git a/example/if.blsp b/example/if.vy similarity index 100% rename from example/if.blsp rename to example/if.vy diff --git a/example/input.blsp b/example/input.vy similarity index 100% rename from example/input.blsp rename to example/input.vy diff --git a/example/quine.blsp b/example/quine.vy similarity index 100% rename from example/quine.blsp rename to example/quine.vy diff --git a/example/quote.blsp b/example/quote.vy similarity index 100% rename from example/quote.blsp rename to example/quote.vy diff --git a/example/throw.blsp b/example/throw.vy similarity index 100% rename from example/throw.blsp rename to example/throw.vy diff --git a/example/truth_machine.blsp b/example/truth_machine.vy similarity index 100% rename from example/truth_machine.blsp rename to example/truth_machine.vy diff --git a/example/var.blsp b/example/var.vy similarity index 100% rename from example/var.blsp rename to example/var.vy diff --git a/install.sh b/install.sh index 839a2ee..a3764e6 100755 --- a/install.sh +++ b/install.sh @@ -105,42 +105,38 @@ install() { check_installed cargo echo "Setting up folders..." mkdir -p ~/.cache/ - rm -rf ~/.cache/bobbylisp/ + rm -rf ~/.cache/vy/ echo "Cloning repository..." cd ~/.cache/ - git clone https://github.com/azur1s/bobbylisp - cd ~/.cache/bobbylisp/ + git clone https://github.com/azur1s/vy + cd ~/.cache/vy/ echo "Compiling..." cargo build --release - mv ~/.cache/bobbylisp/target/release/blspc ~/bin/blspc - clean_up "Done! Thanks a lot for trying out Bobbylisp!";; + mv ~/.cache/vy/target/release/vyc ~/bin/vyc + clean_up "Done! Thanks a lot for trying out vy!";; 2) echo "Testing dependencies..." check_installed git check_installed cargo echo "Setting up folders..." mkdir -p ~/.cache/ - rm -rf ~/.cache/bobbylisp/ + rm -rf ~/.cache/vy/ echo "Cloning repository..." cd ~/.cache/ - git clone https://github.com/azur1s/bobbylisp - cd ~/.cache/bobbylisp/ + git clone https://github.com/azur1s/vy + cd ~/.cache/vy/ echo "Compiling..." cargo build - mv ~/.cache/bobbylisp/target/debug/blspc ~/bin/blspc - clean_up "Done! Thanks a lot for trying out Bobbylisp!";; + mv ~/.cache/vy/target/debug/vyc ~/bin/vyc + clean_up "Done! Thanks a lot for trying out vy!";; 3) clean_up;; esac } uninstall() { - echo "Uninstalling blspc..." - rm ~/bin/blspc -f - rm /usr/bin/blspc -f - sleep 1s - echo "Uninstalling trolley..." - rm ~/bin/trolley -f - rm /usr/bin/trolley -f + echo "Uninstalling vyc..." + rm ~/bin/vyc -f + rm /usr/bin/vyc -f sleep 1s clean_up "Sad to see you go! Goodbye! o/" } diff --git a/test.sh b/test.sh index 30a4b38..5805d0f 100755 --- a/test.sh +++ b/test.sh @@ -6,17 +6,17 @@ echo $2 # if $2 equal to "noecho" if [ $2 = "noecho" ]; then - make debug; echo ""; blspc compile $noext.blsp; echo "" - cat $noext.blsp; echo -e "\n"; cat $name.bsm; echo "" - blspc run $name.bsm + make debug; echo ""; vyc compile $noext.vy; echo "" + cat $noext.vy; echo -e "\n"; cat $name.vyir; echo "" + vyc run $name.vyir else make debug - blspc compile $noext.blsp + vyc compile $noext.vy echo -e "------------------------------------------- SOURCE" - cat $noext.blsp + cat $noext.vy echo -e "\n----------------------------------------- COMPILED" - cat $name.bsm + cat $name.vyir echo -e "------------------------------------------- OUTPUT" - blspc run $name.bsm + blspc run $name.vyir echo -e "--------------------------------------------------" fi diff --git a/blspc/.gitignore b/vyc/.gitignore similarity index 100% rename from blspc/.gitignore rename to vyc/.gitignore diff --git a/blspc/Cargo.lock b/vyc/Cargo.lock similarity index 100% rename from blspc/Cargo.lock rename to vyc/Cargo.lock diff --git a/blspc/Cargo.toml b/vyc/Cargo.toml similarity index 54% rename from blspc/Cargo.toml rename to vyc/Cargo.toml index ec85500..fdf94b3 100644 --- a/blspc/Cargo.toml +++ b/vyc/Cargo.toml @@ -1,11 +1,10 @@ [package] -name = "blspc" -description = "Bobbylisp compiler." +name = "vyc" +description = "vy language compiler." version = "0.1.0" edition = "2021" -author = ["azur1s "] -homepage = "https://github.com/azur1s/bobbylisp" -repository = "https://github.com/azur1s/bobbylisp" +homepage = "https://github.com/azur1s/vy" +repository = "https://github.com/azur1s/vy" license = "AGPL-3.0" readme = "README.md" diff --git a/blspc/src/args.rs b/vyc/src/args.rs similarity index 97% rename from blspc/src/args.rs rename to vyc/src/args.rs index 69b67a7..741e6ea 100644 --- a/blspc/src/args.rs +++ b/vyc/src/args.rs @@ -3,7 +3,7 @@ use std::path::PathBuf; use structopt::StructOpt; #[derive(StructOpt, Debug)] -#[structopt(name = "blspc")] +#[structopt(name = "vyc")] pub struct Opts { #[structopt(subcommand)] pub commands: Args, diff --git a/blspc/src/compiler/compile.rs b/vyc/src/compiler/compile.rs similarity index 100% rename from blspc/src/compiler/compile.rs rename to vyc/src/compiler/compile.rs diff --git a/blspc/src/compiler/mod.rs b/vyc/src/compiler/mod.rs similarity index 100% rename from blspc/src/compiler/mod.rs rename to vyc/src/compiler/mod.rs diff --git a/blspc/src/compiler/parser.rs b/vyc/src/compiler/parser.rs similarity index 100% rename from blspc/src/compiler/parser.rs rename to vyc/src/compiler/parser.rs diff --git a/blspc/src/main.rs b/vyc/src/main.rs similarity index 100% rename from blspc/src/main.rs rename to vyc/src/main.rs diff --git a/blspc/src/util.rs b/vyc/src/util.rs similarity index 100% rename from blspc/src/util.rs rename to vyc/src/util.rs diff --git a/blspc/src/vm/instr.rs b/vyc/src/vm/instr.rs similarity index 100% rename from blspc/src/vm/instr.rs rename to vyc/src/vm/instr.rs diff --git a/blspc/src/vm/mod.rs b/vyc/src/vm/mod.rs similarity index 100% rename from blspc/src/vm/mod.rs rename to vyc/src/vm/mod.rs diff --git a/blspc/src/vm/parser.rs b/vyc/src/vm/parser.rs similarity index 100% rename from blspc/src/vm/parser.rs rename to vyc/src/vm/parser.rs diff --git a/blspc/src/vm/types.rs b/vyc/src/vm/types.rs similarity index 100% rename from blspc/src/vm/types.rs rename to vyc/src/vm/types.rs diff --git a/blspc/src/vm/vm.rs b/vyc/src/vm/vm.rs similarity index 100% rename from blspc/src/vm/vm.rs rename to vyc/src/vm/vm.rs