yamlscript

Ingy döt Net 2024-05-17T22:19:49.917539Z

Today I realized that this:

$ bb -e '(.replaceAll "foo" "o" "x")'
"fxx"
doesn't work in YS:
$ ys -ce '(.replaceAll "foo" "o" "x")'
(. replaceAll "foo" "o" "x")
and:
$ ys -ce '.replaceAll("foo" "o" "x")'
(__ ($$) (list replaceAll "foo" "o" "x"))
using . is problematic because it wants to be the function chaining infix operator. A fix is easy but need to decide between:
(\.replaceAll "foo" "o" "x")
(&replaceAll "foo" "o" "x")
;; something else

Ingy döt Net 2024-05-17T22:24:48.645979Z

\. is probably right as YS uses \ as the meta escape. almost like # reader macros in clojure

Ingy döt Net 2024-05-17T22:25:47.488529Z

and & is a YAML syntax char already.

Ingy döt Net 2024-05-17T22:26:42.318669Z

Makes me wonder what other parts of clojure we'll need to adjust for.