#clojure log - Oct 01 2013

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

0:23 akurilin: Has anybody figured out how to do a parameterized SQL IN clause without using a server-specific data structure such as PG arrays?

0:26 `cbp: damn reql is not very pleasant to write [an implementation of]

0:29 Raynes: ambrosebs: Is Bronsa doing the whole contributors agreement for contributions, etc, etc, that is necessary for this to eventually become a part of Clojure? It's interesting, but I sure hope that the thing is actually intended to hopefully replace Clojure's compiler at some point, otherwise it just makes me sad.

0:30 The whole project doesn't even have a license or a mention of one.

0:30 Which is worrisome.

0:32 * Raynes opens an issue about that.

0:32 Raynes: Oh, I guess you didn't really expect that.

0:33 "Officially replacing the JVM compiler won't happen any time soon. It will take years of experimentation with compilers like Clojurescript and CinC to really nail the "Clojure-in-Clojure" style compilers."

0:33 Well, that sucks.

0:33 ambrosebs: Raynes: Well it's the ultimate breaking change isn't it?

0:33 I don't see anyone taking it lightly

0:34 Raynes: yes, I asked Bronsa to organise offering CinC to contrib.

0:35 Raynes: ambrosebs: Yes, I agree. I was just curious about what the intentions of the funding you're trying to get and his project was. I couldn't tell if it was a "we should fund this cool stepping stone to CinC by this awesome guy, but it is unlikely to ever actually replace Clojure's compiler" vs a "let's help get CinC done, in Clojure, etc"

0:35 ambrosebs: Raynes: he's confirming with the original author of CinC, who has already said multiple times (but quite awhile ago) that it's going to go to contrib.

0:35 Raynes: Well, that's good news.

0:35 That's probably the only project I'm actually happy to see go to contrib. :D

0:36 ambrosebs: Raynes: :D

0:36 Raynes: throwing money to CinC can only possibly be a good thing IMO

0:36 Raynes: just an awesome project

0:36 Raynes: and IMO Bronsa is on a roll, just needs more pushing :)

0:36 Raynes: Absolutely! Either reason for funding that I listed above was totally valid.

0:37 ambrosebs: yes all of the above

0:37 Raynes: Bronsa is a cool chap, indeed.

0:37 ambrosebs: and a selfish reason, I'm waist deep in analysis all day every day.

0:38 so it's also for me.

0:38 I'd guess no-one uses JVM analyser more than me.

0:39 Raynes: :p

0:39 ambrosebs: Raynes: also, CinC is a very important piece of standardised AST representation across clojure implementations

0:39 Raynes: as in, we all need to sit down and work it out.

0:40 Raynes: Kidnap Rich at the next conj?

0:40 technomancy: also: it doesn't have to "officially" replace the java compiler for you to use it

0:41 Raynes: Ugh.

0:41 ambrosebs: technomancy: exactly. I want the dependency, wherever it is.

0:41 technomancy: probably a lot to be learned from rubinius, pypy, etc here

0:42 Raynes: It's great for ambrosebs, but the prospect of multiple popular Clojure compilers makes me nauseous beyond that.

0:43 `cbp: callen: ping

0:43 ambrosebs: Raynes: yes, we should revolt against Compiler.java :)

0:44 Raynes: the java compiler hasn't changed in years, so it's not like we'll have multiple moving targets.

0:44 Raynes: ambrosebs: http://www.youtube.com/watch?v=UsnKkXFQYqU

0:44 ambrosebs: :)

0:44 Raynes: (this was the first live band I ever saw, opening for KMFDM, amusingly)

0:45 (neither band I was familiar with, I was taken to the show rather spontaneously)

0:46 glosoli: Anyone here familiar with Emacs and jumping into Java sources from Clojure interop ?

0:46 I am kinda confused if it's something I am missing in my config or what, but any time I try to jump into Java class, I get this http://bpaste.net/show/i18oeBXJ7aZkKpQTNmyL/

0:47 callen: `cbp: yes dear?

0:52 ivan: has anyone build La Clojure recently? IDEA seems to be not seeing any sources in the la-clojure/jps-plugin/src/org/jetbrains/jps/clojure/build/ folder

0:52 akhudek: how does one return javascript null from a clojure function?

0:52 I thought it was js/null, but that's giving some weird null$

0:53 `cbp: callen: you prolly know reql right? and it's pretty much concatenating methods on an object which is not really clojure style i guess. Would it be ok to "redefine" clojure.core functions and macros to get a similar effect and then maybe add a convenience macro that would qualify those functions used inside of it with the corresponding namespace?

0:53 ambrosebs: akhudek: it's it just nil?

0:53 akhudek: oh nvm read that wrong.

0:54 akhudek: do you mean in cljs?

0:54 akhudek: yeah, we have cljs code that needs to return an actual null

0:54 rather than nil

0:56 oh, nevermind, you are right, it is nil

0:56 `cbp: callen: such that you could do something like (-> (db "test) (table "users") (filter…)) but none of those would be the clojure.core functions

0:56 that wrapped in a (dsl macro or something

1:00 callen: `cbp: I don't know reql.

1:01 `cbp: callen: what I wrote would be like db('test').table('users').filter(..) on python, that's pretty much reql and behind it is all the protobuf insanity

1:05 callen: `cbp: oh sorry forgot rethinkdb's DSL was called reql

1:06 `cbp: :-o

1:08 callen: `cbp: I think you should do it like Korma

1:08 `cbp: build up maps incrementally with db, table, filter functions

1:08 `cbp: then have an executor fn for actually dispatching it.

1:11 `cbp: callen: Right now I have https://www.refheap.com/19196

1:11 is that ok?

1:14 callen: `cbp: I was thinking of starting from a plain map format, then turning it into protobuf in the executor

1:15 `cbp: to keep those worlds separate.

1:16 `cbp: callen: mmk

1:53 nonuby: is there a lein command to see version number of a package e.g. `lein tell-me-stable-version-available-of midje` returns 1.5.1

1:57 callen: nonuby: search clojars?

1:58 nonuby: meh, means leaving command line, may something similar to node.js `npm install library-name --save` that adds to the project.clj deps vector

2:05 rasmusto: nonuby: I wonder if there's a lein plugin for it

2:06 Raynes: $latest midje

2:06 lazybot: [midje "1.6-beta1"] -- https://clojars.org/midje

2:06 Raynes: nonuby: ^

2:06 Won't work for things not on clojars.

2:06 But it exists nontheless.

2:08 nonuby: $latest compojure

2:08 lazybot: [compojure "1.1.5"] -- https://clojars.org/compojure

2:08 nonuby: Raynes, nice! :)

2:09 holo: hi

2:12 guys/girls, check this new library: https://github.com/ccfontes/namban . It converts text between hiragana / katakana / romaji (hepburn) / kunrei-shiki. I hope you like it. It's still half quality though

2:13 rhg135: There are no girls on irc afaik

2:14 holo: hey, you never know

2:15 btw, don't know why but i uploaded a very old version.. how is it possible? that's 2 weeks old source or something

2:16 nonuby: rhg135, ssshhh... are you trying to get a conference cancelled!

2:16 glosoli: Damn it got me paranoid, is Emacs nREPL mode supposed to M-. jump into java source files, or this is just my imagination ?

2:16 rhg135: Right...

2:22 tak: /?

2:22 holo: nie

2:32 ok, the most recent version is there now

2:36 seancorfield: Raynes: seems like you could easily extend $latest to also handle Maven Central for org.clojure stuff too?

2:36 $latest java.jdbc

2:36 lazybot: No project by this name exists on clojars.

2:38 seancorfield: url: http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.clojure%22%20a%3A%22java.jdbc%22

2:38 you could pull the latest version from that...?

2:40 rhg135: depends on which channel you're in... several of the channels i've been hanging out in lately have "girls"... probably more accurate to say that clojure's community is more swm-dominated than many other tech communities... but i hope we can change that...

2:41 mtp: there aren't guys on irc either

2:41 only nicknames

2:41 rhg135: not rly, on most chans im in theres no girls

2:41 mtp: go to better channels

2:42 rhg135: the most notable ones, here #openjailbreak and #teamgelato

2:42 i have seen girls but the ratio is like 1:1000

2:42 mtp: my condolences

2:42 i only see nicknames

2:43 rhg135: fair enough

2:43 mtp: does this nickname have a dick or a vagina? wait, who cares

2:43 am i trying to get laid on irc or talk about programming

2:43 rhg135: i usually assume a guy until proven otherwise

2:43 nonuby: why does it matter? its shouldnt even factor in, we're here discussing/debating tech, gender is irrelevant, its annoying how programmers have taken it on themselves to declare this a problem (and the sad action that folllow, twitter memes, conference cancellations, discount tickets for female participates etc..)

2:43 gws: http://cdn.meme.li/i/con66.jpg

2:44 rhg135: ya idc

2:44 nonuby: When was the last time you hear, Im not getting on that Delta flight - 80% of cabin crew are female!

2:44 rhg135: i just say ppl

2:45 not 'guys an girls'

2:45 nonuby: exactly

2:45 mtp: nonuby‘ i'm not getting on the flight because heavier-than-air flying machines are impossible

2:45 holo: conference cancellations?

2:46 oh ok

2:47 nonuby: i think britruby was one of them, then there was the incident at pycon because someone told their friend a joke and someone overheard and got swept away in the equality wars, and several others incidents seem to flash by twitter in past few months

2:48 holo: nonuby, following that logic, did you get into the kinds of studies where >80% of girls are at?

2:49 nonuby: holo, not sure I follow.

2:49 dissipate: holo, what, like psychology?

2:49 holo: you know, language studies … yes psychology

2:51 nonuby: if I want to study psychology I dont gender would have any influence on admission to course

2:51 I dont -> I doubt

2:51 dissipate: psychology... a 1 way ticket to working as a barista in Starbucks

2:51 holo: haha

3:04 wei_: I'm using :java-source-paths and it's compiling the java source every run. Is there a way for leiningen to tell if it hasn't changed?

3:04 example to illustrate the issue: https://github.com/yayitswei/leinwithjava

3:05 nonuby: $latest clj-http

3:05 lazybot: [clj-http "0.7.7"] -- https://clojars.org/clj-http

3:21 Raynes: seancorfield: I imagine it wouldn't be terribly difficult. Just that there are much fewer maven-only Clojure repos than there are non-maven-only.

3:38 seancorfield: you could search maven if clojars has no results :)

3:39 it would be a nice way to show the contrib libs

3:39 i guess i could send you a pull request? what's the repo link?

3:47 dcunit3d: anyone used quil before (clj processing)

3:58 zanes: Trying to get cljs working with core.async. Creating a channel yields an error of the following form. Thoughts? var c_12392 = <my namespace>.chan.call(null);

3:59 john2x: dcunit3d: I tried it once, but just as a learning exercise..

4:37 ambrosebs: is there a function to get the root value of a var?

4:37 zanes: Does lein no longer install to .m2 when you lein install?

4:42 deg: ambrosebs: I don't know of any clean way, but you could pass identity to alter-var-root.

4:48 amalloy: $findfn #'inc inc

4:48 lazybot: [clojure.core/deref clojure.core/var-get]

4:49 amalloy: ambrosebs: lazybot doesn't think such a function exists

4:49 * ucb waves

4:51 ambrosebs: amalloy: again a sick usage of findfn.

4:52 I just wanted the root binding of a single var so I derefed it an def'ed the result.

4:52 (it's a dynamic var)

4:58 wei_: zanes: what's the actual error you're getting

4:59 zanes: wei_: Uncaught TypeError: Cannot call method 'call' of undefined

5:00 wei_: are you using go blocks?

5:00 zanes: Yes.

5:00 wei_: clojurescript doesn't have <!!

5:00 zanes: I'm not using <!!.

5:01 wei_: not sure then, sorry. that was my problem initially, but I've since got it working

5:02 zanes: What version of clojurescript and core.async are you using? Can I see your project.clj?

5:04 Oh wow. Is that just the error you get if you reference an undefined variable?

5:05 ddellacosta: zanes: I see that error a lot when I have a typo and I'm trying to call a function that doesn't exist, or if I am trying to call a var as a function that is not a function, etc.

5:05 zanes: (I didn't :refer 'chan'.)

5:06 ddellacosta: ah, there ya go. :-)

5:06 zanes: That's an incredibly unhelpful error.

5:06 ddellacosta: Thanks anyway.

5:07 ddellacosta: zanes: I find that, in those cases, it is really useful to actually look at the JS that is getting produced.

5:07 zanes: if you look at the JS, you'll see that what you have is an object that is calling the "call" property as a function. And so when it's not working, it's pretty clear--if you look at the JS--what is happening.

5:08 not ideal I suppose, but you know, on the other hand you're able to write lisp code for browser dev so, tradeoffs.

5:09 zanes: Oh, totally. It's just unfortunate.

5:09 jave: I have a funny problem with a mixed java/clojure project

5:10 llasram: Funny haha?

5:10 jave: I have a configuration atom that is loaded from a file. It works well in a dev env, but packaged in a jar, the configuration is mysteriously lost

5:11 more or less this code with some tweaks: https://github.com/jave/btc-coffee/blob/master/src/btc_coffee/core.clj

5:12 so basically i exposed the load-config fn with gen-class to java. Java calls it, but somehow the atom resets

5:13 (i havent pushed the java interop code yet because its too ugly for human eyes)

5:15 llasram: jave: By "expose ... with gen-class", you mean you modify your :gen-class to expose the function as a method?

5:15 jave: as static

5:16 #^{:static true} [loadConfig [String] void ]

5:16 llasram: Ok. FYI, if you control the Java side, you can just use the Java Clojure API to invoke arbitrary Clojure functions

5:16 jave: I also tested this: (GET "/btc-coffee/reload-config" [] (fn [r] (-loadConfig "/tmp/btc-coffee.clj")))

5:17 and if i call loadConfig again, the config doesnt reset

5:17 so its overall pretty odd

5:18 llasram: but then a call gets to be pretty long-winded right?

5:18 llasram: I'm not quite following. Your `load-config` function calls `reset!`, which will, well reset the value of the config atom

5:19 jave: reset! just ignores the previous value, which is what i want

5:19 or did i miss something?

5:19 llasram: jave: Not really (long-winded). Well, no more than any other Java

5:20 Yes... I'm just not following either what you're seeing or expect to see :-)

5:20 zanes: ddellacosta: Hmm. Now it seems to think cljs.core.keyword_identical_QMARK_ is undefined. Ever seen that one?

5:20 ddellacosta: zanes: that is indeed a new one to me.

5:21 what is the clojurescript? if you put it in a refheap I'll take a look

5:21 jave: llasram: I expect @config to hold my configuration data after loadConfig is called. its slurped from a file.

5:22 llasram: jave: "if i call loadConfig again, the config doesnt reset" <- I mean, it calls `reset!`. What does and do you expect to happen

5:22 jave: llasram: okay, i seem to have overloaded the word "reset" confusingly. sorry

5:22 zanes: ddellacosta: refheap, eh? Is gist not cool any more?

5:23 jave: llasram: so, in java I do: btc_coffee.core.loadConfig(btcConf);

5:23 ddellacosta: zanes: ah, gist is fine too. :-) I just know a lot of folks on here use refheap, since it was built by "one of us."

5:23 or, "some of us" I guess

5:23 jave: llasram: afterwards I expect @config to be { blablabla }

5:23 llasram: instead it is {}

5:24 zanes: ddellacosta: https://gist.github.com/d3f1d0ca66dabcab70f4

5:25 llasram: jave: Ah, ok. Hmm. No obvious ideas, I'm afraid. If you're not getting an exception, can only assume everything is wired up right. Path you're passing contains what you think it does?

5:25 jave: llasram: path verified yes

5:25 ddellacosta: zanes: what versions of stuff are you using, the latest?

5:26 zanes: and, any idea which line is the one that makes it barf?

5:26 zanes: ddellacosta: I think I'm using latest core.async (I had to copy it to .m2 manually).

5:26 ddellacosta: Using cljs "0.0-1896".

5:27 ddellacosta: zanes: can you tell me the exact core.async version?

5:27 zanes: ddellacosta: It's not an actual release. Just master.

5:28 ddellacosta: hmm…I might try sticking with a specific version if I were you, just to be on the safe side

5:29 zanes: hold on, I'm going to try your code locally

5:29 sm0ke: one quick weird question... can i kill a (go) or (future) block?

5:30 i want this because the block is waiting on a socket...and i cant set conditional for quitting the block

5:31 ddellacosta: zanes: also, I'm not sure what you're trying to do--why are you putting a value into a channel in one go block, and then taking the value out in the next? that log line is not going to do anything I don't think

5:31 llasram: sm0ke: If you've still got the future object, you can try to `future-cancel` it

5:31 zanes: Why wouldn't that work?

5:31 ddellacosta: zanes: go blocks return a channel

5:32 sm0ke: llasram: what do you mean by try? its not sure shot?

5:33 zanes: ddellacosta: Okay, fine, but it ought to have just logged the channel, no?

5:34 ddellacosta: Rather than dying horribly?

5:34 ddellacosta: zanes: not sure yet, but I suppose not on the dying horribly. :-)

5:34 hold on, setting something up now

5:34 zanes: ddellacosta: Anyway, moving back to the latest stable core.async fixed it.

5:34 ddellacosta: zanes: ah

5:34 zanes: and what does it give you in the console ?

5:35 now I'm curious

5:35 zanes: ddellacosta: The channel.

5:35 ddellacosta: zanes: ah, haha. Well, there ya go--at least it's doing something now.

5:36 zanes: Yeah, I'm happy. I suppose there's an art to diagnosing cljs problems by inspecting the js that I'll have to work on.

5:37 ddellacosta: zanes: I've just done a ton of it 'cause I write a lot of CLJS. It's less an art (in my case at least) than a, "oh, I've seen that ten times, I realize it means X" kinda thing

5:39 zanes: What are you doing with it (CLJS)?

5:41 ddellacosta: zanes: building an entire front-end for our legal software startup.

5:44 zanes: Ooo.

5:49 deg: I'm looking for a simple example of using enlive (or any other lib) to tweak some html. I need to find a node <script src="xyz.js"> and convert it to <script src="abc.js">, but I'm getting lost in the enlive docs.

5:53 ddellacosta: deg: what you want is something like (emit* (at (html-resource "somefile.html") [:script] (set-attr :src "abc.js")))

5:54 deg: but depends on your context. The confusing thing about enlive is how it loads up html, turns it into data structures, and makes it back into html. Well, that's one confusing thing about enlive...

5:54 deg: if you want to give me a specific example in gist/refheap form I'll take a look

5:54 deg: Thanks. I have multiple script nodes in the html. How do I select only the one where src=xyz.js?

5:55 ddellacosta: deg: ah, right…that will require you to do something like [[(html/attr= :src "xyz.js")]]…not sure about the exact syntax

5:56 deg: to be clear, that would replace the above, where I have [:script]

5:56 deg: Hmm, so looks like I'm pretty close. I found attr=, but must not have the syntax right yet. It compiles, but doesn't do anything yet.

5:57 ddellacosta: deg: the thing that is a bit confusing about the matchers is that you need double brackets [[]] (vector in a vector I guess)

5:58 deg: don't know if that's your problem, but it has messed me up in the past.

5:58 deg: That's probably it. I'll play for a few minutes and post a refheap if I'm still stuck. thanks.

6:00 ddellacosta: deg: np, good luck!

6:06 deg: ddellacosta: Yeah, feeling dumb here, but still lost. Here's what I've got: https://www.refheap.com/19201

6:06 ddellacosta: deg: okay, one sec

6:16 deg: as always, the problem is getting stuff in and out of enlive properly

6:16 sorry, one sec, preparing example

6:17 deg: ok

6:19 ddellacosta: for example: (html/at (html/xml-resource (clojure.java.io/resource "public/foo.html")) [[:script (html/attr= :src "js/xyz.js")]] (html/set-attr :src "js/abc.js"))

6:19 deg: now let me try with template

6:20 deg: okay, right--template returns a seq of strings, so you have to do something like this to realize it: (doall ((html/template "public/foo.html" [] [[:script (html/attr= :src "js/xyz.js")]] (html/set-attr :src "js/abc.js"))))

6:21 deg: I think I'm not doing something completely idiomatic there w/r/t enlive, but that will work at least.

6:22 deg: one thing about template, you don't need to pass it the resource, just a string pointer to the file.

6:22 deg: …which by default it will assume is in the resources dir of your project.

6:23 deg: you may want to try using deftemplate instead, as it's meant to return a function that you will call with values--that is more idiomatic compared to what I showed you above.

6:24 deg: (html/deftemplate swap-js "public/foo.html" [] [[:script (html/attr= :src "js/xyz.js")]] (html/set-attr :src "js/abc.js"))

6:24 deg: then you can do (swap-js)

6:25 deg: I should write all of this up so there is a cookbook for enlive. It's really hard to get going with that library, but it's promoted as the one to start with.

6:27 deg: (got called away; back now)

6:28 I switched to template instead of deftemplate because I want an anonymous function.

6:29 ddellacosta: deg: ah, okay, in that case you can just use the template example I gave you I guess.

6:29 deg: My use case is a set of websites that each have dev and production versions. I only want to maintain one copy, so need to inject the dev cruft into each one.

6:30 ddellacosta: deg: ah, gotcha. I did something similar at one point, using exactly this kind of strategy.

6:30 but, why do you want an anon function?

6:31 deg: I don't want to name the template for each page; just want to map over all the sites, generating the dev sites.

6:32 ambrosebs: I've used CinC to customise macroexpansion and I don't ever want to go back http://www.youtube.com/watch?v=g2zts1hW19k

6:32 ddellacosta: deg: sorta understand, but couldn't you just pass in your data to the same template?

6:33 deg: Hmm, yes, you are right I think. I came from a different mindset and haven't yet really grokked that enlive is creating templates rather than doing immediate html conversions.

6:33 arnabdeka: Hi guys. New to clojure. In the REPL (both in nrepl inside emacs, or in lein repl) Trying to use repl-utils:

6:34 (require 'clojure.contrib.repl-utils)

6:34 deg: Basically, enlive is huge overkill for what I was doing, and I'm not fully taking advantage of it. Are there any good enlive tutorials anywhere?

6:34 arnabdeka: And the error I get is: FileNotFoundException Could not locate clojure/contrib/repl_utils__init.class or clojure/contrib/repl_utils.clj on classpath: clojure.lang.RT.load (RT.java:443)

6:34 Does repl-utils not come as part of clojure install (do I need to download separately)?

6:34 ddellacosta: ambrosebs: super cool. Will have to watch it again before I really get it, but definitely seems much simpler using CinC...nice

6:35 ambrosebs: ddellacosta: it's badass

6:35 ddellacosta: deg: did you see David Nolen's? It's got some good stuff: https://github.com/swannodette/enlive-tutorial

6:36 deg: ddellacosta: Yes, looked quickly at that one, but only skimmed looking for my exact case. Didn't find a match in two minutes and moved on. Will read it again.

6:36 Also, wondering now where I first found the code that introduced me to enlive. It gave me the (io/resource ..) stuff. Looks like it was an over-haired example.

6:36 ddellacosta: deg: yeah, there isn't much in the way of "cookbook" kind of resources, unfortunately--and the API docs (are there API docs?) are lacking. I mostly find myself reading the code to figure out how to do stuff.

6:37 chord: ok guys

6:37 deg: Yeah, I know the feeling. Was hoping to avoid it here 'cuz this is a really minor side-task from where I want to be focusing.

6:37 chord: here is what i've learned

6:38 starcraft 2 has a delaunay triangulation for its navigation mesh on which A* followed by a funnel filter is done

6:39 but how does it know a fat thor can't fit through a tiny space

6:39 come on guys someone here has to be an expert on pathfinding

6:39 give me hints

6:40 you guys are still shunning me?

6:40 is anyone going to talk to me?

6:41 ddellacosta: arnabdeka: sorry I'm not sure, but I think a lot of the contrib stuff has gotten replaced with more recent libs. What are you trying to do specifically?

6:41 arnabdeka: @ddellacosta Just trying to use show/source etc. (reading Joy of Clojure)

6:42 ddellacosta: arnabdeka: ooh, you don't need anything for source, that's part of clojure.repl, which is loaded as soon as you start up a repl

6:42 arnabdeka: as far as show, I don't know that--what does it do?

6:44 arnabdeka: According to JoC: "The clojure-contrib library also has a function show in the clojure.contrib.repl-utils namespace that allows for more useful printouts of class members than we show using for."

6:44 ddellacosta: arnabdeka: ah, this is handy: http://dev.clojure.org/plugins/viewsource/viewpagesrc.action?pageId=2687076

6:46 arnabdeka: according to that, "reflect" is what you want: http://clojure.github.io/clojure/clojure.reflect-api.html

6:46 (for show replacement)

6:46 arnabdeka: Ah that explains it. Thanks @ddellacosta - trying to figure reflect out now.

6:46 ddellacosta: arnabdeka: np, best of luck.

6:52 chord: i hate you all

6:52 I put in all this effort trying to understand starcraft 2's path finding

6:52 and you all don't help me

6:52 you all ignore me

6:52 you all hate starcraft

6:59 i hate you all for that

7:22 who here is dumb and not stupid

7:32 sm0ke: hello can i read from a core.async channel with timeout?

7:34 jonasen: sm0ke: yes you can.. take a look at alt! and alts!

7:35 sm0ke: jonasen: aha nice..a timeout block with alts inside..a little bit verbose but

7:36 milanj: hi, having issues with macros and namespaces/symbols

7:36 why is

7:36 if you are in namespace user

7:36 (= 'user/foo 'user/foo) => true

7:36 (= 'foo 'user/foo) => false

7:40 clgv: milanj: because you explicitly specify the symbols and there is no resolving of them

7:41 try (= `foo 'user/foo) in namespace "user"

7:43 milanj: cool, thanks

7:43 I was expecting CL behavior, need to read more about clojure symbols

7:44 clgv: is there a guide on how to add custom components to support seesaws functions?

7:44 ,'user

7:44 clojurebot: user

7:44 clgv: ,`foo

7:44 clojurebot: sandbox/foo

7:44 clgv: ,'foo

7:44 clojurebot: foo

7:48 milanj: clgv, thanks

7:48 deg: ddellacosta: Ok, looking now to move to deftemplate from template. Not 100% clear of the semantics. In yoour swap-js example above, how can I parameterize "public/foo.html" so I can use the same template on multiple pages?

8:02 ddellacosta: deg: sorry, was offline. Ah, so you want to pass in the template itself, huh…yah, that may be the one thing that deftemplate isn't going to help you with, as it defines a function with the html resource loaded already.

8:03 jonasen: sm0ke: more like (alts! (timeout 1000) your-chan), but maybe that's what you meant

8:06 sm0ke: or really (alts! [(timeout 1000) your-chan])

8:10 deg: ddellacosta: Ok, or maybe I'm just asking the wrong question. I want to apply the same transformation to multiple web pages. In that context, are my web pages always the enlive templates, or is there a way to flip the logic?

8:10 ddellacosta: Or, maybe the right question is: what is the correct lib to define a transform to be applied to many web pages?

8:35 dnolen: jonasen: cljsfiddle being able to load anyone else's namespace is pretty sweet!

8:36 jonasen: dnolen: thanks

8:38 dnolen: it also supports datomic style ?as-of=<date> so you can get real permalinks. Though I haven't really exposed that feature in the ui yet

8:38 dnolen: jonasen: whoa

8:38 jonasen: awesome

8:38 jonasen: dnolen: the idea is that if you depend on someone elses code they can't mess with your fiddle even if they tried

8:38 dnolen: jonasen: yes

9:19 oholiab: hello, if I've got a record defined and one of the fields is "optional", which of the following ways is considered better to do: 1) apply the fields from a map so that the optional remains nil or 2) leave the field out and assoc it in afterwards

9:19 or 3) ????

9:19 I'm stuck as to what is the "right" thing to do

9:19 or at least the most sensible

9:21 vijaykiran: oholiab: depends on the domain I guess e.g. is not having the :optional-attr and {:optional-attr nil} mean the same ?

9:24 oholiab: vijaykiran: it's kind of a design question because in my particular case that I'm working on I can solve the problem in another way in that I can make the optional part mandatory and it just makes the whole thing more consistent

9:24 i.e. there's a superfluous bit of information that I can just put in there which still kind of makes sense

9:25 I'm more curious as to whether you'd want to design it so that you effectively had two different, minorly different record types or if you'd just want one where the extra optional field got left as nil and the rest of the program was designed to handle that gracefully

9:27 vijaykiran: oholiab: depends on how you are going to lookup the key e.g. (get {:what nil} :what 0) => nil where as (get {:wat nil} :what 0) => 0

9:28 oholiab: so you might want to drop the key completely - having it as nil valued doesn't make much sense unless the domain differentiates between non-existant vs. nil

9:28 oholiab: IMHO ^ :)

9:29 oholiab: yeah, I suppose you're right

9:29 pyr: w/in2

9:29 oops

9:29 oholiab: no point in pretending that two records that are slightly different are the same

9:53 octe: i have a map where each value is a list that i want to sort, what would be the easiest way to do that?

9:53 keeping the map

9:54 clgv: octe: reduce-kv

9:54 octe: in immutable land you will end up with a new map anyway if you modify each value

9:55 octe: yes, i know, i just didn't express myself well

9:55 thanks :)

9:55 (reduce-kv #(assoc %1 %2 (sort-by :name %3)) {} m))

9:55 that seemed to do the trick

10:00 kral: namaste

10:01 wakeup: hi all

10:02 is there an idomatic way to get my leiningen project's version

10:02 string at compile-time?

10:02 E.g. I want to write a macro that will expand to the current project version string.

10:19 If I do a def in my project.clj, in which namespace will it end up?`

10:24 gfredericks: "Key must be integer" could be extended with "when assoc'ing with a vector"

10:30 jonasen: dnolen: ping

10:32 wakeup: Ok so there is server-socket, is there also client-socket?

10:49 clgv: what do I do wrong when I get an UnsupportedOperationException for proxy?

10:54 borkdude: Wrath of the unmatched delimiter

11:13 seangrov`: That can't be good...

11:13 `cbp: :-o?

11:14 seangrov`: Is irccloud legit? Looks like it's stocking up a lot of nicks in the channel...

11:15 CoconutCrab: the names look randomly generated

11:20 Kruppe: seangrov`: seems to be happening in a lot of channels right now

11:34 wakeup: Ok I need to work with sockets: I need a server that can multiplex a socket and read/write strings.

11:34 and a client that can connect to a network socket and rea/write strings

11:34 I know of server-socket, what is the client counterpart called?

11:43 allenj12: hey guys

11:43 s4muel: o/

11:44 allenj12: has anyone tried the clojure.typed

11:44 just saw it on reddit seems cool

11:46 pretty quite :)

11:47 wakeup: is there a simple rpc library for clojure?

11:47 allenj12: rpc?

11:49 clgv: wakeup: did you try that one? https://github.com/sunng87/slacker

11:50 dgrnbrg: hello clojurians, I have a question about throwing exceptions in futures--how can I set the default exception handler for all clojure futures?

11:50 it seems that the jvm default exception handler doesn't see exceptions in futures

11:51 wakeup: clgv: I looked into it, but it exposes a namespace, I don't want to do that.

11:51 clgv: wakeup: what's the problem with having a dedicated namespace as api?

11:52 wakeup: clgv: It's not functional.

11:52 clgv: wakeup: huh?

11:54 sm0ke: hello..i have this snippent which updates an atom by deleting a key value ##(swap! (atom {:k1 #{:v1}}) update-in [:k1] (fnil disj #{}) :v1)

11:54 lazybot: ⇒ {:k1 #{}}

11:54 clgv: wakeup: I guess you misunderstood the description of the lib

11:54 wakeup: clgv: A namespace implies some global state.

11:55 sm0ke: but the problem is that i want to completely remove key from map if the corresponding set becomes empty

11:55 clgv: wakeup: well, the library only exposes functions in the given namespace to be called in an RPC fashion

11:55 sm0ke: any elegant solution for this?

11:56 wakeup: clgv: what if I want multiple instances of the server?

11:57 which different state

11:57 with*

11:57 clgv: well there you introduce the nonfunctional state yourself ;)

11:58 wakeup: clgv: "the nonfunctional state"

11:58 what is that supposed to mean

11:58 clgv: well that is anarchitectural question. would you have multiple instances of the same api on other plattforms as well?

12:09 yedi: http://pong.clojurecup.com/

12:14 clgv: yedi: nice :D

12:14 yedi: not mine, but yea it's pre cool

12:34 Pupnik_: i get crazy input lag on that

12:34 with firefox/ubuntu

12:35 mdrogalis: tbaldridge: ping

12:35 yedi: Pupnik_: i get some input lag as well

12:35 tbaldridge: mdrogalis: pong

12:35 Pupnik_: oh its multiplayer

12:35 with very simple netcode

12:35 that explains that

12:39 wakeup: what do I have to put in my project.clj to use this: http://richhickey.github.io/clojure-contrib/server-socket-api.html

12:42 nDuff: wakeup: clojure-contrib is long dead.

12:42 wakeup: ...that said, that library is now available as https://github.com/technomancy/server-socket

12:42 stuartsierra: clojurebot: contrib?

12:42 clojurebot: Monolithic clojure.contrib has been split up in favor of smaller, actually-maintained libs. Transition notes here: http://dev.clojure.org/display/community/Where+Did+Clojure.Contrib+Go

12:43 nDuff: wakeup: https://clojars.org/server-socket

12:46 noncom: hi, how do I handle (ns) macro properly with (eval)? the error says can't set root binding of *ns* with (set!) and internet says that I shuld use (binding) to eval in a particular namespace, however, I wonder, how things like evaluation in repl or nrepl handles (ns) calls? does it use (eval) at all?

12:54 clgv: noncom: yeah the "e" in "repl" stands for `eval` ;)

13:02 noncom: clgv: i just wonder how does it manage to work with (ns) macro without problems

13:02 apparently there is something different from the simple clojure function (eval)

13:03 currently i manually parse the inbound form and if it has 'ns as its first member, i do (binding) to the (find-ns) secondmember, which is to be the symbol of the name of the namespace

13:04 clgv: noncom: you have a look at the built-in repl here: https://github.com/clojure/clojure/blob/master/src/clj/clojure/main.clj#L254

13:07 noncom: thanks! im looking at it!

13:09 umm, what is strange, i do not see anything special about it. it simply uses (eval) )_o

13:11 maybe i'm missing somethin...

13:17 clgv: noncom: how do you use eval and what goes wrong?

13:20 glosoli: Anyone using nREPL with Emacs knows if there is some way to jump into Java sources using M-. ?

13:26 technomancy: glosoli: I think you need ritz?

13:28 kendallbuchanan: I just started using Clojurescript, and I feel like I'm missing something simple: How do you use .indexOf with a vector?

13:28 Console returns "Uncaught TypeError: Object [object Object] has no method 'indexOf'".

13:29 justin_smith: kendallbuchanan: with cljs sometimes you need .- instead of .

13:29 jml: is there a thing where I can be always running a server and then very quickly get access to a new repl?

13:29 technomancy: jml: https://github.com/technomancy/grenchman

13:29 jml: technomancy: ta, much obliged.

13:30 noncom: clgv: it says something like "cant set root binding of *ns* with set!"

13:30 hyPiRion: jml: depends on what you mean by server, I guess?

13:30 jml: technomancy: also, achewood. Yes. Very yes.

13:30 noncom: i know what it means, but i wonder how repl work

13:31 how repl works that it has no problems with that

13:31 hyPiRion: grenchman gives you a fast repl for an open leiningen connection, but not a specific server you have implemented yourself

13:31 kendallbuchanan: justin_smith: What does ".-" mean?

13:31 In cljs, am I using "." and ".-", or just one?

13:31 jml: hyPiRion: how so?

13:32 glosoli: technomancy: I did install it, though I am not sure if there is some special way to load it to get navigating into sources working :) Been trying to find something with no luck ;/

13:32 nathanic: kendallbuchanan: .indexOf is part of a java interface, and isn't in JS. and ".-" in clojurescript means to access a member's value rather than to call a method, so it won't help you with indexOf.

13:32 clgv: noncom: when do you get this? I did not encounter the error with (eval '(ns bla.blubb))

13:32 kendallbuchanan: nathanic: Okay, that makes sense.

13:33 justin_smith: kendallbuchanan: .- is for fields

13:33 . is for methods

13:33 in clojurescript only

13:33 kendallbuchanan: So, is there no .indexOf method for vectors in cljs?

13:33 glosoli: technomancy: I should mention I tried jacking in with nrepl-ritz-jack-in, still it failed to open any java source :)

13:34 justin_smith: kendallbuchanan: I don't know, but I know that if indexOf is a field, it will be .-indexOf, if it is a method it would be .indexOf

13:34 the thing may have a different name in js, I don't know

13:34 technomancy: glosoli: oh no idea then; haven't used it. maybe try the ritz mailing list.

13:35 nathanic: kendallbuchanan: I couldn't find one, so I ended up writing a simple one myself. I welcome correction if there is a "real" one though. :-)

13:35 glosoli: technomancy: but you use emacs yes ?

13:35 technomancy: glosoli: yeah, but I don't know Java, so jumping to Java source is not very useful for me

13:36 kendallbuchanan: nathanic: You mind showing me what you made?

13:36 glosoli: technomancy: Hmm I have been told that it's impossible to know Clojure very well without learning java, seems like folks lied to me

13:37 Foxboron: glosoli: partly lies

13:37 technomancy: yes, that's rubbish

13:37 you just need to know the standard library

13:37 glosoli: aah happy to hear that! :)

13:37 Foxboron: glosoli: sooner or later you might have to stumble into some java, but you can go far without ever touching it.

13:37 bbloom_: glosoli: it's worth knowing something about the JVM, but that's no different than learning about python's VM or ruby's MRI or haskell's STG machine

13:38 hiredman: except STG has a way cooler name

13:38 glosoli: lol

13:39 noncom: clgv: well, first i (read-string) the form from a text field, then imply (eval)

13:39 nathanic: kendallbuchanan: https://gist.github.com/nathanic/6781788 no promises of perfection etc. but that's what i was using.

13:39 kendallbuchanan: again, if you find something better, i welcome correction :-)

13:39 noncom: clgv: just this... i found the problem description on stackoverflow.. som someone too had it

13:40 kendallbuchanan: nathanic: Awesome, thank you. I just thought for sure I was missing something basic. Thanks justin_smith, I'll be mindful of methods vs. objects.

13:40 clgv: noncom: try to build a minimal example that still fails

13:40 noncom: are you sure you don't have it with first read-string then eval it? all other forms except for (ns) eval prperly

13:40 ok wait

13:42 clgv: very strange, it work ok from repl or if i ctrl+enter the code from counterclockwise, but it does not work inside the running program

13:44 here is it on SO: http://stackoverflow.com/questions/7684656/clojure-eval-code-in-different-namespace

13:44 clgv: noncom: the accepted answer is correct. I played with it a while ago

13:45 jml: hyPiRion: ah right. I don't particularly care for a specific server at this stage.

13:45 noncom: yes it is and it works. but repls do not have that problem. i doubt they do some kind of binding like that...

13:45 jml: just want to experiment with using clojure in the same way I use ipython atm

13:46 noncom: repls simply evaluate (ns) like if there is no issue

13:46 technomancy: jml: usually people just keep a repl open in emacs or lein repl. tooling around direct quick CLI access is still very immature.

13:46 noncom: gmmm

13:46 hyPiRion: yeah

13:46 noncom: i guess im missing something

13:47 jml: technomancy: hmm, ok. I'm pretty terrible about keeping things open normally

13:47 TimMc: noncom: So why not just use binding?

13:47 jml: but I guess my emacs is a daemon so it shouldn't be too bad.

13:48 technomancy: I mean you can try grenchman, but it hasn't seen a lot of use yet, and it'll take like half an hour to compile the toolchain

13:51 jml: technomancy: heh, ok. I might skip it for now :)

13:51 thanks for the warning

13:51 noncom: TimMc: i do not mind using binding. the problem is that the target ns is not known before evaluation. curerently i read-string and see if the first symbol is 'ns and then i do binding for the second symbol. but i feel this is wrong and fragile

13:51 * jml has wrangled with way too many toolchains this month.

13:58 rasmusto: ,(map #{nil 1 false true} [1 2 3 nil false true])

13:58 clojurebot: (1 nil nil nil false ...)

14:00 hyPiRion: if you compile grenchman though, you'll have heat for the rest of the winter

14:03 sm0ke: hello how do i convert a string to "bytes"

14:03 what is bytes anyways?

14:04 `cbp: sm0ke: .getBytes

14:04 s4muel: an encoded representation of a string

14:04 sm0ke: umm i dont understand... ##(map byte "ss")

14:04 lazybot: java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number

14:05 `cbp: ,(.getBytes "hello")

14:05 clojurebot: #<byte[] [B@1c9e59a>

14:05 `cbp: ,(seq (.getBytes "hello"))

14:05 clojurebot: (104 101 108 108 111)

14:06 `cbp: (map char (.getBytes "hello"))

14:06 sm0ke: `cbp: hmm isnt that a bytes array? actually i am using cljzmq a clojure library for zmq..and i see type hints of ^bytes in source code

14:06 `cbp: ,(map char (.getBytes "hello"))

14:06 clojurebot: (\h \e \l \l \o)

14:06 hyPiRion: ,(map int "hello")

14:06 clojurebot: (104 101 108 108 111)

14:06 hyPiRion: ,(seq "hello")

14:06 clojurebot: (\h \e \l \l \o)

14:07 `cbp: sm0ke: I'm pretty sure ^bytes means byte array

14:07 sm0ke: `cbp: i will take your word on that..thanks

14:08 ,(= bytes (class (.getBytes "ss")))

14:08 clojurebot: false

14:10 llasram: sm0ke: The Clojure compiler has special handling for the symbols "bytes" "ints" etc to treat them as 1-dimensional arrays of the associated primitive type

14:10 when in hinting metadata, that is

14:11 technomancy: because the literal java syntax for arrays is too horrible for words

14:11 llasram: sm0ke: Hinting metadata tags are just symbols. ##(let [x ^WhatIsThisWeirdThing {}] [x (meta x)])

14:11 lazybot: ⇒ [{} nil]

14:12 llasram: Well, didn't quite go as planned

14:12 technomancy: Yeah, that too. Blech

14:12 sm0ke: llasram: thanks that makes sense

14:13 `cbp: I think lazybot shouldve thrown an exception there

14:14 llasram: `cbp: Try it in your REPL

14:14 `cbp: llasram: yeah

14:15 ,(let [x ^WhatIsThisWeirdThing {}] [x (meta x)])

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

14:15 `cbp: superior bot

14:15 llasram: hmm

14:15 sm0ke: does that mean i could also use ##(map byte "ss"); as it feels more idiomatic?

14:15 lazybot: java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number

14:16 `cbp: ##*clojure-version*

14:16 sm0ke: eh i dont get it that runs on my repl just fine

14:16 llasram: sm0ke: No. Even if that worked, it would return a seq of Byte objects

14:16 You need a primitive byte array

14:16 end of story

14:16 sm0ke: ok got it thanks

14:17 `cbp: ##(let [x #^WhatIsThisWeirdThing {}] [x (meta x)])

14:17 lazybot: ⇒ [{} nil]

14:18 TimMc: noncom: Well, that's probably what the REPL does as well. :-P

14:18 llasram: ,(-> '[^WhatNowLazybot? {}] first meta)

14:18 clojurebot: {:tag WhatNowLazybot?}

14:18 llasram: &(-> '[^WhatNowLazybot? {}] first meta)

14:18 lazybot: ⇒ {:tag WhatNowLazybot?}

14:18 llasram: Gee, thanks

14:19 `cbp: you could do (byte-array 5 (map byte "hello")) if it really rustles your jimmies to use java methods

14:20 sm0ke: `cbp: umm..no i would rather stick with .getBytes then

14:25 crap github's down!

14:25 tgoossens: so it has come to this

14:26 geoffeg: sm0ke: part of the US government shut down.

14:26 fbernier: and here comes the HN submission about github being down ... wtf

14:27 mtp: "America is now a global military empire with a nonfunctioning civilian government"

14:27 piranha: is there a better solution for changing all keys of a hashmap than (into {} (map (fn [[k v]] [(some-fn k) v]) data))?

14:27 sm0ke: yea what with america shutting down over obamacare?

14:27 geoffeg: piranha: update-in?

14:27 piranha: geoffeg: hm, not sure I understand your idea... how do I do that?

14:27 technomancy: piranha: not really. it's a bizarre omission from clojure IMO.

14:28 zipmap is arguably slightly cleaner

14:28 piranha: technomancy: that's really annoying :( and slow also... :\

14:28 hmmm, how do I do it with zipmap?

14:29 technomancy: (zipmap (map f (keys m)) (vals m))

14:29 hyPiRion: piranha: (into {} (for [[k v] m] [(f k) v])) works too

14:29 piranha: heh, that's certainly cleaner, but probably slower... I think I should stop trying to optimize that piece of code and just drop to JS directly :\

14:30 hyPiRion: yeah, a bit less code as well, thanks

14:30 technomancy: IIRC there's also keywordize-keys if that's what you need, but it's bizarre why the more general form is omitted

14:30 piranha: nope, I need to transform dashed-keys into camelCase

14:31 technomancy: (with-redefs [keyword camelcase] (keywordize-keys m)) ; wooooooo

14:31 * technomancy hides

14:31 piranha: :)))

14:31 hm, nope, there is no keywordize-keys

14:32 ah!

14:32 clojure.walk

14:33 ,(with-redefs [keyword name] (keywordize-keys {:a "b"}))

14:33 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: keywordize-keys in this context, compiling:(NO_SOURCE_PATH:0:0)>

14:33 piranha: ,(with-redefs [keyword name] (clojure.walk/keywordize-keys {:a "b"}))

14:33 clojurebot: #<ClassNotFoundException java.lang.ClassNotFoundException: clojure.walk>

14:34 piranha: damn

14:34 anyway, it's not working )

14:34 since it's checks inside that argument is a string

14:35 technomancy: ahahahaa yeah don't do that =P

14:35 rasmusto: piranha: you could also redef string? to keyword? :P

14:35 piranha: :DDDDDDD

14:35 rasmusto: (don't do that)

14:35 piranha: damn now I'm really laughing

14:37 sm0ke: How do i convert a clojure map to bytes? map conly contains strings and keywords?

14:38 and how do i convert it back from bytes?

14:39 technomancy: sm0ke: you'll have to be more specific

14:39 TimMc: sm0ke: Your question is ill-specified; there are many possible meanings of what you just said.

14:39 scriptor: hi guys

14:39 TimMc: Are you trying to serialize a map to disk?

14:39 scriptor: can someone point me to what the loop* in https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L4156 refers to?

14:39 technomancy: scriptor: I think it's hard-coded into the compiler

14:39 sm0ke: yes i want to serialize a map to byte array and write to a zmq socket

14:40 and want to construct it back too

14:40 scriptor: ah, makes sense

14:40 time to go digging

14:40 sm0ke: does that makes sense?

14:40 llasram: sm0ke: Yes. And I would like to formally welcome you to the serialization rabbit hole :-)

14:41 sm0ke: If you don't have any particular requirements for your project, the flat-out easiest thing to do is use EDN

14:41 sm0ke: llasram: aha edn..yes i am using it for config already

14:41 let me dig around

14:47 hey guys does this makes sense ##(clojure.edn/read-string (String. (.getBytes (pr-str {:a "sss" :b "cc"})))); for ser/de ?

14:47 lazybot: java.lang.ClassNotFoundException: clojure.edn

14:48 sm0ke: feel very hacky

14:48 TimMc: Why .getBytes?

14:48 And if you use that, you'll want to specify UTF-8.

14:48 sm0ke: up to .getByte is the ser...outside form is deser

14:49 llasram: TimMc: They're pushing data over 0mq IIRC

14:50 sm0ke: that is weird way to serialize i feel

14:50 technomancy: sm0ke: there are more efficient ways to do it, but not simpler ways

14:50 llasram: sm0ke: The only "hacky" part is the bytes to/from transition. EDN is a character-wise format, so you've got an extra step.

14:50 (inc technomancy)

14:50 lazybot: ⇒ 79

14:51 llasram: sm0ke: If you want something directly byte-oriented, you have a ton of options. Here's mine: https://github.com/damballa/abracad

14:52 sm0ke: llasram: hey isnt that for avro? i am using that already in one project

14:52 llasram: Yes

14:52 If you're already using Avro, then might actually be a good fit

14:53 sm0ke: no i am not using avro here..its not a very schema oriented thingy

14:53 i just want some fool proof serialization of simple clojure data

14:54 llasram: It's not well tested, but abracad actually will generate schemas for you which will serialize all the basic Clojure data structures

14:54 In the abracad readme, jump down to "EDN-in-Avro"

15:01 sm0ke: well it needs a schema..i think its too qualified for my purpose

15:01 i saw this nippy library

15:02 dont know if it fits

15:11 weavejester: I've had good experiences with Nippy.

15:13 sm0ke: yes there stress-data test is pretty comprehensive..more than good enough for my purpose

15:13 noncom: weavejester: if you have time, could you tell a little about your experience on combining jmonkeyengine Controls with clojure paradigm?

15:14 sm0ke: cool jmonkey on clojure!

15:14 weavejester: noncom: Controls?

15:14 sm0ke: is it on github?

15:14 noncom: yeah, you know, jmonkey prescribes updates to all the entities in the world by linking instances of Control class to them..

15:15 drorbemet: Hi, does someone of you know if there is a clojure library for parsing org-mode files?

15:15 weavejester: sm0ke: I might release some code on my implementation after EuroClojure. I've been holding off, however, as it's still unfinished.

15:15 noncom: these cotrols have state and they lurk into the main apps update loop

15:15 jtoy: I have a weird problem, I can run this code from the repl fine and it works, when I run it from cron though I get a null pointer exception, can anyone point me to waht I am doing wrong: ((resolve (read-string (:code experiment) )) user-id (last groups)))

15:15 sm0ke: weavejester: awesome

15:15 weavejester: noncom: Oh right! Yes, I know them, but I don't make use of those at all.

15:15 There's really little point.

15:16 jtoy: when I run from cron I run it as so: lein trampoline run -m air.campaigns/jobs

15:16 noncom: sm0ke: some people, including me, have worked on using jme in clojure.. but nothing definite as of yet, i guess.. you can try too!

15:16 jtoy: what that code does is just pull out a string from a database and call it with some arguments

15:16 noncom: i mean, it is definitely viable, but no production-ready thing is there yet

15:17 weavejester: so you just plug into the update loop directy?

15:17 weavejester: noncom: Yep

15:17 noncom: Each update, I sync the nodes with a Clojure data structure representing the scene.

15:18 noncom: o i see

15:18 weavejester: I'm actually still not completely sold on jME. It provides a lot of code I don't need to write, but is ultimately written for a different paradigm.

15:19 noncom: true...

15:19 callen: JME?

15:19 noncom: you think plain lwjgl might be the way?

15:19 callen: oh, jmonkeyengine

15:20 jtoy: I think it must have to do with something not loading properly, but i have no idea how to debug this

15:21 weavejester: noncom: Yes, possibly. It would be more work, but it would be easier to fit it in to work with Clojure.

15:21 jMonkey is a pain when you bump up against its structure.

15:22 Which isn't really a criticism of the library, I'm just using it in a weird way

15:22 It's a very OOP framework, so there's some translation involved.

15:24 jtoy: Does it depend on a specific current directory?

15:24 jtoy: weavejester: no, but i dont really understand that question

15:25 noncom: yeah, it is from a different paradigm... in my approach, im trying to find a proper synthesis of the two paradigms, when neither has to give up, so i have jme-centered part, which is oop-ish and such and clojure-centered part which is clojuric (at least as much as i can), and they are very loosesly coupled..

15:25 weavejester: Another pain with jME is there aren't any up-to-date Maven artifacts. I had to adapt a third-party project and install locally to get it to work.

15:26 jtoy: Well, maybe cron is running it with a different current directory?

15:26 noncom: oh i do not have problems with installation now. i simply put it in leins resources path, and for jar distribution i use nativot.

15:26 mtp: cron runs things with a wildly different PATH

15:26 and yes, it defaults to your $HOME

15:26 jtoy: weavejester: cron code loads clojure runs code,the problem started when I added this line: ((resolve (read-string (:code experiment) )) user-id (last groups)))

15:27 noncom: good to hear your opinions, wanted to ask you for some time already

15:27 weavejester: noncom: I wanted to use Maven packages and do it properly. There are some Maven packages in Sonotype, but they're out of date. There's also a jme3-maven-helper project, but it's also out of date, so I updated it: https://github.com/weavejester/jme3-maven-helper

15:28 jtoy: if i use resolve, does it matter if the string I read in is myns/func vs func ? I am currently using func

15:28 noncom: wow, that is cool! so you keep it up-to-date?

15:28 `cbp: jtoy: yes it matters, qualify it properly

15:29 weavejester: noncom: The install.sh script will grab the latest jME 3.0final branch from SVN, then packages it up as a maven package and installs it locally as [com.jme3/jmonkeyengine "3.0.0-SNAPSHOT"]

15:29 noncom: cool!

15:30 weavejester: I had some issues with running older versions as standalone due to a bug in LWJGL on Mac OSX.

15:31 LWJGL 2.9.0 looks like it's a lot better for OSX than 2.8.x

15:31 noncom: hmm, i mainly window so no know that of.. but heard of

15:31 `cbp: wat

15:32 weavejester: noncom: My approach to jME3 is to brute force the node system. So in my system whenever a data structure changes, I destroy the associated node, and recreate it with the new data.

15:33 Which sounds horribly slow

15:33 But is actually pretty performant.

15:33 noncom: haha

15:33 well, i guess it depends on what you have in the scene graph

15:33 TimMc: `cbp: "Hmm, I mainly use Microsoft Windows, so I'm not familiar with it... but I've heard of it."

15:33 That's my best guess.

15:34 `cbp: o.o

15:34 noncom: TimMc: that's true!

15:35 weavejester: noncom: Yeah. It turns out that it's not very expensive to add or remove objects from the scene graph. Basically just a hash change and the cost of creating a new object.

15:35 noncom: With caching, it's sufficiently quick for a lot of tasks.

15:35 But eventually I suspect I might move to LWJGL directly.

15:37 Essentially I just have a reference to an immutable data structure that describes the scene. Camera, objects, background, window size, etc.

15:37 I'm using Reagi to make the scene changable.

15:38 Jarda: has someone used https://github.com/pelle/clauth

15:38 I'm having this issue: https://github.com/pelle/clauth/issues/11

15:39 noncom: that is definitely very interesting. sounds like partly unprobed ground. havent seen it done for a real 3d thing

15:39 nice to see reagi growing. last time i was visiting it was somehting like 0.3.0..!

15:42 so you get the better picture of what reagi will be? i remember you were still researching it back then

15:52 jtoy: `cbp: that fixed it, thanks

15:53 `cbp: jtoy: np

16:01 edw: My .emacs is so filled with ac-nrepl cruft; does anyone have a good example of a minimal, clean ac-tricked-out nrepl .emacs file?

16:03 `cbp: my .emacs is (or used to be before i switched to emacs live) just a bunch of load-files :P

16:05 edw: I may still have some stuff in mine from emacs 19.

16:05 callen: edw: I have a tricked out Emacs environment, but ac-nrepl is too fookin' slow for me mate.

16:06 edw: callen: I hear you. It's been getting faster with newer builds of Emacs 24. I used to be mollasses-slow.

16:07 dgrnbrg: is there a way to catch uncaught exceptions thrown in futures?

16:08 callen: edw: I've tried it in Emacs 24. Still unacceptably slow :P

16:08 dgrnbrg: deref future, catch the exception.

16:08 dgrnbrg: boom.

16:08 alternately, handle the exception in the code the future is executing.

16:09 edw: callen: Now that you mention it, it's still too slow on my '10 MacBook Air. Only on my MBP '12 Retina is it tolerable.

16:09 dgrnbrg_: callen: I can't do that, because the futures hold async computations

16:09 callen: edw: I have a '13 Retina MBP and it's still irritating as fuck.

16:09 dgrnbrg_: there's no point that I can safely deref them

16:10 callen: dgrnbrg_: if you cannot dereference your futures then they are not futures and you should not be using futures.

16:10 dgrnbrg_: future is not a dispatch mechanism, it's a retrieval mechanism.

16:10 either fire off a raw thread or write real async code.

16:10 all they win you if you're not @'ing is use of the thread pool

16:14 dgrnbrg_: callen: Where does the future swallow the exception?

16:14 mpenet: dgrnbrg_: lamina has facilities to handle errors in situations like this

16:15 dgrnbrg_: see run-pipeline and its error-handler option, it will do for "nested" async scenarios

16:15 callen: dgrnbrg_: future doesn't swallow the exception.

16:15 dgrnbrg_: it simply waits for you to deref to allow it to continue to bubble.

16:15 dgrnbrg_: I use futures in several places in my code where they should normally behave correctly, but I want the exceptions to reach the global uncaughtexceptionhandler

16:17 callen: I don't see anywhere that future catches the exception and holds it for late

16:17 hold it for later retrieval from deref

16:17 callen: dgrnbrg_: stop using futures for this.

16:17 dgrnbrg_: use agents or an actual async library.

16:18 dgrnbrg_: callen: regardless of what i'm using, I want to understand where the exceptions are being caught

16:19 stuartsierra: dgrnbrg_: Clojure's future catches any exception thrown in its body and re-throws it when you deref the future. Just like java.util.concurrent.Future

16:20 callen: dgrnbrg_: https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L6311-L6336

16:21 dgrnbrg_: stuartsierra: is it using Java's future implementation to catch and retain the exception?

16:21 callen: the answer is in the code I just linked.

16:21 stuartsierra: how did AOT bite you earlier?

16:21 stuartsierra: dgrnbrg_: yes

16:22 dgrnbrg_: stuartsierra: what's the right way to use a thread pool in which exceptions should bubble to a global exception handler?

16:22 is there such a way?

16:23 stuartsierra: dgrnbrg_: Java Executors allow you to specify a thread factory, where you can set an uncaught exception handler on the thread.

16:23 dgrnbrg_: stuartsierra: but from my interpretation of the code, it's the fact that I'm running by `submit`ing to an Executor, and that usage of `submit` will hold the exception in the resultant future

16:24 and that is irrespective of an uncaughtExceptionHandler I specify

16:24 stuartsierra: dgrnbrg_: oh, yes

16:24 podviaznikov: hi, does anyone know library for collecting code quality metrics for clojure projects?

16:24 stuartsierra: that's right

16:24 dgrnbrg_: I'm trying to figure out a technique to catch exceptions in futures that I'm not properly checking the result of

16:24 stuartsierra: Catch them. :)

16:24 dgrnbrg_: ugh

16:25 stuartsierra: "If you throw an exception in the woods, …"

16:25 dgrnbrg_: I just like the idea of not needing to deal with that directly

16:25 particularly for the parts of the code that don't have any instrumentation like that in them

16:30 ztellman: dgrnbrg_ so wrap each function and submit the errors to queue

16:30 or just log them, if they're that unimportant

16:48 akurilin: For Korma, would I use transform/prepare to change from dashes to underscores and vice-versa in column names?

16:49 And on a related note, is there a way to tell Korma to transform joda time to sql time automatically ?

16:50 bitemyapp: rkneufeld: I can't do the Korma chapter with lein-try, it breaks things.

16:51 rkneufeld: c3p0 can't find the JDBC driver if I use lein-try.

16:51 I don't really have time for a fix, so I'm writing the instructions with a fresh demo project.

16:52 akurilin: you would, @ transform/prepare.

16:53 akurilin: bitemyapp, so loop through all the values and check for joda time type?

16:53 bitemyapp: akurilin: sure

16:53 akurilin: bitemyapp, k thx.

16:54 bitemyapp, since you're here, any idea if I can do a dashes -> underscores transformation for defentity, or is my only option at this point to use underscores directly in clojure?

16:54 for a table like foo_bar in PG, and foo-bar in clj.

16:55 bitemyapp: do whatcha want.

16:55 you can transform 'em back and forth. or not.

16:56 akurilin: bitemyapp, what I'm trying to figure out is if I can do this transform for the table name itself, not just the results. I could technically just override defentity to do that.

16:57 bitemyapp: gf3: <3

16:57 akurilin: oh oh oh, table name.

16:57 akurilin: you can alias the thing.

16:57 gf3: bitemyapp: Ahaha—ACCEPTABLE

16:58 bitemyapp: I'm offering bottles of whiskey to anybody willing to give their library a better name.

16:58 arrdem: bitemyapp: the "better" criteria being...

16:58 bitemyapp: Fuck, this deserves a tumblr wall-of-shame/open offer blog.

16:58 gf3: bitemyapp: My libraries are already perfectly named

16:58 bitemyapp: arrdem: no clj-* or *jure in the name.

16:58 gf3: you're fine, some idiots actually name their shit stuff like clj-dstore

16:59 akurilin: bitemyapp, could you be more specific about what you mean by alias? Haven't gotten my coffee yet.

16:59 arrdem: bitemyapp: eh clj-http and soforth could be better but I'm not bothered by it so long as there isn't a name colision.

16:59 gf3: bitemyapp: clj-jure

16:59 arrdem: (inc gf3)

16:59 lazybot: ⇒ 2

17:00 bitemyapp: arrdem: dakrone gets a reprieve .

17:00 everybody else can DIAF

17:00 akurilin: http://sqlkorma.com/docs#entities

17:00 (defentity muhhhh-table (pk :id) (table :muhhhh_table))

17:01 arrdem: I guess we can't all be technomancy.

17:01 arrdem: bitemyapp: a fate to which I aspire nonetheless

17:01 akurilin: bitemyapp, oh I found it, brilliant

17:02 thx

17:02 brb

17:02 bitemyapp: arrdem: suck-up.

17:02 arrdem: bitemyapp: I'm a nub. what do you want from me.

17:03 bitemyapp: also way to change your IRC name. now I have to go add more aliases to my cc project.

17:03 rhg135: incase anybody finds it useful, here's a date macro i wrote

17:04 https://www.refheap.com/19227

17:04 hmm, the staticness might be a problem

17:04 * rhg135 goes to revise it

17:04 bitemyapp: rhg135: why is this a macro?

17:05 arrdem: bitemyapp: because macros are awesome!

17:05 bitemyapp: that's not a reason.

17:05 AimHere: Maybe his aot compilation is going to be VERY aot

17:05 bitemyapp: lol @ AimHere

17:07 gf3: Raynes: I just realised that I put your email in me README like 2 years ago

17:07 Raynes: Whoops → https://github.com/gf3/clavatar-js

17:08 gyim: Hi, a newbie question: what is the idiomatic way to run long-running asynchronous tasks, but with a bounded input queue?

17:08 I'm writing an app that sends commands to a bunch of servers. The simplest solution is to create an agent per server, and start the command sender function with `send-off`. But if a server slows down, I want to detect it and prevent sending more tasks to it.

17:09 I guess I could create a bunch of refs to store the number of outgoing messages, etc, but I wonder if there is an easier solution

17:10 arrdem: gyim: what's your structure? you have a worker thread for every client with a shared input queue?

17:11 seangrov`: Hrm, but when will clojure have its *rails*?

17:11 I see no future for clojure without it

17:11 bitemyapp: seangrov`: this may be the first time I've seen you troll in IRC.

17:11 technomancy: seangrov`: right after it gets whitespace-sensitive syntax, duh

17:11 seangrov`: Heh, sorry, porting rails -> clojure right now

17:11 technomancy: hah!

17:11 gyim: arrdem: i was thinking about a simple blocking function per task (connect to server, send command, close connection)

17:12 gf3: technomancy, seangrov`: Can you give me an ETA

17:12 tbaldridge: seangrov`: rails, really?

17:12 gf3: technomancy, seangrov`: I have deadlines and clients

17:12 THX

17:12 tbaldridge: (dec seangrov`)

17:12 lazybot: ⇒ 0

17:12 tbaldridge: :-P

17:12 seangrov`: I guess it can't go negative

17:12 gyim: arrdem: and allocate a custom ExecutorService for all of these tasks to limit the number of parallel tasks

17:13 seangrov`: tbaldridge: I did say I was porting from rail to clojure right now :P

17:13 tbaldridge: seangrov`: ah I thought you were saying that you were porting rails to clojure.

17:13 seangrov`: A considerably reduction in LOC, and it's much more explicit to boot

17:13 rhg135: bitemyapp: to not quote the fieldnames when calling

17:13 bitemyapp: Not sure if serious.

17:16 Raynes: gf3: Whoa, you made a clojurescript port of clavatar and that was 2 years ago? How long have I been doing this shit?

17:16 gf3: Raynes: Too damn long

17:16 Raynes: gf3: You just made a teenager feel old. Congratulations.

17:16 gf3: Raynes: And yes we've know each other for basically decades now

17:16 Raynes: Basically

17:17 Anyways, the email address thing is fine. It's in more easily accessible places if a bot wanted it bad enough.

17:17 gf3: The bots want it sooo bad

17:17 Raynes: For example: proudly displayed on my Github page.

17:18 gf3: But they do some janky stuff, non?

17:18 Yeah

17:18 <a class="email js-obfuscate-email" data-email="%67%69%61%6e%6e%69%40%72%75%6e%6c%65%76%65%6c%36%2e%6f%72%67" href="mailto:{email}">{email}</a>

17:23 gyim: [agents] so basically my question is: if i want to run a lot of IO in the background, how do i prevent (a) 10000 commands to pile up, or (b) to have 10000 background threads running simultaneously

17:25 (i mean when things go wrong, for example the network slows down and all of the connections block for a minute)

17:26 bitemyapp: gyim: async code.

17:27 Jarda: hey struggling with syntax

17:27 mtp: start struggling with semantics instead

17:27 gyim: i think the same applies here if i use agents to run async code or netty to connect to servers. I still have to maintain some kind of command queue

17:27 Jarda: with hickup, how can I have a function that returns <p>Foo</p><p>Bar</p>

17:28 bitemyapp: Jarda: hiccup

17:28 Jarda: I tried (defn foobar [] [:p "Foo"] [:p "Bar"]) but that obviously just return <p>Bar</p>

17:28 bitemyapp: yeah sorry

17:28 tbaldridge: gyim: core.async with a limited number of processing thread blocks.

17:28 gyim: this is exactly what core.async is for.

17:28 hyPiRion: Jarda: (list [:p "Foo"] [:p "Bar"])

17:30 Jarda: hyPiRion: oh thanks of course

17:31 hyPiRion: Jarda: just be aware that [[:p "Foo"] [:p "Bar"]] is not the same as (list [:p "Foo"] [:p "Bar"]) is not the same thing

17:31 then you should be fine

17:31 Jarda: hyPiRion: yeah with hiccup you can't even write [[...]]

17:31 gyim: tbalridge: i was thinking about core.async, especially because it has a dropping queue and such. But I should not use IO there, right? So I should probably have a "frontend" go block that accepts commands via channels, and spawns worker threads for IO

17:31 Jarda: because it will complain about [...] not being a valid element name

17:31 I already tried that

17:32 hyPiRion: heh, yeah

17:33 tbaldridge: gyim: just do IO inside of a "thread" block instead of a "go" block. Thread blocks give you dedicated threads. So start threads at the start of your program and have them pull from a channel, then you can put! dozens on requests into that channel and the threads can process them as neeed.

17:35 ToBeReplaced: tbaldridge: do you find yourself using futures in conjunction with core.async often?

17:35 bsavoy: I'm having trouble finding the appropriate resources to help me understand what's happening in the following code. Why can't a symbol from the same namespace be resolved? Is there a completely different way of doing this? https://gist.github.com/anonymous/6785059

17:35 tbaldridge: ToBeReplaced: thread = future, future returns a promise, thread returns a channel. So no.

17:35 bsavoy: Any help much appreciated

17:36 ToBeReplaced: tbaldridge: i do something like (assoc system (future (loop [] (>!! chan work) (recur))))

17:37 the future is helpful so that i can query for errors instead of needing to write error handling into the hcannel work

17:37 gyim: tbaldridge: great, thanks! I thought that i could read from a channel only from go blocks. Seems like I should read more about it then.

17:39 stuartsierra: bsavoy: `eval` tries to resolve everything in the current namespace, not the namespace containing the function in which you called `eval`.

17:39 ToBeReplaced: i guess i could/should just create error handling `ethread` and the like to wrap up errors and put them on the channel

17:41 bsavoy: stuartsierra: But then this eval is declared in ns2, and it's eval'ing (bang "foo") which is declared in that one namespace. How is that?

17:41 logic_prog: right now, when doing clojurescript + clojure dev, I need to, from the same directoyr, run both (1) "lein cljsbuild auto" (for the cljs auto compilation) and (2) "lein repl' (so emacs can connect via nrepl). I never read the output of window (2), though I offen looka t window (1) for errors. Is there some way, so that I need only run one command, i.e. "lein cljsbuiod auto for cljs + nrepl" ?

17:41 bsavoy: Something to do with lazy-sequencing?

17:41 logic_prog: i'd like a single lein comand to both start cljs auto compilation and provide a nrepl for me to connect to

17:42 ToBeReplaced: logic_prog: you could use an alias, see :aliases on leiningen sample project

17:43 stuartsierra: bsavoy: When you run your code, the current namespace is either `tests.ns1` or `user`. That's the namespace `eval` is using to search for `bang`.

17:43 logic_prog: alias lets me run two plugins at once?

17:43 ToBeReplaced: how does alias help with using two plugins at once

17:43 bsavoy: stuartsierra: Ah thanks, that makes sense.

17:44 ToBeReplaced: logic_prog: i think "lein do cljsbuild-auto, repl" is the command you want, or something close to that... then you could alias to it

17:44 logic_prog: I don't even know what the "non-aliased" version is

17:45 rhg135: why must java be so complex? https://www.refheap.com/19227 and still wrong output

17:45 today isn't sept. 1 right

17:46 ToBeReplaced: logic_prog: `lein do cljsbuild auto, repl`

17:46 hyPiRion: rhg135: use clj-time?

17:46 logic_prog: tried it

17:46 emacs can't connect

17:46 nrepl does not appear to be started

17:46 i'm sure I'm doing something stupid

17:46 rhg135: thank goodness

17:46 but idk i just want to get a timestamp

17:47 ToBeReplaced: logic_prog: that's because auto never returns :)

17:47 logic_prog: I think it might be easiest

17:47 if I just embed a nrepl server :-)

17:48 rhg135: i don't want to shell out though, i could just call date

17:48 from un ix

17:50 logic_prog: okay, embed success :-)

18:11 melipone: hello! I want to update several keys in a map. Is there a better way of doing that than (assoc (assoc mymap :firstkey 0) :secondkey 1)?

18:11 ToBeReplaced: melipone: (assoc mymap :firstkey 0 :secondkey 1)

18:12 melipone: ToBeReplaced: you can do that? thanks!

18:12 AimHere: Also consider merge and merge-with depending on what you're trying to do

18:19 recursor94: I know I could probably find the answer to this online, but why doesn't clojure contrib officially exist anymore?

18:20 hiredman: it does, it just isn't a single entity anymore

18:20 recursor94: but why?

18:20 nDuff: recursor94: because the old way was an almost-unmaintained mess.

18:20 s/was/resulted in/

18:21 hiredman: because it is frustrating to have a dependency management system and not be able to pull out just the bits you want

18:21 recursor94: are most of those libraries still well maintained?

18:22 arohner: many. some were abandoned

18:22 hiredman: any that exist are mantained in some sense, anything that no one was interested in taking care of died with the single artifact contrib

18:23 which was the other problem, the single contrib repo was full of stuff that had been "contributed" but then ignored

18:24 recursor94: Does anybody have an opinion on what the best free learning resource is for clojure?

18:25 bitemyapp: recursor94: clojure.contrib was a bad idea. Free market of libraries ftw.

18:25 recursor94: I see.

18:25 `cbp: recursor94: github :P

18:25 bitemyapp: recursor94: github

18:25 recursor94: Most of what's on github is library code though. Some of it is difficult to decipher.

18:25 hiredman: recursor94: how I learned is reading the docs on clojure.org and writing clojure code, and I think that has served me pretty well

18:26 recursor94: hiredman: Were you a lisper before clojure?

18:27 err, a lisp programmer?

18:27 `cbp: recursor94: is clojure your first language?

18:27 recursor94: No.

18:27 akurilin: When you guys are developing ring apps, do you generally nrepl straight into the running server instance or do you use a separate repl? I've always spun a spun a separate lein repl, but I feel like that's unnecessary if you already have a server instance running.

18:27 hiredman: no, I had seen the sicp videos and tried to write a lisp interpreter in ruby (based on just the videos) but I had not used lisp in anger before

18:27 bitemyapp: akurilin: porque no los dos?

18:28 `cbp: recursor94: then you have some domain knowledge, just look up a library on that domain imho

18:28 akurilin: bitemyapp, why have 2 if 1 is enough?

18:28 bitemyapp: akurilin: it depends on what I'm doing. I generally have a clean-room non-server nrepl and a non-server test nrepl. I'll add a third server with embedded nrepl if I'm doing deep-magick.

18:28 akurilin: because I slather myself with repls prodigally.

18:29 akurilin: bitemyapp, what's the difference between a clean-room and a test nrepl?

18:29 hiredman: lots of people will point you at tooling "install emacs, install lein, etc etc" but you can write clojure with notepad and java -jar clojure.jar

18:29 technomancy: akurilin: a separate repl makes no sense

18:29 hiredman: emacs and lein will just smooth out rough edges

18:29 bitemyapp: akurilin: main nrepl and test nrepl are both clean-room

18:29 the non-clean-room is the server nrepl

18:30 technomancy: only because you don't work like I do.

18:31 ucb: bitemyapp: callen?

18:31 technomancy: a separate process to do a sanity check full test run before merging/deploying makes lots of sense though

18:31 but the whole point of "clean room" is to not allow new definitions, so interactivity isn't as necessary

18:31 bitemyapp: technomancy: I have c.t.n.r/refresh and (run-all-tests) in my test nrepl ready for the up-arrow.

18:32 I do it for speed

18:32 no waiting for lein/grench test start time

18:32 up-arrow -> return -> bang answers

18:32 "guard rail programming" (bang bang bang)

18:32 technomancy: you can still get stale state left around in memory

18:32 bitemyapp: I accept this possibility and choose to pretend it won't happen to me.

18:33 technomancy: hokay

18:34 indigo: Heh, every day I program in PHP I think "I wish I could do this in a REPL"

18:34 technomancy: but if you can get a running repl to match what's on disk with refresh, can't you do that on the primary repl process?

18:34 bitemyapp: not to try to accommodate PHP "programming", but I'm pretty sure there are PHP REPL'ish things.

18:34 scriptor: indigo: there's one or two repl implementations for the php, aren't there?

18:35 indigo: scriptor & bitemyapp: There are, but they're not really there

18:35 recursor94: hiredman: Was that tooling comment directed towards me?

18:35 hiredman: recursor94: sure, or whoever

18:35 scriptor: indigo: are we talking existentialism now?

18:36 `cbp: sometimes you're just forced to write with outdated php that won't be able to use any 3rd party libraries

18:36 recursor94: oh okay. already have emacs and lein setup. I just need to learn the skill now.

18:36 indigo: scriptor: Just not as easy to use or complete as Clojure's :P

18:37 Then again, PHP doesn't really lend itself to REPL-based programming

18:38 Heh, when I showed my coworker a PHP repl I found he told me it was too bloated and that he could write one in five lines

18:38 scriptor: heh

18:39 I bet that's going to include autocomplete and taking in statements over multiple lines, of course

18:39 indigo: And not crashing the entire REPL in case PHP has a fatal error

18:40 mtp: php often embodies a fatal error

18:40 indigo: Lmao

18:40 dobry-den: recursor94: clojure-contrib doesnt really come up for me in google searches, so if youre exposed to it, you may be following old tutorials. anything i've wanted from contrib has a maintained surrogate.

18:40 `cbp: lisp repl takes 4 symbols :-D

18:40 indigo: `cbp: Yeah, it's fantastic

18:46 recursor94: Is there a clojure irc bot library?

18:47 I know of clojure bot.

18:47 But I'm wondering if there are any true libraries

18:48 scriptor: try this https://github.com/flatland/irclj

18:48 logic_prog: is there a way to define a *.clj files that is used from both clj and cljs? (it's a set of helper functions / macros that are portable)

18:48 scriptor: (for future reference, I found it on http://www.clojure-toolbox.com/)

18:48 recursor94: Thank you scriptor.

18:49 nDuff: logic_prog: there are a few approaches; nothing I'd describe as _good_.

18:49 logic_prog: ...see for instance https://github.com/lynaghk/cljx

18:49 logic_prog: how about a symbolic link? :-D

18:49 Jarda: hey guys, any feedback on https://gist.github.com/nnarhinen/6786086

18:49 gfredericks: I love how derive is side-effecting in the 2-arg version but not the 3-arg version.

18:49 logic_prog: lol

18:49 the problem to having two file extensions, is to invent a third file extension

18:50 nDuff: logic_prog: ...see also https://github.com/emezeske/lein-cljsbuild/blob/0.3.3/doc/CROSSOVERS.md

18:50 logic_prog: nDuff: is your nick based on duff's device?

18:50 nDuff: Nope.

18:50 * nDuff 's last name is Duffy.

18:50 mtp: HOW ABOUT DUFF BEER

18:50 oh

18:50 logic_prog: you know what?

18:50 the shared code is very small

18:50 I will keep two copies

18:50 Jarda: have I understood core.async channels right..

18:51 logic_prog: I'm suddenly very happy wtih slight code dup[lication

19:06 CommandBot: Greetings! Send me a PM and I'll echo it back to you. If it contains the word 'die', I'll die as a bonus!

19:07 akurilin: Sometimes I'm deeply confused by this channel.

19:07 Between the bots and the starcraft guy, I just don't know.

19:08 TEttinger: &(apply str (map char (repeat 80 7)))

19:08 lazybot: ⇒ ""

19:08 hyPiRion: akurilin: those things have happened very recently only, though

19:08 TEttinger: hm which is \07

19:09 akurilin: hyPiRion, is this Clojure hitting critical mass ?

19:09 TEttinger: ,(apply str (map char (repeat 10 11)) "this char should really be stripped out")

19:09 clojurebot: "clojure.lang.LazySeq@42f449a1this char should really be stripped out"

19:10 bitemyapp: akurilin: we've had more people in the IRC channel than Scala for awhile.

19:10 TEttinger: ,(apply str "this char should really be stripped out" (map char (repeat 10 11)))

19:10 clojurebot: "this char should really be stripped out "

19:10 TEttinger: if that displayed across multiple lines, congratulations, you have a nice client

19:11 hyPiRion: akurilin: gaining more traction, probably. Not sure if it's critical mass, but we're getting closer to it at least?

19:11 bitemyapp: if seangrove is to be believed, we need Rails first.

19:12 logic_prog: is clojure's cond guaranteed to be sequential?

19:12 (in the order the conditionals appear)

19:12 technomancy: yes

19:12 bitemyapp: logic_prog: http://clojure.github.io/clojure/clojure.core-api.html#clojure.core/cond

19:13 hyPiRion: according to the (doc cond), eys

19:13 logic_prog: technomancy, bitemyapp, hyPirion: noted, thanks

19:14 akurilin: bitemyapp, hyPiRion well if you were to use Hacker News as your only window into the world, you'd think that Clojure is hot as hell right now

19:14 it's been sizzling hot in the past couple of months at least

19:14 hyPiRion: akurilin: and go, and any fancy JS thing

19:14 akurilin: oh Go, of course.

19:14 let me check their channel

19:14 bitemyapp: What passes for fancy in JS-landia ain't fancy.

19:15 akurilin: I forgot SEO for that word.

19:15 TEttinger: https://attractivechaos.wordpress.com/2012/03/24/two-interesting-polls-on-programming-languages/

19:15 akurilin: Good gosh...

19:15 840+

19:15 so apparently the HN push is working for them.

19:17 hyPiRion: TEttinger: huh, https://news.ycombinator.com/item?id=3746692 and https://news.ycombinator.com/item?id=3748961 isn't exactly the "truth" out there though. I didn't know of those polls beforen ow

19:19 It would be more interesting to track submissions with a programming language in the title, and measure that

19:19 granted, "Go" would have quite some false positives

19:21 TEttinger: I really liked Argo, it was a great film <-- vote for Go

19:21 I got an iPhone today! <-- vote for go

19:22 hyPiRion: TEttinger: you can probably do splits and stuff to only match for go and golang

19:23 TEttinger: I would hope so!

19:23 hyPiRion: I mean, C, D and J would obviously win otherwise

19:23 TEttinger: \bgo\b

19:23 haha

19:28 Morgawr: wow, I'm probably getting a brain fart at the moment but.. how do I remove a key/value pair from a simple map?

19:28 ambrosebs: Morgawr: dissoc

19:29 Morgawr: ambrosebs: damn, thanks!

19:29 ambrosebs: you're the one working on typed clojure, right?

19:30 ambrosebs: Morgawr: that's me

19:30 Morgawr: ambrosebs: great job, I love how it's coming up. I've always been fascinated by strong type systems like Haskell and having it fully integrated (and not forced) into clojure would be the best thing ever

19:31 ambrosebs: Morgawr: thanks! agreed

19:57 logic_prog: is there something like "flttten" but only does it one level?

19:57 concat

19:57 Apage43: mapcat identity?

19:58 logic_prog: logic_prog: thanks

19:58 technomancy: apply concat would be better I think

19:58 logic_prog: Apage43: that sounds equiv to concat

19:58 Apage43: ,(mapcat identity [[1 2 3] [4 5 6] [7 [8 9]]])

19:58 clojurebot: (1 2 3 4 5 ...)

19:58 Apage43: ,(apply concat [[1 2 3] [4 5 6] [7 [8 9]]])

19:58 clojurebot: (1 2 3 4 5 ...)

19:58 Apage43: yes

20:05 chord: lets talk about starcraft

20:07 technomancy: let's talk about how everyone would be a lot happier if chord either 0) changed his behaviour dramatically or 1) got kickbanned

20:07 arrdem: :D

20:08 chord: technomancy: I've been putting all this effort trying to understand starcraft 2 pathfinding why you guys all hate me

20:08 nDuff: technomancy: aren't you one of the people with the necessary ACL to implement (1)?

20:09 mtp: let's all upgrade to IRC clients with fools lists

20:09 chord‘ nobody likes you because you contribute nothing but noise and heat

20:09 arrdem: mtp: most support /ignore, which is close enough

20:09 mtp: try exhibiting a little bit of light

20:09 technomancy: nDuff: yes, but as a relatively new op I'm inclined to err on the side of grace

20:10 mtp: arrdem‘ ignore destroys the conversation whereas fools just hides the foolish text under the rug, to be swept out later

20:10 so no, it's not close enough

20:10 technomancy: nDuff: said policy is probably nearing its expiry though

20:10 mtp: sometimes, sweeping it under the rug /is/ the right thing to do

20:10 chord: mtp: once I have a working pathfinding are you going to admit you're wrong

20:14 indigo: mtp: TIL fools lists

20:15 mtp: indigo: they're the best thing for irc

20:15 bitemyapp: mtp: you can ignore replies, but there are still ghost conversations.

20:15 indigo: What IRC clients support it?

20:15 bitemyapp: indigo: irssi

20:15 indigo: Oh nice

20:15 I'm using that

20:15 arrdem: indigo: apparently ERC has one but I'm not using it

20:15 indigo: I assume it's a plugin

20:16 mtp: indigo: most of the emacs ones

20:16 circe supports it well

20:16 bitemyapp‘ there's the same problem with ignore, so...

20:16 Morgawr: man this is so weird.. I've been staring at this 1:1 copy/port of a java algorithm to clojure and in 90% of the cases the clojure one works properly but the sometimes it doesn't and reports wrong values.. I know you guys can't help me (too specific problem), but it's so frustrating :(

20:18 hyPiRion: Morgawr: take a break from it. grab a coffee or go to bed, depending on where you live

20:19 Sometimes, the way to solve a problem is by not solving it.

20:19 mtp: smoke legal psychoactives

20:19 rasmusto: Morgawr: draw some diagrams and try to explain it verbally

20:20 Morgawr: hyPiRion: heh, I've been working on this thing for days, I took my fair share of breaks.. I've even re-written this algorithm 3 times (different code, no copying) and the same "bug" keeps presenting

20:20 hyPiRion: Morgawr: ah, that's tough

20:20 bitemyapp: Morgawr: hi

20:20 Morgawr: I just wanted to port a multithreaded implementation of a nested depth-first search algorithm for cycle detection, I wrote the sequential (non-multi) version in Java and Clojure, they work fine.

20:21 Wrote the multithreaded version in Java, it works as intended (I got the pseudocode and it's trivial to port)

20:21 I wrote the multithreaded clojure one... it works for 90% of the input, sometimes it just doesn't though and that's so frustrating

20:21 bitemyapp: Morgawr: poast coade.

20:22 Morgawr: http://pastie.org/private/f0m66s85ea3x6szmqk2gmw this is the algorithm and this is the reference paper http://www.cs.vu.nl/~tcs/cm/mc-nndfs.pdf with pseudocode

20:22 but yeah, it's just too specific for my case so I doubt anyone is able to help me

20:22 (and I don't expect you guys to, I was just ranting, sorry)

20:23 bitemyapp: Morgawr: working case and breaking case plz.

20:23 also wtf pastie

20:23 Morgawr: use refheap next time plz ;_;

20:23 Morgawr: be glad it's not pastebin :P

20:23 bitemyapp: those white-background pastebins burn my soul

20:24 Morgawr: working case... breaking case... it's hard to say, it's a very intensive and specific problem, it operates on promela graph generators on-the-fly so I don't really have a "breaking case"

20:24 bitemyapp: Morgawr: ...

20:24 Morgawr: which is why it's hard as hell to fix

20:24 chord: omg

20:24 bitemyapp: Morgawr: write unit tests that work and unit tests that break

20:24 Morgawr: create a dumpable form of the data that is generated

20:24 Morgawr: can't do it in this case, sorry

20:24 bitemyapp: Morgawr: short-circuit on failure and dump the "world" given to you.

20:25 Morgawr: if it's not a nuanced comprehension across terabytes of data (and even then) you can always dump fixture data.

20:25 Morgawr: how do you unit-test on a depth-first search algorithm that operates on data that is too big to fit in memory? The only thing you can test is if it returns "true" or "false" upon detecting a cycle (which is the point of the algorithm)

20:25 bitemyapp: Morgawr: the size doesn't matter!

20:25 technomancy: set your heap size very small? =)

20:26 bitemyapp: <3 technomancy

20:26 Morgawr: make a tiny test-case that works. then make a tiny one that breaks.

20:27 Morgawr: you cannot work on problems like this without reproducible tests and regressions.

20:27 * Morgawr sighs

20:27 Morgawr: it's okay, I don't expect anyone to help me, sorry

20:27 bitemyapp: Morgawr: you understand that your code breaks because of the nature of the data, not the size of it, right?

20:27 Morgawr: at least chuck me the black-box magic generator you're using and the origin data.

20:29 Morgawr: bitemyapp: https://www.refheap.com/a2c864b3a316c7ae4170d1231 this is the input graph that sometimes works and sometimes doesn't (it's based on the shuffle operation in the post walk of the graph, which is there to ensure entropy when multiple threads walk the graph)

20:29 as I said, it's not testable

20:29 it either works or doesn't

20:29 bitemyapp: oh bullshit.

20:29 you can produce regressions for non-deterministic sources of data through snapshotting.

20:30 Morgawr: you do realize that writing complex unit testing for this algorithm is actually harder and more troublesome (and more prone to errors) than actually finding the issue in the algorithm, right?

20:31 bitemyapp: reproducibility uber alles.

20:31 Morgawr: doing things the right way is hard. News at 11.

20:31 Morgawr: you're missing the point though

20:31 bitemyapp: I almost always do.

20:31 Morgawr: this is a simple implementation of an algorithm, it's not some complex massive system for "production" (or whatever) that needs to be tested

20:32 either the algorithm is correct or is not

20:32 and in this case it's not

20:32 the way to fix it? look at the algorithm

20:32 it's justa graph traversal (double graph, but whatever)

20:33 bitemyapp: Morgawr: was this an exercise of some sort?

20:33 Morgawr: bitemyapp: the java part yes, it's part of my multithreading class

20:33 I'm expanding it because I want to see how clojure performs

20:34 it's not something that has anything to do (anymore) with my clas

20:34 class*

20:34 just doing it for fun

20:34 and to gather some performance comparisons

20:34 bitemyapp: ahhh paper starts out by mentioning the death of Moore's Law

20:34 it's almost like academics have to justify making something multi-core/concurrent to their colleagues.

20:34 Morgawr: well post the java code that works pelase.

20:34 Morgawr: please*

20:35 rasmusto: heat death of the universe (cmos)

20:35 bitemyapp: Morgawr: also, was the second paste supposed to be generator? I want to be able to run this.

20:35 be a generator*

20:36 Morgawr: https://www.refheap.com/5fce6f68da0fb9e5018c2c3b5 this is the java implementation, it's not that great and incomplete (didn't paste all the classes etc etc), it's just faster to read the actual paper pseudocode implementation which is where the clojure algorithm comes from

20:36 and yeah, that was the graph generator, it's a promela file and is read into memory and generates a spinja graph or whatever (not familiar with that stuff tbh, it's just the input model that was provided and is not relevant)

20:37 bitemyapp: Morgawr: can you just put this into a github that 'runs'?

20:38 Morgawr: or am I just going to have to try to reproduce your environment through guessing?

20:38 mtp: why do i have an empty pm window on my screen all of a sudden???

20:38 lazybot: mtp: How could that be wrong?

20:38 Morgawr: it's okay, I appreciate the help but I can't really be arsed to put everything on github, I'll just try to fix the weird issue (it's most likely a shitty typo I made or something)

20:38 bitemyapp: Morgawr: come back with the answer when you have one please.

20:38 Morgawr: don't take it wrong bitemyapp, I do appreciate the help

20:39 I certainly will

20:39 bitemyapp: Morgawr: I just want to know the answerrrrr ;_;

20:39 Morgawr: thank you :)

20:48 seangrov`: Hrm, think I'm about 40% done porting the rails app to clojure after ~1.5 days. I assume the last 10% will be killer as always, but it's been a fun exercise.

20:50 chord: can anyone hear me?

20:50 akurilin: Just wanted to let you guys know that the clojure cookbook stuff is super awesome, the contributors and awesome, and you guys should keep making more of them if you know what you're doing.

20:51 <3

20:52 chord: which clojure cookbook

20:52 akurilin: No idea how I'm ever going to pay it forward for all the stuff you people put together...

20:53 dobry-den: someone posted this in r/clojure: http://i.imgur.com/4avtGfg.gif

20:55 technomancy: dobry-den: ooh; /me does grabby-hands

20:55 dobry-den: it's hickey after some hammock-time

20:55 technomancy: it will go well with my collection: http://p.hagelb.org/9grin.gif http://p.hagelb.org/10sad.gif

20:56 ambrosebs: hahaha

20:56 arrdem: /11-rhicky.gif?

20:57 bitemyapp: akurilin: I'm working on the Korma chapter of the cookbook right now

20:57 I'm also going fucking mad trying to idiot proof it.

20:58 I would just like to state that H2 sucks.

20:58 indigo: I don't understand why everyone uses H2

20:58 Why not use SQLite instead

20:58 `cbp: :P I use h2

20:58 technomancy: indigo: sqlite's jdbc drivers are junk

20:59 akurilin: bitemyapp, if you want me to proof-read it I can try to help, although I'm not very useful on the technical side since I haven't used it at all yet.

20:59 dobry-den: datomic-free uses h2 ;)

20:59 clojurebot: Cool story bro.

20:59 technomancy: they don't work concurrently, even though the underlying DB does

20:59 bitemyapp: akurilin: yes, you can be my test subject.

20:59 hiredman: h2 also has concurrency issues

20:59 akurilin: bitemyapp, I gotta learn it anyway so, might as well.

20:59 hiredman: (use derby)

20:59 akurilin: *updates todo list.

20:59 bitemyapp: hiredman: derby is slow. I'd rather go fast and break things. It's what Zuckerberg sed.

20:59 * akurilin foobar

20:59 akurilin: ok

21:00 bitemyapp: If that last statement made your eye twitch, please (inc bitemyapp)

21:00 kcin: j #lowendbox

21:00 akurilin: bitemyapp, is the chapter up on github already or are you hugging at atm?

21:00 `cbp: (inc callen)

21:00 lazybot: ⇒ 15

21:01 hiredman: when h2 throws exceptions due to concurrent access, you can't go fast enough to break anything

21:01 dobry-den: indigo: isnt topic difference that h2 is a java lib while sqlite is a c lib?

21:02 topical

21:03 `cbp: (inc bitemyapp) ; ahem quite the typo there

21:03 lazybot: ⇒ 1

21:15 bitemyapp: You know how I know this Clojure Cookbook is going to be good?

21:15 {:NAME "Dmitri" :TENTACLES false}

21:15 because tentacles are involved.

21:15 Always a good time.

21:30 LordQuas: Is clojure-mode + nrepl the preferred way to do clojure with emacs?

21:30 \join #emacs

21:30 rasmusto: LordQuas: grab paredit.el too

21:32 LordQuas: yup yup, used to it with elisp editing. I read some posts about slime and wondered which was better

21:32 rasmusto: nrepl is the new standard afaik

21:33 LordQuas: Gotcha, thanks.

21:33 Oh and what about ritz?

21:33 rasmusto: LordQuas: I have this thing if you want something to look at: https://github.com/rasmusto/vim-emacs-clojure-starter-kit

21:33 LordQuas: can't speak to ritz

21:35 LordQuas: rasmusto: Thank you, I will gladly plunder this =D

21:35 rasmusto: LordQuas: I just learned emacs a few weeks ago, so don't take anything as doctorine ;p

21:36 technomancy: the guide on clojure-doc.org is very good too http://clojure-doc.org/articles/tutorials/emacs.html

21:36 if vebose

21:43 bitemyapp: H2's capitalization bullshit is really ruining my day.

21:44 of course, Korma already has something for this and I was being a moron.

21:49 TimMc: bitemyapp: Technically, tentacles *aren't* involved.

21:49 It says so right there, :TENTACLES false.

21:51 bitemyapp: TimMc: the faces I am making at you right now would crack a mirror.

21:56 devn: in-place fisher-yates -- got a good clojure version?

22:02 my versions all look nasty

22:03 Apage43: heh

22:04 i decided to look at clojure.core/shuffle

22:04 it just calls java.util.Collections/shuffle

22:04 (after dumping the collection into an ArrayList

22:21 amalloy: devn: i have one in useful

22:22 aside from the poor decision i made to combine lazy-shuffle with take into a single take-shuffled, https://github.com/flatland/useful/blob/develop/src/flatland/useful/seq.clj#L149 is IMO pretty good

22:36 gfredericks: ,(format "lib-%04d" (rand-int 10000))

22:36 clojurebot: "lib-7607"

22:39 mercwithamouth: how would one go about calculating an average functionally?

22:40 gfredericks: (fn avg [nums] {:pre [(seq nums)]} (/ (apply + nums) (count nums)))

22:41 mercwithamouth: gfredericks: o_O

22:41 gfredericks: something wrong?

22:41 mercwithamouth: not that i would know =P

22:41 trying it out now

22:42 what does ':pre' do?

22:43 gfredericks: it's a precondition; if (seq nums) is falsy, i.e. if nums is empty, it will throw an assertion error

22:43 mercwithamouth: ahh i see

22:43 gfredericks: slightly more readable is {:pre [(not (empty? nums))]}, but we have this silly idiom

22:44 mercwithamouth: hrmm any way to do it parallel?

22:44 gfredericks: use reducers for the apply + I guess

22:44 mercwithamouth: <- not a math person but discussing an issue with a friend

22:45 gfredericks: if you're thinking about functional programming abstractly, the parallelism is somewhat of an implementation detail

22:45 but yes the addition part is parallelizable

22:47 mercwithamouth: hrmm

22:49 gfredericks: and is that possible without keeping a count? holding state?

22:50 gfredericks: um. huh? yes? not sure what you mean exactly.

22:50 `cbp: I gotta say multiple cursors on emacs is the sexiest thing

22:50 especially with paredit omg

22:55 ghadi: Before I try to get help for a possible lein bug, I want to thank technomancy and all the leiningen contributors for such a fine tool.

22:56 I think there is an issue with two dependencies that silently shadow each other

22:57 clojurescript 0.0-1909 requires tools.reader, as does clj-http 0.7.x

22:58 When you list both of them in :dependencies and then run lein deps :tree to find conflicts, tools.reader only shows up as a transitive dep of clojurescript, not of clj-http

22:59 gfredericks: that might be expected

22:59 ghadi: but when you require the clojurescript code -- it silently picks up the incompatible tools.reader version that clj-http uses, and barfs out on arity on a constructor

22:59 hi gary

22:59 gfredericks: hi

22:59 ghadi

23:00 oh wait so you're saying the tree prints it under one but it's actually using the version required by the other?

23:00 ghadi: si senor

23:00 gfredericks: does tree print a version for tools.reader?

23:01 hiredman: ghadi: what version of tools.reader shows up in lein classpath?

23:01 gfredericks: (`lein classpath`)

23:02 ghadi: lein deps :tree shows tools.reader under clojurescript as the latest ver (0.7.8) but classpath shows 0.7.7

23:02 no conflict warning on lein deps :tree

23:04 in clj-http's pom, tools.reader is listed with a org.clojure/clojure exclusion

23:05 in clojurescript's pom, no exclusion -- not sure if this fact matters, but it's a fact

23:06 [org.clojure/clojurescript "0.0-1909"]

23:06 [clj-http "0.7.7"] you can reproduce the behavior with these deps in an empty project

23:07 gfredericks: this is out of my realm of expertise; if nobody else is around I'm sure a github issue would be appreciated

23:09 ghadi: I'll open one up. thanks

23:11 AieshaDot: t

23:14 dobry-den: How come running mvn goals from ~ dir don't complain about pom.xml but they do in non-~ folders

23:16 ghadi: Lucky issue # https://github.com/technomancy/leiningen/issues/1337

23:16 gfredericks: ghadi: you get internet money!

23:16 ghadi: what do I win

23:16 gfredericks: 1337 internet dollars

23:17 redeemable at your local internet location

23:17 TEttinger: http://i.imgur.com/dOLkgVR.png <-- not related to issue #1337, but relevant to some questions we've had in here lately

23:25 gfredericks: so I was trying to be helpful to myself by throwing an ex-info from one of my test helpers

23:25 with stuff that I could use to debug why the test failed

23:26 but I'm not sure clojure.test is going to let me see the exception?

23:29 logic_prog: is there a way to tell "lein cljsbuild auto" to also "require main.clj" ?

23:36 ddellacosta: logic_prog: why do you need main.clj? Is it crossover code? If so, just put it in the source-paths list

23:37 logic_prog: no

23:37 I just want a single lein

23:37 that both runs my clojure server and also do "cljsbuild auto"

23:38 technomancy: logic_prog: trampoline combines chained tasks

23:38 `lein trampoline do run -m my.main, cljsbuild auto`

23:38 "When in doubt, use combinators."

23:39 * gfredericks is using combinators

23:42 muhoo: why combinators?

23:42 * muhoo ducks

23:42 logic_prog: technomancy: who are you and what makes you qualified?

23:42 I'm kidding, it worked, thanks. :-)

23:42 gfredericks: combinators are the monads of programming

23:43 * muhoo is kind of relieved nobody got his awful pun

23:43 logic_prog: ha ha

23:43 Y Combinators

23:43 :-)

23:51 when I do (:require-macros [blahblah :as ..]), does it only pull in defmacros or does it pull in defns too ?

23:54 gfredericks: pulling in defns wouldn't make sense? because it's compile-time?

23:54 the defns are written in clojure presumably, not clojurescript

Logging service provided by n01se.net