Fork me on GitHub

Hello, is there anyone?


What's the reasoning behind using require outside of the ns macro?

Alex Miller (Clojure team)14:11:07

to cause loading and/or to modify the current namespace's symbol resolution

Alex Miller (Clojure team)14:11:45

probably mostly done at the repl, but there are some use cases in normal project code too


Do you have an example when it would be a good use case in normal project code? Having a hard time reasoning about when it would be the right solution.

Alex Miller (Clojure team)14:11:36

if you have code that dynamically loads a namespace based on configuration

Alex Miller (Clojure team)14:11:21 is an example in the 1.8 socket server that will load the namespace of the provided accept function


There's probably a more idiomatic way to keep constants like file paths, strings for the Ui and such than to def them in a 'constant' namespace, right? Does anyone have input for me there?


what’s wrong with a constants ns?


can anyone recommend either a) a good tutorial on java string formatting or b) a library that exposes a better string-formatting api?


Not really a tutorial, but I found the JavaDocs for Formatter to be pretty comprehensive -


Which is what the built in format function in Clojure uses


Anything in particular you are trying to do / having trouble with?


i’ve been thinking about nanogenmo and maybe trying to do some fun string formatting tricks


but i’m used to python’s string formatting, which seems a lot nicer to me, at least based on my admittedly-scant experience with java's


@swizzard: I don't know. Which other ways are there?


@meikemertsch: i don’t know! 😞