Compare commits

...

168 Commits

Author SHA1 Message Date
8d6026d934 trying lfs again 2025-07-07 15:53:20 -04:00
Scott Richmond
2619e3ee56 premerge 2025-07-07 15:49:13 -04:00
Scott Richmond
7e1034f7d1 release build 2025-07-07 15:45:03 -04:00
Scott Richmond
5ee4d87db7 remove process return spam 2025-07-07 15:44:08 -04:00
3360e0d96b Merge branch 'main' of alea.ludus.dev:twc/ludus 2025-07-07 13:53:11 -04:00
8c27f63cb0 moving wasm to lfs 2025-07-07 13:46:03 -04:00
Scott Richmond
14e4cf93ae release build 2025-07-07 13:25:50 -04:00
Scott Richmond
4134a69fcc improve svg background box logic 2025-07-07 13:25:31 -04:00
Scott Richmond
ee54da0305 fix comment template string 2025-07-07 13:03:00 -04:00
Scott Richmond
b9803c8357 release build 2025-07-07 11:12:36 -04:00
Scott Richmond
6c4ea6d12e remove printlns again 2025-07-07 11:11:44 -04:00
Scott Richmond
ddeb63d977 build 2025-07-07 10:40:10 -04:00
Scott Richmond
9fc1a1ef7f release build 2025-07-07 09:06:39 -04:00
Scott Richmond
f2dbb2743e fix receive stack regression/re introduce await regression 2025-07-07 09:06:02 -04:00
Scott Richmond
fd7152a91b builded 2025-07-07 08:43:12 -04:00
Scott Richmond
3f6bafb1bd release build 2025-07-07 08:42:44 -04:00
Scott Richmond
c2329519d7 fix prelude bindings 2025-07-07 08:42:09 -04:00
Scott Richmond
28cc6ddf1d update prelude location in docs 2025-07-07 00:40:26 -04:00
Scott Richmond
f04522e62b bring in old readme 2025-07-07 00:27:20 -04:00
Scott Richmond
75c90c50a4 Merge branch 'main' into actors 2025-07-07 00:22:56 -04:00
Scott Richmond
69b6b0cce6 commit some changes 2025-07-07 00:17:57 -04:00
Scott Richmond
74ecea9ff6 build 2025-07-07 00:12:45 -04:00
Scott Richmond
f5b34e3bc6 release build 2025-07-07 00:12:36 -04:00
Scott Richmond
3946e5d6fa locate new prelude 2025-07-07 00:12:01 -04:00
Scott Richmond
2c10c5bf07 actually add doc 2025-07-07 00:10:58 -04:00
Scott Richmond
49bb50ada1 build a doc file, bring in some other documentation 2025-07-07 00:10:37 -04:00
Scott Richmond
79720ba833 moar cleanup 2025-07-06 23:31:12 -04:00
Scott Richmond
f9ff565db1 clean up files 2025-07-06 23:30:14 -04:00
Scott Richmond
2353b6eb9a bring in old janet interpreter for doc purposes 2025-07-06 23:14:32 -04:00
Scott Richmond
d20c453180 old->new prelude 2025-07-06 23:14:01 -04:00
Scott Richmond
a444f789f3 add new actor functions 2025-07-06 19:40:55 -04:00
Scott Richmond
842f1e7634 release build 2025-07-06 19:06:27 -04:00
Scott Richmond
e768323a6c remove printlns, soften language 2025-07-06 19:05:45 -04:00
Scott Richmond
3527530e39 release build 2025-07-06 19:00:45 -04:00
Scott Richmond
a534e241f9 improve pattern representation; fix get callsites 2025-07-06 19:00:03 -04:00
Scott Richmond
a5e1aad83d release build 2025-07-06 18:54:45 -04:00
Scott Richmond
45d999d32e build + fix some turtle stuff 2025-07-06 18:54:10 -04:00
Scott Richmond
cce3a2410f release build 2025-07-06 18:44:10 -04:00
Scott Richmond
2b2875720f fix key_up bug in ludus.js 2025-07-06 18:43:35 -04:00
Scott Richmond
6eb28888ca improve (but not fully fix?) reported line numbers in tracebacks 2025-07-06 18:27:43 -04:00
Scott Richmond
05792d631a builded again 2025-07-06 17:57:01 -04:00
Scott Richmond
827008d426 release build 2025-07-06 17:56:26 -04:00
Scott Richmond
10236c5005 improve signature for last 2025-07-06 17:55:48 -04:00
Scott Richmond
14d07e40de fix guard clause bug in function calls 2025-07-06 17:53:10 -04:00
Scott Richmond
151f56d9d6 release build 2025-07-06 17:19:12 -04:00
Scott Richmond
64a02bec08 get doc! to where it needs to be; make show much longer 2025-07-06 17:18:37 -04:00
Scott Richmond
3b535ed05c release build 2025-07-06 16:53:39 -04:00
Scott Richmond
fb797fcd87 oxidize index_of and indices_of for dissociated press 2025-07-06 16:52:54 -04:00
Scott Richmond
baf2dcb7c9 builded 2025-07-06 16:40:21 -04:00
Scott Richmond
a513aaf3cd release build 2025-07-06 16:40:05 -04:00
Scott Richmond
a75a5b8881 have rust make words 2025-07-06 16:39:29 -04:00
Scott Richmond
05dfd01326 release build 2025-07-06 16:17:58 -04:00
Scott Richmond
1c7d5b4782 do some things and stuff? 2025-07-06 16:17:21 -04:00
Scott Richmond
d59b01462f build 2025-07-06 12:09:52 -04:00
Scott Richmond
83c4f02f6a release build 2025-07-06 12:09:41 -04:00
Scott Richmond
1fcd5b0f98 asdf 2025-07-06 12:08:57 -04:00
Scott Richmond
0ecaaaa258 wire up keyboard events 2025-07-06 01:40:03 -04:00
Scott Richmond
e41d6b802b use NotNan as number representation 2025-07-06 00:27:50 -04:00
Scott Richmond
d8c999d5ab add pow, work on sets 2025-07-05 23:56:10 -04:00
Scott Richmond
a95f575260 js & rust code for key inputs 2025-07-05 23:33:39 -04:00
Scott Richmond
f635e878c9 factor svg/p5 into modules; fix svg rendering 2025-07-05 23:20:41 -04:00
Scott Richmond
e4e32bb308 improve panic message, slightly 2025-07-05 22:40:11 -04:00
Scott Richmond
728614879c build 2025-07-05 18:42:38 -04:00
Scott Richmond
ccbbfebbbe release build 2025-07-05 18:36:47 -04:00
Scott Richmond
8e75713cd7 debug multiturtles? 2025-07-05 18:36:01 -04:00
Scott Richmond
50da642758 fix p5 drawing command conversion 2025-07-05 17:38:40 -04:00
Scott Richmond
f9cdd43367 release build 2025-07-05 17:30:58 -04:00
Scott Richmond
45984e190a fix p5 state calculations 2025-07-05 17:30:19 -04:00
Scott Richmond
20e46b4d62 release build 2025-07-05 17:09:38 -04:00
Scott Richmond
bac3c29d1d first pass at multiturtles 2025-07-05 17:09:01 -04:00
Scott Richmond
f1f954de46 massage prelude into multiturtles; wip 2025-07-05 15:57:05 -04:00
Scott Richmond
4988ea6626 add canadian spellings 2025-07-05 15:51:45 -04:00
Scott Richmond
84101711f2 oops: implement called keywords! 2025-07-05 15:49:36 -04:00
Scott Richmond
ff6aaf5cdf middleware should now handle multiple turtles 2025-07-05 15:26:48 -04:00
Scott Richmond
369f8a54f4 do some work on linking, unravel it, spawn! is now a normal fn 2025-07-05 14:45:50 -04:00
Scott Richmond
e76e9f5348 don't try to export state, which no longer exists 2025-07-05 14:45:04 -04:00
Scott Richmond
a38a686a76 revert spawn! as a special form 2025-07-05 14:39:17 -04:00
Scott Richmond
3a5415e1c7 actually export llist fns 2025-07-05 14:26:50 -04:00
Scott Richmond
1688aaccf7 add functions from June 2025 CC1 2025-07-05 14:24:38 -04:00
Scott Richmond
10692b4b41 update validator 2025-07-04 17:44:44 -04:00
Scott Richmond
bbdab93cf0 spawn is now a special form 2025-07-04 17:24:54 -04:00
Scott Richmond
8ce6a33573 stringify -> show in explicit panics 2025-07-04 16:17:55 -04:00
Scott Richmond
d52faeff41 asdf 2025-07-04 15:57:16 -04:00
Scott Richmond
ed6976fe35 asdf 2025-07-04 15:37:39 -04:00
Scott Richmond
22ac3cb0fe release build 2025-07-04 15:30:26 -04:00
Scott Richmond
8851002a90 add is_starting_up 2025-07-04 15:29:44 -04:00
Scott Richmond
cd80e65528 release build 2025-07-04 15:19:32 -04:00
Scott Richmond
f853e02f00 fix slice_n 2025-07-04 15:18:49 -04:00
Scott Richmond
dc11d6cc58 release build 2025-07-04 15:10:51 -04:00
Scott Richmond
7cffa43c3e globalize key_down and key_up 2025-07-04 15:09:02 -04:00
Scott Richmond
294d7d6be2 release build 2025-07-04 14:44:50 -04:00
Scott Richmond
2808c0b709 add slice_n to prelude 2025-07-04 14:44:09 -04:00
Scott Richmond
55483d54a2 release build 2025-07-04 14:11:01 -04:00
Scott Richmond
3b8d3ff5e3 consolidate js functions 2025-07-04 14:10:27 -04:00
Scott Richmond
9228e060bb keep working on panics: tracebacks sort of work? 2025-07-04 14:10:03 -04:00
Scott Richmond
050a0f987d also put the new panic mod under version control 2025-07-04 01:23:31 -04:00
Scott Richmond
0d8b42662b working on panics 2025-07-04 01:23:16 -04:00
Scott Richmond
f97f6670bd pretty good parsing errors 2025-07-03 23:23:14 -04:00
Scott Richmond
d6a004d9ac scanning errors are now nice 2025-07-03 20:45:55 -04:00
Scott Richmond
c6709bb2e8 use serde to serialize the things 2025-07-03 20:22:11 -04:00
Scott Richmond
9f9f59b33b string keys on dicts now fully work 2025-07-03 15:30:51 -04:00
Scott Richmond
659fdd3506 add string keys to dicts 2025-07-03 12:41:00 -04:00
Scott Richmond
d334e483a5 work on errors 2025-07-02 23:47:02 -04:00
Scott Richmond
2ffff9edd9 properly scan escape chars 2025-07-02 20:54:21 -04:00
Scott Richmond
28d6dc24f0 make an attempt at fixing string escaping 2025-07-02 19:44:12 -04:00
Scott Richmond
0cd682de21 method syntax sugar achieved 2025-07-02 19:29:49 -04:00
Scott Richmond
12389ae371 do and panic are now simple forms 2025-07-02 17:29:09 -04:00
Scott Richmond
bf204696a5 release build 2025-07-02 16:56:59 -04:00
Scott Richmond
6bdb9779d8 don't discard initial messages 2025-07-02 16:56:30 -04:00
Scott Richmond
2f4ab41a62 add log to input 2025-07-02 16:20:22 -04:00
Scott Richmond
1316c8228f release build 2025-07-02 16:05:49 -04:00
Scott Richmond
dcf550ba2f wasm->build 2025-07-02 16:05:38 -04:00
Scott Richmond
df5c745ce9 fix complete reset 2025-07-02 16:05:06 -04:00
Scott Richmond
1435e753e8 move default to the top 2025-07-02 15:47:33 -04:00
Scott Richmond
f6ad3b6966 clean up justfile 2025-07-02 15:43:44 -04:00
Scott Richmond
5a778d9a55 try again w/ justfile 2025-07-02 15:37:56 -04:00
Scott Richmond
62ad321a88 finish release recipe? 2025-07-02 15:35:19 -04:00
Scott Richmond
14a41dc1bd justinging 2025-07-02 15:34:36 -04:00
Scott Richmond
d9b095c3f3 keep justing 2025-07-02 15:26:19 -04:00
Scott Richmond
44739adfe5 keep working on justfile 2025-07-02 15:19:54 -04:00
Scott Richmond
624c0bd2f8 start work on release recipe 2025-07-02 15:04:54 -04:00
Scott Richmond
1158821aff build 2025-07-02 14:52:22 -04:00
Scott Richmond
cfe8009861 ready handshake for better message passing 2025-07-02 14:51:42 -04:00
Scott Richmond
33b7f78038 build 2025-07-02 13:49:36 -04:00
Scott Richmond
116a5b2ed9 prevent rust panic on kill signal 2025-07-02 13:44:26 -04:00
Scott Richmond
9414dc64d9 actually (?!) fix drunk turtle problem 2025-07-01 20:10:24 -04:00
Scott Richmond
197cbfc795 try again 2025-07-01 20:07:02 -04:00
Scott Richmond
f3801b3c37 maybe fix drunk turtle bug? 2025-07-01 19:55:49 -04:00
Scott Richmond
f8983d24a4 another wasm release 2025-07-01 19:20:33 -04:00
Scott Richmond
e5467e9e7e wasm release 2025-07-01 19:08:13 -04:00
Scott Richmond
bba3e1e800 thoughts 2025-07-01 19:07:16 -04:00
Scott Richmond
b7ff0eda80 get reading input up and running 2025-07-01 19:04:38 -04:00
Scott Richmond
5b2fd5e2d7 get fetch up & running 2025-07-01 18:52:03 -04:00
Scott Richmond
b12d0e00aa get input working 2025-07-01 16:59:42 -04:00
Scott Richmond
808368d2b9 update worker url resolution 2025-07-01 16:30:17 -04:00
Scott Richmond
88ff5886bb fix worker path 2025-07-01 16:07:01 -04:00
Scott Richmond
1ec60b9362 get commands wired up, probs 2025-07-01 14:35:36 -04:00
Scott Richmond
400bd5864b fix FF event loop bug 2025-07-01 12:54:11 -04:00
Scott Richmond
991705e734 add thoughts 2025-07-01 11:10:50 -04:00
Scott Richmond
989e217917 stash changes 2025-07-01 10:42:34 -04:00
Scott Richmond
4e7557cbcc fix truly heinous memory bug 2025-07-01 01:30:10 -04:00
Scott Richmond
2f3f362f49 hook the things up and discover a possible stop-the-world bug 2025-07-01 00:43:01 -04:00
Scott Richmond
4eceb62ce5 integration work continues 2025-06-30 18:59:59 -04:00
Scott Richmond
173fdb913c also add the new io file 2025-06-30 12:49:07 -04:00
Scott Richmond
bc49ece0cf stub out first pass of io system 2025-06-30 12:48:50 -04:00
Scott Richmond
5478e5e40e use a hashset instead of vec for dead ids 2025-06-29 18:14:06 -04:00
Scott Richmond
f6cbe3f800 start working on packaging better 2025-06-29 18:13:49 -04:00
Scott Richmond
c62b5c903d update chumsky, lose ariadne, update parser to conform to new chumsky 2025-06-29 18:08:44 -04:00
Scott Richmond
de6cb5380d add a justfile, some project management 2025-06-29 17:47:08 -04:00
Scott Richmond
4dd47dd56c save work 2025-06-29 11:38:45 -04:00
Scott Richmond
f710beff46 actually get receive working???? 2025-06-28 16:40:31 -04:00
Scott Richmond
f873be7668 some notes 2025-06-27 20:54:48 -04:00
Scott Richmond
48342ba4ea make progress, I guess 2025-06-27 20:41:29 -04:00
Scott Richmond
db52bc2687 parser housekeeping; add receive to lexer and parser 2025-06-27 19:15:59 -04:00
Scott Richmond
a175ee7a41 move Ast into its own module 2025-06-27 19:05:17 -04:00
Scott Richmond
759fc63cae 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
8923581eed add sleep, which was unexpectedly titchy! 2025-06-27 14:27:42 -04:00
Scott Richmond
90505f89fe make some new process functions 2025-06-27 12:27:54 -04:00
Scott Richmond
00ebac17ce some notes for tomorrow's work 2025-06-26 23:28:17 -04:00
Scott Richmond
888f5b62da send messages, motherfucker! 2025-06-26 20:30:40 -04:00
Scott Richmond
c144702b98 add a process value 2025-06-26 17:17:41 -04:00
Scott Richmond
801e5bcc01 devise a way of communicating between ludus and processes 2025-06-26 17:15:00 -04:00
Scott Richmond
b35657e698 refactor to have a world run a process 2025-06-26 16:11:35 -04:00
Scott Richmond
b5528ced8f start work on actor model 2025-06-26 01:28:33 -04:00
Scott Richmond
0c17b64fd7 maybe get git right? ugh 2025-06-25 23:21:22 -04:00
Scott Richmond
97547b1f7f fix blasted merge conflicts 2025-06-25 23:18:59 -04:00
Scott Richmond
e86f077247 cleanup before next text publish 2025-06-25 22:58:29 -04:00
Scott Richmond
44f7ce7b06 maybe figure out the wasm thing? 2025-06-25 22:56:39 -04:00
6 changed files with 17 additions and 18 deletions

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 closure353_externref_shim: (a: number, b: number, c: any) => void;
readonly closure366_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

@ -146,11 +146,11 @@ export function ludus(src) {
}
function __wbg_adapter_18(arg0, arg1, arg2) {
wasm.closure353_externref_shim(arg0, arg1, arg2);
wasm.closure355_externref_shim(arg0, arg1, arg2);
}
function __wbg_adapter_44(arg0, arg1, arg2, arg3) {
wasm.closure366_externref_shim(arg0, arg1, arg2, arg3);
wasm.closure368_externref_shim(arg0, arg1, arg2, arg3);
}
async function __wbg_load(module, imports) {
@ -306,8 +306,8 @@ function __wbg_get_imports() {
const ret = false;
return ret;
};
imports.wbg.__wbindgen_closure_wrapper1089 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 354, __wbg_adapter_18);
imports.wbg.__wbindgen_closure_wrapper1080 = function(arg0, arg1, arg2) {
const ret = makeMutClosure(arg0, arg1, 356, __wbg_adapter_18);
return ret;
};
imports.wbg.__wbindgen_init_externref_table = function() {

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 closure353_externref_shim: (a: number, b: number, c: any) => void;
export const closure366_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

@ -79,7 +79,7 @@ export function svg (commands, code) {
const new_state = command_to_state(prev_state, this_command)
all_states[turtle_id].push(new_state)
}
let maxX = -Infinity, maxY = -Infinity, minX = Infinity, minY = Infinity
let maxX = 0, maxY = 0, minX = 0, minY = 0
for (const states of Object.values(all_states)) {
for (const {position: [x, y]} of states) {
maxX = Math.max(maxX, x)
@ -90,8 +90,8 @@ export function svg (commands, code) {
}
const [r, g, b] = resolve_color(background_color)
if ((r+g+b)/3 > 128) set_turtle_color([0, 0, 0, 150])
const view_width = (maxX - minX) * 1.2
const view_height = (maxY - minY) * 1.2
const view_width = Math.max((maxX - minX) * 1.2, 200)
const view_height = Math.max((maxY - minY) * 1.2, 200)
const margin = Math.max(view_width, view_height) * 0.1
const x_origin = minX - margin
const y_origin = -maxY - margin

View File

@ -503,11 +503,10 @@ impl World {
fn report_process_end(&mut self) {
let result = self.active_result().clone().unwrap();
let msg = match result {
Ok(value) => format!("Process {} returned with {}", self.active_id().unwrap(), value.show()),
Err(panic) => format!("Process {} panicked with {}", self.active_id().unwrap(), crate::errors::panic(panic))
};
self.send_ludus_msg(msg);
if let Err(panic) = result {
let msg = format!("Process :{} panicked: {}", self.active_id().unwrap(), crate::errors::panic(panic));
self.send_ludus_msg(msg)
}
}
pub async fn run(&mut self) {