Scott Richmond scott
  • Joined on 2023-07-29
scott commented on issue twc/ludus#49 2024-05-23 23:30:19 +00:00
Unfuck mod in prelude

As expected: current clj/s base does not include a member mod.

Fix this in the janet base before building.

scott commented on issue twc/ludus#45 2024-05-23 23:25:42 +00:00
random must take a dict

Here's a better error:

random(#{:a 1, :b 2}) 

& => Ludus panicked!: Match Error: No match found for (#{:a 1, :b 2}, :a) in function get
On line 879 in prelude
		get (d, key)

I…

scott opened issue twc/ludus#50 2024-05-23 21:01:13 +00:00
Add sqrt to prelude
scott opened issue twc/ludus#49 2024-05-23 20:54:07 +00:00
Unfuck mod in prelude
scott opened issue twc/ludus#48 2024-05-23 20:43:09 +00:00
Fix coordinate system
scott opened issue twc/ludus#47 2024-05-23 20:23:43 +00:00
Add save/load turtle state functions to prelude
scott opened issue twc/ludus#46 2024-05-23 20:06:17 +00:00
Add set_heading to prelude
scott opened issue twc/ludus#45 2024-05-23 17:29:42 +00:00
random must take a dict
scott opened issue twc/ludus#44 2024-05-23 17:24:22 +00:00
random_int range end is wrong
scott commented on issue twc/ludus#33 2024-05-23 01:00:29 +00:00
WASM: wire it up!

It is all up in #emscranet

scott commented on issue twc/ludus#33 2024-05-23 00:36:59 +00:00
WASM: wire it up!

Next up: make a repo with a standalone POC.

scott commented on issue twc/ludus#33 2024-05-23 00:33:26 +00:00
WASM: wire it up!

Added to the above: getting strings from Janet -> C++ -> JS is not trivial, either. But it's doable!

There may well be a more direct way of going about things, but this is what I got that…

scott commented on issue twc/ludus#33 2024-05-22 23:37:59 +00:00
WASM: wire it up!

Taking notes on how to wire up a Janet+WASM environment, in broad strokes (repos with various stages forthcoming). Note that this allows passing Javascript strings into Janet and getting them back…

scott commented on issue twc/ludus#33 2024-05-22 16:23:06 +00:00
WASM: wire it up!

A more direct way to arrive at the error above:

$ zig cc janet.c -target wasm32-freestanding
In file included from src/core/features.h:81:
./janet.h:433:10: fatal error: 'stdlib.h' file…
scott commented on issue twc/ludus#36 2024-05-22 16:05:05 +00:00
Nice error reporting

On suggested names, this is what we want: https://en.wikipedia.org/wiki/Levenshtein_distance

scott commented on issue twc/ludus#33 2024-05-22 16:03:39 +00:00
WASM: wire it up!

Just to document here where I am and what I've done:

  • Current strategy has been to use Zig as the host language for WASM; Zig can compile C and has WASM as a first-class target.
  • Compiling a…
scott pushed to to_janet at twc/ludus 2024-05-20 22:24:49 +00:00
8b0954b8ec correctly parse pkgs, actually
4547c0747d correctly parse pkgs
Compare 2 commits »
scott pushed to to_janet at twc/ludus 2024-05-20 22:11:56 +00:00
70b6a1dcd7 correctly parse pkg-name and pkg-kw
23128902bc add pkg-kw tokens
Compare 2 commits »
scott opened issue twc/ludus#43 2024-05-20 21:55:55 +00:00
Bytecode VM
scott opened issue twc/ludus#42 2024-05-20 21:52:21 +00:00
Persistent data structures