#clojure logs

2011-11-17

00:04changbeerhttp://ideone.com/4D5hj looking at this simple example, can anyone see why it cant locate clj_record
00:06Rayneschangbeer: You're requiring clj-record.boot, but you're using clj-record.core.
00:07RaynesThat is *a* problem, not necessarily *the* problem.
00:07RaynesIt's a start though.
00:10hiredmanmonads?
00:10clojurebotmonads is http://okmij.org/ftp/Scheme/monad-in-Scheme.html
00:10hiredmanI tell you, runtime patching via the repl is the devil
00:23jcromartiehiredman: really?
00:23jcromartiehow about Erlang?
00:23hiredmanwhat about it?
00:25jcromartieyou said runtime patching via the REPL is the devil
00:25hiredmanand?
00:25jcromartiewhat about hot-swapped updates, a la Erlang
00:25jcromartiethey seem to do pretty well
00:25jcromartieI think Clojure could do the same
00:26hiredmanthe issue with runtime patching via the repl is keeping a consistent state, it is all to easy to, change a function, change another function, reload the system, find the second function doesn't work, change it back, now your functions don't work together, etc
00:28jcromartietrue
00:28jcromartiebut I guess it's a matter of degrees
00:28jcromartiewhat if you design for hot-swapping, and test before deploying the update somewhere?
00:29jcromartiei.e. defonce, etc.
00:29jcromartieanyway, off to be with me
00:29jcromartiebed
00:29jcromartiegoodnight
00:29jcromartiehow the heck is it midnight already
00:31noncomhello!
00:32noncomi have a question
00:33brehautnoncom: just ask it, if someone can answer they will
00:34noncomi want to begin learning clojure (and already did), but everywhere i go, i mostly see stallnesss. the 1.3.0 version was released over a year ago. clojure box is no longer maintained since clojure 1.2.0, last comment on rich hickey blog is for almost a year ago. counterclockwise for eclipse is also only for clojure 1.2.0.... no real books to read about clojure 1.3.0.
00:34noncomthis is SAD! since i like the language.
00:34hiredman1.3.0 was released a few months ago
00:34RaynesNo way.
00:34Raynes1.3.0 was *just* released.
00:36noncomRaynes: hmm then my source was wrong about that
00:37noncomwell, anyway, what development environment would you recommend then? preferably something like counterclockwise or clojure box. or is the only possibility for now - emacs?
00:37amalloynoncom: isn't clojurebox emacs?
00:37ibdknoxCCW, emacs, vim, la clojure
00:38noncomit is, but it is all-in-a-box. i like eclipse and i see no point in learning emacs for that...
00:38ibdknoxccw works quite well
00:38hiredmanso I was doing some parts of speech tagging in the inference stuff (for complex stuff it would try and just pull out nouns and infer with those) but it makes looks 100x slower
00:38noncomyes it does. but is there any way to integrate clojure 1.3.0 into it?
00:38hiredmanegads
00:39ibdknoxnoncom: just replace the dependency with a 1.3.0 dependency?
00:39hiredmanlook ups
00:40noncomok, i will try) then i will go on in clojure direction, you have calmed me)
00:42noncomthank you for your attention)
00:43brehautcounterclockwise has had two siginficant releases in the last month or so too
00:43brehaut0.4.0 and 0.5.0 ?
00:43RaynesAnd Rich just isn't a blogger.
00:43RaynesWhich is why that doesn't get updated much.
00:44RaynesAs far as books go, 1.2 -> 1.3 wasn't a huge jump, so older books like Practical Clojure and The Joy of Clojure still apply just fine.
00:44noncomyeah my ccw is 0.5.0stable002
00:44RaynesClojure Programming, a new book targeting 1.3, is mostly done and not too far from the printers.
00:44RaynesI'm writing a book targeting 1.3 and potentially 1.4 myself.
00:45RaynesI assure you Clojure is no more stalled than the Earth blasting through space around the sun.
00:45noncomthis is very good to hear since i am very interested with it as it is lisp and is for java
00:46noncomi am not a lisp professional but clojure seems the best for me since i am mostly from java
00:50noncomone more question about the books - will they be available on the main clojure site? online versions? printed versions?
00:53noncomok, i have to go, see you late!
02:55mindbender1hi
02:55brehauthi
03:46keith_Which language construct is appropriate for building on top of host objects that mutate. deftype? (I'm new to Clojure)
03:46brehautkeith_: thats a heavy weight solution
03:47brehautkeith_: are you new to functional programming or just clojure?
03:47Chousukekeith_: building in which way?
03:47keith_both, but mostly clojure
03:48brehautkeith_: you can write a huge amount of clojure without ever having to touch a deftype
03:48Chousukein general if you're working with mutable java objects via interop there's little to help you. The best you can do is try to keep the code with mutable things small and separate from other logic
03:49brehautkeith_: the reference types are generally sufficient for most mutation, and they manage access semantics much more clearly than an ad hoc deftype
03:49Chousukeyou can also try converting the data from the mutable object into some immutable form and process that.
03:49Chousukereference types won't help with java objects though
03:49keith_ya
03:50Chousukeat least until pods appear, or whatever Rich comes up with :P
03:50ChousukeI wonder what happened to that idea
03:50brehautoh, i misread; you have mutating objects already ?
03:50amalloyChousuke: he mentioned pods again at the conj
03:50Chousukeoh, cool
03:51keith_brehaut: I'm not actually working on something specific. I'm just trying to understand the paradigm
03:51amalloyit still isn't very developed as an idea
03:51amalloykeith_: paradigm: avoid mutation
03:51Chousukekeith_: you can't avoid mutable things if you deal with java but you can do various things to minimise the code that touches it
03:52Chousukehaving a clean design is a good start
03:53Chousukethe keyword is isolation. try to keep mutation separate from program logic that does not need mutation.
03:54Chousukethat way you can at least test the non-mutating code separately and you have a smaller problem to deal with :)
03:56ChousukeI guess something like line-seq is a good example. it converts a stateful thing into an immutable sequence. The code that consumes the seq does not need to care what the seq comes from, only the part which calls the seq-consuming function needs to deal with closing the input stream and any exceptions.
03:58brehautjust did a rewrite of my syntax highlighter brush; the parser now correct attaches all the prefix symbols to the following form
03:58brehaut(not that it does anything with them yet)
03:59keith_From listening to Rich's videos and what not I can understand why mutable objects (in the sense of Date, String, etc.) are bad. I'm having trouble understanding how things like web-servers or user-interfaces should be written
04:00brehautkeith_: leaving aside database access, a web app (and server) is actually a pretty good example
04:00brehautyou have a narrow interface to the world that deals with mutable state (handling sockets, accepting incoming data)
04:00clojurebotdatatype is see datatypes
04:01keith_so if I were to write a UI for another programmer to consume. In OOP he'd get a class. In clojure he'd get a function that took a socket?
04:01Wild_Catbrehaut: indeed, webapps are mostly stateless, due to HTTP's own stateless nature. GUI apps, OTOH, are another problem.
04:01keith_s/UI/web-server
04:03brehautkeith_: i dont understand the question
04:03keith_If I were writing a web-server for another programmer to use. What is the programmatic interface I would give him?
04:03brehautWild_Cat: thats like saying 'inherent state is inherent'!
04:04amalloyChousuke: line-seq isn't a very good example, because it's not the case taht only the seq-producing code neads to deal with closing the file
04:04brehautWild_Cat: you can still remove accidental state, just like you can in a web service. it happens that you'll probably remove less, but thats beside the point
04:04brehautkeith_: is the other programmer using the web server to build a website?
04:05keith_sure I guess, or maybe a web-service or restful API. whatever
04:05brehautkeith_: because if so, id expect the web server to respect the ring interface, where a server is passed a single function that takes a map representing the request and returns a map representing the response
04:06keith_and it calls that function for each request?
04:06brehauteg, heres how you start up a jetty webserver with the ring adapter: (run-jetty your-website-handler {:port 8000})
04:07brehautyour-website-handler is just a function
04:07brehauta really simple website might be
04:07brehaut(defn your-website-function [req] {:status 200 :headers {} :body "Hello, world!"} )
04:07brehautkeith_: yes
04:08Wild_Catof course, that function will have to, at some point, query a database and/or modify session vars, and that's where the mutability is concentrated.
04:09amalloyor a slightly more involved example: (defn your-website-function [req] {:status 404 :headers {} :body (str "Sorry, I couldn't find " (:uri req))})
04:09amalloyWild_Cat: if you drop "of course" and replace "will have to" with "might", that's more accurate :P
04:10amalloyfor example, you could snarf the whole db into memory at load time and present a read-only view of it, like for elephantdb
04:10Wild_Catamalloy: well, I ignored static websites for the purposes of this discussion, because static websites are by definition immutable ;)
04:11Wild_Catlikewise read-only DBs ;)
04:11Wild_Catyou shouldn't need mutable state to represent/render immutable data.
04:12brehautWild_Cat: and yet, if you were to use python or java or ruby, you would have buckets of the stuff
04:12brehaut(where 'the stuff' is mutable data)
04:13Wild_Catbrehaut: not really, no. In Python I'd simply start up a template engine, make a quick query to an ORM and presto.
04:13Wild_Cathowever, Python doesn't *enfore* immutability.
04:13Wild_Catenforce*
04:13brehautWild_Cat: neither does clojure
04:13brehautthis isnt haskell
04:13keith_but maps are immutable
04:13Wild_Catbrehaut: but most of its data structures are immutable, though?
04:14brehautWild_Cat: sure, but thats not the same as enforcing immutability
04:14Wild_CatI mean, you have to explicitly declare stuff as mutable (or use Java classes but it's cheating), right?
04:15brehautif you mean, you can suddenly treat an immutable datastructure as mutable, well of course, but mutabilty is available trivially, (and as an asside, java classes are not 'cheating' in clojure; java is first class)
04:16brehaut,(let [a (atom 1)] (prn @a) (reset! a 2) (prn @a) nil)
04:16clojurebot1
04:16clojurebot2
04:16brehauttrivial mutable state, and i can stick that anywhere in my program as needed (although i would try not to)
04:17clgvbrehaut: yes you can. ;) but make sure that you really need it
04:17brehautin contrast, if you were to try that in haskell you would be required (by the type system) to use either IO, STM or ST monads
04:19brehautWild_Cat: thing is, basically every non trivial program has state. its inherent in the whole endeavor. the important thing is that where possible the only state in the program is related to the actual problem at hand, and no accidental state forced upon you by the tools.
04:21keith_I'm just too used to gluing objects together inside of other objects
04:21amalloykeith_: it's super-easy to shove maps inside of other maps instead :)
04:21clgvkeith_: it takes a few weeks programming clojure to get rid of that ;)
04:21brehautand functions inside other functions!
04:22amalloytrue that. i love higher-order functions
04:22keith_brehaut: I'm starting to see why function composition ACTUALLY works when OOP is so frustrating
04:22amalloyi can't really think usefully at even the third order, but second-order functions are immensely useful all over
04:22brehautamalloy: +1
04:23keith_but, take the user-interface example, I still don't quite understand how I would abstract something like that
04:23brehautim not entirely sure i even know what a third order function is
04:23amalloybrehaut: a function that takes, or returns, a second-order function
04:23keith_coming from environments where I would sub-class Control/Widget/Whatever
04:23amalloyaccording to whatshisname
04:23brehautkeith_: you'd have a couple of reference types holding coarse grained immutable data, and you'd defereference it when you need to update the view,
04:24keith_dereference meaning getting a value?
04:24brehautgood old whatshisname
04:24brehautkeith_: yes
04:24brehaut@ is the deference operator
04:24amalloy$google sixth order functions parser combinators
04:24lazybot[Even Higher-Order Functions for Parsing or Why Would Anyone ...] http://www.eecs.usma.edu/webs/people/okasaki/jfp98.ps
04:24brehautwell, reader thingimy
04:24clojurebotis translated to unquote by the reader, and as ` is expanded it is removed
04:24keith_ya I saw that. So that's intended to be used with things like atom then?
04:24amalloybrehaut: okasaki, apparently
04:24brehautamalloy: wow. this looks like brain bending
04:25amalloyyeah, i don't think i finished reading it
04:25brehautall the ML is hurting my simple brain
04:26brehautcuriously, it appears that straight forward lambda calculus never steps below second order
04:26alex_baranosky~ml
04:26clojurebotXmL is case-sensitive
04:27brehautalex_baranosky: Meta Langauge; the family containg ocaml, sml, F# and distantly Haskell
04:27amalloybrehaut: i don't think that's true, is it? you can add two numbers in lambda calculus without involving function composition, i thought
04:28alex_baranoskybrehaut: I don't do the ~ thing to learn... mostly just to see what silly thing ClojureBot will come up with :)
04:28brehautamalloy: but every number is itself a function right?
04:28keith_in lambda calc aren't numbers just functions?
04:28brehautalex_baranosky: aha
04:29brehauti really need to head to bed
04:29brehauti fear i may have extremely higher order nightmares
04:29keith_brehaut: thanks for the help
04:29brehautno worries
07:09clgvwhich is the fastest way to create a hashmap from key-value-pair data (large) read from disk?
07:13lucianclgv: a lazy map backed by mmap might work, but i don't even know if java provides mmap
07:13clgvlucian: no, I meant I already have the data read and want to create a clojure map
07:14luciani see. don't know what would be faster then
07:16clgvclojure.lang.PersistentHashMap/createWithCheck seems to consume a lot of time
07:21clgvoh it has a create-method for something implementing java.util.Map as well
07:34raekclgv: something like this? (loop [m {}] (if (end-of-file? ...) m (let [key (read-from-file), val (read-from-file)] (recur (assoc m key val)))))
07:35raekor perhaps (into {} (sequence-of-pairs-from-file))
07:36raekwhere that sequence can be lazy
07:36clgvraek: no thats already done. actually I have a java.util.HashMap and want a clojure hash-map. but that seems to consume a lot of time
07:37raekso constructing a clojure hash map takes too long time?
07:38raekclgv: have you tried if a transient clojure hash map sovles the problem?
07:39clgvraek: yeah, actually I just change that conversion to clojure.lang.PersistentHashMap/create - it's still slow and I currently prepare the benchmarkrun
07:41clgvfyi: create uses EMPTY.asTransient()
07:45clgvI only read a total of 5.6MB and its lasting pretty long
07:57clgvok, the previous map related bottleneck is solved. now there is the problem that I cant write a defrecord in clojure 1.2.1 - so I store it as a normal hashmap and use into to get the data back into the instance - thats pretty damn slow.
07:57clgvmost of the time is now spend in the reduce of into
07:58clgvcan I do any transient stuff on the map implementation part of a defrecord?
08:00raekclgv: btw, what was the previous map related bottleneck?
08:02clgvraek: I replace the previous conversiobn from java.util.HashMap with (clojure.lang.PersistentHashMap/create java-hash-map) - before it used clojure.lang.PersistentHashMap/createWithCheck implicitly
08:09clgvI noticed that since a week or two the rendering of clojure's core.clj on github is pretty time consuming. did anyone experience this, too?
08:11cemerickclgv: using a transient hashmap will likely help your loading issues, and be cleaner than mucking with PHM static methods.
08:22michael_campbellare there any rules of thumb as to when to use cond vs if? Is it when you have > 2 decision paths or something?
08:23jcromartiemichael_campbell: that's it exactly
08:23jcromartiemichael_campbell: also, condp is even more powerful
08:24michael_campbelldidn't know about that one yet... going to look =) Thanks
08:25clgvmichael_campbell: 'cond expands to nested 'if statements so you may use it whenever it provides better readability
08:26michael_campbellThanks. Is the :else keyword in cond used more or less where 't would have been in lisp?
08:27clgvmichael_campbell: you only need to provide something truthy for the "catch all others" clause - it does not have to be an :else
08:28michael_campbellGotcha.
08:59BorkdudeI'm reading in the book Clean code about the opposites between procedural and OO. When adding new functions, procedural has no problem, but when new datastructures are added, functions must change to deal with them. In OO you can add new datastructures (classes) without changing code (polymorphism), but when you want to introduce new functions, code has to change. What is Clojure's take on this again? Have few datastructures and a lot
08:59Borkdudeof functions?
09:04duck1123clojure has a lot of functions that work with many different datatypes
09:05Borkdudeduck1123: say I want concat to work with my own datastructures... the take would be that my datastructure would implement ISeq right? And then we're back in OO.
09:05duck1123and most of the time, you use the standard clojure datatypes instead of inventing new ones. Instead of a class, you just use a hash map
09:06duck1123Borkdude: are you defining this type in Clojure or in something like java?
09:07Borkdudeduck1123: preferably in clojure itself
09:07ohpauleezBorkdude: Clojure's approach is to have 100 functions that operate on 10 abstractions
09:08ohpauleezYou apply transformations to generic data - that data is built up (or fulfills) certain abstractions
09:09duck1123Borkdude: you might want to look at defrecord if you want something map-like (holds key/vals) but is also typed
09:09ohpauleezif you want to build a low level data structure, you can, but you'll probably find that hash maps, sorted maps, vectors, finger trees, and records give you all you need
09:09Borkdudeduck1123: do most functinos in clojure work on self defined records?
09:09duck1123but chances are, you don't even need the type and Clojure's data structures would work for you
09:09ohpauleezif you need a certain functionality from these generic data structures, you make a new abstraction, and extend their functionality
09:11BorkdudeI guess I would have to see an example of this to understand this more
09:11duck1123Borkdude: most functions just work on sequences or maps, or whatnot. and don't really care what the type is, so long as it can do it's transformation
09:12Borkdudeduck1123: what is the underlying type of a defrecord, a hash map?
09:12duck1123yes
09:12duck1123at least, they act like maps
09:12ohpauleezBorkdude: you should stop thinking of underlying types, and instead underlying abstractions
09:12licenserdun dun dun
09:12Borkdudeduck1123: then why would I use that? (I never felt the need so far)
09:13ohpauleezBorkdude: You want to frame your problem using verbs, not the kingdom of nouns
09:14Borkdudeohpauleez: that's how I mostly do Clojure, I never felt the problem, but I was just wondering since I'm reading this book ;-)
09:16ohpauleezBorkdude: Records just fulfill protocol for map-like lookups
09:16duck1123Borkdude: http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/
09:16ohpauleezso that they map interface when you use them
09:16cemerickmore translations always wanted on that, BTW ^^
09:16cemerick:-)
09:17TimMcgfredericks: I might fork your lib-2367 and try adding getters to the macro, and maybe some support for isFoo for boolean fields.
09:17Borkdudeduck1123: cemerick awesome
09:18Borkdudecemerick: translations?
09:18cemerickPortugese and Japanese translations are linked near the bottom.
09:18Borkdudecemerick: I could make a Dutch one if you'd like
09:18cemerickI should get Christophe to do one in French.
09:18cemerickBorkdude: If you make it, I'll link it. :-)
09:19Borkdudecemerick: in what program did you make it, Omnigraffle ?
09:19duck1123I could probably get it translated to Lojban, but it's doubtful that would help anyone
09:19cemerickyeah
09:19cemerickBorkdude: I can send you the source file if that would help
09:20Borkdudecemerick: sure, I'll download the 14 day trial and change the text
09:20licensercemerick: I could offer german :)
09:21duck1123so where's the clojure program that will generate this as SVG?
09:22cemerickBorkdude, licenser: msg me your email addresses, I'll share a dropbox folder with you that contains the source diagram :-)
09:22Borkdudecemerick: how do I send a private message in emacs / erc? ;)
09:22cemerickdo => /msg cemerick <your email addy>
09:23Borkdudedone
09:23raekcemerick: I can provide a Swedish translation
09:28cemerickraek, Borkdude: licenser had a much better idea — I'll just create a github project and take pull requests. Don't know why I didn't think of that to start. :-P
09:29Borkdudecemerick: ok
09:29licensercemerick: to make me feel smrt!
09:30Borkdudecemerick: maybe you could externalize the text somehow, so it would be easier for people to provide the text, without having a Omnigraffle license?
09:30cemerickhrm
09:31Borkdudecemerick: don't know how much trouble that is, or if it is possible at all
09:31Borkdudecemerick: we could write some clojure code that generates latex maybe instead
09:31cemerickIt's all XML, so I think it's easily editable without omnigraffle anyway
09:31Borkdudecemerick: ooh that's good, problem solved
09:34hugodot: if anyone can help me getting conkeror to work on lion, could you msg me…
09:43cemerickBorkdude, licenser, raek: See https://github.com/cemerick/clojure-type-selection-flowchart — just copy the top-level graffle file to a corresponding language-specific version in /translations, and edit there; omnigraffle would be easiest, but if you take a run at adding translations via editing the XML directly, I'll be happy to produce a corresponding png
09:43licensercool cool :)
09:52Borkdudecemerick: working on it. Just a question. What do you mean with "statically refer to"
09:52shtutgarthow can i find out what version of clojure.tools.macro (and other) available? There is <version>0.1.2-SNAPSHOT</version> in the pom.xml, but [org.clojure/tools.macro "0.1.2-SNAPSHOT"] doesn't work
09:53cemerickBorkdude: be able to use the name of a class within a JVM language source file that is to be processed via static compilation (e.g. Java)
09:53cemericks/Java/Java + javac
09:55joegalloshtutgart: http://search.maven.org/#search|ga|1|a%3A%22tools.macro%22
09:56joegallowhich is to say -- go here http://search.maven.org/#search|ga|1| and then type tools.macro in the search field ;)
09:57joegalloalternatively, if you are using leiningen, you can lein search tools.macro
09:59duck11230.1.2-SNAPSHOT is on sonatype https://oss.sonatype.org/content/repositories/snapshots/org/clojure/tools.macro/
10:01shtutgartjoegallo: thanks, I should remember lein search command :)
10:01joegalloyou're welcome!
10:09Borkdudecemerick: I'm almost done, wondering how Omnigraffle will take care of ë in XML
10:10raekI have similar conserns...
10:12duck1123If I have a file containing a large clojure data structure, what's the best way to read that into a var?
10:12raekBorkdude: just make sure the text is encoded in UTF-8 (the encoding which the xml file declares that it uses)
10:15Borkdudecemerick: https://github.com/Borkdude/clojure-type-selection-flowchart can you try to compile that graffle?
10:15TimMcor Clojure AOT, yeah?
10:16TimMc(sorry, replying to scrollback -- referring to "statically refer to")
10:18Borkdudecemerick: wait, I installed omnigraffle now
10:18Borkdudeand I see it's not yet perfect
10:19Borkdudecemerick: what exactly do you mean "associated with performance sensitive"
10:19Borkdudecemerick: do you mean: instance of the type will be used in performance sensitive situations?
10:25cemerickBorkdude: yes
10:26cemerickthe .graffle file is omnigraffle's native format
10:29raekcemerick: I see that this flowchart never recommends 'reify' for pure-clojure uses
10:29Borkdudecemerick: graffle is on my repo
10:30cemerickraek: you mean with protocols? Yeah.
10:31cemerickit's already complex enough, and I didn't want to try to reorganize the layout yet again :-P
10:32cemericka rare enough use case that I didn't feel bad about not including it.
10:32cemerick(so goes my justification anyway)
10:35Borkdudecemerick: sorry I send two pull requests, one when I didn't have the png on it. I also added the .graffle file for my own good.
10:37BorkdudeI last used omnigraffle in 2005 :)
10:40raekcemerick: yeah, simple is good
10:44raekI really want to have a one-syllable word for "map" in Swedish...
10:44luciani hate how the word map is overloaded, especially in functional languages
10:45Borkduderaek: I tend to not translate those words, because they are concepts in clojure itself
10:45raek"avbildning" is probably the correct translation, but unless you have been to a university you have probably never heard of it
10:46raekwe just say "map" [mäp] in Linköping Clojure User Group :-)
10:47TimMcHmm, the ä doesn't show up correctly on my work machine.
10:48TimMcTime to blame Linux Mint again!
10:49lucianTimMc: i'd blame your client
10:52TimMclucian: Client is irssi under screen via SSH.
10:52TimMcEverything looks fine from my personal laptop.
10:52lucianright, so lots of things on the way to potentially fuck up :)
10:53luciani bet on your terminal
10:53TimMctrue
10:55broquaintLooks good from here with the same setup, TimMc, FWIW.
10:57raflbroquaint: o/
11:03broquainto/ :)
11:05cemerickBorkdude: thanks! 2 things: (a) Feel free to add attribution to the png/graffle if you like, and (b) could you squash those commits into one?
11:05Borkdudecemerick: ok, wait a moment.
11:06Borkdudecemerick: I'm kind of a git n00b, how do I do this
11:06cemerickgit rebase -i chas-origin/master
11:06cemerickYou can then squash two of the commits and then give a single comment for the result
11:07cemericklucian: once they become public, sure; before then, might as well to make the progression of things clear
11:08michael_campbellTimMc: I see the umlauted 'a' fine in linux mint on xchat.
11:08luciancemerick: i still don't like it much :) i also use hg, that might be a factor
11:08lucianmichael_campbell: same here, ubuntu xchat
11:09michael_campbellTimMc: I'm on Mint 11 though; you said you use 10, right?
11:10Borkdudecemerick: fatal: Needed a single revision
11:10BorkdudeInvalid base
11:10TimMcmichael_campbell: Yeah.
11:11Borkdudecemerick: what I did was a fork on github
11:11Borkdudecemerick: and then cloned it on my machine, edited
11:11Borkdudecemerick: and pushed
11:21TimMcOK, let's say you have a lazy seq of strings. Is there a better way than (doseq [s seq-of-str] (print s)) to print all the strings without holding onto the head?
11:22TimMc"Better" meaning clearer to the programmer or possibly more efficient.
11:28fliebeldrewr: What does your map look like for multipart messages?
11:29fliebelTimMc: hm, this looks fine, but an alternative could be ##(dorun (map print ["foo" "bar" "baz"]))
11:29lazybot⇒ foobarbaznil
11:37kephalefliebel: any reason to use a dorun there instead of a doall?
11:38TimMckephale: dorun drops the head, I think
11:38TimMcfliebel: I think that expresses it better, thanks.
11:39kephaleooo good to know
11:41TimMc&(doall (map print (range 5)))
11:41lazybot⇒ 01234(nil nil nil nil nil)
11:41TimMc&(dorun (map print (range 5)))
11:41lazybot⇒ 01234nil
11:41kephalegotcha
11:41TimMcTHe purpose of doall is to realize an entire lazy seq.
11:42TimMcand give it back to you.
11:43kephalebut doseq holds onto the head?
11:43TimMcI think not.
11:43TimMc,(doc doseq)
11:44clojurebot"([seq-exprs & body]); Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil."
11:44kephalemmm…
11:45TimMc(doseq [x s] foo) is like (dorun (map #(fn [x] foo) s))
11:45kephaleright, so i'm kind of unclear why you would switch to dorun/map from doseq
11:46TimMcI'm not sure either!
11:46kephalelol
11:46duck1123 doseq conveys the intention better
11:47TimMcMaybe.
11:48TimMc(doseq [x strs] (print x)) vs. (dorun (map print strs))... meh. They're pretty similar, aren't they.
11:49kephaledoseq is actually kind of longer
11:50duck1123is there a performance difference maybe?
11:51kephalekind of hard to tell, the code for doseq is relatively long
11:52TimMcI don't like having to name the "x".
11:53kephaleagreed
11:54Borkdudeparadoxically x usually stands for something unnamed ;)
11:56duck1123It's funny. I was changing a block of my code from a map to a doseq right when this topic started
11:57tsdhWhen I have a symbol naming a namespace, how do I get the namespace?
11:59fliebeltsdh: find-ns?
11:59fliebelWhy does derive require namespaced keywords?
12:00tsdhfliebel: Yes, that works. Thx
12:07Borkdudeamalloy_: can I ask you in what way you prevent your own settings from a dev branch to be merged in with master's config.clj in 4clojure?
12:08Borkdudeor anyone else
12:14duck1123Borkdude: http://gitready.com/intermediate/2009/02/18/temporarily-ignoring-files.html
12:16Borkdudeduck1123: that's another way, but then I would have to do it for every time I would branch from master
12:17Borkdudeduck1123: the thing I want to make sure it that the config.clj is never changed, without having to think about it ever again
12:17Borkdudein master that is
12:18duck1123Borkdude: I don't know of any foolproof ways other than just taking care of what you're staging
12:20Borkdudeduck1123: I read this answer on SO, http://stackoverflow.com/questions/928646/how-do-i-tell-git-to-always-select-my-local-version-for-conflicted-merges-on-a-s
12:20Borkdudeduck1123: it uses .gitattributes, but I wondered what way is used in the 4clojure project exactly
12:21Borkdudeduck1123: there are several ways, I want the most git idiomatic one ;)
12:22duck1123In one pof my projects, I keep config.clj out of git and have it ignored, then I require the user to rename the sample file. I don't know what you'd do if the config file is already checked in like that
12:23duck1123of course the issue with that is I'll make new config options and then forget to add them to the template
12:24Borkdudeduck1123: that problem would also exist with the SO solution
12:25arohneris there any way to control the user> prompt on slime? I'd love to change it to the hostname of the box I'm connected to
12:27duck1123arohner: repl takes a :prompt param. IIRC lein has a way to set the repl options
12:27duck1123:repl-options [:prompt (fn [] (print "your command, master? ") (flush))]
12:28arohnerduck1123: thanks, but I think I need something different for slime
12:36duck1123I wish korma translated dashes to underscores. It hurts my head to do things like :venue_type_id in clojure
12:37duck1123I need to start playing with the transform option more
12:41BorkdudeJust wondering, what is the origin (and exact meaning) of the expression "Blabla 101".. "in the very beginning of blabla"?
12:41nDuffBorkdude, 101 is the usual course number for introductory classes
12:41BorkdudenDuff: in what country
12:41nDuffBorkdude, the United States, at least; can't comment elsewhere.
12:42BorkdudenDuff: really, they have a system that actually saves a course id like "Blabla 101", and the next one is "Blabla 201" or ".. 102"?
12:42duck1123More that it's considered the introductory class. Few schools actually have a 101, oddly
12:43duck1123I guess that's an overly broad statement
12:43Borkdudeit has become a standard expression, I first thought it referred to a "one on one class setting"
12:43Borkdudelike private lessons
12:43nDuffBorkdude, 200- and 300-level classes typically refer to the year in which students are expected to take them -- at the university I attended, taking 300-level classes before one's second year required faculty permission
12:43nDuff(err, before or during)
12:44BorkdudenDuff: ah ok
12:44Borkdudeduck1123: what is a broad statement, that it's a standard expression?
12:44Borkdudeduck1123: I've seen it a lot lately, especially in the context of programming tutorials
12:46nDuff...been a while, though, such that I'm not sure of the extent to which my memory can be trusted.
12:46Borkdudeok, got that cleared up then
12:46BorkdudeI read here in this book: "We learned in OO 101 that there are concrete classes"...
12:49bhenryanyone run into ie problems with clojurescript yet?
12:49bhenrys/anyone/anyone_else
12:51Borkdudebhenry: I haven't, but that's only because I didn't use it yet ;)
12:51duck1123users of IE deserve what they get
12:52bhenryduck1123: unfortunately driven by corporate policy : /
12:52duck1123stupid corporate policy...
12:54bhenryseriously
12:55BorkdudeIE6 was the reason I quit doing anything with html, javascript or css for a few years
12:55bhenryclojure.browser.dom/log is using js/console and apparently that's undefined in ie.
12:55bhenryBorkdude: i hear that.
12:56BorkdudeI'm still recovering
12:56duck1123does that undefined actually cause errors? or is it just an ignorable warning?
12:59samaaroncemerick: are you about?
12:59cemerickI am.
12:59samaaroncemerick: I wrote a TRULY HORRIBLE wav concat example in Overtone
13:00bhenryduck1123: it stops other things from working.
13:00cemerickheh
13:00cemericksamaaron: can't be *that* bad :-)
13:00samaaroncemerick: it worked though
13:00cemerickyou also said overtone couldn't make music :-P
13:00samaaroncemerick: yeah, it's really bad :-)
13:01cemerickwell, you beat me to it. I was going to take a look tomorrow.
13:01cemerickAll of the docs are for wav -- is aiff not supported? Or does it really matter?
13:01bhenryif i change clojurescript source locally, do i have to run script/bootstrap again for those changes to take effect when compiling my cljs in projects?
13:01samaaroncemerick: https://gist.github.com/1373905
13:02samaaroncemerick: SuperCollider can read in a bunch of stuff - wav and aif are definitely supported
13:02samaaronthis snippet will always output a wav file though
13:02samaaronregardless of what it reads in
13:02wastrel:[
13:03cemericksamaaron: surely that's not core's concat? From audio-file or live?
13:03samaaroncemerick: yep, that's core's concat
13:03cemerickyou tricksy bastard ;-)
13:04samaaronI told you it was horrible ;-)
13:04cemerickso is it boxing each datum from the respective samples?
13:04cemerickmust be!
13:04hugodsamaaron: what do you use to generate your ascii-art?
13:05fliebel$mail drewr I did some email reading stuff. Not as part of Postal for now. https://github.com/pepijndevos/Wemail/blob/master/src/wemail/store.clj
13:05lazybotMessage saved.
13:05samaaronI use SC to load up the source files, I then copy the normalised data across to Clojure-land through jna which comes as a Java float array, I then concat them and use JVM libs to spit out a wav file (which is currently horrendously inefficient)
13:05samaaronhugod: hey there, it was great meeting you at the conj
13:05devnsamaaron: is there a way, given a sample, like for instance, say I record some guitar without a metronome and then I want to fit a midi drum track to the length of the sample
13:06devnis that possible programatically? I know it doesn't guarantee it will sound /good/, just curious how I might do that
13:06samaaronhugod: I was using some awful online image->ascii conversion site and then hand cleaning things in Emacs
13:06cemericksamaaron: that's OK, I can heat the house with my macbook instead of oil for a day… :-D
13:07cemericksamaaron: BTW, I need bumpers :-) Otherwise, I'm gonna use a one-line wobble. :-P
13:07hugodsamaaron: likewise - it was a blast meeting you and everyone else
13:08devnwob wob wob, dubstep
13:08samaaronhugod: however I discovered this awesomely awful ascii art editor the other day
13:08devnsamaaron: JavE?
13:08zerokarmaleftTheDraw!
13:09BronsaEMACS
13:09samaarondevn: exactly!
13:09devnsamaaron: Don't upgrade to lion!
13:09devn(if you're on OSX)
13:09devnRosetta apps are canned in 10.7 :(
13:09devnHence, no more JavE
13:09samaaroncemerick: bumpers are on tonight's todo list. Uni got me running round chasing admin chores today :-(
13:09devnJavE is the best I've seen
13:10samaarondevn: I got JavE working on lion
13:10devn! how!?
13:10cemericksamaaron: bummer; no worries in any case :-)
13:10samaarondevn: I don't quite understand your sample/midi question
13:10clojurebottufflax: there was a question somewhere in there, the answer is no
13:11devnsamaaron: I'd like a "phrase" of drums to expand to fit the length of a sample
13:11samaarondevn: It's totally possible to calculate the duration of a recorded sample in Overtone
13:12devnsamaaron: I'll have to look into it more I guess -- I knew that was possible, I just didn't know if this was a normal thing to do or if I'm just bad at recording stuff :)
13:12samaarondevn: stretching the drums out (whether algorithmically generated or pre-recorded) would be trivial. However, correctly aligning them to the sample would be more tricky
13:12samaaronhugod: http://www.jave.de/
13:12devnsamaaron: yeah, im starting to walk down that path -- I was thinking I could train it with my spacebar or something
13:13samaarondevn: there are basic ugens for beat detection if i remember correctly
13:13hugodsamaaron: thanks - working nicely in lion here too
13:13kephaledoes anyone happen to know what the arguments to the constructor of java.nio.DoubleBuffer are? I can't find them for the life of me
13:13devnhugod: samaaron: are you guys just running the jar?
13:13samaaronhugod: the interface is ass - but I guess that's to be expected for an ascii-art editor ;-)
13:14samaarondevn: yep, I just double clicked it
13:14devnhmph, that's great -- the OSX version is no longer working, but if you just grab the jar it works
13:15michael_campbellall the doublebuffer ctors are package-private
13:15samaaronhere's the result of an hour or so of futzing around with JavE: https://gist.github.com/2ee0b48436038208ee8a
13:16michael_campbellkephale: but the argsa are int mark, int pos, int lim, int cap, double[] hb, int offset
13:16cemerickshouldn't the UI for an ascii-art editor be build out of ascii?
13:16michael_campbellkephale: or: int mark, int pos, int lim, int cap which calls the other one with null and 0 for hb and offset
13:16kephalemichael_campbell: thank you!
13:17michael_campbellkephale: my pleasure
13:17samaaroncemerick: btw, the audio concat code i gisted only works on edge Overtone - the edge version on my machine that is - i'll push in a moment
13:17samaaroncemerick: not if you find it useful to have rendered images in a lower layer to work with
13:18cemericksamaaron: that was *mostly* snark ;-)
13:18cemericksamaaron: OK, I'll see if I can interpose fade-in, fade-out transitions then
13:18samaaroncemerick: of course, Emacs has artist-mode
13:18cemerickof course! :-P
13:19cemerickRaynes: man, what did you do to rickasaurus?
13:19devnso I have JavE again -- of course the first logical thing to do is make a great clojure ascii art logo
13:19samaaroncemerick: now, fade-in, fade-out are in standard Overtone terratory. Although you'll be working in real time. We don't run SC in non-realtime mode (which would allow for fast audio rendering stuff like this)
13:20cemerickah
13:20samaaroncemerick: remember, Overtone is about live production and manipulation of audio - not so much editing of actual audio
13:20samaarondevn: did you see my link?
13:22samaaronOK, I'm going to bike home - chat later
13:23devnsamaaron: ha! I'm going to make one too :)
13:27Raynescemerick: Dude. I don't know!
13:28cemerickRaynes: I know him fairly well, used to work 10 minutes from here. Super-nice guy, not sure what to say.
13:29Raynescemerick: He went nuts last night. He tweeted about his desire to use redis, but that he was worried it wouldn't be able to handle the volume of data he wanted. I replied with "I'm sure it can handle the megabyte of data you keep under your pillow.".
13:29cemerickyeah, I thought that was in character :-)
13:29RaynesI guess I didn't realize it, but that was the most tasteless joke I've ever made or something.
13:29RaynesBut that was it. I'm not sure what I did in the past that bothered him, but that was certainly what took him over the edge last night. :p
13:30cemerickI guess everyone has a bad day. *shrug*
13:30RaynesIndeed.
13:31Vinzentwait, array map doesn't guarrante the ordering of elems?
13:33cemerickit does; if it grows past its defined bounds and turns into a hashmap, then ordering becomes undefined.
13:36drguildohas anyone had any success with tools.cli?
13:36Vinzentthen why it sorts the map? http://pastie.org/2879193
13:36Raynesdrguildo: Lots of people. Go ahead and just ask your question. If anybody can answer it, they will. :)
13:36drguildowell, i basically can't get it to work
13:37drguildoi used the final example from the README
13:37devnhttps://gist.github.com/1374015 <-another clojure ASCII art logo :)
13:37drguildobut when i run it, passing -h to my program
13:38Raynesdevn: https://github.com/Raynes/lein-newnew <-- Don't know if you saw this last night.
13:38drguildothe contents of *command-line-args* and options (from tools.cli/cli) are:
13:38drguildo(-h)
13:38drguildo{:help false, :faux bar}
13:38Raynesdevn: It is backwards compatible with the old 'lein new' and shadows it, so install it and don't give me any lip about it.
13:39drguildo:help should totally be true
13:39drguildoyet it isn't
13:40drguildohttp://pastie.org/2879215
13:40RaynesStrange. Might be a tools.cli bug. A lot of things were changed recently.
13:42tsdhWhen I create a namespace with stuff programatically by creating a form like (do (ns foo) (defn foo [x] x)) and evaling it, how can I use that namespace? I can do (in-ns 'foo), but (use 'foo) errors with file-not-found foo_init.class / foo.clj...
13:44duck1123tsdh: IIRC it's because clojure compiles the entire do form before running it, or some such.
13:45TimMcduck1123: I think that's a different thing.
13:45tsdhduck1123: The eval compiles it, doesn't it? And that works fine, and I can switch to the namespace. I just can't use it to make its vars accessible in the current namespace...
13:46duck1123You're probably going to hit no end of problems if you're trying to dynamically generate namespaces
13:48tsdhduck1123: Hm, but there's no other way when you have the information to generate new Vars only at runtime.
13:49whiddenIn Clojure 1.2.1 is there an upper limit to the number of promise an app can have?
13:49TimMctsdh: Really? You need a whole new namespace?
13:50devnRaynes: cool
13:50tsdhduck1123: In my case, I define core.logic relations from some data structure. That data structure has a qualified name, so I thought it would be a good idea to define the relations in a new namespace corresponding to that qname.
13:51devnRaynes: i'm really interested in getting some default templates into lein for new users
13:52devnso you could "lein init" or something which would prompt you for testing framework of choice, web framework, etc. etc.
13:52Raynesdevn: technomancy has not expressed interest in having templates beyond the three already included. Which is understandable, given that you can install templates just like Leiningen plugins.
13:52RaynesBut we might be able to convince him of something like that.
13:53RaynesAn interactive template would be very interesting.
13:54RaynesEven if it wasn't included in Leiningen itself, it'd be a good thing to do.
13:57Vinzentseriously, is there a reason why (first (array-map :b 1 :a 2)) returns [:b 1] (as expected), but (first {:b 1 :a 2}) returns [:a 2]?
13:58apgwozonly some maps guarantee order
13:58apgwozmaps created with {} do not
13:58Raynes&(doc sorted-map)
13:58lazybot⇒ "([& keyvals]); keyval => key val Returns a new sorted map with supplied mappings."
13:59Vinzentalso, (read-string "{:b 1 :a 2}") return correct result, but after eval'ing the entries become swapped
13:59BorkdudeRaynes: sorted here menas order preserving or really sorted and on what?
13:59duck1123Vinzent: also https://github.com/flatland/ordered
13:59brehautsorted maps are sorted, they are not ordered
13:59tsdhTimMc: Do you have a better idea?
14:00TimMc&(sequential? {:a 1, :b 2}) ; Vinzent
14:00lazybot⇒ false
14:00amalloyVinzent: maps make no guarantees at all about order, unless they're sorted. or, as duck1123 points out, ordered - but that's a data type that's not part of the core lib
14:00tsdhTimMc: Probably, I could write the code to a tmp file and then load that. Then, there would be a ns<->file association which use seems to require...
14:01TimMctsdh: Not familiar with core.logic or what you're trying to do with it. :-/
14:01brehautamalloy: hmm. joy of clojure advertises array-maps as an ordered map implementation.
14:01TimMcVinzent: http://www.brainonfire.net/files/seqs-and-colls/collection-properties-venn.png
14:02amalloybrehaut: rip that page out of your book and set it afire
14:02gfredericksamalloy: I just got clojurebot to report that: monads is #=(str "super" "awesome")
14:02brehautamalloy: i dont know how to do that to a pdf
14:02amalloyhaha probably violates your DRM anyway
14:02gfredericksbrehaut: print it and bind it first
14:02TimMcbrehaut: It's easy, just use a sharpie on your screen.
14:02tsdhTimMc: It's not specific to core.logic. It's just that I have to create a bunch of vars dynamically that should not clobber *ns*.
14:03brehauti dont think manning DRM their PDFs?
14:03TimMctsdh: I guess I'm not sure why you want to create Vars in the first place.
14:03VinzentThanks you all for the links and explanations... That's too bad: I was hoping to use ^:metadata syntax to describe trasnformation of the args to my macro
14:04tsdhTimMc: That's where core.logic comes into play. (defrel male x) is a macro that expands into a def. So it's not under my control.
14:04amalloywhidden: just dont' run out of heap, that's about it
14:05TimMctsdh: So it's actually at load-time?
14:05hiredman~shrimp
14:05clojurebotshrimp must be endofunctors
14:06tsdhTimMc: No, that there should be a relation male is information I get at runtime.
14:07TimMcyikes
14:08michael_campbellamalloy: At the beer/art thing, you had a mini-rant on the for comprehension. As a neophyte in this, can you explain to me where/when it should be used but isn't (and/or, shouldn't, but is?)
14:08amalloy$javadoc java.nio.DoubleBuffer ;; kephale - next time you get lost
14:08lazybothttp://download.oracle.com/javase/6/docs/api/java/nio/DoubleBuffer.html
14:09TimMc,((juxt sequential? associative? counted?) clojure.lang.PersistentQueue/EMPTY)
14:09michael_campbellamalloy: the javadoc didn't include ctors
14:09clojurebot[true false true]
14:10kephaleamalloy: ty
14:10amalloythen it doesn't have any constructors
14:10kephaleyeah
14:10whiddenamalloy: That's what I was hoping. Thanks for the reply.
14:10amalloybut it has static allocate methods
14:11kephalebut i get a ctor error
14:11amalloypublic static java.nio.DoubleBuffer java.nio.DoubleBuffer.wrap(double[],int,int)
14:11kephalewhen i inspect the bean i see that the constructors that michael_campbell mentioned at least match in type
14:13amalloymichael_campbell: i mean, i mostly use for anytime i need to walk over a sequence in which i don't have a prebuilt function to do it. like (map inc foo) - great. but (for [x foo] (* 2 (- x 10))) is way nicer than (map (fn [x] (* 2 (- x 10))) foo)
14:13kephaleah, i'll try the wrap. the lack of explanation about what the args are is causing some problems
14:13amalloykephale: http://download.oracle.com/javase/6/docs/api/java/nio/DoubleBuffer.html#wrap(double[], int, int)
14:13BorkdudeRaynes: is there a preliminary preview of your book somewhere, if I dare ask? I'm looking for some easy introduction to Clojure for a class I'm giving next semester
14:14Raynes&(macroexpand (for [x [1 2]] (* 2 (- x 10))))
14:14lazybot⇒ (-18 -16)
14:14Raynes&(macroexpand '(for [x [1 2]] (* 2 (- x 10))))
14:14lazybot⇒ (let* [iter__4191__auto__ (clojure.core/fn iter__14790 [s__14791] (clojure.core/lazy-seq (clojure.core/loop [s__14791 s__14791] (clojure.core/when-let [s__14791 (clojure.core/seq s__14791)] (if (clojure.core/chunked-seq? s__14791) (clojure.core/let [c__4189__auto__... https://gist.github.com/1374112
14:14RaynesBorkdude: Nope. I'd happily throw you an early copy if there actually was a reasonable one to give.
14:14amalloyand it's especially valuable when you want to work with a nested structure, like transforming {:person {:name 'david :friends '[nancy mark]}} into a list of person/friend pairs
14:15Iceland_jack&(map #(- % 1) [1 2 3 4])
14:15lazybot⇒ (0 1 2 3)
14:15BorkdudeRaynes: ok
14:15brehautRaynes, Borkdude: i was hoping that the book was going to be entirely made up of macro expansions of core forms
14:15Borkdudebrehaut: I already took those macro's as a no
14:16Borkdudebrehaut: macroexpansions that is
14:16kephaleamalloy: wrap FTY, ty again
14:16Raynesamalloy: I'm not sure I can agree that (map #(* 2 (- % 10)) foo) is less nice.
14:16kephaleerr FTW
14:16Raynesamalloy: I think it'd be better if 'for' printed incremental results, of course. ;)
14:16michael_campbellamalloy: I see. Thanks. Trying to get my head around some of when/why ... after I figure out "how" =)
14:17amalloymichael_campbell: consider how easy https://gist.github.com/1374123 is, for example
14:18amalloyRaynes: map is so much more limited there. for example you can't nest that inside some other #() expr
14:18Raynesamalloy: You gave me a limited example.
14:20amalloymy rule of thumb: use for unless you have a prebuilt map function, or can get one simply with comp/juxt/etc
14:20michael_campbellamalloy: I recall someone saying "nuts for juxt".... Raynes, maybe?
14:20amalloyyes, he called me nuts for juxt
14:20RaynesMy rule of thumb: use map unless it is prohibitive or inconvenient to do so.
14:21michael_campbellThanks both; I'm sure I'll develop my own sense of when, but looking for some "guardrails" to start with ;-)
14:21amalloyand avoid stuff like (reduce #(assoc %1 %2 (foo %2)) {} xs) - it's easier to write that as (into {} (for [x xs] [x (foo x)]))
14:21broquaintFeeling a bit slow - how might I treat a string as a collection e.g (contains? (sudo-make-me-a-seq "abc") \b)?
14:21Borkdudefor has too much syntax ;-)
14:21amalloy~contains?
14:21clojurebotcontains? is for checking whether a collection has a value for a given key. If you want to find out whether a value exists in a Collection (in linear time!), use clojure.core/some or the java method .contains
14:22Raynescontains? doesn't do what you think it does.
14:22brehautBorkdude: how dare you disparage for!
14:22Borkdudecontains? should be renamed
14:22gfredericksamalloy: "for example" <- pun intended?
14:22Raynes&(contains? [:a :b :c] :b)
14:22lazybot⇒ false
14:23amalloyhah
14:23Raynesbroquaint: Try ##(some {\b} "abc")
14:23amalloy*cough* #{\b}
14:23amalloyor (.indexOf "abc" "b")
14:23RaynesRight.
14:23Raynes&(some #{\b} "abc")
14:23lazybot⇒ \b
14:23Raynesamalloy: Or maybe he can use for!
14:24broquaintThanks, Raynes & amalloy!
14:24michael_campbell*chuckle*
14:24Raynes&(for [x "abc" :when (#{\b} x)] x)
14:24lazybot⇒ (\b)
14:24RaynesThat's amalloy's preferred way of doing things, methinks.
14:24amalloy&(first (for [[idx char] (map-indexed list "abc") :when (= \b char)] idx))?
14:24lazybot⇒ 1
14:25brehautRaynes: really? theres no juxt
14:25Borkdudeamalloy: map-indexed isn't in core anymore right?
14:25amalloyyes it is
14:25amalloy&*clojure-version*
14:25lazybot⇒ {:major 1, :minor 3, :incremental 0, :qualifier nil}
14:25Borkdudeamalloy: where
14:26Raynesclojure.core/map-index
14:26Raynesclojure.core/map-indexed
14:26RaynesMy fingers are numb. :<
14:26Borkdudeah really, why did I think only keep-indexed was in core
14:26amalloyBorkdude: dude, why ask me? just ask lazybot
14:26amalloy&#'map-indexed
14:26lazybot⇒ #'clojure.core/map-indexed
14:26Borkdudeok, I don't know where I got that from then
14:26amalloyhe's so helpful
14:26amalloyBorkdude: indexed was removed in (i think?) 1.2
14:27Borkdudeamalloy: ah that's it
14:27Borkdudewhy actually, because you can do it with keep-indexed?
14:28amalloymap-indexed is more general and spends less memory
14:31Borkdudefair enough
14:41nDuffAny schedule on when videos from the conj will be available?
14:45devnRaynes: I disagree that forcing new users to clojure to get a special "make it easier for me" plugin is the right move
14:47TimMc&(doto "foo" print)
14:47lazybot⇒ foo"foo"
14:47TimMc&(doto "foo" #(print %))
14:47lazybot⇒ "foo"
14:47TimMc&(doto "foo" (#(print %)))
14:47lazybot⇒ foo"foo"
14:52Raynesdevn: I don't necessarily disagree.
14:55kzarI have to keep a small amount of state in my web app, messages come in and sometimes they are in seperate parts so I have to assemble and decode them before storing. Running on Heroku and for now I've used a ref which works fine, messages are pretty small and generally all the parts come in at once so it's not a big deal. Problem is I figure if I scale up the web process parts of the messages might hit different proc
14:55kzaresses and I guess the ref wouldn't be accessible accross them all. Unless Heroku knows to root requests from the same client to the same server I'm going to need shared state, but using a database for such a small thing seems mad. What do you think I should do?
14:56kzarroute*
14:57gfrederickserlang-map-reduce-storm-4j
14:59technomancykzar: you pretty much have to treat your processes as disposable, so if there's any data that needs to stick around between requests, it needs to go somewhere durable
14:59technomancy(this is true of anything on EC2, not specific to heroku)
15:00kzartechnomancy: Yea I mean luckily the way it is the parts come in at once and if the odd message gets dropped because the store got ditched half way through it doesn't matter
15:00kzartechnomancy: But even so I figure I need a better store, but setting up Postgres or something for such a small thing seems mad
15:01technomancywell... "setting up postgres" is like a single command =)
15:01technomancyor redis, or couch, or whatever
15:02technomancy(sql/with-connection (System/getenv "DATABASE_URL") (sql/insert-record :stuffs {:data "Hello World"}))
15:02TimMcCan you queue the message pieces and then segment them such that all the parts of one message always go to the same process?
15:02technomancyschema creation is still not as streamlined as it could be unfortunately
15:02TimMcNever mind, just use a DB for now, worry about scaling *that* later.
15:07brehaut"<technomancy> well... "setting up postgres" is like a single command =)" holy crap
15:08technomancybrehaut: $ heroku addons:add shared-database
15:08brehauttechnomancy: magic has been achieved
15:09technomancyany sufficiently advanced technology, &c.
15:20gfrederickstechnomancy: does this ring a bell? java.lang.NoSuchMethodError: clojure.lang.KeywordLookupSite.<init>(ILclojure/lang/Keyword;)V at leiningen.util.paths$native_arch_path.<clinit>(paths.clj:32)
15:20gfredericksnot holding me up or anything, but thought it was weird
15:20technomancygfredericks: clojure 1.3 snuck onto your classpath?
15:20gfrederickshmm
15:20gfredericksfor leiningen's execution you mean?
15:21technomancyright
15:21gfrederickshuh. I wasn't doing anything funny, I don't think. okay, I won't worry about it.
15:21gfredericksthanks
15:21duck1123you need to find the dev dependency that's using 1.3, and exclude clojure from it
15:22gfredericksoh the dev dependencies get used by leiningen's process?
15:22technomancyaye
15:22gfredericksthat makes sense, as I'm using clojure.java.jdbc for testing
15:23gfredericksnow I'm confused as to why it hasn't been doing this the whole time
15:29kzartechnomancy: Hey I was meaning to ask you, do you know anything about Heroku timing out when trying to launch your app?
15:30technomancykzar: yeah, if you don't bind to a port in under 60 seconds it assumes there was a problem
15:30kzarYea, I suppose I mean to say how to avoid the problem. I'm using Noir and a few libraries but my app isn't massive
15:31kzarI mean one app that times out sometimes is really tiny, it's basically noir a few libraries, one controller and a static html file
15:32technomancyit takes over 60s to bind the noir app to a port?
15:32wilkesdnolen: did you post the code from your clojurescript talk? I want to steal the extension that changes "[object Object]" to something useful.
15:35kzartechnomancy: I guess so, just did a test on my laptop and it took about 27 seconds and part of that was Lein checking for updates for snapshot packages
15:35RaynesEvil things, those snapshot packages.
15:35technomancykzar: dependencies should already be resolved at build time on heroku though, so it shouldn't affect process launch
15:36dnolenwilkes: you just need to extend IPrintable to the particular type you care about
15:36dnolenwilkes: https://gist.github.com/1362856#file_gistfile1.clj
15:37wilkesdnolen: thanks!
15:37dnolenwilkes: extend the type to IPrintable rather
15:40ejacksondnolen: took the cljs browser repl for my first spin today - WOW !
15:42kzartechnomancy: Ah right, do you think Noir is especially slow?
15:42technomancykzar: I don't think so. it may help to put ":checksum-deps true" in project.clj
15:43duck1123does that 60s include dep resolution an compiling?
15:44dnolenejackson: pretty cool eh :)
15:44ejacksondefinitive.
15:45technomancykzar: you had some trouble with BUILDPACK_URL, right? could you msg me the output of "heroku config -s" in your project?
15:46ejacksonnow just need to figure out what trickery cljs-watch is playing
15:48kzartechnomancy: Trying that ":checksum-deps true" thing on the small project, tailing the logs now and it seems to just be downloading loads of stuff each time I do a `heroku restart`. First time I restarted it loaded second time it timed out
15:48kzartechnomancy: buildpack problems was on the larger project, I'll message you config of both though 1 mo
15:49technomancykzar: interesting, I will definitely take a look
15:49technomancywith :checksum-deps true it should only fetch on git push
15:49zerokarmaleftejackson: my hangup was figuring out that cljs-watch's default output is resources/public/cljs/bootstrap.js
15:50ejacksonzerokarmaleft: yeah, I've spotted that, now I just need to figure out where its stashed goog.* in its special jar file so I can include things.
15:51goodieboycould someone recommend a good, lightweight xml parsing library?
15:53winklightweight? xml?
15:53winkwell, jackson works. kind of
15:53ejacksonzerokarmaleft: oh, perhaps I don't need to, seems its put just about everything into it.
15:53ejacksonwink: what's that you say !!!!!!!!
15:53ejackson:P
15:53gfredericksejackson: I guess he wants you to parse some xml?
15:54duck1123goodieboy: Do you need it to be-namespace aware?
15:54zerokarmaleftejackson: yea, goog.dom.* afaict
15:54kzartechnomancy: Thanks, arohner had this problem as well by the way
15:55Raynesejackson: You know, you should talk at next year's Conj. You have an insane amount of energy.
15:55goodieboyduck1123: no actually
15:55technomancykzar: interesting; I'll follow up with him
15:55RaynesI remember being super tired on like the second conference day and you were bouncing around like a pogo stick.
15:55duck1123clojure.xml and the zip filters are pretty easy if you don't need ns support
15:55zerokarmaleftejackson + djspiewak = spontaneous combustion?
15:56goodieboyduck1123: great i'll have a look, thanks
15:56ejacksonRaynes: Thanks dude.
15:57Raynesejackson: At the very least, you should have sung something by Coldplay. You look a lot like Chris Martin.
15:57ejacksondear lord, the abuse I'm taking. First being mistaken for an XML parser, and now this...
15:58kzarI would rather be an XML parser than Chris Martin
16:00ejacksonRaynes: I work alone, at home, so when I peep out into the real world, I tend to get a little excitable.
16:00technomancyejackson: heh; I know how that is =)
16:01duck1123is it better to like Coldplay or XML?
16:01brehautejackson, technomancy: definately :)
16:01TimMcColdplay.
16:01TimMcXML is inexcusable.
16:01technomancybut Coldplay's not extensible.
16:02TimMcI count that as a positive.
16:02nDuff...and XML has _namespaces_!
16:02brehautnor is coldplay enterprise lisp
16:03duck1123I feel shame for having once written a website with an XML database, queried with XQuery, processed with XProc feeding into XSLT templates producing XForms
16:03duck1123far too many angled brackets
16:03ejacksontechnomancy: but Xoldplay is.
16:03Rayneshttps://github.com/fileability/self-ml
16:03technomancyejackson: don't give anyone any ideas
16:04RaynesIIRC, self-ml is used for the Chocolat text editor's syntax files. Almost as hard to look at as XML.
16:04brehautxoldplay: sounds like it should be an overtone project; markov chains based on coldplay songs to generate new xoldplay songs
16:05RaynesBut I suppose that's because of the sheer volume of those syntax files.
16:06Rayneshttps://github.com/chocolat/clojure.truffle/blob/master/languages/Clojure/syntax.selfml
16:07RaynesI don't understand how you can write something like that by hand.
16:07brehautunrelated: today is friday in the US right? where is the next mostly lazy
16:07RaynesToday is Thursday
16:07hiredman,(java.util.Date.)
16:08clojurebot#<Date Thu Nov 17 13:01:43 PST 2011>
16:08brehautRaynes: line at a time
16:08brehautrats
16:09brehautRaynes: that is a serious grammer
16:21TimMc"written by humans and read by computers"
16:21TimMcI'd really like to have "read by humans" in there too...
16:22brehauthah
16:22TimMc'cuz regex would fit that description as is
16:25brehautTimMc: definately
16:25brehautTimMc: on the other hand, not using regexps can be equally unreadable
16:26TimMc:-)
16:34amalloyRaynes: observe the comment to http://stackoverflow.com/questions/8167063/whats-the-best-way-to-handle-this-sequence-transformation-in-clojure/8167458#8167458 - in which i confess that map is way cooler than for in some cases
16:47brehautim mucking about with my syntax highlighting rules some more; should the opening and closing symbols for maps, vectors and sets (and the empty list) should be styled as 'values' (using the same style as numbers and characters) or as something else?
16:48brehautand how much do people care about rainbow parens?
16:52technomancybrehaut: I think they're an anti-pattern
16:52technomancybrehaut: the problem is that they make it easier to match up parens
16:54cemerickplease no angry fruit salad
16:54cemericksays the guy with the IDE that uses rainbow parens :-P
16:54brehautcemerick: even if i do support it, you'd have to include additional CSS for it to be visable
16:54brehauttechnomancy: by anti pattern you mean that we shouldnt be caring about the parens anyway?
16:54cemerickyou're certainly being comprehensive :-)
16:55technomancybrehaut: precisely. especially when reading, let indentation be your guide.
16:55brehauttechnomancy: sure. ideally id like to do something where the form under the mouse was highlighted as need be, but im currently unsure if i can implement that
16:55cemerickI wonder if we can come up with a preprocessor to add in the parens based off of e.g. python-like indentation?
16:55brehautcemerick: thats the plan :)
16:56brehautcemerick: wait, the plan is related to comprehensive
16:56cemerickbrehaut: yeah, I was trying to troll someone on sweet expressions or whatever they're called
16:57brehautah :) yeah, it doesnt sound like a very practical idea. i want less magic in my syntax, not more!
16:57cemerickmy problem is that I'm incapable of trolling effectively because I can't hold a pose like that for long enough
16:57brehaut(caveat, i love haskell's layout rules)
16:58brehautive just changed my code to no longer care about rainbow parens, but it does annotate incorrectly matched closing tokens
16:58RaynesI don't love the fact that there are 16 different possible indentations for pretty much any point that you hit return in while editing Haskell.
17:00brehaut(which incidentally pulls me up on a few cases on my ring introduct. shame!)
17:59ibdknoxquiet day
18:00kephaleoverall its been a quiet week
18:00ibdknoxpost conj recovery
18:00brehauteveryone is capitulating on the conj
18:01ibdknoxyeah, I've been doing korma stuff
18:02brehautive been punishing myself with javascritp
18:02Raynestechnomancy: So, does that mean that ibdknox and I are doing better than you since we designed *and* wrote the 'new' task for 2.0?
18:02technomancyRaynes: depends how much hammock time you put into it =)
18:02ibdknoxtechnomancy: 5 man years
18:03Raynestechnomancy: Well, precisely 1 day of work went into it, but ibdknox and I had had plenty of time to think about it since we had been working on Spawn recently. We knew what we wanted, I think.
18:03technomancyibdknox: teach me the secrets of relativity
18:04ibdknoxtechnomancy: we farmed a job out for hammock time to mechanical turk ;)
18:04technomancycouldn't have been cheap
18:05RaynesWe wrote a lein plugin to give us hammock time transparently.
18:05ibdknoxlein hammock
18:05ibdknoxit's like lein trampoline, but more relaxing
18:06amalloythat's awesome. i should write a hammock fn for core
18:07amalloy(hammock some-thunk) ;; calls (some-thunk) forever until it gets a different result
18:07ibdknox(defn hammock [] (Thread/sleep (* 1000 60 30)) (println "Do you have an answer yet?"))
18:09amalloyibdknox: make it turn off your monitor around the sleep call, and you're done, right?
18:09ibdknoxbasically
18:09ibdknox;)
18:09amalloyit should probably require you to answer y two times in a row, because the first answer is wrong anyway
18:09ibdknoxlol
18:10amalloy"Do you have an answer?" "Yeah man let me type some stuff" "We'll see if you still feel that way in half an hour"
18:12Raynesibdknox, technomancy: lein plugin install lein-hammock 0.1.0 && lein hammock
18:12brehaut,(apropos 'let)
18:12clojurebot(letfn let when-let if-let delete-file)
18:13ibdknoxlol
18:13ibdknoxRaynes: well done
18:16Rayneshttps://github.com/Raynes/lein-hammock
18:16brehautlol
18:16brehautthat amazing
18:17tensorpuddingwhat does it do?
18:17ibdknoxRaynes: did you use something to generate the ascii?
18:17RaynesNo, what is amazing is that I googled for 'ascii hammock' and got a relevant result.
18:17ibdknoxwow
18:17tensorpuddingheh
18:17Rayneshttp://ascii.co.uk/art/hammock
18:17amalloy(inc Raynes)
18:17lazybot⇒ 11
18:18duck1123you don't expect him to put a lot of work into something called lein-hammock
18:18ibdknoxduck1123: why not? this is serious business.
18:18RaynesIndeed.
18:18Raynesibdknox: Also, that plugin was created via 'lein new plugin lein-hammock'. All hail lein-newnew!
18:19ibdknoxRaynes: I saw that :)
18:35bbommaritoEvening all. I have a quick question: Can anyone explain juxt to me? The API is a bit terse and I am not quite groking it.
18:35ibdknox,((juxt inc dec) 1)
18:35clojurebot[2 0]
18:36ipostelnik,((juxt inc dec) [1 2])
18:36clojurebot#<ClassCastException java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to java.lang.Number>
18:36ibdknoxbbommarito: it returns a function that takes in one value and returns a vector of the results of applying the given functions to it in order
18:36kephale,(map (juxt inc dec) [1 2])
18:36clojurebot([2 0] [3 1])
18:36bbommaritoibdknox: Okay, I was thinking that was what it was doing, but I wasn't sure from context. Basically, watching a Full Disclosure on FizzBuzz and was trying to understand it.
18:38bbommaritoibdknox: He was using ((apply juxt fb-list) 15) so the apply was confusing e.
18:38bbommaritome...wow m key is dying.
18:38ibdknoxah
18:38ibdknoxyeah
18:38ibdknoxthat's creating the list of functions to apply dynamically
18:38ibdknox((apply juxt [inc dec]) 1)
18:39ibdknox,((apply juxt [inc dec]) 1)
18:39clojurebot[2 0]
18:39ipostelniki think juxt is like map but for applying many functions to one value vs. applying one function to many values
18:40bbommaritoibdknox: I think that is what's confusing me. Looking at what you were evaling here, they both look to do the same thing (juxt vs apply juxt).
18:40ibdknoxwell
18:40ibdknoxI couldn't do this
18:40technomancyipostelnik: never thought of it that way, but it makes sense
18:40ibdknox,((juxt [inc dec]) 1)
18:40clojurebot[#<core$dec clojure.core$dec@a40b04>]
18:40ibdknoxipostelnik: sort of, except it returns a function as opposed to executing it
18:41brehautchrome is trying to tell me that my brush will highlight all of clojure core in 1ms. that smells funny to me
18:41ibdknoxbrehaut: a bit.
18:41brehautibdknox: a lot! all of necessary-evil takes 10ms
18:41ibdknoxhaha
18:41brehautcore is a wee bit bigger
18:42bbommaritoibdknox: OH, I understand it now. Okay yea now it makes a bit of sense. You will have to forgive me, as I come from the land of C# and Ruby and Clojure is...well a bit different.
18:42ibdknoxbbommarito: I used to work on C# :)
18:43ibdknoxbbommarito: at MSFT
18:43amalloy~juxt
18:43clojurebotjuxt is usually the right answer
18:43amalloyaw. i wanted the other one, clojurebot
18:43ibdknoxamalloy: I was amazed you didn't vome into this sooner
18:43ibdknoxcome*
18:44ibdknoxyou're off your game ;)
18:44amalloyibdknox: truly, i regret taking some time out of irc to do actual work
18:44amalloyhow often does someone ASK about juxt
18:44amalloyusually you have to preach
18:44ibdknoxhehe
18:44lucianit's a pretty useful function
18:44ibdknoxit's *very* useful :)
18:45lucian"give me the results of these functions on this value"
18:45bbommaritoHey, I learn by reading source, and if I find something confusing, I ask:)
18:46amalloy~juxt
18:46clojurebotjuxt is usually the right answer
18:46amalloyfeh
18:46bbommaritoOH, I also come from the land of Smalltalk.
18:47lucianthat's a pretty nice land
18:47amalloybbommarito: then perhaps you will like findfn?
18:47amalloy$findfn 1 2 4 7
18:47lazybot[clojure.core/bit-or clojure.core/bit-xor clojure.core/+ clojure.core/+']
18:47amalloyi understand y'all have something similar but better
18:48bbommaritoamalloy: We do, but I don't think I have ever used it.
18:50eanxgeekI'm new to clojure and I'm trying to figure out the equal of foreach(), I'm enterin in at my repl (class (browser getAllLinks)) and I get back [Ljava.lang.String I'd like to the equal of a foreach link in (browser getAllLinks); do ..
18:50brehautwoo! core highlights :D
18:50brehaut(and heats up my mac doing so)
18:50bbommaritoThe thing that really bothered me in the land of Smalltalk is when Cincom took WebVelocity and made it paid only...
18:51eanxgeekwhat would the easiest approach be? I couldn't get doseq to work, probably bdu error
18:51ibdknoxeanxgeek: (doseq) or (for ..) depending on what you want
18:51brehaut3.8 seconds to highlight all of core
18:52ibdknoxbrehaut: time to make it incremental ;)
18:52brehautibdknox: i wish i could!
18:52eanxgeekibdknox: I'm probably looking at using link in another function, i.e. do click link
18:53ibdknoxeanxgeek: (doseq [link (browser getAllLinks)] (click link))
18:54eanxgeekibdknox: ah thanks sure enough I had my braces wrong.
18:59emacsenanyone seen Fogus?
18:59bbommaritoPerhaps I need to sit down and watch all of the Clojure for Java Developers talk. Might help me a bit.
19:00emacsenbbommarito, what's your question?
19:01bbommaritoemacsen: I got my question answered:)
19:01bbommaritoOh and thank you emacs for telling me I had an unbalanced paren...
19:05brehautibdknox: i think (because i cant easily profile this) that the majority of time for highlighting core isnt actually my parser, its the highlighter generating the html etc, so an incremental parser wouldnt help
19:05Borkdude`hmm
19:06Borkdude`my old self quit
19:10bbommaritoI came across Clojure while hunting for a new language to work in. I am so burned out on Ruby that I can't even tolerate to work on it for personal projects, so I had heard about Clojure and started investigating.
19:12ibdknoxbrehaut: ah
19:13emacsenbbommarito, have you worked in any other "non-traditional" languages?
19:13cemerickBorkdude: Yup, I pulled it in. :-)
19:13bbommaritoemacsen: I have played with Erlang for smaller things, messed with Haskell a little bit, until I hit Monads. IO as well.
19:14Borkdudecemerick: ah great
19:14emacsenbbommarito, okay, well I think you'll like Clojure then. It's like both, but without the same pain (it has its own of course)
19:14bbommaritoemacsen: And, if you want to call them languages MUF (Multi-User Forth), and Moo (MUD Object Oriented)
19:15bbommaritoemacsen: I think one thing I really appreciate about Clojure is: It's not OOP. Too often people try to shove everything into OOP, and more often than not, it makes no sense to do so.
19:15emacsenbbommarito, right. it's not OOP, but it has a lovely dispatch system
19:18bbommaritoemacsen: And multimethods look interesting, though I haven't started to delve into them.
19:18emacsenmultimethods are the dispatch system :)
19:19emacsenbbommarito, you don't /need/ to use either one though, of course
19:20BorkdudeI really haven't needed multimethods, but maybe I'm missing out on something here
19:20emacsenBorkdude, nope. But it's there if you want it :)
19:23BorkdudeI read in a survey that a lot of people come from Ruby to Clojure right?
19:24technomancyBorkdude: not appreciably more than from python, and less than from java
19:24technomancybut they tend to make more noise for some reason =)
19:25BorkdudeAh: http://bit.ly/sSfBzE
19:25bbommaritoBorkdude: I could see that being the case since Ruby is...sort of functional and it's presumably a bit easier to understand Clojure. Plus, Clojure runs on the JVM which is /way/ more performant than MRI
19:26bbommaritoWow, only 5% from CL? That surprises me.
19:27BorkdudeWhat surprises me is 3% Ada
19:27BorkdudeAda?
19:27clojurebotonly when you've earned it
19:27technomancyBorkdude: probably a higher percent of "oops, accidentally clicked Ada" since it sorts at the top alphabetically. =)
19:28BorkdudeWasn't it just the first language in the list of options?
19:28Borkdudetechnomancy: right..
19:28bbommarito"I came to Clojure from QBasic"
19:29bbommarito2% from Scala. I looked into Scala, and I really can't see what the fuss is about.
19:29BorkdudeNo F#
19:30bbommaritoWell, F# is a MS language, so if you are writing F#, you are doing so to stay in the .net world.
19:31bbommaritoIf someone was writing F# because they just loved the language, OCaml is very similar.
19:31Borkdudebbommarito: sometimes you're kind of forced into the .net world, at least I was in one compnay
19:31Borkdudebbommarito: then I started using F# to get some air
19:31technomancyF# doesn't have full inference though, does it?
19:32technomancystill have to declare args like scala?
19:32Borkdudefull inference, like type inference? it has that
19:32bbommaritoBorkdude: I wasn't forced into .net, and still don't mind .net. Though, I don't mind Java either.
19:32technomancyBorkdude: interesting. I was under the impression that it's impossible to implement in scala; I wonder why F# is different
19:32Borkdudebbommarito: before I came to .net I spend time in Common Lisp
19:32technomancysince they both have to interop with a strongly-OO host
19:33hiredmanhttp://twitpic.com/6njqiz
19:33Borkdudetechnomancy: http://msdn.microsoft.com/en-us/library/dd233180.aspx
19:34brehauttechnomancy: as long as you stick with function, and non object records, F# can do full inference; when you cross over into classes it starts to fail
19:34hiredmanas the only person here with an F# sticker on his laptop I demand to be heard
19:34Borkdudebbommarito: actually I started using Clojure because I was forced to Java
19:34hiredmanI don't really have anything to say though
19:34technomancyBorkdude: that doesn't look like hindley-milner
19:35bbommaritohiredman: Why do you write F#? Is it to stay in .Net, or do you just like F#?
19:35hiredmanI don't
19:35hiredmanI have the sticker
19:35bbommaritoAh.
19:35hiredmanI did a few euler problems
19:35technomancybrehaut: ok, interesting. I wonder why scala doesn't do that
19:36hiredmanwell, scala has way more of an oop focus
19:36technomancyI can buy the "static types are less trouble than they're worth" argument, but if you have to declare types for every single argument it's very clearly false.
19:36Borkdudetechnomancy: why not?
19:37technomancyBorkdude: never mind, I was just skimming.
19:39BorkdudeWhat is the statys of ClojureCLR, are people actually using it?
19:40BorkdudeIf I knew it existed I could have tried it when I was bound to .NET
19:41Borkdudebut that was in like 2007 or 08
19:41bbommaritoSo, my goal in learning Clojure is to learn enough to build a blog system (Yes, that old tired trend) in Compjure, Ring and Hiccup.
19:41brehauttechnomancy: everyone should have a play with F#s units of measure type system at least once too. its pretty great
19:42technomancybrehaut: is it anything like frink?
19:42amalloybbommarito: give ibdknox a chance to sell you on noir
19:42Borkdudebrehaut: ah yes, that was just new when I used F#
19:42Borkdudebrehaut: the newest cool thing
19:43brehauttechnomancy: its less pervasive, but it ties in nicely with the rest of the type system
19:43BorkdudeI even have the book Real world functional programming in F# and C#, and several other F# books
19:44bbommaritoamalloy: I had not heard about noir.
19:44ibdknoxbbommarito: yeah, you should definitely check out Noir: http://www.webnoir.org
19:44ibdknoxbbommarito: it will make your life *much* easier
19:44Borkdudebbommarito: noir is great
19:44RaynesNoir is the bet.
19:45Raynesbest*
19:45tensorpuddingnoir is pretty cool
19:45BorkdudeI feel a survey coming.
19:45ibdknoxbetter than ice cream even
19:45tensorpuddingmore fun than using compojure or ring directly
19:45tensorpuddingbetter than ice cream sandwich?
19:45ibdknoxtensorpudding: We should ask the guy who wrote it ;)
19:46technomancyibdknox: did you get a chance to get rid of those nasty unqualified :use calls?
19:46ibdknoxthough I hear he's kind of an ass
19:46tensorpuddingwrote what?
19:46ibdknoxNoir
19:46brehautsome tool called chris granger i think
19:46ibdknoxtechnomancy: yessir
19:46tensorpudding...that's you isn't it
19:46technomancyibdknox: excellent
19:46tensorpuddingi thought
19:46technomancyibdknox: did you see the stuff about :require possibly deprecating :use?
19:46bbommaritoibdknox: He appears to be. I mean look at the Noir site, it's all minimalistic and hipster-ish.
19:46ibdknoxtechnomancy: I'm all for it.
19:47ibdknoxbbommarito: srsly. I take back the idea about asking him. Try to avoid him at all costs.
19:47ibdknoxtechnomancy: it was always weird to me that those two notions were separated
19:47technomancyibdknox: yeah, it confuses everyone
19:48ibdknoxtechnomancy: I also want to do what hiredman was talking about (:require ..) vs (require ..)
19:48ibdknoxthat just doesn't make sense
19:48technomancyrich even said at dinner that he couldn't keep them straight in his head and goes to look it up every so often
19:48ibdknoxtechnomancy: I've had to explain it to every person I've gotten to use Clojure
19:48ibdknoxlol
19:48hiredmanyes, someone start a separate thread about that on the ml
19:48technomancythe problem with (require ...) in the ns form is that the function form requires quoting
19:49ibdknoxtechnomancy: make it an illusion
19:49tensorpuddingthe :require vs. require thing makes some sense
19:49hiredmanns can translate require into :require
19:49technomancyibdknox: yeah, that's just to say I think you have to fix require at the repl at the same time as fixing :require in ns
19:49ibdknoxtechnomancy: I don't care if it actually uses require, just that it looks the same :p Though, obviously that would be best
19:49technomancyotherwise it just shifts around the inconsistency
19:50ibdknoxtechnomancy: I'll hide complexity from the user in the implementation any day ;)
19:50Borkdudeand also, rename contains?
19:50hiredmanso apparently rich wrote the ns macro, and at the time argued for keywords instead of symbols to "make it clearly declarative"
19:50tensorpuddingwhy does the colon matter?
19:50ibdknoxtechnomancy: but sure, I don't think require at the repl should need quoting
19:50hiredmanso I'm not holding my breath on it changing
19:50technomancyBorkdude: whoa let's not get too crazy here
19:50technomancyBorkdude: actually contains? is part of rich's secret plan to trick people into thinking about big-o notation
19:51brehautcontains? has a long and proud tradition of confusing new users
19:51Borkdudetechnomancy: elaborate
19:51technomancyibdknox: but that's a breaking change
19:51ibdknoxtechnomancy: I'm sure there's a way to support both
19:52technomancyBorkdude: contains? forces you to be O(1) while clojure.core/some is O(n)
19:52ibdknoxtechnomancy: the possible inputs to (require ..) are fairly limited
19:52stevelewheya
19:53hiredmanibdknox: the sane inputs
19:53amalloyhiredman: i don't understand why we're still talking about "making" ns support require vs :require. it already does that
19:53hiredmanyou can infact do stuff like (require ['foo :as 'bar])
19:53Borkdudetechnomancy: 'contains?' operates constant or logarithmic time
19:54ibdknoxamalloy: that doesn't do anything bad?
19:54ibdknoxamalloy: do you still need to quote it?
19:54hiredmanamalloy: it may accidently, but it should explicitly treat it the same way as :require, and everyone should use that
19:55amalloyi agree it's probably an accident. i'm not really sold on making it the "right way"
19:55amalloyunless you can also retrofit the "not in ns" version
19:55amalloyibdknox: try it, it just works. drop the : from all your ns decls
19:56ibdknoxhuh
19:56hiredmanamalloy: so right now the confusion is quoting confusion and keyword confusion
19:56hiredmanif you dropped the keyword bit you would just have quoting confusion
19:56technomancyBorkdude: right, the thing is that people use contains? on data structures that don't support constant-time lookup, the fact that this doesn't work forces people to think about the lookup characteristics when they otherwise wouldn't
19:56amalloyright. i think the keyword confusion is helping to combat the quoting confusion, though
19:57hiredmantwo kinds of confusion is always worse than one
19:57stevelewcomplected confusions
19:57amalloyat least this way when someone says "i'm doing (:use '[blah]) and it doesn't work", we can say "hey man you shouldn't be quoting there"
19:57amalloyif (use '[blah]) works in some contexts and not in others it's harder to figure out what the issue is
19:57ibdknoxamalloy: I agree, a halfway solution is a bad one
19:58ibdknoxthere's value in figuring out a real solution though
19:58gfredericksyou could totally switch things up and make ns more like a clojure function with opts -- so you just get one :use, one :require, and one :import
19:58ibdknoxthat being said, a big first step would be removing the use/require complexity as technomancy is suggesting
20:00hiredmanpossibly just write a ns2 macro and get it into core, so for backwards compat there is ns
20:00Borkdudetechnomancy: I think function names should be intuitive. contains? applied to a vector, my intuition is that it will check if some element is inside the vector. has-key? would have been a better name I think
20:01ibdknoxBorkdude: I agree
20:01TimMcclojurebot: contains?
20:01clojurebotcontains? is for checking whether a collection has a value for a given key. If you want to find out whether a value exists in a Collection (in linear time!), use the java method .contains
20:01TimMcclojurebot: contains?
20:01clojurebotcontains? is for checking whether a collection has a value for a given key. If you want to find out whether a value exists in a Collection (in linear time!), use clojure.core/some or the java method .contains
20:01tensorpuddingmaking the arguments to ns positional would be a pain
20:01TimMcHrmf. I thought it had some snarky responses.
20:01tensorpuddingit'd be less clear
20:02ibdknoxpositional?
20:02tensorpuddingwhat gfredericks was suggesting, making use/require into arguments
20:02ibdknoxthey wouldn't be positional
20:02tensorpuddingat least, what i interpreted it
20:02ibdknoxthey'd be named arguments
20:02gfredericks(ns2 :use [foo.bar bar.baz] :import [com.Thomas])
20:02tensorpuddingokay
20:03gfrederickswhoops forgot the name of the namespace :)
20:03hiredman:(
20:03gfredericksmore like an implicit map is what I was thinking
20:03tensorpuddingthat'd be acceptable but i like the idea of removing the :use/:import/:require distinction somewhat
20:03ibdknoxsomewhat related, why is the guidance for Clojure libs to unpack options maps?
20:04Borkdudewhat about (ns2 {:use [x y] :importy [z]})
20:04gfredericksibdknox: as opposed to explicit maps?
20:04ibdknoxthat makes composition much more difficult
20:04ibdknoxgfredericks: yes
20:04gfredericksI agree
20:04gfredericksit feels macro-like
20:04ibdknoxit's an anti-pattern in my mind
20:04ibdknoxa very simple case is when using threading
20:05TimMctensorpudding: Like this? (ns2 foo :use [net.cgrand.enlive-html/* org.timmc.chelydra])
20:05hiredmanagreed
20:05TimMcwhere the first means use, the second means require
20:05tensorpuddingthat seems a bit pythonesque
20:05ibdknox(-> x (foo some-opts)) becomes (-> x #(apply foo % some-opts))
20:05TimMctensorpudding: That's a compliment, then? I like Python's imports.
20:06hiredmanbut gfrederick's ns2 is a non-starter
20:06tensorpuddingi like it okay
20:06tensorpuddingpython's explicitness is missing
20:06technomancyBorkdude: I didn't say I agreed. just that it's a cunning plan.
20:06hiredmanmostly because of the way it makes using :use without :only easier
20:06tensorpuddingfrom net.cgrand.enlive-html import * would be more expository and understandable to the newb
20:06technomancyhas-key? is absolutely the clearest name for that function
20:07Borkdudetechnomancy: I think misnaming a function doesn't make people think about big-O ;)
20:07hiredman(ns2 :use [[foo.bar :only [foo]] [bar.baz :only [bar]]] :import [com.Thomas])
20:07tensorpuddingbut it's brief and once you know what it does it is readable
20:07hiredmanyetch
20:07hiredmantensorpudding: no import * please
20:07tensorpuddingno, i'm not saying put that into clojure
20:08tensorpuddingjust saying that it's very clear what it does
20:08amalloyonly if you know what import and * do
20:08tensorpuddingpython people think that from foo import * is a bad idea anyway
20:08amalloyand what the names of all the functions in that package are
20:08hiredman(ns2 some.ns (use foo.bar :only [bar] foo.baz :only [baz]))
20:09TimMcIs there a Clojure Lint?
20:09Borkdudetechnomancy: is nil a value?
20:09technomancyBorkdude: sure?
20:09TimMcSo... what's wrong with the current ns again?
20:10TimMcBorkdude: It's kind of second-class.
20:10tensorpuddingwhy do .clj files use :require and :use in the ns definition instead of using explicit require and use
20:10gfrederickshiredman: could a generic approach to discouraging naked use's be to enforce asking for them? (:use foo.bar :all), e.g.?
20:11Borkdudeif it wasn't then this shouldn't be true (contains? {:a nil} :a) by clojurebots definition
20:11TimMcI like that.
20:11hiredmangfredericks: it would be to go with technomancy's proposal
20:11hiredmanand eventually get rid of use
20:12tensorpuddingi dislike the idea of use
20:12ibdknoxuse is very useful at times
20:13tensorpuddingwell, it does cut down on the verbosity when you're using helpers from a package
20:13hiredmanthe main case is clojure.test
20:14Borkdudenaked use is useful on the repl
20:14duck1123my test nses are the worst about naked uses
20:14hiredmanyeah
20:14TimMcHey, maybe if we had decent documentation, this would be less of a problem!
20:14hiredmangenerally you at least have a naked use for clojure.test and the ns being tested
20:15TimMcOr maybe I am being optimistic about people R'ing the FM.
20:15amalloyclojure.test could have a macro for doing naked-use
20:15amalloyand then you don't need it in the new-ns
20:15hiredman*shrug*
20:19Borkdudehmm you can even use nil as a key in a map
20:20moogatronicis there an emacs/slime command to execute an s-exp and put the results in the current buffer with a comment char in front?
20:21scottjmoogatronic: ; C-u C-x C-e
20:22moogatronicscottj: awesome thanks. It doesn't auto comment, but it gets me the results!
20:23amalloymoogatronic: i think that's what the ; was for...
20:23moogatronicah, my eyes.
20:23moogatronicand the size of the font in textual. =)
20:23Borkdudemoogatronic: if you make your own elisp func you can call this slime func and do the comment after the slime func is done?
20:24moogatronicBorkdude: yeah, I just didn't know if there was a baked-in feature that did the ;=> type of comment, results thing that you see a lot in peoples examples on blogs / etc.
20:25Borkdudemoogatronic: I usually type that in myself
20:25hiredmanyou can write some elisp and get it
20:27BorkdudeI wrote my first serious elisp fns yesterday
20:27Borkdudeit writes java files automatically for all classes listed in the buffer, compiles them and runs main :)
20:31stevelewthat's cool
20:46scottjmoogatronic: http://jaderholm.com/paste/eval-sexp-comment-result.html I tried to get it so you wouldn't have to C-u but couldn't. So it's C-u C-x C-E will give you ;=>result
21:06Borkdudescottj: replacing (slime-eval-last-expression) with (slime-eval-print-last-expression (slime-last-expression)) works better for me
21:09rplevyare the extensible reader plans mentioned in the keynote talk written up anywhere?
21:10rplevyI took notes, and then realized I didn't write down enough to remember what I saw
21:10amalloyrplevy: slides for most of the talks are up, so it's probably there
21:10rplevythat talk is not up
21:11alex_baranosky#=()
21:11scottjrplevy: rhickey does't like to release slides without video
21:12rplevyalex_baranosky: no, that's different
21:12scottjrplevy: if extensible reader has to do with recent discussion about datetime literals there's docs on that on dev wiki
21:12rplevyscottj: that's related, but there's a more general way of extending the reader proposed
21:13amalloyscottj: can't say i blame him given (for example) how nuts the twitterverse went over his "TDD hatred" from the strangeloop slides before the video came out
21:13Borkdudescottj: this is what I'm going to use
21:13Borkdudescottj: https://gist.github.com/1375329
21:13Borkdudescottj: tnx for the inital version ;)
21:13scottjamalloy: actually that's what I was basing it on, though I don't think he released his slides for strangeloop before the video
21:14alex_baranoskyif you scour the clojure dev google group you may see the syntax mentioned there
21:14alex_baranoskypeople had strong reactions to that StrangeLoop talk
21:14alex_baranoskyone way or the other
21:15rplevyso if my memory serves me, it almost seems like what is being planned approaches reader macros. The concrete implementation that the user-defined syntax gets coupled with-- is it an arbitrary function? and what is its input?
21:15moogatronicscottj: thanks for that elisp! (was eating dinner)
21:15scottjBorkdude: if you care about making it work with elisp just say so I have code to do that
21:15scottjworking with elisp and slime that is
21:16Borkdudeah sure
21:18alex_baranoskyrplevy: what do you think of the idea of colorizing Midje's command line output?
21:18rplevyalex_baranosky: I saw those slides. I think the exact quote was "Fuck TDD. Also, fuck Simon Peyton Jones."
21:19alex_baranoskyrplevy: it seems like reader macros, yes, but a really limited scope.
21:19alex_baranoskyrplevy: hehe
21:19duck1123colorized midje output would be cool
21:19rplevyalex_baranosky: what is the limitation exactly?
21:20ibdknoxduck1123: https://github.com/ibdknox/colorize
21:20duck1123ibdknox: neat. I'll have to remember that if I ever have a use
21:21alex_baranoskyrplevy: syntax is limited, right?
21:21scottjBorkdude: I take it back, the code didn't translate as directly as I thought
21:21duck1123I've been enjoying the effect of clj-stacktrace's pst+ lately
21:21Borkdudescottj: not a problem, I'll use it mostly for clojure anyway
21:21alex_baranoskyduck1123: thanks, there's a namespace in lazytest as well; I'll have to steal the best bits
21:22rplevyI'm doing a report-back on the conj for the rest of the team that didn't go. I don't want to misrepresent it because when I say it will sound identical to reader macros, but I fairly certain this is less than that.
21:22Borkdude(+ 1 2 3)
21:22Borkdude;=>6 <-- this is elisp in action :)
21:22Borkdude
21:22clojurebot*suffusion of yellow*
21:22alex_baranosky~yodel
21:22clojurebotexcusez-moi
21:22alex_baranosky~yeah!
21:22clojurebotGabh mo leithscéal?
21:22rplevydid clojurebot acheive sentience?
21:23scgilardilong ago
21:23scottjduck1123: what's sad is clj-stacktrace would probably have been builtin had rich known about it when he changed 1.3's stacktraces
21:23alex_baranosky~shrimp
21:23clojurebotshrimp must be functors that map a category to itself.
21:23duck1123is anyone out there using Midje with lazytest? I started with lazytest, but then I switched to midje because it had better support for "around" fixtures
21:23hiredmanI added some inference stuff to clojurebot in the last few days, still tinkering with it
21:23rplevyhiredman: hehe
21:24alex_baranoskyduck1123L: funny you ask that; just tonight I was thinking about planning to figure out how to add auto.lazy powers to Midje
21:25scottjibdknox: no bold in colorize?
21:25alex_baranoskybut maybe I don't have to? Can Midje be simply composed with lazytest without needing any special purpose code?
21:25ibdknoxscottj: I forgot to add those
21:25ibdknoxscottj: I'll fix that tonight
21:25rplevycemerick: do you know what the difference is between the new extended reader idea and full reader macro support? when the concrete implementation of a user-defined reader syntax is added, is it a function, and what is its input (character stream?, an s-expression form?)
21:26alex_baranoskyscottj: more options here: https://github.com/stuartsierra/lazytest/blob/master/modules/lazytest/src/main/clojure/lazytest/color.clj
21:26duck1123It might be. I fear that the way lazytest generates the test functions might interfere with midje's backgrounds
21:26hiredmanrplevy: I think in rich's mind a big difference is you can namespace tags
21:26scottjibdknox: also I don't know about console colors or colorize but maybe (inverse (blue "foo"))
21:26alex_baranoskyhey ibdknox: want to add all the options from the lazytest link? Seems best to have one community colorize library... I can submit patch if you don't want to
21:27scottjalex_baranosky: ahh cool
21:27duck1123scottj: trampoline with inverse to blink?
21:27ibdknoxlol
21:27ibdknoxalex_baranosky: sure
21:27rplevyhiredman: that is important, and makes sense
21:30cemerickrplevy: the data involved remains Clojure data literals, and the extended literals should nest and compose just like "regular" literals do today
21:30cemerickcomposition policies of reader macros is (AFAIK) left entirely up to the macro implementations themselves
21:31cemerickcooperative vs. preemptive multitasking, applied to reader policy and literal composition :-P
21:32rplevycemerick: ok, great, that seems only slightly less powerful than user-defined reader macros. Not possible to add support for a string without escaping quotes for example.
21:32cemerickright
21:32cemerickyou can define reader macros today anyway, if you're willing to go black hat :-P
21:33cemerickand be stoned in public, perhaps
21:33rplevypatch the clojure source, yup :)
21:33cemericknah, at runtime
21:33rplevyoh
21:34duck1123probably still stoned in public
21:34cemerickdoubly so, actually
21:40scottjI have a reader macro to do member access, #.foo:bar is (or (:bar foo) (get foo "bar"))
21:47amalloyi...you...what. scottj, that is terrible
21:48scottjamalloy: I know, I actually never use it :)
21:48amalloyhaha k. i won't preach then
21:48scottjbut I do think symbol syntax for lookup would be nice
21:48hiredmanit's coming
21:48amalloyi don't know what "symbol syntax for lookup" means
21:49scottjfoo:bar
21:49hiredmanhttp://dev.clojure.org/jira/browse/CLJ-872
21:49hiredmanhttp://dev.clojure.org/jira/browse/CLJS-89
21:49scottjhttp://www.youtube.com/watch?v=OiaYxaONChg
21:49scottjat the end I show symbol syntax for lookup working in clojure
21:50hiredmanhorrible
21:50amalloyscottj: only works when both foo and bar are symbols. seems like pretty limited utility
21:50amalloyyou can't, like foo:(inc bar)
21:50scottjit is limited, but it's a pretty common use case still
21:51zerokarmaleftscottj: oh man, i was wondering who did these crack videos
21:51scottjzerokarmaleft: guilty
21:52zerokarmaleftscottj: not complaining really, a lot of screencasts tend to drag
21:56scottjhiredman: I don't think any of those do the lookup I was talking about that doesn't require parnes
21:56scottjparens
21:57cemerickscottj: did you do a custom build, or the runtime reader hack?
21:57scottjcemerick: in the video custom build, but I've also implemented the same thing as a runtime reader
21:57scottjcustom build is naturally better because you don't have to prefix with #.
21:58scottjs/naturally better/some description rhickey wouldn't object to/
21:58scottjshorter :)
21:58cemerickheh, right
21:59scottjI showed it to rhickey at the first conj and he hated it :)
21:59cemerickoh, I'm sure :-)
21:59cemerickthese things happen
22:09TimMccemerick: That flowchart is far too convoluted.
22:10cemerickTimMc: I agree.
22:10rplevyI'm curious to investigate this runtime reader hack, but then I might actually use it sometime, so it's better I not know the details, haha.
22:10TimMccemerick: I only just realized that the "Interop zone
22:11TimMc" leaks, in the lower left.
22:11cemerickyup
22:24TimMcI see.
22:24TimMcYour publisher won't mind putting it on a centerfold, right?
22:27cemerickhah
22:27cemerick:-)
22:46jodarohttp://code.google.com/p/clojure-cxx/
22:46TimMclolwut
22:47jodaroyeah
22:47jodaroits amazing what the googles find for you
22:51tensorpuddingqt?
22:52tensorpuddingnot a very busy project
22:52jodaroyeah
22:52hiredmanwell, google code
22:53tensorpuddinggoogle code isn't bad
22:53tensorpuddingi contributed to projects hosted there
22:53tensorpuddingthey had the good sense to not use svn though
22:53jodaroyeah i used it before github
22:55tensorpuddingno readme, no docs, no boilerplate
22:55tensorpuddingit must not be far along yet
23:04jodarowow
23:05jodaroyou can suck a project right out of an svn repo when you create it on github
23:05jodarokeeps dates and commit messages intact
23:14sritchiehey guys, are protocols defined with defprotocol accessible from java?
23:14cemericksure
23:14hiredmanit sort of depends
23:14cemerickthe compile down to interfaces, which you can implement
23:14hiredmanbut defprotocol generates an interface, and defrecords with the protocol inline will implement the interface
23:14sritchieSo with aot compilation, I can import a protocol as an interface
23:15cemerickright
23:15sritchiesure, I'm just looking to create an interface for other java classes to implement if they like
23:15sritchieand wondering if the way to do that is to aot-compile the namespace containing the protocol
23:15hiredmanthere is also a definterface
23:15hiredmanwhere you can specify argument types, etc
23:17sritchieokay, that's good to know about
23:18sritchiethe docs from defprotocol state that it "has no special compile-time effect"
23:19hiredman*shrug*
23:19sritchieI guess I'll try it, or go with definterface
23:20hiredmanhttp://clojure.org/protocols
23:21sritchieyeah, this looks good: "A Java client looking to participate in the protocol can do so most efficiently by implementing the protocol-generated interface"
23:21sritchieI'm just having trouble tracking down an example
23:21sritchieof the clojure-> java route, that is; java->clojure is clear and wonderful
23:26hiredmanhttp://clojure-log.n01se.net/date/2009-10-13.html#12:02
23:26hiredman3 years ago
23:28cemerickhiredman: 2 years, just 2!
23:29hiredmanlets see
23:29hiredman(- 2011 2009)
23:29clojurebot2
23:29hiredmanI see
23:33sritchiethanks, reading through now
23:33Raynescemerick: Grandpa.
23:33cemerickGet off my lawn!!!11!!1!
23:37tensorpuddingdoes clojurebot parse everything that starts with ( as a clojure statement
23:38tensorpudding(hmm)
23:38hiredmanno
23:38hiredmanjust math
23:38hiredman(+ 5 4)
23:38clojurebot*suffusion of yellow*
23:38tensorpudding(- (* 2 3) 4)
23:38hiredman(* 2 1)
23:38clojurebot2
23:38tensorpuddingnot very clever
23:38tensorpudding,(- (* 2 3) 4)
23:38clojurebot2
23:39hiredman2d64+24
23:39clojurebot83
23:39tensorpudding2d64
23:39clojurebot20
23:39Raynescemerick: I heard that you are going to switch to Leiningen for your projects.
23:39tensorpuddingoh, that's random?
23:39tensorpuddingthought it was some fancy radix magic for a moment
23:39cemerickRaynes: once the right pieces are in place, yes
23:40hiredmanit's dice
23:40tensorpuddingthere's an alternative to lein?
23:40Raynescemerick: Uh… Dude, we already have lein-hammock. What more can you possibly need?
23:40cemerick:-)
23:40tensorpuddingi heard of cake
23:40cemericknot much of a hammock person, perhaps
23:41tensorpuddingbut only when i heard that it was going to get merged with lein
23:41cemericktensorpudding: maven, ant, gradle, rake, buildr…various options
23:41cemerickbash FTW
23:43tensorpuddingi didn't think maven was as easy to use
23:43tensorpuddingand ant...that's java junk
23:43Raynes"Java junk" mostly applies to Clojure as well.
23:43tensorpuddingi should have said, xml junk
23:43RaynesAnd maven is arguably not as easy to use, but that doesn't stop people from using it. Leiningen uses maven for dependency management.
23:44hiredmanno xml in maven
23:44tensorpuddingi meant ant
23:44tensorpuddingmaven seems sane enough
23:44cemerickno build tool is sane
23:44tensorpuddingi've never heard of gradle and i'm pretty sure rake is from ruby
23:45klauerngradle is ant with Groovy instead of XML
23:45klauernor at least how I see it
23:45tensorpuddinglein is the simplest project tool i've seen in a while
23:45cemerickI assure you, it's not simple.
23:46cemerickMuch more pleasant learning curve, certainly.
23:46tensorpuddingwhere's the complication?
23:47klauernhttp proxies, mirror/proxy maven repos, dependency / dev-dep duplication,
23:47tensorpuddingproxies?
23:48tensorpuddingwouldn't any tool doing dependency fetching have to deal with that?
23:49klauernyou'd think so, but so many people don't have to worry about them that it doesn't get implemented right away
23:49tensorpuddingi meant more of
23:49tensorpuddingwhat tools get that right?
23:49klauernI had problems with Ruby doing it right up until about a year ago
23:50klauernIt's an enterprise-level feature, so I would guess it's just not high priority unless you work in one
23:50klauernI run into it all the time, so half of my tickets for projects are "add http proxy support" or something to that effect
23:50tensorpuddingwhy is http proxying enterprise?
23:50tensorpuddingi thought http proxying was to get around firewalls
23:50tensorpuddingand for caching performance blah blah blah
23:51klauernyeah, but I don't have one at home, and I don't know many startups that even worry about that kind of thing
23:51hiredmanno, it's for keeping on eye on employees
23:51hiredmanan
23:51klauernI see it as something corporations make sure they have checked on some form so they can claim "strong" security standards
23:52tensorpuddingbleh
23:53klauernI tend to think that if a tool can support all that bloated enterprisey stuff, they gain a large number of dabblers that can test and patch code
23:54klauernI know I wouldn't be contributing much if I couldn't run Leiningen behind a proxy for 80% of my workflow
23:54klauernnot that I'm patching code, but I'm definitely dabbling