This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-11
Channels
- # admin-announcements (20)
- # beginners (48)
- # boot (90)
- # cider (33)
- # cljs-dev (5)
- # cljsjs (10)
- # cljsrn (7)
- # clojure (68)
- # clojure-austin (5)
- # clojure-bangladesh (4)
- # clojure-finland (10)
- # clojure-gamedev (1)
- # clojure-madison (7)
- # clojure-poland (15)
- # clojure-russia (75)
- # clojurescript (25)
- # core-async (23)
- # cursive (5)
- # data-science (43)
- # datomic (15)
- # dirac (26)
- # editors (10)
- # emacs (2)
- # euroclojure (12)
- # funcool (23)
- # hoplon (7)
- # immutant (68)
- # jobs (24)
- # jobs-discuss (1)
- # juxt (1)
- # keechma (9)
- # ldnclj (7)
- # luminus (66)
- # off-topic (54)
- # om (170)
- # proton (7)
- # re-frame (1)
- # reagent (15)
- # ring-swagger (11)
- # spacemacs (6)
- # testing (1)
- # vim (1)
- # yada (19)
@ag no, there is no merging, the second require should overwrite the first
hey @rcanepa: when you make an uberjar, you are making something that does not use lein. So you'll need some other mechanism for configuration. One option is a command line parameter interface (https://github.com/clojure/tools.cli); another is environment variables or system properties (https://github.com/weavejester/environ), or perhaps either of those to specify the location of an edn configuration file (https://clojure.github.io/clojure/clojure.edn-api.html).
@firstclassfunc: Mark Derricutt is a good person to talk to about that
.oO(That’s a very small world. I was about to comment earlier today how #C0FCN8L1Y needs @talios. I should ping him to join.)
@danielcompton: Huh, you’re in Auckland too, eh? Nice. (I used to live in Auckland, and I know Mark IRL.)
When trying that in the REPL :
(require 'clojure.inspector)
(clojure.inspector/inspect-tree '(1 (a b) 2 (c d) 3 (e f )))
I get a javax.swing.JFrame object back but no popup
Did it change ? I remember doing something like that and getting a popup :
http://justinsboringpage.blogspot.fr/2011/01/view-data-from-clojure-repl.html@lmergen: Another possibility from earlier:
user=> (map (partial zipmap [:key :value]) {:name "Joe Awesome" :email ""})
({:key :name, :value "Joe Awesome"} {:key :email, :value "”})
what's a way I can make certain data structures print differently ? I'm sharing results with our team and it would be nice if things like vectors of keywords were printed as simple strings like xyz not [:x :y :x]
(sorry [:x :y :z]!)
I can't do by type, it needs to be by structure...maybe prismatic schema has something ?
@mmeix: ok, thanks but I was hoping for a more general solution
i think Schema coercions/bijections & Fipp are the way to go
Can anyone tell me why lein test
tries to run tests in the user namespace?
And lein test my.test-namespace
fails with class not found, even though it is in the test/ dir
I have a user.clj inside a /dev folder, with the following leiningen config: :profiles {:dev {:source-paths ["dev"] :dependencies [[org.clojure/tools.namespace "0.2.11"]]}})
good afternoon people. Quick question: is it legal to (require ‘[some.long.namespace :as long.namespace])
?
@jonahbenton: Thanks!… I will check those options.
IOW using dots in namespace aliases: yep! or oh no!?
@joost-diepenmaat yep yep!
@joost-diepenmaat: totally!
oh cool
that will make some code here a little bit nicer
@joost-diepenmaat: https://stuartsierra.com/2015/05/10/clojure-namespace-aliases is a good reading IMO, and it recommends using them
thanks @nberger for that link.
Can anyone point me to an open source project using the reloaded workflow with a route to deploy to production and run tests through leiningen? Having trouble working out how to make everything work.
@danielstockton: clojars uses the reloaded workflow, is deployed to production and has tests that run with lein test
, so you could take a look there: https://github.com/clojars/clojars-web
Perfect example, thanks
Does lein need tests to be organized like test/proj/test and proj.test.namespace (two test directories)?
I generated this structure with lein new
, but that's the only difference I can see.
lein test should use the :test profile right, so shouldn't pick up my :dev profile config like :init-ns user
Is it possible for codox
to generate output from a deftype? Specifically, I have functions implementing a protocol inside the deftype and while it is valid clojure to add a doc string to each function, codox doesn't seem to pick it up. I don't think it makes sense to document only the protocol itself because the implementation details are where you actually want specific docs.
to be clear, I don't mean on the type definition, just the protocol implementation
@danielstockton: Glancing through https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md, I think that lein test
merges in the test
profile -- presumably into the dev
profile. You should be able to disable the dev
profile explicitly by lein with-profile -dev test
.
Unfortunately it still tries to run the user namespace 😞
hi guys, does anyone use clojure with protocol buffer ? is this the right lib to use https://github.com/flatland/clojure-protobuf . I find it's a bit oudated
Is lein caching something somewhere, should I try clearing some files? I had init-ns set up globally to user before but it's now under the :dev profile.
You're sure you had this setting only in your project.clj and not in ~/.lein/profiles.clj?
xposting from #C077KDE3A: I'm having a db issue with a recent version of Luminus (I think), where trying to operate on a database is giving me this: 'IllegalArgumentException db-spec mount.core.DerefableState@6dc3d84b is missing a required parameter clojure.java.jdbc/get-connection (jdbc.clj:292)'
you are passing a derefable state to something that needs a connection or a connection spec
@danielstockton: Clojure itself, not Leiningen, loads the user.clj
file on startup.
This cannot be disabled.
what is the easiest way to rename an entire project? (files/dirs/namespaces/etc.) Possible?
I've had some success using this https://github.com/clojure/tools.namespace/blob/master/src/main/clojure/clojure/tools/namespace/move.clj#L86
I feel like I should also point out, that there are many orthogonal names used for clojure projects, so for example you can change the the maven coordinates (group-id, artifact-id) without touching namespaces at all
@hiredman: checking it out now... thanks...
clojure allows more than is generally used in practice, what is generally used in practice has a regular structure that tools can exploit for this sort of thing, but having something that handles all valid clojure files is more complicated
@dm3 all good suggestions, sed
might be easier for now, I'll give it a go
Ok guys gonna ask this here, Has anyone used Leiningan templates and tried to copy binary files like images?
Never mind.. Figured out you create a raw resource such as ' (def raw (raw-resourcer "brocade”))'
What seems like a better design, a huge namespace with a single deftype that wraps a Java object, and implements many protocols, vs. a few separate namespaces that are all passing in the same Java object? Alternatively, I suppose I could also use extend or extend-type depending on what I do. I've already split things up into some nice protocols and switching between the two is pretty much seamless. I don't think people will call this from Java that much, but it's a possibility (but i don't want to bother with gen-class).
I should mention that the code is fairly performance sensitive