This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-02
Channels
- # announcements (12)
- # asami (5)
- # aws (3)
- # babashka (12)
- # beginners (86)
- # calva (14)
- # chlorine-clover (3)
- # cider (13)
- # clara (8)
- # cljdoc (1)
- # cljfx (2)
- # cljsrn (1)
- # clojure (69)
- # clojure-berlin (6)
- # clojure-czech (14)
- # clojure-dev (17)
- # clojure-europe (76)
- # clojure-france (14)
- # clojure-nl (43)
- # clojure-norway (6)
- # clojure-spec (7)
- # clojure-uk (13)
- # clojurescript (4)
- # code-reviews (1)
- # conjure (16)
- # cursive (2)
- # data-science (3)
- # datascript (1)
- # datomic (41)
- # events (4)
- # fulcro (9)
- # hugsql (3)
- # instaparse (5)
- # jobs (3)
- # malli (1)
- # mid-cities-meetup (1)
- # nrepl (22)
- # off-topic (25)
- # onyx (1)
- # pedestal (3)
- # remote-jobs (3)
- # shadow-cljs (61)
- # sql (22)
- # xtdb (12)
Anyone know of a library that gives ansi colors in terminal output (that supports babashka)?
Are you sure you're evaluating the full filter
expression and not just the vector?
i just copy-pasted the second example from the docs https://clojuredocs.org/clojure.core/identity
> I going crazy? Seems so. Filter returns lazyseq, not vector. So you can not get [] as its output
i restarted it and now it is correct: (filter identity [1 2 3 nil 4 false true 1234])
=> (1 2 3 4 true 1234)
$ clj
Clojure 1.10.1
user=> (clojure.main/repl :eval last)
user=> (filter identity [1 2 3 nil 4 false true 1234])
[1 2 3 nil 4 false true 1234]
hey, what might be the reason I'm getting different carmine
response behavior when I run it in repl or via clj
?
e.g. it does not print responses via clj
Sorry if this is a faq but say I have a url as a string, and I'd like to convert it to a keyword, (keyword "
will create me a namespaced keyword, which is not really what I want because it doesn't round trip as I'd like it to:
user> (name (keyword ""))
;; => "/foo.bar.com"
user>
Is there a way to construct a non-namespaced keyword from a string that contains a /
and how would one go about doing it?something like this should work:
user=> (name (keyword ""))
"/foo.bar.com"
user=> (name (keyword "" ""))
""
user=>
Or provide a nil keyword,
user=> (namespace (keyword "" ""))
""
user=> (namespace (keyword nil ""))
nil
user=> (keyword "" "")
:/
user=> (keyword nil "")
:
yep 🙃 just like keywordizing a url. mongo makes people do weird things
api reads json where we do (cheshire/parse-string bla true)
and then stuff it to mongo where the mongo driver probably uses name
to turn the keys into string.
So unless it actually complains about something not being a keyword, using strings should be fine I imagine.
We do, but at some point we decided to keywordize the keys of our maps. One could argue if that was a good idea or not, but that ship has sailed.
oh its the key in the map? i suppose you've thought about making it a {:type :url :value "
then and that can't work?
Haven't thought about it yet. Thing is that I needed to store some rewriting rules in mongo, basically I needed to store "whenever you see http://foo.bar.baz, rewrite it to 'email'"
are there any indexes other than the commits on git repos that demonstrate the "liveliness" of a certain lib? I ask this since it seems for clojure some libs are used but not really under active development
I certainly use libraries that haven't been touched in a few years, because they work - and work very well. I'm happy with that aspect of the Clojure community. It allows me to focus on my code, and not checking every few days if a new version of the library has come out 🙂 A totally super benefit too, is given the great interop of Clojure, I can pull in a regular Java library and use that too. I love it!
on that note maybe we need a "done" badge on github that doesn't read as "not maintained"
RE: donezo libraries... how about "fit" ?
the conceit here is that a library is finished and does its task so there is just "no more work to do" on it
the state of the world in JS is something like "while a library is alive, it is a tiger and when its dead its a dead tiger"
whereas the common observation for clojure is that "An active library is like a tree, an inactive library is a house"
so how to at a glance determine if something is a finished product or an abandoned experiment is something
which avoids the sort of "exponential bikeshed" of javascript and java and all the other nominally typed things out there
public final class Row implements Iterable<String> {
// ...
String get(int i);
}
public final class Csv {
public static Iterable<Row> parse(InputStream contents);
}
public class CsvReader {
// ...
CsvReader(Options opts) { /* ... */ }
List<List<String>> parse(InputStream is);
}
for csv, there might be too many lines in a big file, but no individual line will be a gb probably
RE: donezo libraries... how about "fit" ?