Yogthos
|
fdb0f4ab83
|
Phase 10: Standard Library — clojure.string, clojure.set, clojure.walk
- src/jolt/clojure/string.clj (123 lines, 20 functions):
blank?, capitalize, lower-case, upper-case, includes?, join,
replace, replace-first, str-reverse, split, starts-with?,
ends-with?, trim, triml, trimr, trim-newline, escape,
index-of, last-index-of
- src/jolt/clojure/set.clj (124 lines, 10 operations):
union, intersection, difference, select, project, rename,
rename-keys, map-invert, join, index, subset?, superset?
- src/jolt/clojure/walk.clj (77 lines, 9 functions):
walk, postwalk, prewalk, postwalk-demo, prewalk-demo,
postwalk-replace, prewalk-replace, keywordize-keys,
stringify-keys, macroexpand-all
- src/jolt/core.janet: 11 Janet string interop bindings
(str-trim, str-upper, str-lower, str-find, str-replace,
str-replace-all, str-reverse-b, str-join, str-split,
str-triml, str-trimr)
- test/phase10-test.janet: 2 test sections (40-41)
15+ assertions covering string and set functions
- All .clj files use eval-form for multi-form loading
- 315 ok, 2 fail (pre-existing, unchanged)
|
2026-06-03 10:12:51 -04:00 |
|
Yogthos
|
053ed4f790
|
Phase 8: Protocol System — defprotocol, extend-type, extend-protocol, satisfies?
- types.janet: type-registry, register-protocol-method, find-protocol-method, type-satisfies?
- core.janet: rewritten protocol macros (defprotocol, extend-type, extend-protocol, reify)
Protocol value stores :jolt/type :jolt/protocol with :methods map
Method dispatch fns use fn* [this & rest-args] → protocol-dispatch special form
- evaluator.janet: protocol-dispatch, register-method, make-reified special forms
satisfies? special form with type registry lookup
special-symbol? entries for all 3 protocol ops + satisfies?
- 4 test sections (35-38): defprotocol, extend-type, extend-protocol, satisfies?
extend-type: basic dispatch works (42 constant), .-field accessor needs further debug
satisfies?: fully functional with type registry
- 315 ok, 2 fail (pre-existing, unchanged)
|
2026-06-03 00:18:41 -04:00 |
|