#clojure log - Jun 02 2014

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

0:13 amalloy: pcn: might as well link to a paste of the code that confuses you, or otherwise describe what's wrong with it somehow. nobody can help with "different code than i expected but it might be okay"

0:14 pcn: https://github.com/magomimmo/modern-cljs/issues/153

0:49 Hmm... same seems to be happening with the rest of the tutorial. I guess this'll continue in the github issue.

3:17 hellofunk: sheesh i lost internet connection after asking my question; just got it back

3:17 anna_: ok

3:33 hellofunk: cemerick or ddellacosta do you see anything about the openID workflow that would cause Ring to report a null ptr exception? compiles fine: https://www.refheap.com/86184

3:45 xsyn: hey hey

3:51 Does anybody have a picture that illustrates immutability

3:51 ?

3:58 katratxo: xsyn: perhaps the way to picture it, is showing structural sharing?

3:59 xsyn: right now, I'm using a git tree

3:59 katratxo: xsyn: e.g. http://hypirion.com/musings/understanding-persistent-vector-pt-1

4:00 xsyn: hmm, this might work

4:00 ta

5:07 hellofunk: ddellacosta looks like even Google is recommend OAuth over OpenID for mere authentication https://developers.google.com/accounts/docs/OpenID

5:09 powrtoc: Hey all, I'm looking at core.async and I'm wondering if there's a way to test if a channel will block before you put something on it?

5:22 I'm thinking that if I wanted to do this, I'd have to keep a count in an atom and test if it was less than the buffer size

5:24 Glenjamin: powrtoc: what would you do if it was going to block?

5:25 powrtoc: Glenjamin: return some kind of service unavailable message to the user... or try again when we're less busy

5:26 Glenjamin: i guess the idea is generally that a queue should separate those sorts of issues from the user

5:26 powrtoc: Glenjamin: Except you can't without having an unbounded queue... basically I want to expose back-pressure to the users, rather than just drop their messages

5:45 michaelr525: hey

5:46 hellofunk: hey

5:46 noncom: heeeeey

5:46 ,(println "huuwawa!")

5:46 michaelr525: Is there something for emacs which implements the C-TAB C-S-TAB behavior like it really is in Windows or Intellij and all the rest?

5:46 clojurebot: huuwawa!\n

5:50 ddellaco_: michaelr525: you mean, moving between buffers? It's not a clean analogy since usually one doesn't use emacs with a bunch of different windows

5:54 michaelr525: ddellacosta: yes, buffers

5:55 ddellacosta: michaelr525: well, there are a lot of different ways to move between buffers--you can do C-x b Ret to toggle between two active buffers

5:56 michaelr525: C-x C-b will open up the buffer list in a new buffer, etc.

5:56 michaelr525: and I glossed over it but C-x b and tabbing/typing will get you to a specific buffer. Lots of ways to do it.

5:57 michaelr525: and if you don't like that, you can just change it. :-) http://www.emacswiki.org/emacs/SwitchingBuffers

5:58 hellofunk: ddellacosta how do I get your oath2 tool to use somthign other than /login as the automatic redirect to the authentication page of the oauth provider?

5:58 michaelr525: ddellacosta: I'm aware of that and that's actually how I work with it today. I've tried already a few of the purposed solutions there but none of them so far works like I would like it to.

5:58 For example C-TAB switches from A -> B, the next C-TAB switches back B->A

6:00 ddellacosta: michaelr525: well, I can't help you further...it works well for me as is. I would suggest writing your own elisp extensions if you really need to go deep. I'm sure the folks in #emacs can give you better suggestions though.

6:00 michaelr525: ddellacosta: thanks

6:01 ddellacosta: hellofunk: that's a friend setting if I recall correctly, try setting :login-uri (https://github.com/cemerick/friend/blob/master/src/cemerick/friend.clj#L233)

6:01 hellofunk: let me confirm that I'm not leading you astray though, one sec...

6:02 hellofunk: well, I'd like to have multiple different logins on one page. The Friend Demo examples allow you to design login/ but as soon as I added the oauth2 workflow, it "took over" login/

6:02 ddellacosta ^

6:05 ddellacosta: hellofunk: friend is just going to try and log you in if you are not authenticated and you try to access something that requires authentication, and it should redirect you to the login uri, whatever that is set to be

6:06 hellofunk: I'm not sure why it would matter whether it is oauth2 or not; it all uses the same workflow mechanism

6:06 hellofunk: ddellacosta: oh, i used the :openid-uri in the openid workflow, so that prevented login/ from being hijacked. can I use a specific "overriding" uri in oauth2/workflow as well?

6:07 ddellacosta: hellofunk: still not understanding what you mean by "hijacked"

6:09 hellofunk: ddellacosta i have a compojure route where i have my own content for login/. when i use openID in Friend, I specified the :openid-uri as something else, therefore login/ is not affected by Friend behavior. As soon as I also added the oauth2 workflow, my login/ route no longer uses my own content, and instead just goes right to the google auth login.

6:12 ddellacosta: hellofunk: ...so you want it to go to a site-specific login page where the user will choose what authentication method to use, basically?

6:13 hellofunk: ddellacosta, yes that is how my login/ page is setup currently. I supplemented the openID workflow with your oauth2 workflow, but it seems to take over the login/ page

6:14 ddellacosta: hellofunk: hold on, let me look into this further

6:23 hellofunk: ddellacosta i can do some renaming of my routes if I must use login/ for oauth2. it's not a huge issue. the other problem is I can't seem to get the user's email address after Google sends back to my site. the normal (friend/current-authentication) map with :email and :firstname etc doesn't seem to be there

6:24 ddellacosta: hellofunk: as far as the latter, that's by design; it's not part of the OAuth2 spec. However, another user is working on an extension for Google.

6:25 hellofunk: ddellacosta so how would i be able to know if the Google-authenticated user is also one I should authenticate?

6:25 ddellacosta: hellofunk: why are you using an authorization protocol for authentication?

6:25 hellofunk: don't answer that. *sigh&*

6:25 hellofunk: because Google has deprecated OpenID

6:26 as of 2 weeks ago you can longer signup for OpenID with Google ddellacosta

6:26 *no longer

6:26 ddellacosta Google now recommends OAuth2 for authentication: https://developers.google.com/accounts/docs/OpenID

6:27 ddellacosta: hellofunk: I know all of this

6:27 whodidthis: maybe oauth has userid

6:27 ddellacosta: hellofunk: and I am in fact resigned to it. But you should 1) read what I wrote in the README under #5 and 2) at last glance at the oauth2 rfc sometime so you know what you are getting into

6:29 hellofunk: ddellacosta, I saw that, but it's not clear what these "tokens" are -- are they Google-created UUIDs or are they more general info that is useful?

6:29 ddellacosta: hellofunk: and none of this means you can't query the api *after* you've authenticated

6:29 hellofunk: http://tools.ietf.org/html/rfc6749

6:30 hellofunk: the entire point of oauth2 is that you get an access token which you can *then* use to query the 3rd-party provider for resources

6:31 hellofunk: ddellacosta ah, that's the piece I was missing from all this.

6:33 ddellacosta: hellofunk: re: original issue, I think that's a greater problem--the oauth2 workflow is badly behaved and doesn't play well with others (other workflows, that is). I'm seeing if I can make a simple patch quickly now. I've never used it myself other than with a single workflow, I'm afraid.

6:34 hellofunk: ddellacosta I am just moving some routes around so that login/ can be dedicated to your oath2 while a different uri is for openID, etc and a different page other than login/ with my various login options.

6:35 ddellacosta: hellofunk: not sure that will help, but tell me if it does, in which case it works very differently than I'd thought

6:35 hellofunk: i'll know in about 2 minutes after the heroku push

6:46 ddellacosta perhaps part of the issue is that I am not relying on the friend/authorize in my routes, instead using the (if-let [auth (friend/current-authentication req)] style. maybe this doesn't play well with the oauth2

6:52 ddellacosta: in any case looks like my problem is resolved by letting /login be dedicated to the oath2 workflow alone, and using other named routes for other things.

6:52 ddellacosta: hellofunk: that's one solution

6:53 hellofunk: this needs more configurable options though. I'll have to think through it as it may take a little time, but if that works for you that's great.

6:53 hellofunk: thanks for bringing this to my attention!

6:53 hellofunk: ddellacosta so I 've got OpenID and OAuth2 working in harmony now, I just need to learn how to get meaningful info form the OAuth token so I know who is actually hitting my site after the OAuth login.

6:54 despite this minor /login issue I must thank you for the library, it and Friend are really saving me right now

6:55 ddellacosta: hellofunk: until I've got some extensions integrated to allow for stuff like getting the rest of the google-provided data initially, you'll just have to do it the "old fashioned way:" https://developers.google.com/accounts/docs/OAuth2?hl=ja

6:57 hellofunk: ddellacosta do you have an example that shows how to query this directly? I'm trying to look for it in your repo

6:57 ddellacosta: hellofunk: no, I don't have any examples of this

6:57 but the access token should be in the session

6:58 hellofunk: ok i see the token in the request.

6:58 ddellacosta: you'll probably want to use a lib like https://www.google.co.jp/search?q=clj-http&oq=clj-http&aqs=chrome..69i57j0l5.1095j0j7&sourceid=chrome&es_sm=91&ie=UTF-8

6:58 d'oh

6:58 I meant this

6:58 https://github.com/dakrone/clj-http

6:58 format your URL as described in the google doc I linked you to above, hitting the appropriate API, for example: https://developers.google.com/+/api/latest/people/get

7:00 hellofunk: ok, looks like more reading and experimenting. i'll admit i'm a bit slow in figuring all this out.

7:00 i appreciate the help though ddellacosta

7:00 ddellacosta: hellofunk: no worries, but let me take the opportunity to nag you to read up further on the oauth2 protocol okay? ;-)

7:01 hellofunk: in the meantime I'll figure out how I can make oauth2 work more smoothly with other workflows

7:02 hellofunk: and if you have trouble with getting the data you need from the google api ping me

7:02 hellofunk: ddellacosta agreed. and i also agree that it seems overkill to do all this authorization and querying when all i want is to piggyback on these guys for mere authentication

7:02 ddellacosta: hellofunk: this is the basic problem with oauth2...it's really not meant to do what all the big guys are now suggesting you use it for

7:03 oauth is kind of an old school web 2.0 relic, imo...back in the heady days when we were all going to be doing these mash-ups of different api's data to produce new fancy web apps

7:03 hellofunk: i was tasked with making a Google login for our site; had I started this 3 weeks ago, I could have been among the last to signup for OpenID with Google and that would have bought me 1 year. ddellacosta.

7:03 ddellacosta: hellofunk: d'oh

7:03 hellofunk: well, again, ping me if you have trouble

7:04 email is my username at gmail

7:04 hellofunk: appreciate it ddellacosta and thanks again for the library

7:04 ddellacosta: hellofunk: np

7:09 hellofunk: more details but worth reading, even if you end up using oauth2 the way you're using it: http://www.thread-safe.com/2012/01/problem-with-oauth-for-authentication.html

7:10 hellofunk: ddellacosta please send that article to Google's execs right away

7:10 nevermind i'll do it

7:10 ddellacosta: hellofunk: are you kidding?

7:10 hellofunk: ddellacosta yes

7:11 ddellacosta: hellofunk: ah, irony is hard to read sometimes. ;-)

7:11 hellofunk: ddellacosta correct me if i'm wrong but this OAuth is now the *only* way for new sites to setup authentication with Google since the deprecation of their OpenID

7:12 ddellacosta: hellofunk: well, again, if you are delegating authentication to google, then the answer is yes. It's fine if you just need to ensure that the user's resources you get *from google* are properly authenticated *by google*

7:13 hellofunk: but it is too bad since it's not really a valid replacement for openid

7:14 hellofunk: ddellacosta a lot seems to come down to the simplicity of the API, getting an auth token back instead of a simple yes/no and an email address

7:14 ddellacosta: hellofunk: sure

7:14 hellofunk: but again, authn != authz, apples to oranges, etc. etc.

7:14 * ddellacosta gets back on his horse to go find some windmills to tilt at

7:16 ddellacosta: hellofunk: to be fair, I guess this initiative seeks to solve some of these problems: http://openid.net/connect/

7:34 prc: Hi. Say that I I have a function such as this: (defn an-example [& args] (str args)) Can someone tell me what the & means? I know what it's used for, but I am concerned with what it means/does... does it turn args into a list? a vector maybe? What's the logic behind it?

7:34 agarman: it's variadic

7:34 or varargs in java

7:34 [& args] means args will be an Object[]

7:35 but at the callsite you use individual values

7:36 specifically clojure wraps the individual values in clojure.lang.ArraySeq

7:37 prc: agarman: you have my thanks.

8:16 clgv: agarman: prc: actually it uses javas var args only for arities greater than 20

8:21 phillord: how do protocols choice the method to invoke where there is multiple inheritance?

8:21 For example, consider http://pastebin.com/FcRk7mmp

8:22 why does the CharSequence implementation get called?

8:31 noncom: phillord: just a guess: coz implementations get added to a list and the first element is taken on dispatch, which turns out to be CharSequence?

8:32 try more implementations, see if this is correct..

8:34 phillord: might well be

8:34 testing

8:35 nope, not that...

8:36 Tried, CharSequence, then Comparable, then Serializable -- comparable is called

8:36 nor is it left to right from interface definition -- that should be Serializable

8:37 nor is it alphabetically

8:37 confusing

8:37 ayia: Hi, guys. What is the idiomatic way to populate hash-map on condition? I.e. given a default value of a hash-map, when condition is true, then assoc some key/value pairs to it... if not - leave default value...

8:38 noncom: phillord: umm.. maybe hash?

8:38 mdrogalis: ayia: (let [x (if condition (assoc ...) old-map)] ..)

8:38 ayia: I tried something like: (->> {:a 1} #(if condition (assoc % :b 2) %)), but it seems to not work...

8:38 phillord: noncom: or something random in the JVM implementation

8:39 mdrogalis: ayia: Probably a positioning problem with respect to ->>

8:39 phillord: noncom: i guess, technically, hash is something random in the JVM implementation

8:39 noncom: phillord: does the choice persist if you restart the environment and try again?

8:39 clgv: ayia: (cond-> {:a 1} (odd? 1) (assoc :a 5))

8:40 ayia: ##(cond-> {:a 1} (odd? 1) (assoc :a 5))

8:40 phillord: just testing that

8:40 lazybot: java.lang.RuntimeException: Unable to resolve symbol: cond-> in this context

8:40 clgv: ,(cond-> {:a 1} (odd? 1) (assoc :a 5))

8:40 clojurebot: {:a 5}

8:40 phillord: oh dear

8:40 no, it doesn't

8:40 noncom: ahaha

8:40 :D

8:40 phillord: that's rather poor

8:40 noncom: well, i was never into clojure protocols

8:41 i think that this question should be raised when some more involved people are here

8:41 phillord: http://pastebin.com/HjqKwATJ

8:41 noncom: maybe they will recognize this as an error, or point to why is this good :)

8:41 phillord: can you tests for me? put this into a clean REPL a couple of times

8:41 noncom: ok, wait

8:43 ayia: clgv: big thanks! it works:)

8:46 noncom: in process, pls wait :)

8:46 phillord: (extend-type Phil BeingPatient)

8:49 noncom: phillord: charseq

8:49 phillord: every time?

8:49 noncom: oops, 2 times charseq, 3rd time - serializable

8:50 4, 5 - serializable

8:50 phillord: interesting -- I am getting charseq everytime from lein repl -- but got different results in cider

8:50 noncom: i use eclipse ccw

8:50 make an automated test to run tis thing 100 times in a row :)

8:51 maybe statistics will sow...

8:51 show

8:51 and you can test across different jvms

8:51 just a game

8:51 but honestly, the people from above sould be asked about it i guess

8:51 phillord: automation won't help

8:51 the JVM needs restarting

8:51 well, I guess I can automate that also

8:52 noncom: yeah, te kind of automation that restarts jvm :)

8:56 clgv: phillord: or you could just look it up in the Clojure source

8:56 phillord: sure I could

8:57 but I have no idea how protocols work, the code they produce is baroque and it's not clear where it would be in the source

8:59 clgv: just a hint so that you dont have to wait for the US folks to show up ;)

8:59 phillord: it probably should be in the documentation I think

9:00 I'm not in an urgent hurry -- just thinking about a reimplementation of something I already have working

9:02 it's different everytime on windows -- so, defn JVM dependent

9:06 hhenkel: Hi all, I'm currently toying around with yaml and found the "clj-yaml". What confuses me is what version to use, there is a version 0.4.0 and I also found 0.5.0 with updated dependecies.

9:06 I also fail to use either of them as the snakeyaml lib is missing. Shouldn't that be in the dependecies?

9:07 I first use this: https://clojars.org/clj-yaml and later on that: https://clojars.org/nl.onlinetouch/clj-yaml/versions/0.5.0

9:08 Running my application with "lein run" gives me: Exception in thread "main" java.lang.IllegalArgumentException: No matching method found: load for class org.yaml.snakeyaml.Yaml

9:11 noncom: hhenkel: so you add [nl.onlinetouch/clj-yaml "0.5.0"] into dependencies of your project.clj

9:11 and then run "lein deps"

9:11 and then "lein run"

9:11 and get the error?

9:26 Hodapp: hmmm, this whole 'livecoding' thing is quite interesting

9:35 hhenkel: noncom: Yes, exactely

9:36 noncom: Hodapp: no doubt man! come in!

9:37 hhenkel: noncom: Those are my dependencies: https://www.refheap.com/86204

9:37 noncom: hhenkel: try this? https://clojars.org/dsabanin/clj-yaml

9:38 looks correct

9:39 the toolbox http://www.clojure-toolbox.com/ suggests this as a parser

9:39 https://clojars.org/clj-yaml

9:40 so why does class org.yaml.snakeyaml.Yaml as no method "load()" ?

9:40 hhenkel: this is not really a deps problem as i see

9:40 hhenkel: noncom: Tried the one you provided...looks okay from the downloaded stuff but still fails: https://www.refheap.com/86205

9:41 noncom: hhenkel: it just says it cannot find the right method

9:41 the erroor might well be in your code

9:41 show your code

9:41 (the part where you call for "load")

9:43 hhenkel: https://code.google.com/p/snakeyaml/source/browse/src/main/java/org/yaml/snakeyaml/Yaml.java#399

9:43 hhenkel: noncom: I updated the redheap stuff.

9:43 noncom: hhenkel: see, the Yaml.load() method gets called

9:43 hhenkel: apparently none of the overloads match

9:44 hhenkel: check that out, the types

9:45 hhenkel: noncom: Ah, okay this indicates that I'm returning the wrong type of data and therefore it fails...

9:46 noncom: hhenkel: you can check a type with (type ...)

9:46 ,(doc type)

9:46 clojurebot: "([x]); Returns the :type metadata of x, or its Class if none"

9:46 noncom: ,(doc class?)

9:46 clojurebot: "([x]); Returns true if x is an instance of Class"

9:47 hhenkel: noncom: clojure.lang.LazySeq ...

9:48 noncom: hhenkel: surely that's not wat a usual java lib would want to see :)

9:48 hhenkel: noncom: I guess I need to make a string out of it.

9:48 noncom: hhenkel: (apply str your-lazy-seq)

9:49 hhenkel: noncom: Okay, that looks better (different error - but yaml format related I guess).

9:49 noncom: Thank you very much!

9:50 noncom: cool!

9:57 martinklepsch: this is valid in a ns form, right? (:require [quil.core :refer :all])

9:58 noncom: martinklepsch: right

9:58 Johannes`: hi, how does clojure generally stack up to CL/Scheme/Python/Ruby.. in performance?

9:58 segmond: it stacks up nicely

9:59 python and ruby are not in the same category

9:59 noncom: but them vms

9:59 crossplatform too

9:59 segmond: with that said, i highly doubt you have a performance problem, so stop worrying about performance

9:59 noncom: performace is good and rising

9:59 Johannes`: i mean, where would you place it?

10:00 noncom: well, lots of scheme implemntations are a fast c thing..

10:00 * segmond is out

10:00 noncom: i can't say anything really, not enough expertise

10:01 locks: I'd place it in the "fast enough not to worry about it" region :P

10:01 Johannes`: basic expressions are a bit slow to evaluate here on my wii ^^;

10:01 but not in CL, python or ruby

10:01 p_l: compilator overhead?

10:02 Johannes`: no idea

10:02 locks: you have clojure in your Wii?

10:02 Johannes`: yeah

10:02 locks: cute

10:02 I had it on my phone

10:04 Johannes`: loading clojure-1.6.0.jar takes about 22 seconds :V

10:04 python takes 0.5s

10:07 hyPiRion: Johannes`: loading Clojure is in general slow. Interpreting takes overhead as it has to be compiled before it can be run. But compiled code runs faster than Python and Ruby

10:08 Not sure where CL and Scheme is on the list

10:08 Johannes`: aha

10:08 hyPiRion: but then again, it's sort-of comparing apples to oranges

10:09 Johannes`: well, it seems development requires modern hardware, otherwise the REPL is too slow to load

10:10 hyPiRion: yeah, in which case Ruby/Python fares better

10:11 noncom: what about these plans? http://dev.clojure.org/display/design/Release.Next+Planning

10:11 Johannes`: oO(but maybe working around python's limitations is worse than waiting for clojure to load)

10:12 noncom: Johannes`: usually you wait the loading time just once

10:12 Johannes`: if you have it running in emacs, true

10:12 noncom: you can start an instance on android and connet to it

10:13 hyPiRion: noncom: yeah, there is some work going on making startup faster

10:13 noncom: also, there were experiments wit stripping down clojure off unnecessary things which improved the situation really

10:14 Johannes`: like java? :)

10:14 hyPiRion: haha

10:14 noncom: hyPiRion: i am going to go into clojure android development so i watch this space

10:14 don't laugh on jvm

10:14 it is serious

10:17 hyPiRion: noncom: so I presume you're watching alexyakushev's work then

10:17 duck1123: There's also a project that keeps a copy of java loaded up to make it easier to run functions quickly. Can't remember the name

10:17 noncom: hyPiRion: yes, and what sattvik does too. afaik he ports clojure

10:18 iwo: hey, does anyone know the most appropriate way to create a function that does thing?

10:19 i'm thinking something like: (constantly nil)

10:19 hyPiRion: duck1123: drip?

10:19 or perhaps grenchman?

10:20 noncom: iwo: looks noce

10:20 *nice

10:20 iwo: but is there an existing library function that does (constantly nil) ?

10:20 duck1123: hyPiRion: that may be it. I was under the impression that it started with a c, but I may be getting it mixed up with a similar ruby project

10:20 noncom: like (constantly-nil) ?

10:21 iwo: noncom: :)

10:21 i'm basically wondering if there's a more idiomatic way to create a noop function

10:22 oh, just realised i have a typo above, I said "function that does thing?" when I meant "function that does nothing?"

10:22 pretty important part of the question :)

10:22 hyPiRion: duck1123: there is a clojure-c somewhere. It's gotten really mature I think, saw an ANN from it not too long ago

10:22 Johannes`: why not (fn [])?

10:23 hyPiRion: but it doesn't spin up a JVM, it's "just" compiling Clojure to C through chicken scheme I think

10:24 duck1123: https://github.com/takeoutweight/clojure-scheme ? It was gambit scheme

10:25 jjl`: gambit's quite good at optimising things, so it should be quite fast

10:44 no7hing: to get this right: if i define a protocol in namespace a, create a record definition (not the instance of the record!) extending it in namespace b, i’ll have to require the protocol in all the namespaces that’ll use the record e.g. namespace c ?

10:47 clgv: no7hing: yeah but you only need to require namespace b when you want to create a record

10:48 agarman: anyone know of a way to remove the repetition when multiple functions use the same :or destructuring...e.g., https://www.refheap.com/86206

10:48 no7hing: clgv: i mean namespace a, when i’am actually calling the protocol function in e.g. nampespace c

10:50 clgv: no7hing: yes when you want to use the protocol you need to require its namespace. but that is not suprising since you have to require namespaces of functions you want to use as well

11:06 myguidingstar: why don't core.logic programs just follow Clojure naming convention for vars such as coll, x, m etc

11:07 isn't it easier to catch up with than a, d... ?

11:09 scriptor: myguidingstar: as I understand it, they followed conventions previoulsy used by other logic libraries

11:11 myguidingstar: hmm, I find them quite annoying :)

11:13 no7hing: clgv: don’t know why i was expecting it differently ;)

11:16 bridgethillyer: e

11:22 michaniskin: hi bridgethillyer

11:22 bridgethillyer: Hi. That ‘e’ was colloquy stealing focus. Carry on. :)

11:24 michaniskin: bridgethillyer: just saying hi, e or no e

11:25 bridgethillyer: michaniskin: What’s new in Hoplon world?

11:27 michaniskin: bridgethillyer: haha some things, actually. been working on building a contrib library of jquery plugins and whatnot, and putting them in maven so they can be included in hoplon apps via maven deps

11:27 bridgethillyer: like this guy for example: https://github.com/tailrecursion/hoplon-demos/tree/master/jquery-date-picker

11:29 bridgethillyer: Nice!

11:29 michaniskin: you can now package css and other resources (like images) in your jars and they are dealt with automatically by hoplon in the application

11:30 like the css for that date picker

11:30 or twitter bootstrap

11:30 bridgethillyer: I really like your packaging, deployment stories, etc.

11:31 Y’all are clearly using this in production

11:31 michaniskin: the people i work for are pretty cool with open source, so most of that stuff was written for production apps

11:32 Hodapp: working for people who are cool with open source can be kind of a godsend.

11:32 bridgethillyer: YES.

11:37 cbp: ,1

11:37 clojurebot: 1

11:37 Shaun: anyone know where I can find clojurescript's goog namespace?

11:37 arrdem: ,(+ 2 2)

11:37 clojurebot: 4

11:38 cbp: $google goog namespace

11:39 lazybot: [Finding Your Way around the Closure Library - Google Developers] https://developers.google.com/closure/library/docs/introduction

11:39 cbp: Shaun: I don't know what you mean

11:40 Shaun: can you be more specific

11:41 Shaun: here's a code example: https://github.com/gf3/secretary#example-with-googhistory

11:42 I can't find any api docs, or source code for the goog library, or at least clojurescript's wrapper around it

11:42 whodidthis: http://docs.closure-library.googlecode.com/git/index.html

11:43 cbp: Shaun: there is no wrapper around it. It is google's closure

11:43 Shaun: http://docs.closure-library.googlecode.com/git/class_goog_History.html

11:43 that's goog.History

11:44 Shaun: interesting, so :require works on JS libraries as well

11:44 cbp: Well clojurescript uses closure's module system so yes

11:45 Shaun: oh okay, that makes sense, thanks cbp!

11:45 cbp: np

12:49 sdegutis: If you use clojure.java.io/copy to download a URL (via clojure.java.io/input-stream) and save it to a file, would the whole file be stored in memory, or just the downloaded parts at a time?

12:49 technomancy: sdegutis: io/copy buffers it

12:49 arrdem: implementation defined behavior.

12:49 tbaldrid_: sdegutis: look at the source of io/copy :-P

12:50 sdegutis: The source points to a private function called do-copy.

12:50 Thanks.

12:50 technomancy: ,(#'clojure.java.io/buffer-size nil)

12:50 clojurebot: 1024

12:51 arrdem: tbaldridge: to what extent do you think I should be trying to emit compiler warnings that I'm doing constandard things like throwing away non-def top level forms?

12:52 tbaldridge: warning that a banned class like Var is used as well..

12:53 tbaldridge: arrdem: well if it won't ever work, then throw an error. Like calling def inside an optimized function.

12:54 so perhaps, error if it is a problem for sure. And warning if it's probably a problem. Otherwise trust the user?

12:55 Maybe it would just be better to just mark all such cases with a generic call to a log function, then the warning/error levels can be changed at a future time

12:55 or even via a command line option

12:56 arrdem: tbaldridge: hum... I'm not sure about the nested def thing, depends on what Alex comes back with on the dev list. Alxeander Yakushev asked about nested defs and I chimed in as impacted.

12:58 tbaldridge: I'll definitely wind up with a build profile config map that specifies what transforms or whatever the final compilation mode abstraction is.. logging warnings and being careful about emitting all warnings is probably the way to go.

12:59 sdegutis: arrdem: how's the clojure compiler coming?

13:00 arrdem: sdegutis: lambda and letfn lifting works and is in 0.0.4, working on tree shaking which could be done in the next hour, then it's on to building a custom emitter I think.

13:01 sdegutis: Exciting!

13:03 ambrosebs: arrdem: nice

13:04 noncom: please remind me what compiler are you talking about?

13:04 arrdem: ambrosebs: I actually want to chat with you at some point about potentially using core.typed to create records implicitly

13:05 ambrosebs: what'd you think of typechecking t.a.jvm?

13:05 noncom: https://github.com/arrdem/oxcart

13:05 ambrosebs: https://github.com/frenchy64/tools.analyzer.jvm/blob/typed/src/main/clojure/clojure/tools/analyzer/jvm/typed.clj

13:05 arrdem: noncom: my GSoC project, one of two lean clojure projects

13:06 noncom: wow, cool!

13:08 ambrosebs: probably doesn't work anymore, but that's what I think ;)

13:09 arrdem: ambrosebs: :P

13:10 koreth_: arrdem: I was curious whether the two of you are attempting to coordinate your efforts at all. Or are your approaches so different that it wouldn't make any sense?

13:11 arrdem: koreth_: we've talked, and the answer is that our approaches are different. Alexander Yakushev is working on tuning the existing JVM runtime.

13:11 koreth_: I'm trying to do whole program optimization that discards as much of the existing runtime as possible

13:11 specifically the var subsystem, but the extent to which I can actually get away with that is up in the air.

13:12 koreth_: Experimentation is good. Hopefully both of you will end up doing some stuff that not only stands on its own, but can be partially integrated into the main compiler to make things faster for everyone!

13:12 arrdem: I may try and get him to introduce a StaticVar which has a `static` rawRoot value rather than a `volatile` rawroot.

13:13 koreth_: for now my project is out in the 2.0.0 loony bin with the rest of tools.analyzer and tools.emitter, Alexander's work is 1.7/1.8 candidate material tho AFAIK.

13:13 noncom: do you know how soon may we expect the lean functionality be included in clojure? i understand that it is not even half developed, but maybe there are some estimations...?

13:15 arrdem: noncom: I'd say 1.7 TBH. Daniel Gomez and I were talking prior to my GSoC application and he mentioned that lean clojure GSoC work would likely be 1.7 material, hence my above comment.

13:15 noncom: but it also depends on what Rich comes out with for build profiles and some other stuff. Also Alexander and I kinda need to finish so... who knows.

13:15 (dec so)

13:15 lazybot: ⇒ -25

13:15 hyPiRion: dec so?

13:16 noncom: so is a valuable resource. arrdem just consumed one :)

13:16 seen this paper: http://dev.clojure.org/display/design/Release.Next+Planning

13:16 arrdem: so is some guy with a very unfortunate name who chooses to lurk #clojure and disrupt my ERC nick highlighting.

13:16 noncom: exciting stuff all in all

13:17 hyPiRion: I was about to ask

13:18 arrdem: I've been voting him down for a while... the real answer is probably that I figure out how to make erc-highlight-nics ignore him and a dictionary of other obvious english words.

13:18 noncom: well, good luck with the work. hope to see some really cool things in 1.7 and also improve android-friendability

13:18 *friendliness :D

13:18 1.7 is next year?

13:19 arrdem: do I look like Rich? :P

13:19 hyPiRion: noncom: that is very hard to answer by anyone

13:19 noncom: ahah :)

13:45 mi6x3m: hey, clojure, what is more idiomatic for a namespace name

13:46 my_lib_prefix/core

13:46 or my.lib.prefix/core

13:46 cbp: probably my-lib-prefix.core

13:46 hyPiRion: mi6x3m: usually com.my-domain.lib/core

13:46 otherwise as cbp said

13:47 mi6x3m: with "-" ?

13:47 cbp: sure

13:47 just make sure the filename is underscored though

13:47 arrdem: really? I'd say that your project should be "com.my-domain/lib" and then lib.clj is your entry file.

13:48 hyPiRion: arrdem: that's the project name, not the namespace name

13:48 but sure, I agree with you

13:48 (perhaps that's what mi6x3m actually meant?)

13:48 arrdem: hyPiRion: sure, but I see including the project in the namespace path as redundant and verbose.

13:49 mi6x3m: yeah I ment the namespace name, I understand _ are used for "-" in the file paths

13:49 hyPiRion: oh, right

13:49 arrdem: hyPiRion: I used to do it, but I'm fixing my old code to remove it when I see it again.

13:49 mi6x3m: thanks :)

13:49 hyPiRion: arrdem: Gotcha now. Removing .core namespaces and so forth

13:49 arrdem: hyPiRion: yarp.

13:49 hyPiRion: for instance meajure is [me.arrdem/meajure "0.1.2"] (require 'meajure).

13:50 cbp: but single-segment namespaces =(

13:50 arrdem: up from (require 'me.arrem.meajure)

13:51 cbp: the rationale is that you don't really want my name all over your codebase in every require, even tho I wouldn't really mind.

13:51 hyPiRion: arrdem: right. I still do com.hypirion.libname for consistency, and in case someone uses the same name on a different project

13:52 technomancy: arrdem: single-segment namespaces end up in the default java package though

13:52 irctc: my first time on an irc chat. if i'm doing anything incorrect please let me know. I have an error when clojure repl using cider-connect: Error: (error "Cannot decode message: ; CIDER 0.7.0alpha

13:52 technomancy: arrdem: it doesn't make sense to qualify your artifacts but not your namespaces

13:52 irctc: any help would be greatly appreciated

13:52 arrdem: irctc: known bug in cider, under investigation, just ignore it.

13:52 irctc: it doesn't disable cider, it's just annoying.

13:52 irctc: ok

13:52 thx

13:53 technomancy: irctc: the cider on marmalade should be unaffected

13:53 irctc: it just doesn't give me the an error message when i do something wrong in the repl or call something incorrectly

13:53 gtrak: arrdem: I've been wondering about a leiningen re-root plugin.

13:54 arrdem: gtrak: what for?

13:54 gtrak: oh to rename an entire ns tree?

13:54 gtrak: to address like multiple versions of a clojure dep. yea

13:54 irctc: I will try the the marmalade repo

13:54 thx again everyone

13:54 arrdem: gtrak: I've been playing with that idea too... some future version of Oxcart may support dep de-aliasing by version number at compile time...

13:54 technomancy: gtrak: have you seen metaverse?

13:54 gtrak: arrdem: about 2 years away on my mental queue :-)

13:54 technomancy: no

13:55 arrdem: gtrak: technomancy already built something like this.

13:55 gtrak: of course he did.

13:55 technomancy: gtrak: poc https://github.com/technomancy/metaverse from a seajure hack night

13:55 hyPiRion: irctc: I presume that's a bug they're trying to fix in cider or find a good solution to it. Here's a pull request showing that they are aware of the issue at least: https://github.com/clojure-emacs/cider/pull/572

13:55 technomancy: spoiler alert: unless you can also re-root java classes, it's not a generally-applicable strategy

13:55 gtrak: awesome!

13:55 technomancy: yea.. well, just don't use libraries that use anything but the standard lib.

13:55 :-)

13:56 technomancy: problem solved

13:57 arrdem: it also means all your code will port trivially to cljx...

13:57 if only we had a cljx standard

13:57 gtrak: technomancy: I think it's a useful thing in the context of codeq and future 'env-as-a-value' efforts.

13:58 technomancy: gtrak: yeah, I like the idea of namespaces becoming more of first-class values

13:59 arrdem: gtrak: did you see kiss's immutable namespaces?

13:59 gtrak: no!

13:59 ah yea, mikera loves that stuff

13:59 arrdem: https://github.com/mikera/kiss

13:59 gtrak: that's the idea.

13:59 irctc: hyPiRion: thank you

14:00 gtrak: I want like a distributed repl with something similar to git-merge :-)

14:00 arrdem: https://github.com/dogecoin/dogecoin/pull/547 best issue evar

14:00 gtrak: arrdem: also netkernel.

14:01 building on top of something like that would give our repls RESTful caching :-)

14:01 technomancy: arrdem: I have pondered whether replacing namespaces with actual values would involve changing clojure into something that's no longer clojure

14:01 gtrak: what *is* clojure?

14:02 arrdem: technomancy: I was just thinking about that as well and at an implementation level I think it'd make clojure a lot closer to javascript, but I like the idea of decoupling namespaces from our gigantic global var table.

14:02 hyPiRion: irctc: you're welcome. I hope there will be some fix available soon as well, as it's mildly annoying.

14:02 arrdem: gtrak: whatever rhicky says it is

14:02 hyPiRion: technomancy: I think the reason to not do that was for performance reasons

14:03 arrdem: hyPiRion: Oxcart will likely do exactly that internally for performance reasons :P

14:03 technomancy: hyPiRion: I feel like it's a compromise between performance and still supporting interactive development

14:04 and to clarify I'd rather have retroactively-applied recompilation (which MLs lack) than immutable namespaces

14:04 I just wonder if there's a way to get both

14:04 arrdem: technomancy: got a source on that? retroactive recompilation isn't something I'm familiar with or that google pulls up trivially.

14:05 technomancy: arrdem: well, imagine if you replaced ns-map with a regular phm that got swapped into an atom

14:05 hyPiRion: technomancy: I agree, but I'm not sure the people in control agrees with us

14:05 or whether that would be a soft transition, for that matter

14:05 technomancy: arrdem: all consumers would point to the value of the fn at the time they were compiled, and if the fn got recompiled, they would call the old value

14:05 which is how ML works

14:06 hyPiRion: it would be easy to experiment in userspace if we had egalitarian-ns

14:06 arrdem: technomancy: sure. if I get my StaticVars that's how clojure may work in future as well.

14:06 technomancy: (which is what I'm calling the ability to have fully-qualified :my.ns/clauses in ns)

14:07 arrdem: iiuc this is basically the whole reason vars exist

14:07 arrdem: technomancy: right, because if we did compile time static binding vars wouldn't need to be dynamic and we could get rid of them entirely which is what Oxcart seeks to do.

14:08 technomancy: the issue is that we _have_ dynamic binding with vars, and people seem to like it, so what we could do is just add StaticVars which can't be altered and which provide better performance due to not having a transient root value.

14:08 technomancy: arrdem: this doesn't really have anything to do with dynamic binding

14:09 I'm talking strictly about reloading

14:10 bhauman: technomancy: I’ve been abusing clojurescripts reloading behavior where old defenitions are just balsted awy by new defenitions

14:10 arrdem: technomancy: this impacts reloading as well because if you "silently" rewrite a var at application runtime by a backdoor repl, all the code will re-resolve the var next time it's used and everything will (hopefully) transition correctly. what you're saying (and I would tend to agree) is that reloading code _shouldn't_ have this transition effect but I may misunderstand.

14:10 technomancy: arrdem: yeah, from an implementation perspective they're related

14:11 gtrak: arrdem: isn't there some internal JVM API that they were considering using for this?

14:11 i forget what that's called.

14:11 jvm critical XXX something

14:12 arrdem: gtrak: look at me, now look the jira log, now look back at me now look at the core repo, do I look like I know what the core team is doing? I didn't think so.

14:12 gtrak: crap, this is incredibly relevant :-)

14:13 it has to do with the polymorphic inline cache.

14:13 stuartsierra: The JVM has an internal feature called 'safepoints' but I don't think it's accessible.

14:13 gtrak: yea, that's what it is.

14:14 arrdem: http://blog.fogus.me/2011/10/14/why-clojure-doesnt-need-invokedynamic-but-it-might-be-nice/

14:14 sdegutis: Does Clojure have a shortcut for creating and deleting a temporary file, along the lines of (clojure.core/with-open) ?

14:15 Right now I have an extra let-block with my (java.io.File/createTempFile) call, and later I call (.delete %) on it. But I'd love to be able to put it in with my (with-open) call or something instead.

14:16 arrdem: (defmacro with-temp-file [] ..)

14:16 gtrak: sdegutis: you could make a record and implement Closable.

14:16 sdegutis: Thanks.

14:16 gtrak: what am I, a clojure factory?

14:17 arrdem: I think we're all λ coffee → irc → code

14:17 kenrestivo: arrdem, technomancy: wasn't there a presentation on this at cljwest, and isn't there a gsoc project to do this?

14:18 arrdem: kenrestivo: this undefined please clarify

14:18 * arrdem steps away for more 0xCOFFEE

14:18 kenrestivo: eliminate dynamic vars for performance, arrdem

14:20 http://m.youtube.com/watch?v=8NUI07y1SlQ

14:20 tbaldridge: kenrestivo: yes there are two such GSOC projects, arrdem is working on one

14:20 kenrestivo: cool, thx

14:21 tbaldridge: kenrestivo: one uses the existing compiler to eek out a bit more performance, arrdem is working on a tools.analyzer "rewrite". And Rich is currently working on some surgical tweaks that should improve startup time: https://github.com/clojure/clojure/tree/fastload

14:23 kenrestivo: nice, that's all coming together faster than i expected

14:23 arrdem: "faster" riiiiight

14:24 tbaldridge: there's a ton of work to do, and none of these projects are very far along. More like three different approaches to a single problem.

14:24 kindof, actually what Rich is working on is less about performance and more about startup time.

14:30 arrdem: LT 0.6.6 now live...

14:31 gtrak: node-webkit has some weird cross-platform issues with initialization.

14:31 eg: certain things are available at different times, like node contexts.

14:32 I'm still working through them.

14:32 but it's super-fun with CLJS and weasel-repl.

14:33 I guess LT is proof that it can work :-)

14:33 bhauman: arrdem: Do you what cljs version the new LT is using?

14:33 arrdem: bhauman: neg

14:34 * bhauman goes to look at source

14:34 gtrak: I haven't had any surprises at all with CLJS itself there, though seems like node has setImmediate but core.async can't see it.

14:35 I thought I could use that to fix an async issue, but it turned out to be something else.

14:39 does anyone have a node-webkit test runner?

14:40 daGrevis: What can I call first on hashmap? if hashmap doesnt have an order, there are no first entry and it's pure random.

14:40 gtrak: daGrevis: it does have an order, you just shouldn't rely on it.

14:41 for instance, keys and vals will return things in entry-order.

14:41 daGrevis: gtrak, easy way to shoot yourself in foot, imo

14:41 arrdem: daGrevis: sure, but usually you use map or for or some other sequence comprehension over the whole map not first.

14:41 gtrak: ,((juxt keys vals) {:a 1 :b 2 :c 3})

14:41 clojurebot: [(:c :b :a) (3 2 1)]

14:41 stuartsierra: `first`, like all sequence functions, implicitly calls `seq` on its argument. `seq` will give you a sequential view over any data structure, regardless of whether or not it is ordered.

14:43 gtrak: , (into {} (for [[k v] {:a 1 :b 2 :c 3}] [k (inc v)])) ;; here's where you might want to do that.

14:43 clojurebot: {:c 4, :b 3, :a 2}

14:44 daGrevis: hmm

14:46 lintomas: join #list

14:46 :D

14:46 sorry

14:46 gtrak: lintomas: you have joined a lisp.

14:47 daGrevis: how lisp is clojure?

14:47 * daGrevis hides

14:47 gtrak: lisp isn't clojure, unless it's clojure.

14:48 daGrevis: hmm, again

14:48 technomancy: lisp stands for list processing

14:48 since clojure supports data structures that aren't lists, it's obviously a bastard lisp. true lispers are happy to use nothing but lists.

14:49 daGrevis: ha:D

14:49 arrdem: technomancy: and run their CPUs at memory speeds chasing cons cells..

14:50 gtrak: pssh reality.

14:50 lisp can mean 'lots of irritating silly parentheses', clojure has less of those.

14:51 p_l: it instead has extranerrous reader macros playing syntax ;)

14:51 though I do find it funny that Lisp's "syntax" is such an accident of laziness and "meh, good enough"

14:51 arrdem: p_l: the datastructures you want and reader literals that make you want to use them...

14:52 TimMc: Ugh reader literals.

14:52 gtrak: I rather enjoy the #js one.

14:53 daGrevis: <p_l> though I do find it funny that Lisp's "syntax" is such an accident of laziness and "meh, good enough"

14:53 haha nice

15:01 gtrak: Clojure has made me so anti-syntax, I just snarl when I see something clever-looking.

15:02 while at the same time making it easier to pick up new syntaxes.

15:03 by virtue of considering how anything could've better been implemented in macro form.

15:07 p_l: daGrevis: S-expressions are essentially "okay, we can input the programs in serialized AST, we will write the parser later"

15:09 johncash: has anyone worked on a version control software backed by clojureesque data structures

15:10 gtrak: johncash: seen codeq?

15:10 it's kind of like that

15:11 johncash: that uses git for version control though

15:11 im talking about using clojure datastructures as the version control

15:11 gtrak: it imports git data into clojure datastructures.

15:11 arrdem: the difference being..?

15:11 gtrak: which means it could serve as a basis for something like that.

15:12 it uses git like mercurial uses git when it says it's compatible with git.

15:12 johncash: ah

15:12 cool, thanks

15:13 (inc gtrak)

15:13 lazybot: ⇒ 12

15:13 johncash: Kind of ironic that inc is side affecting here

15:14 gtrak: (swap! karma update-in [gtrak] inc)

15:14 piranha: yeah, should be kind of (swap! gtrack inc) :)

15:14 oops, s/ck/k

15:15 johncash: CompilerException java.lang.RuntimeException: Unable to resolve symbol: gtrak in this context

15:15 ;)

15:19 I am not a number, I am a man, a free man!

15:19 * johncash goes back to the corner

16:06 kenrestivo: maybe someone could rename inc to inc!

16:08 Glenjamin: (inc! kenrestivo)

16:14 arrdem: so er... tree shaking is lifting.

16:14 s/lifting/working/g

16:24 akhudek: Apple’s new language has a LitghtTable like IDE. O.o

16:25 stompyj: yeah, it looks like what would happen if we threw dozens of devs @ lighttable for a year or so O_o

16:26 * arrdem has faith in ibdknox's ability to take on dozens of Apple devs

16:26 jjl`: they seem to have finally just gone and done all of the plumbing they should have done years ago

16:27 quite an astonishing amount in a short time, unless they've been saving this up

16:34 alpheus: What do people use with Google's App Engine? appengine-magic has a lot of utility but it's using an old version of the sdk.

16:35 Glenjamin: has anyone seen any notes about the closed/open-ness of swift?

16:36 given that they developed the whole thing in the dark i'm not expecting it to be very open

16:37 technomancy: Glenjamin: what, that new programming language created by the developers of Dylan and HyperTalk? I'm sure it'll be fine.

16:37 s/developers/creators/

16:38 Glenjamin: i had to google those

16:38 and from the results, i suspect sarcasm :)

16:38 imagine if they'd spent this engineering effort on a language people already used =/

16:39 arrubin: Glenjamin: I suspect that he is referring to this: http://swift-lang.org/

16:39 Glenjamin: oh

16:39 arrubin: Although I do not know for sure.

16:39 Apple even links to it on their Swift page.

16:39 Glenjamin: those other 2 languages were created by people at apple

16:40 arrubin: Glenjamin: I do not think that they are at Apple anymore.

16:40 Glenjamin: "even links to" -> "stole name of"

16:40 arrubin: I could be wrong.

16:40 arrdem: technomancy: have you heard anything about the build profiles system?

16:40 technomancy: arrdem: hm?

16:41 arrdem: technomancy: I'll take that as a no. Looking at http://dev.clojure.org/display/design/Build+Profiles wondering if there's a build configuration datastructure I can build off of.

16:45 technomancy: yeah, that's news to me

16:46 arrdem: I figured that whatever they come up with would likely turn into leiningen config and that you'd know as a result. apparently not.

16:46 * arrdem foods

16:47 stompyj: arrdem: L2SOYLENT

16:47 jk

16:48 technomancy: heh

16:51 Glenjamin: i was reading up on build-profiles earlier, seemed like they were looking to use build classifiers

16:57 arrdem: stompyj: but dead pigs are tastier than dead people...

17:02 stompyj: arrdem: well played

17:02 (inc arrdem)

17:02 lazybot: ⇒ 28

17:03 noncom|2: actually, they say that human meat is rather tasty

17:03 sdegutis: "Haskell rules, Clojure sucks, and anyone who disagrees is inhuman."

17:03 Am I doing it right?

17:03 stompyj: hahahaha

17:04 its funny, for both clojurists and haskellians, theres much better languages to be taking pot shots at then each other

17:04 sdegutis: I like Haskell, it's pretty cool.

17:04 Also Clojure is nice too.

17:05 stompyj: Yeah, if I had to use clojure or haskell at work

17:05 life would be pretty sweet

17:05 sdegutis: While I don't like Perl, I'm not going to throw into question the intelligence of someone who does.

17:05 technomancy: sdegutis: then you'll never make it as a high-level troll master

17:05 stompyj: ASP.NET, BASIC, F#, PHP, there are plenty of languages I’ve had to use that were much more painful

17:06 technomancy: hesitation is seen as weakness

17:06 stompyj: COLDFUSION

17:06 technomancy: I’m not sure if you’re being serious, but you’re right

17:06 arrdem: technomancy speaks the truth, you must unquestioningly bash the intelligence and sanity of all who oppose you

17:06 sdegutis: technomancy: those days are behind me.. these days I eat poptarts instead of trolling.. much tastier pasttime

17:06 arrdem: sdegutis: dude. tears are totally underrated

17:06 technomancy: sdegutis: heresy; zebra cakes are the best snack

17:07 systemfault: stompyj: I’ve heard nice things about F# (Didn’t try it though)

17:07 technomancy: poptarts are for quiche eaters

17:07 stompyj: some of us cant’ eat gluten anymore

17:07 and miss said zebra cakes

17:07 heh

17:07 arrdem: zebra eh?

17:07 technomancy: arrdem: I have no idea

17:07 * arrdem digs in the closet for a .50

17:07 sdegutis: technomancy: !!

17:08 stompyj: my son has a gluten allergy, we just found out.. :(

17:08 stompyj: systemfault: I wasn’t a fan, but i had to use it under distressing circumstances, and that may have been the issue

17:08 technomancy: sdegutis: I didn't grow up in this hemisphere

17:08 sdegutis: technomancy: that's quite an exaggeration.. poptarts easily rival zebra cakes

17:09 technomancy: stompyj: yeah F# really doesn't belong on a list with those other things

17:09 stompyj: sdegutis: I had “IBS and ‘anxiety’” issues for 13 years, spent probably a good 100k on tests (via insurance), etc. then one day my friend was like… stop eating gluten, and within 2 weeks I was right as rain

17:09 sdegutis: wooow

17:09 technomancy: sdegutis: stroopwafels or gtfo

17:09 stompyj: sdegutis: sorry to hear it tho, it’s a hard adjustment, mostly because gluten free is trendy and costs $$$ now :/

17:10 sdegutis: stompyj: meh, rice is surprisingly delicious, esp with hot sauce or butter or other flavorings

17:10 arrdem: stompyj: which is funny because it has zero correlation with improved health..

17:10 sdegutis: and many meats dont have gluten in them

17:10 technomancy: yeah, actually that's a drag; sorry to hear it

17:10 sdegutis: technomancy: now whos the one talking heresy sir

17:11 systemfault: stompyj: Really? I’ve been suffering from IBS for about 15 years now, if I have to go outside for a long time, I always get 2 immodiums to help :(

17:11 stompyj: yeah, its weird, I used to throw up at the mere smell of raw flour, and no doctor ever knew why…. now in retrospect, it makes all the sense in the world

17:11 sdegutis: technomancy: lets just agree that zebra cakes and brown-sugar and cinnamon poptarts are both the best food ever

17:11 systemfault: stompyj: Perhaps I should try a gluten-free diet.

17:11 stompyj: systemfault: I had the same issues, my wife lived in NYC and I was scared to go out where I wasn’t near a bathroom

17:12 kenrestivo: i'm fascinated by mefical/health trendiness. it's a lot like language trendiness. but then, these things do work for various people and situations, to varying degrees

17:12 stompyj: systemfault: you should, among the list of things gluten affected: upset stomach, acne, daily migraines, short term memory loss, sore joints

17:12 kenrestivo: er, medical

17:12 stompyj: once I stopped gluten for 2 weeks, it all went away

17:13 systemfault: I might be cynical, but I now think that “IBS” is a doctors way of saying “I dont know, but you wont’ like that answer"

17:13 kenrestivo: i went vegan and solved some health problems that way

17:13 stompyj: kenrestivo: yeah, I do a meatless day a week now

17:14 sdegutis: hmm i do pizza rolls about once a day these days

17:14 stompyj: hahahahah

17:14 JEALOUS

17:14 totinos

17:14 sdegutis: dont worry im probably taking 50 years off my life this way

17:14 stompyj: I love them

17:14 love(d)

17:14 sdegutis: at least you will live to like 125-ish

17:14 systemfault: stompyj: Thanks for the info, I guess it’s worth trying for 2 weeks.

17:15 stompyj: systemfault: yeah, it can’t hurt. I never liked gluten all that much, so it was easy to give up

17:15 just have some rice or potato chips around all the time

17:15 sdegutis: rice is super cheap and super tasty with butter

17:16 stompyj: becuse if you cut gluten out you’ll cut your calories by like 75%

17:16 sdegutis: i could probably replace mac+cheese with rice+butter and be perfectly happy

17:16 wait hold on let me rethink that statement before i make it official

17:16 stompyj: yeah, get some good grass-fed butter, and it’s game on

17:16 kenrestivo: sumac is nice on rice too. and oil is nice if butter isn't an option

17:16 #clojure-cooking

17:18 stompyj: systemfault: if you have any of those toher symptoms I laid out, definitely try and reduce gluten intake

17:18 it made me a whole new person

17:19 systemfault: stompyj: Yeah :)

17:19 stompyj: gluten sensitivity is very common in “germanic” people as well

17:19 in case you are of germanic stock

17:19 systemfault: I’m not but still good to know :P

17:21 sdegutis: Besides, vegetables are actually very filling if you eat the right amount of them.

17:22 cbp: sounds more like #clojure-microwaving

17:22 sdegutis: Did you ladies and gentlemen hear about the new Swift language, positioned to rival Clojure?

17:22 * cbp hides

17:22 sdegutis: (at least on the iOS front)

17:23 bhauman: sdegutis: i have been working on a thin like swifts plaground for ClojrueScript

17:23 arrdem: iOS, which has no JVM, "rival", "clojure".

17:23 sdegutis: bhauman: fascinating, is it on GiThub?

17:23 bhauman: yeah I was gonna release it today

17:24 sdegutis: bhauman: Excellent. Your ideas are intriguing and I wish to subscribe to your newsletter.

17:25 bhauman: sdegutis: thanks man

17:28 stompyj: bhauman: you’re the cat who did the real time flappy bird post

17:28 awesome

17:28 all our devs here loved that

17:28 bhauman: stompyj: thanks man, you make me feel like I should learn sax

17:29 stompyj: oh! haha, becuase I called you a cat. I thought you knew I played jazz sax

17:29 :)

17:29 well, if you ever decide you want to learn, I can teach you :)

17:29 arrdem: hahah

17:30 bhauman: I play guitar

17:30 folk guitar

17:30 I’m in Asheville NC after all

17:31 I didn’t know you played sax, whats up with Clojure and Jazz?

17:32 stompyj: Haha, two great tastes that taste great together :)

17:32 bhauman: Haha

17:32 stompyj: Maybe its the mathematical underpinnings of both

17:32 bhauman: that works for me

17:32 slpsys: mercifully, not everyone in asheville is required to play folk: http://makenoisemusic.com/modules.html

17:33 bhauman: yeah we have moog and moogfest

17:34 slpsys: true! i almost went with some coworkers, but flights were expensive by the time we were talking about it

17:35 bhauman: I missed it myself. I feel a little aged out of that stuff.

17:37 stompyj: mmmmmm, moog! the creamiest of synths

17:37 arrubin: Are the Ubuntu Clojure and Leiningen packages no longer maintained?

17:37 technomancy: arrubin: more or less

17:38 arrdem: just like ArchLinux org-mode T_T

17:39 Hodapp: stompyj: you don't prefer your synths to be very blocky-tasting, like the Yamaha DX7?

17:40 stompyj: Hodapp: haha, man, I’ve never been able to program those synths! I wish I loved them!

17:40 Hodapp: I think I like the TR808 better...

17:41 arrdem: Bronsa: ping

17:41 technomancy: babilen: ^ has there been any progress on the lein2 dependencies?

17:41 Hodapp: but, the DX7 or Casio's equivalents could do some interesting things. FM and phase modulation synthesis were interesting, but took a lot of work to get good results (i.e. not sounding like the 80's) from

17:42 kenrestivo: the dx7 electric piano sound was a scourge upon humanity

17:43 stompyj: Hodapp: yeah, I’m really inspired by all the programming that’s gone into them, but when I get in front of one myself, all the creativity drains from my soul. it’s frustrating

17:44 kenrestivo: you need a patch editor. i'm told that this guy rich hickey wrote a great one for the atari st

17:44 Hodapp: whaaaat?

17:44 stompyj: you like the idea of them, you just don't like them? :P

17:45 but, I am trying to learn Overtone myself. I'm not too adept at the music side of things but I'm trying to learn

17:46 stompyj: Hodapp: when I listen to patches people make, I’m in awe of them, but when I say “OK, I’m going to make a cool patch myself”, I end up doing nothing

17:46 heh

17:47 Hodapp: stompyj: I have never dealt with a real analog synth but I played around with a bunch of tools that did the same synthesis technique, and really rather liked working with those

17:47 most of them I suspect were just doing variants on what Moog created

17:49 turbofail: i have a similar problem, i have plenty of musical training but no idea how to make interesting synth sounds

17:50 Hodapp: I have been using Overtone more to integrate some graphics into the event system

17:50 starting with Quil, hoping to move to Shadertone

17:50 too bad Quil only wants to work right on my Macbook. I get some wonky library error about something GL related if I try on my (much, much faster) Linux box

17:51 nbeloglazov: Hodapp: which quil are you using and what is the error you get on linux?

17:51 Hodapp: nbeloglazov: Can I let you know in a few hours when I'm home and can try it?

17:51 actually, let me see if I stuck a log file someplace I can find...

17:51 stompyj: Hodapp: yeah, I don’t use them as much as I wish I did.

17:52 nbeloglazov: Sure. Could you file an issue on http://github.com/quil/quil?

17:53 Hodapp: nbeloglazov: Sure, I'll try to do that tonight

17:53 nbeloglazov: Hodapp: thanks!

17:53 Hodapp: nbeloglazov: You a dev/maintainer/creator of Quil or something?

17:53 nbeloglazov: maintainer

17:54 Hodapp: nbeloglazov: alrighty, good to know :)

17:54 I love Processing, but want to stab Java in the face, and the Processing IDE at the same time.

17:56 stompyj: Hodapp: re: Overtone and music, don’t worry about being adept at the music side, music is just emotion and expression, which all of us have. Studying just allows us to move faster. If you enjoy yourself, it will all work out.

17:59 bbloom: dnolen_: congrats on being a thought leader

17:59 actually, rock on entire clojure community

17:59 ::big hug::

18:00 tjgillies: is there a resource where this was called out or are you just being supportive in general?

18:00 bbloom: https://twitter.com/jckarter/status/473557476302802944

18:01 ambrosebs: wow!

18:01 arrdem: .... dang

18:02 tjgillies: today I learned about Swift

18:02 http://swift-lang.org/

18:02 is that what they were talking about ^ ?

18:02 bbloom: not that one

18:02 https://developer.apple.com/swift/

18:02 announced today

18:02 arrdem: no, today everone's day was ruined by the swiftpocalypse

18:02 tjgillies: oh

18:02 turbofail: lol

18:02 tjgillies: WWDC stuff

18:02 turbofail: pandemonium ensues

18:02 arrdem: thousands of programmers nerdsniped by the Apple hypetrain for a new lang

18:03 tjgillies: did not even notice

18:03 gtrak: yay walled gardens planted a new tree.

18:03 bbloom: oh c'mon now guys

18:03 dnolen_: bbloom: heh, yeah I was surprised by that

18:03 stompyj: swiftpocalypse, lol

18:03 arrdem: tjgillies: someone doesn't watch the hacker news frontpage closely enough..

18:03 nbeloglazov: So now there are 2 Swift languages?

18:03 dnolen_: but I guess my explanation was simpler and sometimes easier to just see an imlpementation

18:04 bbloom: dnolen_: oh yeah, damn academics and their big words and fancy symbols.... just fucking show me the code!

18:04 :-)

18:04 gtrak: I'm still waiting for my llvm compiled linux distro :-)

18:04 bbloom: arrdem: gtrak: it's a big deal to a lot of folks who do iOS development & the language is actually quite well done

18:04 arrdem: gtrak: plus, it has a Bret Victor-ian playground repl thing, so it's going to raise the bar

18:05 gtrak: bbloom: sure :-)

18:05 zerokarmaleft: haha, @worrydream: "okay, I just got out of my meeting, why is everyone texting me"

18:05 dnolen_: Swift shipped with a REPL and a friendly dev environment on day one

18:05 that's pretty crazy for a lang intro

18:05 gtrak: that just means they've been sitting on it for quite a while

18:05 akhudek: yeah, I was pretty shocked

18:06 bbloom: gtrak: sitting doesn't really describe what happens to get you to such a toolchain lol

18:06 dnolen_: did you figure out how they are doing their time travel stuff?

18:06 gtrak: how many iOS dev utils were wasted during that time on Objective-C, heh.

18:06 bbloom: dnolen_: library level hackery, or functionally pure evaluator?

18:07 gtrak: utils in the econ sense

18:07 arrdem: gtrak: probably just enough to transition, depending on how hard they're pushing this thing.

18:07 bbloom: arrdem: i think no pushing is needed. people will flee objc in a hurry

18:07 arrdem: bbloom: no disputes of that here

18:08 gtrak: I'm sure it's a fine language, but will it let me write code and compile it on my iphone without a mac and a fee?

18:08 bbloom: swift also seems in the vein of coffeescript, clojure, elixir, etc... embrace the host

18:08 gtrak: I guess that's my fault for buying an iphone

18:08 tjgillies: I like that swift is ECMA

18:08 giant-shoulder-standing is nice

18:10 at least it says ECMA in wikipedia article, it also says citation needed

18:10 I'm kinda jealous we don't have an android native non-java language now

18:10 gtrak: I was hoping go would do that (android)

18:11 like years ago..

18:11 nbeloglazov: android native non-java language - c++? :)

18:11 gtrak: UI toolkit?

18:12 Hodapp: ewww.

18:12 arrdem: native binaries are a poor idea on android generally... I'm a fan of using the JVM to smooth over hardware differences, but Dalvik can't be replaced too soon.

18:13 gtrak: arrdem: until the lawsuit you mean :-)

18:13 nbeloglazov: Well, dalvik is being replaced by art

18:13 tjgillies: even a non java android-official JVM language would be nice

18:13 arrdem: gtrak: le sigh. yeah. if they could get that out of the way and get on with building art that'd be awesome.

18:13 nbeloglazov: Though I don't know exact differences between them

18:14 gtrak: I'd be really happy with clojurescript and good bindings there.

18:15 tjgillies: clojurescript with swift as the host

18:15 birdscript?

18:16 arrdem: org.clojure/avian

18:16 gtrak: clojurescryft

18:16 cbp: it has to be lame so clojureswift

18:17 tjgillies: (inc cbp)

18:17 lazybot: ⇒ 8

18:22 noncom|2: clojurecrypt

18:28 bhauman: If swift lives up to its promises, this is a pretty big coup

18:28 Bronsa: arrdem: a bit late but pong

18:29 arrdem: Bronsa: no worries. I seem to be able to kill cider with this...

18:29 Bronsa: (do (clojure.tools.emitter.jvm/load "clojure.core") (load <anything>))

18:29 Bronsa: after reloading the core with your toolset I get interesting errors in ns-refers.

18:30 Bronsa: this isn't blocking for me, just wanted to share.

18:30 Bronsa: arrdem: yeah I already know about that

18:30 arrdem: kk

18:31 Bronsa: arrdem: it has to do w/ how tej handles type hinting, related to TANAL-24

18:38 noncom|2: someone said that swift is ecma. why is this good? (i know what is ecma)

18:38 turbofail: in theory that means there's a standard against which to build alternative implementations

18:39 thus not leaving you trapped on iDevices

18:39 noncom|2: interesting..

18:45 justin_smith: which will likely get about as much traction as gnustep and mono did

18:45 p_l: justin_smith: mono actually got a lot of traction...

18:46 (that's what runs Unity)

18:46 the game engine, that is :)

18:46 noncom|2: i program for unity on my work)

18:47 justin_smith: I was going to say, unity is not all that popular (the ubuntu replacement for gnome, which I would not be at all surprised to hear was done in mono)

18:47 noncom|2: nono

18:47 the unity game engine

18:47 justin_smith: right

18:48 noncom|2: oh i understand :)

18:48 cbp: Is it kosher to do (send *agent* whatever) ?

18:49 to uh send inside a send

18:49 noncom|2: hmmm.. what about a recursive send?

18:49 cbp: actually i don't need to, nevermind

18:50 dbasch: I wonder if this book is worth the $25 http://www.packtpub.com/clojure-for-machine-learning/book

18:50 noncom|2: but i think that would be fine.. unless you can refactor it to become unnecessary

18:50 gtrak: cbp: sure.

18:50 that's like continuation-passing.

18:51 arrdem: dbasch: http://www.amazon.com/dp/1783284358/?tag=packtpubli-20

18:51 dbasch: I'd call it 50/50

18:52 dbasch: arrdem: yeah, I read the reviews, figured it might do for some interesting bedtime reading

18:54 arrdem: dbasch: I'm gonna guess that it's probably got a two-three chapter Clojure introduction and the rest of it is a ML learning intro. Unless you're interested in the specific uses of Incanter etc. I'd probably go with a more general ML book, but that's just my 40Ɖ

18:54 justin_smith: dbasch: I got the packt press book on clojure performance optimization, it was a little rough around the edges in terms of the editing, and shorter page count than I expected, but it was a useful book with good content

18:54 dbasch: justin_smith: yeah, I got a review copy of that one

18:54 arrdem: justin_smith: would you suggest it?

18:55 justin_smith: arrdem: yeah, despite the high price/page it is good

18:55 rplaca: dbasch: I was a tech reviewer of the Clojure for ML book

18:55 dbasch: justin_smith: arrdem http://www.amazon.com/review/RER03X04ENOB4/ref=cm_cr_pr_perm?ie=UTF8&ASIN=B00GTE1RVW

18:56 rplaca: Whether it's a good buy depends on what you already know

18:56 arrdem: aw man the crap the TACC folks would give me for that title :P

18:57 dbasch: cheers, I'll check it out.

19:00 rplaca: arrdem: that's not what that book is about at all

19:00 aphyr: What's the right way to encode dynamic state that controls how a macro works?

19:00 rplaca: it assumes you know Clojure from the get go - so it's a good reasonably mathematical intro to ML based in Clojure

19:01 arrdem: dbasch: oi rplaca reviewed the ML book.

19:01 rplaca: with a lot of dicussion of what resources are available

19:01 *discussion

19:01 justin_smith: aphyr: dynamic compile time state?

19:01 technomancy: aphyr: for real?

19:01 aphyr: e.g. I've got a macro that compiles in one of two ways depending on a flag, and I'd like to do something like (binding [*test-mode* true] (my-macro whatever)) and have my-macro see *test-mode* true at compile time

19:01 rplaca: not too much Incanter - more core.matrix and stuff

19:02 technomancy: two macros?

19:02 aphyr: But naturally that isn't going to work because the binding takes effect at runtime, not macroexpand time

19:02 rplaca: It's not perfect, but I think it's a pretty good deal for $25

19:03 aphyr: been messing around with various permutations of eval/let but haven't figured it out yet

19:09 turbofail: aphyr: maybe bind test-mode when you require the namespace that uses said macro?

19:10 kind of awkward but i don't know how else i'd do it

19:10 other than technomancy's suggestion

19:10 aphyr: Yeah I think there have to be two macros

19:10 just not sure how to get the state from one to the other

19:11 technomancy: impure macros just sound like a recipe for confusion

19:11 aphyr: technomancy: It's for writing tests for impure operations in Riemann.

19:12 Ideally you'd like to compile the tests clean out when you go to production mode

19:12 So *test-mode* says "Oh, just omit all the complicated locking/scheduling/IO code for this path"

19:13 technomancy: I would use namespace shadowing

19:13 aphyr: (or rather, "opt into all that code"; this is a test")

19:13 technomancy: test macro goes in test/ but overlapping dummy macro lives in src/

19:13 aphyr: also does suppression/capture of IO side effects, etc

19:14 PigDude: any fireplace.vim users also using cljx? I don't care about testing cljs from vim, but I need to compile the cljx files down, and also jumps point to generated clj files and not cljx

19:14 or even using cljx successfully this way in emacs?

19:14 aphyr: technomancy: hmmmmmm, yeah, so I guess I could override the macro definition when running tests

19:14 PigDude: it takes 20s to build right now so it really gets in the way

19:15 technomancy: aphyr: two macros, they just happen to have the same name and namespace

19:15 bhauman: technomancy: can you namespace shadow a required lib?

19:15 technomancy: It looks like a profile merge is the best way to do that?

19:15 aphyr: technomancy: Ideally this would be thread-safe so I could test while prod code is compiling

19:16 So I guess I could def the macro itself as dynamic

19:16 then bind it and eval the code being tested

19:16 hmm that sounds like we're back to square one

19:16 technomancy: bhauman: sure

19:17 bhauman: technomancy: profile merge then?

19:17 technomancy: bhauman: you get profile merges for free with the default lein invocations

19:18 bhauman: the only thing that's relevant here is that test/ is on the classpath during development but not during uberjarring

19:20 bhauman: technomancy: yeah I am thinking about writing a noop library to shadow out functionality that is in my source that I only want to work at dev time. But when others require the lib i don’t want the functionality to run.

19:20 technomancy: sure; that would make sense

19:21 bhauman: :dependancies ^:replace [[lib1] [lib2]]

19:27 pcn: Does anyone have a minute to test out modern-cljs tutorial-5 to see if I'm crazy or not?

19:28 s/I'm/my computer/ I guess

20:54 tomjack: if I'm inside a WriteHandler, can I decide to cache the entire object I'm writing?

20:54 (in fressian)

20:56 seems like it's too late?

21:05 arrdem: hum... it seems that persistent! is not recursive much to my surprise.

21:07 catern: woah! I did not know about clojure.repl/source, this is totally awesome

21:08 amalloy: arrdem: recursive?!?!?

21:09 arrdem: amalloy: if I have nested transients I'd expect to be able to persist the whole damn thing recursively with on call, but I guess the pointer semantics of that are dangerous.

21:09 amalloy: it's guaranteed to be like O(1); there's no way it should be traversing the whole data structure for any reason, let alone because you might be nesting transients

21:10 arrdem: ,(doc persistent!)

21:10 clojurebot: "([coll]); Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used after this call, any such use will throw an exception."

21:10 arrdem: "in constant time". meh.

21:11 all I want is a memory shared single update AST....

21:11 don't really want to bust out my old CES code for this.

21:16 tomjack: what is even the point of writeAs?

21:16 only useful if the object's class lookups to a solo entry with a magic "any"?

21:17 I guess the fact that it throws an error if the tag is wrong might be useful

21:39 jumblemuddle: I'm trying to get a play-clj project setup, and working in vim with vim-fireplace. Atm I'm able to run a repl in the 'desktop' project directory, then start vim in a separate tmux window. In order to run the project I got to the desktop_launcher.clj file, and run the 'cpp' hotkey on the (LwjglApplication...) line, but when I manually close the game, the repl crashes.

22:38 eraserhd: ,(flatten {:foo :bar, :baz :quux})

22:38 clojurebot: ()

22:39 eraserhd: ^^ Intentional?

22:39 aphyr: ,(sequential? {:foo :baz})

22:39 clojurebot: false

22:39 dbasch: eraserhd: that’s not a sequence

22:39 aphyr: Docs do say it takes *sequential* things, so I'd expect a type error, not empty list.

22:39 dbasch: (doc flatten)

22:39 clojurebot: "([x]); Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat sequence. (flatten nil) returns an empty sequence."

22:40 nullptr: ,(flatten (seq {:foo :bar, :baz :quux}))

22:40 clojurebot: (:baz :quux :foo :bar)

22:40 eraserhd: Ah, not seqable.

22:40 Which makes sense, actually. I mean, that it doesn't do seqables, not that it gives ().

22:41 MagBo[MURT]: hey beautiful people

22:42 I'm a complete clojure newb, planning to use it only for clojurescript

22:43 I've cloned React/OM tutorial (project.clj: https://github.com/jalehman/react-tutorial-om/blob/master/project.clj) and trying to run ``lein ring server``

22:43 justin_smith: ~flatten also

22:43 clojurebot: excusez-moi

22:44 justin_smith: ~flatten

22:44 clojurebot: flatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.

22:44 justin_smith: also

22:44 MagBo[MURT]: I get an X window spawned for some reason :D how do I make it run in console.

22:44 s/\./?

22:44 justin_smith: lein ring server-headless

22:45 eraserhd: ,(apply concat {:foo :bar, :baz :quux})

22:45 justin_smith: the X window is needed because it wants to use the X api to make your browser open the page it serves

22:45 clojurebot: (:baz :quux :foo :bar)

22:45 MagBo[MURT]: justin_smith: much love your way, sir.

22:45 justin_smith: server-headless makes it not try to do that

22:50 rs0: i have a question about the Clojure 1.6.0 Java API

22:51 according to the release notes, the only Clojure classes that are not supposed to be considered implementation details are IFn and clojure.java.api.Clojure, which has #read and #var

22:51 i've got an open source project that does the equivalent of defmethod using pure Java code by directly invoking methods on the MultiFn class

22:52 i'd like to migrate to the official Java API, but I don't see a way to do that, since defmethod is basically a macro around a call directly into MultiFn.addMethod

22:58 justin_smith: wouldn't you be limited to sending strings to be interpreted as clojure code if IFN and clojure.java.api.Clojure are your only clean points of access?

22:58 perhaps you could write a clojure stub that would define the multimethods, and can be invoked easily from the java side?

23:05 rs0: justin_smith: currently this is a pure Java library. i could write a clojure stub of course, but that would add some complexity to the build process

23:06 justin_smith: but i can use Clojure#var to resolve arbitrary clojure functions and then invoke them. so i'm not limited to eval if that's what you're asking

23:06 justin_smith: this particular case is the *only* sticking point, actually. everything else i need to do, i can see how to do with Clojure and IFn

23:07 of course, macros are functions too... maybe i can just try invoking defmethod like anything else

23:09 gastove: ....does lein merge profiles automatically?

23:09 rs0: gastove: what do you mean? lein includes five different profiles by default

23:10 gastove: Say, if you've got .lein/profiles.clj with {:user foo} and a project_root/profiles.clj with {:user bar}, do you get a map with {:user foo bar}?

23:10 Or do you need to tell lein to merge 'em?

23:11 (I suppose I mean {:user [foo bar]})

23:15 trptcolin: straw poll: should it always be “syntax quote”? always “syntax-quote”? depends on part of speech (verb / noun)? depends on something else?

23:16 justin_smith: I think syntax-quote is the clearest

23:16 gastove: I'd argue that a "syntax quote" is a quote in a syntax, whereas as a "syntax-quote" is easier to understand as its own noun.

23:18 trptcolin: sweet, sold, it was a blowout

23:19 gastove: Is there a way to view the current project map within a lein repl?

23:20 See what's getting loaded in each profile?

23:25 trptcolin: gastove: not that i know of from the repl, but lein-pprint can be useful for that sort of thing: https://github.com/technomancy/leiningen/tree/master/lein-pprint

23:26 gastove: trptcolin: Hey thanks! Turns out there's also a cli tool -- `lein show-profiles`, with an optional argument of the profile you'd like to see vars for.

23:26 (I dunno why it took me so long to try `lein -h`.)

23:27 trptcolin: nice

Logging service provided by n01se.net