Fork me on GitHub
#clojure
<
2015-07-27
>
mikera00:07:24

Anyone have a good solution for dealing with different date / time data types? Including the new java.time stuff?

zcaudate07:07:20

but it’s pretty sketchy atm… I’m using it here: http://docs.caudate.me/hara/hara-io-scheduler.html

zcaudate07:07:59

the java 8 integration is a bitch.

mikera07:07:13

@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.

zcaudate08:07:05

@mikera: yeah tell me about it 😃

danielcompton08:07:35

Is there any difference between having lein plugins in the root of project.clj, or inside a :profiles map?

bronsa10:07:21

@aengelberg: if you're writing a lein plugin, it is likely that some other plugin is pulling in an older version of tools.reader

jonas10:07:35

Is it possible to turn off colored stacktrace output in ptaoussanis/timbre?

malcolmsparks11:07:52

i've been working with JSON a lot recently, it's really painful 😞

malcolmsparks11:07:48

it's a great demonstration why commas should be whitespace

malcolmsparks11:07:20

you can't even add comments to your JSON - and the hand authoring is so horrible (compared to edn), even with Emacs

malcolmsparks11:07:26

(rant over, back to work!)

ordnungswidrig11:07:25

> 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.

colin.yates11:07:27

@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

ordnungswidrig11:07:36

That’s was Douglas Corckford said.

colin.yates11:07:38

@ordnungswidrig: is he related to Douglas Crockford simple_smile

malcolmsparks11:07:49

@colin.yates: that's why we need content negotiation simple_smile

malcolmsparks11:07:08

@ordnungswidrig: I'm still sad, even if he says I shouldn't be 😉

colin.yates11:07:53

I was surprised at where the joy came from - things like not having to worry about key-word versus keyWord etc.

colin.yates11:07:20

I realise there are libraries to deal with this sort of stuff, but with EDN there is no translation at all. Lovely.

colin.yates11:07:28

(apart from Records which need a bit of help)

malcolmsparks11:07:58

@colin.yates: I completely agree, all these little snags add up so progress grinds to a halt

malcolmsparks11:07:57

I can json is an improvement (it's data) but what a missed opportunity - it's now too entrenched to do anything about

comma11:07:38

at least json isn’t xml

comma11:07:45

and at least i don’t need to use SOAP to get it

comma11:07:13

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!)

colin.yates11:07:16

@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”...

comma11:07:53

hahaha colin.yates

alesguzik14:07:38

Does anyone know if there exist any way to find out where does clojure warning come from?

aengelberg14:07:13

Ugh. Thanks @bronsa. Maybe I should switch to boot 😉

agile_geek14:07:32

@colin.yates: Not sure if we’ve worked for same client but I’ve seen exactly the same thing!

colin.yates14:07:55

large MOD client in the UK?

colin.yates14:07:51

oops, I mean ‘partner’ not ‘client'

roberto14:07:05

I had the same experience in my country when I was a government contractor.

roberto14:07:29

they love ‘standards’, even though they don’t know what it means nor what the pros and cons are.

colin.yates14:07:11

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.

comma15:07:21

dottedmag: yeah i’ve seen a bunch of projects like this. they’re all very silly

comma15:07:42

thankfully none of them have ever managed any real traction

colin.yates15:07:18

any suggestions for getting going with transducers - preferably written rather than videos?

colin.yates15:07:24

thanks @meow - google was a bit overwhelming simple_smile

meow15:07:14

@colin.yates: I had posted some links in the #C05423W6H channel, but it looks like that channel isn't in the archives

Busy escaping the comfort zone15:07:14

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

meow15:07:41

@colin.yates: let me know if you come across any particular good articles

meow15:07:37

@ul: oh, great, thanks! simple_smile

agile_geek15:07:28

@colin.yates: T’was NHS organisation in my case!

ska18:07:04

@malcolmsparks: Impressive post about transducers. I particularly like the heavy use of comp and how succinct is makes the functions

andrewboltachev19:07:13

Hi. If I have (defn f [a b] (+ a b)), can I got '(+ a b)?

andrewboltachev20:07:46

michaelblume: thanks, but that returned "Source not found". Found workaround in working with whole '(defn f [a b] (+ a b)) object

stuartsierra20:07:15

You can't recover the source forms from compiled functions.

stuartsierra20:07:28

source uses Var metadata to look up the source code file on disk.

michaelblume20:07:59

probably dumb question:

michaelblume20:07:20

in InvokeExpr.emitProto I see two calls to Util.classOf emitted

michaelblume20:07:01

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?

michaelblume20:07:15

juggling the stack is cheaper than actually doing another invocation, right?

michaelblume20:07:35

(I tried this in my Clojure tree and everything seemed to work just fine)

arrdem21:07:59

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.

arrdem21:07:17

:ie: by about 24hrs it would seem. oops.

gtrak21:07:58

anyone know how to workaround a clojure-maven-plugin clojure submodule failing to build in intellij without cursive?

bronsa22:07:29

@michaelblume: I think you're right

michaelblume22:07:38

@bronsa: so I did this and everything seemed to compile/run fine

michaelblume22:07:43

do you think it’s worth submitting?

bronsa22:07:58

@michaelblume: do you have the diff public? it looks like you'd need to pop the class on the onLable and callLabel

bronsa22:07:07

ah there we go

bronsa22:07:07

@michaelblume: #C06E3HYPR might be a better place to talk about it, and @alexmiller a better person to ask simple_smile I'd say yes but this needs careful benchmarks

bjarnagin23:07:51

does anyone know if there is a way so pass a string directly into a query using java.jdbc’s query function, such that the string becomes a part of the query itself and not a parameter to the query?

ergl23:07:31

I figure you could use str in there

bjarnagin23:07:05

thanks! ...i have no defense for failing to realize that more quickly.