{"id":13782929,"url":"https://github.com/Mithreindeir/nom","last_synced_at":"2025-05-11T16:33:33.083Z","repository":{"id":216005201,"uuid":"77248243","full_name":"Mithreindeir/nom","owner":"Mithreindeir","description":"First Attempt at a Toy Language Interpreter","archived":false,"fork":false,"pushed_at":"2018-03-03T05:04:02.000Z","size":163,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-08-03T18:17:10.882Z","etag":null,"topics":["interpreted-programming-language","interpreter","programming-language"],"latest_commit_sha":null,"homepage":"","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/Mithreindeir.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":"2016-12-23T20:08:04.000Z","updated_at":"2023-09-28T10:38:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"4d7c6e0a-c91b-4657-b5a7-7bc77e6f8ba1","html_url":"https://github.com/Mithreindeir/nom","commit_stats":null,"previous_names":["mithreindeir/nom"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithreindeir%2Fnom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithreindeir%2Fnom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithreindeir%2Fnom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mithreindeir%2Fnom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mithreindeir","download_url":"https://codeload.github.com/Mithreindeir/nom/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253596029,"owners_count":21933496,"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":["interpreted-programming-language","interpreter","programming-language"],"created_at":"2024-08-03T18:01:48.341Z","updated_at":"2025-05-11T16:33:32.852Z","avatar_url":"https://github.com/Mithreindeir.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# Nom\n\n[![Build Status](https://upload.wikimedia.org/wikipedia/commons/f/f8/License_icon-mit-88x31-2.svg)]()\n[![Build Status](https://travis-ci.org/Mithreindeir/nom.svg?branch=master)](https://travis-ci.org/Mithreindeir/Nom)\n\n\nNom lang is a dynamically typed lightweight functional language focusing on simplicity and embeddability.It is currently dynamically scoped, but lexical scope is being worked on. At the moment automatic memory managment is limited to reference counting, so avoid circular references. The Standard Library is currently being implemented, and not all functionality is there.\n\n## Install\nTo install on linux, run the install.sh script. Any program you make will require you to type \"nom program_name\" or just add #!/usr/bin/nom to the beginning of the scripts to specify which interpreter to use. REPL isn't well tested. Examples are in tests folder.\n\n\nExample factorial program written in Nom:\n\n\n    var factorial = function(n):\n      if n \u003c= 1:\n        return n\n      end\n      else:\n        return n * factorial(n-1)\n      end\n    end\n    \n    var f = factorial(5)\n    print(f)\n\n## Nom vm\nNom runs on a stack based virual machine, and nom code is compiled to nom bytecode before it is executed in the vm, so technically it could be adapted to be a compiled language, but for now it is interpreted.\n\n## Basic usage\nA codeblock starts with a colon and ends with an end statement. This is used for everything that would require a codeblock, eg: conditionals, loops, functions.\n\nOne line comments can be used with \"#\"\n\nIf, else if and else statements\n\n    if condition:\n        #Do something\n    end\n    elseif condition:\n        #Do something else\n    end\n    else:\n        #DO something else\n    end\nLoops\n  \n    while condition:\n        #do this\n    end\n    for var i=start, i\u003cend, i++:\n        #Do something\n    end\n\nFunctions\n\n    var foo = function(arg):\n        #Do things\n    end\n    \n    foo(5)\nObjects\n    \n    var foo = array()\n    foo.a = 5\n    foo.b = \"Dog\"\n    var b = foo\n    print(b.a, \" \", b.b, \"\\n\")\nArrays\n\n    var arr = array()\n    arr[0] = \"Dog\"\n    arr[1] = 1\n    arr[2].a = \"abcdef\"\n    var s=size(arr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMithreindeir%2Fnom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMithreindeir%2Fnom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMithreindeir%2Fnom/lists"}