{"id":13577823,"url":"https://github.com/brownplt/pyret-lang","last_synced_at":"2025-04-05T15:31:36.727Z","repository":{"id":5499429,"uuid":"6698407","full_name":"brownplt/pyret-lang","owner":"brownplt","description":"The Pyret language.","archived":false,"fork":false,"pushed_at":"2025-03-24T19:44:04.000Z","size":489554,"stargazers_count":1084,"open_issues_count":442,"forks_count":112,"subscribers_count":41,"default_branch":"horizon","last_synced_at":"2025-04-04T17:53:53.675Z","etag":null,"topics":["compiler","education","language","pyret"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brownplt.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,"publiccode":null,"codemeta":null}},"created_at":"2012-11-15T02:28:16.000Z","updated_at":"2025-03-24T19:44:07.000Z","dependencies_parsed_at":"2025-01-08T00:17:37.231Z","dependency_job_id":"3fcfce4b-c6e5-4ec8-be9d-c66c168ca23e","html_url":"https://github.com/brownplt/pyret-lang","commit_stats":{"total_commits":6017,"total_committers":66,"mean_commits":91.16666666666667,"dds":0.6657802891806548,"last_synced_commit":"6d4c46cd866784e3d33d5b668b0f57b3c690d8cb"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownplt%2Fpyret-lang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownplt%2Fpyret-lang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownplt%2Fpyret-lang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brownplt%2Fpyret-lang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brownplt","download_url":"https://codeload.github.com/brownplt/pyret-lang/tar.gz/refs/heads/horizon","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226204,"owners_count":20904465,"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":["compiler","education","language","pyret"],"created_at":"2024-08-01T15:01:24.642Z","updated_at":"2025-04-05T15:31:31.702Z","avatar_url":"https://github.com/brownplt.png","language":"JavaScript","readme":"\n![Yarr](https://raw.github.com/brownplt/pyret-lang/master/img/pyret-banner.png)\n\n[![Build Status](https://travis-ci.com/brownplt/pyret-lang.svg?branch=horizon)](https://travis-ci.com/github/brownplt/pyret-lang)\n\nA scripting language.\n\nTo learn about the language, visit [pyret.org](http://pyret.org).\n\nTo read an introduction of the language, visit [the tour](http://www.pyret.org/docs/latest/A_Tour_of_Pyret.html).\n\nTo read the documentation, visit [pyret.org/docs/](http://pyret.org/docs/).\n\nThere are three main ways to use Pyret:\n\n1.  If all you want to do is program in Pyret, there is a web-based\nenvironment at [code.pyret.org](https://code.pyret.org) that lets you run\nand save programs that should be all you need.  If you're a student using\nPyret, this is probably where you will do your assignments, for example.\n\n2. If all you want to do is program in Pyret **at the command line**, you\nshould install `pyret-npm` from https://www.npmjs.com/package/pyret-npm,\nusing an install command like:\n\n    ```\n    npm install -g pyret-npm\n    ```\n\n    (If you're new to `node` and `npm`, you might find\n    https://nodejs.dev/learn/an-introduction-to-the-npm-package-manager and\n    https://nodejs.dev/learn/npm-global-or-local-packages useful\n    background).\n\n2.  If you want to contribute to Pyret, or try out experimental features,\nthe README starting below is for you.\n\nThe use of vocabulary from\nhttp://bvipirate.com/piratespeak/index.html is recommended when\ncommenting and reporting issues.\n\n\nInstalling\n----------\n\nFirst, make sure you've installed [Node \u003e= 6](http://nodejs.org).  Then run:\n\n    $ npm install\n    $ make\n    $ make test\n\nIt'll build the Pyret compiler and run the tests.\n\nRunning Pyret\n-------------\n\nIf you just want to run Pyret, visit [the online\nenvironment](https://code.pyret.org) and work from there.  If you're interested\nin Pyret development, read on:\n\nThe easiest way to *run* a Pyret program from the command-line is:\n\n    $ ./src/scripts/phaseX \u003cpath-to-pyret-program-here\u003e [command-line-args...]\n\nWhere `X` is `0`, `A`, `B`, or `C`, indicating a phase (described below). For\nexample:\n\n    $ ./src/scripts/phaseA src/scripts/show-compilation.arr examples/ahoy-world.arr\n\nAlternatively, you can compile and run a standalone JavaScript file via:\n\n    $ node build/phaseX/pyret.jarr \\\n        --build-runnable \u003cpath-to-pyret-program-here\u003e \\\n        --outfile \u003cpath-for-standalone-js\u003e \\\n        --builtin-js-dir src/js/trove/ \\\n        --builtin-arr-dir src/arr/trove \\\n        --require-config src/scripts/standalone-configA.json\n    $ node \u003cpath-for-standalone-js\u003e\n\nPhases\n------\n\nPyret is a self-hosted compiler, which means that building requires some\nthought.  If you're going to get into the guts of the compiler, a brief\noverview is worth reading.  The `build` directory is separated into four\ndistinct *phases*.\n\n1.  Phase 0 is a standalone JavaScript file that contains an entire compiled\nPyret compiler and runtime.  This large blob gets committed into version\ncontrol whenever we add a nontrivial feature to the language.  It is large and\nsomewhat slow to load, but whatever is in build/phase0/pyret.jarr is currently\nthe canonical new-world implementation of Pyret.\n\n2.  Phase A is set up to be populated with built versions of all the files for\nthe compiler, built by the phase 0 compiler.  Phase A is what most of the\ntesting scripts run against, since it is the easiest to create, and after it is\nbuilt it is your development snapshot of the compiler you're working on.\nHowever, just building phase1 is not enough to fully re-boostrap the compiler,\nbecause it contains a mix of old-compiler output and any new changes that were\nmade to runtime files.\n\n3.  Phase B is set up to be populated with built versions of all the files for\nthe compiler, built by the phase A compiler.  This version does represent a\nfully-bootstrapped compiler.  If you run `make phaseB`, you get a new\nstandalone compiler in the same format as `build/phase0/pyret.js`.\n\n4.  Phase C builds from phase B.  One major use of phase C is to check the\nbootstrapped compiler from phase B.  Before committing a new standalone in\nphase 0, build both phaseB and phaseC, and check:\n    \n        $ diff build/phaseB/pyret.jarr build/phaseC/pyret.jarr\n\n    And it should be empty, which indicates that the bootstrapped compiler is\nat\n    least correct enough to recompile itself without error.\n\n    To rebuild the compiler and get a new `phase0`, run\n\n        $ make new-bootstrap\n\n    which will build the phaseB and phaseC standalones, check the diff, and\n    copy to phase0 if the diff is empty.\n\n","funding_links":[],"categories":["JavaScript","Uncategorized"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrownplt%2Fpyret-lang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrownplt%2Fpyret-lang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrownplt%2Fpyret-lang/lists"}