This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-27
Channels
- # beginners (3)
- # boot (8)
- # cljs-dev (10)
- # clojure (87)
- # clojure-art (6)
- # clojure-dev (13)
- # clojure-japan (8)
- # clojure-russia (60)
- # clojure-sg (2)
- # clojurescript (126)
- # clojurewerkz (1)
- # core-logic (10)
- # cursive (6)
- # datomic (30)
- # editors (10)
- # ldnclj (7)
- # off-topic (114)
- # onyx (7)
- # re-frame (7)
- # reagent (37)
Anyone have a good solution for dealing with different date / time data types? Including the new java.time stuff?
@mikera … i started something here: https://github.com/zcaudate/hara/blob/master/src/hara/time.clj
but it’s pretty sketchy atm… I’m using it here: http://docs.caudate.me/hara/hara-io-scheduler.html
@zcaudate interesting.... I like the approach of having a protocol based implementation. Looks like it would need a fair bit more work though before getting feature-equivalent to something like clj-time. Hmmmm this stuff is annoying.
Is there any difference between having lein plugins in the root of project.clj
, or inside a :profiles
map?
@aengelberg: if you're writing a lein plugin, it is likely that some other plugin is pulling in an older version of tools.reader
i've been working with JSON a lot recently, it's really painful 😞
it's a great demonstration why commas should be whitespace
you can't even add comments to your JSON - and the hand authoring is so horrible (compared to edn), even with Emacs
(rant over, back to work!)
> I removed comments from JSON because I saw people were using them to hold parsing directives, a practice which would have destroyed interoperability. I know that the lack of comments makes some people sad, but it shouldn't.
@malcolmsparks: I have been fortunate enough to work on a closed Clojure/ClojureScript project which uses EDN and transmit (that ends up persisting EDN in the DB as well actually). It is just so much simpler
That’s was Douglas Corckford said.
@ordnungswidrig: is he related to Douglas Crockford
@colin.yates: that's why we need content negotiation
@ordnungswidrig: I'm still sad, even if he says I shouldn't be 😉
I was surprised at where the joy came from - things like not having to worry about key-word versus keyWord etc.
I realise there are libraries to deal with this sort of stuff, but with EDN there is no translation at all. Lovely.
(apart from Records which need a bit of help)
@colin.yates: I completely agree, all these little snags add up so progress grinds to a halt
I can json is an improvement (it's data) but what a missed opportunity - it's now too entrenched to do anything about
i’m happy there’ll never be a json 2.0 but it would be nice if something came along to take that crown (EDN would be good!)
@comma: true story - I will never forgot the time I had to consult with a client who had been given a 20 page schema for a web service they had to connect to. In amongst all of that schema was a single element <body/> with a note “dependant upon the service being called”. The manager couldn’t understand the problem: “I thought XML was a standard”...
Does anyone know if there exist any way to find out where does clojure warning come from?
Ugh. Thanks @bronsa. Maybe I should switch to boot 😉
@colin.yates: Not sure if we’ve worked for same client but I’ve seen exactly the same thing!
large MOD client in the UK?
oops, I mean ‘partner’ not ‘client'
they love ‘standards’, even though they don’t know what it means nor what the pros and cons are.
I had to put all my consulting skills to effect to stop myself wetting myself laughing when I found that “<body/>” description though! Still makes me chuckle.
artcommacode: http://json5.org/
any suggestions for getting going with transducers - preferably written rather than videos?
thanks @meow - google was a bit overwhelming
@colin.yates: I had posted some links in the #C05423W6H channel, but it looks like that channel isn't in the archives
Hey, I'm looking for a way to package a clojurescript command line utility as a single executable without the need to install nodejs on target machines, any tips on how to achieve this will be appreciated
@colin.yates: let me know if you come across any particular good articles
will do.
@colin.yates: shameless plug: http://blog.juxt.pro/posts/xpath-in-transducers.html
@meow: it is in archives: http://clojurians-log.mantike.pro/core-async/2015-06-27.html
@colin.yates: T’was NHS organisation in my case!
@malcolmsparks: Impressive post about transducers. I particularly like the heavy use of comp and how succinct is makes the functions
Hi. If I have (defn f [a b] (+ a b)), can I got '(+ a b)?
@andrewboltachev: try (source f)
michaelblume: thanks, but that returned "Source not found". Found workaround in working with whole '(defn f [a b] (+ a b)) object
You can't recover the source forms from compiled functions.
source
uses Var metadata to look up the source code file on disk.
aha, got it
probably dumb question:
in InvokeExpr.emitProto I see two calls to Util.classOf emitted
second one here https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Compiler.java#L3706
is this path executed often enough that it’d make sense to juggle the stack a bit and keep the result of the first call around?
juggling the stack is cheaper than actually doing another invocation, right?
(I tried this in my Clojure tree and everything seemed to work just fine)
My only warning with environ is that your environ configs are only present if you run your project via leinigen or set the appropriate values in env vars. I've used it successfully before, but on a recent work project I would up inlining the environ map into the project source so that it'd be visible at uberjar runtime which immuconf seems to do better.
anyone know how to workaround a clojure-maven-plugin clojure submodule failing to build in intellij without cursive?
managed to fix it with this <resources /> hack: http://alexshabanov.com/2012/10/24/using-clojure-in-maven-project-with-intellij/
@michaelblume: I think you're right
@bronsa: so I did this and everything seemed to compile/run fine
do you think it’s worth submitting?
@michaelblume: do you have the diff public? it looks like you'd need to pop the class on the onLable and callLabel
@michaelblume: #C06E3HYPR might be a better place to talk about it, and @alexmiller a better person to ask I'd say yes but this needs careful benchmarks
@bronsa: thanks 😃