Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First VBScript implementation #624

Merged
merged 129 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
c283a46
vbs: batch impl init
OldLiu001 Jan 9, 2022
d3fbaf7
vbs: vbs step 0&1
OldLiu001 Feb 17, 2022
ae38ddf
vbs: Merge branch 'kanaka:master' into master
OldLiu001 Feb 17, 2022
e3f6a8f
vbs: add error handling,macros, string, boolean, null
OldLiu001 Feb 18, 2022
33a826a
vbs: add extra code data detect
OldLiu001 Feb 18, 2022
07740dd
vbs: fix hashtable, string, error handle
OldLiu001 Feb 26, 2022
d8916d6
vbs: finish step2
OldLiu001 May 2, 2022
9b2cb5a
vbs: rewrite code1
OldLiu001 Aug 27, 2022
4bc295e
vbs: rewrite code 2
OldLiu001 Aug 27, 2022
c8371b1
vbs: rewrite 3
OldLiu001 Aug 27, 2022
129262b
vbs: fix error dealing
OldLiu001 Aug 28, 2022
7c84432
vbs: fix step3
OldLiu001 Aug 28, 2022
add135e
vbs: step4 init:
OldLiu001 Aug 28, 2022
85e39eb
vbs: step4 init:1
OldLiu001 Aug 28, 2022
7af8b97
vbs: add step4(have some bugs)
OldLiu001 Aug 28, 2022
4c96d74
vbs: core miss, added
OldLiu001 Aug 28, 2022
223727e
vbs: fix fn* calling bug which evaluate code twice
OldLiu001 Oct 23, 2022
03c59c8
vbs: fix env's big bug
OldLiu001 Oct 30, 2022
76d4c8f
vbs: env hotfix
OldLiu001 Oct 30, 2022
805b814
vbs: rewrite codes
OldLiu001 Dec 23, 2022
0677b18
vbs: rewrite step0 & 1
OldLiu001 Jan 19, 2023
2d4a788
vbs: new file 'types.vbs' & fix bugs & rewrite
OldLiu001 Jan 19, 2023
9213908
vbs: Rewrite step2
OldLiu001 Jan 19, 2023
3d2bb5d
vbs: rewrite step3 & fix bugs
OldLiu001 Jan 19, 2023
1466dd8
vbs: rewrite step4 1
OldLiu001 Jan 19, 2023
d869841
vbs: add some functions
OldLiu001 Jan 19, 2023
7e84201
vbs: fix evaluater's bug (create instead modify a list)
OldLiu001 Jan 20, 2023
beddcf5
vbs: add prn println str prn-str
OldLiu001 Jan 20, 2023
e8e0ac6
vbs: move specials from core to step4
OldLiu001 Jan 20, 2023
48dfd2f
vbs: fix ByRef's bug, todo: fix mem leak
OldLiu001 Jan 20, 2023
edd1e27
vbs: step6 finish!
OldLiu001 Jan 22, 2023
44010ef
vbs: rewrite all: normal fun will recive Env also
OldLiu001 Jan 22, 2023
1c9d8bc
vbs: step 7 finish a half
OldLiu001 Jan 23, 2023
cd055ee
vbs: rewrite quasiquote with quasiquoteexpand & fix vec
OldLiu001 Jan 26, 2023
f647d3b
vbs: step8 a half finished
OldLiu001 Jan 26, 2023
cc65a06
vbs: step8 finish!
OldLiu001 Jan 26, 2023
d8d2237
vbs: step9 finished a quarter
OldLiu001 Jan 26, 2023
f9eb0e1
vbs: step9 finish except hashmap
OldLiu001 Jan 27, 2023
f2cab28
vbs: step9 pass!
OldLiu001 Jan 27, 2023
2bb3eda
vbs: STEPA FINISH!!!
OldLiu001 Jan 28, 2023
d725374
vbs: fix (rest nil) try+catch+throw 's bugs
OldLiu001 Jan 28, 2023
02eb37a
vbs: rewrite error strings & remove my debug error info
OldLiu001 Jan 28, 2023
23f722c
vbs: remove my ignore path
OldLiu001 Jul 8, 2023
e4a0e49
vbs: update readme
OldLiu001 Jul 8, 2023
9c6bcd8
vbs: fix print privous return value in repl error
OldLiu001 Jul 8, 2023
fdcc112
vbs: update get-ci-matrix to support windows system
OldLiu001 Aug 8, 2024
66ca4a8
vbs: fix indentation error
OldLiu001 Aug 8, 2024
f346c4f
vbs: update github action's configuration for Windows support
OldLiu001 Aug 8, 2024
2bc3323
vbs: add vbs impl to IMPLS.yml
OldLiu001 Aug 8, 2024
9b8d69f
vbs: comment other tests for faster ci test
OldLiu001 Aug 8, 2024
3bf9867
vbs: each of the three systems retains a ci test to compare the outputs
OldLiu001 Aug 8, 2024
1df72d8
vbs: for quick testing, comment out the other languages and leave onl…
OldLiu001 Aug 8, 2024
a0db830
vbs: add an 'run' script for vbs impl
OldLiu001 Aug 8, 2024
8ac902b
vbs: add vbs impl to Makefile.impls
OldLiu001 Aug 8, 2024
b57a4e8
vbs: make do_full=True for testing
OldLiu001 Aug 8, 2024
22eee3b
vbs: update github action's cfg for windows test support
OldLiu001 Aug 8, 2024
2cf7738
vbs: change the default shell of windows for github action to bash
OldLiu001 Aug 8, 2024
1043781
vbs: add hello world to yml for debugging
OldLiu001 Aug 8, 2024
85c72fe
vbs: add an makefile to vbs impl
OldLiu001 Aug 8, 2024
a85bbef
vbs: Merge branch 'master' into cy20lin-fix-windows-runtest
OldLiu001 Aug 8, 2024
2f8e894
vbs: Add extra option --no-pty for vbs impl
OldLiu001 Aug 8, 2024
0b9b19c
vbs: append bash before args
OldLiu001 Aug 8, 2024
1a79148
vbs: cannot call bash from runtest.py, so call cmd & run.cmd
OldLiu001 Aug 8, 2024
72d1204
vbs: replace bash script with batch script
OldLiu001 Aug 8, 2024
c8efda2
vbs: add return values to the test samples I wrote myself
OldLiu001 Aug 8, 2024
88db809
vbs: Merge pull request #7 from OldLiu001/cy20lin-fix-windows-runtest
OldLiu001 Aug 8, 2024
ff5893f
vbs: Removes the echos used by the debug github action
OldLiu001 Aug 8, 2024
e18b7f7
vbs: step5 is too slow for vbs, skip it
OldLiu001 Aug 8, 2024
8e97ceb
vbs: add an run script for pass the step6's argv_test
OldLiu001 Aug 8, 2024
c09bbc8
vbs: remove the restriction that the first argument to 'apply' must b…
OldLiu001 Aug 8, 2024
17a2e4c
vbs: restores files that have been changed for debug
OldLiu001 Aug 8, 2024
0bdae3d
vbs: restore `runtest.py` to unupdated version
OldLiu001 Aug 9, 2024
99f6341
vbs: change the `repeated form` from issue 30 for testing
OldLiu001 Aug 9, 2024
e2bfd73
vbs: rename runtest for Better distinguish
OldLiu001 Aug 9, 2024
bd1505a
vbs: remove print & 'bash' + args
OldLiu001 Aug 9, 2024
d14a2dd
vbs: restore runtest.py to updated version
OldLiu001 Aug 9, 2024
8e97520
vbs: Simplify run.cmd
OldLiu001 Aug 9, 2024
827cbd7
vbs: Merge branch 'kanaka:master' into master
OldLiu001 Aug 9, 2024
0615ae7
vbs: rename cy20lin's runtest.py to runtest_backup.py
OldLiu001 Aug 9, 2024
01fbfa2
vbs: get the runtest.py from `runtest-no-pty-no-echo` branch
OldLiu001 Aug 9, 2024
b3ba042
vbs: Merge branch 'master' of https://github.com/OldLiu001/mal
OldLiu001 Aug 9, 2024
9cb1354
vbs: append print to check out the cmdline
OldLiu001 Aug 9, 2024
5ba977b
vbs: remove debug print
OldLiu001 Aug 9, 2024
4eecc12
vbs: try `exec stdbuf -o0 -e0 `
OldLiu001 Aug 9, 2024
52e9f20
vbs: Consider introducing the MAL_VBS_IMPL_NO_STDERR environment vari…
OldLiu001 Aug 10, 2024
51946c4
vbs: use "2>&1" to combine stderr -> stdout
OldLiu001 Aug 10, 2024
12f3b86
vbs: remove some comments
OldLiu001 Aug 10, 2024
3d6ef27
vbs: Unify newlines to LF for fix step6 slurp's error
OldLiu001 Aug 10, 2024
3d32d0a
vbs: because step6 argv test fail, restore `run` to remove `cmd from it`
OldLiu001 Aug 10, 2024
3ce94fc
vbs: Replace All `StdErr` with `StdOut`
OldLiu001 Aug 10, 2024
2f77a55
vbs: Replace All `StdErr` with `StdOut` 2
OldLiu001 Aug 10, 2024
ad29392
vbs: fix `permission denied` issue by Github Action
OldLiu001 Aug 10, 2024
7f04b33
vbs: comment out other impls to let `Github Action` for `vbs impl` ru…
OldLiu001 Aug 10, 2024
601f8dc
vbs: import `Vampire/setup-wsl`
OldLiu001 Aug 10, 2024
1b92b78
vbs: `ubuntu` -> `Ubuntu`
OldLiu001 Aug 10, 2024
bc1d057
vbs: use `wsl-bash` instead of `bash`
OldLiu001 Aug 10, 2024
18aa936
vbs: use `wsl-bash` instead of `bash` 2
OldLiu001 Aug 10, 2024
009dafe
vbs: add `.gitattr` to fix action+win+wsl `./ci.sh: line 2: $'\r': co…
OldLiu001 Aug 10, 2024
a44c5bc
vbs: Use `kali-linux` instead of `Ubuntu-24.0.4`
OldLiu001 Aug 10, 2024
6b7b46f
vbs: install `make` for `WSL`
OldLiu001 Aug 10, 2024
307b077
vbs: install `python2` for `WSL`
OldLiu001 Aug 10, 2024
30ecbdd
vbs: `sudo apt update -y` for WSL
OldLiu001 Aug 10, 2024
21a2031
vbs: test `step6` in `github action`
OldLiu001 Aug 10, 2024
478a474
vbs: test step6 `argv_test` in github action 2
OldLiu001 Aug 10, 2024
49f7f6c
vbs: ` test step6 in github action` success
OldLiu001 Aug 10, 2024
104ca7f
vbs: remove `run.cmd`
OldLiu001 Aug 10, 2024
d704433
vbs: remove `runtest_backup.py`
OldLiu001 Aug 10, 2024
712cf5e
vbs: uncomment impls for `Action` test
OldLiu001 Aug 10, 2024
2109872
vbs: Merge branch 'kanaka:master' into master
OldLiu001 Aug 10, 2024
6490e42
vbs: test `WSH.Echo "\nuser>"`
OldLiu001 Aug 14, 2024
d1aabf0
vbs: import variable `MAL_VBS_IMPL_NO_STDERR` & `MAL_VBS_IMPL_ECHO_ST…
OldLiu001 Aug 14, 2024
d1795ee
vbs: impl `IOWrap` class in `io.vbs`
OldLiu001 Aug 14, 2024
e4acbfd
vbs: Restore `runtest.py`
OldLiu001 Aug 14, 2024
b96608c
vbs: rewrite step0 use `IOWrap` for test
OldLiu001 Aug 14, 2024
eb03025
vbs: rewrite step1's IO with `IOWrap`
OldLiu001 Aug 14, 2024
95d617e
vbs: Update `io.vbs` for avoid error
OldLiu001 Aug 14, 2024
e612433
vbs: rewrite step2 use `IOWrap`
OldLiu001 Aug 14, 2024
aaa4815
vbs: rewrite step3 using `IOWrap`
OldLiu001 Aug 14, 2024
1b782ac
vbs: rewrite step4 using `IOWrap`
OldLiu001 Aug 14, 2024
2131105
vbs: rewrite step5 using `IOWrap`
OldLiu001 Aug 14, 2024
3ab0917
vbs: rewrite step6 using `IOWrap`
OldLiu001 Aug 14, 2024
cd057cb
vbs: rewrite step7 using `IOWrap`
OldLiu001 Aug 14, 2024
76d4b87
vbs: rewrite step8 using `IOWrap`
OldLiu001 Aug 14, 2024
e232ea1
vbs: rewrite step9 using `IOWrap`
OldLiu001 Aug 14, 2024
bee3fc1
vbs: rewrite stepA & core with `IOWrap`
OldLiu001 Aug 14, 2024
5bf003f
vbs: Merge branch 'kanaka:master' into master
OldLiu001 Aug 14, 2024
c3ce0fe
vbs: Update 'io.vbs'
OldLiu001 Aug 14, 2024
6176bd7
vbs: Update the implementation counts
OldLiu001 Aug 14, 2024
86777be
vbs: Handle cherry-pick conflicts
OldLiu001 Aug 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* text=auto eol=lf
impls/vbs/*.vbs text eol=crlf
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ jobs:
matrix-linux: ${{ steps.get-matrix-step.outputs.linux }}
do-macos: ${{ steps.get-matrix-step.outputs.do_macos }}
matrix-macos: ${{ steps.get-matrix-step.outputs.macos }}
do-windows: ${{ steps.get-matrix-step.outputs.do_windows }}
matrix-windows: ${{ steps.get-matrix-step.outputs.windows }}
steps:
- uses: actions/checkout@v4
- id: files
Expand Down Expand Up @@ -139,3 +141,50 @@ jobs:
path: |
*.log
*.debug

windows:
needs: get-matrix
if: ${{ needs.get-matrix.outputs.do-windows == 'true' }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.get-matrix.outputs.matrix-windows) }}
steps:
- uses: Vampire/setup-wsl@v3
with:
distribution: kali-linux
- name: Install requirements for WSL
shell: wsl-bash {0}
run: |
sudo apt update -y
sudo apt install make -y
sudo apt install python2 -y
sudo ln -s /usr/bin/python2 /usr/bin/python
- uses: actions/checkout@v4
- name: Build
shell: wsl-bash {0}
run: |
export ${{ matrix.IMPL }}
./ci.sh build ${IMPL}
- name: Step Tests
shell: wsl-bash {0}
run: |
export ${{ matrix.IMPL }}
./ci.sh test ${IMPL}
- name: Regression Tests
shell: wsl-bash {0}
run: |
export ${{ matrix.IMPL }}
STEP=stepA REGRESS=1 HARD=1 OPTIONAL=0 ./ci.sh test ${IMPL}
- name: Performance Tests
shell: wsl-bash {0}
run: |
export ${{ matrix.IMPL }}
./ci.sh perf ${IMPL}
- name: Archive logs and debug output
uses: actions/upload-artifact@v4
with:
name: logs.${{ matrix.IMPL }}
path: |
*.log
*.debug
2 changes: 2 additions & 0 deletions IMPLS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,3 +121,5 @@ IMPL:
# - {IMPL: swift3, NO_DOCKER: 1, OS: xcode8}}
# - {IMPL: swift4, NO_DOCKER: 1, OS: xcode10}}
- {IMPL: swift5, NO_DOCKER: 1, OS: macos}

- {IMPL: vbs, NO_DOCKER: 1, OS: windows}
5 changes: 4 additions & 1 deletion Makefile.impls
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ IMPLS = ada ada.2 awk bash basic bbc-basic c c.2 chuck clojure coffee common-lis
guile haskell haxe hy io janet java java-truffle js jq julia kotlin latex3 livescript logo lua make mal \
matlab miniMAL nasm nim objc objpascal ocaml perl perl6 php picolisp pike plpgsql \
plsql powershell prolog ps purs python python.2 r racket rexx rpython ruby ruby.2 rust scala scheme skew sml \
swift swift3 swift4 swift5 tcl ts vala vb vhdl vimscript wasm wren yorick xslt zig
swift swift3 swift4 swift5 tcl ts vala vb vbs vhdl vimscript wasm wren yorick xslt zig

step5_EXCLUDES += bash # never completes at 10,000
step5_EXCLUDES += basic # too slow, and limited to ints of 2^16
Expand All @@ -54,6 +54,7 @@ step5_EXCLUDES += prolog # no iteration (but interpreter does TCO implicitl
step5_EXCLUDES += sml # not implemented :(
step5_EXCLUDES += $(if $(filter cpp,$(haxe_MODE)),haxe,) # cpp finishes 10,000, segfaults at 100,000
step5_EXCLUDES += xslt # iteration cannot be expressed
step5_EXCLUDES += vbs # too slow for 10,000

dist_EXCLUDES += mal
# TODO: still need to implement dist
Expand All @@ -78,6 +79,7 @@ else ifeq ($(MAL_IMPL),powershell)
mal_TEST_OPTS = --start-timeout 60 --test-timeout 180
endif
xslt_TEST_OPTS = --test-timeout 120
vbs_TEST_OPTS = --no-pty


#
Expand Down Expand Up @@ -191,6 +193,7 @@ tcl_STEP_TO_PROG = impls/tcl/$($(1)).tcl
ts_STEP_TO_PROG = impls/ts/$($(1)).js
vala_STEP_TO_PROG = impls/vala/$($(1))
vb_STEP_TO_PROG = impls/vb/$($(1)).exe
vbs_STEP_TO_PROG = impls/vbs/$($(1)).vbs
vhdl_STEP_TO_PROG = impls/vhdl/$($(1))
vimscript_STEP_TO_PROG = impls/vimscript/$($(1)).vim
wasm_STEP_TO_PROG = impls/wasm/$($(1)).wasm
Expand Down
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ process guide](process/guide.md) there is also a [mal/make-a-lisp
FAQ](docs/FAQ.md) where I attempt to answer some common questions.


**3. Mal is implemented in 88 languages (94 different implementations and 115 runtime modes)**
**3. Mal is implemented in 89 languages (95 different implementations and 116 runtime modes)**

| Language | Creator |
| -------- | ------- |
Expand Down Expand Up @@ -135,6 +135,7 @@ FAQ](docs/FAQ.md) where I attempt to answer some common questions.
| [VHDL](#vhdl) | [Dov Murik](https://github.com/dubek) |
| [Vimscript](#vimscript) | [Dov Murik](https://github.com/dubek) |
| [Visual Basic.NET](#visual-basicnet) | [Joel Martin](https://github.com/kanaka) |
| [Visual Basic Script](#visual-basic-script) | [刘百超](https://github.com/OldLiu001) |
| [WebAssembly](#webassembly-wasm) (wasm) | [Joel Martin](https://github.com/kanaka) |
| [Wren](#wren) | [Dov Murik](https://github.com/dubek) |
| [XSLT](#xslt) | [Ali MohammadPur](https://github.com/alimpfard) |
Expand Down Expand Up @@ -1231,6 +1232,19 @@ make
mono ./stepX_YYY.exe
```

### Visual Basic Script ###

The VBScript implementation of mal has been tested on Windows 10 1909.
`install.vbs` can help you install the requirements (.NET 2.0 3.0 3.5).
If you havn't install `.NET 2.0 3.0 3.5`, it will popup a window for installation.
If you already installed that, it will do nothing.

```
cd impls\vbs
install.vbs
cscript -nologo stepX_YYY.vbs
```

### WebAssembly (wasm) ###

The WebAssembly implementation is written in
Expand Down
7 changes: 6 additions & 1 deletion get-ci-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ def impl_text(impl):
# Load the full implementation description file
all_impls = yaml.safe_load(open(IMPLS_FILE))

# Accumulate and output linux and macos implementations separately
# Accumulate and output linux, macos & windows implementations separately
linux_impls = []
macos_impls = []
windows_impls = []
for impl in all_impls['IMPL']:
targ = linux_impls
if 'OS' in impl and impl['OS'] == 'macos':
targ = macos_impls
if 'OS' in impl and impl['OS'] == 'windows':
targ = windows_impls
# Run implementations with actual changes first before running
# other impls triggered by non-impl code changes
if impl['IMPL'] in run_impls:
Expand All @@ -65,5 +68,7 @@ def impl_text(impl):

print("do_linux=%s" % json.dumps(len(linux_impls)>0))
print("do_macos=%s" % json.dumps(len(macos_impls)>0))
print("do_windows=%s" % json.dumps(len(windows_impls)>0))
print("linux={\"IMPL\":%s}" % json.dumps(linux_impls))
print("macos={\"IMPL\":%s}" % json.dumps(macos_impls))
print("windows={\"IMPL\":%s}" % json.dumps(windows_impls))
4 changes: 4 additions & 0 deletions impls/vbs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
all:
true

clean:
Loading
Loading