scrapscript


Namescrapscript JSON
Version 0.1.1 PyPI version JSON
download
home_pagehttps://github.com/tekknolagi/scrapscript
SummaryScrapscript interpreter
upload_time2024-06-05 23:40:32
maintainerNone
docs_urlNone
authorMax Bernstein
requires_python>=3.8
licenseMIT
keywords scrapscript interpreter
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Scrapscript Interpreter

See [scrapscript.org](https://scrapscript.org/) for some more information. Keep
in mind that the syntax on the website will change a little bit in the coming
weeks to match this repository.

Take a look inside [scrapscript.py](scrapscript.py) and all of its tests to get
an idea for how the language works.

## Usage

We support python3.8+.

```bash
# With a file
python3 scrapscript.py eval examples/0_home/factorial.scrap

# With a string literal
python3 scrapscript.py apply "1 + 2"

# With a REPL
python3 scrapscript.py repl
```

or with [Cosmopolitan](https://justine.lol/cosmopolitan/index.html):

```bash
./build-com

# With a file
./scrapscript.com eval examples/0_home/factorial.scrap

# With a string literal
./scrapscript.com apply "1 + 2"

# With a REPL
./scrapscript.com repl
```

(if you have an exec format error and use Zsh, either upgrade Zsh or prefix
with `sh`)

### The experimental compiler:

#### Normal ELF

```bash
./scrapscript.py compile some.scrap  # produces output.c
./scrapscript.py compile some.scrap --compile  # produces a.out
```

#### Cosmopolitan

```bash
CC=~/Downloads/cosmos/bin/cosmocc ./scrapscript.py compile some.scrap  --compile # produces a.out
```

#### Wasm

```bash
CC=/opt/wasi-sdk/bin/clang \
CFLAGS=-D_WASI_EMULATED_MMAN \
LDFLAGS=-lwasi-emulated-mman \
./scrapscript.py compile some.scrap --compile  # produces a.out
```

## Running Tests

```bash
python3 scrapscript.py test
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tekknolagi/scrapscript",
    "name": "scrapscript",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "scrapscript, interpreter",
    "author": "Max Bernstein",
    "author_email": "python@bernsteinbear.com",
    "download_url": "https://files.pythonhosted.org/packages/76/55/6e63fbb418055baf34aed4cddf90634a81cdf4b11ac312d620c6c7767899/scrapscript-0.1.1.tar.gz",
    "platform": null,
    "description": "# Scrapscript Interpreter\n\nSee [scrapscript.org](https://scrapscript.org/) for some more information. Keep\nin mind that the syntax on the website will change a little bit in the coming\nweeks to match this repository.\n\nTake a look inside [scrapscript.py](scrapscript.py) and all of its tests to get\nan idea for how the language works.\n\n## Usage\n\nWe support python3.8+.\n\n```bash\n# With a file\npython3 scrapscript.py eval examples/0_home/factorial.scrap\n\n# With a string literal\npython3 scrapscript.py apply \"1 + 2\"\n\n# With a REPL\npython3 scrapscript.py repl\n```\n\nor with [Cosmopolitan](https://justine.lol/cosmopolitan/index.html):\n\n```bash\n./build-com\n\n# With a file\n./scrapscript.com eval examples/0_home/factorial.scrap\n\n# With a string literal\n./scrapscript.com apply \"1 + 2\"\n\n# With a REPL\n./scrapscript.com repl\n```\n\n(if you have an exec format error and use Zsh, either upgrade Zsh or prefix\nwith `sh`)\n\n### The experimental compiler:\n\n#### Normal ELF\n\n```bash\n./scrapscript.py compile some.scrap  # produces output.c\n./scrapscript.py compile some.scrap --compile  # produces a.out\n```\n\n#### Cosmopolitan\n\n```bash\nCC=~/Downloads/cosmos/bin/cosmocc ./scrapscript.py compile some.scrap  --compile # produces a.out\n```\n\n#### Wasm\n\n```bash\nCC=/opt/wasi-sdk/bin/clang \\\nCFLAGS=-D_WASI_EMULATED_MMAN \\\nLDFLAGS=-lwasi-emulated-mman \\\n./scrapscript.py compile some.scrap --compile  # produces a.out\n```\n\n## Running Tests\n\n```bash\npython3 scrapscript.py test\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Scrapscript interpreter",
    "version": "0.1.1",
    "project_urls": {
        "Homepage": "https://github.com/tekknolagi/scrapscript",
        "Repository": "https://github.com/tekknolagi/scrapscript"
    },
    "split_keywords": [
        "scrapscript",
        " interpreter"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e2e8ac8328947b1317be041aea5c82101984b803a464973476632c6c38b999b8",
                "md5": "f7e826c1ee8d07da15da5dd31d555821",
                "sha256": "2a5da62aa2700edcb479a1c17e22d38d5823ddae6a8dd1feaf56ba253d3b4527"
            },
            "downloads": -1,
            "filename": "scrapscript-0.1.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f7e826c1ee8d07da15da5dd31d555821",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 29025,
            "upload_time": "2024-06-05T23:40:31",
            "upload_time_iso_8601": "2024-06-05T23:40:31.270103Z",
            "url": "https://files.pythonhosted.org/packages/e2/e8/ac8328947b1317be041aea5c82101984b803a464973476632c6c38b999b8/scrapscript-0.1.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76556e63fbb418055baf34aed4cddf90634a81cdf4b11ac312d620c6c7767899",
                "md5": "a4e02f747f50396f7ed892b69709280e",
                "sha256": "29978d947617968b6031a39a9d8d3c7ee19267b5d0e97261d9844238675327b1"
            },
            "downloads": -1,
            "filename": "scrapscript-0.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a4e02f747f50396f7ed892b69709280e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 29042,
            "upload_time": "2024-06-05T23:40:32",
            "upload_time_iso_8601": "2024-06-05T23:40:32.852423Z",
            "url": "https://files.pythonhosted.org/packages/76/55/6e63fbb418055baf34aed4cddf90634a81cdf4b11ac312d620c6c7767899/scrapscript-0.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-05 23:40:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tekknolagi",
    "github_project": "scrapscript",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "scrapscript"
}
        
Elapsed time: 0.27281s