{"id":34783291,"url":"https://github.com/omg-shush/lime","last_synced_at":"2026-05-21T12:32:22.182Z","repository":{"id":203631492,"uuid":"424965348","full_name":"omg-shush/lime","owner":"omg-shush","description":"An interpreted, dynamically-typed programming language.","archived":false,"fork":false,"pushed_at":"2021-11-05T14:23:08.000Z","size":123,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-10-26T00:33:22.002Z","etag":null,"topics":["f-sharp","interpreter","language","programming-language"],"latest_commit_sha":null,"homepage":"","language":"F#","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/omg-shush.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}},"created_at":"2021-11-05T13:52:47.000Z","updated_at":"2023-10-26T00:33:27.104Z","dependencies_parsed_at":null,"dependency_job_id":"8df1c86f-e280-47ed-a25e-af790218b250","html_url":"https://github.com/omg-shush/lime","commit_stats":null,"previous_names":["omg-shush/lime"],"tags_count":null,"template":null,"template_full_name":null,"purl":"pkg:github/omg-shush/lime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omg-shush%2Flime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omg-shush%2Flime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omg-shush%2Flime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omg-shush%2Flime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/omg-shush","download_url":"https://codeload.github.com/omg-shush/lime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/omg-shush%2Flime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33300782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"ssl_error","status_checked_at":"2026-05-21T12:22:11.673Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["f-sharp","interpreter","language","programming-language"],"created_at":"2025-12-25T08:58:27.073Z","updated_at":"2026-05-21T12:32:22.177Z","avatar_url":"https://github.com/omg-shush.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lime\n\n### A functional, dynamically-typed language loosely inspired by Lisp and F#.\n\n## The Basics\n\n    \"Hello world!\" -\u003e System.Console.WriteLine\n    \nStrings are strings. The \"-\u003e\" operator takes its left hand side as input and\nfeeds it into the right hand side---a function call.\n\n    System.Console.ReadLine! -\u003e System.Console.Write\n    \nI/O is handled by interoperating with the .NET standard library. Methods under\nthe System namespace are dynamically accessed through reflection, with Lime data\nconverted to and from .NET data as necessary. Currently limited to static\nmethods (since objects can't be represented in Lime yet), with signatures\nusing only the primitives bool, int64, double, string, and char, that don't\nrequire generics/casting. System.Console.Read/Writes and System.Math work well.\n\nThe ! is sugar for \"unit -\u003e NoArgumentFunction\".\n\n    Loop = [ subroutine ]\n        \"I'm in a loop!\" -\u003e System.Console.WriteLine\n        Loop!\n    Loop!\n    \nLoop is a function that prints and then calls itself. The function body is\ndelimited by indentation; **use spaces only**. Note that \"Loop!\" appears twice;\nthe first makes the function always call itself, while the second actually\ninvokes Loop for the first time.\n\n    TwoArgs = [ subroutine ]\n        arg1, arg2 = in\n        (arg1 + \", \" + arg2) -\u003e System.Console.WriteLine\n        \n    (\"nice\", \"meme\") -\u003e TwoArgs\n    \nTuples are constructed by separating their elements with commas \",\". Note that\nparentheses are optional unless required due to nesting or operator precedence\n(in this case, since \"-\u003e\" has a very high precedence, the parentheses\nare necessary).\nFunctions can access their input through the keyword \"in.\" If a function takes\nmultiple arguments, it can \"pattern-match\" within an assignment statement:\nassuming \"in\" is a 2-tuple, \"arg1\" gets the first value and \"arg2\" gets\nthe second value.\n\n    (\"I'm\"; \"the\"; \"same\"; \"list\")\n    (\"I'm\", (\"the\", (\"same\", (\"list\", unit))))\n    \nLime uses Lisp-style lists: a list is either unit, or a 2-tuple of the head of\nthe list and the tail. The semicolon notation is just sugar for hardcoding\nlists.\n\n    WriteAllLines = [ subroutine ]\n        if in == unit then\n            unit\n        else\n            head, tail = in\n            head -\u003e System.Console.WriteLine\n            tail -\u003e WriteAllLines\n            \n    (\"Here\"; \"I\"; \"come\"; \"I\"; \"am\"; \"cinammon!!!\") -\u003e WriteAllLines\n    \nAs in most functional languages, if-then-else is an expression: all branches\nmust be present. Note parentheses in the condition are unnecessary. Also,\n\"if-then-else if-then-else\" works for an arbitrary number of \"-else if-\" cases.\n\nThis is a classic recursive function: the base case, where it is given the empty\nlist, causes it to do nothing (by returning unit). In the recursive case, it\ntakes the top item off the list, does some work with it (printing), and then\nrecurses with the rest of the list. **In functions like this, it's important to\nwait until you know \"in\" is not unit before attempting to pattern match on it,\nas pattern matching on a non-tuple will result in a runtime error.**\n\n    list = (\"Here\"; \"I\"; \"come\"; \"I\"; \"am\"; \"cinammon!!!\")\n    \n    ListIter = [ subroutine ]\n        iterFunc, list = in\n        if list == unit then\n            unit\n        else\n            head, tail = list\n            head -\u003e iterFunc\n            (iterFunc, tail) -\u003e ListIter\n    \n    (System.Console.WriteLine, list) -\u003e ListIter\n    \nAll hail higher-order functions! This language is dynamically typed, but its\ntype would be ListIter: (iterFunc: 'a -\u003e unit) * 'a list -\u003e unit. It\nruns iterFunc on every item in the list, in order. The function we pass in can\nbe a .NET method, as shown above, or any old [ subroutine ] we write.\n\n    List = [ module ]\n        Empty = unit\n        Iter = [ subroutine ]\n            ...\n        Fold = [ subroutine ]\n            ...\n    \nModules can be used to organize related functions and values.\n\n    Read = [ subroutine ]\n        index = in\n        nextLine = System.Console.ReadLine!\n        if nextLine == unit then\n            unit\n        else\n            ((index -\u003e Integer.ToString) + \": \" + nextLine), index + 1\n\n    (System.Console.WriteLine, (Read, 0) -\u003e Seq.Unfold) -\u003e Seq.Iter\n    \nThis is an example of using the higher-order function Seq.Unfold to read lines\nof user input until end-of-stream.\n\n## The Advanced\nCompile Fifth.lime with the following libraries, in order: Bool List Integer Map Seq.\nRun the progoram, type \"1 2 + .\" and hit enter.\n\n    1 2 + .\n    3 OK\n    DONE\n    \nThis is the beginnings of a Forth REPL (get it? Fifth?). The values 1 and 2 are\npushed onto the stack, in order; the word \"+\" adds the top two values on the\nstack; and the word \".\" prints out the top value on the stack.\n\nCurrently, these are the only words known (arbitrary integers, +, and .), but it\nwon't be difficult to expand them. If you look at Fifth@RunLine, you'll see that\nForth code is parsed with a simple Seq.Unfold, and then executed with a\nSeq.Fold. You'll also see how words are defined: the Map \"BasicDictionary\"\nis a dictionary from Forth words like \"+\", \".\", etc. to Lime functions that\nimplement those words---definitions. These definitions, PrintVal and Add, mostly\njust modify the stack. Adding more words is as simple as (a) writing a new Lime\nfunction to implement it, and (b) inserting it as a definition in the\nBasicDictionary.\n\n## Compiling \u0026 Running\n\nCompiling files individually allows you to write code faster, since\nonly the files you've changed need to be recompiled. They compile into a binary\nformat that mirrors the code's representation in memory---it's fast to load,\nbut takes up much more space on disk. Note that compilation doesn't check\nif symbols are valid, so if code depends on other files, those don't need to be specified.\n\n    dotnet run --project path/to/limec.fsproj -- \"Code.lime -\u003e Code.ast\" --target=ast\n    \n    dotnet run --project path/to/limec.fsproj -- \"FirstLib.lime -\u003e FirstLib.ast\" --target=ast\n    \n    dotnet run --project path/to/limec.fsproj -- \"SecondLib.lime -\u003e SecondLib.ast\" --target=ast\n    \nYou can run either a raw code file or a precompiled AST. In either case, you can\nspecify additional \"library\" files to load before running the main program; this\nis necessary for programs to use code from other files. Order matters: the\nlibrary files will be interpreted from left to right, before the main program.\nIf a library file has a dependency, that dependency must come **first** (to the\nleft) of it. Library files are specified by prepending \"-L\" to the file name.\n\n    dotnet run --project path/to/limec.fsproj -- \"Code.lime -\u003e \" --target=intr\n    \n    dotnet run --project path/to/limec.fsproj -- \"Code.lime -\u003e \" --target=intr -LFirstLib.ast -LSecondLib.ast\n    \n    dotnet run --project path/to/limec.fsproj -- \"Code.ast -\u003e \" --target=intr -LFirstLib.ast -LSecondLib.ast\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomg-shush%2Flime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fomg-shush%2Flime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fomg-shush%2Flime/lists"}