• Stars
    star
    348
  • Rank 121,741 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created 12 months ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A functional, content-addressable programming language.

Scrapscript Interpreter

See 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 and all of its tests to get an idea for how the language works.

Usage

We support python3.8+.

# 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:

./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)

or with Docker:

# With a file (mount your local directory)
docker run --mount type=bind,source="$(pwd)",target=/mnt -i -t ghcr.io/tekknolagi/scrapscript:trunk eval /mnt/examples/0_home/factorial.scrap

# With a string literal
docker run -i -t ghcr.io/tekknolagi/scrapscript:trunk apply "1 + 2"

# With a REPL
docker run -i -t ghcr.io/tekknolagi/scrapscript:trunk repl

Running Tests

python3 scrapscript.py test

More Repositories

1

carp

"interesting" VM in C. Let's see how this goes.
C
976
star
2

full-beans

C++
158
star
3

ghuloum

Following [An Incremental Approach to Compiler Construction](http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf)
C
59
star
4

tekknolagi.github.com

My personal website
C
52
star
5

indexer

Torrent indexer written in Ruby/Sinatra. Called Brightswipe.
Ruby
32
star
6

ddcg

Implementation of destination-driven code generation with control destinations. See [post.md](post.md)
C++
22
star
7

db.py

Python
20
star
8

gecho

Simple stack language in C. Has a few basic commands; working to implement a `while` loop and user-defined functions. If statement would be nice. HC SVNT DRACONES.
C
16
star
9

icdemo

A small inline caching demo.
C
14
star
10

distlisp

Distributed Lisp interpreter in Erlang.
Erlang
11
star
11

doge_api

Minimal Ruby wrapper for the DogeAPI
Ruby
8
star
12

isdt

The website for the Introduction to Software Development Tooling course.
HTML
8
star
13

tuftscs-tips

A resource for Tufts Computer Science students who are interested in learning more about the classes they are currently taking.
7
star
14

stoneknifecpp

C++ port of [stoneknifeforth](https://github.com/kragen/stoneknifeforth)
Forth
6
star
15

pyddcg

A small implementation of destination-driven code generation in Python
Python
5
star
16

dcheck

C++ dynamic assertion library
C
4
star
17

droplet

very simple drag/drop image sharing
PHP
4
star
18

condensation

Ruby
4
star
19

wakey

Python
4
star
20

ninja-demo

Python
4
star
21

resume-pub

TeX
3
star
22

katecount

Erlang
3
star
23

dotfiles

Shell
3
star
24

kefir

C
2
star
25

lispcompiler.com

Following [An Incremental Approach to Compiler Construction](http://scheme2006.cs.uchicago.edu/11-ghuloum.pdf)
2
star
26

valgrind

C
2
star
27

weechat-nostr

Python
2
star
28

glug

A tiny message board. http://glug.bernsteinbear.com
Ruby
2
star
29

blog-lisp

Source code for the blog series Writing a Lisp.
OCaml
2
star
30

100prisoners

Python
2
star
31

stackx

OCaml
2
star
32

tablam

Rust
2
star
33

receipt-manager

Ruby
2
star
34

shortener

Small URL shortener with Ruby/Sinatra
Ruby
2
star
35

jelatine

C
1
star
36

mastercollection

Python
1
star
37

opendata

Ruby
1
star
38

option

OCaml
1
star
39

code

Tidbits
C
1
star
40

i3-config

Shell
1
star
41

fmt

Small C string formatting library
C
1
star
42

styx

Styx programming language and its compiler
D
1
star
43

kamui

Go
1
star
44

toy

Python
1
star