Fork me on GitHub
#parinfer
<
2015-12-23
>
shaunlebron21:12:51

just a heads up

shaunlebron21:12:20

the clojure implementation has been switched out with a pure JS implementation

shaunlebron21:12:40

huge speed increases, no more indentModeChange

shaunlebron21:12:51

much easier to port to emacs, etc

mfikes21:12:01

@shaunlebron: Cool. I don’t see it on Clojars… I suppose I’ll need to figure out a way to consume 1.1.0 from ClojureScript (probably :foreign-libs or somesuch).

shaunlebron21:12:11

@mfikes ill put together something for clojars tonight. thanks

mfikes21:12:50

@shaunlebron: Cool. Meanwhile it looks like it is just one parinfer.js file, really.

snoe21:12:50

wow nice work, it would be interesting to read how cljs failed to be fast enough

shaunlebron22:12:00

@mfikes yeah just one file. hoping to make it easier to port

shaunlebron22:12:49

@snoe thanks. and yeah i didnt try to use transients or anything so that wouldve helped a lot

shaunlebron22:12:33

just thought using imperative, mutable JS would squeeze out out every ms possible while making it directly translatable to other scripting langs

shaunlebron22:12:56

it went from 2.5s to 100ms for a 2800 line file

mfikes22:12:56

One benefit of having it as a pure JavaScript lib is that consumers can use it pretty much immediately upon initialization, prior to ClojureScript itself even being loaded and initialized, which can take a little time.

shaunlebron22:12:12

@mfikes cool, looked at the code.

mfikes22:12:32

@shaunlebron: It is my first time ever doing it, so feedback welcome. simple_smile

mfikes22:12:08

(I’ve never used a foreign lib before.)

shaunlebron22:12:11

thought you might need some externs but im not seeing advanced optimizations. so nvm

mfikes22:12:21

:none baby

shaunlebron22:12:42

i always forget how to use foreign libs

mfikes22:12:03

(It turns out that :none is fastest in terms of minimizing initialization latency, at least this panned out to be true for Planck.)

shaunlebron22:12:14

i wanna put together a cljsjs package since the original clj version is deprecated

mfikes22:12:23

Also, with self-hosted ClojureScript, you really can’t do :advanced

mfikes22:12:37

:simple is the upper bound

shaunlebron22:12:56

yeah ill try to get around to the cljsjs package later. spent too much time clojuring and interviewing. need to make some xmas gifts 😛