#clojure logs

2015-06-22

00:24elvis4526is it possible to use add-watch with mutliple atoms at the same time ?
00:25justin_smithelvis4526: there's no reason you can't use the same watching function for multiple atoms, if that's what you mean
00:25elvis4526I'm sorry, I meant like watching atom1 and atom2 and only trigger the callback when both gets changed
00:27amalloyelvis4526: atoms aren't coordinated, at all
00:29justin_smithelvis4526: there's nothing that acts like that, but you could make something (perhaps using a channel, or an atom or delay), that would wait for both atoms to change before triggering some action
00:30amalloyand what happens if a changes twice, then b changes twice? there is a lot of detail to be ironed out in that specification
00:31justin_smithdefinitely
00:31elvis4526Yeah okay thanks ! I believe if I would be using Clojure on the JVM I could use agents for that, correct ?
00:32justin_smithelvis4526: you could use an agent that holds the set of modified atoms, and then send it a function that updates, and then perhaps executes something if the right things are present in the agent value
00:39elvis4526perfect - that's really cool.
02:13gniquilhi all, got a quick question about clearing the symbols defined in a namespace... in my tests, sometimes I would define a test say "deftest abc-test", then after some refactoring, i would change the name of this test, as the code has been refactored, however, when I go into the namespace and run (run-tests), although all the new tests would pass, the old test would still be defined and ran. Is there a way to "clean" this up?
02:22H4nsgniquil: i use (remove-ns 'the-ns-name) often to clean up such things.
02:24gniquilThanks! that was easy
02:24H4nsgniquil: i.e. i use remove-ns and then reload it. this can create issues with dependent namespaces, but for test namespaces, it should normally work fine.
02:24gniquilfunny you can even do that while in the ns
02:24gniquilawesome, again thanks for the help
02:41musty:)
02:42mustyHello clojure expertz.
02:44Empperican't say hello back since I'm not an expert
02:44EmpperiI'm a GOD
04:35kwladyka_how to recognise reason of exception in Clojure? for example refuse connect to DB, I can get exception message by (.getMessage e), but how can i determinate reason of exception? I want react of this exception in specifics way.
04:37kwladykaFor example I am getting "Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections." and how to know is this reason of error and react for that?
04:55oddcullykwladyka: i'd not try to do anything smart here. fail and provide the user with the message
04:57kwladykaoddcully, but i want just to know how to do that. Or is it just bad idea?
05:01kwladykaoddcully, or in another way: I am doing inster! to db and if I get exception about not unique primary_key I don't want just show user big error, because I want call another action then.
05:04PupenoWhen I run foreman start in my luminus app, I get this error: 10:04:22 web.1 | Error: Could not find or load main class clojure.main, how can I get more details about the error?
05:10PupenoThis is the line being executed java $JVM_OPTS -cp target/foobar.jar clojure.main -m foobar.core. Does it look correct or do I have to change something there?
06:25kwladykai solved my problem
06:27tim__lazy-seqs, "In general, you can think of lazy seqs as "recipes" for how to generate each element in the sequence"
06:28tim__what if I have a function that returns say 10 results at a time
06:28tim__say its an API im calling that returns 10 items per call
06:28tim__can I make this into an infinite sequence ?
06:34mmeixdo you need it infinite?
06:35Pupenommeix: I think he just wants the lazy-seq to abstract the fact that results comes in batches.
06:37tim__@Pupenu yeah, @mmeix, it doen't really need to be inifinite I just thought that would be a way to handle it, I was thinking of an lazy seq combined with take-while ( I don't have in database already )
06:37mmeixok
06:38Pupenotim__: it sounds like it should be possible, but I don't know how, I'm new to this and having that *internal mutable state* might not be the most straightforward in Clojure.
06:38schmirwouldn't (mapcat identity (repeatedly f)) do what you want?
06:38mmeixsomething like iterate my-api-call maybe?
06:39schmirf should return a seq of the 10 results...
06:41tim__schmir: thanks I'll try that, somone in clojure-beginners suggested lazy-cat as well
06:41mmeix(we have a channel #clojure-beginners?)
06:42oddcullymmeix: see topic
06:42tim__that's what it said when I logged in :)
06:42mmeixah ...
06:44mmeixok, then I can bother them :-)
06:51Guthurhas anyone tried arcadia-unity with unity 5 on Win64?
06:51GuthurI have a REPL but can not seem to get it to load any of my script files
06:51GuthurI get: Skipping Assets/Arcadia/Scripts/core/bar.clj, namespace in ns form does not match file name
07:17kwladykahttps://www.refheap.com/104347 - why clojure.test has (not (= "23505" (.getSQLState e))) instead of value of this while compare???
07:18kwladykaso strange
07:20oddcullycomparing magic number looks scary
07:20kwladyka(println (.getSQLState e)) works in register-step-1, it shows the value
07:20kwladykaso is it something wrong with clojure.test?
07:44PupenoWhat's the appropriate approach to set credentials on luminus with postgresql so it works on production on heroku as well as locally?
07:58kwladykaWhere can i looking help with my problem about clojure.test? I don't repository like that on github
07:58JickelsenI am not an expert but my setup uses environment variables on the heroku side for auth credentials and an open database for dev, or sets the credentials in dev-specific namespaces. But I'd love to hear that this is a terrible idea and that some other way is better. :)
07:59tdammers_Jickelsen: it's a fairly decent setup, as long as your dev setup is firewalled off the general internet like crazy
08:01JickelsenI guess it would help too if you had a separate dev database altogether
08:02kwladykammm i will ask on clojure/clojure
08:06kwladykadamn... no idea what to do with that
08:19noidikwladyka, you have quoted the expression, thus preventing the method calls from being evaluated
08:19noidi,(quote (.foo bar))
08:19clojurebot(.foo bar)
08:19noidi,(first (quote (.foo bar)))
08:19clojurebot.foo
08:19noidi,(type (first (quote (.foo bar))))
08:19clojurebotclojure.lang.Symbol
08:19kwladykanoidi, thank you!!!!!!
08:20kwladykabut... how to code that to use list?
08:20kwladykaor maybe just use vector?
08:20noidiif you need a sequence of values, it's idiomatic to use a vector literal
08:21kwladykai just need list of errors to show them to user, I am not enough experience to know what will be better
08:21noiditry this: {:errors [{:message (.getMessage e) :code (.getSQLState e)}]}
08:22kwladykaso vectors will be better?
08:22noidiyes
08:22justin_smithfor literals, vectors are always better
08:22kwladykacan you explain why?
08:22noidivectors are evaluated to themselves
08:23kwladykammm so how to know to which one should i use?
08:24kwladykai thought it is about performance
08:24noidias a rule of thumb, use lists for function calls and vectors for everything else :)
08:24kwladykaand as i understand vectors are better with reading by index but list with adding/reading to begin/end
08:24justin_smithkwladyka: no, lists are terrible for adding at the end
08:25noidiin the rare case you specifically need a list, you can construct it like this: (list 1 2 3)
08:25noidiin general you don't need to use quoting except when writing macros
08:25justin_smith realistically, (seq [1 2 3]) is just as good
08:25kwladykanoidi, mmm i can do like that but is it really like i should do?
08:25justin_smithkwladyka: in general you don't need to make lists at all
08:26kwladykait is so confuse :)
08:26justin_smithkwladyka: some functions have good reasons to return lazy-seqs
08:26justin_smithkwladyka: for literals, use a vector. If you need something to prepend to the front, you can use seq to get a data type that does that.
08:26justin_smithotherwise, vectors are better
08:27kwladykahmm so you never use list for data?
08:27justin_smithnot for literals
08:28justin_smithonly use a list if you need to remvoe or add items at the front
08:28kwladykajustin_smith, ok thank you
08:28justin_smithand for that, you can use seq to turn a vector into a list, you never need a list literal except in a macro
08:29kwladykayeah my test working! :)
08:30kwladykaand with this it is time to end learning today, I am enough happy with progress today :)
08:45tcrawleyexpez: non-SNAPHSOT releases to clojars are immutable, even if you don't promote them
09:30expeztcrawley: it would be nice to be able to correct mistakes :(
09:31expeznobody can download a non-promoted non-snapshot release, right?
09:32tcrawleyno, anybody can download it. you have to add a new repo to download promoted releases, which no one does, because 90% of projects aren't promoted
09:32tcrawleythe promoted repo isn't really used at all
09:32expezI see
09:33tcrawleyso allowing replacement of releases reopens a can of worms that allows silently changing artifacts that may be in use
09:34expezyeah, it makes perfect sense now that I know how it works :p
09:34tcrawleygood deal
09:41puredangertcrawley: it
09:41puredangertcrawley: it's like you're saying that immutable data is a good thing
09:41tcrawleyI know, right?
10:45csd_Can amnyone provide advice on debugging Cider when symbol lookup fails? I.e. for docs lookup. I'm not getting an error other than symbol not found
11:06nattois there an idiomatic way to dedupe function code across several files, if the code is identical, but references a namespace local?
11:06nattohere's a toy example: http://pastebin.com/J2yFmQCG
11:10mmeixby putting it in a utils.clj namespace and referring it?
11:12nattommeix: how do you do it, if the function refers to like an atom defined in the file that refers utils.clj?
11:12mmeixah, sorry
11:15mmeixwould (defn utils/shorthand-get-id [some-atom] (:id @some-atom)) work?
11:15mmeixnot sure, if this is the intent though
11:16nattommeix: yes it would, but then it stops being a shorthand
11:16mmeixsorry for (defn utils/...
11:16mmeixI see
11:22mmeixI think, in your example my-atom needs a def
11:22mmeix(def my-atom (atom {}))
11:22nattoyou're right
11:23mmeixand then you would refer it by name
11:24nattooh interesting, resolve the atom name at runtime?
11:24mr-foobarI am trying to install lein on a new ubuntu server.
11:24mr-foobarwget http://leiningen.s3.amazonaws.com/downloads/leiningen-2.1.2-standalone.jar <-- 403
11:25irctcHello, I am using https://github.com/xsc/pandect, and I am unable to convert a byte array to string. When i do (println (str my-value)), I get somehting sensible like #bin yfCxXLFMydFZ1XC5PRuSXzNe3u6yLY3X1gqM5IjHxSE=. I want it without the #bin = part, is that possible ?
11:25justin_smithirctc: String.
11:26justin_smith,(.getBytes "hello")
11:26clojurebot#object["[B" 0x3a53be08 "[B@3a53be08"]
11:26justin_smith,(str (.getBytes "hello"))
11:26clojurebot"[B@5030944d"
11:26irctcI tried (String. signature)
11:26justin_smith,(String. (.getBytes "hello"))
11:26clojurebot"hello"
11:26irctcbut I get something unreadable
11:27justin_smithirctc: looking at what you pasted above, that looks like base64?
11:27irctcI tried that too, specifically I use sha256-hmac-bytes
11:28irctc@justin well I'm not sure. I don't use base64 myself
11:28irctcI just use plain text
11:29irctcthe thing is, sha256-hmac gives me a string, but not the same as in (println (str sha256-hmac-bytes ..))
11:30irctcBut I can't seem to find how to get only the string (without #bin ) when using sha256-hmac-bytes, which is otherwise the correct string
11:30justin_smithirctc: what is the type? if it prints as #bin, that's not a byte-array
11:30irctcooh I thought it was a byte array
11:31irctcbut yes it's probably not
11:31irctci have an exception on .getBytes
11:31justin_smithirctc: well, there is this function "type" which will tell you what the type is, then you can figure out what you can do with that value
11:32justin_smith,(type (.getBytes "hello"))
11:32clojurebot[B
11:32irctcThanks :)
11:32irctcyes the type is [B
11:33justin_smithin that case (String. v "encoding") will correctly give you the value as a string, though you may need to find the right value for encoding
11:33irctchmm I tried UTF-8 already
11:33justin_smithirctc: https://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html
11:33irctcIs it the default in Clojure ?
11:34justin_smith,(String. (.getBytes "hi ¬ˆ˚™£") "UTF-8")
11:34clojurebot"hi ¬ˆ˚™£"
11:34justin_smith,(String. (.getBytes "hi ¬ˆ˚™£") "IBM00858")
11:34clojurebot"hi ┬¼╦å╦ÜÔäó┬ú"
11:34irctcOk I'll try some encodings then
11:34mmeixnatto I think you can do (:id @one/my-atom) in core and don't need a getter function
11:35mmeix(justin correct me, if this is nonsense :-)
11:35irctcOOh no I forgot : I get No matching field found: getBytes for class [B
11:35justin_smithmr-foobar: you should be downloading the lein script, and it will find the standalone
11:35justin_smithirctc: it is bytes, why getBytes from it?
11:36irctcHmm right sorry.. :)
11:36justin_smithI am just using .getBytes on a string because that is a convenient way to make a byte array with known contents
11:36irctcOk I get that thanks
11:37mmeixnatto also you could do just (def my-atom (atom {:id 1})) in one.clj
11:37mr-foobarjustin_smith: the lein script is throwing the error. its a new ubuntu server, so I am running an automated script "wget --no-check-certificate -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein&quot; followed by `lein new ...` using salt.
11:37nattommeix: right, but the shorthand function is of arbitrary complexity
11:38justin_smithmr-foobar: oh, odd, why is it trying to use such an old version?
11:38nattoi have a workaround, i think it is ugly, but i don't know how else to do it
11:38TimMcmr-foobar: Yikes, why --no-check-certificate ?
11:39mr-foobarTimMc: lulz .. yeah bad copy-paste.
11:39mmeixnatto but you can refer to the atom directly by namespace/name and then extract things from it in core as complicated as you want, I think
11:39justin_smithmr-foobar: look at the first few lines, it should be trying to get 2.5.1 https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
11:39nattoin utils.clj, you (declare shadow-my-atom) (defn bind-atom [a] (def shadow-my-atom a)) (defn shorthand-fn [] (... use shadow-my-atom))
11:39nattoand use that in the other clj
11:40mmeixI think this is too complicated
11:41irctcSorry to ask again.. isn't [B a Byte Array ?
11:41justin_smithirctc: yes
11:42nattommeix: in a more elaborate example you'd store config (e.g. POST endpoint URL) in an atom
11:42justin_smithand to make a string from a Byte Array, you use the String constructor (with optional encoding argument)
11:42nattoand say you defn a submit-to-server that reads which endpoint based on the config atom
11:42mmeixwouldn't your last defn just be (defn main [] (prn (str "one's id " (:id @one/my-atom) ", " "two's id " (:id @two/my-atom)))) ?
11:42csd_Is it possible to break up dependencies into two separate vars in project.clj, and then have :dependencies (merge deps_a deps_b), or similar?
11:42justin_smithcsd_: this is what profiles do
11:43irctcok thanks there is something that I miss obviously.. I'll be back :p Thanks
11:43justin_smithcsd_: and yes, project.clj can run arbitrary clojure code, though it's often a bad idea
11:43nattommeix: my toy example was too simple, indeed in the toy case it's best to just read the value directly like you wrote
11:43csd_justin_smith: i'm working on a project where i need to import deps for the platform which is being imported a jar and id like to distinguish between project and platform deps.
11:44csd_profiles dont strike me as the right choice in this case
11:44justin_smithcsd_: yeah, that sounds like a profile (eg. define one profile per platform and run with said profile merged?)
11:45csd_hmm ill take a closer look at how they work
11:45justin_smiththough if you really need the flexibility you can absolutely use arbitrary clojure code to construct your :dependencies vector
11:45csd_its more just a clarity thing than a flexibility thing
11:45justin_smithbut the default usage of profiles is to merge things, so go with that if you can
11:45mmeixnatto I'm not sure I understand correctly, but why would you store config data in different atoms in different namespaces? I guess I didn't understand the use case
11:45csd_seems cleaner to split it out
11:48nattommeix: better example http://pastebin.com/x5ZQxKra
11:48nattoi have not actually tries this, it doesn't look right, but it does work in clojurescript
11:49nattoi.e. re-binding the atom into another namespace and deref-ing it there
11:49justin_smithnatto: what do you gain by defining an atom in the client ns, rather than simply swapping new values into an atom created in the util lib?
11:49mmeixthis is what I'm wondering too
11:50justin_smithnatto: I can tell you what you lose - if other libs also want to use the util lib, the last one to access it in such a way "wins" and destroys all other config
11:50justin_smithnatto: if the util namespace owned the atom, you could at least have cooperative setting of the config
11:51nattojustin_smith: points taken. I can forgo the atom usage example
11:51mr-foobarjustin_smith, TimMc: it works ! the bash script was old.
11:51justin_smithalso, I can't see anything in the code as it is that meaningfully uses the feature of an atom - it may as well just be a top level map instead
11:51mmeixthe battle of the confs :-)
11:51nattothe problem is i'm trying to reuse e.g. the "handshake" code in utils
11:52nattoor any other function, sans the arguments
11:52mmeixthis seems to much object thinking, I guess
11:52mmeix!to be
11:53mmeix*
11:53nattosort of
11:53nattoyou can write a util/useful that takes an argument, which you have defined in the referring namespace
11:54nattobut after enough calls I get lazy and I write an argument-less version called "shorthand"
11:54justin_smithnatto: with an atom, use swap! to cleanly set keys. defining something from outside the namespace is never a good idea
11:54natto... but now I want to use "shorthand" without redefining across files
11:54mmeixwhy do you need "shorthand" in the first place?
11:55mmeixif it's just a function to extract a value, you can write it once and use it everywhere
11:55justin_smithnatto: also, the right way to do OO style config in clojure is stuartsierra/component, not top level atoms
11:55justin_smithit also happens to be the right way to do functional style config too
11:56mmeixa config is just a map in a defined place, right?
11:56nattoah yes. this is really example fail on my part
12:00mmeixnatto by the way, if you need an "argument-less" version of a function, you can use 'partial' (if that is what you want)
12:00mmeix,(doc partial)
12:00clojurebot"([f] [f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & ...]); Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args."
12:01mmeixbut I guess, this is not what you meant
12:02mmeixmmeix shutting up and returning to newbie status :P
12:02nattommeix: actually, that might be the best route, let me think about it
12:02nattobut let me give one more try at explaining my use case
12:03nattoin ns.util you've a (defn bunch-of-stuff [some-value] ... )
12:03nattoin ns.one you have (def my-ns-global ...) and use a lot of (util/bunch-of-stuff my-ns-global)
12:03nattoin ns.two you have (def my-ns-global ...) and use a lot of (util/bunch-of-stuff my-ns-global)
12:03nattoyou get lazy, and in ns.one you (defn bunch-of-stuff-using-global [] (util/bunch-of-stuff my-ns-global))
12:03nattobut can you somehow define bunch-of-stuf-using-global already, and use it in ns.two referring to two/my-ns-global?
12:04nattommeix: doing the partial means defining the partial in util
12:04nattothen in ns.two, (def bunch-of-stuff-using-global (partialed-bunch-of-stuff my-ns-global))
12:04nattoand that completes the "shorthand"
12:04mmeixuff
12:05nattobut can we skip that altogether even?
12:05mmeixquite long hand ... ;-)
12:06mmeixI'm still not understanding, why you would need all those "getter" functions
12:06nattothey're not getter functions, they have arbitrary complexity
12:06mmeixbut maybe I'm a bit brain dead after a day full of exams here
12:07mmeix(here is Vienna music univ)
12:08mmeixnatto forget about the partial thing, it was just on a side note
12:10nattommeix: at the moment it seems like partial would save me the most typing actually
12:13mmeixbut I'm under the impression, that managing global config is more of a structural problem
12:15mmeixand several namespaces fighting for dominance over a app state seems confusing, at least
12:15nattook, so I'm designing interactive psychology experiments that have e.g. different appearances
12:15nattobut lots of the core logic is shared
12:15mmeixok
12:15nattoI've set up profiles.clj to compile a version based on the CLI switch
12:16nattoso a different clj file gets included at compile time
12:16mmeixah ...
12:16nattothen I put the shared code into a different file
12:16nattoso each variant of the experiment has a global state atom
12:16nattoand I want to call things like (update-state) instead of (update-state my-state)
12:17csd_How can I debug why JARs aren't loading properly into my project? The error message lein gives me is very unhelpful
12:20mmeixnatto I guess you would have to ask the wise here (maybe with a real example), I'm not that fluent to give a helpful answer in this case (but I tried :)
12:37nattommeix: partial works great, thanks
12:37mmeix:-)
12:38nattojustin_smith thanks for the link
12:38gfredericksdoes anybody know how cider-inspect works?
12:38gfredericksI'm using cider 0.9.0 so I assume it's supposed to work
12:40gfredericksI run M-x cider-inspect on a symbol and get an error flashed in the minibuffer like: error in process filter: Wrong type argument: char-or-string-p, ("Class" ": " ("value" "java.lang.String" 0) ("newline") "Value: " "\"#object[clojure.test.check.rose_tree.RoseTree 0x54a26423 \\\"clojure.test.check.rose_tree.RoseTree@54a26423\\\"]\"")
12:40gfredericksmaybe it's those dang deftypes
12:42gfredericksyeah now it just hangs because the object is sooper big
12:42gfrederickswhich I thought was one of the use cases for the inspector o_O
12:52PupenoI feel I'm missing something here, but deploying Luminus to Heroku and make it connect to PostgreSQL seems non trivial as Luminus cannot pick up DATABASE_URL. I could write the code to do that, but am I the first one to try this?
14:43PupenoWe may be adopting clojure at my company. Any recommendations on a book for the devs that are not familiar with any lisp at all?
14:44pbxPupeno, i've enjoyed the o'reilly book - http://shop.oreilly.com/product/0636920013754.do
14:44pbxit makes a lot of references to the popular dynamic languages (python, ruby) which helps many people
14:47Pupenopbx: I think I'm sold, as my team knows python and ruby (one of our working languages) very well.
14:50PupenoOh, it's from 2012... still ok?
14:50eriktjacobsenPupeno: https://leanpub.com/fp-oo
14:51pbxPupeno, i'm told it is, yes
14:51JickelsenTrying to use aget to access properties in React. Are there any gotchas I might've missed? (aget js/React "addons") returns nil, and I am including react-with-addons.js in the body before my compiled javascript
14:51eriktjacobsenit isn’t specific to clojure, but uses clojure as the example language. It is supplementary to learning clojure books, but it is better for the “mindset shift” from non function nonlisp programmers
14:51dnolenPupeno: still OK, Clojure hasn't fundamentally changed significantly in this time.
14:52dnolenand honestly likely to be ok for years to come
14:52dnolenJickelsen: there's a #clojurescript channel
14:53Jickelsendnolen: Thanks!
14:54PupenoOh, this looks interesting: https://pragprog.com/book/cjclojure/mastering-clojure-macros
14:54hellofunkPupeno: Joy of Clojure is also a good book
14:55Pupenohellofunk: that's what I read, I still have the first edition. I felt that some parts of the book were only clear to me because I been toying with Common Lisp and Scheme for years though.
14:55dnolenBronsa: so it appears I can use cljs.tools.reader to read all of core.cljs, the main thing I had to change was that read-keyword just seems wrong on master (for the obvious reason that resolve-ns and *ns* are not yet a thing in a ClojureScript release.
14:56dnolenI fixed this by just copy-pastaing read-keyword from Clojure version into ClojureScript version
14:56PupenoAnybody read Living Clojure? http://shop.oreilly.com/product/0636920034292.do
15:01mmeixit's a friendly book for beginners, I find
15:02PupenoIt covers ClojureScript, which we do want to use.
15:03jonathanji don't suppose there is a (format) syntax for converting keywords into names?
15:04mmeix,(name :foo)
15:04clojurebot"foo"
15:04mmeixhttps://clojuredocs.org/clojure.core/name
15:05jonathanjso not then
15:07mmeix(I misunderstood the question?)
15:09kwladykato learn something more I repair bug in https://github.com/cryogen-project/cryogen but I am not sure how to do that in Clojure, because I want repair this in https://github.com/cryogen-project/cryogen-core which is dependency but I need whole project to test it is working.
15:09kwladykaHow to tell Clojure to use version from my disk during development?
15:12mmeixtrying
15:12mmeix,(format "Hey, %s" (name :foo))
15:12clojurebot"Hey, foo"
15:24sdegutisTo compare two #inst's do you just use java.util.Date methods?
15:32sdegutisYep. Thanks.
15:36gfredericksas long as #inst is a java.util.Date in your system
15:55jonathanjshould i pass a reader to a function? should that function use (with-open) or should the outer function do that?
15:56jonathanji guess if the outer function does that, then i can avoid closing the reader before the lazy seq is fully consumed
16:09justin_smithjonathanj: generally, if you are doing lazy processing of any sort on the input, the innermost stage that knows whether you are done or not should also be in charge of closing the input.
16:09justin_smithjonathanj: you also don't have to use with-open, you can explicitly call close, and sometimes that is called for
16:09kwladykahow to change in procjt.clj :dependencies [[cryogen-core "0.1.22"]] into version on my harddrive?
16:10justin_smithkwladyka: you may want a lein checkout (see "lein checkout dependencies") but it's more reliable to use lein install to update the lib, and then use the locally installed version
16:11justin_smithbut a checkout might be called for if you are doing extensive work in both the lib and your app together
16:11kwladykamy goal is to fix a bug inside cryogen-core
16:11justin_smithkwladyka: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md#checkout-dependencies
16:12justin_smithbut it might be easier to fix cryogen-core within that project using unit tests
16:12kwladykamaybe but only one way to be sure it works is test it in real situation
16:12justin_smithkwladyka: either way, if you change the version string in the cryogen-core project.clj then use lein install, you can then use that version in your app locally
16:13kwladykayes, it can be one of option, but it can make some conflicts later
16:14kwladykai guess
16:14justin_smithkwladyka: to use it locally, lein install is the easiest option. You can use a checkout, but lein install is the first step of using a checkout, so...
16:15kwladykahmm i am working on windows and i don't have symlinks :P
16:15justin_smithoh man, that sucks
16:15kwladykayes i know
16:15kwladykamany things on windows sucks... next time i will buy mac
16:16justin_smithhave you considered using an ubuntu vm to develop in? even on a mac the folks on my team like to use ubuntu under vagrant for some stuff
16:16kwladykain my country macs are more expensive then everywhere.... it is consequence of history and war, they just didn't change it after war
16:17kwladykait is a little complicated
16:17justin_smiththat sounds very frustrating. Maybe you should save up for a trip to the clojure conj and buy a mac while you are here in the US
16:17kwladykabut it was the reason why I didn't buy mac as a protest of this absurd
16:18justin_smithyeah, makes sense. I use linux instead, unless I need a mac for work (and work pays for it)
16:18kwladykajustin_smith, i were using vagrant a few years ago for a while and instead of coding i was loosing time on manage vagrant and system...
16:19justin_smithoh, I never had to spend much time managing it. Probably because I forget how hard linux was at first.
16:19kwladykamaybe something changed, but few years ago it has too many complication
16:19kwladykai had many problems with things which weren't work on linux if i used vagrant, on clear linux works
16:19kwladykabut it was a few years ago
16:20kwladykaand even i don't remember what it was
16:20kwladykaofcourse for everything i could find a solution
16:20kwladykabut still i loosing time
16:20kwladykai spent aobut 7 years on linux in the past
16:21kwladykabut one day a decided back to windows, because linux always sucks with drivers and conflicts
16:21kwladykafor desktop
16:21kwladykabut windows is terrible for coding...
16:22TimMcI've been on Linux for the past 10 years. For the past 6 I haven't had serious driver issues.
16:23kwladykabut for desktop? i don't believe, i guess even now if you buy newest hardware linux wouldn't work with that
16:24TimMcLaptop.
16:24justin_smithkwladyka: I have had very few conflict or driver issues with linux - the exceptions being new hardware and unstable software
16:24kwladykafor my experience linux never works with new hardware
16:24justin_smithmy solution was to buy a laptop with linux pre-installed, set up explicitly to run linux
16:24TimMcThinkpads tend to work very well with Linux.
16:25kwladykai have my own PC, i made it myself with hardware which i choose
16:25TMAkwladyka: the steps for flawless experience are: be friends with Linux kernel developers. ask them what laptop they have. buy the exact same one
16:25kwladykaand linux totally didn't have drivers for that hardware
16:26TimMcOr dual-boot. :-P
16:26kwladykaheh, i will just buy a mac next time :)
16:26justin_smithkwladyka: I think it's a little rough to blame linux for not supporting random hardware. I mean, it's not like the hardware vendors put any effort into making their shit work with linux.
16:26kwladykai am a little sceptic about changes in linux
16:26TimMcTMA: Alternative plan: Give your favorite Linux kernel developer a "gift" of some hardware. ;-)
16:26justin_smith(inc TimMc)
16:27kwladykajustin_smith, of course but windows have drivers
16:27TMATimMc: that's twice as expensive and not at all guaranteed to work
16:27justin_smithkwladyka: because the hardware vendor wrote those drivers
16:27kwladykajustin_smith, yes - that is the point
16:27kwladykajustin_smith, everything support windows, not linux
16:29kwladykabut last time when i used linux was... mmmm... 5-7 years ago
16:29justin_smithkwladyka: I have a laptop at home that has 32 gigs of ram, supports 5 external monitors, up to 4k resolution, has high quality built in audio, wifi, bluetooth, etc. etc. and it all worked with linux with 0 setup on my part, because I bought from a company that specilizes in making machines to run linux on. It's a couple years old now and the specs are still good.
16:30justin_smithkwladyka: still cheaper than a mac with worse specs
16:30kwladykamaybe things changed, when i was using linux in my country it was almost impossible to buy good laptop with linux.
16:30katratxojustin_smith: which company is that?
16:31kwladykajustin_smith, so don't you have MAC?
16:31csd_Is there a function that will return the methods of an instantiated java object in clojure?
16:31kwladykain USA you have always things faster, because you produce most of them :P
16:32TimMckwladyka: Which is funny, because they're not even made here.
16:32justin_smithkwladyka: I use a mac at work, because they expect me to use one (and gave me one to use), I just leave it on the desk in my office
16:32kwladykaTimMc, yes, exactly
16:33justin_smithcsd_: bean works for some stuff, otherwise there is clojure.reflect
16:33justin_smith,(bean (java.util.Date.))
16:33kwladykajustin_smith, why? i don't have too much experience with mac. Only basic.
16:33clojurebot#error {\n :cause "denied"\n :via\n [{:type java.lang.ExceptionInInitializerError\n :message nil\n :at [java.lang.reflect.Proxy$ProxyClassFactory apply "Proxy.java" 672]}\n {:type java.lang.SecurityException\n :message "denied"\n :at [clojurebot.sandbox$enable_security_manager$fn__835 invoke "sandbox.clj" 69]}]\n :trace\n [[clojurebot.sandbox$enable_security_manager$fn__835 invoke "sandbo...
16:33justin_smithit won't let me make a bean :(
16:34blkcatmacs are pretty great when you're not the one paying for it ;p
16:34TimMcjustin_smith: Error: Dates are not a type of bean, they're an entirely different family.
16:34justin_smithTimMc: it works locally, it's a clojurebot thing
16:34csd_justin_smith: for the class i used it on. it just returns {:class <classname>}
16:34justin_smithoh, sorry, vegetable joke, of course
16:34justin_smithcsd_: yeah, there is clojure.reflect for the rest
16:35TimMccsd_: org.timmc/handy has some reflection stuff
16:35csd_ok-- id been looking at the java reflection libs and doesnt seem like it has anything
16:35justin_smithcsd_: but java.util.Date is a good demo of what bean can do in the best case
16:35TimMcDo you just want it for development/debugging?
16:35csd_debugging
16:35csd_having trouble instantiating something
16:35justin_smithcsd_: oh, it has *EVERYTHING*, and none of it is easy to use (but the TimMc stuff helps)
16:35TimMcorg.timmc.handy.repl/show
16:35kwladykado you thing lein checkout can work with direcotry with project instead of symlink ? ;)
16:35kwladyka*think
16:36justin_smithkwladyka: couldn't hurt to try
16:36kwladykajustin_smith, yes, i am trying to do that :)
16:36TimMchttps://gist.github.com/timmc/1cd194b6ac5980a8c548
16:36justin_smithkwladyka: but as I said, lein install works too (as does loading the edited source code in your repl, even from inside a different project)
16:36csd_TimMc: sounds like what i need
16:36csd_thanks
16:36justin_smithkwladyka: you don't need symlinks or subdirs for lein install to work
16:37kwladykajustin_smith, i will try this if checkout fails
16:37TimMcI use this thing constantly. One of tehbetter things I've hacked together. :-P
16:37justin_smithkwladyka: remember checkout won't work unless you run lein install with your modified project.clj version string
16:38csd_TimMc: Can I just make it a dep in my profile?
16:38TimMccsd_: Yeah, in profiles.clj :user :dependencies I have [org.timmc/handy "1.7.0"]
16:39csd_cool
16:39TimMcso it's available in all my REPLs
16:39TimMcthat and criterium and tools.trace :-P
16:41kwladykajustin_smith, i am not sure how is it working or it doesn't work without symlink...
16:41kwladykai created checkouts, put there crygoen-core
16:42kwladykachanged there version number and changed in :dependencies in main project.clj
16:42justin_smithkwladyka: first step is to modify the version string. Next, run lein install so that version is available in the local repo. Then put the symlink (or repo?) into your checkouts subdir
16:42kwladykalein install from subproject or project?
16:42justin_smithsubproject
16:42kwladykaso what checkouts gives?
16:43kwladykait is the same like run that separate?
16:43justin_smithkwladyka: when you edit the code, the edited code is visible to your repl for reload
16:43justin_smithwithout having to restart the repl, or manually load the code
16:43kwladykabut after each change i have to do lein install?
16:43kwladykais it work with lein ring server?
16:43justin_smithno, the point of checkouts is that you don't have to install
16:44kwladykaso why do i need this first time? how is it working?
16:44justin_smithit can't fulfill the checkout dep unless you run lein install so that it can find the pom
16:44justin_smiththat's because checkouts are fundamentally a hack
16:45justin_smithbut after that it should just work (until you change the version)
16:45kwladykajustin_smith, oh, now i think i understand
16:45kwladykajustin_smith, if it is a hack
16:51csd_TimMc: why do you think i might be getting told no method found for <x> when i've confirmed that the method i'm trying to use does exist, is public, and that i'm using the correct function signature
16:51csd_i don
16:51csd_err
16:51kwladykammm how can i debug project with lein ring server. I want just see what is under variables, unfortunetly (ptrinln foo) doesn't show anything in console, i am not sure why
16:52TimMccsd_: Any primitives involved? Varargs? static/instance?
16:52TimMcMaybe post the method signature and the call you're trying to make.
16:53csd_public CompiledScript compile(String js, boolean debug) throws InvalidJsException
16:53csd_just trying to call (.compile obj "foo" true) , basically
16:56TimMcLooks fine, yeah.
16:57csd_meanwhile I'm told IllegalArgumentException No matching method found for class, and yet i can look it up just fine with your code and see that that method does in fact exist
16:57justin_smithcsd_: is it varargs?
16:58csd_no
16:58justin_smithdoes it take an int?
16:58csd_a string and a bool
16:58justin_smithwhat's the class?
16:58csd_its just a business object
17:00csd_there's this guice code scattered through the codebase, making it difficult to know what's going on, but i don't think it's affecting this particular code
17:00TimMccsd_: Freaky. Does the exception tell you what types it thought you were trying to use in the call?
17:01justin_smithTimMc: matching method not found never does that
17:01justin_smithbecause methods are dispatched by arg types
17:01TimMcaw
17:01csd_http://pastebin.com/aaVxCVR6
17:01TimMc,(.flurb "" 5)
17:01clojurebot#error {\n :cause "No matching method found: flurb for class java.lang.String"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "No matching method found: flurb for class java.lang.String"\n :at [clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]}]\n :trace\n [[clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]\n [clojure.lang.Reflector invokeInstance...
17:01csd_that's the error
17:02TimMcGhosts.
17:02justin_smithsame error with real method but wrong types
17:02justin_smith,(.getTime (java.util.Date.) "foo")
17:02clojurebot#error {\n :cause "No matching method found: getTime for class java.util.Date"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "No matching method found: getTime for class java.util.Date"\n :at [clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]}]\n :trace\n [[clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]\n [clojure.lang.Reflector invokeInstance...
17:03TimMcjustin_smith: Right, I guess it can't decide what the relevant ancestor of each argument's class is.
17:03TimMc(Is 5 an int, an Integer, or an Object?)
17:05csd_yes
17:07TimMccsd_: Can you try invoking the method via reflection? Here's an example with String.indexOf: (.invoke (.getMethod String "indexOf" (into-array Class [String])) "foo" (into-array Object ["o"]))
17:08TimMcUse Boolean/TYPE for the boolean class.
17:08csd_ok one sec
17:09TimMccsd_: (.invoke (.getMethod YourClass "compile" (into-array Class [String Boolean/TYPE])) obj (into-array Object ["foo" true]))
17:09TimMcsub in YourClass and obj
17:10csd_(.invoke (.getMethod ApiJsCompiler "compile" (into-array Class [String Boolean/TYPE]) c (into-array Object ["foo" true]))) ?
17:11TimMcyeah
17:11TimMcYou might try the getMethod separately at first, of course.
17:12csd_says no such method
17:12TimMcAnd alternatively try replacing ApiJsCompiler with (class c)
17:12TimMc(just in case there are two versions of the class in play)
17:13csd_same error
17:13TimMcFascinating.
17:13csd_words you dont want to hear :-P
17:14TimMcThis is using *almost* the same code as produced that printout for you from handy/show.
17:15justin_smithcsd_: do you find anything at all similar if you just use reflection to look at all the methods of the object?
17:16csd_I think I just figured it out
17:16csd_(show ApiJsCompiler) says for this method pub compile : String -> CompiledScript
17:17justin_smithno boolean arg?
17:17csd_so then i tried not including the boolean and it its still throwing an exception but it's an exception thrown by the function
17:17csd_so its ignoring the boolean arg i guess
17:17TimMcWhere did the boolean come from?
17:17justin_smithsounds like there is no public method that takes the boolean
17:18csd_TimMc: it's called 'debug' and this is legacy code i just started working on
17:18TimMccsd_: Oh... I thought the method signature you gave previously was the output of show.
17:18csd_no that was copied from the java code
17:18TimMcAh.
17:18TimMcSo you're probably not working with the same version of the codebase or something like that.
17:19csd_that could be potentially
17:19csd_i'm working off jars that someone else put together
17:20csd_thank you TimMc, justin_smith. good lessons for the future
17:20TimMcSuch as not trusting the source? :-P
17:20csd_trust nothing
17:20TimMc(Don't trust the REPL either. Don't trust anything.)
17:20TimMc(inc csd_)
17:20justin_smith(dec lazybot)
17:21TimMc(dec lazybot) ;; amalloy_ it done broke
17:21TimMcEspecially don't trust bots.
17:25lodin_Some years ago multimethods were (claimed) to be slow. Is that still true, if it ever was? My Java benchmarking skills are rather poor, so I don't trust my own observations, but it doesn't seem like the performance is that bad.
17:27justin_smithlodin_: bad is always relative to some need, go ahead and use multimethods, and if you have a performance problem just remember they are one thing you could look out for. They are slower than a regular function call (slightly), or a protocol invocation (by a bit more), but they are likely just fine for a typical use case
17:32lodin_justin_smith: I know this question is flawed, but would you dare to guestimate in what range the increase in execution time would lie if all functions were turned into multimethods with only one implementation (:default), in a (pure) non-trivial data transformation application?
17:33lodin_justin_smith: 1%? 10%? 100%?
17:33TimMclodin_: I think that would be a fun exercise with a shell script.
17:34TimMcYou could take an existing codebase and transform it to that.
17:34justin_smithlodin_: the flaw is that it's a change in the time it takes the thing to dispatch - normally that is only a small percentage of your execution time, but that totally depends on your method and what all it is trying to do
17:35justin_smithso the bigger your methods are / the more intense the calculations they must do, the less expensive (relatively) the dispatch is as a percentage of your runtime
17:35lodin_TimMc: Maybe even just refer my own defn after the ns form.
17:35justin_smithlodin_: check out criterium, it really helps for this kind of micro-benchmarking stuff
17:36justin_smitheg. compare calling a function vs. using a multimethod, where both have the same body and do some configurable amount of work
17:38lodin_justin_smith: OK, thanks. I'll check it out.
18:13cflemingCan anyone recommend a good IRC channel for diagnosing Java certificate issues? I have a new cert which the JVM isn't trusting, and it's not apparent why.
18:14justin_smithcfleming: sounds like something someone on ##java would know the answer to
18:14cflemingjustin_smith: Thanks, I'll try that
18:14xemdetiacfleming, did you put all the roots and intermediates?
18:15xemdetiais it signed by Verisign group ca 2 and did you not get rid of the md2 duplicate
18:15cflemingxemdetia: Yeah - I'm on a chat with Digicert, we can't work out why it's failing. SSLLabs says everything is hunky dory, and Firefox likes it too.
18:16cflemingBut JDK 1.6 on OSX doesn't for some reason, even though the CA root cert is in cacerts
18:16xemdetiawhat is the CA
18:16cflemingDigiCert
18:16xemdetiayeah welcome to the md2 problem
18:16cflemingWhat's the md2 problem?
18:16xemdetiawhat is the full CN of the root you had it signed by
18:16xemdetiaverisign had an old certificate that they had to reissue because it was signed by md12
18:17xemdetiabut some javas have it lying around in a keystore
18:17xemdetiaor worse have both entries
18:17TimMc##java? Good luck; don't die.
18:17xemdetiabut give me the full CN and I can tell if it is the same one
18:17xemdetiaor dpaste a full cert verify
18:17cflemingHow do I get a cert verify?
18:18xemdetiais it publically accessible?
18:18cflemingYeah, it's on https://cursiveclojure.com
18:19cflemingIt's an EV cert, according to DigiCert it seems to be set up correctly.
18:19xemdetiaokay so it is not the md2
18:19xemdetiathere is another digicert that goes through verisign for some reason
18:20xemdetiadid you store the leaf, intermediate and root to be served by your https server in the keystore
18:21cflemingIn which keystore? This should be trusted by the JDK
18:21xemdetiaBoth the root and the intermediate are really new, it's possible jdk 1.6 on osx just doesn't know it exists
18:22cflemingIt does have the DigiCert High Assurance EV Root CA
18:22xemdetiabut does it have the intermediate
18:23cflemingThat's a good question
18:23cflemingDoes it need it? Surely it only needs to know the root and then it can follow the chain?
18:24xemdetiacfleming, validation of certificates is a client side act
18:24xemdetiaif it doesn't have the intermediate, or the server does not send it
18:24xemdetiait can't complete the chain of trust/integrity
18:24cflemingThe server should be sending it
18:24TimMccfleming: It needs everything but the root. (And the root needs to already be in your truststore.)
18:25cflemingI'm pretty sure the server is sending the intermediate, how can I check that?
18:25xemdetiait's often easier on the server side to just make your own keystore that is only the certificates that actually matter
18:25xemdetiaand just tell java to use that
18:26cflemingUnfortunately I'm not using Java on the server, it's nginx
18:27xemdetiasame difference
18:27xemdetiacat a bunch of pem's together
18:27xemdetiasame as a keystore
18:27cflemingI've done that.
18:27xemdetiadoes java osx know how to do sha256
18:28xemdetiaduring verify for that version
18:28xemdetiaI don't know how old is old
18:29xemdetiayeah it is not sending the intermediate
18:30cflemingHow can I see that?
18:30xemdetiaopenssl s_client -connect www.cursiveclojure.com:443 -showcerts
18:31xemdetiaIt's only sending me the first certificate- compare that output to just good ol' openssl s_client -connect www.google.com:443 -showcerts
18:31TimMcI'm a little alarmed that Digicert's support didn't point this out.
18:32xemdetiabe warned s_client will return bad verifications in nearly every setup even if it is working
18:32cflemingTimMc: When I started chatting to them an hour ago, he said the intermediate was being sent
18:35xemdetiacfleming, it's entirely possible something got touched but I certainly am not seeing it
18:35xemdetiaopenssl s_client -connect -showcerts is the command of the hour
18:36cflemingDigiCert have an SSL checker which claims it's being sent: https://www.digicert.com/help/index.htm?host=cursiveclojure.com
18:36cflemingAlthough I tend to believe openssl
18:37xemdetiaI'm confused, there's nothing on that page that indicates to me that it is being sent
18:37xemdetiaI think this is one of those cases where the DigiCert SHA2 Extended Validation Server CA is now commonly accepted to be in trusted keystores and just isn't for OS X java 7
18:38xemdetiajava 6*
18:38xemdetiaI mean it is in my firefox ETS
18:38xemdetia*ESR
18:40cflemingThat sounds like the problem. So instead of sending my public crt, I should be sending a PEM consisting of that and the intermediate?
18:40xemdetiacfleming, yes- http://nginx.org/en/docs/http/configuring_https_servers.html it looks like there is a part just for you under the heading SSL certificate chains
18:41xemdetiaI apologize for getting my ##openssl in your #clojure :)
18:42cflemingI should be apologising, it's all my fault :-)
18:42cflemingThanks xemdetia, that was amazingly helpful.
18:42xemdetiafor further certificate issues ##openssl isn't a bad place for me to accidentally help
18:43xemdetia:)
18:44cflemingI'll be sure to ask there next time :-)
18:58cflemingxemdetia: That's fixed the problem - thanks! It's much appreciated.
18:58xemdetiaanytime
20:24thearthuris there a type specific java array producing convenience for strings ala int-array or byte-array?
21:26cryptackhey, I tried this question in the past, but was unable to get much help…I have an odd issue on my Mac where tab completion isn’t working in the repl (using Leiningen 2.5.1 on Java 1.8)…anyone else experience this issue?
21:29andyf_thearthur: make-array can create an array of any desired Java object type
22:24tmtwdin clojure, how would we call the function artist.draw();?
22:24tmtwd(draw artist) would be the equivalent of draw(artist);
22:36gfrederickstmtwd: that's a lot of the difference between OOP and FP; you write a function instead of a method on a class
22:36tmtwdi see
22:37tmtwdbut what if you are interoperating with javacode?
22:37gfredericksoh well then
22:37gfredericks(.draw artist)
22:37gfredericks:)
22:37gfredericks"java interop" is special in a few different ways in clojure
23:04mindbender1I'm having difficulty importing goog.History. How can I achieve this. (ns foo.baz (:import [goog History])) does not achieve this.
23:31justin_smithmindbender1: in cljs you can actually require js libs
23:33mindbender1justin_smith: I want to be able to use it like (History.) but I was not able to achieve this.
23:34mindbender1I had to do (:import goog.History) before it could even pull it from the jar.
23:35justin_smithif (:import goog.History) worked, I am surprised that (:import [goog History]) did not
23:35mindbender1I'm even more so.
23:36mindbender1Unless it's working right now at your end?
23:36justin_smithI have a project where I use the (:import goog.History) version, I am going to try it with the other right now
23:37mindbender1Cool. I'll be pleased to here your situation.
23:37mindbender1*hear
23:37justin_smithdoes it fail on cljsbuild, or on page load?
23:38justin_smithbecause cljsbuild is not showing me any error
23:39justin_smithugh, this project won't start up normal because I can't access the db, maybe I'll get back to you about it tomorrow
23:39justin_smithsorry
23:40justin_smithdon't feel like setting up a tunnel through work atm
23:46mindbender1justin_smith: okay. No p. I also just observed from the cljs-http project that doing just (:import goog.Uri) is enough to use like (Uri.) right from inside the file but not from the repl.
23:47justin_smithmindbender1: well, it would only work if your repl was in the importing namespace
23:47justin_smithimport is specific to a namespace (maybe you realize this already)
23:48justin_smithmindbender1: also the (:import whatever.what) form only works inside an ns form
23:48mindbender1justin_smith: it doesn't work for me when my repl is in the importing ns.
23:48justin_smithit silently does nothing outside the ns form
23:48justin_smith,(:import 'this-doesnt.exist)
23:48clojurebotnil
23:49justin_smith,(import 'this-doesnt.exist)
23:49clojurebot#error {\n :cause "this-doesnt.exist"\n :via\n [{:type java.lang.ClassNotFoundException\n :message "this-doesnt.exist"\n :at [java.net.URLClassLoader$1 run "URLClassLoader.java" 366]}]\n :trace\n [[java.net.URLClassLoader$1 run "URLClassLoader.java" 366]\n [java.net.URLClassLoader$1 run "URLClassLoader.java" 355]\n [java.security.AccessController doPrivileged "AccessController.java" -2]\n [...
23:50mindbender1I have been trying it out now for several minutes now I guess I'll just use the FQN version.
23:50justin_smith,(import '(java.util Date))
23:50clojurebotjava.util.Date
23:50justin_smiththat's the repl version
23:52mindbender1justin_smith: I suspect it's because the location of that file does not match the segments in the provide symbol.
23:52justin_smithinteresting...
23:52mindbender1whereas a symbol like goog.net.XhrIo does