├── .editorconfig ├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── LICENSE ├── README.md ├── cps.nim ├── cps.nimble ├── cps ├── callbacks.nim ├── defers.nim ├── environment.nim ├── exprs.nim ├── help.nim ├── hooks.nim ├── normalizedast.nim ├── returns.nim ├── rewrites.nim ├── spec.nim └── transform.nim ├── docs ├── README.md ├── coroutines.md ├── cps.svg ├── demo.svg ├── taste.svg ├── techo.svg └── tzevv.svg ├── examples ├── README.md ├── coroutine.nim ├── cpscps.nim ├── goto.nim ├── iterator.nim ├── lazy.nim ├── lua_coroutines.nim ├── pipes.nim ├── threadpool.nim ├── threadpool.nim.cfg ├── trycatch.nim └── work.nim ├── experiments ├── README.md ├── chain.nim ├── eventqueue.nim ├── main.nim ├── main_tcp.nim ├── tr.nim ├── tr_case.nim ├── try │ ├── README.md │ ├── original.nim │ └── transform.nim ├── xfrm.nim ├── xfrm2.nim └── xfrm3.nim ├── papers ├── 1011.4558.pdf ├── README.md ├── cpc-manual.pdf └── cpc.pdf ├── stash ├── README.md ├── bench.nim ├── bench.nim.cfg ├── brokenbreak.nim ├── echo_server_client.nim ├── iteratorT.nim ├── lost.nim ├── performance.nim ├── performance.nim.cfg └── standalone_tcp_server.nim ├── talk-talk ├── README.md ├── manual1.nim ├── manual1_stack.nim ├── manual1_stack_crash.nim └── manual2.nim ├── tests ├── .gitignore ├── exports.nim ├── foreign.nim ├── killer.nim ├── preamble.nim ├── t00_smoke.nim ├── t10_loops.nim ├── t20_api.nim ├── t30_cc.nim ├── t40_ast.nim ├── t50_hooks.nim ├── t60_returns.nim ├── t70_locals.nim ├── t80_try1.nim ├── t80_try2.nim ├── t90_exprs1.nim ├── t90_exprs2.nim ├── t90_exprs3.nim ├── t90_exprs4.nim ├── t90_exprs5.nim └── zevv.nim └── tutorial ├── README.md ├── cpstut1.nim ├── cpstut2.nim ├── cpstut3.nim └── cpstut4.nim /.editorconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/.editorconfig -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | nim.cfg 2 | bin 3 | deps 4 | .tool-versions 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/README.md -------------------------------------------------------------------------------- /cps.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps.nim -------------------------------------------------------------------------------- /cps.nimble: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps.nimble -------------------------------------------------------------------------------- /cps/callbacks.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/callbacks.nim -------------------------------------------------------------------------------- /cps/defers.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/defers.nim -------------------------------------------------------------------------------- /cps/environment.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/environment.nim -------------------------------------------------------------------------------- /cps/exprs.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/exprs.nim -------------------------------------------------------------------------------- /cps/help.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/help.nim -------------------------------------------------------------------------------- /cps/hooks.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/hooks.nim -------------------------------------------------------------------------------- /cps/normalizedast.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/normalizedast.nim -------------------------------------------------------------------------------- /cps/returns.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/returns.nim -------------------------------------------------------------------------------- /cps/rewrites.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/rewrites.nim -------------------------------------------------------------------------------- /cps/spec.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/spec.nim -------------------------------------------------------------------------------- /cps/transform.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/cps/transform.nim -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/README.md -------------------------------------------------------------------------------- /docs/coroutines.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/coroutines.md -------------------------------------------------------------------------------- /docs/cps.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/cps.svg -------------------------------------------------------------------------------- /docs/demo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/demo.svg -------------------------------------------------------------------------------- /docs/taste.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/taste.svg -------------------------------------------------------------------------------- /docs/techo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/techo.svg -------------------------------------------------------------------------------- /docs/tzevv.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/docs/tzevv.svg -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/coroutine.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/coroutine.nim -------------------------------------------------------------------------------- /examples/cpscps.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/cpscps.nim -------------------------------------------------------------------------------- /examples/goto.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/goto.nim -------------------------------------------------------------------------------- /examples/iterator.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/iterator.nim -------------------------------------------------------------------------------- /examples/lazy.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/lazy.nim -------------------------------------------------------------------------------- /examples/lua_coroutines.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/lua_coroutines.nim -------------------------------------------------------------------------------- /examples/pipes.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/pipes.nim -------------------------------------------------------------------------------- /examples/threadpool.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/threadpool.nim -------------------------------------------------------------------------------- /examples/threadpool.nim.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/threadpool.nim.cfg -------------------------------------------------------------------------------- /examples/trycatch.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/trycatch.nim -------------------------------------------------------------------------------- /examples/work.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/examples/work.nim -------------------------------------------------------------------------------- /experiments/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/README.md -------------------------------------------------------------------------------- /experiments/chain.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/chain.nim -------------------------------------------------------------------------------- /experiments/eventqueue.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/eventqueue.nim -------------------------------------------------------------------------------- /experiments/main.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/main.nim -------------------------------------------------------------------------------- /experiments/main_tcp.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/main_tcp.nim -------------------------------------------------------------------------------- /experiments/tr.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/tr.nim -------------------------------------------------------------------------------- /experiments/tr_case.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/tr_case.nim -------------------------------------------------------------------------------- /experiments/try/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/try/README.md -------------------------------------------------------------------------------- /experiments/try/original.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/try/original.nim -------------------------------------------------------------------------------- /experiments/try/transform.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/try/transform.nim -------------------------------------------------------------------------------- /experiments/xfrm.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/xfrm.nim -------------------------------------------------------------------------------- /experiments/xfrm2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/xfrm2.nim -------------------------------------------------------------------------------- /experiments/xfrm3.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/experiments/xfrm3.nim -------------------------------------------------------------------------------- /papers/1011.4558.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/papers/1011.4558.pdf -------------------------------------------------------------------------------- /papers/README.md: -------------------------------------------------------------------------------- 1 | # papers 2 | The inspiration for the CPS project. 3 | -------------------------------------------------------------------------------- /papers/cpc-manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/papers/cpc-manual.pdf -------------------------------------------------------------------------------- /papers/cpc.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/papers/cpc.pdf -------------------------------------------------------------------------------- /stash/README.md: -------------------------------------------------------------------------------- 1 | # stash 2 | More toys and experiments in various stages of decay. 3 | -------------------------------------------------------------------------------- /stash/bench.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/bench.nim -------------------------------------------------------------------------------- /stash/bench.nim.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/bench.nim.cfg -------------------------------------------------------------------------------- /stash/brokenbreak.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/brokenbreak.nim -------------------------------------------------------------------------------- /stash/echo_server_client.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/echo_server_client.nim -------------------------------------------------------------------------------- /stash/iteratorT.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/iteratorT.nim -------------------------------------------------------------------------------- /stash/lost.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/lost.nim -------------------------------------------------------------------------------- /stash/performance.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/performance.nim -------------------------------------------------------------------------------- /stash/performance.nim.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/performance.nim.cfg -------------------------------------------------------------------------------- /stash/standalone_tcp_server.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/stash/standalone_tcp_server.nim -------------------------------------------------------------------------------- /talk-talk/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/talk-talk/README.md -------------------------------------------------------------------------------- /talk-talk/manual1.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/talk-talk/manual1.nim -------------------------------------------------------------------------------- /talk-talk/manual1_stack.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/talk-talk/manual1_stack.nim -------------------------------------------------------------------------------- /talk-talk/manual1_stack_crash.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/talk-talk/manual1_stack_crash.nim -------------------------------------------------------------------------------- /talk-talk/manual2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/talk-talk/manual2.nim -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.* 3 | !*.nim 4 | -------------------------------------------------------------------------------- /tests/exports.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/exports.nim -------------------------------------------------------------------------------- /tests/foreign.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/foreign.nim -------------------------------------------------------------------------------- /tests/killer.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/killer.nim -------------------------------------------------------------------------------- /tests/preamble.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/preamble.nim -------------------------------------------------------------------------------- /tests/t00_smoke.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t00_smoke.nim -------------------------------------------------------------------------------- /tests/t10_loops.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t10_loops.nim -------------------------------------------------------------------------------- /tests/t20_api.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t20_api.nim -------------------------------------------------------------------------------- /tests/t30_cc.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t30_cc.nim -------------------------------------------------------------------------------- /tests/t40_ast.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t40_ast.nim -------------------------------------------------------------------------------- /tests/t50_hooks.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t50_hooks.nim -------------------------------------------------------------------------------- /tests/t60_returns.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t60_returns.nim -------------------------------------------------------------------------------- /tests/t70_locals.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t70_locals.nim -------------------------------------------------------------------------------- /tests/t80_try1.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t80_try1.nim -------------------------------------------------------------------------------- /tests/t80_try2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t80_try2.nim -------------------------------------------------------------------------------- /tests/t90_exprs1.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t90_exprs1.nim -------------------------------------------------------------------------------- /tests/t90_exprs2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t90_exprs2.nim -------------------------------------------------------------------------------- /tests/t90_exprs3.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t90_exprs3.nim -------------------------------------------------------------------------------- /tests/t90_exprs4.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t90_exprs4.nim -------------------------------------------------------------------------------- /tests/t90_exprs5.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/t90_exprs5.nim -------------------------------------------------------------------------------- /tests/zevv.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tests/zevv.nim -------------------------------------------------------------------------------- /tutorial/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tutorial/README.md -------------------------------------------------------------------------------- /tutorial/cpstut1.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tutorial/cpstut1.nim -------------------------------------------------------------------------------- /tutorial/cpstut2.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tutorial/cpstut2.nim -------------------------------------------------------------------------------- /tutorial/cpstut3.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tutorial/cpstut3.nim -------------------------------------------------------------------------------- /tutorial/cpstut4.nim: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nim-works/cps/HEAD/tutorial/cpstut4.nim --------------------------------------------------------------------------------