{"id":23905747,"url":"https://github.com/jasonsbarr/liszt","last_synced_at":"2026-06-13T02:33:43.506Z","repository":{"id":62971095,"uuid":"558636706","full_name":"jasonsbarr/liszt","owner":"jasonsbarr","description":"A prototypal object oriented language that borrows heavily from functional programming concepts and languages","archived":false,"fork":false,"pushed_at":"2022-12-15T00:13:36.000Z","size":572,"stargazers_count":1,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-23T12:59:41.236Z","etag":null,"topics":["bidirectional-typechecking","functional-programming","generics","language","object-oriented","programming-language","programming-languages","prototypal","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jasonsbarr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-28T00:41:36.000Z","updated_at":"2022-11-19T03:21:08.000Z","dependencies_parsed_at":"2023-01-29T01:30:59.913Z","dependency_job_id":null,"html_url":"https://github.com/jasonsbarr/liszt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jasonsbarr/liszt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonsbarr%2Fliszt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonsbarr%2Fliszt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonsbarr%2Fliszt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonsbarr%2Fliszt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonsbarr","download_url":"https://codeload.github.com/jasonsbarr/liszt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonsbarr%2Fliszt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34270414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bidirectional-typechecking","functional-programming","generics","language","object-oriented","programming-language","programming-languages","prototypal","typescript"],"created_at":"2025-01-05T01:17:26.580Z","updated_at":"2026-06-13T02:33:43.491Z","avatar_url":"https://github.com/jasonsbarr.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Liszt Programming Language\n\nProgramming language that seeks to incorporate the best aspects of both functional and object oriented programming\n\nThis repo may end up being a prototype as I'm experimenting with bidirectional type checking.\n\nWritten with TypeScript v4.8.4.\n\n## Basic Concepts\n\nLiszt is a gradually typed language with bidirectional type checking, which means type annotations can be omitted and many types will still be inferred from the expressions. The one place where type annotations are really useful is function parameters and sometimes the function return type, but if you omit these your program will still work (albeit without static type checking).\n\nLiszt is object-oriented with prototypes, but also has first-class functions and other functional programming features.\n\nThe syntax is inspired by Ruby and Python. The type system is inspired by TypeScript.\n\nLiszt compiles to JavaScript, so it can be used both for browser-based applications and on the server via Node.js.\n\n## Credits\n\nThe type checker implementation owes a great deal to Jake Donham's [Reconstructing TypeScript](https://jaked.org/blog/2021-09-07-Reconstructing-TypeScript-part-0) series.\n\n## Syntax\n\nComments start with a semicolon and continue to the end of the line.\n\nThere are literals for Integer, Float, String, Boolean, Symbol, Object, Tuple, Vector, and Nil types.\n\n```ruby\n17\n3.14\n\"hello, world\"\ntrue\n:thisIsASymbol\n{ type: \"Person\", name: \"Jason\", age: 42 }\n(1, false, \"hello\", { value: 42 })\nvec[1, 2, 3]\nnil\n```\n\nNote that both Integer and Float are subtypes of Number, so they can be mixed together in most operations (need to fix this).\n\nDeclare variables with `var` and constants with `const`. Note that if you reassign a variable the new value must be of the same type as the one it was declared with.\n\n```ruby\nvar changeMe = \"I can be changed!\"\nconst cantChangeMe = \"Try to change me and it will throw an error\"\n\nchangeMe = 42 ;=\u003e Type error!\n```\n\nDefine functions with the `def` keyword and end the body with `end`. Note that we strongly recommend using type annotations with the function parameters, though a return type annotation is not necessary. If you don't annotate the function parameters, they will be typed as Any which basically turns off the type checker.\n\n```ruby\ndef inc(x: integer)\n    x + 1\nend\n```\n\nIf you want to annotate the return type you can do that too; sometimes it's a big help to the type checker (especially with recursive functions).\n\n```ruby\ndef fib(n: integer): integer\n    if n == 0\n        1\n    else\n        n * fib(n - 1)\nend\n```\n\nYou can also just assign a lambda to a variable (though a lambda must use an explicit block if you want its body to include more than a single expression). Note the function type annotation - it's not necessary, but it does help the type checker out! When there's no function type annotation, function parameters that are not individually annotated get typed as Any.\n\n```ruby\nconst inc: (x: integer) =\u003e integer = (x) =\u003e x + 1\n```\n\nYou can use type variables in your function definitions for parametric polymorphism. Type variables start with a single quote character.\n\n```ruby\ndef id(x: 'a)\n    x\nend\n```\n\nIterate over vectors with for statements.\n\n```ruby\nvar sum = 0\n\nfor n in vec[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\n  sum = n + 1\nend\n\nsum == 55  ;=\u003e true\n```\n\nYou can also create your own types as aliases for built-in types, tuple types, and object types.\n\n```ruby\n; Object type\ntype Point = { x: number, y: number }\n\n; Intersection type\ntype Point3D = Point \u0026 { z: number }\n\n; Union type\ntype Coordinate =\n    { type: \"Cartesian\", x: number, y: number }\n  | { type: \"Polar\", angle: number, magnitude: number }\n\n; Function type\ntype Adder = (x: number) =\u003e number\n\n; Curried function type\ntype AdderMaker = (x: number) =\u003e (y: number) =\u003e number\n\n; Tuple type\ntype Coord = (number, number)\n```\n\nYou can also use type variables to create generic types, with no concrete type annotations needed.\n\n```ruby\ntype Box = { value: 'a }\nvar boxedNum: Box = { value: 5 }\n```\n\nNote that types are structural, not nominal, so an unannotated object with all the same property types as a defined type will check properly for that type.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonsbarr%2Fliszt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonsbarr%2Fliszt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonsbarr%2Fliszt/lists"}