├── ink ├── I001 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I004 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I005 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I006 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I007 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I008 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I010 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I011 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I012 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I013 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I014 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I015 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I016 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I017 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I018 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I019 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I020 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I021 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I022 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I023 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I024 │ ├── input.txt │ ├── included_file.ink │ ├── included_file_2.ink │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I026 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I027 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I028 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I029 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I032 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I033 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I036 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I037 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I044 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I045 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I046 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I047 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I048 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I050 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I051 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I052 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I053 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I054 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I055 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I056 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I057 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I058 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I060 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I061 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I062 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I063 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I064 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I065 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I067 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I068 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I069 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I070 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I071 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I072 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I073 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I074 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I075 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I076 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I077 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I086 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I090 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I094 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I095 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I096 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I097 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I099 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I101 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I103 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I105 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I106 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I108 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I109 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I110 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I111 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I112 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I113 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I114 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I115 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I116 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I117 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I118 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I119 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I121 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I122 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I123 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I124 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I125 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I126 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I128 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I129 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I132 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I133 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I134 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I135 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I025 │ ├── input.txt │ ├── included_file.ink │ ├── story.ink │ ├── metadata.json │ ├── transcript.txt │ └── included_file_2.ink ├── I131 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I002 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I009 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I031 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I034 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I035 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I038 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I039 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I049 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I078 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I080 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I082 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I083 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I085 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I087 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I088 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I091 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I092 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I098 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I100 │ ├── input.txt │ ├── metadata.json │ ├── story.ink │ └── transcript.txt ├── I102 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I104 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I107 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I120 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I127 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I130 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I003 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I030 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I040 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I041 │ ├── input.txt │ ├── metadata.json │ ├── story.ink │ └── transcript.txt ├── I042 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I043 │ ├── input.txt │ ├── transcript.txt │ ├── story.ink │ └── metadata.json ├── I059 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I066 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I079 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── story.ink ├── I081 │ ├── input.txt │ ├── story.ink │ ├── transcript.txt │ └── metadata.json ├── I093 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── story.ink ├── I089 │ ├── input.txt │ ├── metadata.json │ ├── story.ink │ └── transcript.txt └── I084 │ ├── input.txt │ ├── metadata.json │ ├── story.ink │ └── transcript.txt ├── bytecode ├── B001 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json ├── B002 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json ├── B003 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json ├── B004 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json ├── B007 │ ├── input.txt │ ├── metadata.json │ ├── transcript.txt │ └── bytecode.json ├── B005 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json └── B006 │ ├── input.txt │ ├── transcript.txt │ ├── metadata.json │ └── bytecode.json ├── .gitignore ├── docs ├── logo.png ├── favicon.png └── screenshot.png ├── drivers ├── inkjs_system_runtime_driver ├── inkjs_v1.10.5_runtime_driver ├── inkjs_v1.11.0_runtime_driver ├── inkjs_v1.9.0_runtime_driver ├── inkjs_v2.0.0_runtime_driver ├── inkjs_v2.1.0_runtime_driver ├── inkjs_v2.2.0_runtime_driver ├── inkjs_v2.2.1_runtime_driver ├── binkplayer_v1.0.1_runtime_driver ├── inklecate_v0.9.0_runtime_driver ├── inklecate_v1.0.0_runtime_driver ├── inklecate_v1.1.1_runtime_driver ├── inkjs_v2.2.1_compiler_driver ├── inkjs_compiler_v2.2.1.js ├── inklecate_v1.0.0_compiler_driver ├── inklecate_v1.1.1_compiler_driver ├── inklecate_v0.9.0+_runtime_driver ├── test_compiler_compiler_driver ├── test_runtime_runtime_driver ├── inklecate_v0.9.0_compiler_driver ├── inklecate_v0.8.3_compiler_driver ├── inkjs_system.js ├── inkjs_v1.10.5.js ├── inkjs_v1.11.0.js ├── inkjs_v2.0.0.js ├── inkjs_v2.1.0.js ├── inkjs_v2.2.0.js ├── inkjs_v2.2.1.js └── inkjs_v1.9.0.js ├── diff.py ├── .github └── workflows │ └── update_site.yml ├── LICENSE ├── CONTRIBUTING.md ├── TODO.md ├── README.md └── install_deps.py /ink/I001/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I004/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I005/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I006/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I007/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I008/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I010/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I011/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I012/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I013/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I014/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I015/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I016/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I016/story.ink: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I017/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I018/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I019/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I020/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I021/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I022/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I023/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I024/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I026/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I027/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I028/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I029/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I032/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I033/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I036/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I037/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I044/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I045/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I046/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I047/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I048/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I050/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I051/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I052/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I053/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I054/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I055/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I056/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I057/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I058/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I060/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I061/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I062/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I063/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I064/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I065/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I067/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I068/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I069/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I070/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I071/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I072/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I073/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I074/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I075/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I076/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I077/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I086/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I090/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I094/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I095/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I096/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I097/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I099/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I101/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I103/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I105/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I106/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I108/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I109/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I110/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I111/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I112/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I113/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I114/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I115/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I116/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I117/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I118/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I119/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I121/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I122/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I123/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I124/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I125/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I126/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I128/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I129/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I132/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I133/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I134/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I135/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bytecode/B001/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bytecode/B002/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bytecode/B003/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bytecode/B004/input.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I016/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I019/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I025/input.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ink/I061/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I064/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I112/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I115/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I116/transcript.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /ink/I131/input.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bytecode/B007/input.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ink/I002/input.txt: -------------------------------------------------------------------------------- 1 | 3 2 | -------------------------------------------------------------------------------- /ink/I009/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I031/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I034/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I035/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I038/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I039/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I049/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I078/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I080/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I082/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I083/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I085/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I087/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I088/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I091/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I092/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I098/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I100/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I102/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I104/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I107/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I120/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I127/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I130/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /bytecode/B005/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /bytecode/B006/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | -------------------------------------------------------------------------------- /ink/I003/input.txt: -------------------------------------------------------------------------------- 1 | 2 2 | 2 3 | -------------------------------------------------------------------------------- /ink/I005/transcript.txt: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /ink/I008/transcript.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /ink/I011/transcript.txt: -------------------------------------------------------------------------------- 1 | 54 2 | -------------------------------------------------------------------------------- /ink/I012/transcript.txt: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /ink/I013/transcript.txt: -------------------------------------------------------------------------------- 1 | Here. 2 | -------------------------------------------------------------------------------- /ink/I014/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 2 | -------------------------------------------------------------------------------- /ink/I015/transcript.txt: -------------------------------------------------------------------------------- 1 | STUFF 2 | -------------------------------------------------------------------------------- /ink/I017/transcript.txt: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /ink/I018/transcript.txt: -------------------------------------------------------------------------------- 1 | hello 2 | -------------------------------------------------------------------------------- /ink/I030/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I040/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I041/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I042/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I043/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I051/transcript.txt: -------------------------------------------------------------------------------- 1 | hi 2 | -------------------------------------------------------------------------------- /ink/I056/transcript.txt: -------------------------------------------------------------------------------- 1 | 5 2 | -------------------------------------------------------------------------------- /ink/I059/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | -------------------------------------------------------------------------------- /ink/I060/transcript.txt: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /ink/I065/transcript.txt: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /ink/I066/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | -------------------------------------------------------------------------------- /ink/I073/transcript.txt: -------------------------------------------------------------------------------- 1 | a, b 2 | -------------------------------------------------------------------------------- /ink/I076/transcript.txt: -------------------------------------------------------------------------------- 1 | 8 2 | -------------------------------------------------------------------------------- /ink/I079/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I081/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I086/transcript.txt: -------------------------------------------------------------------------------- 1 | x 2 | -------------------------------------------------------------------------------- /ink/I093/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I117/transcript.txt: -------------------------------------------------------------------------------- 1 | 120 2 | -------------------------------------------------------------------------------- /ink/I123/transcript.txt: -------------------------------------------------------------------------------- 1 | 120 2 | -------------------------------------------------------------------------------- /ink/I129/transcript.txt: -------------------------------------------------------------------------------- 1 | g 2 | -------------------------------------------------------------------------------- /bytecode/B003/transcript.txt: -------------------------------------------------------------------------------- 1 | 42 2 | -------------------------------------------------------------------------------- /ink/I001/story.ink: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /ink/I006/transcript.txt: -------------------------------------------------------------------------------- 1 | success 2 | -------------------------------------------------------------------------------- /ink/I028/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | -------------------------------------------------------------------------------- /ink/I037/transcript.txt: -------------------------------------------------------------------------------- 1 | X 2 | x 3 | -------------------------------------------------------------------------------- /ink/I044/transcript.txt: -------------------------------------------------------------------------------- 1 | A 2 | C 3 | -------------------------------------------------------------------------------- /ink/I045/transcript.txt: -------------------------------------------------------------------------------- 1 | A 2 | X 3 | -------------------------------------------------------------------------------- /ink/I067/transcript.txt: -------------------------------------------------------------------------------- 1 | a, x, c 2 | -------------------------------------------------------------------------------- /ink/I070/transcript.txt: -------------------------------------------------------------------------------- 1 | a, y, c 2 | -------------------------------------------------------------------------------- /ink/I072/transcript.txt: -------------------------------------------------------------------------------- 1 | a, b, c 2 | -------------------------------------------------------------------------------- /ink/I089/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 1 4 | -------------------------------------------------------------------------------- /ink/I096/transcript.txt: -------------------------------------------------------------------------------- 1 | 5 2 | 625 3 | -------------------------------------------------------------------------------- /ink/I101/transcript.txt: -------------------------------------------------------------------------------- 1 | Content 2 | -------------------------------------------------------------------------------- /ink/I109/transcript.txt: -------------------------------------------------------------------------------- 1 | seen test 2 | -------------------------------------------------------------------------------- /ink/I125/transcript.txt: -------------------------------------------------------------------------------- 1 | 6 2 | 5 3 | -------------------------------------------------------------------------------- /ink/I131/transcript.txt: -------------------------------------------------------------------------------- 1 | SCENE 1 2 | -------------------------------------------------------------------------------- /ink/I133/story.ink: -------------------------------------------------------------------------------- 1 | { 7 / 3.0 } 2 | -------------------------------------------------------------------------------- /ink/I133/transcript.txt: -------------------------------------------------------------------------------- 1 | 2.3333333 2 | -------------------------------------------------------------------------------- /ink/I135/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 2 | -1 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | out/ 2 | deps/ 3 | .DS_Store 4 | -------------------------------------------------------------------------------- /ink/I001/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /ink/I007/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello world. 2 | -------------------------------------------------------------------------------- /ink/I010/transcript.txt: -------------------------------------------------------------------------------- 1 | 0 2 | hello 3 | -------------------------------------------------------------------------------- /ink/I033/transcript.txt: -------------------------------------------------------------------------------- 1 | hello world 2 | -------------------------------------------------------------------------------- /ink/I054/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello world 2 | -------------------------------------------------------------------------------- /ink/I082/story.ink: -------------------------------------------------------------------------------- 1 | * choice -> DONE 2 | -------------------------------------------------------------------------------- /ink/I090/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | -------------------------------------------------------------------------------- /ink/I095/transcript.txt: -------------------------------------------------------------------------------- 1 | a b 2 | a b 3 | -------------------------------------------------------------------------------- /ink/I118/transcript.txt: -------------------------------------------------------------------------------- 1 | -1 2 | 0 3 | 1 4 | -------------------------------------------------------------------------------- /ink/I134/transcript.txt: -------------------------------------------------------------------------------- 1 | true 2 | false 3 | -------------------------------------------------------------------------------- /bytecode/B001/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello, world! 2 | -------------------------------------------------------------------------------- /ink/I022/story.ink: -------------------------------------------------------------------------------- 1 | My name is "{"J{"o"}e"}" 2 | -------------------------------------------------------------------------------- /ink/I022/transcript.txt: -------------------------------------------------------------------------------- 1 | My name is "Joe" 2 | -------------------------------------------------------------------------------- /ink/I023/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello! 2 | World. 3 | -------------------------------------------------------------------------------- /ink/I047/transcript.txt: -------------------------------------------------------------------------------- 1 | I have five eggs. 2 | -------------------------------------------------------------------------------- /ink/I050/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 1 4 | 1 5 | -------------------------------------------------------------------------------- /ink/I052/transcript.txt: -------------------------------------------------------------------------------- 1 | same 2 | different 3 | -------------------------------------------------------------------------------- /ink/I078/story.ink: -------------------------------------------------------------------------------- 1 | * [Option] 2 | Text 3 | -------------------------------------------------------------------------------- /ink/I081/story.ink: -------------------------------------------------------------------------------- 1 | - * hello 2 | - * world 3 | -------------------------------------------------------------------------------- /ink/I084/input.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 1 4 | 2 5 | 3 6 | -------------------------------------------------------------------------------- /ink/I086/story.ink: -------------------------------------------------------------------------------- 1 | * -> 2 | - x 3 | -> DONE 4 | -------------------------------------------------------------------------------- /ink/I122/transcript.txt: -------------------------------------------------------------------------------- 1 | else 2 | else 3 | hi 4 | -------------------------------------------------------------------------------- /ink/I132/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | 0 4 | 1 5 | -------------------------------------------------------------------------------- /ink/I134/story.ink: -------------------------------------------------------------------------------- 1 | { 1 == 1 } 2 | { 1 != 1 } 3 | -------------------------------------------------------------------------------- /bytecode/B002/transcript.txt: -------------------------------------------------------------------------------- 1 | I'm after an nop! 2 | -------------------------------------------------------------------------------- /bytecode/B004/transcript.txt: -------------------------------------------------------------------------------- 1 | 9007199254740992 2 | -------------------------------------------------------------------------------- /ink/I007/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = "world" 2 | Hello {x}. 3 | -------------------------------------------------------------------------------- /ink/I010/story.ink: -------------------------------------------------------------------------------- 1 | {x} 2 | ~temp x = 5 3 | hello 4 | -------------------------------------------------------------------------------- /ink/I020/transcript.txt: -------------------------------------------------------------------------------- 1 | this is a '|' character 2 | -------------------------------------------------------------------------------- /ink/I024/included_file.ink: -------------------------------------------------------------------------------- 1 | This is include 1. 2 | -------------------------------------------------------------------------------- /ink/I029/transcript.txt: -------------------------------------------------------------------------------- 1 | hi 2 | hi 3 | hi 4 | 3 5 | -------------------------------------------------------------------------------- /ink/I036/transcript.txt: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | A 4 | 3 5 | B 6 | -------------------------------------------------------------------------------- /ink/I046/transcript.txt: -------------------------------------------------------------------------------- 1 | A line. 2 | Another line. 3 | -------------------------------------------------------------------------------- /ink/I048/transcript.txt: -------------------------------------------------------------------------------- 1 | Some content with glue. 2 | -------------------------------------------------------------------------------- /ink/I053/transcript.txt: -------------------------------------------------------------------------------- 1 | This is A 2 | Now in B. 3 | -------------------------------------------------------------------------------- /ink/I077/transcript.txt: -------------------------------------------------------------------------------- 1 | Should be 1 not 0: 1. 2 | -------------------------------------------------------------------------------- /ink/I124/transcript.txt: -------------------------------------------------------------------------------- 1 | One 2 | Two 3 | Three 4 | -------------------------------------------------------------------------------- /ink/I004/transcript.txt: -------------------------------------------------------------------------------- 1 | You have fifty-eight coins. 2 | -------------------------------------------------------------------------------- /ink/I005/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = c 2 | CONST c = 5 3 | {x} 4 | -------------------------------------------------------------------------------- /ink/I019/story.ink: -------------------------------------------------------------------------------- 1 | == test == 2 | Content 3 | -> END 4 | -------------------------------------------------------------------------------- /ink/I024/included_file_2.ink: -------------------------------------------------------------------------------- 1 | This is include 2. 2 | 3 | -------------------------------------------------------------------------------- /ink/I025/included_file.ink: -------------------------------------------------------------------------------- 1 | INCLUDE included_file_2.ink 2 | -------------------------------------------------------------------------------- /ink/I048/story.ink: -------------------------------------------------------------------------------- 1 | Some <> 2 | content<> with glue. 3 | -------------------------------------------------------------------------------- /ink/I069/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | l 3 | n 4 | l, m 5 | n 6 | -------------------------------------------------------------------------------- /ink/I078/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: Option 3 | ?> Text 4 | -------------------------------------------------------------------------------- /ink/I082/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: choice 3 | ?> choice 4 | -------------------------------------------------------------------------------- /ink/I110/transcript.txt: -------------------------------------------------------------------------------- 1 | a line after an empty line 2 | -------------------------------------------------------------------------------- /ink/I116/story.ink: -------------------------------------------------------------------------------- 1 | { 2 | - false: 3 | beep 4 | } 5 | -------------------------------------------------------------------------------- /ink/I126/transcript.txt: -------------------------------------------------------------------------------- 1 | Start 2 | In tunnel. 3 | End 4 | -------------------------------------------------------------------------------- /ink/I011/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = 5 2 | ~ temp y = 4 3 | {x}{y} 4 | -------------------------------------------------------------------------------- /ink/I021/transcript.txt: -------------------------------------------------------------------------------- 1 | 512x2 = 1024 2 | 512x2p2 = 1026 3 | -------------------------------------------------------------------------------- /ink/I034/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: hello 3 | ?> hello world 4 | -------------------------------------------------------------------------------- /ink/I042/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: Hello. 3 | ?> Hello, world. 4 | -------------------------------------------------------------------------------- /ink/I051/story.ink: -------------------------------------------------------------------------------- 1 | {x} 2 | VAR x = kX 3 | CONST kX = "hi" 4 | -------------------------------------------------------------------------------- /ink/I057/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello... 2 | ...world. 3 | The End. 4 | -------------------------------------------------------------------------------- /ink/I073/story.ink: -------------------------------------------------------------------------------- 1 | LIST list = a, b 2 | {LIST_ALL(list)} 3 | -------------------------------------------------------------------------------- /ink/I102/transcript.txt: -------------------------------------------------------------------------------- 1 | Limes 2 | 3 | 1: boop 4 | ?> boop 5 | -------------------------------------------------------------------------------- /ink/I112/story.ink: -------------------------------------------------------------------------------- 1 | { 1: 2 | - 2: x 3 | - 3: y 4 | } 5 | -------------------------------------------------------------------------------- /ink/I113/transcript.txt: -------------------------------------------------------------------------------- 1 | other 2 | other 3 | other 4 | other 5 | -------------------------------------------------------------------------------- /ink/I119/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello world 1 2 | Hello world 2. 3 | -------------------------------------------------------------------------------- /ink/I135/story.ink: -------------------------------------------------------------------------------- 1 | { (1 == 1) + 1 } 2 | { (1 != 1) - 1 } 3 | -------------------------------------------------------------------------------- /ink/I017/story.ink: -------------------------------------------------------------------------------- 1 | hello 2 | -> END 3 | world 4 | -> END 5 | 6 | -------------------------------------------------------------------------------- /ink/I026/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 1 3 | 2 4 | 0.6666667 5 | 0 6 | 1 7 | -------------------------------------------------------------------------------- /ink/I035/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: hello 3 | ?> hello 4 | world 5 | -------------------------------------------------------------------------------- /ink/I064/story.ink: -------------------------------------------------------------------------------- 1 | -> DONE 2 | This content is inaccessible. 3 | -------------------------------------------------------------------------------- /ink/I075/transcript.txt: -------------------------------------------------------------------------------- 1 | The first line. 2 | The second line. 3 | -------------------------------------------------------------------------------- /ink/I091/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 2 | 3 | 1: one 4 | 2: two 5 | ?> one 6 | -------------------------------------------------------------------------------- /ink/I097/transcript.txt: -------------------------------------------------------------------------------- 1 | text1 2 | text 2 3 | text1 4 | text 2 5 | -------------------------------------------------------------------------------- /ink/I107/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: choice 1 3 | 2: choice 4 4 | ?> 5 | -------------------------------------------------------------------------------- /ink/I111/transcript.txt: -------------------------------------------------------------------------------- 1 | Wait for it.... 2 | Surprise! 3 | Done. 4 | -------------------------------------------------------------------------------- /ink/I121/transcript.txt: -------------------------------------------------------------------------------- 1 | 36 2 | 2 3 | 3 4 | 2 5 | 2.5 6 | 8 7 | 8 8 | -------------------------------------------------------------------------------- /ink/I125/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = 5 2 | ~ x++ 3 | {x} 4 | ~ x-- 5 | {x} 6 | -------------------------------------------------------------------------------- /ink/I020/story.ink: -------------------------------------------------------------------------------- 1 | {true:this is a '\|' character|this isn't} 2 | 3 | -------------------------------------------------------------------------------- /ink/I033/story.ink: -------------------------------------------------------------------------------- 1 | hello -> world 2 | == world 3 | world 4 | -> END 5 | -------------------------------------------------------------------------------- /ink/I034/story.ink: -------------------------------------------------------------------------------- 1 | * hello -> world 2 | == world 3 | world 4 | -> END 5 | -------------------------------------------------------------------------------- /ink/I043/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: choice 3 | ?> choice 4 | nextline 5 | -------------------------------------------------------------------------------- /ink/I072/story.ink: -------------------------------------------------------------------------------- 1 | LIST x = a, b, c 2 | ~ x = () 3 | {LIST_ALL(x)} 4 | -------------------------------------------------------------------------------- /ink/I080/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: visible choice 3 | ?> visible choice 4 | -------------------------------------------------------------------------------- /bytecode/B006/transcript.txt: -------------------------------------------------------------------------------- 1 | This is not printed: 2 | Neither is this: 3 | -------------------------------------------------------------------------------- /docs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chromy/ink-proof/HEAD/docs/logo.png -------------------------------------------------------------------------------- /ink/I012/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = 0 2 | {true: 3 | - ~ x = 5 4 | } 5 | {x} 6 | -------------------------------------------------------------------------------- /ink/I035/story.ink: -------------------------------------------------------------------------------- 1 | * hello 2 | -> world 3 | == world 4 | world 5 | -> END 6 | -------------------------------------------------------------------------------- /ink/I049/story.ink: -------------------------------------------------------------------------------- 1 | * \ {"test1"} ["test2 {"test3"}"] {"test4"} 2 | -> DONE 3 | -------------------------------------------------------------------------------- /ink/I049/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: test1 "test2 test3" 3 | ?> test1 test4 4 | -------------------------------------------------------------------------------- /ink/I054/story.ink: -------------------------------------------------------------------------------- 1 | -> f -> 2 | <> world 3 | == f == 4 | Hello 5 | ->-> 6 | -------------------------------------------------------------------------------- /ink/I055/transcript.txt: -------------------------------------------------------------------------------- 1 | We hurried home to Savile Row as fast as we could. 2 | -------------------------------------------------------------------------------- /ink/I071/transcript.txt: -------------------------------------------------------------------------------- 1 | b, d 2 | a, b, c, e 3 | b, c 4 | 0 5 | 1 6 | 1 7 | -------------------------------------------------------------------------------- /ink/I115/story.ink: -------------------------------------------------------------------------------- 1 | { 3: 2 | - 3: 3 | - 4: 4 | txt 5 | } 6 | -------------------------------------------------------------------------------- /ink/I119/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = "Hello world 1" 2 | {x} 3 | Hello {"world"} 2. 4 | -------------------------------------------------------------------------------- /ink/I120/transcript.txt: -------------------------------------------------------------------------------- 1 | Top level content 2 | 3 | 1: choice 4 | ?> choice 5 | -------------------------------------------------------------------------------- /bytecode/B005/transcript.txt: -------------------------------------------------------------------------------- 1 | Choose A or B: 2 | 3 | 1: A 4 | 2: B 5 | ?> A 6 | -------------------------------------------------------------------------------- /ink/I009/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: 1 3 | ?> 1 4 | End of choice 5 | this another 6 | -------------------------------------------------------------------------------- /ink/I040/story.ink: -------------------------------------------------------------------------------- 1 | * * * First 2 | * * * * Very indented 3 | - - End 4 | -> END 5 | -------------------------------------------------------------------------------- /ink/I052/story.ink: -------------------------------------------------------------------------------- 1 | {"5" == 5:same|different} 2 | {"blah" == 5:same|different} 3 | -------------------------------------------------------------------------------- /ink/I109/story.ink: -------------------------------------------------------------------------------- 1 | - (opts) 2 | {test:seen test} 3 | - (test) 4 | { -> opts |} 5 | -------------------------------------------------------------------------------- /ink/I110/story.ink: -------------------------------------------------------------------------------- 1 | {stopping: 2 | - a line after an empty line 3 | - blah 4 | } 5 | -------------------------------------------------------------------------------- /docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chromy/ink-proof/HEAD/docs/favicon.png -------------------------------------------------------------------------------- /ink/I018/story.ink: -------------------------------------------------------------------------------- 1 | -> test 2 | == test == 3 | hello 4 | -> END 5 | world 6 | -> END 7 | -------------------------------------------------------------------------------- /ink/I031/transcript.txt: -------------------------------------------------------------------------------- 1 | Count start: 0 0 0 2 | 1 3 | 2 4 | 3 5 | Count end: 3 3 3 6 | -------------------------------------------------------------------------------- /ink/I042/story.ink: -------------------------------------------------------------------------------- 1 | -> test 2 | === test 3 | * Hello[.], world. 4 | -> END 5 | -------------------------------------------------------------------------------- /ink/I043/story.ink: -------------------------------------------------------------------------------- 1 | { shuffle: 2 | - * choice 3 | nextline 4 | -> END 5 | } 6 | -------------------------------------------------------------------------------- /ink/I062/transcript.txt: -------------------------------------------------------------------------------- 1 | one (1) 2 | one and a half (1.5) 3 | two (2) 4 | three (3) 5 | -------------------------------------------------------------------------------- /ink/I079/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: First choice 3 | ?> 4 | 1: Second choice 5 | ?> 6 | -------------------------------------------------------------------------------- /ink/I081/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: hello 3 | ?> hello 4 | 5 | 1: world 6 | ?> world 7 | -------------------------------------------------------------------------------- /ink/I083/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: A choice 3 | ?> A choice 4 | Vaue of local var is: 1 5 | -------------------------------------------------------------------------------- /ink/I088/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: one 3 | 2: two 4 | 3: three 5 | 4: four 6 | ?> one 7 | -------------------------------------------------------------------------------- /ink/I102/story.ink: -------------------------------------------------------------------------------- 1 | <- move 2 | Limes 3 | === move 4 | * boop 5 | -> END 6 | -------------------------------------------------------------------------------- /docs/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chromy/ink-proof/HEAD/docs/screenshot.png -------------------------------------------------------------------------------- /ink/I017/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "End", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I025/story.ink: -------------------------------------------------------------------------------- 1 | INCLUDE included_file.ink 2 | This is the main file 3 | -> knot_in_2 4 | -------------------------------------------------------------------------------- /ink/I027/transcript.txt: -------------------------------------------------------------------------------- 1 | 1) Seen first 1 times. 2 | In second. 3 | 2) Seen first 1 times. 4 | -------------------------------------------------------------------------------- /ink/I056/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = ->place 2 | ->x (5) 3 | == place (a) == 4 | {a} 5 | -> DONE 6 | -------------------------------------------------------------------------------- /ink/I087/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: option text 3 | ?> option text. Conditional bit. Next. 4 | -------------------------------------------------------------------------------- /ink/I092/story.ink: -------------------------------------------------------------------------------- 1 | * opt 2 | - - text 3 | * * {false} impossible 4 | - gather 5 | -------------------------------------------------------------------------------- /ink/I114/transcript.txt: -------------------------------------------------------------------------------- 1 | true 2 | true 3 | true 4 | true 5 | true 6 | great 7 | right? 8 | -------------------------------------------------------------------------------- /ink/I127/transcript.txt: -------------------------------------------------------------------------------- 1 | Hello world! 2 | Hello world 2! 3 | 4 | 1: choice 5 | ?> choice 6 | -------------------------------------------------------------------------------- /ink/I129/story.ink: -------------------------------------------------------------------------------- 1 | -> knot 2 | === knot 3 | -> knot.gather 4 | - (gather) g 5 | -> DONE 6 | -------------------------------------------------------------------------------- /ink/I001/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Minimal story", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I016/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Empty", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I024/transcript.txt: -------------------------------------------------------------------------------- 1 | This is include 1. 2 | This is include 2. 3 | This is the main file. 4 | -------------------------------------------------------------------------------- /ink/I063/transcript.txt: -------------------------------------------------------------------------------- 1 | gather 2 | test 3 | choice content 4 | gather 5 | second time round 6 | -------------------------------------------------------------------------------- /ink/I070/story.ink: -------------------------------------------------------------------------------- 1 | LIST list = (a), b, (c), d, e 2 | LIST list2 = x, (y), z 3 | {list + list2} 4 | -------------------------------------------------------------------------------- /ink/I074/transcript.txt: -------------------------------------------------------------------------------- 1 | C 2 | C 3 | B 4 | C 5 | C 6 | D 7 | D 8 | C 9 | C 10 | C 11 | -------------------------------------------------------------------------------- /ink/I099/transcript.txt: -------------------------------------------------------------------------------- 1 | This is the content 2 | # tags: author: Joe, title: My Great Story 3 | -------------------------------------------------------------------------------- /ink/I103/transcript.txt: -------------------------------------------------------------------------------- 1 | This is a thread example 2 | Hello. 3 | The example is now complete. 4 | -------------------------------------------------------------------------------- /ink/I130/transcript.txt: -------------------------------------------------------------------------------- 1 | blah blah 2 | 3 | 1: option 4 | 2: wigwag 5 | ?> option 6 | something 7 | -------------------------------------------------------------------------------- /ink/I003/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel to death", 3 | "tags": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ink/I019/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "End of content", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I023/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Whitespace", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I038/transcript.txt: -------------------------------------------------------------------------------- 1 | start 2 | gather should be seen 3 | 4 | 1: go to a stitch 5 | ?> result 6 | -------------------------------------------------------------------------------- /ink/I041/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Weave gathers", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I042/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Weave options", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I045/story.ink: -------------------------------------------------------------------------------- 1 | A {f():B} 2 | X 3 | === function f() === 4 | {true: 5 | ~ return false 6 | } 7 | -------------------------------------------------------------------------------- /ink/I060/story.ink: -------------------------------------------------------------------------------- 1 | -> a -> 2 | === a === 3 | ->-> b (5 + 3) 4 | === b (x) === 5 | {x} 6 | -> END 7 | -------------------------------------------------------------------------------- /ink/I066/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: A 3 | 2: Finish 4 | ?> A 5 | 6 | 1: A 7 | 2: Finish 8 | ?> Finish 9 | -------------------------------------------------------------------------------- /bytecode/B002/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "nop is supported", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /bytecode/B003/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluate numbers", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /bytecode/B005/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluate numbers", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I005/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Const variable", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I020/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Escape character", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I024/story.ink: -------------------------------------------------------------------------------- 1 | INCLUDE included_file.ink 2 | INCLUDE included_file_2.ink 3 | This is the main file. 4 | -------------------------------------------------------------------------------- /ink/I032/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List comparison", 3 | "tags": ["extras"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I037/story.ink: -------------------------------------------------------------------------------- 1 | {isTrue(): 2 | x 3 | } 4 | === function isTrue() 5 | X 6 | ~ return true 7 | -------------------------------------------------------------------------------- /ink/I041/story.ink: -------------------------------------------------------------------------------- 1 | - 2 | * one 3 | * * two 4 | - - three 5 | * four 6 | - - five 7 | - six 8 | -------------------------------------------------------------------------------- /ink/I044/story.ink: -------------------------------------------------------------------------------- 1 | A 2 | {f():X} 3 | C 4 | === function f() 5 | { true: 6 | ~ return false 7 | } 8 | -------------------------------------------------------------------------------- /ink/I080/story.ink: -------------------------------------------------------------------------------- 1 | * { not test } visible choice 2 | * { test } visible choice 3 | == test == 4 | -> END 5 | -------------------------------------------------------------------------------- /ink/I090/story.ink: -------------------------------------------------------------------------------- 1 | * -> hello 2 | Unreachable 3 | - (hello) 1 4 | * -> 5 | - - 2 6 | - 3 7 | -> END 8 | -------------------------------------------------------------------------------- /ink/I095/story.ink: -------------------------------------------------------------------------------- 1 | {true: 2 | a 3 | } <> b 4 | {true: 5 | a 6 | } <> { true: 7 | b 8 | } 9 | -------------------------------------------------------------------------------- /ink/I099/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tags", 3 | "tags": [ 4 | "tags" 5 | ] 6 | } -------------------------------------------------------------------------------- /bytecode/B001/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Minimal \"Hello, world!\"", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I004/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Print number as English", 3 | "tags": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ink/I013/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = -> here 2 | -> there 3 | == there == 4 | -> x 5 | == here == 6 | Here. 7 | -> DONE 8 | -------------------------------------------------------------------------------- /ink/I015/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Variable tunnel", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I024/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Includes", 3 | "tags": ["misc", "includes"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I030/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Nested turns since", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I040/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: First 3 | ?> First 4 | 5 | 1: Very indented 6 | ?> Very indented 7 | End 8 | -------------------------------------------------------------------------------- /ink/I043/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Weaves within sequence", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I048/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Simple glue", 3 | "tags": [ 4 | "glue" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I068/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List range", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I094/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Print num", 3 | "tags": [ 4 | "logic" 5 | ] 6 | } -------------------------------------------------------------------------------- /bytecode/B007/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Coercive operations on types", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I002/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Fogg comforts Passepartout", 3 | "tags": [] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /ink/I006/story.ink: -------------------------------------------------------------------------------- 1 | CONST CONST_STR = "ConstantString" 2 | VAR varStr = CONST_STR 3 | {varStr == CONST_STR:success} 4 | -------------------------------------------------------------------------------- /ink/I008/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Temp global conflict", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I009/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Temp usage in options", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I013/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Variable divert target", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I014/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Variable swap recurse", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I018/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "End, the return of the end", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I022/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Quote character significance", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I025/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Nested includes", 3 | "tags": ["misc", "includes"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I026/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Floor, ceiling and casts", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I038/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Conditional choice in weave", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I039/transcript.txt: -------------------------------------------------------------------------------- 1 | first gather 2 | 3 | 1: option 1 4 | 2: option 2 5 | ?> the main gather 6 | bottom gather 7 | -------------------------------------------------------------------------------- /ink/I040/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Unbalanced weave indentation", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I041/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: one 3 | 2: four 4 | ?> one 5 | 6 | 1: two 7 | ?> two 8 | three 9 | six 10 | -------------------------------------------------------------------------------- /ink/I050/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "String contains", 3 | "tags": [ 4 | "strings" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I054/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Basic tunnel", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I058/transcript.txt: -------------------------------------------------------------------------------- 1 | different knot 2 | same knot 3 | same knot 4 | different knot 5 | same knot 6 | same knot 7 | -------------------------------------------------------------------------------- /ink/I062/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Complex tunnels", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I066/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Path to self", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I067/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List save load", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I070/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List mixed items", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I073/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Empty list origin", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I091/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Choice count", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I093/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Default choices", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I100/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tags on choice", 3 | "tags": [ 4 | "tags" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I101/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Thread in logic", 3 | "tags": [ 4 | "threads" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I103/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Thread done", 3 | "tags": [ 4 | "threads" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I104/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Multi thread", 3 | "tags": [ 4 | "threads" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I105/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List comparison", 3 | "tags": [ 4 | "extra" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I114/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Conditionals", 3 | "tags": [ 4 | "conditions" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I121/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Arithmetic", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I125/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Increment", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I134/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Native bools", 3 | "tags": [ 4 | "bools" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /ink/I006/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Multiple constant references", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I007/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Set non existant variable", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I011/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Temporaries at global scope", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I021/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Identifiers can start with numbers", 3 | "tags": ["misc"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I027/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Read count across callstack", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I028/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Read count accross threads", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I029/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Read count dot seperated path", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I031/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Read count variable target", 3 | "tags": ["builtins"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I044/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Implicit inline glue c", 3 | "tags": [ 4 | "glue" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I045/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Implicit inline glue b", 3 | "tags": [ 4 | "glue" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I047/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Implicit inline glue", 3 | "tags": [ 4 | "glue" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I047/story.ink: -------------------------------------------------------------------------------- 1 | I have {five()} eggs. 2 | == function five == 3 | {false: 4 | Don't print this 5 | } 6 | five 7 | -------------------------------------------------------------------------------- /ink/I049/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Strings in choices", 3 | "tags": [ 4 | "strings" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I051/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "String constants", 3 | "tags": [ 4 | "strings" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I052/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "String type coercion", 3 | "tags": [ 4 | "strings" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I064/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Done stops thread", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I065/story.ink: -------------------------------------------------------------------------------- 1 | -> tunnel -> 2 | == tunnel == 3 | * ->-> elsewhere (8) 4 | == elsewhere (x) == 5 | {x} 6 | -> END 7 | -------------------------------------------------------------------------------- /ink/I066/story.ink: -------------------------------------------------------------------------------- 1 | - (dododo) 2 | -> tunnel -> 3 | -> dododo 4 | == tunnel 5 | + A 6 | + Finish 7 | -> END 8 | - ->-> 9 | -------------------------------------------------------------------------------- /ink/I069/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "More list operations", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I071/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List basic operations", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I080/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Has read on choice", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I085/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Logic in choices", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I088/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Conditional choices", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I113/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Else branches", 3 | "tags": [ 4 | "conditions" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I116/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Trivial condition", 3 | "tags": [ 4 | "conditions" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I118/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Literal unary", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I127/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Variable observer", 3 | "tags": [ 4 | "bindings" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I129/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Knot do not gather", 3 | "tags": [ 4 | "knots" 5 | ] 6 | } -------------------------------------------------------------------------------- /bytecode/B006/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Raw ints and doubles are not printed", 3 | "tags": [] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I010/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Temp not found", 3 | "tags": ["variables"], 4 | "hide": true 5 | } 6 | -------------------------------------------------------------------------------- /ink/I046/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Left right glue matching", 3 | "tags": [ 4 | "glue" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I046/story.ink: -------------------------------------------------------------------------------- 1 | A line. 2 | { f(): 3 | Another line. 4 | } 5 | == function f == 6 | {false:nothing} 7 | ~ return true 8 | -------------------------------------------------------------------------------- /ink/I058/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Compare divert targets", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I061/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Divert in conditional", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I063/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Divert to weave points", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I076/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Call stack evaluation", 3 | "tags": [ 4 | "callstack" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I077/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Fallback choice on thread", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I078/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Choice with brackets only", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I081/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Gather choice same line", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I082/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Choice diverts to done", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I083/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Choice thread forking", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I086/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Default simple gather", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I090/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Various default choices", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I091/story.ink: -------------------------------------------------------------------------------- 1 | <- choices 2 | { CHOICE_COUNT() } 3 | = end 4 | -> END 5 | = choices 6 | * one -> end 7 | * two -> end 8 | -------------------------------------------------------------------------------- /ink/I095/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Multiline logic with glue", 3 | "tags": [ 4 | "logic" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I096/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Nested pass by reference", 3 | "tags": [ 4 | "logic" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I097/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Logic lines with newlines", 3 | "tags": [ 4 | "logic" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I098/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Knot thread interaction 2", 3 | "tags": [ 4 | "knots" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I111/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Empty sequence content", 3 | "tags": [ 4 | "sequences" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I117/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Factorial recursive", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I119/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Basic string literals", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I122/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluation stack leaks", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I123/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Factorial by reference", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I128/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Knot stitch gather counts", 3 | "tags": [ 4 | "knots" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I130/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Knot thread interaction", 3 | "tags": [ 4 | "knots" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I135/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Bools can be coerced", 3 | "tags": [ 4 | "bools" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /bytecode/B004/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Comically large number", 3 | "tags": [], 4 | "hide": true 5 | } 6 | -------------------------------------------------------------------------------- /ink/I012/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Variable declaration in conditional", 3 | "tags": ["variables"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I036/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Newlines with string eval", 3 | "tags": ["whitespace", "newline"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I039/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Conditional choice in weave, the second", 3 | "tags": ["weave"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I053/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel onwards divert override", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I055/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Same line divert is inline", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I056/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Divert targets with parameters", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I057/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel onwards after tunnel", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I059/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel vs thread behaviour", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I077/story.ink: -------------------------------------------------------------------------------- 1 | <- knot 2 | == knot 3 | ~ temp x = 1 4 | * -> 5 | Should be 1 not 0: {x}. 6 | -> DONE 7 | -------------------------------------------------------------------------------- /ink/I084/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Sticky choices stay sticky", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I101/story.ink: -------------------------------------------------------------------------------- 1 | -> once -> 2 | -> once -> 3 | == once == 4 | {<- content|} 5 | ->-> 6 | == content == 7 | Content 8 | -> DONE 9 | -------------------------------------------------------------------------------- /ink/I108/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Blanks in inline sequences", 3 | "tags": [ 4 | "sequences" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I121/story.ink: -------------------------------------------------------------------------------- 1 | { 2 * 3 + 5 * 6 } 2 | {8 mod 3} 3 | {13 % 5} 4 | { 7 / 3 } 5 | { 5 / 2.0 } 6 | { 10 - 2 } 7 | { 2 * (5-1) } 8 | -------------------------------------------------------------------------------- /ink/I131/story.ink: -------------------------------------------------------------------------------- 1 | ~temp scene = 0 2 | 3 | ->Start(scene) 4 | 5 | ===Start(ref scene) 6 | ~scene++ 7 | SCENE {scene} 8 | -> END 9 | -------------------------------------------------------------------------------- /ink/I009/story.ink: -------------------------------------------------------------------------------- 1 | ~ temp one = 1 2 | * \ {one} 3 | - End of choice 4 | -> another 5 | * (another) this [is] another 6 | -> DONE 7 | -------------------------------------------------------------------------------- /ink/I026/story.ink: -------------------------------------------------------------------------------- 1 | {FLOOR(1.2)} 2 | {INT(1.2)} 3 | {CEILING(1.2)} 4 | {CEILING(1.2) / 3} 5 | {INT(CEILING(1.2)) / 3} 6 | {FLOOR(1)} 7 | -------------------------------------------------------------------------------- /ink/I029/story.ink: -------------------------------------------------------------------------------- 1 | -> hi -> 2 | -> hi -> 3 | -> hi -> 4 | { hi.stitch_to_count } 5 | == hi == 6 | = stitch_to_count 7 | hi 8 | ->-> 9 | -------------------------------------------------------------------------------- /ink/I030/transcript.txt: -------------------------------------------------------------------------------- 1 | -1 = -1 2 | 3 | 1: stuff 4 | ?> stuff 5 | 0 = 0 6 | 7 | 1: more stuff 8 | ?> more stuff 9 | 1 = 1 10 | -------------------------------------------------------------------------------- /ink/I033/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Newline consistency, the first", 3 | "tags": ["whitespace", "newline"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I034/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Newline consistency, the second", 3 | "tags": ["whitespace", "newline"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I035/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Newline consistency, the third", 3 | "tags": ["whitespace", "newline"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I053/story.ink: -------------------------------------------------------------------------------- 1 | -> A -> 2 | We will never return to here! 3 | == A == 4 | This is A 5 | ->-> B 6 | == B == 7 | Now in B. 8 | -> END 9 | -------------------------------------------------------------------------------- /ink/I061/story.ink: -------------------------------------------------------------------------------- 1 | === intro 2 | = top 3 | { main: -> done } 4 | -> END 5 | = main 6 | -> top 7 | = done 8 | -> END 9 | -------------------------------------------------------------------------------- /ink/I072/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Empty list origin after assignment", 3 | "tags": [ 4 | "lists" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I085/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: 'Hello Joe, your name is Joe.' 3 | ?> 'Hello Joe,' I said, knowing full well that his name was Joe. 4 | -------------------------------------------------------------------------------- /ink/I087/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Non text in choice inner content", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I089/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Once only choices with own content", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I092/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: opt 3 | ?> opt 4 | text 5 | RUNTIME ERROR: ran out of content. Do you need a '-> DONE' or '-> END'? 6 | -------------------------------------------------------------------------------- /ink/I131/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Knot and variable with same name", 3 | "tags": [ 4 | "knots" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /ink/I023/story.ink: -------------------------------------------------------------------------------- 1 | -> firstKnot 2 | === firstKnot 3 | Hello! 4 | -> anotherKnot 5 | === anotherKnot 6 | World. 7 | -> END 8 | -------------------------------------------------------------------------------- /ink/I050/story.ink: -------------------------------------------------------------------------------- 1 | {("hello world" ? "o wo") + 0} 2 | {("hello world" ? "something else") + 0} 3 | {("hello" ? "") + 0} 4 | {("" ? "") + 0} 5 | -------------------------------------------------------------------------------- /ink/I060/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel onwards divert after with arg", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I065/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Tunnel onwards with param default choice", 3 | "tags": [ 4 | "diverts" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I075/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Clean callstack reset on path choice", 3 | "tags": [ 4 | "callstack" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I079/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Once only choices can link back to self", 3 | "tags": [ 4 | "choices" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I093/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: Choice 1 3 | 2: Choice 2 4 | ?> After choice 5 | 6 | 1: Choice 2 7 | ?> After choice 8 | This is default. 9 | -------------------------------------------------------------------------------- /ink/I097/story.ink: -------------------------------------------------------------------------------- 1 | ~ func () 2 | text 2 3 | ~ temp tempVar = func () 4 | text 2 5 | == function func () 6 | text1 7 | ~ return true 8 | -------------------------------------------------------------------------------- /ink/I110/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Leading newline multiline sequence", 3 | "tags": [ 4 | "sequences" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I112/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "All switch branches fail is clean", 3 | "tags": [ 4 | "conditions" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I115/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Empty multiline conditional branch", 3 | "tags": [ 4 | "conditions" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I120/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluating ink functions from game", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I124/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluating ink functions from game 2", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I025/transcript.txt: -------------------------------------------------------------------------------- 1 | The value of a variable in test file 2 is 5. 2 | This is the main file 3 | The value when accessed from knot_in_2 is 5. 4 | -------------------------------------------------------------------------------- /ink/I037/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Newline at start of multiline conditional", 3 | "tags": ["whitespace", "newline"] 4 | } 5 | -------------------------------------------------------------------------------- /ink/I098/transcript.txt: -------------------------------------------------------------------------------- 1 | I’m in a tunnel 2 | When should this get printed? 3 | 4 | 1: I’m an option 5 | ?> I’m an option 6 | Finishing thread. 7 | -------------------------------------------------------------------------------- /ink/I109/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Gather read count with initial sequence", 3 | "tags": [ 4 | "sequences" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I126/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Evaluating function variable state bug", 3 | "tags": [ 4 | "evaluation" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I036/story.ink: -------------------------------------------------------------------------------- 1 | A 2 | ~temp someTemp = string() 3 | B 4 | A 5 | {string()} 6 | B 7 | === function string() 8 | ~ return "{3}" 9 | } 10 | -------------------------------------------------------------------------------- /ink/I059/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: A 3 | 2: B 4 | ?> A 5 | Finished tunnel. 6 | Starting thread. 7 | 8 | 1: C 9 | 2: D 10 | 3: E 11 | ?> D 12 | -------------------------------------------------------------------------------- /ink/I074/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "List random", 3 | "tags": [ 4 | "lists" 5 | ], 6 | "hide": "Uses randomness" 7 | } 8 | -------------------------------------------------------------------------------- /ink/I102/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Top flow terminator should not kill thread choices", 3 | "tags": [ 4 | "threads" 5 | ] 6 | } -------------------------------------------------------------------------------- /ink/I120/story.ink: -------------------------------------------------------------------------------- 1 | Top level content 2 | * choice 3 | == somewhere == 4 | = here 5 | -> DONE 6 | == function test == 7 | ~ return -> somewhere.here 8 | -------------------------------------------------------------------------------- /ink/I068/transcript.txt: -------------------------------------------------------------------------------- 1 | Pound, Pizza, Euro, Pasta, Dollar, Curry, Paella 2 | Euro, Pasta, Dollar, Curry 3 | Two, Three, Four, Five, Six 4 | Pizza, Pasta 5 | -------------------------------------------------------------------------------- /ink/I084/story.ink: -------------------------------------------------------------------------------- 1 | -> test 2 | == test == 3 | First line. 4 | Second line. 5 | + Choice 1 6 | + Choice 2 7 | * Finish 8 | -> END 9 | - -> test 10 | -------------------------------------------------------------------------------- /ink/I087/story.ink: -------------------------------------------------------------------------------- 1 | -> knot 2 | == knot 3 | * option text[]. {true: Conditional bit.} -> next 4 | -> DONE 5 | == next 6 | Next. 7 | -> DONE 8 | -------------------------------------------------------------------------------- /ink/I100/story.ink: -------------------------------------------------------------------------------- 1 | * Start of choice text # tag both [Choice only text # choice only tag] This is after the choice is taken # post choice tag 2 | -> END 3 | -------------------------------------------------------------------------------- /ink/I104/transcript.txt: -------------------------------------------------------------------------------- 1 | This is place 1. 2 | This is place 2. 3 | 4 | 1: choice in place 1 5 | 2: choice in place 2 6 | ?> choice in place 1 7 | The end 8 | -------------------------------------------------------------------------------- /ink/I057/story.ink: -------------------------------------------------------------------------------- 1 | -> tunnel1 -> 2 | The End. 3 | -> END 4 | == tunnel1 == 5 | Hello... 6 | -> tunnel2 ->-> 7 | == tunnel2 == 8 | ...world. 9 | ->-> 10 | -------------------------------------------------------------------------------- /ink/I075/story.ink: -------------------------------------------------------------------------------- 1 | {RunAThing()} 2 | == function RunAThing == 3 | The first line. 4 | The second line. 5 | == SomewhereElse == 6 | {"somewhere else"} 7 | ->END 8 | -------------------------------------------------------------------------------- /ink/I092/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Should not gather due to choice", 3 | "tags": [ 4 | "choices" 5 | ], 6 | "hide": true 7 | } 8 | -------------------------------------------------------------------------------- /ink/I106/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "All sequence types", 3 | "tags": [ 4 | "sequences" 5 | ], 6 | "hide": "Uses randomness" 7 | } 8 | -------------------------------------------------------------------------------- /ink/I117/story.ink: -------------------------------------------------------------------------------- 1 | { factorial(5) } 2 | == function factorial(n) == 3 | { n == 1: 4 | ~ return 1 5 | - else: 6 | ~ return (n * factorial(n-1)) 7 | } 8 | -------------------------------------------------------------------------------- /ink/I128/transcript.txt: -------------------------------------------------------------------------------- 1 | 1 1 2 | 2 2 3 | 3 3 4 | 1 1 5 | 2 1 6 | 3 1 7 | 1 2 8 | 2 2 9 | 3 2 10 | 1 1 11 | 2 1 12 | 3 1 13 | 1 2 14 | 2 2 15 | 3 2 16 | -------------------------------------------------------------------------------- /ink/I133/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Float printing precision", 3 | "tags": [ 4 | "floats", 5 | "superficialities" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /ink/I021/story.ink: -------------------------------------------------------------------------------- 1 | -> 2tests 2 | == 2tests == 3 | ~ temp 512x2 = 512 * 2 4 | ~ temp 512x2p2 = 512x2 + 2 5 | 512x2 = {512x2} 6 | 512x2p2 = {512x2p2} 7 | -> DONE 8 | 9 | -------------------------------------------------------------------------------- /ink/I028/story.ink: -------------------------------------------------------------------------------- 1 | -> top 2 | = top 3 | {top} 4 | <- aside 5 | {top} 6 | -> DONE 7 | = aside 8 | * {false} DONE 9 | - -> DONE 10 | -------------------------------------------------------------------------------- /ink/I085/story.ink: -------------------------------------------------------------------------------- 1 | * 'Hello {name()}[, your name is {name()}.'],' I said, knowing full well that his name was {name()}. 2 | -> DONE 3 | == function name == 4 | Joe 5 | -------------------------------------------------------------------------------- /ink/I107/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Shuffle stack muddying", 3 | "tags": [ 4 | "sequences" 5 | ], 6 | "hide": "Uses randomness" 7 | } 8 | -------------------------------------------------------------------------------- /ink/I108/transcript.txt: -------------------------------------------------------------------------------- 1 | 1. a 2 | 2. 3 | 3. b 4 | 4. b 5 | --- 6 | 1. 7 | 2. a 8 | 3. a 9 | --- 10 | 1. a 11 | 2. 12 | 3. 13 | --- 14 | 1. 15 | 2. 16 | 3. 17 | -------------------------------------------------------------------------------- /ink/I014/story.ink: -------------------------------------------------------------------------------- 1 | ~ f(1, 1) 2 | == function f(x, y) == 3 | { x == 1 and y == 1: 4 | ~ x = 2 5 | ~ f(y, x) 6 | - else: 7 | {x} {y} 8 | } 9 | ~ return 10 | -------------------------------------------------------------------------------- /ink/I067/story.ink: -------------------------------------------------------------------------------- 1 | LIST l1 = (a), b, (c) 2 | LIST l2 = (x), y, z 3 | VAR t = () 4 | ~ t = l1 + l2 5 | {t} 6 | == elsewhere == 7 | ~ t += z 8 | {t} 9 | -> END 10 | -------------------------------------------------------------------------------- /ink/I079/story.ink: -------------------------------------------------------------------------------- 1 | -> opts 2 | = opts 3 | * (firstOpt) [First choice] -> opts 4 | * {firstOpt} [Second choice] -> opts 5 | * -> end 6 | - (end) 7 | -> END 8 | -------------------------------------------------------------------------------- /ink/I100/transcript.txt: -------------------------------------------------------------------------------- 1 | 2 | 1: Start of choice text Choice only text 3 | ?> Start of choice text This is after the choice is taken 4 | # tags: tag both, post choice tag 5 | -------------------------------------------------------------------------------- /ink/I103/story.ink: -------------------------------------------------------------------------------- 1 | This is a thread example 2 | <- example_thread 3 | The example is now complete. 4 | == example_thread == 5 | Hello. 6 | -> DONE 7 | World. 8 | -> DONE 9 | -------------------------------------------------------------------------------- /ink/I032/transcript.txt: -------------------------------------------------------------------------------- 1 | Hey, my name is Philippe. What about yours? 2 | I am Andre and I need my rheumatism pills! 3 | Would you like me, Philippe, to get some more for you? 4 | -------------------------------------------------------------------------------- /ink/I039/story.ink: -------------------------------------------------------------------------------- 1 | - first gather 2 | * [option 1] 3 | * [option 2] 4 | - the main gather 5 | {false: 6 | * unreachable option -> END 7 | } 8 | - bottom gather 9 | -------------------------------------------------------------------------------- /ink/I083/story.ink: -------------------------------------------------------------------------------- 1 | -> generate_choice(1) -> 2 | == generate_choice(x) == 3 | {true: 4 | + A choice 5 | Vaue of local var is: {x} 6 | -> END 7 | } 8 | ->-> 9 | -------------------------------------------------------------------------------- /ink/I105/transcript.txt: -------------------------------------------------------------------------------- 1 | Hey, my name is Philippe. What about yours? 2 | I am Andre and I need my rheumatism pills! 3 | Would you like me, Philippe, to get some more for you? 4 | -------------------------------------------------------------------------------- /ink/I015/story.ink: -------------------------------------------------------------------------------- 1 | -> one_then_tother(-> tunnel) 2 | === one_then_tother(-> x) === 3 | -> x -> end 4 | === tunnel === 5 | STUFF 6 | ->-> 7 | === end === 8 | -> END 9 | -------------------------------------------------------------------------------- /ink/I055/story.ink: -------------------------------------------------------------------------------- 1 | -> hurry_home 2 | === hurry_home === 3 | We hurried home to Savile Row -> as_fast_as_we_could 4 | === as_fast_as_we_could === 5 | as fast as we could. 6 | -> DONE 7 | -------------------------------------------------------------------------------- /ink/I094/transcript.txt: -------------------------------------------------------------------------------- 1 | . four . 2 | . fifteen . 3 | . thirty-seven . 4 | . one hundred and one . 5 | . two hundred and twenty-two . 6 | . one thousand two hundred and thirty-four . 7 | -------------------------------------------------------------------------------- /ink/I027/story.ink: -------------------------------------------------------------------------------- 1 | -> first 2 | == first == 3 | 1) Seen first {first} times. 4 | -> second -> 5 | 2) Seen first {first} times. 6 | -> DONE 7 | == second == 8 | In second. 9 | ->-> 10 | -------------------------------------------------------------------------------- /ink/I038/story.ink: -------------------------------------------------------------------------------- 1 | - start 2 | { 3 | - true: * [go to a stitch] -> a_stitch 4 | } 5 | - gather should be seen 6 | -> DONE 7 | 8 | = a_stitch 9 | result 10 | -> END 11 | -------------------------------------------------------------------------------- /ink/I071/story.ink: -------------------------------------------------------------------------------- 1 | LIST list = a, (b), c, (d), e 2 | {list} 3 | {(a, c) + (b, e)} 4 | {(a, b, c) ^ (c, b, e)} 5 | {(list ? (b, d, e)) + 0} 6 | {(list ? (d, b)) + 0} 7 | {(list !? (c)) + 0} 8 | -------------------------------------------------------------------------------- /ink/I025/included_file_2.ink: -------------------------------------------------------------------------------- 1 | VAR t2 = 5 2 | 3 | The value of a variable in test file 2 is { t2 }. 4 | 5 | == knot_in_2 == 6 | The value when accessed from knot_in_2 is { t2 }. 7 | -> END 8 | 9 | -------------------------------------------------------------------------------- /ink/I118/story.ink: -------------------------------------------------------------------------------- 1 | VAR negativeLiteral = -1 2 | VAR negativeLiteral2 = not not false 3 | VAR negativeLiteral3 = !(0) 4 | {negativeLiteral + 0} 5 | {negativeLiteral2 + 0} 6 | {negativeLiteral3 + 0} 7 | -------------------------------------------------------------------------------- /ink/I076/story.ink: -------------------------------------------------------------------------------- 1 | { six() + two() } 2 | -> END 3 | === function six 4 | ~ return four() + two() 5 | === function four 6 | ~ return two() + two() 7 | === function two 8 | ~ return 2 9 | -------------------------------------------------------------------------------- /ink/I132/metadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "oneLineDescription": "Comparing diverts", 3 | "context": ["https://github.com/inkle/ink/pull/646"], 4 | "tags": [ 5 | "diverts", 6 | "comparisons" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /ink/I069/story.ink: -------------------------------------------------------------------------------- 1 | LIST list = l, m = 5, n 2 | {LIST_VALUE(l)} 3 | {list(1)} 4 | ~ temp t = list() 5 | ~ t += n 6 | {t} 7 | ~ t = LIST_ALL(t) 8 | ~ t -= n 9 | {t} 10 | ~ t = LIST_INVERT(t) 11 | {t} 12 | -------------------------------------------------------------------------------- /ink/I093/story.ink: -------------------------------------------------------------------------------- 1 | - (start) 2 | * [Choice 1] 3 | * [Choice 2] 4 | * {false} Impossible choice 5 | * -> default 6 | - After choice 7 | -> start 8 | == default == 9 | This is default. 10 | -> DONE 11 | -------------------------------------------------------------------------------- /bytecode/B003/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | "ev", 5 | 42, 6 | "out", 7 | "/ev", 8 | "^\n", 9 | "done", 10 | null 11 | ], 12 | "listDefs": {} 13 | } 14 | -------------------------------------------------------------------------------- /ink/I008/story.ink: -------------------------------------------------------------------------------- 1 | -> outer 2 | === outer 3 | ~ temp x = 0 4 | ~ f(x) 5 | {x} 6 | -> DONE 7 | === function f(ref x) 8 | ~temp local = 0 9 | ~x=x 10 | {setTo3(local)} 11 | === function setTo3(ref x) 12 | ~x = 3 13 | -------------------------------------------------------------------------------- /ink/I122/story.ink: -------------------------------------------------------------------------------- 1 | {false: 2 | 3 | - else: 4 | else 5 | } 6 | {6: 7 | - 5: five 8 | - else: else 9 | } 10 | -> onceTest -> 11 | -> onceTest -> 12 | == onceTest == 13 | {once: 14 | - hi 15 | } 16 | ->-> 17 | -------------------------------------------------------------------------------- /ink/I127/story.ink: -------------------------------------------------------------------------------- 1 | VAR testVar = 5 2 | VAR testVar2 = 10 3 | Hello world! 4 | ~ testVar = 15 5 | ~ testVar2 = 100 6 | Hello world 2! 7 | * choice 8 | ~ testVar = 25 9 | ~ testVar2 = 200 10 | -> END 11 | -------------------------------------------------------------------------------- /ink/I106/transcript.txt: -------------------------------------------------------------------------------- 1 | Once: one two 2 | Stopping: one two two two 3 | Default: one two two two 4 | Cycle: one two one two 5 | Shuffle: two one two one 6 | Shuffle stopping: one two final final 7 | Shuffle once: two one 8 | -------------------------------------------------------------------------------- /ink/I111/story.ink: -------------------------------------------------------------------------------- 1 | -> thing -> 2 | -> thing -> 3 | -> thing -> 4 | -> thing -> 5 | -> thing -> 6 | Done. 7 | == thing == 8 | {once: 9 | - Wait for it.... 10 | - 11 | - 12 | - Surprise! 13 | } 14 | ->-> 15 | -------------------------------------------------------------------------------- /bytecode/B001/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | [ 5 | "^Hello, world!", 6 | "\n", 7 | null 8 | ], 9 | "done", 10 | null 11 | ], 12 | "listDefs": {} 13 | } 14 | -------------------------------------------------------------------------------- /bytecode/B004/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | "ev", 5 | 9007199254740992, 6 | "out", 7 | "/ev", 8 | "^\n", 9 | "done", 10 | null 11 | ], 12 | "listDefs": {} 13 | } 14 | -------------------------------------------------------------------------------- /bytecode/B006/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | "^This is not printed:\n", 5 | 42, 6 | "^Neither is this:\n", 7 | 3.145, 8 | "done", 9 | null 10 | ], 11 | "listDefs": {} 12 | } 13 | -------------------------------------------------------------------------------- /ink/I088/story.ink: -------------------------------------------------------------------------------- 1 | * { true } { false } not displayed 2 | * { true } { true } 3 | { true and true } one 4 | * { false } not displayed 5 | * (name) { true } two 6 | * { true } 7 | { true } 8 | three 9 | * { true } 10 | four 11 | -------------------------------------------------------------------------------- /ink/I030/story.ink: -------------------------------------------------------------------------------- 1 | -> empty_world 2 | === empty_world === 3 | {TURNS_SINCE(-> then)} = -1 4 | * (then) stuff 5 | {TURNS_SINCE(-> then)} = 0 6 | * * (next) more stuff 7 | {TURNS_SINCE(-> then)} = 1 8 | -> DONE 9 | -------------------------------------------------------------------------------- /ink/I062/story.ink: -------------------------------------------------------------------------------- 1 | -> one (1) -> two (2) -> 2 | three (3) 3 | == one(num) == 4 | one ({num}) 5 | -> oneAndAHalf (1.5) -> 6 | ->-> 7 | == oneAndAHalf(num) == 8 | one and a half ({num}) 9 | ->-> 10 | == two (num) == 11 | two ({num}) 12 | ->-> 13 | -------------------------------------------------------------------------------- /bytecode/B002/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | [ 5 | "nop", 6 | "^I'm after an nop!", 7 | "^\n", 8 | null 9 | ], 10 | "done", 11 | null 12 | ], 13 | "listDefs": {} 14 | } 15 | 16 | -------------------------------------------------------------------------------- /ink/I096/story.ink: -------------------------------------------------------------------------------- 1 | VAR globalVal = 5 2 | {globalVal} 3 | ~ squaresquare(globalVal) 4 | {globalVal} 5 | == function squaresquare(ref x) == 6 | {square(x)} {square(x)} 7 | ~ return 8 | == function square(ref x) == 9 | ~ x = x * x 10 | ~ return 11 | -------------------------------------------------------------------------------- /ink/I123/story.ink: -------------------------------------------------------------------------------- 1 | VAR result = 0 2 | ~ factorialByRef(result, 5) 3 | { result } 4 | == function factorialByRef(ref r, n) == 5 | { r == 0: 6 | ~ r = 1 7 | } 8 | { n > 1: 9 | ~ r = r * n 10 | ~ factorialByRef(r, n-1) 11 | } 12 | ~ return 13 | -------------------------------------------------------------------------------- /ink/I031/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = ->knot 2 | Count start: {READ_COUNT (x)} {READ_COUNT (-> knot)} {knot} 3 | -> x (1) -> 4 | -> x (2) -> 5 | -> x (3) -> 6 | Count end: {READ_COUNT (x)} {READ_COUNT (-> knot)} {knot} 7 | -> END 8 | == knot (a) == 9 | {a} 10 | ->-> 11 | -------------------------------------------------------------------------------- /ink/I063/story.ink: -------------------------------------------------------------------------------- 1 | -> knot.stitch.gather 2 | == knot == 3 | = stitch 4 | - hello 5 | * (choice) test 6 | choice content 7 | - (gather) 8 | gather 9 | {stopping: 10 | - -> knot.stitch.choice 11 | - second time round 12 | } 13 | -> END 14 | -------------------------------------------------------------------------------- /ink/I124/story.ink: -------------------------------------------------------------------------------- 1 | One 2 | Two 3 | Three 4 | == function func1 == 5 | This is a function 6 | ~ return 5 7 | == function func2 == 8 | This is a function without a return value 9 | ~ return 10 | == function add(x,y) == 11 | x = {x}, y = {y} 12 | ~ return x + y 13 | -------------------------------------------------------------------------------- /ink/I130/story.ink: -------------------------------------------------------------------------------- 1 | -> knot 2 | === knot 3 | <- threadB 4 | -> tunnel -> 5 | THE END 6 | -> END 7 | === tunnel 8 | - blah blah 9 | * wigwag 10 | - ->-> 11 | === threadB 12 | * option 13 | - something 14 | -> DONE 15 | -------------------------------------------------------------------------------- /ink/I059/story.ink: -------------------------------------------------------------------------------- 1 | -> knot_with_options -> 2 | Finished tunnel. 3 | Starting thread. 4 | <- thread_with_options 5 | * E 6 | - 7 | Done. 8 | == knot_with_options == 9 | * A 10 | * B 11 | - 12 | ->-> 13 | == thread_with_options == 14 | * C 15 | * D 16 | - -> DONE 17 | -------------------------------------------------------------------------------- /ink/I074/story.ink: -------------------------------------------------------------------------------- 1 | LIST l = A, (B), (C), (D), E 2 | {LIST_RANDOM(l)} 3 | {LIST_RANDOM (l)} 4 | {LIST_RANDOM (l)} 5 | {LIST_RANDOM (l)} 6 | {LIST_RANDOM (l)} 7 | {LIST_RANDOM (l)} 8 | {LIST_RANDOM (l)} 9 | {LIST_RANDOM (l)} 10 | {LIST_RANDOM (l)} 11 | {LIST_RANDOM (l)} 12 | -------------------------------------------------------------------------------- /ink/I098/story.ink: -------------------------------------------------------------------------------- 1 | -> knot 2 | === knot 3 | <- threadA 4 | When should this get printed? 5 | -> DONE 6 | === threadA 7 | -> tunnel -> 8 | Finishing thread. 9 | -> DONE 10 | === tunnel 11 | - I’m in a tunnel 12 | * I’m an option 13 | - ->-> 14 | -------------------------------------------------------------------------------- /ink/I107/story.ink: -------------------------------------------------------------------------------- 1 | * {condFunc()} [choice 1] 2 | * {condFunc()} [choice 2] 3 | * {condFunc()} [choice 3] 4 | * {condFunc()} [choice 4] 5 | === function condFunc() === 6 | {shuffle: 7 | - ~ return false 8 | - ~ return true 9 | - ~ return true 10 | - ~ return false 11 | } 12 | -------------------------------------------------------------------------------- /ink/I089/story.ink: -------------------------------------------------------------------------------- 1 | VAR times = 3 2 | -> home 3 | == home == 4 | ~ times = times - 1 5 | {times >= 0:-> eat} 6 | I've finished eating now. 7 | -> END 8 | == eat == 9 | This is the {first|second|third} time. 10 | * Eat ice-cream[] 11 | * Drink coke[] 12 | * Munch cookies[] 13 | - 14 | -> home 15 | -------------------------------------------------------------------------------- /ink/I104/story.ink: -------------------------------------------------------------------------------- 1 | -> start 2 | == start == 3 | -> tunnel -> 4 | The end 5 | -> END 6 | == tunnel == 7 | <- place1 8 | <- place2 9 | -> DONE 10 | == place1 == 11 | This is place 1. 12 | * choice in place 1 13 | - ->-> 14 | == place2 == 15 | This is place 2. 16 | * choice in place 2 17 | - ->-> 18 | -------------------------------------------------------------------------------- /ink/I113/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = 3 2 | { 3 | - x == 1: one 4 | - x == 2: two 5 | - else: other 6 | } 7 | { 8 | - x == 1: one 9 | - x == 2: two 10 | - other 11 | } 12 | { x == 4: 13 | - The main clause 14 | - else: other 15 | } 16 | { x == 4: 17 | The main clause 18 | - else: 19 | other 20 | } 21 | -------------------------------------------------------------------------------- /ink/I002/transcript.txt: -------------------------------------------------------------------------------- 1 | "What's that?" my master asked. 2 | 3 | 1: "I am somewhat tired." 4 | 2: "Nothing, Monsieur!" 5 | 3: "I said, this journey is appalling." 6 | ?> "I said, this journey is appalling and I want no more of it." 7 | "Ah," he replied, not unkindly. "I see you are feeling frustrated. Tomorrow, things will improve." 8 | -------------------------------------------------------------------------------- /bytecode/B007/transcript.txt: -------------------------------------------------------------------------------- 1 | "string" + 1 = string1 2 | 1 + "string" = 1string 3 | "foo" + "bar" = foobar 4 | "string" + 1.125 = string1.125 5 | 1.125 + "string" = 1.125string 6 | "42" == 42 = 1 7 | 42 == "42" = 1 8 | "42" == 43 = 0 9 | 43 == "42" = 0 10 | "42" != 42 = 0 11 | 42 != "42" = 0 12 | 43 != "42" = 1 13 | "42" != 43 = 1 14 | -------------------------------------------------------------------------------- /drivers/inkjs_system_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_system.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) -------------------------------------------------------------------------------- /ink/I099/story.ink: -------------------------------------------------------------------------------- 1 | VAR x = 2 2 | # author: Joe 3 | # title: My Great Story 4 | This is the content 5 | == knot == 6 | # knot tag 7 | Knot content 8 | # end of knot tag 9 | -> END 10 | = stitch 11 | # stitch tag 12 | Stitch content 13 | # this tag is below some content so isn't included in the static tags for the stitch 14 | -> END 15 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.10.5_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v1.10.5.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) -------------------------------------------------------------------------------- /ink/I089/transcript.txt: -------------------------------------------------------------------------------- 1 | This is the first time. 2 | 3 | 1: Eat ice-cream 4 | 2: Drink coke 5 | 3: Munch cookies 6 | ?> Eat ice-cream 7 | This is the second time. 8 | 9 | 1: Drink coke 10 | 2: Munch cookies 11 | ?> Drink coke 12 | This is the third time. 13 | 14 | 1: Munch cookies 15 | ?> Munch cookies 16 | I've finished eating now. 17 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.11.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v1.11.0.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.9.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v1.9.0.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.0.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v2.0.0.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.1.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v2.1.0.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.2.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v2.2.0.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.2.1_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_v2.2.1.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /drivers/binkplayer_v1.0.1_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 | PATH = os.path.join(ROOT, 'deps', 'binkplayer_v1.0.1', 'binkplayer') 9 | ARGS = ["binkplayer"] + sys.argv[1:] 10 | os.execv(PATH, ARGS) 11 | sleep(2) 12 | -------------------------------------------------------------------------------- /drivers/inklecate_v0.9.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 | PATH = os.path.join(ROOT, 'deps', 'inklecore_v0.9.0', 'inklecate') 9 | ARGS = ["inklecate"] + sys.argv[1:] 10 | os.execv(PATH, ARGS) 11 | sleep(2) 12 | 13 | -------------------------------------------------------------------------------- /drivers/inklecate_v1.0.0_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 | PATH = os.path.join(ROOT, 'deps', 'inklecate_v1.0.0', 'inklecate') 9 | ARGS = ["inklecate"] + sys.argv[1:] 10 | os.execv(PATH, ARGS) 11 | sleep(2) 12 | 13 | -------------------------------------------------------------------------------- /drivers/inklecate_v1.1.1_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 | PATH = os.path.join(ROOT, 'deps', 'inklecate_v1.1.1', 'inklecate') 9 | ARGS = ["inklecate"] + sys.argv[1:] 10 | os.execv(PATH, ARGS) 11 | sleep(2) 12 | 13 | -------------------------------------------------------------------------------- /ink/I003/transcript.txt: -------------------------------------------------------------------------------- 1 | Should you cross the river? 2 | 3 | 1: Yes 4 | 2: No 5 | ?> You follow the path along the river for some time and finally encounter a huge man with a wooden stick. 6 | As you start talking to him, he beats you with his weapon. 7 | 8 | 1: Fight back 9 | 2: Flee 10 | ?> You desperately run for your life and never look back. 11 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.2.1_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | 7 | ROOT = os.path.dirname(os.path.abspath(__file__)) 8 | SRC = os.path.join(ROOT, 'inkjs_compiler_v2.2.1.js') 9 | NODE_PATH = shutil.which("node") 10 | ARGS = ["node", SRC] + sys.argv[1:] 11 | os.execv(NODE_PATH, ARGS) 12 | sleep(2) 13 | -------------------------------------------------------------------------------- /ink/I068/story.ink: -------------------------------------------------------------------------------- 1 | LIST Food = Pizza, Pasta, Curry, Paella 2 | LIST Currency = Pound, Euro, Dollar 3 | LIST Numbers = One, Two, Three, Four, Five, Six, Seven 4 | VAR all = () 5 | ~ all = LIST_ALL(Food) + LIST_ALL(Currency) 6 | {all} 7 | {LIST_RANGE(all, 2, 3)} 8 | {LIST_RANGE(LIST_ALL(Numbers), Two, Six)} 9 | {LIST_RANGE((Pizza, Pasta), -1, 100)} // allow out of range 10 | -------------------------------------------------------------------------------- /ink/I002/story.ink: -------------------------------------------------------------------------------- 1 | "What's that?" my master asked. 2 | * "I am somewhat tired[."]," I repeated. 3 | "Really," he responded. "How deleterious." 4 | * "Nothing, Monsieur!"[] I replied. 5 | "Very good, then." 6 | * "I said, this journey is appalling[."] and I want no more of it." 7 | "Ah," he replied, not unkindly. "I see you are feeling frustrated. Tomorrow, things will improve." 8 | -------------------------------------------------------------------------------- /drivers/inkjs_compiler_v2.2.1.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Compiler = require('../deps/inkjs_v2.2.1').Compiler; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[3]; 6 | var inkPath = process.argv[4]; 7 | var ink = fs.readFileSync(inkPath, 'UTF-8'); 8 | var bytecode = (new Compiler(ink)).Compile().ToJson(); 9 | fs.writeFileSync(bytecodePath, bytecode, 'UTF-8'); 10 | -------------------------------------------------------------------------------- /drivers/inklecate_v1.0.0_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | import platform 7 | 8 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 9 | DIR = os.path.join(ROOT, 'deps', 'inklecate_v1.0.0') 10 | PATH = os.path.join(DIR, 'inklecate') 11 | ARGS = ["inklecate"] + sys.argv[1:] 12 | os.execv(PATH, ARGS) 13 | sleep(2) 14 | -------------------------------------------------------------------------------- /drivers/inklecate_v1.1.1_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | import platform 7 | 8 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 9 | DIR = os.path.join(ROOT, 'deps', 'inklecate_v1.1.1') 10 | PATH = os.path.join(DIR, 'inklecate') 11 | ARGS = ["inklecate"] + sys.argv[1:] 12 | os.execv(PATH, ARGS) 13 | sleep(2) 14 | -------------------------------------------------------------------------------- /drivers/inklecate_v0.9.0+_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import platform 6 | 7 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 8 | PATH = os.path.join(ROOT, 'deps', 'inklecore_v0.9.0_plus', 'inklecate') 9 | NAME = "inklecate" if platform.system() == "windows" else PATH 10 | ARGS = [NAME] + sys.argv[1:] 11 | os.execv(PATH, ARGS) 12 | -------------------------------------------------------------------------------- /drivers/test_compiler_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import time 5 | 6 | output_path = sys.argv[2] 7 | input_path = sys.argv[3] 8 | 9 | if "I001" in input_path: 10 | print("I crash on example I001!", file=sys.stderr) 11 | exit(1) 12 | if "I002" in input_path: 13 | print("I don't produce output on example I001!", file=sys.stderr) 14 | exit(0) 15 | 16 | -------------------------------------------------------------------------------- /ink/I126/story.ink: -------------------------------------------------------------------------------- 1 | Start 2 | -> tunnel -> 3 | End 4 | -> END 5 | == tunnel == 6 | In tunnel. 7 | ->-> 8 | === function function_to_evaluate() === 9 | { zero_equals_(1): 10 | ~ return "WRONG" 11 | - else: 12 | ~ return "RIGHT" 13 | } 14 | === function zero_equals_(k) === 15 | ~ do_nothing(0) 16 | ~ return (0 == k) 17 | === function do_nothing(k) 18 | ~ return 0 19 | -------------------------------------------------------------------------------- /ink/I132/story.ink: -------------------------------------------------------------------------------- 1 | VAR a_divert_variable = -> a_divert 2 | 3 | { (a_divert_variable == -> a_divert) + 0 } 4 | { (a_divert_variable != -> a_divert) + 0 } 5 | 6 | { (a_divert_variable == -> another_divert) + 0 } 7 | { (a_divert_variable != -> another_divert) + 0 } 8 | 9 | === a_divert === 10 | with some content 11 | -> DONE 12 | 13 | === another_divert === 14 | with some other content 15 | -> DONE 16 | -------------------------------------------------------------------------------- /ink/I108/story.ink: -------------------------------------------------------------------------------- 1 | 1. -> seq1 -> 2 | 2. -> seq1 -> 3 | 3. -> seq1 -> 4 | 4. -> seq1 -> 5 | \--- 6 | 1. -> seq2 -> 7 | 2. -> seq2 -> 8 | 3. -> seq2 -> 9 | \--- 10 | 1. -> seq3 -> 11 | 2. -> seq3 -> 12 | 3. -> seq3 -> 13 | \--- 14 | 1. -> seq4 -> 15 | 2. -> seq4 -> 16 | 3. -> seq4 -> 17 | == seq1 == 18 | {a||b} 19 | ->-> 20 | == seq2 == 21 | {|a} 22 | ->-> 23 | == seq3 == 24 | {a|} 25 | ->-> 26 | == seq4 == 27 | {|} 28 | ->-> 29 | -------------------------------------------------------------------------------- /ink/I058/story.ink: -------------------------------------------------------------------------------- 1 | VAR to_one = -> one 2 | VAR to_two = -> two 3 | {to_one == to_two:same knot|different knot} 4 | {to_one == to_one:same knot|different knot} 5 | {to_two == to_two:same knot|different knot} 6 | { -> one == -> two:same knot|different knot} 7 | { -> one == to_one:same knot|different knot} 8 | { to_one == -> one:same knot|different knot} 9 | == one 10 | One 11 | -> DONE 12 | === two 13 | Two 14 | -> DONE 15 | -------------------------------------------------------------------------------- /ink/I114/story.ink: -------------------------------------------------------------------------------- 1 | {false:not true|true} 2 | { 3 | - 4 > 5: not true 4 | - 5 > 4: true 5 | } 6 | { 2*2 > 3: 7 | - true 8 | - not true 9 | } 10 | { 11 | - 1 > 3: not true 12 | - { 2+2 == 4: 13 | - true 14 | - not true 15 | } 16 | } 17 | { 2*3: 18 | - 1+7: not true 19 | - 9: not true 20 | - 1+1+1+3: true 21 | - 9-3: also true but not printed 22 | } 23 | { true: 24 | great 25 | right? 26 | } 27 | -------------------------------------------------------------------------------- /diff.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import codecs 5 | from difflib import unified_diff 6 | 7 | if len(sys.argv) != 3: 8 | exit(1) 9 | 10 | _, a, b = sys.argv 11 | 12 | a_lines = codecs.open(a, encoding='utf-8-sig').read().splitlines() 13 | b_lines = codecs.open(b, encoding='utf-8-sig').read().splitlines() 14 | 15 | 16 | out_lines = list(unified_diff(a_lines, b_lines, fromfile=a, tofile=b, lineterm="")) 17 | 18 | if out_lines: 19 | sys.stdout.writelines(out_lines) 20 | exit(1) 21 | 22 | -------------------------------------------------------------------------------- /ink/I032/story.ink: -------------------------------------------------------------------------------- 1 | VAR currentActor = "Bobby" 2 | 3 | LIST listOfActors = P, A, S, C 4 | VAR s = -> set_actor 5 | -> start 6 | 7 | ===function set_actor(x) 8 | { x: 9 | - P: ~ currentActor = "Philippe" 10 | - A: ~ currentActor = "Andre" 11 | - else: ~ currentActor = "Bobby" 12 | } 13 | 14 | === start === 15 | {s(P)} Hey, my name is {currentActor}. What about yours? 16 | {s(A)} I am {currentActor} and I need my rheumatism pills! 17 | {s(P)} Would you like me, {currentActor}, to get some more for you? 18 | -> END 19 | -------------------------------------------------------------------------------- /ink/I105/story.ink: -------------------------------------------------------------------------------- 1 | VAR currentActor = "Bobby" 2 | 3 | LIST listOfActors = P, A, S, C 4 | VAR s = -> set_actor 5 | -> start 6 | 7 | ===function set_actor(x) 8 | { x: 9 | - P: ~ currentActor = "Philippe" 10 | - A: ~ currentActor = "Andre" 11 | - else: ~ currentActor = "Bobby" 12 | } 13 | 14 | === start === 15 | {s(P)} Hey, my name is {currentActor}. What about yours? 16 | {s(A)} I am {currentActor} and I need my rheumatism pills! 17 | {s(P)} Would you like me, {currentActor}, to get some more for you? 18 | -> END 19 | -------------------------------------------------------------------------------- /ink/I084/transcript.txt: -------------------------------------------------------------------------------- 1 | First line. 2 | Second line. 3 | 4 | 1: Choice 1 5 | 2: Choice 2 6 | 3: Finish 7 | ?> Choice 1 8 | First line. 9 | Second line. 10 | 11 | 1: Choice 1 12 | 2: Choice 2 13 | 3: Finish 14 | ?> Choice 2 15 | First line. 16 | Second line. 17 | 18 | 1: Choice 1 19 | 2: Choice 2 20 | 3: Finish 21 | ?> Choice 1 22 | First line. 23 | Second line. 24 | 25 | 1: Choice 1 26 | 2: Choice 2 27 | 3: Finish 28 | ?> Choice 2 29 | First line. 30 | Second line. 31 | 32 | 1: Choice 1 33 | 2: Choice 2 34 | 3: Finish 35 | ?> Finish 36 | -------------------------------------------------------------------------------- /drivers/test_runtime_runtime_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import sys 4 | import time 5 | 6 | bytecode_path = sys.argv[1] 7 | if "B001" in bytecode_path: 8 | print("I crash on example B001!", file=sys.stderr) 9 | exit(1) 10 | if "B002" in bytecode_path: 11 | # I succeed on example B002 12 | print("I'm after an nop!") 13 | if "B003" in bytecode_path: 14 | print("I timeout on example B003!", file=sys.stderr) 15 | sys.stderr.flush() 16 | time.sleep(30) 17 | if "B004" in bytecode_path: 18 | print("The wrong output!") 19 | 20 | -------------------------------------------------------------------------------- /drivers/inklecate_v0.9.0_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | import platform 7 | 8 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 9 | DIR = os.path.join(ROOT, 'deps', 'inklecate_v0.9.0') 10 | if platform.system().lower() == "linux": 11 | MONO_PATH = shutil.which("mono") 12 | PATH = os.path.join(DIR, 'inklecate.exe') 13 | ARGS = ["mono", PATH] + sys.argv[1:] 14 | os.execv(MONO_PATH, ARGS) 15 | else: 16 | PATH = os.path.join(DIR, 'inklecate') 17 | ARGS = ["inklecate"] + sys.argv[1:] 18 | os.execv(PATH, ARGS) 19 | sleep(2) 20 | -------------------------------------------------------------------------------- /drivers/inklecate_v0.8.3_compiler_driver: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | import sys 5 | import shutil 6 | import platform 7 | 8 | ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 9 | DIR = os.path.join(ROOT, 'deps', 'inklecate_v0.8.3') 10 | if platform.system().lower() == "linux": 11 | MONO_PATH = shutil.which("mono") 12 | PATH = os.path.join(DIR, 'inklecate.exe') 13 | ARGS = ["mono", PATH] + sys.argv[1:] 14 | os.execv(MONO_PATH, ARGS) 15 | else: 16 | PATH = os.path.join(DIR, 'inklecate') 17 | ARGS = ["inklecate"] + sys.argv[1:] 18 | os.execv(PATH, ARGS) 19 | sleep(2) 20 | 21 | -------------------------------------------------------------------------------- /ink/I128/story.ink: -------------------------------------------------------------------------------- 1 | VAR knotCount = 0 2 | VAR stitchCount = 0 3 | -> gather_count_test -> 4 | ~ knotCount = 0 5 | -> knot_count_test -> 6 | ~ knotCount = 0 7 | -> knot_count_test -> 8 | -> stitch_count_test -> 9 | == gather_count_test == 10 | VAR gatherCount = 0 11 | - (loop) 12 | ~ gatherCount++ 13 | {gatherCount} {loop} 14 | {gatherCount<3:->loop} 15 | ->-> 16 | == knot_count_test == 17 | ~ knotCount++ 18 | {knotCount} {knot_count_test} 19 | {knotCount<3:->knot_count_test} 20 | ->-> 21 | == stitch_count_test == 22 | ~ stitchCount = 0 23 | -> stitch -> 24 | ~ stitchCount = 0 25 | -> stitch -> 26 | ->-> 27 | = stitch 28 | ~ stitchCount++ 29 | {stitchCount} {stitch} 30 | {stitchCount<3:->stitch} 31 | ->-> 32 | -------------------------------------------------------------------------------- /.github/workflows/update_site.yml: -------------------------------------------------------------------------------- 1 | name: Update site 2 | on: 3 | push: 4 | branches: [ master ] 5 | jobs: 6 | build-and-deploy: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Checkout 10 | uses: actions/checkout@v2 11 | with: 12 | persist-credentials: false 13 | - uses: actions/setup-python@v2 14 | with: 15 | python-version: '3.7' 16 | - name: Build 17 | run: | 18 | cd $GITHUB_WORKSPACE 19 | python3 install_deps.py 20 | python3 proof.py inklecate_v0.8.3 inklecate_v0.9.0 inklecate_v1.0.0 inklecate_v1.1.1 inklecate_v0.9.0+_runtime inklecate_v1.0.0_runtime inklecate_v1.1.1_runtime inkjs_v1.11.0_runtime inkjs_v1.10.5_runtime inkjs_v1.9.0_runtime inkjs_v2.0.0_runtime inkjs_v2.1.0_runtime inkjs_v2.2.0_runtime inkjs_v2.2.1_runtime inkjs_v2.2.1 || true 21 | - name: Deploy 22 | uses: JamesIves/github-pages-deploy-action@releases/v4 23 | with: 24 | token: ${{ secrets.ACCESS_TOKEN }} 25 | branch: gh-pages 26 | folder: out 27 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Hector Dearman 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Thanks for considering contributing to this project! 4 | It would be great to have your help. 5 | The guides below may be helpful to get you started. 6 | 7 | ## How can I contribute? 8 | - Add more Ink test cases! 9 | - Add more JSON test cases! 10 | - Add drivers for Ink runtimes! 11 | - Add drivers for Ink compilers! 12 | - Fix any outstanding [TODO](TODO.md)! 13 | - Some yet unimagined and unlisted improvement! 14 | 15 | ## Adding a .json test case 16 | - Copy [bytecode/B001](bytecode/B001) to `bytecode/B0NN` where `N` is an unused testcase number. 17 | - Edit `bytecode/B0NN/bytecode.json` with your new test case. 18 | - Update the input and the expected output (`bytecode/B0NN/input.txt` & `bytecode/B0NN/transcript.txt`). 19 | - Update `bytecode/B0NN/metadata.json` for your testcase. 20 | 21 | ## Adding a .ink test case 22 | - Copy [ink/I001](ink/I001) to `ink/I0NN` where `N` is an unused testcase number. 23 | - Edit `ink/I0NN/story.json` with your new test case. 24 | - Update the input and the expected output (`ink/I0NN/input.txt` & `ink/I0NN/transcript.txt`). 25 | - Update `ink/I0NN/metadata.json` for your testcase. 26 | -------------------------------------------------------------------------------- /ink/I106/story.ink: -------------------------------------------------------------------------------- 1 | ~ SEED_RANDOM(1) 2 | 3 | Once: {f_once()} {f_once()} {f_once()} {f_once()} 4 | Stopping: {f_stopping()} {f_stopping()} {f_stopping()} {f_stopping()} 5 | Default: {f_default()} {f_default()} {f_default()} {f_default()} 6 | Cycle: {f_cycle()} {f_cycle()} {f_cycle()} {f_cycle()} 7 | Shuffle: {f_shuffle()} {f_shuffle()} {f_shuffle()} {f_shuffle()} 8 | Shuffle stopping: {f_shuffle_stopping()} {f_shuffle_stopping()} {f_shuffle_stopping()} {f_shuffle_stopping()} 9 | Shuffle once: {f_shuffle_once()} {f_shuffle_once()} {f_shuffle_once()} {f_shuffle_once()} 10 | 11 | == function f_once == 12 | {once: 13 | - one 14 | - two 15 | } 16 | 17 | == function f_stopping == 18 | {stopping: 19 | - one 20 | - two 21 | } 22 | 23 | == function f_default == 24 | {one|two} 25 | 26 | == function f_cycle == 27 | {cycle: 28 | - one 29 | - two 30 | } 31 | 32 | == function f_shuffle == 33 | {shuffle: 34 | - one 35 | - two 36 | } 37 | 38 | == function f_shuffle_stopping == 39 | {stopping shuffle: 40 | - one 41 | - two 42 | - final 43 | } 44 | 45 | == function f_shuffle_once == 46 | {shuffle once: 47 | - one 48 | - two 49 | } 50 | -------------------------------------------------------------------------------- /drivers/inkjs_system.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('inkjs').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.10.5.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v1.10.5').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.11.0.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v1.11.0').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.0.0.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v2.0.0').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.1.0.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v2.1.0').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.2.0.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v2.2.0').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /drivers/inkjs_v2.2.1.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v2.2.1').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | -------------------------------------------------------------------------------- /drivers/inkjs_v1.9.0.js: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/node 2 | 3 | var Story = require('../deps/inkjs_v1.9.0').Story; 4 | var fs = require('fs'); 5 | var bytecodePath = process.argv[2]; 6 | var bytecode = fs.readFileSync(bytecodePath, 'UTF-8').replace(/^\uFEFF/, ''); 7 | var story = new Story(bytecode); 8 | 9 | var input = ""; 10 | 11 | process.stdin.setEncoding('utf8'); 12 | process.stdin.on('readable', () => { 13 | let chunk; 14 | while ((chunk = process.stdin.read()) !== null) { 15 | input += chunk; 16 | } 17 | }); 18 | process.stdin.on('end', () => { 19 | const choices = input.split("\n").map(n => parseInt(n, 10) - 1); 20 | let lastText = ""; 21 | while (story.canContinue || story.currentChoices.length > 0) { 22 | if (story.currentChoices.length > 0) { 23 | process.stdout.write("\n"); 24 | for (let i=0; i "); 29 | const choiceIndex = choices.shift(); 30 | story.ChooseChoiceIndex(choiceIndex); 31 | } 32 | 33 | if (story.currentTags.length) { 34 | lastText = "# tags: " + story.currentTags.join(", "); 35 | process.stdout.write(lastText); 36 | } 37 | 38 | lastText = story.ContinueMaximally(); 39 | process.stdout.write(lastText); 40 | 41 | if (story.currentTags.length) { 42 | lastText = "# tags: " + story.currentTags.join(", "); 43 | process.stdout.write(lastText); 44 | } 45 | } 46 | 47 | }); 48 | 49 | 50 | -------------------------------------------------------------------------------- /ink/I003/story.ink: -------------------------------------------------------------------------------- 1 | // For license see https://github.com/inkle/ink-library/blob/master/LICENSE 2 | // This is a simple example of tunnel usage to either continue the story or redirect the flow to a death knot. 3 | 4 | VAR hp = 2 5 | LIST deaths = beaten, drown 6 | 7 | -> main 8 | 9 | === function is_alive === 10 | // Condition can be more complex here 11 | ~ return hp > 0 12 | 13 | === get_hit(x) === 14 | ~ hp = hp - x 15 | { is_alive(): 16 | // Everything is alright, continue the story 17 | ->-> 18 | } 19 | // Everything is horribly wrong, redirect the flow to the death knot 20 | -> death(beaten) 21 | 22 | === death(reason) === 23 | { 24 | - reason ? beaten: 25 | You've been beaten to death. 26 | - reason ? drown: 27 | Sadly you've drown in the water. 28 | - else: 29 | Sorry, you're dead 30 | } 31 | -> END 32 | 33 | === main === 34 | Should you cross the river? 35 | * [Yes] 36 | You enter the river but the stream is stronger than you thought. 37 | -> death(drown) 38 | * [No] 39 | You follow the path along the river for some time and finally encounter a huge man with a wooden stick. 40 | As you start talking to him, he beats you with his weapon. 41 | -> get_hit(1) -> 42 | ** [Fight back] 43 | You can hit the man once before he throws you a punch. 44 | -> get_hit(RANDOM(0, 2)) -> 45 | You manage to block his fist and finally push him into the river. 46 | After this legendary fight, you continue your journey and never look back. 47 | ** [Flee] 48 | You desperately run for your life and never look back. 49 | - -> END 50 | -------------------------------------------------------------------------------- /ink/I094/story.ink: -------------------------------------------------------------------------------- 1 | . {print_num(4)} . 2 | . {print_num(15)} . 3 | . {print_num(37)} . 4 | . {print_num(101)} . 5 | . {print_num(222)} . 6 | . {print_num(1234)} . 7 | === function print_num(x) === 8 | { 9 | - x >= 1000: 10 | {print_num(x / 1000)} thousand { x mod 1000 > 0:{print_num(x mod 1000)}} 11 | - x >= 100: 12 | {print_num(x / 100)} hundred { x mod 100 > 0:and {print_num(x mod 100)}} 13 | - x == 0: 14 | zero 15 | - else: 16 | { x >= 20: 17 | { x / 10: 18 | - 2: twenty 19 | - 3: thirty 20 | - 4: forty 21 | - 5: fifty 22 | - 6: sixty 23 | - 7: seventy 24 | - 8: eighty 25 | - 9: ninety 26 | } 27 | { x mod 10 > 0:<>-<>} 28 | } 29 | { x < 10 || x > 20: 30 | { x mod 10: 31 | - 1: one 32 | - 2: two 33 | - 3: three 34 | - 4: four 35 | - 5: five 36 | - 6: six 37 | - 7: seven 38 | - 8: eight 39 | - 9: nine 40 | } 41 | - else: 42 | { x: 43 | - 10: ten 44 | - 11: eleven 45 | - 12: twelve 46 | - 13: thirteen 47 | - 14: fourteen 48 | - 15: fifteen 49 | - 16: sixteen 50 | - 17: seventeen 51 | - 18: eighteen 52 | - 19: nineteen 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /ink/I004/story.ink: -------------------------------------------------------------------------------- 1 | // For license see https://github.com/inkle/ink-library/blob/master/LICENSE 2 | // Print numbers out in English. 3 | You have {print_num(58)} coins. 4 | 5 | === function print_num(x) 6 | { 7 | - x >= 1000: 8 | {print_num(x / 1000)} thousand { x mod 1000 > 0:{print_num(x mod 1000)}} 9 | - x >= 100: 10 | {print_num(x / 100)} hundred { x mod 100 > 0:and {print_num(x mod 100)}} 11 | - x == 0: 12 | zero 13 | - else: 14 | { x >= 20: 15 | { x / 10: 16 | - 2: twenty 17 | - 3: thirty 18 | - 4: forty 19 | - 5: fifty 20 | - 6: sixty 21 | - 7: seventy 22 | - 8: eighty 23 | - 9: ninety 24 | } 25 | { x mod 10 > 0: 26 | <>-<> 27 | } 28 | } 29 | { x < 10 || x > 20: 30 | { x mod 10: 31 | - 1: one 32 | - 2: two 33 | - 3: three 34 | - 4: four 35 | - 5: five 36 | - 6: six 37 | - 7: seven 38 | - 8: eight 39 | - 9: nine 40 | } 41 | - else: 42 | { x: 43 | - 10: ten 44 | - 11: eleven 45 | - 12: twelve 46 | - 13: thirteen 47 | - 14: fourteen 48 | - 15: fifteen 49 | - 16: sixteen 50 | - 17: seventeen 51 | - 18: eighteen 52 | - 19: nineteen 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- 1 | # Todo 2 | - Clean out logging 3 | - More help? 4 | - More readme? 5 | - Fix choosing output dir 6 | - Text mode output 7 | - Rollover help 8 | - Add hostname to metadata 9 | - Compiler/Runtime description in output 10 | - More old inkjs versions? 11 | - More old inklecate versions? 12 | - Finish player -> runtime rename 13 | - Reproduction instructions 14 | - Only show errors tests filter 15 | - xxd mode 16 | - Test for non-determinism (run each test multiple times) 17 | - gif/video showing features 18 | - inline diff 19 | - overview stats 20 | - show tab 21 | - show elapsed time next to exitcode 22 | - investigate https://github.com/y-lohse/inkjs/blob/master/tests/specs/ink/Diverts.spec.js#L112 23 | - Replace execv + sleep on windows 24 | 25 | # Done 26 | - update to new inklecate versions 27 | - whitespace issues 28 | - Floating point precision test 2.33333333 29 | - Add favicon 30 | - show newline 31 | - Serve mode 32 | - Errors on no examples 33 | - Errors on no compiler with Ixxx examples 34 | - Windows support 35 | - Fetch drivertools 36 | - Make work with github actions 37 | - style pass? 38 | - fix lhs sizing 39 | - dynamically find drivers 40 | - Timeout 41 | - infra error 42 | - Extract C# Player 43 | - newline handling 44 | - Example description 45 | - example which fails 46 | - key for icons 47 | - In app help page 48 | - highlight selected item 49 | - add metadata 50 | - add help page 51 | - center lhs 52 | - timeout control 53 | - argument pressing 54 | - pre line wrapping 55 | - input handling 56 | - padding between files 57 | - Website/hosting 58 | - CI 59 | - Readme 60 | - Contributing 61 | - In app help page text 62 | - move menu bar right 63 | - remove gsed dep 64 | - index not NullFocus help? 65 | - list-dir 66 | - add refrence compiler/runtime arg 67 | - page title 68 | - args: can filter programs 69 | - refactor drivers 70 | - fix up status 71 | - compile examples and test players with them 72 | - more examples 73 | - Add timestamp to metadata 74 | - vendor deps 75 | - github link 76 | - extend line to bottom of page 77 | - bool test 78 | - corece bool tests 79 | 80 | 81 | -------------------------------------------------------------------------------- /bytecode/B007/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | 5 | "^\"string\" + 1 = ", 6 | "ev", 7 | "^string", 8 | 1, 9 | "+", 10 | "/ev", 11 | "out", 12 | "\n", 13 | 14 | "^1 + \"string\" = ", 15 | "ev", 16 | 1, 17 | "^string", 18 | "+", 19 | "/ev", 20 | "out", 21 | "\n", 22 | 23 | "^\"foo\" + \"bar\" = ", 24 | "ev", 25 | "^foo", 26 | "^bar", 27 | "+", 28 | "/ev", 29 | "out", 30 | "\n", 31 | 32 | "^\"string\" + 1.125 = ", 33 | "ev", 34 | "^string", 35 | 1.125, 36 | "+", 37 | "/ev", 38 | "out", 39 | "\n", 40 | 41 | "^1.125 + \"string\" = ", 42 | "ev", 43 | 1.125, 44 | "^string", 45 | "+", 46 | "/ev", 47 | "out", 48 | "\n", 49 | 50 | "^\"42\" == 42 = ", 51 | "ev", 52 | "^42", 53 | 42, 54 | "==", 55 | 0, 56 | "+", 57 | "/ev", 58 | "out", 59 | "\n", 60 | 61 | "^42 == \"42\" = ", 62 | "ev", 63 | 42, 64 | "^42", 65 | "==", 66 | 0, 67 | "+", 68 | "/ev", 69 | "out", 70 | "\n", 71 | 72 | "^\"42\" == 43 = ", 73 | "ev", 74 | "^42", 75 | 43, 76 | "==", 77 | 0, 78 | "+", 79 | "/ev", 80 | "out", 81 | "\n", 82 | 83 | "^43 == \"42\" = ", 84 | "ev", 85 | 43, 86 | "^42", 87 | "==", 88 | 0, 89 | "+", 90 | "/ev", 91 | "out", 92 | "\n", 93 | 94 | "^\"42\" != 42 = ", 95 | "ev", 96 | "^42", 97 | 42, 98 | "!=", 99 | 0, 100 | "+", 101 | "/ev", 102 | "out", 103 | "\n", 104 | 105 | "^42 != \"42\" = ", 106 | "ev", 107 | 42, 108 | "^42", 109 | "!=", 110 | 0, 111 | "+", 112 | "/ev", 113 | "out", 114 | "\n", 115 | 116 | "^43 != \"42\" = ", 117 | "ev", 118 | 43, 119 | "^42", 120 | "!=", 121 | 0, 122 | "+", 123 | "/ev", 124 | "out", 125 | "\n", 126 | 127 | "^\"42\" != 43 = ", 128 | "ev", 129 | "^42", 130 | 43, 131 | "!=", 132 | 0, 133 | "+", 134 | "/ev", 135 | "out", 136 | "\n", 137 | 138 | "done", 139 | null 140 | ], 141 | "listDefs": {} 142 | } 143 | -------------------------------------------------------------------------------- /bytecode/B005/bytecode.json: -------------------------------------------------------------------------------- 1 | { 2 | "inkVersion": 19, 3 | "root": [ 4 | [ 5 | "^Choose A or B:", 6 | "\n", 7 | [ 8 | "ev", 9 | { 10 | "^->": "0.2.$r1" 11 | }, 12 | { 13 | "temp=": "$r" 14 | }, 15 | "str", 16 | { 17 | "->": ".^.s" 18 | }, 19 | [ 20 | { 21 | "#n": "$r1" 22 | } 23 | ], 24 | "/str", 25 | "/ev", 26 | { 27 | "*": "0.c-0", 28 | "flg": 18 29 | }, 30 | { 31 | "s": [ 32 | "^A", 33 | { 34 | "->": "$r", 35 | "var": true 36 | }, 37 | null 38 | ] 39 | } 40 | ], 41 | [ 42 | "ev", 43 | { 44 | "^->": "0.3.$r1" 45 | }, 46 | { 47 | "temp=": "$r" 48 | }, 49 | "str", 50 | { 51 | "->": ".^.s" 52 | }, 53 | [ 54 | { 55 | "#n": "$r1" 56 | } 57 | ], 58 | "/str", 59 | "/ev", 60 | { 61 | "*": "0.c-1", 62 | "flg": 18 63 | }, 64 | { 65 | "s": [ 66 | "^B", 67 | { 68 | "->": "$r", 69 | "var": true 70 | }, 71 | null 72 | ] 73 | } 74 | ], 75 | { 76 | "c-0": [ 77 | "ev", 78 | { 79 | "^->": "0.c-0.$r2" 80 | }, 81 | "/ev", 82 | { 83 | "temp=": "$r" 84 | }, 85 | { 86 | "->": "0.2.s" 87 | }, 88 | [ 89 | { 90 | "#n": "$r2" 91 | } 92 | ], 93 | "\n", 94 | { 95 | "->": "0.g-0" 96 | }, 97 | { 98 | "#f": 5 99 | } 100 | ], 101 | "c-1": [ 102 | "ev", 103 | { 104 | "^->": "0.c-1.$r2" 105 | }, 106 | "/ev", 107 | { 108 | "temp=": "$r" 109 | }, 110 | { 111 | "->": "0.3.s" 112 | }, 113 | [ 114 | { 115 | "#n": "$r2" 116 | } 117 | ], 118 | "\n", 119 | { 120 | "->": "0.g-0" 121 | }, 122 | { 123 | "#f": 5 124 | } 125 | ], 126 | "g-0": [ 127 | "done", 128 | null 129 | ] 130 | } 131 | ], 132 | "done", 133 | null 134 | ], 135 | "listDefs": {} 136 | } 137 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ink-proof 2 | *Conformance testing for [Ink](https://github.com/inkle/ink) compilers and runtimes* 3 | 4 | ![ink-proof screenshot](docs/screenshot.png) 5 | 6 |

7 | 8 | 9 | 10 | 11 | 12 | 13 |

14 | 15 | [Ink](https://github.com/inkle/ink) is an open-source narrative scripting language created by [Inkle](https://www.inklestudios.com). 16 | `ink-proof` is a tool for conformance testing Ink compilers and runtimes. 17 | 18 | Users author interactive stories as `.ink` [files](https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md). 19 | Inkle provide a compiler (`inklecate`) which converts these `.ink` files to a [json based format](https://github.com/inkle/ink/blob/master/Documentation/ink_JSON_runtime_format.md) which is then interpreted by a C# runtime. 20 | There are other compiler and runtime implementations at various levels of completeness. 21 | For example [inkjs](https://github.com/y-lohse/inkjs), [godot-ink](https://github.com/paulloz/godot-ink), [inkcpp](https://github.com/brwarner/inkcpp). 22 | 23 | `ink-proof` consists of a number of `.ink` and `.json` test cases. 24 | Each test case contains a `.ink` or `.json` source file, an input file, and an expected output or "transcript" file. 25 | `ink-proof` runs each test case against every runtime and compiler and compares the actual output to the expected output. 26 | Results are generated as a webpage for easy viewing. 27 | 28 | The latest public run of `ink-proof` is available at https://chromy.github.io/ink-proof however you can also run the tool offline as follows: 29 | 30 | ```bash 31 | git clone https://github.com/chromy/ink-proof.git 32 | cd ink-proof 33 | python3 install_deps.py 34 | python3 proof.py --serve 35 | # Now navigate to http://localhost:8000 36 | ``` 37 | 38 | ## Test cases 39 | `ink-proof` has two kinds of test cases: ".ink" test cases and ".json" test cases. 40 | 41 | Ink test cases live under the [ink](ink) directory. They consist of a `story.ink` file (for example [ink/I002/story.ink](ink/I002/story.ink)), an [input.txt](ink/I002/input.txt) file, an expected output file named [transcript.txt](ink/I002/transcript.txt), and metadata in a file named [metadata.json](ink/I002/metadata.json). 42 | 43 | Json test cases live under the [bytecode](bytecode) directory. 44 | They consist of a `.json` file (for example [bytecode/B005/story.json](bytecode/B005/story.json)), an [input.txt](bytecode/B005/input.txt) file, an expected output file named [transcript.txt](bytecode/B005/transcript.txt), and metadata in a file named [metadata.json](bytecode/B005/metadata.json). 45 | 46 | ## Compiler and runtime drivers 47 | `ink-proof` can test both Ink compilers and Ink runtimes. 48 | To do this it uses small shim programs which wrap each compiler or runtime to provide a consistant interface. 49 | These shim programs live in the [driver](driver) directory. 50 | 51 | Compiler drivers are named with the suffix `_compiler_driver`, for example [inklecate_v0.9.0_compiler_driver](drivers/inklecate_v0.9.0_compiler_driver). 52 | During testing they are invoked as follows: 53 | ```bash 54 | your_fancy_compiler_driver -o output.json input.ink 55 | ``` 56 | 57 | Runtime drivers are named with the suffix `_runtime_driver`, for example [inkjs_v1.9.0_runtime_driver](driver/inkjs_v1.9.0_runtime_driver). 58 | During testing they are invoked (kind of) as follows: 59 | ```bash 60 | cat input.txt | your_fancy_runtime_driver story.json >actual_output.txt 61 | ``` 62 | In other words they get passed the compiled json story as the only command line argument then they get fed each choice as input and are expected to produce the output on stdout. 63 | 64 | This is how `inklecate` works currently so for other runtimes/compilers this means writing a wrapper to make them work like `inklecate`. 65 | 66 | 67 | -------------------------------------------------------------------------------- /install_deps.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # Copyright (C) 2017 The Android Open Source Project 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | import argparse 17 | import hashlib 18 | import logging 19 | import os 20 | import shutil 21 | import subprocess 22 | import sys 23 | import tempfile 24 | import zipfile 25 | 26 | from collections import namedtuple 27 | from platform import system 28 | 29 | try: 30 | from urllib.request import urlretrieve 31 | except ImportError: 32 | from urllib import urlretrieve 33 | 34 | # The format for the deps below is the following: 35 | # (target_folder, source_url, sha1, target_platform) 36 | # |source_url| can be either a git repo or a http url. 37 | # If a git repo, |sha1| is the committish that will be checked out. 38 | # If a http url, |sha1| is the shasum of the original file. 39 | # If the url is a .zip or .tgz file it will be automatically deflated under 40 | # |target_folder|, taking care of stripping the root folder if it's a single 41 | # root (to avoid ending up with buildtools/protobuf/protobuf-1.2.3/... and have 42 | # instead just buildtools/protobuf). 43 | # |target_platform| is either 'darwin', 'linux' or 'all' and applies the dep 44 | # only on the given platform 45 | 46 | DEPS = [ 47 | # Inklecate v1.1.1 48 | ('deps/inklecate_v1.1.1.zip', 49 | 'https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_mac.zip', 50 | 'be9536b250c999a7be1e8a0a8edfd9f30b67e524', 51 | 'darwin'), 52 | ('deps/inklecate_v1.1.1.zip', 53 | 'https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_linux.zip', 54 | '7a65ed10961ba55c5ec97ae0d5c8bddb9cea5139', 55 | 'linux'), 56 | ('deps/inklecate_v1.1.1.zip', 57 | 'https://github.com/inkle/ink/releases/download/v1.1.1/inklecate_windows.zip', 58 | 'c291fdcab49497ea8def2bfcba489b1e4667dd63', 59 | 'windows'), 60 | 61 | # Inklecate v1.0.0 62 | ('deps/inklecate_v1.0.0.zip', 63 | 'https://github.com/inkle/ink/releases/download/v1.0.0/inklecate_mac.zip', 64 | '44a1368fd55db706cc9eef45456674769b1cb47f', 65 | 'darwin'), 66 | ('deps/inklecate_v1.0.0.zip', 67 | 'https://github.com/inkle/ink/releases/download/v1.0.0/inklecate_linux.zip', 68 | 'f8fb59af8c2daf253c0f0da0b6498468bd9cdb83', 69 | 'linux'), 70 | ('deps/inklecate_v1.0.0.zip', 71 | 'https://github.com/inkle/ink/releases/download/v1.0.0/inklecate_windows.zip', 72 | '497f41ef3059fe93672e0cade2739d56f5b4f1dc', 73 | 'windows'), 74 | 75 | # Inklecate v0.9.0 76 | ('deps/inklecate_v0.9.0.zip', 77 | 'https://github.com/inkle/ink/releases/download/0.9.0/inklecate_mac.zip', 78 | '4f6363fdb7c1f4172b24c9517de9a4faeb73d746', 79 | 'darwin'), 80 | ('deps/inklecate_v0.9.0.zip', 81 | 'https://github.com/inkle/ink/releases/download/0.9.0/inklecate_windows_and_linux.zip', 82 | '3e9c0f4fb6e6ee2feed740ad2783f687e870917d', 83 | 'linux'), 84 | ('deps/inklecate_v0.9.0.zip', 85 | 'https://github.com/inkle/ink/releases/download/0.9.0/inklecate_windows_and_linux.zip', 86 | '3e9c0f4fb6e6ee2feed740ad2783f687e870917d', 87 | 'windows'), 88 | 89 | # Inklecate v0.9.0 + hacks to make running JSON work 90 | ('deps/inklecore_v0.9.0_plus.zip', 91 | 'https://storage.googleapis.com/tsundoku-io-deps/inklecore_mac_v0.9.0_plus.zip', 92 | '0340d84d574d0d9cd9b313251e7dcd8e8743843f', 93 | 'darwin'), 94 | ('deps/inklecore_v0.9.0_plus.zip', 95 | 'https://storage.googleapis.com/tsundoku-io-deps/inklecore_linux_v0.9.0_plus.zip', 96 | '56e5b556171a9c0af855ea22dfc5f4441f10e5e3', 97 | 'linux'), 98 | ('deps/inklecore_v0.9.0_plus.zip', 99 | 'https://storage.googleapis.com/tsundoku-io-deps/inklecore_linux_v0.9.0_plus.zip', 100 | '56e5b556171a9c0af855ea22dfc5f4441f10e5e3', 101 | 'windows'), 102 | 103 | # Inklecate v0.8.3 104 | ('deps/inklecate_v0.8.3.zip', 105 | 'https://github.com/inkle/ink/releases/download/0.8.3/inklecate_mac.zip', 106 | '3aa99f070665a3fb71a341755586322df41865c0', 107 | 'darwin'), 108 | ('deps/inklecate_v0.8.3.zip', 109 | 'https://github.com/inkle/ink/releases/download/0.8.3/inklecate_windows_and_linux.zip', 110 | 'f97a77b6da4c2956603b877d27456d6172300656', 111 | 'linux'), 112 | ('deps/inklecate_v0.8.3.zip', 113 | 'https://github.com/inkle/ink/releases/download/0.8.3/inklecate_windows_and_linux.zip', 114 | 'f97a77b6da4c2956603b877d27456d6172300656', 115 | 'windows'), 116 | 117 | # Inkjs 2.2.1 118 | ('deps/inkjs_v2.2.1.tgz', 119 | 'https://registry.npmjs.org/inkjs/-/inkjs-2.2.1.tgz', 120 | 'f797e3b192ae7b324a51a56912a4e51c567f8d3c', 121 | 'all'), 122 | 123 | # Inkjs 2.2.0 124 | ('deps/inkjs_v2.2.0.tgz', 125 | 'https://registry.npmjs.org/inkjs/-/inkjs-2.2.0.tgz', 126 | '28e5c7cd2458bfa2cca7fae79c012892c5e695ab', 127 | 'all'), 128 | 129 | # Inkjs 2.1.0 130 | ('deps/inkjs_v2.1.0.tgz', 131 | 'https://registry.npmjs.org/inkjs/-/inkjs-2.1.0.tgz', 132 | '2e6d501e7477dcafdf200ec4d790e2d01d88a076', 133 | 'all'), 134 | 135 | # Inkjs 2.0.0 136 | ('deps/inkjs_v2.0.0.tgz', 137 | 'https://registry.npmjs.org/inkjs/-/inkjs-2.0.0.tgz', 138 | 'be9fb903bdf47fb90e1e585346c1eb185db869c3', 139 | 'all'), 140 | 141 | # Inkjs 1.11.0 142 | ('deps/inkjs_v1.11.0.tgz', 143 | 'https://registry.npmjs.org/inkjs/-/inkjs-1.11.0.tgz', 144 | '4293cd843371c147b75968760d1a03525e740763', 145 | 'all'), 146 | 147 | # Inkjs 1.10.5 148 | ('deps/inkjs_v1.10.5.tgz', 149 | 'https://registry.npmjs.org/inkjs/-/inkjs-1.10.5.tgz', 150 | '7703339328a61902d5d32800f4774f0aa0c3d32e', 151 | 'all'), 152 | 153 | # Inkjs 1.9.0 154 | ('deps/inkjs_v1.9.0.tgz', 155 | 'https://registry.npmjs.org/inkjs/-/inkjs-1.9.0.tgz', 156 | 'c7818565141ec4a42bc0c6ccf415510c21729db2', 157 | 'all'), 158 | 159 | # Tachyons 160 | ('deps/tachyons.min.css', 161 | 'https://unpkg.com/tachyons@4.12.0/css/tachyons.min.css', 162 | '6d136aca9df01d6632c0f37023555c285391115a', 163 | 'all'), 164 | 165 | # Mithril 166 | ('deps/mithril.min.js', 167 | 'https://unpkg.com/mithril@2.0.4/mithril.min.js', 168 | '9e5a41aa225db74dfefdb0b44e3699959b5ed7e4', 169 | 'all'), 170 | 171 | # Diff 172 | ('deps/diff.js', 173 | 'https://unpkg.com/diff@5.0.0/dist/diff.js', 174 | 'd9926f792723e44a7ddb6dfe0a98f4f2c7943fc0', 175 | 'all'), 176 | 177 | # Binkplayer v1.0.0 178 | ('deps/binkplayer_v1.0.1.tgz', 179 | 'https://github.com/bladecoder/blade-ink/releases/download/v1.0.0/binkplayer-v1.0.1-x86_64-macos.tar.gz', 180 | 'f40aa5a081167f7fa198b2eabf1fc7f33c0b6de9', 181 | 'darwin'), 182 | ('deps/binkplayer_v1.0.1.tgz', 183 | 'https://github.com/bladecoder/blade-ink-rs/releases/download/v1.0.1/binkplayer-v1.0.1-x86_64-linux.tar.gz', 184 | 'cbcf157a246733ada2fe7664712410030ec77fcd', 185 | 'linux'), 186 | ('deps/binkplayer_v1.0.1.zip', 187 | 'https://github.com/bladecoder/blade-ink-rs/releases/download/v1.0.1/binkplayer-v1.0.1-x86_64-windows.zip', 188 | '68ecd70530020cecc5a31270879673b0d9e9c071', 189 | 'windows'), 190 | 191 | ] 192 | 193 | ROOT_DIR = os.path.dirname(os.path.abspath(__file__)) 194 | 195 | def ReadFile(path): 196 | if not os.path.exists(path): 197 | return None 198 | with open(path) as f: 199 | return f.read().strip() 200 | 201 | 202 | def MkdirRecursive(path): 203 | # Works with both relative and absolute paths 204 | cwd = '/' if path.startswith('/') else ROOT_DIR 205 | for part in path.split('/'): 206 | cwd = os.path.join(cwd, part) 207 | if not os.path.exists(cwd): 208 | os.makedirs(cwd) 209 | else: 210 | assert (os.path.isdir(cwd)) 211 | 212 | 213 | def HashLocalFile(path): 214 | if not os.path.exists(path): 215 | return None 216 | with open(path, 'rb') as f: 217 | return hashlib.sha1(f.read()).hexdigest() 218 | 219 | 220 | def ExtractZipfilePreservePermissions(zf, info, path): 221 | zf.extract(info.filename, path=path) 222 | target_path = os.path.join(path, info.filename) 223 | min_acls = 0o755 if info.filename.endswith('/') else 0o644 224 | os.chmod(target_path, (info.external_attr >> 16) | min_acls) 225 | 226 | 227 | def IsGitRepoCheckoutOutAtRevision(path, revision): 228 | return ReadFile(os.path.join(path, '.git', 'HEAD')) == revision 229 | 230 | 231 | def CheckoutGitRepo(path, git_url, revision, check_only): 232 | if IsGitRepoCheckoutOutAtRevision(path, revision): 233 | return False 234 | if check_only: 235 | return True 236 | if os.path.exists(path): 237 | shutil.rmtree(path) 238 | MkdirRecursive(path) 239 | logging.info('Fetching %s @ %s into %s', git_url, revision, path) 240 | subprocess.check_call(['git', 'init', path], cwd=path) 241 | subprocess.check_call( 242 | ['git', 'fetch', '--quiet', '--depth', '1', git_url, revision], cwd=path) 243 | subprocess.check_call(['git', 'checkout', revision, '--quiet'], cwd=path) 244 | assert (IsGitRepoCheckoutOutAtRevision(path, revision)) 245 | return True 246 | 247 | 248 | def InstallNodeModules(): 249 | logging.info("Running npm install in {0}".format(UI_DIR)) 250 | subprocess.check_call([os.path.join(UI_DIR, 'npm'), 'install', '--no-save'], 251 | cwd=UI_DIR) 252 | with open(NODE_MODULES_STATUS_FILE, 'w') as f: 253 | f.write(HashLocalFile(os.path.join(UI_DIR, 'package-lock.json'))) 254 | 255 | 256 | def CheckNodeModules(): 257 | """Returns True if the modules are up-to-date. 258 | 259 | There doesn't seem to be an easy way to check node modules versions. Instead 260 | just check if package-lock.json changed since the last `npm install` call. 261 | """ 262 | if not os.path.exists(NODE_MODULES_STATUS_FILE): 263 | return False 264 | with open(NODE_MODULES_STATUS_FILE, 'r') as f: 265 | actual = f.read() 266 | expected = HashLocalFile(os.path.join(UI_DIR, 'package-lock.json')) 267 | return expected == actual 268 | 269 | 270 | def CheckHashes(): 271 | for deps in DEPS: 272 | for rel_path, url, expected_sha1, platform in deps: 273 | if url.endswith('.git'): 274 | continue 275 | logging.info('Downloading %s from %s', rel_path, url) 276 | with tempfile.NamedTemporaryFile(delete=False) as f: 277 | f.close() 278 | urlretrieve(url, f.name) 279 | actual_sha1 = HashLocalFile(f.name) 280 | os.unlink(f.name) 281 | if (actual_sha1 != expected_sha1): 282 | logging.fatal('SHA1 mismatch for {} expected {} was {}'.format( 283 | url, expected_sha1, actual_sha1)) 284 | 285 | 286 | def Main(): 287 | parser = argparse.ArgumentParser() 288 | parser.add_argument('--check-only') 289 | parser.add_argument('--verify', help='Check all URLs', action='store_true') 290 | args = parser.parse_args() 291 | if args.verify: 292 | CheckHashes() 293 | return 0 294 | deps = DEPS 295 | deps_updated = False 296 | for rel_path, url, expected_sha1, platform in deps: 297 | if (platform != 'all' and platform != system().lower()): 298 | continue 299 | local_path = os.path.join(ROOT_DIR, rel_path) 300 | if url.endswith('.git'): 301 | deps_updated |= CheckoutGitRepo(local_path, url, expected_sha1, 302 | args.check_only) 303 | continue 304 | is_zip = local_path.endswith('.zip') or local_path.endswith('.tgz') 305 | zip_target_dir = local_path[:-4] if is_zip else None 306 | zip_dir_stamp = os.path.join(zip_target_dir, '.stamp') if is_zip else None 307 | 308 | if ((not is_zip and HashLocalFile(local_path) == expected_sha1) or 309 | (is_zip and ReadFile(zip_dir_stamp) == expected_sha1)): 310 | continue 311 | deps_updated = True 312 | if args.check_only: 313 | continue 314 | MkdirRecursive(os.path.dirname(rel_path)) 315 | if HashLocalFile(local_path) != expected_sha1: 316 | download_path = local_path + '.tmp' 317 | logging.info('Downloading %s from %s', local_path, url) 318 | urlretrieve(url, download_path) 319 | os.chmod(download_path, 0o755) 320 | actual_sha1 = HashLocalFile(download_path) 321 | if (actual_sha1 != expected_sha1): 322 | os.remove(download_path) 323 | logging.fatal('SHA1 mismatch for {} expected {} was {}'.format( 324 | download_path, expected_sha1, actual_sha1)) 325 | return 1 326 | os.rename(download_path, local_path) 327 | assert (HashLocalFile(local_path) == expected_sha1) 328 | 329 | if is_zip: 330 | logging.info('Extracting %s into %s' % (local_path, zip_target_dir)) 331 | assert (os.path.commonprefix((ROOT_DIR, zip_target_dir)) == ROOT_DIR) 332 | if os.path.exists(zip_target_dir): 333 | logging.info('Deleting stale dir %s' % zip_target_dir) 334 | shutil.rmtree(zip_target_dir) 335 | 336 | # Decompress the archive. 337 | if local_path.endswith('.tgz'): 338 | MkdirRecursive(zip_target_dir) 339 | subprocess.check_call(['tar', '-xf', local_path], cwd=zip_target_dir) 340 | elif local_path.endswith('.zip'): 341 | with zipfile.ZipFile(local_path, 'r') as zf: 342 | for info in zf.infolist(): 343 | ExtractZipfilePreservePermissions(zf, info, zip_target_dir) 344 | 345 | # If the zip contains one root folder, rebase one level up moving all 346 | # its sub files and folders inside |target_dir|. 347 | subdir = os.listdir(zip_target_dir) 348 | if len(subdir) == 1: 349 | subdir = os.path.join(zip_target_dir, subdir[0]) 350 | if os.path.isdir(subdir): 351 | for subf in os.listdir(subdir): 352 | shutil.move(os.path.join(subdir, subf), zip_target_dir) 353 | os.rmdir(subdir) 354 | 355 | # Create stamp and remove the archive. 356 | with open(zip_dir_stamp, 'w') as stamp_file: 357 | stamp_file.write(expected_sha1) 358 | os.remove(local_path) 359 | 360 | if args.check_only: 361 | if not deps_updated: 362 | with open(args.check_only, 'w') as f: 363 | f.write('OK') # The content is irrelevant, just keep GN happy. 364 | return 0 365 | argz = ' '.join([x for x in sys.argv[1:] if not '--check-only' in x]) 366 | sys.stderr.write('\033[91mBuild deps are stale. ' + 367 | 'Please run tools/install-build-deps %s\033[0m' % argz) 368 | return 1 369 | 370 | if __name__ == '__main__': 371 | logging.basicConfig(level=logging.INFO) 372 | sys.exit(Main()) 373 | 374 | --------------------------------------------------------------------------------