vscode

Quiet in here? Check #calva-dev out :smiley:
2020-02-16T00:14:47.171500Z

thanks for the sample code -- indeed it does look intuitive to use. it reminds me a bit of using rewrite-clj's zipper interface. tree sitter's tree traversing api has notions of parent, child, sibling, etc. with navigation, but not explicitly anything about whitespace or lists. perhaps one might see it as being at a lower level. tree sitter also has a query api that allows one to ask for matching nodes based on criteria (specifying by of all things s-expressions) -- so for certain things one doesn't have to get involved in explicit navigation. these are somewhat documented at: http://tree-sitter.github.io/tree-sitter/using-parsers#other-tree-operations btw, i made a #tree-sitter channel -- don't know how much other folks here want to hear about tree sitter stuff 🙂

2020-02-16T07:08:20.174300Z

tried measuring execution of changeRange in model.ts. don't know if i did it correctly, but the numbers i got for clojure.core and cljs.core were {181, 154, 153, 167, 159} ms and {236, 219, 217, 227, 230} ms respectively

2020-02-16T07:11:45.176800Z

tried to get the dev branch to compile (as per the "how to hack on calva" doc), but i got an error during the build task. the error was something like this:

[1] error TS6059: File '.../src/calva/calva/extension.ts' is not under 'rootDir' '.../src/calva/src'. 'rootDir' is expected to contain all source files.
[1] error TS6059: File '.../src/calva/calva/repl/client.ts' is not under 'rootDir' '.../src/calva/src'. 'rootDir' is expected to contain all source files.
[1] error TS6059: File '.../src/calva/webview-src/main.ts' is not under 'rootDir' '.../src/calva/src'. 'rootDir' is expected to contain all source files.
the master branch built ok so i made the modification and measurements there.

pez 2020-02-16T11:32:34.177900Z

Do you have time for a zoom session so that we can look at that build error? It is probably something lacking from the wiki page and I'd like to know what.

pez 2020-02-16T11:35:46.179900Z

About the various ways that tree sitter can be queried. I think it sounds pretty awesome. But if I go with tree sitter I would need a way to keep the token cursor api pretty much intact. It would be a huge amount of work to move the code base over to something else.

pez 2020-02-16T12:34:42.183200Z

I just measured Calva's rainbow paren parser (which is a different one than the structural editing one, because legacy reasons). I had expected it to be much faster, mainly because it is in no way a full Clojure grammar, but it seems to be quite a lot slower. On small files it is about 10X slower, and on Clojure core.clj it is about 2X slower. That's good to know for me, because it probably means I should hook up both tasks on the full parser.