Scott Richmond scott
  • Joined on 2023-07-29
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
scott commented on issue twc/ludus#38 2024-05-20 21:45:12 +00:00
Good-enough validator

Called keywords/single arg: 94adf5e9d5

Dict pattern validation: https://alea.ludus.dev/twc/ludus/commit/d249ee0b21714d695664

scott pushed to to_janet at twc/ludus 2024-05-20 21:44:04 +00:00
94adf5e9d5 called keywords take only a single argument
scott pushed to to_janet at twc/ludus 2024-05-20 00:19:07 +00:00
1120f21df2 dict pattern matching
d249ee0b21 validate dict patterns, by validating pairs
e767c319b1 fix dict parsing
010b584ef1 partial function application!
ba1aa8ed03 comment out repl cruft
Compare 6 commits »
scott opened issue twc/ludus#41 2024-05-19 23:38:34 +00:00
Give partially applied functions better names
scott pushed to to_janet at twc/ludus 2024-05-19 22:38:49 +00:00
6bf4dde487 do expressions
scott pushed to to_janet at twc/ludus 2024-05-19 22:24:16 +00:00
822f5c0178 {stringify, ltype} -> imports from base
2415f3d437 bugfixes
Compare 2 commits »
scott pushed to to_janet at twc/ludus 2024-05-19 22:13:13 +00:00
a399669197 fix bugs, oops
scott commented on issue twc/ludus#39 2024-05-19 22:05:29 +00:00
Base in Janet

Most base is complete in e468add325

Left to do:

  • into/2
  • doc
  • to_dict

All of these have some decisions left…

scott pushed to to_janet at twc/ludus 2024-05-19 22:04:13 +00:00
e468add325 write most of a base