This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-24
Channels
- # announcements (3)
- # beginners (128)
- # boot (2)
- # braveandtrue (97)
- # calva (13)
- # cider (4)
- # cljdoc (12)
- # cljs-dev (16)
- # clojure (78)
- # clojure-germany (8)
- # clojure-italy (5)
- # clojure-nl (1)
- # clojure-spec (59)
- # clojure-uk (29)
- # clojurescript (46)
- # core-async (9)
- # cursive (63)
- # data-science (3)
- # datomic (22)
- # devcards (1)
- # duct (7)
- # emacs (4)
- # flambo (2)
- # fulcro (37)
- # instaparse (6)
- # jobs-discuss (38)
- # juxt (1)
- # off-topic (35)
- # om-next (1)
- # parinfer (7)
- # re-frame (14)
- # reagent (6)
- # reitit (21)
- # rum (1)
- # shadow-cljs (74)
- # spacemacs (8)
- # specter (1)
- # sql (3)
- # testing (2)
- # unrepl (2)
- # yada (6)
anybody used google apis with clojure, especially youtube? I need to upload videos programmatically and already started doing it with the java libraries, but oh dear god, there are so many types... didn't find any good pure clojure wrappers, anyone?
@kaosbeat I've worked with this one for Google docs. Especially the authentication part felt smooth (openin a browser window for you etc) https://github.com/SparkFund/google-apps-clj
Does someone have experience with instaparse and (external) bnf grammars? I was thinking to use instaparse with an AWS grammar, but it is not compatible https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_grammar.html#policies-grammar-bnf
Hello, i've came across one strange behavior:
(defprotocol A (-a [_]))
(def a -a)
(extend-protocol A Object (-a [x] x))
(a {}) ;; => No implementation of method: :-a ....
it works as intended with a defn instead of a defwhen you do (def a -a)
, you're assigning to a
the dereferenced value of -a
at the point in time of the assignment
Clojure:
user=> (.replace "foo" "o" "x")
"fxx"
Cljs:
cljs.user=> (.replace "foo" "o" "x")
"fxo"
Gotta be careful with interop! clojure.string/replace
solves it, luckily 🙂it's a bit of an internal detail that extend-protocol works by resetting the root binding of the method vars
is there a valid syntax for doing something like that? (ns foo (:refer-clojure :exclude :all) (:require [clojure.core :as c]))
CompilerException java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Keyword
Is there a way to create a global var in the same fashion as *warn-on-reflection*
on which I can call (set! *my-var* true)
?
When I do it like (def ^:dynamic *my-var* false)
and then do (set! *my-var* true)
I get IllegalStateException Can't change/establish root binding of: *my-var* with set clojure.lang.Var.set (Var.java:221)
, presumably because it is a local binding, as mentioned here: https://clojuredocs.org/clojure.core/set!
the reason why you can set!
*warn-on-reflection*
is that the evaluation context of clojure has *warn-on-reflection*
local-bound, it's not a "special" type of Var
>the evaluation context of clojure has *warn-on-reflection*
local-bound
by that I meant that there is an implicit (binding [*warn-on-reflection* *warn-on-reflection*] ..)
wrapping your repl session
there's a handful of clojure.core
Vars that get that special treatment of being thread-bound by the compiler environment
Perhaps I should describe what I'm trying to accomplish. I am writing a library that has a Java-consumable interface. I'm wanting to provide a setting that will disable a specific validity check, if needed, for performance reasons. I'd like it to be possible to set this permanently or as a binding, if possible.
It would be unwieldy to have to wrap your entire app in a binding to disable it globally - especially from Java where you'd likely have to pass your entire program logic in as a Runnable or something
However, I can see there being cases where you might want to disable the setting for one use case while preserving it for others
thanks @jeroenvandijk hmm it really wraps Google's java client apis and no youtube, but looks fairly complete. youtube's inserting must be pretty similar to drive insert.. perhaps I should add to that
might you guys have a solution for a java.lang.NullPointerException each time to try evaluating an expression while in a breakpoint window, using Cursive/Intellij?
Did you trying asking in the #cursive channel? Colin's usually very responsive there.
also, what happened to the IRC channel? It seems that all messages are now blocked. Have the moderators from the irc channel moved to this slack channel?
freenode (the irc network that the channel is on) has been experiencing a pretty bad spam attack, so many channels there are +R meaning you must have a registered nick https://freenode.net/kb/answer/registration
newbie question: I want to process a csv file. I defined the dependency in my project.clj file [clojure-csv/clojure-csv "2.0.1"]
(require '[clojure-csv/clojure-csv :as csv])
Assuming that’s the correct namespace to require
According to the readme looks like you want clojure-csv.core
(there’s no real way to discover that (that I know of) other than looking through the code or in the library’s README; people usually put it right at the top of the README though)
thank you. I found something in <test> directory. I should have looked earlier before asking here.
@gseyffert My understanding is, that I provide the name of the namespace of said module? So I'd look into src/<projectname>/core.clj of said module to find out what's in "(ns ...)"?
there are a ton of people eager to help out in #beginners . I suggest joining that room if you're not in there
hey all, as has been mentioned in various places, the core team is currently working on some improvements around error reporting, etc. I think this is really starting to pay off and I look forward to getting it out into the wild. I have a variety of error examples I am looking at but right now I would be very interested in collecting some more examples that are core macro syntax spec errors (let, if-let, when-let, defn, defn-, fn, ns, import, refer-clojure).
I just want code examples, I don’t need the spec error message. I’ve got so many changes in play that the old output is not helpful.
some examples: (let [x])
, (ns)
, (defn [x])
, etc
good, thx :)
(let [{:keys [a b]} 1]
a)
(let [baz 1
[foo bar] baz]
(+ foo bar))
(use 'clojure.test)
(deftest (is true))
I’ve seen that but many of those are not in this narrow scope of spec macro errors
none of the other examples above are macro spec errors either
the first and last are compiler errors and middle is a runtime evaluation error
the first one is particularly weird
(defprotocol Fooable
(foo
"I often make this mistake"
[_]))
good one, thx
A coworker just lamented: (defn foo "bar")