{"id":27957796,"url":"https://github.com/funnyboy-roks/stark","last_synced_at":"2025-05-07T18:14:42.771Z","repository":{"id":289022211,"uuid":"969868229","full_name":"funnyboy-roks/stark","owner":"funnyboy-roks","description":"A strictly-typed stack-based compiled programming language","archived":false,"fork":false,"pushed_at":"2025-04-28T05:00:22.000Z","size":119,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T18:14:37.513Z","etag":null,"topics":["programming-language","rust","stack-based"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/funnyboy-roks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2025-04-21T04:19:32.000Z","updated_at":"2025-05-07T03:57:56.000Z","dependencies_parsed_at":"2025-04-21T05:46:51.139Z","dependency_job_id":null,"html_url":"https://github.com/funnyboy-roks/stark","commit_stats":null,"previous_names":["funnyboy-roks/stark"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fstark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fstark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fstark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/funnyboy-roks%2Fstark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/funnyboy-roks","download_url":"https://codeload.github.com/funnyboy-roks/stark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931542,"owners_count":21827112,"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":["programming-language","rust","stack-based"],"created_at":"2025-05-07T18:14:42.026Z","updated_at":"2025-05-07T18:14:42.756Z","avatar_url":"https://github.com/funnyboy-roks.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# stark\n\nA stack-based compiled programming language\n\n## Examples\n\n```zig\nextern fn printf(ptr ...) -\u003e (i64);\n\n\"hello world\" printf\n```\n\n```zig\n// 5 4 3 2 1\n5 while dup 0 = ! {\n    dup c\"%d\\n\" printf(2) drop\n    1 -\n} drop\n```\n\n## TODO\n\n- [x] Compilation\n- [x] Loops\n    - [ ] Labels: `'x` `while'x` (I like the idea of having this \"tick\" syntax like rust)\n    - [ ] break: `break` or `break'x` -- still need to check that the stack has not changed\n- [x] Conditionals (see [conditionals.st](./examples/conditional.st))\n    - [x] `then`\n    - [x] `else`\n    - [ ] `switch`? \n- [ ] Error handling\n    - [ ] Report good type errors\n    - [ ] Continue after error and report all at once\n- [ ] Non-decimal integer literals\n- [x] Full suite of numbers: i8, i16, i32, i64, u8, u16, u32, u64\n- [x] Miette + thiserror for better errors\n- [x] Type system\n    - [x] Somehow validate that functions are using the correct args\n- [ ] Functions\n    - [x] Extern functions\n        - `extern fn strlen(ptr) -\u003e (i64);`\n        - [ ] Ability to change the linker symbol for this function- not\n          sure on the syntax yet:\n          ```zig\n          extern fn strlen(ptr) -\u003e (i32) @extern(\"strlen\");\n          extern(\"strlen\") fn strlen(ptr) -\u003e (i32);\n          extern fn strlen(ptr) -\u003e (i32) @ \"strlen\";\n          ```\n    - [x] User-defined functions\n        - `fn double(i64) -\u003e (i64) { dup + }`\n        - type check function: stack = args, compile body, assert(stack = results)\n        - [ ] Need to see if we can clean up the generated assembly\n        - [ ] Ideally use linux calling convention so we can export the\n          functions for use from other langauges\n- [ ] Macros\n- [ ] Modules\n    - [ ] Imports\n    - [ ] Namespaces\n- [x] Linking with libc\n- [ ] Better CLI\n- [ ] structs\n- [ ] pointers\n    - [ ] Typed pointers\n        - [ ] Smarter pointer increments (like C)\n    - [ ] Fat pointers for things like strings\n- [x] c-strings (null-terminated strings)\n    - `c\"hello\"` -\u003e `\"hello\", 0`\n- [ ] Auto drop (and other global directives):\n    - `@auto_drop` at top of file or something\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyboy-roks%2Fstark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffunnyboy-roks%2Fstark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffunnyboy-roks%2Fstark/lists"}