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

Open
wants to merge 295 commits into
base: master
Choose a base branch
from
Open

horizon -> master #1787

wants to merge 295 commits into from

Conversation

jpolitz
Copy link
Member

@jpolitz jpolitz commented Jun 17, 2025

No description provided.

jpolitz and others added 30 commits September 17, 2017 12:15
Add 'checks' CLI option for specifying which checks (all, none, or main) to execute
…y not have shrunk runtime, but shrunk generated parser file size
…n't being merged as alternatives, so we could have duplicated names of generated productions
…d move the print-with-value version to `toRepr()`

This is a risky change, but it seems to have a *large* improvement in parser performance:
* initializing the parser drops from 0.55sec to 0.15sec,
* memory usage in parsing an empty file drops from 172K to 99.7K, and time drops from 0.93sec to 0.39sec
* memory usage in parsing ast.arr drops from 357K to 280K, and time drops from 3.16sec to 2.48sec

`make test` passes, but please test this with caution before merging it for good
jpolitz and others added 30 commits May 29, 2025 14:31
- supports cropping the function to the specified [ymin, ymax] range
- all charts that can be composed currently define `<prefix>xscale` and `<prefix>yscale` scales
- all marks are now redefined to be placed against `xscale` and `yscale` (without the prefix)
- the unprefixed `xscale` and `yscale` scales are computed as the union of the prefixed scales, and this value is indirected by way of `xscaleSignal` and `yscaleSignal` signals, so that...
- the new `recompute` method is used as a callback on event listeners created with `view.addSignalListener`, which can detect when `xscaleSignal` has changed

Try charting a histogram and a function plot: the function plot will initially choose an x-range of [-10, 10], and the histogram will have its own domain, and then the function will recompute itself to spread over the new merged domain.
…tly, and compute the function over a domain specified by the domains of the other non-function plots in the chart
The positioning of the controls isn't right yet, but they work and they recompute the chart correctly
A new builtin module (for internal use most likely) called require-util exposes
Node's require function. Note that this won't quite work in non-Node contexts
without a working require. It can be polyfilled with
https://github.com/browserify/resolve and ZenFS. However, ZenFS atop VScode
FileSystem isn't a thing yet, so it's hard to implement it fully in the
extension without some more work.

Interestingly this may be a place where splitting off the behavior for the
desktop extension and the web extension makes sense. The desktop extension
should more easily have access to the right kind of require, and is the place
where someone could plausibly run `npm install` – in the web context there's
not even a way to meaningfully run npm. This would give the desktop extension
(and codespaces!) the ability to use `npm`/`node_modules` infrastructure to
package and distribute Pyret files.

For now, this is a good CLI solution
This uses https://github.com/browserify/resolve for resolution. A few reasons:

1. It has a clean API for giving a `basedir` argument
2. It is pure JavaScript and (given a working `fs` and `path` implementation),
can run in a webview/browser tab, rather than being node-internal

Then, use the basedir configuration to make sure `npm` imports are resolved
relative to the module containing the import (not relative to the compiler).

Also update the test to have a handwritten node_modules with pyret-test-files.
This ensures that when we run the _compiler_, whose working directory is the
root of the repo, it must be using this new infrastructure to find the
pyret-test-files module.
- rotated pie charts should not compute the percentage labels based on angles, since the rotation start angle is irrelevant...
- guard the current debug output by whether we're in the console or not
When resizing the chart window horizontally, the chart grows just a smidge too much, and so a horizontal scrollbar appears, and if you continue resizing horizontally back and forth, eventually the controls start to overlap the chart itself.  I'm not sure why this rounding error occurs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants