Fork me on GitHub
#clojure
<
2015-06-06
>
danielcompton07:06:34

I'm writing a blog post about Reader Conditionals, I'd be happy to have some feedback before I publish it if anyone's interested - https://gist.github.com/danielcompton/bd07ce46d14d5849be57

arrdem07:06:36

@danielcompton knee jerk splice top level into a do don't have two reader splices

ul07:06:39

@danielcompton: like your mention about top-level form gotcha

ul07:06:13

@arrdem: ha-ha, same reading timing

arrdem07:06:45

Other than that looks good!

danielcompton07:06:13

@arrdem: that's a fair point, could look a little funky with the do, but I'll mention it.

danielcompton07:06:29

I got really confused on an older 1.7 release before they added the exception. Before that it would just silently fail. I was converting a ns to reader conditionals and wrapped the whole thing in a splice and it didn't work as expected

bozhidar08:06:16

btw, people interested in cider might checkout the dedicated #C0617A8PQ channel

bozhidar08:06:23

I’ll be keeping an eye on it from time time, so feel free to ask questions and discuss problems/suggestions about cider there

joelkuiper11:06:43

Hey! Just curious … is there something like a durable/persistent atom? I don’t need a full database, just an atom that is able to survive application restarts

joelkuiper11:06:04

API wise I guess it would be similar to the durable queue from Factual

joelkuiper11:06:52

meh I’ll just opt for Redis I guess … seems more pragmatic in this case I guess.

martinklepsch11:06:52

@joelkuiper: uses git as storage backend

joelkuiper11:06:19

interesting approach

joelkuiper11:06:32

maybe I do need a database, just haven’t realised it yet. But it’s on a single proces, on a single machine, multi-threaded though. It’s for maintaining a simple id -> meta-data map

borkdude11:06:43

@joelkuiper: just writing the contents of an atom to a file and read it back in also works of course

joelkuiper11:06:33

@borkdude: well yes, but then I need to watch the atom for changes and keep flushing out to disk each time something changes. I was hoping somebody already did that, since it can involve some peculiarities 😉

joelkuiper11:06:19

@martinklepsch: the file backed atom seems to be at least very similar to what I had in mind … I’ll play with it, thanks simple_smile

ul11:06:30

should work multithreaded because of go-loop

joelkuiper11:06:53

yep I’ll try enduro! it would have been easy to write, surely, but not as easy as asking the power of the interweb 😉

borkdude11:06:34

@joelkuiper: very true. and you can swap it for postgres later

joelkuiper11:06:28

simple_smile thanks everyone!

tjg12:06:05

How do I make Quil on MacOS create Dock icons for my sketches? The following doesn't help:

;; In core.clj (before defsketch)
(System/setProperty "apple.awt.UIElement" "false")

;; In project.clj
  ... :jvm-opts ["-Dapple.awt.UIElement=false"]

chadhs15:06:53

hey friends, i was curious how you guys typically auto start clojure apps? i was considering using supervisord to manage the standalone jar and nginx as proxy in front of that clojure web app.

chadhs15:06:17

does this sound crazy? (if you have an opinion or advice could you atmention me) thanks!

borkdude15:06:46

@chadhs: I usually have something in /etc/init.d

tjg15:06:46

@chadhs: We just use an upstart script. (And nginx as proxy too.) I'll look later at supervisord to see if it has advantages over upstart, thanks!

akiva15:06:35

@chadhs: I use upstart and nginx as well. Works great.

chadhs15:06:55

Thanks all! Was considering supervisor to avoid writing different init scripts for Ubuntu and FreeBSD

chadhs15:06:10

But that may be bad reasoning

minimal15:06:23

i use supervisord a lot and nginx, although for one of our high volume apis we use uwsgi with nginx to load the ring app

akiva15:06:44

Honestly, only reason why I use upstart is because it’s what was there when I jumped from Heroku to DigitalOcean.

akiva15:06:08

Meaning I never researched pros/cons/etc.

chadhs15:06:14

Cool thx :thumbsup:

chadhs15:06:38

@minimal: interesting on uwsgi

minimal16:06:21

@chadhs: It’s really fast and has some interesting features http://uwsgi-docs.readthedocs.org/en/latest/Ring.html

chadhs17:06:58

@minimal: sweet thx for link

jmckitrick17:06:50

Hey all, I’m looking to totally gut and simplify my test suite for a web project I have… I have too many mocks, and the integration testing is brittle, because of occasional schema and/or API changes. Any suggestions on tools that might make this easier, or approaches to testing that are specific to Clojure?

borkdude20:06:13

Clojure related blog post on #9 at Hackernews

noisesmith21:06:07

@jmckitrick jessica kerr / jessitron had a blog post on this topic recently

arohner21:06:38

@jmckitrick: write your app using https://github.com/stuartsierra/component, then only use components while testing

arohner21:06:04

@jmckitrick: makes mocking unnecessary, because you can just replace the component

arohner21:06:22

but I also strongly agree with separating logic from side-effects

danielcompton22:06:01

@chadhs: there was a recent post on the Clojure mailing list about running Clojure programs with supervision