This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-07-16
Channels
- # beginners (21)
- # boot (6)
- # cider (47)
- # clojure (67)
- # clojure-brasil (2)
- # clojure-dusseldorf (3)
- # clojure-greece (2)
- # clojure-quebec (3)
- # clojure-russia (8)
- # clojure-spec (110)
- # clojurescript (19)
- # cursive (8)
- # datomic (5)
- # devcards (2)
- # dirac (9)
- # editors (1)
- # emacs (3)
- # funcool (1)
- # lein-figwheel (7)
- # om (1)
- # protorepl (2)
- # re-frame (1)
- # testing (1)
@seancorfield: it seems that db namspaces are a kind of particular case. Meaning, if I see functions in yournamespace.db.query
I already know that I should not put them in an STM and therefore you can leave the !
out. The problem is with other places, where I prefer to always add it, even if there is no system visible change, in order to prevent any misuse and catch the attention of the reader. I don't want any serial killer at my door (including myself ☺️)
@richiardiandrea: And that’s a perfectly valid convention to follow IMO.
there’s this monster function in js with several return; and i’m not sure what to replace them with
@krchia, sure, if you specify the condition with some branching logic and know that whatever’s last in that branch is what the function will return.
yeah, that’s the problem.. there’s conditionals peppered all over inside the function with returns
You’re going to have to refactor it into a series of smaller functions, and probably use some->
or cond->
(i.e., threading).
This is one of the wins of cljs over JS: better, more maintainable code structure — because you’re essentially forced to do that 🙂
And never be afraid of having an army of smaller functions as long as they’re clear and predictable.
A mindless translation will be very unidiomatic cljs...
Matters what your target is, really. I went with dokku on an Ubuntu installation for a bit but after awhile it was just easier for me to generate an uberjar and use sftp to get it to my server.
i'd prefer a completely automated setup, something that doesn't require me to ftp any jar (i might be on phone connection for hotfix for instance)
i could probably write some capistrano recipes but wondering what everyone else is doing
@naomarik: We have automated build / test / deploy scripts but there’s still manual intervention. We run a private Apache Archiva instance as a mirror for Maven/Clojars and a repository for our own published libraries. We’re moving toward Docker in general to help automate things.
We also run a REPL server inside all our long-lived processes so — if absolutely necessary — we can jack in (over SSH / VPN) and debug and patch a live, running process.
We’re moving toward CD as an end game but we’re aways off that yet 🙂