2971b7752b
Bump rust websocket libraries ( #701 )
...
Changelog: https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md#0201
2023-09-24 21:34:31 +00:00
70e99eb00b
Refactor is_code_token into a method ( #699 )
...
* Refactor is_code_token into a method
* Fix typos, use Parser as it was imported
2023-09-24 21:11:36 +00:00
5c66af59d2
New tokenizer based on winnow ( #697 )
...
* New tokenizer, using Winnow instead of regexes.
Between 1.3x and 4.4x speedup on lexer benchmarks :)
* Use dispatch instead of alt
Most of the time, if you know the first character of a token, you can narrow down its potential possible token types, instead of just trying each token type until one succeeds.
This further speeds up the lexer. Compared to main, this branch is now between 3x and 12x faster than main.
2023-09-22 21:57:39 -05:00
6dda6daeef
Use separate benchmarks for lexing and parsing ( #698 )
2023-09-23 02:01:18 +00:00
fd5921b366
Convert the lexer to be iterative not recursive ( #691 )
...
This is often more memory-efficient (does not create a bunch of stack
frames)
2023-09-21 19:19:08 -05:00
716ad938fc
stop gap for large files making editor slow ( #690 )
...
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-21 16:13:22 -07:00
8d2b89fcd1
Bump openapitor from 0d121f6
to 61a1605
in /src/wasm-lib ( #679 )
...
Bumps [openapitor](https://github.com/KittyCAD/kittycad.rs ) from `0d121f6` to `61a1605`.
- [Release notes](https://github.com/KittyCAD/kittycad.rs/releases )
- [Commits](0d121f6881...61a16059b3
)
---
updated-dependencies:
- dependency-name: openapitor
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 15:22:04 -05:00
ab4e04f6c2
Bump phonenumber from 0.3.2+8.13.9 to 0.3.3+8.13.9 in /src/wasm-lib ( #685 )
...
Bumps [phonenumber](https://github.com/whisperfish/rust-phonenumber ) from 0.3.2+8.13.9 to 0.3.3+8.13.9.
- [Commits](https://github.com/whisperfish/rust-phonenumber/commits )
---
updated-dependencies:
- dependency-name: phonenumber
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 15:02:23 -05:00
94aef05f74
Bump phonenumber from 0.3.2+8.13.9 to 0.3.3+8.13.9 in /src/wasm-lib/kcl/fuzz ( #686 )
...
Bump phonenumber in /src/wasm-lib/kcl/fuzz
Bumps [phonenumber](https://github.com/whisperfish/rust-phonenumber ) from 0.3.2+8.13.9 to 0.3.3+8.13.9.
- [Commits](https://github.com/whisperfish/rust-phonenumber/commits )
---
updated-dependencies:
- dependency-name: phonenumber
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-21 15:02:10 -05:00
d820cf2446
Tokenizer is accidentally quadratic ( #689 )
...
* Add comments and rename a function
* Typo: paran -> paren
* Use bytes, not string, for the tokenizer
* Fix typo
2023-09-21 14:18:42 -05:00
0c724c4971
Start to restructure the Engine's connection to the backend ( #674 )
...
* Start to restructure the Engine's connectio to the backend
1) Add in a tearDown stub for when the Engine is torn down. This is now
distinct from a 'close', which will not stop connect from trying
again. Running tearDown will mark the connection to not be retried
and close active connections.
2) Move the retry logic out of connect and into the constructor. It will
attempt to reconnect at the same rate as we had previously.
3) The timeout will now only close the connection, not restart it.
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
* Don't continue on dead conn & setTimeout on init only
* Clean up extra setTimeout
* Keep track of connection timeouts and clear on close
* Fix tsc by defining Timeout
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
* appease the format gods
---------
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
Co-authored-by: Adam Sunderland <adam@kittycad.io >
2023-09-21 12:07:47 -04:00
b54ac4a694
improve getNodePathFromSourceRange and therefore the ast explorer aswell ( #683 )
...
improve getNodePathFromSourceRange and therefore the ast explorer as well
2023-09-21 05:40:41 +00:00
27227092b1
app stuck on blur when engine errors ( #682 )
...
* temp fix for when engine returns error
* don't add extrued to show function
2023-09-21 04:32:47 +00:00
04e1b92a5b
Add a benchmark for parsing pipes-on-pipes ( #678 )
2023-09-21 03:13:07 +00:00
0553cd4621
tests for big files ( #675 )
...
* shit;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* u[dates;
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* still ignore the big one
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* Add big kitt SVG to benchmarks
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Adam Chalmers <adam.s.chalmers@gmail.com >
2023-09-20 19:35:37 -07:00
6cc8af5c23
make stdlib functions async ( #672 )
...
* wip
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
closer
Signed-off-by: Jess Frazelle <github@jessfraz.com >
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* closer
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* closer
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* compiles
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* connection
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix wasm
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* timeout
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* remove the drop
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* drop handle
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-20 18:27:08 -07:00
b6769889e3
Handle relative paths at kcl level ( #506 )
...
* handle relative paths at kcl level
* fmt
* update kittycad
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* bump
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix tests
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com >
2023-09-21 10:36:26 +10:00
a32258dac4
Engine manager can be cloned ( #671 )
2023-09-20 16:22:47 -07:00
18dbbad244
Use an actor to manage the Tokio engine connection ( #669 )
...
* Use an actor to manage the Tokio engine connection
This means EngineManager trait's methods take &self not &mut self, and the tokio implementation can be cloned.
* Clean up code
2023-09-20 16:59:03 -05:00
b67c16cc9d
Benchmark for KCL parser ( #664 )
...
* KCL benchmarks
* CI for benchmarks
* More specific name for benchmark
* Benchmark the right directory
* Format
2023-09-20 13:15:28 -05:00
ad482641ef
Unit test for zero-param programs ( #663 )
2023-09-20 10:51:49 -05:00
e69d263252
Revert swapping setCode
for deferredSetCode
in App ( #662 )
...
This fix was implemented in https://github.com/KittyCAD/modeling-app/pull/649
to try and address https://github.com/KittyCAD/modeling-app/issues/545 .
However, we need to run `setCode` to execute immediately here or else
files will not render in the 3D view when opened, as reported by @pierremtb.
Reverting for now to allow for a timely release https://github.com/KittyCAD/modeling-app/pull/656
Signed-off-by: Frank Noirot <frank@kittycad.io >
2023-09-20 10:32:36 -04:00
111738f38e
Fix the debug panel overflow ( #653 )
2023-09-20 05:36:29 -04:00
e34501cc5a
Ast fixes ( #650 )
...
* allow using member expressions for memory items
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes pi in binary expressions
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* add fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-19 16:05:53 -07:00
c767c1c3a6
Replace setCode
with deferredSetCode
in App ( #649 )
...
* Replace `setCode` with `deferredSetCode` in App
* Remove unused OpenFileButton component
2023-09-19 22:07:54 +00:00
e399a8f938
Franknoirot/ux papercuts 4 ( #640 )
...
* Add Cmd + / to support windows, update walkthrough
* Fix #628 dark mode <select> bg color
* Fix #621 by narrowing margins and moving to left
---------
Co-authored-by: Jess Frazelle <jessfraz@users.noreply.github.com >
2023-09-19 18:06:13 -04:00
59d5f2524a
fix function inside show not executing ( #641 )
...
* start of heap changes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix show bug
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* new images
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-19 14:20:14 -07:00
e74bcd0695
make it so the lsp server doesnt vom on restart ( #636 )
...
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-19 15:17:34 -04:00
22161ec386
Variables needs to scroll ( #624 )
...
* Variables needs to scroll
Fixes #609
* Run yarn fmt
---------
Co-authored-by: Frank Noirot <frank@kittycad.io >
2023-09-19 18:29:22 +00:00
ada46c4317
Fix Tauri auth in development ( #635 )
...
* Fix Tauri auth in development
* Fix Rust formatting
2023-09-19 14:08:26 -04:00
6675fa8d1e
UX Papercuts 3: use absolute paths, add error page with buttons to help refresh, etc ( #615 )
...
* Fix #593 : don't prevent default on link click
* Use absolute/explicit path for settings
Trying to test fix for #594
* Broken: replace almost all relative URLs with absolute
* Clean up to use clean useDismiss with absolute path
* Merge branch 'main' into franknoirot/ux-papercuts-3a
* Add buttons to home, reload, clear, and bug report on error screen
2023-09-19 14:06:56 -04:00
488e41ac0e
Fix docs link, test fixing relative URLs in Windows ( #606 )
...
* Fix #593 : don't prevent default on link click
* Use absolute/explicit path for settings
Trying to test fix for #594
* Broken: replace almost all relative URLs with absolute
* add relative jump backs util
* dot dot slash everywhere
* use usLocation not window.location
* the one that got away
* fmt 🤦♂️
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch >
2023-09-19 13:55:14 +10:00
8147f5f1eb
CLI-only code behind a feature flag ( #614 )
2023-09-18 21:38:40 -05:00
bc7e9d9789
non wasm engine errors ( #612 )
...
updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-18 17:31:11 -07:00
8d493d6517
Cargo update ( #611 )
2023-09-18 17:22:25 -07:00
24a31c94e7
Typo: noneCode => nonCode ( #607 )
2023-09-18 18:14:12 -05:00
76e3207251
recast fix ( #608 )
...
fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-18 15:56:11 -07:00
e2237fa9f6
use deferredSetCode so the 3D view resets ( #604 )
2023-09-18 17:44:25 -04:00
14b287a746
Franknoirot/ux papercuts 1 ( #596 )
...
* Properly show dark logo in System-light theme
* Fix linting errors for fill-rule and clip-rule
* Support system-light theme on Parametric Modeling step as well
Signed-off-by: Frank Noirot <frank@kittycad.io >
* Fix line number ref in Parametric Modeling copy
Signed-off-by: Frank Noirot <frank@kittycad.io >
* Copyediting tweaks
* Fix part name disappearing even when there is space
---------
Signed-off-by: Frank Noirot <frank@kittycad.io >
2023-09-18 13:13:04 -07:00
dd1b7631fa
round two decimal places on move ( #591 )
...
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-18 16:42:53 +10:00
f98f782b40
Bump syn from 2.0.33 to 2.0.37 in /src/wasm-lib ( #586 )
...
Bumps [syn](https://github.com/dtolnay/syn ) from 2.0.33 to 2.0.37.
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.33...2.0.37 )
---
updated-dependencies:
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-17 23:40:33 -07:00
01f5ecdc36
Bump schemars from 0.8.13 to 0.8.15 in /src/wasm-lib ( #587 )
...
Bumps [schemars](https://github.com/GREsau/schemars ) from 0.8.13 to 0.8.15.
- [Release notes](https://github.com/GREsau/schemars/releases )
- [Changelog](https://github.com/GREsau/schemars/blob/master/CHANGELOG.md )
- [Commits](https://github.com/GREsau/schemars/compare/v0.8.13...v0.8.15 )
---
updated-dependencies:
- dependency-name: schemars
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-17 23:38:05 -07:00
5297d3e142
both edit and move in one PR ( #566 )
...
* get the data for where lines are
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make pretty
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* new shit
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* beginning of stufff
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cleanup
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* add new fns
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* basic function
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix ups to keep order
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* further
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* failing test
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* do it in rust
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* trait
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* start of ui integration
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* weird shit
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* generate close on close
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* start of constraint functions
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* helper functions
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make work
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* constraints w ranges
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fmt
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* skip
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* comment
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* throw
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make close a bit less sensitive in move scenario
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* cleanup shit we didnt end up using
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* make it less hard to close
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* Fix edit after sketch
* Move to plane for sketch
* Fix pathToNode for ast mods
* Fix exit sketch mode with escape
* Fix fmt since my editor did it wrong
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fix link
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
Co-authored-by: Adam Sunderland <adam@kittycad.io >
2023-09-17 21:57:43 -07:00
f71f44968b
remove unneeded import ( #565 )
2023-09-17 09:19:53 +00:00
f592d8db84
Franknoirot/pretty buttons ( #550 )
2023-09-16 01:23:11 -04:00
31eca3728e
add sample script as integration test ( #559 )
...
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* fixes
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-15 20:45:28 -07:00
c5d8779af4
Update onboarding to be more complete ( #551 )
...
* Update Introduction
* Update Camera step
* Change link to expectations
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com >
* Set outline for onboarding
* Add Streaming step
* Remove Units step
* Add default kcl script
* Add Code Editor step
* Add Parametric Modeling step
* Add Interactive Numbers step
* Update bracket to use sqrt
* Add Command K step
* Assuage @jessfraz's code itchies
* Add User Menu step
* Add Project Menu step
* Add Export step
* Improve error page to actually show error
* Update the sketch step
* Add Future Work section
* Bring back the bracket code on the final step
* Set up the code to the bracket when starting onboarding
* Fix missing import
* Don't throw away users code if not empty
* Prompt the user if they have content in their file
---------
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com >
2023-09-16 02:37:40 +00:00
cf686bdeb0
adds more math functions and fixes parens ( #558 )
...
* nested parens fix
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* e, tau
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* docs
Signed-off-by: Jess Frazelle <github@jessfraz.com >
* remove test w log since that is a stdlib fn now
Signed-off-by: Jess Frazelle <github@jessfraz.com >
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-15 17:40:57 -07:00
ae7143a94f
add a bunch of math stdlib fns ( #555 )
...
add a bunch of math stuff
Signed-off-by: Jess Frazelle <github@jessfraz.com >
2023-09-15 15:54:49 -07:00
f2b24849b3
Move calls to the unreliable channel into a helper method ( #543 )
...
This'll let us handle JSON encoding in one place, as well as adding any
logging or anything. Not a huge deal, but it's a minor cleanup I made
while looking into an unrelated bug.
Signed-off-by: Paul Tagliamonte <paul@kittycad.io >
2023-09-15 17:14:58 -04:00