This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-02-07
Channels
- # aleph (1)
- # beginners (152)
- # cider (26)
- # clara (2)
- # cljs-dev (13)
- # cljsrn (5)
- # clojure (198)
- # clojure-greece (15)
- # clojure-italy (39)
- # clojure-sanfrancisco (3)
- # clojure-spec (28)
- # clojure-uk (16)
- # clojurescript (52)
- # community-development (15)
- # core-async (26)
- # cursive (42)
- # data-science (28)
- # datomic (19)
- # devops (7)
- # duct (11)
- # emacs (24)
- # fulcro (22)
- # garden (4)
- # leiningen (12)
- # luminus (1)
- # mount (5)
- # off-topic (106)
- # om (5)
- # onyx (10)
- # parinfer (37)
- # re-frame (17)
- # reagent (47)
- # shadow-cljs (36)
- # yada (2)
not that bad, but about 10x slower than js
Maybe there's some way to optimize it? I'm sure most elisp is far less performance sensitive than this.
i think most elisp things aren’t doing the type of string building that parinfer is doing
planning on making parinfer return edits instead of a full string: https://github.com/shaunlebron/parinfer/issues/158
@shaunlebron It would be great to get that into mainline - I fixed that bug in the Cursive port yesterday, and it was due to the differences in char counting because I return edits.
@cfleming yeah, I definitely want that in mainline
sorry for the problems related to that, glad you found it
i don’t think i remember where that is right now in the js version
It complicates the editor integration a bit, because you have to specify the algorithm for applying the edits.
i won’t be able to look at it this weekend
BTW when running the tests, I had to add a "use strict"
to build.js
, because it uses let
hmm, not sure
i bet it has to do with differing node versions
wish I could specify that in package.json, maybe I can
Anyway, I have a minor regression with two tests around error locations, but I’m hoping to be able to push a dev build today so you can check out the indentation marking.
sweet!
yeah, can’t wait to see what cursive users think. lot of parinfer users there
@doglooksgood Are you splitting the file into lines, or processing the whole file in one go? parinfer-js currently splits the file into lines, which makes some things easier but is not necessary. It’s also harder on the GC, and I don’t think Emacs’ GC is stellar.
@shaunlebron Am I correct in thinking that there’s actually no difference between result.lineNo
and result.inputLineNo
?
Actually, if that’s too down in the weeds when you’re not looking at the code, I can file an issue.
@cfleming: I’m 90% sure that they are always the same
there was a case where I was considering splitting lines when dealing with leading close-parens
yeah, line numbers should be the same
in the future though, I want to remove lines that are made empty by parinfer
for example:
(foo
bar
)
(baz)
(foo
bar)
(baz)
parlinter does this when used with the trim option:
--trim Remove lines that become empty after linting.