#clojure logs

2012-11-04

00:13hughfdjacksonis it convention to use dynamic scoping only in the case where you have some kind of impure function or state-holding var for testability
00:13hughfdjacksonor are there other common uses?
00:13hughfdjackson(elisp style configuration injection via scope? :P)
00:13bbloomhughfdjackson: configuration is a pretty common use case
00:14Rayneshughfdjackson: Every time I see your name I think I'm reading "hughjackman" and I get all excited.
00:14hughfdjacksonhaha
00:14hughfdjacksonI get disappointed
00:14hughfdjacksoni don't know if i exist in my own google bubble now, but it used to ask me if i meant hugh jackman whenever i was curious if people could find me by that
00:16hughfdjacksonbbloom: that's interesting; for some reason i thought that'd be a 'left behind' practice
00:16bbloomhughfdjackson: left behind by what?
00:17hughfdjacksonthe community
00:17bbloomhughfdjackson: i mean: replaced by what?
00:17bbloomhughfdjackson: consider a client library for an http api. It would be pretty reasonable to have (def ^:dynamic *api-endpoint* "http://api.example.com")
00:18bbloomyou could then pretty easily rebind that for different environments
00:18hughfdjacksontotally :) it was not a rational thought
00:18bbloom(binding [*api-endpoint* "http://api.example-test-server.com"] ...)
00:19dnolenhughfdjackson: it's also a useful way to push information deep into a program with the insane tedium of the threading that value everywhere.
00:19hughfdjacksonin answer to your 'by what' question: configuration injected into higher-order functions was my first guess
00:19bbloomfor sure! consider *current-user* :-)
00:19hughfdjackson:P i can see how writing that way would be a totally PITA though
00:20bbloomit's common in web apps to have a *request* var too
00:20hughfdjacksonthat holds? O.o
00:20bbloomthe current request....
00:20hughfdjacksonoop, we're in a one-thread spawned per user model?
00:21bbloomnot necessarily
00:21bbloombut there is only one executing piece of code per thread... kinda by the nature of um... threads....
00:21bbloomsee bound-fn
00:21bbloom,(doc bound-fn)
00:21clojurebot"([& fntail]); Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place."
00:23hughfdjacksonsmells like closing over dynamic scope
00:23hughfdjackson:D crazyness
00:23bbloomthat's what it is
00:25hughfdjackson:) thanks for the context, it really helps
00:29rlbRaynes: happen to know of anything like refheap for small images, even with a really short lifespan (for example, I have a 10k incanter plot I wanted to show someone)?
00:30rlb(someone for whome it wouldn't easier for me to just post the source...)
00:30rlbs/whome/whom/
00:30RaynesIs there a reason you've ruled out sites like imgur?
00:31rlbRaynes: ignorance?
00:31Raynes:p
00:31Raynesimgur is pretty nice. Don't think it requires registration.
00:31Raynesexifhost is something a friend works on, but I think it requires registration. It has the benefit of showing exif data, but I highly doubt you care in this case.
00:31rlbyeah -- thanks that might be exactly what I want.
00:32rlbright -- this is something they're welcome to trash an hour after I post it (and probably should)
00:33rlbthat reminds me I still mean to contact the incanter author about ssh -X/Y being broken -- see if it's something that can be fixed...
00:34bbloomrlb: imgur preserves images only if they get traffic
00:35bbloomrlb: which the FAQ apparently says 1 view per six months is all that's needed, heh
00:35rlbsaw that
00:40hughfdjacksoncron job? :D
00:41jyudoes anybody use the vimclojure, how to arrow up the prvious expression and it seems the C-CR does not work.
01:16bbloomjyu: the vimclojure maintainer is very responsive on his google group
01:15amalloyRaynes: i think for an image host, showing exif data is an anti-feature
01:15Raynesamalloy: I'm not sure what you mean.
01:16amalloyRaynes: if you upload a picture to the web with exif data, your chance of being murdered by a stranger goes up by at least 300%
01:16amalloybecause it has location and all kinds of stuff
01:17Raynesamalloy: There is more than just location data there. Data about the camera is what is important, and the site was authored by a guy interested in high profile photography (who knows other people interested in it as well).
01:18RaynesAlso, people tweet with locations, put it on their facebook statuses, etc.
01:18RaynesNobody seems to care about privacy anymore.
01:33notsonerdysunnywhy does clojure.core.Vec (created by doing (vector-of :long 0) ) not implement IEditableCollection which would enable transient on the vector ? or am I missing something?
01:53amalloymy guess: because transients require work, and primitive vectors are mostly ignored
01:57Sgeoamalloy, what's the best way to learn about how the data structures in Clojure work, reading the source or reading some sort of documentation?
01:57amalloy$google higher order persistent clojure vector
01:57lazybot[Understanding Clojure's PersistentVector ... - Higher-Order] http://blog.higher-order.net/2009/02/01/understanding-clojures-persistentvector-implementation/
01:57SgeoCool, thanks
01:58amalloyany more detail than that, probably you want to look for anything about array-mapped hash tries, especially by phil bagwell
03:40_francisI need to use LaTeX in a seesaw (swing application) - does anyone know of a good starting point/have any useful information on the matter?
04:21AnonnyA clojurescript vector is cljs.core/PersistentVector, a lists is cljs.core/List... any idea what a string is?
04:22AnonnyFor defmethod purposes.
04:27TEttingeris there a list of companies that have announced that they use clojure?
04:29AnonnyDon't think it's up to date but http://dev.clojure.org/display/community/Clojure+Success+Stories
04:31RaynesNot so much that it isn't up-to-date as much as it isn't all inclusive. If companies haven't added themselves to it, they're not going to be listed. It's still a big resource.
04:33TEttingerthanks
04:34TEttingerI love Clojure, but I am really pretty early in the learning process still
04:34TEttingerhaven't written a macro yet
04:34AnonnyIt's amazing what you can do with only functions.. :)
04:34TEttingerit's a very powerful/succinct language.
04:35lpvbTEttinger: there's also clojure job listings to tell you what companies use clojure: http://www.indeed.com/q-Clojure-jobs.html
04:37AnonnyThis CLJS is driving me nuts, though. I can catch vectors with (defmethod xxx cljs.core/PersistentVector [etc] (etc)).. But I have no ideas how to make a defmethod for cljs strings.
04:38AnonnyFeels like I'm missing something obvious.
04:47AnonnyAaaand the answer was js/String
05:17wingyTEttinger: will you go with clj?
05:22TEttingerwingy: I haven't programmed very much lately, but when I write little things it usually seems to be in clj
05:23wingyits the perfect language
05:24Raynes"I don't always program, but when I do, I prefer ClojuresScript."
05:25AnonnyThat's what I was thinking too.. :D
05:26wingyyeah love cljs
05:26wingybut its so heavy
05:27wingyisn't it compiled to js like coffeescript so it won't load other stuff to the browser?
05:28AnonnyI don't understand that question. Could you clarify?
05:28wingyit seems to load a lot of code into the browser
05:29wingyit compiles to a big js file
05:29AnonnyIt is compiled to JS. But if you compile it correctly (advanced mode) the closure compiler should trim out everything you don't use.
05:29AnonnyThat makes it significantly smaller.
05:30wingyif i use advanced mode, can i still use third party libs in my code?
05:30wingyor will the variable names be changed
05:31AnonnyI'm fuzzy on that part honestly. Yes, they'll be changed unless you mark them not to be changed or some such.
05:31AnonnyThis might answer.
05:31Anonnyhttp://lukevanderhart.com/2011/09/30/using-javascript-and-clojurescript.html
05:32wingyyeah i remember that one
05:38AnonnyMight also take a look at how jayq wraps jquery since Chris had to figure out how to mix advanced comp and an external library for that.
06:15yarnHi everyone, how do I correctly use a google closure aware library from clojurescript? I tried :libs ["resources/public/js/boob-moog-google-doodle/deps.js"] in my project.clj file, to no avail
06:15yarn(trying to require the Moog Google Doodle: http://code.google.com/p/bob-moog-google-doodle/
06:16yarnI get an exception "goog.require could not find: doodle.moog.Moog"
06:16joroif I do (reduce clojure.set/intersection a b c) do I gain perforamnce if I order a b, and c increasingly by size
06:24ambrosebsIs there a high res Clojure logo around?
06:25ambrosebsActually, I think the one I found might just be enough.
06:25ambrosebsnvm :)
06:26wingyambrosebs: what are you going to do with it?
06:26ambrosebsPut in on a poster advertising Typed Clojure for uni. Rich already gave the thumbs up thankfully.
06:28ambrosebsIs there an official source for a large version?
06:29wingyambrosebs: what is _typed_ clojure?
06:29ambrosebshttps://github.com/frenchy64/typed-clojure
06:30ambrosebsClojure + optional type system
06:30ambrosebsWIP, but has been my honours project.
06:32wingylooks cool
06:33ambrosebs:)
06:34wingycan typing reduce bugs?
06:35wingybut on the other hand the code grows
06:35Iceland_jackDoes it wingy?
06:35Iceland_jackThat depends on a lot of things
06:36ambrosebswingy: IMO it helps the most when you've got higher-order code. Fns taking Fns taking...
06:39ambrosebswingy: but I think the benefits of static typing speak for themself. Whether Typed Clojure can bring most of the benefits is yet to be seen.
06:39Bodilambrosebs: I don't remember where I found it originally, but I've got an SVG logo here if you don't mind inkscaping off the opacity etc: https://raw.github.com/bodil/catnip/master/resources/catnip/m/clojure-glyph.svg
06:41ambrosebsBodil: I googled the name of the file and found the original, cheers!
06:50ejacksonambrosebs: how did the seminar go ?
06:51ambrosebsejackson: went a bit too fast and had some extra time. Except I realised afterward it was because I forgot my last 2 slides :P
06:51ambrosebsOh well, good experience.
06:51ambrosebsSnuck in a quick demo too.
06:51ejacksonnice one!
06:51ejacksongood validation for your work
06:52ambrosebsejackson: planning to do more demoing at the conj.
06:53ejacksonyeah - demos are the key to drive adoption, and hence contributions
06:56ambrosebsejackson: could I send you this poster once it's done to check?
07:02ejacksonambrosebs: sure thing
07:09meredyddWhat do I need to do to make (run-tests) notice my tests?
07:10meredyddI'm in a namespace, I've just done:
07:10meredydd(deftest x (is (= 0 1)))
07:10meredydd(run-tests)
07:10meredydd...and it says "Ran 0 tests containing 0 assertions"
07:11meredyddOh, God, never mind.
07:11meredydd<-- fool.
07:55flying_rhinohello
07:56flying_rhinoI would like to know what IDE solutions do we have for Clojure? I tried enclojure (netbeans version) but it is only available for clojure 1.2. What is there for 1.4 version?
07:57flying_rhinodeveloping without IDE is PITA.
07:58rodnaphmost ppl use emacs i think flying_rhino. i use vim. i've heard intellij has some decent integration if u need an IDE.
07:58rodnaphIDE's won't give you any more integration than emacs though, it's pretty complete.
07:59_ulises+1 for emacs
07:59flying_rhinookay is there 'batteries included' emacs or vim packaged with newest clojure?
07:59rodnaphu can try an emacs starter kit like - https://github.com/technomancy/emacs-starter-kit
08:02flying_rhinothis 'starter-kit-lisp' thing will make it possible to work with Clojure?
08:03rodnaphnot used it myself but i think so, should include this somewhere - https://github.com/technomancy/swank-clojure
08:10flying_rhinoI think you guys really need better getting started page
08:12Scriptorthere's been a lot of discussion on that, but I think the concensus is that clojure.org is terrible for beginners
08:12antares_flying_rhino: see http://clojure-doc.org
08:12flying_rhinoScriptor: you are a guy that buit pharen?
08:13Scriptorflying_rhino: yep
08:13flying_rhinoScriptor: big fan
08:13Scriptorthanks :)
08:13flying_rhinoScriptor: didn't have chance to use it much, but I like the idea
08:14Scriptorno worries, I'm still not sure whether it will every see much serious use
08:14Scriptorbut it's fun to play around with, at the very least
08:14jorodo you use unit tests, or TDD while writing clojure?
08:14flying_rhinobut seriously, Clojure needs some sort of one click install
08:15rodnaphScriptor: that looks neat, i was playing around with the same idea myself a while ago - https://github.com/rodnaph/clj-php
08:15flying_rhinoPython has it and the only obstacle for clojure is that it builds on top of Java. But that's not a reason enough
08:16rodnaphflying_rhino: the "one click install" for clojure is installing leiningen - http://leiningen.org/
08:16Scriptorrodnaph: nice, I started it before I knew clojure well at all, so it's far from a clojure -> php compiler
08:16Scriptorso that niche is still open :)
08:17rodnaphyah same here, it was very much to learn the ideas.
08:17rodnaphi stopped though because i think the idea has really been superseded by clojurescript (which will have pluggable backends soon i think)
08:18Scriptordidn't know about the pluggable backends
08:18rodnaphdon't think it's landed yet, but it's defo in the works. might be part of the clojure-in-clojure effort.
08:18ScriptorI think someone here mentioned that semantically, you'll never have a "true" clojure to php compiler, since php has mutable strings
08:18Scriptorso that guarantee that strings will never change isn't there
08:19Scriptorwhich messes up equality, and so on
08:19pau|cHi, I've spent a few hours fighting with NoClassDefFound and ClassNotFound exceptions. I've been playing with various combinations of noir, clj-http, monger and chesire.
08:19pau|cAny idea whether there are incompatibilites between those libs, or whether there's something wrong with my setup (I've cleared out ~/.m2 a few times)
08:20flying_rhinowell php has mutable *everything*
08:20antares_pau|c: please post full stack trace and your project.clj
08:20flying_rhinoso I don't really see why strings are the problem
08:20antares_pau|c: that exception cannot be caused by "incompatibilities"
08:21Scriptorflying_rhino: it's somewhat theoretical
08:21rodnaphi don't think the mutable part of php will cause any problems, it'll just be a detail of the host. ie. you can mutate java stuffs in clojure.
08:21flying_rhinoif you don't give people means to change strings from withing implementation, I don't get why would it matter that strings are mutable
08:21flying_rhino*within
08:21Scriptorbut essentially, it means that if you compare two strings that *should* be the same, they might not actually be the same
08:21rodnaph(not that i really think anyone should invest much time in trying to get a good clj to php compiler)
08:22Scriptorstrings can be changed by other php functions that you can't control
08:23pau|cantares:_ http://pastebin.com/QTgxg0ws
08:25pau|cI get the same stack trace with noir 1.3.0-beta10
08:34pau|cantares_: updated version, where I'm certain everything is 'clean' https://gist.github.com/4011912
08:35antares_pau|c: are you using Monger 1.3.2 or earlier?
08:35pau|c1.3.1
08:35antares_pau|c: then upgrade to 1.3.3: https://github.com/michaelklishin/monger/blob/1.3.x-stable/ChangeLog.md
08:36antares_pau|c: http://blog.clojurewerkz.org/blog/2012/10/31/monger-1-dot-3-3-is-released/
08:37pau|cantares_: bah, not sure why I was on 1.3.1. will upgrade, thanks.
08:37antares_the problem is that if data.json not available, extending its protocols is tricky and before 1.3.2 it wasn't done correctly
08:37antares_but 1.3.3 will use cheshire, data.json 0.1.x or data.json 0.2.x, whichever is available
08:37pau|cok
08:46flying_rhinorodnaph: from what I understand Lenanigen is build tool for clojure, it is not one click install
08:48rodnaphflying_rhino: it's kind of more than just a build tool, aside from java it's all you need to get started with clojure, which is why i suggested it. there is also lighttable which you might find interesting as a complete solution http://app.kodowa.com/playground
08:49Scriptorit's not a gui installer, but it can knock out two birds with one stone
08:49Scriptorsince you'll likely need it for any serious projects later on, in addition to getting clojure
08:50raekflying_rhino: Leiningen is for clojure what the 'python' and the 'virtualenv' commands are for Python
08:50raekClojure is distributed as a library
08:50raekso you need more stuff to actually use it
08:51raekit's too bad Leiningen hasn't been officially endorsed as a part of Clojure
08:51raek95% of all clojure programmers use Leiningen
08:51flying_rhinookay now that I have Lein, what now?
08:52rodnaphand the other 5% probably don't have keyboards.
08:52raekyou create a project (yes, even for trivial stuff) and declare which version of clojure you want to use
08:52raekand any libraries you want to use
08:53raekthen you can run "lein repl" in the project dir to start playing around
08:54raekflying_rhino: also: https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md
09:05mammothmy connection died
09:06mammothokay, one more thing: is there command prompt for windows that doesn't completely and absolutely sucks?
09:06callenI think I'm close to being able to put to words what I don't like about enlive.
09:07classcastmammoth: there is the Windows PowerShell
09:07mammothI don't think they have Windows 7 64 bit version
09:07mdainesI'm trying to invoke a function four times. What's the idiomatic way to do that?
09:07mammothah they do
09:08classcastit's .Net - I dont think it would be that limited
09:08mammothnevermind found it
09:08rodnaphmdaines: dotimes maybe? depends exactly what ur doing though probably.
09:08mammoththanks
09:08mammoththanks, classcast
09:10mdainesUsing a DataInputStream and want to read 4 bytes. I want each to be an element in the returned seq
09:10classcastmdaines: (repeatedly 4 (.readByte dis))
09:11classcastneeds to be a function thus: (repeatedly 4 #(.readByte dis))
09:13mdainesexcellent, thanks classcast
09:17leoncame`how can I check if a symbol is a macro or not?
09:21classcastleoncame`: you can resolve the symbol to its variable and check its metadata for :macro true
09:21goraciohi there is there any with fluent english and good clojure knowledge i wrote some articles about clojur and need an reviewer :)
09:22snake-johnHi I'm trying to use the reducers library .
09:22snake-john(require '[clojure.core.reducers :as r])
09:22Hodappgoracio: PM me.
09:22snake-john(into [] (r/mapcat my-fn coll)
09:24classcastsnake-john: I guess `into` will have to do with your question ;)
09:24leoncame`classcast: Cool.
09:25snake-johnsorry I'v got code like (into [] (r/mapcat my-fn coll) working sequently. I now want to make it parrellel. But my col has only 15 elements.
09:26snake-johnI see that fold which is used by r/map uses a default of 512 to decide if fork-join is going to be used
09:27ejacksonthat's right
09:27snake-johnHow do get map to use a splitting factor of 1
09:28ejacksondunno actually ;)
09:28ejacksonare you sure fork-join is what you want ? Perhaps pmap or agents are better ?
09:29classcastsnake-john: do your 15 tasks use up enough time so that this is really worth it?
09:30snake-johnWell I just playing around and want to experiment…. but each collection element transform is doing quite some work...
09:30classcastsnake-john: I just wanted to save you some time in case they might be pretty quick anyway ;)
09:31snake-johnI am working just on a chess program and each item in the collection is a chess piece and the map fns calc the possible moves
09:33snake-johnso far the reducers have helped me a lot because I do not need to create in-between vectors
09:36classcastsnake-john: humm I wonder why they have `n` on the low-level anyway if they just default it to 512 and do not expose it to the highlevel functions
09:38snake-johnI think one is supposed to right a custom map function. but unfornatlly all helper functions are private so its a lot of work
09:45classcastsnake-john: I guess that it's due to the alpha status ;)
09:50snake-john@classcast I think your right…. anyway its a great library ! do you have any idea when clojure 1.5 will officially come out?
09:53classcast1.4 had 7 betas after the alphas
09:55snake-johnoh so it could take another year...
09:56classcastsnake-john: maybe not that long but probably several months. there is hardly any info on deadline if there are any
09:56DestonCan someone tell me what I'm doing wrong with this exercise from the clojure koans? Why does the output contain "street-address, city, state" and not the values? http://pastebin.com/w69Squev
09:58classcastDeston: your quoted list expression is wrong. you want the values of the symbols in the list and not the unevaluated symbols
10:01DestonInteresting. It works if it's a vector instead of a list.
10:01classcastDeston: try that one http://pastebin.com/G1miy9R5
10:02classcast&(let [a 1 b 2 c "hello"] '[a b c])
10:02lazybot⇒ [a b c]
10:02classcastDeston: as you can see above it wont work with the vector either
10:03Scriptoryou don't need to quote the vector
10:03Destonyeah, I didn't quote the vector and it did work.
10:03classcastwell thats something different ;)
10:03Scriptorlists need to be quoted to prevent them from getting evaluated as a function call
10:03classcast[a b c] = (vector a b c), '(a b c) = (list 'a 'b 'c)
10:04classcastlesson: a quoted list works only for constant lists as abbreviation ;)
10:05classcastDeston: but as you can see in my example, your code was too complicated anyway
10:06Destonyeah. I'm just working with what I've seen in previous koans exercises.
10:08DestonThanks for the assistance.
10:16duck1123Is there an easy way to expose the "/META-INF/resources/webjars/" directory of any of the jars on my classpath as static resources with compojure?
10:16duck1123I haven't been able to get it right yet
10:17weavejesterduck1123: Anything on the classpath can be exposed using route/resources
10:17weavejesterduck1123: But I'm not sure that /META-INF/resources is on the classpath
10:18duck1123So would specifying that in lein make it work? Or would that only be for that project?
10:19weavejesterSpecifying what in Lein?
10:19duck1123I'm wondering if there's something I can specify to make sure that that path is added to the cp
10:19duck1123let me try some thigss first
10:20weavejesterThis is in a war file, right?
10:20duck1123yeah, from http://www.webjars.org/
10:21duck1123actually wait. I'm not deploying a war
10:21duck1123I'm running an aleph server started from lein run
10:22weavejesterSo why is there anything in META-INF?
10:23duck1123All these jars have a different js lib in META-INF (for the benefit of setups that ARE packaged as wars)
10:23duck1123I'm trying to see if I can make use of it from compojure
10:23weavejesterOkay, so these are jars designed for use with Java servlets
10:23weavejesterAnd not Clojure
10:23duck1123right
10:24weavejesterTry loading up a REPL
10:24weavejesterand using the clojure.java.io/resource function
10:24weavejesterTo see if "META-INF/resources/webjars/some/file/you/know/exists" returns a URL or nil
10:25duck1123ah ha! I've been trying with an initial /
10:53snake-john@classcast I think I found out how-to override the 512 default. Instead of using reduce I just have to use fold with which I can supply an n. But as you thought my code runs actually slower. because n probably needs to be pretty large to overcome the Thread overhead
10:54joroif I do an intersection of two sorted sets, does the core algorithm utilize the fact that, you can do the intersection by choosing a subset of a larger set using min and max of the smallest set?
10:55classcastsnake-john: ah nice.
11:30Hodappgoracio: 'They are fine frameworks and languges but all of them praise OOP paradigm. I have no big experience with programming but i can say that this concept is overcomplicated from my point of view. I even think that people just didn’t understand objects concept and started using it in another way, mostly wrong way. I could say that nowadays it’s Class programming.'
11:30Hodappyeah, that's pretty much true...
11:35joroHadapp: who wrote that quote?
11:55Hodappjoro: goracio did :)
11:58joroclojure-experience has been very interesting. I'm still a newbie yet, but when the codebase has increased, I find to reuse much more than in any other language.
11:59goraciowell i'am wrting series of articles about clojure and clojurescript will anounce it soon on clojure forum
11:59antares_goracio: make sure your blog is aggregated by planet.clojure.in
12:00joroI've not used statically typed FP-lanugages for any serious things, though. I do not know how clojure compares to them.
12:00goracioantares_: ok will check that - now it's on tumblr
12:12mdainesAny recommendations for dealing with byte constants? Writing a chain of (cond) seems clunkier than it does in Java.
12:16bbloommdaines: dealing with them in what way?
12:16mdainesParsing in binary data. First byte indicates what to do with the next few bytes.
12:17antoineBhello, what is the most efficient (distinct (sort a)) or (sort (distinct a)) ?
12:18rlbmdaines: do you mean cond or case?
12:19rlbhttp://clojuredocs.org/clojure_core/clojure.core/case
12:19mdainesActually, I didn't see there was a case.
12:19rlbmight be more what you want
12:19mdainesThanks.
12:19rlbcertainly
13:35dnolenambrosebs: poster looks good to me!
13:36ambrosebsdnolen: thanks!
13:40callendnolen: liked your talk on "Clojure for Schemers"
13:40callendnolen: the audience seemed like they were being a little defensive though.
13:45jonasenWhat's the difference between VarExpr and TheVarExpr in the Clojure compiler?
13:45jonasenambrosebs: ^^ maybe you know that one :)
13:47ambrosebsIsn't TheVarExpr (var a)
13:47ambrosebsBut what is VarExpr... :)
13:48ambrosebsPossibly (foo ...) vs. (var foo)
13:48dnolencallen: that was sound long ago, I forget what about?
13:48dnolenthat was so long ago I mean
13:49jonasenambrosebs: That's probably it. Thanks
13:49ambrosebsjonasen: np
13:49ambrosebsjonasen: what are you doing so deep?
13:50jonasenambrosebs: Just playing around... I'd like to port http://github.com/jonase/scape to jvm clojure instead of just clojurescript
13:52ambrosebsis `analyze` useful?
13:56jonasenambrosebs: it is, I have created an "lite" version of analyze for this project.. just to understand the underpinnings better
13:56ambrosebsjonasen: sweet
13:57jonasenI really wanted to enhance the analysis phase for codeq.. but that turned out to be much harder then anticipated
13:58ForSparePartsCould someone help me debug this? http://pastebin.com/m4dGy11f
13:58ambrosebshow does it work?
13:59ForSparePartsIt's supposed to create a class using the bundled java hooks and a function that's been passed in
13:59ForSparePartsbut when you call it from another namespace, there are collision problems.
13:59dnolenjonasen: what was so challenging?
14:08jonasendnolen: the short version: macros get in the way
14:11tomoj(fn [part] (memoize (fn [& args] (d/tempid part))))
14:12tomojor (fn [] (memoize (fn [part & args] (d/tempid part)))) ?
14:15jonasenI tried to use the clojurescript analyzer to add codeq support for clojurescript (with a more advanced analysis phase than the clojure version)... The codeq Analyzer protocol works on one source file at a time calling "git cat sha ..." and passing the source text to the Analyzer protocol functions. This doesn't play nice with e.g., https://github.com/clojure/clojurescript/blob/master/src/clj/cljs/analyzer.clj#L669 and https://github.com/clojure/cloj
14:16dnolenjonasen: that line in the CLJS analyzer an optimization thing, we could probably make that optional.
14:16dnolenis an
14:18Sgeo_,(let [-> inc] (-> 5)) ; ##(let [-> inc] (-> 5))
14:18lazybot⇒ 5
14:18clojurebot6
14:19jonasendnolen: but the problem is pretty fundamental I think. If you want to figure out which var's are in use you pretty much have to macroexpand. If you are handed source code for one file at a time there is no way to find do the macroexpansion.
14:20jonasenAs long as you don
14:22jonasenAs long as you don't have access to all the source code you have no choice but to resort to "guess work" (which the codeq analyzer does, i.e., (.startsWith (name sym) "def") etc.)
14:22dnolenjonasen: I guess I don't see why codeq can't be modified to make doing the right thing possible? or are you saying you might as well continue with scape? :)
14:22Sgeo_I guess one advantage Clojure has over Tcl is that it's actually possible to analayze Clojure code
14:22Sgeo_Pretty sure it's actually impossible with Tcl
14:25ForSparePartsIs there anyway to create an abstract class with gen-class?
14:25jonasendnolen: There is good reason to not do any macroexpansion too as that means eval-ing (possibly untrusted) code, especially if you intend to index every clojure github project (which would be awesome).
14:26Sgeo_Run it in a VM?
14:26Sgeo_(Not suggesting Clojail, it has some issues that might make code intended to not be run in Clojail break)
14:27jonasenone idea is to only macroexpand clojure.core macros. That would probably get you 95% of the way to correctness
14:29Sgeo_Write a macroexpander where only pure non-I/Oy functions run?
14:29Sgeo_And any macro that tries to execute an impure function gets marked as well as places that rely on that macro?
14:29Sgeo_(e.g. all uses of Noir's defpage, I think)
14:32tomojI always imagined an lxc per project. is there a way to avoid needing a new jvm for every commit?
14:32dnolenjonasen: right
14:34Sgeo_lxc?
14:44callenSgeo_: since nobody else piped up: http://en.wikipedia.org/wiki/LXC
14:45Sgeo_Ah, cool
14:45jonasendnolen: Anytime you wan't to statically analyze lisp programs, macros get (by definition) in the way since there is no way to know what they do with your s-expressions. On the other hand, If you do macroexpansion you are 1. no longer doing _static_ analysis, 2. lose valuable information as all "macro call sites" are lost. I have come to the conclusion that analysing lisp programs is a hard problem.. and therfor interesting :)
14:48dnolenjonasen: aren't there some assumptions here about the macro system at play? If Clojure offered something more akin to Scheme syntax-rules - simple rewriting - I think this would be less problematic.
14:49jonasendnolen: I'm not familiar with schemes hygienic macro system
14:50dnolenjonasen: arbitrary code not allowed - pattern matching, rewriting only
14:50jonasendnolen: ok
14:51dnolenjonasen: sufficient for many macros - and insane for sophisticated ones like pattern matching
14:52jonasendnolen: I learned scheme once but never got as far as creating my own macros.. But I do remember they looked scary
14:53dnolenjonasen: they are actually quite nice - Scheme's problem is that syntax-rules really is awful for more complex macros. syntax-rules really is pretty simple to understand.
14:53dnolenI haven't ventured into syntax-case or the macro features of Racket
15:41bbloomjonasen: is there any reason you can't do *dynamic* analysis too?
15:41bbloomjonasen: i.e. run the macro expansions inside a security context and with a timeout?
15:47bbloomthe static vs dynamic divide always seemed strange to me.... most static type systems have "soundness" (ie. termination) as a built in quality. but that severely limits what you can have them represent. seems like "terminates within 3 seconds" is a reasonable requirement to enforce externally :-P
15:48jonasenbbloom: sure, that's possible. But the problem with using the clojurescript analyzer (or ambrosebs 'analyze') for codeq still stands.
15:49bbloomjonasen: you're referring to the need to recurse into files you depend on?
15:50jonasenyes
15:50bbloomdnolen: this brings up the idea of a protocol for the module system....
15:51Sgeo_There's a language extension to Haskell that allows some cases in which type checking might not terminate, I think
15:51bbloomSgeo_: i think i saw that. and lots of other work too on proving more dynamic properties with termination. see: dependent types
15:52bbloomjonasen: would you be interested in helping decouple the clojurescript compiler from gclosure and to make the module system more pluggable? i'm imagining supplying/finding/loading/whatever a module out of codeq
15:53bbloomjonasen: no idea what that looks like yet.... needs a lot of thought
15:54dnolenbbloom: termination is not enough in a system in which macroexpansion can fully interact w/ the runtime. sandboxing might help but given the freedom Clojure programmers have I think there are probably a lot of wacky macros out there.
15:55dnolento which I've contributed my share
15:55bbloomdnolen: yeah, of course there will be things that are simply too difficult to analyze statically. but expanding most macros has got to beat heuristics like startsWith "def"
15:56bblooms/analyze statically/analyze
15:56dnolenbbloom: thus my earlier point about syntax-rules. The Scheme people already thought about this. syntax-rules is reasonable default if you want the most of the corpus to be analyzeable w/o jumping through hoops.
15:57bbloomdnolen: oh yeah, that makes sense to me, but it's too late to change all the macros out there now :-P
15:57dnolenyep
15:57jonasenbbloom: that's exactly what I meant when I said that expanding clojure.core macros would get you 95% there
15:58bbloomjonasen: being that i haven't memorized core yet.... are there any macros in core who's execution could be a security or stability risk?
15:59bbloomjonasen: maybe i'm paranoid, but i wouldn't even run those outside of a security context & timeout :-) at which point you can get 98% of the way there by also expanding user macros... .assuming you solve the dependency/module problem
16:00jonasenThe problem is: is a symbol (without a ns-part) in an s-expression a local or a var? With that information it would be easy to substantially enhance the codeq clojure analyzer
16:01tomojwill a security context prevent d/connect + d/transact?
16:02bbloomjonasen: doesn't the analyzer's :var form include a :name property? can't you just check for (namespace (:name vast-ast-node)) ? non-nil means it's a var
16:03jonasenbbloom: you can't run the available analyzers in codeq (as things are now)
16:03bbloomjonasen: right, because of the module system.... i think we're going in circles :-)
16:04jonasenI'd love to be able to participate in the codeq unsession at clojure-conj.. Any and all notes from that session would be much appreciated. Video would be even better :)
16:06Sgeo_Am I the only one who thinks Clojure/Tcl communication would be fun?
16:07Iceland_jackHeh.. possibly
16:11Sgeo_They're both very flexible languages, they both have notions of immutability
16:12clj_newb_2345how do I write a clojure structure out ot file
16:12bbloomspit
16:12clj_newb_2345(spit f _structure_) ends up printing out "lazy sequence"
16:12bbloom,(doc spit)
16:12clojurebot"([f content & options]); Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer."
16:12clj_newb_2345i need to convert the structure to a string first
16:12clj_newb_2345perferably a string that I can read back using "read"
16:13bbloomclj_newb_2345: are you sure you haven't already got a string?
16:13bbloomclj_newb_2345: try (class _structure_)
16:13bbloom(println (class _your_thing_)) and report back what you get
16:14clj_newb_2345got it working with with-out-str println
16:15bbloomclj_newb_2345: ah, yeah, spit uses str, not pr
16:16jonasenbbloom: I'm not sure what you mean with a module system, but if cljs.analyzer/get-expander was customizeable it might be possible to use the clojurescript analyzer with codeq.
16:16jonasenBut enhancing the codeq _clojure_ analyzer would be more useful as there is much more clojure code out there than clojurescript
16:17bbloomjonasen: there are a few things that you need knowledge of namespaces and vars to do. get-expander is one example of resolution
16:18bbloomjonasen: another example is that analyze-deps you pointed out
16:18bbloomjonasen: it calls io/resource and then analyze-file
16:18bbloomin theory, there are several related functions that differ depending on where you're looking up files to satisfy dependencies, resolve vars, etc
16:19bbloomthe implementation that is there now loads up files using the java class path
16:19dnolenbbloom: analyze-deps is not necessary - the analyzer would work just fine w/o it - that's just for optimization like said before.
16:20bbloomdnolen: right, but that's not true for macros nor is it true for :use without :only
16:21dnolenbbloom: yes but analyze-deps doesn't look at macros.
16:22dnolenbbloom: er sorry didn't read closely enough. right.
16:22bbloomjonasen: does codeq use the "real" jam clojure analyzer? or is it ad-hoc?
16:23bbloomjam -> jvm
16:23bbloomdammit Textual, how do i forcibly turn off autocorrect?
16:25jonasenbbloom: the codeq analyzer doesn't do much (clojure specific) analysis: https://github.com/Datomic/codeq/blob/master/src/datomic/codeq/analyzers/clj.clj#L29
16:26bbloomjonasen: yeah, pretty ad-hoc
16:26bbloomwould be nice to use the clojurescript analyzer there... despite the fact that it needs some work to support big boy clojure
16:27jonasenbbloom: that was my idea too.. but it was more difficult than I initially thought :)
16:28dnolenbbloom: jonasen: rhickey said he'd like to see bits of the CLJS analyzer integrated too. My understanding is that codeq in it's current is a proof of concept and it's up to the community to push it along further. like ClojureScript was/is to a large degree.
16:28bbloomjonasen: yup, now that we're on the same page, let me reiterate: i think the module system needs to be decoupled :-)
16:29bbloomjonasen: it should be able to look up a namespace in datomic, rather than on the file system
16:29bbloomthis way you can go back and run the analyzer on an older version of the code
16:29bbloomwithout relying on the java classpath
16:33jonasendnolen: bbloom: It's getting really late here. Thanks for an interesting discussion, hopefully we can continue another day.. these are all interesting problems
16:39lpvbcljsc takes a very long to compile
16:39dnolenlpvb: yeah you shouldn't use it, I recommend lein-cljsbuild
16:40dnolenlpvb: it has auto mode so you don't pay for JVM boot + CLJS self compile every time you change somehting.
16:45Sgeo_An explicit compile step for a Lisp seems ... counterintuitive
16:47dnolenSgeo_: I guess you haven't looked at many Lisps - there quite a few compilers that do whole program optimization
16:47S11001001Sgeo_: ANSI Smalltalk is a variant of smalltalk with enough late-binding features removed such that building an AOT build infrastructure for it is feasible.
16:48Sgeo_But you could still change code around at runtime, I'd assume?
16:49dnolenSgeo_: probably greatly depends on the implementation
16:52lpvbdnolen: thanks
16:52dnolenlpvb: np
16:53dnolenlpvb: still, I agree we definitely need to improve compile times ;)
17:16matt444Hello, I am unable to find a function that lets you replace a substring by position, does not exist?
17:16matt444clojure.string/replace replaces by a pattern.
17:21AimHerematt444, you could probably patch things together with subs
17:22Sgeo_Is there a Java method that could do it, perhaps?
17:23unlinkWhy does `lein ring server' on OS X start a new focus-stealing Java application when I run it?
17:23unlinkSaid application appears in Command-Tab as `clojure.main'.
17:28Apage43unlink: if you ever actually import any swing or awt classes that will probably happen
17:28Apage43regardless of whether they are instantiated
17:32unlinkThat's heinous.
17:32unlinkIs it possible to suppress that?
17:34S11001001matt444: All String methods are also available. Just remember that there's even odds you'll screw up an index if you do index-based string manipulation directly, hence the preference for patterns
17:37Apage43unlink: I believe it's part of static {} blocks in the class, so if the classloader loads them, that's going to happen.
17:38S11001001~(do (require 'clojure.string) [(clojure.string/replace "z" #"z" "\\\\") (clojure.string/replace "z" #"z" (constantly "\\\\"))])
17:38clojurebotclojure euler is http://clojure-euler.wikispaces.com/
17:38S11001001,(do (require 'clojure.string) [(clojure.string/replace "z" #"z" "\\\\") (clojure.string/replace "z" #"z" (constantly "\\\\"))])
17:38clojurebot["\\" "\\"]
17:38S11001001yummy
17:39S11001001,(clojure.string/replace "z" #"z" "\\") ;my favorite feature of replace
17:39clojurebot#<StringIndexOutOfBoundsException java.lang.StringIndexOutOfBoundsException: String index out of range: 1>
17:39S11001001,(clojure.string/replace "z" "z" "\\")
17:39clojurebot"\\"
17:40S11001001,(clojure.string/replace "z" #"z" (java.util.regex.Pattern/quoteReplacement "\\"))
17:40clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching method: quoteReplacement, compiling:(NO_SOURCE_PATH:0)>
17:40S11001001ugh
18:09alex_baranoskyseems to be something tricky about using type hints on java method calls that have vararg signatures
18:10alex_baranoskythis is giving me reflection warnings, any suggestions?: https://gist.github.com/4014270
18:17dnolen alex_baranosky: into-array doesn't have a return type-hint
18:17alex_baranoskyI didn't know how to type hint a array of Strings.., so that's the issue, thanks
18:18dnolen,(class (into-array String []))
18:18clojurebot[Ljava.lang.String;
18:18dnolen^"[Ljava.lang.String;"
18:18dnolenalex_baranosky: ^
18:18bbloomdnolen: isn't there a special case for primitive arrays?
18:18alex_baranoskydnolen: thanks: nice and esoteric
18:18dnolenalex_baranosky: but really all you care about is ^objects
18:18dnolenalex_baranosky: ^objects should work I think.
18:19bbloomisn't there ^strings too ?
18:19bbloomand ^ints, floats, etc
18:19alex_baranoskyI tried ^strings, that one doesn't work
18:19dnolenbbloom: don't think there is one for strings, only primitives, and ^objects
18:19amalloy^objects shouldn't work if he has an array of strings. afaik String[] isn't a subclass of Object[]
18:20dnolenamalloy: but isn't varargs always ^objects?
18:22alex_baranoskyamalloy: correct, ^objects didn't work but ^"[Ljava.lang.String;" did
18:22alex_baranosky^strings might not be a bad addition to Clojure
18:22amalloydnolen: no
18:23bbloomalex_baranosky: make a patch :-) src/clj/clojure/genclass.clj, search for prim->class
18:24alex_baranoskybbloom: thanks, I may just do that
18:24dnolenamalloy: gotcha
18:25amalloyalex_baranosky: from reading the jodatime and jollyday docs, i don't think that ^Interval hint is buying you anything, btw
18:25amalloyoh no, silly me, of course it is
18:26alex_baranoskyamalloy: yeah getHolidays is overloaded so needs the hint
18:32Sgeo_I really don't understand the [Ljava.lang.String thing
18:33Sgeo_What's going on that that shows up like that?
18:33amalloy$google jvm array class name
18:33lazybot[How does array class work in Java? - Stack Overflow] http://stackoverflow.com/questions/2910774/how-does-array-class-work-in-java
18:33Sgeo_ty
18:34bbloomi always forget that strings aren't considered "primitives"
18:35bbloomtrying to write some java after clojure (or even just c#) and the number of string == bugs that a linter finds and warns me to use .equals is astronomical :-P
18:58callenbbloom: strings are an abstraction.
18:58Sgeo_Is there any circumstance where Clojail is used in such a way that malicious code is not supposed to be able to detect that Clojail is in use?
18:59bbloomcallen: primitives are an optimization ;-)
18:59Sgeo_Haskell doesn't have that concept of reference identity
18:59Sgeo_Much simpler to think about
18:59callenbbloom: not really, they're data that doesn't require abstraction or intermediate translation to represent in the hardware.
19:00callenbbloom: an array of integers is a pretty straightforward thing to represent at the machine level.
19:00bbloomcallen: how is that not an optimization?
19:01callenbbloom: what you call an optimization, I call an unburdened and simple representation of data that comes naturally to the hardware.
19:02callenbbloom: eliding potentially unnecessary operations is a more obvious case of an optimization. Or vectorization.
19:03bbloomcallen: i'm not interested in arguing semantics -- all i said was that i forget to use .equals on strings b/c im used to languages that have either operator overloading or stronger notions of equivalence
19:04Sgeo_"Primitives" in some languages such as Java might be more directly representable, but can be annoying if they don't play nice with the general abstraction that the language uses.
19:05Sgeo_An int is not a java.lang.Object, which seems bizarre to me
19:05dnolenSgeo_: I thought Haskell also has escape hatches to get to low level mutable reps
19:05dnolenrepresentations
19:05Sgeo_dnolen, yes, but at least those are escape hatches, not things you tend to need to interact with on a regular basis.
19:05Sgeo_*directly interact with
19:06Sgeo_Although, I think things like Int# are not Haskell itself but GHC stuff, not sure
19:07dnolenSgeo_: so the store is more or less the same. Reality sets in.
19:07dnolenstory
19:08dnolen40 years of FP research and sometime you still need to get to a primitive mutable thing.
19:08dnolen50 years sorry.
19:08callenI think it's impossible to ever overcome that need for some subset of things.
19:09callenas long as practical limitations reign.
19:09Sgeo_dnolen, to implement a language on an imperative machine?
19:10dnolenSgeo_: I didn't say anything about implementing a language on imperative machine.
19:10Sgeo_The bigger problem is I/O which seems to be naturally imperative. In Haskell it's fairly simple to interact with the outside world in an imperative-style way, but it would be nice with more functional-style approach
19:10callenI/O isn't that big of a problem.
19:11callenI'm not trying to be contradictory, I'm serious.
19:12callenthe sometimes-necessity of mutable state/imperativeness doesn't need I/O to be a problem.
19:21callenSgeo_: in particular, monads and arrows have provided a lot of insight into how to encapsulate I/O. FRP is an alternative to typically callback-driven interactive global state.
19:22callenThe deeper issue is that any declarative programming style is never going to escape directly to a set of instructions that are more optimal/faster than what a human operating with a lower level set of primitives could accomplish. There are fundamental limitations preventing that from happening.
19:25shachafNot if the lower-level primitives are complicated enough that no human could hope to reason about them. :-)
19:25Sgeo_But at what point is that gap small enough that working non-declaratively is about as much use as working in assembly?
19:25callenshachaf: thus, C.
19:25shachafcallen: "thus, CPUs"
19:25callenwhy do people think everything is a totality?
19:25shachafBecause they hate the halting problem?
19:25KirinDaveHa
19:25callenWhy not work at a higher-level with the understanding that you might run into a brick wall that requires stepping down the ladder of abstraction?
19:26callenPython/Ruby people are perfectly comfortable accepting that sometimes they need to use the C FFI.
19:26shachafWho said not to?
19:26KirinDavecallen: Actually, they're comfortable wedging everything they can into C.
19:26Sgeo_When are those sometimes?
19:26callenbecause a lot of people seem to act as if everything can be done in their language of choice.
19:26KirinDavecallen: because their interpreters are pretty bad.
19:26callenKirinDave: keenly aware of that.
19:26Sgeo_Interacting directly with hardware, drivers etc., but when else?
19:27Sgeo_Need for speed at cost of programmer sanity?
19:27KirinDaveAlso: "abstraction" means something entirely different int he OO, imperative world.
19:27callenKirinDave: actually, you're a good person to ask. Does Haskell ever stop feeling like I'm solving unnecessary puzzles?
19:27KirinDaveIn the functional world it usually means something very broad and optimizable. In the OO world it's about stacking ontologies ever higher into specific cases.
19:27callenbecause I'm getting pretty tired of taking 2 hours to do something that takes 5 minutes in Python or Clojure.
19:27callenKirinDave: drop the strawman, nobody's interested in bashing OO here.
19:27KirinDavecallen: Trying to build a Scala project? ;)
19:28KirinDavecallen: Is neither a straw man nor did I bring up that world. You did with Ruby+Python.
19:28Sgeo_callen, are you counting debugging time in those 5 minutes?
19:28KirinDaveEven comparing them is to have an impedance mismatch.
19:28callenSgeo_: debugging my python code is a pleasure and not often necessary outside of the experimental REPL phase.
19:29callenI'm not super interesting in comparisons or dick-waving.
19:29Sgeo_I should try to learn and understand clojure-test-mode at some point
19:29callenIt's a serious question
19:29callendoes Haskell ever stop feeling like a chore?
19:29KirinDavecallen: I'm not sure what you are interested in.
19:29KirinDavecallen: Yes.
19:29callenbecause I've talked to other people who've invested between 2-5 years into it
19:29bbloomcallen: most of your comments in the last few minutes certainly seem like dick waving
19:29callenand it never started being more productive than Brand X
19:30callenso I'd like to know if I should cut my losses or not.
19:30KirinDavecallen: If not constantly learning is a problem for you, you might want to cut your losses on the entire profession of programming.
19:30KirinDaveBecause no toolchain eliminates that requirement.
19:30callenI should've expected as much.
19:30callenIt's not about the learning, it's about the productivity.
19:30wkellycallen: how much time have you put in?
19:30KirinDaveIt's a fundamental feature of the medium at this stage of its lifecycle.
19:31callenI love learning, that's why I'm learning Haskell. It's benefited my Python code a *LOT*
19:31callenmore than Lisp or Clojure ever did
19:31callenhowever, I'm having trouble seeing that I'll ever become *more* productive in Haskell *than* Python or Clojure.
19:31callenand I'm not the only one with this concern.
19:31KirinDaveFor some things you won't.
19:31KirinDaveFor some things you will.
19:31callenwkelly: a very casual 1-1.5 years
19:31KirinDaveNot every tool is uniformly better.
19:31Iceland_jackcallen: productivity is a broad term
19:31callenwkelly: not serious time though. Lots of fiddling.
19:31KirinDaveWhy is this conversation in #clojure and not #haskell?
19:31dnolenKirinDave: +1
19:31callenKirinDave: because #haskell people are hateful as fuck.
19:32callenKirinDave: and you were already insulting a moment ago
19:32KirinDavecallen: You have a bad attitude and they smell that
19:32callenKirinDave: I don't need a whole channel of that.
19:32KirinDavecallen: I was?
19:32KirinDavecallen: Where?
19:32callenKirinDave: you suggested I should quit programming
19:32KirinDaveOh
19:32callenfor reasons I never stated I had.
19:32KirinDaveNo, I made a generalizatoin.
19:32KirinDaveIt's not specific to haskell or you.
19:32callendon't make excuses.
19:33callenown up to it, and try to stay on topic.
19:33KirinDavecallen: Well you've scared me off. Good luck.
19:33callenis the answer: "Haskell is great for some things, awkward for others"?
19:33bbloomdnolen: no, callen is trolling
19:33callenBecause I'll accept that as an answer.
19:33callenis it really that unreasonable to ask a well known Haskeller if it ever stops feeling awkward to write code in?
19:34callenI came through the other side, so to speak, in terms of comfort level a lot quicker in Common Lisp, Python, Clojure, etc.
19:34Iceland_jackFor some people it probably never feels awkward, that's a subjective call
19:34bbloomcallen: no, your tone, intentional or not, is extremely adversarial
19:34callenit just seems like a lot more people struggle and struggle harder with Haskell. I'm just trying to get some anecdote on the matter.
19:34bbloomcallen: if you don't intend to troll, know that you are doing so
19:35bbloomcallen: and choose your words more carefully
19:35callenit would've satisfied me to know that some people feel maximally comfortable in Haskell above all others.
19:35callenbbloom: cut the meta conversation. If you have alternatives to me, suggest them via private chat rather than passing on dictates in public chat.
19:36KirinDaveBatten down the hatches
19:36bbloomcallen: that would be a perfect example right there...
19:36KirinDaveDeploy the /ignore! Trollicane a'comin!
19:36callenyou keep complaining about my trolling, when I'm trying to get answers to the original question
19:36callenis there a "safe space" for asking comparative questions about programming languages?
19:36callenI wanted to ask in #yfl, but there are some serious haskell haters there
19:36dubzlol
19:36callenand I wanted to talk to haskell users.
19:37KirinDavecallen: We've already answered your question. Twice actually.
19:37KirinDavecallen: You're just really busy being defensive.
19:37callenKirinDave: was your answer, "productivity is a broad term"?
19:37Sgeo_Considering my constant language switching, I would like a channel where I could talk about various languages
19:37KirinDavecallen: I am not going to read your history for you.
19:37Sgeo_And how interesting a Clojure-Tcl bridge could be.
19:37callenSgeo_: #yfl is one. They're pretty prolog/erlang centric AFAICT. They've used many though.
19:37dnolenSgeo_: :P
19:37KirinDaveSgeo_: here is a good place, I suppose. Very few clojure hackers are exclusive.
19:38callenSgeo_: just don't mention haskell there and you'll probably be okay.
19:38KirinDaveErlang is another great example of a language with specific talents.
19:38callenKirinDave: what are the specific talents of Haskell?
19:38KirinDavecallen: Correctness, performance, succinct code.
19:39Iceland_jackThis is just a flamewar waiting to happen.. come on, know better than to ask subjective questions like this on a crowded channel
19:39KirinDavecallen: Haskell's price is that it's from an entirely different universe of coding that only a few other languages bear relation to.
19:39callenKirinDave: that seems reasonable.
19:39callenKirinDave: I think one problem is that my priorities are a bit different. I care more about shipping the 80/20 ASAP than I do correctness.
19:39KirinDaveFor contrast, Erlang is incredibly good at making distributed systems. God help you doing string processing in it though. The resulting code is at best "not natural" and at worst an exercise in patience.
19:39jcromartieso this post on /r/clojure makes me think: could mapcat be improved?
19:39jcromartiehttp://clojurian.blogspot.ca/2012/11/beware-of-mapcat.html
19:39KirinDavecallen: For some products that is the right call.
19:39callenKirinDave: that combined with my untrained-ness in the heavily recursive and type-driven style leaves me a bit...lost.
19:40callenand rather slow at making progress.
19:40KirinDavecallen: Very few people have training in type-inferenced languages.
19:40callenIt's not really the type *inference* that's the hold-up.
19:40bbloomKirinDave: stop feeding the troll :-P if you want to discuss this with him go to a private channel. jcromartie actually has an interesting discussion :-)
19:40callenit's learning to satisfy the type system and make it happy that takes time for me.
19:40Iceland_jackWait until he tries languages with undecidable type systems..
19:40KirinDavecallen: There is no difference.
19:41bbloomjcromartie: yeah, i saw that too. seems like mapcat could be considered bugged
19:41callenKirinDave: I find the incredibly powerful type system incredibly appealing though. Some of my little hacking phases with Haskell have been incredibly enlightening as a result.
19:41KirinDavebbloom: That's actually salient to the blog post I am writing.
19:41callens/incredibly//g
19:41KirinDavebbloom: It's no surprise lazy-seq comes into play.
19:42bbloomKirinDave: cool. I'd like to see space guarantees make their way into the clojure.core doc strings
19:42KirinDaveTough to do correctly.
19:42callenKirinDave: what's the blog post about? Also, I liked your fizz-buzz post that transitions into macros a lot.
19:43KirinDavecallen: monoids, you mean?
19:43callensorry, sure.
19:43callenI'm still fuzzy on the category theory. Quite so.
19:43callenI don't really understand the monad laws or how the different categories relate to the code.
19:43KirinDave'sokay. So is SPJ.
19:44callenhuh?
19:44callenhow could he be?
19:44KirinDaveYou should ask those questions elsewhere. They're way offtopic.
19:44brehautKirinDave: lol
19:44callenmonads are off-topic in Clojure?
19:44KirinDavecallen: Yes.
19:44callenthey have monadic libraries in Clojure.
19:44KirinDaveYes.
19:44brehautand they arent especially idiomatic
19:44KirinDaveFor anyone.
19:44KirinDaveThey're sort of a "look what i can do!"
19:44callener...then why does Haskell use them?
19:44brehautKirinDave: not entirely true; they are useful as macro plumbing
19:45KirinDavebrehaut: Eehhhhhhhh.
19:45KirinDavecallen: Because Haskell has strong static typing with a very powerful inference engine and also probably one of the worlds 3 most sophisticated compilers for functional programming (and also a host of hard-won rewriting rules for making that work)
19:46KirinDavecallen: I've yet to see a good implementation of monadic code in dynamically typed languages.
19:46callenwhat about Haskell necessitates them, as opposed to Clojure, though? The purity?
19:46KirinDaveYou usually have to explicitly annotate which monad you want, and that sort of spoils the exercise.
19:46KirinDaveThe non-strictness.
19:46callenoh that explains a lot actually. Cf. OCaml.
19:47callenKirinDave: want to take it to #haskell-overflow?
19:48KirinDaveNope. I want to go fold laundry and rest my brain after writing a 3k word blog post in one sitting.
19:48callenI figured as much. Well I learned something anyway.
19:48KirinDaveGood luck.
19:48callenI'd forgotten how incredibly unpleasant IRC can be for the simplest conversations. This was a good reminder.
19:48AdmiralBumbleBeeI was enjoying reading the discussion :(
19:49callenAdmiralBumbleBee: I'd be happy to talk to you somewhere people won't complain.
19:49brehauthi AdmiralBumbleBee
19:49shachafYou don't need to understand category theory to understand the monad laws.
19:49bbloomcallen: is english your first language?
19:49KirinDaveThe monad laws are sort of obvious, once you realize the intent.
19:49callenshachaf: doesn't really matter. All of it gets rubber-stamped with *MATH!*
19:49AdmiralBumbleBeecallen: I'm usually the guy who whines about offtopic… and that discussion seemed totally on topic to me
19:50callenAdmiralBumbleBee: are you familiar with Haskell at all?
19:50AdmiralBumbleBeecallen: yes
19:50AdmiralBumbleBeeI started learning it relatively recently, but I've been very busy
19:50shachafUh oh, looks like I missed a long discussion in here.
19:50AdmiralBumbleBeehi brehaut :)
19:51callenAdmiralBumbleBee: story of my life. I've been tinkering with it off and on for over a year.
19:51AdmiralBumbleBeecallen: oddly enough, I keep running into road blocks with haskell… and what gets me by is understanding the concept applied in clojure
19:51AdmiralBumbleBeeso any discussion of haskell in a remotely clojure context is super cool for me
19:52AdmiralBumbleBeeI still have issues understanding monads honestly
19:52AdmiralBumbleBeeeverytime I think I get it, someone tells me that I don't
19:53AdmiralBumbleBeethen someone tells that person that they're wrong too
19:53AdmiralBumbleBeeand I go back to square one
19:53shachafAdmiralBumbleBee: You don't need to worry about "underading monads" that much.
19:53shachaf"monad" is a pretty generic API for a lot of concrete types.
19:53AdmiralBumbleBeeunderstanding :P
19:54AdmiralBumbleBeeit's what I want
19:54shachafEr, yes. That word.
19:54shachafUnderstanding the concrete types is useful.
19:54shachafOnce you understand all the "prerequisites", "understanding monads" will come pretty naturally.
19:54shachafBefore that, it's just trying to understand an abstraction for its own sake.
19:54AdmiralBumbleBeeI always want to know implementation details
19:54AdmiralBumbleBeeI can't stand just knowing how to use things
19:54shachafOK. Monads aren't implementation details. :-)
19:55AdmiralBumbleBeeI want to know how they work, what they do, what they should do etc..
19:55shachafMonad is entirely "how to use things"
19:55AdmiralBumbleBeehmm
19:55callenAdmiralBumbleBee: I do the same thing sometimes (translate between Haskell and Clojure) but I find it doesn't help for the truly haskell-specific parts.
19:55shachafWell, OK, I'm exaggerating.
19:55callenI don't think it helps with the stuff specific to recursion either.
19:55AdmiralBumbleBeethis is where I'm conflicting with what I've read and been explained before shachaf :(
19:56shachafAdmiralBumbleBee: Did you see the FAQ?
19:56shachafhttp://www.haskell.org/haskellwiki/FAQ
19:56shachafhttp://www.haskell.org/haskellwiki/FAQ#The_M-word in particular.
19:56AdmiralBumbleBeeyes shachaf
19:56shachafThis uses a lot of features: first-class functions: the second argument to (>>=) is a function; type constructors (here m); type class polymorphism; type class polymorphism over type constructors (which few other languages have); parametric (not type class) polymorphism, over a and b. Each of these features is more fundamental than the specific idea of monads. If you understand each feature, then Monad is a small example of how they fit together
19:56AdmiralBumbleBeeI really think the core issue is that I don't understand type classes, at all
19:57AdmiralBumbleBeeit seems very strange to me
19:57callenoddly, I found the typeclasses part easier to understand. Perhaps because that's largely how I use Python's inheritance.
19:57amalloytype classes are not far off from clojure protocols or java interfaces
19:57shachafOK, so that's an important thing to understand before you can understand a specific type class.
19:57callenI get stuck on modeling code in terms of recursion more often.
19:57shachafamalloy: They are in how they're used!
19:58AdmiralBumbleBeecallen: clojure is the first 'high level' language I've used, let alone functional
19:58AdmiralBumbleBeeI really don't have anything to fall back on for understanding such things
19:59amalloyshachaf: really? i'm conversant in the basics of monad use, and the only difference that's obvious to me is that haskell functions/typeclasses can dispatch on return type
19:59callenAdmiralBumbleBee: ah, I'm kinda the opposite. I spent most of my years in clisp or Python.
19:59callenAdmiralBumbleBee: my only low-level is C.
19:59amalloyi would love to hear what else is different
19:59AdmiralBumbleBeecallen: I've tried python a bit… never used CL
20:00callenAdmiralBumbleBee: CL was great if you wanted to write code like a cabin-dwelling unabomber.
20:00AdmiralBumbleBeehonestly, I've not spent any time in an OO language other than understanding enough objc so I can just write straight C for everything :)
20:00brehautamalloy: *handwaving* there kinds and ranks stuff makes typeclasses slightly more complicated
20:01KirinDaveamalloy: " the only difference that's obvious to me is that haskell functions/typeclasses can dispatch on return type" there are more things, but this is a pretty important thing.
20:01shachafIt's less "return type" and more "type".
20:02shachaf"return-type polymorphism" isn't special.
20:02shachafYou have minBound :: Bounded a => a, which isn't a function at all.
20:02KirinDaveshachaf: Tell this to scala? ;)
20:02callenmy primary experience of Scala was seeing sbt run out of memory and crash, and being so disgusted that I couldn't even be bothered to continue.
20:03shachafAnyway, many places where you might use interfaces and types in Java, the thing you'd use in Haskell is just types and regular old values.
20:03callenshachaf: regular old values? you mean in the context of pattern-matching or something else?
20:04shachafTalking about this in the abstract probably isn't much use. :-)
20:04KirinDaveshachaf: That is why i am trying to write a series of more concrete posts
20:04shachafType classes and Java interfaces have different enough uses that thinking of them as "the same thing" is misleading.
20:04callenI'm just trying to understand where and what regular old values suffice in Haskell for something else in Java.
20:04shachafThey also work differently.
20:05dnolenshachaf: I don't think that typeclasses are that different from protocols. The ad-hoc polymorphism of typeclasses was introduced to surmount the special case of equality in SML as far as I understand it.
20:05AdmiralBumbleBeeso, what is the purpose of a type class?
20:05AdmiralBumbleBeeis there a simple explanation of that?
20:05shachafcallen: Hmm. Well, for example, a list might be sufficient for something which would be Iterable in Java? I don't actually know java, mind you. :-)
20:05shachafdnolen: Type classes aren't really for ad-hoc polymorphism, the name of that paper notwithstanding.
20:05KirinDaveAdmiralBumbleBee: Well one purpose is to provide a solution to the so-called "expression" problem.
20:05callenshachaf: that gives something to chew on at the least.
20:06shachafKirinDave: Huh? Type classes have nothing to do with the expression problem!
20:06dnolenshachaf: that's is not my understanding from the literature.
20:06callenogod.jpg
20:06KirinDaveshachaf: Untrue. :)
20:06shachafcallen: See also section 5.4 in the Haskell FAQ I linked to before.
20:06AdmiralBumbleBeeKirinDave: if that's true… then I get it
20:06AdmiralBumbleBeethat's what I thought in fact
20:06AdmiralBumbleBeebut I've been told thats' wrong a few times :(
20:06callenshachaf: eggscellent. Thank you!
20:06KirinDaveIt's just one thing.
20:06KirinDaveLike a specific thing.
20:07KirinDaveI mean, at the end of the day they don't serve a purpose totally dissimilar from protocols for the workaday programmer.
20:07callenshachaf: the veering away from excessive typeclassing/existential-ness makes a lot of sense to me.
20:07KirinDave"I know how to fmap this"
20:07KirinDave"I know how to show this"
20:07KirinDave"Tell me how to treat this as a Num"
20:08dnolenshachaf: I'm looking at the Wadler paper right now and your interpretation of type classes make no sense to me.
20:08dnolenshachaf: equality in SML was a special case - the only function that worked differently for different types - SML only had parametric polymorphism outside of that.
20:09shachafRight.
20:09KirinDavePersonally I feel like Haskell is just hitting its stride as a workaday programmer's language.
20:09KirinDaveA lot of really key libraries have fallen into place. The build system is getting to where it needs to be.
20:09KirinDaveThere is actually a LOT of free code for Haskell out there.
20:09shachafBut would you really call (==) "ad-hoc"?
20:09shachafOK, that's just an argument over words. Let's don't have that.
20:10dnolenshachaf: yes because it is open world, implicitly defined when you create a new datatype.
20:10KirinDaveOh, and I'm trying to hire infrastructure devs with haskell experience. By the by.
20:10KirinDaveFor a pretty different project.
20:10shachafAre you actually using Haskell?
20:10callenKirinDave: Haskell seems to be really popular in infrastructure/SRE/devops work. Is there a particular reason for that?
20:10KirinDavecallen: I would not say it is yet.
20:10KirinDaveshachaf: yes.
20:10KirinDaveshachaf: Two components have very high correctness requirements.
20:11callenKirinDave: really popular relative to its overall popularity as a ratio of how much people use most languages for such things.
20:11callenKirinDave: Haskell's primary use at google in infrastructure. Berkeley too IIRC
20:11KirinDaveshachaf: I am writing a free-monad based interpreter of a financial algorithm simulator for work. I imported Kan-extensions _like a boss._ ;)
20:12KirinDaveshachaf: You may have seen me bugging #haskell for help getting that sorted in my head.
20:12KirinDaveCuz i've never done it via Free before.
20:12KirinDaveOh also Clojure.
20:12KirinDaveSo like.
20:12KirinDaveHit me up, peeps who want work.
20:13callendefinitely not my bag, I'm supposed to quit programming soon so I can be a janitor.
20:14KirinDaveOr just, you know, cowboy up. :)
20:14callenKirinDave: psh, if only you'd seen the reader macros I'd written in CL. Your free monads would wilt.
20:14KirinDavePerhaps so.
20:14callengensym ALL THE THINGS
20:15KirinDaveNothing scares me after finishing LoL.
20:15KirinDaveCannot be frightened.
20:15KirinDaveActually check that.
20:15KirinDaveOne time I had a bug in a haskell program due to whitespace.
20:15callenI still think BoS type error -> delete file bug for GHC was pretty choice.
20:15callenKirinDave: I'm surprised you've done LoL.
20:16shachafIt's an unfortunate flaw in GHC that it only typechecks non-whitespace characters. :-(
20:16KirinDavecallen: I've done a lot of regrettable things in my life.
20:16callenKirinDave: IIRC, LoL spends a decent amount of time making fun of purity-fascists.
20:16KirinDavecallen: I do too.
20:16KirinDavePurity is a tool. Just like non-strictness.
20:16AdmiralBumbleBeelol?
20:16callenAdmiralBumbleBee: Land of Lisp.
20:16AdmiralBumbleBeeah
20:17callenAdmiralBumbleBee: a silly world for silly people. You should visit sometime.
20:17KirinDaveAdmiralBumbleBee: http://www.amazon.com/Let-Over-Lambda-Doug-Hoyte/dp/1435712757/ref=sr_1_1?ie=UTF8&amp;qid=1352078173&amp;sr=8-1&amp;keywords=let+over+lambda
20:17AdmiralBumbleBeeyeah… I"ve thought about it
20:17KirinDaveNo no
20:17KirinDaveLet over Lambda.
20:17AdmiralBumbleBeewait
20:17KirinDaveLand of List is baby talk.
20:17AdmiralBumbleBeewhich is which
20:17KirinDaveerr, Lisp.
20:17KirinDaveLet over Lambda is abbreviated "LoL" for a reason.
20:18callenKirinDave: what about AMOP?
20:18shachaf«eLet Over Lambda (ISBN 978-1-4357-1275-1, 376+iv pp.) is one of the most hardcore computer programming books out there. Starting with the fundamentals, it describes the most advanced features of the most advanced language: COMMON LISP.»
20:18KirinDavecallen: What about it?
20:18shachafPoe's law applies to Lisp people, I think.
20:18KirinDaveshachaf: Uh, in this case I concur. It's a fairly insane book.
20:18KirinDaveshachaf: "hardcore" meaning "I love lisp. Oh god I love lisp so much. Take me, lisp!"
20:19KirinDaveBut once you've seen (defmacro … (let (x …) (lambda (y) …))) a few times you begin to go mad and it all becomes easier.
20:26jcromartieI think the LoL guy is a bit full of himself.
20:27jcromartiebut maybe it's only because I don't understand his genius :)
20:27AdmiralBumbleBeehe must be _really_ good with lisp then
20:28callenAdmiralBumbleBee: http://letoverlambda.com/index.cl/toc just take a look for yourself.
20:29AdmiralBumbleBeecallen: Im already there :)
20:29AdmiralBumbleBeethis seems like a decent book to me
20:30AimHereWell that book has some neat ideas
20:30AimHereThe 'Common Lisp Uber Alles' tone of the book is a bit obnoxious
20:31bbloomdnolen: i see a yourkit notice on the core.logic project. what's the deal with open source licenses for that? can i get one if i want to profile some clojure stuff?
20:32dnolenbbloom: yeah just ask, you just need to send them a link to your project, give 'em a couple of days is all.
20:32amalloybbloom: their licensing page has a pretty clear statement
20:32AdmiralBumbleBeeI like opionated books
20:32bbloomdnolen: amalloy: thanks
20:33dnolenspeaking of Common Lisp, I looked at a bit ACL2 today - pretty cool stuff.
20:38bbloomdnolen: have you found it to be generally useful? my experience with jvisualvm is pretty lackluster
20:38dnolenbbloom: jvisualvm sucks IMO.
20:38bbloom"oh? lots of object[] were allocated? thanks...."
20:38dnolenbbloom: YourKit is much better and much much faster.
20:39xeqidnolen: acl2 is pretty neat
20:39bbloomdnolen: sadly, their email system isn't all that fast.... trail key hasn't come :-P
20:39dnolenbbloom: yes it takes a couple days
20:39bbloomdnolen: it say "less than 5 minutes" after i filled out the trail form lol
20:39bbloomtrial*
20:40dnolenxeqi: yeah was playing around w/ it in Racket today, it has graphical support for it via Dracula.
20:40dnolenwell more like interface support I mean
20:40dnolenbbloom: hah yeah, no, it took a couple of days for me.
20:41bbloomdnolen: probably old copy from when the CTO was nervously refreshing his inbox all day :-)
20:42jcromartieso, java.awt.Rectangle is a useful class… why didn't I just use this all along
20:44jcromartieshould just make a protocol around it
20:58bbloomdnolen: heh so the license just came
20:58dnolenbbloom: cool
20:58bbloomdnolen: first glance at the cljs compiler... i'm surprised to see that emit and analyze are both almost exactly equal in terms of time...
20:59dnolenbbloom: makes sense to me, surprised by which part?
20:59bbloomdnolen: i'd have expected analyze to be a tad slower, since it's doing lots more allocations
20:59bbloomi expected printing strings to be faster :-P
20:59dnolenbbloom: analyzer is fast, I keep saying that. No one believes me ;)
21:00bbloomdnolen: i believe you
21:00bbloomi just want to get my iteration times on the test suite from 30 seconds to 3 seconds
21:00bbloomstep 1 might be to buy that new 13 macbook pro ... mmmm
21:00dnolenbbloom: heh, 24-25 seconds for me on 2.66 ghz, good luck w/ that.
21:01dnolenbbloom: one big problem is Fogus's time literal test, adds 10 seconds.
21:01dnolenbbloom: it be nice if we could have that test be optional.
21:01dnolenbbloom: well 10 seconds on the slower JS engines.
21:01bbloomi'm consistently impressed by rhino's slowness
21:02bbloomi might just be forced to do a node repl impl :-)
21:02dnolenbbloom: it's epic, I dream about Nashorn
21:02bbloomdnolen: just googled that... heh "available for java 8 in late 2013"
21:03bbloomoh and 30 seconds was for the repljs start
21:03bbloommy test times are more like 2 minutes
21:04dnolenbbloom: yeah it used be 30 seconds for me for all 3 engines.
21:05dnolenbbloom: but that was like a 8 months ago when CLJS was considerably simpler.
21:05dnolenbbloom: hrm, actually maybe 30 seconds for V8
21:05bbloomdnolen: I think we could recapture some of that simplicity :-)
21:06bbloomdnolen: much of the complexity comes from too much stuff happening in a single pass
21:07bbloomdnolen: llvm has dozens....
21:08bbloomhttp://llvm.org/docs/Passes.html
21:10wingyi am following the nr 1 rule of using macros .. don't
21:14dnolenbbloom: I meant simpler as in the core.cljs
21:14dnolenbbloom: core.cljs is more than 2X larger
21:15dnolenbbloom: but sure
21:15bbloomdnolen: is core.cljs really all that complicated? i mean, there's lots of stuff, but it's all pretty straightforward, right? are you referring to the various optimizations?
21:17dnolenbbloom: it's all relative :)
21:39tmciverexit
21:46bbloomwhat's the quickiest/easiest way to call a private java constructor ? (yes, i know bad idea, etc etc, i just want to test something in the repl real quick)
21:47brainproxywingy: macros are a good tool, you just have to learn when to use them and when to favor solutions that in the long run are / will be simpler to understand and maintain
21:48brainproxywingy: one thing they can do for you that functions can't is give you a way to work around eager argument evaluation
21:49brainproxyyou may not need that often, but when you do, you pretty much have to use a macro
21:59amalloybbloom: reflection
22:00bbloomamalloy: yeah, i'm muddling around with getConstructor, etc... is there a popular clj lib to make this trivial?
22:00amalloy*shrug*
22:01amalloyclojure.lang.Reflector has a lot of relevant stuff
22:11bbloomamalloy: grep setAccessible yields no results, so probably not useful :-)
22:11bbloomamalloy: thanks tho
22:15wingybrainproxy: yeah
22:24mudgedoes anyone know what clojure book covers building clojure projects the most or best?
22:28xeqibuilding as in build systems, or building as in growing a code base?
22:29mudgexeqi: about using clojure build systems like lancet or leiningen
22:29mudgeI think I want to learn more about how to use ant in clojure
22:49scottjmudge: the first edition halloway book covers lancet, not sure about second. in general I think clojurebook.com is the best overall book currently.
22:49mudgethansk scottj
22:50mudgei'm checking out if the second halloway book covers lancet
22:50scottjmudge: but I don't think clojurebook.com talks about ant or lancet, I imagine it focuses on lein
22:52mudgethanks scottj: I wonder what book covers lein the best
22:55mudgei wish there was a book just on leiningen
23:01xeqiall the cool stuff in lein2 was created within the past year, so I doubt any book covers it much
23:01xeqimudge: is there something in particular you're trying to do?
23:11mudgexeqi: well i have an unusual build process I need to implement where I need to build several projects together and package them together. Actually I'm thinking that maybe what I should do is make each project a seperate lein project
23:11mudgeand make a project for the build that packages together the jars of the other projects
23:12callenmudge: I'm going to venture a guess and say..."yes"
23:12callentechnomancy: ^^ ?
23:12mudgexeqi: is there a way to call lein tasks from within a clojure program?
23:13mudgeSo that in my build project I'd like to call lein jar on my other projects and then get those jars and package them together and deploy
23:13callenmudge: that seems reasonable to me.
23:13lynaghkI'm giving a talk on Clojure + data visualization next week and just put together this handout: http://keminglabs.com/oredev_handout.pdf I'd love feedback.
23:13mudgethanks callen
23:13lynaghkIt's way more data visualization than Clojure, at the moment.
23:14xeqimudge: you don't want the sub projects in a repo?
23:15xeqiusually I'd see each seperate project get built, and then a top level one that includes them
23:15xeqilike ring
23:15mudgexeqi: i'm new to building with leiningen, I don't see the advantage of putting things in repos other than being able to access them remotely if I had a computer somewhere else or was going to share something
23:15lpvbis there a way to get lein repl to watch for changes in files and reload namespaces?
23:16lynaghklpvb: not natively as far as I'm aware, but you might want to check out: https://github.com/clojure/tools.namespace
23:18mudgexeqi: all my build project does it take the jars of the other project, add a configuration file, and zip them together and them deploy the zipped file. Does ring do something like this?
23:19mudgejars of the other projects*
23:23xeqisimilar, but different as it's a library; including ring/ring, brings in ring/ring-devel, ring/ring-core, etc
23:43mudgexeqi: thanks
23:43mudgeI noticed that the lein jar task includes the clojure source code files. What if I just want the class files?
23:47mudgeI found out on my own: putting this in the project.clr: :omit-source true
23:50mudgejust curious: what's everyone's favorite editor for Clojure programming?
23:58ivanmudge: Emacs. Though I often read code in IDEA.
23:59mudgeivan: cool, i use Emacs for clojure too