Skip to content

Commit

Permalink
add spell checker
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Nov 14, 2023
1 parent 8226ba4 commit 1ba9961
Show file tree
Hide file tree
Showing 39 changed files with 984 additions and 824 deletions.
2 changes: 2 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
skip = ./node_modules*,./dist/*,./package-lock.json,./lib/srfi/*,./assets/UnicodeData.txt,./scripts/numerals.scm
17 changes: 17 additions & 0 deletions .github/workflows/codespell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Codespell

on: [push, pull_request]

permissions:
contents: read

jobs:
codespell:
name: Check for spelling errors
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Codespell
uses: codespell-project/actions-codespell@v2
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Main interpreter data flow.
Main public function is `exec` that accept string (code) and Environment instance. If environment is not specified it use main user environment (same as lips.env) which is child of global environment.

`exec` use internal `parse` function that is JavaScript generator that parse single S-Expression and `exec` use `evaluate` to evaluate the expression.
`evaluate` use multiple features like handling of Syntax, Macros and it auto resolve promises. `evaluate` may or may not return a promise. But `exec` always return a promise, so it's easier to use. You can never know which expression return a promise and which don't. `evaluate` also use `apply` function that was inspired by meta circual evaluator (but it was refactored into this state, it was not like this from beginning).
`evaluate` use multiple features like handling of Syntax, Macros and it auto resolve promises. `evaluate` may or may not return a promise. But `exec` always return a promise, so it's easier to use. You can never know which expression return a promise and which don't. `evaluate` also use `apply` function that was inspired by meta circular evaluator (but it was refactored into this state, it was not like this from beginning).

## UML Diagram of all classes

Expand All @@ -16,7 +16,7 @@ Main public function is `exec` that accept string (code) and Environment instanc
## Lexer

Lexer is created as simple state machine with `Lexer._rules` that specify
all the states. The sate change is simple it can change from null to given
all the states. The state change is simple it can change from null to given
state for a given token (e.g. symbol), remain in same state and move from
given state to null. The last change produce new token. Rules are dynamic
the parser can be update by syntax extensions so `Lexer.rules` is a getter
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
* property throw error when name is used without ellipsis
* fix using dot notation inside syntax-rules macros
* typecheck `string->symbol` and `symbol->string`
* fix `parent.frame` inside `Intepreter`
* fix `parent.frame` inside `Interpreter`
* fix `eval` without env
* fix quote as delimiter
* fix comma dot as two tokens
Expand Down Expand Up @@ -362,7 +362,7 @@
* `if` no longer require boolean as cond
* change how arrays are presented, they are look like scheme vector `#(...)`
* rename `string` to `repr`
* new API `lips.Intepreter` - for using interpreter that have different stdout/stdin
* new API `lips.Interpreter` - for using interpreter that have different stdout/stdin
* balanced_parenthesis now throw exception on broken code
* remove global env from public API (you can still access it using `env.parent`)
* remove `->` function (it will collide with SRFI 197 that may be implemented in the future)
Expand Down Expand Up @@ -395,7 +395,7 @@
* improve balancing parenthesis
* expose balanced method in public API (preferred name)
* optional brackets
* `interator?` function and detection if iterators from `repr` and `type` [#51](https://github.com/jcubic/lips/issues/51)
* `iterator?` function and detection if iterators from `repr` and `type` [#51](https://github.com/jcubic/lips/issues/51)
* `add-repr!` function to add string representations to objects
* new `string=?`, `sort`, `in`, `list-tail` and `bound?` functions
* add new `exit` function into executable interpreter
Expand Down Expand Up @@ -689,7 +689,7 @@
### Features
* new nth and reverse functions
* new type checking functions null? regex? pair? string? number? symbol? array? object? boolean?
* add lips source code that throwed exception in JavaScript error message
* add lips source code that threw exception in JavaScript error message
### Bug fixes
* fix lambda with rest parameter
### Breaking
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------

Part of the library (contentloaded function) licesed with
Part of the library (contentloaded function) licensed with

Copyright (c) 2005-2010 Diego Perini and NWBOX S.a.s.

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.16-blue.svg)](https://www.npmjs.com/package/@jcubic/lips)
![1.0.0 Complete](https://img.shields.io/github/milestones/progress-percent/jcubic/lips/1?label=1.0.0%20Complete)
[![Build and test](https://github.com/jcubic/lips/actions/workflows/build.yaml/badge.svg?branch=devel&event=push)](https://github.com/jcubic/lips/actions/workflows/build.yaml)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&27bf4fb65e05b7570ad966f858c29bcc)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Coverage Status](https://coveralls.io/repos/github/jcubic/lips/badge.svg?branch=devel&61cb7f36a3668cabc9125f4c4bce1141)](https://coveralls.io/github/jcubic/lips?branch=devel)
[![Join Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jcubic/lips)
![NPM Download Count](https://img.shields.io/npm/dm/@jcubic/lips)
![JSDelivr Download count](https://img.shields.io/jsdelivr/npm/hm/@jcubic/lips)
Expand Down Expand Up @@ -79,7 +79,7 @@ https://github.com/jcubic/lips/blob/master/lib/js/bookmark.js
```

Create any link in your bookmarks, edit it and copy paste the content of that file.
Affter you click on the link it will create the REPL at the bottom of the page.
After you click on the link it will create the REPL at the bottom of the page.
(NOTE: It may not work on every page because of content security policy;
e.g. google.com or gihub.com)

Expand Down Expand Up @@ -203,7 +203,7 @@ Executables also return a S-Expression according to SRFI-176 use `lips --version

## Limitations
Because LIPS is tree walking interpreter sometimes it may be slow. Especially if you want to
process long arrays and use callback function. If the array is quite large each pice of code
process long arrays and use callback function. If the array is quite large each piece of code
inside the callback may slow down the processing. For example see:

script [reference.scm](https://github.com/jcubic/lips/blob/devel/scripts/reference.scm)
Expand All @@ -222,12 +222,12 @@ something like this:
(arr.sort fn))
```

Another example of slow performace is using LIPS with React, the more code you put into components
Another example of slow performance is using LIPS with React, the more code you put into components
the slower the app will become.

Examples:
* [Preact app that update SVG](https://codepen.io/jcubic/pen/PojYxBP) - it requires to use debounce.
* [React with Hooks](https://codepen.io/jcubic/pen/PoKQmpq?editors=1000) - on click the UI freezes for ~300ms, you can see warnigs in dev tools.
* [React with Hooks](https://codepen.io/jcubic/pen/PoKQmpq?editors=1000) - on click the UI freezes for ~300ms, you can see warnings in dev tools.

The issue with performance is tracked in [#197](https://github.com/jcubic/lips/issues/197).

Expand Down
Loading

0 comments on commit 1ba9961

Please sign in to comment.