This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-28
Channels
- # announcements (8)
- # architecture (10)
- # babashka (24)
- # beginners (93)
- # calva (2)
- # chlorine-clover (6)
- # cider (2)
- # cljfx (3)
- # cljsrn (5)
- # clojure (59)
- # clojure-australia (2)
- # clojure-canada (9)
- # clojure-europe (46)
- # clojure-nl (3)
- # clojure-spain (1)
- # clojure-spec (2)
- # clojure-uk (6)
- # clojurescript (98)
- # cryogen (20)
- # datomic (22)
- # depstar (14)
- # emacs (4)
- # etaoin (2)
- # figwheel-main (1)
- # fulcro (5)
- # graalvm (1)
- # java (69)
- # malli (33)
- # off-topic (5)
- # pathom (1)
- # re-frame (14)
- # reagent (10)
- # shadow-cljs (24)
- # sql (22)
- # vim (2)
@ikitommi I think I would have a real good use of sequence schemas. Spec is painful to work for command line usage with due to macros, malli is a pleasure because it's data and also compatible with Graal. Context: https://gist.github.com/borkdude/a391146ad81a06c28fb97ccdc1f64d44
I was thinking about this too. To find duplicated or similar code etc
Does Grasp support malli-style --- yet? @U04V15CAJ
@UH13Y2FSA Do you have an idea what that would look like? we could maybe work on that, but right now it doesn't do anything with malli
No, not really. I looked at Grasp, and decided it’s along the lines of what I need, but then since I know Malli and not Spec, have to say I wasn’t eager to figure out Spec as well. 😞
Changes from time to time, but an example would be to find cases of
(get <symbol> <string> any)
Looking specifically for when not-found is used
We have a deftype that implements IFn… so can also be (<symbol> <string> any)
The not-found parameter being that <any> of course.
Thanks, ill check into grasp, we do this type of thing periodically and regex usually falls short.
it's been a while since I used the binary to be honest. I usually write a script like this: https://github.com/borkdude/grasp/blob/master/examples/case_symbols.clj
this section applies to that problem: https://github.com/borkdude/grasp#finding-keywords replace the word keyword for string there
weird, neither work for me. eg. grasp -p src/test/clojure -e "symbol?"
I’m double-checking path and all, recursively there are .clj files, it does error if i give the -e garbage. I guess I’ll try using library instead.
This is what I see locally:
$ grasp -p src -e "symbol?"
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:1:2
(ns native.test
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:1:5
(ns native.test
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:2:14
(:require [org.httpkit.client :as client]
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:2:37
(:require [org.httpkit.client :as client]
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:3:14
[org.httpkit.server :as server]
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:3:37
[org.httpkit.server :as server]
file:/Users/borkdude/dev/http-kit/test-native/src/native/test.clj:4:14
[clojure.test :as t])