#clojure logs

2013-05-20

00:27callencbp`: I didn't want to feel like I was taking advantage of your volunteerism.
00:27callencbp`: There's always more to be done with the rethink stuff, want me to put up a github repo and add you to it?
00:39ambrosebsdnolen: playing around with type checking core.match. The backtracking makes it tricky/impossible(?) to remember what propositions are *not* true from match rows above the current one.
00:39ambrosebsWe can probably deal with positive info just fine. Things like (fn [a :- (U Symbol Keyword)] (if (symbol? a) ... ...)) might be less accurate in the "else" branch.
00:40ambrosebs(the match equivalent of that, rather)
00:57ysawejhello, how can I get the .class object of a class (.class Classname) doesnt work
00:58cbp`callen: The repo sounds good, add cesarbp. Also don't worry I have way more free time than I need right now :P
00:59brehautysawej: Classname
00:59brehaut,java.lang.String
00:59clojurebotjava.lang.String
00:59brehaut,(class java.lang.String)
00:59clojurebotjava.lang.Class
00:59ysawejoh.. actually I wanted this (class Classname)
01:00brehautif you want Class
01:00brehaut,java.lang.Class
01:00clojurebotjava.lang.Class
01:01callencbp`: I'm sort of the opposite.
01:01brehautcallign class on a classname will return the class ofa class object (which is Class), not the class object itself
01:07ysawejok.. so thats what I wanted.. so it will return java.lang.Class which will have className set to the class I want right?
01:07brehautno, java.lang.Class is the class of all classes
01:08brehautnot a particular class of a given instance
01:51dhlWhen running tasks in leiningen 2, is there anyway to disable the :dev profile other than defining a :default profile that excludes :dev?
03:07tomojdhl: see `lein help with-profile`
03:07tomojtldr: lein with-profile -dev
04:15michaelr525hello
04:15michaelr525thinking of porting an existing compojure website to pedestal
04:16michaelr525do you think it would be a good idea?
04:16michaelr525anywhere to find the pedestal presentation video from clojure/west?
04:18ucbmichaelr525: any reason why you'd want to port it?
04:22RaynesIf the answer is "CUZ PEDESTAL IS COOL AND NEW AND WEEEEE" or you have, as per the XKCD comic, sampled everything in the medicine cabinet, then probably not.
04:22ucbheh
04:32michaelr525well, it seems interesting and i like to learn new things by using them in a real project
04:33michaelr525i want to add new features to my web app and i experimented a bit already with clojurescript, enfocus, shoreleave and i like it. so it looks like pedestal could be the next step in that direction
04:34michaelr525Raynes: what do you think about pedestal?
04:36dhltomoj: That's pretty awesome. Thanks!
04:40michaelr525ucb: or you?
04:41ucbmichaelr525: I have no opinion on pedestal; I was just wondering about your motivation :)
04:42michaelr525yeah. to sum it up, I want to move most of the app into clojurescript and i'm looking for a solid clojurescript architecture
04:43ucbmichaelr525: do you need an architecture at all? could you do with just plain cljs?
04:44michaelr525i could but it can get verbose low level and inflexible
04:45ucbhum
04:45michaelr525in contrast to using something like shoreleave and building the app around pub sub
04:45ucbI'd probably challenge the "inflexible" assertion, but ok.
04:46michaelr525maybe not the best word to describe what i actually wanted to say
04:46ucbwell, I wasn't saying "write it all in cljs with nothing in between" or anything, I was just wondering whether you think/know pedestal would buy you anything on top of plain cljs?
04:47ucbalways keep in mind I know nothing about pedestal :)
04:47michaelr525i don't know.. but i'm intrigued by it since I don't currently understand what they created there
04:48michaelr525although from the stuff I read about it, it might be just what I want
04:48ucbthen I'd say just go ahead and do it
04:49ucbat the very least you'll find out if it was a good choice or not
04:49abpWell, the app-part of pedestal is about making changes to your app data tree based on messages and tree changes getting rendered into the dom.
04:50michaelr525the docs are a bit challenging so i thought maybe it could be a good idea the watch the presentation
04:51tomojthe docs for pedestal are challenging?
04:51tomojI'm looking for shoreleave pubsub docs
04:51abpNot complete
04:51tomojfound this.. http://shoreleave.github.io/shoreleave-pubsub/
04:51tomojoh
04:52tomojI thought "This is a work in progress and should not be used AT ALL" was talking about shoreleave-pubsub
04:52tomojthey meant "stop reading this marg" huh :)
04:53michaelr525another xkcd reference? :)
04:54tomojwhere?
04:54clojurebotwhere is forget where
04:54tomoj:D
04:54tomojclojurebot: where is forget where is forget where
04:54clojurebotYou don't have to tell me twice.
04:55tomojclojurebot: forget where is forget where is forget where
04:55clojurebotAck. Ack.
04:55tomojYou don't have to tell me twice.
04:57xificurCanyone running emacs+nrepl on windows? I got leiningen up and running (e.g. I can do "lein repl" and a repl pops up) but when I try nrepl-jack-in in emacs I get a 'lein' is not recognized as an internal or external command. I have lein in c:\lein\ and I have it in my path
04:59tomojis this a good example of pubsub? http://www.myclojureadventure.com/2012/09/intro-to-clojurescript-part-3-using.html
04:59xificurCoh wait, lein repl only worked in git bash, it doesnt work in the good old cmd
05:00ucbxificurC: keep in mind that your actual PATH and emacs' PATH sometimes differ; at least in OS X I had to tweak it so that it'd find lein for me
05:00tomoj"guess I can just look at the goddamn tests"
05:00tomoj"goddamn!"
05:00xificurCmaybe windows has issues with files with no .something at the end?
05:01xificurCI used the lein script in bash since that seemed to be the easiest option
05:01jjsxificurC: on linux, I had to do the following: (setenv "PATH" (concat "/directory/where/lein/is:" (getenv "PATH")) (setq exec-path (append '("/directory/where/lein/is") exec-path))
05:01jjsProbably something analogous will work on your WIndows setup.
05:02xificurCjjs ill try that thanks
05:02jjs:)
05:03xificurCI tried to download the windows batch file and put it in the path
05:03xificurCgot another error instead :D
05:03jjsyay, a different error! Progress! >;D
05:05tomojshoreleave-pubsub is unintelligible to me
05:06xificurCjjs: didnt work :(
05:06xificurCI'll try the windows way of installing
05:08tomoj"completely decouple parts of your app and declaratively bind them together"
05:08tomojwhere are the declarations?
05:12tomojI guess if you do all the subscription operations once in the top-level, it's just declarations disguised as operations
05:13xificurCso now i have a starting nREPL server... showing forever. Even worse, before there was at least an error showing
05:13tomojand in the non-top-level case, pedestal has operations disguised as declarations :(
05:19rodnaphadvice needed: i want to parse an integer in a library that is clj/cljs compatible (so (Integer/parseInt) is not available). any suggestions of how to work around this?
05:24tomojI think if nrepl.el had C-u M- pop to another window I would switch immediately
05:24tomojer, C-u M-,
05:24tomojC-x o is like my least favorite thing
05:36rodnaphcan anyone suggest how to support parseInt for clj AND cljs?
05:44jjsrodnaph: http://stackoverflow.com/questions/1133770/how-do-i-convert-a-string-into-an-integer-in-javascript
05:45rodnaphjjs: thanks, but i'm ok with the parsing. but in clojure i'd use (Integer/parseInt), and clojurescript it'd be (js/parseInt) - so trying to get some code that supports both.
05:51rodnaphat the moment i'm going with require an include of "window.Integer = {parseInt: parseInt}" for compat.
05:53jjsrodnaph: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/CROSSOVERS.md
05:55rodnaphmaybe ;*CLJSBUILD-REMOVE*; could be bent to this purpose...
05:57borkdudeI was experimenting a bit with reducers, and I wonder why this doesn't show a significant speedup: https://www.refheap.com/paste/14782
05:58rodnaph;*CLJSBUILD-REMOVE*;"(js* "window.Integer = {parseInt: parseInt};")
05:58rodnaphoh!
05:58jjsrodnaph: No! Keep the code shared between languages in e.g. common/ , and keep a parsey_fun.clj in src/clj and parsey_fun.cljs in src/cljs ... then code in common can just require parsey-fun
06:03rodnaphhmm... that requires extra includes... for one fn it might be less magic to do it the dark magic way...
06:03rodnaphbut i shall have a tinker - thanks for the advice jjs!
06:04jjs:)
08:57xificurCI have leiningen working through Git Bash on Windows. I can run "lein repl" from it and then connect to nrepl in Emacs by M-x nrepl. However when I try to open a .clj file in emacs and use nrepl-jack-in I get an error saying 'lein' is not recognized as an internal or external command. I understand this could be an issue with the script since it has no extension and windows has no idea what to do with it (hence it doenst recogniz
08:57xificurCe it as an executable). Is there any workaround to this? And more importantly - is this needed? Do I have the same power in my hands if I just fire up nrepl from bash and then connect emacs to it through M-x nrepl?
08:58FoxboronxificurC: that is because i think Emacs is using cmd when it executes the eval command.
08:58Foxboronhad the same problem, i didn't find a solution.
08:59llasramxificurC: You've got it. AFAIK, nrepl-jack-in just saves you the step of launching and managing the REPL process yourself
08:59xificurCFoxboron: thought so. And you can't change that? :(
08:59FoxboronxificurC: well, you could add lein to the PATH variable?
08:59FoxboronI am not sure how lein behaves in CMD.
08:59tomoj&`(~@[])
08:59lazybot⇒ nil
09:00xificurCllasram: thanks, the less steps the better but if I wont find a solution at least it works
09:00tomojis that nil in swearjure? :)
09:00xificurCFoxboron: I have it in my path but windows doesnt recognize a file like lein an executable
09:00xificurCFoxboron: cmd wont run it either because windows only runs certain files as executables, e.g. .exe, .bat and so on
09:01llasramxificurC: You could set the command to `bash.xet lein` or whatnot
09:01llasramEr, s/xet/exe/
09:01IamDrowsybut there is an lein.bat file on github for windows users
09:01FoxboronIamDrowsy: when i was on windows it was broken, have it been fixed?
09:02xificurCIamDrowsy: that produced another error
09:02IamDrowsylast time i was on windows it worked for me
09:02tomoj&#_()
09:02lazybotjava.lang.RuntimeException: EOF while reading
09:02Foxboronlein2 or lein1?
09:02IamDrowsy2
09:04llasramtomoj: Practicing your Swearjure?
09:06dnolen`CLJS ObjMap deprecated http://github.com/clojure/clojurescript/commit/08489f39060be1097fa23abc8d5042c86e68dd4d
09:06IamDrowsymh... i never had problems with it... but i did not try the most recent version... maybe technomancy knows something about it...
09:10xificurCIamDrowsy: installing leiningen usually worked on windows for me but getting emacs to work was usually a pain
09:11IamDrowsyxificurC: ok. i never tried this...
09:12xificurCIamDrowsy: thanks anyway :)
09:13xificurCllasram: where do you mean to set the command `bash.exe lein`
09:14llasramxificurC: You can customize `nrepl-server-command` and `nrepl-lein-command`
09:15xificurCllasram: sounds interesting yet frightening for a beginner like me
09:21llasram?
09:21CookedGr1phonDoes anyone know a good reason why clj-time doesn't extend the DateTimeProtocol for a java.util.Date? I do it in my own projects for interop with other things that give me a Date (like #inst) and it seems to all work just fine using clj-time.coerce/from-date, but if that works so well, why isn't it in the core clj-time?
09:21llasramxificurC: Oh, "customize"-able variables in Emacs are the ones which exposed to be easily-modified
09:22llasramxificurC: Try M-x customize-group nrepl-mode
09:23xificurCllasram: i see
09:26xificurCllasram: so i should try to switch "lein" to "bash.exe lein" and "lein repl :headless" to "bash.exe lein repl :headless"?
09:29xificurCllasram: tried it, didnt work and now M-x customize group doesnt recognize nrepl-mode :)
09:30xificurCllasram: nevermind the customization still works
09:31xificurCnrepl-jack-in doesnt throw an error but doesnt open an nrepl session either
09:42inacianohi, i am trying to start a clojure project in my work and i need resources with "clojure success stories"
09:43rasputnikhi all - need to print a line of output for each thing in a seq. i tried (map #(format "whatever %s" %) the-seq) and get a load of nils in there too...
09:58Pupnik-try wrapping that in a dorun
11:01noncomhi i have a question: how do i force (map) to return a vector? seems like it always returns a list?
11:01jjttjjuse mapv
11:01jjttjj,(mapv inc '(1 2 3))
11:01clojurebot[2 3 4]
11:01noncomthanks! another question: what is the cost of (into) calls?
11:01noncomlike (into [] `some-list)
11:03noncomand why is the default (map) implementation returns a list, while vectors are more common in clojure to work with data? why have special (mapv) for that?
11:03llasramnoncom: Compared to what? `into` uses transients when possible, so it's about as efficient as you can get and still return a persistent data structure in the end
11:03llasramnoncom: `map` doesn't return a list. It returns a lazy sequence, which answers both your questions at once :-)
11:04noncomllasram: actually i meant - does the cost depend on length of the sequence or is there some magical switch which simply switches the collection type in an instant?
11:05justin_smithnoncom: I think that since map does not return a list but a lazy sequence, (partial into []) simply constructs a vector instead of the list that some other consumer would, no extra cost beyond any overhead a vector has above a list
11:05gfredericksnoncom: it's certainly going to be at least linear in the size of the second argument
11:05llasramnoncom: O(n), yeah
11:06justin_smithand of course O(n)
11:06noncomso basically no speed difference between (mapv) and (into [] (map)) ? just the first one more idiomatic?
11:07justin_smithyou could use (time) to test it
11:07Anderkentno difference other than clarity
11:07Anderkentin fact
11:07Anderkent,(source mapv)
11:07clojurebot#<SecurityException java.lang.SecurityException: denied>
11:07Anderkentbah
11:07noncomheh :D
11:07gfredericksmapv also lets you e.g. pass multiple collecctions
11:08gfredericksoh nm
11:08Anderkentmapv might be cheaper for the common case of passing 1 collection into map
11:08justin_smithheh, yeah, map lets you do that too
11:09noncomnice! thanks for the answers!
11:09Anderkentbut it will be only very slightly cheaper
11:10noncomi'm struggling for as much fps as i can get, so any slightest speed improvement is welcomed in my code!
11:10justin_smithrt on the jvm, the endless struggle
11:10Anderkentis that on your critical path?
11:12noncommost of my program is the critical to speed, since most of it is related to real-time rendering. and saving like 3-4 fps here and there could amount to like 50 fps saved! which then can be spent on useful user-data visualisations
11:14Anderkentyou probably want to plug your code into something like yourkit and look for hotspots - it tends to work okay with clojure unless you do a lot of dynamic code generation
11:15justin_smithwhat is the difference between the paid and unpaid yourkit versions?
11:16noncomyeah, i could use a profiler. i think i will have to when i get to anywhere a serious application
11:17Anderkentnoncom: then you don't want to be optimizing yet :)
11:17Anderkentjustin_smith: I thought there was just a evaluation version that was free, other ones are paid arent they?
11:18justin_smithyeah, I am just wondering if there are feature differences or nag screens or what
11:18justin_smithbefore I download and try
11:18Anderkentdon't think there are nag screens, but the evaluation is only for 15 days afaik
11:18justin_smith(official site is not readily showing me differences)
11:18justin_smithAnderkent: cool, thanks, maybe I can convince my boss to buy it for us
11:19Anderkentstrongly recommend, esp. since the new version made it much faster (i.e. less footprint)
11:20noncomAnderkent: yeah, probably :D i know that principle. I think that now such optimisations go hand-in-hand with learning clojure since me a noob, so i kinda enjoy that :D
11:20Anderkentis there some idiom for (map vector (cons prefix coll) coll) ? I.e. grouping elements with predecessors
11:20Anderkentnoncom: sure. Optimize for readability then :)
11:23justin_smithI would add the caveat that you generally build things to do as little as possible in a rendering thread (and implicit in this is rendering should be in its own thread where it can have its own CPU ideally on a multi-CPU machine) - there is a difference between premature optimization and best rt design practices
11:23justin_smith*that you should generally build
11:23ToBeReplacedhow do you define a macro that does a defn with all of the possible meta hooks (like doc)? is there a special wrapper somewhere?
11:24ToBeReplacedAnderkent: partition sounds like that
11:24justin_smithToBeReplaced: unless I am misunderstanding you defn will store the string after the function name as the doc
11:24justin_smithregarding partition, it does not do that at all
11:25ToBeReplacedpartition does what Anderkent asked for, doesn't it?
11:26justin_smithhe wants [:a :b :c] -> [[:a :b] [:b :c]]
11:26noncomjustin_smith: yeah! i think so, but i rely on the architecture used by the underlying engine
11:27justin_smithnoncom: cool, yeah, just make sure the code that gets spawned on each frame render avoids creating garbage, printing, io in general, etc. and that will get you far
11:27ToBeReplaced,(let [coll [:a :b :c]] (partition 2 1 (cons :prefix coll)))
11:27clojurebot((:prefix :a) (:a :b) (:b :c))
11:28justin_smithToBeReplaced: my bad! I forgot about that feature of partition
11:28ToBeReplacedjustin_smith: i am trying to do (defmacro defmine [name args & body] `(defn ....))
11:29justin_smithwell you could modify the metadata after the defn, or have the macro expand to provide it the way defn normally would, right?
11:29ToBeReplacedin order to support docstrings, i need to special case... and I don't know what would happen with metadata... i figure this is a common issue, so i'm wondering what is normally done
11:30ToBeReplacedjustin_smith: yeah... should prob just read/copy defn source... just feels bad from a maintainability standpoint (like, what if additional options get added to defn)
11:30AnderkentToBeReplaced: thanks
11:31ToBeReplacedeasiest way i know to do it right now is `(defn ~(with-meta ...) ~@body)
11:31justin_smithToBeReplaced: in a bigger picture, what does defmine add to defn?
11:34ToBeReplacedjustin_smith: it accepts ring request and passes values from it to the inner function -> i would ordinarily do this as a simple function wrapper, except preserving the function name is helpful to work with pedestal routing
11:35justin_smithahh, ok, yeah
11:35ToBeReplacedjustin_smith: actually though, i'm thinking about it wrong... this is the wrong way to handle the issue, so thanks
11:35ToBeReplacedcorrect answer is, again, don't use macros
11:35justin_smithI only discovered recently how much easier my code was to debug when I provided names to every inline (fn) call
11:35justin_smith(fn what-this-fn-does [...] ...)
11:36justin_smithmy first real reason to stop using #()
11:36ToBeReplacedtrue
11:36justin_smithmakes stack traces so much easier to navigate
11:38justin_smithI was doing a seesaw canvas project for fun over the weekend (weird music composition interaction system) and I was reminded again how much I miss currying
11:38Anderkentpff, real clojure coders find anonymous functions by counter comparisons on autogenerated names
11:38Anderkentuser$eval6369$fn__6370 - easy!
11:38justin_smithso many of my uses of fn were really just replacements for implicit currying
11:39justin_smithAnderkent: lol
11:40Anderkentnext thing you'll say is you dont like getting 100 lines of stack trace out of which 3 are your code
11:40Anderkent;>
11:41justin_smithAnderkent: is there actually a fix for that issue?
11:42gfredericks$google github currj
11:42lazybot[fredericksgary/currj · GitHub] https://github.com/fredericksgary/currj
11:42gfredericksjustin_smith: ^
11:43Anderkentjustin_smith: what issue? It's a feature. ;P Seriously though, there are some attempts - stuff like coloring the stacktrace based if it's clojure.core / java stdlib / well known framework / your packages
11:43justin_smithgfredericks: it mentions being experimental - has anyone successfully used it in anger?
11:43Anderkentit don't think it can be *fixed* per se
11:45justin_smithAnderkent: even the coloring would be nice - is that what nrepl is trying to do with its rainbow stacktraces in emacs?
11:45gfredericksjustin_smith: not that I know of -- but at worst you can examine the macroexpansion to verify it does what it's supposed to
11:45justin_smithgfredericks: true enough, thanks
11:46Anderkent$google github clj-stacktrace
11:46lazybot[mmcgrana/clj-stacktrace · GitHub] https://github.com/mmcgrana/clj-stacktrace
11:46gfredericksjustin_smith: also note it does the pre-computation, which could conceivably be undesirable. I think it'd be interesting to patch it to do that lazily.
11:46Anderkenthm maybe that wasn't the colour one
11:47justin_smithyeah, I would have to re-evaluate some argument ordering in that case
11:49Anderkentah, it is
11:49Anderkentjustin_smith: so see clj-stacktrace for the coloured and formatted stacks
11:50justin_smithAnderkent: cool, we use clj-stacktrace for our big project here, but I did not know about the color feature
11:50Anderkentyeah I'm not sure how it's triggered
11:50AnderkentI guess repl only?
11:50tomoj`lein sub install` excellent
11:52justin_smithAnderkent: a version that did html color markup for a dev 500 page would be awesome, but likely would require a fork
11:52justin_smithwe are working on a hyperlink that leads to ritz attached to the errored thread, so why not decorate the information while we are at it
12:09asteveis there way to flatten a vector so that ["a" "b" "c"] becomes "a" "b" "c"?
12:09asteve(flatten ["a" "b" "c"]) creates ("a" "b" "c")
12:09Anderkent,(apply list ["a" "b" "c"])
12:09clojurebot("a" "b" "c")
12:09justin_smithasteve: is this for printing?
12:10gtrakasteve: you can only return single values from a form
12:10justin_smith(clojure.string/join \space [
12:10justin_smith"a" "b" "c"])
12:10astevejustin_smith: no
12:10justin_smithyeah, you cannot return multiple values
12:11gtrakasteve: likely you want concat
12:11mefistotaking a step back, what are you trying to do asteve?
12:11AnderkentI guess it's [["a" "b" "c"]] => ["a" "b" "c"]
12:11astevereally what I have is ["a" "b" "c" ["d" "e" "j"]]
12:12gtrakand what do you want?
12:12asteve["a" "b" "c" "d" "e" "j"]
12:12mefistoflatten will do that
12:12Anderkent,(flatten ["a" "b" ["c" "d"]])
12:12clojurebot("a" "b" "c" "d")
12:12Anderkent,(flattenv ["a" "b" ["c" "d"]])
12:12clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: flattenv in this context, compiling:(NO_SOURCE_PATH:0:0)>
12:13asteve,(vec (flatten ["a" "b" ["c" "d"]]))
12:13clojurebot["a" "b" "c" "d"]
12:13asteveinteresting
12:13xeqi~flatten
12:13clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
12:13Anderkentjust be careful because i'ts fully recursive
12:13Anderkentyeah exactly
12:13gtrak(inc clojurebot)
12:13lazybot⇒ 26
12:16justin_smithyeah to me flatten is a code smell that makes me think I need to re-evaluate the algorithm I am using
12:36gtrak,(mapcat #(if (coll? %) % [%]) ["a" "b" ["c" "d"]]) ;; I write this 'collify' function a lot, is there a shorter way to do it?
12:36clojurebot("a" "b" "c" "d")
12:37gtrakI'm not the only one: https://github.com/jwhitlark/clojail/blob/master/src/clojail/core.clj#L42
12:38TimMcI am innately suspicious of (if (coll? %) % [%]) and related code.
12:38TimMcIt's shaped the same as flatten.
12:38justin_smiththe real issue is in the functions building that vector - why is their output inconsistent?
12:39gtrakwas trying to do the previous example with concat, couldn't figure out a way
12:39gtrakexcept of course mapcat is concat map
12:50gfrederickswhy would (deref (future thing) 1000 :time) ever hang in nrepl?
12:50gfredericksassuming thing diverges
12:51gfrederickswhich I only assume because running `thing` itself also hangs
12:54gfredericksnevermind nrepl was misleadingly hiding prints
12:55yogthosdnolen: ping
13:08dnolenyogthos: pong
13:09yogthosdnolen: howdy :) have a cljs question, I think it's something stupid that I'm missing :)
13:09dnolenyogthos: what's up?
13:10tomojI wonder what typical core.async/alt usage looks like: (let [[label msg] (alt ...)] (case label ...)) ?
13:10yogthosdnolen: I've got a project and when I make a jar out of it, for some the cljs stuff doesn't get packaged
13:11dnolenyogthos: that's really a lein / lein plugin question not a cljs one
13:11yogthosdnolen: yeah :)
13:11yogthosdnolen: but figured you might have an idea
13:11dnolenyogthos: I don't really know since I don't create jars containing cljs with lein
13:11yogthosdnolen: ah no problemo then :)
13:12dnolenyogthos: but plenty other people have, also ask on the ClojureScript mailing list
13:12yogthosdnolen: yeah that's a good idea actually
13:12yogthosdnolen: thanks :)
13:20scottjdnolen: maybe change "user list" to "mailing list" in README.md
13:22dnolenscottj: that's a user run list, so appropriate for tooling questions like this, I and others field CLJS devs field questions on CLJS on clojure, clojure-dev
13:25scottjdnolen: or "user mailing list"
13:27tomojis it safe to rebind LOCAL_ENV during macroexpansion?
13:28tomoj1) to a reasonable &env you got 2) to a map with non-LocalBinding vals or a set?
13:28scottjdnolen: my main point is when I went to the site I searched for mailing and there were no hits, so in my case this would have helped (a tiny bit)
13:30callenso I learned two things today. 1. Antirez can be trolled. 2. People actually want to troll Antirez.
13:31dnolenI don't think Antirez was trolled
13:32dnolenscottj: http://github.com/clojure/clojurescript/commit/40899b7f4dcc9e2a3e0ba5f5a74f81ed005fc52f
13:33tomoj((macro-fn (partial apply shuffle)) [(foo!) (bar!) (baz!)])
13:33tomojwhy not? :(
13:35tomojer, I guess (defmacro mshuffle [& args] (cons 'do (shuffle (vec args))))
13:35tomoj-vec
13:36scottjtomoj: thanks
13:37tomojhmmm?
13:46amalloytomoj: i like the ambiguity of the / in that last line. "Jira, which is either a feature-tracking application or a bug..."
13:47amalloyoh. for some reason i thought tomoj was involved in the discussion of that cljs commit
14:10callenamalloy: JIRA is corporate herpes.
14:12tomojI wonder if core.async needs splice
14:15jjttjj(row-seq sheet)
14:15jjttjjwoops wrong buffer
14:25Raynes(inc callen)
14:25lazybot⇒ 6
14:33TimMc~jira
14:33clojurebotExcuse me?
14:33TimMcclojurebot: jira is corporate herpes
14:33clojurebotOk.
14:39astevewhich style is more correct? http://pastie.org/7935815
14:39AimHereasteve> The third one is the least good
14:40astevewhy?
14:40clojurebotWhy is startup slow is busy compiling the `for` macroexpansion
14:40AimHereAll three vectors being concatenated should be the the same indentation, for clarity's sake
14:40ToBeReplacedasteve: i pick number 2 here all day
14:40asteveI agree
14:40asteveok, I'll stick with #2
14:40RaynesI disagree.
14:40asteveI was thinking #1
14:41AimHereThe other two work, and I'd prefer 2 to 1, but that's just whichever you subjectively feel is more readable
14:41RaynesI'd probably do https://www.refheap.com/paste/14790 or 1.
14:41RaynesBut I wouldn't break the vector in the middle in any of them.
14:41asteveRaynes: I don't like my my lines to be longer than 80 chars
14:41RaynesThis isn't 80 characters.
14:42callenRaynes: staying at the Hilton is $20 more a night than airbnb's cheapest acceptable accommodations :P
14:42AimHereThere will be cases cropping up where your line width is an issue, I assumed that this was the case here
14:42asteveyou're right but, for me, a b c are longer than 1 char
14:42ToBeReplacedRaynes: i think it was just an example... replace a b c with really-long-strings or w/e
14:42RaynesAnyways, I'd do anything I could to not break it in the middle.
14:42callenTimMc: thanks for spreading the gospel my brutha.
14:42RaynesBut I don't have an obsession with 80 character limited lines.
14:43ToBeReplacedi'd rather break in the middle than go over 80 chars; it's not often that i have a super long vector literal going in the middle of a fn though
14:44RaynesMy editor doesn't break if a line is over 80 characters, luckily.
14:45tomoj(reduce into vecs) ?
14:45RaynesAnd I have this fancy 30'' display.
14:45callen"?
14:46rasmusto(quote (quote 30)) 'display
14:47TimMccallen: I've never used anything better than Jira in that space, but Jira feels very clunky anyway.
14:47hyPiRion~jira
14:47clojurebotExcuse me?
14:48RaynesAnything not jira is better than jira in that space.
14:52callenTimMc: Phabricator is quite nice.
14:53callenit's also STD-free
14:55kmicuFacebook Oriented Malarkey
14:57kmicuAnd it's written in Personal Home Page language ;]
14:58technomancyI like my software to have that personal touch
15:08Raynescallen: I know a guy who works on Phabricator. He sings its praise quite adamantly.
15:08Rayneskmicu: This is true, but I get the feeling that it is written in the best possible way one could possibly write it in PHP.
15:10TimMcRaynes: You mean, it embeds a Scheme interpreter and all of the logic is in heredoc Scheme code blocks?
15:13kmicuOr it's probably wrapped in a monoids in category of endofunctors with an optional dependent types system and a little bit of katamorphic touch ;]
15:18kmicuOr maybe they simple use https://github.com/facebook/hiphop-php and this is why we should have dubstep-clojure VM. Just sayin' ;)
15:26ystaelkmicu: it's a monoid in a category of endofunctors, but the composition operation is implemented by substituting one string into another and then submitting the unsanitized result to MySQL for execution
15:29cbp`Hi
15:34cbp`If I wanted to create a way to 1) Describe a postgres database in a .txt file. 2) Generate the appropiate create table statements from that file and 3) Generate the appropiate clojure code/classes for CRUD stuff automatically so i can import them. What would be the best approach? Mostly concerning number 3
15:34callencbp`: you'll need to invent it, but this interests and amuses me.
15:34callencbp`: as far as databases go, you're just talking typical CREATE TABLE statements in a *.sql file.
15:35callengenerating CRUD API code from that could be cute.
15:35cbp`yea I'm mostly worried about the crud stuff
15:35callenbetter still if it generates code that auto-hook validation.
15:35callencbp`: most people end up writing it manually.
15:35callenneat idea though, I bet you could run with that but it's questionable how much labor it would save due to effort in integration.
15:36cbp`Well it's for a school admin system. And I wanna use txt files for metadata and csv and stuff for mass data injection
15:36cbp`I'd rather not describe metadata with macros or stuff like that
15:37Raynestpope: ping
15:37callencbp`: going to need a lot of coke and whiskey if you want that much magic.
15:38callencbp`: are you sure you wouldn't rather be using rails scaffolding? :P
15:39cbp`:-D
15:42cbp`I was thinking of reading up the protobuf compiler stuff since it does kind of a similar thing but maybe macros can make it much easier
15:48callencbp`: you enjoy pain.
16:00spoon16is there a way to disable warn-on-reflection on tests… I'm using leiningen and have this in my project file :warn-on-reflection true
16:01RaynesYou can add a test profile that sets it to false.
16:02RaynesAnd then run lein with-profile test,dev test
16:02RaynesAnd you could add an alias to make that shorter if you wanted.
16:02Rayneshttps://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md
16:03spoon16I may have phrased the question incorrectly, I want it disabled for test namespaces
16:03RaynesIt's pretty hard to do that.
16:03spoon16ok, not a huge deal… just was hoping to be a little lazy in my tests
16:05callenaphyr doesn't use Clojure for deployments and provisioning. This saddens me.
16:06callenOTOH, the thing he does use is neat, host-parallel, and concise.
16:06callentechnomancy: have you used salticid?
16:07callenhttps://github.com/aphyr/salticid (warning, spider)
16:07callen(but a friendly spider)
16:08winkdidn't look any better than most ssh-based "deployment" stuff tbh
16:08winkmaybe I'm too biased towards puppet tho
16:08callenwink: Puppet is for fascists.
16:08callenwink: I want punk-rock deployment yo.
16:08winkcallen: why?
16:08callenwink: because Freedom.
16:08winkwat
16:08callenalso declarative deploymeny sucks.
16:08callendeployment*
16:09winknDuff: what I was trying to say I like the "state" approach more than "make it so"
16:09nDuffwink: Sure -- declarative configuration is good.
16:09winknot talking about puppet spcifics :)
16:10callenI have no problem writing idempotent jobs in ssh'ish deployments.
16:10callennDuff: what do you favor?
16:10callenI need something lightweight that can run without an overseer server (fascist!)
16:10winkcallen: ofc you can do it. but I think it's worse than abstracting the idemportent part
16:11callenI disagree.
16:11winkI noticed:P
16:11callenThe abstraction in Chef/puppet/pallet makes me feel like I'm talking with marbles in my mouf.
16:11winkcallen: as I said, I prefer the idea. neither puppet nor chef have nailed the DSL/syntax/best practices
16:12nDuffcallen: I find Chef very considerably more tolerable than Puppet. Haven't had a chance to use Pallet, though I want to. (That said, 0.8 is the first version that addresses some longstanding concerns).
16:12callenor I could use something that just lets me say what I want.
16:12nDuffcallen: My experience with Chef is that I _can_ "say what I want" with it.
16:12nDuff...now, maybe that's a few years of Puppet's low-expectation-setting experience speaking...
16:13winknDuff: had this discussion recently. don't you think chef lends to people doing more "exec stylke" than with puppet?
16:13callennDuff: I find bootstrapping chef solo to be obnoxious and require an ssh'ish provisioning script.
16:13callennDuff: then I am left wondering why I bothered to begin with.
16:13winkcallen: what do you use/like then?
16:13callenthe client/server is worse.
16:13callenwink: A lot.
16:13callenwink: I
16:14callenmy dev-ops history went: Perl -> Ruby -> Python -> Fabric -> Clojure
16:14callenI've been using a mix of Fabric/Gantry/my own thing in clj
16:14callenFabric + Cuisine brings a nice chef'y flavor to Fabric.
16:14winkI don't see clojure as a valid alternative there, really
16:14callenwink: beg ya pawdon sirrah?
16:15winkmaybe you could be more specific, but learning clojure for deployment is a little over-the-top imho
16:15winkat least none of the sysadmins I speak highly of do work with it
16:15winknot saying they can't learn, but it's... too different
16:16callenwho learned Clojure for deployment?
16:16callenI knew Clojure for other reasons
16:16callenI just decided to see what deploying with it could be like.
16:16callenI found the futures/promises abstraction to be very helpful in managing collections of host-parallel and task-parallel work.
16:16callenwink: are you talking about something you've actually tried or are you speculating?
16:17winkcallen: how big are chances anyone has tried deployment with clojure?
16:17winkI'm not sure I'm willing to roll out a JVM on all my hosts
16:17callenLOL
16:17callenLOL LOL LOL
16:17callen^^ you think that's what I did?
16:17callenjust lo.
16:17callenlol
16:17nDuffwink: Have you looked at Pallet?
16:17callensorry I need to change my pants because I just pissed myself laughing
16:17nDuffwink: It doesn't involve rolling out a JVM.
16:18winknDuff: not really in detail
16:18callenwink: you are in a weird headspace mate.
16:18nDuffwink: ...anyhow -- no, I don't find that Chef leads to "exec-style" code.
16:18callenwink: you generate and ship bash scripts or you just execute over ssh.
16:18callenwink: I used conch to generate chained SSH commands that I ripped stdout from.
16:18nDuffwink: Chef makes it easy to logic in recipes, but that logic is run at compile time, not execution time
16:18winkcallen: not really, I just don't know you or what to expect from your seemingly random bits and pieces instead of a few links or details
16:18nDuffwink: ...so, it changes the things that get declared.
16:19callenwink: you picked the least efficient, most irrational method possible. I don't know if it was out of a desire to be uncharitable to the methodology or what.
16:19winkcallen: it was based on the nitpick on puppet's ruby daemon. which I also don't like
16:19callenI'm strongly considering moving to a "compile bash script and stream logs" method.
16:19callenjust for the inspect-ability
16:20callennDuff: pallet is still marbles mouf.
16:20callennDuff: also fuck EC2 and fuck jClouds.
16:20nDuff(though as it is, Pallet's POSIX sh generation is kinda' icky; would want to do a fair bit of work with that before actually putting it into production)
16:21cemerickcallen: stay classy?
16:21nDuffcallen: *shrug*. Not like you have to use the whole thing if you don't want to.
16:21callennDuff: if there's a less retarded way to "point and fire" pallet at an otherwise unprovisioned node and get started running with only an ssh authorized key I'd be happy to roll thta way.
16:21callencemerick: never, contrary to the worker class ethic.
16:25seangroveCurious to get some help on some cljs code
16:26callenseangrove: That doesn't really make a lot of sense semantically.
16:26callenseangrove: how can you be curious "to get" some help?
16:26callenseangrove: are you curious as to the likelihood of getting help? Are you curious as to what form it could take?
16:26seangrovecallen: Will revisit that sentence from the ground-up once I've completed its follow-on
16:26callenminimum viable English
16:26callengg World.
16:26winklol
16:27winkhm, pallet seems awfully verbose
16:27seangroveTrying to use Firebase/Stripe/3rd-party javascript that has to load async. I usually wrap the api in a namespace that the rest of my cljs code uses, with a single 'handle'.
16:27callen^^ see? SEE?!
16:27callenseangrove: don't use Firebase.
16:27callenseangrove: sharecropper bullshit startup.
16:27seangroveS'all the same
16:27shaungilchristtrue story
16:27callenerm, no its not.
16:27seangrovehttps://www.refheap.com/paste/2dde9d9589dfde6aa0ccd2168
16:27callenit's most assuredly not all the same.
16:28callenyou can run a stack you actually control and can deploy to any server you like
16:28technomancywink: better than the alternative. chef is impossible to debug in a lot of cases because there's lots of implicit gunk going on
16:28callenalso known as everything else.
16:28seangroveI have the same exact code for the Stripe ns too
16:28callenseangrove: find someone worthier of your soul to sell to.
16:28seangroveOk, done, Stripe. Like those guys a lot.
16:28winktechnomancy: I understand all of these tools need some time to get into. but knowing puppet and chef the "install curl" example makes me shudder
16:28seangrovehttps://www.refheap.com/paste/829f1f7faf3491619c5691241
16:29seangroveJust imagine I meant Stripe from the beginning
16:29callenseangrove: I can't, the sharecropping is boring its way into my soul.
16:29seangroveAnyway, this isn't awesome code for lots of reasons, and I feel like a Clojure promise would work very well here
16:30callenthere's some work on cljs promises for Node
16:30kendrupear upgrade
16:30seangroveObviously, that's not available in the current incarnation of cljs. Wondering what (better) solutions exist in the browser-side cljs world
16:30kendruoops! didn't realize which window had focus
16:30dnolenseangrove: yucky
16:30dnolenbut I see why you need to do that
16:31dnolenseangrove: rhickey's core.async work can probably be used for stuff like this?
16:31callenat least the lambda syntax is nicer than vanilla JS.
16:31seangrovednolen: Yeah, tried to compile them inside of the cljs output, but didn't work for lots of reasons
16:31dnolenI'm really looking forward to seeing that stuff get ported to CLJS, I don't think it'll be that much work
16:31callendnolen: source maps?
16:32callenoh I almost forgot, "carthago delenda est".
16:32dnolencallen: not yet
16:32callenshucks.
16:32seangrovednolen: Haven't looked at core.async at all, just finished watching http://www.infoq.com/presentations/Concurrency-Clojure, thought I should revisit this code
16:33dnolenseangrove: yeah real Clojure promises would be cool here but they have blocking semantics
16:33seangrovednolen: Which would of course be awesome in cljs ;)
16:33winkhttp://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software sums up the mess quite nicely
16:33callendnolen: which is sorta what makes them useful.
16:34dnolenand that's probably not gonna happen, but core.async can give you blocking semantics in JS and solves the async stuff way better anyhow
16:34seangroveI wonder if they could be turned into setIntervals in all cases
16:34dnolenin CLJS
16:34dnoleni mean
16:34callenmaybe the problem can be solved with opaque macros.
16:37callenhttp://jolbox.com/dynamic-benchmark.html <--- sexy connection pooling.
16:41callencbp`: what's your github account again?
16:43callenalexbaranosky: https://github.com/korma/Korma/issues/101 are @myfreeweb's changes merged?
16:44cbp`callen: cesarbp
16:45callencbp`: meh, just fork and pull request.
16:45callencbp`: https://github.com/bitemyapp/revise
16:45callenbut now I can github stalk you.
16:46callenbwahahaha
16:50winkdammit, as if I didn't have anything better to do than look at this now :P
16:52callenwink: look at what?
16:52winkcallen: your rethinkdb stuff
16:53callenwink: oh god don't look at that
16:54winktoo late!
16:54callenthe fuck man. Look at something cool.
16:54callenwink: like my 400k LOC elisp .emacs repo.
16:54winkI'm too lazy to fire up ssh and install rethinkdb
16:54winkbut it's close enough to be interesting :P
16:54callenor my hacker-typer clone
16:54callenor my auto-logging/auditing library hack for Django
16:54callen#$@#$%%@#%
16:55winkbeen trying to look at rethink for weeks
16:56seangrovewink: Should check out Firebase
16:56seangrovePretty comparable to rethink, but considerably nicer
16:57winkseangrove: firebase.com? read about it and I'm not so sure I find it interesting
16:57seangrovecallen
16:57seangrovecallen's had too much coffee, and derailed my cljs question, so thought I would troll him a bit
16:58seangroveSo no, firebase isn't comparable to rethink at all ;)
16:58winkthe interface is JSON-y
16:58winkthat's not too far off!
16:58winkyou could even put mongodb in that bucket as well
17:00callenwink: rethinkdb, unlike Mongo, is literally JSON. MongoDB is BSON.
17:00Pupnik-callen, whats makes you say making games in clojure is a labor of love? people have used lisps for game scripting (commercially) before
17:01callenPupnik-: and some people can eat with their feet.
17:01callenmost because they don't have arms. Those that do, usually take the path of less resistance.
17:01callenseangrove: are you familiar with the stories of Diogenes of Sinope?
17:01cbp`I've done all sorts of text games with common lisp :D
17:02callencbp`: don't encourage him.
17:02winkMinecraft runs on the JVM
17:02seangrovecallen: I'm not, no. Will google it.
17:02callenwink: and most people resent it for that. It also made it less portable and less performant, not more.
17:02gtrakcallen: http://www.gamasutra.com/view/feature/2985/postmortem_naughty_dogs_jak_and_.php lisp...
17:02winkcallen: you're missing the point though :P
17:02callenwink: it eats most peoples' computers alive and often causes laptops to overheat. It's horrendous.
17:02callengtrak: don't pull GOAL out of your ass, that's just silly.
17:03callengtrak: have you seen it?
17:03technomancyminecraft outsources all the graphics stuff to lwjgl or whatever
17:03gtraknope... :-) why does it matter?
17:03callenit's assembler with parentheses.
17:03gtraksounds like a much better assembler
17:03callentechnomancy: and it's one of the least inefficient game clients in existence as a result.
17:03callenis there some reason being a Lisp user means "right tool for the right job" stops being a 'thing'?
17:03winkwhich would be a good thing
17:04callenyou don't have to use Lisp with everything if it's not the best choice.
17:04callenYou can admit it's not the God from On High.
17:04callenIt's okay, nobody will mock you.
17:04TimMcI will!
17:04callenokay TimMc will mock you.
17:04callenI won't though.
17:05technomancycallen: right; that is to say efficiency is not a prerequisite to success
17:05winkcallen: see, that somehow conflicts tremendously with your proposed usage of clojure for deployment. some people might disagree
17:05callentechnomancy: actually it's causing real problems for mojang right now.
17:05technomancy"making a game" is a very vague requirement anyway
17:05callentechnomancy: the shitty, inefficient, and unportable codebase has caused them real problems in terms of feature expansion.
17:05technomancycallen: right; all their problems would go away if they had just started out with C++
17:05callenI prefer, "make a prototype in something facile, then if you start giving a shit, fallback to C++"
17:05Pupnik-what does any of that have to do with java callen
17:05technomancybecause they would have just given up before actually shipping on account of extreme brain trauma
17:06winklol
17:06callenPupnik-: it doesn't, people are just fucking dogpiling me because I advocate rational technology decisions.
17:06Pupnik-well you haven't provided any reasons yet
17:06technomancythere are lots of different kinds of games
17:06callenit's not unreasonable to make a first version in Java/lwjgl or pygame but then scrap it for a more serious game engine.
17:06Pupnik-other than the common thought that FP is bad for games
17:06callenPupnik-: we could talk about how FRP is a black hole.
17:06technomancysome of them may have requirements that would indicate using a terrible language for them. some of them don.t
17:07callenPupnik-: and how it's insanely impractical and makes functionally pure games a boondoggle.
17:07winkdid anyone mention prolog yet?
17:07callenI'm still popping popcorn for when Carmack gives his report on porting Wolf3d to Haskell.
17:08gtrakcallen: they use MzScheme in somoe of their games
17:08Pupnik-someone already made a FPS in haskell
17:08callengtrak: I've heard of Chicken Scheme used in some iOS games.
17:08winkaccording to haskell fans, there's nothing it can't do
17:08callenPupnik-: oh yes, clearly that validates the use of FP for all game development.
17:08Pupnik-nono
17:08Pupnik-just pointing out that carmack porting wolf3d isnt a first for haskell
17:08callenLets just use haskell for everything, fuck it.
17:08callenFRP for everybody.
17:09callenwant to make a game? Hope you're doing post-doc research.
17:09rasmustowrap my monday in a monad
17:09gtrakif carmack wants to use haskell, he's carmack, he can do what he wants
17:09winkwhen you look at shipping dates, bugs and projections I do wonder if some FP wouldn't hurt though :P
17:09callengtrak: yes but if Carmack chokes I'm going to dance on the corpses of a thousand suicidal haskell programmers.
17:09callenI know betting on Carmack choking is always a bad bet, but I can't wait to see him bitch anyway.
17:10gtrakcallen: if carmack chokes then it probably can't be done :-)
17:10callenIt'll be like the good old days of the plan file.
17:10callengtrak: precisely.
17:10callenmy suspicion is that he'll produce something that works, but that it'll be less functional / comprehensible than his functional C++ he's been writing
17:10callenthat he'll hate it
17:10callenand he'll focus on simply "upping the ante" with C++ and FP
17:10technomancyshoulda used ocaml
17:11callentechnomancy: she's dead Jim.
17:11callentechnomancy: just let it go.
17:11technomancythey're all about falling back when speed is an issue
17:11winkno one ever shoulda used ocaml
17:11gtrakuncharted 2 uses scheme for scripting anyway: http://www.slideshare.net/naughty_dog/statebased-scripting-in-uncharted-2-among-thieves
17:11callenyeah uhm, who cares?
17:12callenpeople used Lua back when it was slow for game scripting too.
17:12callenthat's not really the point.
17:12callenyou can't do the whole thing in a scripting language.
17:12callenthere has to be a game engine, probably compiled from C++ with retained mode graphics.
17:13callenCivilization used Python. That doesn't mean you should write a game engine in Python.
17:13Pupnik-no
17:13callenIncidentally, their use of python is part of what slowed the game engine down so badly.
17:13Pupnik-but you can write a game with pythong and sdl
17:13technomancyI don't think anyone is saying never use C++
17:13gtrakpython sucks pretty hard for this, much harder than java or clojure
17:13gtrakmostly due to GIL
17:14callenthat is far from the biggest or only problem.
17:14callenthe GIL is a strawman for people who don't understand Ruby or Python to complain about.
17:14technomancyI'm just saying maybe if you've got requirements for which C++ is the best choice, maybe you should think about how badly you actually want to write that game and whether less demanding games can still be fun to play.
17:15winkso let's conclude http://hylang.org/ as the worst game engine language? A lisp on python.
17:15callentechnomancy: I hear backgammon can be done in JavaScript.
17:15technomancy"Sometimes Excel is the best tool for the job; the trick is to never find yourself in the situations where that's true."
17:15gtrakcallen: I'd rather blame pervasive GC than a 'language'
17:16callenactually no, the semantics of Ruby and Python are a real problem
17:16gtrakC++ might have more mindshare.. not sure why it's technically superior
17:16callenbecause they create the obscene GC pressure to begin with
17:16callenthe semantics of the metaprogramming model and object wrappers and dictionary/hash-map centricity generate huge amounts of garbage for the GC to sift through.
17:16gtrakI knew that, AND I think GIL is a problem, oh noes..
17:17callengtrak: "not sure why it's technically superior" - do you think you can write a faster game engine in Clojure?
17:17gtrakwith enough time and money :-)
17:17callennope.
17:17callenyou'd just end up writing a compiler that ignored the clojure code and just spat out assembler that did what you wanted.
17:17gtrakwell yea
17:17callenNope.
17:18gtrakyou make no sense.
17:18gtrakI would probably write it in C++, but I wouldn't say I couldn't do otherwise
17:19callengtrak: I'm not supposed to make sense, only to be right.
17:19winkIf the route to game development leads to C++, I'll pass on game development
17:19gtrakhah
17:19dnolenalso Minecraft
17:19patchworkWell callen, now that you have convinced the whole #clojure channel of your rightness, what are you going to do with your life?
17:19gtrakI've done C++, even prototyped games in it, it's not terrible, it's just tradeoffs
17:19Pupnik-wink, not at all, look at the success of unity
17:19callenpatchwork: retire on the proceeds and pay people to bring me scotch and sodas.
17:20gtrakcallen is being very religious about those tradeoffs
17:20callenno, just rigorous.
17:20technomancyI've never seen so many nickels
17:20patchworkDrowning in nickels
17:20technomancypatchwork: all scrooge-mcduck style diving board
17:20winkPupnik-: I don't think so, apart from a surprisingly nice experience with Qt lately I've always hated it
17:21callentechnomancy: that would be freakin' sweet.
17:21callentechnomancy: especially if the Scottish accent is included
17:21gtrakhow about.. it's impractical for one man to write a AAA game engine in any language
17:21callen"but Unka Scroooooge"
17:21callengtrak: nope.
17:21technomancygtrak: it's impractical to write an AAA game.
17:21gtrakexample?
17:21clojurebotapi examples is examples
17:21callengtrak: Carmack
17:22winkok, then say "first"
17:22winkfor carmack it's just what he's always done
17:22winkand Rage wasn't AAA
17:22wink(or whatever that iPad disaster was called)
17:22gtrakno one can compete with carmack, because they didn't write wolf3d, doom, etc..
17:22callenalex_baranosky: https://github.com/korma/Korma/issues/101 are @myfreeweb's
17:23callenchanges merged?
17:23gtrakif no one had worked with carmack on those projects, would he be able to pull quake4 out of his ass from scratch?
17:23callenwink: Rage was AAA
17:23callenwink: top of the line game engine, even if the game itself was poor. Dunno what you mean about iPad, that's something else.
17:23callenRage was a PC and console game.
17:23callengtrak: probably.
17:23gtrakif he wasn't involved with the development of graphics for the last 20 years, would he have such a head start?
17:24callengtrak: it's said the codebase was consistently 80% Carmack for a long time after Quake 1, 2, and 3.
17:24gtrakhe's an institution
17:24callenhe's a sociopathic demigod and we should supplicate ourselves before him and his rocketeering minions.
17:24patchworkcallen: You sound jealous
17:24winkcallen: https://itunes.apple.com/en/app/rage-hd/id400707675?mt=8 and I didn't like it at all
17:25callenpatchwork: intensely.
17:25callenwink: I don't know why you would buy junkware like that.
17:25callenwink: for the record, I didn't like Rage on the PC either, except I lost $60 to figure that out.
17:25winkcallen: I've never even possessed an apple device. I just played it.
17:25callenwink: you are more fortunate than I.
17:25winkso it seems
17:26callenwink: do you like connection pooling libraries?
17:27winkcallen: I think I even skipped using c3p0 and with my current needs of max 1 req/s I'm not sure I have use for them
17:28callenwink: http://jolbox.com/dynamic-benchmark.html check out that hot pooling action.
17:28winkcallen: I saw it
17:28callenwink: sexy, yes?
17:28winkdepending on your needs, maybe
17:29Raynescallen, wink: I liked Rage.
17:29RaynesI liked Borderlands so much more, but I enjoyed Rage
17:29callenRaynes: I got through the first mission hub, then got bored.
17:29callenRaynes: Borderlands is better.
17:30winkRaynes: good for you, I somehow ended my shooter days with Q3 I think
17:30callenRaynes: have you played B2?
17:30winkwhich is only like 12 years ago...
17:30callenwink: no, is sexy regardless! need or no!
17:30Raynescallen: If it's called Borderlands you bet I played it.
17:30callenwink: rocketjumpin' railgunnin' multiplayin' Q3?
17:30callenwink: or piker bot stomping bullshit?
17:31winkcallen: my first thought was "wait, it didn't have singleplayer anyway?"
17:31callenRaynes: I stopped after the first. How's the second? Did they balance the classes this time?
17:31RaynesIt was amazing.
17:31callenwink: I knew scumbags that bot-stomped and claimed to be amazing at Q3 at the time. They got quiet after a LAN party. :P
17:31callenI wasn't even that good at Q3, I was better at UT - which just made it funnier for me.
17:31callenflak cannon or bust.
17:31winkcallen: never played that much. we still played ActionQuake2 until long into the 00 years
17:32callenwink: I remember the hook mod for Q2
17:32winkI even played counterstrike 0.5 or somewhat before it became cool.
17:32winkwe mocked it for being so slow-paced
17:33callenmy real problem with CS is that it felt (and still does) too kill-tradey
17:33callenunless you camp tons.
17:33RaynesDoom 3 is one of my favorite fps games.
17:33RaynesBioshock takes the cake.
17:33callenBioshock is cheating.
17:34RaynesIf you dis bioshock, I'm going to cause you bodily harm on the 29th.
17:34Raynes"Oops, I got too excited at the concert and flailed my arms in such a way that I broke your nose."
17:34callenRaynes: psh. It's LA, I'll have bodyguards in tow.
17:34callenLA == gettin' shot by gats right?
17:34rasmustoI'm playing halflife 2 with an oculus rift, that's pretty cool
17:34RaynesI've been shot by so many gats.
17:35Raynesrasmusto: I haven't played HL2. Played the first one a while back though.
17:35callenRaynes: I love Bioshock, I just think picking it as a favorite FPS is cheating. That it was an FPS is almost besides the point.
17:35RaynesThe end boss of that game made me want to give up on video games forever.
17:35rasmustoRaynes: I'm the opposite, haven't played the first
17:35RaynesDon't.
17:35callenrasmusto: don't
17:35rasmustohaha
17:35RaynesYou'll double murder suicide your whole family.
17:36RaynesDon't put your family through it.
17:37callenRaynes: ohay, new best practices for Korma: https://github.com/myfreeweb/clj-bonecp-url
17:37winkDon't bring your guns to town son, leave your guns at home
17:37callenRaynes: in case you decide to stop using MongoDB and use a database that shows you care about your data.
17:37rasmustoI almost puked into my vr headset trying to climb ladders in the sewers, that's an interesting feeling
17:38callenrasmusto: a resounding endorsement of the oculus.
17:38Raynescallen: My data is just fine.
17:38rasmustocallen: It needs a bit of calibration and a very calm stomach
17:39callenrasmusto: uh huh.
17:39callenRaynes: maybe.
17:39callenRaynes: also, I wasn't kidding about that migration script thing for RethinkDB
17:39callenRaynes: it's horrifying and leads me to believe the DB is untouchable until they clean that up.
17:39RaynesI didn't look at it because I can't actually use rethinkdb without a Clojure driver. :<
17:40callenRaynes: probably for the best for now. But this exists: https://github.com/bitemyapp/revise
17:40shriphanihi everyone. In Python, I could use a decorator to rate-limit a function (using a global variable (say) that recorded the last time the function was called. What is the clojure way of doing this ?
17:40winkrasmusto: does it have smell enabled? :)
17:40callenshriphani: a closure?
17:40tieTYT2is there anything built in to clojure that's the same as (-> (group-by f %) vals) ?
17:40rasmustothough I'd say that the pros outweight the cons. The 3d is insanely good, rotational head tracking is 95% there, and the game support is surprisingly good for this early
17:40rasmustowink: not unless you puke
17:40wink:P
17:41shriphanicallen, umm docs ? I am quite a n00b.
17:41RaynestieTYT2: (vals (group-by f %))
17:41RaynesThat's built in. :p
17:41callenshriphani: http://en.wikipedia.org/wiki/Closure_(computer_science)
17:41RaynesThere aren't any docs for closures.
17:41tieTYT2Raynes: sweet. Can't wait to try that
17:41RaynesClosures are basic fundamental functional programming things.
17:41RaynestieTYT2: <3
17:41callenRaynes: that wasn't going to stop me linking the Wikipedia page.
17:41tieTYT2i'm going to take that as a no
17:42winkGetting closure with clojure closures?
17:42Raynescallen: Well, the wikipedia page is the relevant documentation.
17:42RaynesI just meant that there isn't really any Clojure-specific closure documentation.
17:42jodaroRaynes: " blah blah blah without a Clojure driver ... "
17:42jodarosounds like a challenge
17:42callenshriphani: are you a PhD student?
17:42Raynesjodaro: callen already did it.
17:42callenI didn't do shit
17:42callendon't blame that on me
17:42RaynesYou did too.
17:42Rayneshttps://github.com/bitemyapp/revise
17:42jodaroheh
17:42callenit only half works.
17:42Raynesjodaro: Also, hi. Haven't seen you round these parts in a while.
17:42shriphanium callen why ?
17:42winkcallen: writing or reading?
17:42jodaro(EXPERIMENTAL TEST HARNESS, DOESN'T DO ANYTHING YO)
17:43jodaroheh
17:43callenshriphani: I'm measuring my self-worth, please answer the question.
17:43Rayneslol
17:43jodaroRaynes: hi. been doing other random things and playing with Go and Haskell
17:43jodarobut i think i'm back to clojure-land
17:43Raynesjodaro: Go? You poor child.
17:43shriphanicallen.. yes.
17:43RaynesAt least you had some Haskell to ease the pain.
17:43callenshriphani: I knew it.
17:43callenRaynes: I had a similar walk in the wilderness.
17:43callenthen I decided I didn't enjoy pain.
17:44callenshriphani: are you a PhD student in CS?
17:44RaynesI wanted to use Go for something recently but people were like "OMG NO USABLE COLLECTIONS"
17:44callenshriphani: was your undergrad in CS?
17:44RaynesBut it's the only good thing that produces small binaries these days.
17:44callenRaynes: no, each collection is a special snowflake you must artisanally craft yourself in Go.
17:44jodaroi'm liking Go for a few reasons
17:44RaynesExcept for OCaml which technomancy will helpfully point out if I don't immediately correct myself.
17:44callenI don't think statically linked binaries are known for being "small"
17:44callenbut okay.
17:44jodaroand i totally love haskell
17:44callenthey are self-contained
17:44callenbut not small.
17:44shriphanicallen, ee mostly. phd in cs now.
17:45Raynescallen: My definition of small is less than 10 megsa.
17:45jodarobut Clojure still hits way more points for practicality
17:45tieTYT2I wrote this program that can crawl a bunch of sites. Each site is different and those are handled by passing in a map of functions that do things like, find-the-links-you-care-about. That depends on the client of the code so it's configurable. But that is used deep down in the bowels, so I end up having to pass a map throughout my code. I realized that I could just mark the functions as
17:45tieTYT2dynamic and require every client to specify a binding. Is this a normal practice?
17:45callenshriphani: how many years are you into the PhD program?
17:45shriphanicallen, 1.
17:45callenRaynes: you've clearly been on the JVM too long.
17:45RaynesHaskell either produces gigantic binaries or very small binaries and I haven't quite figured out how to make it decide between the two on demand.
17:45jodaronot the least of which being that we run shit on the JVM already
17:45callenshriphani: you really need to get those CS fundamentals together.
17:45Raynescallen: No, I clearly know how small my binaries need to be to be reasonable for my purposes.
17:45callenshriphani: I dropped out of my CS undergrad in the first quarter when I was 18 and I knew what closures were *back then*
17:45RaynesI actually like Rust very much, but it's so completely frickin' unusable.
17:46callenRaynes: for fundamental and temporary reasons.
17:46jodaroyeah rust could be cool
17:46hiredmantieTYT2: what you really what is polymorphism, look at mutlimethods or protocols
17:46jodarobut again
17:46jodarotoo soon to tell
17:46callenthe problem with Rust is that smart people are making a smart programming language for smart people.
17:46RaynesThe documentation is worthless, it doesn't have a good and documented http client (which is ironic given that their writing web browser crap in it), and the packaging system is a crazy mess.
17:46RaynesI like to think I'm pretty smart and I still can't figure that shit out.
17:46callenand the only documentation is a log-aggregation of the mailing list directly injected into your brain
17:46callenso if you're not klabnik or walton you're just sorta fucked.
17:47winkwho is walton?
17:47RaynesGo is fantastic on the documentation front, but blurgh everywhere else.
17:47callenwink: he works on Rust.
17:47callenwink: mad genius type, you'd like him.
17:47callenI think he's a PNW'er.
17:47RaynesWhat about Hoare?
17:47jodaroGo has nice doc stuff
17:47jodaronice tools
17:47RaynesAs an aside, I feel naughty saying that word.
17:47RaynesHOARE
17:47winkcallen: what does PNW mean?
17:47callenwe're all filthy Hoares.
17:47jodarodoes a good job of getting you writing some code fast
17:47jodarobut
17:47callenwink: pacific northwest.
17:47callenwink: cf. technomancy
17:47winkcallen: ah, need to get my geography straight :P
17:48jodarothe package version thing is going to be a problem
17:48tieTYT2hiredman: but each client will need to write the implementation of like 5 functions. That's a good fit for protocols, but I don't have different types being passed in. For a multimethod, what would I be dispatching on?
17:48winkjodaro: yeah, I found it wicked cool until someone told me there's no versioning
17:48callenRaynes: earlier conversation reminded me of that masters graduate of CS I met at an insurance company. Her undergrad was CS too. Had to explain what dynamic and static typing were.
17:48callenRaynes: I pretty much stopped planning on going back to school that day.
17:49callencompletely.
17:49jodarobut i really dig the godoc stuff
17:49hiredmantieTYT2: whatever, you can dispatch on the url
17:49tieTYT2hiredman: that's true. Is that true for protocols?
17:49Raynescallen: I know a similar person.
17:49callenRaynes: can I mock them?
17:49RaynesSure.
17:49winkthere are several in each CS course :P
17:49hiredmanno, for protocols you would need a type for each "type" of thing
17:49tieTYT2i've read a bit about protocols and that didn't seem possible to me. I remember it needing a new type for dispatching
17:50callenRaynes: I need to satisfy my blood-thirsty impulse for class warfare.
17:50hiredmancorrect
17:50callenwink: schmucks that do their coursework and nothing else?
17:50tieTYT2ok this sounds pretty good. And I can define the multimethod in the client NS to keep things organized and small in the core functionality
17:50callenoh that reminds me.
17:50jodaroclojure is way nicer to look at than Go, too
17:50callenI should replace that retarded type dispatch with multimethods
17:50callenjodaro: that's an understatement
17:50jodaroanyways
17:50jodaroyeah
17:51callenbut I'm convinced Rust is intentionally designed to look Rusty
17:51tieTYT2thanks
17:51justin_smithtieTYT2: with a protocol what you would pass in is something that implements that protocol, instead of dispatching on it, you would be passing it the messages of that protocol and letting it do its thing in response
17:51winkcallen: not necessarily. some were the mathetatician types, some were the project manager type, some were just idiots and some were the people you'd find in several language channels on irc
17:51callenwink: speaking of language channels on IRC, I think the most evil/hateful one is ##C. Thoughts?
17:52callenRaynes: https://github.com/bitemyapp/revise/blob/master/src/bitemyapp/revise/core.clj#L150 these should be multimethods right?
17:52tieTYT2justin_smith: yeah, but ignoring the fact I don't have different types, with multimethods things don't have to be passed around
17:52winkcallen: never tried a c channel, actually. found the linux/distro ones pretty bad in general
17:52callenwink: haha, oh man. You are in for a *treat* if you ever ask a question in ##C.
17:52Raynescallen: *shrug*. Unless you need to add several more in the future or each body is very large, not really.
17:52callenjust don't send me the bill for the time spent in the burn ward.
17:53jodaroahh, rethinkdb is protobuf based?
17:53callenRaynes: really? I figured I'd get flamed for that code.
17:53callenjodaro: I prefer to believe it's pain based.
17:53winkcallen: seeing that last line I wonder if there's #C# or ##C# :P
17:53callenjodaro: made up jack-shit idiom ignoring length prefix bullshit.
17:53tieTYT2hiredman: my current implementation to me seems like a higher ordered function. How could you tell I wanted polymorphism instead?
17:53jodarosome might argue they are one and the same
17:53Raynescallen: https://github.com/bitemyapp/revise/blob/master/src/bitemyapp/revise/core.clj#L167 ur a real profeshunul
17:53callenwink: they're friendlier.
17:53callenwink: ##C is the greatest concentration of evil in the entire digital world.
17:54callenRaynes: as long as I can distinguish one of the two exceptions I throw, it's fine.
17:54jodarohahah
17:54winkcallen: that's good to know. I usually ask some personal contacts for advice on c anyway
17:54callenwink: you should ask ##C next time
17:54callenwink: then tell us about it in here.
17:54winkcallen: depends on when I do c next.. could be months
17:55callenRaynes: I use real and informative error messages on stuff other people are supposed to use, I said in the README.md that nobody is supposed to touch this clownshoes test harness.
17:55callenwink: I can wait. So can the hive of scum and villainy.
17:56hiredmanI have a X, Y, and Z and I want them to do different things at point C in my code
17:56callenhiredman: are they functions?
17:56tieTYT2callen: he was responding to me
17:56callenhiredman: can I buy a vowel?
17:56callenhiredman: is this the daily double?
17:56callencan I phone a friend?
17:57jodaro(how many game show references can callen make ...)
17:57callentieTYT2: when has that ever stopped me?
17:57tieTYT2hiredman: isn't that just like (map) for example? The only difference is I wrote the code
17:57jodarobig money, no whammies
17:57callenjodaro: the secret is to cheat.
17:57bhenryhello
17:57RaynesGood afternoon sir.
17:58bhenryhow would i go about scraping all the text from html to make text/plain versions of text/html emails?
17:58Rayneshttps://github.com/Raynes/laser
17:58bhenryi want to run a custom function for certain tags that will add to the text it creates.
17:58callenbhenry: heuristics if you want intelligent main content abstraction
17:58hiredmantieTYT2: I don't follow
17:58jodarowow
17:59bhenryso i can turn links into "link text (link-url)"
17:59RaynesSee my link. I'm sure you can do something with laser.
17:59tieTYT2ok I'm looking at (map) as your text book case of a HOF
17:59callenbhenry: http://en.wikipedia.org/wiki/Longest_increasing_subsequence
17:59hiredmanmap is always mapping a function over a seq, but you want (F A) to do different things depending on A
17:59callenbhenry: www2009.eprints.org/98/1/p971.pdf‎https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CC4QFjAA&amp;url=http%3A%2F%2Fwww2009.eprints.org%2F98%2F1%2Fp971.pdf&amp;ei=LZuaUYeAJqbRiwK-6oHgCg&amp;usg=AFQjCNEss8bjU9D1yd-1KwWHQ7AcA3Adgg&amp;sig2=d3U8ec1VFKSSPs0ilW0yTA
17:59callenhrm. fail.
17:59callenwww2009.eprints.org/98/1/p971.pdf‎
17:59callenwww2009.eprints.org/98/1/p971.pdf‎
18:00callenwow, keyboard suckery today.
18:00callenbhenry: ^^ anyway, that.
18:00tieTYT2hiredman: what's (F A)? You mean like this: (map (F A) AS) ?
18:00rasmustocan functional programming fix X11 copy paste?
18:00callenrasmusto: no but it can heal the Earth.
18:00tieTYT2i think I see your point
18:00callenrasmusto: how'd you know I was an Xorg user? :(
18:00tieTYT2in map, the F is what changes
18:00hiredmantieTYT2: I mean somewhere you call a function F on a value A, and you want it do do different things based on what A is
18:01callenhiredman: isn't this called an if-case?
18:01callen(cond ...)
18:01rasmustocallen: I've middle click dumped embarrasing stuff before
18:01rasmusto(mostly my bad code)
18:01callenhiredman: I think I know this one dude, I even used cond recently.
18:01callenrasmusto: yeah, I was using m3
18:01callenannoying.
18:01callenhiredman: pick me pick me
18:01callenI know the answerrrrrrrr
18:02tieTYT2hiredman: anyway, I think this will just take time for me. I thought writing my own HOF was the best solution. Now that you've suggested multimethods I can see that it's a better approach. The only thing that irks me is that I can't articulate why, given the circumstances
18:02tieTYT2thanks for the help
18:03hiredmanpassing around your own vtables is silly?
18:03tieTYT2yeah
18:04callentieTYT2: multimethods are known to cause: eczema, dryness, seepage, night sweats, and can interact badly with MAOIs.
18:05callentieTYT2: please see your doctor first.
18:05tieTYT2seems like a good fit
18:05technomancymaoris?
18:05callentechnomancy: http://en.wikipedia.org/wiki/Monoamine_oxidase_inhibitor
18:06winkinterested, I only knew MAOs
18:06winks,ted,ting,
18:06technomancyI prefer to imagine multimethods oppressing new zealand tribal groups, sorry.
18:08callentechnomancy: I'm imagining "revenge against the luddites" by way of metaprogramming.
18:08callenmacros stomping textile workers. multimethods driving out natives.
18:09technomancymiddlewares engaged in gerrymandering
18:10kovasresources must be decomplected from culture
18:10kovasfork/join executing in the minds of sleeping african children
18:10callenkovas: wealth alienation from population and land is the capitalist dissolution of the worker class!
18:10winkthe Ice Ages are the world's GC then?
18:11technomancykovas: I think that happened in Overland
18:11callenI've always thought of people who can't keep warm as seeming reptilian. Works for me.
18:11technomancyotherland
18:11kovasis that a book?
18:11hiredmanseries
18:12kovaswill read it to pick up some pointers
18:13tpopeRaynes: sup
18:14callentpope: sup
18:14Raynestpope: I was curious if you can sign commits with :Gcommit. In the git command line you can do `git commit -S`.
18:14RaynesThe answer here is usually "try it", but I didn't feel like it.
18:14callenRaynes: are you cheating on Emacs?
18:14tpopedoesn't :Gcommit -S work?
18:14RaynesIf you think it does then it probably does.
18:14RaynesAnd that's what I was wondering.
18:15RaynesI'm not sure how the args to :Gcommit are handled.
18:15Raynescallen: I have been for a while. I tend to hop back and forth when I get bored.
18:15Raynescallen: The benefit is that I kick ass in both editors, especially emacs with evil-mode.
18:15callenRaynes: if you're bored, why not zoidb^H^H^H^H^Hhelp out with revise? :P
18:16RaynesBecause I'm at work. :P
18:16rasmustoRaynes: evil-mode and paredit clash a bit too much :(
18:16callenparedit is a bad idea anyway
18:17Raynesrasmusto: Sure, if you mean not at all ever.
18:17technomancy~guards
18:17clojurebotSEIZE HIM!
18:17RaynesI've never once had a clash between paredit and evil-mode.
18:17rasmustoRaynes: oh, well I was trying to learn emacs and paredit (while using evil), and some command clashed
18:18rasmustoI'm generalizing a bit too mcuh about the conflicts
18:18rasmustocallen: what's wrong with paredit?
18:19callenrasmusto: fascist editor mode restrains the will of the people.
18:19rasmustocallen: :)
18:19callensee, rasmusto gets it.
18:19Raynescallen: You'll have to pry paredit from my cold dead hands.
18:19callenRaynes: are you a white walker from Game of Thrones?
18:19rasmustoRaynes: s/pry/slurp
18:20callenam I the only person who doesn't get into trouble with the parens?
18:20callendid all those years of non-tool-assisted CL immunize me or something?
18:20callenwhat is wrong with youuuuuuuu
18:20technomancycallen: maybe you've trained your brain to stop complaining about performing menial tasks?
18:20winklast I asked the common response was I was weird for using stuff like "dd" in vim+clojure
18:21callentechnomancy: dude. I am the whiniest person in the world about unnecessary schlep. That's highly unlikely.
18:21rasmustocallen: I don't get in troble without paredit, but yeah, I don't have to think about parens
18:21technomancycallen: I see no other explanation
18:21callentechnomancy: plausible. I'm still baffled though.
18:22callenshriphani: you should implement a Scheme.
18:22callendnolen: agree with me.
18:23callenshriphani: a small one.
18:23winkcallen: does anyone ever agree with you? :)
18:24winkyogthos: you might want to refresh luminusweb.net maybe. just pulled to fix a typo that's been fixed already in the repo :P
18:24callenwink: all the time. yogthos often does.
18:24callenwink: I'm the reason Luminus uses clabango.
18:24callenwink: and you *don't* want to get me started on template libraries >:)
18:25winkcallen: I really don't. so far I'm happier with clabango than with hiccup. but it's not hiccup's fault I think
18:25callenanother one bites the dust, hey hey.
18:26calleneventually everyone will be using the Clojure Master Web Stack (TM).
18:26Raynescallen: I'm going to beat you over the head with a laser.
18:26callenseangrove: your website is held hostage by snotty startup founders that will sell you out for ferrari money. Nothing you say is valid.
18:27callenRaynes: you're just mad because I sold somebody else's milkshakes.
18:27rasmustocallen: only one web-stack per household
18:27Raynes*My* milkshake brings *all* the boys to the yard.
18:27RaynesBecause it's better than yours.
18:27RaynesThough admittedly, if you can give a talk for a bloody hour and a half about a templating engine… sigh.
18:27RaynesI try so hard to make it not complex, but then people still come out the other side cross eyed.
18:27winkrasmusto: wait, what? I'm using 5 webstacks on my server alone.
18:28callenRaynes: I can go longer than that.
18:28callenI CAN GO ALLLLL NIIIIGHT LOOOOOONG
18:28RaynesI wish it was okay to just tell people "Please, don't try to understand how this works. Just learn how to use it and do that."
18:28rasmustowink: fighting the man
18:28callenRaynes: unaccepta-burrrr
18:28winkRaynes: you hate contributions?
18:28callenwink: don't touch his precioussssss
18:29Raynescallen: At one point during my talk amalloy was like "C'MON SHOW US WHAT YOU CAN DO WITH IT GOD." trying to get me to shut up about implementation detail.
18:29callenLOL
18:29callenI legit lol'd IRL
18:29amalloyi don't think i called you god. that doesn't sound like me
18:29RaynesAnd then people asked the strangest questions so I officially give up on explaining it to people. I'm just gonna show what you can do with it from now on.
18:29callenI should put together a talk on why Clabango is awesome and everything else blows chunks. It'll be 3.5 hours long and end with a lobotomy.
18:30technomancycallen: yours or a selected audience member's?
18:30winkcallen: please fix recursive includes first
18:31callentechnomancy: entire audience
18:32callenwink: capital idea but you shouldn't be using includes that extensively.
18:32callenwink: blocks are usually more appropriate. What'd you do?
18:32winkcallen: wasn't extensively, just an accident with extends and include. it never terminated
18:32callensweet.
18:32winkcallen: I would've expected some nesting level stop at ~10 or 20 levels- not crash the hvm
18:33callenwink: did you document it on the github?
18:33winkcallen: not really, I fixed the stupid mistake in my templates
18:33callenwink: don't tell me you didn't file an issue.
18:33callenoh come on dude
18:33callenwink: don't make me get my beatin' switch.
18:33callenwink: put the repro on the github repo!
18:33technomancycallen: "That's cool. You're a cool guy. Hold on a second." (panel 3 of http://www.penny-arcade.com/comic/2007/4/30/)
18:33callenwink: (please?)
18:33winkcallen: I'll try to reproduce it
18:34callenwink: danke schon.
18:34callentechnomancy: <3
18:34callentechnomancy: ever quotable.
18:34callentechnomancy: they're PNW'ers too.
18:34callentechnomancy: that's some solid PNW solidarity you've got man.
18:34winknotice how there's a typo in either panel 1 or 3?
18:35callenwink: I think the implication is that the dude was both psychotic and illiterate.
18:35technomancycallen: I think the shop in http://penny-arcade.com/comic/2011/01/17 is a few doors down from one of the coffee shops I frequent
18:36callentechnomancy: I knew a place like that back home. Made getting Magic TCG stuff excruciating.
18:36callentechnomancy: "Why would you buy booster packs from that set? That set fucking sucks. You should just play ${THING}"
18:36winklol
18:37callentechnomancy: "What kind of deck are you even trying to build? That's stupid."
18:37callentechnomancy: "Why would you buy those booster packs without a deck planned out? Are you a noob?"
18:37callenthen the noogies and toilet swirlies happen.
18:37calleneventually you leave bruised and emotionally scarred with your cards.
18:37technomancycallen: like this? http://www.penny-arcade.com/comic/2006/9/6/
18:38callentechnomancy: that plus the "runs a gaming/toy shop"
18:38callentechnomancy: also you are way too good at pulling up PA comics.
18:38technomancycallen: for whatever reason indexing on PA is a lot worse than most strips
18:38callenIt's pretty bad.
18:38callenYou just need to know the titles.
18:38technomancyohnohrobot.com is my secret weapon for the indie ones
18:38winkare these gaming shops that common over there?
18:38winkI found having 2 in my town quite luxurious
18:39callenwink: what's "over there"?
18:39callenwink: is that a slur against westerners?
18:39winkcallen: america apparently
18:39callenwink: you're slurring us. Like a slurry.
18:39callenwink: they're common in cities, not as much in smaller towns.
18:39winkcallen: dunno. generalizing about as much as you think I'd differentiate between westerners and east coast people? :P
18:40callensmallest town I know of that had more than one serious gaming place was like 15k pop
18:40callenhad 2 or 3 at various points
18:40callenwink: America has low taxes and low cost of starting a small business, that means random stuff just kinda blossoms all over the place.
18:40winkI know I could buy magic and some role playing stuff in one of the big toy stores in the malls. but nothing extraordinary
18:40callenwink: that's because we're awesome and American.
18:41Caligois anyone on?
18:41callenCaligo: nope
18:41winkcallen: I do think comics and "gaming" stuff is also more prevalent.
18:41callenCaligo: we're all fast asleep. You're talking to our Clojure Powered (TM) NLP robots.
18:42callenwink: because MURICA is awesome.
18:42Caligocallen: Oh no!!!
18:42winkcallen: haven't experienced first hand
18:42callenCaligo: what do you mean oh no? It means we've made things that pass the turing test. Shit is awesome.
18:42callenwink: you should visit. And then never leave.
18:42callenCaligo: I'm not sure I'm convinced you're not a well designed bot.
18:42winkcallen: they usually have something against folks doin just that
18:42callenCaligo: how do I know you're not just here to troll with fake botty questions?
18:42brehautyou know whats not awesome about america? the cost of international postage.
18:42brehautbastards
18:42Caligocallen: but, but robots that pass the turing test -> robot apocolypse
18:43callenbrehaut: physical goods are for plebs.
18:43winkbrehaut: goes both ways
18:43callenCaligo: maybe, if it was spelled apocalypse
18:43winkor let's say.. customs are worse than postgae
18:43Caligocallen: that proves, I'm not a bot :)
18:44brehautwink: luckily my customs is only insane and a PITA over about NZD400 value.
18:44winkbrehaut: I've paid ~15$ for a t-shirt and 15 more for customs. from america to germany
18:44hiredmansmuggling wombats
18:44callenCaligo: bots can make mistakes.
18:44callenwink: that's because germany isn't a real country.
18:45brehauti would like a wombat
18:45Caligocallen: they can't recognize that they have made a mistake.
18:45brehautthose things are hilarious
18:45callenbrehaut: you can get those?
18:45dnoleninteresting CLJS perf question http://stackoverflow.com/questions/16641250/clojurescript-map-lookup-slow/16659463#16659463
18:45callenbrehaut: only thing better than a wombat is a kakapo.
18:45callenBest parrot in the world.
18:45hiredmanhttp://imgur.com/gallery/Pu8Bry7
18:45brehautcallen: sirocco frinstance
18:45Caligowhat has the clojure irc reduced to?!?!
18:46callenCaligo: uhm, a collection of data?
18:46Caligocallen: besides that...
18:46callenor a final result?
18:46callenisn't that what reducers and reduce produce?
18:46callen(say it out loud)
18:46brehauthiredman: thats the best kind of bat
18:46callenhiredman: OMG THAT IS CUTE
18:47callenHOWDOIGETONE HOWDOIGETONE HOWDOIGETONE HOWDOIGETONE HOWDOIGETONE
18:47rasmustohiredman: even that url is cute :)
18:47brehautcallen: re:kakapo, kaka and kea are also pretty awesome
18:47brehautjust not as rare
18:47callenbrehaut: are they as sociable though?
18:47brehautcallen: hells yes
18:47callenbrehaut: the appeal of the kakapo and cause for its rarity is the sociability.
18:47callenbrehaut: REALLY?!
18:47brehautreally
18:48callendude I am getting a bird.
18:48brehautkea populations in Arthur's Pass are in trouble because they are way to sociable and people feed them people food (and cars) and its not good for them
18:49jodaroheh
18:49brehauthaha
18:49callenchannel is making me laugh too hard today
18:49brehautim not kidding about the cars; kea will rip apart as much of an unattended car as they can and in very little time
18:50jodarowow
18:51callenbrehaut: that sounds more like an Australian bird than an NZ one.
18:51brehautcallen: its not going to kill you
18:51callenyeah but if it touches my car I will kill *it*
18:51brehautit'll destroy your belongings in a very friendly way
18:51callenLOL
18:51callenbrehaut: are you from NZ originally?
18:51brehautim from NZ right now
18:51callenoh, you mentioned US postage
18:52callenfigured that meant US origination.
18:52brehautnope, i get stuff posted to NZ from the US sometimes, but its getting insanely expensive
18:52callenblame NZ customs
18:52brehautnope
18:52brehauti mostly dont have to pay NZ customs on it
18:54brehautcost of shipping for gaming books and related stuff has reached prohibitive levels
18:54brehaut(its still viable for stompboxes, but only just)
18:55brehaut</complaining>
18:55hiredmancan't you just ship direct from china?
18:56winkbrehaut: be glad you're not being charged for long-distance irc. that'd be a lot of money right now.
18:56brehautlol
18:56brehauthiredman: not that ive seen
18:57hiredmanactually I was just reading some forum posts of people in spain complaining about the extra costs of buying go boards from japan -> us importers
18:57technomancytime to bring back the silk road
19:00winkfollow the yellow brick road
19:01brehautthats only for importing wombats
19:05winkdamn, I think I reinvented a wheel. by lack of rtfm
19:07gtrak(recur (rest brick-road))
19:09callenwink: in a similar anecdote of being on the slow boat, I finally got a sonicare toothbrush recently. AMAZIIIIING
19:13jodarocallen: costco?
19:15callenjodaro: kohls
19:20tieTYT2if I try to use clojure for SICP, will it mess me up? Is it better to use scheme for that?
19:22brehautyou'll have to know enoguh about both languages to translate idioms
19:22tieTYT2hrm, sounds like I should just use scheme
19:22brehaut,(cons 1 2)
19:22clojurebot#<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
19:22hyPiRionDotted lists aren't existent in Clojure for instance
19:22tieTYT2what I hate about that book is the examples are more complex than the material
19:22Apage43probably. I tried working through http://greenteapress.com/thinkstats/ in Clojure instead of python
19:23hyPiRion...as you just saw
19:23Apage43and it took a lot more gumption to both translate the examples -and- work through the text
19:23rasmustowho was ranting about 80 column text today? I just turned off colorcolumn in vim and I'm immediately less stressed
19:25technomancy._.
19:36patchworkI can't get the simplest query to work in clojure.java.jdbc!
19:36patchwork(sql/query db ["select * from model"])
19:36patchworkworks
19:36patchwork(sql/query db ["select * from ?" "model"])
19:36patchworkfails with "syntax error at or near "$1""
19:36patchwork???
19:36lazybotpatchwork: Oh, absolutely.
19:36patchworkI don't have a $1 anywhere!
19:37callenpatchwork: use Korma.
19:37callenpatchwork: stop using clojure.java.jdbc
19:37patchworkDoes no one use clojure.java.jdbc?
19:37patchworkI didn't realize
19:37technomancyno, that's nonsense
19:37callenpatchwork: nobody worth listening to.
19:37brehautpeople use jdbc
19:37brehautlots of people
19:37technomancyc.j.jdbc is all I use
19:37cbp`I do :/
19:37callenthey enjoy pain.
19:38hiredmanyou can't use a table name as a parameter like that
19:38callendo not listen to those fools.
19:38brehautpain like not having our abstractions leak
19:38cbp`I enjoy pain :( It's been said
19:38callenI CAN SAAAAAVE YOUUUUU
19:38brehaut(well, leak much)
19:38patchworkhiredman: How do I parameterize table names then?
19:38hiredmanpatchwork: str or format
19:38technomancysurely you're not taking table names from user input?
19:38patchworkhiredman: but isn't that the point of parameterized queries?
19:38brehautwhat could go wrong!
19:39wink*possibly
19:39hiredmanpatchwork: depends, evidently whoever came up with jdbc thought parameterizing table names was crazy, but parameterizing column values, etc, was fine
19:39patchworktechnomancy: I have an api that selects tables based on user input yeah
19:39patchworkIs that really that wrong?
19:40hiredmantechnomancy: it is also a pain if you read the table name from some configuration source
19:40brehauthiredman: its not like sql in general was designed to allow reuse or composable expressions
19:40patchworkI thought parameterizing queries avoids sql injection?
19:40winknot if you're whitelisitng
19:40technomancypatchwork: I mean the user input string doesn't go straight into the query, right?
19:40patchworktechnomancy: No, that is why I am not building strings
19:40patchworkI am trying to use clojure.java.jdbc 's parameterized queries
19:40patchwork!
19:40hiredmanbrehaut: fair point
19:40callenlol ^^
19:40technomancypatchwork: in that case the situation parameterized queries are designed to protect you against doesn't apply
19:40callenpatchwork: use Korma.
19:40callenpatchwork: Korma users don't have to have these conversations.
19:40technomancyso format is perfectly safe
19:41tieTYT2brehaut: not a fan of korma?
19:41brehauttieTYT2: not especially
19:41tieTYT2brehaut: why's that?
19:41patchworktechnomancy: I'm curious why? What do parameterized queries protect you from then?
19:41tieTYT2i can't stand jpa. I have a feeling i'll see it your way
19:42patchworkThe only problem I have with korma is it is a bunch of macros and I am composing queries programmatically
19:42winkpatchwork: hehe, I've bitten by that as well.
19:42callenRaynes: tried Jonsi?
19:42RaynesI don't know what that word means.
19:42patchworkThe fact that I can't map or reduce (for instance) with korma prevents me from using it
19:43winkpatchwork: dunno how deep you dug, but "(-> (select*" helped me make it work instead of (select
19:44callenRaynes: artist.
19:44patchworkSo how do I protect the query from bad table names?
19:44brehauttieTYT2: its an abstraction that i found mostly got in the way. embeding SQL strings turned out to be clearer and easier to work with for me. that is, in my opinion, pretty damning for an abstraction
19:44bhenryis there a way to flatten only one level deep?
19:44callenRaynes: http://www.youtube.com/watch?v=Tj8RZ8TOa4I
19:44callenbhenry: been asked before, just google :)
19:44hiredman~flatten
19:44clojurebotflatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.
19:44tieTYT2brehaut: that's how i feel about jpa. I think jpa just delays your issues and doubles them
19:45brehauti dont think im familar with jpa
19:45trptcolin&(mapcat identity [[1 2 3] [4 5 6] [7 8 9]])
19:45lazybot⇒ (1 2 3 4 5 6 7 8 9)
19:45tieTYT2good
19:45tieTYT2eg: hibernate, eclipselink, etc.
19:45brehautah, so bag of hurt
19:46tieTYT2yeah, i truly hate it
19:46brehauti have a great loathing of the django ORM
19:46tieTYT2i wonder if I'd hate active record
19:46patchworkYou would
19:46winkso much hate
19:47tieTYT2trptcolin: why is that better than flatten?
19:47brehauttrptcolin: ##(apply concat [[1 2 3] [4 5 6] [7 8 9]])
19:47lazybot⇒ (1 2 3 4 5 6 7 8 9)
19:50trptcolintieTYT2: i wouldn't generally say "better", but it certainly seems to do less. from that perspective, brehaut's apply concat does even less, so i think i like it even better
19:51trptcolini wonder if the perf is actually in line with that, but i'm not going to be the one who does a microbenchmark and then gets told they're doing benchmarking wrong ;)
19:51trptcolinother than for myself
19:53tieTYT2i see
19:53technomancycallen: last week's seattle remote-work brag: https://secure.flickr.com/photos/technomancy/8744331167/
20:48bbloomtomoj: reported a bug via github & rich fixed it w/o a jira ticket? glorious.
21:56callentechnomancy: that is gorgeous ;_;
22:00tomojbbloom: I think I see what you meant now about the problem with maps and zippers
22:01tomojthinking about the cljs group "Zipper for json?" question
22:02tomojI swear I wrote an associative-zip before but it seems to have disappeared.. not sure how it would have worked
22:05gzmaskhi folks, I m just starting to use compojure and the lack of updated tutorial gets me. here's my code that generating errors: https://gist.github.com/gzmask/5617046
22:08cbp`gzmask: move the definition of index-page before the defroutes
22:09gzmaskcbp`: tried that, still same error
22:10tomojcertainly the line number changed? :)
22:11tomoj"richever_clj/handler.clj:16:15" ?
22:12gzmasktomoj: sorry, the error is now : Exception in thread "main" java.lang.RuntimeException: Unable to resolve symbol: html5 in this context, compiling:(richever_clj/handler.clj:8:3)
22:13tomojlooks like html5 is in hiccup.page
22:13tomojwhere'd you learn to do (:use compojure.core hiccup.core)? :)
22:14cbp`maybe you want to use the macro html
22:14cbp`which is in hiccup.core
22:14tomoj(:require [hiccup.page :refer [html5 include-css]])
22:14gzmasktomoj: https://github.com/weavejester/hiccup says (use 'hiccup.core) so I figured that out myself
22:17gzmasktomoj: using your way works. but where in the world can I find such tutorials ?
22:19Caligoanyone on?
22:20tomojgzmask: dunno :/
22:20CaligoI have a general question: why does map-indexed only take only one function and one collection as arguments? Why doesn't it take multiple collections and effectively reduce?
22:21tomojgzmask: maybe read this though http://clojure-doc.org/articles/language/namespaces.html
22:23tomojCaligo: if map-indexed took multiple colls I would expect it to be 'zippy', like map
22:23tomojbut that would be kind of weird - (fn [i x y z...]) ?
22:23tomojguess it could make sense
22:27devnhello clojurians
22:27devndoes anyone know if michael klishin is on IRC?
22:29devn-OR- does anyone want to tell me why I can search for -> but not for ->> in https://github.com/devn/getclojure/blob/master/src/getclojure/search.clj
22:30devnthis is an elastisch question slash a general search engine question. i assume the default query-string parser is the problem
22:33jcromartiedevn: I would guess that it's an Elasticsearch query limitation
22:34tomojI'd think there should be an escape function in elastisch
22:34danielglauserdakrone: Anything off the top of your head? ^^^
22:38devnjcromartie: my analyzer and what-not might be the problem
22:38devnat this point though I have to be honest, the docs from elastisch and from elasticsearch combined haven't made me comfortable about what im doing there with my custom analyzer, tokenizer, filter, etc.
22:39devnthe elasticsearch folks rightly punt because it's not a pure problem (it uses a library)
22:43technomancydevn: that's a lucene issue
22:43technomancybut yeah, you want a field that's not analyzed
22:44technomancywell, it's a lucene feature that you'd have to figure out how ES exposes
22:45technomancyaw geez; I have local changes that implemnet this in clucy that I haven't pushed
22:45technomancy=\
22:53technomancyoh nice my changes are all broken due to an underlying shift to lucene 4
22:57devn:\
22:57devni have new fish to fry now
22:57devni deployed to heroku and broke everything
22:57technomancyh releases:rollback
22:59callenRaynes: http://osrc.dfm.io/raynes
22:59callentechnomancy: http://osrc.dfm.io/technomancy
22:59callenit didn't even call me a Clojure programmer :(
22:59devnif only i hadn't decided to re-seed my db in the process
22:59callenI think I need to have a good cry.
23:01devnsame
23:02technomancyheh; "similar to travis"
23:03spoon16seancorfield: I've got a clojure/java.jdbc question for you
23:05callen"Chris has contributed to repositories in 14 different languages. In particular, Chris is a serious JavaScript expert with a surprisingly broad knowledge of Clojure as well."
23:05callenokay I feel a little better.
23:05technomancycallen: I'm still furious at coderwall for giving me a C++ badge just because I had a copy of ZNC that wasn't properly forked
23:06technomancyif they were in the UK that would be a libel lawsuit
23:07callentechnomancy: hahahahahahahaha
23:07callentechnomancy: that's hilarious.
23:08callentechnomancy: the sad part is it would be fairly trivial to sift out the meaningful work from the original work
23:08callenfrom the trivial work*
23:08callenespecially in terms of originality
23:32seancorfieldspoon16: sure, what's the Q?
23:34spoon16if I have a - (dash) in a column name and try to run a query insert/select it constructs a query missing the backticks ` around the column name
23:34spoon16and the query fails
23:50Raynescallen: This is great, thanks.
23:54seancorfieldspoon16: you need to specify a quoting strategy then
23:55seancorfieldthere are examples in the docs but something like (entities (quoted \`) (query db (select * :table (where {:id 42}))))
23:55hiredmanfun fact related to sql quoting: ssl is a reserved word or whatever for mysql, so you need to quote it
23:58spoon16seanaway: thanks
23:59seanawaynp, i'll be back later if you have more questions