Skip to content

Commit

Permalink
Merge branch 'main' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
betaveros committed Jan 1, 2024
2 parents f13f151 + db5beaa commit 2d34227
Show file tree
Hide file tree
Showing 13 changed files with 2,015 additions and 638 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,6 @@ getrandom = { version = "0.2", features = ["js"] } # ???

[lib]
crate-type = ["cdylib", "rlib"]

[profile.release]
debug = 1
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
An attempt to give myself a new Pareto-optimal choice for quick-and-dirty scripts, particularly when I'm not on a dev computer, and to practice writing a more realistic programming language instead of the [overengineered stack-based nonsense](https://github.com/betaveros/paradoc) I spend too much time on. ([Crafting Interpreters](https://craftinginterpreters.com/) is such a good book, I have no excuses.)

You can [try Noulith online](https://betaveros.github.io/noulith/) (via wasm)!

## Elevator pitches (and anti-pitches)

- Immutable data structures (but not variables) means you can write `matrix = [[0] ** 10] ** 10; matrix[1][2] = 3` and not worry about it, instead of the `[[0] * 10 for _ in range(10)]` you always have to do in Python. You can also freely use things as keys in dictionaries. But, thanks to mutate-or-copy-on-write shenanigans behind the scenes (powered by Rust's overpowered reference-counting pointers), you don't have to sacrifice the performance you'd get from mutating lists. (There are almost certainly space leaks from cavalier use of `Rc` but shhhhh.)
Expand Down
26 changes: 13 additions & 13 deletions pkg/noulith.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,12 @@ function getImports() {
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
takeObject(arg0);
};
imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
}, arguments) };
imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };
imports.wbg.__wbg_process_e56fd54cf6319b6c = function(arg0) {
const ret = getObject(arg0).process;
return addHeapObject(ret);
Expand All @@ -257,14 +263,6 @@ function getImports() {
const ret = typeof(getObject(arg0)) === 'string';
return ret;
};
imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
const ret = module;
return addHeapObject(ret);
};
imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_crypto_b95d7173266618a9 = function(arg0) {
const ret = getObject(arg0).crypto;
return addHeapObject(ret);
Expand All @@ -273,11 +271,13 @@ function getImports() {
const ret = getObject(arg0).msCrypto;
return addHeapObject(ret);
};
imports.wbg.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
getObject(arg0).getRandomValues(getObject(arg1));
}, arguments) };
imports.wbg.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
imports.wbg.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
const ret = module;
return addHeapObject(ret);
};
imports.wbg.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
return addHeapObject(ret);
}, arguments) };
imports.wbg.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
Expand Down
Binary file modified pkg/noulith_bg.wasm
Binary file not shown.
Loading

0 comments on commit 2d34227

Please sign in to comment.