Compare commits

...

178 Commits

Author SHA1 Message Date
Scott Richmond
acce9f43fc release build 2025-07-09 14:44:01 -04:00
Scott Richmond
e0748d9e52 Merge branch 'main' into release 2025-07-09 14:43:10 -04:00
Scott Richmond
17b0ef5d4e Merge branch 'release' of alea.ludus.dev:twc/ludus into release 2025-07-09 14:38:38 -04:00
Scott Richmond
4249443a98 merge 2025-07-09 14:38:07 -04:00
f980f7e380 release build 2025-07-09 14:27:09 -04:00
13971927e3 Merge branch 'release' of alea.ludus.dev:twc/ludus 2025-07-09 14:26:36 -04:00
8444c2f8d2 Merge branch 'main' into release 2025-07-09 14:26:09 -04:00
Scott Richmond
e7a2bbb60d release build 2025-07-08 18:27:47 -04:00
Scott Richmond
91a7d0c453 Merge branch 'main' into release 2025-07-08 18:26:49 -04:00
671cac5fe6 Merge branch 'main' into release 2025-07-08 18:22:38 -04:00
cbae18c88d Merge branch 'main' into release 2025-07-08 18:19:46 -04:00
b37f904264 Merge branch 'main' into release 2025-07-08 16:48:15 -04:00
e29ca9642f Merge branch 'main' into release 2025-07-08 16:44:55 -04:00
687923c438 more fighting with with lfs 2025-07-07 17:26:19 -04:00
Scott Richmond
dd2e6c9b4d release build 2025-07-07 15:45:03 -04:00
Scott Richmond
a347e1046a remove process return spam 2025-07-07 15:44:08 -04:00
Scott Richmond
2c86b4894b release build 2025-07-07 13:25:50 -04:00
Scott Richmond
1e95e11b60 improve svg background box logic 2025-07-07 13:25:31 -04:00
Scott Richmond
adfee67578 fix comment template string 2025-07-07 13:03:00 -04:00
Scott Richmond
0100241ba2 release build 2025-07-07 11:12:36 -04:00
Scott Richmond
e94246fb88 remove printlns again 2025-07-07 11:11:44 -04:00
Scott Richmond
aaefb47d18 build 2025-07-07 10:40:10 -04:00
Scott Richmond
cdc086603d release build 2025-07-07 09:06:39 -04:00
Scott Richmond
dd8fdf7ff8 fix receive stack regression/re introduce await regression 2025-07-07 09:06:02 -04:00
Scott Richmond
d9f3fbb828 builded 2025-07-07 08:43:12 -04:00
Scott Richmond
d84ec0b7ac release build 2025-07-07 08:42:44 -04:00
Scott Richmond
43f466a74e fix prelude bindings 2025-07-07 08:42:09 -04:00
Scott Richmond
26f6ecf020 update prelude location in docs 2025-07-07 00:40:26 -04:00
Scott Richmond
a01df39ff0 bring in old readme 2025-07-07 00:27:20 -04:00
Scott Richmond
43a67ddeb7 Merge branch 'main' into actors 2025-07-07 00:22:56 -04:00
Scott Richmond
b671f73389 commit some changes 2025-07-07 00:17:57 -04:00
Scott Richmond
b7a283caac build 2025-07-07 00:12:45 -04:00
Scott Richmond
2771d26865 release build 2025-07-07 00:12:36 -04:00
Scott Richmond
7ce2392e5d locate new prelude 2025-07-07 00:12:01 -04:00
Scott Richmond
6cc6d5425c actually add doc 2025-07-07 00:10:58 -04:00
Scott Richmond
5b29d505d0 build a doc file, bring in some other documentation 2025-07-07 00:10:37 -04:00
Scott Richmond
62b841d2cc moar cleanup 2025-07-06 23:31:12 -04:00
Scott Richmond
1939792482 clean up files 2025-07-06 23:30:14 -04:00
Scott Richmond
dc0bb37193 bring in old janet interpreter for doc purposes 2025-07-06 23:14:32 -04:00
Scott Richmond
a87fa6bd3f old->new prelude 2025-07-06 23:14:01 -04:00
Scott Richmond
77635685ab add new actor functions 2025-07-06 19:40:55 -04:00
Scott Richmond
4f62c24db8 release build 2025-07-06 19:06:27 -04:00
Scott Richmond
26ab38faeb remove printlns, soften language 2025-07-06 19:05:45 -04:00
Scott Richmond
72efa5bc51 release build 2025-07-06 19:00:45 -04:00
Scott Richmond
1e022674d3 improve pattern representation; fix get callsites 2025-07-06 19:00:03 -04:00
Scott Richmond
488571c26b release build 2025-07-06 18:54:45 -04:00
Scott Richmond
b3ed44f3ea build + fix some turtle stuff 2025-07-06 18:54:10 -04:00
Scott Richmond
eaef0dfae0 release build 2025-07-06 18:44:10 -04:00
Scott Richmond
dc16420545 fix key_up bug in ludus.js 2025-07-06 18:43:35 -04:00
Scott Richmond
fc81f1149d improve (but not fully fix?) reported line numbers in tracebacks 2025-07-06 18:27:43 -04:00
Scott Richmond
f1224a9b53 builded again 2025-07-06 17:57:01 -04:00
Scott Richmond
c332c07060 release build 2025-07-06 17:56:26 -04:00
Scott Richmond
1f9d4920c1 improve signature for last 2025-07-06 17:55:48 -04:00
Scott Richmond
b4e97d9041 fix guard clause bug in function calls 2025-07-06 17:53:10 -04:00
Scott Richmond
28ebeb68ca release build 2025-07-06 17:19:12 -04:00
Scott Richmond
9361b65c4a get doc! to where it needs to be; make show much longer 2025-07-06 17:18:37 -04:00
Scott Richmond
9ab436fb2e release build 2025-07-06 16:53:39 -04:00
Scott Richmond
9ea1a9905f oxidize index_of and indices_of for dissociated press 2025-07-06 16:52:54 -04:00
Scott Richmond
b5a279371f builded 2025-07-06 16:40:21 -04:00
Scott Richmond
a131eb2ab0 release build 2025-07-06 16:40:05 -04:00
Scott Richmond
658215cc7c have rust make words 2025-07-06 16:39:29 -04:00
Scott Richmond
cd06cc788a release build 2025-07-06 16:17:58 -04:00
Scott Richmond
1337da395c do some things and stuff? 2025-07-06 16:17:21 -04:00
Scott Richmond
7a028fbaa2 build 2025-07-06 12:09:52 -04:00
Scott Richmond
64156129ec release build 2025-07-06 12:09:41 -04:00
Scott Richmond
388fff4eca asdf 2025-07-06 12:08:57 -04:00
Scott Richmond
ffd1aa7127 wire up keyboard events 2025-07-06 01:40:03 -04:00
Scott Richmond
9c8159dde6 use NotNan as number representation 2025-07-06 00:27:50 -04:00
Scott Richmond
e3683f82b5 add pow, work on sets 2025-07-05 23:56:10 -04:00
Scott Richmond
4f9ebdaeb1 js & rust code for key inputs 2025-07-05 23:33:39 -04:00
Scott Richmond
d39113d755 factor svg/p5 into modules; fix svg rendering 2025-07-05 23:20:41 -04:00
Scott Richmond
8dfb8c88fe improve panic message, slightly 2025-07-05 22:40:11 -04:00
Scott Richmond
cefb29d610 build 2025-07-05 18:42:38 -04:00
Scott Richmond
19af8c5253 release build 2025-07-05 18:36:47 -04:00
Scott Richmond
f0d72ab45f debug multiturtles? 2025-07-05 18:36:01 -04:00
Scott Richmond
bd40b365c8 fix p5 drawing command conversion 2025-07-05 17:38:40 -04:00
Scott Richmond
17762b360b release build 2025-07-05 17:30:58 -04:00
Scott Richmond
f961232ed3 fix p5 state calculations 2025-07-05 17:30:19 -04:00
Scott Richmond
9e5cd358fd release build 2025-07-05 17:09:38 -04:00
Scott Richmond
0576365a71 first pass at multiturtles 2025-07-05 17:09:01 -04:00
Scott Richmond
40c145bef5 massage prelude into multiturtles; wip 2025-07-05 15:57:05 -04:00
Scott Richmond
6f832f45cb add canadian spellings 2025-07-05 15:51:45 -04:00
Scott Richmond
59a59b0ff0 oops: implement called keywords! 2025-07-05 15:49:36 -04:00
Scott Richmond
692579bee5 middleware should now handle multiple turtles 2025-07-05 15:26:48 -04:00
Scott Richmond
c67b25145f do some work on linking, unravel it, spawn! is now a normal fn 2025-07-05 14:45:50 -04:00
Scott Richmond
c03ce52238 don't try to export state, which no longer exists 2025-07-05 14:45:04 -04:00
Scott Richmond
9d22e121f1 revert spawn! as a special form 2025-07-05 14:39:17 -04:00
Scott Richmond
daf6791f19 actually export llist fns 2025-07-05 14:26:50 -04:00
Scott Richmond
8d3705901c add functions from June 2025 CC1 2025-07-05 14:24:38 -04:00
Scott Richmond
157bb091fb update validator 2025-07-04 17:44:44 -04:00
Scott Richmond
89f7becef9 spawn is now a special form 2025-07-04 17:24:54 -04:00
Scott Richmond
8527ac15f0 stringify -> show in explicit panics 2025-07-04 16:17:55 -04:00
Scott Richmond
5aa990de13 asdf 2025-07-04 15:57:16 -04:00
Scott Richmond
dd05a90904 asdf 2025-07-04 15:37:39 -04:00
Scott Richmond
eacd13efcd release build 2025-07-04 15:30:26 -04:00
Scott Richmond
8b90d050f6 add is_starting_up 2025-07-04 15:29:44 -04:00
Scott Richmond
8a46765484 release build 2025-07-04 15:19:32 -04:00
Scott Richmond
3aa8e32100 fix slice_n 2025-07-04 15:18:49 -04:00
Scott Richmond
3ad1109b49 release build 2025-07-04 15:10:51 -04:00
Scott Richmond
15f0fa4df6 globalize key_down and key_up 2025-07-04 15:09:02 -04:00
Scott Richmond
375106d72b release build 2025-07-04 14:44:50 -04:00
Scott Richmond
49c52226cb add slice_n to prelude 2025-07-04 14:44:09 -04:00
Scott Richmond
93067e395d release build 2025-07-04 14:11:01 -04:00
Scott Richmond
5c6946bceb consolidate js functions 2025-07-04 14:10:27 -04:00
Scott Richmond
6eb49fcdd5 keep working on panics: tracebacks sort of work? 2025-07-04 14:10:03 -04:00
Scott Richmond
51bf8f78e1 also put the new panic mod under version control 2025-07-04 01:23:31 -04:00
Scott Richmond
7c360fe3d2 working on panics 2025-07-04 01:23:16 -04:00
Scott Richmond
3efb317cdd pretty good parsing errors 2025-07-03 23:23:14 -04:00
Scott Richmond
35c56dc48f scanning errors are now nice 2025-07-03 20:45:55 -04:00
Scott Richmond
f1a4a31aa5 use serde to serialize the things 2025-07-03 20:22:11 -04:00
Scott Richmond
8eae684b85 string keys on dicts now fully work 2025-07-03 15:30:51 -04:00
Scott Richmond
cdeb732523 add string keys to dicts 2025-07-03 12:41:00 -04:00
Scott Richmond
917fcfe103 work on errors 2025-07-02 23:47:02 -04:00
Scott Richmond
08992461f0 properly scan escape chars 2025-07-02 20:54:21 -04:00
Scott Richmond
e4d9dcd110 make an attempt at fixing string escaping 2025-07-02 19:44:12 -04:00
Scott Richmond
04dcd5bcc9 method syntax sugar achieved 2025-07-02 19:29:49 -04:00
Scott Richmond
4bbc03c692 do and panic are now simple forms 2025-07-02 17:29:09 -04:00
Scott Richmond
c7578501da release build 2025-07-02 16:56:59 -04:00
Scott Richmond
053dea103c don't discard initial messages 2025-07-02 16:56:30 -04:00
Scott Richmond
59c4c94ac9 add log to input 2025-07-02 16:20:22 -04:00
Scott Richmond
4a2bb35703 release build 2025-07-02 16:05:49 -04:00
Scott Richmond
bbc4938c36 wasm->build 2025-07-02 16:05:38 -04:00
Scott Richmond
6a22f0de3a fix complete reset 2025-07-02 16:05:06 -04:00
Scott Richmond
35a2a87e8b move default to the top 2025-07-02 15:47:33 -04:00
Scott Richmond
877e21aaae clean up justfile 2025-07-02 15:43:44 -04:00
Scott Richmond
72288b677a try again w/ justfile 2025-07-02 15:37:56 -04:00
Scott Richmond
f51eee7b59 finish release recipe? 2025-07-02 15:35:19 -04:00
Scott Richmond
f8fd26cf74 justinging 2025-07-02 15:34:36 -04:00
Scott Richmond
66a1871aa8 keep justing 2025-07-02 15:26:19 -04:00
Scott Richmond
abcbd06fac keep working on justfile 2025-07-02 15:19:54 -04:00
Scott Richmond
2aaf31f861 start work on release recipe 2025-07-02 15:04:54 -04:00
Scott Richmond
e5f70e0803 build 2025-07-02 14:52:22 -04:00
Scott Richmond
7a0da1e678 ready handshake for better message passing 2025-07-02 14:51:42 -04:00
Scott Richmond
dc972667c9 build 2025-07-02 13:49:36 -04:00
Scott Richmond
f25f092e4e prevent rust panic on kill signal 2025-07-02 13:44:26 -04:00
Scott Richmond
c62fc9ae62 actually (?!) fix drunk turtle problem 2025-07-01 20:10:24 -04:00
Scott Richmond
dfd38299a6 try again 2025-07-01 20:07:02 -04:00
Scott Richmond
8c3873e544 maybe fix drunk turtle bug? 2025-07-01 19:55:49 -04:00
Scott Richmond
00afe111c1 another wasm release 2025-07-01 19:20:33 -04:00
Scott Richmond
47b86f54cd wasm release 2025-07-01 19:08:13 -04:00
Scott Richmond
5e8685831c thoughts 2025-07-01 19:07:16 -04:00
Scott Richmond
111cf32dbe get reading input up and running 2025-07-01 19:04:38 -04:00
Scott Richmond
0c155c3a96 get fetch up & running 2025-07-01 18:52:03 -04:00
Scott Richmond
1732cf0450 get input working 2025-07-01 16:59:42 -04:00
Scott Richmond
fa2999c68a update worker url resolution 2025-07-01 16:30:17 -04:00
Scott Richmond
03d41765ee fix worker path 2025-07-01 16:07:01 -04:00
Scott Richmond
8097d4010b get commands wired up, probs 2025-07-01 14:35:36 -04:00
Scott Richmond
176cf37588 fix FF event loop bug 2025-07-01 12:54:11 -04:00
Scott Richmond
1fc3bc89d3 add thoughts 2025-07-01 11:10:50 -04:00
Scott Richmond
9cbf3eb4f8 stash changes 2025-07-01 10:42:34 -04:00
Scott Richmond
2e7175adea fix truly heinous memory bug 2025-07-01 01:30:10 -04:00
Scott Richmond
33602f0660 hook the things up and discover a possible stop-the-world bug 2025-07-01 00:43:01 -04:00
Scott Richmond
0eb1a9826c integration work continues 2025-06-30 18:59:59 -04:00
Scott Richmond
afd0b7ab93 also add the new io file 2025-06-30 12:49:07 -04:00
Scott Richmond
30a68eedc7 stub out first pass of io system 2025-06-30 12:48:50 -04:00
Scott Richmond
08c14570a6 use a hashset instead of vec for dead ids 2025-06-29 18:14:06 -04:00
Scott Richmond
cd33959293 start working on packaging better 2025-06-29 18:13:49 -04:00
Scott Richmond
524ccc9b64 update chumsky, lose ariadne, update parser to conform to new chumsky 2025-06-29 18:08:44 -04:00
Scott Richmond
4d979f4307 add a justfile, some project management 2025-06-29 17:47:08 -04:00
Scott Richmond
4cfb47c34a save work 2025-06-29 11:38:45 -04:00
Scott Richmond
7b507ab313 actually get receive working???? 2025-06-28 16:40:31 -04:00
Scott Richmond
4776318f17 some notes 2025-06-27 20:54:48 -04:00
Scott Richmond
290b205e1b make progress, I guess 2025-06-27 20:41:29 -04:00
Scott Richmond
1d0c3df797 parser housekeeping; add receive to lexer and parser 2025-06-27 19:15:59 -04:00
Scott Richmond
2c4e11abdd move Ast into its own module 2025-06-27 19:05:17 -04:00
Scott Richmond
597deb7c28 ugh. spin my wheels a lot. decide to start work on the receive special form 2025-06-27 18:48:27 -04:00
Scott Richmond
7edb6bfb23 add sleep, which was unexpectedly titchy! 2025-06-27 14:27:42 -04:00
Scott Richmond
8993b06302 make some new process functions 2025-06-27 12:27:54 -04:00
Scott Richmond
94bcaa2a86 some notes for tomorrow's work 2025-06-26 23:28:17 -04:00
Scott Richmond
946fc6f9eb send messages, motherfucker! 2025-06-26 20:30:40 -04:00
Scott Richmond
aa1b4077ab add a process value 2025-06-26 17:17:41 -04:00
Scott Richmond
dbe22a2a5e devise a way of communicating between ludus and processes 2025-06-26 17:15:00 -04:00
Scott Richmond
92654706f9 refactor to have a world run a process 2025-06-26 16:11:35 -04:00
Scott Richmond
0b8f766639 start work on actor model 2025-06-26 01:28:33 -04:00
Scott Richmond
b257764c74 maybe get git right? ugh 2025-06-25 23:21:22 -04:00
Scott Richmond
08b95e7b03 fix blasted merge conflicts 2025-06-25 23:18:59 -04:00
Scott Richmond
cb036fa0ea cleanup before next text publish 2025-06-25 22:58:29 -04:00
Scott Richmond
53a83f2bef maybe figure out the wasm thing? 2025-06-25 22:56:39 -04:00
7 changed files with 51 additions and 157 deletions

View File

@ -68,7 +68,7 @@ export function p5 (commands) {
const new_state = command_to_state(prev_state, this_command)
all_states[turtle_id].push(new_state)
}
console.log(all_states)
const [r, g, b, _] = resolve_color(background_color)
if ((r + g + b)/3 > 128) set_turtle_color([0, 0, 0, 150])
const p5_calls = [...p5_call_root()]

4
pkg/rudus.d.ts vendored
View File

@ -14,8 +14,8 @@ export interface InitOutput {
readonly __wbindgen_malloc: (a: number, b: number) => number;
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
readonly __wbindgen_export_6: WebAssembly.Table;
readonly closure361_externref_shim: (a: number, b: number, c: any) => void;
readonly closure384_externref_shim: (a: number, b: number, c: any, d: any) => void;
readonly closure355_externref_shim: (a: number, b: number, c: any) => void;
readonly closure368_externref_shim: (a: number, b: number, c: any, d: any) => void;
readonly __wbindgen_start: () => void;
}

View File

@ -17,22 +17,6 @@ function handleError(f, args) {
}
}
function logError(f, args) {
try {
return f.apply(this, args);
} catch (e) {
let error = (function () {
try {
return e instanceof Error ? `${e.message}\n\nStack:\n${e.stack}` : e.toString();
} catch(_) {
return "<failed to stringify thrown value>";
}
}());
console.error("wasm-bindgen: imported JS function that was not marked as `catch` threw an error:", error);
throw e;
}
}
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
@ -70,8 +54,6 @@ const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
function passStringToWasm0(arg, malloc, realloc) {
if (typeof(arg) !== 'string') throw new Error(`expected a string argument, found ${typeof(arg)}`);
if (realloc === undefined) {
const buf = cachedTextEncoder.encode(arg);
const ptr = malloc(buf.length, 1) >>> 0;
@ -100,7 +82,7 @@ function passStringToWasm0(arg, malloc, realloc) {
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
const ret = encodeString(arg, view);
if (ret.read !== arg.length) throw new Error('failed to pass whole string');
offset += ret.written;
ptr = realloc(ptr, len, offset, 1) >>> 0;
}
@ -122,12 +104,6 @@ function isLikeNone(x) {
return x === undefined || x === null;
}
function _assertBoolean(n) {
if (typeof(n) !== 'boolean') {
throw new Error(`expected a boolean argument, found ${typeof(n)}`);
}
}
const CLOSURE_DTORS = (typeof FinalizationRegistry === 'undefined')
? { register: () => {}, unregister: () => {} }
: new FinalizationRegistry(state => {
@ -158,71 +134,6 @@ function makeMutClosure(arg0, arg1, dtor, f) {
CLOSURE_DTORS.register(real, state, state);
return real;
}
function debugString(val) {
// primitive types
const type = typeof val;
if (type == 'number' || type == 'boolean' || val == null) {
return `${val}`;
}
if (type == 'string') {
return `"${val}"`;
}
if (type == 'symbol') {
const description = val.description;
if (description == null) {
return 'Symbol';
} else {
return `Symbol(${description})`;
}
}
if (type == 'function') {
const name = val.name;
if (typeof name == 'string' && name.length > 0) {
return `Function(${name})`;
} else {
return 'Function';
}
}
// objects
if (Array.isArray(val)) {
const length = val.length;
let debug = '[';
if (length > 0) {
debug += debugString(val[0]);
}
for(let i = 1; i < length; i++) {
debug += ', ' + debugString(val[i]);
}
debug += ']';
return debug;
}
// Test for built-in
const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
let className;
if (builtInMatches && builtInMatches.length > 1) {
className = builtInMatches[1];
} else {
// Failed to match the standard '[object ClassName]'
return toString.call(val);
}
if (className == 'Object') {
// we're a user defined class or Object
// JSON.stringify avoids problems with cycles, and is generally much
// easier than looping through ownProperties of `val`.
try {
return 'Object(' + JSON.stringify(val) + ')';
} catch (_) {
return 'Object';
}
}
// errors
if (val instanceof Error) {
return `${val.name}: ${val.message}\n${val.stack}`;
}
// TODO we could test for more things here, like `Set`s and `Map`s.
return className;
}
/**
* @param {string} src
* @returns {Promise<void>}
@ -234,19 +145,12 @@ export function ludus(src) {
return ret;
}
function _assertNum(n) {
if (typeof(n) !== 'number') throw new Error(`expected a number argument, found ${typeof(n)}`);
}
function __wbg_adapter_20(arg0, arg1, arg2) {
_assertNum(arg0);
_assertNum(arg1);
wasm.closure361_externref_shim(arg0, arg1, arg2);
function __wbg_adapter_18(arg0, arg1, arg2) {
wasm.closure355_externref_shim(arg0, arg1, arg2);
}
function __wbg_adapter_46(arg0, arg1, arg2, arg3) {
_assertNum(arg0);
_assertNum(arg1);
wasm.closure384_externref_shim(arg0, arg1, arg2, arg3);
function __wbg_adapter_44(arg0, arg1, arg2, arg3) {
wasm.closure368_externref_shim(arg0, arg1, arg2, arg3);
}
async function __wbg_load(module, imports) {
@ -291,7 +195,7 @@ function __wbg_get_imports() {
const ret = arg0.call(arg1, arg2);
return ret;
}, arguments) };
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function() { return logError(function (arg0, arg1) {
imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
let deferred0_0;
let deferred0_1;
try {
@ -301,7 +205,7 @@ function __wbg_get_imports() {
} finally {
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
}
}, arguments) };
};
imports.wbg.__wbg_io_5a3c8ea72d8c6ea3 = function() { return handleError(function (arg0, arg1) {
let deferred0_0;
let deferred0_1;
@ -314,17 +218,17 @@ function __wbg_get_imports() {
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
}
}, arguments) };
imports.wbg.__wbg_log_11652c6a56eeddfb = function() { return logError(function (arg0, arg1) {
imports.wbg.__wbg_log_11652c6a56eeddfb = function(arg0, arg1) {
console.log(getStringFromWasm0(arg0, arg1));
}, arguments) };
imports.wbg.__wbg_new_23a2665fac83c611 = function() { return logError(function (arg0, arg1) {
};
imports.wbg.__wbg_new_23a2665fac83c611 = function(arg0, arg1) {
try {
var state0 = {a: arg0, b: arg1};
var cb0 = (arg0, arg1) => {
const a = state0.a;
state0.a = 0;
try {
return __wbg_adapter_46(a, state0.b, arg0, arg1);
return __wbg_adapter_44(a, state0.b, arg0, arg1);
} finally {
state0.a = a;
}
@ -334,65 +238,65 @@ function __wbg_get_imports() {
} finally {
state0.a = state0.b = 0;
}
}, arguments) };
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() { return logError(function () {
};
imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
const ret = new Error();
return ret;
}, arguments) };
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function() { return logError(function (arg0, arg1) {
};
imports.wbg.__wbg_newnoargs_105ed471475aaf50 = function(arg0, arg1) {
const ret = new Function(getStringFromWasm0(arg0, arg1));
return ret;
}, arguments) };
imports.wbg.__wbg_now_8dddb61fa4928554 = function() { return logError(function () {
};
imports.wbg.__wbg_now_8dddb61fa4928554 = function() {
const ret = Date.now();
return ret;
}, arguments) };
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function() { return logError(function (arg0) {
};
imports.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5 = function(arg0) {
queueMicrotask(arg0);
}, arguments) };
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function() { return logError(function (arg0) {
};
imports.wbg.__wbg_queueMicrotask_d3219def82552485 = function(arg0) {
const ret = arg0.queueMicrotask;
return ret;
}, arguments) };
imports.wbg.__wbg_random_57c118f142535bb6 = function() { return logError(function () {
};
imports.wbg.__wbg_random_57c118f142535bb6 = function() {
const ret = Math.random();
return ret;
}, arguments) };
imports.wbg.__wbg_resolve_4851785c9c5f573d = function() { return logError(function (arg0) {
};
imports.wbg.__wbg_resolve_4851785c9c5f573d = function(arg0) {
const ret = Promise.resolve(arg0);
return ret;
}, arguments) };
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function() { return logError(function (arg0, arg1) {
};
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
const ret = arg1.stack;
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
}, arguments) };
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() { return logError(function () {
};
imports.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07 = function() {
const ret = typeof global === 'undefined' ? null : global;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments) };
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() { return logError(function () {
};
imports.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0 = function() {
const ret = typeof globalThis === 'undefined' ? null : globalThis;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments) };
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() { return logError(function () {
};
imports.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819 = function() {
const ret = typeof self === 'undefined' ? null : self;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments) };
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() { return logError(function () {
};
imports.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40 = function() {
const ret = typeof window === 'undefined' ? null : window;
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
}, arguments) };
imports.wbg.__wbg_then_44b73946d2fb3e7d = function() { return logError(function (arg0, arg1) {
};
imports.wbg.__wbg_then_44b73946d2fb3e7d = function(arg0, arg1) {
const ret = arg0.then(arg1);
return ret;
}, arguments) };
imports.wbg.__wbg_then_48b406749878a531 = function() { return logError(function (arg0, arg1, arg2) {
};
imports.wbg.__wbg_then_48b406749878a531 = function(arg0, arg1, arg2) {
const ret = arg0.then(arg1, arg2);
return ret;
}, arguments) };
};
imports.wbg.__wbindgen_cb_drop = function(arg0) {
const obj = arg0.original;
if (obj.cnt-- == 1) {
@ -400,19 +304,11 @@ function __wbg_get_imports() {
return true;
}
const ret = false;
_assertBoolean(ret);
return ret;
};
imports.wbg.__wbindgen_closure_wrapper8193 = function() { return logError(function (arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 362, __wbg_adapter_20);
imports.wbg.__wbindgen_closure_wrapper1080 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 356, __wbg_adapter_18);
return ret;
}, arguments) };
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
const ret = debugString(arg1);
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
const len1 = WASM_VECTOR_LEN;
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
};
imports.wbg.__wbindgen_init_externref_table = function() {
const table = wasm.__wbindgen_export_2;
@ -426,12 +322,10 @@ function __wbg_get_imports() {
};
imports.wbg.__wbindgen_is_function = function(arg0) {
const ret = typeof(arg0) === 'function';
_assertBoolean(ret);
return ret;
};
imports.wbg.__wbindgen_is_undefined = function(arg0) {
const ret = arg0 === undefined;
_assertBoolean(ret);
return ret;
};
imports.wbg.__wbindgen_string_get = function(arg0, arg1) {

BIN
pkg/rudus_bg.wasm (Stored with Git LFS)

Binary file not shown.

View File

@ -9,6 +9,6 @@ export const __wbindgen_free: (a: number, b: number, c: number) => void;
export const __wbindgen_malloc: (a: number, b: number) => number;
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
export const __wbindgen_export_6: WebAssembly.Table;
export const closure361_externref_shim: (a: number, b: number, c: any) => void;
export const closure384_externref_shim: (a: number, b: number, c: any, d: any) => void;
export const closure355_externref_shim: (a: number, b: number, c: any) => void;
export const closure368_externref_shim: (a: number, b: number, c: any, d: any) => void;
export const __wbindgen_start: () => void;

View File

@ -95,7 +95,7 @@ pub async fn do_io (msgs: Vec<MsgOut>) -> Vec<MsgIn> {
if !inbox.is_empty() {
// console_log!("ludus received messages");
for msg in inbox.iter() {
// console_log!("{}", msg);
console_log!("{}", msg);
}
}
inbox

View File

@ -369,7 +369,7 @@ impl Creature {
}
"yield" => {
self.r#yield = true;
// console_log!("yielding from {}", self.pid);
console_log!("yielding from {}", self.pid);
self.push(Value::Keyword("ok"));
}
"alive" => {