This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-07-21
Channels
- # admin-announcements (24)
- # beginners (80)
- # cider (18)
- # cljs-dev (12)
- # clojure (94)
- # clojure-berlin (15)
- # clojure-dev (10)
- # clojure-gamedev (3)
- # clojure-italy (38)
- # clojure-japan (4)
- # clojure-russia (109)
- # clojure-sg (1)
- # clojurescript (161)
- # code-reviews (29)
- # core-async (17)
- # datomic (20)
- # editors (14)
- # instaparse (17)
- # ldnclj (9)
- # off-topic (9)
- # om (2)
- # onyx (2)
- # re-frame (11)
- # reagent (46)
@voxdolo: the pedantic answer is “it depends”, the useful answer is “anything you do to improve boot time locally should translate to faster Heroku boot times too"
@voxdolo: but if you need zero downtime then I’d look at preboot as well
Fair enough :) thanks for all the input @danielcompton!
@voxdolo: I’ve never tried to get a serious app into production, but even for simple apps, I needed to AOT to make it boot in < 60s
@arohner: this is my first stab at a serious production clojure app on heroku... It's not intended to be long term, but it's pretty darned convenient for now, provided we can get past the deploy timeouts. That said, we may be trying to pull off a quick switch to EBS or some such if we can't.
@arohner: I need to get familiar with docker. Spent just a little time today looking at the official Clojure Dockerfile, trying to figure out what was going into it. If nothing else, I'd like to have a Dockerfile teed up and ready to go in case the the poo hits the proverbial fan.
We've been in build-build-build mode and are now in ship-ship-ship mode... Probably a good time to be looking at it.
I just wrote a little thing about using Figwheel with Docker earlier this evening: http://blog.nickol.us/2015/07/20/using-figwheel-with-docker/
@teslanick: Something that’s been helping me when using Figwheel with Docker is to define a local location for my Maven repo, then starting the docker image with that directory mounted
That way I can pull the lein deps stuff out of the Dockerfile
That would be really handy, any time I have to rebuild my docker image it's kinda painful
Especially because I'm using a mac, so docker arrives through docker-machine. [i.e. the network is horribly slow because vms]
I have a Makefile target for running the image “clean” (copies all the files at runtime), one with the src directory mounted on top for live coding, and one that’s the same plus the local maven dir is mounted
So it’s easy to drop back to having it built from scratch, but just as easy to “cache” some things so you can tweak things a little faster
I would be interested in seeing the details of that setup -- I'm still very much a docker neophyte.
One annoying thing (which I've patched around locally) is that the shared file system (whether this is docker-machine or just docker) has funny behavior around file changes, which throws figwheel into a tizzy when CSS files change.
It’s not anything fancy, just extra -v options depending on which task I run
I guarantee you have more Docker knowledge than I do!
@voxdolo: I recently discovered https://www.tutum.co/. It uses Docker. I was able to deploy few Clojure apps quite easily. Also it’s possible to have auto-deploy workflow when Docker build automatically after push to GitHub
@podviaznikov: cool, I'll check it out. Cheers!
is it possible to dynamically create a docstring when defining a function? (defn foo (str ...) [x] ...)?
if you live in Austin, TX https://twitter.com/swannodette/status/623527687932481536
@tbaldridge: are there public gists or tutorials around using pixie-lang for shell scripting?
@tbaldridge: for example: how does a curl / http request look in pixie?
@teslanick: I've been considering Docker to mitigate niggling differences when I deploy from Mac to DigitalOcean/Ubuntu. I like the idea of getting an environment set up that can ship easily. Your guide to Figwheel with Docker looks really helpful - but you don't sound that enthusiastic! Do you think it's worth the trouble?
@denik There are currently some very basic functions for dealing with filesystems like listing files and dirs in pixie.fs There are some good examples of making calls to curl in https://github.com/pixie-lang/dust/blob/master/src/dust/deps.pxi
@coyotespike: I'm not terribly enthusiastic about it. I find docker containers to be really opaque about their state and happiness level. It's also a big pain to set up in OS X right now. I think that will get better with time.
I also find devops/system management a really boring topic, but that's my own biases showing through.
Thanks for that feedback - my time might be better spent elsewhere then. Sad, it's meant to be so cool 😉
It will get better fast -- I started using Docker seriously in January, and it's gone from being a big daily pain to an intermittent annoyance.
i've been using docker for a while to deploy to mesos/marathon : it's great for that situation... lein-uberimage makes it easy to create images from lein projects too
Have you found yourself configuring fewer things on the host/target?
Without any Docker experience, I'm assuming its benefit is getting the process environment set, and then being able to ship without doing it all over again.
Yeah, that's the big win with Docker. I don't experience [the benefit of] it directly, but the development stack I use at work looks a lot like the production stack. We can actually "deploy" production to a local machine (or a personal remote docker cluster), which is pretty cool.
coyotespike: mesos/marathon takes a fair bit of setup, but once it's configured (you really need a config mgmt tool like pallet or ansible) you can deploy docker images with a POST then scale straightforwardly across your cluster, and mesos/marathon looks after failover, restart, inter-layer routing, simple monitoring, and rolling upgrades
i have the docker images set up to read environment, like a 12-factor app, so testing is easy on my dev machine
@teslanick @mccraigmccraig Man, that is pretty cool. Consistency from dev to production would be awesome.
@coyotespike: environment vars are your friend : environ is a good clj lib for reading from them and other sources
@wei: You don't need to add the /
, there's a 2-argument form of keyword
.
@stuartsierra: ahh. glad I asked, thanks
@tmulvaney: thanks!!!
@mccraigmccraig: Good point! otoh, I'm just now provisioning the DigitalOcean Ubuntu, so I kinda have to set the environment as well...
is there a performant alternative to some
over a map? (some identity {:a 1})
is 5x slower than (some identity '([:a 1]))
@akiel e.g. (some f map) becomes (reduce-kv (fn [_ k v] (when-let [ret (f k v)] (reduced ret))) map)
@bronsa: yes but than I have to terminate it after the first truthy value - which is possible with (reduced x)
but it’s not so nice
ok contains? works on the key of a map - right. But I need it on the [k v]
pair of a map
@akiel there are no higher-order functions for maps equivalent to the ones for seqs in core
if you actually need the extra performance of avoiding the seq conversion, you'll need to use something like reduce-kv
@bronsa: you are right - I just wonder - after all the transducers stuff - that some was left behind
@akiel: Maps do NOT have an order unless you have a sorted-map
so you shouldn't use some
with a map.
@rauh: good point - my use case are bidi routes were the key is a matcher and the value is a match - and you are right - what if two matchers would match
I profiled bidi route matching and this some was quite on top - so I liked to optimize it