#clojure logs

2013-09-24

00:01yeoj___tufflax: thanks.
00:01tufflaxyeoj___: np
00:02allenj12hmmmm so my a-star function although messy is working except for a case where it seems to not be calling the else part of the if statement
00:03allenj12if anyonr is interested https://www.refheap.com/18938
00:05dee5Hello, mind if I ask what the idiomatic way of handling errors is?
00:06clj_newb_2345anyone have recommendations of whether to use phonegap or titanium or ... for using clojurescript to do mobile web dev ?
00:18tufflaxallenj12: I don't believe you. :p
00:20tufflaxallenj12: btw you can remove the (if ... true false) around the (= board *goal*) in at-end?
00:22mgaaredee5: what kind of errors
00:25dee5mgaare: I was thinking more of general error handling. One example would be a validation function. The nicest that I've seen so far is: http://adambard.com/blog/acceptable-error-handling-in-clojure/
00:27allenj12tufflax: ahhh kk
00:27mgaaredee5: incidentally for validation there's a pretty nice library for that https://github.com/michaelklishin/validateur
00:27allenj12tufflax: but why is it not filtering the list of it going backwords ahhh!!!
00:28mgaaredee5: but I don't know if there's really such a thing as 'general' error handling
00:31tufflaxallenj12: I don't understand what you mean :P
00:32dee5mgaare: Thanks. Your initial question made me realize that my question wasn't well defined :). That's probably why searching for it didn't turn out too well. Other than that, are exceptions/throwables idiomatic? Or do people prefer error strings?
00:33allenj12tufflax: when i use the test case in the code it moves the 0 to the right then back left over and over again because its not filtering the way it should be in get-queue
00:33mgaaredee5: philosophically, I think exceptions are ok for exceptional cases, in particular when dealing with IO
00:33allenj12when its called in the first line of the second chunk of code in a-sar
00:33mgaarelike if your database connection dies, I think that's an ok time for an exception
00:34glosolihmm what the easiest way to turn all arguments into a vector ?
00:34mgaareglosoli: (fn [& args] (let [arg-v (vec args)])
00:35dee5mgaare: Awesome, thanks!
00:35akurilinDoes anybody have a favorite folder layout for a rest-style ring app? Are any folks using yogthos' compojure-template?
00:36glosolimgaare: thanks sir
00:41tufflaxallenj12: Paste your code again. I don't think I'm seeing the lastest version. This could not possibly work
00:41allenj12tufflax: kk
00:42allenj12https://www.refheap.com/18939 i commented where i thought the problem was
00:43s4muel,(vec '((1 2 3)))
00:43clojurebot[(1 2 3)]
00:44s4muel,(apply vec '((1 2 3)))
00:44clojurebot[1 2 3]
00:44s4muelglosoli: ^
00:45tufflaxallenj12: How can this code work? The opening parens at line 79 and 83 are surely wrong, no?
00:47allenj12tufflax: no there right the 1st one is just daying if were not at the end (first part was to print the end) and the second is if the optional parameter was not passed
00:47allenj12tufflax: sorry i do admit my coding style is atrocious and needs works
00:49brehaut~style
00:49clojurebotstyle is http://mumble.net/~campbell/scheme/style.txt
00:49tufflaxallenj12: I don't believe you, seriously
00:49allenj12tufflax: lol u can try to run it
00:49tufflaxyeah maybe I have to
00:50allenj12tufflax: im rly sry btw ur looking at that mess
00:50brehautallenj12: ^ style above. do not delay
00:50tufflaxbrehaut: look at the opening parens at 79 and 83 and tell me I'm not crazy
00:50allenj12tufflax:there good! lol
00:50allenj12tufflax :P
00:50brehauttufflax: i dont eve what
00:52tufflax"do not delay" actually loling
00:55mgaareallenj12: I did a little reformatting of that paste so it looks more like normally formatted clojure: https://www.refheap.com/75ac8176c680ddc2aee762947
00:56brehautmgaare: good effort
00:57allenj12mgaare: ITS sO beautifuL!
00:59scottjallenj12: I think you can use case for most of your conds
01:00mgaareallenj12: a reasonably stock emacs with clojure mode and a few other things will make it easier to work with
01:00allenj12scottj: yea i realized that to but it works for now when i test in light table so i wanna get my logic straight
01:00allenj12mgaare: ive been using light table lol
01:00allenj12mgaare: i might try emacs again
01:01s4muelparedit will change your life
01:01seancorfieldone way or another... :)
01:03mgaareI haven't really played with light table as an editor... kind of discouraged to do that now :D
01:04`cbpIf I have functions foo and bar which have the same arguments [x & {:as opts}], is there a clearer way to apply foo from bar than (apply foo (apply concat [x] opts)) ?
01:04allenj12mgaare: if it helps i beleive it makes e learn alot faster
01:05allenj12WTF!! lol i enter the code i think is failing and its outputing it correctly how i want it to
01:07tufflaxallenj12: the filtering is working?
01:07allenj12tufflax: it seems so
01:08allenj12might need to brb in for 10 min
01:08scottjallenj12: does LT show the arg list for functions as you're writing function calls? Does it have a built-in way of showing docstrings of those functions?
01:37allenj12back
01:37allenj12u guys still there?
01:41`cbphi
01:46tufflaxallenj12: yes
01:47allenj12tufflax: o cool hey did u run that code :P lol
01:47tufflaxyes
01:48allenj12ahh kk what happened? lol
01:51tufflaxallenj12: i saw some prints then got a stackoverflow :P
01:52allenj12tufflax: yea the problem is that it keeps making the move back and forth although thats what the one filter is suppose to prevent
01:52tufflaxallenj12: but you fixed that, or?
01:53allenj12tufflax: lol when i run the copied code in light table it seems to work im very confused aswell
01:53tufflaxConfused about what?
01:54tufflaxI'm not confused :P
01:57allenj12its just me then... confused on how the code is not working but it works in light table when i give it examples
01:58metelluscan you link the code again?
01:58tufflaxnot working when
01:59OtherRavenI've got a quick noob question... is there any way to import a java class's static fields/methods, like you can with clojure namespaces?
02:00metellusOtherRaven: there are examples here http://blog.8thlight.com/colin-jones/2010/12/05/clojure-libs-and-namespaces-require-use-import-and-ns.html
02:01allenj12https://www.refheap.com/18942 marked the problem area ish with comments
02:02scottjallenj12: println's are missing their parens
02:02allenj12where?
02:02clojurebotwhere is amalloy to explain it
02:03allenj12scottj: which line?
02:03scottjallenj12: ; fix this later
02:03scottj55-57
02:03amalloy(inc clojurebot)
02:03lazybot⇒ 32
02:03allenj12scottj: o yes
02:03scottjamalloy: that must be annoying
02:04amalloyeh. it's only happened once or twice, and it's funny
02:06allenj12I think i might be on to something is it possible that..
02:07allenj12since prev-move is a sequence im not filtering correctly
02:07allenj12and have ot pull the head out
02:07scottjallenj12: idk, but you can have multiple bindings in a let
02:08scottjallenj12: e.g. (let [a 1 b 2] ...)
02:08scottjright now you have (let [a 1] (let [b 2] ..))
02:08allenj12scottj: yea i remembered that from before ill fix that
02:08allenj12scottj: now ty :)
02:09scottjallenj12: I'd highly recommend an editor that will format that stuff correctly for you, it will make your life much better. I'm surprised LT doesn't do that
02:11allenj12scottj: yea agreed im so close after this tho i will
02:11allenj12i updated the lets and it dosnt like it for some reason
02:11allenj12i will paste
02:12allenj12https://www.refheap.com/18943
02:12scottjallenj12: only one set of []
02:13allenj12scottj: o thats weird ok
02:24allenj12hmm whats the correct way to get an element out of a sequence if its the only elemnt
02:26metellusfirst works
02:26scottjallenj12: (first x) or destructuring [x]
02:27scottj(opps, x is two different things in those examples)
02:29allenj12i think its working now!!!
02:29allenj12gotta give it some examples
02:45allenj12this might be really dumb but how do i turn (def board (map (fn [^Character c] (Character/digit c 10)) (read-line))) into a vector instead of a list i keep getting stackoverflow when i try
02:46callenallenj12: mapv
02:46callenallenj12: map is lazy
02:46callenallenj12: you should get a book.
02:47callenallenj12: I recommend http://clojurebook.com/ it will deal with a lot of these question marks for you much more efficiently than round-tripping questions like "how do I vector?" on IRC.
02:47dobry-denIf you had a (db/get-forum forumid) fn and a /forums/:forumid endpoint, would you convert the forumid param into a Long in the Controller, Router, or in db/get-forum (i.e. let it handle strings)
02:47s4muel(inc callen)
02:47lazybot⇒ 10
02:47s4muel"how do i vector"
02:47allenj12callen: THNX! and sorry lol
02:47callenallenj12: I also recommend learning to google programming questions. If you plan to do this for a career, googling questions will be at least 1/3 of your job.
02:48zRecursivelazybot: (Math/sqrt 1000000)
02:48callenallenj12: 90% of the time (your question is one exception) when I answer a question on IRC, I copy and paste their question (exactly, no modifications) into google, check the first link, see that it's the right answer, then paste it right back at them.
02:48allenj12callen: yea sorry
02:48callenallenj12: usually I do this uncomplainingly, but I'm explaining this to you because I've answered thousands...literally thousands of questions on IRC over the years. Nothing changes.
02:49callenalmost every question is a google away. Very very very very few are non-trivial.
02:49allenj12callen: kk ty ill do that
02:49callenand usually you know to whom you should be speaking if they are non-trivial questions.
02:49callenlike the bantering that happens between dnolen and bbloom.
02:49callenallenj12: I'm not saying this to criticize you, I'm explaining the general pattern so that you can learn more efficiently.
02:50callenallenj12: also is allen your first or last name?
02:50dobry-dencallen's going nsa on you bro
02:50allenj12callen: no im taking it that way at all btw im happy your willing to teach me how to "fish" as the phrase goes
02:51allenj12callen: ill bit on the nsa its last
02:51allenj12callen: bite
02:51callenallenj12: we share a last name :)
02:51allenj12callen: lol cool!
02:51callenallenj12: my family is from Ohio and WV
02:51callen(the Allen ones are anyway)
02:52allenj12callen: NJ here im in ny now in RPI
02:52zRecursive(+ 1 1)
02:52clojurebot2
02:53callenwhen did clojurebot start evaluating undecorated code?
02:53zRecursive(sqrt 1000000)
02:54callenthat's just mean.
02:54callenand probably not going to work.
02:54zRecursivelazybot: why donot you eval (Math/sqrt 1000000) ?
02:56callendifferent bot.
02:56zRecursivecallen: which bot will eval (Math/sqrt 1000000) ?
02:57callenfind out by querying the bots, but do it in private chat, don't pollute the channel.
02:58zRecursivei know, i just test it
02:58zRecursive"/msg lazybot ..." doesnot work now
02:59callenI am sorry to hear that.
03:21dobry-denSpent the past 30 min debugging a problem only to realize I'd forgotten to save the file
03:26amalloydobry-den: what barbaric editor/repl setup do you have where you're loading files by hand?
03:33dobry-deni'd emacs. i just forgot to C-x C-s
03:33Pupnik_zRecursive: maybe you are missing a trigger symbol for lazybot?
03:37amalloydobry-den: but like...why not C-c C-k?
03:38dobry-denamalloy: oh, i was just debugging in the view
03:40zRecursivePupnik_: what is the trigger symbol ?
03:40zRecursive,(+ 1 2)
03:40clojurebot3
03:40zRecursiveit is "," ?
03:41dobry-den&(inc 1)
03:41lazybot⇒ 2
03:42rurumateHas anyone worked with cassaforte? I can't figure out how to use create-keypace; there's a "with" function or macro that isn't documented or found in the source: http://reference.clojurecassandra.info/clojurewerkz.cassaforte.cql.html#var-create-keyspace
03:50s4muelrurumate: http://mpenet.github.io/hayt/codox/qbits.hayt.html#var-with
03:53rurumates4muel: thanks a lot, I was about to give up..
03:54s4muelrurumate: Heh, yeah that dependency is a little opaque
04:29film42424anyone currently around?
04:30film42424it's late, I guess
04:30film42424dang
04:31ucbfilm42424: what's up?
04:31film42424So im playing around with lein and repl
04:31film42424If I drop my code into the repl, I get the correct result back.. compiled.. I don't.
04:32film42424I'll make a gist really quick
04:32ucbok
04:32film42424https://gist.github.com/film42/39738441956f579b0743
04:33film42424updated as well to show where the results differ
04:34ucbfilm42424: I'm no expert in all things compilation, but how are you calling your compiled code?
04:34film42424with lein
04:34ucbas in: lein run blah?
04:34film42424so I can put (+ 2 2) in -main and it works
04:34film42424yup
04:35film42424but for some reason, it's not stepping through the function
04:35ucbfilm42424: oh, you have a map in list-files
04:35ucbsorry, list-dir
04:36ucbwhich is lazy
04:36ucbso likely the repl is forcing evaluation by trying to print something
04:36ucbwhile your compiled code is not
04:36film42424hmm.. that makes sense. what should I use there instead?
04:37ucbfilm42424: try with doseq
04:37film42424doin in
04:40film42424ucb: You sir, are me freaking hero!!
04:40ucb:)
04:40film42424srs, thank you! I've been ripping my hair out for a solid hour on that one.
05:05hhenkelHi all, I'm wondering if using nested "doseq" operations is considered evil for walking chosen parts of a tree?
05:09amalloyhhenkel: well, not really, although it seems more likely you want either tree-seq, for, or a multi-part doseq, rather than actually nested doseq
05:12hhenkelamalloy: okay I found the docs for tree-seq I will look at it. Would should I consider as a multi-part doseq? Do you got a link regarding that?
05:12amalloy(doseq [child parent, grandchild child, ...] ...)
05:13hhenkelamalloy: Ah, okay wasn't aware that this is possible.
05:14amalloy&(doc doseq)
05:14lazybot⇒ "Macro ([seq-exprs & body]); Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil."
05:14amalloy&(doc for)
05:14lazybot⇒ "Macro ([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost f... https://www.refheap.com/18946
05:14amalloyhhenkel: doseq refers to the documentation of "for", but i can see how it would be easy to not notice that
05:18hhenkelamalloy: yes, you're right I almost only looked at the provided examples and didn't reconize that. Earlier on I was able to solve the nested doseq stuff with multiple uses of map, but that might also be not that neat?
05:18amalloyprobably not, but i haven't seen your code
05:25hhenkelamalloy: yes, thought you would write that... :) Maybe I'll clean up the mess and post a link later on.
06:19ddellacostacan someone tell me what I'm not getting here? This is a lazy sequence, of course:
06:19ddellacosta&(remove #(= 1 %) [2 3 4 1 5 7 1])
06:19lazybot⇒ (2 3 4 5 7)
06:19ddellacostabut this, I thought, would make it into a vector:
06:20ddellacosta&(doall (remove #(= 1 %) [2 3 4 1 5 7 1]))
06:20lazybot⇒ (2 3 4 5 7)
06:20ddellacosta(type (doall (remove #(= 1 %) [2 3 4 1 5 7 1])))
06:20ddellacostad'oh
06:20ddellacosta&(type (doall (remove #(= 1 %) [2 3 4 1 5 7 1])))
06:20lazybot⇒ clojure.lang.LazySeq
06:20ddellacostathere we go. So, does doall not do what I thought it did?
06:20ddellacosta&(doc doall)
06:21lazybot⇒ "([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the su... https://www.refheap.com/18948
06:21ddellacosta*vector -> collection
06:35s4muel&(doall (apply vector (remove #(= 1 %) [1 2 1 2])))
06:35lazybot⇒ [2 2]
06:35seangrov`&(doall (apply vector (remove #{1} [1 2 1 2])))
06:36lazybot⇒ [2 2]
06:36hyPiRion,(filterv #(not= 1 %) [1 2 1 2])
06:36clojurebot[2 2]
06:36s4muelTIL.
06:36hyPiRion`apply vector` is just `vec` though
06:36hyPiRionand doall on a vec makes no sense
06:39hyPiRionddellacosta: `vec` makes its argument into a vector. All lazy sequences given as input will be realized.
06:39hyPiRion,(vec (range 10))
06:39clojurebot[0 1 2 3 4 ...]
06:39s4muel,(vec (remove #{1} [1 2 1 2]))
06:39clojurebot[2 2]
06:41ddellacostahyPiRion: gotcha, thank you. Yes, I realized my misconception was thinking that doall returns a collection--if I understand it correctly, it should seem that it returns another sequence, but the values will be realized and stored in memory.
06:41ddellacostashould -> would
06:42hyPiRionddellacosta: yeah. It will actually just return the original sequence, but it will force all values to be realized
06:42ddellacostahyPiRion: ah, right, important distinction.
07:02mercwithamouthfds
07:02mercwithamouthoops.
07:02mercwithamouthis 'or' comparible to a ternary operator?
07:03hyPiRion`if` is the ternary operator :)
07:04hyPiRionx ? y : z -> (if x y z)
07:04mercwithamoutho_O ;
07:04mercwithamouthi se i see
07:04mercwithamouth,(or 1 2)
07:05clojurebot1
07:05mercwithamouthor just returns the first thing true?
07:05mercwithamouthor?? http://clojuredocs.org/clojure_core/clojure.core/or well no i'm wrong there
07:05hyPiRionyeah, or nil if none are true
07:06mercwithamouthahh i see.
07:06hyPiRion,(or false false)
07:06clojurebotfalse
07:06hyPiRionwell, some falsey value at least
07:06mercwithamouthi really should take my 'aspth' to bed... hrmm
07:06mercwithamouthok..easy enough
07:46alfborgeI want to do something like this: (ns ... (:require ... [clojure.string :refer [replace :as str-replace]]))
07:46alfborgeI know it should be possible, but I fail to find how.
07:47sm0keHello i have an agent which is a map where values are sets..how do i send a function which adds a new element to the set for a certain key ?
07:47pyralfborge: any reason not to do (:require [clojure.string :as s]) and then calling s/replace ?
07:48alfborgepyr: Just that I've used s as a variable name. I can change that if that's how this should be done of course.
07:48ambrosebsalfborge: something like (:refer [clojure.string :rename {replace str-replace}). But prefer pyr's approach.
07:48pyralfborge: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/refer mentions rename
07:48pyralfborge: but it is no problem if a namespace overlaps with a var
07:49pyralfborge: (let [s "foo"] (s/replace "foo" "bar")) will still work
07:49pyralfborge: (let [s "foo"] (s/replace s "foo" "bar")) will still work
07:50sm0keis that possible?
07:52alfborgepyr: nice, thanks.
07:52mpenetyes, some ppl used to do that with jayq to do ($/html ($ :some-id) "whatever")
07:53ambrosebssm0ke: you probably want update-in.
07:54ambrosebssm0ke: (update-in {:a #{}} [:a] conj :bar)
07:54ambrosebssm0ke: guessing this is how you do it with agents: (send a update-in [:a] conj :bar)
07:55sm0keambrosebs: does that works if the key is not present?
07:55ambrosebssm0ke: no.
07:56ambrosebssm0ke: (send a update-in [:a] #(conj (or % #{}) :bar))
07:56ambrosebssm0ke: I think fnil cleans that up too.
07:56ambrosebssm0ke: I forget how to use it.
07:57pyrambrosebs: sm0ke: or (send a update-in [:a] (comp conj set) :bar)
07:57sm0keguys what is :a what is :bar?
07:57pyrsince (set nil) => #{}
07:57ambrosebssm0ke: :a is the the key and :bar is the value you want to add to the set.
07:57sm0keok thanks let me check that
07:59sm0kei got agent failed with pyr's code
07:59ambrosebssm0ke: try this (send a update-in [:a] (fnil conj #{}) :a)
08:00pyrsm0ke: yup dimiss my proposal
08:01sm0keeee
08:01sm0kewrong arity error
08:01sm0keam i defining agent right? (def a (agent {}))
08:02ambrosebs,(send (agent {}) update-in [:a] (fnil conj #{}) :a)
08:02clojurebot#<Agent@50646c: {}>
08:02ambrosebssm0ke: I think so. Just guessing TBH. Anyone know how to use agents?
08:02hyPiRionresults won't show here due to no threads allowed, but yeah, it should work
08:03hyPiRionworks fine here
08:03pyrfnil is pretty sweet
08:04sm0keOh i got it...actually pyr code failed on agent..and i somewhere read you had to do clean-errors or someting?
08:04sm0kei redefined and it passed
08:05sm0kenow i need to understand how you did that in one line
08:07ambrosebssm0ke: this might help (send (agent {}) (fn [m] (update-in m [:a] (fn [val] ((fnil conj #{}) val :a))))
08:07mercwithamouthdoes anyone know of any good papers on anonymous functions...or well the philosophy behind them?
08:08ambrosebssm0ke: it takes a bit of getting used to, but basically the first argument gets inserted implicitly for things like update-in and send.
08:08AimHeremercwithamouth, "The Lambda Papers"?
08:08sm0keambrosebs: thanks ...copied to repl :)
08:08mercwithamouthAimHere: thanks, taking a look
08:08ambrosebssm0ke: we can take out the "m": (send (agent {}) update-in [:a] (fn [val] ((fnil conj #{}) val :a)))
08:09ambrosebssm0ke: and take out the "val": (send (agent {}) update-in [:a] (fnil conj #{}) :a)
08:09ambrosebssm0ke: hopefully I got the syntax right.
08:09sm0kejust one paren missing from end :D
08:10ambrosebssm0ke: :)
08:11sm0keambrosebs: weird the first two forms didnt work
08:11ambrosebssm0ke: give me a sec
08:13ambrosebssm0ke: atoms are more responsive.
08:13ambrosebs,(swap! (atom {}) (fn [m] (update-in m [:a] (fn [val] ((fnil conj #{}) val :b)))))
08:13clojurebot{:a #{:b}}
08:14ambrosebs,(swap! (atom {}) update-in [:a] (fn [val] ((fnil conj #{}) val :a)))
08:14clojurebot{:a #{:a}}
08:14ambrosebs,(swap! (atom {}) update-in [:a] (fnil conj #{}) :a)
08:14clojurebot{:a #{:a}}
08:15sm0keambrosebs: thanks much for breaking that down..
08:15ambrosebssm0ke: also, don't hesitate to use the longer forms if it's clearer.
08:16sm0keyup..one liners are overrated
08:16ambrosebssm0ke: great for IRC.
08:19bordatouehi could anyone please tell me if it is possible to get a string output from pprint so that I could display it in html format
08:20ambrosebsbordatoue: you might want with-out-str
08:20bordatoueFor example when using pprint/print-table, I would like the output to be displayed in html
08:21ambrosebsbordatoue: oh, not sure.
08:21pyrambrosebs: unrelated, but is runtime validation something you're looking into for core.typed
08:21bordatoueambrosebs: thanks, let me try with-out-str
08:21ambrosebspyr: yes.
08:21pyrambrosebs: i'm using clj-schema to validate structures right now
08:21pyrambrosebs: and it would be nice having a single definition for compile-time / runtime
08:22pyrambrosebs: ok, i just wanted to make sure you considered this as part of core.typed's job as well
08:22ambrosebspyr: it should be core.typed's job to provide runtime predicates for static types.
08:23pyrack
08:23glosolihmm is there something in Ring to convert new line chars from string to br ? or I am confusing the purpose of Ring ?
08:23ambrosebspyr: it's not obvious what's the best way to do it.
08:23ambrosebspyr: right now, type checking is a separate phase.
08:24ambrosebspyr: something probably needs to be done at compilation/macroexpansion for validation stuff.
08:27pyrah
08:28pyrambrosebs: as-in (defn-typed [tag symbol tag symbol] ...)
08:30ambrosebspyr: I think I want to generate top-level predicates based on static types. Then you can use the predicates to do validation, and core.typed will follow it.
08:30ambrosebspyr: also `assert-type` would be nice, which casts to a static type at runtime
08:31ambrosebspyr: (predicate-for '{:a Number, :b Symbol})
08:31ambrosebspyr: (predicate-for MyMap? '{:a Number, :b Symbol})
08:32pyrassert-type would definitely fit (and augment) what i'm using clj-schema for
08:33ambrosebspyr: that would make core.typed a much more complete solution. Do want.
08:39pyrnice, indeed
08:39alfborgeWhy doesn't this work? (remove empty? [(java.net.URI. "http://example.com&quot;)])
08:40mpenet,(doc empty?)
08:40clojurebot"([coll]); Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))"
08:40alfborge*facepalm*
08:41alfborgethanks mpenet
08:41mpenetnp just acting as a rubber duck
08:52glosolihmm is there something in Enlive I am missing, that could handle \n characters as breaks in paragraph ?
08:52cgrandglosoli: you want to convert each \n to <br>?
08:52glosolicgrand: yeah
08:54cgrand(interpose {:tag :br} (str/split text #"\n"))
08:54sm0ke,(swap! (atom {:k #{:v1 :v2}}) update-in [:k] disj :v1) ;i learned to do the opposite :D ambrosebs
08:54clojurebot{:k #{:v2}}
08:55cgrandand pass that to h/content
08:55ambrosebssm0ke: :)
08:56ambrosebssm0ke: you probably want (fnil disj #{}) again, otherwise you'll get nil's in your values.
08:56sm0keambrosebs: but its weird that ##(swap! (atom {:k #{:v1 :v2}}) update-in [:j] disj :v1)
08:56lazybot⇒ {:j nil, :k #{:v1 :v2}}
08:56sm0keexactly thanks
08:58glosolicgrand: thanks sir! :)
09:00sm0kefnil is awesome
09:01ambrosebssm0ke: I can't resist showing it's type. Just as cool https://gist.github.com/frenchy64/6254814
09:03sm0kewow that is the most complex type i have ever seen
09:03sm0keumm..but weird that the doc shows very simple definition
09:04sm0keeven the implementation is pretty sweet ...
09:04sm0kelot of multivariate functions though
09:05ambrosebs,(doc fnil)
09:05clojurebot"([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."
09:06sm0keambrosebs: if you look at the source it seems it checks only upto the third argument?
09:06ambrosebssm0ke: the type is complex, but IMO couldn't be simpler to capture the semantics.
09:06ambrosebssm0ke: yes that's right.
09:19sm0keumm how do i cherry pick keys from a nested data.. e.g. how do i get :a keys into a seq ? ##(vals {:k1 {:a 1 :b 2} :k2 {:a 2 :b 3}})
09:19lazybot⇒ ({:a 1, :b 2} {:a 2, :b 3})
09:21sm0keaha ##(map :a (vals {:k1 {:a 1 :b 2} :k2 {:a 2 :b 3}})) ; got it
09:21lazybot⇒ (1 2)
09:22samllein search clojure downloads the whole internet
09:22mdrogalissm0ke: Safer to use clojure.walk and pick the keys off.
09:22mdrogalisThen you don't need to know anything about the nesting ahead of time.
09:23sm0kemdrogalis: any e.g.? is clojure.walk a external lib?
09:23mdrogalis,(use 'clojure.walk)
09:23clojurebotnil
09:23mdrogalis:)
09:24sm0keok thanks ill have a look
09:25sm0kealso i find myself using a lot of doseq? is that idiomatic way..or i am doing it wrong?
09:25mdrogalissm0ke: Depends. Are you using it for side-effects?
09:25hyPiRionsounds very wrong, unless you're doing side-effecty things
09:26sm0kemdrogalis: looking at the code i am doing agent sends .. sends on socket etc..?
09:27mdrogalisSide effecty indeed. It's probably fine.
09:27xeqisaml: lein search will download indexes from central and clojars, and the central indexes are 90+mbs
09:27sm0ke:) thanks
09:28xeqisaml: but after that it is faster
09:28samlah i see
09:28samli thought it was downloading the whole internet
09:28hyPiRionsaml: oh, but you are
09:29ambrosebssm0ke: if you know about the shape of your data ahead of time, I'd get-in over clojure.walk.
09:29clgvsaml: maven always downloads the whole internet ;)
09:29sm0keambrosebs: did you mean "dont know"?
09:30ambrosebssm0ke: if you *do* know, use get-in
09:30hyPiRionMaven is a DSL for downloading the Internet.
09:31sm0keaye..but if i know my data will contains key :k ...map will work 100% crectly? why would i need walk?
09:31hyPiRionI'm a bit surprised that torrent traffic is higher than the Maven downloading traffic.
09:31ambrosebssm0ke: your map example is correct.
09:31mdrogalissm0ke: ambrosebs's advice is good. Consider my suggestion an add-on for stickier situations.
09:32ambrosebssm0ke: if it's nested deeper consider get-in.
09:32sm0kenoted..thanks.
09:34mercwithamouthclojures 'if' is sort of funky....I see if true it returns the immediate next line and that line only...anything else would fall under what would be an else block in an imperative language. is that just clojures way of saying that if multiple things should happen you need to put it in a function and return that if true?
09:35mdrogalismercwithamouth: Don't think about lines, think about forms.
09:35mknoszligmercwithamouth: you could wrap it in (do ...)
09:35mdrogalismercwithamouth: With if, you get (if (expr) (then) (else))
09:35mdrogalisOne form for expr, then, and else. If you need more, like mknoszlig said, wrap it in a do.
09:36clgvhyPiRion: that's easy to explain - hollywood movies arent maven artifcats ;)
09:37mercwithamouthmknoszlig: ahh, ok!
09:37TEttingermercwithamouth, there's also when, which executes multiple forms but has no else clause
09:37hyPiRionclgv: not yet at least
09:38mercwithamouthTEttinger: ok, i'll play with that next...
09:38mknoszligmercwithamouth: usually, needing more than one form in such a place means side effects are happening - do makes it a bit more obvious
09:38TEttinger,(when (> 10 1) 1 2 3 4 (print "yay"))
09:38clojurebotyay
09:38jweissis there any straightforward way to write "try to calculate expression x, if it works, bind it to this local and return y, otherwise return z" seems like there's no way to combine try/catch and let this way.
09:38clgv,(when (> 10 1) 1 2 3 4 (print "yay") 5)
09:38clojurebotyay5
09:39TEttingerjweiss, sounds like one of the when-let functions
09:39mknoszligjweiss: if-let? won't work with exceptions though...
09:39clgvjweiss: you are looking for `if-let`
09:39TEttingeryeah that
09:39mknoszligjweiss: you could wrap the calculation in try catch that returns nil in the catch
09:40jweissclgv: you mean (if-let [x (try ... (catch Exception e nil))] z) ?
09:40mknoszligjweiss: or roll your own try-let macro ;)
09:40jweissyeah all those require that x can't return nil
09:40jweissbecause nil becomes the exception flag
09:40clgvjweiss: yep. if you need it often build a macro like mknoszlig suggested
09:40mknoszligjweiss: true
09:41mknoszligjweiss: otoh, nil isn't really an extremely useful value?
09:41jweissmknoszlig: of course it is
09:41mknoszligjweiss: for further calculation? hmm...
09:42jweissthere's a big difference between "I didn't find the item in the list: nil" and some disk or network failure
09:42bill610Anyone have any ideas about this: I want to use clojure to build a web service with a RESTful API that exposes resources stored in a relational database (mysql in this case). I'd like to use a library that, given a specification of the db schema, would translate incoming requests to db queries, or korma constructs. Does that exist?
09:42mercwithamouthmknoszlig: hmm i'll keep that in mind
09:43mknoszligjweiss: sure, there's a big difference. not necessarily in the context of the caller, though
09:43mercwithamouth,(when (> 4 5) (print "yay") (print "ok))
09:43clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading string>
09:43jweissmknoszlig: in terms of the result of the if-let test expression i DO need to know the difference between the two
09:43mercwithamouth,(when (> 4 5) (print "yay"))
09:43clojurebotnil
09:43mknoszligjweiss: if you need to distinguish here, you're probably better off writing your own macro there
09:44mercwithamouthg00d
09:44mercwithamouth,(when (< 4 5) (print "yay"))
09:44clojurebotyay
09:44jweissmknoszlig: ok, was just hoping there was another way :)
09:44mercwithamouth,(when (> 23 5) (print "yay") (print "ok))
09:44clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading string>
09:44hyPiRion(defmacro try-let [[vname expr] success failure] (try (let [~vname ~expr] ~success) (catch Exception e# ~failure))) probably
09:45jweisshyPiRion: thanks. this seems like a rather common construct, maybe it's just me :)
09:45clgvjweiss: build try-if-let with (try ~@body (catch Throwable t t)) and decide not on nil return but when the return value is a throwable
09:47bill610anyone?
09:47clojurebotJust a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..."
09:47gfredericksclojurebot: he did ask
09:47clojurebotIt's greek to me.
09:47hyPiRionclojurebot: go back to Greece
09:47clojurebotExcuse me?
09:48mdrogalisHello bill610 :)
09:48mknoszligbill610: not aware of a lib like that, sorry
09:48bill610mknoszlig: thanks
09:49bill610clojurebot: thanks for nothing
09:49clojurebotNo entiendo
09:49mknoszligbill610: sounds like something that'd be kinda fun to build, though ;)
09:49bill610mknoszlig: agreed, but my boss would prefer code reuse here :)
09:50mknoszligbill610: yeah, bosses tend to want to leverage oss but not spend money on contributions ;)
09:50mknoszlig(some of them)
09:51doomlord_tempted to try clojure again, but 2 doubts: performance(is it an inherent problem of dynamic-language+more garbage from functional-programming) 2: not a big fan of the jvm. but i'm tempted, i recall enjoying it alot when i tried it.
09:51dobry-dendoomlord_: where ya coming from?
09:51mdrogalisdoomlord_: Performance isn't a problem here.
09:52doomlord_C++ is what i've used most (asm->c->C++); i've meandered through other languges, settled on Rust for a long while recently. (very different, and a C++ replacement)...
09:52mknoszligdoomlord_: no significant issues with performance, but ymmv depending on what you want to do...
09:52doomlord_... but now i'm thinking it would be nice to try and use something that complements c++
09:53doomlord_my goals are a bit vague.. but one goal is "a langauge that would make collaborative projects more enjoyable" - from experience in C++ , i despise any form of teamwork.
09:53doomlord_i kind of hope functional languages being more composable would lend themselves more to collaborative work.
09:54doomlord_I tried haskell, liked many things about it .. but the way you can just throw data together in clojure is very appealing. (haskell struggles with basic records it seems)
09:54dobry-dendoomlord_: clojure has straight-forward methods for reducing allocation garbage like with http://clojure.org/transients
09:54dobry-denwell, removing it
09:55doomlord_i tried CL - but much prefer the choices in clojure (lisp-1 etc)
09:57doomlord_rust is a great language for me but it's very fringe. i figured putting some time into something more established aswell might be nice.
09:58dobry-densounds like you have the chutzpah to give a shot and see if you like it
10:00doomlord_hehe got this sort of 'catch22' thing. rust is great, it definitely eases some of the issues that make C++ bad for collaboration (eg not so class oriented, more biased toward referentially transparent code) - but its so fringe that the community of potential collaborators is tiny :)
10:01TimMcIs it even finished yet?
10:01doomlord_its not v1.0 yet , no
10:01TimMc(Another catch-22, of course.)
10:01TimMcOr rather, not a catch-22 so much as a bootstrapping problem.
10:01doomlord_in some ways its a great time to be in it - you have a some chance of steering it with contributions
10:01tbaldridgedoomlord_: I don't forget, Clojure is a 1/2 dynamic language. Vast portions of it are static enough that the JVM JIT optimizes them away or treats them as static. So it's actually very very fast.
10:03doomlord_learning a language is one thing. but finding your way around all the libraries & tools is another - I'm begining to think i'll never master anything else to the same extent as C++
10:03dobry-denclojure has such a small surface area
10:04doomlord_one big + for clojure is the macros. from C/C++ i do find myself wanting them. (rust too has a macro system , better than C, not as good as lisps)
10:05doomlord_do many people come to clojure *from java* ? (already familiar with that environment..) i've never used java - and intend to keep it that way.
10:05jweisshyPiRion: the problem with your macro is that the try wraps the success expression when i only want it to wrap the calculation of the local value. this is really the major headache, not so much the error handling as trying to write this without some "magic" return value
10:06clgvjweiss: just change the macro then ;)
10:06jweissyeah that's what i'm doing right now
10:06clgvreturn the exception object ^^
10:07clgvit is very unlikely that this is a valid return value
10:07jweissthat's the magic value then right? you have to check whether it's a throwable or not
10:07clgvyes
10:07hyPiRionjweiss: oh, I see
10:07jweissdon't get me wrong, i know it can be done. i was just looking for something "pretty"
10:07clgvjweiss: you could also just create a macro-local (Object.) as amgic object
10:08jweissclgv: ah interesting
10:09hyPiRionyeah, usually just wrap (let [local# (Object.)] ... (catch Exception e# local#)) and then compare for local#
10:26devthseems nrepl does not look for cljs files when requiring a ns. anyone aware of a way to tell it to? google is failing me here.
10:32xeqidevth: are you using piggieback?
10:32devthxeqi: nope
10:32devthchecking it out. thanks
10:35xeqidevth: you might also look at https://github.com/cemerick/austin
10:35xeqithats what I've been using lately
10:35devthok cool
10:39devthawesome, can now require cljs namespaces from vim with piggieback
10:54xeqianyone have any complaints about the current state of clojure tooling?
10:55mdeboardxeqi: I think it's a pretty common source of pain, but it has gotten quite a lot better in the past year or two
10:55mdeboardReally my only complaint is the error messages, but that's not Clojure's fault per se
10:55xeqimdeboard: agreed, I'm working on gathering a list of things that could continue to improve
10:55devthwhat are some of those things that have gotten better?
10:56mdeboarddevth: nrepl, for one. lein has improved (speed- and feature-wise) at a ridiculous pace
10:56devthnrepl + vim-fireplace was huge for me.
10:56devthyeah
10:56mdeboardwhat's vim-fireplace
10:56devthequiv of nrepl.el for vim
10:56devthhttps://github.com/tpope/vim-fireplace
10:56mdeboardah I see
10:57mdeboardlike nrepl-jack-in basically
10:57mdeboard?
10:57devthyeah i guess. haven't tried the emacs setup so don't know exactly what it compares to.
10:57xeqimdeboard: more equivalent to nrepl.el then a specific command
10:57mdeboardIt's basically "open up clojure file, press alt-x, type `nrepl-jack-in`, hit enter" and it conects to an nrepl instance
10:57mdeboardI see
10:58devthyeah. it connects, allows eval of exprs, requires namespaces, looks up docs, ...
10:59devthi still haven't figured out a good debugger. looked at ritz a bit
11:10Bronsaxeqi: no
11:22silasdavisIs it cheap to (into {} {:a 1 :b 2 ...})?
11:23silasdavisi.e. is it cheap to support sequences representing map treating all inputs the same way?
11:24silasdavismaps*
11:27gunssilasdavis: into uses transients when it can, and I find it is the fastest way to convert between collection types
11:32silasdavisguns, yeah I'm just wondering if it is negligible enough to possibly use it redundantly (i.e. even when it's second argument is already a hash-map)?
11:33gunssilasdavis: it will still run a reduce and so still O(n)
11:33silasdavisIt's convenient for my function to treat ((:a 1) (:b 2) ...) the same as {:a 1 :b 2 ...}, but if doing so is a big performance hit I won't do it
11:33gunsif n is small, no problem
11:33silasdavishm I was hoping o(1)
11:35hyPiRionnot sure if that's possible, actually
11:35hyPiRion,(into {} '((:a 1) (:b 2)))
11:35clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.Keyword cannot be cast to java.util.Map$Entry>
11:35hyPiRion[:a 1] etc is possible though
11:51chrisrossi dumb noob question, if that's ok. perhaps this is lack of imagination on my part, but currently the only way i can figure out to scan a lazy seq without retaining head is to use a loop construct. is there some sexier, more elegant function i just haven't found yet?
11:52hyPiRionchrisrossi: What do you mean by "scan a lazy seq"?
11:52chrisrossiwell, let's say i want to get the nth element of lazy sequence without hanging on to n-1 head elements.
11:53cmajor7@chrisrossi: you want
11:53tbaldridge,(nth 40 (range))
11:53clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to java.lang.Number>
11:53tbaldridgebleh
11:53tbaldridge(nth (range) 40)
11:53chrisrossimaybe nthrest
11:53tbaldridge,(nth (range) 40)
11:53clojurebot40
11:54chrisrossimaybe (first (nthrest the-lazy-seq))
11:54chrisrossimaybe (first (nthrest n the-lazy-seq))
11:54cmajor7@chrisrossi: you will have to realize all the previous elements
11:54tbaldridgechrisrossi: why not just use nth?
11:54cmajor7@chrisrossi: is that is your question
11:54cmajor7@chrisrossi: *if
11:55chrisrossii know i have to realize them, but i want to discard them after they are realized.
11:55chrisrossii'm feeling good about nthrest...
11:56cmajor7@chrisrossi: so you want to split a seq?
11:56hyPiRionjust... drop?
11:56hyPiRion,(drop 39 (range))
11:56clojurebot(39 40 41 42 43 ...)
11:56jweissseems like he just wants to discard some elements and just keep the head to the rest
11:56jweisssounds like drop :)
11:56cmajor7,(drop 10 (range 20))
11:56clojurebot(10 11 12 13 14 ...)
11:56cmajor7@chrisrossi: ?
11:57jweissi presume that will realize the elements as it foes
11:57jweissgoes
11:57chrisrossihmm, actually that looks promising too.
11:58chrisrossiassuming (0 .. 9) are able to be garbage collected.
11:59cmajor7@chrisrossi: is your sequence in trillions? :)
11:59hyPiRionthey are able to be GCed, yes.
11:59hyPiRion,(drop 1e7 (range))
12:00clojurebot(10000000 10000001 10000002 10000003 10000004 ...)
12:00chrisrossicool, thanks.
12:00chrisrossisweeping cobwebs out of brain...
12:00hyPiRionIn general, functions shouldn't retain heads unless it explicitly tells you it will
12:01jweisson a related note, can you fast forward through a lazy seq *without* realizing the items
12:02jweissi guess you'd have to split it
12:02gfredericksjweiss: still wouldn't work
12:02chrisrossithat would be impossible, i'd think.
12:02jweisscan't be done?
12:02chrisrossis/would/wouldn't/
12:02hyPiRionthat's impossible, unless you have wrapped the elements in a delay or something that can defer the computation
12:03jweissso once you realize you don't care about the first x items, it's too late
12:03jweissyou have to have known that before you produce the seq?
12:04scriptorsince it's a lazy sequence, you won't even know if it has x items in the first place unless you realize them
12:04jweissgood point
12:17TimMcjweiss: In the general case, lazy seqs require two things for realization: Computation of the basis for the next cell, and computation of the value of the next cell on that basis.
12:18TimMcFor instance, in a parallel universe, we might be able to skip the negation in (map - (range 20)), but you couldn't skip the incrementing.
12:20hyPiRionTimMc: Didn't amalloy_ work on something to provide that? Perhaps that was for the reducers.
12:30mercwithamouthwhy would one associate an anonymous function to a name?
12:31bbloommercwithamouth: for recursion
12:31bbloom,((fn rec [x] (if (zero? x) :done (do (prn x) (rec (dec x))) 5)
12:31clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
12:31bbloom,((fn rec [x] (if (zero? x) :done (do (prn x) (rec (dec x))) 5))
12:31clojurebot#<RuntimeException java.lang.RuntimeException: EOF while reading>
12:31jweisslocal variables too
12:32bbloomi can't code in an irc window :-/
12:32bbloom,((fn rec [x] (if (zero? x) :done (do (pr x) (rec (dec x))))) 5)
12:32clojurebot54321:done
12:32bbloomfinally.
12:32mercwithamouthhmmm
12:33mercwithamouthdoes joy of clojure go into stuff like that?
12:34jweiss,(let [f (fn [x] (- x 5))] (vector (f 5) (f 6)))
12:34clojurebot[0 1]
12:34mercwithamouthlike the reasoning behind a lot of functional practice?
12:35jweissbut that is a different way of assigning a name than bbloom's example
12:36dobry-denmercwithamouth: iirc it helps get the idea across more deliberately than most
12:37dobry-deni've never even seen (fn name [...] ...) syntax in the wild.
12:38hyPiRionI do it when I need non-recur recursion
12:38xeqiI've had to do it very rarely
12:38mercwithamouthdobry-den: sweet....funny enough secrets of the javascript ninja gives some very decent insight on functional programming
12:40dobry-denmercwithamouth: i think the best way in is to just write clojure. compared to scala or ruby or javascript, i find that clojure makes it easiest to just arrive at the functional implementation.
12:41mercwithamouthi agree...after a few days of playing with clojure it's definitely replacing scala for me (a language i toyed with off/on for 2 years). it may very well replace ruby as well
12:42AimHereI use (fn name [wibble] ... ) syntax is almost necessary for 4clojure!
12:43hyPiRionhuh, I don't think I've ever used that for 4clojure
12:43dobry-denmercwithamouth: cool, i come from ruby. i found things like Ring (https://github.com/ring-clojure/ring/wiki/Concepts) much simpler than Rack.
12:44ambrosebsdobry-den: fn names also show up in stack traces
12:44dobry-denambrosebs: oh man. i'm sold
12:44dobry-densay no more
12:44mercwithamouthdobry-den: that's good to hear...i'm going to start playing with compojure soon
12:46chris_are there many jobs in Clojure? I see a lot of people on Hacker News comments saying they work in Clojure, but have never seen a Clojure job advertised
12:46chris_I'm guessing outside of startups there aren't many opportunities?
12:46dobry-denmercwithamouth: it's great. i started working on a forum yesterday to learn Datomic: http://198.58.119.43:3000/. maybe it can help if it doesn't scare you away.
12:46mtpfind a java job and start writing clojure
12:47justin_smiththere were many clojure folks at the last pjug meeting (portland or java users group)
12:47justin_smithclojure folks as in employed doing clojure
12:47justin_smithincluding me
12:47chris_justin_smith: that's good to hear
12:47justin_smiththat is how we did it - got approved to use java, snuck some clojure in, and the higher ups liked the productivity boost
12:48justin_smiththe way our tech lead tells it "we snuck clojure in the back end"
12:48justin_smithwe don't have a strong sexual harrassment policy here
12:48mercwithamouthdobry-den: hah, cool! taking a look
12:48chris_ha
12:48ToxicFrogI wish we had lax enough controls over prod to do that here~
12:48mercwithamouthso datomic is a db or an orm?
12:49chris_I can't see that flying at my current place of work, not enough autonomy unfortunately
12:49tbaldridgemercwithamouth: DB, ORMs are of the devil :-P
12:49chris_but perhaps in future I'll be able to do that :-)
12:49mercwithamouthtbaldridge: lol
12:49justin_smithtry a weekend project (on your own time) that fills a company need, see if they let you bring it in
12:49mercwithamouthtbaldridge: orms can be nice..but admittingly with clojure..it seems to be f'ing perfect when it comes to modeling and dealing with your data as is
12:50xeqitbaldridge: but my objects are maps
12:50chris_sure, i'll have to try that
12:50dobry-dendatomic's datalog has me hooked
12:52dobry-denall the implicit joins makes it sorta easy-mode compared to sql
12:52hyPiRionI feel ORMs are too complex. It's essentially just a map with key/values
12:53hyPiRionadding the possibility to modify the data makes me confused.
12:53tbaldridgedobry-den: I love the fact that datalog is optional. Don't like it? You have raw access to the indexes. That is a major win.
12:53bbloom<3 datalog
12:53mercwithamouthdobry-den: heh it's my intention to go mongo....this is interesting though
12:53bbloom<3 raw indexes too
12:53bbloom</3 mongo
12:53tbaldridgehyPiRion: right, they work well when both your DB and your language are statically typed. They are pretty much useless when one or the other is dynamic
12:53bbloomthat's the unary "do not love" operator
12:54mercwithamouthlooking into it now...
12:54llasrambbloom: What does (comp <3 </3) do ?
12:54tbaldridgemercwithamouth: after using a Datomic, I'd never go back to a DB like mongo. Datomic has all the good parts of SQL DBs without all the bad parts.
12:55bbloomllasram: depends on whether or not <3 is defined for booleans :-)
12:55tbaldridgellasram: create a confused girlfriend?
12:55dobry-denmercwithamouth: some essential datomic resources: https://github.com/Datomic/day-of-datomic, http://www.learndatalogtoday.org/
12:55havenwoodtbaldridge: Is Datomic a sane choice for smaller-sized projects?
12:56havenwoodI've never used it but very curious.
12:56tbaldridgehavenwood: I think so, I've used it purely as an in-memory system. If you use it like Clojure you can really look at it as an easy way of adding durability to Clojure collections.
12:56bbloomhavenwood: depends on what "smaller-sized" means
12:56dobry-denhavenwood: yeh that's what the free transactor is for
12:57mercwithamouthdobry-den: thanks...sigh just what i need. something new to start over with
12:57tbaldridge*use it with Clojure
12:57dobry-denmercwithamouth: also this dude's screencast is nice: https://groups.google.com/forum/#!topic/datomic/fizUX3dWBPU - shows you some basics. def check out the learn datalog site though. datalog is much cooler than sql
13:01mercwithamouthdobry-den: ok, saving
13:02mdeboardworst part about clojurescript is that now I'm trying to implement channels in coffeescript
13:02mdeboardwhat have I become
13:02tbaldridgemdeboard: does coffescript suport async/await or anything of that sort?
13:03bbloomtbaldridge: not main coffeescript, but one or two of the less popular forks do
13:03mercwithamouthahh ok so datomic IS a layer over a number of different databases
13:03mercwithamouthinteresting...
13:03shoeraintechnomancy, justin_smith, rasmusto: the reason tab-completion didn't work yesterday was because i was running lein 1.x, not lein 2.x . tab-completion is more narrow now, I guess. Working with .inputrc too. Thought I'd mention it.
13:03tbaldridgemdeboard: actually, icedcoffeescript supports async await, if you use one of those, porting core.async is rather trivial
13:03technomancyshoerain: aha; nice
13:03justin_smithshoerain: awesome, glad you worked it out
13:04mdeboardtbaldridge: :o
13:04rasmustoshoerain: I figured it might be something like that, since you mentioned a specific version of linux (which is why I asked about apt) :)
13:04dobry-denmercwithamouth: or i guess in other words datomic has adapters for various dbs.
13:05allenj12whats the best way to bind something in a for loop something like this? (for [pair move] (let [next-move (key pair)] i googled around and couldnt find anything specific for what i want
13:06bbloomtbaldridge: icedcoffeescript etc don't make a lot of sense to me. Part of the point of coffeescript is that it's got the same semantics at javascript. if you're going to go all out & change the language semantics & do a much larger transform during compilation, you might as well use cljs :-)
13:06dnolenmdeboard: also there's a CoffeeScript pull request to support ES6 yield http://github.com/jashkenas/coffee-script/pull/3078
13:06dobry-denlike (for [pair move :let [next-move (key pair)] ...)?
13:07tbaldridgebbloom: true, I'm just saying, implementing core.async in any language with async/await is pretty simple.
13:07mdeboarddnolen: Damn, that's great.
13:07tbaldridgeI'd be tempted to port it to F#/C# if I actually worked with those languages anymore
13:07bbloomtbaldridge: yup, especially without threads
13:07allenj12hmmm :let i gotta look what that is hold on
13:07mdeboardtbaldridge: But async/await semantics are so nice, I'm not sure what you'd actually gain
13:07mdeboardso nice in those languages*
13:08rasmustoallenj12: it's just sugar for the code that you had to drop a set of parens
13:08bbloomyou wouldn't need to add much to C#/F# at all other than maybe a channel type w/ async methods on it
13:08allenj12rasmusto: ahh kk
13:09bbloomand like a Channel.Alts static method
13:09tbaldridgebbloom: yep, that's the beauty, if your system supports listenable promises, we can layer core.async on it.
13:11mdeboarddnolen: Co-worker just brought up a good point. Support for yield would violate one of coffeescript's main tenets of being backward compatible
13:11allenj12woah i think that for loop broke my light table lol
13:11allenj12its not matching parens anymore
13:11allenj12lol
13:12dnolenmdeboard: Ashkenas already chimed in about that pull, seems like he's down.
13:12dnolenmdeboard: another approach is using Traceur which supports ES6 generator syntax, works well from what I've played around with
13:13rasmustoallenj12: kill and restart the repl connection, you might want to do a (take 10 (for ...)) to keep it from going infinitely
13:14allenj12rasmusto: kk restarting
13:16allenj12rasmusto: hmm looks like its my fault here still yelling :X
13:16dobry-denIf you had a (db/get-forum forumid) fn and a /forums/:forumid endpoint, would you convert the forumid param into a Long in the Controller, Router, or in db/get-forum (i.e. let it handle strings)
13:20mdeboarddnolen: Ultimately it's moot, we're committed to supporting IE9. But that's exciting. I didn't give two shits about front-end stuff before Saturday. Spent the day with CLJS, kind of opened my eyes.
13:22mdeboardReally want to use core.async with Clojure where you get actual multithreading out of it. CLJS core.async is nice for "cognitive easing" with highly async code, but you're still constrained to the limitations of your platform.
13:26allenj12https://www.refheap.com/18954
13:27allenj12is that right?
13:27dobry-denallenj12: i dont see why not
13:28allenj12dobry-den: hmm kk it say wrong number of args for line 3 in that paste
13:28dnolenmdeboard: what limitations are you talking about beyond single threaded? (Also Traceur lets you use ES6 features by compiling to common denominator JS)
13:31mdeboarddnolen: That's pretty much it. Well, that and limited access to underlying OS via the browser APIs (if any)
13:31mdeboardBut I meant multi-threading.
13:32dnolenmdeboard: right, I don't really see the single threaded bit being particularly troublesome when doing serious front end work though.
13:34dobry-denallenj12: oh yeah, key is actually a clojure function. i thought it was pseudocode when you first posted it.
13:35rasmusto,(filter #{false} [1 2 false 3])
13:35clojurebot()
13:35allenj12dobry-den: o lol does that make it different?
13:35rasmustoI probably shouldn't use a set here...
13:35dobry-denallenj12: i dont really know what you're trying to do or what you're asking. for instance, if pair is a tuple you can just do (first pair).
13:36allenj12dobry-den: i only want the key. im doing a-star and the key contains the action i wanna execute
13:37allenj12dobry-den: it seems though u would day the syntax is the same no?
13:37allenj12dobry-den: for the for loop?
13:39dobry-denallenj12: yeah, but didnt you say your prob was on L3
13:39allenj12dobry-den: i thought it was but i looked more carefully and its complaining about the for loop saying it has 5 arguments sry i forgot to mention that
13:40dobry-denallenj12: ohh yeah it's because of the println line
13:40dobry-denfor loops can only have one expression in them unlike, say, the body of a `let`. so use `do`
13:40dobry-den(do (println ...) (a-star ...))
13:41allenj12dobry-den: o weird kk
13:42mdrogalisDo you think it's fair to say that RESTful interfaces suffer from the same problems that SQL does?
13:42mdrogalise.g. string building to communicate.
13:43justin_smithmdrogalis: well they aren't quite as human-operator oriented, IE a request map can be trivially translated to/from an array of arrays of length 2
13:43justin_smithsql has more syntax
13:44mdrogalisjustin_smith: While that's true, REST requires you to know the ordering of the URL structure. /person/:name/:id, for example
13:44mdrogalisIt kind of forces positional URL building on you.
13:44justin_smithsure, but that is different from constructing a statement in a language syntax
13:45justin_smithin terms of error modes for example
13:45mdrogalisjustin_smith: Go on.
13:45justin_smithI mean you can't call a clojure function without your args in the right order
13:45justin_smiththat is different from having magic args that transform the function being called (including how other args are interpreted)
13:46justin_smiththat does happen with special forms of course, but not with most functions
13:46justin_smithin sql the meaning of your tokens depends on the analysis of the whole statement
13:47dobry-denI'm so used to rest that I can't even think of what an alternative would look like.
13:47justin_smithwith rest, you need to get the path right, but it is not as open ended as a language
13:47mdrogalisSome of those points hold true, but one not wholey so. Function args can be posiitonal, but you weren't munging strings to build it u
13:47mdrogalisup*
13:47justin_smithstrings are just an implementation detail
13:47mdrogalisI suppose so. Something profoundly bothers me about it the more I consider it.
13:48justin_smiththe problem with sql is not the strings, it is the fact that it is a language where a small alteration in the form changes how the elements get interpreted
13:49mdrogalisjustin_smith: Datomic disagrees with your first point.
13:50mdrogalisGotta brb
13:51mlb-Is there a XML library for clojure which doesn't strip comments when parsing a XML document?
13:52mdrogalismlb-: Unlikely, not where where the comments would go.
13:53mdrogalisnot sure*
13:53justin_smithλ_λ
13:55mlb-mdrogalis: dependent upon the internal representation each library chooses to expose in clojure, naturally
13:56mdrogalismlb-: I pictured it parsing into something like {x [x x x] etc}, but maybe you'll find something else.
13:57mlb-I'm not particularly stuck on how a library might choose to represent it. I'm more stuck on finding a library which *can*
14:01justin_smithmlb-: how much xml support do you need?
14:01justin_smithenlive will give you a data structure with the comment in it, but does not do xml namespaces etc.
14:02mlb-justin_smith: Trying to sell clojure at my $DAYJOB, so parsing with xmlns prefixes and comments would be ideal
14:02justin_smithor so the docs claim, haven't tried to do any advanced xml stuff with it, I just use it for page scraping when clients are too lazy to give us data
14:02justin_smithahh
14:02justin_smithhmm
14:03mlb-I figure worse case, I'll find some enterprise-tastic Java library which does that kitchen sink bit and I'll just write a clojure wrapper for it
14:03justin_smiththat stuff is a bit outside my experience, so I don't even know how hard it would be to add that onto enlive. But enlive will take an xml and give you a nested data structure, I can paste code showing that
14:03mlb-Just hopeful that someone else may have already done the legwork ;]
14:04justin_smithmlb-: http://sprunge.us/agSO?clojure example in a repl of using enlive to get a data structure out of some xml
14:06mlb-justin_smith: that looks lovely, I'll have to check it out!
14:07justin_smithenlive is mostly about the stream parsers that transform that representation (and then recostruct markup out of it again), but lazily I find I can take the initial broken down version, do a few standard manipulations, and reconstruct (with enlive/emit*)
14:21munderwoHi all. I'm playing around with testing in clojure (actually all of clojure really, just learning) and also the clojure koans. When I run the koans using lein it keeps the jam up and watches the code for changes, and automatically re-runs the tests. How do I get my own code to do that?
14:22Morgawrhello... I'm trying to run some simple clojure function from java (eclipse project). I cannot, for the life of me, manage to get it to run... I'm following this example http://clojurefun.wordpress.com/2012/12/24/invoking-clojure-code-from-java/ and it keeps saying Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/RT
14:22MorgawrI have added the clojure-1.5.1.jar to the eclipse project
14:22Morgawrany idea how to do this?
14:24cmajor7Morgawr: if you have "import clojure.lang.RT", and you get "java.lang.NoClassDefFoundError" that means that jar is not in _runtime_ classpath
14:25cmajor7Morgawr: "clojure-1.5.1.jar" that is
14:25Morgawrcmajor7: I see
14:25MorgawrI'll try look
14:26clgvMorgawr: install Counterclockwise plugin for Eclipse and add the Clojure nature to the project or create a new clojure project
14:26cmajor7Morgawr: http://stackoverflow.com/questions/9282440/how-do-i-edit-the-runtime-classpath-in-eclipse
14:26lynaghkbbloom: ping
14:27Morgawrclgv: I have counterclockwise but I don't want to add a new project, I'll look at the classpath thing
14:27bbloomlynaghk: pong
14:27lynaghkbbloom: are you aware of anyone using your pretty printing library to make a gofmt sort of thing for Clojure?
14:27clgvMorgawr: feel free to shoot yourself in the foot then ;)
14:27lynaghkI found an IRC log of you talking about it last year
14:27lynaghkgofmt and Clojure, that is.
14:28lynaghkIn particular, we're standing up a CI server and I'm thinking of some nice things to organize our Clojure projects with.
14:28technomancyjust shell out to emacs
14:28bbloomlynaghk: nothing i know of
14:28technomancy=D
14:28hiredmanlynaghk: lein-bikeshed?
14:28lynaghktechnomancy: you jest, but...
14:29lynaghkhiredman: don't worry, I'm well aware = )
14:29hiredmanok :)
14:29Morgawrclgv: yeah I know, I appreciate the help :P This is just a quick braindead test.. anyhow doing as cmajor7 said worked, I just forgot to add the clojure jar to the actual classpath
14:29lynaghkhiredman: I just want the diffs to be less noisy, and that everyone's editor has a "helpfully 'fix' indentation by default" policy it's going to get out of hand.
14:30hiredmanah
14:30lynaghkDon't worry, though, I intend on having a nice submission for the "emerging editors" Strange Loop track next year.
14:39nightshade427Hi all :)
14:40allenj12clojure.lang.lazyseq cannot be cast to clojure.lang.IFn dows that mean im using a seq inplace of a funtion somewhere?
14:40justin_smithallenj12: yeah, it means a lazy seq is getting called
14:41callen,((map identity (range 10)) 'blah)
14:41clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn>
14:41scriptoryou might have the wrong argument order somewhere
14:41callen,((map identity (range 10)) :it :does :not :matter :what :you :put :here)
14:41clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn>
14:42indigoMan, why does Pedestal exist
14:42callenindigo: god hates us all
14:42indigocallen: It feels like it goes against the Clojure philosophy
14:42callenit does.
14:42callenindigo: the Relevance/Cognitect(?) guys wanted a somewhat...involved CLJ + CLJS framework that was very aggressively complicated in ways that are useful to the kinds of things they make.
14:43callenI don't think they made it with the intention of it becoming the web stack of choice for Clojure, at least, I hope not. That would be crazy.
14:43indigoBut isn't rhickey part of Cognitect now
14:43callenHickey has always been part of Datomic and Relevance AFAIK
14:43rkneufeldindigo: yep, we're working to simplify things in pedestal-app as well, but it'll be a long process.
14:43callenrkneufeld: thanks for merging that PR btw. I'll be working on that today.
14:44rkneufeldcallen: good stuff
14:44callenrkneufeld: I have to check in on a functional JS meetup talking about Clojure first, but then I'll crank out the improvements to the Korma chapter. These will include not only more involved/interesting examples, but I'll make it REPL friendly too.
14:44scriptorwhat happened to http://clojure.com/reading.html?
14:44callenrkneufeld: would you be amenable to a brief prelude at the beginning explaining how to get the sqlite database rolling for the examples?
14:44callen(I'm switching it to SQLite so that readers don't have to get PG or MySQL installed)
14:45indigorkneufeld: Cool :)
14:45rkneufeldcallen: Yeah I think so. We have one or two other recipes that have a non-negligible amount of setup.
14:45callenthe chapter is already REPL friendly, technically, but again, I don't think Postgres configuration is reasonable to ask of new people.
14:45callenso off to the land of fake SQL it is.
14:45technomancycallen: don't do that
14:45xeqicallen: how about h2 so you can just include a dependency?
14:46nightshade427Let me preface with I'm not trolling I genuinely am curious. I saw this and was wondering how it is different than things already done in scheme and Common Lisp for example. Is it so we can have this sorta thing on clojure platform as well? Just curious since from the sound of things on twitter people are "salivating" over it was wondering if there was something new about it.. https://github.com/clojure-numerics/expresso
14:46callenxeqi: even better.
14:46technomancyuse h2
14:46callentechnomancy: okay. that's fine.
14:46callengood idea guys, I forgot H2 existed :)
14:46technomancythe jdbc drivers for sqlite are sad face
14:46callenNot sure that matters for Korma.
14:46callenbut duly noted.
14:46callennow I'm really glad I brought this up here :)
14:47shaungilchristnightshade427: yes I think the draw is that it is in/plays nice with clojure
14:47hiredmantechnomancy: actually unless you pass a special option to h2 it explodes if you try to use it concurrently
14:47callenhiredman: errrr
14:47hiredmanso derby
14:47technomancyhiredman: sqlite doesn't even have a special option tho
14:47rkneufeldI don't know that this will be an issue in the context of the recipe. The aim is to have something people can play with at the REPL.
14:47technomancywell, it does, but it doesn't work
14:47nightshade427shaungilchrist: Okay thanks was just checking :)
14:48technomancybut sure, derby =)
14:48callenrkneufeld: the initial suggestion of h2 was an improvement regardless. I'll let them finish bikeshedding if they want :P
14:48callendoes derby vs. H2 really matter for a small REPL example designed to teach a library?
14:49rkneufeldcallen: I like it for this purpose, too. We're probably going to go with lein-try as a standard across the book. IMO as little setup code as possible is best.
14:49callenrkneufeld: oh I already planned on using your plugin for this.
14:49callenno shim projects here :)
14:49callenlein-try is perfect for this kind of book.
14:49rkneufeldcallen: I made it specifically for it, actually ;)
14:49callenI'm grateful it exists either way.
14:49rkneufeldFallout was that it was kind of useful in general.
14:50nDufftechnomancy: sqlite doesn't so much explode as spend all its time waiting for locks when used concurrently out-of-the-box, unless the JDBC drivers _really_ break it.
14:50rkneufeldThanks.
14:50callenrkneufeld: I use it to poke at libraries all the time.
14:50nDuffs/locks/filesystem-level locks/
14:50indigocallen: Wait, are you the author of Korma
14:50callenindigo: no no. that's Chris Granger.
14:50callenI'm the "whip" for Korma.
14:51indigoAhhh
14:51allenj12https://www.refheap.com/18958 at line 31 is there a sequence that shouldnt be? i dont think i like clojure errors
14:51callenindigo: If you abandon a PR on Korma's github I hunt your ass down and make you write the unit tests.
14:51indigoBut I always write unit tests if I do a PR :P
14:52callenrkneufeld: also, I've been thinking about documenting formatting and the like - are you using asciidoc for the whole Clojure Cookbook?
14:52callenindigo: well, not everybody is like you.
14:52indigoIn fact my PRs are probably the best quality code that I write :P
14:52callenindigo: you can check my Twitter feed to see what I mean.
14:52callenI don't doubt their PRs are probably some of their best code too, but people forget to write regression/unit tests.
14:52rkneufeldI'm actually working on that part of the front matter right now in the conventions branch. You're welcome to take over if you think you can do it this week. I just want to wrap it up before we start writing new recipes and fixing others.
14:52callenso...I go Dog the Bounty Hunter on them.
14:53callenrkneufeld: hum, no just curious about how to do the authoring side because I might be starting something after Clojure Cup.
14:53callenwanted to know if you had any recommendations or if asciidoc was working for you.
14:53rkneufeldPersonally if I was not doing an O'Reilly book that required Asciidoc I would consider something else/.
14:53borkdudetoday I corrected a bug in a validation function… (let [val get m key] ..) -> (let [val (get m key)] ...
14:53indigoHaha nice
14:54rkneufeldMarkdown if possible; it is less capable, but much easier to work with
14:54indigoGlad to see Clojure has such a vibrant community
14:54callens4muel: are you ouvanous?
14:54borkdudeI used org-mode to write this online 'book': http://michielborkent/clojurecursus
14:54callenborkdude: ...com?
14:54borkdudetypo: http://michielborkent.nl/clojurecursus/
14:54rkneufeldindigo: Clojure's IRC is crazy active, but I'm always surprised how inactive the subreddit for it is (in terms of comments)
14:55borkdudethe text is actually here http://michielborkent.nl/clojurecursus/dictaat.html
14:55callenrkneufeld: reddit is...not a nice place.
14:55callenthere are weird java people on there.
14:55callenthe java devs on Reddit are really defensive.
14:55callenyogthos complains about it all the time :)
14:55rkneufeldcallen: interesting, I hadn't heard that before.
14:55indigorkneufeld: Probably because real development is done on IRC/github :P
14:55indigoMailing lists, too
14:56callenthat too ^^
14:56callenvt100 or bust.
14:56indigoBut just for kicks I subscribed to /r/clojure
14:56TimMcWho mods /r/clojure?
14:56borkdudeI hardly use the mailing list for clojure - usually twitter and irc .. don't know why
14:56rkneufeldindigo: It's still my goto place to see what articles are in vogue at present.
14:56TimMc(I currently have reddit on Leechblock, so I can't check for myself.)
14:56indigoThat usually HN for me
14:57callenTimMc: icey, hickey, chouser, cgrand, gnuvince, mac, fogus.
14:57borkdudeI follow @newsycombinator on twitter which gives me the most important updates
14:57TimMcWhoa, lots of mods.
14:57TimMc(thanks)
14:57rkneufeldI don't know that many of them actively mod it
14:57callenthey don't
14:57callenthere's nothing to mod! (hee haw)
14:58rkneufeldcallen: hehe. Well, if we ever want to change direction there I could reach out to Rich/Fogus/whomever.
14:58indigoI like reading the comments
14:58indigoThere are some really dumb responses ;P
14:58callenposting to r/clojure right now :P
14:58indigoI should post clauth to /r/clojure
14:59indigoMaybe someone can figure out why it has what I think is a race condition
14:59TimMcI never think to announce new projects there.
14:59callenthere, post made.
15:00scriptoreven r/programming isn't as active as other large subs
15:01callenbecause cat pictures.
15:02indigoNot everyone's a programmer
15:02callenPrismatic + Twitter has replaced most of what I used Twitter for. Dev stuff is IRC + Twitter + mailing lists
15:02munderwoHi all. I've got this snippet https://www.refheap.com/b3ac94bc7029d9f3d051a35ca its a ring handler. Im sending json in the body, and I think I understand that "foodtruck" is not a map that I can just add keys to. Ideally what I want is the body from the request (foodtruck) and add a map to it. How do I do this?
15:02indigoI think Reddit's demographic has shifted since it's become more mainstream
15:02indigos/it's/its/
15:02bosieindigo: towards even whiter folks?
15:03bosiecallen: how do you get Prismatic to not show so much nosie though?
15:03callenbosie: complaining at the Prismatic devs everytime their algorithm fails and shoves labia in my face instead of Clojure/dependent types posts.
15:03callentwitter is amazing for tech support.
15:04bosiecallen: i do that hehe
15:04indigoBleh... I got on twitter too late so I couldn't take sparkhom
15:04bosiecallen: it just seems to be so fluctuating to me
15:04technomancytwitter is great for tech support as a user
15:04technomancypretty rotten for it as a maintainer though =\
15:04bosiecallen: sometimes i have like a top10 postlist that is superb all the way to the last post and then i have things (esp cycling related) that is just rubbish
15:05callenbosie: I watched the strange loop keynote from the prismatic employee, cool stuff.
15:05callenshe did a good job of emphasizing the importance of feature extraction.
15:05bosiesure
15:06bosielet me google for that
15:06callenbosie: you can't.
15:06callenbosie: it
15:06callenis locked up for 6 months because they partner with InfoQ
15:06bosie:(
15:06callenI watched it with a coworker who got to go to Strange Loop
15:06callen(I didn't get to go)
15:06callenshe used the projector in a meeting room and is letting me catch up on the talks that way.
15:06justin_smithmunderwo: there is a ring handler that detects json in the request body and turns it into a map
15:07cmajor7callen: what is the keynote about?
15:07justin_smithor you could do that processing manually with cheshire if you really wanted to
15:07bosiecallen: great
15:07callencmajor7: about making Prismatic.
15:07callencmajor7: mostly the data analysis parts.
15:07callenfairly lightweight talk but fun.
15:07callenbonus: cat gifs.
15:07justin_smithmunderwo: ring.middleware.json/wrap-json-params
15:08munderwojustin_smith: right, I think that already happens, I think I have a middleware that does that. so when food truck comes in its the entire request in a map? or just the body (this is a post handler)
15:08bosiecallen: we cant watch lambda-calculus-deriving maths all day long... ;)
15:08cmajor7callen: https://thestrangeloop.com/sessions/machine-learning-for-relevance-and-serendipity ?
15:08bosiecallen: was it jenny finkel?
15:09jbrechtelShe gave a keynote at StrangeLoop about making Prismatic
15:09jbrechtelalmost certainly her talk
15:10justin_smithmunderwo: ah, I see. yeah, you get a bunch of info in the request. What I like to do is start a repl in the same process running ring, and in the ns with my controller: (defonce debug (atom nil)) (defn my-controller [request] (reset! debug request) ...) then I can just play with the request in the repl and see what I can do with what comes in
15:10bosiecallen: any idea if there is an android app coming?
15:10justin_smithespecailly when my frontend guy is simultaneously developing, and maybe deciding what he wants his request to look like, this helps us converge
15:10tos9!3
15:10jbrechtelbosie: Someone asked that question after her talk. She said they don't have specific plans for it right now (not on their schedule) but it's one of their most request features. :/
15:11munderwojustin_smith: oh I don't know how to do that. whats the debug lib? Im coming from Python so being able to break into a repl as some point and looking around would be really helpful.
15:11justin_smithmunderwo: it is not a lib
15:11justin_smithI just create an atom and call it debug
15:11justin_smiththen use it in a repl to see what I can do with it
15:12bosiejbrechtel: indeed ':/'
15:12justin_smithmunderwo: you can use clojure.tools.nrepl to spawn a repl server from inside your app
15:12justin_smiththen connect to it from your editor or with lein repl connect <port>
15:13munderwojustin_smith: ahh cool. I'll give that a go. Just struggling up the learning curve atm :)
15:13justin_smithmunderwo: having everything in a repl where you can manipulate it definitely speeds learning
15:13callenbosie: no idea, I own an iPhone.
15:14munderwojustin_smith: Yeah, I think the issue is getting your head around how to get it all in the repl :)
15:14justin_smithmunderwo: https://github.com/clojure/tools.nrepl that page describes how to pull in the dep and how to start an nrepl server from inside your code
15:14callencmajor7: think so.
15:14justin_smithonce you have the repl, you can then (require '[my.controller.namespace :as control]) @control/debug
15:15justin_smithto see the contents of that atom, which gets reset with each request
15:15Jardaok, I need a very simple http-json-service. Is ring with compojure the way to go?
15:15BrackiComing from python when I define [& :keys [foo bar]] how do I pass those elsewhere without (baz :foo foo :bar bar) but rather what `**kwargs` would do?
15:16JardaI need to have authentication and serving of json
15:16justin_smithBracki: [& keys [foo bar] :as baz]
15:16callenBracki: kwargs type code isn't as idiomatic in Clojure as it is in Python, just so you know.
15:16callenIt's fine, there's nothing "wrong" with it, just be aware.
15:17TimMcYes there is. o\__/o
15:17hyPiRion~mapply
15:17clojurebotYou have to do something like (defn mapply [f & args] (apply f (apply concat (butlast args) (last args)))), which just goes to show why unrolled keyword args are a bad idea
15:18Bracki,paste
15:18clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: paste in this context, compiling:(NO_SOURCE_PATH:0:0)>
15:19TimMcBracki: A better arglist looks like [a b {:keys [foo bar] :as opts}]. The :as opts is optional, and you can also do something like [a b & [{:keys [foo bar]}]] if you want to make the entire options map itself optional.
15:20Jardaabout naming conventions should I have src/my_server or src/my-server or src/myserver or src/my/server ?
15:20TimMcJarda: Definitely not src/my-server, since paths have to have underscores instead of hyphens. :-)
15:20Brackihttp://pastebin.com/59JTLvvF is what I have now
15:21callenBracki: I realizing humping the args/kwargs is the only way to do metaprogramming Python, but you can do better in Clojure.
15:21JardaTimMc: ok
15:21JardaTimMc: but underscores are ok?
15:22TimMcYes, they correspond to hyphens in namespace names.
15:22BrackiWhat I really want is, if JavaType take java thing, otherwise take a map and construct java thing.
15:22Jardaso I can say (:use [my-server]) ?
15:22TimMcJarda: So namespace foo.bar-baz lives in foo/bar_baz.clj in your src dir.
15:22Jardaok thanks
15:23TimMcJarda: You generally want more than one segment in the name; single-segment namespaces can have classloader problems.
15:23TimMcFor that reason, my.server (src/my/server.clj) would be better.
15:23justin_smithJarda: also, while use comes up in all the example code you find on the web, it leads to hard to maintain codebases in my experience, it is better to :require with an alias, so when you need to split or refactor namespaces you can see where each function called came from
15:24Jardajustin_smith: yes I'm doing it
15:24justin_smithok, just figured I'd mention
15:24Jardathanks all. This channel is a life saver
15:27jtoyi see that I can't do multiple line-seqs on a file, how would I do that? Im trying to do this: https://www.refheap.com/18961
15:27jtoyi want to do several different counts on a file
15:28`cbpjtoy: make a local that holds the line-seq above p-count
15:29BrackiTo rephrase it: (def foo(new Foo x y z)), (defn bar [foo]). If foo is a Foo cool, if foo is map construct Foo. Is that common practice?
15:29nDuffHuh. Somewhat disappointed to see that not many other folks are using clojure.osgi
15:29jtoy`cbp: im not exactly sure what that means, like my-lineseq (line-seq rdr) ,then i can use my-linesq and line-seq seperately?
15:29nDuff(or, at least, nobody else has updated it for 1.5.x yet)
15:30rossterHas anyone had any success with using rubygems in clojure projects by compiling them to jars using jruby?
15:31rossterI have manged to get my own ruby code compiled in to a jar and can call it from my clojure project, but I am struggling doing the same with a gem
15:31rossterAny help would really be appreciated
15:32`cbpjtoy: (let [ls (line-seq rdr) ... at the top
15:32`cbpthen just reuse ls
15:34`cbpjtoy: line-seq creates a lazy seq of lines. Once you realize it (by using filter/count) the reader will be fully 'read' so you can't really do anything else with it. But you can reuse the seq you have
15:35`cbpBracki: that's what protocols are for
15:36jtoyI use, thank you `cbp
15:36jtoyI see
15:36`cbpBracki: doing stuff according to type i mean
15:37nDuffrosster: if you can show us how you call something from Java, we should be able to help you call it from Clojure.
15:40rossternDuff: I am not actually using java (directly anyway), I basically want to take my ruby code and call it from clojure. I have managed to do this, but now that I have added a gem to the project, it seems to be causing problems
15:40rossterThe steps I am doing are as follows:
15:41rossterjar -cf path/to/myjar.jar -C /path/to/the/gems/ .
15:41rossterthat creates the jar file
15:41nDuffrosster: if that jar includes .gem files rather than .class files, it's not actually compiled.
15:41rossterand seems to be correct when i inspect it with "jar -tf myjar.jar | less"
15:41rossterahh, i see
15:42rossterso I need to first compile the gem with jrubyc i guess
15:43nDuffThe exact tooling/process would be a question for the JRuby folks, but something like that, yes.
15:43callenI need a life insurance beneficiary. What's a good organization?
15:43nDuffthe EFF?
15:43callenDunzo. Thanks.
15:45llasramrosster: What you probably actually want to do is use Clojure to call the Java API exposed for accessing the JRuby runtime
15:46llasramLast I checked, jrubyc is not a general-purpose tool. IIRC it basically wraps a ruby script in a class, so that the actual source is embedded in the class
15:46rossternDuff: thanks, checking out jruby forums seeing if someone else has done it
15:46llasramrosster: This talk has some info: http://www.infoq.com/presentations/Good-Bad-Ugly-Clojure-JRuby
15:46rossterllasram: thanks I see, then I wouldnt need the ruby files compiled
15:47rossterthanks will check it out now
15:47llasramFor the JRuby Java API, check out org.jruby.javasupport.JavaEmbedUtils
16:20BrackiHow do I publish my project to clojars? And, how do I include a dependency on an artifact in a non public/self hosted maven repo?
16:20Raynesgf3: hi
16:21jbrechtelBracki: Regarding the dependency you'd include it just like any other dependency. Whoever resolves the dependencies just needs to have a repository with the artifact in their list of repositories.
16:22BrackiCan't I fatjar and just include it?
16:22jbrechtelBracki: Also, clojars has a 'dead easy' description of how to publish on their homepage: https://clojars.org/
16:23jbrechtelBracki: Haven't done that with a Clojure project but I can't imagine why it wouldn't work...the classes would end up in the classpath. The risk being that if someone else uses a different version of your dependency explicitly then you'll be in a difficult to debug state. But I suppose if the dependency is in a non-public repo to begin with then that's rather unlikely.
16:23Brackijbrechtel: ok, cool.
16:25trptcolintrying to reason through some core.async (cljs) tests - i don't see any way to guarantee that assertions in a go block ever get run (https://github.com/clojure/core.async/blob/master/src/test/cljs/cljs/core/async/tests.cljs#L29-L49)
16:26trptcolini.e. i can throw (is= 1 2) in there and that test passes too.
16:26tbaldridgetrptcolin: there isn't really
16:27trptcolintbaldridge: ok cool, glad i'm not going crazy.
16:30trptcolinactually i guess my real question underlying this: is there a way i can exercise & test what happens in some go block? aside from manually testing it?
16:30trptcolinor some crazy with-redefs voodoo
16:35tbaldridgetrptcolin: yeah, give me a few minutes to finish this phone call
16:35trptcolinawesome, sure thing
16:36amalloytrptcolin: i guess all you can do is test what comes out of it, right?
16:37trptcolinamalloy: in clojure-jvm i could do a blocking take
16:40tbaldridgetrptcolin: the things I did when right those tests that helped was use timeout channels and other go block to check the returns. Also have each test print out "testing...." so you can see if it started running.
16:41tbaldridgeAnd then realize that some browsers (like chrome) barf up errors into the console. so if you get an assertion failure you will see a console error.
16:41tbaldridgebut yeah, all those options stink, and I don't have a solid answer.
16:41trptcolintbaldridge: hmm, but i think those other go blocks' assertions don't actually get run
16:43trptcolin... since i added some obviously false assertions and the tests still passed. but i'm actually not seeing the "testing..." output via `lein test`, so maybe something else is wrong too...
16:44tbaldridgetrptcolin: oh yeah, the cljs tests don't run via lein test
16:44trptcolindoh, just came to that same conclusion
16:47trptcolinok, got it, and i guess when they run in the browser via script/runtests.html the failed results can happen async and everything's cool
16:47trptcolinthis makes a lot more sense now, thanks
16:49allenj12hello peeps
16:51BrackiHm, how do I deploy a uberjar to clojars?
16:53TimMcBracki: Clojars has information on that, yeah?
16:54technomancythat's not really what clojars is for
16:54technomancyit's meant for libraries
16:55grav_Is it possible (and idiomatic) to use macros for hiding a global variable?
16:55grav_Ops, sorry, I'll just change username and repeat the question :-)
16:56klokbaskeIs it possible (and idiomatic) to use macros for hiding a global variable?
16:56jweissthis may of may not help you but i wrote a lein plugin where if you have the plugin you can execute any clojars project - https://github.com/weissjeffm/lein-runproject
16:56klokbaskeI have an output device which has two buffers, and I have to keep track of the active buffer myself, so I was thinking about hiding it in a macro
16:56callenjweiss: https://github.com/rkneufeld/lein-try ?
16:57jweisscallen: that's what my plugin is based on
16:57Brackitechnomancy: I know, but I have to workaround the problem that I depend on a Java lib that hasn't been published to MVN central...
16:57jweissbut lein try is more for starting a repl than running :main
16:57jweissBracki: you could publish it to clojars
16:58Brackihow?
16:58clojurebotwith style and grace
17:00jweissBracki: you'd write a short project.clj for it and specify its deps (if any) then deploy it.
17:00gf3Raynes: Hay friend
17:02BrackiAh, I see. scp to the rescue...
17:04TimMcBracki: And it is that dependency that you are pushing to clojars?
17:04mikerodif you have a var, such as (def myvar (Object.)), when would this (Object.) be eligible for garbage collection? (alter-var-root myvar (constantly nil)) ; would that do it?
17:04TimMcOh, I see -- you're pushing an uberjar containing that dep along with your code. No, better to get just that dependency onto clojars by itself.
17:05hyPiRionmikerod: yes
17:05mikerod(despite alter-var-root being messy)
17:05mikerodhyPiRion: is there a better way to signal you are done with the var's value and would like it garbage collected? (this is coming up in a series of test namespaces)
17:06mikerodI was thinking
17:06BrackiTimMc: yes
17:06hyPiRiondon't use it as a var if you want it garbage collected
17:07BrackiTimMc: just the dependency, no uberjar
17:07mikerod(def myvar (atom (Object.)) >> then >> (swap! myvar (constantly nil))
17:07mikerodthe reference is shared across many testing functions
17:07TEttingerBracki, heh I've been there
17:07mikerodthen I'm done with it
17:08mikerodI guess I could just do a fixture that dynamically binds it once for all tests or something like that
17:08mdeboardAre there any live repls out there for clojurescript?
17:08BrackiShould I even worry about GPG or just ignore it?
17:08hyPiRionwhy would you bother to clean up after tests? They aren't loaded when you're uberjaring or `lein run`ing etc
17:08mikerodhurting test performance...
17:08mikerodvar holds a resource that is expensive to load
17:09mikerodand each test needs a different one of these expensive resources
17:09TimMcBracki: I don't know if you can easily combine GPG with jars that lein didn't build itself.
17:09seangrov`mdeboard: austin?
17:09hyPiRionso you're benchmarking and testing? Well. I'd guess (alter-var-root ) and then (System/gc) would do it
17:09mikerodnot benchmarking, it is just annoying to have slow tests
17:10mikerodthat sounds fine to me though. if it is any different to you, we are using clojure-maven-plugin (I know, I know; lein is superior)
17:12allenj12https://www.refheap.com/18965 anyone know why that for loop isnt getting called?
17:12hyPiRionwell, you could also put the computation in a delay, and then deref it inside the tests
17:12hyPiRionif you want to avoid loading it when you're not running those specific tests
17:13mdeboardseangrov`: Sorry?
17:14mdeboardseangrov`: I'm not in or named austin :P A coworker of mine is bitching about CLJS without ever having touched it, and is asking if there's a live "interpreter" like coffeescript.org has
17:14mikerodhyPiRion: I didn't think about that as far as delaying the load time actually (I even used `delay` in this sentence, ironic).
17:15mikerodI'm still thinking we may benefit from having it able to be GC'ed after the test is done, but that is helpful
17:15scriptormdeboard: http://himera.herokuapp.com/index.html
17:15hyPiRionmikerod: you can still alter-var-root it afterwards
17:15hyPiRion(and gc)
17:16mikerodhyPiRion: Indeed. Thanks for the advice!
17:16hyPiRionnp
17:16mdeboardscriptor: Awesome, thanks. Does this have the ability to output the javascript at all?
17:17BrackiHaha, success! Thanks for the help. Retrieving clj-nsca/clj-nsca/0.0.1/clj-nsca-0.0.1.pom from clojars
17:17scriptorhmm, not sure
17:17dnolenmdeboard: just wrap in (fn [] ...)
17:17seangrov`mdeboard: oh, I see, I was suggestion cemerick's austin, it's a great setup for cljs repl
17:17scriptorwoah, I didn't know what was possible
17:17dnolenmdeboard: but CLJS ain't CoffeeScript we don't try to produce anything pretty - and source maps have landed (though needs some touching up)
17:18seangrov`But it's not a web-based repl, there's this though http://www.clojurescript.net/
17:18scriptormdeboard: on top of what dnolen said, this page is pretty nice as a learning aid http://himera.herokuapp.com/synonym.html
17:20mdeboarddnolen: No, I get it. I told him about the 'prettyprint' option etc.
17:21scriptormdeboard: what are his points, anyway?
17:23mdeboardscriptor: That he is leery of languages that hide the fact you're writing javascript, he cites GWT as example. That's a general concern of his, he doesn't know much/anything about cljs except what was in rhickey's talk last week. I've just been bleating about channels the psat couple days
17:23scriptorhis strange loop talk?
17:23mdeboardyeah
17:23scriptorgood talk, but I don't remember a lot of specific mentions of cljs
17:23scriptorother than that async works in it
17:24mdeboardexactly :P
17:24scriptorother than that async works in it
17:24scriptorer, disregard
17:25nDuffmdeboard: there's also clojurescript.net, which is running a self-hosting fork.
17:25mdeboarddnolen: Is the current maven artifact for clojurescript working with core.async now?
17:27allenj12you can have the else of a for loop just dove right into a (let...) right?
17:28dnolenmdeboard: don't think so
17:28dnolenmdeboard: rhickey landed some new goodies, would like to see those ported and tested so perhaps soon?
17:31mdeboarddnolen: I see, the channel map/reduce deals? That looked great
17:31dnolenyes, happy to see those are to make into the lib
17:31pbostromallenj12: for is lazy, you might want doseq instead
17:31dnoleninstead of seeing them replicated everywhere
17:31dnolenthe mixing stuff looks cool, need to play w/ that.
17:31nopromptdnolen: looks like we figured out the bug the other day, it was mapcat.
17:32dnolennoprompt: sorry context is gone, mapcat?
17:32allenj12pbostrom: o ill try it
17:32nopromptdnolen: wrt our conversation yesterday about dynamic vars in cljs. it turns out they weren't the culprit.
17:32allenj12pbostrom: do i keep the (do...) with doseq?
17:32dnolennoprompt: good to hear, but a bug or not a bug?
17:33pbostromallenj12: it won't hurt, but doseq should have an implicit do
17:33nopromptdnolen: i'm not sure if it's a bug or not, but according to the PR author the behavior of `mapcat` is different in cljs.
17:34dnolennoprompt: sounds like a bug - different how?
17:34allenj12pbostrom: ThNX!
17:35nopromptdnolen: i'm not exactly sure. i'll ask for some more details in the thread.
17:36amalloynoprompt, dnolen: a quick peek at the source makes me think mapcat is more lazy in cljs than in clj-jvm
17:36allenj12pbostrom: is there a way once i find an answer to stop and ouput cause it seems to solve but keeps going through the loop and laying out all configurations lol
17:38amalloybecause jvm's versions of apply, concat, and mapcat dispatch on arities up to 4, it has to realize the first four-ish elements of each input collection; if this doesn't happen in cljs, it might expose the error in some code that incorrectly depends on it being realized earlier, eg by expecting a dynamic var to be bound
17:39nopromptamalloy: ha, i was just about to ask you if that would have any effect on realization.
17:40nopromptdnolen: let me see if i can't replicate the issue.
17:52squidz[5~
17:52rasmustosquidz: gesundheit
18:12allenj12is there an idiomatic way to "break" when in a recursive funtion that tries to complete a doseq
18:14nopromptdnolen: here's the gist https://gist.github.com/noprompt/6691714
18:15nopromptdnolen: i suppose i could simplify it abit.
18:16rasmustoallenj12: you can (doseq [blah someseq :while (somecondition)] (do foo), dunno if that helps
18:16dnolennoprompt: I don't know why people think that should work
18:16dnolennoprompt: you need a doall around the mapcat
18:16dnolennoprompt: which is what amalloy was alluding to
18:17nopromptdnolen: really? but why the difference between clj and cljs?
18:17dnolennoprompt: different implementation but the fact that it works in clj is sheer luck
18:17amalloynoprompt: yeah, that is rubbish. in a perfect world, (binding [foo bar] (mapcat ...)) is exactly identical to (mapcat ...)
18:17allenj12rasmusto: wait so could i make a global variable and set it to true when the condition is met. because even if one doseq break i have a whole recurive chain of doeqs left
18:18nopromptwell ok. i feel like an idiot.
18:18amalloyclj-jvm does some optimizations that make things more eager, which means it sometimes works
18:18rasmustoallenj12: no, I'm not saying to make a global variable, are you saying that your doseqs are called recursively and could be infinite at any of those calls?
18:18allenj12rasmusto: im gonna try that but ill also show my code
18:18dnolennoprompt: nah, binding + laziness burns pretty everyone at least once
18:18amalloyat least twice, really
18:19dnolenhaha
18:19BrackiThis whole map,:keys as arguments keeps confusing me. Are (foo {:a 1 :b 1}) and (foo :a 1 :b 1} equivalent?
18:19allenj12rasmusto: not infinite but can check a whole search space... so close to infinite as far as memory is concerned
18:19nopromptwow, well that was an easy fix.
18:19noprompt:P
18:19allenj12rasmusto: https://www.refheap.com/18968 it recurively call a-start towards the bottom
18:19rasmustoallenj12: do you use 'for' to make them lazy?
18:20allenj12rasmusto: no because it wouldnt print at all remember? :P
18:20amalloyBracki: no
18:20Brackiamalloy: How do I convert the first into the second?
18:21rasmustowell, doseq'll realize them unless you give them a stop condition afaik
18:21noprompti need to start a blog titled "Clojure Burns"
18:22nopromptthe good thing is i can delete some code now. :)
18:25Glenjaminis it better to use a binding over just passing the context into an inner function in the above example?
18:27TEttingergah super noob question. I need to convert this line of java to clojure: atlas = new TextureAtlas(Gdx.files.internal("packedimages/pack"));
18:27TEttingerfiles is static, and I can't figure out how to do the . on a static public member
18:27TimMcnoprompt: I would like that.
18:28allenj12rasmusto: so would a global variable be "taboo" i dont see how else to make the stop condition w/o one. im probably not being clever enough tho
18:29GlenjaminTEttinger maybe this? http://clojure.org/java_interop#Java%20Interop-Classname/staticField
18:29TimMcnoprompt: It would make a good clojure-docs section as well.
18:29cmajor7TEttinger: (TextureAtlas. (.internal Gdx$files "packedimages/pack"))
18:30TEttingercmajor7, really this is a use for $ ? I thought I wouldn't need it, thanks
18:30nopromptTimMc: if i could just find the time and motivation to blog though.
18:30cmajor7TEttinger: or if "internal" is static => (TextureAtlas. (Gdx$files/internal "packedimages/pack"))
18:30TEttingerI will check
18:31TEttinger(inc cmajor7)
18:31lazybot⇒ 1
18:31muhoowow, that's kinky
18:31TimMcnoprompt: Would you like some motivation? I could threaten to throw a wolverine into your bed if you don't do it.
18:31nopromptehf, this programming stuff is not for the faint of heart.
18:31nopromptTimMc: that would probably kill me.
18:32TEttingercmajor7, nope. Caused by: java.lang.RuntimeException: Unable to resolve symbol: Gdx$files in this context
18:32Glenjamintry Gdx/files
18:32Glenjaminif it's a static member of Gdx
18:32noprompt*sigh* i was offered another front-end javascript job this week. they're not interested in cljs. :(
18:32Glenjaminso (.internal Gdx/files "packedimages/pack")
18:33cmajor7TEttinger: ok, I thought "files" is inner class. If it is static, then Gdx/files
18:33TEttingercmajor7, Glenjamin, thanks, I'll keep at it
18:33allenj12Tettinger: o hey were u the one interested in my A*
18:33TEttingeryup
18:33nopromptdnolen: i need a good sales pitch. :)
18:33muhoonoprompt: do it on contract?
18:34nopromptmuhoo: no it's a *job* job.
18:34muhooi.e. "i'll deliver this thing adn you needn't worry about what language it's written in"
18:34allenj12Tettinger: if u wanna see progress its here https://www.refheap.com/18968 just need to make a breaking point somehow and i should be good to go
18:35hyPiRionmuhoo: "But I want to hire some guy later if something goes wrong, and I need to ensure I can get a guy understanding said language"
18:35dnolennoprompt: heh, well I'm assuming that's because they have maintain it?
18:35scriptornoprompt: the vast majority of places aren't, unfortunately
18:35muhoonoprompt: oh, then the sales pitch is "you won't need another headcount". and if you think you can do it a lot faster/better in cljs than js, "it'll cost you a shit-ton less money and will ship faster if i do it turnkey in cljs"
18:35nopromptmuhoo: contract js sure. but i get to write clj/cljs at my current job (cause i work alone and call the shots). asking me to give that up and write raw js, is eh, not the direction i want to move in.
18:36nopromptdnolen: they're mostly afraid that if i left no one could maintain it.
18:36dnolennoprompt: right
18:36nopromptdnolen: but i assure them i was more than willing to explain it.
18:36nopromptand that i wouldn't bail in like a year or something.
18:36scriptorgetting a whole team to learn a new language takes time
18:37muhoonoprompt: there's nothing wrong with walking away from the offer.
18:37Brackihttps://github.com/bracki/clj-nsca/blob/master/src/clj_nsca/core.clj#L8 <- I assume this isn't the best way of doing it. Should I just take a single argument instead?
18:37hyPiRionGetting a whole team to understand a codebase may take significantly much more time, actually.
18:37hyPiRionThat's the problem though, because people don't realize that.
18:37nopromptmuhoo: i know. it's just funny cause i know these people and it's like um, have you heard a word i've said the past year?
18:37technomancy"Use Clojure; you will have an easier time retaining easily-bored empolyees."
18:38technomancypractically sells itself
18:38talios"don't use hibernate, you'll not make them cry either" :)
18:39noprompttechnomancy: that's a bumper sticker.
18:39s4muelnoprompt: if they have not motivated themselves to not write "plain" javascript, it is doubtful you will be able to foist clojurescript on them as some sort of city on a hill, despite your admonitions to use cljs or clojure or god-please-just-no-more-js. Either it's political or they don't care
18:39nopromptI DON'T BELIEVE THE LIBERAL PROGRAMMING MEDIA.
18:40mdeboard^
18:40mdeboardBill O'Reilly is on to you guys.
18:40muhooit's all a conspiracy.
18:41taliosmmm, java code generated by the current frege compiler SO much nicer to deal with from java. nice.
18:41noprompts4muel: similar thoughts had crossed my mind. essentially, i think they want me to turn a pile of jQuery/underscore code in to something more sophisticated and maintainable. by the sound of what they wanted to do, the thought of writing that soley in pure javascript was horrifying.
18:42noprompti'm not saying you can't write large code bases in raw js. certainly you can with a strong team of competent people.
18:42nopromptbut if you're looking for one person to maintain a large code base in javascript, i don't think raw js is the way to go. i've seen what that looks like and it's not pretty.
18:43scriptornoprompt: have you worked on a large codebase in clojurescript?
18:43dnolenwriting a large pile of underscore.js and jQuery does not excite me
18:43mdeboard^
18:43nopromptscriptor: i'm working on one now.
18:43dnolennoprompt: so are you going to use Backbone ?
18:43mdeboardSmashing the DOM with $ until it succumbs to your will
18:43TEttingergahhh speaking of $
18:44dnolennoprompt: I don't really believe in MVC but it doesn't provide some modicum of structured thinking
18:44nopromptdnolen: no. i'd probably go with angularjs if there was absolutely no way i could convince them to think about letting me write clojurescript.
18:44dnolennoprompt: gotcha
18:44TEttingercan't seem to get this static mess of java interop to work
18:44dnolener s/doesn't/does re: MVC
18:44TEttingerhttps://github.com/libgdx/libgdx/blob/master/gdx/src/com/badlogic/gdx/Files.java?source=c#L61 this is the line I need to call
18:45TEttingerI keep getting a NPE with different variants on calls
18:45nopromptdnolen: it's less the sheer number of available resources for js, than it is mutability, quirks, and the overall "insane" vibe i get programming in the language.
18:46clj_less_newbynrepl
18:46TEttingerit;s possible Gdx is null....
18:46TEttinger(def packed (TextureAtlas. (.internal (. Gdx files) "res/slashem-packed/pack"))) ;; my current line
18:46clj_less_newbywhen clojure.tools.namesapce.refresh gives an error, is there a way to see it in emacs rather than the terminal where lein was started?
18:47nopromptidk, maybe i'm just a whiny little baby who doesn't have the cojones to brogram in js.
18:47Glenjaminheh, it depends what you define as "raw js"
18:48nopromptdnolen: are you still at the times? is clojurescript in use there?
18:48Glenjaminsplitting into proper modules and writing tests makes a big difference
18:48vijaykiranwhy does kibit suggest using (set ...) instead of (into {} ...) ?
18:48dnolennoprompt: yep, no CLJS as of yet, though someone presented it here and I wasn't involved at all so the word is getting out.
18:48BrackiCan somebody point me to a good multi arity, maps as arguments what not tutorial.
18:48amalloyTEttinger: i don't get it. that looks like the only possible way you could call it; if you get an NPE, then one of the following is null: Gdx, Gdx.files, or the result of calling .internal
18:49amalloyand you can easily test which of those it is
18:49TEttingeryep, on it
18:50nopromptdnolen: that's really cool. the application i'm working on now is clj/cljs and i'm hoping that when i share it with the other papers in the company it will raise awareness and gain some interest.
18:50TEttingeramalloy, it's files. files is nil. gaaaah
18:50nopromptdnolen: most of the developers in the company use js/php/python, so i'm kind of excited to share a "real world" solution written in clojure w/ the company.
18:51`cbpmore like a real language amirite
18:52amalloy`cbp: thanks man, what we really need in this channel is irrelevant bashing of other languages
18:52`cbp=P
18:53sinsnare|awayyyyTEttinger: libgdx!
18:54TEttingerhey sinsnare|awayyyy
18:54sinsnare|awayyyyhey, i have to go, but i saw a Gdx, and had to speak out!
18:54TEttingerwhat about it?
18:55TEttingerhave you gotten it to work?
18:55sinsnare|awayyyyim working on doing libgdx in multiple languages https://github.com/libgdx/libgdx/wiki/Using-libgdx-with-other-jvm-languages gonna add sub articles
18:55TEttingerah cool
18:55TEttingerwell if you know why files could possibly be nil...
18:55sinsnare|awayyyyworking on jython right now, and when i get frustrated with jython, clojure, then after i get frustrated...
18:55TEttingerGdx/files
18:55sinsnare|awayyyyit shouldnt be
18:56sinsnare|awayyyy#libgdx might be helpful, but i do have to go!!!
18:57sinsnare|awayyyy(.internal (. Gdx files) isnt how its done
18:57sinsnare|awayyyy(.internal Gdx/files "assets/droplet.png")
18:57sinsnare|awayyyybut yeah....
18:59rasmustoallenj12: sorry, I'm distracted atm. I don't think a global would be "idiomatic", to say the least. You may want to explore generating lazy seqs, and printing them out as you traverse them, making sure you don't fully realize them
19:02amalloyTEttinger, sinsnare: Gdx/files would be the more typical way to write it, but it will macroexpand to the same thing
19:02allenj12rasmusto: hmmm kk
19:03gfredericksis it weird that aset expands to a call to RT? do we expect the jvm to optimize that away?
19:03gfredericks(rather than explicitely have a mechanism for doing a raw array set)
19:04dnolengfredericks: calls to RT will get inlined so not sure it matters much
19:04dnolengfredericks: well calls like that anyway
19:05gfredericksdnolen: good to know, thx
19:08amalloygfredericks: check out https://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/Intrinsics.java
19:10amalloybasically whenever bytecode to call one of these methods would be generated, instead a call to the corresponding simple-instruction is generated. the RT methods are mostly there as placeholders for macros to expand into
19:11amalloy(and so that reflection can solve it in cases where the types aren't known at compile time, of course)
19:12gfrederickshmm
19:12gfredericksI'm currently fighting with the type hints
19:13dnolengfredericks: array type hints?
19:13gfredericksyeah
19:14gfrederickstrying to use an int array
19:14gfredericksand my aset keeps reflecting
19:14clojurebotCool story bro.
19:14dnolenusing ^ints ?
19:14gfredericksyeah
19:14gfredericksUnable to resolve classname: clojure.core/ints
19:14gfredericksthis is from a macro
19:14gfredericksso maybe it's expanding it
19:14gfredericksor something like that
19:14gfredericksI guess I don't do type hints from macros much :)
19:14hiredmanthe index also needs to be a known type
19:15gfredericksI'm gonna type-hint the symbol and unquote it in
19:15gfredericksrather than trusting syntax quote
19:15dnolengfredericks: oh you're doing this in a macro?
19:15amalloygfredericks: inside a macro you don't want to do it that way
19:16amalloy`(aset ~(with-meta xs '{:tag ints}) ...), for example
19:16gfredericksyeah that's about what I ended up with
19:16amalloythe point is the macro needs to emit a symbol with a typehint, as opposed to containing a typehint for its own internals
19:17gfredericksyeah; I knew that once my attention was drawn to it
19:17gfredericksthx folks
19:19gfrederickslove it when things get 1000 times faster :)
19:19gfredericksreflection's great for making you feel like you know how to optimize code
19:22gfredericksnow to try unchecked-math
19:29gfredericksover twice as fast :)
19:29gfredericksI'd forgotten computers could do things this fast
19:29hiredmangfredericks: did you see the ndarray thread on the ml?
19:29hyPiRiongfredericks: now do it in parallel on a GPU
19:30gfrederickshyPiRion: that is mystic stuff
19:30gfrederickshiredman: maybe not? clojure-dev?
19:30hyPiRionwelcome to my world
19:30hiredmangfredericks: https://groups.google.com/d/msg/clojure/Mq0jsIS_Y-o/L1eFwF8ac60J
19:31gfrederickshiredman: thanks, this'll be interesting
19:41muhoo-funroll_loops
19:51llasrammuhoo: http://funroll-loops.info/ ?
20:09akurilinHowdy. I'm trying to figure out how to keep my site's front-end resources outside of the uberjar so that they can be edited separately without the web app having to be restarted. I feel like this is something a lot of people must have dealt with before.
20:09akurilinI'm not sure what the best practice in java for this is. Do you somehow just relative path to a separate folder from within your code?
20:10technomancycdn?
20:11akurilintechnomancy, let's keep it on the same box for now. I'm thinking templated html files etc as well.
20:11akurilinIn the real world CDN would probably be ideal.
20:12technomancyputting a dir on the classpath is easy enough
20:13akurilintechnomancy, so if I'm understanding correctly, just add a dir to the classpath that's relative to the jar file? So for example have an uberjar and an assets/ folder in the same folder?
20:13justin_smithakurilin: we use s3 for that
20:13justin_smiththere are decent clojure bindings for the service
20:14technomancyakurilin: doesn't have to be relative to the jar file
20:14akurilinjustin_smith, is there an advantage to having these files hosted on s3 as opposed to being loadable from the same disk the service is running on?
20:15justin_smithakurilin: it can help page load time, theoretically, since two different servers' bandwidth is used (in reality that depends on the CDN's bandwidth of course)
20:16akurilinjustin_smith, ok interesting
20:16justin_smiththere is the typical cloud advantage of seamless scaling etc.
20:16justin_smithalso for our app that lets us cache dynamically resized images, and serve them all (so only one server needs to resize one time, regardless of instance count / restart on the cloud)
20:17justin_smithie. a request asks for a particular image size, that gets made once and served multiple times
20:18akurilinThat's as lot of people dropping.
20:19akurilinI was going to say is that I'm going to have to read up on the java io model, since I keep being redirected to the classpath all the time and I'm not nearly as familiar with it as I should be.
20:21technomancyclojure.java.io/resource will just get you an input-stream you can read from without having to care whether it's from a dir or in a jar
20:50ToBeReplacedi feel like i write (loop [] (when-not (.isInterrupted (Thread/currentThread)) ... (recur))) a lot
20:50ToBeReplacedwhen people have services that run forever... how do they wrap it up in development mode for start/stop? is the above standard?
20:53chordcallen i'm on chapter 13 of learn you a haskell
20:53chordthats right i'm almost done
20:53chordyou thought that I would fail to finish
20:54chordcallen: so after i'm finished I need you to have that clojure book done so I can start reading it
20:54chordcallen are you even there?
20:54chordwtf is callen doing
20:56hyPiRionreading that clojure book maybe
20:57mdeboardYou guys have a weird bromance
20:57mdeboardchord/callen
20:59dobry-denToBeReplaced: dang, should i be doing that? i just loop and have it return a channel
21:00sandbagsI hope this question will make sense: when you're talking to a clojure nrepl (e.g. using Vim fireplace) is there some way of diverting it's stdin & stdout to the nrepl console session?
21:00ToBeReplaceddobry-den: idk how I would do it all with core.async -- good point
21:01ToBeReplacedif i have a system that needs to launch a few dedicated threads, i usually create something like a "start" and "stop" fn that kick them off in futures
21:01justin_smithsandbags: maybe you could bind some var to *out* in the repl (that representing the output being used in the repl) then pass it in so it can be explicilty bind *out* in the code that is not yet printing to the right place
21:02justin_smithI have been thinking about how this could be fixed as well. It happens when you make new threads.
21:02justin_smithis it because *out* is thread local so you need to pass it in to other threads if you want it shared?
21:02ToBeReplaceddobry-den: if they are loops inside of core.async go blocks... i have no idea what i would do to signal "stop doing things"... i guess you would have them read off a poison channel on each iteration?
21:02chordmdeboard you know where callen is?
21:03indigoHe's probably working; he has a job, you know :P
21:03sandbagsjustin_smith: i'm not really sure... this is all a bit above me at the moment and i am trying to muddle my way through it
21:03sandbagsi've been trying to read the code of nrepl
21:03sandbagsbut not making much useful headway
21:03justin_smithhmm
21:04justin_smithsandbags: it is in things happening in threads that output goes to the wrong place, right?
21:05sandbagsjustin_smith: if you execute the clojure.main/repl function from vim fireplace you hang Vim because, i presume, the nrepl attempting to execute the repl function is hung waiting for input that will never come
21:05justin_smithhmm
21:05sandbagsjustin_smith: so i am wondering how i can have that nrepl process that is evaluating the code wire it's stdin & stdout to something you can interact with
21:05justin_smithyeah, I don't know, I haven't used fireplace at all
21:05sandbagsjustin_smith: fireplace is just talking to nrepl
21:06sandbagsusing the "op" "eval" "code" "(clojure code)" protocol
21:06justin_smiththe *out* and *in* vars always refer to the currently default out and in ports
21:06sandbags(at least, so far as i can tell that's all its doing)
21:06justin_smithso if you pass those in, you should be able to access them in your code
21:07sandbagswell... pass in from where would be the issue
21:07chordindigo: can you tell callen to quit his job
21:07sandbagsthey would need to be prewired to something running in that local nrepl process
21:07indigoI sure can. I won't, though, because I'm sure he enjoys it :)
21:09dobry-denToBeReplaced: yeah i don't know how you'd handle a tight loop
21:10sandbagsinteresting, it looks like nrepl uses clojure.main/repl under the hood
21:10sandbagsi'm not sure it helps me but interesting anyway :)
21:10dobry-denalthough having a start and stop fn translates directly to having a start and stop channel that sit in the process in their own blocks waiting for something to come out of their channel
21:12ToBeReplaceddobry-den: is there an equivalent of "offer" and "poll" in async?
21:13justin_smithToBeReplaced: alts! is kind of like poll
21:13justin_smithserves the first channel to return a value out of varargs channels
21:14ToBeReplacedjustin_smith: i see, with :default
21:15ToBeReplacedso yeah... i guess if you want to start/stop consumers/producers you have them alts! for poison?
21:15justin_smithI think that is the pattern. I am still learning how to use core.async myself
21:16chordindigo: you going to help with starcraft clone written in clojure
21:16justin_smithwell for starting you could have a channel with a go block looping on it, and for stopping it you could close that channel
21:16dobry-dentaking/putting on an unbuffered channel also blocks.
21:17indigochord: Nah, I have better things to do... like fixing up clauth
21:17justin_smiths/starting/triggering
21:17indigoAnyway I'm too noob at Clojure to even consider a starcraft clone
21:17film42424this be some cool stuff: http://blog.getprismatic.com/blog/2013/4/29/faster-better-dom-manipulation-with-dommy-and-clojurescript?utm_source=dlvr.it&amp;utm_medium=twitter
21:17chordWTF GO LEARN CLOJURE
21:17indigochord: I know, right?
21:18film42424Thought it was relevant for discussion
21:18chordwtf you doing in this channel if you're not even learning
21:18indigoI never said I wasn't learning ;)
21:18chordhttps://www.youtube.com/watch?v=NiCy5igO9-I&amp;feature=player_embedded#t=0
21:19ToBeReplacedjustin_smith: dobry-den: thinking more, it's definitely all about the channels... if you want to stop consuming, just close it off at the producer, and stop trying to take when you read nil
21:19ToBeReplacedor if you are producing elsewhere, close that channel
21:20justin_smithToBeReplaced: afaik if you try to read a closed channel in a go block, that will kill the go block
21:20justin_smithyou could test that though
21:20film42424chord: that's insane!
21:21ToBeReplacedjustin_smith: you just read nil iirc
21:23chordso film4242 you gonna make starcraft clone with clojure?
21:23justin_smithToBeReplaced: oh, you are right, I just tested it
21:24justin_smithso I should be testing if I read nil from the channel, and bail when I do
21:25ToBeReplacedor just (when-let [value (<! channel)] ...)
21:25dobry-denthe nil return is what enables semantics like a when-let in a loop
21:25dobry-denyeah
21:29dobry-denToBeReplaced: if you need inspiration, rob pike's Go Concurrency Patterns talk (http://www.youtube.com/watch?v=f6kdp27TYZs) has some cool arrangements
21:30ToBeReplacedwhoaaaaa major commit to async yesterday by rhickey -- pubsub, stream functions, etc
21:33justin_smithcool
21:34`cbpwhat's with this clojure starcraft clone? :-o
21:34chordHaskell > Go > Clojure
21:35`cbpflamebait!
21:35indigo`cbp: He's trolled #ruby, #python, and #haskell
21:35chord`cbp: why are you against clojure starcraft clone
21:35chordindigo you making stuff up
21:36indigochord: Nono, I have logs
21:36chordI call bullshit
21:36indigoAlso you're on their banlists :\
21:36chordhow can you see the banlists liar
21:36indigoYou go /bans
21:36chordnothing happened in this channel
21:36chordnice lie
21:37film42424Could someone look at some code for me and tell how I can write it better?
21:37justin_smithI can try
21:38ddellacostafilm42424: give us a refheap
21:38`cbpfilm42424: sure in my limited capacity
21:38film42424https://github.com/film42/list-em-with-clojure/blob/master/src/list_em/core.clj
21:38danielszmulewiczanybody knows how to display the jetty log when working in emacs with nrepl
21:39mtpwhy does it feel like i'm reading java?
21:39film42424cause you kinda are :/
21:39film42424I'm learning though
21:39mtpokay
21:40mtpi would probably make list-dir build up a tree as it recurs, and try to eliminate the global
21:40mtpbut i don't know clojure well enough to say much more than that
21:40ddellacostafilm42424: I don't think it's so bad. But have you taken a look at https://github.com/Raynes/fs ?
21:40film42424ddellacosta: That's a great find!
21:41ddellacostafilm42424: may save you a bit of trouble. ;-)
21:41chordwho here wants to join starcraft clone clojure project
21:41film42424mtp: I totally agree.. just trying to make it work first.. but that's what i'm gonna do next
21:42hyPiRionfilm42424: yeah, if you're able to do as mtp said, you're good code-wise
21:42lgs32ahas anyone figured out already why the new merge in core.async only takes two channels?
21:42film42424thanks :)
21:42justin_smithfilm42424: if you made the master-list a set rather than vec, you would pre-empt the eventuality of adding the same file to it twice.
21:43justin_smithbut then it would be unordered
21:43film42424good thinking.. i think im gonna work on not overwriting a global var tho
21:43hyPiRionjustin_smith: but that would never happen
21:43film42424you guys are awesome though!
21:43film42424srs thank you :)
21:44justin_smithhyPiRion: cyclical symlinked dirs
21:44justin_smithwhich would also make a stack overflow with the code as is
21:44hyPiRionif you are sane
21:44film42424I wonder how java.io.File handles sym links
21:46justin_smithfilm42424: easy enough to test in the repl, no?
21:46justin_smithI think this may be related to the .cannonicalPath method
21:47film42424ill check in a min.. first imma drop in this fs lib
21:47justin_smith* .getCanonicalPath
21:47hyPiRionfilm42424: This is what we do in Leiningen: https://github.com/technomancy/leiningen/blob/master/leiningen-core/src/leiningen/core/utils.clj#L31-L39
21:48justin_smithyeah, (.getCanonicalPath (java.io.File. "symlink")) returns "/path/to/original"
21:48film42424ahhh
21:48hyPiRionwe generate the canonical file and check if it's equal to the absolute file
22:19rlbIs it possible to ask lein to run arbitrary commands before or after a given stage via the project file?
22:21TimMcrlb: You can add hooks and middleware.
22:21TimMcIt's not via the project file, precisely.
22:21akurilinIs there a list of macros out there that implicitly use a do?
22:22akurilinThere's let, fn, anything else major?
22:22TimMcakurilin: The only things that can *implicitly* use a do are special forms, not macros.
22:22TimMc(So one could easily exhaustively search them.)
22:23TimMclet* and fn* are the ones that come to mind
22:23rlbTimMc: ok, thanks -- I'm thinking of one-off bits -- say for example, that I need to compile a c file before the compile stage for clojurec so that I can extract the platform's errno symbols.
22:23rlbTimMc: can the hooks/middleware be local to the project?
22:24justin_smithakurilin: when
22:24justin_smithakurilin: binding
22:25justin_smithfuture
22:25justin_smithI think there are many
22:25TimMcakurilin: loop
22:26TimMctry
22:26akurilinTimMc, so to make sure I grok this better, special forms are basic language logic building blocks that are then used by functions/macros to make interesting stuff that'd not be possible otherwise?
22:26amalloyTimMc: surely you mean loop*, not loop, if you're grouping it with let* and fn*
22:27chordi demand starcraft clone
22:27TimMcOh yes, loop*
22:29amalloybut really i'd categorize the macros themselves as "implicitly" adding a do around your code; to say only special forms can do so is probably accurate but not very useful
22:29TimMcamalloy: Thanks, I didn't know that delegated as well. I suppose it would, what with the destructuring.
22:29TimMcamalloy: I am technically correct!
22:29TimMc(The best kind of correct.)
22:30OtherRavenIs there a way to require/use java objects such that they don't have to be qualified?
22:31OtherRavenLike, with lwjgl, it gets annoying to always have to do GL11 or GL15 or what have you before each command
22:32ToBeReplacedOtherRaven: (import 'java.util.UUID) (UUID/randomUUID)
22:33OtherRavenToBeReplaced: Right, is there any way to do it without having to put UUID/ in front of it though?
22:33ToBeReplacedOtherRaven: ah, not that i know of, but don't take that to mean not possible
22:34TimMcakurilin: Homework project: Programmatically find all macros in clojure.core that have a "body" section (a do form).
22:34akurilinamalloy, so as a language user my options for running multiple side-effects are special forms that explicitly claim to support that and the macros built on top of them?
22:34amalloyand the functions built on top of them, and...really any combination of such things
22:35akurilinamalloy, but the bottom building block is always a special form supporting that behavior, right?
22:35asteveparty people, how do you serve static files through compojure?
22:35astevelike js files?
22:35amalloyakurilin: that describes every feature of the entire language
22:35akurilinamalloy, :)
22:35akurilinTimMc, sounds fun, will do
22:35OtherRavenToBeReplaced: blargh... do you know if there's any way to easily check which of a group of java classes has a given static method?
22:35amalloybut it's not like you *need* the special forms to add an explicit do; you could do it with a form of fn that doesn't have multiple body-exprs
22:35clojurebotPardon?
22:36ToBeReplacedOtherRaven: clojure.reflect, maybe... wouldn't know the command off hand
22:36amalloy((fn [ignore these things]) (print 1) (print 2) (print 3)), for example, akurilin
22:37OtherRavenToBeReplaced: thanks, I'll have to look into that
22:40akurilinamalloy, what exactly does that expression achieve?
22:40akurilinNot sure I'm following along.
22:41amalloyakurilin: it calls print 3 times, without using any implicit do
22:41amalloyby creating a useless three-arg lambda to take the "values" of three print expressions, which are then evaluated in order
22:42akurilinamalloy, oh I follow now, got it.
22:42amalloyyou can even curry it if you don't like depending on multi-argument functions, since that sounds a little bit like an implicit do in the function-call part of the compiler
22:42amalloy((fn [_] ((fn [_] (print 3)) (print 2))) (print 1))
22:49akurilinAnybody here using drawbridge with basic HTTP auth in production?
22:49mtpwhat is production?
22:50mtp(i mean this in an existential sense)
22:50technomancyit's like when a factory runs its assembly line
22:51brehauttechnomancy: is this where hammers come from?
22:51mtpno, hammers come from php users
22:51brehautor spice racks?
22:51brehauti never can remember
22:51technomancybrehaut: all products
22:51technomancyincluding dot products
22:58lynaghkAny nice way to get clojure.pprint to print out hashmaps with the keys alphabetized?
22:58akurilinYou guys.
22:59mtptry using a sorted data structure instead?
22:59mtpi'm sure there's a good crit-bit tree library for clojure
22:59mtp<;3
23:23TEttingerlynaghk: ##(clojure.pprint/pprint (into (sorted-map) {:b "bar" :c "attack" :a "alphabet"}))
23:23lazybot⇒ {:a "alphabet", :b "bar", :c "attack"} nil
23:28chordclojure starcraft clone
23:29chordcome on guys
23:29chordlets do it
23:30SegFaultAXchord: Dude, are you still going on about that.
23:30chordI never give up
23:31chordyou give up too early thats why you're failing college
23:31akurilinIf I wanted to swap two versions of my ring app on the same box without service interruption, would nginx's upstream module be one tool I could use?
23:34xeqiakurilin: yes. thats what clojars uses
23:34akurilinxeqi, something like: start new version, once it's done update upstream directive, reload nginx, stop old version?
23:35akurilinsounds a bit tricky to automate with CM, but probably doable.
23:41SegFaultAXakurilin: Nah, it's a breeze.
23:44akurilinSegFaultAX, is there anything specific you can wait for to determine when the app has successfully booted?
23:44akurilinSegFaultAX, port availability?
23:45akurilinI think that's the one thing ansible gives you.
23:45SegFaultAXakurilin: Base it on whatever criteria makes sense for your application.
23:52marcopolo2chord: Glad to see you are still going for the clojure game! :)
23:52chordmarcopolo2: you going to help?
23:52marcopolo2chord: can't :/
23:53marcopolo2chord: doing it in cljs or clj?
23:54chordyou gonno help?
23:57marcopolo2just wonderin'