Skip to content

horizon -> master #1787

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

Merged
merged 351 commits into from
Aug 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
351 commits
Select commit Hold shift + click to select a range
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
326a295
Add reporting of LHS values when error occurs in RHS predicate
dbp Dec 14, 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
f493363
Merge branch 'horizon' into add-create-dir-tree
blerner Apr 30, 2024
9cc314b
Add annotation for table-from-raw-array(), checking arg is indeed a raw
ds26gte Sep 9, 2024
2813a30
Added test for table-from-rows exception #1758
ds26gte Sep 10, 2024
83a2c13
Added a couple more tests for table-from-row #1758
ds26gte Sep 10, 2024
aba6ad9
Fixes the incredibly slow performance of least-squares-solve:
Sep 17, 2024
d8dbdaa
statistics.arr: Added three functions that perform multiple regression
ds26gte Sep 26, 2024
2968234
multiple-regression-*(): add output type and more detailed docstring
ds26gte Sep 26, 2024
9db5481
multiple-regression-coeffs(): use select-columns() to avoid list mani…
ds26gte Sep 27, 2024
8d9fba0
Merge pull request #1763 from ds26gte/mulreg-api
ds26gte Oct 23, 2024
4bebd23
Define and use RawArrayOfRows for better err msgs. By @blerner:
ds26gte Dec 6, 2024
c764908
Merge pull request #1759 from ds26gte/table-annot
ds26gte Dec 6, 2024
4013625
Merge branch 'horizon' into server-dev
jpolitz Jan 7, 2025
9701c6f
Small fixups (new well-formedness errors from horizon!)
jpolitz Jan 7, 2025
1404aaf
.
jpolitz Jan 8, 2025
d3f8ed3
fix up tests for new builtin
jpolitz Jan 8, 2025
15e293e
Merge pull request #1374 from brownplt/server-dev
jpolitz Jan 8, 2025
7500bd0
Update README.md
jpolitz Jan 8, 2025
b6b6680
We no longer release from this repo
jpolitz Jan 15, 2025
4e0f84d
npm updates
jpolitz Jan 15, 2025
e3f3148
Start of CSV parsing with fast-csv (https://www.npmjs.com/package/fas…
jpolitz Jan 21, 2025
3e0728f
Basic CSV table importing
jpolitz Jan 21, 2025
17f1ce9
basic CSV file loading (with example from BS:DS
jpolitz Jan 22, 2025
e2e98f6
Simplify/add "file-to-string" endpoint
jpolitz Jan 22, 2025
639a63f
respond to review comments
jpolitz Jan 24, 2025
4ce3ab6
Merge pull request #1769 from brownplt/csv-parser
jpolitz Jan 24, 2025
0331a5c
Add flag only:<test-pat> to test only tests with a certain pattern
jpolitz Feb 11, 2025
4e2b18e
JSON output formatting for check results
jpolitz Feb 11, 2025
a3387bf
update tests
jpolitz Feb 11, 2025
73a40b7
Propagate checks-format option
jpolitz Feb 12, 2025
0389e3b
This logic is all in the pyret-npm package now
jpolitz Feb 12, 2025
664c922
checks-format to checksFormat on runtimeOptions (to match other field…
jpolitz Feb 12, 2025
dcd52a7
For programs that may mix syntax from different files, keep the locat…
jpolitz Feb 12, 2025
740569a
include load lib
jpolitz Feb 12, 2025
1383bac
exposing new functions to file library: list-files, is-file, and is-dir
Feb 14, 2025
20a36fe
fixing lots of bugs in pretty printing of AST. running `npx pyret te…
Feb 14, 2025
9d12778
correct broken test, and wire in test-pprint into main2.arr
Feb 14, 2025
bcb36d1
Merge pull request #1634 from dbp/satisfies-exn-rhs
jpolitz Feb 14, 2025
35ec883
Merge pull request #1772 from brownplt/fixing-pprint
jpolitz Feb 14, 2025
7adffe8
Remove print in test file
jpolitz Feb 17, 2025
5c9d93c
Create README.md
danilbraun Aug 25, 2020
267a2a4
Merge branch 'ghost-horizon' into horizon
jpolitz Feb 18, 2025
af4d96f
Make sure to consult cache for built-in modules
jpolitz Feb 19, 2025
dde53a6
This function has a type but no implementation
jpolitz Feb 20, 2025
145ee91
Update package.json
jpolitz Feb 21, 2025
3002cca
Revert "This function has a type but no implementation"
jpolitz Feb 21, 2025
4102b79
array map and filter
jpolitz Feb 24, 2025
b262bbb
more work harmonizing array and raw-array (moving methods to array)
jpolitz Feb 24, 2025
258a99d
array methods for each raw-array function on global
jpolitz Feb 25, 2025
3c7c421
exports from array
jpolitz Feb 26, 2025
a374491
Checkpoint: image library offline with node-canvas
jpolitz Feb 28, 2025
cfe58ec
Commit to show diff with CPO image libraries
jpolitz Feb 28, 2025
269165c
Revert "Commit to show diff with CPO image libraries"
jpolitz Feb 28, 2025
b17a133
More avoiding `.style` and polyfilling with makeCanvas
jpolitz Mar 2, 2025
f887ef7
An attempt at text size calculations
jpolitz Mar 3, 2025
cd64070
Upgrade dist to jammy
jpolitz Mar 3, 2025
6fea279
Some more polyfill code, for Buffer in file-image
jpolitz Mar 4, 2025
cc550fc
save-image
jpolitz Mar 4, 2025
cb0a081
more image tests around save-file, and fix an error message
jpolitz Mar 4, 2025
06a9ee5
save-image for browser contexts
jpolitz Mar 4, 2025
867f0c1
make raw-array-fold match it's docs again. Undoes an edit in https://…
jpolitz Mar 10, 2025
c964da5
change uses of 1 start index
jpolitz Mar 10, 2025
1819976
these should be makeMessageException (for restarter), not throw
jpolitz Mar 12, 2025
a18a14e
Apply https://github.com/brownplt/code.pyret.org/pull/580/files to py…
jpolitz Mar 17, 2025
e9ee9ba
Merge pull request #1774 from brownplt/offline-image
jpolitz Mar 18, 2025
b88c846
Add image, color to libA so it's picked up by pyret-npm
jpolitz Mar 18, 2025
7cf86d4
basic library for fetch
jpolitz Mar 18, 2025
3f25586
basic url import
jpolitz Mar 18, 2025
621b74f
locator file
jpolitz Mar 18, 2025
3c14d9b
url-file implementation
jpolitz Mar 18, 2025
10b413d
incomplete refactoring of get-real-path (which always used dep.args.g…
jpolitz Mar 19, 2025
a807707
include url-file-mode in test-helpers
jpolitz Mar 19, 2025
c04894e
more places for default option
jpolitz Mar 19, 2025
a0d0abc
Re-using IO test infra for url-file import testing
jpolitz Mar 20, 2025
ef8783d
Install http-server for dev to try actual web requests
jpolitz Mar 20, 2025
2ce30ac
allow checking for failed compilations
jpolitz Mar 20, 2025
db5a7d2
update node to 18; fetch was trying to access XMLHTTPRequest
jpolitz Mar 20, 2025
547347e
add some debugging code: Travis is not cleanly exiting these tests, t…
jpolitz Mar 20, 2025
5957608
more travis process debugging
jpolitz Mar 20, 2025
613b9dd
unconditionally unref for Travis
jpolitz Mar 20, 2025
7a48e1b
more aggressively force exit jest (and try to get some error reporting)
jpolitz Mar 21, 2025
6bb11f2
More url-import tests
jpolitz Mar 21, 2025
240e50a
Merge pull request #1777 from brownplt/url-import
jpolitz Mar 21, 2025
fa7bd26
build-list
jpolitz Mar 24, 2025
1eaac3e
Small fixes (crossorigin and checks)
jpolitz Apr 8, 2025
c5012c3
string-find and string-find-opt
jpolitz Apr 8, 2025
24dd5fb
csv-table-url
jpolitz Apr 8, 2025
e349b36
fix sloppy testing
jpolitz Apr 8, 2025
82690e8
Change table rendering to stop at 1000 rows
jpolitz Apr 25, 2025
456c4dd
Add a better fetch error message when the fetch call itself throws an…
jpolitz Apr 29, 2025
35f9aa9
fetch timeout test
jpolitz Apr 30, 2025
467a638
add option `infer-content` that tells csv-table whether to give back …
jpolitz May 2, 2025
f019986
add csv to libs for pyret-npm
jpolitz May 2, 2025
2a914ea
example with sanitize
jpolitz May 2, 2025
8e444cd
update options
jpolitz May 2, 2025
6392e57
internal (for now) record concat function
jpolitz May 2, 2025
d89b5e5
internal (for now) record concat function
jpolitz May 2, 2025
23f927a
[experiment] Use record-concat to allow partial options
jpolitz May 2, 2025
50e92be
fix url test
jpolitz May 2, 2025
9a215ba
make sure csv is included in libs
jpolitz May 7, 2025
668ccf5
Merge branch 'horizon' into on-raw-key
jpolitz May 7, 2025
3e5fc35
don't log text metrics
jpolitz May 7, 2025
1f9793b
dead code/unused imports in jsfile.arr
jpolitz May 12, 2025
4120377
Starting a new `filesystem`/`filesystem-internal` library
jpolitz May 13, 2025
92a17db
forgotten file
jpolitz May 13, 2025
30b4c05
basics of moving image over to use filesystem-internal
jpolitz May 14, 2025
9861f7e
Cleaning up errors on loading badly-shaped tables
jpolitz May 15, 2025
b53325f
make sure error text can be found anywhere (added some newlines in er…
jpolitz May 15, 2025
7d6b60a
More new filesystem support
jpolitz May 15, 2025
7c0bee6
More filesystem migration
jpolitz May 16, 2025
76ad17c
fix exists after more testing
jpolitz May 16, 2025
452410a
fs join
jpolitz May 16, 2025
20da3a2
WIP: Single bar charts
May 19, 2025
24cb84d
WIP: horizontal and vertical bar charts
May 19, 2025
0533b2b
WIP: adding support for .add-pointers and .pointer-color
May 19, 2025
79fd836
WIP: add custom axis ticks
May 19, 2025
1eea01e
WIP: annotations
May 20, 2025
d730b71
WIP: intervals and interval-color
May 20, 2025
5d711bb
WIP: gridlines
May 20, 2025
8407f5d
WIP: get interactive CPO display working
May 20, 2025
48a3f03
WIP: rename chart-lib to charts-lib, so that both charts (this Vega i…
May 20, 2025
6bdfd82
WIP: multi-bar-chart, with colors and grouping
May 21, 2025
09e68b9
WIP: support for relative and percent renderings
May 21, 2025
a00937c
WIP: corrected support for absolute, relative and percent renderings,…
May 21, 2025
c319b0c
WIP: legends and axis titles
May 21, 2025
bdc9f70
WIP: interactive legends, and deleting old code
May 21, 2025
4463f49
WIP: deleting unnecessary example data
May 21, 2025
d6f7fde
oops, syntax error
May 21, 2025
0c92ca9
WIP: basic histograms, without bin-size control
May 21, 2025
4df9c0d
WIP: histogram bin size control
May 21, 2025
2079333
WIP: pie charts
May 22, 2025
385c708
WIP: bug fixes on axes, and fixed broken single-bar charts
May 22, 2025
88cdbf8
WIP: bug fix for thumbnail images of charts -- by passing in `undefin…
May 22, 2025
43c42ce
WIP: attempt to fix resizing bug when resizing the dialog
May 23, 2025
40b8bc6
WIP: refinements
May 23, 2025
aaaa11c
WIP: bugfixes
May 23, 2025
e165ba0
WIP: box-plots
May 24, 2025
f408067
WIP: fix handling of outliers in box-plots
May 24, 2025
9822390
WIP: fix handling of ticks at ends of whiskers
May 24, 2025
07be142
WIP: summary bars and tooltips for histograms
May 24, 2025
8923c46
WIP: truly custom bin sizes for histograms
May 24, 2025
4bdbbf2
WIP: scatter plots
May 25, 2025
eee5b41
WIP: adding trendlines to scatter plots
May 26, 2025
2361ffb
WIP: line-chart
May 26, 2025
663ed3e
try a new node versiong
jpolitz May 27, 2025
5fd829e
respect user's env when running bash
jpolitz May 29, 2025
1076bc5
create-dir and more Filesystem migration
jpolitz May 29, 2025
05ca91d
More pathlib -> filesystem
jpolitz May 29, 2025
71d4d3d
make sure to return `nothing`, not JS undefined
jpolitz May 29, 2025
c650897
some path-math tests
jpolitz May 29, 2025
a0ddc12
WIP: dot-chart
May 29, 2025
a96e974
WIP: interval-charts
May 29, 2025
7329d7b
WIP: function-plot
May 30, 2025
c4b1c67
Style: fixing double-quotes to single-quotes, and unquoting object pr…
May 30, 2025
d515e22
WIP: preliminary attempt at making charts reactive when in composition
May 30, 2025
cb2d30f
cleaning up pyret-mode a bit, so that providing data doesn't mess up
May 31, 2025
3e1aead
WIP: getting composed charts to respect the bounding box, clip correc…
May 31, 2025
5173174
WIP: enable legends, hovering over legends, and crosshairs over data …
May 31, 2025
61731ba
Add interactive controls to charts!
Jun 1, 2025
827b107
various dead code
Jun 1, 2025
a6b5ecb
add catch cases for promises for filesystem-internal stuff
jpolitz Jun 3, 2025
6953af5
Merge branch 'filesystem' into horizon
jpolitz Jun 5, 2025
8b209b0
fix tojson number error
ironm00n Jun 7, 2025
ced9913
basic tojson tests
ironm00n Jun 7, 2025
3623d08
Merge pull request #1783 from ironm00n/tojson-num-fix
jpolitz Jun 9, 2025
83d62e6
New npm() import type
jpolitz Jun 9, 2025
2c8fdb8
protect window usage (this is the only one, surprisingly) in image-lib
jpolitz Jun 10, 2025
8493d6f
package-lock update
jpolitz Jun 11, 2025
55bbd45
make cli-module-loader do the right context update for load dir of np…
jpolitz Jun 11, 2025
6f0af4a
Change npm imports to use browserify's resolve()
jpolitz Jun 12, 2025
b0ea714
Basic Github action for building and testing pyret-lang
jpolitz Jun 12, 2025
38da32e
remove heroku since we've long had the pitometer script commented out
jpolitz Jun 12, 2025
5c5daff
Disabling Travis CI for pyret-lang; moving to github actions
jpolitz Jun 12, 2025
75a4e14
FIX:
Jun 20, 2025
5e73a2a
nearly-working properly-positioned chart controls
Jun 21, 2025
f1364fa
Merge branch 'vega-charts' into horizon
jpolitz Jun 24, 2025
9ef99d5
Update node version
jpolitz Jun 24, 2025
040380a
trying to speed up tests again, on new node version?
Jun 24, 2025
1494e68
trying without matrices examples
jpolitz Jun 24, 2025
8949f20
Change table load to retain original header row, for improved errors
dbp Jun 27, 2025
b533a77
Update Image polyfill.
jpolitz Jul 21, 2025
e71057c
remove this test until this service comes back or we write our own ti…
jpolitz Jul 22, 2025
c50e1cf
fix: handle polymorphic type alias applications
ironm00n Jul 16, 2025
c859350
add basic tests for polymorphic type aliases
ironm00n Jul 21, 2025
0c23c8b
fix: use npx exec in Makefile
ironm00n Jul 21, 2025
776a2cd
bump deps
ironm00n Jul 21, 2025
79dfc01
add jest as dev dep
ironm00n Jul 21, 2025
8fe52f6
use lockfile for github actions
ironm00n Jul 22, 2025
9827bb8
Merge pull request #1792 from ironm00n/reproducibility
jpolitz Jul 23, 2025
6bf5aa9
fix: add missing `current-checker` global types, so `because` desugar…
ironm00n Jul 24, 2025
2ed529c
test: type-check tests for each type of check operator, with and with…
ironm00n Jul 24, 2025
4e44ecf
promote two type-check test from should pass to good
ironm00n Jul 24, 2025
b45ba92
Update Image polyfill.
jpolitz Jul 21, 2025
848438c
remove this test until this service comes back or we write our own ti…
jpolitz Jul 22, 2025
cbaeadf
fix: use npx exec in Makefile
ironm00n Jul 21, 2025
f4d4fee
bump deps
ironm00n Jul 21, 2025
147d5b9
add jest as dev dep
ironm00n Jul 21, 2025
2c81c68
use lockfile for github actions
ironm00n Jul 22, 2025
d395189
reorder result tuple for backwards compatibility. put orig-headers in…
jpolitz Aug 1, 2025
fe8d9a8
Test for rendering expected and actual columns in header-mismatch
jpolitz Aug 1, 2025
297e385
Make this backwards-compatible with clients that didn't know about or…
jpolitz Aug 11, 2025
551ded0
Merge pull request #1798 from brownplt/dbp-table-mismatch
jpolitz Aug 11, 2025
f7f7acf
feature request: make image scatter plots draw images at native size
Aug 13, 2025
353206b
feature request: image-dot-chart
Aug 13, 2025
b6cb856
Fix add-line overlay
dbp Aug 13, 2025
b5f5c03
try to fix add-line better.
dbp Aug 14, 2025
d9248dd
Merge pull request #1802 from dbp/add-line-fix
jpolitz Aug 14, 2025
96cb93f
bugfix: autosized images should still keep their pinholes on the datu…
Aug 15, 2025
831111e
feature: restore gridlines to composed charts
Aug 15, 2025
507dc1b
Create deploy-trigger.yml
jpolitz Aug 15, 2025
6a3b03f
Update deploy-trigger.yml
jpolitz Aug 15, 2025
ebc92cb
Update deploy-trigger.yml
jpolitz Aug 15, 2025
af849ab
Update deploy-trigger.yml
jpolitz Aug 15, 2025
b32e560
Update deploy-trigger.yml
jpolitz Aug 15, 2025
64b0065
Update deploy-trigger.yml
jpolitz Aug 15, 2025
e86f8b8
Update deploy-trigger.yml
jpolitz Aug 15, 2025
c9c8388
Update deploy-trigger.yml
jpolitz Aug 15, 2025
0b42123
feature: restore tooltips on dot plots, and restore the "categorical …
Aug 17, 2025
1256c7c
eliminate stray console.logs
Aug 17, 2025
0531910
bugfix: restore custom colors to bars in bar-chart
Aug 17, 2025
854656a
Merge pull request #1796 from ironm00n/fix/type-check-because
jpolitz Aug 19, 2025
2ee54e9
Merge pull request #1791 from ironm00n/fix/poly-fun-alias
jpolitz Aug 19, 2025
457ff4f
Merge pull request #1367 from brownplt/add-create-dir-tree
jpolitz Aug 19, 2025
90838c2
fix: csv-table-foo give simple error if strings don't match basic pat…
dbp Aug 15, 2025
6856aa6
fix error reporting for malformed inputs in csv-lib. fix error report…
jpolitz Aug 22, 2025
1db85d5
Merge pull request #1804 from dbp/csv-table-foo-errors
jpolitz Aug 22, 2025
def8449
Update deploy-trigger.yml
jpolitz Aug 22, 2025
836871b
Update build-and-test.yml
jpolitz Aug 22, 2025
a97a665
Update build-and-test.yml
jpolitz Aug 22, 2025
bd0ca50
Update deploy-trigger.yml
jpolitz Aug 22, 2025
33b1d6f
use filesystem for these kinds of calls across extension and CLI
jpolitz Aug 23, 2025
be74288
Update deployment workflow for release triggers
jpolitz Aug 27, 2025
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
34 changes: 34 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Makefile CI

on:
push:
branches: [ "horizon" ]
pull_request:
branches: [ "horizon" ]
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version: 24

- name: install
run:
make install

- name: build
run: make

- name: run tests
run: make all-pyret-test

deploy-trigger:
needs: build
uses: ./.github/workflows/deploy-trigger.yml
secrets: inherit
23 changes: 23 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Trigger release deployment

on:
push:
branches: [ "release" ]

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger pyret-release-update in drydock
env:
GH_TOKEN: ${{ secrets.DRYDOCK_PAT }}
run: |
# GitHub CLI api
# https://cli.github.com/manual/gh_api

gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/brownplt/pyret-drydock/dispatches \
-f 'event_type=pyret-release-update' -F "client_payload[unit]=false" -F "client_payload[integration]=true"
26 changes: 26 additions & 0 deletions .github/workflows/deploy-trigger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Trigger deploys in drydock

on:
workflow_dispatch:
workflow_call:
secrets:
DRYDOCK_PAT:
required: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger Workflow in Another Repository
env:
GH_TOKEN: ${{ secrets.DRYDOCK_PAT }}
run: |
# GitHub CLI api
# https://cli.github.com/manual/gh_api

gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/brownplt/pyret-drydock/dispatches \
-f 'event_type=pyret-lang-update' -F "client_payload[unit]=false" -F "client_payload[integration]=true"
Empty file removed .npmignore
Empty file.
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

123 changes: 49 additions & 74 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
PYRET_COMP0 = build/phase0/pyret.jarr
CLOSURE = java -jar deps/closure-compiler/compiler.jar
NODE = node -max-old-space-size=8192
SWEETJS = node_modules/sweet.js/bin/sjs --readable-names --module ./src/js/macros.js
NPM_EXEC = npm --prefix . exec --no --
JS = js
JSBASE = $(JS)/base
JSTROVE = $(JS)/trove
Expand All @@ -13,51 +12,25 @@ PHASE0 = build/phase0
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
SHELL := /usr/bin/env bash

# CUSTOMIZE THESE IF NECESSARY
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:
#
# http://aws.amazon.com/code/Amazon-S3/1710
#
# On Debian, you need the following packages:
#
# - libterm-shellui-perl
# - liblog-log4perl-perl
# - libnet-amazon-s3-perl
# - libnet-amazon-perl
# - libnet-amazon-s3-tools-perl
# - parallel
#
# You will then need to place your AWS id and secret in ~/.aws, in the
# following format:
#
# id = <your aws id>
# secret = <your aws secret>
#
# Make sure that the s3 script is in your PATH, or modify the value
# 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 +61,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 +93,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,18 +107,31 @@ $(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

showpath:
@echo my new PATH = $(PATH)
@echo `which browserify`
$(PHASEA)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
$(NPM_EXEC) browserify src/js/trove/require-node-compile-dependencies.js -o $@
$(PHASEA)/bundled-node-deps.js: src/js/trove/require-node-dependencies.js
$(NPM_EXEC) browserify src/js/trove/require-node-dependencies.js -o $@
$(PHASEB)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
$(NPM_EXEC) browserify src/js/trove/require-node-compile-dependencies.js -o $@
$(PHASEC)/bundled-node-compile-deps.js: src/js/trove/require-node-compile-dependencies.js
$(NPM_EXEC) 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 $< $@

$(BUNDLED_DEPS): src/js/trove/require-node-dependencies.js
npx browserify src/js/trove/require-node-dependencies.js -o $(BUNDLED_DEPS)
$(NPM_EXEC) browserify src/js/trove/require-node-dependencies.js -o $(BUNDLED_DEPS)

build/show-compilation.jarr: $(PHASEA)/pyret.jarr src/scripts/show-compilation.arr
$(NODE) $(PHASEA)/pyret.jarr --outfile build/show-compilation.jarr \
Expand Down Expand Up @@ -194,10 +195,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 @@ -265,7 +272,7 @@ pyret-test: phaseA tests/pyret/main2.jarr

.PHONY : pyret-io-test
pyret-io-test: phaseA
npx jest --verbose "tests/io-tests/io.test.js"
$(NPM_EXEC) jest --detectOpenHandles --forceExit --verbose "tests/io-tests/io.test.js"

.PHONY : regression-test
regression-test: tests/pyret/regression.jarr
Expand Down Expand Up @@ -303,35 +310,3 @@ new-bootstrap: no-diff-standalone $(PHASE0BUILD)
cp -r $(PHASEC)/js $(PHASE0)/
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

![Yarr](https://raw.github.com/brownplt/pyret-lang/master/img/pyret-banner.png)

[![Build Status](https://travis-ci.com/brownplt/pyret-lang.svg?branch=horizon)](https://travis-ci.com/github/brownplt/pyret-lang)
[![Build Status](https://api.travis-ci.com/brownplt/pyret-lang.svg?branch=horizon)](https://travis-ci.com/github/brownplt/pyret-lang)

A scripting language.

Expand Down
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
Loading