{"id":13782514,"url":"https://github.com/karlredgate/forth","last_synced_at":"2026-01-21T20:44:31.383Z","repository":{"id":6008016,"uuid":"7231193","full_name":"karlredgate/forth","owner":"karlredgate","description":"A toy Forth interpreter to demonstrate how Forth works.","archived":false,"fork":false,"pushed_at":"2023-10-06T13:57:18.000Z","size":69,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-17T17:43:23.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karlredgate.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}},"created_at":"2012-12-18T22:04:51.000Z","updated_at":"2023-10-06T13:57:22.000Z","dependencies_parsed_at":"2024-04-24T12:02:06.153Z","dependency_job_id":null,"html_url":"https://github.com/karlredgate/forth","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlredgate%2Fforth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlredgate%2Fforth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlredgate%2Fforth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karlredgate%2Fforth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karlredgate","download_url":"https://codeload.github.com/karlredgate/forth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253588750,"owners_count":21932318,"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":[],"created_at":"2024-08-03T18:01:38.330Z","updated_at":"2026-01-21T20:44:31.351Z","avatar_url":"https://github.com/karlredgate.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"Forth\n=====\n\nA toy Forth interpreter to demonstrate how Forth works.\n\nI wrote this a few years ago as a demonstration of a Forth interpreter\nentirely in C.  It is a pseudo-ITC implementation. This is still a \nwork in progress.\n\nThis will only build on 32 bit machines currently.\n\n--------------------------\n\nNOTES:\n-----\nThis cannot be linked static currently, because the readline library\ncalls getpwnam and the current libc.a uses nss calls which require\ndynamic linking to work.\n\nIf stacks were initialized before the dictionary was created - could\nwords be executed to build the dictionary?  Is this worthwhile?\n\nBugs:\n\no  executable-name is being set incorrectly\no  Need bye defined earlier in the system ... so it can be used in the\n   cold-chain\no  #user seems to have a bogus value once the interpreter is up\n   it looks like it has an acf stored there instead of a user#\no  outer interpreter doesn't compile literals while in compile mode (FIXED)\no  u. in hex is printing garbage (FIXED 7jul99)\no  find doesn't check smudge bit when searching\n   - fix search-wordlist in vocabulary.c\no  Decompiler bugs:\n   - need special treatment for compile ... read next word .name\n     then jump past to next word\n   - doesn't report immediate-ness\no  Need to track top of memory and realloc when we use it all.\n\nToDo:\n\n1  Add library search path code to find .fth files to load;\n   add autoload search for file in library code to find words.\n2  Change $find code to be faster.\n3  Add w@, c@ ... short char words\n\no  Fix so missing base.fth gives error - bus doesn't die!!\no  Fix \"words\" so it uses the top of context instead of current\n  (see words.fth)\no  Add words for ELF handling\no  Signal handling for Linux\n\no  Maybe move unnest from primitives to kernel.c - then move cold-code\n   first definition from primitive to kernel\no  Change the \"not found\" functionality to try and do an autoload??\no  Maybe change control flow words to be in compiler vocabulary\n   and make : change search order ??\no  Need to use a search path for loading forth files\no  Change fileio words to use mmap\no  Change hide reveal immediate words to have sub words that work\n   on an xt then have these words use lastacf mumble to set the bits\no  Be cool to implement the memory allocation wordset as brk/sbrk\n   but - need to remove readline first, because it uses malloc and\n   you can't mix malloc usage and brk/sbrk.\no  implement unloop ... alias of leave ??\no  implement case statement\no  implement forget and marker\no  Add : split  ( adr len -- adr1 len1 ... adrn lenn n ) \\ char to split on\no  Add argv and envp to the environment ... pass as arguments to StartVM ??\n   - maybe add to unix.c and make an array of pointers to counted strings\no  Add fload .forthrc to cold\no  Maybe provide access to dlopen ... and use that to implement the ELF\n   vocabulary.\n   --- generate dlopen ( adr len -- fid )\n       which reads the DLL and generates a vocabulary called the\n       name of the file with words for wach function in the file?\no  Add cmd line args to the stack, parse args in cold  (DONE)\no  Add defer words ... maybe call them vector ... then change included\n   to use this for printing file names when loaded.  (DONE)\no  Forth debugger\n   [ change NEXT implementation to save context and prompt (or to\n   print current word and stack and prompt)]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlredgate%2Fforth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarlredgate%2Fforth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarlredgate%2Fforth/lists"}