This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-01
Channels
- # adventofcode (1)
- # announcements (10)
- # babashka (13)
- # beginners (104)
- # braveandtrue (2)
- # calva (5)
- # clj-kondo (23)
- # cljdoc (8)
- # clojure (10)
- # clojure-finland (1)
- # clojure-greece (1)
- # clojure-norway (2)
- # clojure-sweden (7)
- # clojure-uk (29)
- # clojurescript (20)
- # community-development (12)
- # cursive (4)
- # datomic (1)
- # duct (2)
- # emacs (24)
- # fulcro (48)
- # off-topic (5)
- # pathom (2)
- # planck (2)
- # quil (3)
- # reagent (17)
- # reitit (7)
I’m running an experiment and I want to count the number of lines of code taken for a program across several languages. I also want to see if I can count the bytes of the same solution “minified”. How would I approach this? I looked at existing linters to see if I can do something like this. I tried using read
but I wanted to check if there is already something I could potentially use
@srijayanth not directly related to your question, but I'm curious about your methodology. Will you include the source for the standard library (or any other libraries used) for a language?
No. I thought of it, but that’s a rabbit hole I want to avoid initially. If I get this done, I’ll certainly extend it maybe
Maybe I should just use clojure.tools.reader
and spit it out myself…
@ludvikgalois - I will initially stick to programs that don’t need help other than the standard library
@srijayanth If you're on macOS/Linux, why not just wc -l
to get the line count?
@seancorfield - I will get the line count, but I also want to run a minifier on each of them to see what I get.
Thanks Nate.
there is also https://github.com/XAMPPRocky/tokei which should be faster