#clojure logs

2012-12-05

00:02TheBusby^^^ would make a great T-shirt
00:18tomojKnor: may his merciful shadow fall upon you
00:24RaynesDon't encourage him.
00:38nightfly_Is Knor/Lajjla a bot?
00:39muhoooh gawd no, not lexx
00:44Knortomoj, indeed, I worship His Shadow.
00:45muhoonightfly_: no, he's a spaceship made out of insects and human organ tissue. :-/
00:45KnorAs you command, muhoo.
00:45KnorQuite the phallic spaceship, I might add
02:06nsunI'm looking for an html template engine. Do you guys has any suggestions ?
02:19alex_baranoskyis it normal for a tag completion table to take 30+ minutes (and counting) in Emacs if indexing your entire ~/.m2 folder? I'm trying to get seamless meta-.ing in Clojure as well as JAva. Any suggestions?
02:22amalloyi've never succeeded using M-. without a running slime session
02:22amalloybut i haven't tried terribly hard
02:23alex_baranoskyI miss being able to click-through into Java
02:23alex_baranoskyit was one of the few good things about Intellij with Clojure, hehe
02:36ambrosebsHow can I turn [1 2 nil] into "1 2 nil". I want to splice a vector into a string while still preserving nil.
02:36ambrosebs,(apply str [1 2 nil])
02:37clojurebot"12"
02:37pepijndevos&(apply str (map pr [1 2 nil]))
02:37lazybot⇒ 12nil""
02:38pepijndevoshm
02:38pepijndevoswhat happened to the quotes htere...
02:39ambrosebs,(apply str (interpose " " (map pr-str [1 2 nil])))
02:39clojurebot"1 2 nil"
02:39amalloy&(apply pr-str [1 2 nil])
02:39lazybot⇒ "1 2 nil"
02:39ambrosebs:)
02:39ambrosebscheers.
02:39pepijndevoshah
02:50ambrosebsHow about turning [[1 2 nil] [3 4 nil]] into "1 2 nil\n3 4 nil". Flattening each vector and putting a newline between each one.
02:51amalloy(join "\n" (map (partial apply pr-str) vecs))?
02:52ambrosebswhat is join?
02:52Raynes...
02:52amalloy&(clojure.string/join ", " [1 2 3])
02:52lazybot⇒ "1, 2, 3"
02:52RaynesAnd you call yourself a Clojure programmer, ambrosebs.
02:53amalloywell, it's hardly a clojure invention
02:53RaynesDon't think I implied that
02:53ambrosebsRaynes: I will sacrifice my integrity for better Typed Clojure error msgs.
02:55RaynesSounds good
02:59josteinkhttps://github.com/josteink/lein-drip
03:00RaynesI'm not sure what this is for.
03:01josteinkits just supposed to be a very simple way to install drip and set it up for use with leiningen
03:01josteinkhttps://github.com/flatland/drip
03:01josteink"Fast JVM launching without the hassle of persistent JVMs."
03:01RaynesI know, I'm a flatlander. ;)
03:02RaynesI'm just curious what was difficult with the original installation.
03:03josteinkoh nothing
03:03josteinkjust that adding one plugin to leiningen is simpler than doing things manually
03:03josteinkhandy when constantly setting up new environments ;)
03:03Raynesjosteink: So the main thing this does is set LEIN_JAVA_CMD for you?
03:04josteinkRaynes: it auto-dls drips, self-bootstraps drip, and registers it. yes
03:04RaynesThat's the only second step besides wget <insert-drip-link-here>
03:04josteinkyup
03:04RaynesI'm just wondering how much work you save by time you've edited profiles.clj to add the plugin
03:04josteinkit was a means as much as anything else
03:05josteinkit involves quite a bit of different subsystems (disk io, shell, network)
03:05josteinkso I was forced to learn :)
03:06RaynesWell, if you found it useful it probably is.
03:06josteinkme? I probably lost immense amounts of time :)
03:06josteinkjust that Ive found (for noobs in particular) that being told "just add this plugin to leiningen" lowers the barriers to entry significantly
03:07josteinkso I considered it might make a good public service as well
03:07RaynesIf you learned things, it's totally worth it.
03:07josteinkdoing this also involved, git, github, gpg and deploying to clojars
03:07Raynesjosteink: https://github.com/josteink/lein-drip/blob/master/src/leiningen/drip.clj#L22 You don't need the 'do' around these single 'else' println calls. only if there are multiple ones.
03:07josteinkall things Im certain will be useful :)
03:08tomojI tried to install drip the other day and hadn't noticed that I apparently failed
03:08josteinkRaynes: I know. I just did it for structural and visual consitenct
03:08josteinkconsistency
03:09RaynesGotcha
03:10josteinktomoj: heh
03:10tomojLEIN_JAVA_CMD=drip lein help
03:10josteink:)
03:10tomojafter that, shouldn't I see a standby jvm hanging around?
03:10tomojoh
03:11tomoj"Drip doesn't work with Leiningen-2.0.0-preview10"
03:11tomojok
03:12ambrosebsamalloy, Raynes: functional application errors now have line number, macroexpanded "original" form, expected domain and actual domain. thanks :) (see end) https://gist.github.com/4213669
03:13RaynesYou should use refheap.
03:13josteinktomoj: works fine here.
03:13josteinktomoj: but I use my superb plugin :P
03:13Raynesambrosebs: Check this out. I rewrote my old ruby refh command-line refheap client in Haskell: https://github.com/Raynes/refh
03:13josteinkbut I only have "LEIN_JAVA_CMD=drip"
03:13RaynesIf using Haskell to paste Clojure to a pastebin written in Clojure doesn't get you going, nothing ever will.
03:16josteinkRaynes: replace "pastebin written in clojure" with "pastebin written in PHP" and it's a pretty hilarious joke ;)
03:16josteinkor it least sounds like it
03:32Raynesambrosebs: So how do you type heterogenous maps? I think you explained this in your talk, but I missed it while I wasn't paying attention. :P
03:38ambrosebsRaynes: Hmaps only support keyword keys. {:a 1} is of type '{:a Number}. They record the presence of keys, but not their absence.
03:38ambrosebs`get` and `assoc` both work well with this type of hmap.
03:39ambrosebsI've got some ideas of how to support things like `merge`.
03:40Raynesambrosebs: Okay, so on to the more important issue. What manner of payment must I provide in order to make you use refheap for pasting awesome things like the above.
03:41ambrosebsRaynes: I shall give it a shot :)
03:42xificurChello, could someone explain why (read-string "012") returns 10?
03:43Iceland_jackxificurC: because it reads is as being octal?
03:43xificurC:(
03:44Iceland_jack*reads it
03:44xificurCIceland_jack: is there a way to force decimal read?
03:44Iceland_jackI'm not very familiar with Clojure but I'd imagine that's not possible using read-string
03:45Iceland_jacksince that's used for parsing general forms
03:45RaynesIceland_jack: ##(Long. "012")
03:45lazybot⇒ 12
03:45Iceland_jackI didn't ask the question
03:45RaynesUgh
03:45RaynesOther person
03:46RaynesxificurC: ^
03:46RaynesIceland_jack: Well, now you know too damn it.
03:46Iceland_jackAnd I feel all the better because of it
03:46xificurCRaynes: thanks
03:46xificurCis that a Java call?
03:46RaynesYes.
03:46RaynesIf you actually want decimal, you can do that too.
03:46Rayneser, double
03:47Raynes&(Double. "012")
03:47lazybot⇒ 12.0
03:47xificurCthanks Raynes
03:50wingyhow do i apply a middleware for just a specific route in my compojure/ring server?
03:51wingyeg. i have some routes I wanna password protect and need to check the basic auth header. if they are valid i respond with the secured page, if not i respond with invalid password
03:51KnorRaynes, what is your opinion of that "0" is falsy in php.
03:51KnorAs in the string containing the one character '0'
03:51RaynesThat it is evil and Satanic, I think.
03:57thorwilwingy: wrap the route handler
03:58wingythorwil: i found this http://vedang.me/techlog/2012/02/23/composability-and-compojure/
05:51borkdudeany favorites on linux server distro? I hear good things about arch - good choice?
05:53nightfly_I wouldn't recommend Arch for a server unless you're very brave
05:53ucb+1
05:53ucbit really depends on how many headaches you want
05:54ucband whether you want to spend time compiling the internet
05:54noidiarch is a hobby, not a product :)
05:54borkdudenightfly_ what would you recommend
05:54pyryes, avoid arch in production
05:55daimrodborkdude: debian?
05:55pyrborkdude: i tend to stick to distributions that are very well supported by CMFs for production machines
05:55pyrin the linux world that's centos and ubuntu. i choose ubuntu
05:56squidzdebian for server arch for personal pc
05:56squidzhow would I combine these functions (+ 1) (* -1) then apply them to 5?
05:57pyr,((comp (partial + 1) (partial * 1)) 5)
05:57clojurebot6
05:58squidzthanks
05:58pyrsquidz: i switch 1 and -1 but you get the picture
05:58ucbpyr: (+ 1) is inc
05:58ucband (* 1) is just * I think
05:58ucb,(* 5)
05:58clojurebot5
05:59squidzucb: yes I just wanted a simple example
05:59ucboh, -1, didn't see that
05:59ucbsquidz: so what's the real code you want to compose?
05:59ucbgah
05:59squidzI actually have something like (n-row -1 table) and (n-col -1 table)
05:59ucbnickname confusion, apologies
06:00squidzhttps://www.refheap.com/paste/7309 line 6
06:01ucbsquidz: that looks ok to me
06:01borkdudedoes find-fn still work in here?
06:03KnorRaynes, so, would you be against the idea that say in Clojure empty data collections are falsy?
06:03KnorBut surely not 0 or "0" naturally.
06:03RaynesKnor: I'd be against empty data structures being falsey.
06:04KnorRaynes, motivate
06:04RaynesBecause it's insane?
06:04RaynesIt doesn't make sense for an empty data structure to be a false value. It is a thing.
06:04ro_stRaynes: when will noir 1.3.0 go final?
06:04Raynesro_st: This coming weekend.
06:04KnorRaynes, I find (if (empty x) ...) to be a very common idiom in recursion,.
06:05ro_stoh, nice!
06:05KnorRaynes, well, so is False and Nil
06:05Knorthey are things as well.
06:05ro_stKnor: yes, false things.
06:05ro_stempty things are empty, not false
06:05KnorThat argument is more circular than an American living near McDonalds.
06:05borkdude(if (next x) …) is the recommended idiom right?
06:06lucians/everything but false is truthy/everything but true is falsy/
06:06luciangot that wrong
06:06RaynesSure, let's make every recursive base-case value be falsey. We can eliminate like 3 characters of code that way!
06:06ro_stKnor: look at equality in javascript. it's lots of fun. they decided to make things other than null and false falsey
06:06borkdudeRaynes what's the syntax for find-fn in here again?
06:06lucianro_st: that's not even the problem with js
06:06Raynes$findfn 2 1 1
06:06ro_stoh, agreed. but it's one of the bigger ones
06:06Knorro_st, indeed, and the only place I find myself having problems with it is 0 and 0.0
06:06lucianpython considers [] and 0 to be falsy, and it's only midly annoying. js commits bigger sins
06:07lazybot[clojure.core/max-key clojure.core/cond clojure.core/dosync clojure.core/sync clojure.core/char-escape-string clojure.core/-' clojure.core/*data-readers* clojure.core/- clojure.core/default-data-readers clojure.core/unchecked-subtract clojure.core/*clojure-versi... https://www.refheap.com/paste/7310
06:07borkdude$findfn 1 -1
06:07lazybot[clojure.core/-' clojure.core/unchecked-negate clojure.core/- clojure.core/unchecked-negate-int]
06:07Raynesborkdude: findfn [out] [& in args]
06:07KnorI never find that "" or empty arrays or empty lists being falsy to be a problem leading to bugs, that 0 is falsy however does lead to _a lot_ of bugs and hassle.
06:07KnorOr "0" (that's madness)
06:09borkdudeRaynes tnx
06:09Raynes&(next [])
06:09lazybot⇒ nil
06:10KnorHowever, I'm still waiting for a use case where it shows that "" being falsy is a bad idea that can lead to bugs or coding hassle.
06:10borkdude$findfn [] false
06:10borkdude$findfn [] nil
06:10lazybot[clojure.core/keyword? clojure.core/chunked-seq? clojure.core/fn? clojure.core/not= clojure.core/nil? clojure.core/string? clojure.core/sorted? clojure.core/false? clojure.core/true? clojure.core/symbol? clojure.core/number? clojure.core/integer? clojure.core/se... https://www.refheap.com/paste/7311
06:11lazybot[clojure.core/list* clojure.core/dorun clojure.core/doseq clojure.core/second clojure.core/letfn clojure.core/keys clojure.core/with-open clojure.core/sync clojure.core/char-escape-string clojure.core/let clojure.core/extend clojure.core/-reset-methods clojure.c... https://www.refheap.com/paste/7312
06:11RaynesI'm waiting for a use case where it'd be useful.
06:12Knoryou've already gotten one, you just said that sparing a couple of characters wasn't useful.
06:13RaynesWhat was that?
06:13foodooborkdude: (if (empty? x) …) seems like a better approach. You clearly state your intentions with (empty?)
06:13KnorIf you don't find that useful _enough_ then that's your own opinion, however that it has some use is a fact.
06:13KnorRaynes, like I said (if (next x) or (empty x) is extremely common in recursion
06:13RaynesJust use 'next' instead of 'rest' in your recursion.
06:13borkdude(empty x) returns an empty collection of the same type of x
06:13KnorIn CL code it is considered idiomatic to just use (if list ...) where it is understood that the else arm is used on an empty list.
06:14KnorEhh, empty?
06:14KnorYou get what I mean.
06:14Raynes(if foo-list (recur (next foo-list)))
06:14RaynesAlso, I'm pretty sure that your 'fact' is also an opinion.
06:15KnorNo, that it has some use is an objective fact, if you consider it useful enough to warrant whatever downsides it has is an opinion.
06:15RaynesThat is simply wrong.
06:16Knorso you would deny that having to type less is a use/
06:16RaynesYes, because in pretty much every case you don't save anything.
06:16RaynesBut by all means, post your proposal on the mailing list.
06:16KnorYou save typing in every one of such cases.
06:16RaynesWhatever.
06:17KnorI have no proposal.
06:17RaynesIf I stop talking to doorknobs I also save characters.
06:17KnorBesides, that's not something you can change this far in.
06:17clgvIs there a tutorial on how to use repl-y in your own application?
06:17KnorRaynes, you don't have to be so angry you know pumpkin.
06:17KnorWe're all friends.
06:17KnorBesides, His Divine Shadow doesn't like it.
06:17foodooRegarding empty lists and falsehood: You should also keep in mind, that destructuring is very helpful here:
06:18foodoo,(loop [[fst & rst] [1 2 3]] (if rst (recur rst) fst))
06:18clojurebot3
06:18foodooas an example on how to implement (last)
06:19KnorWell, in that case you would just use (if (empty? rst) and stuff.
06:20foodooKnor: No. In the example above rst is either a list or nil
06:20foodooand therefore you don't need empty?
06:20KnorBut I stand by that what is 'idiomatic' and what isn't largely depends on the culture of the language, using the empty list as false is considered very common and idiomatic in clojure. Short circuit evaluation is very idiomatic in Ruby.
06:20KnorWell, if you give it [1]
06:20Knorrest gets to hold [] right?
06:20KnorOr nil/
06:20borkdude,(let [[a & b] [1]] a b)
06:20clojurebotnil
06:20KnorOh
06:21borkdude,(let [[a & b] [1]] [a b])
06:21clojurebot[1 nil]
06:21KnorWell, that's pretty silly then honestly.
06:21Knor,(let [[x & xs] '(1)] xs)
06:21clojurebotnil
06:22KnorI do believe that the rest of a singleton list is generally considered to be the empty list.
06:22noidiKnor, empty lists are not falsy in clojure
06:22KnorYeah, I know.
06:22foodooThere is (rest) and there is (next). The first produces empty lists and the second nil
06:22KnorI'm just saying that to say the rest of a singleton list being nil and not () is unusual amongst programming langauges.
06:23KnorAh, okay, that makes sense then.
06:23KnorSo destructuring uses next?
06:23borkdudeI think nth even
06:23foodooI don't know
06:23KnorSo (next singleton-sequence) ===> falsy value?
06:23noidiKnor, yeah, next returns a seq (truthy) or nil (falsy)
06:24foodoo,(doc next)
06:24clojurebot"([coll]); Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil."
06:24noidiso next is slightly lazier than rest
06:24KnorYeah, well, like I said, I've never encountered a case where empty collections as falsy leads to bugs or complicated behaviour unlike making 0 falsy which very often leads to bugs.
06:24noidihttp://stackoverflow.com/questions/4288476/clojure-rest-vs-next
06:24borkdudehttp://clojure.org/special_forms#Special%20Forms--Binding%20Forms%20(Destructuring) <- nth
06:24KnorIf you know a case where it does, feel free to share.
06:24noidioops, I rest is lazier than next, that is
06:25noidi-I
06:25KnorCL does not even differentiate between false and empty list and it works fine there to not be able to do that, though I do feel a difference should be there.
06:25borkdudenth and nthnext
06:31clgvKnor: well you have the empty check with "seq" pretty easily and explicit
06:31clgvKnor: I fou write your loop initialization with `seq` and use `next` in the recur you can use (if mylist ...)
06:32clgvs/I fou/If you/
06:32KnorTrue, but it does basically 'use an extra function to get behaviour which you could normally have', the ubiquitousness of it shows that it's behaviour people want, I don't see a particular case where saying that empty collections are falsy on their own would lead to bugs unlike with 0 where it often leads to bugs.
06:32KnorNaN should be falsy though.
06:32Knorthe 'empty number' isn't 0, it's NaN.
06:34clgvI like it that en empty colelction is not falsy - helps a lot when filtering
06:34Knorclgv, can you give an example/
06:37clgvKnor: well, I know I have encountered some in my projects - searching through these would violate my time constraints right now ;)
06:37Knor=(
06:37KnorWell, the reason I'm asking this is because I'm implementing a pet lisp and this is one of the issues that has plagued me since forever which of both paths I should take.
06:38clgvbut on a semantic level it's a difference if you have nothing or something empty. this will always matter when you have to interpret some input
06:38foodooI guess Rich choose only nil and false to be false values for simplicity. If you don't have to keep many potential false values in your head, it makes understanding code much easier
06:39foodooespecially in a dynamically typed language
06:39clgvfoodoo: I think there was some explanation either in a talk of him or in one of the books I read
06:39Knorclgv, well, nil is generally consideered the empty tuple though.
06:40foodooKnor: not in Lua
06:40KnorI don't see Lua's type system being based on years and years of theoretical research.
06:43thorwilKnor: this might be of interest to you: https://groups.google.com/forum/?fromgroups=#!msg/clojure/JfZvqvLZjB0/C6rSn-Zg1s4J
06:44thorwilparticularly from "Clojure may be like Scheme" on
06:48Knorthorwil, I honestly agree with him there on if you want to basically have 'everything' be true but one value. But Clojure has true and false and CL has T
06:48KnorThough T supposedly is 'everything'
06:49foodooJava has null and false. This may also have played a role
06:50KnorYap, but predicates in clojure tend to return true or false.
06:51KnorI also disagree that nil is more nothing than "", "" is a string? that is nothing, nil is a null? that is nothing, it just happens to be by nature the only null? that exists.
06:51KnorIt's basically a type of collection which by its very nature is always empty.
06:52KnorWhich is why nil is considered the bottom type in CL. It's a collection containing types which is empty.
06:52KnorWhereas T is a collection containing values which is full of it basically.
06:53foodoo(first T) would return what?
06:53Knortypes aren't ordered.
06:53ambrosebsRaynes: I like it https://www.refheap.com/paste/7313
06:53KnorNot every collection needs to be ordered of course.
06:55thorwilKnor: of course do predicates return true or false, as they are for formulating questions that can be answered with yes or no. whereas nil stands in for saying nothing
06:56clgvambrosebs: inline type declaraions for typed clojure?
06:59ambrosebsclgv: (+ "string" 1) gets inlined by the time Typed Clojure gets to it unfortunately
07:00ambrosebsclgv: is that what you meant?
07:00clgvambrosebs: no I tried to interprete the surrounding forms ;)
07:01ambrosebsOh right, `cf` just kicks of static type checking for a form.
07:01Knorthorwil, indeed, but that's not the story he told on that google group
07:01KnorWhere he basically didn't want T vs F, he wanted nil vs everything.
07:01KnorAs in CL style.
07:17Raynesambrosebs: Awesome! If you use it and find yourself wanting any features, let me know and/or open issues on Github. Trying to make it the best.
07:19ambrosebsRaynes: noted
07:19ambrosebsRaynes: syntax highlighting seems really nice.
07:22clocKwizeHi
07:56Sgeo|web,((fn [s] (list s (list (quote quote) s))) (quote (fn [s] (list s (list (quote quote) s)))))
07:56clojurebot((fn [s] (list s (list (quote quote) s))) (quote (fn [s] (list s (list (quote quote) s)))))
07:56Sgeo|webYay
07:56ro_stquine?
07:57Sgeo|webYeah. Although I'm sure I've seen a Clojure quine before, I was able to work this one out :D
07:57ro_st(defn foo [] (source foo))
07:57ro_st;-)
07:59josteinkSgeo|web: whee
08:30clgv`proxy` can override a protected emthod and expose it as public, right?
08:33cshellclgv: I'm not sure, but I saw this post
08:33cshellhttp://bit.ly/11TmbYy
08:33Sgeo|webhttp://ideone.com/nVs6D4
08:33Sgeo|web(off-topic)
08:33clgvcshell: as far as I tried it works. but I am not sure
08:39clgvSgeo|web: it's even more interesting if you capture the value in that context as well ;)
08:40Sgeo|webclgv: ok
08:40Sgeo|webI just wish there was a nice way to map a function onto values of keys
08:40Sgeo|webOr.. hm
08:41foodooSgeo|web: Can you use metadata for your functions?
08:43Sgeo|webfoodoo, hmm, not sure what that's relevant to?
08:45Sgeo|webclgv: am I allowed to use prior code that I've written?
08:45clgvSgeo|web: erm what?
08:47josteinkgoing back to languages without destructuring (like javascript) hurts
08:47josteinkthings just feel needlessly verbose
08:48ro_stso, it's easy to do scoped 'global' state with Ring, as you can use binding to bind atoms to declared vars in the context of a request
08:48ro_sthow can one do the same thing for long running processes, such as worker processes?
08:49ro_sthttps://github.com/noir-clojure/noir/blob/master/src/noir/request.clj
08:49cshellro_st: Can you use the binding form?
08:49weavejesterro_st: It depends where your worker processes are...
08:49Sgeo|webclgv, I've written the "capture the value in that context as well" part before
08:49cshellro_st: and bind when the thread starts?
08:49Sgeo|webclgv: Sum total of everything: http://ideone.com/o7gVx6
08:49ro_stthis sort of thing. i guess i can wrap the worker itself with a binding
08:49Sgeo|webAlthough the result it gives is really ugly :(
08:49ro_stwe're using quartzite to schedule workers
08:50clgvSgeo|web: oh I see ;)
08:50ro_sthttp://clojurequartz.info/
08:50ro_sthmm. needs more hammock.
08:51Sgeo|web Although actually, this data structure as is is more useful if you're writing an env-aware macroexpand-1 function
08:51ro_stworkers are generally system-wide where as requests are implicitly user-wide
08:53Sgeo|webIs there such a thing as a truly anonymous macro?
08:53clgvhow do you call a parameter that represents a number until some event happens briefly?
08:53Sgeo|webI know clojure.tools.macro has a macrolet, but does that just make a gensym in the namespace, or how does that work?
08:53clgvSgeo|web: yeah, there was contrib lib that offered that
08:53clgvthats the one I think^^
08:54ro_sti'm doing readme driven development : https://github.com/Cognician/fusebox/blob/master/README.md
08:54Sgeo|webI'm just trying to think, to see how I'd write a macroexpand-1 that takes an evn
08:54Sgeo|webenv
08:54ro_stno actual code or jars yet
08:55clgvSgeo|web: you want that bindings in the env are inserted into the form?
09:02Sgeo|webclgv: I'm thinking that for a macroexpand-with-env, I could just call the underlying function for the form, but I need to know whether it's been shadowed by something, and in order to do that, I need to see all bindings (can do), and know whether or not it's a macro
09:03clgvSgeo|web: macros usually have metadata {:macro true}
09:04Sgeo|webI'm skimming over clojure.tools.macro
09:04Sgeo|webIt looks broken, although I'm not certain.
09:04Sgeo|webI have a feeling it will break if you use macros that rely on &env
09:05Sgeo|webProblem with macroexpanders: Expanding a macro can cause side-effects
09:06Sgeo|webI was scared of the possibility of running a macro several times, but considering that fundamental issue, maybe I shouldn't be
09:06ucbis it me or is ritz sloooooow?
09:06Sgeo|webHmm, my idea doesn't work anyway though
09:21gfredericksare side-effecting macros avoidable?
09:22TimMcI don't even know of any examples...
09:22TimMcWait, perhaps defonce?
09:23TimMcnope, no side-effects from expansion
09:23gfredericks,(macroexpand '(defonce TimMc 42))
09:23clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
09:24gfredericksha I've never seen def in a let like that before :)
09:24TimMcI have. amalloy_ is fond of letted defs.
09:24gfredericksno I mean (let [v (def ...)] ...)
09:25gfredericksif amalloy_ is fond of those then I'm never talking to him again.
09:25TimMcOh! That's... weird.
09:26gfredericksI guess more to the point is I've never seen the return value of def used
09:29TimMcSo... (def foo) ensures that #'foo exists, but doesn't change the root value.
09:30gfredericksthat does look to be the case
09:36squidzusing lazy-cat prevents further 'normal' use of collections because it's no longer pure right?
09:42ro_stis it possible to put a docstring on a keyword?
09:42Sgeo|webWell, the get-env macro I wrote is side-effecting. Not really a compelling case for the widespread existence of side-effecting macros though
09:42Sgeo|webWhat about Noir?
09:42Sgeo|webDo Noir macros do side-effects, or just the code they expand into?
09:44TimMc&(instance? clojure.lang.IMeta :foo) ;; ro_st
09:44lazybot⇒ false
09:44Chousukero_st: I don't think you can attach metadata on keywords, since keywords are singletons.
09:46ro_stcool, tx
10:04djanatynhmm
10:04djanatynI'm using a java library, and I need to call an update method periodically to show the results on the screen
10:04mdeboard&(instance? clojure.lang.IObj :foo)
10:04lazybot⇒ false
10:04djanatynI'd like to create a new thread that continues to do this automatically. right now I'm doing it like this:
10:05djanatyn(defn update [world] (.. world show) (send *agent* update))
10:05djanatyn(send (agent (ActorWorld.)) update)
10:05djanatynI should probably add a (Thread/sleep) in that update method. is there a cleaner way to do this?
10:16ohpauleezwhooops
10:16ohpauleezwrong channel
10:32googya1you can not do this (conj (1 2 3 ) 5), but in function, you can do so (fn foo [x] (when (> x 0) (conj (foo (dec x)) x))) . why?
10:32mdeboard&(conj '(1 2 3) 5)
10:32lazybot⇒ (5 1 2 3)
10:32mdeboard?
10:34mdeboard@ googya1
10:35devngfredericks: 'defs letted' is my nerdy def leppard cover band.
10:35googya1there is magic in function?
10:38matthavenergoogya1: when you do (1 2 3) clojure thinks '1' is a function
10:39matthavenergoogya1: so you have to do (conj '(1 2 3) 5) to avoid the evaluation of (1 2 3) as a function
10:39matthavenergoogya1: thats what mdeboard was showing you with &(conj '(1 2 3) 5)
10:39googya1why is correct in function definition?
10:39mdeboardgoogya1: because `foo' is a function
10:39matthavenergoogya1: in your function, foo is returning a list
10:40googya1oh yes i see, thank you @matthavener
10:40matthavenergoogya1: alternatively (iirc), you can do (list 1 2 3) instead of '(1 2 3)
10:41mdeboardin '(1 2 3), the apostrophe is escaping the `()' literal
10:41mdeboardor something
10:41mdeboardquoting, not escaping
10:41matthavenerit prevents evaluation
10:41matthaveneranother gotcha (that has gotten me), is that '(1 2 (function 3)) will not evaluate (function 3)
10:41mdeboardquoting
10:41matthavenerbut (list 1 2 (function 3)) *will*
10:41mdeboard'(1 2 ~(function 3)) :)
10:42mdeboardmaybe
10:42matthavenermdeboard: ah, today i learned something new :)
10:42mdeboardunquote splicing iirc
10:43matthavenerdoesn't look like it
10:43matthavener&(let [f (fn [] 3)] '(1 2 ~(f)))
10:43lazybot⇒ (1 2 (clojure.core/unquote (f)))
10:43matthavener&(let [f (fn [] 3)] (list 1 2 (f)))
10:43lazybot⇒ (1 2 3)
10:44mdeboard&(let [f (fn [] 3)] `(1 2 ~(f)))
10:44lazybot⇒ (1 2 3)
10:44mdeboardThere we go
10:44mdeboardonly with the backtick, sorry
10:44mdeboard,`(1 2)
10:44clojurebot(1 2)
10:46matthavenerinteresting
10:51hcumberd`Hi ;)
10:55mdeboard,(let [x 15] `x)
10:55clojurebotsandbox/x
10:58mdeboard matthavener: iirc ` returns the fully namespace-qualified symbol, while ' is the unqualified symbol
10:58mdeboardI didn't bring my book to work today
10:58mdeboardand good luck googling `
10:58mdeboard(let [x 15] (quote x))
10:58mdeboard,(let [x 15] (quote x))
10:58clojurebotx
10:59vijaykiranmdeboard: you can always use symbolhound.com
10:59hcumberd`,google hans wurst
10:59clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>
11:00vijaykiranfor ` = http://stackoverflow.com/questions/4571042/can-someone-explain-clojures-unquote-splice-in-simple-terms
11:06mdeboardvijaykiran: cool, thanks
11:11mdeboardoh good I'm glad I was in multiple channels so they could see my quit message.
11:11mdeboard:( Sorry, it was a poor joke from another channel.
11:26squidzif I have arrays in a list how can i put them into another array instead?
11:28squidznvm I just use (into [] ...
11:28Kowboythat would be a vector
11:28Kowboyis that what you want?
11:29Kowboyor do you want a native Java array?
11:29squidzyes
11:29squidzi meant vector sorry sometimes I mix them up
11:29Kowboythat's ok
11:30squidzbut im still a little confused by my code. At one point my function returns a vector, then at another point it returns an array
11:30Kowboyno need to apologize, we are happy you are learning clojure
11:31Kowboywell they can both be treated generically as sequences, it's just that vectors are "safer", while arrays may be faster depending on your use case
11:33Kowboyhow long have you been using clojure?
11:33squidzhttps://www.refheap.com/paste/7314 here, (n-col) returns an array, but when ran inside line 20 its returning aa list
11:33squidzive been coding now for 2/3 days
11:34Kowboymap always returns a sequence
11:34Kowboywhich looks just like a list when printed out
11:34Kowboysame thing with reduce
11:34llasramsquidz: The vocab you want is 'vector' vs. 'seq'. In your `if`, when the expression is true, the `reduce` yields a vector. Whe false, as Kowboy is saying, the `map` yields a `seq`
11:35Kowboysorry, what am I saying
11:35Kowboyreduce can return anything
11:35squidzah right, its switching according to the if, thank you
11:36Kowboyif you want the same thing, you can wrap it with (seq your-vector-here)
11:36squidzso map always returns a seq
11:36squidzi actually want it as a vector
11:36Kowboyprefer seqs over specific implementations whenever possible
11:36squidzif i'm running these functions a lot, would vectors perform better than sequences?
11:36Kowboydo you need random access?
11:37squidzyes
11:37Kowboyit's the same concept as programming to interfaces in Java
11:37Kowboyshould you pass around a List or ArrayList?
11:37Kowboyok, if you need random access, that's a different story
11:37squidzso using a seq, clojure can handle all structures implementing seq
11:37Kowboyright
11:38Kowboyand most sequence methods will return a seq anyway
11:38squidzwell in line 11 and line 5 of my paste i use nth
11:38Kowboyplus, with seqs, you often get laziness for free
11:38llasramIf you really need random access, you can use the Clojure 1.4 `mapv` to perform a map which directly and efficiently yields a vector
11:38Kowboyyou can still use nth with a sew
11:38Kowboy*seq
11:38Kowboyit's just an O(n) operation
11:38squidzokay so that is not random access?
11:39KowboyI think so, someone correct me if I am wrong
11:39squidzokay
11:39Kowboyyeah, the map will create a lazy-seq
11:39llasramYeah -- nth is O(n) for seqs, O(1) for vectors
11:39squidzso I will refactor my code to use sequences instead of vectors
11:39Kowboyeven if the seq is backed by a vector?
11:39squidzokay so just a little slower
11:40squidzbut it shouldnt be a big problem
11:40squidzit is just to transform some data of mine
11:40squidzso it's a one time thing
11:40Kowboyoh wait, it is not backed by a vector here, nm
11:40Kowboyyeah, prefer seqs until you have a performance problem
11:40squidzwhat do you mean not backed by a vector?
11:40Kowboyin most cases seqs will outperform anyway because of laziness
11:41KowboyI saw the conj in your map function
11:41Kowboyconj tries to preserve the underlying type
11:41Kowboyso it returns a vector in this case
11:42Kowboybut that is for an *item* in the seq that map is returning
11:42clojurebotYou don't have to tell me twice.
11:42squidzokay, i think i've been aproaching it the wrong way. I was always trying to use vectors, then having problems between mismatching vectors and sequences. When actually I can keep it simple and more general using sequences
11:42Kowboyexactly
11:42llasramKowboy: Interesting question (seq backed by vector). It seems not -- `seq` on a vector returns an vector-specific seq implementation, but that implementation does not also implement Indexed, so `nth` does the O(n) operation
11:42llasramMan, it is bugging me that someone on this channel is using the name "so"
11:43Kowboyif and when you need to speed up random access (like if you are doing nth a bunch of times), then convert the seq to a vector
11:44squidzKowboy: thanks for the help. You've helped me get a step farther with clojure
11:47Kowboypass on what you have learned ;-)
11:54squidzbut there is no sequence alternative for (subvec .. ?
11:56scriptorthat sounds about right
11:56scriptorer, nvm
12:00gfredericksis there any standardized method for app configuration yet?
12:03llasramgfredericks: Does any language have such? :-)
12:10zodiakgfredericks, urm.. jst use clojure for it :)
12:10zodiakhomoiconicity ftw
12:11zodiakgfredericks, (def conf (with-open [rdr (io/reader "props.clj")] (read (java.io.PushbackReader. rdr))))
12:11technomancyinc
12:12technomancygfredericks: though for fancy merging logic and defaults https://github.com/sonian/carica does a nice job
12:14joegalloI've used that library a few times, it's nice.
12:14technomancydisclaimer: I guess I wrote the first revision of that; not sure if any of my code still survived =D
12:23tmarbletechnomancy: I'm using lein2 for a search of clj-webdriver (w/ clojars-classic in project.clj) but I don't see 0.6.0-beta2 in the results?
12:25borkdudeI have a question, probably related to noir. this website renders as html in my browser: http://michielborkent.nl:8080/
12:25mpenetgfredericks: or for the lazy typist: (comp slurp read-string)
12:25mpeneterr
12:25borkdudebut when I make a virtual host (using Apache) http://twitter.michielborkent.nl/ - the site gets served as txt
12:25mpenetgfredericks: (comp read-string slurp)
12:26borkdudeso, I assume noir doesn't add the content type correctly?
12:26technomancytmarble: it's there, but it's on page 3
12:26technomancytmarble: oh, depending on your page size
12:27technomancyshould probably boost the default given how long it takes to start lein to hit the next page
12:27borkdudethis is noir 1.2.0 btw
12:27technomancytmarble: definitely have some issues around sorting unfortunately
12:27tmarbletechnomancy: i'm in *shell* -- can I just not do pagination?
12:27technomancytmarble: yeah, hang on
12:27technomancy:search-page-size 100000000 in the user profile
12:32tmarbletechnomancy: awesome sauce!
12:37technomancy50 is probably a better defoult
12:37technomancydefault
12:47ucbagain, does anybody feel/have a setup where ritz-nrepl is slooooow? i.e. it takes about 20min to jack in?
12:50joegallotechnomancy: i'm having a problem with lein2 search https://gist.github.com/499c4156050de2148ab6
12:51technomancyjoegallo: geez
12:51technomancycan you clear out ~/.lein/indices?
12:51joegalloi tried to rm -rf .lein/indices, but the problem remains
12:51joegallobeat ya!
12:51technomancywat
12:51hcumberd`eeeek
12:51technomancyjoegallo: we don't even control that part of the search implementation, we just call out to the nexus indexer =(
12:59hugoducb: if you're reading the log - 20min is not normal for jack in
13:06oskarthlynaghk: hey, using reflex - is there anyway to have a CO depend on two or more other (derefed) COs?
13:08borkdudewtf … http://stackoverflow.com/questions/2428563/how-can-i-prevent-apache2-from-setting-the-content-type-header
13:12lynaghkoskarth: yeah, a watcher will be added to anything deref'd in the body of the computed-observable macro
13:19borkdudethe page http://www.webnoir.org/ doesn't have a content type either
13:20borkdudebut of course I don't know if it was build with noir… ;0
13:22ucbhugod: hiya, I am reading now, I've tried ritz twice already and both times it's been very very slow. Is there a way I can trace what's it up to? Last time it was stuck caching JVM classes for ~15min
13:22ucbI actually had to kill emacs
13:22ucbmind you, perhaps it's nothing to do with ritz, but plain nrepl works a charm
13:23hugoducb: does lein ritz-nrepl from a shell, and M-x nrepl to connect it, work any better?
13:24hugodyou can add --log-level trace to get very verbose output
13:24ucblet me try that
13:25ucbjust kicked off lein ritz-nrepl
13:25ucbfor the record, I'm not running on an XT PC or anything :)
13:25ucbooh
13:26ucbhugod: first thing that happened on M-x nrepl: https://friendpaste.com/2KfwQCQ8kFhqY3ni1hzasf
13:26hugodtrampoline with LEIN_FAST_TRAMPOLINE=1 should help lein ritz-nrepl startup time
13:26ucbit was fast enough with lein ritz-nrepl
13:27hugodlooks like you don't have nrepl-ritz.el loaded
13:27ucbstrange
13:27ucbI installed it from marmalade/elpa
13:27ucbthought that'd take care of things?
13:28hugodor you could add the clojure-complete dependency to your dev :dependencies
13:28hugodmaybe it's not requiring it automatically
13:28hugodtry M-: (require 'nrepl-ritz)
13:28ucbhum, I don't have clojure-complete listed in my lein profile
13:29ucbthe require worked just fine
13:29ucbright, now I do have ritz-* available
13:30hugodif you reconnect, you shouldn't see an error now
13:31ucbsame deal with locating complete/* :/
13:32ucbyup, now typing stuff in the repl complains about clojure-complete, but at least the repl is up in under 1min :)
13:33hugodnrepl-ritz should be overriding nrepl.el's use of clojure-complete. You can always add clojure-complete to your dev dependencies as a workaround.
13:33ucbyou mean M-x nrepl-ritz?
13:33borkdudeadding the content type with the content-type functon worked, http://twitter.michielborkent.nl/ - woohoo, but do I really have to do this for every defpage?
13:34technomancyborkdude: you could do it with middleware in compojure
13:34technomancymaybe there's a way to hack that into noir somehow
13:34borkdudetechnomancy yes, but not everything served might be an html file right?
13:34technomancyborkdude: right, but your routes are composable; you can add middleware to a subset of them really easily
13:35hugoducb: no, just require'ing nrepl-ritz should have forced it to use nrepl middleware for completion
13:35technomancyborkdude: in compojure anyway
13:35ucbhugod: oh, I see
13:35technomancybut this is basically a textbook example of what's wrong with the way noir does things
13:36borkdudetechnomancy maybe I'll write my own defpage function (def-html5-page) which wraps defpage?
13:36ucbI just restarted my emacs just in case, same thing
13:36ucbhugod: this is my lein profiles: https://friendpaste.com/2KfwQCQ8kFhqY3ni1hi0cl (copied from the github for ritz-nrepl)
13:52Norgelysholis
13:52Norgelyshola no hay nadien
13:56Norgelysholaaaaaaaaaaaaaa
13:59Norgelysholaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
13:59mattmoss&(repeat 12 \a)
13:59lazybot⇒ (\a \a \a \a \a \a \a \a \a \a \a \a)
14:00mdeboard&(apply str (repeat 12 \a))
14:00lazybot⇒ "aaaaaaaaaaaa"
14:00Norgelysholaaaaaaaaaaaaa
14:00mattmoss&(apply str (reverse "loh") (repeat 12 \a))
14:00lazybot⇒ "holaaaaaaaaaaaa"
14:05al80can you explain why this line print only "a" and "c"? (do(println "a") (map print [1 2 3]) (println "c"))
14:05nDuffal80: map is lazy
14:05Norgelys10:03:05) al80: can you explain why this line print only "a" and "c"? (do(println "a") (map print [1 2 3]) (println "c"))
14:06nDuffal80: consider wrapping that in doall
14:06al80ok, if it is at the end of the do form, it is expanded. Why?
14:06scriptorwhat do you mean expanded?
14:07hcumberd`It's hard to understand expansion
14:07AimHereIt'll be expanded because the repl wants to return the value of the last thing in the do form
14:07nDuffal80: the thing at the end of the do is returned
14:07borkdudehmm, I think I did smth wrong myself
14:07AimHereInsofar as 'expanded' just means evaluated
14:07nDuffal80: ...and the repl prints the returned values
14:07nDuffal80: ...and, it the process of trying to print them, it evaluates them.
14:07al80ok thank you
14:08borkdudehttps://www.refheap.com/paste/7319 <- when I leave out the (html …) wrapped around (welcome-page) I get content type text/plain
14:08AimHereWell it's trying to evaluate them; printing them is the side effect
14:08borkdudebut the page already has a doctype and everything so why would I use the html functino?
14:08nDuffAimHere: ...well, the point of evaluating is to get to the printing
14:08hcumberd`borkdude: headers!
14:08nDuffAimHere: if it weren't doing any printing, lazy things wouldn't be evaluated.
14:09AimHerenDuff, wrong way round; the problem here is that the function isn't being printed because it's not being evaluated
14:09AimHeres/printing/being printed/
14:10nDuffAimHere: That's true, of course, but if something were trying to print it, it'd be getting evaluated in the process. :)
14:10nDuffAimHere: ...if something were trying to print the result of the map, that is.
14:10borkdudehcumberd` the html function only renders a string?
14:11nDuffAimHere: The reason the map isn't getting to evaluating (print) is that it isn't being evaluated, yes, but the reason it's only evaluated when it's in the last position is that only the thing that's returned gets printed. :)
14:11hcumberd`borkdude: hiccup/html or ring/html?
14:12AimHereYeah, but what you're talking about 'printing' there is just the 'nil' that's the eval result
14:12borkdudehcumberd` I think it is hiccup's html here
14:12nDuffAimHere: Just so!
14:12AimHereNot the contents of the print statement
14:12nDuffAimHere: Yes, you're right -- that *is* what I'm talking about printing.
14:13hcumberd`borkdude: tried it at the repl?
14:13hcumberd`what kind of html is returned?
14:14borkdudehcumberd` going to do it now… I'll paste the static html for you
14:14borkdudehcumberd` https://www.refheap.com/paste/7322
14:17borkdudehcumberd` hmm, (welcome-page) returns a list of two strings, one with the doctype and the other with the rest of the page
14:18hcumberd`borkdude: a list?
14:18hcumberd`not a map?
14:18borkdudehcumberd` a lazyseq
14:20hcumberd`borkdude: you are using noir?
14:20borkdudehcumberd`
14:20borkdudehcumberd` yes
14:20hcumberd`ahhh maybe your enclosing html elements are missing and defpage is sensitive to that
14:21hcumberd`I do not use noir,...
14:21sshackAnyone here do sqlkorma? I'm trying to see if it can access table/column annotations (comments in postgres).
14:24hcumberd`borkdude: what are you writing in noir?
14:25borkdudeah, found something.. (defpage "/" [] (list "foo" "bar")) results in page with "foobar" as content and no content-type, where-as (defpage "/" [] "foobar") results in the same page WITH content-type text/html
14:25hcumberd`borkdude: really in a list?
14:25borkdudehcumberd` just some toy, nothing special
14:25borkdudehcumberd` yes
14:26hcumberd`It should be more kind of a map, ring uses maps ...
14:26hcumberd`I thought noir->compojure->ring routes whould be the result
14:27borkdudehcumberd` defpage just expects a string, but I have no idea what it's behavior is when fed a seq, which I was doing
14:27borkdudeits
14:27technomancyring accepts seqs of strings simply so that they can be lazy; they should be treated the same way as strings
14:27weavejesterCompojure assumes text/html for string types if no other content type is specified.
14:28weavejesterIt seemed a sensible default at the time
14:28borkdudeweavejester it calls str on the thing and adds no content-type, something like that?
14:28hcumberd`technomancy: then the behaviour seems like a bug?
14:28technomancyhcumberd`: the fact that the same behaviour doesn't apply to seqs you mean?
14:28technomancyit does feel like an oversight
14:28weavejesterCompojure has a protocol for rendering different types
14:28weavejesterhttps://github.com/weavejester/compojure/blob/master/src/compojure/response.clj
14:28weavejesterOh, actually...
14:29weavejesterHuh, Compojure does treat ISeqs of strings the same way
14:29weavejesterGuess it's not my fault after all :)
14:29hcumberd`technomancy: that the content type is missed out if you are providing a seq
14:29technomancyheh; nice =)
14:29technomancyhcumberd`: yeah, according to that link it's not compojure's fault
14:30hcumberd`a problem of defpage ?
14:30technomancyweavejester: why is content-type a function vs just using assoc directly?
14:30weavejesterUnless an older version of Compojure is being used.
14:30technomancyweavejester: oh, probably because of case insensitivity?
14:30borkdudeweavejester in what version of compojure was this added?
14:30technomancythat's a really annoying quirk of http
14:30borkdudeweavejester I'm probably using too old stuff then (noir 1.2.0...)
14:31weavejestertechnomancy: Well, it's more that it's just a common thing to want to do
14:31weavejestertechnomancy: And (content-type "text/plain") is slightly more readable than (assoc-in [:headers "Content-Type"] "text/plain")
14:32technomancyoh right; I was thinking it would be a plain assoc for some reason
14:32clojure-newbyo guys, I found (reduce #(update-in %1 [{:employer (:employer %2)}] conj %2) {} [jay mike john]) indexing a collection for me nicely (from a blog post), I'd like to modify it to count the items against each index instead of listing them… any ideas ?
14:32technomancyweavejester: does compojure handle headers case-insensitively?
14:32weavejestertechnomancy: Request headers are lower-cased by Ring in order to provide consistent keys
14:33weavejestertechnomancy: Response headers are sent as-is, but HTTP header names are case insensitive
14:33technomancygotcha. best to have that handled at the lowest level possible I guess.
14:33weavejestertechnomancy: So it doesn't matter if you output "content-type: text/plain" or "Content-Type: text/plain"
14:34borkdudenoir 1.2.0 depends on compojure 0.6.5
14:34weavejesterThe only problem is middleware that updates headers set by the handler or other middleware
14:34technomancyweavejester: will that interfere with the auto-text/htmlizing if the case mismatches?
14:34weavejesterborkdude: Oh, that's old.
14:35borkdudehmm, 1.2.1 does too
14:35weavejestertechnomancy: I see your point… hm… actually, I told a lie. If a string is returned, the content type is set to text/html regardless.
14:36weavejestertechnomancy: However, if you return a map, then it passes straight through
14:36borkdudebut anyway, problem solved - I should have noted that an enlive deftemplate returns a lazyseq of strings
14:37weavejesterSo (GET "/" [] "Hello") will have a content type of "text/html"
14:37technomancyoh of course; if you care about your content type you won't hit that path anyway
14:37hcumberd`weavejester: I think header case sensibility for headers leads to different behaviour in some browsers
14:37weavejesterBut (GET "/" [] (-> (response "Hello") (content-type "text/plain")))
14:38weavejesterhcumberd`: I'd be interested in knowing which browsers have that bug. If you recall a link, let me know.
14:38borkdudeprobably I shouldn't have used enlive to serve a complete static html file in the first place, but consistency with the other pages made me do it
14:39holois the use of clojure.lang.MapEntry. to create MapEntry still unadvised?
14:40technomancyholo: almost certainly
14:40technomancyjust use a vector
14:40holothanks
14:41Norgelysholoa
14:44hcumberd`weavejester: okay! RFC2616 says header field names are case-insensitive
14:45seangroveIs there a way to comp dotforms?
14:49cemerickseangrove: you mean .foo?
14:49seangroveYeah
14:49seangrove(comp .foo .bar)
14:50cemerickwell, those are sugar for the . special form. comp only works with functions. So, (comp #(.foo %) #(.bar %))
14:50seangroveAs a shorthand version of (comp (fn [x] (.foo x)) (fn [x] (.bar x)))
14:50seangroveyeah
14:50seangroveJust wondering
14:50cemerickyeah, that's the shortest option
14:51cemericka macro could do it more concisely, but would be your own little thing, and have various limitations
14:51seangroveHeh, was just curious, it's not such a big deal
14:52cemerick:-)
14:52cemerickGenerally, the answer to "Is there a way to bar foo?" is 'yes'.
14:52cemerickJust a matter of whether you care enough or not.
14:52seangroveAh, should have qualified, "Is there a built-in, standard way to bar foo?"
14:52technomancythere is memfn
14:54cemerickheh, haven't used memfn in…
14:54cemerickwell, ever, probably
14:54mdeboardhuh.
14:54mdeboardmemfn
14:55llasramIsn't it deprecated?
14:55cemerickNo
14:55technomancyllasram: I think rich hates it but hasn't deprecated it?
14:55technomancynot sure
14:55llasramOk
14:55cemerickCertainly fell out of use once the #() literal came around
14:56hcumberd`cemerick: how can memfn and #() can be compared I'm a bit confused
14:56technomancyI'd personally take one alpha token over two punctuation tokens usually
14:57Chousuketechnomancy: do you ever program in haskell? :P
14:57cemerickhcumberd`: both can produce a function that invokes a Java method
14:57mdeboard`#(into #{} '(x ~(+ 2 1)))
14:57cemerick'course, that's the only thing memfn can do, and not particularly well
14:57technomancy,(macroexpand-1 '(memfn hello))
14:57clojurebot(clojure.core/fn [target__2740__auto__] (. target__2740__auto__ (hello)))
14:58technomancyChousuke: just a touch of ocaml
14:58technomancyhcumberd`: ^
14:58ChousukeHeh. I don't know about ocaml but haskell people seem to love defining new operators.
14:59Chousukeusually with punctuation
14:59nDuffHeh.
14:59Kowboyugggg, Java is so cumbersome to work with
14:59Chousukethen again, some of them are pretty neat.
14:59nDuffRecently had someone coming from Haskell over in #python complaining about not being able to do that
14:59technomancyChousuke: can't be worse than scala: http://www.flotsam.nl/dispatch-periodic-table.html
14:59nDuff(creating new operators)
15:00Chousuketechnomancy: I think the most popular lens library defines half a dozen or so operators
15:00Chousukeor a couple dozen. I haven't counted
15:00hcumberd`Scala is a mutant language for mutants
15:00cemericktechnomancy, Chousuke: of course: http://glyphic.s3.amazonaws.com/ozone/mark/periodic/Periodic%20Table%20of%20the%20Operators%20A4%20300dpi.jpg
15:01technomancycemerick: oh dear
15:01oskarthlynaghk: hmm, doesn't seem to work for me: https://gist.github.com/4218942
15:01technomancycemerick: still, an entire book on an HTTP client?
15:01cemerickI give perl a pass though, because any community that can produce a gorgeous "Periodic Table of Operators" like that is just doing just fine IMO.
15:02cemericktechnomancy: book?
15:02lynaghkoskarth: what's the bit that isn't working?
15:02technomancycemerick: the link at the bottom of the dispatch operator table
15:02Chousuketechnomancy: check out eg. this page http://hackage.haskell.org/packages/archive/data-lens/2.10.2/doc/html/Data-Lens-Common.html :P
15:02oskarthlynaghk: the d CO that's depending on the two COs b and c
15:03oskartham I calling it wrong somehow?
15:03lynaghkoskarth: so not working meaning that if you change b or c the value of d is not updated when you later deref it?
15:03Chousukewhen your operator is "^!+=" you're taking it too far
15:03clojure-newbif I have an indexed map how do I process it to keep the key of each item, and get the count of the value of each item (which is a collection) ?
15:03technomancyChousuke: ouch
15:03hcumberd`technomancy: which OS do you use?
15:03technomancyhcumberd`: debian
15:03Chousukethen again, none of those are strictly speaking necessary so I suppose it's fine
15:03cemericktechnomancy: well, it's only $3 and 23 pages. I'll bet lein's doc could easily fill that space, even if it weren't prettied up for publication. ;-)
15:03lynaghkoskarth: also note that there is a bug in the ClojureScript compiler that breaks reflex somehow; it's fixed in master, but broken after whatever version lein cljsbuild 0.2.7 references
15:03Chousukelenses themselves are pretty awesome
15:03oskarthlynaghk: it's compiling but breaks in the browser
15:04lynaghkoskarth: so see if you still have the problem when compiling with lein cljsbuild 0.2.7.
15:04Chousukethey remind me of common lisp generalized references but are even more general, purely functional, and all around pretty neat :P
15:04oskarthlynaghk: oh I see, could that be it? will try that, thanks
15:04lynaghkoskarth: yeah. give that a shot. If it's still broken, please put the stacktrace or unexpeceted results on the gist.
15:04`fogusAny language that allows me to embed a BASIC DSL right in the middle is fine by me: https://github.com/fogus/baysick and http://hackage.haskell.org/packages/archive/BASIC/0.1.5.0/doc/html/Language-BASIC.html
15:05technomancycemerick: oh ok; not so bad then
15:07AimHereDoes that mean BASIC is okay by you?
15:07cemerickBASIC is definitionally okay
15:09`fogusBASIC is BACK!
15:09`fogusBASIC is BAD (in the good way)
15:09cemerickI want line numbers in Clojure.
15:09cemerickI'll settle for form numbers.
15:09unic0rnO.O
15:09llasramcemerick: (recur-to 12) ?
15:10`fogusI think chouser was playing with something like that at one point
15:10cemerickabsolutely
15:10hcumberd`chat party at tv primetime ;)
15:10cemerick`fogus: of course he was :-P
15:12unic0rni guess line numbers were useful when 8bit machines had line editors, so you couldn't really edit the line without its number
15:12unic0rnclojure with line numbers...
15:12unic0rnabomination
15:12cemerickabomination?!
15:12unic0rnyes! :P
15:13unic0rnrotflmaoshtccomnaiweda
15:13mdeboardwhat
15:13unic0rngoogle
15:13cemerickgoodness
15:13mdeboard,(google)
15:13clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>
15:15amalloycemerick: surely #(apply % %&) is a better gosub?
15:16holoa too-much-time-at-hands-question: which one is more idiomatic? (#' namespace/var) or (#'namespace/var) ?
15:16cemerickamalloy: waitaminute, I don't need a straight-man
15:17hcumberd`,(google "bot supports google)
15:17clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading string>
15:17hcumberd`,(google "google")
15:17clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: google in this context, compiling:(NO_SOURCE_PATH:0)>
15:17hcumberd`;(
15:17cemerickholo: the last one in here that put spaces after quotes is still on the island to which he was banished
15:18cemerick$google rotflmaoshtccomnaiweda
15:18lazybot[Grand Lake Links ACRONYMs] http://www.grandlakelinks.com/AlphabetSoup.shtml
15:18hcumberd`ahh thx cemerick
15:18oskarthlynaghk: cljsbuild 0.2.7 didnt help, stacktrace here: https://gist.github.com/4218942 [using clojurescript 0.0-1450]
15:18cemerickBizarre, that's not the first result
15:18hcumberd`What is %& ?
15:18hcumberd`Is there a reference to the crazy clojure operators such as %2 ,...
15:19lynaghkoskarth: ah, I see what's going on
15:20lynaghkoskarth: the library is totally naive, and you have a diamond in the dependency graph.
15:20lynaghkd depends on c and b, and both c and b depend on a.
15:20holocemerick, do you mean i'm just lucky i also didn't get banished to an island?
15:20cemerickholo: Nah, I'm just trying to fulfill a dare to be as unfunny as possible in channel.
15:21oskarthlynaghk: what's wrong with that?
15:21oskarthif a is changed somewhere I would expect b,c to be +1,-1 and d to be [a+1, a-1]
15:21lynaghkoskarth: some craziness is going on where the system is getting into a loop
15:21oskarthah
15:21lynaghkoskarth: semantically, nothing is wrong with what you're trying to do. The problem is with my implementation (which was, and always will be, a total hack)
15:22holocemerick, thanks for the info (i mean about the spaces)
15:22oskarthlynaghk: do you have any ideas for how to solve this type of problem? we could take a crack at a patch
15:23lynaghkoskarth: well, actually, it's not clear what is going wrong here because no values are actually getting updated.
15:23`fogusI'm disappointed at the poor showing for the word "hammock" --> http://plwords.herokuapp.com/languages/clojure
15:23lynaghklet me take a quick look
15:26holo`fogus, i notice some apps hosted on heroku (probably clojure apps) use that menu bar on the top. is it popular? is it a template with a name for which i can download?
15:28llasramholo: I assume the ubiquitous http://twitter.github.com/bootstrap/
15:28lynaghkoskarth: okay, I fooled myself. The problem is not with both COs depending on the same atom, it's with dereferencing two COs within another CO, which is apparently something we've never run into before
15:29`fogusholo: Looks like a Github pages template to me.
15:29lynaghkoskarth: I don't have time to look into this today, but if you want to open up an issue on reflex I'll take a stab. Or, if you're feeling lucky you can dive into the implementation yourself---it's not terribly complex.
15:29oskarthlynaghk: yeah I see, do you have any ideas why is a problem? we took a short dive into the source code but couldn't find any immediate reasons to why it wouldn't work
15:30oskarthwill take a stab at it regardless, but any pointers you might have would be great :) we are me and cpetzold btw
15:30holo`fogus, this is cool. thanks
15:30lynaghkoskarth: unfortunately, no. that's why this library (and callbacks in general) are terrible---they work until they don't and then it's a nightmare to debug.
15:40hcumberd`why is the clojure community growing so fast?
15:43Rayneshcumberd`: Steroids.
15:43nDuffhcumberd`: ...compared to what? But to throw in my own $.02 -- there are a lot of people who like LISPs for their aesthetics and flexibility, but Clojure is the most practical one for getting useful things done in the real world to have come along for a while.
15:43RaynesI like my non-buzzwordy answer better.
15:44ivanbased on current trends, all of freenode will be in #clojure in a month
15:45RaynesEven the 1000 people in #haskell !?!?!
15:47holothe clojure community is the most friendly
15:47hcumberd`#C++ was so full it wasn't possible to join for a few days
15:48hcumberd`nDuff: compared to for example groovy, grails, vertx, jruby and all the other JVM languages. It is even more in focus than Google Go
15:54oskarthlynaghk: cloning reflex and running the tests I get 'error: no protocol method ISeqable.-seq defined for type number: 1' - is there something else I need to do to get the tests to run?
15:56hologoogle go supports plan 9 ^^"
15:56hcumberd`what is plan 9?
15:57scriptorhcumberd`: http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs
15:58holoi just read it on wikipedia. plan 9 is the next unix, or something. everything is files concept, distributed, name inspired from some bad rated movie
16:00holoi think nowadays, if someone invents a language, the first thing i want to read is
16:00holoanswer to "why????"
16:03hcumberd`Does Plan9 have impact?
16:03hcumberd`I never heard of it before
16:03hcumberd`Wikipedia does not clearify all aspects
16:03hcumberd`microkernel?
16:03hcumberd`What's about google go?
16:04scriptorplan 9 never was used much outside of research
16:05holohcumberd`, if you are interested in distributed operating systems and unix, you will definitely like the ideas behind plan9
16:06hcumberd`holo: srsly plans to support FAT, work to extend plan9 with a google go compiler, last release 2002
16:06hcumberd`"Last stable release 10 years ago"
16:07mthvedta new meaning to the words stable release
16:08holohcumberd`, if you want to use a sort of plan9 in your browser, you can use inferno. i don't know the developments since many years ago
16:08nDuffhcumberd`: Plan 9 has plenty of historical impact, yes -- if nothing else as a well-attended proof-of-concept re: modularity.
16:08hcumberd`In a perfect world GNU hurd has been released two days ago. Minix supports all file systems and is as usable as linux.
16:08hcumberd`+ Clojure will not depend on the JVM anymore
16:09holominix is as usable as linux? who said it?
16:09scriptor"in a perfect world"
16:09hcumberd`'In a perfect world', sure we are not there yet
16:09cemerickHardly anyone would use Clojure if it weren't a hosted language
16:10hcumberd`Do you know what GNU means?
16:10hcumberd`Gnu is Not Usable,... I think
16:10nDuff*plonk*
16:10hcumberd`cemerick: what is your definition of a 'hosted language' ?
16:11holo">.> is this becoming philosophical?
16:11cemerickperhaps
16:12cemerickhcumberd`: One that targets an existing, mature runtime
16:13Raynescemerick: I just realized that when I move to LA we'll be a country apart from one another. I'm not sure I can live with the distance.
16:13cemerickRaynes: I wonder if that means our schedules will make more or less sense to each other?
16:13hcumberd`Raynes & cemerick working for the same company?
16:14RaynesNo.
16:14cemerickClojure, Inc. :-P
16:14hcumberd`;)
16:14amalloyi think it means Raynes will be going to bed when cemerick gets up
16:14cemerickThat happens already
16:14Raynescemerick: About the same, I think. I currently go to bed at 6AM. In LA, I'll go to bed at like 1-2AM.
16:14RaynesIt comes out to about the same.
16:14Raynesamalloy: I already do, pal.
16:15cemerickah, so you're staying constant w.r.t. the east coast
16:15amalloyyeah but it'll just be coincidence, not based on peeking in his window
16:15hcumberd`cemerick: you do not expect linux/bsd/... to be mature, existing runtimes?
16:15Raynescemerick: I *think* it'll just work out that way. Not really doing it on purpose, it'll likely just be the natural rhythm I will fall into given the time I have to get into work and stuff.
16:15cemerickhcumberd`: Intel microcode is a runtime, too? #silly
16:16RaynesWhen I was in LA for that week working at the office I went to bed between 1-3AM and it all worked out fine.
16:16cemerickHas LA gotten better since 1996? That was my last (poor, unfortunately) impression of it.
16:17RaynesI think it depends on where you're looking.
16:17RaynesI was looking at the ocean, the history, and the hills.
16:17holoby the way, i released a fork of korma fixing an ssl lack of support for postgres. this affected heroku users (like me) https://github.com/ccfontes/korma . i posted an answer on stackoverflow, but no one gave me attention :(
16:17cemerickOh, actually, 2001.
16:17cemerickPerhaps I've never seen the nicer parts of LA.
16:18Rayneslancepantz worked really hard to make me excited and happy about the move and he succeeded.
16:18cemerickMy experience of CA has largely been defined by Santa Barbara, which, in general, doesn't have any bad parts.
16:18holoanyway, if someone needs it urgently, it's available on clojars
16:18cemerickRaynes: Yeah, don't let me blunt that. Having locals point you in the right direction is a huge deal.
16:18RaynesHe showed me thinks I had quite literally never seen before, such as an Ocean, or a lighted cityscape at dusk.
16:18Raynesthings*
16:18RaynesIt was all pretty amazing to me.
16:18amalloyhah. isla vista is a pretty amazing bad part, cemerick, at least on friday nights
16:20RaynesI tried to get amalloy to let me room with him but he wasn't have none of it. He is afraid my sexy will tempt him to make bad decisions.
16:20Rayneshaving*
16:20RaynesI suck today.
16:21hcumberd`Is the JVM really a better platform than the OS?
16:21cemerickamalloy: maybe I missed it. What's so hot around UCSB?
16:21hcumberd`Years ago it was really hard to find somebody hosting a jvm for you.
16:22hcumberd`The most people sticked to php and mysql because it was available everywhere
16:23holohcumberd`, i heard that making stable, reliable, mature, efficient compilers takes alot of effort and time, so nowadays, some designers host their languages in some existing runtime for practical reasons
16:23amalloyi'm not sure i understood the question. just that a college town for a famously party-heavy school is a disaster unless you are such a student. i was exaggerating, i suppose, based on being annoyed by them when i was a quiet sort living on campus
16:23cemerickah-ha
16:25hcumberd`holo: clojure->jvm bytecode !! You have to write a compiler, regardless of the underlying parts
16:25cemerickI never spent much time up there. My uncle had a place in Goleta for years, which was very nice, and my grandparents used to live on State St. ~3 miles north of downtown.
16:25cemerickFun times.
16:25gfrederickstechnomancy: regarding my config question from hours ago, thanks :)
16:26gfredericksI know folk around here tend toward the "slurp a config file!" route, but that still seems like a lot of boilerplate every time I do it
16:26Raynesamalloy: You're so quiet. ,3
16:26Raynes<3
16:26cemerickhcumberd`: re: holo's comment, you can include things like JIT, GC, library ecosystems, etc.
16:26amalloycemerick: santa monica reminds me a lot of santa barbara. so at the very least there are good parts of LA
16:27nDuffamalloy: pardon? I was a non-partier at a non-party school, and didn't find such to be troublesome... but then, I'm not sure what the context of that question was. (Perhaps it was a response to something said by someone I have on /ignore?)
16:27technomancyamalloy: as the t-shirt says, there is no life east of PCH
16:27technomancythere's a narrow strip of habitable territory
16:27nDufferr, at a party school
16:28cemerickamalloy: oh, I'm sure. I've just never had the pleasure. :-)
16:28holohcumberd`: yes, "library ecosystems": so why your question: Is the JVM really a better platform than the OS? i think you know the answer before you make the question
16:28hcumberd`JIT, GC,... are also existing and are reusable if you work with C
16:28technomancyC calling conventions are not suitable for a language with GC
16:29technomancyany time you cross the boundary between a managed (pleasant to code in) runtime and C, it's a nightmare
16:29hcumberd`holo: not to use existing libraries seems to be a bad idea so the JVM has impact
16:29cemerickhcumberd`: I think you just went off the reservation :-)
16:29hcumberd`But when you have a look at the average java lib quality you might think about it
16:30hcumberd`Is LISP an alternative to Clojure+JVM?
16:30hcumberd`The library ecosystem seems to be death
16:33gfredericksmy ERC freenode buffer has a bunch of messages from -yuros- from earlier today claiming that everything I said was bullshit?
16:34amalloygfredericks: maybe that's bullshit too
16:34gfredericksI can't handle that much meta
16:34hiredmanit is irc
16:35gfrederickshiredman: I'm not familiar with what it takes to make something appear in the freenode buffer
16:35gfredericksunless you were just joking that everything in irc is always bullshit
16:35hiredman^-
16:36cemerickA good null hypothesis.
16:40aphyrcemerick: Is there an easy way to change the default namespace of nrepl.server/start-server?
16:40cemerickaphyr: default namespace?
16:40solussdb
16:40aphyrI'm embedding an nrepl server in an application and would like to give users immediate access to some utility fns
16:41aphyrBe cool if I could drop them in a special namespace instead of 'user
16:41aphyrDigging through the code, haven't really figured out how that works yet.
16:41amalloypretty sure if you want to give *users* immediate access to functions when in a repl, that's what the user ns is for
16:42cemerickWhat amalloy said. Refer whatever you want into 'user, and you're done.
16:42aphyrRighto.
16:42aphyrWow, lesson learned: do *not* type (ns) at a repl client, haha
16:43cemerickaphyr: FWIW, the 'user default is established for sessions here: https://github.com/clojure/tools.nrepl/blob/master/src/main/clojure/clojure/tools/nrepl/middleware/session.clj#L96
16:44aphyramalloy: managed to hard-lock the whole client, had to background and kill it
16:44cemerickaphyr: (ns) just tosses an exception
16:44amalloywat
16:44cemerickreally
16:44cemerickwhat client?
16:44aphyrlein repl :connect localhost:1234
16:44cemerickwahoo
16:44aphyrIs there a better way? I've also got reply sitting around but it took some classpath munging to start
16:47cemerickaphyr: I can't reproduce. (ns) always "works", even when I connect to an existing endpoint with lein repl :connect
16:48aphyruser=> (ns)
16:48aphyr^CException in thread "SIGINT handler" java.net.SocketException: Broken pipe
16:48aphyr... and now I can't reproduce. Yay state!
16:48cemerickSIGINT?
16:48cemerickSounds like maybe a bit of reply wackiness
16:48aphyrYeah, from my attempt to ctrl-c after it hung
16:48cemerickoh
16:49aphyrImmediately prior, I hit a CancellationException when it tried to print a cancelled future
16:49aphyrWonder if that had to do with it...
16:49pyrfun fact, a (defprotocol) member with the docstring in the wrong place will silently be discarded from the compiled class
16:50pyr(defprotocol Foo (some-fn "i shouldn't be here" [this]))
16:50aphyrpyr: Have you discovered fun with multiple-arities yet?
16:51pyraphyr: i.e ?
16:52aphyrThat defprotocol, defn, and defrecord have different ways of defining multiple-arity functions, and the docstrings go in different orders
16:52pyryup
16:52pyri always mix where the docstrings go, which is how i discovered the silent discarding
16:56llasramaphyr: The different multi-arity methods kind of make sense when you think about which ones are defining Java methods (thus different arity == different method) vs storing a single multi-arity fn
16:56llasramaphyr: I'm not saying its good, but at least you can puzzle it out
16:59technomancyhuh: https://mobile.twitter.com/missingfaktor/status/276423303923654656?p=v scala's .net variant is no longer officially maintained
16:59hcumberd`wow
16:59cemerickThe ML thread is amusing.
16:59cemerickI hadn't really started to think of .NET as "legacy" yet.
17:00technomancyI actually couldn't get to the thread
17:00technomancyyay google groups
17:00brehautwait, MS have given up on .net?
17:00bbloomevn Microsoft is starting to think of .NET is legacy….
17:00bbloomeven*
17:00bbloomit's not going anywhere anytime soon, but C++ and JavaScript seem to be the preferred platforms for win8
17:01hcumberd`C++ is nice ;)
17:01brehautthat has got to be almost hte stupidest choice ever
17:01hcumberd`JavaScript too
17:01bbloomit's a shame really
17:01cemerickI haven't read anything about it, but it seems absolutely unthinkable on the face.
17:01brehautbbloom: im surprised im saying this, but hurrah mono i guess
17:01bbloomback in the disasterous pre-vista days when longhorn was the codename, devdiv warned windows "don't use .net, it's not ready yet"
17:01bbloombut they built a whole OS on .net before it was ready. it was slow and crappy and didn't work at all, burned windows something fierce
17:02technomancyhaha: "Can I do the actual excision. Pleeeeeeeeeeease."
17:02bbloombigger issue was the hilarious overengineering occuring there
17:02bbloombut windows decided to ban .net as a matter of political spite
17:02bbloomso when javascript started becoming such a big thing, win8 decided to pick up javascript as sort of the window org's managed language
17:02hcumberd`bbloom: .net banned from windows?
17:02bbloomnot really banned
17:03hcumberd`damn bad news for all c# people
17:03bbloomthis is a hilarious oversimplification
17:03bbloomthis was YEARS ago
17:03technomancyon the bright side google groups seems to have fixed the "you followed a link to a page using the new UI; that must mean you want your default changed" bug
17:03cemerickright, typescript.
17:03bbloomyeah, so typescript is dev div & microsoft research's play to be able to offer the same c# level of IDE integration/features to javascript
17:03brehauttypescript is actually pretty interesting i think
17:03cemerickgah
17:03bbloombrehaut: yeah, it's actually quite interesting
17:04hcumberd`is typescript the new c# ? ;)
17:04hcumberd`typescript ~ javascript ?
17:04bbloomhcumberd`: not really. javascript is window's c# :-P
17:04brehauttypescript is a superset of javascript but with structural static typing
17:04cemerickhcumberd`: coffeescript + engineering?
17:04bbloomc# (and vb.net) are still great for business apps
17:04bbloomc# is a fantastic language, especially compared to java
17:05bbloomanyway, typescript is definitely interesting
17:05aphyrcemerick: you know what ClassCastException clojure.lang.Symbol cannot be cast to clojure.lang.Namespace indicates, in tab-completion at the repl?
17:05hcumberd`.net is wired ... all the different languanges there VB.net C#.net
17:05cemerickexcept they never got the CLR optimized the way the JVM has been
17:05bbloomthe google closure compiler, which clojurescript targets, has a type system that is embedded in /** comments */
17:05bbloomcemerick: true
17:05cemerickaphyr: sounds like an issue with reply and/or clojure-complete
17:05hcumberd`But all c# programmers can move over to java
17:06hcumberd`the difference is only a little
17:06hcumberd`and W8 should support a JVM
17:06bbloomhcumberd`: not really, the difference is huge when you consider lambdas, expression trees, linq, etc
17:06hiredmanhcumberd`: in the surface syntax
17:06aphyrAlso seeing NoClassDefFoundError Could not initialize class riemann.bin, when trying to tabcomplete (riemann.bin/
17:06hiredmanbut libraries are different, build systems are different, tooling is different
17:06brehauthcumberd`: C# and Java are staggeringly different
17:06bbloomanyway, typescript's compiler is pretty young. it only really provides the type checking. google closure compiler is much richer as a compiler, with dead code removal, inlining, constant folding, closure lifting, etc
17:07hiredmanthe clr and the jvm are very different
17:07hcumberd`I remembered the C# / .net hype,... gah
17:07cemerickbbloom: just a matter of time. I'd welcome some JS optimizing compiler competition, really.
17:07bbloomanyone compiling to javascript should study both GClosure and TypeScript
17:07bbloomcemerick: agreed
17:08bbloomI've been thinking about this a bit because we want to eventaully make CLJS self hosting
17:08technomancythe great thing about JS-to-JS compilers is that you don't have to pick just one =D
17:08bbloomand if that means no JVM, it means no GClosure
17:08bbloomso it would be nice to see alternative type systems for JS
17:08cemericktechnomancy: if you ping-pong 'em, all apps eventually compress to 3kb of high-value unicode
17:08technomancyI wonder how many JS compilers you could chain together before you went insane...
17:08bbloomand compare and contrast them
17:09bbloomtechnomancy: the answer is pretty much ONE, unfortunately…. CLJS->JS is sane and debuggable. JS->Advanced Optimized JS is a nightmare to debug
17:09hcumberd`Now sharepoint is everywhere,... C# is not used to build modules for it, it's javascript right?
17:09bbloomleads to some awkward repl sessions, let me tell you
17:09bbloomhcumberd`: C# isn't going away anytime soon
17:10bbloomhcumberd`: it still has a huge user base for web services and desktop apps in businesses. C# moves copies of Visual Studio
17:10technomancycemerick: once you hit emojis as identifiers you know it's time to take a break
17:10brehautcemerick: thats fine if you dont want to run on node.js which apparently uses UCS2
17:10cemerickbrehaut: heh, yeah, saw that one go by :-)
17:11brehauti guess that wont matter for clojurescript
17:11technomancyit's really a shame how many of the non-tolkien fictional languages are just for unimaginative transliterations: http://www.omniglot.com/writing/fictional.php
17:11technomancyexactly 26 letters, etc
17:12AimHereKlingon is pretty decent in that respect
17:12AimHereBase 10 numbers though, but I suppose Klingons have an unimaginative 10 digits
17:14bbloomfrom the TypeScript site: "Read the specification in doc or pdf"
17:14bbloomentertains me that they even bother with the doc
17:14bbloomheh
17:14brehautbbloom: at my last .net job, i wrote tests for 6 months. in doc
17:15devinusAimHere: is there a better base than 10 for the universe?
17:15bbloombrehaut: like unit tests? or like use case tests?
17:15brehautbbloom: all the tests
17:15technomancyAimHere: yeah, it looks like they did their homework on that one
17:15technomancynobody comes close to Tolkien though
17:15brehautgoing all alan turing and running them on a farm of humans
17:15amalloy10 is the only reasonable base
17:16bbloomdevinus: I think we should invent 6 more digit characters and transition everybody over to hex… but i'll settle for america adopting the kilometer
17:16brehauttechnomancy: being an actual linguist pays of ehh
17:16technomancybrehaut: a linguist with lots of free time =)
17:16cemerickbrehaut: that's pretty awesome
17:16brehauttechnomancy: ah, a professor of linguistics
17:16llasramtechnomancy: Being a linguist (well, I think still philologist, but anyway) definitely appears to increase the quality of the constructed languages you invent
17:17bbloombrehaut: *cringe*
17:17brehautcemerick: it would have been more awesome if the farm of humans was not just me
17:17cemerickThe last job I had had a QA person that ran through two binders of printed tests before each release.
17:17hcumberd`if you create interfaces (html/css/js) how do you do the layout?
17:18brehauthcumberd`: in a pool of tears
17:18hcumberd`What components do you use in general? I've seen the JQuery UI things
17:18hcumberd`brehaut: ;)
17:18AimHerellasram > How do you explain Perl then?
17:19hcumberd`brehaut: table layout + I <3 java.util.Calendar
17:19brehautcemerick: i think i know what the stockholm syndrome feels like
17:19technomancythis one looks legit too: http://www.omniglot.com/writing/dni.htm
17:19hcumberd`Remembering tshirts ;)
17:19cemerickbrehaut: it's particularly pernicious when you're getting paid by 'em
17:19llasramAimHere: Huh. I did not know that. Well. That explains... something?
17:20bbloomone other interesting bit about TypeScript: It exposes "services" for IDEs. C#, VB, and F# are getting comparable services too. these are like clojurescript's analyzer in that you can use them as libraries to understand and manipulate source code. interestingly, however, these are "live" services in that they do stuff like incremental compilation and error recovery so they can provide IDE features while you're working like red squiggly underlines. the
17:20bbloom architecture is probably worth studying
17:21bbloomand, gloriously, the project uses git: https://git01.codeplex.com/typescript
17:22brehauthcumberd`: table layouts are also known as "Im too lazy to actually learn how this technology works, so im going to hack it and then 6 months later when i have an unmamagable pile of excrement, i'm going to go onto twitter and bitch about how bad CSS is"
17:23hcumberd`brehaut: you made my day
17:24bbloombrehaut: CSS is bad… at application layout use cases
17:24bbloomhence the various proposals to fix that
17:24brehautbbloom: oh yeah, dont get me wrong. CSS can be an utter nightmare, but i do get sick of people who never bothered to learn it bitching about it
17:24hcumberd`bbloom: render .png images with the whole page
17:24hcumberd`fixes all layout errors
17:24hcumberd`looks the same in all browsers
17:25bbloomhcumberd`: and it's a perfectly reasonable strategy for a very large number of use cases!
17:25hcumberd`that's the future, I'm sure. Just like windows 2000
17:25cemericks/png/svg
17:25cemerickfixed that for you
17:25bbloomas long as you have copy pastable text over it :-P
17:25Kowboymy WYSYWIG editor is Photoshop
17:25brehautmy wysiwyg editor is nano; i serve all my pages as text
17:26hcumberd`I'll just write XML directly to the browser 4 better user experience
17:26hcumberd`my wysiwyg editor is emacs
17:27brehauthcumberd`: the long version re:layout is that theres no one solution anyone can recommend because it depends hugely on the application. its a case of whackamoling the suck of JS libs to find one that suits
17:27hcumberd`I'm happy with emacs as operating system
17:28holohow can i highlight the exceptions thrown from forms implemented inside the project root?
17:28holoi mean highlight with a color e.g.
17:30nDuffAnyone know offhand if squarepeg supports left recursion?
17:38mthvedtnduff: skimming the source, doesn't look like it
17:38nDuffHrm.
17:39bbloomnDuff: I looked around for a OMeta-inspired parser for clojure and wasn't too happy with what i found
17:39mthvedti don't trust this library… the author thinks pegs are a superset of CFGs
17:39bbloomlots of decidedly un-clojury libraries
17:40mthvedti'm working on what i hope is a clojurey CFG library
17:40jballancsomeone should just port Ian Piumarta's peg/leg to clojure
17:40mthvedti wouldn't recommend it for anything important in its current state however
17:41bbloommthvedt: publish a gist or refheap or something and maybe some folks will give you some feedback on the API
17:41bbloomi was looking for something where the grammar is *just data* maybe with a nice macro on top for the common use cases, but everything seemed extremely applicative style
17:42mthvedtbbloom: https://github.com/mthvedt/clearley#example
17:42bbloommthvedt: looks interesting
17:43bbloomwhy does each line of the rule have an extra set of () ?
17:43hcumberd`How to render nice charts in clojure? Or better in Javascript?
17:43bbloomhcumberd`: lynaghk is working on some stuff
17:44bbloomhcumberd`: he's the clj visualization pro. try his http://keminglabs.com/c2/ project or talk to him about c2po
17:44hcumberd`already available on github?
17:45hcumberd`wow, that's nice
17:45hcumberd`Does clojurescript work well with JQuery/JQueryUI/JQueryMobile ?
17:45mthvedtbbloom: those are parse action bodies
17:45mthvedtoh
17:45mthvedti see what you mean
17:45AimHereFor javascript, there's d3.js, which I think lynaghk originally tried to clojurify
17:45bbloommthvedt: yea, but they seem to always be pairs
17:46mthvedtbbloom: i think i wanted something similar to clojure defn for multiple arities
17:47bbloom'{sum [[sum \+ term] (+ sum term), [sum \- term] (- sum term), [term] term]}
17:47bbloomwhere the commas are new lines
17:47bbloomsimilar to let bindings
17:47bbloomand defrule could just be syntactical sugar
17:48technomancyhuh; I didn't realize the Elm guy works at google
17:48mthvedtthat's more or less what the grammar data structure looks like under the hood
17:48bbloommthvedt: expose the data structure :-)
17:49bbloommthvedt: pegs enable composable grammars!
17:49mthvedthope to do that when i'm done :P
17:49bbloomi want to be able to (apply merge grammars)
17:49bbloom:-)
17:49mthvedtbbloom: pegs are not composable in the sense that if you have grammar g1 describing language l1, and g2 describing l2
17:50mthvedtthat g1 * g2 describes l1 * l2
17:50bbloommthvedt: i know, i was (sorta) kidding
17:50bbloombut if the production names are symbols with namespaces, then you COULD merge them
17:50bbloombut you still need to insert rules to allow embedding the grammars
17:51brehautpltgames.com looks like it could be fun over the holiday period
17:51bbloomso after (apply merge grammars) you could (insert-rule grammar 'lang-a/foo … 'lang-b/bar …)
17:52mthvedtthat's a good idea
17:52bbloomi wasn't at the conj, but somebody told me that the rally cry was "DATA ALL THE THINGS"
17:53technomancybbloom: that wasn't just this conj =)
17:53cemerickI think there were at least four slides with that exact meme on them
17:53clojurebotqcon slides is http://qconlondon.com/london-2009/file?path=/qcon-london-2009/slides/RichHickey_PersistentDataStructuresAndManagedReferences.pdf
17:54cemerickA couple with that odd stick figure with a match as well
17:54bbloomclojurebot: that is a completely unrelated, but entirely useful link
17:54clojurebotAlles klar
17:54bbloomclojurebot: i have no idea what that means.
17:54clojurebotyour idea of vars, symbols, and scoping is wackadoodle
17:54bbloomlol
17:54bbloom~botsnack
17:54technomancycemerick: the author of that comic goes to the coffee shop I usually work from
17:54clojurebotthanks; that was delicious. (nom nom nom)
17:55brehauthaha i fear that one might have been my fault somehow
17:55cemericktechnomancy: oh? I figured it was a 4chan thing
17:56brehautcemerick: is that necessarily mutually exclusive?
17:56technomancycemerick: http://hyperboleandahalf.blogspot.com/ <- grep for coffee
17:56cemerickI am forever hopelessly behind on internet memes and slang.
17:56brehautthats why we have technomancy
17:56bbloomcemerick: http://knowyourmeme.com/memes/x-all-the-y
17:56technomancybrehaut: not memes, just comics
17:57technomancyanyway this place has an espresso blend named after her
17:57brehauttechnomancy: oh. i had just assumed funny pictures in general
17:57amalloytechnomancy: oh, you run into allie at the coffee shop? so she hasn't like, crawled into a hole to die?
17:59technomancyamalloy: I haven't met her yet, I just keep noticing "Allie's Extreme Laser Blend" and the owner mentioned her once
17:59technomancyI did meet the Oatmeal at my other favourite coffee shop,
17:59technomancy(which is almost the same thing)
18:00brehautI have not been to a coffeeshop with multiple blends in a long time
18:00bbloomwell if she lives in seattle, maybe it explains why her blog talks about her being depressed for no reason
18:00bbloomi'm moving out of this city because i just can't take the gray winters any more....
18:01technomancydunno, I got depressed living in LA because it never rained or had clouds.
18:01bbloomheh. are you from seattle?
18:01bbloomi know you live here now
18:01technomancyI grew up in the tropics
18:01brehautsolution: all clojurists should move to new zealand and we can have conj '13 here
18:02technomancyI still really miss warm rain
18:02dsantiagotechnomancy: Where in the tropics?
18:03technomancydsantiago: Indonesia
18:03cemericktechnomancy: surprised you didn't end up in Boston, where every single kind of possible weather can be experienced. :-P
18:03dsantiagoAh. Interesting that Seattle suits you better than LA.
18:04technomancycouple years in LA and I discovered "The Golden State" is a euphemism for "it's mostly brown"
18:04technomancycemerick: but I'm a wimp when it comes to the cold
18:04Raynestechnomancy: You're killing my moving-to-LA buzz.
18:04technomancy3-4 snowy days a year is just perfect for me
18:05technomancyRaynes: it's not so bad if you don't stray more than a few hundred meters from the water =)
18:05technomancycan't afford to do that with a family though
18:05dsantiagoRaynes: As I always say, LA sucks, don't move here.
18:05cemericktechnomancy: Heh, Bostonites are a bit wimpy. Head two hours west or north, then you'll start seeing real winter.
18:05Raynestechnomancy: I plan to live in a Submarine.
18:05Raynesdsantiago: Shush.
18:06technomancydsantiago: it was worse when I was there since the only tech jobs were in entertainment or defense
18:06Raynesdsantiago: You know you want me there. Life is meaningless without me.
18:06brehautseriously guys: new zealand
18:06cemerickIf you aren't accumulating icicles in your eyebrows, you're doing it wrong.
18:06brehautyou can live by the beach for cheap
18:06technomancyI drove across town for a Ruby meetup with a friend and when we arrived there was one other guy
18:06brehautand still be relatively close to snow
18:06dsantiagoRaynes: My point is, the biggest problems in LA are there are too many people here.
18:06RaynesCan't we kick a few out when I get there to make room?
18:07cemerickbrehaut: Sounds nice, but aren't the clamps required to keep from falling off the bottom of the world a drag?
18:07technomancydsantiago: I thought the root problem was the idea that building a city in the middle of the desert could even work?
18:07dsantiagoThat's what you didn't like about LA?
18:07hiredmancemerick: and the expense for helmets to avoid dropbear concussions? forget about it
18:07RaynesLas Vegas works.
18:07brehautcemerick: nah, most of us who were born here develop really strong toes
18:07technomancydsantiago: I was further inland
18:08brehauthiredman: theres a ditch between us and the drop bears; its roughly as wide as cali is long.
18:08cemerickdsantiago: LA has nothing on NYC re: population; whatever problems there are, it can't be that
18:08dsantiagocemerick: Yeah, but Nyc copes with it better with public transport and dense urbanness. LA is a sprawling suburban city of just as many people and the main transport is cars.
18:09hiredmanbrehaut: I choose to believe that the wild wallabies released in to the wild in new zealand have become drop bears through covergent evolution
18:09dsantiagoI mean, NYC has its own problems as well of course. Obviously I prefer LA overall.
18:09brehauthiredman: thats a terrifying thought
18:10nDuff...prefer... LA?!
18:10cemerickhiredman: when I emerge from the wikipedia tour that this dropbear lookup will surely provoke, I shall curse you.
18:10zodiakhey! LA is an awesome city
18:10dsantiagonDuff: Good! Don't move here!
18:10zodiakat least in LA, if people don't like you, you know it. Unlike SF
18:10Rayneszodiak: That's what I'm talking about!
18:10hiredman"Drop bears are commonly said to be unusually large, vicious, carnivorous koalas"
18:10nDuffzodiak: that's true. Can't say I'm a fan of SF either.
18:11zodiakLA is honest, brutally so, jst don't drive and stick near either Venice/Culver City/Santa Monica or out near the foothills (Arcadia etc)
18:11nDuff...last time I hired someone from LA, he took a long vacation after his best friend was killed in a drive-by.
18:11zodiakouch!
18:11cemerickSF appears to be a large dumpster out of which people have built a city.
18:11zodiakyeah.. you don't want to try to drive across town for a job in LA. that's a fair point.
18:12technomancyI have some friends still there who do that, and it's kind of sad
18:13zodiakouch, yeah, I tried to commute between Arcadia and Santa Monica a while back. 2 hours one way (worst case).
18:13zodiaknot good.
18:13dsantiagoYikes.
18:14brehaut◎_◎
18:14brehautmy longest commute has been 40 minutes on foot
18:14brehauti cannot fathom driving for 2 hours a day
18:15muhoocemerick: wow, really?
18:15zodiakbrehaut, well, sometimes it was 4 hours :(
18:15brehautzodiak: i literally cannot fathom that
18:15nDuff(also, flatness, population density, aggressive bike/ped plans...)
18:15dsantiagonDuff: Just moved to LA from Chicago earlier this year.
18:15zodiaknDuff, chicago is not bad, but yeah, you want to live near the workplace. move if you have to ;)
18:16brehautadmittedly the entire population of new zealand is smaller many american cities
18:16technomancyI was on the train an hour each way for a couple years in high school and swore never again.
18:16zodiakbrehaut, it was.. brutal. I won't lie.
18:16technomancyeven then, the train is way better than driving
18:17nDuff...but another 30min would be fine. I mean, some time with reading material / personal electronics is pleasant or productive, depending on what one's doing.
18:18technomancyI could do 30 min if it's a straight shot
18:19technomancytransfers wreck any chance at concentration though
18:19nDuff*nod*.
18:19nDuffA few of the potential post-move job leads I have in mind are telecommute, which would make the commute only to the most conveniently-located coworking space.
18:26technomancynDuff: that's what IRC is for =)
18:26Bergle_1ooh a lighttable update.
18:28ivaraasentechnomancy: an hour each way must have been really painful
18:29technomancyivaraasen: I'm sure lots of people even in here go further
18:32ivaraasentechnomancy: a friend of mine used to commute 1100 kilometers, although not daily
18:32technomancywell when I was in Singapore I literally commuted from one end of the country to the other
18:33ivaraasenintense
18:36ivaraasenI will probably be living 1.5k kilometers from where I'm going to work myself. luckily it's a two-four system, so you get four weeks off after working two weeks
18:39ivaraasennDuff: due to hitting enter and having open parentheses?
18:40nDuffI haven't noticed myself making that mistake.
18:40nDuff...it happens when executing complete, functional lines -- they eval, but print a bunch of whitespace after them.
18:40nDuff...sometimes.
18:44[1]abpCan I somehow find all the ubound symbols in a given body of code with a macro? i.e. (some-macro (let [a 1] (+ a x)) finds x to be not bound in that context.
19:00cemerickmuhoo: really, what?
19:10seangroveWhat's the best way to get a remote repl in cljs?
19:11hiredmanhttps://github.com/hiredman/nrepl-cljs-middleware https://github.com/hiredman/drawbridge-cljs
19:11hiredmandepends what you mean by remote repl
19:13seangrovehiredman: Yes, on reflection, I just meant 'repl' :)
19:13seangroveChecking out drawbridge
19:14brehautafternoon talios
19:14talios'lo
19:16taliosbrehaut - hows the weather your end of the world?
19:16brehauttalios: dark and thunderous
19:17brehautbucketing down? better in orcland?
19:17taliosI have fog and torrents of rain, but no thunder/lightening yet
19:17taliostornado out henderson just ripped up damage
19:17brehauthurrah summer!
19:17brehautfar out, again?
19:18taliosbrehaut - http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10852307
19:18brehautclimate change is a bitch
19:19brehautha
19:19Norgelyshola
19:20talioshail!
19:21brehauthere that americans? you could be missing out on weather like this if you're country had summer now too
19:22holobrehaut, that sound like chinglish
19:22brehautenglish is my first language
19:22brehautim just really bad at it
19:23holooh.. sorry. i thought you were quoting some funny sentence
19:23brehautnope, that was all my failure
19:23brehautas soon as i pressed enter i realised i had written a disaster
19:23holo>.>
19:24seangrove"I had written a disaster"
19:24seangroveVery nice :)
19:25taliosbrehaut - damn, just heard from a co-worker there was a fatality from the tornado
19:25holobrehaut, so that's why the preference for low syntax languages :)
19:25seangroveHrm, I'm in a rhino-cljs repl using nrepl.el - how do I get out of the cljs repl and back to clj?
19:25brehauttalios: shit :(
19:25taliosbrehaut - not public knowledge but was on the fire-radio ( he's a volunteer firedude/marshall whatever)
19:26brehauttalios: well, its on the internet now
19:26taliosDELETE^H^H^H^H^H^H^H^H^Hshit
19:27seangrovecljs.user> :cljs/quit => :cljs/quit
19:27seangroveType `:cljs/quit` to stop the ClojureScript REPL
19:27seangroveNot quite, I think...
19:27brehauttalios: stuff is reporting 2 dead
19:27Norgelyshello
19:29taliosbrehaut - i thought clojure was your first language
19:29brehautlol
19:30cemerickbrehaut: didn't you hear? We get shit like that, then a blizzard the next weekend.
19:30talioscemerick - then move to NZ with us - NO BLIZZARDS!
19:30taliosbliss
19:31brehautwe have snow too
19:31brehautjust not where talios is
19:31taliosdamnit WE HAD SNOW LAST YEAR
19:31brehautwhat, really‽
19:31brehautin auckland?
19:31cemerickYou can't be a flinty New Englander without being thinking that snowshoeing in 0ºF is a good time.
19:31taliostechnically it wasn't snow ( http://www.nzherald.co.nz/nz/news/article.cfm?c_id=1&amp;objectid=10745187 )
19:32cemericktalios: how are things your way?
19:32brehautcemerick: from the part of New Zealand im from we have snow but not snowshoes. its more a case of falling on your arse a lot
19:33cemerickoh, we have that too :-D
19:33Norgelyspor q ablan ingles
19:34cemerickThe first morning after I bought the titanium macbook pro (~2002, I think?), I slipped on my way out to the car and landed on the damn thing. Torqued the case but good.
19:35lynaghkbrehaut: are you still based in New Zealand? I'll be there for all of January and wouldn't mind meeting up with some Clojure folks.
19:35talioscemerick - things are good, just wet :)
19:35brehautlynaghk: talios and I both are
19:36talioslynaghk - awesome - Auckland here - you can join us for a podcast :)
19:36taliosof course - I'll have to kidnap and coerce brehaut into joining as well
19:36brehauthaha
19:36lynaghkbrehaut, talios: I would love to do that! I'll be there (in Auckland) towards the end of December. talios, mind if I email you?
19:37talioslynaghk - sure - mark @ talios.com
19:37brehautlynaghk: end of dec/jan is a pretty busy but id be open to doing something
19:38lynaghkcool! I'll ping you both. Nothing like esoteric programming languages to make new friends around the world =)
19:38taliosI'm heading to Napier end of december and first week of Jan ( back on the 4th )
19:38taliosand back eve
19:38talioseven
19:38brehauttalios: if we could organise something in the CBD its much easier for me to make it as i can just grab a bus both ways
19:38seangroveGetting an error trying to use cemerick's piggieback cljs-repl: https://www.refheap.com/paste/7331
19:39cemerickseangrove: I think that's an old ClojureScript bug. What rev are you using?
19:39taliosany one know if La Clojure has been updated for IntelliJ IDEA 12 at all?
19:39cemerickLa Clojure is deadpooled as far as anyone can tell.
19:40cemerickoh, lookit that, it's on github now
19:41seangroveLet me check... using cljsbuild 0.2.9 which I believe is tied to a specific version of cljs
19:41cemericktalios: Looks like 12 compat is on master: https://github.com/JetBrains/la-clojure/commits/master?page=2
19:41talioscemerick - yeh - coworker just mentioned that, it gets compat updates but no real improvement/features
19:41cemerickah
19:42cemerickwell, perhaps that's where the abandonware impression I've heard about from various people (incl. you now) comes from
19:42brehauttalios: ram is cheap, just run ccw/eclipse as well :P
19:43taliosmmmm, can I run a headless eclipse/ccw via Idea
19:43cemerickbuh?
19:43cemericksounds like eclim
19:43cemerick(which doesn't work on OS X :-(
19:44talioseclim yeh :) I'm sure we could write a IDEA wrapper
19:44taliosoh really? poo
19:44seangroveIs cljsbuild 0.2.9 pretty far behind Clojurescript at this point?
19:45cemerickseangrove: no, but it's not tied to anything
19:45cemerickit uses whatever is set in :dependencies
19:45cemerickI have no idea what its default is though
19:45seangroveAh, so there's a way to easily get cljsbuild to use a different version of cljs?
19:46brehautim not sure i understand what a headless eclipse would be?
19:46cemerickjust as a dependency, as with any other clojure lib
19:46cemerickbrehaut: eclipse that you interop with to drive another environment (e.g. gvim)
19:46clojurebotSomething weird that I noticed: & (use '[clojure.contrib.json :as json]) & &| (json/pprint-json nil) |&
19:46lazybotjava.lang.RuntimeException: No such namespace: json
19:47aamarIs clojuredocs still being maintained?
19:51technomancyaamar: there is work underway on a replacement
19:51technomancyor next-gen version I guess
19:52technomancythe backend is all there but they need someone to do the web UI
19:52muhoocemerick: hatin' on SF?
19:52aamartechnomancy: cool, good to hear. Are they looking for help?
19:52technomancyaamar: I believe so
19:53cemerickmuhoo: SF is okay; just not particularly clean when I was there
19:53technomancyaamar: actually just join #clojure-doc
19:54aamartechnomancy: cool, thanks as always!
19:54technomancysure thing. it would be great to get some movement on that front.
19:54technomancyand to get off rails =\
19:55muhoocemerick: the wind blows litter around, true. but for dirty, i grew up around NYC, and nowhere in california is as dirty as i remember manhattan or da bronx being.
19:55technomancya number of the sidewalks there smell like poo
19:55cemerickwhere, there?
19:55qubit[01]whats SF ?
19:55technomancyin SF that is
19:55muhoodog piss, actually. the last months of summer before the rains start.
19:55cemerickyeah, that was my impression
19:56qubit[01]theres a good joke in here
19:56technomancymuhoo: pretty sure some of it is human =(
19:56muhoooh, heroku office is in SOMA ? :-)
19:56muhooyeah, that'd be human.
19:56cemerickSF reminds me of NYC when we visited there ~1985/86
19:57muhooit doesn't rain all summer. by october, it can get bestial. rains come and clean everything up.
19:57qubit[01], (define bestial)
19:57clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: define in this context, compiling:(NO_SOURCE_PATH:0)>
19:57cemerickManhattan is really wonderful. Never had the pleasure of the bronx, tho.
19:57muhooi see what's going on. tech guys, visiting moscone, SOMA, market st, mission, TL, that's the grimer areas
19:58technomancymuhoo: yeah I don't understand the mindset that makes those go hand-in-hand
19:58muhoocheap rent, i'd suppose.
19:59muhoos/cheap/not-quite-so-outrageous/
19:59technomancymaybe for the really early-stage startups
19:59technomancywhich I guess set the trends for the more established ones =)
19:59muhooexactly. it acquires a hipster patina. if you want the good people, you got to roll with that.
20:00technomancysomeone told me it's the same reason low-slung pants became hip
20:00technomancybecause when you get out of prison they don't give you your belt back
20:00brehautlol
20:00technomancyand everyone wants to emulate the gangsters
20:00qubit[01]bestial, patina - I want to learn from you
20:00muhooqubit[01]: i have nothing on technomancy in terms of erudition
20:01technomancyexcept in SF it's quaffing ramen instead
20:01qubit[01]good lord
20:01technomancyheh
20:01brehaut'ramen' is american for instant noodles right?
20:02technomancyjapanese, actually
20:02muhoobrehaut: http://en.wikipedia.org/wiki/Ramen
20:02brehauttechnomancy: that makes more sense
20:02muhooshit, now i'm hungry
20:03brehautmuhoo: the pictures in that article look like real food. is that what people mean when they talk about eating ramen at startups, or do they just mean noodles and broth?
20:04muhooprobably mean packaged instant version, yes. very, very cheap.
20:04muhoocollege food
20:04muhoosorry, uni :-)
20:04qubit[01]noodles and broth, many a college nights
20:04brehautmuhoo: haha thanks :)
20:05berdarioHello, I'm trying to understand what's the best way to debug code under clojure
20:05berdariosomething along the lines of python's pdb
20:05brehautmuhoo: my first year of uni was largely instant noodle and crap coffee fuelled
20:05berdarioI'm looking at cdt, but it doesn't have any installation instructions
20:05seangroveIs there a way to get this to work? https://www.refheap.com/paste/7335
20:06seangrove(< min value max), given that min or max could be nil
20:06technomancyberdario: if you can work mostly in terms of referentially-transparent functions you don't need a debugger
20:06amalloybrehaut: ramen in america usually means instant ramen, but there are actual reputable ramen restaurants as well
20:06seangroveI could put the three in a list, filter for nil, and then pass it to <, I suppose
20:06technomancythat said, there are definitely times that's not feasible.
20:06berdarioI guess I could try to add it to a project.clj, but this code doesn't have one
20:07technomancyberdario: it seems like ritz is the most polished option for debugging
20:07brehautseangrove: you could apply defaults for :min and :max in your desctructuring
20:07berdariotechnomancy: I need to traverse the stack
20:07seangrovebrehaut: Ah, yes, that's much better, thank you
20:07berdariotechnomancy: thanks, I'll look into that
20:07technomancyberdario: you mean examining locals all the way up? pretty sure ritz does that.
20:07berdariotechnomancy: btw... maybe you can also suggest me a better approach this time
20:07technomancyswank-clojure has it too
20:08berdarioI'm looking at the clojurescript sources
20:08brehautseangrove: also, :keys [min max]
20:08berdarioand I cannot find where closure/-compile is defined
20:08technomancyberdario: sorry; never used clojurescript
20:08berdario(I tried a grep over the whole sources)
20:08brehaut{:keys [min max] :or {min 0 :max 10}} for instance
20:08brehautseangrove: ^
20:09seangrovebrehaut: Ah, perfect, I was just googling for the syntax
20:09seangroveI can never remember the syntax for default arguments
20:09brehauthttp://clojure.org/special_forms#binding-forms ;; seangrove
20:09berdariotechnomancy: ok, but it's still clojure code... do you have any idea of why the declaration might not pop up anywhere?
20:09technomancyit's really not
20:09berdariotechnomancy: clojurescript it's implemented in clojure
20:10seangrovebrehaut: Thanks
20:10berdariotechnomancy: I'm not interested in clojurescript code: I'm interested in the clojure code that compiles the clojurescript code
20:10technomancyyeah, but closure is a javascript compiler
20:10berdariotechnomancy: I know, but there's a closure.clj file... and I can't find a -compile inside of it
20:13arohnertechnomancy: when do you expect the next lein2 release?
20:13technomancyarohner: depends on how long it takes the new clojars releases to get reasonably populated
20:13technomancyI haven't looked at the numbers since the conj
20:14brehauttechnomancy: new clojars is available somewhere?
20:14technomancybrehaut: yeah, no real docs though =\
20:14arohnertechnomancy: oh? the next lein will break people downloading from old clojars?
20:14technomancyhttp://releases.clojars.org/
20:14berdariough, ritz doesn't have any documentation :/
20:15berdariomaybe ritz-nrepl is what I'm looking for?
20:15technomancyarohner: it will change the default, yeah. using the old repo will require explicitly declaring it
20:15brehauttechnomancy: do library developers need to do anything specific to publish to it?
20:15technomancybrehaut: due to some horrible concurrency bugs surrounding sqlite the process is currently manual =(
20:16brehauttechnomancy: its almost like you said SQLite there but i must have misheard
20:16technomancywasn't my idea =(
20:16technomancybrehaut: if you log in and view a jar you own you can either click "promote" or it will show a list of reasons it's not qualified for promotion
20:17brehauttechnomancy: is hall do that then
20:17brehautoh boy. lots of badness
20:17technomancythat'd be tops
20:18brehautim a little surprised that its not pulling me up for having a project with an implicit group id
20:18technomancythat's standard issue for clojars
20:19technomancyit should probably yell at you if you try to promote an org.clojars.* group-id though
20:19brehauttechnomancy: real question is, should i be fixing that
20:19technomancynot unless it's a name that's likely to conflict
20:20technomancyplease don't do this: https://github.com/amitrathore/conjure
20:20brehauttechnomancy: mind if PM you?
20:20technomancysure
20:21muhooyou're running sqlite multi-threaded? :-O
20:22technomancymuhoo: apparently it's not a problem inherent in sqlite, just in the jdbc adapter
20:22technomancyyou can have concurrent access as long as it's from a single process
20:23basicsenseiwhat am I missing when I use :aot [memorystone.s] in project.clj and lein jar includes everything as .class including all project dependencies and every project namespace
20:23basicsensei(with some lein2 from master)
20:23basicsensei(in other words it's like :aot :all)
20:24hiredman:aot is transitive
20:24technomancybasicsensei: the clojure compiler doesn't support AOTing a namespace without AOTing what it requires
20:24hiredmanso anythign you require, or cause to be loaded in some other way (including code from other libraries) will be be emitted as class files to disk
20:25technomancybasicsensei: leiningen includes some mechanism for deleting those after compilation (see `lein help sample`) but there is no way to avoid compiling them
20:26basicsenseialright, so even if I'm not explicitly using the project dependencies in any way in that namespace (in :aot) ie. if I just have (ns memorystone.s) then some prn it will still want to include those dependencies
20:26basicsenseiok I'll take a look at that thanks
20:27taliosreally should add support for automatically cleaning them up to the maven plugin - been meaning to do that for ages
20:27technomancytalios: it breaks pretty wretchedly with protocols and records
20:27hiredmanbasicsensei: no, that should not be the case
20:27technomancytalios: clojure can't fall back to the JITted version of protocols like it can for regular defns
20:27taliostechnomancy - ug *yay*
20:28basicsenseilein help sample shows this line "../../../sample.project.clj"
20:28technomancyI had it on by default for one release and didn't notice it because I don't use protocols; that didn't last long
20:28technomancybasicsensei: uh oh. are you running a release or from source?
20:28taliosyou don't use protocols? interesting
20:28hiredmanbasicsensei: if all you have in the file is (ns memorystone.s (:gen-class)) (def -main [& _] (println "hello world")) it should not generate class files for anything else
20:28taliosjust not of use in what your using, or some other reason?
20:28basicsenseitechnomancy: it's a compiled as .jar master (not latest though)
20:29basicsenseihiredman: I'll (re)check that
20:29technomancybasicsensei: on Windows?
20:30basicsenseitechnomancy: yes
20:30technomancytalios: well I don't have any need for writing polymorphic functions
20:31basicsenseihiredman: I have the feeling that I'm missing a prior lein clean?
20:31technomancybasicsensei: ok, in that case it's a known bug
20:31technomancyshouldn't be an issue on a stable release
20:31basicsenseioh
20:32technomancyor at least, when I do need polymorphism it's not dispatched on the class of the first argument.
20:32basicsenseihiredman: you were right it works as you said, I just had to lein clean
20:35basicsenseiexcellent that's what I was really missing in my first question: lein do clean, jar
20:35basicsenseiwhat I had was leftovers from :aot :all
20:39berdarioI still haven't a debugger
20:39berdariobut I realized just now that I could've done (source closure/-compile)
20:40basicsenseican aot a gen-class implementing a class which has since been recompiled? getting IncompatibleClassChangeError
20:41seangrovehm, how can I have js->clj make keywords from the strings?
20:41basicsenseiie. I have this :implements [org.bukkit.plugin.java.JavaPlugin] but JavaPlugin appears to be newer when my code gets executed, ie. maybe it's not the same one that I had in project dependencies
20:43berdarionrepl-ritz is calling the wrong shell -_-
20:46holorandom remark: it seems a defmulti- there is not :(
20:48brainproxyholo: you can still mark it private, just a sec, finding the syntax
20:49holohi brainproxy! thank you again
20:49brainproxyholo: (defmulti ^:private ...)
20:49holooh, that's cool
20:50basicsenseiawesome
20:50brainproxysame thing can be done with plain def, since there's no def-
20:50hologreatness
21:07basicsenseiare we expected to use clojure classloader to load a gen-class that implemented a java class? I wonder if that's why it fails with IncompatibleClassChangeError or is something else I'm missing
21:20aphyrWhat's the best way to extract a line number from a LispReader$ReaderException?
21:21aphyrAm I really supposed to use reflection hacks?
21:29technomancyaphyr: I think in 1.5 it uses ex-info but no idea before that
22:16gfredericksis 4clojure open-source?
22:17bbloomgfredericks: read the home page
22:17gfredericksthat has got to be my most blatantly unresearched question ever.
22:17brehauthttps://github.com/4clojure/4clojure
22:17bbloomhence the blatant RTFM equivalent response
22:18gfrederickstotally appropriate
22:18jyuhello
22:18gfredericksbrehaut should be ashamed of himself for not being more dismissive
22:18brehautgfredericks: i cant answer the hard questions, so i take what i can get
22:18jyuis it possible to figure out the code coverage along with midje
22:21gfredericksdangit now I need to learn about mongo.
22:22brehautgfredericks: i have a video about that somewhere
22:23muhoohahahaha
22:23muhoosomething about it being web scale?
22:23brehautthat'd be it
22:23brehauttwo bears having an informative discussion
22:23gfredericksthose bears have an awful lot of informative discussions
22:23muhooi weep for the damage that has been done to the reputation of that product by that hilarious video.
22:23brehauthaha
22:24muhooit's probably a really good product. but so hard to take seriously now without willfully putting that video out of my mind.