├── docs ├── .nojekyll ├── dup │ ├── tests │ │ ├── b1.txt │ │ ├── b2.txt │ │ ├── c1.txt │ │ ├── a1.txt │ │ ├── a2.txt │ │ └── a3.txt │ ├── dup.sh │ ├── grouped.sh │ ├── brute_force_1.sh │ ├── dup.out │ ├── naive_hash.out │ ├── grouped.out │ └── using_sha256.out ├── func │ ├── adder.out │ ├── closure.out │ ├── dynamic.out │ ├── func.sh │ ├── dynamic.sh │ ├── func.out │ ├── ex_dict_zip.py │ ├── oop.out │ ├── closure_list.out │ ├── inner.out │ ├── adder.py │ ├── closure.py │ ├── counter_fail.py │ ├── inner.py │ ├── counter_succeed.py │ ├── dynamic.tll │ └── func.tll ├── vm │ ├── halt.mx │ ├── print_r1.mx │ ├── halt.as │ ├── halt_run.sh │ ├── halt_assemble.sh │ ├── count_up_run.sh │ ├── fill_array_run.sh │ ├── print_r1_run.sh │ ├── fill_array_assemble.sh │ ├── print_r1_assemble.sh │ ├── count_up_assemble.sh │ ├── print_r1.as │ ├── count_up.mx │ ├── halt.out │ ├── fill_array.mx │ ├── print_r1.out │ ├── count_up.as │ ├── count_up.out │ ├── fill_array.out │ └── fill_array.as ├── debugger │ ├── halt.mx │ ├── halt.as │ ├── print_num.mx │ ├── print_num.as │ ├── fill_array.mx │ └── fill_array.as ├── interp │ ├── expr.out │ ├── vars.out │ ├── expr.sh │ ├── expr.tll │ ├── vars.sh │ ├── doubling.sh │ ├── repeat_zero.sh │ ├── repeat_zero.tll │ ├── doubling.out │ ├── add_example.py │ ├── vars.tll │ └── ex_assign_expr.py ├── archive │ ├── sample_dir │ │ ├── a.txt │ │ ├── b.txt │ │ └── sub_dir │ │ │ └── c.txt │ ├── hash_all.sh │ ├── sample_dir.sh │ ├── hash_all.out │ ├── sample_dir.out │ ├── test_backup_manual.sh │ └── test_backup_manual.out ├── binary │ ├── binary_notation.out │ ├── dynamic_format.out │ ├── hex_notation.out │ ├── variable_unpacking.out │ ├── bird.txt │ ├── ex_dynamic_format.py │ ├── hex_notation.py │ ├── variable_packing.out │ ├── dynamic_format.py │ ├── binary_notation.py │ ├── calcsize.out │ ├── pack_count.out │ ├── pack_unpack.out │ ├── bit_mask.py │ ├── pack_unicode.out │ ├── pack_unicode.py │ ├── calcsize.py │ ├── pack_count.py │ └── pack_unpack.py ├── docgen │ ├── call.py │ ├── unparse_exec.out │ ├── inject_exec.sh │ ├── inject_make.sh │ ├── inject_parse.sh │ ├── unparse_exec.sh │ ├── inject_modified.sh │ ├── unparse_modified.sh │ ├── inject_exec.out │ ├── double_and_print.py │ ├── unparse_modified.out │ ├── add_double.py │ ├── inject_make.out │ ├── inject_modified.out │ └── inject_parse.out ├── oop │ ├── func_obj.out │ ├── inherit_class.out │ ├── inherit_constructor.out │ ├── inherit_original.out │ ├── shapes_dict.out │ ├── larger.out │ ├── spread.out │ ├── shapes_class.out │ ├── shapes_original.out │ ├── func_obj.py │ ├── varargs.out │ ├── spread.py │ └── varargs.py ├── test │ ├── callable.out │ ├── type_int.out │ ├── type_int.py │ ├── type_len.py │ ├── type_func.out │ ├── func_list.out │ ├── manual.out │ ├── runner.out │ ├── type_len.out │ ├── globals.py │ ├── ex_loop_globals_1.py │ ├── type_func.py │ ├── ex_loop_globals_2.py │ ├── globals_plus.py │ ├── callable.py │ ├── signature.py │ ├── locals.out │ ├── signature.out │ ├── locals.py │ ├── func_list.py │ └── find_test_funcs.out ├── viewer │ ├── call_example.out │ ├── make_lines.out │ ├── make_lines.py │ ├── first_curses.py │ └── call_example.py ├── http │ ├── hello_web.txt │ ├── basic_server.sh │ ├── minimal_http_request.txt │ ├── http_request_headers.txt │ ├── basic_server.out │ ├── requests_example.out │ ├── http_response.txt │ └── requests_example.py ├── protocols │ ├── callable.out │ ├── ex_with.py │ ├── wrap_infinite.sh │ ├── wrap_param.out │ ├── wrap_infinite.out │ ├── decorator_param.out │ ├── decorator_simple.out │ ├── wrap_capture.out │ ├── mock_object.out │ ├── ex_timer.py │ ├── mock_time.py │ ├── wrap_infinite.py │ ├── callable.py │ ├── decorator_simple.py │ ├── alternative_design.py │ ├── wrap_capture.py │ └── wrap_param.py ├── check │ ├── catalog.sh │ ├── check.out │ ├── contains.sh │ ├── check.sh │ ├── ex_flatten.py │ ├── catalog.out │ ├── contains.out │ ├── attrs.out │ ├── manifest.yml │ └── parse.out ├── concur │ ├── classes.out │ ├── switch.out │ ├── scheduler.out │ ├── catch.out │ ├── inject.out │ └── wait.out ├── observe │ ├── delay_queue.out │ ├── push_queue.out │ ├── push_simple.out │ ├── logging.out │ ├── push_origin.out │ ├── push_buggy.py │ └── delay_queue_verbose.py ├── perf │ ├── ex_map_2.py │ ├── ex_map_1.py │ ├── timing.sh │ ├── profile.sh │ ├── make.out │ ├── make.py │ └── util.py ├── persist │ ├── ex_alias_line.txt │ ├── format.txt │ ├── ex_circular.py │ ├── multiline_input.txt │ ├── ex_list_alias.txt │ ├── shared.py │ ├── ex_aliasing.py │ ├── multiline_output.txt │ ├── attr.out │ ├── save_aliasing.out │ ├── save_builtin.py │ ├── save_builtin.out │ └── save_aliasing.py ├── bonus │ ├── ex_and_shortcut.py │ ├── scalene.out │ ├── equilateral.out │ ├── isosceles.out │ ├── func_attr.out │ ├── inheritance_example.sh │ ├── lazy.py │ ├── func_dir.py │ ├── with_name.out │ ├── attribute.out │ ├── docstring.out │ ├── func_attr.py │ ├── inheritance_example.out │ ├── inspect_func.out │ └── inspect_func.py ├── build │ ├── double_linear_dep.out │ ├── double_linear_dep.sh │ └── double_linear_dep.json ├── db │ ├── show_packed_records.out │ └── show_packed_records.py ├── layout │ ├── ex_box.txt │ └── ex_padding.txt ├── lint │ ├── ex_redundant.py │ ├── walk_ast.sh │ ├── dump_ast_simple.sh │ ├── has_duplicate_keys.out │ ├── walk_ast.out │ ├── find_duplicate_keys.out │ ├── find_duplicate_keys.sh │ ├── find_unused_variables.sh │ ├── simple.py │ ├── find_unused_variables.out │ ├── double.py │ ├── has_duplicate_keys.py │ ├── dump_ast.py │ ├── function_keys.py │ └── has_unused_variables.py ├── pack │ ├── manual.sh │ ├── exhaustive.sh │ ├── z3_unequal.out │ ├── incremental.sh │ ├── incremental_reverse.sh │ ├── z3_equal.out │ ├── z3_complete.out │ ├── z3_part_equal.out │ ├── z3_setup.py │ ├── incremental.out │ ├── incremental_reverse.out │ ├── manual.out │ ├── z3_triple.out │ ├── exhaustive.out │ └── triple.json ├── template │ ├── loop.sh │ ├── conditional.sh │ ├── static_text.sh │ ├── single_constant.sh │ ├── single_variable.sh │ ├── multiple_variables.sh │ ├── conditional.out │ ├── single_constant.out │ ├── single_variable.out │ ├── static_text.out │ ├── multiple_variables.out │ ├── z_num.py │ ├── example_call.py │ ├── loop.out │ ├── vars.json │ ├── z_var.py │ └── z_if.py ├── intro │ ├── output_sample.out │ ├── python_sample.py │ ├── data_sample.yml │ ├── shell_sample.sh │ └── gvwilson-gage-2019.png ├── compress │ ├── binary_perf.out │ └── compress_perf.out ├── sdxpy-600.jpg ├── sdxpy-cover.png ├── finale │ └── derosa.jpg ├── sdxpy-original.jpg ├── query │ ├── select_all.out │ ├── where.out │ ├── delay_columns.out │ ├── aggregate.out │ ├── insert.out │ ├── get_metadata.out │ ├── simpler_metadata.out │ └── choose_columns.out ├── glob │ ├── fowler-refactoring.webp │ ├── gamma-design-patterns.webp │ ├── kerievsky-refactoring-to-patterns.webp │ └── glob_either.py ├── cache │ └── exceptions.py ├── search │ └── W962796421.json └── ftp │ ├── client_chunk.out │ └── server_chunk.out ├── src ├── dup │ ├── tests │ │ ├── a1.txt │ │ ├── a2.txt │ │ ├── a3.txt │ │ ├── b1.txt │ │ ├── b2.txt │ │ └── c1.txt │ ├── dup.sh │ ├── grouped.sh │ ├── brute_force_1.sh │ ├── naive_dracula.pdf │ ├── dup.out │ ├── naive_dracula_unique.pdf │ ├── naive_hash.out │ ├── grouped.out │ └── using_sha256.out ├── func │ ├── adder.out │ ├── closure.out │ ├── dynamic.out │ ├── func.sh │ ├── dynamic.sh │ ├── func.out │ ├── oop.out │ ├── ex_dict_zip.py │ ├── closure_list.out │ ├── inner.out │ ├── adder.py │ ├── closure.py │ ├── counter_fail.py │ ├── inner.py │ ├── counter_succeed.py │ ├── Makefile │ ├── dynamic.tll │ └── func.tll ├── interp │ ├── expr.out │ ├── vars.out │ ├── expr.sh │ ├── expr.tll │ ├── vars.sh │ ├── doubling.sh │ ├── repeat_zero.sh │ ├── repeat_zero.tll │ ├── doubling.out │ ├── concept_map.pdf │ ├── recursive_evaluation.pdf │ ├── add_example.py │ ├── vars.tll │ ├── ex_assign_expr.py │ └── Makefile ├── vm │ ├── halt.mx │ ├── print_r1.mx │ ├── halt.as │ ├── halt_run.sh │ ├── count_up_run.sh │ ├── halt_assemble.sh │ ├── print_r1_run.sh │ ├── fill_array_run.sh │ ├── fill_array_assemble.sh │ ├── print_r1_assemble.sh │ ├── count_up_assemble.sh │ ├── print_r1.as │ ├── count_up.mx │ ├── halt.out │ ├── fill_array.mx │ ├── print_r1.out │ ├── count_up.as │ ├── count_up.out │ ├── fill_array.out │ └── fill_array.as ├── debugger │ ├── halt.mx │ ├── halt.as │ ├── print_num.as │ ├── print_num.mx │ ├── fill_array.mx │ └── fill_array.as ├── archive │ ├── sample_dir │ │ ├── a.txt │ │ ├── b.txt │ │ └── sub_dir │ │ │ └── c.txt │ ├── hash_all.sh │ ├── sample_dir.sh │ ├── hash_all.out │ ├── sample_dir.out │ ├── test_backup_manual.sh │ ├── test_backup_manual.out │ └── Makefile ├── binary │ ├── binary_notation.out │ ├── dynamic_format.out │ ├── hex_notation.out │ ├── variable_unpacking.out │ ├── bird.txt │ ├── ex_dynamic_format.py │ ├── hex_notation.py │ ├── variable_packing.out │ ├── dynamic_format.py │ ├── binary_notation.py │ ├── calcsize.out │ ├── pack_count.out │ ├── bit_mask.py │ ├── pack_unpack.out │ ├── pack_unicode.out │ ├── pack_unicode.py │ ├── calcsize.py │ ├── pack_count.py │ ├── 3bit.tbl │ └── pack_unpack.py ├── docgen │ ├── call.py │ ├── unparse_exec.out │ ├── inject_exec.sh │ ├── inject_make.sh │ ├── inject_parse.sh │ ├── unparse_exec.sh │ ├── inject_exec.out │ ├── inject_modified.sh │ ├── unparse_modified.sh │ ├── double_and_print.py │ ├── unparse_modified.out │ ├── add_double.py │ ├── inject_make.out │ ├── inject_modified.out │ └── inject_parse.out ├── http │ ├── hello_web.txt │ ├── basic_server.sh │ ├── minimal_http_request.txt │ ├── Makefile │ ├── http_request_headers.txt │ ├── basic_server.out │ ├── requests_example.out │ ├── http_response.txt │ └── requests_example.py ├── oop │ ├── func_obj.out │ ├── inherit_class.out │ ├── inherit_constructor.out │ ├── inherit_original.out │ ├── shapes_dict.out │ ├── larger.out │ ├── spread.out │ ├── shapes_class.out │ ├── shapes_class.pdf │ ├── shapes_dict.pdf │ ├── inherit_class.pdf │ ├── shapes_original.out │ ├── func_obj.py │ ├── varargs.out │ ├── spread.py │ ├── varargs.py │ └── Makefile ├── test │ ├── callable.out │ ├── type_int.out │ ├── type_int.py │ ├── type_len.py │ ├── type_func.out │ ├── func_list.out │ ├── manual.out │ ├── runner.out │ ├── type_len.out │ ├── globals.py │ ├── ex_loop_globals_1.py │ ├── type_func.py │ ├── ex_loop_globals_2.py │ ├── globals_plus.py │ ├── concept_map.pdf │ ├── callable.py │ ├── signature.py │ ├── locals.out │ ├── signature.out │ ├── locals.py │ ├── func_list.py │ ├── find_test_funcs.out │ └── Makefile ├── viewer │ ├── .gitignore │ ├── call_example.out │ ├── make_lines.out │ ├── make_lines.py │ ├── Makefile │ ├── first_curses.py │ └── call_example.py ├── protocols │ ├── callable.out │ ├── ex_with.py │ ├── wrap_infinite.sh │ ├── wrap_param.out │ ├── wrap_capture.out │ ├── wrap_infinite.out │ ├── decorator_param.out │ ├── decorator_simple.out │ ├── mock_object.out │ ├── ex_timer.py │ ├── mock_time.py │ ├── wrap_infinite.py │ ├── callable.py │ ├── decorator_simple.py │ ├── alternative_design.py │ ├── wrap_capture.py │ ├── wrap_param.py │ └── Makefile ├── perf │ ├── ex_map_2.py │ ├── ex_map_1.py │ ├── analysis.pdf │ ├── timing.sh │ ├── profile.sh │ ├── make.out │ ├── make.py │ └── util.py ├── persist │ ├── format.txt │ ├── ex_alias_line.txt │ ├── ex_circular.py │ ├── ex_list_alias.txt │ ├── multiline_input.txt │ ├── shared.py │ ├── ex_aliasing.py │ ├── multiline_output.txt │ ├── shared.pdf │ ├── concept_map.pdf │ ├── attr.out │ ├── save_aliasing.out │ ├── save_builtin.py │ ├── save_builtin.out │ └── save_aliasing.py ├── bonus │ ├── ex_and_shortcut.py │ ├── isosceles.out │ ├── scalene.out │ ├── equilateral.out │ ├── func_attr.out │ ├── inheritance_example.sh │ ├── lazy.py │ ├── func_dir.py │ ├── with_name.out │ ├── attribute.out │ ├── docstring.out │ ├── func_attr.py │ ├── inspect_func.out │ ├── inheritance_example.out │ ├── inheritance.tbl │ └── inspect_func.py ├── check │ ├── catalog.sh │ ├── check.out │ ├── ex_banner.ht │ ├── contains.sh │ ├── check.sh │ ├── ex_flatten.py │ ├── catalog.out │ ├── contains.out │ ├── attrs.out │ ├── Makefile │ ├── manifest.yml │ ├── parse.out │ └── page.html ├── concur │ ├── classes.out │ ├── switch.out │ ├── scheduler.out │ ├── catch.out │ ├── Makefile │ ├── inject.out │ └── wait.out ├── lint │ ├── walk_ast.sh │ ├── ex_redundant.py │ ├── dump_ast_simple.sh │ ├── has_duplicate_keys.out │ ├── walk_ast.out │ ├── find_duplicate_keys.out │ ├── find_duplicate_keys.sh │ ├── find_unused_variables.sh │ ├── simple.py │ ├── find_unused_variables.out │ ├── double.py │ ├── has_duplicate_keys.py │ ├── dump_ast.py │ ├── function_keys.py │ └── has_unused_variables.py ├── observe │ ├── delay_queue.out │ ├── push_queue.out │ ├── push_simple.out │ ├── logging.out │ ├── push_origin.out │ ├── push_buggy.py │ ├── Makefile │ └── delay_queue_verbose.py ├── pack │ ├── manual.sh │ ├── exhaustive.sh │ ├── incremental.sh │ ├── z3_unequal.out │ ├── incremental_reverse.sh │ ├── z3_equal.out │ ├── z3_complete.out │ ├── z3_part_equal.out │ ├── z3_setup.py │ ├── incremental.out │ ├── incremental_reverse.out │ ├── manual.out │ ├── z3_triple.out │ ├── exhaustive.out │ ├── Makefile │ └── triple.json ├── build │ ├── double_linear_dep.out │ ├── double_linear_dep.sh │ ├── topo_sort.pdf │ ├── concept_map.pdf │ ├── dependencies.pdf │ ├── double_linear_dep.json │ └── Makefile ├── db │ ├── show_packed_records.out │ ├── Makefile │ └── show_packed_records.py ├── intro │ ├── .gitignore │ ├── Makefile │ ├── output_sample.out │ ├── python_sample.py │ ├── data_sample.yml │ ├── shell_sample.sh │ ├── comprehension.pdf │ └── gvwilson-gage-2019.png ├── layout │ ├── ex_box.txt │ └── ex_padding.txt ├── template │ ├── loop.sh │ ├── ex_use_two_var.ht │ ├── conditional.sh │ ├── static_text.sh │ ├── single_constant.sh │ ├── single_variable.sh │ ├── multiple_variables.sh │ ├── conditional.out │ ├── single_constant.out │ ├── single_variable.out │ ├── single_constant.ht │ ├── static_text.out │ ├── single_variable.ht │ ├── static_text.ht │ ├── multiple_variables.out │ ├── loop.ht │ ├── ex_yaml_header.ht │ ├── multiple_variables.ht │ ├── conditional.ht │ ├── example_call.py │ ├── z_num.py │ ├── loop.out │ ├── vars.json │ ├── z_var.py │ ├── ex_snippets.ht │ └── z_if.py ├── contents │ └── index.md ├── compress │ ├── binary_perf.out │ └── compress_perf.out ├── glossary │ └── index.md ├── syllabus │ └── index.md ├── bib │ └── index.md ├── finale │ └── derosa.jpg ├── query │ ├── example.db │ ├── select_all.out │ ├── where.out │ ├── delay_columns.out │ ├── insert.out │ ├── aggregate.out │ ├── get_metadata.out │ ├── simpler_metadata.out │ └── choose_columns.out ├── glob │ ├── concept_map.pdf │ ├── fowler-refactoring.webp │ ├── gamma-design-patterns.webp │ ├── kerievsky-refactoring-to-patterns.webp │ ├── Makefile │ └── glob_either.py ├── license │ └── index.md ├── parse │ ├── concept_map.pdf │ └── grammar.tbl ├── cache │ ├── cache_methods.pdf │ ├── cache_concept_map.pdf │ ├── cache_architecture.pdf │ └── exceptions.py ├── contrib │ └── index.md ├── conduct │ └── index.md ├── search │ └── W962796421.json └── ftp │ ├── client_chunk.out │ ├── server_chunk.out │ └── Makefile ├── info ├── foot.tex ├── foot.html └── dedication.tex ├── unused └── flow │ ├── flow_first.out │ ├── flow_second.out │ ├── flow_third.out │ ├── index.md │ ├── input.txt │ ├── slides.html │ ├── flow_second.sh │ ├── flow_third.sh │ ├── flow_first.sh │ ├── split_join.pdf │ ├── source_sink.pdf │ ├── verbs │ ├── example.py │ └── cat.py │ ├── cat.py │ ├── split_join.dot │ ├── head.py │ └── tail.py ├── lib └── mccole │ ├── latex │ └── footer.tex │ ├── bin │ ├── convert_drawio.sh │ └── run_profile.py │ └── requirements.txt ├── Makefile ├── res ├── sdxpy-600.jpg ├── sdxpy-cover.png └── sdxpy-original.jpg ├── syllabus ├── manual.pdf ├── manual.png ├── empirical.pdf └── empirical.png ├── bib ├── W2802954743.json ├── W4313023388.json ├── W4324367414.json ├── W2014657108.json ├── W2068553908.json ├── W2964662501.json ├── W2033054311.json ├── W2336374197.json ├── W2949250850.json ├── W2755625536.json ├── W1589460827.json ├── W2038702416.json ├── W2485839606.json ├── W1980037818.json ├── W2485669931.json ├── W2039084817.json ├── W2085867870.json ├── W2090088970.json ├── W4236328523.json ├── W4240717650.json ├── W4243232673.json ├── W4245877440.json ├── W1981105122.json ├── W2075575070.json ├── W4251958910.json ├── W1967806251.json ├── W2196695511.json ├── W2892358450.json ├── W1126531559.json ├── W2049364536.json ├── W2074750373.json ├── W2576761644.json ├── W3027864542.json ├── W2081923342.json ├── W3091979905.json ├── W1963973223.json ├── W2088185220.json ├── W2782933850.json ├── W2910856664.json ├── W3081725801.json ├── W3095782726.json ├── W3153235689.json ├── W3196876825.json ├── W2022559695.json ├── W2180056793.json ├── W4312243670.json ├── W2338193071.json ├── W2578118648.json ├── W3196907885.json ├── W4312943142.json ├── W4379196596.json ├── W2016992826.json ├── W1607007873.json ├── W1979650029.json ├── W2053157284.json ├── W3203383492.json ├── W2131006941.json ├── W2255386121.json ├── W4210717530.json ├── W4281733089.json ├── W4307050444.json ├── W4309644041.json ├── W795771333.json ├── W2014076303.json ├── W2015165483.json ├── W2035675973.json ├── W2169225710.json ├── W2030473835.json ├── W2058058591.json ├── W2071978330.json ├── W4205470646.json ├── W4210683561.json └── W4312989597.json └── requirements.txt /docs/.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/dup/tests/b1.txt: -------------------------------------------------------------------------------- 1 | bb 2 | -------------------------------------------------------------------------------- /docs/dup/tests/b2.txt: -------------------------------------------------------------------------------- 1 | bb 2 | -------------------------------------------------------------------------------- /docs/dup/tests/c1.txt: -------------------------------------------------------------------------------- 1 | c 2 | -------------------------------------------------------------------------------- /docs/func/adder.out: -------------------------------------------------------------------------------- 1 | 101 2 | -------------------------------------------------------------------------------- /docs/vm/halt.mx: -------------------------------------------------------------------------------- 1 | 000001 2 | -------------------------------------------------------------------------------- /src/dup/tests/a1.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /src/dup/tests/a2.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /src/dup/tests/a3.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /src/dup/tests/b1.txt: -------------------------------------------------------------------------------- 1 | bb 2 | -------------------------------------------------------------------------------- /src/dup/tests/b2.txt: -------------------------------------------------------------------------------- 1 | bb 2 | -------------------------------------------------------------------------------- /src/dup/tests/c1.txt: -------------------------------------------------------------------------------- 1 | c 2 | -------------------------------------------------------------------------------- /src/func/adder.out: -------------------------------------------------------------------------------- 1 | 101 2 | -------------------------------------------------------------------------------- /src/interp/expr.out: -------------------------------------------------------------------------------- 1 | => 5 2 | -------------------------------------------------------------------------------- /src/interp/vars.out: -------------------------------------------------------------------------------- 1 | => 3 2 | -------------------------------------------------------------------------------- /src/vm/halt.mx: -------------------------------------------------------------------------------- 1 | 000001 2 | -------------------------------------------------------------------------------- /docs/debugger/halt.mx: -------------------------------------------------------------------------------- 1 | 000001 2 | -------------------------------------------------------------------------------- /docs/dup/tests/a1.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /docs/dup/tests/a2.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /docs/dup/tests/a3.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /docs/interp/expr.out: -------------------------------------------------------------------------------- 1 | => 5 2 | -------------------------------------------------------------------------------- /docs/interp/vars.out: -------------------------------------------------------------------------------- 1 | => 3 2 | -------------------------------------------------------------------------------- /info/foot.tex: -------------------------------------------------------------------------------- 1 | \end{document} 2 | -------------------------------------------------------------------------------- /src/debugger/halt.mx: -------------------------------------------------------------------------------- 1 | 000001 2 | -------------------------------------------------------------------------------- /docs/archive/sample_dir/a.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /docs/archive/sample_dir/b.txt: -------------------------------------------------------------------------------- 1 | bbb 2 | -------------------------------------------------------------------------------- /docs/binary/binary_notation.out: -------------------------------------------------------------------------------- 1 | 45 2 | -------------------------------------------------------------------------------- /docs/binary/dynamic_format.out: -------------------------------------------------------------------------------- 1 | 5s 2 | -------------------------------------------------------------------------------- /docs/binary/hex_notation.out: -------------------------------------------------------------------------------- 1 | 45 2 | -------------------------------------------------------------------------------- /docs/docgen/call.py: -------------------------------------------------------------------------------- 1 | count("name") 2 | -------------------------------------------------------------------------------- /docs/oop/func_obj.out: -------------------------------------------------------------------------------- 1 | in example 2 | -------------------------------------------------------------------------------- /docs/test/callable.out: -------------------------------------------------------------------------------- 1 | True True 2 | -------------------------------------------------------------------------------- /docs/viewer/call_example.out: -------------------------------------------------------------------------------- 1 | 13 2 | -------------------------------------------------------------------------------- /info/foot.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /src/archive/sample_dir/a.txt: -------------------------------------------------------------------------------- 1 | aaa 2 | -------------------------------------------------------------------------------- /src/archive/sample_dir/b.txt: -------------------------------------------------------------------------------- 1 | bbb 2 | -------------------------------------------------------------------------------- /src/binary/binary_notation.out: -------------------------------------------------------------------------------- 1 | 45 2 | -------------------------------------------------------------------------------- /src/binary/dynamic_format.out: -------------------------------------------------------------------------------- 1 | 5s 2 | -------------------------------------------------------------------------------- /src/binary/hex_notation.out: -------------------------------------------------------------------------------- 1 | 45 2 | -------------------------------------------------------------------------------- /src/docgen/call.py: -------------------------------------------------------------------------------- 1 | count("name") 2 | -------------------------------------------------------------------------------- /src/http/hello_web.txt: -------------------------------------------------------------------------------- 1 | Hello, web! 2 | -------------------------------------------------------------------------------- /src/oop/func_obj.out: -------------------------------------------------------------------------------- 1 | in example 2 | -------------------------------------------------------------------------------- /src/test/callable.out: -------------------------------------------------------------------------------- 1 | True True 2 | -------------------------------------------------------------------------------- /src/viewer/.gitignore: -------------------------------------------------------------------------------- 1 | temp.txt 2 | -------------------------------------------------------------------------------- /src/viewer/call_example.out: -------------------------------------------------------------------------------- 1 | 13 2 | -------------------------------------------------------------------------------- /docs/docgen/unparse_exec.out: -------------------------------------------------------------------------------- 1 | 6 2 | 6 3 | -------------------------------------------------------------------------------- /docs/func/closure.out: -------------------------------------------------------------------------------- 1 | hidden thing is 3 2 | -------------------------------------------------------------------------------- /docs/http/hello_web.txt: -------------------------------------------------------------------------------- 1 | Hello, web! 2 | -------------------------------------------------------------------------------- /docs/test/type_int.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/test/type_int.py: -------------------------------------------------------------------------------- 1 | print(type(3)) 2 | -------------------------------------------------------------------------------- /docs/test/type_len.py: -------------------------------------------------------------------------------- 1 | print(type(len)) 2 | -------------------------------------------------------------------------------- /docs/vm/print_r1.mx: -------------------------------------------------------------------------------- 1 | 00010a 2 | 000001 3 | -------------------------------------------------------------------------------- /src/docgen/unparse_exec.out: -------------------------------------------------------------------------------- 1 | 6 2 | 6 3 | -------------------------------------------------------------------------------- /src/func/closure.out: -------------------------------------------------------------------------------- 1 | hidden thing is 3 2 | -------------------------------------------------------------------------------- /src/protocols/callable.out: -------------------------------------------------------------------------------- 1 | add_3(8): 11 2 | -------------------------------------------------------------------------------- /src/test/type_int.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/test/type_int.py: -------------------------------------------------------------------------------- 1 | print(type(3)) 2 | -------------------------------------------------------------------------------- /src/test/type_len.py: -------------------------------------------------------------------------------- 1 | print(type(len)) 2 | -------------------------------------------------------------------------------- /src/vm/print_r1.mx: -------------------------------------------------------------------------------- 1 | 00010a 2 | 000001 3 | -------------------------------------------------------------------------------- /docs/archive/sample_dir/sub_dir/c.txt: -------------------------------------------------------------------------------- 1 | ccc 2 | -------------------------------------------------------------------------------- /docs/binary/variable_unpacking.out: -------------------------------------------------------------------------------- 1 | hello! 2 | -------------------------------------------------------------------------------- /docs/dup/dup.sh: -------------------------------------------------------------------------------- 1 | python dup.py tests/*.txt 2 | -------------------------------------------------------------------------------- /docs/func/dynamic.out: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | => None 4 | -------------------------------------------------------------------------------- /docs/func/func.sh: -------------------------------------------------------------------------------- 1 | python func.py func.tll 2 | -------------------------------------------------------------------------------- /docs/interp/expr.sh: -------------------------------------------------------------------------------- 1 | python expr.py expr.tll 2 | -------------------------------------------------------------------------------- /docs/interp/expr.tll: -------------------------------------------------------------------------------- 1 | ["add", ["abs", -3], 2] 2 | -------------------------------------------------------------------------------- /docs/interp/vars.sh: -------------------------------------------------------------------------------- 1 | python vars.py vars.tll 2 | -------------------------------------------------------------------------------- /docs/protocols/callable.out: -------------------------------------------------------------------------------- 1 | add_3(8): 11 2 | -------------------------------------------------------------------------------- /docs/test/type_func.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/vm/halt.as: -------------------------------------------------------------------------------- 1 | # Stop immediately. 2 | hlt 3 | -------------------------------------------------------------------------------- /src/archive/sample_dir/sub_dir/c.txt: -------------------------------------------------------------------------------- 1 | ccc 2 | -------------------------------------------------------------------------------- /src/binary/variable_unpacking.out: -------------------------------------------------------------------------------- 1 | hello! 2 | -------------------------------------------------------------------------------- /src/dup/dup.sh: -------------------------------------------------------------------------------- 1 | python dup.py tests/*.txt 2 | -------------------------------------------------------------------------------- /src/func/dynamic.out: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | => None 4 | -------------------------------------------------------------------------------- /src/func/func.sh: -------------------------------------------------------------------------------- 1 | python func.py func.tll 2 | -------------------------------------------------------------------------------- /src/interp/expr.sh: -------------------------------------------------------------------------------- 1 | python expr.py expr.tll 2 | -------------------------------------------------------------------------------- /src/interp/expr.tll: -------------------------------------------------------------------------------- 1 | ["add", ["abs", -3], 2] 2 | -------------------------------------------------------------------------------- /src/interp/vars.sh: -------------------------------------------------------------------------------- 1 | python vars.py vars.tll 2 | -------------------------------------------------------------------------------- /src/perf/ex_map_2.py: -------------------------------------------------------------------------------- 1 | {"A": [0, 1], "B": [2]} 2 | -------------------------------------------------------------------------------- /src/persist/format.txt: -------------------------------------------------------------------------------- 1 | bool:True 2 | int:123 3 | -------------------------------------------------------------------------------- /src/test/type_func.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/vm/halt.as: -------------------------------------------------------------------------------- 1 | # Stop immediately. 2 | hlt 3 | -------------------------------------------------------------------------------- /unused/flow/flow_first.out: -------------------------------------------------------------------------------- 1 | ['c', 'b', 'c'] 2 | -------------------------------------------------------------------------------- /unused/flow/flow_second.out: -------------------------------------------------------------------------------- 1 | c 2 | b 3 | c 4 | -------------------------------------------------------------------------------- /unused/flow/flow_third.out: -------------------------------------------------------------------------------- 1 | c 2 | b 3 | c 4 | -------------------------------------------------------------------------------- /docs/check/catalog.sh: -------------------------------------------------------------------------------- 1 | python catalog.py page.html 2 | -------------------------------------------------------------------------------- /docs/check/check.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | li: em 3 | -------------------------------------------------------------------------------- /docs/concur/classes.out: -------------------------------------------------------------------------------- 1 | => A 2 | => B 3 | => A 4 | -------------------------------------------------------------------------------- /docs/debugger/halt.as: -------------------------------------------------------------------------------- 1 | # Stop immediately. 2 | hlt 3 | -------------------------------------------------------------------------------- /docs/docgen/inject_exec.sh: -------------------------------------------------------------------------------- 1 | python inject.py exec 2 | -------------------------------------------------------------------------------- /docs/docgen/inject_make.sh: -------------------------------------------------------------------------------- 1 | python inject.py make 2 | -------------------------------------------------------------------------------- /docs/dup/grouped.sh: -------------------------------------------------------------------------------- 1 | python grouped.py tests/*.txt 2 | -------------------------------------------------------------------------------- /docs/func/dynamic.sh: -------------------------------------------------------------------------------- 1 | python func.py dynamic.tll 2 | -------------------------------------------------------------------------------- /docs/observe/delay_queue.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /docs/observe/push_queue.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /docs/observe/push_simple.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /docs/oop/inherit_class.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /docs/perf/ex_map_2.py: -------------------------------------------------------------------------------- 1 | {"A": [0, 1], "B": [2]} 2 | -------------------------------------------------------------------------------- /docs/persist/ex_alias_line.txt: -------------------------------------------------------------------------------- 1 | alias:12345678: 2 | -------------------------------------------------------------------------------- /docs/persist/format.txt: -------------------------------------------------------------------------------- 1 | bool:True 2 | int:123 3 | -------------------------------------------------------------------------------- /docs/vm/halt_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py halt.mx - 2 | 3 | -------------------------------------------------------------------------------- /src/bonus/ex_and_shortcut.py: -------------------------------------------------------------------------------- 1 | thing and thing.part 2 | -------------------------------------------------------------------------------- /src/check/catalog.sh: -------------------------------------------------------------------------------- 1 | python catalog.py page.html 2 | -------------------------------------------------------------------------------- /src/check/check.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | li: em 3 | -------------------------------------------------------------------------------- /src/check/ex_banner.ht: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/concur/classes.out: -------------------------------------------------------------------------------- 1 | => A 2 | => B 3 | => A 4 | -------------------------------------------------------------------------------- /src/debugger/halt.as: -------------------------------------------------------------------------------- 1 | # Stop immediately. 2 | hlt 3 | -------------------------------------------------------------------------------- /src/docgen/inject_exec.sh: -------------------------------------------------------------------------------- 1 | python inject.py exec 2 | -------------------------------------------------------------------------------- /src/docgen/inject_make.sh: -------------------------------------------------------------------------------- 1 | python inject.py make 2 | -------------------------------------------------------------------------------- /src/docgen/inject_parse.sh: -------------------------------------------------------------------------------- 1 | python inject.py parse 2 | -------------------------------------------------------------------------------- /src/docgen/unparse_exec.sh: -------------------------------------------------------------------------------- 1 | python unparse.py exec 2 | -------------------------------------------------------------------------------- /src/dup/grouped.sh: -------------------------------------------------------------------------------- 1 | python grouped.py tests/*.txt 2 | -------------------------------------------------------------------------------- /src/func/dynamic.sh: -------------------------------------------------------------------------------- 1 | python func.py dynamic.tll 2 | -------------------------------------------------------------------------------- /src/lint/walk_ast.sh: -------------------------------------------------------------------------------- 1 | python walk_ast.py simple.py 2 | -------------------------------------------------------------------------------- /src/observe/delay_queue.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /src/observe/push_queue.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /src/observe/push_simple.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | -------------------------------------------------------------------------------- /src/oop/inherit_class.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /src/pack/manual.sh: -------------------------------------------------------------------------------- 1 | python manual.py < triple.json 2 | -------------------------------------------------------------------------------- /src/persist/ex_alias_line.txt: -------------------------------------------------------------------------------- 1 | alias:12345678: 2 | -------------------------------------------------------------------------------- /src/test/func_list.out: -------------------------------------------------------------------------------- 1 | First 2 | Second 3 | Third 4 | -------------------------------------------------------------------------------- /src/test/manual.out: -------------------------------------------------------------------------------- 1 | pass 2 2 | fail 1 3 | error 1 4 | -------------------------------------------------------------------------------- /src/test/runner.out: -------------------------------------------------------------------------------- 1 | pass 2 2 | fail 1 3 | error 1 4 | -------------------------------------------------------------------------------- /src/vm/halt_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py halt.mx - 2 | 3 | -------------------------------------------------------------------------------- /unused/flow/index.md: -------------------------------------------------------------------------------- 1 | - [Graphviz][graphviz] 2 | -------------------------------------------------------------------------------- /unused/flow/input.txt: -------------------------------------------------------------------------------- 1 | a 2 | b 3 | c 4 | d 5 | e 6 | -------------------------------------------------------------------------------- /docs/archive/hash_all.sh: -------------------------------------------------------------------------------- 1 | python hash_all.py sample_dir 2 | -------------------------------------------------------------------------------- /docs/bonus/ex_and_shortcut.py: -------------------------------------------------------------------------------- 1 | thing and thing.part 2 | -------------------------------------------------------------------------------- /docs/build/double_linear_dep.out: -------------------------------------------------------------------------------- 1 | build B 2 | build A 3 | -------------------------------------------------------------------------------- /docs/check/contains.sh: -------------------------------------------------------------------------------- 1 | python contains.py page.html 2 | -------------------------------------------------------------------------------- /docs/db/show_packed_records.out: -------------------------------------------------------------------------------- 1 | abcdef.12345.6.7..... 2 | -------------------------------------------------------------------------------- /docs/docgen/inject_parse.sh: -------------------------------------------------------------------------------- 1 | python inject.py parse 2 | -------------------------------------------------------------------------------- /docs/docgen/unparse_exec.sh: -------------------------------------------------------------------------------- 1 | python unparse.py exec 2 | -------------------------------------------------------------------------------- /docs/func/func.out: -------------------------------------------------------------------------------- 1 | 2 2 | 4 3 | 8 4 | 16 5 | => None 6 | -------------------------------------------------------------------------------- /docs/http/basic_server.sh: -------------------------------------------------------------------------------- 1 | python basic_http_server.py 2 | -------------------------------------------------------------------------------- /docs/interp/doubling.sh: -------------------------------------------------------------------------------- 1 | python stmt.py doubling.tll 2 | -------------------------------------------------------------------------------- /docs/layout/ex_box.txt: -------------------------------------------------------------------------------- 1 | +----+ 2 | |text| 3 | +----+ 4 | -------------------------------------------------------------------------------- /docs/lint/ex_redundant.py: -------------------------------------------------------------------------------- 1 | x = 1 # redundant 2 | x = 2 3 | -------------------------------------------------------------------------------- /docs/lint/walk_ast.sh: -------------------------------------------------------------------------------- 1 | python walk_ast.py simple.py 2 | -------------------------------------------------------------------------------- /docs/oop/inherit_constructor.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /docs/oop/inherit_original.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /docs/pack/manual.sh: -------------------------------------------------------------------------------- 1 | python manual.py < triple.json 2 | -------------------------------------------------------------------------------- /docs/perf/ex_map_1.py: -------------------------------------------------------------------------------- 1 | {"A": [0], "B": [1], "C": [2]} 2 | -------------------------------------------------------------------------------- /docs/test/func_list.out: -------------------------------------------------------------------------------- 1 | First 2 | Second 3 | Third 4 | -------------------------------------------------------------------------------- /docs/test/manual.out: -------------------------------------------------------------------------------- 1 | pass 2 2 | fail 1 3 | error 1 4 | -------------------------------------------------------------------------------- /docs/test/runner.out: -------------------------------------------------------------------------------- 1 | pass 2 2 | fail 1 3 | error 1 4 | -------------------------------------------------------------------------------- /docs/vm/halt_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py halt.as - 2 | -------------------------------------------------------------------------------- /src/archive/hash_all.sh: -------------------------------------------------------------------------------- 1 | python hash_all.py sample_dir 2 | -------------------------------------------------------------------------------- /src/binary/bird.txt: -------------------------------------------------------------------------------- 1 | ,_, 2 | (O,O) 3 | ( ) 4 | -"-"- 5 | -------------------------------------------------------------------------------- /src/build/double_linear_dep.out: -------------------------------------------------------------------------------- 1 | build B 2 | build A 3 | -------------------------------------------------------------------------------- /src/check/contains.sh: -------------------------------------------------------------------------------- 1 | python contains.py page.html 2 | -------------------------------------------------------------------------------- /src/db/show_packed_records.out: -------------------------------------------------------------------------------- 1 | abcdef.12345.6.7..... 2 | -------------------------------------------------------------------------------- /src/func/func.out: -------------------------------------------------------------------------------- 1 | 2 2 | 4 3 | 8 4 | 16 5 | => None 6 | -------------------------------------------------------------------------------- /src/http/basic_server.sh: -------------------------------------------------------------------------------- 1 | python basic_http_server.py 2 | -------------------------------------------------------------------------------- /src/interp/doubling.sh: -------------------------------------------------------------------------------- 1 | python stmt.py doubling.tll 2 | -------------------------------------------------------------------------------- /src/intro/.gitignore: -------------------------------------------------------------------------------- 1 | empirical.png 2 | syllabus.png 3 | -------------------------------------------------------------------------------- /src/layout/ex_box.txt: -------------------------------------------------------------------------------- 1 | +----+ 2 | |text| 3 | +----+ 4 | -------------------------------------------------------------------------------- /src/lint/ex_redundant.py: -------------------------------------------------------------------------------- 1 | x = 1 # redundant 2 | x = 2 3 | -------------------------------------------------------------------------------- /src/oop/inherit_constructor.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /src/oop/inherit_original.out: -------------------------------------------------------------------------------- 1 | sq: 0.56 2 | ci: 0.40 3 | -------------------------------------------------------------------------------- /src/perf/ex_map_1.py: -------------------------------------------------------------------------------- 1 | {"A": [0], "B": [1], "C": [2]} 2 | -------------------------------------------------------------------------------- /src/vm/count_up_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py count_up.mx - 2 | 3 | -------------------------------------------------------------------------------- /src/vm/halt_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py halt.as - 2 | -------------------------------------------------------------------------------- /src/vm/print_r1_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py print_r1.mx - 2 | 3 | -------------------------------------------------------------------------------- /docs/archive/sample_dir.sh: -------------------------------------------------------------------------------- 1 | tree --charset ascii sample_dir 2 | -------------------------------------------------------------------------------- /docs/binary/bird.txt: -------------------------------------------------------------------------------- 1 | ,_, 2 | (O,O) 3 | ( ) 4 | -"-"- 5 | -------------------------------------------------------------------------------- /docs/binary/ex_dynamic_format.py: -------------------------------------------------------------------------------- 1 | format = f"{len(str)}s" 2 | -------------------------------------------------------------------------------- /docs/binary/hex_notation.py: -------------------------------------------------------------------------------- 1 | print(0x2D) # (2 * 16) + 13 2 | -------------------------------------------------------------------------------- /docs/binary/variable_packing.out: -------------------------------------------------------------------------------- 1 | b'\x06\x00\x00\x00hello!' 2 | -------------------------------------------------------------------------------- /docs/bonus/scalene.out: -------------------------------------------------------------------------------- 1 | scalene sat [C = 3, A = 1, B = 2] 2 | -------------------------------------------------------------------------------- /docs/check/check.sh: -------------------------------------------------------------------------------- 1 | python check.py manifest.yml page.html 2 | -------------------------------------------------------------------------------- /docs/concur/switch.out: -------------------------------------------------------------------------------- 1 | => A 2 | => B 3 | => A 4 | finished 5 | -------------------------------------------------------------------------------- /docs/docgen/inject_modified.sh: -------------------------------------------------------------------------------- 1 | python inject.py modified 2 | -------------------------------------------------------------------------------- /docs/docgen/unparse_modified.sh: -------------------------------------------------------------------------------- 1 | python unparse.py modified 2 | -------------------------------------------------------------------------------- /docs/http/minimal_http_request.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.1 2 | -------------------------------------------------------------------------------- /docs/interp/repeat_zero.sh: -------------------------------------------------------------------------------- 1 | python stmt.py repeat_zero.tll 2 | -------------------------------------------------------------------------------- /docs/lint/dump_ast_simple.sh: -------------------------------------------------------------------------------- 1 | python dump_ast.py simple.py 2 | -------------------------------------------------------------------------------- /docs/lint/has_duplicate_keys.out: -------------------------------------------------------------------------------- 1 | {'third': 6, 'fourth': 5} 2 | -------------------------------------------------------------------------------- /docs/oop/shapes_dict.out: -------------------------------------------------------------------------------- 1 | sq 12.00 9.00 2 | ci 12.57 12.57 3 | -------------------------------------------------------------------------------- /docs/pack/exhaustive.sh: -------------------------------------------------------------------------------- 1 | python exhaustive.py < triple.json 2 | -------------------------------------------------------------------------------- /docs/pack/z3_unequal.out: -------------------------------------------------------------------------------- 1 | A == B & B == C & B != C: unsat 2 | -------------------------------------------------------------------------------- /docs/template/loop.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json loop.ht 2 | -------------------------------------------------------------------------------- /docs/test/type_len.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/vm/count_up_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py count_up.mx - 2 | 3 | -------------------------------------------------------------------------------- /docs/vm/fill_array_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py fill_array.mx - 2 | 3 | -------------------------------------------------------------------------------- /docs/vm/print_r1_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py print_r1.mx - 2 | 3 | -------------------------------------------------------------------------------- /lib/mccole/latex/footer.tex: -------------------------------------------------------------------------------- 1 | \printindex 2 | \end{document} 3 | -------------------------------------------------------------------------------- /src/archive/sample_dir.sh: -------------------------------------------------------------------------------- 1 | tree --charset ascii sample_dir 2 | -------------------------------------------------------------------------------- /src/binary/ex_dynamic_format.py: -------------------------------------------------------------------------------- 1 | format = f"{len(str)}s" 2 | -------------------------------------------------------------------------------- /src/binary/hex_notation.py: -------------------------------------------------------------------------------- 1 | print(0x2D) # (2 * 16) + 13 2 | -------------------------------------------------------------------------------- /src/binary/variable_packing.out: -------------------------------------------------------------------------------- 1 | b'\x06\x00\x00\x00hello!' 2 | -------------------------------------------------------------------------------- /src/bonus/isosceles.out: -------------------------------------------------------------------------------- 1 | isosceles sat [C = 2, A = 1, B = 2] 2 | -------------------------------------------------------------------------------- /src/bonus/scalene.out: -------------------------------------------------------------------------------- 1 | scalene sat [C = 3, A = 1, B = 2] 2 | -------------------------------------------------------------------------------- /src/check/check.sh: -------------------------------------------------------------------------------- 1 | python check.py manifest.yml page.html 2 | -------------------------------------------------------------------------------- /src/concur/switch.out: -------------------------------------------------------------------------------- 1 | => A 2 | => B 3 | => A 4 | finished 5 | -------------------------------------------------------------------------------- /src/docgen/inject_exec.out: -------------------------------------------------------------------------------- 1 | Counter({'add': 2, 'double': 1}) 2 | -------------------------------------------------------------------------------- /src/docgen/inject_modified.sh: -------------------------------------------------------------------------------- 1 | python inject.py modified 2 | -------------------------------------------------------------------------------- /src/docgen/unparse_modified.sh: -------------------------------------------------------------------------------- 1 | python unparse.py modified 2 | -------------------------------------------------------------------------------- /src/func/oop.out: -------------------------------------------------------------------------------- 1 | initial value 0 2 | object now contains 99 3 | -------------------------------------------------------------------------------- /src/http/minimal_http_request.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.1 2 | -------------------------------------------------------------------------------- /src/interp/repeat_zero.sh: -------------------------------------------------------------------------------- 1 | python stmt.py repeat_zero.tll 2 | -------------------------------------------------------------------------------- /src/interp/repeat_zero.tll: -------------------------------------------------------------------------------- 1 | ["repeat", 0, ["print", "zero"]] 2 | -------------------------------------------------------------------------------- /src/lint/dump_ast_simple.sh: -------------------------------------------------------------------------------- 1 | python dump_ast.py simple.py 2 | -------------------------------------------------------------------------------- /src/lint/has_duplicate_keys.out: -------------------------------------------------------------------------------- 1 | {'third': 6, 'fourth': 5} 2 | -------------------------------------------------------------------------------- /src/oop/shapes_dict.out: -------------------------------------------------------------------------------- 1 | sq 12.00 9.00 2 | ci 12.57 12.57 3 | -------------------------------------------------------------------------------- /src/pack/exhaustive.sh: -------------------------------------------------------------------------------- 1 | python exhaustive.py < triple.json 2 | -------------------------------------------------------------------------------- /src/pack/incremental.sh: -------------------------------------------------------------------------------- 1 | python incremental.py < triple.json 2 | -------------------------------------------------------------------------------- /src/pack/z3_unequal.out: -------------------------------------------------------------------------------- 1 | A == B & B == C & B != C: unsat 2 | -------------------------------------------------------------------------------- /src/template/loop.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json loop.ht 2 | -------------------------------------------------------------------------------- /src/test/type_len.out: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/vm/fill_array_run.sh: -------------------------------------------------------------------------------- 1 | python vm.py fill_array.mx - 2 | 3 | -------------------------------------------------------------------------------- /unused/flow/slides.html: -------------------------------------------------------------------------------- 1 | --- 2 | template: slides 3 | --- 4 | -------------------------------------------------------------------------------- /docs/bonus/equilateral.out: -------------------------------------------------------------------------------- 1 | equilateral sat [C = 1, B = 1, A = 1] 2 | -------------------------------------------------------------------------------- /docs/bonus/isosceles.out: -------------------------------------------------------------------------------- 1 | isosceles sat [C = 2, A = 1, B = 2] 2 | -------------------------------------------------------------------------------- /docs/docgen/inject_exec.out: -------------------------------------------------------------------------------- 1 | Counter({'add': 2, 'double': 1}) 2 | -------------------------------------------------------------------------------- /docs/dup/brute_force_1.sh: -------------------------------------------------------------------------------- 1 | python brute_force_1.py tests/*.txt 2 | -------------------------------------------------------------------------------- /docs/func/ex_dict_zip.py: -------------------------------------------------------------------------------- 1 | env.append(dict(zip(params, values))) 2 | -------------------------------------------------------------------------------- /docs/func/oop.out: -------------------------------------------------------------------------------- 1 | initial value 0 2 | object now contains 99 3 | -------------------------------------------------------------------------------- /docs/interp/repeat_zero.tll: -------------------------------------------------------------------------------- 1 | ["repeat", 0, ["print", "zero"]] 2 | -------------------------------------------------------------------------------- /docs/intro/output_sample.out: -------------------------------------------------------------------------------- 1 | alpha 2 | beta 3 | gamma 4 | delta 5 | -------------------------------------------------------------------------------- /docs/lint/walk_ast.out: -------------------------------------------------------------------------------- 1 | {'double': {(1, 0)}, 'result': {(4, 0)}} 2 | -------------------------------------------------------------------------------- /docs/oop/larger.out: -------------------------------------------------------------------------------- 1 | is sq larger? False 2 | is ci larger? True 3 | -------------------------------------------------------------------------------- /docs/pack/incremental.sh: -------------------------------------------------------------------------------- 1 | python incremental.py < triple.json 2 | -------------------------------------------------------------------------------- /docs/test/globals.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | pprint.pprint(globals()) 3 | -------------------------------------------------------------------------------- /docs/viewer/make_lines.out: -------------------------------------------------------------------------------- 1 | a 2 | b0 3 | c01 4 | d012 5 | e0123 6 | -------------------------------------------------------------------------------- /docs/vm/fill_array_assemble.sh: -------------------------------------------------------------------------------- 1 | python arrays.py fill_array.as - 2 | -------------------------------------------------------------------------------- /docs/vm/print_r1_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py print_r1.as - 2 | -------------------------------------------------------------------------------- /src/bonus/equilateral.out: -------------------------------------------------------------------------------- 1 | equilateral sat [C = 1, B = 1, A = 1] 2 | -------------------------------------------------------------------------------- /src/dup/brute_force_1.sh: -------------------------------------------------------------------------------- 1 | python brute_force_1.py tests/*.txt 2 | -------------------------------------------------------------------------------- /src/func/ex_dict_zip.py: -------------------------------------------------------------------------------- 1 | env.append(dict(zip(params, values))) 2 | -------------------------------------------------------------------------------- /src/intro/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS= 2 | 3 | include ../../examples.mk 4 | -------------------------------------------------------------------------------- /src/intro/output_sample.out: -------------------------------------------------------------------------------- 1 | alpha 2 | beta 3 | gamma 4 | delta 5 | -------------------------------------------------------------------------------- /src/lint/walk_ast.out: -------------------------------------------------------------------------------- 1 | {'double': {(1, 0)}, 'result': {(4, 0)}} 2 | -------------------------------------------------------------------------------- /src/oop/larger.out: -------------------------------------------------------------------------------- 1 | is sq larger? False 2 | is ci larger? True 3 | -------------------------------------------------------------------------------- /src/test/globals.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | pprint.pprint(globals()) 3 | -------------------------------------------------------------------------------- /src/viewer/make_lines.out: -------------------------------------------------------------------------------- 1 | a 2 | b0 3 | c01 4 | d012 5 | e0123 6 | -------------------------------------------------------------------------------- /src/vm/fill_array_assemble.sh: -------------------------------------------------------------------------------- 1 | python arrays.py fill_array.as - 2 | -------------------------------------------------------------------------------- /src/vm/print_r1_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py print_r1.as - 2 | -------------------------------------------------------------------------------- /unused/flow/flow_second.sh: -------------------------------------------------------------------------------- 1 | python flow_second.py source_sink.dot 2 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | FONT_SIZE=--fontsize 12 2 | include lib/mccole/mccole.mk 3 | -------------------------------------------------------------------------------- /docs/intro/python_sample.py: -------------------------------------------------------------------------------- 1 | for ch in "example": 2 | print(ch) 3 | -------------------------------------------------------------------------------- /docs/persist/ex_circular.py: -------------------------------------------------------------------------------- 1 | fixture = [] 2 | fixture.append(fixture) 3 | -------------------------------------------------------------------------------- /docs/persist/multiline_input.txt: -------------------------------------------------------------------------------- 1 | # input 2 | this is 3 | two lines 4 | -------------------------------------------------------------------------------- /docs/protocols/ex_with.py: -------------------------------------------------------------------------------- 1 | with C(…args…) as name: 2 | …do things… 3 | -------------------------------------------------------------------------------- /docs/protocols/wrap_infinite.sh: -------------------------------------------------------------------------------- 1 | python wrap_infinite.py | head -n 3 2 | -------------------------------------------------------------------------------- /docs/vm/count_up_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py count_up.as - 2 | 3 | -------------------------------------------------------------------------------- /src/intro/python_sample.py: -------------------------------------------------------------------------------- 1 | for ch in "example": 2 | print(ch) 3 | -------------------------------------------------------------------------------- /src/persist/ex_circular.py: -------------------------------------------------------------------------------- 1 | fixture = [] 2 | fixture.append(fixture) 3 | -------------------------------------------------------------------------------- /src/persist/ex_list_alias.txt: -------------------------------------------------------------------------------- 1 | list:4484025600:1 2 | alias:4484025600: 3 | -------------------------------------------------------------------------------- /src/persist/multiline_input.txt: -------------------------------------------------------------------------------- 1 | # input 2 | this is 3 | two lines 4 | -------------------------------------------------------------------------------- /src/protocols/ex_with.py: -------------------------------------------------------------------------------- 1 | with C(…args…) as name: 2 | …do things… 3 | -------------------------------------------------------------------------------- /src/protocols/wrap_infinite.sh: -------------------------------------------------------------------------------- 1 | python wrap_infinite.py | head -n 3 2 | -------------------------------------------------------------------------------- /src/template/ex_use_two_var.ht: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /src/vm/count_up_assemble.sh: -------------------------------------------------------------------------------- 1 | python assembler.py count_up.as - 2 | 3 | -------------------------------------------------------------------------------- /src/vm/print_r1.as: -------------------------------------------------------------------------------- 1 | # Print initial contents of R1. 2 | prr R1 3 | hlt 4 | -------------------------------------------------------------------------------- /unused/flow/flow_third.sh: -------------------------------------------------------------------------------- 1 | python flow_third.py source_sink.dot verbs 2 | -------------------------------------------------------------------------------- /docs/binary/dynamic_format.py: -------------------------------------------------------------------------------- 1 | text = "hello" 2 | print(f"{len(text)}s") 3 | -------------------------------------------------------------------------------- /docs/lint/find_duplicate_keys.out: -------------------------------------------------------------------------------- 1 | duplicate key(s) {fourth, third} at 1 2 | -------------------------------------------------------------------------------- /docs/oop/spread.out: -------------------------------------------------------------------------------- 1 | left 1 middle 2 right 3 2 | left 10 middle 20 right 30 3 | -------------------------------------------------------------------------------- /docs/persist/ex_list_alias.txt: -------------------------------------------------------------------------------- 1 | list:4484025600:1 2 | alias:4484025600: 3 | -------------------------------------------------------------------------------- /docs/persist/shared.py: -------------------------------------------------------------------------------- 1 | shared = ["shared"] 2 | fixture = [shared, shared] 3 | -------------------------------------------------------------------------------- /docs/protocols/wrap_param.out: -------------------------------------------------------------------------------- 1 | ++ call 2 | original: example 3 | -- call 4 | -------------------------------------------------------------------------------- /docs/template/conditional.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json conditional.ht 2 | -------------------------------------------------------------------------------- /docs/template/static_text.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json static_text.ht 2 | -------------------------------------------------------------------------------- /docs/test/ex_loop_globals_1.py: -------------------------------------------------------------------------------- 1 | for name in globals(): 2 | print(name) 3 | -------------------------------------------------------------------------------- /docs/vm/print_r1.as: -------------------------------------------------------------------------------- 1 | # Print initial contents of R1. 2 | prr R1 3 | hlt 4 | -------------------------------------------------------------------------------- /src/binary/dynamic_format.py: -------------------------------------------------------------------------------- 1 | text = "hello" 2 | print(f"{len(text)}s") 3 | -------------------------------------------------------------------------------- /src/contents/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Index" 3 | --- 4 | 5 | [% index %] 6 | -------------------------------------------------------------------------------- /src/lint/find_duplicate_keys.out: -------------------------------------------------------------------------------- 1 | duplicate key(s) {fourth, third} at 1 2 | -------------------------------------------------------------------------------- /src/oop/spread.out: -------------------------------------------------------------------------------- 1 | left 1 middle 2 right 3 2 | left 10 middle 20 right 30 3 | -------------------------------------------------------------------------------- /src/persist/shared.py: -------------------------------------------------------------------------------- 1 | shared = ["shared"] 2 | fixture = [shared, shared] 3 | -------------------------------------------------------------------------------- /src/protocols/wrap_param.out: -------------------------------------------------------------------------------- 1 | ++ call 2 | original: example 3 | -- call 4 | -------------------------------------------------------------------------------- /src/template/conditional.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json conditional.ht 2 | -------------------------------------------------------------------------------- /src/template/static_text.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json static_text.ht 2 | -------------------------------------------------------------------------------- /src/test/ex_loop_globals_1.py: -------------------------------------------------------------------------------- 1 | for name in globals(): 2 | print(name) 3 | -------------------------------------------------------------------------------- /unused/flow/flow_first.sh: -------------------------------------------------------------------------------- 1 | python flow_first.py split_join.dot head cat 2 | -------------------------------------------------------------------------------- /docs/bonus/func_attr.out: -------------------------------------------------------------------------------- 1 | docstring: Docstring for example. 2 | name: example 3 | -------------------------------------------------------------------------------- /docs/bonus/inheritance_example.sh: -------------------------------------------------------------------------------- 1 | python inheritance.py inheritance_example.py 2 | -------------------------------------------------------------------------------- /docs/bonus/lazy.py: -------------------------------------------------------------------------------- 1 | if x != 0: 2 | return 1/x 3 | else: 4 | return None 5 | -------------------------------------------------------------------------------- /docs/build/double_linear_dep.sh: -------------------------------------------------------------------------------- 1 | python build_simple.py double_linear_dep.json 2 | -------------------------------------------------------------------------------- /docs/compress/binary_perf.out: -------------------------------------------------------------------------------- 1 | original 2 | 13240 3 | compressed 4 | 14943 5 | -------------------------------------------------------------------------------- /docs/concur/scheduler.out: -------------------------------------------------------------------------------- 1 | => A 2 2 | => B 3 3 | => A 1 4 | => B 2 5 | => B 1 6 | -------------------------------------------------------------------------------- /docs/debugger/print_num.mx: -------------------------------------------------------------------------------- 1 | 370002 2 | 00000a 3 | 410002 4 | 00000a 5 | 000001 6 | -------------------------------------------------------------------------------- /docs/intro/data_sample.yml: -------------------------------------------------------------------------------- 1 | - name: read 2 | params: 3 | - sample_data.csv 4 | -------------------------------------------------------------------------------- /docs/pack/incremental_reverse.sh: -------------------------------------------------------------------------------- 1 | python incremental.py reversed < triple.json 2 | -------------------------------------------------------------------------------- /docs/pack/z3_equal.out: -------------------------------------------------------------------------------- 1 | A == B & B == C: sat 2 | A False 3 | B False 4 | C False 5 | -------------------------------------------------------------------------------- /docs/persist/ex_aliasing.py: -------------------------------------------------------------------------------- 1 | shared = ["content"] 2 | fixture = [shared, shared] 3 | -------------------------------------------------------------------------------- /docs/persist/multiline_output.txt: -------------------------------------------------------------------------------- 1 | # output 2 | str:2 3 | this is 4 | two lines 5 | -------------------------------------------------------------------------------- /docs/protocols/wrap_infinite.out: -------------------------------------------------------------------------------- 1 | before call 2 | before call 3 | before call 4 | -------------------------------------------------------------------------------- /src/bonus/func_attr.out: -------------------------------------------------------------------------------- 1 | docstring: Docstring for example. 2 | name: example 3 | -------------------------------------------------------------------------------- /src/bonus/inheritance_example.sh: -------------------------------------------------------------------------------- 1 | python inheritance.py inheritance_example.py 2 | -------------------------------------------------------------------------------- /src/bonus/lazy.py: -------------------------------------------------------------------------------- 1 | if x != 0: 2 | return 1/x 3 | else: 4 | return None 5 | -------------------------------------------------------------------------------- /src/build/double_linear_dep.sh: -------------------------------------------------------------------------------- 1 | python build_simple.py double_linear_dep.json 2 | -------------------------------------------------------------------------------- /src/compress/binary_perf.out: -------------------------------------------------------------------------------- 1 | original 2 | 13240 3 | compressed 4 | 14943 5 | -------------------------------------------------------------------------------- /src/concur/scheduler.out: -------------------------------------------------------------------------------- 1 | => A 2 2 | => B 3 3 | => A 1 4 | => B 2 5 | => B 1 6 | -------------------------------------------------------------------------------- /src/debugger/print_num.as: -------------------------------------------------------------------------------- 1 | ldc R0 55 2 | prr R0 3 | ldc R0 65 4 | prr R0 5 | hlt 6 | -------------------------------------------------------------------------------- /src/debugger/print_num.mx: -------------------------------------------------------------------------------- 1 | 370002 2 | 00000a 3 | 410002 4 | 00000a 5 | 000001 6 | -------------------------------------------------------------------------------- /src/glossary/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Glossary" 3 | --- 4 | 5 | [% glossary %] 6 | -------------------------------------------------------------------------------- /src/intro/data_sample.yml: -------------------------------------------------------------------------------- 1 | - name: read 2 | params: 3 | - sample_data.csv 4 | -------------------------------------------------------------------------------- /src/pack/incremental_reverse.sh: -------------------------------------------------------------------------------- 1 | python incremental.py reversed < triple.json 2 | -------------------------------------------------------------------------------- /src/pack/z3_equal.out: -------------------------------------------------------------------------------- 1 | A == B & B == C: sat 2 | A False 3 | B False 4 | C False 5 | -------------------------------------------------------------------------------- /src/persist/ex_aliasing.py: -------------------------------------------------------------------------------- 1 | shared = ["content"] 2 | fixture = [shared, shared] 3 | -------------------------------------------------------------------------------- /src/persist/multiline_output.txt: -------------------------------------------------------------------------------- 1 | # output 2 | str:2 3 | this is 4 | two lines 5 | -------------------------------------------------------------------------------- /src/protocols/wrap_capture.out: -------------------------------------------------------------------------------- 1 | before call 2 | original: example 3 | after call 4 | -------------------------------------------------------------------------------- /src/protocols/wrap_infinite.out: -------------------------------------------------------------------------------- 1 | before call 2 | before call 3 | before call 4 | -------------------------------------------------------------------------------- /src/syllabus/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Syllabus" 3 | --- 4 | 5 | [% syllabus %] 6 | -------------------------------------------------------------------------------- /src/template/single_constant.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json single_constant.ht 2 | -------------------------------------------------------------------------------- /src/template/single_variable.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json single_variable.ht 2 | -------------------------------------------------------------------------------- /src/test/type_func.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | pass 3 | 4 | print(type(example)) 5 | -------------------------------------------------------------------------------- /docs/binary/binary_notation.py: -------------------------------------------------------------------------------- 1 | print(0b101101) # (1 * 32) + (1 * 8) + (1 * 4) + 1 2 | -------------------------------------------------------------------------------- /docs/check/ex_flatten.py: -------------------------------------------------------------------------------- 1 | for node in Flatten(doc.html).result(): 2 | print(node) 3 | -------------------------------------------------------------------------------- /docs/compress/compress_perf.out: -------------------------------------------------------------------------------- 1 | original 2 | 13240 3 | compressed 4 | 28558 5 | -------------------------------------------------------------------------------- /docs/debugger/print_num.as: -------------------------------------------------------------------------------- 1 | ldc R0 55 2 | prr R0 3 | ldc R0 65 4 | prr R0 5 | hlt 6 | -------------------------------------------------------------------------------- /docs/lint/find_duplicate_keys.sh: -------------------------------------------------------------------------------- 1 | python find_duplicate_keys.py has_duplicate_keys.py 2 | -------------------------------------------------------------------------------- /docs/oop/shapes_class.out: -------------------------------------------------------------------------------- 1 | sq is a Square: 12.00 9.00 2 | ci is a Circle: 12.57 12.57 3 | -------------------------------------------------------------------------------- /docs/pack/z3_complete.out: -------------------------------------------------------------------------------- 1 | [B.3, C.2, A.3] 2 | [C.1, B.2, A.2] 3 | [A.1, C.1, B.1] 4 | -------------------------------------------------------------------------------- /docs/pack/z3_part_equal.out: -------------------------------------------------------------------------------- 1 | A == B & B != C: sat 2 | A True 3 | B True 4 | C False 5 | -------------------------------------------------------------------------------- /docs/protocols/decorator_param.out: -------------------------------------------------------------------------------- 1 | ++ wrapping 2 | original: example 3 | -- wrapping 4 | -------------------------------------------------------------------------------- /docs/protocols/decorator_simple.out: -------------------------------------------------------------------------------- 1 | before call 2 | original: example 3 | after call 4 | -------------------------------------------------------------------------------- /docs/protocols/wrap_capture.out: -------------------------------------------------------------------------------- 1 | before call 2 | original: example 3 | after call 4 | -------------------------------------------------------------------------------- /docs/sdxpy-600.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/sdxpy-600.jpg -------------------------------------------------------------------------------- /docs/template/single_constant.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json single_constant.ht 2 | -------------------------------------------------------------------------------- /docs/template/single_variable.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json single_variable.ht 2 | -------------------------------------------------------------------------------- /docs/test/type_func.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | pass 3 | 4 | print(type(example)) 5 | -------------------------------------------------------------------------------- /res/sdxpy-600.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/res/sdxpy-600.jpg -------------------------------------------------------------------------------- /res/sdxpy-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/res/sdxpy-cover.png -------------------------------------------------------------------------------- /src/bib/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Bibliography" 3 | --- 4 | 5 | [% bibliography %] 6 | -------------------------------------------------------------------------------- /src/binary/binary_notation.py: -------------------------------------------------------------------------------- 1 | print(0b101101) # (1 * 32) + (1 * 8) + (1 * 4) + 1 2 | -------------------------------------------------------------------------------- /src/binary/calcsize.out: -------------------------------------------------------------------------------- 1 | format '4s' needs 4 bytes 2 | format '3i4s5d' needs 56 bytes 3 | -------------------------------------------------------------------------------- /src/check/ex_flatten.py: -------------------------------------------------------------------------------- 1 | for node in Flatten(doc.html).result(): 2 | print(node) 3 | -------------------------------------------------------------------------------- /src/compress/compress_perf.out: -------------------------------------------------------------------------------- 1 | original 2 | 13240 3 | compressed 4 | 28558 5 | -------------------------------------------------------------------------------- /src/lint/find_duplicate_keys.sh: -------------------------------------------------------------------------------- 1 | python find_duplicate_keys.py has_duplicate_keys.py 2 | -------------------------------------------------------------------------------- /src/oop/shapes_class.out: -------------------------------------------------------------------------------- 1 | sq is a Square: 12.00 9.00 2 | ci is a Circle: 12.57 12.57 3 | -------------------------------------------------------------------------------- /src/pack/z3_complete.out: -------------------------------------------------------------------------------- 1 | [B.3, C.2, A.3] 2 | [C.1, B.2, A.2] 3 | [A.1, C.1, B.1] 4 | -------------------------------------------------------------------------------- /src/pack/z3_part_equal.out: -------------------------------------------------------------------------------- 1 | A == B & B != C: sat 2 | A True 3 | B True 4 | C False 5 | -------------------------------------------------------------------------------- /src/protocols/decorator_param.out: -------------------------------------------------------------------------------- 1 | ++ wrapping 2 | original: example 3 | -- wrapping 4 | -------------------------------------------------------------------------------- /src/protocols/decorator_simple.out: -------------------------------------------------------------------------------- 1 | before call 2 | original: example 3 | after call 4 | -------------------------------------------------------------------------------- /syllabus/manual.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/syllabus/manual.pdf -------------------------------------------------------------------------------- /syllabus/manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/syllabus/manual.png -------------------------------------------------------------------------------- /docs/binary/calcsize.out: -------------------------------------------------------------------------------- 1 | format '4s' needs 4 bytes 2 | format '3i4s5d' needs 56 bytes 3 | -------------------------------------------------------------------------------- /docs/concur/catch.out: -------------------------------------------------------------------------------- 1 | caught FirstException 2 | scheduler did not catch SecondException 3 | -------------------------------------------------------------------------------- /docs/layout/ex_padding.txt: -------------------------------------------------------------------------------- 1 | +------+ 2 | | | 3 | | text | 4 | | | 5 | +------+ 6 | -------------------------------------------------------------------------------- /docs/protocols/mock_object.out: -------------------------------------------------------------------------------- 1 | pass 4 2 | fail 0 3 | error 0 4 | adder(2, 3) is now 23 5 | -------------------------------------------------------------------------------- /docs/sdxpy-cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/sdxpy-cover.png -------------------------------------------------------------------------------- /docs/template/multiple_variables.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json multiple_variables.ht 2 | -------------------------------------------------------------------------------- /docs/test/ex_loop_globals_2.py: -------------------------------------------------------------------------------- 1 | name = None 2 | for name in globals(): 3 | print(name) 4 | -------------------------------------------------------------------------------- /src/concur/catch.out: -------------------------------------------------------------------------------- 1 | caught FirstException 2 | scheduler did not catch SecondException 3 | -------------------------------------------------------------------------------- /src/finale/derosa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/finale/derosa.jpg -------------------------------------------------------------------------------- /src/http/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | requests_example.out 3 | 4 | include ../../examples.mk 5 | -------------------------------------------------------------------------------- /src/layout/ex_padding.txt: -------------------------------------------------------------------------------- 1 | +------+ 2 | | | 3 | | text | 4 | | | 5 | +------+ 6 | -------------------------------------------------------------------------------- /src/lint/find_unused_variables.sh: -------------------------------------------------------------------------------- 1 | python find_unused_variables.py has_unused_variables.py 2 | -------------------------------------------------------------------------------- /src/perf/analysis.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/perf/analysis.pdf -------------------------------------------------------------------------------- /src/protocols/mock_object.out: -------------------------------------------------------------------------------- 1 | pass 4 2 | fail 0 3 | error 0 4 | adder(2, 3) is now 23 5 | -------------------------------------------------------------------------------- /src/query/example.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/query/example.db -------------------------------------------------------------------------------- /src/template/multiple_variables.sh: -------------------------------------------------------------------------------- 1 | python template.py vars.json multiple_variables.ht 2 | -------------------------------------------------------------------------------- /src/test/ex_loop_globals_2.py: -------------------------------------------------------------------------------- 1 | name = None 2 | for name in globals(): 3 | print(name) 4 | -------------------------------------------------------------------------------- /src/test/globals_plus.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | my_variable = 123 3 | pprint.pprint(globals()) 4 | -------------------------------------------------------------------------------- /docs/docgen/double_and_print.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | 4 | print(double(3)) 5 | -------------------------------------------------------------------------------- /docs/finale/derosa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/finale/derosa.jpg -------------------------------------------------------------------------------- /docs/lint/find_unused_variables.sh: -------------------------------------------------------------------------------- 1 | python find_unused_variables.py has_unused_variables.py 2 | -------------------------------------------------------------------------------- /docs/sdxpy-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/sdxpy-original.jpg -------------------------------------------------------------------------------- /docs/test/globals_plus.py: -------------------------------------------------------------------------------- 1 | import pprint 2 | my_variable = 123 3 | pprint.pprint(globals()) 4 | -------------------------------------------------------------------------------- /res/sdxpy-original.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/res/sdxpy-original.jpg -------------------------------------------------------------------------------- /src/build/topo_sort.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/build/topo_sort.pdf -------------------------------------------------------------------------------- /src/db/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | show_packed_records.out 3 | 4 | include ../../examples.mk 5 | -------------------------------------------------------------------------------- /src/docgen/double_and_print.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | 4 | print(double(3)) 5 | -------------------------------------------------------------------------------- /src/glob/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/glob/concept_map.pdf -------------------------------------------------------------------------------- /src/interp/doubling.out: -------------------------------------------------------------------------------- 1 | initial 1 2 | small 2 3 | small 4 4 | small 8 5 | large 16 6 | => None 7 | -------------------------------------------------------------------------------- /src/license/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "License" 3 | --- 4 | 5 | [% rootfile "LICENSE.md" %] 6 | -------------------------------------------------------------------------------- /src/oop/shapes_class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/oop/shapes_class.pdf -------------------------------------------------------------------------------- /src/oop/shapes_dict.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/oop/shapes_dict.pdf -------------------------------------------------------------------------------- /src/persist/shared.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/persist/shared.pdf -------------------------------------------------------------------------------- /src/test/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/test/concept_map.pdf -------------------------------------------------------------------------------- /syllabus/empirical.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/syllabus/empirical.pdf -------------------------------------------------------------------------------- /syllabus/empirical.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/syllabus/empirical.png -------------------------------------------------------------------------------- /docs/func/closure_list.out: -------------------------------------------------------------------------------- 1 | 1. [2, 6, 10] 2 | 2. [2, 6, 10] 3 | 3. [4, 8, 12] 4 | 4. [4, 8, 12, 16] 5 | -------------------------------------------------------------------------------- /docs/func/inner.out: -------------------------------------------------------------------------------- 1 | outer value is 10 2 | inner sum is 10 3 | inner sum is 11 4 | inner sum is 12 5 | -------------------------------------------------------------------------------- /docs/interp/doubling.out: -------------------------------------------------------------------------------- 1 | initial 1 2 | small 2 3 | small 4 4 | small 8 5 | large 16 6 | => None 7 | -------------------------------------------------------------------------------- /docs/intro/shell_sample.sh: -------------------------------------------------------------------------------- 1 | for filename in *.dat 2 | do 3 | cut -d , -f 10 $filename 4 | done 5 | -------------------------------------------------------------------------------- /docs/perf/timing.sh: -------------------------------------------------------------------------------- 1 | python timing.py 10x10 50x50 100x100 500x500 1000x1000 5000x5000 10000x10000 2 | -------------------------------------------------------------------------------- /docs/test/callable.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | pass 3 | 4 | print(callable(example), callable(len)) 5 | -------------------------------------------------------------------------------- /src/build/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/build/concept_map.pdf -------------------------------------------------------------------------------- /src/build/dependencies.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/build/dependencies.pdf -------------------------------------------------------------------------------- /src/dup/naive_dracula.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/dup/naive_dracula.pdf -------------------------------------------------------------------------------- /src/func/closure_list.out: -------------------------------------------------------------------------------- 1 | 1. [2, 6, 10] 2 | 2. [2, 6, 10] 3 | 3. [4, 8, 12] 4 | 4. [4, 8, 12, 16] 5 | -------------------------------------------------------------------------------- /src/func/inner.out: -------------------------------------------------------------------------------- 1 | outer value is 10 2 | inner sum is 10 3 | inner sum is 11 4 | inner sum is 12 5 | -------------------------------------------------------------------------------- /src/interp/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/interp/concept_map.pdf -------------------------------------------------------------------------------- /src/intro/shell_sample.sh: -------------------------------------------------------------------------------- 1 | for filename in *.dat 2 | do 3 | cut -d , -f 10 $filename 4 | done 5 | -------------------------------------------------------------------------------- /src/oop/inherit_class.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/oop/inherit_class.pdf -------------------------------------------------------------------------------- /src/pack/z3_setup.py: -------------------------------------------------------------------------------- 1 | from z3 import Bool 2 | 3 | A = Bool("A") 4 | B = Bool("B") 5 | C = Bool("C") 6 | -------------------------------------------------------------------------------- /src/parse/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/parse/concept_map.pdf -------------------------------------------------------------------------------- /src/perf/timing.sh: -------------------------------------------------------------------------------- 1 | python timing.py 10x10 50x50 100x100 500x500 1000x1000 5000x5000 10000x10000 2 | -------------------------------------------------------------------------------- /src/test/callable.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | pass 3 | 4 | print(callable(example), callable(len)) 5 | -------------------------------------------------------------------------------- /unused/flow/split_join.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/unused/flow/split_join.pdf -------------------------------------------------------------------------------- /docs/binary/pack_count.out: -------------------------------------------------------------------------------- 1 | b'\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00' 2 | b'hello' 3 | b'a lon' 4 | -------------------------------------------------------------------------------- /docs/lint/simple.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | 4 | result = double(3) 5 | print(result) 6 | -------------------------------------------------------------------------------- /docs/pack/z3_setup.py: -------------------------------------------------------------------------------- 1 | from z3 import Bool 2 | 3 | A = Bool("A") 4 | B = Bool("B") 5 | C = Bool("C") 6 | -------------------------------------------------------------------------------- /docs/template/conditional.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Should be shown.

    4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/template/single_constant.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    123

    4 | 5 | 6 | -------------------------------------------------------------------------------- /src/binary/pack_count.out: -------------------------------------------------------------------------------- 1 | b'\x01\x00\x00\x00\x02\x00\x00\x00\x03\x00\x00\x00' 2 | b'hello' 3 | b'a lon' 4 | -------------------------------------------------------------------------------- /src/cache/cache_methods.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/cache/cache_methods.pdf -------------------------------------------------------------------------------- /src/contrib/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Contributing" 3 | --- 4 | 5 | [% rootfile "CONTRIBUTING.md" %] 6 | -------------------------------------------------------------------------------- /src/dup/dup.out: -------------------------------------------------------------------------------- 1 | tests/a1.txt, tests/a2.txt, tests/a3.txt 2 | tests/b1.txt, tests/b2.txt 3 | tests/c1.txt 4 | -------------------------------------------------------------------------------- /src/intro/comprehension.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/intro/comprehension.pdf -------------------------------------------------------------------------------- /src/lint/simple.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | 4 | result = double(3) 5 | print(result) 6 | -------------------------------------------------------------------------------- /src/persist/concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/persist/concept_map.pdf -------------------------------------------------------------------------------- /src/template/conditional.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Should be shown.

    4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /src/template/single_constant.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    123

    4 | 5 | 6 | -------------------------------------------------------------------------------- /unused/flow/source_sink.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/unused/flow/source_sink.pdf -------------------------------------------------------------------------------- /docs/dup/dup.out: -------------------------------------------------------------------------------- 1 | tests/a1.txt, tests/a2.txt, tests/a3.txt 2 | tests/b1.txt, tests/b2.txt 3 | tests/c1.txt 4 | -------------------------------------------------------------------------------- /docs/lint/find_unused_variables.out: -------------------------------------------------------------------------------- 1 | unused in has_unused: distractor, not_used 2 | unused in global: not_used 3 | -------------------------------------------------------------------------------- /docs/observe/logging.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | [('D', []), ('B', ['D']), ('C', ['D']), ('A', ['B', 'C'])] 6 | -------------------------------------------------------------------------------- /docs/oop/shapes_original.out: -------------------------------------------------------------------------------- 1 | sq has perimeter 12.00 and area 9.00 2 | ci has perimeter 12.57 and area 12.57 3 | -------------------------------------------------------------------------------- /docs/query/select_all.out: -------------------------------------------------------------------------------- 1 | (14, 'Rupinder', 'Sangal') 2 | (18, 'Cheo', 'Liu') 3 | (31, 'Iskander', 'Purjant') 4 | -------------------------------------------------------------------------------- /docs/template/single_variable.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    varValue

    4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/viewer/make_lines.py: -------------------------------------------------------------------------------- 1 | from util import make_lines 2 | 3 | for line in make_lines(5): 4 | print(line) 5 | -------------------------------------------------------------------------------- /src/cache/cache_concept_map.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/cache/cache_concept_map.pdf -------------------------------------------------------------------------------- /src/conduct/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Code of Conduct" 3 | --- 4 | 5 | [% rootfile "CODE_OF_CONDUCT.md" %] 6 | -------------------------------------------------------------------------------- /src/docgen/unparse_modified.out: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | print(double(3)) 4 | print(double(3)) 5 | -------------------------------------------------------------------------------- /src/lint/find_unused_variables.out: -------------------------------------------------------------------------------- 1 | unused in has_unused: distractor, not_used 2 | unused in global: not_used 3 | -------------------------------------------------------------------------------- /src/observe/logging.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | [('D', []), ('B', ['D']), ('C', ['D']), ('A', ['B', 'C'])] 6 | -------------------------------------------------------------------------------- /src/oop/shapes_original.out: -------------------------------------------------------------------------------- 1 | sq has perimeter 12.00 and area 9.00 2 | ci has perimeter 12.57 and area 12.57 3 | -------------------------------------------------------------------------------- /src/query/select_all.out: -------------------------------------------------------------------------------- 1 | (14, 'Rupinder', 'Sangal') 2 | (18, 'Cheo', 'Liu') 3 | (31, 'Iskander', 'Purjant') 4 | -------------------------------------------------------------------------------- /src/template/single_variable.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    varValue

    4 | 5 | 6 | -------------------------------------------------------------------------------- /src/viewer/make_lines.py: -------------------------------------------------------------------------------- 1 | from util import make_lines 2 | 3 | for line in make_lines(5): 4 | print(line) 5 | -------------------------------------------------------------------------------- /docs/binary/pack_unpack.out: -------------------------------------------------------------------------------- 1 | binary representation: b'\x1f\x00\x00\x00A\x00\x00\x00' 2 | back to normal: (31, 65) 3 | -------------------------------------------------------------------------------- /docs/docgen/unparse_modified.out: -------------------------------------------------------------------------------- 1 | def double(x): 2 | return 2 * x 3 | print(double(3)) 4 | print(double(3)) 5 | -------------------------------------------------------------------------------- /docs/glob/fowler-refactoring.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/glob/fowler-refactoring.webp -------------------------------------------------------------------------------- /docs/intro/gvwilson-gage-2019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/intro/gvwilson-gage-2019.png -------------------------------------------------------------------------------- /docs/observe/push_origin.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | g 6 | f 7 | e 8 | failed as expected: Circular dependency! 9 | -------------------------------------------------------------------------------- /docs/template/static_text.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Static Text

    4 |

    test

    5 | 6 | 7 | -------------------------------------------------------------------------------- /src/binary/bit_mask.py: -------------------------------------------------------------------------------- 1 | mask = ~0x0100 # binary 1111 1110 1111 1111 2 | val = val & mask # clears this ^ bit 3 | -------------------------------------------------------------------------------- /src/binary/pack_unpack.out: -------------------------------------------------------------------------------- 1 | binary representation: b'\x1f\x00\x00\x00A\x00\x00\x00' 2 | back to normal: (31, 65) 3 | -------------------------------------------------------------------------------- /src/cache/cache_architecture.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/cache/cache_architecture.pdf -------------------------------------------------------------------------------- /src/dup/naive_dracula_unique.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/dup/naive_dracula_unique.pdf -------------------------------------------------------------------------------- /src/glob/fowler-refactoring.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/glob/fowler-refactoring.webp -------------------------------------------------------------------------------- /src/intro/gvwilson-gage-2019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/intro/gvwilson-gage-2019.png -------------------------------------------------------------------------------- /src/observe/push_origin.out: -------------------------------------------------------------------------------- 1 | D 2 | B 3 | C 4 | A 5 | g 6 | f 7 | e 8 | failed as expected: Circular dependency! 9 | -------------------------------------------------------------------------------- /src/template/single_constant.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 | 5 | 6 | -------------------------------------------------------------------------------- /src/template/static_text.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Static Text

    4 |

    test

    5 | 6 | 7 | -------------------------------------------------------------------------------- /docs/binary/bit_mask.py: -------------------------------------------------------------------------------- 1 | mask = ~0x0100 # binary 1111 1110 1111 1111 2 | val = val & mask # clears this ^ bit 3 | -------------------------------------------------------------------------------- /docs/binary/pack_unicode.out: -------------------------------------------------------------------------------- 1 | b'\x10\x00\x00\x00\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\x \ 2 | e3\x81\xaf!' 3 | -------------------------------------------------------------------------------- /docs/glob/gamma-design-patterns.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/glob/gamma-design-patterns.webp -------------------------------------------------------------------------------- /docs/perf/profile.sh: -------------------------------------------------------------------------------- 1 | python -m cProfile --sort=tottime \ 2 | timing.py --silent 10x10 50x50 100x100 500x500 1000x1000 3 | -------------------------------------------------------------------------------- /src/binary/pack_unicode.out: -------------------------------------------------------------------------------- 1 | b'\x10\x00\x00\x00\xe3\x81\x93\xe3\x82\x93\xe3\x81\xab\xe3\x81\xa1\x \ 2 | e3\x81\xaf!' 3 | -------------------------------------------------------------------------------- /src/glob/gamma-design-patterns.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/glob/gamma-design-patterns.webp -------------------------------------------------------------------------------- /src/interp/recursive_evaluation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/interp/recursive_evaluation.pdf -------------------------------------------------------------------------------- /src/perf/profile.sh: -------------------------------------------------------------------------------- 1 | python -m cProfile --sort=tottime \ 2 | timing.py --silent 10x10 50x50 100x100 500x500 1000x1000 3 | -------------------------------------------------------------------------------- /src/template/single_variable.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 | 5 | 6 | -------------------------------------------------------------------------------- /docs/dup/naive_hash.out: -------------------------------------------------------------------------------- 1 | 0 b'h' 2 | 6 b'ha' 3 | 4 b'has' 4 | 4 b'hash' 5 | 5 b'hashi' 6 | 11 b'hashin' 7 | 10 b'hashing' 8 | -------------------------------------------------------------------------------- /docs/vm/count_up.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 030102 3 | 00000a 4 | 010202 5 | 020006 6 | 010204 7 | 000207 8 | 020209 9 | 000001 10 | -------------------------------------------------------------------------------- /info/dedication.tex: -------------------------------------------------------------------------------- 1 | \dedication{ 2 | This one's for Mike and Jon: \\ 3 | I'm glad you always found time to chat. 4 | } 5 | -------------------------------------------------------------------------------- /src/dup/naive_hash.out: -------------------------------------------------------------------------------- 1 | 0 b'h' 2 | 6 b'ha' 3 | 4 b'has' 4 | 4 b'hash' 5 | 5 b'hashi' 6 | 11 b'hashin' 7 | 10 b'hashing' 8 | -------------------------------------------------------------------------------- /src/template/static_text.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Static Text

    4 |

    test

    5 | 6 | 7 | -------------------------------------------------------------------------------- /src/vm/count_up.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 030102 3 | 00000a 4 | 010202 5 | 020006 6 | 010204 7 | 000207 8 | 020209 9 | 000001 10 | -------------------------------------------------------------------------------- /docs/archive/hash_all.out: -------------------------------------------------------------------------------- 1 | filename,hash 2 | b.txt,3cf9a1a81f6bdeaf 3 | a.txt,17e682f060b5f8e4 4 | sub_dir/c.txt,5695d82a086b6779 5 | -------------------------------------------------------------------------------- /docs/bonus/func_dir.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | "Docstring for example." 3 | print("in example") 4 | 5 | print(dir(example)) 6 | -------------------------------------------------------------------------------- /docs/cache/exceptions.py: -------------------------------------------------------------------------------- 1 | class CacheException(Exception): 2 | def __init__(self, message): 3 | self.message = message 4 | -------------------------------------------------------------------------------- /docs/query/where.out: -------------------------------------------------------------------------------- 1 | select family, personal from Person where (family > 'S') 2 | {'family': 'Sangal', 'personal': 'Rupinder'} 3 | -------------------------------------------------------------------------------- /src/archive/hash_all.out: -------------------------------------------------------------------------------- 1 | filename,hash 2 | b.txt,3cf9a1a81f6bdeaf 3 | a.txt,17e682f060b5f8e4 4 | sub_dir/c.txt,5695d82a086b6779 5 | -------------------------------------------------------------------------------- /src/archive/sample_dir.out: -------------------------------------------------------------------------------- 1 | sample_dir 2 | |-- a.txt 3 | |-- b.txt 4 | `-- sub_dir 5 | `-- c.txt 6 | 7 | 1 directory, 3 files 8 | -------------------------------------------------------------------------------- /src/bonus/func_dir.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | "Docstring for example." 3 | print("in example") 4 | 5 | print(dir(example)) 6 | -------------------------------------------------------------------------------- /src/cache/exceptions.py: -------------------------------------------------------------------------------- 1 | class CacheException(Exception): 2 | def __init__(self, message): 3 | self.message = message 4 | -------------------------------------------------------------------------------- /src/query/where.out: -------------------------------------------------------------------------------- 1 | select family, personal from Person where (family > 'S') 2 | {'family': 'Sangal', 'personal': 'Rupinder'} 3 | -------------------------------------------------------------------------------- /bib/W2802954743.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.26496/bjz.2016.41", "year": 2020, "abstract": "This is a Short Note without an abstract."} -------------------------------------------------------------------------------- /docs/archive/sample_dir.out: -------------------------------------------------------------------------------- 1 | sample_dir 2 | |-- a.txt 3 | |-- b.txt 4 | `-- sub_dir 5 | `-- c.txt 6 | 7 | 1 directory, 3 files 8 | -------------------------------------------------------------------------------- /unused/flow/verbs/example.py: -------------------------------------------------------------------------------- 1 | class Example: 2 | def __init__(self, name): 3 | self._name = name 4 | 5 | export = Example 6 | -------------------------------------------------------------------------------- /docs/bonus/with_name.out: -------------------------------------------------------------------------------- 1 | test_sign_negative passed 2 | test_sign_positive passed 3 | test_sign_zero failed 4 | test_sign_error had error 5 | -------------------------------------------------------------------------------- /docs/build/double_linear_dep.json: -------------------------------------------------------------------------------- 1 | { 2 | "A": {"depends": ["B"], "rule": "build A"}, 3 | "B": {"depends": [], "rule": "build B"} 4 | } 5 | -------------------------------------------------------------------------------- /docs/dup/grouped.out: -------------------------------------------------------------------------------- 1 | tests/a2.txt tests/a1.txt 2 | tests/a3.txt tests/a1.txt 3 | tests/a3.txt tests/a2.txt 4 | tests/b1.txt tests/b2.txt 5 | -------------------------------------------------------------------------------- /docs/persist/attr.out: -------------------------------------------------------------------------------- 1 | ex has missing False 2 | ex has label True with value thing 3 | ex has get_size True 4 | result of calling method 5 5 | -------------------------------------------------------------------------------- /src/bonus/with_name.out: -------------------------------------------------------------------------------- 1 | test_sign_negative passed 2 | test_sign_positive passed 3 | test_sign_zero failed 4 | test_sign_error had error 5 | -------------------------------------------------------------------------------- /src/build/double_linear_dep.json: -------------------------------------------------------------------------------- 1 | { 2 | "A": {"depends": ["B"], "rule": "build A"}, 3 | "B": {"depends": [], "rule": "build B"} 4 | } 5 | -------------------------------------------------------------------------------- /src/dup/grouped.out: -------------------------------------------------------------------------------- 1 | tests/a2.txt tests/a1.txt 2 | tests/a3.txt tests/a1.txt 3 | tests/a3.txt tests/a2.txt 4 | tests/b1.txt tests/b2.txt 5 | -------------------------------------------------------------------------------- /src/persist/attr.out: -------------------------------------------------------------------------------- 1 | ex has missing False 2 | ex has label True with value thing 3 | ex has get_size True 4 | result of calling method 5 5 | -------------------------------------------------------------------------------- /docs/check/catalog.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | em: 3 | h1: 4 | head: title 5 | html: body, head 6 | li: em 7 | p: 8 | title: 9 | ul: li 10 | -------------------------------------------------------------------------------- /docs/check/contains.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | em: 3 | h1: 4 | head: title 5 | html: body, head 6 | li: em 7 | p: 8 | title: 9 | ul: li 10 | -------------------------------------------------------------------------------- /docs/glob/kerievsky-refactoring-to-patterns.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/docs/glob/kerievsky-refactoring-to-patterns.webp -------------------------------------------------------------------------------- /docs/http/http_request_headers.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.1 2 | Accept: text/html 3 | Accept-Language: en, fr 4 | If-Modified-Since: 16-May-2023 5 | -------------------------------------------------------------------------------- /docs/interp/add_example.py: -------------------------------------------------------------------------------- 1 | ["add", 1, 2] # 1 + 2 2 | ["abs", -3.5] # abs(-3.5) 3 | ["add", ["abs", -5], 9] # abs(-5) + 9 4 | -------------------------------------------------------------------------------- /docs/observe/push_buggy.py: -------------------------------------------------------------------------------- 1 | from push_simple import Node 2 | 3 | a = Node("A") 4 | b = Node("B") 5 | a.watch(b) 6 | b.watch(a) 7 | a.notify() 8 | -------------------------------------------------------------------------------- /docs/persist/save_aliasing.out: -------------------------------------------------------------------------------- 1 | list:4539747200:2 2 | alias:4539747200: 3 | list:4539552960:2 4 | str:4539552048:1 5 | word 6 | alias:4539552048: 7 | -------------------------------------------------------------------------------- /docs/vm/halt.out: -------------------------------------------------------------------------------- 1 | R000000 = 000000 2 | R000001 = 000000 3 | R000002 = 000000 4 | R000003 = 000000 5 | 000000: 000001 000000 000000 000000 6 | -------------------------------------------------------------------------------- /lib/mccole/bin/convert_drawio.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | if grep -q draw.io $1 3 | then 4 | draw.io --export --crop --output $2 $1 5 | fi 6 | -------------------------------------------------------------------------------- /src/check/catalog.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | em: 3 | h1: 4 | head: title 5 | html: body, head 6 | li: em 7 | p: 8 | title: 9 | ul: li 10 | -------------------------------------------------------------------------------- /src/check/contains.out: -------------------------------------------------------------------------------- 1 | body: h1, p, ul 2 | em: 3 | h1: 4 | head: title 5 | html: body, head 6 | li: em 7 | p: 8 | title: 9 | ul: li 10 | -------------------------------------------------------------------------------- /src/glob/kerievsky-refactoring-to-patterns.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/gvwilson/sdxpy/HEAD/src/glob/kerievsky-refactoring-to-patterns.webp -------------------------------------------------------------------------------- /src/http/http_request_headers.txt: -------------------------------------------------------------------------------- 1 | GET /index.html HTTP/1.1 2 | Accept: text/html 3 | Accept-Language: en, fr 4 | If-Modified-Since: 16-May-2023 5 | -------------------------------------------------------------------------------- /src/interp/add_example.py: -------------------------------------------------------------------------------- 1 | ["add", 1, 2] # 1 + 2 2 | ["abs", -3.5] # abs(-3.5) 3 | ["add", ["abs", -5], 9] # abs(-5) + 9 4 | -------------------------------------------------------------------------------- /src/observe/push_buggy.py: -------------------------------------------------------------------------------- 1 | from push_simple import Node 2 | 3 | a = Node("A") 4 | b = Node("B") 5 | a.watch(b) 6 | b.watch(a) 7 | a.notify() 8 | -------------------------------------------------------------------------------- /src/persist/save_aliasing.out: -------------------------------------------------------------------------------- 1 | list:4539747200:2 2 | alias:4539747200: 3 | list:4539552960:2 4 | str:4539552048:1 5 | word 6 | alias:4539552048: 7 | -------------------------------------------------------------------------------- /src/viewer/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | call_example.out \ 3 | make_lines.out 4 | 5 | include ../../examples.mk 6 | 7 | make_lines.out: util.py 8 | -------------------------------------------------------------------------------- /src/vm/halt.out: -------------------------------------------------------------------------------- 1 | R000000 = 000000 2 | R000001 = 000000 3 | R000002 = 000000 4 | R000003 = 000000 5 | 000000: 000001 000000 000000 000000 6 | -------------------------------------------------------------------------------- /docs/check/attrs.out: -------------------------------------------------------------------------------- 1 | node: [document] {} 2 | node: html {'lang': 'en'} 3 | node: body {'class': ['outline', 'narrow']} 4 | node: p {'align': 'right'} 5 | -------------------------------------------------------------------------------- /docs/lint/double.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | result = 2 * x 3 | return result 4 | 5 | 6 | value = 3 7 | result = double(value) 8 | print(result) 9 | -------------------------------------------------------------------------------- /docs/template/multiple_variables.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    firstValue

    4 |

    secondValue

    5 | 6 | 7 | -------------------------------------------------------------------------------- /src/archive/test_backup_manual.sh: -------------------------------------------------------------------------------- 1 | BACKUPS=/tmp/backups 2 | rm -rf $BACKUPS 3 | python backup.py sample_dir $BACKUPS 4 | tree --charset ascii $BACKUPS 5 | -------------------------------------------------------------------------------- /src/check/attrs.out: -------------------------------------------------------------------------------- 1 | node: [document] {} 2 | node: html {'lang': 'en'} 3 | node: body {'class': ['outline', 'narrow']} 4 | node: p {'align': 'right'} 5 | -------------------------------------------------------------------------------- /src/lint/double.py: -------------------------------------------------------------------------------- 1 | def double(x): 2 | result = 2 * x 3 | return result 4 | 5 | 6 | value = 3 7 | result = double(value) 8 | print(result) 9 | -------------------------------------------------------------------------------- /src/template/multiple_variables.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    firstValue

    4 |

    secondValue

    5 | 6 | 7 | -------------------------------------------------------------------------------- /src/vm/fill_array.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 030102 3 | 0b0202 4 | 020005 5 | 010302 6 | 030006 7 | 030206 8 | 010304 9 | 000307 10 | 030309 11 | 000001 12 | -------------------------------------------------------------------------------- /docs/archive/test_backup_manual.sh: -------------------------------------------------------------------------------- 1 | BACKUPS=/tmp/backups 2 | rm -rf $BACKUPS 3 | python backup.py sample_dir $BACKUPS 4 | tree --charset ascii $BACKUPS 5 | -------------------------------------------------------------------------------- /docs/binary/pack_unicode.py: -------------------------------------------------------------------------------- 1 | from variable_packing import pack_string 2 | # [main] 3 | result = pack_string("こんにちは!") 4 | print(repr(result)) 5 | # [/main] 6 | -------------------------------------------------------------------------------- /docs/interp/vars.tll: -------------------------------------------------------------------------------- 1 | [ 2 | "seq", 3 | ["set", "alpha", 1], 4 | ["set", "beta", 2], 5 | ["add", ["get", "alpha"], ["get", "beta"]] 6 | ] 7 | -------------------------------------------------------------------------------- /docs/vm/fill_array.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 030102 3 | 0b0202 4 | 020005 5 | 010302 6 | 030006 7 | 030206 8 | 010304 9 | 000307 10 | 030309 11 | 000001 12 | -------------------------------------------------------------------------------- /docs/vm/print_r1.out: -------------------------------------------------------------------------------- 1 | >> 0 2 | R000000 = 000000 3 | R000001 = 000000 4 | R000002 = 000000 5 | R000003 = 000000 6 | 000000: 00010a 000001 000000 000000 7 | -------------------------------------------------------------------------------- /lib/mccole/requirements.txt: -------------------------------------------------------------------------------- 1 | ark 2 | beautifulsoup4 3 | html5validator 4 | pybtex 5 | pymdown-extensions 6 | python-frontmatter 7 | ruff 8 | setuptools 9 | -------------------------------------------------------------------------------- /src/binary/pack_unicode.py: -------------------------------------------------------------------------------- 1 | from variable_packing import pack_string 2 | # [main] 3 | result = pack_string("こんにちは!") 4 | print(repr(result)) 5 | # [/main] 6 | -------------------------------------------------------------------------------- /src/interp/vars.tll: -------------------------------------------------------------------------------- 1 | [ 2 | "seq", 3 | ["set", "alpha", 1], 4 | ["set", "beta", 2], 5 | ["add", ["get", "alpha"], ["get", "beta"]] 6 | ] 7 | -------------------------------------------------------------------------------- /src/template/loop.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 |
    • 5 |
    6 | 7 | 8 | -------------------------------------------------------------------------------- /src/vm/print_r1.out: -------------------------------------------------------------------------------- 1 | >> 0 2 | R000000 = 000000 3 | R000001 = 000000 4 | R000002 = 000000 5 | R000003 = 000000 6 | 000000: 00010a 000001 000000 000000 7 | -------------------------------------------------------------------------------- /docs/binary/calcsize.py: -------------------------------------------------------------------------------- 1 | from struct import calcsize 2 | 3 | for format in ["4s", "3i4s5d"]: 4 | print(f"format '{format}' needs {calcsize(format)} bytes") 5 | -------------------------------------------------------------------------------- /docs/debugger/fill_array.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 040102 3 | 0b0202 4 | 020005 5 | 010302 6 | 030006 7 | 030206 8 | 010304 9 | 000307 10 | 030309 11 | 000001 12 | -------------------------------------------------------------------------------- /docs/docgen/add_double.py: -------------------------------------------------------------------------------- 1 | def add(left, right): 2 | return left + right 3 | 4 | def double(x): 5 | return add(x, x) 6 | 7 | add(1, 2) 8 | double(3) 9 | -------------------------------------------------------------------------------- /docs/pack/incremental.out: -------------------------------------------------------------------------------- 1 | count 11 2 | [('A', '3'), ('B', '3'), ('C', '2')] 3 | [('A', '2'), ('B', '2'), ('C', '1')] 4 | [('A', '1'), ('B', '1'), ('C', '1')] 5 | -------------------------------------------------------------------------------- /docs/test/signature.py: -------------------------------------------------------------------------------- 1 | def zero(): 2 | print("zero") 3 | 4 | def one(value): 5 | print("one", value) 6 | 7 | for func in [zero, one]: 8 | func() 9 | -------------------------------------------------------------------------------- /src/binary/calcsize.py: -------------------------------------------------------------------------------- 1 | from struct import calcsize 2 | 3 | for format in ["4s", "3i4s5d"]: 4 | print(f"format '{format}' needs {calcsize(format)} bytes") 5 | -------------------------------------------------------------------------------- /src/check/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | attrs.out \ 3 | catalog.out \ 4 | check.out \ 5 | contains.out \ 6 | parse.out 7 | 8 | include ../../examples.mk 9 | -------------------------------------------------------------------------------- /src/db/show_packed_records.py: -------------------------------------------------------------------------------- 1 | from record import Experiment 2 | 3 | ex = Experiment("abcdef", 12345, [6, 7]) 4 | print(Experiment.pack(ex).replace('\0', '.')) 5 | -------------------------------------------------------------------------------- /src/debugger/fill_array.mx: -------------------------------------------------------------------------------- 1 | 000002 2 | 040102 3 | 0b0202 4 | 020005 5 | 010302 6 | 030006 7 | 030206 8 | 010304 9 | 000307 10 | 030309 11 | 000001 12 | -------------------------------------------------------------------------------- /src/docgen/add_double.py: -------------------------------------------------------------------------------- 1 | def add(left, right): 2 | return left + right 3 | 4 | def double(x): 5 | return add(x, x) 6 | 7 | add(1, 2) 8 | double(3) 9 | -------------------------------------------------------------------------------- /src/pack/incremental.out: -------------------------------------------------------------------------------- 1 | count 11 2 | [('A', '3'), ('B', '3'), ('C', '2')] 3 | [('A', '2'), ('B', '2'), ('C', '1')] 4 | [('A', '1'), ('B', '1'), ('C', '1')] 5 | -------------------------------------------------------------------------------- /src/test/signature.py: -------------------------------------------------------------------------------- 1 | def zero(): 2 | print("zero") 3 | 4 | def one(value): 5 | print("one", value) 6 | 7 | for func in [zero, one]: 8 | func() 9 | -------------------------------------------------------------------------------- /bib/W4313023388.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1079/cabicompendium.121605", "year": 2022, "abstract": "This datasheet on Succinea chittenangoensis covers Identity."} -------------------------------------------------------------------------------- /docs/db/show_packed_records.py: -------------------------------------------------------------------------------- 1 | from record import Experiment 2 | 3 | ex = Experiment("abcdef", 12345, [6, 7]) 4 | print(Experiment.pack(ex).replace('\0', '.')) 5 | -------------------------------------------------------------------------------- /docs/http/basic_server.out: -------------------------------------------------------------------------------- 1 | 127.0.0.1 - - [16/Sep/2022 06:34:59] "GET / HTTP/1.1" 200 - 2 | 127.0.0.1 - - [16/Sep/2022 06:35:00] "GET /favicon.ico HTTP/1.1" 200 - 3 | -------------------------------------------------------------------------------- /docs/lint/has_duplicate_keys.py: -------------------------------------------------------------------------------- 1 | has_duplicates = { 2 | "third": 3, 3 | "fourth": 4, 4 | "fourth": 5, 5 | "third": 6 6 | } 7 | print(has_duplicates) 8 | -------------------------------------------------------------------------------- /docs/oop/func_obj.py: -------------------------------------------------------------------------------- 1 | # [def] 2 | def example(): 3 | print("in example") 4 | # [/def] 5 | 6 | # [alias] 7 | alias = example 8 | alias() 9 | # [/alias] 10 | -------------------------------------------------------------------------------- /docs/pack/incremental_reverse.out: -------------------------------------------------------------------------------- 1 | count 9 2 | [('C', '2'), ('B', '3'), ('A', '3')] 3 | [('C', '1'), ('B', '2'), ('A', '2')] 4 | [('C', '1'), ('B', '1'), ('A', '1')] 5 | -------------------------------------------------------------------------------- /src/http/basic_server.out: -------------------------------------------------------------------------------- 1 | 127.0.0.1 - - [16/Sep/2022 06:34:59] "GET / HTTP/1.1" 200 - 2 | 127.0.0.1 - - [16/Sep/2022 06:35:00] "GET /favicon.ico HTTP/1.1" 200 - 3 | -------------------------------------------------------------------------------- /src/lint/has_duplicate_keys.py: -------------------------------------------------------------------------------- 1 | has_duplicates = { 2 | "third": 3, 3 | "fourth": 4, 4 | "fourth": 5, 5 | "third": 6 6 | } 7 | print(has_duplicates) 8 | -------------------------------------------------------------------------------- /src/oop/func_obj.py: -------------------------------------------------------------------------------- 1 | # [def] 2 | def example(): 3 | print("in example") 4 | # [/def] 5 | 6 | # [alias] 7 | alias = example 8 | alias() 9 | # [/alias] 10 | -------------------------------------------------------------------------------- /src/pack/incremental_reverse.out: -------------------------------------------------------------------------------- 1 | count 9 2 | [('C', '2'), ('B', '3'), ('A', '3')] 3 | [('C', '1'), ('B', '2'), ('A', '2')] 4 | [('C', '1'), ('B', '1'), ('A', '1')] 5 | -------------------------------------------------------------------------------- /src/query/delay_columns.out: -------------------------------------------------------------------------------- 1 | {'family': 'Sangal', 'personal': 'Rupinder'} 2 | {'family': 'Liu', 'personal': 'Cheo'} 3 | {'family': 'Purjant', 'personal': 'Iskander'} 4 | -------------------------------------------------------------------------------- /src/template/ex_yaml_header.ht: -------------------------------------------------------------------------------- 1 | --- 2 | name: "Dorothy Johnson Vaughan" 3 | --- 4 | 5 | 6 |

    7 | 8 | 9 | -------------------------------------------------------------------------------- /src/template/multiple_variables.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    4 |

    5 | 6 | 7 | -------------------------------------------------------------------------------- /bib/W4324367414.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1016/j.heliyon.2023.e14523", "year": 2023, "abstract": "[This corrects the article DOI: 10.1016/j.heliyon.2022.e12405.]."} -------------------------------------------------------------------------------- /docs/check/manifest.yml: -------------------------------------------------------------------------------- 1 | body: 2 | - section 3 | head: 4 | - title 5 | html: 6 | - body 7 | - head 8 | section: 9 | - h1 10 | - p 11 | - ul 12 | ul: 13 | - li 14 | -------------------------------------------------------------------------------- /docs/docgen/inject_make.out: -------------------------------------------------------------------------------- 1 | Expr( 2 | value=Call( 3 | func=Name(id='count', ctx=Load()), 4 | args=[ 5 | Constant(value='test')], 6 | keywords=[])) 7 | -------------------------------------------------------------------------------- /docs/interp/ex_assign_expr.py: -------------------------------------------------------------------------------- 1 | # not actually legal Python 2 | result = 3 | if a > 0: 4 | 1 5 | elif a == 0: 6 | 0 7 | else: 8 | -1 9 | -------------------------------------------------------------------------------- /docs/query/delay_columns.out: -------------------------------------------------------------------------------- 1 | {'family': 'Sangal', 'personal': 'Rupinder'} 2 | {'family': 'Liu', 'personal': 'Cheo'} 3 | {'family': 'Purjant', 'personal': 'Iskander'} 4 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | -r lib/mccole/requirements.txt 2 | greenlet 3 | kaleido 4 | pandas 5 | plotly 6 | pydot 7 | pyfakefs 8 | pytest 9 | requests 10 | z3-solver 11 | -------------------------------------------------------------------------------- /src/check/manifest.yml: -------------------------------------------------------------------------------- 1 | body: 2 | - section 3 | head: 4 | - title 5 | html: 6 | - body 7 | - head 8 | section: 9 | - h1 10 | - p 11 | - ul 12 | ul: 13 | - li 14 | -------------------------------------------------------------------------------- /src/docgen/inject_make.out: -------------------------------------------------------------------------------- 1 | Expr( 2 | value=Call( 3 | func=Name(id='count', ctx=Load()), 4 | args=[ 5 | Constant(value='test')], 6 | keywords=[])) 7 | -------------------------------------------------------------------------------- /src/interp/ex_assign_expr.py: -------------------------------------------------------------------------------- 1 | # not actually legal Python 2 | result = 3 | if a > 0: 4 | 1 5 | elif a == 0: 6 | 0 7 | else: 8 | -1 9 | -------------------------------------------------------------------------------- /docs/pack/manual.out: -------------------------------------------------------------------------------- 1 | 18 possibilities 2 | 3 allowed 3 | [('A', '3'), ('B', '3'), ('C', '2')] 4 | [('A', '2'), ('B', '2'), ('C', '1')] 5 | [('A', '1'), ('B', '1'), ('C', '1')] 6 | -------------------------------------------------------------------------------- /docs/pack/z3_triple.out: -------------------------------------------------------------------------------- 1 | result sat [B.3 = True, 2 | A.1 = False, 3 | C.2 = True, 4 | C.1 = False, 5 | B.2 = False, 6 | A.3 = True, 7 | A.2 = False, 8 | B.1 = False] 9 | -------------------------------------------------------------------------------- /docs/test/locals.out: -------------------------------------------------------------------------------- 1 | start: {'low': 1, 'high': 3} 2 | loop 1: {'low': 1, 'high': 3, 'i': 1} 3 | loop 2: {'low': 1, 'high': 3, 'i': 2} 4 | end: {'low': 1, 'high': 3, 'i': 2} 5 | -------------------------------------------------------------------------------- /src/bonus/attribute.out: -------------------------------------------------------------------------------- 1 | skip: test_sign_negative 2 | pass: test_sign_positive 3 | pass (expected failure): test_sign_zero 4 | error: test_sign_error name 'sgn' is not defined 5 | -------------------------------------------------------------------------------- /src/pack/manual.out: -------------------------------------------------------------------------------- 1 | 18 possibilities 2 | 3 allowed 3 | [('A', '3'), ('B', '3'), ('C', '2')] 4 | [('A', '2'), ('B', '2'), ('C', '1')] 5 | [('A', '1'), ('B', '1'), ('C', '1')] 6 | -------------------------------------------------------------------------------- /src/pack/z3_triple.out: -------------------------------------------------------------------------------- 1 | result sat [B.3 = True, 2 | A.1 = False, 3 | C.2 = True, 4 | C.1 = False, 5 | B.2 = False, 6 | A.3 = True, 7 | A.2 = False, 8 | B.1 = False] 9 | -------------------------------------------------------------------------------- /src/persist/save_builtin.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from builtin import save 3 | 4 | # [save] 5 | save(sys.stdout, [False, 3.14, "hello", {"left": 1, "right": [2, 3]}]) 6 | # [/save] 7 | -------------------------------------------------------------------------------- /src/template/conditional.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |

    Should be shown.

    4 |

    Should not be shown.

    5 | 6 | 7 | -------------------------------------------------------------------------------- /src/test/locals.out: -------------------------------------------------------------------------------- 1 | start: {'low': 1, 'high': 3} 2 | loop 1: {'low': 1, 'high': 3, 'i': 1} 3 | loop 2: {'low': 1, 'high': 3, 'i': 2} 4 | end: {'low': 1, 'high': 3, 'i': 2} 5 | -------------------------------------------------------------------------------- /docs/bonus/attribute.out: -------------------------------------------------------------------------------- 1 | skip: test_sign_negative 2 | pass: test_sign_positive 3 | pass (expected failure): test_sign_zero 4 | error: test_sign_error name 'sgn' is not defined 5 | -------------------------------------------------------------------------------- /docs/pack/exhaustive.out: -------------------------------------------------------------------------------- 1 | 18 possibilities 2 | 3 allowed 3 | (('A', '3'), ('B', '3'), ('C', '2')) 4 | (('A', '2'), ('B', '2'), ('C', '1')) 5 | (('A', '1'), ('B', '1'), ('C', '1')) 6 | -------------------------------------------------------------------------------- /docs/persist/save_builtin.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from builtin import save 3 | 4 | # [save] 5 | save(sys.stdout, [False, 3.14, "hello", {"left": 1, "right": [2, 3]}]) 6 | # [/save] 7 | -------------------------------------------------------------------------------- /lib/mccole/bin/run_profile.py: -------------------------------------------------------------------------------- 1 | import cProfile 2 | import sys 3 | 4 | import ark # noqa: F401 5 | 6 | sys.argv = ["ark", "build"] 7 | cProfile.run("ark.main()", sort="tottime") 8 | -------------------------------------------------------------------------------- /src/observe/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | delay_queue.out \ 3 | logging.out \ 4 | push_origin.out \ 5 | push_queue.out \ 6 | push_simple.out 7 | 8 | include ../../examples.mk 9 | -------------------------------------------------------------------------------- /src/pack/exhaustive.out: -------------------------------------------------------------------------------- 1 | 18 possibilities 2 | 3 allowed 3 | (('A', '3'), ('B', '3'), ('C', '2')) 4 | (('A', '2'), ('B', '2'), ('C', '1')) 5 | (('A', '1'), ('B', '1'), ('C', '1')) 6 | -------------------------------------------------------------------------------- /src/query/insert.out: -------------------------------------------------------------------------------- 1 | insert into Person(ident, personal, family) values(55, 'Terese', 'DiOrio') 2 | 14|Rupinder|Sangal 3 | 18|Cheo|Liu 4 | 31|Iskander|Purjant 5 | 55|Terese|DiOrio 6 | -------------------------------------------------------------------------------- /docs/query/aggregate.out: -------------------------------------------------------------------------------- 1 | select min(personal) from Person 2 | {'min(personal)': 'Cheo'} 3 | select min(personal), family from Person 4 | {'min(personal)': 'Cheo', 'family': 'Liu'} 5 | -------------------------------------------------------------------------------- /docs/query/insert.out: -------------------------------------------------------------------------------- 1 | insert into Person(ident, personal, family) values(55, 'Terese', 'DiOrio') 2 | 14|Rupinder|Sangal 3 | 18|Cheo|Liu 4 | 31|Iskander|Purjant 5 | 55|Terese|DiOrio 6 | -------------------------------------------------------------------------------- /docs/search/W962796421.json: -------------------------------------------------------------------------------- 1 | { 2 | "doi": "https://doi.org/10.1007/978-94-009-0343-2_40", 3 | "year": 1996, 4 | "abstract": "Helicid snails are suitable organisms…" 5 | } 6 | -------------------------------------------------------------------------------- /docs/viewer/first_curses.py: -------------------------------------------------------------------------------- 1 | import curses 2 | 3 | def main(stdscr): 4 | while True: 5 | stdscr.getkey() 6 | 7 | if __name__ == "__main__": 8 | curses.wrapper(main) 9 | -------------------------------------------------------------------------------- /src/build/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | double_linear_dep.out 3 | 4 | include ../../examples.mk 5 | 6 | double_linear_dep.out: double_linear_dep.sh build_simple.py double_linear_dep.json 7 | -------------------------------------------------------------------------------- /src/query/aggregate.out: -------------------------------------------------------------------------------- 1 | select min(personal) from Person 2 | {'min(personal)': 'Cheo'} 3 | select min(personal), family from Person 4 | {'min(personal)': 'Cheo', 'family': 'Liu'} 5 | -------------------------------------------------------------------------------- /src/search/W962796421.json: -------------------------------------------------------------------------------- 1 | { 2 | "doi": "https://doi.org/10.1007/978-94-009-0343-2_40", 3 | "year": 1996, 4 | "abstract": "Helicid snails are suitable organisms…" 5 | } 6 | -------------------------------------------------------------------------------- /src/viewer/first_curses.py: -------------------------------------------------------------------------------- 1 | import curses 2 | 3 | def main(stdscr): 4 | while True: 5 | stdscr.getkey() 6 | 7 | if __name__ == "__main__": 8 | curses.wrapper(main) 9 | -------------------------------------------------------------------------------- /docs/binary/pack_count.py: -------------------------------------------------------------------------------- 1 | from struct import pack 2 | 3 | print(pack("3i", 1, 2, 3)) 4 | print(pack("5s", bytes("hello", "utf-8"))) 5 | print(pack("5s", bytes("a longer string", "utf-8"))) 6 | -------------------------------------------------------------------------------- /docs/func/adder.py: -------------------------------------------------------------------------------- 1 | def make_adder(to_add): 2 | def _inner(value): 3 | return value + to_add 4 | return _inner 5 | 6 | adder_func = make_adder(100) 7 | print(adder_func(1)) 8 | -------------------------------------------------------------------------------- /docs/protocols/ex_timer.py: -------------------------------------------------------------------------------- 1 | # your class goes here 2 | 3 | with Timer() as start: 4 | # …do some lengthy operation… 5 | print(start.elapsed()) # time since the start of the block 6 | -------------------------------------------------------------------------------- /src/archive/test_backup_manual.out: -------------------------------------------------------------------------------- 1 | /tmp/backups 2 | |-- 1695482691.csv 3 | |-- 17e682f060b5f8e4.bck 4 | |-- 3cf9a1a81f6bdeaf.bck 5 | `-- 5695d82a086b6779.bck 6 | 7 | 0 directories, 4 files 8 | -------------------------------------------------------------------------------- /src/binary/pack_count.py: -------------------------------------------------------------------------------- 1 | from struct import pack 2 | 3 | print(pack("3i", 1, 2, 3)) 4 | print(pack("5s", bytes("hello", "utf-8"))) 5 | print(pack("5s", bytes("a longer string", "utf-8"))) 6 | -------------------------------------------------------------------------------- /src/func/adder.py: -------------------------------------------------------------------------------- 1 | def make_adder(to_add): 2 | def _inner(value): 3 | return value + to_add 4 | return _inner 5 | 6 | adder_func = make_adder(100) 7 | print(adder_func(1)) 8 | -------------------------------------------------------------------------------- /src/protocols/ex_timer.py: -------------------------------------------------------------------------------- 1 | # your class goes here 2 | 3 | with Timer() as start: 4 | # …do some lengthy operation… 5 | print(start.elapsed()) # time since the start of the block 6 | -------------------------------------------------------------------------------- /docs/archive/test_backup_manual.out: -------------------------------------------------------------------------------- 1 | /tmp/backups 2 | |-- 1695482691.csv 3 | |-- 17e682f060b5f8e4.bck 4 | |-- 3cf9a1a81f6bdeaf.bck 5 | `-- 5695d82a086b6779.bck 6 | 7 | 0 directories, 4 files 8 | -------------------------------------------------------------------------------- /docs/bonus/docstring.out: -------------------------------------------------------------------------------- 1 | skip: test_sign_negative 2 | pass: test_sign_positive 3 | pass (expected failure): test_sign_zero 4 | error: test_sign_error/Expect an error. name 'sgn' is not defined 5 | -------------------------------------------------------------------------------- /docs/ftp/client_chunk.out: -------------------------------------------------------------------------------- 1 | client sending 1236 bytes 2 | ...client sent 1236 bytes 3 | ...client total now 1236 bytes 4 | client main sent 1236 bytes 5 | client main received 1236 bytes 6 | True 7 | -------------------------------------------------------------------------------- /docs/ftp/server_chunk.out: -------------------------------------------------------------------------------- 1 | server about to start receiving 2 | ...server received 1024 bytes 3 | ...server received 212 bytes 4 | ...server breaking 5 | server finished received, about to reply 6 | -------------------------------------------------------------------------------- /docs/persist/save_builtin.out: -------------------------------------------------------------------------------- 1 | list:4 2 | bool:False 3 | float:3.14 4 | str:1 5 | hello 6 | dict:2 7 | str:1 8 | left 9 | int:1 10 | str:1 11 | right 12 | list:2 13 | int:2 14 | int:3 15 | -------------------------------------------------------------------------------- /src/bonus/docstring.out: -------------------------------------------------------------------------------- 1 | skip: test_sign_negative 2 | pass: test_sign_positive 3 | pass (expected failure): test_sign_zero 4 | error: test_sign_error/Expect an error. name 'sgn' is not defined 5 | -------------------------------------------------------------------------------- /src/ftp/client_chunk.out: -------------------------------------------------------------------------------- 1 | client sending 1236 bytes 2 | ...client sent 1236 bytes 3 | ...client total now 1236 bytes 4 | client main sent 1236 bytes 5 | client main received 1236 bytes 6 | True 7 | -------------------------------------------------------------------------------- /src/ftp/server_chunk.out: -------------------------------------------------------------------------------- 1 | server about to start receiving 2 | ...server received 1024 bytes 3 | ...server received 212 bytes 4 | ...server breaking 5 | server finished received, about to reply 6 | -------------------------------------------------------------------------------- /src/persist/save_builtin.out: -------------------------------------------------------------------------------- 1 | list:4 2 | bool:False 3 | float:3.14 4 | str:1 5 | hello 6 | dict:2 7 | str:1 8 | left 9 | int:1 10 | str:1 11 | right 12 | list:2 13 | int:2 14 | int:3 15 | -------------------------------------------------------------------------------- /bib/W2014657108.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1038/hdy.1951.8", "year": 1951, "abstract": "Fluctuations in the selective value of certain phenotypes in the polymorphic land snail Cepaea nemoraus (L.)"} -------------------------------------------------------------------------------- /bib/W2068553908.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.016.002", "year": 2009, "abstract": "1. Bolewski A., Parachoniak W. 1974. Petrografia. Wydawnictwa Geologiczne, Warszawa. Google Scholar"} -------------------------------------------------------------------------------- /docs/func/closure.py: -------------------------------------------------------------------------------- 1 | def make_hidden(thing): 2 | def _inner(): 3 | return thing 4 | return _inner 5 | 6 | has_secret = make_hidden(1 + 2) 7 | print("hidden thing is", has_secret()) 8 | -------------------------------------------------------------------------------- /docs/lint/dump_ast.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import sys 3 | 4 | with open(sys.argv[1], "r") as reader: 5 | source = reader.read() 6 | 7 | tree = ast.parse(source) 8 | print(ast.dump(tree, indent=4)) 9 | -------------------------------------------------------------------------------- /src/func/closure.py: -------------------------------------------------------------------------------- 1 | def make_hidden(thing): 2 | def _inner(): 3 | return thing 4 | return _inner 5 | 6 | has_secret = make_hidden(1 + 2) 7 | print("hidden thing is", has_secret()) 8 | -------------------------------------------------------------------------------- /src/lint/dump_ast.py: -------------------------------------------------------------------------------- 1 | import ast 2 | import sys 3 | 4 | with open(sys.argv[1], "r") as reader: 5 | source = reader.read() 6 | 7 | tree = ast.parse(source) 8 | print(ast.dump(tree, indent=4)) 9 | -------------------------------------------------------------------------------- /bib/W2964662501.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.027.015", "year": 2019, "abstract": "1. Adams H., Adams A. 1854–1858. The genera of recent Mollusca 2. John van Voorst, London. Google Scholar"} -------------------------------------------------------------------------------- /docs/query/get_metadata.out: -------------------------------------------------------------------------------- 1 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 2 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 3 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 4 | -------------------------------------------------------------------------------- /docs/template/z_num.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | expander.showTag(node, False) 3 | expander.output(node.attrs["z-num"]) 4 | 5 | def close(expander, node): 6 | expander.showTag(node, True) 7 | -------------------------------------------------------------------------------- /src/query/get_metadata.out: -------------------------------------------------------------------------------- 1 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 2 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 3 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 4 | -------------------------------------------------------------------------------- /src/template/example_call.py: -------------------------------------------------------------------------------- 1 | data = {"names": ["Johnson", "Vaughan", "Jackson"]} 2 | 3 | dom = read_html("template.html") 4 | expander = Expander(dom, data) 5 | expander.walk() 6 | print(expander.result) 7 | -------------------------------------------------------------------------------- /src/template/z_num.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | expander.showTag(node, False) 3 | expander.output(node.attrs["z-num"]) 4 | 5 | def close(expander, node): 6 | expander.showTag(node, True) 7 | -------------------------------------------------------------------------------- /bib/W2033054311.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.014.010", "year": 2009, "abstract": "1. Romincka forest - a malacofauna refuge of European significance Magdalena Marzec Folia Malacologica CrossRef"} -------------------------------------------------------------------------------- /docs/query/simpler_metadata.out: -------------------------------------------------------------------------------- 1 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 2 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 3 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 4 | -------------------------------------------------------------------------------- /docs/template/example_call.py: -------------------------------------------------------------------------------- 1 | data = {"names": ["Johnson", "Vaughan", "Jackson"]} 2 | 3 | dom = read_html("template.html") 4 | expander = Expander(dom, data) 5 | expander.walk() 6 | print(expander.result) 7 | -------------------------------------------------------------------------------- /docs/template/loop.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 |
    • Johnson
    • 5 | 6 |
    • Vaughan
    • 7 | 8 |
    • Jackson
    • 9 |
    10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/test/signature.out: -------------------------------------------------------------------------------- 1 | zero 2 | Traceback (most recent call last): 3 | File "/sdx/test/signature.py", line 8, in 4 | func() 5 | TypeError: one() missing 1 required positional argument: 'value' 6 | -------------------------------------------------------------------------------- /src/query/simpler_metadata.out: -------------------------------------------------------------------------------- 1 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 2 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 3 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 4 | -------------------------------------------------------------------------------- /src/template/loop.out: -------------------------------------------------------------------------------- 1 | 2 | 3 |
      4 |
    • Johnson
    • 5 | 6 |
    • Vaughan
    • 7 | 8 |
    • Jackson
    • 9 |
    10 | 11 | 12 | -------------------------------------------------------------------------------- /src/test/signature.out: -------------------------------------------------------------------------------- 1 | zero 2 | Traceback (most recent call last): 3 | File "/sdx/test/signature.py", line 8, in 4 | func() 5 | TypeError: one() missing 1 required positional argument: 'value' 6 | -------------------------------------------------------------------------------- /unused/flow/cat.py: -------------------------------------------------------------------------------- 1 | from stage import Stage 2 | 3 | class Cat(Stage): 4 | INPUTS = {"first", "second"} 5 | 6 | def _run(self): 7 | return self._available["first"] + self._available["second"] 8 | -------------------------------------------------------------------------------- /docs/bonus/func_attr.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | "Docstring for example." 3 | print("in example") 4 | 5 | # [print] 6 | print("docstring:", example.__doc__) 7 | print("name:", example.__name__) 8 | # [/print] 9 | -------------------------------------------------------------------------------- /docs/docgen/inject_modified.out: -------------------------------------------------------------------------------- 1 | def add(left, right): 2 | count('add') 3 | return left + right 4 | 5 | def double(x): 6 | count('double') 7 | return add(x, x) 8 | add(1, 2) 9 | double(3) 10 | -------------------------------------------------------------------------------- /docs/template/vars.json: -------------------------------------------------------------------------------- 1 | { 2 | "firstVar": "firstValue", 3 | "secondVar": "secondValue", 4 | "varName": "varValue", 5 | "yes": true, 6 | "no": false, 7 | "names": ["Johnson", "Vaughan", "Jackson"] 8 | } 9 | -------------------------------------------------------------------------------- /src/bonus/func_attr.py: -------------------------------------------------------------------------------- 1 | def example(): 2 | "Docstring for example." 3 | print("in example") 4 | 5 | # [print] 6 | print("docstring:", example.__doc__) 7 | print("name:", example.__name__) 8 | # [/print] 9 | -------------------------------------------------------------------------------- /src/docgen/inject_modified.out: -------------------------------------------------------------------------------- 1 | def add(left, right): 2 | count('add') 3 | return left + right 4 | 5 | def double(x): 6 | count('double') 7 | return add(x, x) 8 | add(1, 2) 9 | double(3) 10 | -------------------------------------------------------------------------------- /src/template/vars.json: -------------------------------------------------------------------------------- 1 | { 2 | "firstVar": "firstValue", 3 | "secondVar": "secondValue", 4 | "varName": "varValue", 5 | "yes": true, 6 | "no": false, 7 | "names": ["Johnson", "Vaughan", "Jackson"] 8 | } 9 | -------------------------------------------------------------------------------- /docs/http/requests_example.out: -------------------------------------------------------------------------------- 1 | status code: 200 2 | content length: 103 3 | 4 | 5 | Test Page 6 | 7 | 8 |

    test page

    9 | 10 | 11 | -------------------------------------------------------------------------------- /src/archive/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | hash_all.out \ 3 | sample_dir.out \ 4 | test_backup_manual.out 5 | 6 | include ../../examples.mk 7 | 8 | test_backup_manual.out: backup.py 9 | backup.py: hash_all.py 10 | -------------------------------------------------------------------------------- /src/http/requests_example.out: -------------------------------------------------------------------------------- 1 | status code: 200 2 | content length: 103 3 | 4 | 5 | Test Page 6 | 7 | 8 |

    test page

    9 | 10 | 11 | -------------------------------------------------------------------------------- /bib/W2336374197.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.6084/m9.figshare.1243751.v1", "year": 2014, "abstract": "Grant proposal for a PhD student on the evolution of chirality in land snails. This proposal was REJECTED by NWO/ALW."} -------------------------------------------------------------------------------- /docs/http/http_response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Date: Thu, 16 June 2023 12:28:53 GMT 3 | Content-Type: text/html 4 | Content-Length: 53 5 | 6 | 7 | 8 |

    Hello, World!

    9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/template/z_var.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | expander.showTag(node, False) 3 | expander.output(expander.env.find(node.attrs["z-var"])) 4 | 5 | def close(expander, node): 6 | expander.showTag(node, True) 7 | -------------------------------------------------------------------------------- /docs/test/locals.py: -------------------------------------------------------------------------------- 1 | def show_locals(low, high): 2 | print(f"start: {locals()}") 3 | for i in range(low, high): 4 | print(f"loop {i}: {locals()}") 5 | print(f"end: {locals()}") 6 | 7 | show_locals(1, 3) 8 | -------------------------------------------------------------------------------- /src/bonus/inspect_func.out: -------------------------------------------------------------------------------- 1 | signature: (first, second) 2 | type: 3 | names: OrderedDict([('first', ), ('second', \ 4 | )]) 5 | parameters: ['first', 'second'] 6 | -------------------------------------------------------------------------------- /src/http/http_response.txt: -------------------------------------------------------------------------------- 1 | HTTP/1.1 200 OK 2 | Date: Thu, 16 June 2023 12:28:53 GMT 3 | Content-Type: text/html 4 | Content-Length: 53 5 | 6 | 7 | 8 |

    Hello, World!

    9 | 10 | 11 | -------------------------------------------------------------------------------- /src/template/z_var.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | expander.showTag(node, False) 3 | expander.output(expander.env.find(node.attrs["z-var"])) 4 | 5 | def close(expander, node): 6 | expander.showTag(node, True) 7 | -------------------------------------------------------------------------------- /src/test/locals.py: -------------------------------------------------------------------------------- 1 | def show_locals(low, high): 2 | print(f"start: {locals()}") 3 | for i in range(low, high): 4 | print(f"loop {i}: {locals()}") 5 | print(f"end: {locals()}") 6 | 7 | show_locals(1, 3) 8 | -------------------------------------------------------------------------------- /src/vm/count_up.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | ldc R0 0 5 | ldc R1 3 6 | loop: 7 | prr R0 8 | ldc R2 1 9 | add R0 R2 10 | cpy R2 R1 11 | sub R2 R0 12 | bne R2 @loop 13 | hlt 14 | -------------------------------------------------------------------------------- /bib/W2949250850.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2019.1594006", "year": 2019, "abstract": "\"Australian land snails, volume 2: a field guide to southern, central and western species.\" Molluscan Research, 39(3), p. 290"} -------------------------------------------------------------------------------- /docs/bonus/inheritance_example.out: -------------------------------------------------------------------------------- 1 | | | GrandChild | LeftChild | Parent | RightChild | 2 | | --- | --- | --- | --- | --- | 3 | | blue | X | X | | X 4 | | green | | X | X | 5 | | orange | X | | | 6 | | red | X | | X | X 7 | -------------------------------------------------------------------------------- /docs/bonus/inspect_func.out: -------------------------------------------------------------------------------- 1 | signature: (first, second) 2 | type: 3 | names: OrderedDict([('first', ), ('second', \ 4 | )]) 5 | parameters: ['first', 'second'] 6 | -------------------------------------------------------------------------------- /docs/oop/varargs.out: -------------------------------------------------------------------------------- 1 | nothing args '()' and kwargs '{}' 2 | one unnamed argument args '(1,)' and kwargs '{}' 3 | one named argument args '()' and kwargs '{'second': '2'}' 4 | one of each args '(3,)' and kwargs '{'fourth': '4'}' 5 | -------------------------------------------------------------------------------- /docs/vm/count_up.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | ldc R0 0 5 | ldc R1 3 6 | loop: 7 | prr R0 8 | ldc R2 1 9 | add R0 R2 10 | cpy R2 R1 11 | sub R2 R0 12 | bne R2 @loop 13 | hlt 14 | -------------------------------------------------------------------------------- /src/bonus/inheritance_example.out: -------------------------------------------------------------------------------- 1 | | | GrandChild | LeftChild | Parent | RightChild | 2 | | --- | --- | --- | --- | --- | 3 | | blue | X | X | | X 4 | | green | | X | X | 5 | | orange | X | | | 6 | | red | X | | X | X 7 | -------------------------------------------------------------------------------- /src/concur/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | catch.out \ 3 | classes.out \ 4 | inject.out \ 5 | parent.out \ 6 | resource.out \ 7 | scheduler.out \ 8 | switch.out \ 9 | wait.out 10 | 11 | include ../../examples.mk 12 | -------------------------------------------------------------------------------- /src/oop/varargs.out: -------------------------------------------------------------------------------- 1 | nothing args '()' and kwargs '{}' 2 | one unnamed argument args '(1,)' and kwargs '{}' 3 | one named argument args '()' and kwargs '{'second': '2'}' 4 | one of each args '(3,)' and kwargs '{'fourth': '4'}' 5 | -------------------------------------------------------------------------------- /docs/check/parse.out: -------------------------------------------------------------------------------- 1 | node: [document] 2 | node: html 3 | string: '\n' 4 | node: body 5 | string: '\n' 6 | node: h1 7 | string: 'Title' 8 | string: '\n' 9 | node: p 10 | string: 'paragraph' 11 | string: '\n' 12 | string: '\n' 13 | -------------------------------------------------------------------------------- /docs/lint/function_keys.py: -------------------------------------------------------------------------------- 1 | def label(): 2 | return "label" 3 | 4 | actually_has_duplicate_keys = { 5 | "label": 1, 6 | "la" + "bel": 2, 7 | label(): 3, 8 | "".join(["l", "a", "b", "e", "l"]): 4, 9 | } 10 | -------------------------------------------------------------------------------- /src/bonus/inheritance.tbl: -------------------------------------------------------------------------------- 1 | | | `GrandChild` | `LeftChild` | `Parent` | `RightChild` | 2 | | --- | --- | --- | --- | --- | 3 | | `blue` | X | X | | X 4 | | `green` | | X | X | 5 | | `orange` | X | | | 6 | | `red` | X | | X | X 7 | -------------------------------------------------------------------------------- /src/check/parse.out: -------------------------------------------------------------------------------- 1 | node: [document] 2 | node: html 3 | string: '\n' 4 | node: body 5 | string: '\n' 6 | node: h1 7 | string: 'Title' 8 | string: '\n' 9 | node: p 10 | string: 'paragraph' 11 | string: '\n' 12 | string: '\n' 13 | -------------------------------------------------------------------------------- /src/lint/function_keys.py: -------------------------------------------------------------------------------- 1 | def label(): 2 | return "label" 3 | 4 | actually_has_duplicate_keys = { 5 | "label": 1, 6 | "la" + "bel": 2, 7 | label(): 3, 8 | "".join(["l", "a", "b", "e", "l"]): 4, 9 | } 10 | -------------------------------------------------------------------------------- /docs/func/counter_fail.py: -------------------------------------------------------------------------------- 1 | def make_counter(): 2 | value = 0 3 | def _inner(): 4 | value += 1 5 | return value 6 | return _inner 7 | 8 | c = make_counter() 9 | for i in range(3): 10 | print(c()) 11 | -------------------------------------------------------------------------------- /src/ftp/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | client_chunk.out \ 3 | server_chunk.out 4 | 5 | include ../../examples.mk 6 | 7 | client_chunk.out: client_chunk.py 8 | touch $@ 9 | 10 | server_chunk.out: server_chunk.py 11 | touch $@ 12 | -------------------------------------------------------------------------------- /src/func/counter_fail.py: -------------------------------------------------------------------------------- 1 | def make_counter(): 2 | value = 0 3 | def _inner(): 4 | value += 1 5 | return value 6 | return _inner 7 | 8 | c = make_counter() 9 | for i in range(3): 10 | print(c()) 11 | -------------------------------------------------------------------------------- /src/glob/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | test_glob_problem.out 3 | 4 | include ../../examples.mk 5 | 6 | test_glob_problem.out: test_glob_problem.py glob_lit.py glob_either.py 7 | -COLUMNS=${COLUMNS} pytest --tb=no $< | sed -n '1p;6,12p' > $@ 8 | -------------------------------------------------------------------------------- /bib/W2755625536.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1515/vzoo-2017-0041", "year": 2017, "abstract": "Abstract A finding of the subterranean population of the Caucasian invasive snail on the depth of 30 m below Odesa in Southern Ukraine is discussed."} -------------------------------------------------------------------------------- /docs/concur/inject.out: -------------------------------------------------------------------------------- 1 | A starts with 3 2 | scheduler got A 3 | B starts with 2 4 | scheduler got B 5 | A continue with 1 6 | scheduler got A 7 | B continue with 0 8 | scheduler got None 9 | A continue with -1 10 | scheduler got None 11 | -------------------------------------------------------------------------------- /docs/func/inner.py: -------------------------------------------------------------------------------- 1 | def outer(value): 2 | def inner(current): 3 | print(f"inner sum is {current + value}") 4 | 5 | print(f"outer value is {value}") 6 | for i in range(3): 7 | inner(i) 8 | 9 | outer(10) 10 | -------------------------------------------------------------------------------- /src/concur/inject.out: -------------------------------------------------------------------------------- 1 | A starts with 3 2 | scheduler got A 3 | B starts with 2 4 | scheduler got B 5 | A continue with 1 6 | scheduler got A 7 | B continue with 0 8 | scheduler got None 9 | A continue with -1 10 | scheduler got None 11 | -------------------------------------------------------------------------------- /src/func/inner.py: -------------------------------------------------------------------------------- 1 | def outer(value): 2 | def inner(current): 3 | print(f"inner sum is {current + value}") 4 | 5 | print(f"outer value is {value}") 6 | for i in range(3): 7 | inner(i) 8 | 9 | outer(10) 10 | -------------------------------------------------------------------------------- /bib/W1589460827.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/00852988.1959.10673766", "year": 1959, "abstract": "(1959). A New Genus and Species of Land Snail From North Queensland. Journal of the Malacological Society of Australia: Vol. 1, No. 3, pp. 31-32."} -------------------------------------------------------------------------------- /bib/W2038702416.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.022.022", "year": 2014, "abstract": "1. Bernasconi R. 2004. Mollusca. In: Gunn J. (eds). Encyclopedia of caves and karst science. Taylor and Francis, New York, pp. 984–987. Google Scholar"} -------------------------------------------------------------------------------- /bib/W2485839606.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2307/3226309", "year": 1987, "abstract": "Ces «cristaux» renferment une large quantite de soufre, des quantites moderees de calcium, potassium et phosphore et des traces de magnesium, silice et sodium"} -------------------------------------------------------------------------------- /docs/func/counter_succeed.py: -------------------------------------------------------------------------------- 1 | def make_counter(): 2 | value = [0] 3 | def _inner(): 4 | value[0] += 1 5 | return value[0] 6 | return _inner 7 | 8 | c = make_counter() 9 | for i in range(3): 10 | print(c()) 11 | -------------------------------------------------------------------------------- /src/func/counter_succeed.py: -------------------------------------------------------------------------------- 1 | def make_counter(): 2 | value = [0] 3 | def _inner(): 4 | value[0] += 1 5 | return value[0] 6 | return _inner 7 | 8 | c = make_counter() 9 | for i in range(3): 10 | print(c()) 11 | -------------------------------------------------------------------------------- /src/http/requests_example.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | response = requests.get("http://third-bit.com/test.html") 4 | print("status code:", response.status_code) 5 | print("content length:", response.headers["content-length"]) 6 | print(response.text) 7 | -------------------------------------------------------------------------------- /unused/flow/verbs/cat.py: -------------------------------------------------------------------------------- 1 | from stage import Stage 2 | 3 | class Cat(Stage): 4 | INPUTS = {"first", "second"} 5 | 6 | def _run(self): 7 | return self._available["first"] + self._available["second"] 8 | 9 | export = Cat 10 | -------------------------------------------------------------------------------- /bib/W1980037818.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.014.019", "year": 2009, "abstract": "1. Shell polymorphism in the land-snail Cepaea nemoralis (L.) along a West-East transect in continental Europe Małgorzata Ożgo Folia Malacologica CrossRef"} -------------------------------------------------------------------------------- /bib/W2485669931.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.024.015", "year": 2016, "abstract": "1. Albuquerque de Matos R. M., Serra J. A. 1984. Taxonomic polymorphism and intrinsic factors in Helix aspersa. Brotéria Genética 5: 181–220. Google Scholar"} -------------------------------------------------------------------------------- /docs/docgen/inject_parse.out: -------------------------------------------------------------------------------- 1 | Module( 2 | body=[ 3 | Expr( 4 | value=Call( 5 | func=Name(id='count', ctx=Load()), 6 | args=[ 7 | Constant(value='name')], 8 | keywords=[]))], 9 | type_ignores=[]) 10 | -------------------------------------------------------------------------------- /docs/http/requests_example.py: -------------------------------------------------------------------------------- 1 | import requests 2 | 3 | response = requests.get("http://third-bit.com/test.html") 4 | print("status code:", response.status_code) 5 | print("content length:", response.headers["content-length"]) 6 | print(response.text) 7 | -------------------------------------------------------------------------------- /docs/protocols/mock_time.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def elapsed(since): 4 | return time.time() - since 5 | 6 | def mock_time(): 7 | return 200 8 | 9 | def test_elapsed(): 10 | time.time = mock_time 11 | assert elapsed(50) == 150 12 | -------------------------------------------------------------------------------- /docs/test/func_list.py: -------------------------------------------------------------------------------- 1 | def first(): 2 | print("First") 3 | 4 | def second(): 5 | print("Second") 6 | 7 | def third(): 8 | print("Third") 9 | 10 | everything = [first, second, third] 11 | for func in everything: 12 | func() 13 | -------------------------------------------------------------------------------- /src/docgen/inject_parse.out: -------------------------------------------------------------------------------- 1 | Module( 2 | body=[ 3 | Expr( 4 | value=Call( 5 | func=Name(id='count', ctx=Load()), 6 | args=[ 7 | Constant(value='name')], 8 | keywords=[]))], 9 | type_ignores=[]) 10 | -------------------------------------------------------------------------------- /src/protocols/mock_time.py: -------------------------------------------------------------------------------- 1 | import time 2 | 3 | def elapsed(since): 4 | return time.time() - since 5 | 6 | def mock_time(): 7 | return 200 8 | 9 | def test_elapsed(): 10 | time.time = mock_time 11 | assert elapsed(50) == 150 12 | -------------------------------------------------------------------------------- /src/test/func_list.py: -------------------------------------------------------------------------------- 1 | def first(): 2 | print("First") 3 | 4 | def second(): 5 | print("Second") 6 | 7 | def third(): 8 | print("Third") 9 | 10 | everything = [first, second, third] 11 | for func in everything: 12 | func() 13 | -------------------------------------------------------------------------------- /bib/W2039084817.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1017/s0024282997000145", "year": 1997, "abstract": "An abstract is not available for this content so a preview has been provided. Please use the Get access link above for information on how to access this content."} -------------------------------------------------------------------------------- /bib/W2085867870.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.022.014", "year": 2014, "abstract": "1. Bank R. A., Maassen W. J. M. 1998. Beiträge zur Mollusk­en­fauna der Präf­ektur Samos (Griechenland, östlichen Agä­is). De Kreukel 34: 45–80. Google Scholar"} -------------------------------------------------------------------------------- /bib/W2090088970.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1006/lich.2001.0355", "year": 2001, "abstract": "An abstract is not available for this content so a preview has been provided. Please use the Get access link above for information on how to access this content."} -------------------------------------------------------------------------------- /bib/W4236328523.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1017/s2475262200012004", "year": 2014, "abstract": "An abstract is not available for this content so a preview has been provided. Please use the Get access link above for information on how to access this content."} -------------------------------------------------------------------------------- /bib/W4240717650.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1017/s2475262200010960", "year": 2014, "abstract": "An abstract is not available for this content so a preview has been provided. Please use the Get access link above for information on how to access this content."} -------------------------------------------------------------------------------- /bib/W4243232673.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1007/s13127-018-0363-9", "year": 2018, "abstract": "One of the author’s name of this article was incorrectly published as “Chris Wade”. This is now presented correctly in this article as “Christopher M. Wade”."} -------------------------------------------------------------------------------- /bib/W4245877440.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1017/s2475262200011989", "year": 2014, "abstract": "An abstract is not available for this content so a preview has been provided. Please use the Get access link above for information on how to access this content."} -------------------------------------------------------------------------------- /bib/W1981105122.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.008.016", "year": 2009, "abstract": "1. Cepaea vindobonensis (Férussac, 1821) (Gastropoda: Pulmonata: Helicidae) in Central, Northwestern and Western Poland Dominika Mierzwa Folia Malacologica CrossRef"} -------------------------------------------------------------------------------- /docs/protocols/wrap_infinite.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(value): 5 | print("before call") 6 | original(value) 7 | print("after call") 8 | 9 | original = logging 10 | original("example") 11 | -------------------------------------------------------------------------------- /src/protocols/wrap_infinite.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(value): 5 | print("before call") 6 | original(value) 7 | print("after call") 8 | 9 | original = logging 10 | original("example") 11 | -------------------------------------------------------------------------------- /bib/W2075575070.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-011-0014-7", "year": 2011, "abstract": "1. Bojakowska I., Gliwicz T. 2003. Wyniki geochemicznych badań osadów wodnych Polski w latach 2000-2002. Wydawnictwo Naukowe Gabriel Borowski, Warszawa. Google Scholar"} -------------------------------------------------------------------------------- /bib/W4251958910.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1017/s2475262200001520", "year": 1996, "abstract": "An abstract is not available for this content so a preview has been provided. As you have access to this content, a full PDF is available via the ‘Save PDF’ action button."} -------------------------------------------------------------------------------- /docs/perf/make.out: -------------------------------------------------------------------------------- 1 | column-wise 2 | {'label_0': [0, 1, 2], 'label_1': [1, 2, 3], 'label_2': [2, 3, 4]} 3 | 4 | row-wise 5 | [{'label_0': 0, 'label_1': 1, 'label_2': 2}, 6 | {'label_0': 1, 'label_1': 2, 'label_2': 3}, 7 | {'label_0': 2, 'label_1': 3, 'label_2': 4}] 8 | -------------------------------------------------------------------------------- /docs/perf/make.py: -------------------------------------------------------------------------------- 1 | from pprint import pprint 2 | from timing import make_col, make_row 3 | 4 | col = make_col(3, 3) 5 | print("column-wise") 6 | pprint(col._data) 7 | 8 | print() 9 | 10 | row = make_row(3, 3) 11 | print("row-wise") 12 | pprint(row._data) 13 | -------------------------------------------------------------------------------- /src/func/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | adder.out \ 3 | closure.out \ 4 | closure_list.out \ 5 | dynamic.out \ 6 | func.out \ 7 | inner.out \ 8 | oop.out 9 | 10 | include ../../examples.mk 11 | 12 | dynamic.out: dynamic.tll 13 | func.out: func.tll 14 | -------------------------------------------------------------------------------- /src/perf/make.out: -------------------------------------------------------------------------------- 1 | column-wise 2 | {'label_0': [0, 1, 2], 'label_1': [1, 2, 3], 'label_2': [2, 3, 4]} 3 | 4 | row-wise 5 | [{'label_0': 0, 'label_1': 1, 'label_2': 2}, 6 | {'label_0': 1, 'label_1': 2, 'label_2': 3}, 7 | {'label_0': 2, 'label_1': 3, 'label_2': 4}] 8 | -------------------------------------------------------------------------------- /src/perf/make.py: -------------------------------------------------------------------------------- 1 | from pprint import pprint 2 | from timing import make_col, make_row 3 | 4 | col = make_col(3, 3) 5 | print("column-wise") 6 | pprint(col._data) 7 | 8 | print() 9 | 10 | row = make_row(3, 3) 11 | print("row-wise") 12 | pprint(row._data) 13 | -------------------------------------------------------------------------------- /bib/W1967806251.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-009-0015-y", "year": 2009, "abstract": "1. Abraszewska-Kowalczyk A., Kowalczyk J. K., Hejduk J., Przybylski M., Tuszewicki W. 2002. Świat zwierząt Brudzeńskiego Parku Krajobrazowego. Mantis, Olsztyn. Google Scholar"} -------------------------------------------------------------------------------- /bib/W2196695511.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.3109/13813456909069829", "year": 1969, "abstract": "(1969). Investigation of the Fatty Acid Composition of the Snail ←Arianta Arbustorum→. Archives Internationales de Physiologie et de Biochimie: Vol. 77, No. 3, pp. 507-514."} -------------------------------------------------------------------------------- /docs/oop/spread.py: -------------------------------------------------------------------------------- 1 | def show_spread(left, middle, right): 2 | print(f"left {left} middle {middle} right {right}") 3 | 4 | all_in_list = [1, 2, 3] 5 | show_spread(*all_in_list) 6 | 7 | all_in_dict = {"right": 30, "left": 10, "middle": 20} 8 | show_spread(**all_in_dict) 9 | -------------------------------------------------------------------------------- /docs/protocols/callable.py: -------------------------------------------------------------------------------- 1 | class Adder: 2 | def __init__(self, value): 3 | self.value = value 4 | 5 | def __call__(self, arg): 6 | return arg + self.value 7 | 8 | add_3 = Adder(3) 9 | result = add_3(8) 10 | print(f"add_3(8): {result}") 11 | -------------------------------------------------------------------------------- /docs/vm/count_up.out: -------------------------------------------------------------------------------- 1 | >> 0 2 | >> 1 3 | >> 2 4 | R000000 = 000003 5 | R000001 = 000003 6 | R000002 = 000000 7 | R000003 = 000000 8 | 000000: 000002 030102 00000a 010202 9 | 000004: 020006 010204 000207 020209 10 | 000008: 000001 000000 000000 000000 11 | -------------------------------------------------------------------------------- /src/oop/spread.py: -------------------------------------------------------------------------------- 1 | def show_spread(left, middle, right): 2 | print(f"left {left} middle {middle} right {right}") 3 | 4 | all_in_list = [1, 2, 3] 5 | show_spread(*all_in_list) 6 | 7 | all_in_dict = {"right": 30, "left": 10, "middle": 20} 8 | show_spread(**all_in_dict) 9 | -------------------------------------------------------------------------------- /src/protocols/callable.py: -------------------------------------------------------------------------------- 1 | class Adder: 2 | def __init__(self, value): 3 | self.value = value 4 | 5 | def __call__(self, arg): 6 | return arg + self.value 7 | 8 | add_3 = Adder(3) 9 | result = add_3(8) 10 | print(f"add_3(8): {result}") 11 | -------------------------------------------------------------------------------- /src/vm/count_up.out: -------------------------------------------------------------------------------- 1 | >> 0 2 | >> 1 3 | >> 2 4 | R000000 = 000003 5 | R000001 = 000003 6 | R000002 = 000000 7 | R000003 = 000000 8 | 000000: 000002 030102 00000a 010202 9 | 000004: 020006 010204 000207 020209 10 | 000008: 000001 000000 000000 000000 11 | -------------------------------------------------------------------------------- /bib/W2892358450.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.5281/zenodo.1208326", "year": 2018, "abstract": "FIGURES 5A–D. Riccardoella (Proriccardoella) tokyoensis n. sp.: right legs except for coxae in antiaxial face (paratype, male, TW-3 in NMNS).A–D—Leg I–IV, respectively.Scale bar50 µm."} -------------------------------------------------------------------------------- /docs/viewer/call_example.py: -------------------------------------------------------------------------------- 1 | class Pretend: 2 | def __init__(self, increment): 3 | self._increment = increment 4 | 5 | def __call__(self, value): 6 | return value + self._increment 7 | 8 | p = Pretend(3) 9 | result = p(10) 10 | print(result) 11 | -------------------------------------------------------------------------------- /src/binary/3bit.tbl: -------------------------------------------------------------------------------- 1 | | Base 10 | Base 2 | 2 | | ------- | ------ | 3 | | 3 | 011 | 4 | | 2 | 010 | 5 | | 1 | 001 | 6 | | 0 | 000 | 7 | | -1 | 111 | 8 | | -2 | 110 | 9 | | -3 | 101 | 10 | | -4 | 100 | 11 | -------------------------------------------------------------------------------- /src/parse/grammar.tbl: -------------------------------------------------------------------------------- 1 | | Meaning | Character | 2 | | ------------------------- | --------------- | 3 | | Any literal character *c* | *c* | 4 | | Zero or more characters | `*` | 5 | | Alternatives | `{`*x*`,`*y*`}` | 6 | -------------------------------------------------------------------------------- /src/viewer/call_example.py: -------------------------------------------------------------------------------- 1 | class Pretend: 2 | def __init__(self, increment): 3 | self._increment = increment 4 | 5 | def __call__(self, value): 6 | return value + self._increment 7 | 8 | p = Pretend(3) 9 | result = p(10) 10 | print(result) 11 | -------------------------------------------------------------------------------- /bib/W1126531559.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.007.015", "year": 2009, "abstract": "1. Late Paleozoic continental gastropods from Poland: systematic, evolutionary and paleoecological approach Ewa Stworzewicz, Joachim Szulc, Beata Pokryszko Journal of Paleontology CrossRef"} -------------------------------------------------------------------------------- /docs/oop/varargs.py: -------------------------------------------------------------------------------- 1 | def show_args(title, *args, **kwargs): 2 | print(f"{title} args '{args}' and kwargs '{kwargs}'") 3 | 4 | show_args("nothing") 5 | show_args("one unnamed argument", 1) 6 | show_args("one named argument", second="2") 7 | show_args("one of each", 3, fourth="4") 8 | -------------------------------------------------------------------------------- /docs/test/find_test_funcs.out: -------------------------------------------------------------------------------- 1 | test_sign_negative 2 | test_sign_positive 3 | test_sign_zero 4 | test_sign_error 5 | -------------------------------------------------------------------------------- /docs/vm/fill_array.out: -------------------------------------------------------------------------------- 1 | R000000 = 000003 2 | R000001 = 000003 3 | R000002 = 00000e 4 | R000003 = 000000 5 | 000000: 000002 030102 0b0202 020005 6 | 000004: 010302 030006 030206 010304 7 | 000008: 000307 030309 000001 000000 8 | 00000c: 000001 000002 000000 000000 9 | -------------------------------------------------------------------------------- /src/interp/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | doubling.out \ 3 | expr.out \ 4 | repeat_zero.out \ 5 | vars.out 6 | 7 | include ../../examples.mk 8 | 9 | doubling.out: doubling.tll vars.py 10 | expr.out: expr.tll 11 | repeat_zero.out: repeat_zero.tll 12 | vars.out: vars.tll 13 | -------------------------------------------------------------------------------- /src/oop/varargs.py: -------------------------------------------------------------------------------- 1 | def show_args(title, *args, **kwargs): 2 | print(f"{title} args '{args}' and kwargs '{kwargs}'") 3 | 4 | show_args("nothing") 5 | show_args("one unnamed argument", 1) 6 | show_args("one named argument", second="2") 7 | show_args("one of each", 3, fourth="4") 8 | -------------------------------------------------------------------------------- /src/test/find_test_funcs.out: -------------------------------------------------------------------------------- 1 | test_sign_negative 2 | test_sign_positive 3 | test_sign_zero 4 | test_sign_error 5 | -------------------------------------------------------------------------------- /src/vm/fill_array.out: -------------------------------------------------------------------------------- 1 | R000000 = 000003 2 | R000001 = 000003 3 | R000002 = 00000e 4 | R000003 = 000000 5 | 000000: 000002 030102 0b0202 020005 6 | 000004: 010302 030006 030206 010304 7 | 000008: 000307 030309 000001 000000 8 | 00000c: 000001 000002 000000 000000 9 | -------------------------------------------------------------------------------- /unused/flow/split_join.dot: -------------------------------------------------------------------------------- 1 | digraph split_join { 2 | head [label="Head(3)"] 3 | left [label="Tail(2)"] 4 | right [label="Tail(1)"] 5 | cat [label="Cat()"] 6 | head -> left 7 | head -> right 8 | left -> cat [label="second"] 9 | right -> cat [label="first"] 10 | } -------------------------------------------------------------------------------- /bib/W2049364536.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1016/0006-8993(85)90899-6", "year": 1985, "abstract": "The presence of biogenic amines is demonstrated in the central nervous system of Helicella virgata using a modified glyoxylic acid technique and high-performance liquid chromatography."} -------------------------------------------------------------------------------- /bib/W2074750373.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.012.014", "year": 2004, "abstract": "1. Pseudamnicola exilis (Frauenfeld, 1863) in southern Greece: a remnant of a flock of species (Rissooidea: Hydrobiidae)? Magdalena Szarowska, Andrzej Falniowski Folia Malacologica CrossRef"} -------------------------------------------------------------------------------- /docs/func/dynamic.tll: -------------------------------------------------------------------------------- 1 | ["seq", 2 | ["def", "lower", [], ["get", "x"]], 3 | ["def", "one", [], ["seq", ["set", "x", 1], ["call", "lower"]]], 4 | ["def", "two", [], ["seq", ["set", "x", 2], ["call", "lower"]]], 5 | ["print", ["call", "one"]], 6 | ["print", ["call", "two"]] 7 | ] 8 | -------------------------------------------------------------------------------- /src/binary/pack_unpack.py: -------------------------------------------------------------------------------- 1 | import struct 2 | 3 | fmt = "ii" # two 32-bit integers 4 | x = 31 5 | y = 65 6 | 7 | binary = struct.pack(fmt, x, y) 8 | print("binary representation:", repr(binary)) 9 | 10 | normal = struct.unpack(fmt, binary) 11 | print("back to normal:", normal) 12 | -------------------------------------------------------------------------------- /src/func/dynamic.tll: -------------------------------------------------------------------------------- 1 | ["seq", 2 | ["def", "lower", [], ["get", "x"]], 3 | ["def", "one", [], ["seq", ["set", "x", 1], ["call", "lower"]]], 4 | ["def", "two", [], ["seq", ["set", "x", 2], ["call", "lower"]]], 5 | ["print", ["call", "one"]], 6 | ["print", ["call", "two"]] 7 | ] 8 | -------------------------------------------------------------------------------- /src/pack/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | exhaustive.out \ 3 | incremental.out \ 4 | incremental_reverse.out \ 5 | manual.out \ 6 | z3_complete.out \ 7 | z3_equal.out \ 8 | z3_part_equal.out \ 9 | z3_triple.out \ 10 | z3_unequal.out 11 | 12 | include ../../examples.mk 13 | -------------------------------------------------------------------------------- /bib/W2576761644.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.15560/13.1.2038", "year": 2017, "abstract": "A first land snail survey in the Gebel Elba massif in southeastern Egypt revealed the occurrence of just two taxa, Pupoides coenopictus and a second pupilloid species, probably a Truncatellina species."} -------------------------------------------------------------------------------- /bib/W3027864542.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.028.010", "year": 2020, "abstract": "1. Gredler V. 1898. Zur Conchylien-Fauna von China. XIX. Stück. Neue Buliminiden aus Kansu. Programm des öffentlichen Privat-Obergymnasiums der Franciscaner zu Bozen 1897–98: 39–51. Google Scholar"} -------------------------------------------------------------------------------- /docs/binary/pack_unpack.py: -------------------------------------------------------------------------------- 1 | import struct 2 | 3 | fmt = "ii" # two 32-bit integers 4 | x = 31 5 | y = 65 6 | 7 | binary = struct.pack(fmt, x, y) 8 | print("binary representation:", repr(binary)) 9 | 10 | normal = struct.unpack(fmt, binary) 11 | print("back to normal:", normal) 12 | -------------------------------------------------------------------------------- /docs/bonus/inspect_func.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | 3 | def example(first, second): 4 | pass 5 | 6 | sig = inspect.signature(example) 7 | print("signature:", sig) 8 | print("type:", type(sig)) 9 | print("names:", sig.parameters) 10 | print("parameters:", list(sig.parameters.keys())) 11 | -------------------------------------------------------------------------------- /docs/persist/save_aliasing.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from aliasing import SaveAlias 3 | 4 | # [save] 5 | word = "word" 6 | child = [word, word] 7 | parent = [] 8 | parent.append(parent) 9 | parent.append(child) 10 | 11 | saver = SaveAlias(sys.stdout) 12 | saver.save(parent) 13 | # [/save] 14 | -------------------------------------------------------------------------------- /src/bonus/inspect_func.py: -------------------------------------------------------------------------------- 1 | import inspect 2 | 3 | def example(first, second): 4 | pass 5 | 6 | sig = inspect.signature(example) 7 | print("signature:", sig) 8 | print("type:", type(sig)) 9 | print("names:", sig.parameters) 10 | print("parameters:", list(sig.parameters.keys())) 11 | -------------------------------------------------------------------------------- /src/persist/save_aliasing.py: -------------------------------------------------------------------------------- 1 | import sys 2 | from aliasing import SaveAlias 3 | 4 | # [save] 5 | word = "word" 6 | child = [word, word] 7 | parent = [] 8 | parent.append(parent) 9 | parent.append(child) 10 | 11 | saver = SaveAlias(sys.stdout) 12 | saver.save(parent) 13 | # [/save] 14 | -------------------------------------------------------------------------------- /bib/W2081923342.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.021.013", "year": 2013, "abstract": "A specimen of hairy snail Trochulus hispidus L. was found in the plumage of a great tit, Parus major , wintering in SW Poland. This passerine is the smallest bird species recorded carrying a gastropod."} -------------------------------------------------------------------------------- /bib/W3091979905.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.028.020", "year": 2020, "abstract": "1. Dumrongrojwattana P. 2008. A new species of Aulacospira (Pulmonata: Stylommatophora: Pupillidae) from Eastern Thailand. The Natural History Journal of Chulalongkorn University 8: 57–59. Google Scholar"} -------------------------------------------------------------------------------- /bib/W1963973223.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-012-0015-1", "year": 2012, "abstract": "1. Arnold R. W. 1968. Studies on Cepaea. VII. Climatic selection in Cepaea nemoralis in the Pyrenees. Phil. Trans. Roy. Soc. London B 253: 549-593. https://doi.org/10.1098/rstb.1.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W2088185220.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.022.019", "year": 2014, "abstract": "1. Anderson T. 2004. Mystery Vertigo (Vertigo paradoxa): a technical conservation assessment [Online]. USDA Forest Service, Rocky Mountain Region. Available: http://www.fs.fed.us/r2/projec.... Google Scholar"} -------------------------------------------------------------------------------- /bib/W2782933850.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2017.1409069", "year": 2018, "abstract": "Charopidae represent one of the most speciose land snail faunas in Australia with an estimated 750 species, mostly being less than 5 mm in shell diameter. The majority of its species are undescribe..."} -------------------------------------------------------------------------------- /bib/W2910856664.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2018.1559914", "year": 2019, "abstract": "Powelliphanta is a genus of large carnivorous land snails endemic to New Zealand which display phenotypic variation within comparatively small geographic distances. The diversity within these snail..."} -------------------------------------------------------------------------------- /bib/W3081725801.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/14772000.2020.1783384", "year": 2020, "abstract": "Southeast Asia boasts a high diversity of carnivorous terrestrial snails in the family Streptaxidae. Six genera are now recognized in this region, mainly classified by the traditional characters of..."} -------------------------------------------------------------------------------- /bib/W3095782726.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2020.1823099", "year": 2020, "abstract": "The morpho-anatomical and morphometrical characteristics of the reproductive system, together with the spermatophore and dart apparatus, of Macrochlamys indica are described and the results compare..."} -------------------------------------------------------------------------------- /bib/W3153235689.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2021.1892474", "year": 2021, "abstract": "The Caucasian snail Harmozica ravergiensis Ferussac, 1835 (Gastropoda, Stylommatophora, Hygromiidae) and the Crimean snail Brephulopsis cylindrica Menke, 1828 (Gastropoda, Stylommatophora, Enidae) ..."} -------------------------------------------------------------------------------- /bib/W3196876825.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/13235818.2021.1970352", "year": 2021, "abstract": "A new species of Diplommatina Benson, 1849 from Sikkim, Northeast India is described based on shell morphology. This new species is found to be distinct in its externally visible large parietal too..."} -------------------------------------------------------------------------------- /docs/query/choose_columns.out: -------------------------------------------------------------------------------- 1 | all 2 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 3 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 4 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 5 | family name 6 | {'family': 'Sangal'} 7 | {'family': 'Liu'} 8 | {'family': 'Purjant'} 9 | -------------------------------------------------------------------------------- /src/query/choose_columns.out: -------------------------------------------------------------------------------- 1 | all 2 | {'ident': 14, 'personal': 'Rupinder', 'family': 'Sangal'} 3 | {'ident': 18, 'personal': 'Cheo', 'family': 'Liu'} 4 | {'ident': 31, 'personal': 'Iskander', 'family': 'Purjant'} 5 | family name 6 | {'family': 'Sangal'} 7 | {'family': 'Liu'} 8 | {'family': 'Purjant'} 9 | -------------------------------------------------------------------------------- /bib/W2022559695.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/03036758.1972.10429372", "year": 1972, "abstract": "Abstract Laoma (Phrixgnathus) clathrata and Laoma (Phrixgnathus) ruforadiata (Punctidae: Punctinae) are described as new species. Both are known only from the central region of the North Auckland Peninsula."} -------------------------------------------------------------------------------- /bib/W2180056793.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.3157/0013-872x(2007)118[193:bopdsa]2.0.co;2", "year": 2007, "abstract": "Information is presented on the distribution, life cycle, and larval feeding habits of Pherbellia inflexa Fisher, whose larvae attack the small land snail Zonitoides arboreus (Zonitidae)."} -------------------------------------------------------------------------------- /src/protocols/decorator_simple.py: -------------------------------------------------------------------------------- 1 | def wrap(func): 2 | def _inner(*args): 3 | print("before call") 4 | func(*args) 5 | print("after call") 6 | return _inner 7 | 8 | @wrap 9 | def original(message): 10 | print(f"original: {message}") 11 | 12 | original("example") 13 | -------------------------------------------------------------------------------- /bib/W4312243670.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1079/cabicompendium.2640", "year": 2022, "abstract": "This datasheet on Achatina fulica covers Identity, Overview, Distribution, Dispersal, Hosts/Species Affected, Diagnosis, Biology & Ecology, Natural Enemies, Impacts, Uses, Prevention/Control, Further Information."} -------------------------------------------------------------------------------- /docs/func/func.tll: -------------------------------------------------------------------------------- 1 | ["seq", 2 | ["set", "double", 3 | ["func", ["num"], 4 | ["add", ["get", "num"], ["get", "num"]] 5 | ] 6 | ], 7 | ["set", "a", 1], 8 | ["repeat", 4, ["seq", 9 | ["set", "a", ["call", "double", ["get", "a"]]], 10 | ["print", ["get", "a"]] 11 | ]] 12 | ] 13 | -------------------------------------------------------------------------------- /docs/protocols/decorator_simple.py: -------------------------------------------------------------------------------- 1 | def wrap(func): 2 | def _inner(*args): 3 | print("before call") 4 | func(*args) 5 | print("after call") 6 | return _inner 7 | 8 | @wrap 9 | def original(message): 10 | print(f"original: {message}") 11 | 12 | original("example") 13 | -------------------------------------------------------------------------------- /src/func/func.tll: -------------------------------------------------------------------------------- 1 | ["seq", 2 | ["set", "double", 3 | ["func", ["num"], 4 | ["add", ["get", "num"], ["get", "num"]] 5 | ] 6 | ], 7 | ["set", "a", 1], 8 | ["repeat", 4, ["seq", 9 | ["set", "a", ["call", "double", ["get", "a"]]], 10 | ["print", ["get", "a"]] 11 | ]] 12 | ] 13 | -------------------------------------------------------------------------------- /bib/W2338193071.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.15560/8.3.537", "year": 2012, "abstract": "Comparison of the shells of a land snail collected in Montreal, Canada with those of several North American and European Discus species resulted in the identification of the Montreal specimens as the European Discus rotundatus."} -------------------------------------------------------------------------------- /bib/W2578118648.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.14203/treubia.v29i4.1549", "year": 1988, "abstract": "Pterocyclus spiroliratus n.sp. a cyclophorid land snail is described from Aceh province, North Sumatra. This second species of the genus described from Sumatra is characterized: by the present of several spiral ribs."} -------------------------------------------------------------------------------- /bib/W3196907885.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.5817/mab2006-5-1", "year": 2006, "abstract": "The occurrence of land snail Subulina octona (Bruguière 1798) (Gastropoda: Subulinidae) is reported from the Czech Republic greenhouse for the first time. Molluscan communities of two new Bohemian greenhouses are characterized."} -------------------------------------------------------------------------------- /bib/W4312943142.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1079/cabicompendium.120728", "year": 2022, "abstract": "This datasheet on Zachrysia provisoria covers Identity, Overview, Distribution, Dispersal, Diagnosis, Biology & Ecology, Environmental Requirements, Natural Enemies, Impacts, Prevention/Control, Further Information."} -------------------------------------------------------------------------------- /bib/W4379196596.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.53447/communc.1202072", "year": 2023, "abstract": "A new record of the species Rumina decollata in Iraq when studying the terrestrial snail community in Diyala Governorate, as it was recorded in 5 sites with different densities for the period from October 2021-May 2022."} -------------------------------------------------------------------------------- /docs/template/z_if.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | check = expander.env.find(node.attrs["z-if"]) 3 | if check: 4 | expander.showTag(node, False) 5 | return check 6 | 7 | def close(expander, node): 8 | if expander.env.find(node.attrs["z-if"]): 9 | expander.showTag(node, True) 10 | -------------------------------------------------------------------------------- /src/oop/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | func_obj.out \ 3 | inherit_class.out \ 4 | inherit_constructor.out \ 5 | inherit_original.out \ 6 | larger.out \ 7 | shapes_class.out \ 8 | shapes_dict.out \ 9 | shapes_original.out \ 10 | spread.out \ 11 | varargs.out 12 | 13 | include ../../examples.mk 14 | -------------------------------------------------------------------------------- /src/template/ex_snippets.ht: -------------------------------------------------------------------------------- 1 | 2 | 3 |
    Important:
    4 |

    Expect three items

    5 |
      6 |
    • 7 | 8 |
    • 9 |
    10 | 11 | 12 | -------------------------------------------------------------------------------- /src/template/z_if.py: -------------------------------------------------------------------------------- 1 | def open(expander, node): 2 | check = expander.env.find(node.attrs["z-if"]) 3 | if check: 4 | expander.showTag(node, False) 5 | return check 6 | 7 | def close(expander, node): 8 | if expander.env.find(node.attrs["z-if"]): 9 | expander.showTag(node, True) 10 | -------------------------------------------------------------------------------- /unused/flow/head.py: -------------------------------------------------------------------------------- 1 | from stage import Stage 2 | 3 | class Head(Stage): 4 | INPUTS = {"input"} 5 | 6 | def __init__(self, num): 7 | super().__init__() 8 | self._num = num 9 | 10 | def _run(self): 11 | data = self._available["input"] 12 | return data[:self._num] 13 | -------------------------------------------------------------------------------- /unused/flow/tail.py: -------------------------------------------------------------------------------- 1 | from stage import Stage 2 | 3 | class Tail(Stage): 4 | INPUTS = {"input"} 5 | 6 | def __init__(self, num): 7 | super().__init__() 8 | self._num = num 9 | 10 | def _run(self): 11 | data = self._available["input"] 12 | return data[-self._num:] 13 | -------------------------------------------------------------------------------- /bib/W2016992826.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1016/0304-3940(92)90508-5", "year": 1992, "abstract": "A recent report suggested that exposures of land snails to 0.1 mT, 60 Hz magnetic fields for periods of 48-120 h increase mortality levels by 2-10 times. In direct experimental tests, we were unable to confirm this effect."} -------------------------------------------------------------------------------- /docs/observe/delay_queue_verbose.py: -------------------------------------------------------------------------------- 1 | from delay_queue import Node, Queue, Source 2 | 3 | queue = Queue() 4 | a = Node(queue, "A") 5 | b = Node(queue, "B") 6 | c = Node(queue, "C") 7 | d = Source(queue, "D") 8 | a.watch(b) 9 | a.watch(c) 10 | b.watch(d) 11 | c.watch(d) 12 | d.notify() 13 | queue.run(verbose=True) 14 | -------------------------------------------------------------------------------- /src/observe/delay_queue_verbose.py: -------------------------------------------------------------------------------- 1 | from delay_queue import Node, Queue, Source 2 | 3 | queue = Queue() 4 | a = Node(queue, "A") 5 | b = Node(queue, "B") 6 | c = Node(queue, "C") 7 | d = Source(queue, "D") 8 | a.watch(b) 9 | a.watch(c) 10 | b.watch(d) 11 | c.watch(d) 12 | d.notify() 13 | queue.run(verbose=True) 14 | -------------------------------------------------------------------------------- /bib/W1607007873.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.4102/satnt.v31i1.348", "year": 2012, "abstract": "This study was conducted to investigate the effects of genetically modified crops onaquatic environments around agricultural land. Fresh water snails indicated effects duringembryonic development, and on the growth rate of survivors."} -------------------------------------------------------------------------------- /bib/W1979650029.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-012-0010-6", "year": 2012, "abstract": "1. Allen J. A. 2004. Avian and mammalian predators of terrestrial gastropods. In: Barker G. M. (ed.). Natural enemies of terrestrial molluscs. CABI Publishing, pp. 1-36. https://doi.org/10.1079/978085.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W2053157284.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-009-0019-7", "year": 2009, "abstract": "1. Browne R. A. 1978. Growth, mortality, fecundity, biomass and productivity of four lake populations of the Prosobranch snail, Viviparus georgianus. Ecology 59: 742-750. https://doi.org/10.2307/193877.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W3203383492.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.54173/f502110", "year": 2018, "abstract": "The land snail Myxostoma petiverianum is previously known from only a few localities in Cambodia and Vietnam. We report on a new record of Myxostoma petiverianum from Hòn Cau, an island in the Côn Đảo Archipelago, south-eastern Vietnam."} -------------------------------------------------------------------------------- /docs/protocols/alternative_design.py: -------------------------------------------------------------------------------- 1 | def decorator(func, label): 2 | def _inner(arg): 3 | print(f"entering {label}") 4 | func(arg) 5 | return _inner 6 | 7 | @decorator("message") 8 | def double(x): # equivalent to 9 | return 2 * x # double = decorator(double, "message") 10 | -------------------------------------------------------------------------------- /docs/protocols/wrap_capture.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(func): 5 | def _inner(value): 6 | print("before call") 7 | func(value) 8 | print("after call") 9 | return _inner 10 | 11 | original = logging(original) 12 | original("example") 13 | -------------------------------------------------------------------------------- /src/protocols/alternative_design.py: -------------------------------------------------------------------------------- 1 | def decorator(func, label): 2 | def _inner(arg): 3 | print(f"entering {label}") 4 | func(arg) 5 | return _inner 6 | 7 | @decorator("message") 8 | def double(x): # equivalent to 9 | return 2 * x # double = decorator(double, "message") 10 | -------------------------------------------------------------------------------- /src/protocols/wrap_capture.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(func): 5 | def _inner(value): 6 | print("before call") 7 | func(value) 8 | print("after call") 9 | return _inner 10 | 11 | original = logging(original) 12 | original("example") 13 | -------------------------------------------------------------------------------- /bib/W2131006941.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1590/s0073-47212009000200001", "year": 2009, "abstract": "Macrocyclis peruvianus (Lamarck, 1822) is a large terrestrial snail which is endemic in Chile. A detailed description of its shell structure, jaw, radula, palial cavity and reproductive system is presented here for the first time."} -------------------------------------------------------------------------------- /bib/W2255386121.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1128/genomea.01362-15", "year": 2016, "abstract": "We report herein the draft mitochondrial genome sequence of Naesiotus nux, a Galápagos endemic land snail species of the genus Naesiotus. The circular genome is 15 kb and encodes 13 protein-coding genes, 2 rRNA genes, and 21 tRNA genes."} -------------------------------------------------------------------------------- /bib/W4210717530.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.54173/f474240", "year": 2015, "abstract": "A new species of genus Bertia Ancey, 1887 is described from Khánh Hòa, Central Vietnam and compared to three species of this genus: Bertia cambojiensis (Reeve, 1860), Bertia pergrandis (Smith, 1893) and Bertia brookei (Adams & Reeve, 1848)."} -------------------------------------------------------------------------------- /bib/W4281733089.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.18332/pht/149611", "year": 2022, "abstract": "1. Adeyeye SAO, Bolaji OT, Abegunde TA, Adesina TO. Processing and utilization of snail meat in alleviating protein malnutrition in Africa: a review. Nutr Food Sci. 2020;50(6):1085-1097. doi:10.1108/NFS-08-2019-0261 CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W4307050444.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.030.022", "year": 2022, "abstract": "Zonites Montfort, 1810 is recorded for the first time from Paros island. As only an old shell was found, the reasons that the populations of this threatened, endemic land snail of the Aegean seem to be declining should be investigated."} -------------------------------------------------------------------------------- /bib/W4309644041.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1130/geol.s.21606078.v1", "year": 2022, "abstract": "<p>A summary of previous studies on the climatic significance of shell δ13C proxy; details of sample measurements and chronology; and the isotopic fluctuations among species and individuals within a single sample unit. </p>"} -------------------------------------------------------------------------------- /bib/W795771333.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.12657/folmal.007.021", "year": 2009, "abstract": "A new zonitid species, probably belonging to Gyralina (Spelaeopatula), is described based on shell material as G . ( S .)? nopcsai . Its exact taxonomic placement requires examination of its anatomical structure, and especially genitalia."} -------------------------------------------------------------------------------- /docs/concur/wait.out: -------------------------------------------------------------------------------- 1 | A 0 work 0/1 2 | B 0 work 0/1 3 | A 1 acquiring 4 | A 1 using 0/3 5 | B 1 acquiring 6 | ...failed to acquire 7 | A 1 using 1/3 8 | A 1 using 2/3 9 | A 1 releasing 10 | B 1 using 0/2 11 | A 2 acquiring 12 | ...failed to acquire 13 | B 1 using 1/2 14 | B 1 releasing 15 | A 2 using 0/1 16 | A 2 releasing 17 | -------------------------------------------------------------------------------- /docs/glob/glob_either.py: -------------------------------------------------------------------------------- 1 | class Either: 2 | def __init__(self, left, right, rest=None): 3 | self.left = left 4 | self.right = right 5 | self.rest = rest 6 | 7 | def match(self, text, start=0): 8 | return self.left.match(text, start) or \ 9 | self.right.match(text, start) 10 | -------------------------------------------------------------------------------- /src/check/page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | Software Design by Example 4 | 5 | 6 |

    Main Title

    7 |

    introductory paragraph

    8 |
      9 |
    • first item
    • 10 |
    • second item is emphasized
    • 11 |
    12 | 13 | 14 | -------------------------------------------------------------------------------- /src/concur/wait.out: -------------------------------------------------------------------------------- 1 | A 0 work 0/1 2 | B 0 work 0/1 3 | A 1 acquiring 4 | A 1 using 0/3 5 | B 1 acquiring 6 | ...failed to acquire 7 | A 1 using 1/3 8 | A 1 using 2/3 9 | A 1 releasing 10 | B 1 using 0/2 11 | A 2 acquiring 12 | ...failed to acquire 13 | B 1 using 1/2 14 | B 1 releasing 15 | A 2 using 0/1 16 | A 2 releasing 17 | -------------------------------------------------------------------------------- /src/glob/glob_either.py: -------------------------------------------------------------------------------- 1 | class Either: 2 | def __init__(self, left, right, rest=None): 3 | self.left = left 4 | self.right = right 5 | self.rest = rest 6 | 7 | def match(self, text, start=0): 8 | return self.left.match(text, start) or \ 9 | self.right.match(text, start) 10 | -------------------------------------------------------------------------------- /bib/W2014076303.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-012-0007-1", "year": 2012, "abstract": "1. Cameron R. A. D., Pokryszko B. M., Horsák M. 2010. Land snail fauna in Polish forests: patterns of richness and composition in a post-glacial landscape. Malacologia 53: 77-134. https://doi.org/10.4002/040.05.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W2015165483.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1038/hdy.1978.102", "year": 1978, "abstract": "A technique is described for obtaining mitotic figures from embryonic tissue. The karyotype is described and some evidence presented of a structural difference between two allopatric populations. The implications of the results are discussed."} -------------------------------------------------------------------------------- /bib/W2035675973.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-009-0011-2", "year": 2009, "abstract": "1. Andreev N. 2006. Assessment of the status of wild population of land snail (escargot) Helix pomatia L. in Moldova: the effect of exploitation. Biodiversity Conserv. 15: 2957-2970. https://doi.org/10.1007/s10531.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W2169225710.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1258/002367794780681606", "year": 1994, "abstract": "A technique for removing blood (haemolymph) by syringe from African land snails (Achatina spp.) is described. The method avoids the need for shell perforation or incision of soft tissues and appears to have few adverse effects on the snail."} -------------------------------------------------------------------------------- /docs/dup/using_sha256.out: -------------------------------------------------------------------------------- 1 | b'h' 2 | aaa9402664f1a41f40ebbc52c9993eb66aeb366602958fdfaa283b71e64db123 3 | b'ha' 4 | 8693873cd8f8a2d9c7c596477180f851e525f4eaf55a4f637b445cb442a5e340 5 | b'has' 6 | 9150c74c5f92d51a92857f4b9678105ba5a676d308339a353b20bd38cd669ce7 7 | b'hash' 8 | d04b98f48e8f8bcc15c6ae5ac050801cd6dcfd428fb5f9e65c4e16e7807340fa 9 | -------------------------------------------------------------------------------- /src/dup/using_sha256.out: -------------------------------------------------------------------------------- 1 | b'h' 2 | aaa9402664f1a41f40ebbc52c9993eb66aeb366602958fdfaa283b71e64db123 3 | b'ha' 4 | 8693873cd8f8a2d9c7c596477180f851e525f4eaf55a4f637b445cb442a5e340 5 | b'has' 6 | 9150c74c5f92d51a92857f4b9678105ba5a676d308339a353b20bd38cd669ce7 7 | b'hash' 8 | d04b98f48e8f8bcc15c6ae5ac050801cd6dcfd428fb5f9e65c4e16e7807340fa 9 | -------------------------------------------------------------------------------- /src/test/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | callable.out \ 3 | find_test_funcs.out \ 4 | func_list.out \ 5 | globals.out \ 6 | globals_plus.out \ 7 | locals.out \ 8 | manual.out \ 9 | runner.out \ 10 | signature.out \ 11 | type_func.out \ 12 | type_int.out \ 13 | type_len.out 14 | 15 | include ../../examples.mk 16 | -------------------------------------------------------------------------------- /src/vm/fill_array.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | # - R2: array index. 5 | # - R3: temporary. 6 | ldc R0 0 7 | ldc R1 3 8 | ldc R2 @array 9 | loop: 10 | str R0 R2 11 | ldc R3 1 12 | add R0 R3 13 | add R2 R3 14 | cpy R3 R1 15 | sub R3 R0 16 | bne R3 @loop 17 | hlt 18 | .data 19 | array: 10 20 | -------------------------------------------------------------------------------- /bib/W2030473835.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1080/09291017509359475", "year": 1975, "abstract": "Abstract Achatina fulica and Succinea sp. follow the rule, “The rain drops knock on the door, and the snail comes out” (Wells, 1944) but Opeas gracile does not follow this rule. In this case emergence is probably controlled by a biological clock."} -------------------------------------------------------------------------------- /bib/W2058058591.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2307/1934934", "year": 1964, "abstract": "Near the equator in Uganda, Limicolaria martensiana, an herbivorous land snail, breeds in all months of the year with peaks in January—February and July. This bimodality in breeding pattern appears associated with the two annual and wet and dry seasons."} -------------------------------------------------------------------------------- /bib/W2071978330.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.2478/v10125-010-0014-z", "year": 2010, "abstract": "1. Andreev N. 2006. Assessment of the status of wild populations of land snail (escargot) Helix pomatia L. in Moldova: The effect of exploitation. Biodiversity and Conserv. 15: 2957-2970. https://doi.org/10.1007/s10531.... CrossRef Google Scholar"} -------------------------------------------------------------------------------- /bib/W4205470646.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.54173/f54149", "year": 2022, "abstract": "Two new species of the land snails in the genus Amphidromus Albers, 1850 from Indonesia, and Vietnam are described: Amphidromus gisellelieae n. sp. from Indonesia, Amphidromus phamvutuanhae n. sp. They are compared to the closest congeners in this genus."} -------------------------------------------------------------------------------- /bib/W4210683561.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.36885/nzdpm.2021.37.263-264", "year": 2022, "abstract": "Arianta arbustorum (Linnaeus, 1758) is a forest species that often inhabits parks. Its distribution in Ukraine is limited to the western region, where it occurs in mountainous, rarely flat habitats of the Carpathians and Podolsk Uplands."} -------------------------------------------------------------------------------- /bib/W4312989597.json: -------------------------------------------------------------------------------- 1 | {"doi": "https://doi.org/10.1079/cabicompendium.26821", "year": 2022, "abstract": "This datasheet on Cornu aspersum covers Identity, Overview, Distribution, Dispersal, Hosts/Species Affected, Diagnosis, Biology & Ecology, Environmental Requirements, Natural Enemies, Impacts, Uses, Prevention/Control, Further Information."} -------------------------------------------------------------------------------- /docs/lint/has_unused_variables.py: -------------------------------------------------------------------------------- 1 | used = 3 2 | distractor = 2 3 | not_used = used + distractor 4 | 5 | 6 | def no_unused(param): 7 | result = 2 * param 8 | return result 9 | 10 | 11 | def has_unused(param): 12 | used = 3 * param 13 | not_used = 2 * param 14 | distractor = "distraction" 15 | return used 16 | -------------------------------------------------------------------------------- /docs/pack/triple.json: -------------------------------------------------------------------------------- 1 | { 2 | "A": { 3 | "3": {"B": ["3", "2"], "C": ["2"]}, 4 | "2": {"B": ["2"], "C": ["2", "1"]}, 5 | "1": {"B": ["1"]} 6 | }, 7 | "B": { 8 | "3": {"C": ["2"]}, 9 | "2": {"C": ["1"]}, 10 | "1": {"C": ["1"]} 11 | }, 12 | "C": { 13 | "2": [], 14 | "1": [] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /docs/protocols/wrap_param.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(func, label): 5 | def _inner(value): 6 | print(f"++ {label}") 7 | func(value) 8 | print(f"-- {label}") 9 | return _inner 10 | 11 | original = logging(original, "call") 12 | original("example") 13 | -------------------------------------------------------------------------------- /docs/vm/fill_array.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | # - R2: array index. 5 | # - R3: temporary. 6 | ldc R0 0 7 | ldc R1 3 8 | ldc R2 @array 9 | loop: 10 | str R0 R2 11 | ldc R3 1 12 | add R0 R3 13 | add R2 R3 14 | cpy R3 R1 15 | sub R3 R0 16 | bne R3 @loop 17 | hlt 18 | .data 19 | array: 10 20 | -------------------------------------------------------------------------------- /src/lint/has_unused_variables.py: -------------------------------------------------------------------------------- 1 | used = 3 2 | distractor = 2 3 | not_used = used + distractor 4 | 5 | 6 | def no_unused(param): 7 | result = 2 * param 8 | return result 9 | 10 | 11 | def has_unused(param): 12 | used = 3 * param 13 | not_used = 2 * param 14 | distractor = "distraction" 15 | return used 16 | -------------------------------------------------------------------------------- /src/pack/triple.json: -------------------------------------------------------------------------------- 1 | { 2 | "A": { 3 | "3": {"B": ["3", "2"], "C": ["2"]}, 4 | "2": {"B": ["2"], "C": ["2", "1"]}, 5 | "1": {"B": ["1"]} 6 | }, 7 | "B": { 8 | "3": {"C": ["2"]}, 9 | "2": {"C": ["1"]}, 10 | "1": {"C": ["1"]} 11 | }, 12 | "C": { 13 | "2": [], 14 | "1": [] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/protocols/wrap_param.py: -------------------------------------------------------------------------------- 1 | def original(value): 2 | print(f"original: {value}") 3 | 4 | def logging(func, label): 5 | def _inner(value): 6 | print(f"++ {label}") 7 | func(value) 8 | print(f"-- {label}") 9 | return _inner 10 | 11 | original = logging(original, "call") 12 | original("example") 13 | -------------------------------------------------------------------------------- /docs/debugger/fill_array.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | # - R2: array index. 5 | # - R3: temporary. 6 | ldc R0 0 7 | ldc R1 4 8 | ldc R2 @array 9 | loop: 10 | str R0 R2 11 | ldc R3 1 12 | add R0 R3 13 | add R2 R3 14 | cpy R3 R1 15 | sub R3 R0 16 | bne R3 @loop 17 | hlt 18 | .data 19 | array: 10 20 | -------------------------------------------------------------------------------- /docs/perf/util.py: -------------------------------------------------------------------------------- 1 | # [eq] 2 | def all_eq(*values): 3 | return (not values) or all(v == values[0] for v in values) 4 | # [/eq] 5 | 6 | # [match] 7 | def dict_match(d, prototype): 8 | if set(d.keys()) != set(prototype.keys()): 9 | return False 10 | return all(isinstance(d[k], prototype[k]) for k in d) 11 | # [/match] 12 | -------------------------------------------------------------------------------- /src/debugger/fill_array.as: -------------------------------------------------------------------------------- 1 | # Count up to 3. 2 | # - R0: loop index. 3 | # - R1: loop limit. 4 | # - R2: array index. 5 | # - R3: temporary. 6 | ldc R0 0 7 | ldc R1 4 8 | ldc R2 @array 9 | loop: 10 | str R0 R2 11 | ldc R3 1 12 | add R0 R3 13 | add R2 R3 14 | cpy R3 R1 15 | sub R3 R0 16 | bne R3 @loop 17 | hlt 18 | .data 19 | array: 10 20 | -------------------------------------------------------------------------------- /src/perf/util.py: -------------------------------------------------------------------------------- 1 | # [eq] 2 | def all_eq(*values): 3 | return (not values) or all(v == values[0] for v in values) 4 | # [/eq] 5 | 6 | # [match] 7 | def dict_match(d, prototype): 8 | if set(d.keys()) != set(prototype.keys()): 9 | return False 10 | return all(isinstance(d[k], prototype[k]) for k in d) 11 | # [/match] 12 | -------------------------------------------------------------------------------- /src/protocols/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS=\ 2 | callable.out \ 3 | decorator_param.out \ 4 | decorator_simple.out \ 5 | mock_object.out \ 6 | wrap_capture.out \ 7 | wrap_infinite.out \ 8 | wrap_param.out 9 | 10 | include ../../examples.mk 11 | 12 | wrap_infinite.out: wrap_infinite.sh wrap_infinite.py 13 | bash $< > $@ 2> /dev/null 14 | --------------------------------------------------------------------------------