This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-01-26
Channels
- # aws-lambda (1)
- # beginners (71)
- # boot (70)
- # bristol-clojurians (1)
- # cider (2)
- # clara (13)
- # cljs-dev (96)
- # cljsjs (6)
- # cljsrn (5)
- # clojure (74)
- # clojure-android (3)
- # clojure-austin (4)
- # clojure-dev (10)
- # clojure-russia (6)
- # clojure-spec (28)
- # clojure-uk (128)
- # clojurescript (64)
- # cursive (2)
- # datascript (18)
- # datomic (116)
- # dirac (1)
- # emacs (12)
- # events (10)
- # hoplon (109)
- # jobs (1)
- # jobs-discuss (21)
- # leiningen (2)
- # luminus (6)
- # off-topic (19)
- # om (21)
- # om-next (5)
- # onyx (4)
- # parinfer (29)
- # perun (20)
- # re-frame (53)
- # reagent (21)
- # remote-jobs (5)
- # ring-swagger (2)
- # spacemacs (6)
- # untangled (42)
- # vim (5)
@bronsa remind me at the weekend to ping Andy (that guy who co-authored the compilers). Bit busy during week.
Morning
Morning.
morning
Does anyone know if there’s a macro out there that throws an ex-info with all the local bindings in its ex-data map?
Morning
nope @thomas i've got a UK mbp keyboard with a US mapping so i get a sensible #
alt-k a -> å
alt-o -> ø
alt-' -> æ
@mccraigmccraig are those custom or default mappings?
@dominicm default on osx i think
i lived in norway for a while and have a son in bergen, so i get to type norwegian which has those three extra letters in the alphabet
the alt-k thing applies the superior circle to ånẙ o̊f the̊ le̊tte̊rs ẘhich tåke̊ it
the ø and æ are just separate chars
I know how you all love to talk politics so I'm (to use a term @agile_geek said yesterday) throwing a grenade into the room... https://antidotezine.com/2017/01/22/trump-knows-you/
hey there all 🙂 more n00b questions. I'm pulling in libraries but they frequently seem to have dependencies on previous versions of clojure (at least that what Cider is telling me).
[[clojure-term-colors "0.1.0-20140207.035954-1"]]
Dependencies not loaded due to conflict with previous jars :
[[org.clojure/clojure "1.5.1"]]
WARN: org.clojure/clojure version 1.1.0 requested, but 1.8.0 already on classpath.
Loaded dependencies:
[[clansi "1.0.0"]]
Dependencies not loaded due to conflict with previous jars :
[[org.clojure/clojure "1.1.0"]]
Generally Clojure versions are backwardly compatible but you might want to exclude clojure from the dependencies that are warning you so that the higher version is used.
@mattford i generally have a top-level :exclusions [org.clojure/clojure]
in my project.clj, and explicitly include the version i want in deps
Hi this works for me (run! println (line-seq stream))
but when I try to do this (run! (partial printlncolor "red") (line-seq stream))
where
(defn printlncolor [color string]
println (style string (keyword color)))
it doesn't.@mccraigmccraig thanks i'll do that.
@mattford also useful is :pedantic? :abort
which won't automatically choose from conflicting versions - it requires you to specify :exclusions
it's worth spending a few mins looking at https://github.com/technomancy/leiningen/blob/master/sample.project.clj - i discovered a few useful things there
@mattford :keywords
and 'symbols
are different things - both can be passed around
it's not a reserved word - but there is a fn clojure.core/test
there's very few symbols that can be considered "reserved words" in clojure and test is not one of them
(remove-ns 'user)
might work ... mostly i have tools.namespace
as a project dep and use https://github.com/clojure/tools.namespace#reloading-code-usage to reload everything
This looks kinda odd to me
{:alsmp {:color :red :ips ["10.206.6.145"]}
:alsapi {:color :green :ips ["10.206.6.245" "10.206.6.42"]}
is it something I'll get used to?mattford I generally use the metasyntactic variables in the repl and only name things well when I copy them into a source file in a proper namespace, but then I remember the bad old days before tools.namespace being good
I'll rarely do a defn in the repl. Just lets until I know what I want and the refactor to a function in the source file
@mattford the indenting / spacing looks kinda odd in that paste
{:alsmp {:color :red
:ips ["10.206.6.145"]}
:alsapi {:color :green
:ips ["10.206.6.245" "10.206.6.42"]}
Right cool. Found them useful already - got rid of my string to keyword conversion stuff.
@mattford keywords can be used as fns too, so you can do things like :
yes, or presence with a set
it depends on context. (:a {:a 1 :b 2})
has the advantage that it won't throw if the map is nil
yes, put whichever is most likely to be nil second
I think they can both take a default value as well
both maps and keywords (and also sets) are functions
vectors too @peterwestmacott 😄
lots of things!
basically anything can implement the clojure.lang.IFn
interface or cljs.core/IFn
protocol and behave like a fn @mattford
😞 vector doesn’t take a default value
ooo it borks
@otfrom "my own private pinewood taj mahal, except for the shape and the size"
@mattford yes - the vector only has indexes 0 and 1
anyone got a decent solution to adding lein deps to a docker image ? currently i've got a custom .m2 dir in git, which i can add to the docker image, which avoids having to pull all (or any) deps on every build, so builds are quick - but now my git repo is massive
@otfrom ah, not for distribution - i use uberjars for that - this is for build and test. i'm building and running module tests within a docker composition
@mccraigmccraig maybe copy the project.clj, run lein, then copy the app files. That should cache .m2 unless you change your project.clj
what does the docker image get you beyond just straight-up lein? Specific JVM version?
@wamaral i tried that but abandoned it late at night - can't remember exactly why now. maybe i should try it again
this looks useful: http://stackoverflow.com/a/36234272/173062
@mccraigmccraig maybe some weird deps between project.clj and your app code? Dunno, it usually works for me
@glenjamin location independence - i need to run tests against a cassandra, so one lein image docker-composed with a cassandra image, all run on docker cloud or codefresh, or whever
think i'll give that another go @wamaral
I'm embarrassed to admit I didn't know about Docker cloud. We're all about DO but I really like the idea of Node as a service rather than being responsible for provisioning nodes.
I've been meaning to play with AWS's docker service but time..
I’ve had a bunch of second-hand reports on container service on AWS - they pretty much all say it’s not magic enough
@paulspencerwilliams i trialled docker-cloud and codefresh as a CI+CD solution - both worked similarly, but codefresh currently performs a load better (costs more tho, cos docker-cloud is in a free beta phase)