#clojure log - May 20 2013

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:27 callen: cbp`: I didn't want to feel like I was taking advantage of your volunteerism.

0:27 cbp`: There's always more to be done with the rethink stuff, want me to put up a github repo and add you to it?

0:39 ambrosebs: dnolen: 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.

0:39 We 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.

0:40 (the match equivalent of that, rather)

0:57 ysawej: hello, how can I get the .class object of a class (.class Classname) doesnt work

0:58 cbp`: callen: The repo sounds good, add cesarbp. Also don't worry I have way more free time than I need right now :P

0:59 brehaut: ysawej: Classname

0:59 ,java.lang.String

0:59 clojurebot: java.lang.String

0:59 brehaut: ,(class java.lang.String)

0:59 clojurebot: java.lang.Class

0:59 ysawej: oh.. actually I wanted this (class Classname)

1:00 brehaut: if you want Class

1:00 ,java.lang.Class

1:00 clojurebot: java.lang.Class

1:01 callen: cbp`: I'm sort of the opposite.

1:01 brehaut: callign class on a classname will return the class ofa class object (which is Class), not the class object itself

1:07 ysawej: ok.. so thats what I wanted.. so it will return java.lang.Class which will have className set to the class I want right?

1:07 brehaut: no, java.lang.Class is the class of all classes

1:08 not a particular class of a given instance

1:51 dhl: When running tasks in leiningen 2, is there anyway to disable the :dev profile other than defining a :default profile that excludes :dev?

3:07 tomoj: dhl: see `lein help with-profile`

3:07 tldr: lein with-profile -dev

4:15 michaelr525: hello

4:15 thinking of porting an existing compojure website to pedestal

4:16 do you think it would be a good idea?

4:16 anywhere to find the pedestal presentation video from clojure/west?

4:18 ucb: michaelr525: any reason why you'd want to port it?

4:22 Raynes: If 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.

4:22 ucb: heh

4:32 michaelr525: well, it seems interesting and i like to learn new things by using them in a real project

4:33 i 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

4:34 Raynes: what do you think about pedestal?

4:36 dhl: tomoj: That's pretty awesome. Thanks!

4:40 michaelr525: ucb: or you?

4:41 ucb: michaelr525: I have no opinion on pedestal; I was just wondering about your motivation :)

4:42 michaelr525: yeah. to sum it up, I want to move most of the app into clojurescript and i'm looking for a solid clojurescript architecture

4:43 ucb: michaelr525: do you need an architecture at all? could you do with just plain cljs?

4:44 michaelr525: i could but it can get verbose low level and inflexible

4:45 ucb: hum

4:45 michaelr525: in contrast to using something like shoreleave and building the app around pub sub

4:45 ucb: I'd probably challenge the "inflexible" assertion, but ok.

4:46 michaelr525: maybe not the best word to describe what i actually wanted to say

4:46 ucb: well, 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?

4:47 always keep in mind I know nothing about pedestal :)

4:47 michaelr525: i don't know.. but i'm intrigued by it since I don't currently understand what they created there

4:48 although from the stuff I read about it, it might be just what I want

4:48 ucb: then I'd say just go ahead and do it

4:49 at the very least you'll find out if it was a good choice or not

4:49 abp: Well, 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.

4:50 michaelr525: the docs are a bit challenging so i thought maybe it could be a good idea the watch the presentation

4:51 tomoj: the docs for pedestal are challenging?

4:51 I'm looking for shoreleave pubsub docs

4:51 abp: Not complete

4:51 tomoj: found this.. http://shoreleave.github.io/shoreleave-pubsub/

4:51 oh

4:52 I thought "This is a work in progress and should not be used AT ALL" was talking about shoreleave-pubsub

4:52 they meant "stop reading this marg" huh :)

4:53 michaelr525: another xkcd reference? :)

4:54 tomoj: where?

4:54 clojurebot: where is forget where

4:54 tomoj: :D

4:54 clojurebot: where is forget where is forget where

4:54 clojurebot: You don't have to tell me twice.

4:55 tomoj: clojurebot: forget where is forget where is forget where

4:55 clojurebot: Ack. Ack.

4:55 tomoj: You don't have to tell me twice.

4:57 xificurC: anyone 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

4:59 tomoj: is this a good example of pubsub? http://www.myclojureadventure.com/2012/09/intro-to-clojurescript-part-3-using.html

4:59 xificurC: oh wait, lein repl only worked in git bash, it doesnt work in the good old cmd

5:00 ucb: xificurC: 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

5:00 tomoj: "guess I can just look at the goddamn tests"

5:00 "goddamn!"

5:00 xificurC: maybe windows has issues with files with no .something at the end?

5:01 I used the lein script in bash since that seemed to be the easiest option

5:01 jjs: xificurC: 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))

5:01 Probably something analogous will work on your WIndows setup.

5:02 xificurC: jjs ill try that thanks

5:02 jjs: :)

5:03 xificurC: I tried to download the windows batch file and put it in the path

5:03 got another error instead :D

5:03 jjs: yay, a different error! Progress! >;D

5:05 tomoj: shoreleave-pubsub is unintelligible to me

5:06 xificurC: jjs: didnt work :(

5:06 I'll try the windows way of installing

5:08 tomoj: "completely decouple parts of your app and declaratively bind them together"

5:08 where are the declarations?

5:12 I guess if you do all the subscription operations once in the top-level, it's just declarations disguised as operations

5:13 xificurC: so now i have a starting nREPL server... showing forever. Even worse, before there was at least an error showing

5:13 tomoj: and in the non-top-level case, pedestal has operations disguised as declarations :(

5:19 rodnaph: advice 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?

5:24 tomoj: I think if nrepl.el had C-u M- pop to another window I would switch immediately

5:24 er, C-u M-,

5:24 C-x o is like my least favorite thing

5:36 rodnaph: can anyone suggest how to support parseInt for clj AND cljs?

5:44 jjs: rodnaph: http://stackoverflow.com/questions/1133770/how-do-i-convert-a-string-into-an-integer-in-javascript

5:45 rodnaph: jjs: 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.

5:51 at the moment i'm going with require an include of "window.Integer = {parseInt: parseInt}" for compat.

5:53 jjs: rodnaph: https://github.com/emezeske/lein-cljsbuild/blob/master/doc/CROSSOVERS.md

5:55 rodnaph: maybe ;*CLJSBUILD-REMOVE*; could be bent to this purpose...

5:57 borkdude: I was experimenting a bit with reducers, and I wonder why this doesn't show a significant speedup: https://www.refheap.com/paste/14782

5:58 rodnaph: ;*CLJSBUILD-REMOVE*;"(js* "window.Integer = {parseInt: parseInt};")

5:58 oh!

5:58 jjs: rodnaph: 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

6:03 rodnaph: hmm... that requires extra includes... for one fn it might be less magic to do it the dark magic way...

6:03 but i shall have a tinker - thanks for the advice jjs!

6:04 jjs: :)

8:57 xificurC: I 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

8:57 e 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?

8:58 Foxboron: xificurC: that is because i think Emacs is using cmd when it executes the eval command.

8:58 had the same problem, i didn't find a solution.

8:59 llasram: xificurC: You've got it. AFAIK, nrepl-jack-in just saves you the step of launching and managing the REPL process yourself

8:59 xificurC: Foxboron: thought so. And you can't change that? :(

8:59 Foxboron: xificurC: well, you could add lein to the PATH variable?

8:59 I am not sure how lein behaves in CMD.

8:59 tomoj: &`(~@[])

8:59 lazybot: ⇒ nil

9:00 xificurC: llasram: thanks, the less steps the better but if I wont find a solution at least it works

9:00 tomoj: is that nil in swearjure? :)

9:00 xificurC: Foxboron: I have it in my path but windows doesnt recognize a file like lein an executable

9:00 Foxboron: cmd wont run it either because windows only runs certain files as executables, e.g. .exe, .bat and so on

9:01 llasram: xificurC: You could set the command to `bash.xet lein` or whatnot

9:01 Er, s/xet/exe/

9:01 IamDrowsy: but there is an lein.bat file on github for windows users

9:01 Foxboron: IamDrowsy: when i was on windows it was broken, have it been fixed?

9:02 xificurC: IamDrowsy: that produced another error

9:02 IamDrowsy: last time i was on windows it worked for me

9:02 tomoj: &#_()

9:02 lazybot: java.lang.RuntimeException: EOF while reading

9:02 Foxboron: lein2 or lein1?

9:02 IamDrowsy: 2

9:04 llasram: tomoj: Practicing your Swearjure?

9:06 dnolen`: CLJS ObjMap deprecated http://github.com/clojure/clojurescript/commit/08489f39060be1097fa23abc8d5042c86e68dd4d

9:06 IamDrowsy: mh... i never had problems with it... but i did not try the most recent version... maybe technomancy knows something about it...

9:10 xificurC: IamDrowsy: installing leiningen usually worked on windows for me but getting emacs to work was usually a pain

9:11 IamDrowsy: xificurC: ok. i never tried this...

9:12 xificurC: IamDrowsy: thanks anyway :)

9:13 llasram: where do you mean to set the command `bash.exe lein`

9:14 llasram: xificurC: You can customize `nrepl-server-command` and `nrepl-lein-command`

9:15 xificurC: llasram: sounds interesting yet frightening for a beginner like me

9:21 llasram: ?

9:21 CookedGr1phon: Does 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?

9:21 llasram: xificurC: Oh, "customize"-able variables in Emacs are the ones which exposed to be easily-modified

9:22 xificurC: Try M-x customize-group nrepl-mode

9:23 xificurC: llasram: i see

9:26 llasram: so i should try to switch "lein" to "bash.exe lein" and "lein repl :headless" to "bash.exe lein repl :headless"?

9:29 llasram: tried it, didnt work and now M-x customize group doesnt recognize nrepl-mode :)

9:30 llasram: nevermind the customization still works

9:31 nrepl-jack-in doesnt throw an error but doesnt open an nrepl session either

9:42 inaciano: hi, i am trying to start a clojure project in my work and i need resources with "clojure success stories"

9:43 rasputnik: hi 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...

9:58 Pupnik-: try wrapping that in a dorun

11:01 noncom: hi i have a question: how do i force (map) to return a vector? seems like it always returns a list?

11:01 jjttjj: use mapv

11:01 ,(mapv inc '(1 2 3))

11:01 clojurebot: [2 3 4]

11:01 noncom: thanks! another question: what is the cost of (into) calls?

11:01 like (into [] `some-list)

11:03 and 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:03 llasram: noncom: 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:03 noncom: `map` doesn't return a list. It returns a lazy sequence, which answers both your questions at once :-)

11:04 noncom: llasram: 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:05 justin_smith: noncom: 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:05 gfredericks: noncom: it's certainly going to be at least linear in the size of the second argument

11:05 llasram: noncom: O(n), yeah

11:06 justin_smith: and of course O(n)

11:06 noncom: so basically no speed difference between (mapv) and (into [] (map)) ? just the first one more idiomatic?

11:07 justin_smith: you could use (time) to test it

11:07 Anderkent: no difference other than clarity

11:07 in fact

11:07 ,(source mapv)

11:07 clojurebot: #<SecurityException java.lang.SecurityException: denied>

11:07 Anderkent: bah

11:07 noncom: heh :D

11:07 gfredericks: mapv also lets you e.g. pass multiple collecctions

11:08 oh nm

11:08 Anderkent: mapv might be cheaper for the common case of passing 1 collection into map

11:08 justin_smith: heh, yeah, map lets you do that too

11:09 noncom: nice! thanks for the answers!

11:09 Anderkent: but it will be only very slightly cheaper

11:10 noncom: i'm struggling for as much fps as i can get, so any slightest speed improvement is welcomed in my code!

11:10 justin_smith: rt on the jvm, the endless struggle

11:10 Anderkent: is that on your critical path?

11:12 noncom: most 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:14 Anderkent: you 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:15 justin_smith: what is the difference between the paid and unpaid yourkit versions?

11:16 noncom: yeah, i could use a profiler. i think i will have to when i get to anywhere a serious application

11:17 Anderkent: noncom: then you don't want to be optimizing yet :)

11:17 justin_smith: I thought there was just a evaluation version that was free, other ones are paid arent they?

11:18 justin_smith: yeah, I am just wondering if there are feature differences or nag screens or what

11:18 before I download and try

11:18 Anderkent: don't think there are nag screens, but the evaluation is only for 15 days afaik

11:18 justin_smith: (official site is not readily showing me differences)

11:18 Anderkent: cool, thanks, maybe I can convince my boss to buy it for us

11:19 Anderkent: strongly recommend, esp. since the new version made it much faster (i.e. less footprint)

11:20 noncom: Anderkent: 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:20 Anderkent: is there some idiom for (map vector (cons prefix coll) coll) ? I.e. grouping elements with predecessors

11:20 noncom: sure. Optimize for readability then :)

11:23 justin_smith: I 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:23 *that you should generally build

11:23 ToBeReplaced: how 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:24 Anderkent: partition sounds like that

11:24 justin_smith: ToBeReplaced: unless I am misunderstanding you defn will store the string after the function name as the doc

11:24 regarding partition, it does not do that at all

11:25 ToBeReplaced: partition does what Anderkent asked for, doesn't it?

11:26 justin_smith: he wants [:a :b :c] -> [[:a :b] [:b :c]]

11:26 noncom: justin_smith: yeah! i think so, but i rely on the architecture used by the underlying engine

11:27 justin_smith: noncom: 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:27 ToBeReplaced: ,(let [coll [:a :b :c]] (partition 2 1 (cons :prefix coll)))

11:27 clojurebot: ((:prefix :a) (:a :b) (:b :c))

11:28 justin_smith: ToBeReplaced: my bad! I forgot about that feature of partition

11:28 ToBeReplaced: justin_smith: i am trying to do (defmacro defmine [name args & body] `(defn ....))

11:29 justin_smith: well you could modify the metadata after the defn, or have the macro expand to provide it the way defn normally would, right?

11:29 ToBeReplaced: in 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:30 justin_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:30 Anderkent: ToBeReplaced: thanks

11:31 ToBeReplaced: easiest way i know to do it right now is `(defn ~(with-meta ...) ~@body)

11:31 justin_smith: ToBeReplaced: in a bigger picture, what does defmine add to defn?

11:34 ToBeReplaced: justin_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:35 justin_smith: ahh, ok, yeah

11:35 ToBeReplaced: justin_smith: actually though, i'm thinking about it wrong... this is the wrong way to handle the issue, so thanks

11:35 correct answer is, again, don't use macros

11:35 justin_smith: I only discovered recently how much easier my code was to debug when I provided names to every inline (fn) call

11:35 (fn what-this-fn-does [...] ...)

11:36 my first real reason to stop using #()

11:36 ToBeReplaced: true

11:36 justin_smith: makes stack traces so much easier to navigate

11:38 I 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:38 Anderkent: pff, real clojure coders find anonymous functions by counter comparisons on autogenerated names

11:38 user$eval6369$fn__6370 - easy!

11:38 justin_smith: so many of my uses of fn were really just replacements for implicit currying

11:39 Anderkent: lol

11:40 Anderkent: next thing you'll say is you dont like getting 100 lines of stack trace out of which 3 are your code

11:40 ;>

11:41 justin_smith: Anderkent: is there actually a fix for that issue?

11:42 gfredericks: $google github currj

11:42 lazybot: [fredericksgary/currj · GitHub] https://github.com/fredericksgary/currj

11:42 gfredericks: justin_smith: ^

11:43 Anderkent: justin_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:43 justin_smith: gfredericks: it mentions being experimental - has anyone successfully used it in anger?

11:43 Anderkent: it don't think it can be *fixed* per se

11:45 justin_smith: Anderkent: even the coloring would be nice - is that what nrepl is trying to do with its rainbow stacktraces in emacs?

11:45 gfredericks: justin_smith: not that I know of -- but at worst you can examine the macroexpansion to verify it does what it's supposed to

11:45 justin_smith: gfredericks: true enough, thanks

11:46 Anderkent: $google github clj-stacktrace

11:46 lazybot: [mmcgrana/clj-stacktrace · GitHub] https://github.com/mmcgrana/clj-stacktrace

11:46 gfredericks: justin_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:46 Anderkent: hm maybe that wasn't the colour one

11:47 justin_smith: yeah, I would have to re-evaluate some argument ordering in that case

11:49 Anderkent: ah, it is

11:49 justin_smith: so see clj-stacktrace for the coloured and formatted stacks

11:50 justin_smith: Anderkent: cool, we use clj-stacktrace for our big project here, but I did not know about the color feature

11:50 Anderkent: yeah I'm not sure how it's triggered

11:50 I guess repl only?

11:50 tomoj: `lein sub install` excellent

11:52 justin_smith: Anderkent: a version that did html color markup for a dev 500 page would be awesome, but likely would require a fork

11:52 we 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:09 asteve: is there way to flatten a vector so that ["a" "b" "c"] becomes "a" "b" "c"?

12:09 (flatten ["a" "b" "c"]) creates ("a" "b" "c")

12:09 Anderkent: ,(apply list ["a" "b" "c"])

12:09 clojurebot: ("a" "b" "c")

12:09 justin_smith: asteve: is this for printing?

12:10 gtrak: asteve: you can only return single values from a form

12:10 justin_smith: (clojure.string/join \space [

12:10 "a" "b" "c"])

12:10 asteve: justin_smith: no

12:10 justin_smith: yeah, you cannot return multiple values

12:11 gtrak: asteve: likely you want concat

12:11 mefisto: taking a step back, what are you trying to do asteve?

12:11 Anderkent: I guess it's [["a" "b" "c"]] => ["a" "b" "c"]

12:11 asteve: really what I have is ["a" "b" "c" ["d" "e" "j"]]

12:12 gtrak: and what do you want?

12:12 asteve: ["a" "b" "c" "d" "e" "j"]

12:12 mefisto: flatten will do that

12:12 Anderkent: ,(flatten ["a" "b" ["c" "d"]])

12:12 clojurebot: ("a" "b" "c" "d")

12:12 Anderkent: ,(flattenv ["a" "b" ["c" "d"]])

12:12 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: flattenv in this context, compiling:(NO_SOURCE_PATH:0:0)>

12:13 asteve: ,(vec (flatten ["a" "b" ["c" "d"]]))

12:13 clojurebot: ["a" "b" "c" "d"]

12:13 asteve: interesting

12:13 xeqi: ~flatten

12:13 clojurebot: flatten 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:13 Anderkent: just be careful because i'ts fully recursive

12:13 yeah exactly

12:13 gtrak: (inc clojurebot)

12:13 lazybot: ⇒ 26

12:16 justin_smith: yeah to me flatten is a code smell that makes me think I need to re-evaluate the algorithm I am using

12:36 gtrak: ,(mapcat #(if (coll? %) % [%]) ["a" "b" ["c" "d"]]) ;; I write this 'collify' function a lot, is there a shorter way to do it?

12:36 clojurebot: ("a" "b" "c" "d")

12:37 gtrak: I'm not the only one: https://github.com/jwhitlark/clojail/blob/master/src/clojail/core.clj#L42

12:38 TimMc: I am innately suspicious of (if (coll? %) % [%]) and related code.

12:38 It's shaped the same as flatten.

12:38 justin_smith: the real issue is in the functions building that vector - why is their output inconsistent?

12:39 gtrak: was trying to do the previous example with concat, couldn't figure out a way

12:39 except of course mapcat is concat map

12:50 gfredericks: why would (deref (future thing) 1000 :time) ever hang in nrepl?

12:50 assuming thing diverges

12:51 which I only assume because running `thing` itself also hangs

12:54 nevermind nrepl was misleadingly hiding prints

12:55 yogthos: dnolen: ping

13:08 dnolen: yogthos: pong

13:09 yogthos: dnolen: howdy :) have a cljs question, I think it's something stupid that I'm missing :)

13:09 dnolen: yogthos: what's up?

13:10 tomoj: I wonder what typical core.async/alt usage looks like: (let [[label msg] (alt ...)] (case label ...)) ?

13:10 yogthos: dnolen: I've got a project and when I make a jar out of it, for some the cljs stuff doesn't get packaged

13:11 dnolen: yogthos: that's really a lein / lein plugin question not a cljs one

13:11 yogthos: dnolen: yeah :)

13:11 dnolen: but figured you might have an idea

13:11 dnolen: yogthos: I don't really know since I don't create jars containing cljs with lein

13:11 yogthos: dnolen: ah no problemo then :)

13:12 dnolen: yogthos: but plenty other people have, also ask on the ClojureScript mailing list

13:12 yogthos: dnolen: yeah that's a good idea actually

13:12 dnolen: thanks :)

13:20 scottj: dnolen: maybe change "user list" to "mailing list" in README.md

13:22 dnolen: scottj: 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:25 scottj: dnolen: or "user mailing list"

13:27 tomoj: is it safe to rebind LOCAL_ENV during macroexpansion?

13:28 1) to a reasonable &env you got 2) to a map with non-LocalBinding vals or a set?

13:28 scottj: dnolen: 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:30 callen: so I learned two things today. 1. Antirez can be trolled. 2. People actually want to troll Antirez.

13:31 dnolen: I don't think Antirez was trolled

13:32 scottj: http://github.com/clojure/clojurescript/commit/40899b7f4dcc9e2a3e0ba5f5a74f81ed005fc52f

13:33 tomoj: ((macro-fn (partial apply shuffle)) [(foo!) (bar!) (baz!)])

13:33 why not? :(

13:35 er, I guess (defmacro mshuffle [& args] (cons 'do (shuffle (vec args))))

13:35 -vec

13:36 scottj: tomoj: thanks

13:37 tomoj: hmmm?

13:46 amalloy: tomoj: i like the ambiguity of the / in that last line. "Jira, which is either a feature-tracking application or a bug..."

13:47 oh. for some reason i thought tomoj was involved in the discussion of that cljs commit

14:10 callen: amalloy: JIRA is corporate herpes.

14:12 tomoj: I wonder if core.async needs splice

14:15 jjttjj: (row-seq sheet)

14:15 woops wrong buffer

14:25 Raynes: (inc callen)

14:25 lazybot: ⇒ 6

14:33 TimMc: ~jira

14:33 clojurebot: Excuse me?

14:33 TimMc: clojurebot: jira is corporate herpes

14:33 clojurebot: Ok.

14:39 asteve: which style is more correct? http://pastie.org/7935815

14:39 AimHere: asteve> The third one is the least good

14:40 asteve: why?

14:40 clojurebot: Why is startup slow is busy compiling the `for` macroexpansion

14:40 AimHere: All three vectors being concatenated should be the the same indentation, for clarity's sake

14:40 ToBeReplaced: asteve: i pick number 2 here all day

14:40 asteve: I agree

14:40 ok, I'll stick with #2

14:40 Raynes: I disagree.

14:40 asteve: I was thinking #1

14:41 AimHere: The other two work, and I'd prefer 2 to 1, but that's just whichever you subjectively feel is more readable

14:41 Raynes: I'd probably do https://www.refheap.com/paste/14790 or 1.

14:41 But I wouldn't break the vector in the middle in any of them.

14:41 asteve: Raynes: I don't like my my lines to be longer than 80 chars

14:41 Raynes: This isn't 80 characters.

14:42 callen: Raynes: staying at the Hilton is $20 more a night than airbnb's cheapest acceptable accommodations :P

14:42 AimHere: There will be cases cropping up where your line width is an issue, I assumed that this was the case here

14:42 asteve: you're right but, for me, a b c are longer than 1 char

14:42 ToBeReplaced: Raynes: i think it was just an example... replace a b c with really-long-strings or w/e

14:42 Raynes: Anyways, I'd do anything I could to not break it in the middle.

14:42 callen: TimMc: thanks for spreading the gospel my brutha.

14:42 Raynes: But I don't have an obsession with 80 character limited lines.

14:43 ToBeReplaced: i'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:44 Raynes: My editor doesn't break if a line is over 80 characters, luckily.

14:45 tomoj: (reduce into vecs) ?

14:45 Raynes: And I have this fancy 30'' display.

14:45 callen: "?

14:46 rasmusto: (quote (quote 30)) 'display

14:47 TimMc: callen: I've never used anything better than Jira in that space, but Jira feels very clunky anyway.

14:47 hyPiRion: ~jira

14:47 clojurebot: Excuse me?

14:48 Raynes: Anything not jira is better than jira in that space.

14:48 * TimMc pokes Raynes with a Bugzilla

14:52 callen: TimMc: Phabricator is quite nice.

14:53 it's also STD-free

14:55 kmicu: Facebook Oriented Malarkey

14:57 And it's written in Personal Home Page language ;]

14:58 technomancy: I like my software to have that personal touch

15:08 Raynes: callen: I know a guy who works on Phabricator. He sings its praise quite adamantly.

15:08 kmicu: 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:10 TimMc: Raynes: You mean, it embeds a Scheme interpreter and all of the logic is in heredoc Scheme code blocks?

15:13 kmicu: Or 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:18 Or maybe they simple use https://github.com/facebook/hiphop-php and this is why we should have dubstep-clojure VM. Just sayin' ;)

15:26 ystael: kmicu: 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:29 cbp`: Hi

15:34 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:34 callen: cbp`: you'll need to invent it, but this interests and amuses me.

15:34 cbp`: as far as databases go, you're just talking typical CREATE TABLE statements in a *.sql file.

15:35 generating CRUD API code from that could be cute.

15:35 cbp`: yea I'm mostly worried about the crud stuff

15:35 callen: better still if it generates code that auto-hook validation.

15:35 cbp`: most people end up writing it manually.

15:35 neat 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:36 cbp`: 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:36 I'd rather not describe metadata with macros or stuff like that

15:37 Raynes: tpope: ping

15:37 callen: cbp`: going to need a lot of coke and whiskey if you want that much magic.

15:38 cbp`: are you sure you wouldn't rather be using rails scaffolding? :P

15:39 cbp`: :-D

15:42 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:48 callen: cbp`: you enjoy pain.

16:00 spoon16: is 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:01 Raynes: You can add a test profile that sets it to false.

16:02 And then run lein with-profile test,dev test

16:02 And you could add an alias to make that shorter if you wanted.

16:02 https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md

16:03 spoon16: I may have phrased the question incorrectly, I want it disabled for test namespaces

16:03 Raynes: It's pretty hard to do that.

16:03 spoon16: ok, not a huge deal… just was hoping to be a little lazy in my tests

16:05 callen: aphyr doesn't use Clojure for deployments and provisioning. This saddens me.

16:06 OTOH, the thing he does use is neat, host-parallel, and concise.

16:06 technomancy: have you used salticid?

16:07 https://github.com/aphyr/salticid (warning, spider)

16:07 (but a friendly spider)

16:08 wink: didn't look any better than most ssh-based "deployment" stuff tbh

16:08 maybe I'm too biased towards puppet tho

16:08 callen: wink: Puppet is for fascists.

16:08 wink: I want punk-rock deployment yo.

16:08 * nDuff tries to fathom being biased towards puppet

16:08 wink: callen: why?

16:08 callen: wink: because Freedom.

16:08 wink: wat

16:08 callen: also declarative deploymeny sucks.

16:08 deployment*

16:09 * nDuff <- spent two years using Puppet to admin a site w/ literally thousands of hosts per DC, and HATE HATE HATE.

16:09 wink: nDuff: what I was trying to say I like the "state" approach more than "make it so"

16:09 nDuff: wink: Sure -- declarative configuration is good.

16:09 wink: not talking about puppet spcifics :)

16:10 callen: I have no problem writing idempotent jobs in ssh'ish deployments.

16:10 nDuff: what do you favor?

16:10 I need something lightweight that can run without an overseer server (fascist!)

16:10 wink: callen: ofc you can do it. but I think it's worse than abstracting the idemportent part

16:11 callen: I disagree.

16:11 wink: I noticed:P

16:11 callen: The abstraction in Chef/puppet/pallet makes me feel like I'm talking with marbles in my mouf.

16:11 wink: callen: as I said, I prefer the idea. neither puppet nor chef have nailed the DSL/syntax/best practices

16:12 nDuff: callen: 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:12 callen: or I could use something that just lets me say what I want.

16:12 nDuff: callen: My experience with Chef is that I _can_ "say what I want" with it.

16:12 ...now, maybe that's a few years of Puppet's low-expectation-setting experience speaking...

16:13 wink: nDuff: had this discussion recently. don't you think chef lends to people doing more "exec stylke" than with puppet?

16:13 callen: nDuff: I find bootstrapping chef solo to be obnoxious and require an ssh'ish provisioning script.

16:13 nDuff: then I am left wondering why I bothered to begin with.

16:13 wink: callen: what do you use/like then?

16:13 callen: the client/server is worse.

16:13 wink: A lot.

16:13 wink: I

16:14 my dev-ops history went: Perl -> Ruby -> Python -> Fabric -> Clojure

16:14 I've been using a mix of Fabric/Gantry/my own thing in clj

16:14 Fabric + Cuisine brings a nice chef'y flavor to Fabric.

16:14 wink: I don't see clojure as a valid alternative there, really

16:14 callen: wink: beg ya pawdon sirrah?

16:15 wink: maybe you could be more specific, but learning clojure for deployment is a little over-the-top imho

16:15 at least none of the sysadmins I speak highly of do work with it

16:15 not saying they can't learn, but it's... too different

16:16 callen: who learned Clojure for deployment?

16:16 I knew Clojure for other reasons

16:16 I just decided to see what deploying with it could be like.

16:16 I found the futures/promises abstraction to be very helpful in managing collections of host-parallel and task-parallel work.

16:16 wink: are you talking about something you've actually tried or are you speculating?

16:17 wink: callen: how big are chances anyone has tried deployment with clojure?

16:17 I'm not sure I'm willing to roll out a JVM on all my hosts

16:17 callen: LOL


16:17 ^^ you think that's what I did?

16:17 just lo.

16:17 lol

16:17 nDuff: wink: Have you looked at Pallet?

16:17 callen: sorry I need to change my pants because I just pissed myself laughing

16:17 nDuff: wink: It doesn't involve rolling out a JVM.

16:18 wink: nDuff: not really in detail

16:18 callen: wink: you are in a weird headspace mate.

16:18 nDuff: wink: ...anyhow -- no, I don't find that Chef leads to "exec-style" code.

16:18 callen: wink: you generate and ship bash scripts or you just execute over ssh.

16:18 wink: I used conch to generate chained SSH commands that I ripped stdout from.

16:18 nDuff: wink: Chef makes it easy to logic in recipes, but that logic is run at compile time, not execution time

16:18 wink: callen: 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:18 nDuff: wink: ...so, it changes the things that get declared.

16:19 callen: wink: 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:19 wink: callen: it was based on the nitpick on puppet's ruby daemon. which I also don't like

16:19 callen: I'm strongly considering moving to a "compile bash script and stream logs" method.

16:19 just for the inspect-ability

16:20 * nDuff thinks it smells a bit like callen is reinventing Pallet

16:20 callen: nDuff: pallet is still marbles mouf.

16:20 nDuff: also fuck EC2 and fuck jClouds.

16:20 nDuff: (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:21 cemerick: callen: stay classy?

16:21 nDuff: callen: *shrug*. Not like you have to use the whole thing if you don't want to.

16:21 callen: nDuff: 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:21 cemerick: never, contrary to the worker class ethic.

16:25 seangrove: Curious to get some help on some cljs code

16:26 callen: seangrove: That doesn't really make a lot of sense semantically.

16:26 seangrove: how can you be curious "to get" some help?

16:26 seangrove: are you curious as to the likelihood of getting help? Are you curious as to what form it could take?

16:26 seangrove: callen: Will revisit that sentence from the ground-up once I've completed its follow-on

16:26 callen: minimum viable English

16:26 gg World.

16:26 wink: lol

16:27 hm, pallet seems awfully verbose

16:27 seangrove: Trying 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:27 callen: ^^ see? SEE?!

16:27 seangrove: don't use Firebase.

16:27 seangrove: sharecropper bullshit startup.

16:27 seangrove: S'all the same

16:27 shaungilchrist: true story

16:27 callen: erm, no its not.

16:27 seangrove: https://www.refheap.com/paste/2dde9d9589dfde6aa0ccd2168

16:27 callen: it's most assuredly not all the same.

16:28 you can run a stack you actually control and can deploy to any server you like

16:28 technomancy: wink: better than the alternative. chef is impossible to debug in a lot of cases because there's lots of implicit gunk going on

16:28 callen: also known as everything else.

16:28 seangrove: I have the same exact code for the Stripe ns too

16:28 callen: seangrove: find someone worthier of your soul to sell to.

16:28 seangrove: Ok, done, Stripe. Like those guys a lot.

16:28 wink: technomancy: 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:28 seangrove: https://www.refheap.com/paste/829f1f7faf3491619c5691241

16:29 Just imagine I meant Stripe from the beginning

16:29 callen: seangrove: I can't, the sharecropping is boring its way into my soul.

16:29 seangrove: Anyway, this isn't awesome code for lots of reasons, and I feel like a Clojure promise would work very well here

16:30 callen: there's some work on cljs promises for Node

16:30 kendru: pear upgrade

16:30 seangrove: Obviously, that's not available in the current incarnation of cljs. Wondering what (better) solutions exist in the browser-side cljs world

16:30 kendru: oops! didn't realize which window had focus

16:30 dnolen: seangrove: yucky

16:30 but I see why you need to do that

16:31 seangrove: rhickey's core.async work can probably be used for stuff like this?

16:31 callen: at least the lambda syntax is nicer than vanilla JS.

16:31 seangrove: dnolen: Yeah, tried to compile them inside of the cljs output, but didn't work for lots of reasons

16:31 dnolen: I'm really looking forward to seeing that stuff get ported to CLJS, I don't think it'll be that much work

16:31 callen: dnolen: source maps?

16:32 oh I almost forgot, "carthago delenda est".

16:32 dnolen: callen: not yet

16:32 callen: shucks.

16:32 seangrove: dnolen: 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:33 dnolen: seangrove: yeah real Clojure promises would be cool here but they have blocking semantics

16:33 seangrove: dnolen: Which would of course be awesome in cljs ;)

16:33 wink: http://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software sums up the mess quite nicely

16:33 callen: dnolen: which is sorta what makes them useful.

16:34 dnolen: and 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:34 seangrove: I wonder if they could be turned into setIntervals in all cases

16:34 dnolen: in CLJS

16:34 i mean

16:34 callen: maybe the problem can be solved with opaque macros.

16:37 http://jolbox.com/dynamic-benchmark.html <--- sexy connection pooling.

16:41 cbp`: what's your github account again?

16:43 alexbaranosky: https://github.com/korma/Korma/issues/101 are @myfreeweb's changes merged?

16:44 cbp`: callen: cesarbp

16:45 callen: cbp`: meh, just fork and pull request.

16:45 cbp`: https://github.com/bitemyapp/revise

16:45 but now I can github stalk you.

16:46 bwahahaha

16:50 wink: dammit, as if I didn't have anything better to do than look at this now :P

16:52 callen: wink: look at what?

16:52 wink: callen: your rethinkdb stuff

16:53 callen: wink: oh god don't look at that

16:54 wink: too late!

16:54 callen: the fuck man. Look at something cool.

16:54 wink: like my 400k LOC elisp .emacs repo.

16:54 wink: I'm too lazy to fire up ssh and install rethinkdb

16:54 but it's close enough to be interesting :P

16:54 callen: or my hacker-typer clone

16:54 or my auto-logging/auditing library hack for Django

16:54 * wink , the master of procrastination

16:54 callen: #$@#$%%@#%

16:55 wink: been trying to look at rethink for weeks

16:56 seangrove: wink: Should check out Firebase

16:56 Pretty comparable to rethink, but considerably nicer

16:57 wink: seangrove: firebase.com? read about it and I'm not so sure I find it interesting

16:57 seangrove: callen

16:57 callen's had too much coffee, and derailed my cljs question, so thought I would troll him a bit

16:58 So no, firebase isn't comparable to rethink at all ;)

16:58 wink: the interface is JSON-y

16:58 that's not too far off!

16:58 you could even put mongodb in that bucket as well

17:00 * callen growls at seangrove from across the room

17:00 callen: wink: rethinkdb, unlike Mongo, is literally JSON. MongoDB is BSON.

17:00 Pupnik-: callen, whats makes you say making games in clojure is a labor of love? people have used lisps for game scripting (commercially) before

17:01 callen: Pupnik-: and some people can eat with their feet.

17:01 most because they don't have arms. Those that do, usually take the path of less resistance.

17:01 seangrove: are you familiar with the stories of Diogenes of Sinope?

17:01 cbp`: I've done all sorts of text games with common lisp :D

17:02 callen: cbp`: don't encourage him.

17:02 wink: Minecraft runs on the JVM

17:02 seangrove: callen: I'm not, no. Will google it.

17:02 callen: wink: and most people resent it for that. It also made it less portable and less performant, not more.

17:02 gtrak: callen: http://www.gamasutra.com/view/feature/2985/postmortem_naughty_dogs_jak_and_.php lisp...

17:02 wink: callen: you're missing the point though :P

17:02 callen: wink: it eats most peoples' computers alive and often causes laptops to overheat. It's horrendous.

17:02 gtrak: don't pull GOAL out of your ass, that's just silly.

17:03 gtrak: have you seen it?

17:03 technomancy: minecraft outsources all the graphics stuff to lwjgl or whatever

17:03 gtrak: nope... :-) why does it matter?

17:03 callen: it's assembler with parentheses.

17:03 gtrak: sounds like a much better assembler

17:03 callen: technomancy: and it's one of the least inefficient game clients in existence as a result.

17:03 is there some reason being a Lisp user means "right tool for the right job" stops being a 'thing'?

17:03 wink: which would be a good thing

17:04 callen: you don't have to use Lisp with everything if it's not the best choice.

17:04 You can admit it's not the God from On High.

17:04 It's okay, nobody will mock you.

17:04 TimMc: I will!

17:04 callen: okay TimMc will mock you.

17:04 I won't though.

17:04 * TimMc nods

17:05 technomancy: callen: right; that is to say efficiency is not a prerequisite to success

17:05 wink: callen: see, that somehow conflicts tremendously with your proposed usage of clojure for deployment. some people might disagree

17:05 callen: technomancy: actually it's causing real problems for mojang right now.

17:05 technomancy: "making a game" is a very vague requirement anyway

17:05 callen: technomancy: the shitty, inefficient, and unportable codebase has caused them real problems in terms of feature expansion.

17:05 technomancy: callen: right; all their problems would go away if they had just started out with C++

17:05 callen: I prefer, "make a prototype in something facile, then if you start giving a shit, fallback to C++"

17:05 Pupnik-: what does any of that have to do with java callen

17:05 technomancy: because they would have just given up before actually shipping on account of extreme brain trauma

17:06 wink: lol

17:06 callen: Pupnik-: it doesn't, people are just fucking dogpiling me because I advocate rational technology decisions.

17:06 Pupnik-: well you haven't provided any reasons yet

17:06 technomancy: there are lots of different kinds of games

17:06 callen: it's not unreasonable to make a first version in Java/lwjgl or pygame but then scrap it for a more serious game engine.

17:06 Pupnik-: other than the common thought that FP is bad for games

17:06 callen: Pupnik-: we could talk about how FRP is a black hole.

17:06 technomancy: some of them may have requirements that would indicate using a terrible language for them. some of them don.t

17:07 callen: Pupnik-: and how it's insanely impractical and makes functionally pure games a boondoggle.

17:07 wink: did anyone mention prolog yet?

17:07 callen: I'm still popping popcorn for when Carmack gives his report on porting Wolf3d to Haskell.

17:08 gtrak: callen: they use MzScheme in somoe of their games

17:08 Pupnik-: someone already made a FPS in haskell

17:08 callen: gtrak: I've heard of Chicken Scheme used in some iOS games.

17:08 wink: according to haskell fans, there's nothing it can't do

17:08 callen: Pupnik-: oh yes, clearly that validates the use of FP for all game development.

17:08 Pupnik-: nono

17:08 just pointing out that carmack porting wolf3d isnt a first for haskell

17:08 callen: Lets just use haskell for everything, fuck it.

17:08 FRP for everybody.

17:09 want to make a game? Hope you're doing post-doc research.

17:09 rasmusto: wrap my monday in a monad

17:09 gtrak: if carmack wants to use haskell, he's carmack, he can do what he wants

17:09 wink: when you look at shipping dates, bugs and projections I do wonder if some FP wouldn't hurt though :P

17:09 callen: gtrak: yes but if Carmack chokes I'm going to dance on the corpses of a thousand suicidal haskell programmers.

17:09 I know betting on Carmack choking is always a bad bet, but I can't wait to see him bitch anyway.

17:10 gtrak: callen: if carmack chokes then it probably can't be done :-)

17:10 callen: It'll be like the good old days of the plan file.

17:10 gtrak: precisely.

17:10 my 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:10 that he'll hate it

17:10 and he'll focus on simply "upping the ante" with C++ and FP

17:10 technomancy: shoulda used ocaml

17:11 callen: technomancy: she's dead Jim.

17:11 technomancy: just let it go.

17:11 technomancy: they're all about falling back when speed is an issue

17:11 wink: no one ever shoulda used ocaml

17:11 gtrak: uncharted 2 uses scheme for scripting anyway: http://www.slideshare.net/naughty_dog/statebased-scripting-in-uncharted-2-among-thieves

17:11 callen: yeah uhm, who cares?

17:12 people used Lua back when it was slow for game scripting too.

17:12 that's not really the point.

17:12 you can't do the whole thing in a scripting language.

17:12 there has to be a game engine, probably compiled from C++ with retained mode graphics.

17:13 Civilization used Python. That doesn't mean you should write a game engine in Python.

17:13 Pupnik-: no

17:13 callen: Incidentally, their use of python is part of what slowed the game engine down so badly.

17:13 Pupnik-: but you can write a game with pythong and sdl

17:13 technomancy: I don't think anyone is saying never use C++

17:13 gtrak: python sucks pretty hard for this, much harder than java or clojure

17:13 mostly due to GIL

17:14 callen: that is far from the biggest or only problem.

17:14 * patchwork watches as callen ruthlessly eviscerates a hapless straw man

17:14 callen: the GIL is a strawman for people who don't understand Ruby or Python to complain about.

17:14 technomancy: I'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:15 wink: so let's conclude http://hylang.org/ as the worst game engine language? A lisp on python.

17:15 callen: technomancy: I hear backgammon can be done in JavaScript.

17:15 technomancy: "Sometimes Excel is the best tool for the job; the trick is to never find yourself in the situations where that's true."

17:15 gtrak: callen: I'd rather blame pervasive GC than a 'language'

17:16 callen: actually no, the semantics of Ruby and Python are a real problem

17:16 gtrak: C++ might have more mindshare.. not sure why it's technically superior

17:16 callen: because they create the obscene GC pressure to begin with

17:16 the 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:16 gtrak: I knew that, AND I think GIL is a problem, oh noes..

17:17 callen: gtrak: "not sure why it's technically superior" - do you think you can write a faster game engine in Clojure?

17:17 gtrak: with enough time and money :-)

17:17 callen: nope.

17:17 you'd just end up writing a compiler that ignored the clojure code and just spat out assembler that did what you wanted.

17:17 gtrak: well yea

17:17 callen: Nope.

17:18 gtrak: you make no sense.

17:18 I would probably write it in C++, but I wouldn't say I couldn't do otherwise

17:19 callen: gtrak: I'm not supposed to make sense, only to be right.

17:19 wink: If the route to game development leads to C++, I'll pass on game development

17:19 gtrak: hah

17:19 dnolen: also Minecraft

17:19 patchwork: Well callen, now that you have convinced the whole #clojure channel of your rightness, what are you going to do with your life?

17:19 gtrak: I've done C++, even prototyped games in it, it's not terrible, it's just tradeoffs

17:19 Pupnik-: wink, not at all, look at the success of unity

17:19 callen: patchwork: retire on the proceeds and pay people to bring me scotch and sodas.

17:20 gtrak: callen is being very religious about those tradeoffs

17:20 callen: no, just rigorous.

17:20 technomancy: I've never seen so many nickels

17:20 patchwork: Drowning in nickels

17:20 technomancy: patchwork: all scrooge-mcduck style diving board

17:20 wink: Pupnik-: I don't think so, apart from a surprisingly nice experience with Qt lately I've always hated it

17:21 callen: technomancy: that would be freakin' sweet.

17:21 technomancy: especially if the Scottish accent is included

17:21 gtrak: how about.. it's impractical for one man to write a AAA game engine in any language

17:21 callen: "but Unka Scroooooge"

17:21 gtrak: nope.

17:21 technomancy: gtrak: it's impractical to write an AAA game.

17:21 gtrak: example?

17:21 clojurebot: api examples is examples

17:21 callen: gtrak: Carmack

17:22 * callen giggles

17:22 wink: ok, then say "first"

17:22 for carmack it's just what he's always done

17:22 and Rage wasn't AAA

17:22 (or whatever that iPad disaster was called)

17:22 gtrak: no one can compete with carmack, because they didn't write wolf3d, doom, etc..

17:22 callen: alex_baranosky: https://github.com/korma/Korma/issues/101 are @myfreeweb's

17:23 changes merged?

17:23 gtrak: if no one had worked with carmack on those projects, would he be able to pull quake4 out of his ass from scratch?

17:23 callen: wink: Rage was AAA

17:23 wink: top of the line game engine, even if the game itself was poor. Dunno what you mean about iPad, that's something else.

17:23 Rage was a PC and console game.

17:23 gtrak: probably.

17:23 gtrak: if he wasn't involved with the development of graphics for the last 20 years, would he have such a head start?

17:24 callen: gtrak: it's said the codebase was consistently 80% Carmack for a long time after Quake 1, 2, and 3.

17:24 gtrak: he's an institution

17:24 callen: he's a sociopathic demigod and we should supplicate ourselves before him and his rocketeering minions.

17:24 patchwork: callen: You sound jealous

17:24 wink: callen: https://itunes.apple.com/en/app/rage-hd/id400707675?mt=8 and I didn't like it at all

17:25 callen: patchwork: intensely.

17:25 wink: I don't know why you would buy junkware like that.

17:25 wink: for the record, I didn't like Rage on the PC either, except I lost $60 to figure that out.

17:25 wink: callen: I've never even possessed an apple device. I just played it.

17:25 callen: wink: you are more fortunate than I.

17:25 wink: so it seems

17:26 callen: wink: do you like connection pooling libraries?

17:27 wink: callen: 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:28 callen: wink: http://jolbox.com/dynamic-benchmark.html check out that hot pooling action.

17:28 wink: callen: I saw it

17:28 callen: wink: sexy, yes?

17:28 wink: depending on your needs, maybe

17:29 Raynes: callen, wink: I liked Rage.

17:29 I liked Borderlands so much more, but I enjoyed Rage

17:29 callen: Raynes: I got through the first mission hub, then got bored.

17:29 Raynes: Borderlands is better.

17:30 wink: Raynes: good for you, I somehow ended my shooter days with Q3 I think

17:30 callen: Raynes: have you played B2?

17:30 wink: which is only like 12 years ago...

17:30 callen: wink: no, is sexy regardless! need or no!

17:30 Raynes: callen: If it's called Borderlands you bet I played it.

17:30 callen: wink: rocketjumpin' railgunnin' multiplayin' Q3?

17:30 wink: or piker bot stomping bullshit?

17:31 wink: callen: my first thought was "wait, it didn't have singleplayer anyway?"

17:31 callen: Raynes: I stopped after the first. How's the second? Did they balance the classes this time?

17:31 Raynes: It was amazing.

17:31 callen: wink: 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:31 I wasn't even that good at Q3, I was better at UT - which just made it funnier for me.

17:31 flak cannon or bust.

17:31 wink: callen: never played that much. we still played ActionQuake2 until long into the 00 years

17:32 callen: wink: I remember the hook mod for Q2

17:32 wink: I even played counterstrike 0.5 or somewhat before it became cool.

17:32 we mocked it for being so slow-paced

17:33 callen: my real problem with CS is that it felt (and still does) too kill-tradey

17:33 unless you camp tons.

17:33 Raynes: Doom 3 is one of my favorite fps games.

17:33 Bioshock takes the cake.

17:33 callen: Bioshock is cheating.

17:34 Raynes: If you dis bioshock, I'm going to cause you bodily harm on the 29th.

17:34 "Oops, I got too excited at the concert and flailed my arms in such a way that I broke your nose."

17:34 callen: Raynes: psh. It's LA, I'll have bodyguards in tow.

17:34 LA == gettin' shot by gats right?

17:34 rasmusto: I'm playing halflife 2 with an oculus rift, that's pretty cool

17:34 Raynes: I've been shot by so many gats.

17:35 rasmusto: I haven't played HL2. Played the first one a while back though.

17:35 callen: Raynes: 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:35 Raynes: The end boss of that game made me want to give up on video games forever.

17:35 rasmusto: Raynes: I'm the opposite, haven't played the first

17:35 Raynes: Don't.

17:35 callen: rasmusto: don't

17:35 rasmusto: haha

17:35 Raynes: You'll double murder suicide your whole family.

17:36 Don't put your family through it.

17:37 callen: Raynes: ohay, new best practices for Korma: https://github.com/myfreeweb/clj-bonecp-url

17:37 wink: Don't bring your guns to town son, leave your guns at home

17:37 callen: Raynes: in case you decide to stop using MongoDB and use a database that shows you care about your data.

17:37 rasmusto: I almost puked into my vr headset trying to climb ladders in the sewers, that's an interesting feeling

17:38 callen: rasmusto: a resounding endorsement of the oculus.

17:38 Raynes: callen: My data is just fine.

17:38 rasmusto: callen: It needs a bit of calibration and a very calm stomach

17:39 callen: rasmusto: uh huh.

17:39 Raynes: maybe.

17:39 Raynes: also, I wasn't kidding about that migration script thing for RethinkDB

17:39 Raynes: it's horrifying and leads me to believe the DB is untouchable until they clean that up.

17:39 Raynes: I didn't look at it because I can't actually use rethinkdb without a Clojure driver. :<

17:40 callen: Raynes: probably for the best for now. But this exists: https://github.com/bitemyapp/revise

17:40 shriphani: hi 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:40 wink: rasmusto: does it have smell enabled? :)

17:40 callen: shriphani: a closure?

17:40 tieTYT2: is there anything built in to clojure that's the same as (-> (group-by f %) vals) ?

17:40 rasmusto: though 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:40 wink: not unless you puke

17:40 wink: :P

17:41 shriphani: callen, umm docs ? I am quite a n00b.

17:41 Raynes: tieTYT2: (vals (group-by f %))

17:41 That's built in. :p

17:41 callen: shriphani: http://en.wikipedia.org/wiki/Closure_(computer_science)

17:41 Raynes: There aren't any docs for closures.

17:41 tieTYT2: Raynes: sweet. Can't wait to try that

17:41 Raynes: Closures are basic fundamental functional programming things.

17:41 tieTYT2: <3

17:41 callen: Raynes: that wasn't going to stop me linking the Wikipedia page.

17:41 tieTYT2: i'm going to take that as a no

17:42 wink: Getting closure with clojure closures?

17:42 Raynes: callen: Well, the wikipedia page is the relevant documentation.

17:42 I just meant that there isn't really any Clojure-specific closure documentation.

17:42 jodaro: Raynes: " blah blah blah without a Clojure driver ... "

17:42 sounds like a challenge

17:42 callen: shriphani: are you a PhD student?

17:42 Raynes: jodaro: callen already did it.

17:42 callen: I didn't do shit

17:42 don't blame that on me

17:42 Raynes: You did too.

17:42 https://github.com/bitemyapp/revise

17:42 jodaro: heh

17:42 callen: it only half works.

17:42 Raynes: jodaro: Also, hi. Haven't seen you round these parts in a while.

17:42 shriphani: um callen why ?

17:42 wink: callen: writing or reading?


17:43 heh

17:43 callen: shriphani: I'm measuring my self-worth, please answer the question.

17:43 Raynes: lol

17:43 jodaro: Raynes: hi. been doing other random things and playing with Go and Haskell

17:43 but i think i'm back to clojure-land

17:43 Raynes: jodaro: Go? You poor child.

17:43 * Raynes hugs jodaro.

17:43 shriphani: callen.. yes.

17:43 Raynes: At least you had some Haskell to ease the pain.

17:43 callen: shriphani: I knew it.

17:43 Raynes: I had a similar walk in the wilderness.

17:43 then I decided I didn't enjoy pain.

17:44 shriphani: are you a PhD student in CS?

17:44 Raynes: I wanted to use Go for something recently but people were like "OMG NO USABLE COLLECTIONS"

17:44 callen: shriphani: was your undergrad in CS?

17:44 Raynes: But it's the only good thing that produces small binaries these days.

17:44 callen: Raynes: no, each collection is a special snowflake you must artisanally craft yourself in Go.

17:44 jodaro: i'm liking Go for a few reasons

17:44 Raynes: Except for OCaml which technomancy will helpfully point out if I don't immediately correct myself.

17:44 callen: I don't think statically linked binaries are known for being "small"

17:44 but okay.

17:44 jodaro: and i totally love haskell

17:44 callen: they are self-contained

17:44 but not small.

17:44 shriphani: callen, ee mostly. phd in cs now.

17:45 Raynes: callen: My definition of small is less than 10 megsa.

17:45 jodaro: but Clojure still hits way more points for practicality

17:45 tieTYT2: I 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:45 dynamic and require every client to specify a binding. Is this a normal practice?

17:45 callen: shriphani: how many years are you into the PhD program?

17:45 shriphani: callen, 1.

17:45 callen: Raynes: you've clearly been on the JVM too long.

17:45 Raynes: Haskell 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:45 jodaro: not the least of which being that we run shit on the JVM already

17:45 callen: shriphani: you really need to get those CS fundamentals together.

17:45 Raynes: callen: No, I clearly know how small my binaries need to be to be reasonable for my purposes.

17:45 callen: shriphani: I dropped out of my CS undergrad in the first quarter when I was 18 and I knew what closures were *back then*

17:45 Raynes: I actually like Rust very much, but it's so completely frickin' unusable.

17:46 callen: Raynes: for fundamental and temporary reasons.

17:46 jodaro: yeah rust could be cool

17:46 hiredman: tieTYT2: what you really what is polymorphism, look at mutlimethods or protocols

17:46 jodaro: but again

17:46 too soon to tell

17:46 callen: the problem with Rust is that smart people are making a smart programming language for smart people.

17:46 Raynes: The 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:46 I like to think I'm pretty smart and I still can't figure that shit out.

17:46 callen: and the only documentation is a log-aggregation of the mailing list directly injected into your brain

17:46 so if you're not klabnik or walton you're just sorta fucked.

17:47 wink: who is walton?

17:47 Raynes: Go is fantastic on the documentation front, but blurgh everywhere else.

17:47 callen: wink: he works on Rust.

17:47 wink: mad genius type, you'd like him.

17:47 I think he's a PNW'er.

17:47 Raynes: What about Hoare?

17:47 jodaro: Go has nice doc stuff

17:47 nice tools

17:47 Raynes: As an aside, I feel naughty saying that word.

17:47 HOARE

17:47 wink: callen: what does PNW mean?

17:47 callen: we're all filthy Hoares.

17:47 jodaro: does a good job of getting you writing some code fast

17:47 but

17:47 callen: wink: pacific northwest.

17:47 wink: cf. technomancy

17:47 wink: callen: ah, need to get my geography straight :P

17:48 jodaro: the package version thing is going to be a problem

17:48 tieTYT2: hiredman: 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:48 wink: jodaro: yeah, I found it wicked cool until someone told me there's no versioning

17:48 callen: Raynes: 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:48 Raynes: I pretty much stopped planning on going back to school that day.

17:49 completely.

17:49 jodaro: but i really dig the godoc stuff

17:49 hiredman: tieTYT2: whatever, you can dispatch on the url

17:49 tieTYT2: hiredman: that's true. Is that true for protocols?

17:49 Raynes: callen: I know a similar person.

17:49 callen: Raynes: can I mock them?

17:49 Raynes: Sure.

17:49 wink: there are several in each CS course :P

17:49 hiredman: no, for protocols you would need a type for each "type" of thing

17:49 tieTYT2: i've read a bit about protocols and that didn't seem possible to me. I remember it needing a new type for dispatching

17:50 callen: Raynes: I need to satisfy my blood-thirsty impulse for class warfare.

17:50 hiredman: correct

17:50 callen: wink: schmucks that do their coursework and nothing else?

17:50 tieTYT2: ok 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:50 callen: oh that reminds me.

17:50 jodaro: clojure is way nicer to look at than Go, too

17:50 callen: I should replace that retarded type dispatch with multimethods

17:50 jodaro: that's an understatement

17:50 jodaro: anyways

17:50 yeah

17:51 callen: but I'm convinced Rust is intentionally designed to look Rusty

17:51 tieTYT2: thanks

17:51 justin_smith: tieTYT2: 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:51 wink: callen: 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:51 callen: wink: speaking of language channels on IRC, I think the most evil/hateful one is ##C. Thoughts?

17:52 Raynes: https://github.com/bitemyapp/revise/blob/master/src/bitemyapp/revise/core.clj#L150 these should be multimethods right?

17:52 tieTYT2: justin_smith: yeah, but ignoring the fact I don't have different types, with multimethods things don't have to be passed around

17:52 wink: callen: never tried a c channel, actually. found the linux/distro ones pretty bad in general

17:52 callen: wink: haha, oh man. You are in for a *treat* if you ever ask a question in ##C.

17:52 Raynes: callen: *shrug*. Unless you need to add several more in the future or each body is very large, not really.

17:52 callen: just don't send me the bill for the time spent in the burn ward.

17:53 jodaro: ahh, rethinkdb is protobuf based?

17:53 callen: Raynes: really? I figured I'd get flamed for that code.

17:53 jodaro: I prefer to believe it's pain based.

17:53 wink: callen: seeing that last line I wonder if there's #C# or ##C# :P

17:53 callen: jodaro: made up jack-shit idiom ignoring length prefix bullshit.

17:53 tieTYT2: hiredman: my current implementation to me seems like a higher ordered function. How could you tell I wanted polymorphism instead?

17:53 jodaro: some might argue they are one and the same

17:53 Raynes: callen: https://github.com/bitemyapp/revise/blob/master/src/bitemyapp/revise/core.clj#L167 ur a real profeshunul

17:53 callen: wink: they're friendlier.

17:53 wink: ##C is the greatest concentration of evil in the entire digital world.

17:54 Raynes: as long as I can distinguish one of the two exceptions I throw, it's fine.

17:54 jodaro: hahah

17:54 wink: callen: that's good to know. I usually ask some personal contacts for advice on c anyway

17:54 callen: wink: you should ask ##C next time

17:54 wink: then tell us about it in here.

17:54 wink: callen: depends on when I do c next.. could be months

17:55 callen: Raynes: 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:55 wink: I can wait. So can the hive of scum and villainy.

17:56 hiredman: I have a X, Y, and Z and I want them to do different things at point C in my code

17:56 callen: hiredman: are they functions?

17:56 tieTYT2: callen: he was responding to me

17:56 callen: hiredman: can I buy a vowel?

17:56 hiredman: is this the daily double?

17:56 can I phone a friend?

17:57 jodaro: (how many game show references can callen make ...)

17:57 callen: tieTYT2: when has that ever stopped me?

17:57 tieTYT2: hiredman: isn't that just like (map) for example? The only difference is I wrote the code

17:57 jodaro: big money, no whammies

17:57 callen: jodaro: the secret is to cheat.

17:57 bhenry: hello

17:57 Raynes: Good afternoon sir.

17:58 bhenry: how would i go about scraping all the text from html to make text/plain versions of text/html emails?

17:58 Raynes: https://github.com/Raynes/laser

17:58 bhenry: i want to run a custom function for certain tags that will add to the text it creates.

17:58 callen: bhenry: heuristics if you want intelligent main content abstraction

17:58 hiredman: tieTYT2: I don't follow

17:58 jodaro: wow

17:59 bhenry: so i can turn links into "link text (link-url)"

17:59 Raynes: See my link. I'm sure you can do something with laser.

17:59 tieTYT2: ok I'm looking at (map) as your text book case of a HOF

17:59 callen: bhenry: http://en.wikipedia.org/wiki/Longest_increasing_subsequence

17:59 hiredman: map is always mapping a function over a seq, but you want (F A) to do different things depending on A

17:59 callen: bhenry: www2009.eprints.org/98/1/p971.pdf‎https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CC4QFjAA&amp;url=http%3A%2F%2Fwww2009.eprints.org%2F98%2F1%2Fp971.pdf&ei=LZuaUYeAJqbRiwK-6oHgCg&usg=AFQjCNEss8bjU9D1yd-1KwWHQ7AcA3Adgg&sig2=d3U8ec1VFKSSPs0ilW0yTA

17:59 hrm. fail.

17:59 www2009.eprints.org/98/1/p971.pdf‎

17:59 www2009.eprints.org/98/1/p971.pdf‎

18:00 wow, keyboard suckery today.

18:00 bhenry: ^^ anyway, that.

18:00 tieTYT2: hiredman: what's (F A)? You mean like this: (map (F A) AS) ?

18:00 rasmusto: can functional programming fix X11 copy paste?

18:00 callen: rasmusto: no but it can heal the Earth.

18:00 tieTYT2: i think I see your point

18:00 callen: rasmusto: how'd you know I was an Xorg user? :(

18:00 tieTYT2: in map, the F is what changes

18:00 hiredman: tieTYT2: 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:01 callen: hiredman: isn't this called an if-case?

18:01 (cond ...)

18:01 rasmusto: callen: I've middle click dumped embarrasing stuff before

18:01 (mostly my bad code)

18:01 callen: hiredman: I think I know this one dude, I even used cond recently.

18:01 rasmusto: yeah, I was using m3

18:01 annoying.

18:01 hiredman: pick me pick me

18:01 I know the answerrrrrrrr

18:01 * callen sticks arm high in the air and squirms in chair

18:02 tieTYT2: hiredman: 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:02 thanks for the help

18:03 hiredman: passing around your own vtables is silly?

18:03 tieTYT2: yeah

18:04 callen: tieTYT2: multimethods are known to cause: eczema, dryness, seepage, night sweats, and can interact badly with MAOIs.

18:05 tieTYT2: please see your doctor first.

18:05 tieTYT2: seems like a good fit

18:05 technomancy: maoris?

18:05 callen: technomancy: http://en.wikipedia.org/wiki/Monoamine_oxidase_inhibitor

18:06 wink: interested, I only knew MAOs

18:06 s,ted,ting,

18:06 technomancy: I prefer to imagine multimethods oppressing new zealand tribal groups, sorry.

18:08 callen: technomancy: I'm imagining "revenge against the luddites" by way of metaprogramming.

18:08 macros stomping textile workers. multimethods driving out natives.

18:09 technomancy: middlewares engaged in gerrymandering

18:10 kovas: resources must be decomplected from culture

18:10 fork/join executing in the minds of sleeping african children

18:10 callen: kovas: wealth alienation from population and land is the capitalist dissolution of the worker class!

18:10 wink: the Ice Ages are the world's GC then?

18:11 technomancy: kovas: I think that happened in Overland

18:11 callen: I've always thought of people who can't keep warm as seeming reptilian. Works for me.

18:11 technomancy: otherland

18:11 kovas: is that a book?

18:11 hiredman: series

18:12 kovas: will read it to pick up some pointers

18:13 tpope: Raynes: sup

18:14 callen: tpope: sup

18:14 Raynes: tpope: I was curious if you can sign commits with :Gcommit. In the git command line you can do `git commit -S`.

18:14 The answer here is usually "try it", but I didn't feel like it.

18:14 callen: Raynes: are you cheating on Emacs?

18:14 tpope: doesn't :Gcommit -S work?

18:14 Raynes: If you think it does then it probably does.

18:14 And that's what I was wondering.

18:15 I'm not sure how the args to :Gcommit are handled.

18:15 callen: I have been for a while. I tend to hop back and forth when I get bored.

18:15 callen: The benefit is that I kick ass in both editors, especially emacs with evil-mode.

18:15 callen: Raynes: if you're bored, why not zoidb^H^H^H^H^Hhelp out with revise? :P

18:16 Raynes: Because I'm at work. :P

18:16 rasmusto: Raynes: evil-mode and paredit clash a bit too much :(

18:16 callen: paredit is a bad idea anyway

18:17 Raynes: rasmusto: Sure, if you mean not at all ever.

18:17 technomancy: ~guards

18:17 clojurebot: SEIZE HIM!

18:17 Raynes: I've never once had a clash between paredit and evil-mode.

18:17 rasmusto: Raynes: oh, well I was trying to learn emacs and paredit (while using evil), and some command clashed

18:18 I'm generalizing a bit too mcuh about the conflicts

18:18 callen: what's wrong with paredit?

18:19 callen: rasmusto: fascist editor mode restrains the will of the people.

18:19 rasmusto: callen: :)

18:19 callen: see, rasmusto gets it.

18:19 Raynes: callen: You'll have to pry paredit from my cold dead hands.

18:19 callen: Raynes: are you a white walker from Game of Thrones?

18:19 rasmusto: Raynes: s/pry/slurp

18:19 * technomancy shudders, remembering the Dark Days before he discovered paredit

18:20 callen: am I the only person who doesn't get into trouble with the parens?

18:20 did all those years of non-tool-assisted CL immunize me or something?

18:20 what is wrong with youuuuuuuu

18:20 technomancy: callen: maybe you've trained your brain to stop complaining about performing menial tasks?

18:20 wink: last I asked the common response was I was weird for using stuff like "dd" in vim+clojure

18:21 callen: technomancy: dude. I am the whiniest person in the world about unnecessary schlep. That's highly unlikely.

18:21 rasmusto: callen: I don't get in troble without paredit, but yeah, I don't have to think about parens

18:21 technomancy: callen: I see no other explanation

18:21 callen: technomancy: plausible. I'm still baffled though.

18:22 shriphani: you should implement a Scheme.

18:22 dnolen: agree with me.

18:23 shriphani: a small one.

18:23 wink: callen: does anyone ever agree with you? :)

18:24 yogthos: you might want to refresh luminusweb.net maybe. just pulled to fix a typo that's been fixed already in the repo :P

18:24 callen: wink: all the time. yogthos often does.

18:24 wink: I'm the reason Luminus uses clabango.

18:24 wink: and you *don't* want to get me started on template libraries >:)

18:25 wink: callen: I really don't. so far I'm happier with clabango than with hiccup. but it's not hiccup's fault I think

18:25 * callen dances with glee

18:25 callen: another one bites the dust, hey hey.

18:26 eventually everyone will be using the Clojure Master Web Stack (TM).

18:26 * seangrove agrees with technomancy. A life without paredit is a hard life indeed.

18:26 Raynes: callen: I'm going to beat you over the head with a laser.

18:26 callen: seangrove: your website is held hostage by snotty startup founders that will sell you out for ferrari money. Nothing you say is valid.

18:27 Raynes: you're just mad because I sold somebody else's milkshakes.

18:27 rasmusto: callen: only one web-stack per household

18:27 Raynes: *My* milkshake brings *all* the boys to the yard.

18:27 Because it's better than yours.

18:27 Though admittedly, if you can give a talk for a bloody hour and a half about a templating engine… sigh.

18:27 I try so hard to make it not complex, but then people still come out the other side cross eyed.

18:27 wink: rasmusto: wait, what? I'm using 5 webstacks on my server alone.

18:28 callen: Raynes: I can go longer than that.


18:28 Raynes: I 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:28 rasmusto: wink: fighting the man

18:28 callen: Raynes: unaccepta-burrrr

18:28 wink: Raynes: you hate contributions?

18:28 callen: wink: don't touch his precioussssss

18:29 Raynes: callen: 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:29 callen: LOL

18:29 I legit lol'd IRL

18:29 amalloy: i don't think i called you god. that doesn't sound like me

18:29 Raynes: And 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:29 callen: I 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:30 technomancy: callen: yours or a selected audience member's?

18:30 wink: callen: please fix recursive includes first

18:31 callen: technomancy: entire audience

18:32 wink: capital idea but you shouldn't be using includes that extensively.

18:32 wink: blocks are usually more appropriate. What'd you do?

18:32 wink: callen: wasn't extensively, just an accident with extends and include. it never terminated

18:32 callen: sweet.

18:32 wink: callen: I would've expected some nesting level stop at ~10 or 20 levels- not crash the hvm

18:33 callen: wink: did you document it on the github?

18:33 wink: callen: not really, I fixed the stupid mistake in my templates

18:33 callen: wink: don't tell me you didn't file an issue.

18:33 oh come on dude

18:33 wink: don't make me get my beatin' switch.

18:33 wink: put the repro on the github repo!

18:33 technomancy: callen: "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:33 callen: wink: (please?)

18:33 wink: callen: I'll try to reproduce it

18:34 callen: wink: danke schon.

18:34 technomancy: <3

18:34 technomancy: ever quotable.

18:34 technomancy: they're PNW'ers too.

18:34 technomancy: that's some solid PNW solidarity you've got man.

18:34 wink: notice how there's a typo in either panel 1 or 3?

18:35 callen: wink: I think the implication is that the dude was both psychotic and illiterate.

18:35 technomancy: callen: 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:36 callen: technomancy: I knew a place like that back home. Made getting Magic TCG stuff excruciating.

18:36 technomancy: "Why would you buy booster packs from that set? That set fucking sucks. You should just play ${THING}"

18:36 wink: lol

18:37 callen: technomancy: "What kind of deck are you even trying to build? That's stupid."

18:37 technomancy: "Why would you buy those booster packs without a deck planned out? Are you a noob?"

18:37 then the noogies and toilet swirlies happen.

18:37 eventually you leave bruised and emotionally scarred with your cards.

18:37 technomancy: callen: like this? http://www.penny-arcade.com/comic/2006/9/6/

18:38 callen: technomancy: that plus the "runs a gaming/toy shop"

18:38 technomancy: also you are way too good at pulling up PA comics.

18:38 technomancy: callen: for whatever reason indexing on PA is a lot worse than most strips

18:38 callen: It's pretty bad.

18:38 You just need to know the titles.

18:38 technomancy: ohnohrobot.com is my secret weapon for the indie ones

18:38 wink: are these gaming shops that common over there?

18:38 I found having 2 in my town quite luxurious

18:39 callen: wink: what's "over there"?

18:39 wink: is that a slur against westerners?

18:39 wink: callen: america apparently

18:39 callen: wink: you're slurring us. Like a slurry.

18:39 wink: they're common in cities, not as much in smaller towns.

18:39 wink: callen: dunno. generalizing about as much as you think I'd differentiate between westerners and east coast people? :P

18:40 callen: smallest town I know of that had more than one serious gaming place was like 15k pop

18:40 had 2 or 3 at various points

18:40 wink: America has low taxes and low cost of starting a small business, that means random stuff just kinda blossoms all over the place.

18:40 wink: I know I could buy magic and some role playing stuff in one of the big toy stores in the malls. but nothing extraordinary

18:40 callen: wink: that's because we're awesome and American.

18:41 Caligo: is anyone on?

18:41 callen: Caligo: nope

18:41 wink: callen: I do think comics and "gaming" stuff is also more prevalent.

18:41 callen: Caligo: we're all fast asleep. You're talking to our Clojure Powered (TM) NLP robots.

18:42 wink: because MURICA is awesome.

18:42 Caligo: callen: Oh no!!!

18:42 wink: callen: haven't experienced first hand

18:42 callen: Caligo: what do you mean oh no? It means we've made things that pass the turing test. Shit is awesome.

18:42 wink: you should visit. And then never leave.

18:42 Caligo: I'm not sure I'm convinced you're not a well designed bot.

18:42 wink: callen: they usually have something against folks doin just that

18:42 callen: Caligo: how do I know you're not just here to troll with fake botty questions?

18:42 brehaut: you know whats not awesome about america? the cost of international postage.

18:42 bastards

18:42 Caligo: callen: but, but robots that pass the turing test -> robot apocolypse

18:43 callen: brehaut: physical goods are for plebs.

18:43 wink: brehaut: goes both ways

18:43 callen: Caligo: maybe, if it was spelled apocalypse

18:43 wink: or let's say.. customs are worse than postgae

18:43 Caligo: callen: that proves, I'm not a bot :)

18:44 brehaut: wink: luckily my customs is only insane and a PITA over about NZD400 value.

18:44 wink: brehaut: I've paid ~15$ for a t-shirt and 15 more for customs. from america to germany

18:44 hiredman: smuggling wombats

18:44 callen: Caligo: bots can make mistakes.

18:44 wink: that's because germany isn't a real country.

18:45 brehaut: i would like a wombat

18:45 Caligo: callen: they can't recognize that they have made a mistake.

18:45 brehaut: those things are hilarious

18:45 callen: brehaut: you can get those?

18:45 dnolen: interesting CLJS perf question http://stackoverflow.com/questions/16641250/clojurescript-map-lookup-slow/16659463#16659463

18:45 callen: brehaut: only thing better than a wombat is a kakapo.

18:45 Best parrot in the world.

18:45 hiredman: http://imgur.com/gallery/Pu8Bry7

18:45 brehaut: callen: sirocco frinstance

18:45 Caligo: what has the clojure irc reduced to?!?!

18:46 callen: Caligo: uhm, a collection of data?

18:46 Caligo: callen: besides that...

18:46 callen: or a final result?

18:46 isn't that what reducers and reduce produce?

18:46 (say it out loud)

18:46 brehaut: hiredman: thats the best kind of bat

18:46 callen: hiredman: OMG THAT IS CUTE


18:47 rasmusto: hiredman: even that url is cute :)

18:47 brehaut: callen: re:kakapo, kaka and kea are also pretty awesome

18:47 just not as rare

18:47 callen: brehaut: are they as sociable though?

18:47 brehaut: callen: hells yes

18:47 callen: brehaut: the appeal of the kakapo and cause for its rarity is the sociability.

18:47 brehaut: REALLY?!

18:47 brehaut: really

18:48 callen: dude I am getting a bird.

18:48 brehaut: kea 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:49 jodaro: heh

18:49 * hiredman imagines people feeding cars to giant wombats

18:49 brehaut: haha

18:49 callen: channel is making me laugh too hard today

18:49 brehaut: im not kidding about the cars; kea will rip apart as much of an unattended car as they can and in very little time

18:50 jodaro: wow

18:51 callen: brehaut: that sounds more like an Australian bird than an NZ one.

18:51 brehaut: callen: its not going to kill you

18:51 callen: yeah but if it touches my car I will kill *it*

18:51 brehaut: it'll destroy your belongings in a very friendly way

18:51 callen: LOL

18:51 brehaut: are you from NZ originally?

18:51 brehaut: im from NZ right now

18:51 callen: oh, you mentioned US postage

18:52 figured that meant US origination.

18:52 brehaut: nope, i get stuff posted to NZ from the US sometimes, but its getting insanely expensive

18:52 callen: blame NZ customs

18:52 brehaut: nope

18:52 i mostly dont have to pay NZ customs on it

18:54 cost of shipping for gaming books and related stuff has reached prohibitive levels

18:54 (its still viable for stompboxes, but only just)

18:55 </complaining>

18:55 hiredman: can't you just ship direct from china?

18:56 wink: brehaut: be glad you're not being charged for long-distance irc. that'd be a lot of money right now.

18:56 brehaut: lol

18:56 hiredman: not that ive seen

18:57 hiredman: actually 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:57 technomancy: time to bring back the silk road

19:00 wink: follow the yellow brick road

19:01 brehaut: thats only for importing wombats

19:05 wink: damn, I think I reinvented a wheel. by lack of rtfm

19:07 gtrak: (recur (rest brick-road))

19:09 callen: wink: in a similar anecdote of being on the slow boat, I finally got a sonicare toothbrush recently. AMAZIIIIING

19:13 jodaro: callen: costco?

19:15 callen: jodaro: kohls

19:20 tieTYT2: if I try to use clojure for SICP, will it mess me up? Is it better to use scheme for that?

19:22 brehaut: you'll have to know enoguh about both languages to translate idioms

19:22 tieTYT2: hrm, sounds like I should just use scheme

19:22 brehaut: ,(cons 1 2)

19:22 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>

19:22 hyPiRion: Dotted lists aren't existent in Clojure for instance

19:22 tieTYT2: what I hate about that book is the examples are more complex than the material

19:22 Apage43: probably. I tried working through http://greenteapress.com/thinkstats/ in Clojure instead of python

19:23 hyPiRion: ...as you just saw

19:23 Apage43: and it took a lot more gumption to both translate the examples -and- work through the text

19:23 rasmusto: who was ranting about 80 column text today? I just turned off colorcolumn in vim and I'm immediately less stressed

19:25 technomancy: ._.

19:36 patchwork: I can't get the simplest query to work in clojure.java.jdbc!

19:36 (sql/query db ["select * from model"])

19:36 works

19:36 (sql/query db ["select * from ?" "model"])

19:36 fails with "syntax error at or near "$1""

19:36 ???

19:36 lazybot: patchwork: Oh, absolutely.

19:36 patchwork: I don't have a $1 anywhere!

19:37 callen: patchwork: use Korma.

19:37 patchwork: stop using clojure.java.jdbc

19:37 patchwork: Does no one use clojure.java.jdbc?

19:37 I didn't realize

19:37 technomancy: no, that's nonsense

19:37 callen: patchwork: nobody worth listening to.

19:37 brehaut: people use jdbc

19:37 lots of people

19:37 technomancy: c.j.jdbc is all I use

19:37 cbp`: I do :/

19:37 callen: they enjoy pain.

19:38 hiredman: you can't use a table name as a parameter like that

19:38 callen: do not listen to those fools.

19:38 brehaut: pain like not having our abstractions leak

19:38 cbp`: I enjoy pain :( It's been said


19:38 brehaut: (well, leak much)

19:38 patchwork: hiredman: How do I parameterize table names then?

19:38 hiredman: patchwork: str or format

19:38 technomancy: surely you're not taking table names from user input?

19:38 patchwork: hiredman: but isn't that the point of parameterized queries?

19:38 brehaut: what could go wrong!

19:39 wink: *possibly

19:39 hiredman: patchwork: depends, evidently whoever came up with jdbc thought parameterizing table names was crazy, but parameterizing column values, etc, was fine

19:39 patchwork: technomancy: I have an api that selects tables based on user input yeah

19:39 Is that really that wrong?

19:40 hiredman: technomancy: it is also a pain if you read the table name from some configuration source

19:40 brehaut: hiredman: its not like sql in general was designed to allow reuse or composable expressions

19:40 patchwork: I thought parameterizing queries avoids sql injection?

19:40 wink: not if you're whitelisitng

19:40 technomancy: patchwork: I mean the user input string doesn't go straight into the query, right?

19:40 patchwork: technomancy: No, that is why I am not building strings

19:40 I am trying to use clojure.java.jdbc 's parameterized queries

19:40 !

19:40 hiredman: brehaut: fair point

19:40 callen: lol ^^

19:40 technomancy: patchwork: in that case the situation parameterized queries are designed to protect you against doesn't apply

19:40 callen: patchwork: use Korma.

19:40 patchwork: Korma users don't have to have these conversations.

19:40 technomancy: so format is perfectly safe

19:41 tieTYT2: brehaut: not a fan of korma?

19:41 brehaut: tieTYT2: not especially

19:41 tieTYT2: brehaut: why's that?

19:41 patchwork: technomancy: I'm curious why? What do parameterized queries protect you from then?

19:41 tieTYT2: i can't stand jpa. I have a feeling i'll see it your way

19:42 patchwork: The only problem I have with korma is it is a bunch of macros and I am composing queries programmatically

19:42 wink: patchwork: hehe, I've bitten by that as well.

19:42 callen: Raynes: tried Jonsi?

19:42 Raynes: I don't know what that word means.

19:42 patchwork: The fact that I can't map or reduce (for instance) with korma prevents me from using it

19:43 wink: patchwork: dunno how deep you dug, but "(-> (select*" helped me make it work instead of (select

19:44 callen: Raynes: artist.

19:44 patchwork: So how do I protect the query from bad table names?

19:44 brehaut: tieTYT2: 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:44 bhenry: is there a way to flatten only one level deep?

19:44 callen: Raynes: http://www.youtube.com/watch?v=Tj8RZ8TOa4I

19:44 bhenry: been asked before, just google :)

19:44 hiredman: ~flatten

19:44 clojurebot: flatten 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:44 tieTYT2: brehaut: that's how i feel about jpa. I think jpa just delays your issues and doubles them

19:45 brehaut: i dont think im familar with jpa

19:45 trptcolin: &(mapcat identity [[1 2 3] [4 5 6] [7 8 9]])

19:45 lazybot: ⇒ (1 2 3 4 5 6 7 8 9)

19:45 tieTYT2: good

19:45 eg: hibernate, eclipselink, etc.

19:45 brehaut: ah, so bag of hurt

19:46 tieTYT2: yeah, i truly hate it

19:46 brehaut: i have a great loathing of the django ORM

19:46 tieTYT2: i wonder if I'd hate active record

19:46 patchwork: You would

19:46 wink: so much hate

19:47 tieTYT2: trptcolin: why is that better than flatten?

19:47 brehaut: trptcolin: ##(apply concat [[1 2 3] [4 5 6] [7 8 9]])

19:47 lazybot: ⇒ (1 2 3 4 5 6 7 8 9)

19:50 trptcolin: tieTYT2: 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:51 i 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:51 other than for myself

19:53 tieTYT2: i see

19:53 technomancy: callen: last week's seattle remote-work brag: https://secure.flickr.com/photos/technomancy/8744331167/

20:48 bbloom: tomoj: reported a bug via github & rich fixed it w/o a jira ticket? glorious.

21:56 callen: technomancy: that is gorgeous ;_;

22:00 tomoj: bbloom: I think I see what you meant now about the problem with maps and zippers

22:01 thinking about the cljs group "Zipper for json?" question

22:02 I swear I wrote an associative-zip before but it seems to have disappeared.. not sure how it would have worked

22:05 gzmask: hi 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:08 cbp`: gzmask: move the definition of index-page before the defroutes

22:09 gzmask: cbp`: tried that, still same error

22:10 tomoj: certainly the line number changed? :)

22:11 "richever_clj/handler.clj:16:15" ?

22:12 gzmask: tomoj: 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:13 tomoj: looks like html5 is in hiccup.page

22:13 where'd you learn to do (:use compojure.core hiccup.core)? :)

22:14 cbp`: maybe you want to use the macro html

22:14 which is in hiccup.core

22:14 tomoj: (:require [hiccup.page :refer [html5 include-css]])

22:14 gzmask: tomoj: https://github.com/weavejester/hiccup says (use 'hiccup.core) so I figured that out myself

22:17 tomoj: using your way works. but where in the world can I find such tutorials ?

22:19 Caligo: anyone on?

22:20 tomoj: gzmask: dunno :/

22:20 Caligo: I 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:21 tomoj: gzmask: maybe read this though http://clojure-doc.org/articles/language/namespaces.html

22:23 Caligo: if map-indexed took multiple colls I would expect it to be 'zippy', like map

22:23 but that would be kind of weird - (fn [i x y z...]) ?

22:23 guess it could make sense

22:27 devn: hello clojurians

22:27 does anyone know if michael klishin is on IRC?

22:29 -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:30 this is an elastisch question slash a general search engine question. i assume the default query-string parser is the problem

22:33 jcromartie: devn: I would guess that it's an Elasticsearch query limitation

22:34 tomoj: I'd think there should be an escape function in elastisch

22:34 danielglauser: dakrone: Anything off the top of your head? ^^^

22:38 devn: jcromartie: my analyzer and what-not might be the problem

22:38 at 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:39 the elasticsearch folks rightly punt because it's not a pure problem (it uses a library)

22:43 technomancy: devn: that's a lucene issue

22:43 but yeah, you want a field that's not analyzed

22:44 well, it's a lucene feature that you'd have to figure out how ES exposes

22:45 aw geez; I have local changes that implemnet this in clucy that I haven't pushed

22:45 =\

22:53 oh nice my changes are all broken due to an underlying shift to lucene 4

22:57 devn: :\

22:57 i have new fish to fry now

22:57 i deployed to heroku and broke everything

22:57 technomancy: h releases:rollback

22:58 * devn wipes sweat

22:59 callen: Raynes: http://osrc.dfm.io/raynes

22:59 technomancy: http://osrc.dfm.io/technomancy

22:59 it didn't even call me a Clojure programmer :(

22:59 devn: if only i hadn't decided to re-seed my db in the process

22:59 callen: I think I need to have a good cry.

23:01 devn: same

23:02 technomancy: heh; "similar to travis"

23:03 spoon16: seancorfield: I've got a clojure/java.jdbc question for you

23:05 callen: "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:05 okay I feel a little better.

23:05 technomancy: callen: 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:06 if they were in the UK that would be a libel lawsuit

23:07 callen: technomancy: hahahahahahahaha

23:07 technomancy: that's hilarious.

23:08 technomancy: the sad part is it would be fairly trivial to sift out the meaningful work from the original work

23:08 from the trivial work*

23:08 especially in terms of originality

23:32 seancorfield: spoon16: sure, what's the Q?

23:34 spoon16: if 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:34 and the query fails

23:50 Raynes: callen: This is great, thanks.

23:54 seancorfield: spoon16: you need to specify a quoting strategy then

23:55 there are examples in the docs but something like (entities (quoted \`) (query db (select * :table (where {:id 42}))))

23:55 hiredman: fun fact related to sql quoting: ssl is a reserved word or whatever for mysql, so you need to quote it

23:58 spoon16: seanaway: thanks

23:59 seanaway: np, i'll be back later if you have more questions

Logging service provided by n01se.net