Skip to content

Commit

Permalink
deploy: 56c013c
Browse files Browse the repository at this point in the history
  • Loading branch information
elmisback committed Jan 29, 2024
1 parent 7a34330 commit 5bd89a1
Show file tree
Hide file tree
Showing 180 changed files with 13,801 additions and 429,709 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/semi": "off",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
out
dist
node_modules
.vscode-test/
*.vsix
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
}
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
]
}
15 changes: 15 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"cmake.configureOnOpen": false,
"livePreview.defaultPreviewPath": "/index.html"
}
40 changes: 40 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$ts-webpack-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
}
]
}
13 changes: 13 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.vscode/**
.vscode-test/**
out/**
node_modules/**
src/**
.gitignore
.yarnrc
webpack.config.js
vsc-extension-quickstart.md
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
Binary file removed 0108e89c9003e8c14ea3.woff
Binary file not shown.
Binary file removed 02271ec5cb9f5b4588ac.woff
Binary file not shown.
Binary file removed 073b3402d036714b4370.woff
Binary file not shown.
Binary file removed 0c3b8929d377c0e9b2f3.woff
Binary file not shown.
Binary file removed 172d3529b26f8cedef6b.woff2
Binary file not shown.
Binary file removed 20f389c4120be058d80a.woff2
Binary file not shown.
Binary file removed 2960900c4f271311eb36.woff2
Binary file not shown.
Binary file removed 2f7bc363fc5424ebda59.ttf
Binary file not shown.
Binary file removed 354501bac435c3264834.woff
Binary file not shown.
Binary file removed 39890742bc957b368704.woff2
Binary file not shown.
Binary file removed 3a99e70aee4076660d38.woff
Binary file not shown.
Binary file removed 3f07ed67f06c720120ce.woff
Binary file not shown.
Binary file removed 428978dc7837d46de091.woff
Binary file not shown.
Binary file removed 4ad7c7e8bb8d10a34bb7.ttf
Binary file not shown.
Binary file removed 4c6b94fd1d07f8beff7c.woff
Binary file not shown.
Binary file removed 4c761b3711973ab04edf.ttf
Binary file not shown.
Binary file removed 4f35fbcc9ee8614c2bcc.woff
Binary file not shown.
Binary file removed 57f5c1837853986ea1db.ttf
Binary file not shown.
Binary file removed 5b49f4993ae22d7975b4.ttf
Binary file not shown.
Binary file removed 6d3d25f4820d0da8f01f.woff2
Binary file not shown.
Binary file removed 6de7d4b539221a49e9e2.ttf
Binary file not shown.
Binary file removed 6eec866c69313624be60.woff2
Binary file not shown.
Binary file removed 6fdf0ac577be0ba82a4c.woff
Binary file not shown.
Binary file removed 73ea273a72f4aca30ca5.woff2
Binary file not shown.
Binary file removed 7489a2fbfb9bfe704420.ttf
Binary file not shown.
Binary file removed 7947224e8a9914fa332b.woff
Binary file not shown.
Binary file removed 7d393d382f3e7fb1c637.woff2
Binary file not shown.
Binary file removed 7e873d3833eb108a0758.ttf
Binary file not shown.
Binary file removed 8169508bf58f8bd92ad8.ttf
Binary file not shown.
Binary file removed 828abcb200061cffbaae.ttf
Binary file not shown.
Binary file removed 853be92419a6c3766b9a.ttf
Binary file not shown.
Binary file removed 8a5f936332e8028c7278.ttf
Binary file not shown.
Binary file removed 8d593cfaa96238d5e2f8.woff
Binary file not shown.
Binary file removed 8d6b6822586eea3d3b20.ttf
Binary file not shown.
Binary file removed 931d67ea207ab37ee693.woff2
Binary file not shown.
Binary file removed 95591a929f0d32aa282a.woff2
Binary file not shown.
Binary file removed 96759856b4e70f3a8338.woff
Binary file not shown.
Binary file removed 9eba1d77abcf2aa6e94e.ttf
Binary file not shown.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log

All notable changes to the "interactive-herbie" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

- Initial release
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 Edward Misback

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
152 changes: 152 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# Odyssey: An Interactive Numerics Workbench
#### [[Video tutorial (8.5 min)]](https://youtu.be/jsjGuM2KK50) [[Setup]](#running-odyssey)

Odyssey is a tool for interactively rewriting numerical expressions to reduce floating-point error.

<img src="doc/overview.gif" width=600/>
<br>
<br>

**Before using Odyssey, please see [Running Odyssey](#running-odyssey) below to install dependencies.**

## Table of Contents
- [Features](#features)
- [Running Odyssey](#running-odyssey)
- [Submitting Feedback and Getting Help](#submitting-feedback-and-getting-help)
- [Release Notes](#release-notes)
- [For Developers](#for-developers)

## Features

Odyssey displays the *local error* of expressions. Local error shows how different subexpressions contribute to the total error for an input.

<img src="doc/local_error.gif" width=600/>
<br>
<br>

Odyssey generates rewriting suggestions with the state-of-the-art [Herbie](https://herbie.uwplse.org/demo/) floating-point expression rewriting tool.

<img src="doc/ask_herbie.gif" width=600/>
<br>
<br>

Derivations of Herbie's rewrites are also available.

<img src="doc/derivation.gif" width=600/>
<br>
<br>

The sample range of the expression can be adjusted to fit your use case.

<!-- TODO gif of Odyssey showing adjusting the sample range for sqrt(x + 1) - sqrt(x) -->
<img src="doc/resample.gif" width=600/>
<br>
<br>

A full walkthrough of Odyssey is available in the [video tutorial](https://youtu.be/jsjGuM2KK50).

If you have any questions about features, please [open an issue](https://github.com/herbie-fp/odyssey/issues/new) on Github.

## Running Odyssey

Odyssey runs as a VSCode extension. You can install it from the VSCode Marketplace [here](https://marketplace.visualstudio.com/items?itemName=herbie-fp.odyssey-fp), but first follow the instructions below to install dependencies.

### Dependencies
Odyssey uses a [Herbie](https://herbie.uwplse.org) server to analyze expressions and currently requires you to bring your own Herbie instance. After following the [Herbie installation instructions](https://herbie.uwplse.org/doc/latest/installing.html), you can run a Herbie server with
```bash
$ herbie web --port 8000 --quiet
# Response should look like:
Herbie 2.0 with seed 552322303
Find help on https://herbie.uwplse.org/, exit with Ctrl-C
Your Web application is running at http://localhost:8000.
Stop this program at any time to terminate the Web Server.
```

### Running the VSCode extension

After starting the Herbie server, run Odyssey from the VSCode command palette by clicking on VSCode and using **Ctrl/Command-Shift-P > Odyssey: Herbie.**

The server status shown in Odyssey should have the text "Connected."

If the server status is red with the text "No Server", Odyssey can't connect to the Herbie server.

If needed, you can adjust the server address where Odyssey looks for Herbie by clicking on the server status. Make sure that the port Odyssey is connecting to is the same one Herbie is being hosted on.

### (Alternative) Running as a standalone web application

Odyssey can also run as a standalone web application.

First, you'll need to install node from https://nodejs.org/en/download/.

Next, clone this repo and build the application:
```bash
$ git clone https://github.com/herbie-fp/odyssey
$ cd odyssey
$ npm install
$ npm run compile
```

Then, after starting the Herbie server, run an HTTP server to serve the `index.html` file:
```bash
$ npx serve -p 3000
```

# Submitting Feedback and Getting Help
Please submit any feedback or bug reports by [opening an issue on this repo](https://github.com/herbie-fp/odyssey/issues/new).

# Release Notes

### 1.0.0
* First public release

<!-- TODO add more release notes -->

### 0.4.0

* Rename repo + extension
* Still unofficial; expecting to release 1.0 at the beginning of August

### 0.1.0

First major post-study 1 version

# For Developers

## Setting up a development environment
```bash
$ npm install
# Then use command/control+shift+B to start the auto-compile task
# Each time compilation finishes, you should see a message like "webpack 5.82.1 compiled with 1 warning in 31769 ms"
```

### Testing the extension
Use the "Run and Debug" tab to start an instance of VSCode with the most recent code.

You can see changes to the frontend (`webview/index.ts`) by simply refreshing the webview, but **changes to the host (`extension.ts`) will only show if the debugger is restarted.**

### Publishing the extension:

Get publication key from @elmisback, then:

```bash
# update "version" in package.json and commit, then
$ npm run publish
```

<!-- ## Extension Settings
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
For example:
This extension contributes the following settings:
* `myExtension.enable`: enable/disable this extension
* `myExtension.thing`: set to `blah` to do something -->

-----------------------------------------------------------------------------------------------------------
<!-- ## Following extension guidelines
Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.
* [Extension Guidelines](https://code.visualstudio.com/api/references/extension-guidelines)
Binary file removed a1abf90dfd72792a577a.woff2
Binary file not shown.
Binary file removed aeffd8025cba3647f1a6.woff
Binary file not shown.
Binary file removed b257a18c016f37ee4543.ttf
Binary file not shown.
Binary file removed b9cd458ac6d5889ff9c3.woff
Binary file not shown.
Binary file removed bf2d440b3a42ea78a998.ttf
Binary file not shown.
Binary file removed c295e7f71970f03c0549.woff2
Binary file not shown.
Binary file removed c5c02d763c89380dcb4e.ttf
Binary file not shown.
Binary file removed c81d1b2a4b75d3eded60.woff2
Binary file not shown.
Binary file removed cd5e231e0cc53b2cb2c0.woff2
Binary file not shown.
Binary file removed d562e886c52f12660a41.woff
Binary file not shown.
Binary file removed d6484fce1ef428d5bd94.woff2
Binary file not shown.
Binary file removed d757c535a2e5902f1325.woff
Binary file not shown.
Binary file removed db074fa22cf224af93d7.woff
Binary file not shown.
Binary file removed dcbcbd93bac0470b462d.woff2
Binary file not shown.
Binary file added doc/ask_herbie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/derivation.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/local_error.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/overview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/resample.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed e1951519f6f0596f7356.woff2
Binary file not shown.
Binary file removed e418bf257af1052628d8.woff2
Binary file not shown.
Binary file removed ed305b5434865e06ffde.ttf
Binary file not shown.
Loading

0 comments on commit 5bd89a1

Please sign in to comment.