This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-20
Channels
- # aleph (12)
- # announcements (7)
- # aws (6)
- # babashka (36)
- # beginners (161)
- # boot (1)
- # calva (6)
- # cider (21)
- # clj-kondo (13)
- # cljs-dev (28)
- # cljsrn (1)
- # clojars (3)
- # clojure (13)
- # clojure-colombia (1)
- # clojure-europe (10)
- # clojure-spec (12)
- # clojure-uk (47)
- # clojuredesign-podcast (2)
- # clojurescript (67)
- # datascript (8)
- # datomic (21)
- # duct (3)
- # emacs (6)
- # events (1)
- # fulcro (6)
- # graalvm (98)
- # jobs (1)
- # kaocha (18)
- # luminus (1)
- # malli (7)
- # off-topic (56)
- # pathom (5)
- # re-frame (18)
- # reagent (3)
- # reitit (9)
- # remote-jobs (3)
- # rewrite-clj (10)
- # ring (1)
- # shadow-cljs (155)
- # spacemacs (2)
- # sql (5)
- # tools-deps (27)
- # vim (86)
- # xtdb (2)
@dominicm Agree that tree-sitter is super interesting! And also all the Lua stuff is super cool, Lua is a really fun (and weird). I think for the tree-sitter grammer stuff you wouldnβt need Lua though since it just takes some JSON as input for the parser? Could totally be missing the point here π
Yeah, sooo much! Iβve used it to write a toy-ish CLI time tracker, getting back that REPL really unblocked my Lua learning at that point π
With all the Neovim Lua support it could be really cool, seems @olical is even playing around with Fennel/Lua in Conjure https://github.com/Olical/conjure/commits/master
cool! yeah, i have my fingers crossed that Olical's fennel / conjure efforts work out.
Cc @martinklepsch My Fennel project that I'll use to rewrite my Neovim config as well as Conjure's Lua and VimL is coming along nicely. I've got a lovely train ride up from London to Edinburgh this Friday to get that sorted and write a post up. Focusing on "replace all viml and lua with a Lisp" for now, then it'll grow into conjure. The plugin / library I'm building is called aniseed. It makes compiling directories of fennel to Lua ahead of time when they change (for your dotfiles) easy, as well as providing mappings for evaluating ranges / selections / motions / files. Conjure plugins will then be a nice mix of Clojure that hooks into Conjure's JVM as well as fennel that gets compiled for you. Fun times ahead! I think this side track or language experimentation will pay off massively in future changes to conjure. I've been shying away from fancier UI features because I don't feel comfortable solving things in viml or Lua.
wow, that's pretty nice -- i test with clojure/core.clj as my "biggest" clojure file for a program that uses rewrite-clj, and i can definitely feel its weight there.
i haven't found much that comes close to the size of clojure.core -- do you come across that much that's similar in size?
my current use case is invocation from an editor -- doing things like detecting the expression around or to the left of the cursor
the idea is to allow editors to not have to reimplement all of this type of functionality
i have a hack that may make it a bit less -- though i have no proof that it works in general
didn't someone recently fetch some significant portion of clojars (or was it metadata of clojars)?
http://github.com/clojure/clojurescript/src/main/cljs/cljs/core.cljs is the second biggest file though
woah, vis, an editor which uses lpeg for higlighting. Makes mince meat out of that 42k loc file
~/src 0.94s 01:09:11
β― tokei **/*.clj{,s,c}
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Clojure 5882 743420 619406 37019 86995
ClojureC 1505 517672 421894 33381 62397
ClojureScript 4552 1487768 1233528 50189 204051
Dockerfile 1 5 4 0 1
Edn 2 31 25 6 0
-------------------------------------------------------------------------------
Total 11942 2748896 2274857 120595 353444
-------------------------------------------------------------------------------
That took a while to runi've given up for the moment on highlighting of large files -- try opening a clj-kondo analysis file for a project and its deps some time π
(that's an odd name -- the characters and pronunciation used at the repository readme are for "clock" (at least in japanese), but if you change the name slightly it would have been "statistics"...strange)
i don't have even a tenth -- though i don't think it's counting correctly:
$ tokei **/*.clj{,s,c}
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Clojure 299 20633 16013 1744 2876
ClojureC 8 772 532 50 190
ClojureScript 1 2 2 0 0
-------------------------------------------------------------------------------
Total 308 21407 16547 1794 3066
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
Language Files Lines Code Comments Blanks
-------------------------------------------------------------------------------
Clojure 6835 1275323 1019262 92211 163850
ClojureC 1692 308692 250172 17327 41193
ClojureScript 8471 2162893 1864853 70179 227861
-------------------------------------------------------------------------------
@martinklepsch https://neovim.io/doc/user/lua.html looks like treesitter uses .so files, so a C api?
https://github.com/neovim/neovim/pull/11113 I didn't notice the "and highlighting"
Yeah I guess itβs both in the end. What I was thinking is that you can write grammars in any language as the canonical format they are described in is JSON. How you then interact with tree sitter is probably a different thing, C or Lua as you said.
I'm not sure if it is json or not. The above seems to imply that a .so is produced to represent the parser. I'm guessing that atom is just using some API to create the parser from json.
https://tree-sitter.github.io/tree-sitter/creating-parsers maybe they're doing on the fly compilation? nodejs is a dependency for developing a new parser. tree-sitter converts javascript into a C parser, and then compiles that.