This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # admin-announcements (25)
- # announcements (1)
- # beginners (29)
- # boot (2)
- # cider (4)
- # clojure (92)
- # clojure-berlin (1)
- # clojure-france (45)
- # clojure-germany (3)
- # clojure-india (1)
- # clojure-japan (4)
- # clojure-russia (78)
- # clojure-uk (11)
- # clojurebridge (7)
- # clojurescript (73)
- # datomic (6)
- # editors (39)
- # euroclojure (83)
- # jobs (3)
- # ldnclj (80)
- # om (9)
- # onyx (7)
- # reading-clojure (1)
- # reagent (2)
so I'm trying to split a string only on the first space, but I'm having trouble coming up with the regex
(clojure.string/split "/eval (+ 2 2)" #"???") => ["/eval" "(+ 2 2)"]
okay, so I went ahead on looked up the doc of string/split and you can pass a limit argument
allthough, if you'd read the docs and never asked the question, I wouldn't have known that string/split takes an optional third arg.
ergl: venturing a guess, based on the
eval expression in your string ...
Is it part of one-off tinkering, or are you trying to write some sort of a parser?
In case it's a serious parser, you may want to have a look at instaparse.
@trybeee: I already have java-source-paths on project.clj. It only works if I dont add additional things to source-paths in dev profile.
@adityaathalye: I'm piping that clojure code into a clojail sandbox, so I guess syntax errors will be catched there
I'm writing a small clojure bot for telegram, you send it
/eval <s-expr> and it returns the result of evaluating that s-expr
yeah, I'm having some problems with the telegram api though, but it's coming along nicely
searching for something on clojars returns multiple forks of the same project, and next to no discernable difference between the lot
kinda, yeah. Although, I think 'google' is probably the best answer. Seems to be best and picking the thing you're actually looking for, and not a fork.