{"id":18952204,"url":"https://github.com/lastaapps/lispik","last_synced_at":"2025-06-14T14:07:30.306Z","repository":{"id":129743719,"uuid":"583717261","full_name":"Lastaapps/Lispik","owner":"Lastaapps","description":"TinyList interpreter - TinyList is a small subset of Lisp constructs. This project contains a lexer, parser, compiler and SECD virtual machine.","archived":false,"fork":false,"pushed_at":"2022-12-30T17:40:06.000Z","size":176,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-02T01:16:04.837Z","etag":null,"topics":["arrow-kt","ctu","ctu-fit","kotlin","lisp","lisp-interpreter","tiny-lisp"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lastaapps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-30T17:16:25.000Z","updated_at":"2023-02-03T12:00:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"22afa48d-93eb-4fc2-aa0a-bd6914252391","html_url":"https://github.com/Lastaapps/Lispik","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lastaapps/Lispik","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2FLispik","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2FLispik/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2FLispik/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2FLispik/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lastaapps","download_url":"https://codeload.github.com/Lastaapps/Lispik/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastaapps%2FLispik/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259827663,"owners_count":22917713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arrow-kt","ctu","ctu-fit","kotlin","lisp","lisp-interpreter","tiny-lisp"],"created_at":"2024-11-08T13:31:34.630Z","updated_at":"2025-06-14T14:07:30.273Z","avatar_url":"https://github.com/Lastaapps.png","language":"Kotlin","readme":"# Lispík - TinyLisp interpreter\n\nTinyList is an implementation of a Lisp like language. This project contains lexer, parser, compiler and VM for running\nList programs. It uses SECD machine under the hood.\n\nIt was developed by Petr Laštovička as semester theses for the subject Programing paradigms at the Faculty of\nInformation technology CTU Prague University in 2022.\n\n## Example usage\n\n### Building\n\nProject uses Gradle system to build. Open it in IntelliJ or run the `build.sh` script.\n\n### Differences from standard SECD\n\nTo implement function calling, I modified semantics of some SECD compiler instructions.\nThe bottom of the environment stack stores functions and instructions respect it.\nAccessing function env is done using the `Ld [-1 . x]`.\nYou can disable this behaviour with a flag, but then `defun` cannot be used.\n\n### Running\n\nCode is written in Kotlin, compile JVM version is set to **Java 11**.\nYou can run the generated jar using the `run.sh args` script for better convenience.\nTo view all the options, run `run.sh -h`.\nThe script opens REPL by default, it accepts a filename as argument to load functions from.\nAlso, expressions in that files are evaluated and printed.\nThis is the only way to load functions, REPL will show an error if you try to do it later.\n\n### Supported build-ins\n\nTo view supported build-ins, view the `src/main/kotlin/domain/model/Node.kt` and `FunToken.kt` files.\n\n### Supported SECD instructions\n\nTo view supported SECD instructions, view the `src/main/kotlin/domain/model/ByteCode.kt` and `ByteInstructions.kt`\nfiles.\n\n### Tokens, parsing, compilation, runtime\n\nView the adequate package in the `src/main/kolin/data` folder.\n\n### Example inputs\n\nExample inputs are located in the 'lispik/examples' folder.\n\nOf course there are many more in the tests inside the project\n\n*let syntax is Tiny as this Lisp, multiple variables in one statement is not supported\nand therefore the syntax is only with one bracket pair (for now).*\n\n```shell\n# Basic REPL\n./run.sh\n# Merge sort lib, call '(merge-sort x)` from REPL\n./run.sh examples/merge-sort.lsp\n# Factorial implemented using defun\n./run.sh examples/factorial.lsp\n# Factorial implemented using letrec (cannot be called from REPL obviously),\n# see eval res when repl is started or use the -e option\n./run.sh examples/factorial-recursive.lsp\n# Map and fold implementation working just fine\n./run.sh examples/map-fold.lsp\n# Showcase of same basic math operators in action\n./run.sh examples/pow-mod.lsp\n# Write two numbers and you will get list of operators applied to them\n# Then enter a list and you will get it's last element\n./run.sh examples/read-print.lsp\n```\n\n### Testing\n\nTokenizer, Parser and Compiler with VM are located in the `src/test/kotlin/data` folder.\n\n## Sources\n\n- https://courses.fit.cvut.cz/BIE-PPA/files/lectures/BIE-PPA-7.pdf\n- https://gitlab.fit.cvut.cz/BI-PPA/bi-ppa\n- https://gitlab.fit.cvut.cz/majpetr/tinylisp\n- Peter Kogge: Architecture of Symbolic Computers\n\n## License\nProject is licensed under the GNU GPL version 3.0 license.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastaapps%2Flispik","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flastaapps%2Flispik","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastaapps%2Flispik/lists"}