{"id":13995735,"url":"https://github.com/louisdh/lioness","last_synced_at":"2025-04-15T11:24:10.792Z","repository":{"id":56919840,"uuid":"92986062","full_name":"louisdh/lioness","owner":"louisdh","description":"The Lioness Programming Language","archived":false,"fork":false,"pushed_at":"2018-02-07T20:55:36.000Z","size":811,"stargazers_count":170,"open_issues_count":10,"forks_count":15,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-12T21:35:38.703Z","etag":null,"topics":["ast","bytecode","compiler","interpreter","lexer","parser","virtual-machine"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/louisdh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-31T20:30:21.000Z","updated_at":"2024-12-15T14:18:19.000Z","dependencies_parsed_at":"2022-08-21T04:20:18.611Z","dependency_job_id":null,"html_url":"https://github.com/louisdh/lioness","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisdh%2Flioness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisdh%2Flioness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisdh%2Flioness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/louisdh%2Flioness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/louisdh","download_url":"https://codeload.github.com/louisdh/lioness/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249059268,"owners_count":21206125,"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":["ast","bytecode","compiler","interpreter","lexer","parser","virtual-machine"],"created_at":"2024-08-09T14:03:34.083Z","updated_at":"2025-04-15T11:24:10.772Z","avatar_url":"https://github.com/louisdh.png","language":"Swift","funding_links":["https://paypal.me/louisdhauwe"],"categories":["Swift"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cb\u003e Lioness \u003c/b\u003e \u0026bull;\n  \u003ca href=\"https://github.com/louisdh/cub\"\u003eCub\u003c/a\u003e \u0026bull;\n    \u003ca href=\"https://github.com/louisdh/savannakit\"\u003eSavannaKit\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"docs/resources/readme/logo.png\" alt=\"Lioness Logo\" style=\"max-height: 300px\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eThe Lioness Programming Language\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://travis-ci.org/louisdh/lioness\"\u003e\u003cimg src=\"https://travis-ci.org/louisdh/lioness.svg?branch=master\" alt=\"Travis build status\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://codecov.io/gh/louisdh/lioness\"\u003e\u003cimg src=\"https://codecov.io/gh/louisdh/lioness/branch/master/graph/badge.svg\" alt=\"Codecov\"/\u003e\u003c/a\u003e\n\u003cbr\u003e\n\u003cimg src=\"https://img.shields.io/badge/version-0.5.2-blue.svg\" style=\"max-height: 300px;\" alt=\"version 0.5.2\"\u003e\n\u003ca href=\"https://github.com/Carthage/Carthage\"\u003e\u003cimg src=\"https://img.shields.io/badge/Carthage-compatible-4bc51d.svg?style=flat\" style=\"max-height: 300px;\" alt=\"Carthage Compatible\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://developer.apple.com/swift/\"\u003e\u003cimg src=\"https://img.shields.io/badge/Swift-4.0.2-orange.svg?style=flat\" style=\"max-height: 300px;\" alt=\"Swift\"/\u003e\u003c/a\u003e\n\u003cimg src=\"https://img.shields.io/badge/Platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-lightgrey.svg\" style=\"max-height: 300px;\" alt=\"Platform: iOS macOS tvOS watchOS\"\u003e\n\u003cimg src=\"https://img.shields.io/badge/extension-.lion-FF9C27.svg\" style=\"max-height: 300px;\" alt=\"Extension: .lion\"\u003e\n\u003cbr\u003e\n\u003ca href=\"http://twitter.com/LouisDhauwe\"\u003e\u003cimg src=\"https://img.shields.io/badge/Twitter-@LouisDhauwe-blue.svg?style=flat\" style=\"max-height: 300px;\" alt=\"Twitter\"/\u003e\u003c/a\u003e\n\u003ca href=\"https://paypal.me/louisdhauwe\"\u003e\u003cimg src=\"https://img.shields.io/badge/Donate-PayPal-green.svg?style=flat\" alt=\"Donate via PayPal\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nLioness is a high-level, dynamic, programming language designed for mathematical purposes. This project includes a lexer, parser, compiler and interpreter. All of these are 100% written in Swift without dependencies. \n\nThe syntax of Lioness is inspired by Swift, and its feature set is akin to shader languages such as GLSL.\n\nThe standard library (abbreviated: stdlib) contains basic functions for number manipulation, including: max/min, ceil, floor, trigonometry, etc. However, more trivial functions, such as to calculate prime numbers, are not considered relevant for the standard library.\n\n\n## Source examples\nThe following Lioness code calculates factorials recursively:\n\n```swift\nfunc factorial(x) returns {\n\t\n    if x \u003e 1 {\n        return x * factorial(x - 1)\n    }\n\t\n    return 1\n}\n\na = factorial(5) // a = 120\n```\n\nThe following Lioness code uses a ```do times``` loop:\n\n```swift\na = 1\nn = 10\ndo n times {\n    a += a\n}\n// a = 1024\n```\n\n*More examples can be found [here](Source%20examples).*\n\n## Features\n\n* Minimalistic, yet expressive, syntax\n* No type system, language is dynamic\n* 5 basic operators: ```+```, ```-```, ```/```, ```*``` and ```^```\n\t* ```^``` means \"to the power of\", e.g. ```2^10``` equals 1024\n\t* all operators have a shorthand, e.g. ```+=``` for ```+```\n* Numbers\n\t* All numbers are floating point \n* Booleans\n\t* Can be evaluated from comparison\n\t* Can be defined by literal: ```true``` or ```false``` \n* Functions\n\t* Supports parameters, returning and recursion \n\t* Can be declared inside other functions\n* Structs\n\t* Can contain **any** type, including other structs  \n* Loops\n\t* ```for```\n\t* ```while```\n\t* ```do times```\n\t* ```repeat while```\n\t* ```break```\n\t* ```continue```\n* ```if``` / ```else``` / ```else if``` statements\n\n## Running\nSince the project does not rely on any dependencies, running it requires no setup. \n\n### macOS\nOpen ```Lioness.xcworkspace``` (preferably in the latest non-beta version of Xcode) and run the ```macOS Example``` target. The example will run the code in ```A.lion```. The output will be printed to the console.\n\n## Installing framework\n \n### Using Swift Package Manager\n\nAdd to your `Package.swift` file's `dependencies` section:\n\n```swift\n.Package(url: \"https://github.com/louisdh/lioness.git\",\n\t\t         majorVersion: 0, minor: 5)\n```\n\n### Using [CocoaPods](http://cocoapods.org)\n\nAdd the following line to your ```Podfile```:\n\n```ruby\npod 'Lioness', '~\u003e 0.5'\n```\n\n### Using [Carthage](https://github.com/Carthage/Carthage)\nAdd the following line to your ```Cartfile```:\n\n```ruby\ngithub \"louisdh/lioness\" ~\u003e 0.5\n```\nRun ```carthage update``` to build the framework and drag the built ```Lioness.framework``` into your Xcode project.\n\n\n## Standard Library\n*Please note: Lioness is currently in beta*\n\nThe Standard Library is currently under active development. There currently is no one document with everything from the stdlib. The best place to look for what's available is in [the source files](Sources/Lioness/Standard%20Library/Sources/).\n\n## Roadmap\n- [x] Structs\n- [ ] Completion suggestions (given an incomplete source string and insertion point)\n- [ ] Breakpoint support in interpreter\n- [ ] Stdlib documentation (Dash?)\n- [ ] Compiler warnings\n- [ ] Compiler optimizations\n- [x] Faster Lexer (without regex)\n- [x] Support emoticons for identifier names\n- [ ] ```guard``` statement\n- [ ] A lot more unit tests\n- [x] Linux support\n\n## Xcode file template\nLioness source files can easily be created with Xcode, see [XcodeTemplate.md](XcodeTemplate.md) for instructions.\n\n\n## Architecture\nA detailed explanation of the project's architecture can be found [here](docs/Architecture.md).\n\n## License\n\nThis project is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisdh%2Flioness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flouisdh%2Flioness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flouisdh%2Flioness/lists"}