{"id":16451745,"url":"https://github.com/tpolecat/basic-dsl","last_synced_at":"2025-03-21T05:30:37.921Z","repository":{"id":7990296,"uuid":"9396318","full_name":"tpolecat/basic-dsl","owner":"tpolecat","description":"Useless embedded DSL and monadic interpreter for BASIC.","archived":false,"fork":false,"pushed_at":"2015-04-30T22:39:42.000Z","size":148,"stargazers_count":41,"open_issues_count":0,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-11T11:09:35.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/tpolecat.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":"2013-04-12T14:38:40.000Z","updated_at":"2025-02-12T19:56:19.000Z","dependencies_parsed_at":"2022-08-28T03:21:11.184Z","dependency_job_id":null,"html_url":"https://github.com/tpolecat/basic-dsl","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/tpolecat%2Fbasic-dsl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fbasic-dsl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fbasic-dsl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fbasic-dsl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpolecat","download_url":"https://codeload.github.com/tpolecat/basic-dsl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244115426,"owners_count":20400572,"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-10-11T10:10:13.697Z","updated_at":"2025-03-21T05:30:37.483Z","avatar_url":"https://github.com/tpolecat.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"Embedded BASIC\n==============\n\nThis is an embedded DSL and pure monadic interpreter for the execrable BASIC language. It's useless but kind of interesting. Still a work in progress, but you can write real programs as things stand. The `examples/` directory has a playable game that I typed in from a book written in 1978. \n\nQuick Start\n-----------\n\nYou can run the examples via `sbt run`. Other than that, check the code out I guess.\n\nAn Example\n------------------\n\nThis is Scala code.\n\n```scala\nimport org.tpolecat.basic.BASIC\n\nobject HelloWorld extends App {\n\n  val b = new BASIC {\n\n    10 PRINT \"HELLO WORLD\"\n    20 INPUT \"WHAT IS YOUR NAME?\" AS N$\n    30 INPUT \"HOW MANY TIMES SHALL I PRINT IT?\" AS N\n    40 IF N \u003c\u003e INT(N) THEN 30\n    50 IF N \u003c 1 THEN 30\n    60 PRINT \"OK THEN:\"\n    70 FOR I IN 1 TO N\n    80 PRINT N$\n    90 NEXT I\n    95 PRINT \"BYE.\"\n\n  }\n\n  b.run.unsafePerformIO()\n\n}\n```\n\nKnown Issues\n------------\n\nWhere shall I begin? First of all, this thing runs BASIC, which can be considered a bug by definition. By other than that:\n\n* The embedded DSL can be improved to support more syntax, and make existing syntax look more natural. This is boring so I haven't spent much time on it.\n* The implementation is mostly pure, but there's a `var` in `BASIC.scala` and I'm not sure how to get rid of it without messing up the surface syntax.\n* Many many other things I haven't thought about.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpolecat%2Fbasic-dsl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpolecat%2Fbasic-dsl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpolecat%2Fbasic-dsl/lists"}