practicalli / practicalli/clojure
grasp
Open
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Alternative tools: Section on grasp
https://github.com/borkdude/grasp
Grasp spec search on the command line..
https://twitter.com/ndj/status/1322999454295760898
Examples
Word count
./grasp -p ~/git/spec.alpha/src -w -e "(fn [k] (= :clojure.spec.alpha/invalid (unwrap k)))" | wc -l
67
Erm??? Find def, defn, defmacro ???
$ ./grasp $(clojure -Spath) "(s/cat :sym #{'def 'defn 'defmacro} :stuff (s/* any?) :sym #{'defmacro} :tail (s/+ any?))"
jar:file:/Users/borkdude/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar!/clojure/core.clj:444:1
(def ^{:doc "Like defn, but the resulting function name is declared as a
macro and will be used as a macro by the compiler when it is
called."
:arglists '([name doc-string? attr-map? [params*] body]
[name doc-string? attr-map? ([params*] body)+ attr-map?])
:added "1.0"}
defmacro (fn [&form &env
$ grasp ~/git/clojure -e "(g/seq 'defn symbol? (g/vec (s/keys :req-un [::keys]) (s/* any?)) (s/* any?))"
file:/Users/borkdude/git/clojure/test/clojure/test_clojure/special.clj:105:5
(defn foo
[{:keys [^String s]}]
(.indexOf s "boo"))))file:/Users/borkdude/git/clojure/test/clojure/test_clojure/transducers.clj:149:1
(defn result-good?
[{:keys [s xs xi xe xt]}]
(= s xs xi xe xt))
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Begin with the linked grasp project and the command-line examples in this issue. Add an Alternative tools section covering grasp's Clojure spec search use cases and examples, retaining the provided links; done when the section presents the tool and examples clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100