One useful change in https://github.com/laarc/laarc is that the codebase is fully reloadable. Normally, if you call (load "srv.arc"), you'll wipe out your global state (like your fns* table). I introduced a new shorthand to get around that: https://github.com/laarc/laarc/blob/565e90d27b1658fec53f1d3e7808573f7088700f/srv.arc#L373 (^ fns* (table) fnkeys* (table) fnids* (table) timed-fnids* (table))
^ is almost identical to = but does nothing if the left-hand side is already set to a non-nil value.For example, (^ h (table) h!foo 42 h!foo 99)
would result in `h` being `#hash((foo . 42))`For laarc, I rewrote most of the arc3.2 codebase to use ^ instead of = where it makes sense to do so. The takeaway is that I rarely shut down https://www.laarc.io/ at all. I push code to master, the server pulls it in, then arc calls `load` on the files that changed. Any objection to merging this into anarki? |