This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-01-06
Channels
- # admin-announcements (266)
- # alda (20)
- # announcements (1)
- # aws (16)
- # beginners (16)
- # boot (288)
- # brevis (7)
- # cljs-dev (40)
- # cljsjs (32)
- # cljsrn (5)
- # clojars (23)
- # clojure (169)
- # clojure-art (2)
- # clojure-czech (3)
- # clojure-finland (1)
- # clojure-italy (3)
- # clojure-norway (1)
- # clojure-russia (88)
- # clojure-sg (3)
- # clojurescript (300)
- # clojurewerkz (8)
- # community-development (14)
- # component (4)
- # core-matrix (1)
- # cursive (9)
- # datavis (26)
- # datomic (44)
- # devcards (3)
- # funcool (1)
- # hoplon (7)
- # jobs (4)
- # ldnclj (11)
- # lein-figwheel (1)
- # nyc (2)
- # off-topic (4)
- # om (149)
- # onyx (1)
- # overtone (1)
- # parinfer (15)
- # proton (3)
- # re-frame (9)
- # reagent (45)
- # yada (2)
just published parinfer 1.4.0 to npm
2x speed improvements
~20ms to process 2800 lines
mode functions now return changedLines
if you don’t want to overwrite the whole buffer everytime
and they also return an error
object if you want to report the errors in the editor somewhere
code-wise, I did a lot of rewriting so it’s easier to compartmentalize what it’s doing, and it’s about 200 lines shorter
and I’m finally working on documenting the algorithm here: https://github.com/shaunlebron/parinfer/blob/master/lib/parinfer.js.md
apologies to the plugin authors, I expect it to stabilize after I anneal it a bit while writing docs on it
the api is of course stable, but for anyone trying to port the code, I recommend waiting on that until I finish the docs
@shaunlebron: Thanks for the update, I’ll wait a bit then
i.e. from a particular change, can you work out how much of the file you need to process? I guess that would be different for indent and paren modes.
Indent should only require updating the top-level forms containing the changed lines I think, but paren mode changes might extend further.
Marijn Haverberke of CodeMirror fame came up with the concept of "interruptable, resumable parser”, maybe something which could be applicable? read “A parser” section, http://codemirror.net/1/story.html#parser