Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server dev #1374

Open
wants to merge 115 commits into
base: horizon
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
ab6214d
[cli] Change websockets to ws lib, use unix sockets
jpolitz Aug 18, 2017
94ecd68
logging updates
jpolitz Aug 21, 2017
e1ecf1d
A number of changes related to the server and relative paths
jpolitz Aug 22, 2017
d3c1652
remove debug printfs
jpolitz Aug 22, 2017
1fc7ea9
a better name for publishing
jpolitz Aug 22, 2017
3b1e450
remove lockfile
jpolitz Aug 23, 2017
484dcae
ws should not be native
jpolitz Aug 23, 2017
fe3c3d7
trying to bundle this to avoid users needing to mention ws
jpolitz Aug 23, 2017
7e587a1
.
jpolitz Aug 23, 2017
538361d
for now, split these
jpolitz Aug 23, 2017
4ef9d15
.
jpolitz Aug 23, 2017
760fc4b
--help
jpolitz Aug 25, 2017
49061cd
fix a bunch of output, and make sure ws is included
jpolitz Aug 25, 2017
029eba6
can't get rid of this until we bootstrap it out
jpolitz Aug 25, 2017
60ab1c2
always use the specified base directory for .pyret
jpolitz Aug 25, 2017
05856b5
some necessary package munging for npm
jpolitz Aug 25, 2017
8bcb1e6
.
jpolitz Aug 25, 2017
672bca9
this is unused
jpolitz Aug 25, 2017
2d485bc
npmignore
jpolitz Aug 25, 2017
3d4e0d1
also unused
jpolitz Aug 25, 2017
31148b9
.
jpolitz Aug 25, 2017
5bf4736
version bump
jpolitz Aug 25, 2017
ffe4df5
trying a custom readme
jpolitz Aug 25, 2017
f125730
.
jpolitz Aug 25, 2017
192d934
updating readme on this branch to make npm obvious
jpolitz Aug 25, 2017
bde0411
.
jpolitz Aug 25, 2017
a68b5ba
better name
jpolitz Aug 25, 2017
215bfa2
hiding options that don't work yet
jpolitz Aug 25, 2017
07aa5a8
add a flag to transform all user annotations into a-blank
jpolitz Sep 7, 2017
849ebc1
needs prebuild of phaseA to avoid options going to phase0
jpolitz Sep 7, 2017
9217024
merge with horizon
jpolitz Sep 7, 2017
828ff8d
Merge branch 'disable-checks' into server-dev
jpolitz Sep 7, 2017
27e9db8
--perilous initial commit
jpolitz Sep 8, 2017
b7ea979
.
jpolitz Sep 8, 2017
b4a3734
more accurate help text, committing to the error-erasure interpretation
jpolitz Sep 8, 2017
803e6f3
option for disabling runtime annotations -- this can be significantly…
jpolitz Sep 8, 2017
e1c97c3
bigger method call iterations
jpolitz Sep 11, 2017
cc238fb
add fixed-arity versions for maybeMethodCall to avoid spread args for…
jpolitz Sep 11, 2017
f7d53da
forgotten file
jpolitz Sep 11, 2017
997e729
propcheck bench
jpolitz Sep 11, 2017
3f73279
clean up logging of run-task errors
jpolitz Sep 14, 2017
8b0a962
.
jpolitz Sep 14, 2017
337141c
.
jpolitz Sep 14, 2017
7092ca1
forgotten option
jpolitz Sep 17, 2017
cf4bcaa
bump version
jpolitz Sep 17, 2017
056d51b
Merge branch 'horizon' into server-dev
jpolitz Sep 17, 2017
c17e68b
some option explanation and tweaking
jpolitz Sep 17, 2017
e0acf0e
don't just check has-key, make sure it's true
jpolitz Sep 17, 2017
6bdc687
don't do color escapes unless at a terminal
jpolitz Sep 18, 2017
9a53e36
update this for new builtin modules needed by server
jpolitz Sep 18, 2017
48fb824
Merge branch 'horizon' into server-dev
jpolitz Sep 21, 2017
11b2882
version bump
jpolitz Sep 21, 2017
ebb990b
Merge branch 'disable-checks' into server-dev
jpolitz Oct 1, 2017
5a7e681
dynamic behavior of --no-check-mode option to not print any check inf…
jpolitz Oct 1, 2017
45892bd
Merge branch 'horizon' into server-dev
jpolitz Oct 25, 2017
5163a64
offline instructions
jpolitz Oct 25, 2017
cffdfd7
Merge branch 'horizon' into server-dev
jpolitz Oct 29, 2017
4517c13
add version information to cli
jpolitz Oct 29, 2017
2b79e23
add 'checks' CLI option to specify which checks to execute (all, none…
purag Nov 25, 2017
1606a17
actually fail on contradictory options for checks
purag Nov 25, 2017
e299476
a few little tweaks to make the server agree
jpolitz Nov 26, 2017
31a3064
put a default into compile-structs for checks option
jpolitz Nov 26, 2017
353448e
make load-lib return an empty list if the default 'nothing' result co…
jpolitz Nov 28, 2017
c1c89e3
Merge pull request #1267 from purag/server-dev
jpolitz Nov 28, 2017
30b50ac
version bump
jpolitz Dec 5, 2017
5935e11
move templates to post-tc
jpolitz Dec 12, 2017
ee0c9a3
remove template desugaring as a check block, potentially move to `is`…
jpolitz Dec 19, 2017
ac604e8
norun/-c option to just compile, don't run
jpolitz Mar 29, 2018
6902103
today's experiments in trying to improve the parser's performance: ma…
Apr 30, 2018
68e77f9
mistake in parser generation: separate equations for productions were…
Apr 30, 2018
d296a22
elide `position: 0` fields
Apr 30, 2018
d671e15
don't allocate so many empty action rows...
Apr 30, 2018
2587b58
Bigger change to parser: cache all the atoms' toString() behavior, an…
May 1, 2018
4a5458d
New lexer architecture, that seems to be 3-8x faster than the existin…
May 10, 2018
388093c
enabling running both tokenizers side-by-side, and adding some histog…
May 11, 2018
9cc3d51
missed the file!
May 11, 2018
e1295bf
updating syntax, not because we need this file, but so that I can eas…
May 15, 2018
4dda7be
various measurement updates
May 15, 2018
e673dfd
moving old tokenzier away, and moving new tokenizer into its place; m…
May 15, 2018
a0d0a21
merge with parser-perf
jpolitz May 17, 2018
7e3248d
missing valueskeleton types
jpolitz May 24, 2018
26e890c
use the right base for this extension
jpolitz May 24, 2018
5a166c3
Libraries file split from the base.arr that the compiler requires
jpolitz May 24, 2018
c8f2298
mistaken use of exists rather than existsSync!
jpolitz Jun 5, 2018
0b1b483
Use base-dir for require-config and raw-JS files when not absolute
TheOrangeLego Jun 18, 2018
ba20743
Removed spies
TheOrangeLego Jun 19, 2018
a8bdcc1
removing these in favor of having them in the pyret-npm repo
jpolitz Jul 9, 2018
398d80b
Merge branch 'horizon' into anchor
jpolitz Jul 9, 2018
610c741
fix test update not caught in merge
jpolitz Jul 9, 2018
b12c71e
more post-load-hooks fixing
jpolitz Jul 10, 2018
0a4e87d
make amd_loader amenable to existing node modules, if available
jpolitz Jul 10, 2018
81390b3
Merge remote-tracking branch 'origin/anchor' into server-dev
jpolitz Jul 10, 2018
60ed457
clean up use of checks flag and postLoadHooks
jpolitz Jul 11, 2018
fb1ca7d
clean up files that were npm-package specific
jpolitz Jul 11, 2018
9e77af8
phase0 still dependes on websocket, so cannot omit this for now
jpolitz Jul 11, 2018
5d4b52a
these files have no uses in the repo at all
jpolitz Jul 11, 2018
1806dc1
update versions for npm audit
jpolitz Aug 1, 2018
5efceaa
add back jasmine-node (lost it in the audit fix)
jpolitz Aug 1, 2018
1bf7284
merge horizon into server-dev
jpolitz Sep 8, 2019
7c97c16
intermediate merge state -- failing on rebuilds
jpolitz Jul 19, 2020
ba25f9d
correctly merge caching locators in cli-module-loader
jpolitz Jul 21, 2020
217e8c2
Removing heroku command to test
jpolitz Jul 21, 2020
dd576f9
remove this optimization for new modules, which require this informat…
jpolitz Jul 21, 2020
d42e149
Fix #1580 by making no-check-mode add the dynamic check-skipping flag…
jpolitz Apr 19, 2021
6875481
package-lock for server-dev
jpolitz Apr 19, 2021
0785731
Merge branch 'horizon' into server-dev
jpolitz Apr 19, 2021
aa2f949
add constants to base
jpolitz May 10, 2021
0d11767
Merge branch 'horizon' into server-dev
jpolitz Aug 15, 2021
40908da
make sure essentials included in libs
jpolitz Aug 21, 2021
8243c16
Merge branch 'horizon' into server-dev
jpolitz Aug 23, 2023
7848f35
package lock updates
jpolitz Aug 23, 2023
0e9d302
this was looking at the wrong directory! should be looking at lib-com…
jpolitz Aug 23, 2023
593294f
Merge branch 'horizon' into server-dev
jpolitz Aug 29, 2023
471e825
Add iolib to libs.arr so it is picked up as a stdlib
jpolitz Aug 29, 2023
76bc6aa
Generate this file by importing everything that can be sensibly be ma…
jpolitz Sep 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file removed .npmignore
Empty file.
87 changes: 47 additions & 40 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ PHASEA = build/phaseA
PHASEB = build/phaseB
PHASEC = build/phaseC
RELEASE_DIR = build/release
BUNDLED_DEPS = build/bundled-node-deps.js
# HACK HACK HACK (See https://github.com/npm/npm/issues/3738)
export PATH := ./node_modules/.bin:../node_modules/.bin:../../node_modules/.bin:$(PATH)
SHELL := /bin/bash
Expand All @@ -23,7 +22,8 @@ SHELL := /bin/bash
PARSERS := $(patsubst src/js/base/%-grammar.bnf,src/js/%-parser.js,$(wildcard src/$(JSBASE)/*-grammar.bnf))
COPY_JS = $(patsubst src/js/base/%.js,src/js/%.js,$(wildcard src/$(JSBASE)/*.js)) \
src/js/js-numbers.js
COMPILER_FILES = $(wildcard src/arr/compiler/*.arr) $(wildcard src/arr/compiler/locators/*.arr) $(wildcard src/js/trove/*.js) $(wildcard src/arr/trove/*.arr)
COPY_LIB = $(wildcard lib/jglr/*.js)
COMPILER_FILES = $(wildcard src/arr/compiler/*.js) $(wildcard src/arr/compiler/*.arr) $(wildcard src/arr/compiler/locators/*.arr) $(wildcard src/js/trove/*.js) $(wildcard src/arr/trove/*.arr)
TROVE_ARR_FILES = $(wildcard src/arr/trove/*.arr)

# You can download the script to work with s3 here:
Expand All @@ -49,15 +49,14 @@ TROVE_ARR_FILES = $(wildcard src/arr/trove/*.arr)
# below.
S3 = s3

PHASEA_ALL_DEPS := $(patsubst src/%,$(PHASEA)/%,$(COPY_JS))
PHASEB_ALL_DEPS := $(patsubst src/%,$(PHASEB)/%,$(COPY_JS))
PHASEC_ALL_DEPS := $(patsubst src/%,$(PHASEC)/%,$(COPY_JS))
PHASEA_ALL_DEPS := $(patsubst src/%,$(PHASEA)/%,$(COPY_JS)) $(patsubst lib/jglr/%.js,$(PHASEA)/js/%.js,$(COPY_LIB)) $(PHASEA)/bundled-node-compile-deps.js $(PHASEA)/bundled-node-deps.js $(PHASEA)/config.json
PHASEB_ALL_DEPS := $(patsubst src/%,$(PHASEB)/%,$(COPY_JS)) $(patsubst lib/jglr/%.js,$(PHASEB)/js/%.js,$(COPY_LIB)) $(PHASEB)/bundled-node-compile-deps.js $(PHASEB)/bundled-node-deps.js $(PHASEB)/config.json
PHASEC_ALL_DEPS := $(patsubst src/%,$(PHASEC)/%,$(COPY_JS)) $(patsubst lib/jglr/%.js,$(PHASEC)/js/%.js,$(COPY_LIB)) $(PHASEC)/bundled-node-compile-deps.js $(PHASEC)/bundled-node-deps.js $(PHASEC)/config.json

PHASEA_DIRS := $(sort $(dir $(PHASEA_ALL_DEPS)))
PHASEB_DIRS := $(sort $(dir $(PHASEB_ALL_DEPS)))
PHASEC_DIRS := $(sort $(dir $(PHASEC_ALL_DEPS)))


# NOTE: Needs TWO blank lines here, dunno why
define \n

Expand Down Expand Up @@ -88,15 +87,29 @@ phaseA: $(PHASEA)/pyret.jarr
phaseA-deps: $(PYRET_COMPA) $(PHASEA_ALL_DEPS) $(COMPILER_FILES) $(patsubst src/%,$(PHASEA)/%,$(PARSERS))


$(PHASEA)/pyret.jarr: $(PYRET_COMPA) $(PHASEA_ALL_DEPS) $(COMPILER_FILES) $(patsubst src/%,$(PHASEA)/%,$(PARSERS)) $(BUNDLED_DEPS)
$(PHASEA)/pyret.jarr: $(PYRET_COMPA) $(PHASEA_ALL_DEPS) $(COMPILER_FILES) $(patsubst src/%,$(PHASEA)/%,$(PARSERS))
$(NODE) $(PYRET_COMP0) --outfile build/phaseA/pyret.jarr \
--build-runnable src/arr/compiler/pyret.arr \
--builtin-js-dir src/js/trove/ \
--builtin-arr-dir src/arr/trove/ \
--compiled-dir build/phaseA/compiled/ \
--deps-file build/phaseA/bundled-node-compile-deps.js \
-no-check-mode $(EF) \
--require-config src/scripts/standalone-configA.json

$(PHASEA)/libs.jarr: $(PHASEA)/pyret.jarr
$(NODE) $(PHASEA)/pyret.jarr --outfile build/phaseA/base.jarr \
--build-runnable src/arr/compiler/libs.arr \
--builtin-js-dir src/js/trove/ \
--builtin-arr-dir src/arr/trove/ \
--compiled-dir build/phaseA/lib-compiled/ \
--deps-file build/phaseA/bundled-node-compile-deps.js \
-no-check-mode $(EF) \
--require-config src/scripts/standalone-configA.json

.PHONY : libA
libA : $(PHASEA)/libs.jarr

.PHONY : phaseB
phaseB: $(PHASEB)/pyret.jarr

Expand All @@ -106,8 +119,9 @@ $(PHASEB)/pyret.jarr: $(PHASEA)/pyret.jarr $(PHASEB_ALL_DEPS) $(patsubst src/%,$
--builtin-js-dir src/js/trove/ \
--builtin-arr-dir src/arr/trove/ \
--compiled-dir build/phaseB/compiled/ \
--deps-file build/phaseB/bundled-node-compile-deps.js \
-no-check-mode $(EF) \
--require-config src/scripts/standalone-configB.json
--require-config build/phaseB/config.json


.PHONY : phaseC
Expand All @@ -119,12 +133,29 @@ $(PHASEC)/pyret.jarr: $(PHASEB)/pyret.jarr $(PHASEC_ALL_DEPS) $(patsubst src/%,$
--builtin-js-dir src/js/trove/ \
--builtin-arr-dir src/arr/trove/ \
--compiled-dir build/phaseC/compiled/ \
--deps-file build/phaseB/bundled-node-compile-deps.js \
-no-check-mode $(EF) \
--require-config src/scripts/standalone-configC.json
--require-config build/phaseB/config.json

.PHONY : show-comp
show-comp: build/show-compilation.jarr

$(PHASEA)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
browserify src/js/trove/require-node-compile-dependencies.js -o $@
$(PHASEA)/bundled-node-deps.js: src/js/trove/require-node-dependencies.js
browserify src/js/trove/require-node-dependencies.js -o $@
$(PHASEB)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
browserify src/js/trove/require-node-compile-dependencies.js -o $@
$(PHASEC)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
browserify src/js/trove/require-node-compile-dependencies.js -o $@

$(PHASEA)/config.json: src/scripts/node_modules-config.json
cp $< $@
$(PHASEB)/config.json: src/scripts/node_modules-config.json
cp $< $@
$(PHASEC)/config.json: src/scripts/node_modules-config.json
cp $< $@

showpath:
@echo my new PATH = $(PATH)
@echo `which browserify`
Expand Down Expand Up @@ -194,10 +225,16 @@ $(PHASEC)/$(JS)/%-parser.js: src/$(JSBASE)/%-grammar.bnf src/$(JSBASE)/%-tokeniz

$(PHASEA)/$(JS)/%.js : src/$(JSBASE)/%.js
cp $< $@
$(PHASEA)/$(JS)/%.js : lib/jglr/%.js
cp $< $@
$(PHASEB)/$(JS)/%.js : src/$(JSBASE)/%.js
cp $< $@
$(PHASEB)/$(JS)/%.js : lib/jglr/%.js
cp $< $@
$(PHASEC)/$(JS)/%.js : src/$(JSBASE)/%.js
cp $< $@
$(PHASEC)/$(JS)/%.js : lib/jglr/%.js
cp $< $@

.PHONY : install
install:
Expand Down Expand Up @@ -304,34 +341,4 @@ new-bootstrap: no-diff-standalone $(PHASE0BUILD)
no-diff-standalone: phaseB phaseC
diff $(PHASEB)/pyret.jarr $(PHASEC)/pyret.jarr

$(RELEASE_DIR)/phase1:
$(call MKDIR,$(RELEASE_DIR)/phase1)

ifdef VERSION
release-gzip: $(PYRET_COMP) phase1 standalone1 $(RELEASE_DIR)/phase1
gzip -c $(PHASE1)/pyret.js > $(RELEASE_DIR)/pyret.js
(cd $(PHASE1) && find * -type d -print0) | parallel --gnu -0 mkdir -p '$(RELEASE_DIR)/phase1/{}'
(cd $(PHASE1) && find * -type f -print0) | parallel --gnu -0 "gzip -c '$(PHASE1)/{}' > '$(RELEASE_DIR)/phase1/{}'"
horizon-gzip: standalone1 $(RELEASE_DIR)/phase1
sed "s/define('pyret-start/define('pyret/" $(PHASE1)/pyret.js > $(RELEASE_DIR)/pyret-full.js
gzip -c $(RELEASE_DIR)/pyret-full.js > $(RELEASE_DIR)/pyret.js
(cd $(PHASE1) && find * -type d -print0) | parallel --gnu -0 mkdir -p '$(RELEASE_DIR)/phase1/{}'
(cd $(PHASE1) && find * -type f -print0) | parallel --gnu -0 "gzip -c '$(PHASE1)/{}' > '$(RELEASE_DIR)/phase1/{}'"
# If you need information on using the s3 script, run `s3 --man'
horizon-release: horizon-gzip
cd $(RELEASE_DIR) && \
find * -type f -print0 | parallel --gnu -0 $(S3) add --header 'Content-Type:text/javascript' --header 'Content-Encoding:gzip' --acl 'public-read' ':pyret-horizon/current/{}' '{}'
release: release-gzip
cd $(RELEASE_DIR) && \
find * -type f -print0 | parallel --gnu -0 $(S3) add --header 'Content-Type:text/javascript' --header 'Content-Encoding:gzip' --acl 'public-read' ':pyret-releases/$(VERSION)/{}' '{}'
test-release: release-gzip
cd $(RELEASE_DIR) && \
find * -type f -print0 | parallel --gnu -0 $(S3) add --header 'Content-Type:text/javascript' --header 'Content-Encoding:gzip' --acl 'public-read' ':pyret-releases/$(VERSION)-test/{}' '{}'
else
release-gzip:
$(error Cannot release from this platform)
release:
$(error Cannot release from this platform)
test-release: release-gzip
$(error Cannot release from this platform)
endif

55 changes: 49 additions & 6 deletions build/phase0/trove/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,55 @@
"equal-always": "AnyPred2",
"equal-now": "AnyPred2",
"identical": "AnyPred2",
"within": ["arrow", ["Number"], "AnyPred2"],
"within-abs": ["arrow", ["Number"], "AnyPred2"],
"within-rel": ["arrow", ["Number"], "AnyPred2"],
"within-now": ["arrow", ["Number"], "AnyPred2"],
"within-abs-now": ["arrow", ["Number"], "AnyPred2"],
"within-rel-now": ["arrow", ["Number"], "AnyPred2"],
"within": {'bind': 'fun',
'flatness': 0,
'name': 'within',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-abs": {'bind': 'fun',
'flatness': 0,
'name': 'within-abs',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-rel": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-now": {'bind': 'fun',
'flatness': 0,
'name': 'within-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-abs-now": {'bind': 'fun',
'flatness': 0,
'name': 'within-abs-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-rel-now": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-abs3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-rel3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-now3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-abs-now3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},
"within-rel-now3": {'bind': 'fun',
'flatness': 0,
'name': 'within-rel-now',
'typ':["arrow", ["Number"], "AnyPred2"]},


// Number functions

Expand Down
99 changes: 99 additions & 0 deletions npm-readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
```
Pyret Command-line Interface

The pyret command compiles and runs Pyret programs. It helps manage a compile
server that runs in the background to speed up compilation jobs, and manages
state in a project's working directory to cache compiled files.

Basic Usage

$ cat ahoy-world.arr
check: "Ahoy " + "world!" is "Ahoy world!" end
$ pyret ahoy-world.arr
Starting Parley server...
1/1 modules compiled
Looks shipshape, your test passed, mate!


This command compiled and ran ahoy-world.arr. The first time, this will take
a few seconds as a server starts up in the background, in order to make
future compiles fast.


It's worth noting that the file is compiled into a standalone JavaScript file
with the .jarr extension:

$ node ahoy-world.jarr
Looks shipshape, your test passed, mate!


Most uses (e.g. for homework) only need to use the pyret command directly on
.arr files, but there are several other options that can be provided.

Options

-h, --help Show this help message.
-p, --program <file>.arr This is the default option, so using the flag is optional. Specifies the path
to the program to compile (usually a .arr file). Will start a server if one
isn't running, and will report an error if there is no .pyret in this
directory or in any parent of this directory. Generates a standalone compiled
file based on --outfile, and immediately executes it. The exit code is non-
zero if the file fails to compile, and is the exit code of the executed
program if it compiles successfully.
-o, --outfile <file>.jarr Specify the file to put the standalone compiled output into. The program can
be re-run without re-compiling by using the node command. Defaults to the
name of the --program with .arr replaced with .jarr.
-q, --quiet Don't show the progress indicator output like "1/4 modules compiled"
-k, --no-check-mode Omit check blocks during compilation, and generate a standalone program that
doesn't print testing information at all.
-n, --clean Removes all compiled code in the .pyret directory. This can be necessary when
Pyret updates to clear out stale compiled files.
-s, --shutdown Shuts down the currently-running compile server (if any is running), by
sending it a message over the specified or default --port
-t, --port string Specify the path to a socket file to use to communicate with the server.
Defaults to /tmp/parley-<username>/comm.sock.

The .pyret/ Directory

The first time you run the pyret command in a directory, it creates a .pyret/
directory there.

This directory is used to store the compiled versions of individual .arr
files in your project. They will appear in .pyret/compiled.

Each directory in which you run pyret will have this sub-directory created.
In general, you should never need to look in or modify the directory. If you
want to look at the innards of Pyret, you can check out these files.

The Compile Server

The compiler will not run without a running server. The pyret command
tries to connect to a compile server on the specified port on
startup, and if it cannot, starts one before continuing. The server
accepts requests to start and stop compile jobs, and to shut down, and
sends messages indicating compile status and when the job is complete.

The default mode of operation is to have a single compile server running
per user (hence the default naming of the --port). This makes it
simple to change directories to different projects and get the benefits
of the server's quick responses. If multiple compile jobs are sent at the
same time, they are queued and processed in FIFO order.

This server is experimental, and likely can get stuck running, or lose
track of its connection, so it's worth specifying what resources it uses
so they can be cleaned up. The server that's started in the background
does the work of creating the specified socket file, and its process
should clean up that file when it's done or when --shutdown is
used. You can also manually remove it (check
/tmp/parley-<username>/) if something gets wedged. This is
the only bit of state that the client and server use to communicate. The
server runs a file called pyret.jarr, so if you want to
check on potential runaway server processes this command can find them:

$ ps aux | grep pyret.jarr

Support and Contact

This interface is experimental. Feedback and issue reports at
https://github.com/brownplt/pyret-lang/issues/new are most appreciated.
```
Loading