This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-01
Channels
- # announcements (5)
- # beginners (151)
- # calva (4)
- # cider (32)
- # cljdoc (27)
- # cljsrn (2)
- # clojars (15)
- # clojure (66)
- # clojure-houston (2)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-uk (7)
- # clojurescript (15)
- # data-science (1)
- # datomic (2)
- # fulcro (6)
- # off-topic (24)
- # pedestal (1)
- # re-frame (20)
- # reagent (3)
- # remote-jobs (4)
- # rewrite-clj (2)
- # shadow-cljs (9)
- # spacemacs (5)
- # tools-deps (4)
- # vim (1)
- # yada (4)
since yesterday evening I've got an issue with deploying to clojars: https://clojurians.slack.com/archives/C0H28NMAS/p1567315973001400 anyone know what's going on?
I don't know what's going on, but I'm having (what appears to be) the same issue.
For interop like this, is there a better way?
(java.nio.file.Paths/get "/Users" (into-array ["username" "dev" "clojure"]))
@doglooksgood I'm in the process of writing a wrapper for java.nio.file
that might be of use: https://github.com/logicblocks/pathological
There's no getting started yet but hoping to work on that this week
There are API docs but they are in a minimal state at the moment
For your specific case, with that library:
(require '[pathological.paths :as p])
(p/path "/Users" "username" "dev" "clojure")
Or (p/path "/Users/username/dev/clojure")
Take a look at the tests for example usage
is there some way to make the in-browser stacktrace-viewer thing from lein show the same stuff as is shown in the command-prompt? I'm using expound to get readable spec errors, but they don't affect the errors i see in my browser. is this doable? or is there maybe some generally better solution to have readable (or at least not clojure.core
-containing) stacktraces?
Does Kibit make suggestions on using any of the threading macros? I see the code there, but I am unable to understand when it does so
Is it possible to access the line/column numbers of an sexp and all it's sub-expressions (and sub-expressions thereof etc) in a macro? Via &form I can access the meta information of the form of the macro invocation, and the meta information of the arguments, but I cannot do it recursively on these arguments (the symbols a, b, c and d in the example below). I would like to use this to improve error reporting in macros. The only solution I see for now is to implement a reader macro which adds the meta information everywhere (with tools.reader). But there must be an easier way? https://gist.github.com/foobar27/e04a952571f36376c0e3ee0c550834b3
Line/col info is only attached to forms, not to symbols in the reader - does that match what you’re seeing?
If so, then this is not macro-related but reader-related
Thanks @U064X3EF3, it does 🙂
One day it would be cool to have them on any tokens. In cases like (let [x 1, 2 3] 4)
it would be cool if an IDE could directly highlight the offending token 2
.
Are there any pitfalls to using something like this
(defmacro apply-macro [macro args] `(~macro ~@args))
in order to apply a macro to some list of args? Is this the way to do it, or is there a better way?I think that will only work if args
is a collection literal.
Hey there, would anybody be willing to help meet out setting out Emacs with Cider? Completely new to this thing and encountering a bug...
can I override or add rules to kibit?
Is there a library that provides a set of standard read/write handlers for Fressian that can serialize default Clojure data structures, like vectors and meta?
If I was to publish a lib on clojars, is it a better convention to name it com.ahungry.<whatever>
, or to do something like ahungry.util.<whatever>
?
if I don't use the FQ naming for the ns, would the alternative be in a lein defproject for the group name to use
?
well, this is frustrating - following the clojars deploy tutorial and the similar one on lein's site, and neither work
Sending ahungry/xdg-rc/maven-metadata.xml (1k)to
Could not transfer metadata ahungry:xdg-rc/maven-metadata.xml from/to clojars ( ): Access denied to: , ReasonPhrase: Forbidden - repo/ahungry/xdg-rc/maven-metadata.xml.md5 (No such file or directory).
Failed to deploy metadata: Could not transfer metadata ahungry:xdg-rc/maven-metadata.xml from/to clojars ( ): Access denied to: , ReasonPhrase: Forbidden - repo/ahungry/xdg-rc/maven-metadata.xml.md5 (No such file or directory).
does lein or deps.edn have a standard way to pull code straight from github and avoid clojars entirely?
Isn’t there a convenience method that provides both quot
and rem
? Obviously I can (juxt quot rem)
but I remember something of this sort
ty, good to know I just have abysmal timing for the first time attempt to put something on clojars
or maybe that was Haskell. I can’t remember now
I do not recall anything in Clojure for that.
Yeah, I think I’ve got them mixed up. Thanks.
With spec fdef, I want to test/instrument a function that takes no args, but should always return a string
I tried an fdef of :args nil and :ret string? but when I call stest/instrument, and then redefine the function to return a number, it doesn't throw any error or message
instrument only checks invocation, not return
Also (s/cat) is usually the best spec for a no arg function (although there’s not much value in testing a no arg function)
(defn get-string [] "Foo" 5)
(s/fdef get-string :ret string?)
(stest/instrument)
(get-string)
user=> (if-let [z true [x y] [1 2]] [x y])
Syntax error macroexpanding clojure.core/if-let at (REPL:1:1).
([x y] [1 2]) - failed: Extra input at: [:bindings] spec: :clojure.core.specs.alpha/binding
user=> (if-let [[x y] [1 2]] [x y])
[1 2]
Destructuring fails if its the second binding in an if-let form
Rather. This fails the spec. Was this how it used to be before?I could’ve sworn it used to work…
Yeah I did. So only one binding is allowed! But I swear the doc said bindings. I should look that up
Ah! Got it. The clojuredocs version has an if-let* that I used before
Thanks @hiredman