#clojure log - Feb 23 2012

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

0:10 jaimef: is there an equivalent to ruby .methods?

0:11 * callen tilts head sideways at jaimef

0:11 callen: jaimef: forget everything you knew about Ruby, just learn Clojure as a blank-slate. I recommend getting a book.

0:11 jaimef: ok lets refr

0:12 rephrase without the assumption ofb a common frame of reference

0:12 callen: jaimef: it doesn't port over conceptually

0:12 jaimef: I'm not trying to be difficult, you need to drop the concept of object-orientation entirely.

0:12 jaimef: so no (class []) then?

0:12 callen: jaimef: you can solve some similar problems in some cases, but you need to wipe your mind clean.

0:13 jaimef: no, that's effin' ridic man. Hickey intentionally avoided OO. Just learn it from scratch./

0:13 jaimef: like recur?

0:13 ;)

0:14 in a repl i was looking to see if there was a way to display all functions that can be applied to a specific data type

0:15 emezeske: jaimef: that's going to be a looooooooong list

0:15 jaimef: yeah figured

0:15 emezeske: jaimef: consider this function (fn [x] [x x])

0:15 jaimef: that can be applied to any data type

0:15 jaimef: yeap

0:18 emezeske: jaimef: maybe 'ns-publics' could be helpful? generally the functions that deal with a particular piece of data will be in the same namespace

0:19 ,(ns-publics 'clojure.java.io)

0:19 clojurebot: {output-stream #'clojure.java.io/output-stream, copy #'clojure.java.io/copy, file #'clojure.java.io/file, writer #'clojure.java.io/writer, as-relative-path #'clojure.java.io/as-relative-path, ...}

0:20 cemerick: There's always what's behind findfn…

0:20 $findfn foo :foo

0:20 lazybot: java.lang.RuntimeException: Unable to resolve symbol: foo in this context, compiling:(NO_SOURCE_PATH:0)

0:20 cemerick: er

0:20 $findfn "foo" :foo

0:20 lazybot: [clojure.core/keyword clojure.core/find-keyword]

0:22 jaimef: nice thanks.

0:24 amalloy: emezeske, jaimef: if we were as strongly typed as haskell we could use hoogle, but instead we have findfn

0:24 emezeske: amalloy: yeah, hoogle is great!

0:25 amalloy: because the type of that function would be something like (a -> (a, a)), which tells you a lot; presumably you would have something more specific in mind for "all functions that can be applied to a type"

0:26 emezeske: amalloy: you just reminded me how much I miss haskell's currying :(

0:27 amalloy: go write some haskell, so you can miss varargs instead

0:28 emezeske: touche`

0:28 well that, and I will miss being able to throw in some IO wherever I damn well please

0:28 "no, I'm not going to leave this here and ruin the purity. but yes, I DO WANT A PRINTLN HERE FOR THE MOMENT."

0:31 amalloy: yeah, i never quite understood the IO type/monad/whatever

0:31 (you can tell i didn't get very far in my haskell)

0:32 emezeske: it's pretty cool that your code is proved to be side-effect free, but between that and the pervasive laziness, I find debugging difficult. Maybe that's just due to my "all I need for debugging is println" mindset though...

0:43 lynaghk``: Is there a way to see if something is "applyable"? Basically, (applyable? :key) and (applyable? (fn [x] ...)) should both be true

0:47 amalloy: &(doc ifn?)

0:47 lazybot: ⇒ "([x]); Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn"

0:47 lynaghk``: ah, thanks amalloy

0:48 amalloy: $findarg map % [#() [] {}, 1 true ()] [true true true false false false]

0:48 lazybot: [clojure.core/ifn?]

0:48 lynaghk``: whoa, that's a nice trick.

0:50 amalloy: yeah, i should add a version of findarg that takes a map of [in, out] so you can ignore the map % stuff, and group things together

0:57 pmbauer: exit

2:26 _ulises: morning all

2:26 or evening, depending on your tz

2:29 emezeske: _ulises: Goooooood mornin'!

2:29 _ulises: morning sire!

2:29 emezeske: :)

2:32 _ulises: what's the preferred way of writing tests which include resources in terms of paths?

2:33 e.g. if I want to test a fn such as load-data, I'm thinking of doing (let [loaded (load-data ".....")] (is ...))

2:33 so I'm wondering about the best way of filling in the "..." gap there

2:34 (ideally I'd stay away from things like "../../resources/data.foo")

2:36 emezeske: _ulises: if it's on the classpath (which I think /resources is), you can do (resource "data.foo") maybe?

2:36 _ulises: ah, cool, I was just reading about that

2:37 thank you, oh! distinguished sir!

2:37 emezeske: ^_^

2:41 ibdknox|away: I just made a noir app with a console to modify the app from within itself lol

2:42 it seems a clooj-like env done as a webapp would be pretty easy to build

2:42 emezeske: ibdknox|away: it's noirs all the way down

2:42 ibdknox|away: a black hole ;)

2:43 ~rimshot

2:43 clojurebot: Badum, *tish*

2:43 emezeske: ^_^

2:43 ~(def rumshot "Glug, glug, glug...")

2:43 clojurebot: Pardon?

2:43 ibdknox|away: also, where are you guys such that it's morning?

2:44 emezeske: well, for me it's 12:43 AM

2:44 eeeearly morning :)

2:44 _ulises: for me it's 7:43am :'(

2:44 trying to do some clojure before going to work

2:45 ibdknox|away: yeah I'm PST, so 11:44

2:45 magnars: It's always morning when entering an IRC-channel, ref Universal Greeting Time. http://thinkmoult.com/ugt.html :-)

2:45 emezeske: I'm out, catch y'all later

2:45 _ulises: enjoy

2:45 I like that magnars

2:45 ibdknox|away: lol

2:58 hiredman: repl running on streams backed by a message queue (hornetq) https://github.com/hiredman/vespa-crabro/blob/master/test/vespa_crabro/test/core.clj#L60

3:21 ideally_world: I'm a bit confused around java.clojure.io/reader. Using the first example on http://clojuredocs.org/clojure_core/clojure.core/line-seq works, but if I remove the count, I'm getting an IOException from BufferedReader ensureOpen, but no idea why :(

3:24 amalloy: i haven't looked at your link, but: laziness

3:24 Fossi: yeah

3:24 i get: stream closed

3:24 amalloy: i'm afk, someone else clarify about with-open

3:25 tsdh: amalloy: Yep, I do.

3:25 Fossi: because the count realises the line-seq

3:25 (with-open [rdr (clojure.java.io/reader "/etc/passwd")] (doall (line-seq rdr))) works again

3:26 with-open closes the stream when the execution is leaving it's scope

3:26 ideally_world: yeah, lazy

3:26 tsdh: So the problem is that you leave the with-open (and thus the reader is closed) without realizing the complete seq. If an unrealized item is tried to be consumed later on which will try to read from the reader, that's already closed.

3:26 ideally_world: doall realizes the list

3:26 Fossi: but you have a "dangling end" still having to read from the file for the values

3:27 ideally_world: yeah, getting it now, thanks :)

3:27 Fossi: i hate those issues :/

3:27 it's worse with exceptions

3:27 ideally_world: OK, so have to evaluate the lazy seq in the with clause

3:30 that's subtle, but obvious

5:39 tsdh: Do I see it correctly that extending protocols will always respect the type hierarchy, i.e., I can extend a protocol to Object first as a default, and later to more specific types, and an invocation will always be performed to the most specific definition?

5:56 morphling: tsdh: yes. protocols use dynamic single dispatch, just like java interfaces

5:57 tsdh: morphling: Perfect.

7:46 Does clojure.core/*assert* have anything in common with the -ea JVM option?

7:53 Hm, seems no.

8:17 bsteuber: I love the extensible reader

8:17 can't wait to abuse it

8:18 #infix [3 * x + 1]

8:19 #keys [a b :or 42 c] instead of {:keys [a b c] :or {b 42}}

8:29 clgv: bsteuber: #infix is great from the mathematic point of view

8:31 bsteuber: but I guess one of the guidelines will be "never do reader syntax when a macro just works"

8:34 cemerick: well, it's not really reader syntax

8:34 but, carry on :-)

8:35 bsteuber: sure it doesn't parse strings

8:35 but clj data

8:35 so way better even :)

8:38 and cleanly serializable records comes for free

8:43 since records can hold additional data, we also have roundtripping between different versions

8:43 try that, java guys

8:49 oh the record stuff was already possible before, my bad

8:50 but not with custom formats at least

9:10 jsabeaudry: ,(print (char 2))

9:12 Is there there a name for all the non printable characters (such as \newline) or is (char n) the idiomatic way to represent them?

9:13 All resources I say mention only newline space and tab

9:13 s/say/see/

9:18 TimMc: What is the point of the io! function?

9:18 I mean, I know what it *does*.

9:20 I'm just having trouble understanding where it would get used. println doesn't use it, for instance.

9:20 hoeck: jsabeaudry: only a few of them have names, I'd say (char n) is okay, or unicode notation: \u0008

9:21 jsabeaudry: hoeck, Thanks!

9:21 TimMc: jsabeaudry: I think you'd have to check the reader's documentation and source.

9:22 hoeck: ,(filter #(< 2 (count %)) (map #(pr-str (char %))(range 32)))

9:22 clojurebot: ("\\backspace" "\\tab" "\\newline" "\\formfeed" "\\return")

9:22 hoeck: jsabeaudry: ^ those are the named ones

9:22 TimMc: haha, nice

9:22 jsabeaudry: hoeck, nice trick!

9:38 TimMc: Probably no coincidence that they all begin with their shortform letter.

9:38 \r[eturn], \f[ormfeed]...

9:39 but I suppose the connection is just that the short forms are abbreviations for the canonical long-names.

9:40 raek: jsabeaudry: TimMc: the long names are stored in the char-name-string map

9:40 ,char-name-string

9:40 clojurebot: {\space "space", \backspace "backspace", \tab "tab", \newline "newline", \formfeed "formfeed", ...}

9:42 raek: jsabeaudry: what do you mean by "the idiomatic way to represent then"? the ideomatic way to write them as literals in code?

9:44 babilen: TimMc: Sorry for getting back to you just now, but I owe you my thanks. Your code still had some problems in that it did not behave exactly as split would for strings -- I am using https://refheap.com/paste/806 now and am pretty happy with it. Thanks so much for all your pointers!

9:45 TimMc: In particular (split-at-subsequence [1 2] [1 2 1 2 1 2]) -> () \o/

9:52 pjstadig: ~mascot

9:52 clojurebot: the official mascot of clojure is a futuristic ninja robot

9:52 clgv: &char-name-string

9:52 lazybot: ⇒ {\space "space", \backspace "backspace", \tab "tab", \newline "newline", \formfeed "formfeed", \return "return"}

10:08 tfaro: just wondering...where can i get steroids - I want to learn clojure

10:12 mdeboard: what.

10:12 clgv: tfaro: lol, that's possible without steroids :P

10:12 mdeboard: he left

10:13 clgv: mdeboard: ah. I filtered those messages ^^

10:13 mdeboard: oic

10:13 clgv: a pity my client cant filter the renaming ones as well^^

10:18 ssedano: Hi, how can I print (log) the actual class of a variable?

10:19 clgv: ssedano: via (class v)

10:19 &(let [v 2.0] (println (class v)))

10:19 lazybot: ⇒ java.lang.Double nil

10:35 TimMc: mdeboard: Bah, short-timers.

10:35 mdeboard: lol, indeed.

10:37 Fossi: yeah, this channel tends to be mainly leave and joins if you display them ;)

10:38 mdeboard: At certain times of day absolutely

10:38 I'm sure there's a way for me to turn them off in RCIRC I just don't bother

10:38 clgv: thats why I switched those off^^

10:41 TimMc: A useful feature would be to only show nicks, parts, re-joins, and quits of those who have spoken recently.

10:41 clgv: indeed

10:42 mdeboard: Do you guys all use emacs for irc

10:43 clgv: nope.

10:43 mdeboard: or am I alone a god

10:43 vijaykiran: yup

10:43 TimMc: mdeboard: I recall someone here using ERC

10:44 vijaykiran: I use rcirc - switched from erc

10:44 mdeboard: ya rcirc is great

10:45 vijaykiran: C-c C-i is Omit mode - which keeps the channel clear for me without those join/left noise .. FWIW

10:45 mdeboard: Oh wow

10:45 You are a god

10:45 I tremble before you

10:46 vijaykiran: Wait .. C-c C-o (omit mode) and C-c C-i (ignore the activity) so no modeline indication

10:46 now you can tremble .. for realz :P

10:46 mdeboard: amazing

10:47 ssedano: thank you clgv (sorry I was away)

11:10 micahmartin: I've been researching reader macros. Back in 2008 Rich took a hard stance in not supporting them. What's the verdict these days? Is it possible to define a new reader macro in Clojure?

11:12 `fogus: micahmartin: While not technically a reader macro in the CL sense, the upcoming 1.4 tagged literals get you close

11:12 TimMc: micahmartin: Not in a non-sketchy way, no.

11:12 Technically, you can bust into the reader and do horrible things to it programmatically.

11:14 micahmartin: With clojure.core/print-method it's possible to print new types….

11:14 … but how can I tell clojure how to read in the new types?

11:14 pjstadig: you can't except possibly with the tagged literals in 1.4 as `fogus said

11:14 TimMc: . o O ( precate, is that the opposite of decprecate? )

11:15 s/dec/de/

11:15 `fogus: They look like this: #tag-name <some-valid-clojure-form>

11:15 pjstadig: TimMc: i think it's actually proprecate

11:15 TimMc: micahmartin: There's also the semi-undocumented #=() eval-in-reader form, but people will throw things at you if you use it.

11:16 I would imagine it is going away in 1.4.

11:17 Haha, it is! "You know, the opposite of deprecate."

11:17 "Suggest a new project.clj that's compatible with Leiningen 2."

11:20 micahmartin: ,(read-string (pr-str (java.util.Date.)))

11:20 clojurebot: #<RuntimeException java.lang.RuntimeException: Unreadable form>

11:21 micahmartin: Is there "accepted" way to tell the reader how to read a Date?

11:21 cemerick: TimMc: yup, lein precate is an auto-upgrade tool for project.clj files.

11:23 `fogus: micahmartin: ATM (clj 1.3 and below) people accomplish that via #=

11:23 micahmartin: `focus: thanks… I'll look into that

11:24 `fogus: ,(read-string "#=(java.util.Date.)")

11:24 clojurebot: #<RuntimeException java.lang.RuntimeException: EvalReader not allowed when *read-eval* is false.>

11:24 `fogus: Of course that will not work!

11:24 jsabeaudry: ,(byte 0xff)

11:24 clojurebot: #<IllegalArgumentException java.lang.IllegalArgumentException: Value out of range for byte: 255>

11:24 jsabeaudry: Really java?

11:24 TimMc: jsabeaudry: No unsigned bytes.

11:24 Sort of.

11:25 jsabeaudry: Could do an automatic conversion

11:25 TimMc: &(.byteValue 255)

11:25 lazybot: ⇒ -1

11:25 TimMc: &(.byteValue 256)

11:25 lazybot: ⇒ 0

11:26 jsabeaudry: So basically (byte (.byteValue n)) everytime, might as well shadow byte with that

11:26 TimMc: sure

11:29 (defn ^byte ^:by-hook-or-by-crook byte [^Long x] (byte (.byteValue x)))

11:30 s/lack of refer-clojure and explicit namespaces/fixed/

11:31 mrevil: is there a more concise way to do this: (repeatedly (fn [] (somefn server keyspace "packages")))

11:32 jsabeaudry: using #()

11:32 that shaves off a couple of characters if you are golfing

11:32 mrevil: cool, ty

11:33 dnolen: tscheibl: hey I think we should just fix the unicode issue once and for all, just patching the keyword / symbol is case is not really addressing the issue

11:34 tscheibl: we should use StringBuilder to go over char of a string, replacing chars with values > 127 (I think)

11:34 stuartsierra: TimMc: I don't think that will work.

11:35 mrevil: is there a way to speed up lein uberjar? it takes forever, and I end up calling it frequently to test with hadoop.

11:35 stuartsierra: at least, it won't get you a primitive `byte`

11:35 TimMc: stuartsierra: Because you won't get the inlined RT method?

11:35 stuartsierra: TimMc: More that fns cannot be type-hinted to return primitive `byte`

11:36 At best you'll get java.lang.Byte

11:36 TimMc: hrmph

11:36 jsabeaudry: http://clojuredocs.org/clojure_core/clojure.core/char This says a byte can be coerced to char but thats only true for half the bytes right?

11:37 TimMc: stuartsierra: But if :inline were used, you could get a primitive byte, since it would be a VarInvokeExpr, right?

11:37 stuartsierra: I don't think so.

11:38 There's no IFn interface that returns primitive `byte`

11:38 Only combinations of long, double, and Object.

11:38 TimMc: stuartsierra: clojure.core/byte does it somehow

11:39 stuartsierra: only in loops

11:39 TimMc: Hah, interesting.

11:39 loop locals?

11:39 stuartsierra: yes

11:39 TimMc: Interesting, thanks.

11:39 stuartsierra: np

11:40 cemerick: TimMc: that's inlining at work, if I'm not mistaken.

11:40 TimMc: stuartsierra: It also takes effect for method calls, right? (.takesAByte (byte whatever))

11:41 stuartsierra: um ... yes? I think.

11:41 The fns like `byte` and `int` are weird. In some contexts the compiler treats them like casts.

11:42 But they're also ordinary functions, with all the usual function behavior, including number boxing.

11:55 cemerick: TimMc: Yes, again because of inlining.

12:02 dnolen: TimMc: 'some contexts' aka usage that is not higher order

12:05 fliebel: cemerick: Did you ever get around to publishing raposo?

12:07 I just found your conj 2011 talk, after getting stuck with Udacity. http://blip.tv/clojure/chas-emerick-modeling-the-world-probabilistically-using-bayesian-networks-in-clojure-5961126

12:08 stuck, meaning that I was fine with moving robots, but had a little trouble when it was suddenly about math.

12:25 cemerick: fliebel: not yet; it's in the background at the moment :-(

12:25 humasect: & ?

12:25 lazybot: java.lang.RuntimeException: Unable to resolve symbol: ? in this context

12:25 humasect: & (+ 1 2)

12:25 lazybot: ⇒ 3

12:25 humasect: ohh =)

12:25 i meant, background-process ^_^

12:27 fliebel: cemerick: Just FYI, a whole new generation of "bayesians" is is being taught at Udacity.

12:27 cemerick: heh, that's good!

12:28 * cemerick wasn't aware of udacity

12:28 tufflax: vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

12:28 ops

12:29 fliebel: cemerick: http://www.udacity.com I'm doing their robotics class.

12:30 ATM my mental model of bayesian distributions is aparrently only suitable for moving robots :(

12:30 oh, and determining of the ground is wet.

12:32 tmciver: fliebel: udacity looks cool. Is there a cost to enroll?

12:37 technomancy: mdeboard: M-x rcirc-omit-mode is what you want

12:37 it's the best thing about rcirc IMO

12:37 mdeboard: Yeah that's damn cool

12:38 technomancy: TimMc: yes, precate is the opposite of deprecate

12:38 humasect: apprecate ?

12:38 technomancy: in my made-up logic anyway

12:38 mdeboard: oh wow

12:38 M-x rcirc-cmd-bright is neat too

12:38 pandeiro: is rcirc another irc mode?

12:38 mdeboard: pandeiro: yeah

12:39 pandeiro: i still love erc, i guess one day it will wear off

12:40 technomancy: I went back to erc because rcirc doesn't work well with our private IRC server, but I like rcirc better overall.

12:40 pandeiro: technomancy: way more features?

12:41 technomancy: pandeiro: no, in general it's simpler

12:41 pandeiro: wow, simpler than erc, now i'm interested

12:42 technomancy: 2.4kloc

12:42 anyway, erc silently swallows input in query buffers when the target has gone offline, and rcirc-omit-mode is great for only showing the join/part messages you're interested in

12:43 holy smokes

12:43 erc with all its optional modules is 14kloc

12:44 the core is 5.3kloc

12:46 TimMc: technomancy: "only showing the join/part messages you're interested in", such as for people who have been active recently?

12:46 technomancy: yup

12:46 TimMc: sweeeeet

12:47 technomancy: in erc I just rely on my tab completion, but there are race conditions

12:47 * TimMc fires up Emacs on his tiny home server, watches it fall over

12:48 TimMc: Actually, I'm amazed at how small Emacs' footprint is.

12:48 technomancy: it's like ... eight megs.

12:48 and constantly swapping

12:54 TimMc: Hmm... does using a functional language make for programs with larger state spaces?

12:55 (or at least provide for more potential for that)

12:55 stuartsierra: Smaller state spaces, I'd hope.

12:55 technomancy: it makes the state space "closer to finite"?

12:56 TimMc: There's probably a vocabulary mismatch here.

12:56 I'll go away and think about what I really mean.

12:57 Formalization is hard, let's go shopping.

12:59 fliebel: tmciver: No, free.

13:00 TimMc: Is this the Stanford breakaway?

13:00 fliebel: TimMc: I'm not sure. It has Youtube with maths instead of cats.

13:02 TimMc: I'd be interested in hearing the question, after you finished shopping. It seems related to my experiments with functional games.

13:04 mdeboard: fliebel: Did you see the story on HN today about a lisp interpreter inside some game

13:04 fliebel: http://www.a1k0n.net/2005/11/04/lisp-repl-vendetta-online.html

13:04 fliebel: mdeboard: No! Thanks :)

13:05 mdeboard: Functional language != functional style though. There is little difference between modifying the world, and threading the world trough your functions.

13:05 TimMc: fliebel: Skim through this paper on exploit programming as a study of the formal properties of "weird machines" and maybe you'll end up with the same question: <http://www.cs.dartmouth.edu/~sergey/langsec/papers/Bratus.pdf>

13:06 fliebel: ...with FP in mind.

13:10 fliebel: TimMc: Can you think without FP on your mind? :P

13:11 TimMc: Nope!

13:12 I've been eating, breathing, and dreaming s-expressions for the past week or so.

13:13 fliebel: TimMc: I still don;t get the state space. You mean like a finit state machine?

13:13 mdeboard: &(reduce + (take-while #(> 10 %) (range 183490834)))

13:13 lazybot: ⇒ 45

13:13 fliebel: My skimming was... brief though.

13:14 tmciver: TimMc: Only the past week or so?!

13:14 TimMc: fliebel: Isn't that what a computer is? :-P

13:15 tmciver: The dreaming part is new.

13:15 vinte: hmm -- so strange lein prob -- ive linked my maven to our internal nexus repo

13:15 but that seems to have killed lein's ability to install clojure stuff :(

13:15 how do i get it to look in clojars too?

13:16 technomancy: it will look in clojars as long as you don't have :omit-default-repos true in your project.clj

13:16 fliebel: TimMc: Yea, probably. Then I agree with stuartsierra, I would think a functional program would in general go trough less states.

13:19 vinte: technomancy: i swear i have no such thing in there -- but it doesnt seem to be looking (it complains it cant find it ). It does also complain that it cant find some kind of super-pom

13:19 technomancy: vinte: probably a typo then

13:19 super-pom is just maven-speak for "your project"

13:20 fliebel: TimMc: I think that is also what is causing me trouble with my Clojure game. There are so many states, and you have to be explicit about all of them.

13:22 dnolen: fliebel: have you been following http://oblong-code.blogspot.com/? I curious how he's dealing with these issues

13:22 vinte: technomancy: weird! okay looking into it -- brb

13:22 can i just say im not a maven fan

13:22 pandeiro: fliebel: you've seen this before right? http://prog21.dadgum.com/23.html

13:23 fliebel: dnolen: No. Looking at it now. I did see the prog21 stuff, I'm having an email conversation with that guy now.

13:23 `fogus_away: technomancy: lein-marg070-snap is in the wild. Thanks for the patch

13:23 dnolen: fliebel: he's been working on games off and on in Scala, recently switched to Clojure it seems

13:23 technomancy: `fogus_away: excellent. yesterday I was on a plugins rampage; lots of fun. =)

13:24 `fogus: anyone know if lein run causes odd runtime foibles?

13:24 fliebel: dnolen: Interesting, thanks :)

13:24 technomancy: `fogus: *in* being inaccessable is the main one

13:25 `fogus: "lein trampoline run" solves that as well as a few other issues

13:25 `fogus: E.G. I'm seeing that clojure.core macros are returning false for .isMacro. But I've not yet tracked that cause

13:25 technomancy: I don't think you can pin that one on lein =)

13:26 TimMc: fliebel: There's a distinction to be made between state-as-your-program-sees-it and programs-as-state.

13:26 `fogus: It seems unlikely for sure

13:27 dnolen: fliebel: Nikki and the Robots devs probably have a lot of interesting stories from developing their game in Haskell

13:27 fliebel: dnolen: Another one that's going to be read about later.

13:28 TimMc: You're saying there is more state because the code itself is also state?

13:28 TimMc: fliebel: Right.

13:29 Sort of. It's actually not clear to me at the moment.

13:29 fliebel: TimMc: I don't think any of that is actual state at runtime, unless you tell it to. Like, quoting it.

13:30 TimMc: Read the PDF I linked, or at least skim it.

13:32 I should do the same, to refresh my memory.

13:33 fliebel: TimMc: I skimmed it, but I have to much on my mind to actually let it sink in. I got as much as "werid machine bla bla printf blabla exploit blabla"

13:33 TimMc: heh

13:34 fliebel: dnolen: Do you know if they have any dev blog? The first few obvious google result do not even mention Haskell.

13:34 dnolen: fliebel: I don't think they have a dev blog which is unfortunate

13:34 fliebel: Which is good, marketing wise, as long as you;re not targeting geeks.

13:35 dnolen: Ok, so I'll just have to nag them for information. ;)

13:36 dnolen: fliebel: never a bad idea

13:37 fliebel: dnolen: Oh, I found the source, so I should at least do my own research for a bit.

13:38 vinte: technomancy: certainly not working im afraid -- seems to die on "org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java:360"

13:38 (mvn via eclipse is fine otherwise)

13:48 technomancy: vinte: hm; what exactly is wrong?

13:49 vinte: technomancy: something weird with our internal settings.xml it seems

13:49 if i remove it -- lein works perfectly

13:49 so something screwed up with that, ill try and figure it out. Thanks for your help :)

13:49 technomancy: sure; hope you get it figured out

13:56 lpetit: I have a java interop call to make. On the java side, the expected argument is of type Map<String, Integer>.

13:56 How do I do the interop call?

13:57 I mean, when I do (.interopMethod {"key" SomeJavaClass/SOME_CONSTANT_INTEGER_FIELD}) it fails miserably on the javaside

13:57 cemerick: vinte: maven-ant-tasks (which lein 1.x uses) does not play nice with server authentication (or is it mirror configuration?) in settings.xml

13:58 right; I need to remove my usual <mirror> config to use lein 1.x

13:58 lpetit: with an exception like "Expected Integer, got Long"

13:58 Some method in the Eclipse framework does: java.lang.IllegalArgumentException: "The attribute value type is java.lang.Long and expected is one of java.lang.String, Boolean, Integer"

13:58 cemerick: lpetit: (Integer. SOME_CONSTANT_INTEGER)

13:58 lpetit: oh yes !

13:58 amalloy: lpetit: that should be fixed in the 1.4 betas, as well as cemerick's suggestion

13:59 lpetit: thx guys

14:01 amalloy: (just tested; it is indeed fixed in 1.4 beta1, if not sooner)

14:05 lpetit: ok great news,

14:47 duck1123: didn't there used to be a way to have leiningen install shell scripts? Is that still supported, or is it best to just make everything as a lein plugin?

14:47 technomancy: duck1123: it's supported in lein1; hasn't been implemented in lein2 yet but is planned

14:47 interested in hearing your use case though since afaik it's hardly used at all

14:49 duck1123: I'm thinking of making a simple script that does little else than send a command to a remote server. I have it as a plugin now, and was considering if I wanted it as a standalone script

14:49 technomancy: duck1123: note that these scripts still require leiningen installed, which is probably why they are not used very widely

14:49 malkomalko: hi guys, I'm migrating an app to 1.3 from 1.2, and am doing research on the clojure.contrib packages. did any of the clojure.contrib.string packages get moved or are they gone?

14:49 technomancy: malkomalko: clojure.string mostly, but arities have changed, so beware

14:49 malkomalko: I checked http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go but didn't find anything

14:49 ok

14:50 technomancy: malkomalko: probably because that was moved in the 1.1 -> 1.2 transition

14:50 duck1123: the only thing I could see it gaining me is not having to type "lein " but I couldn't find any docs on that part, so I asked

14:50 malkomalko: got it

14:50 technomancy: duck1123: swank-clojure is the only thing that uses it afaict

14:50 TimMc: malkomalko: It is listed in the text at the top -- the migration happened before 1.3.

14:50 technomancy: not 100% sure it should be moved to lein2 to be honest

14:51 duck1123: I think I'll keep everything as a plugin

14:51 malkomalko: ahh thanks timmc

14:51 duck1123: I can always alias it if I'm feeling particularly lazy

14:51 malkomalko: I did a search in my browser for string but it didn't pop up for some reason

14:52 TimMc: malkomalko: Confluence captures "/" if you tried using quicksearch in Firefox.

14:52 Scumbag CRM, keeps you from searching within the page.

14:53 malkomalko: yup.. oh well

14:53 :)

14:53 thanks anyway guys, I'll play around with it

14:53 TimMc: *CMS

14:54 duck1123: There's no such thing as a dev-checkouts, is there? I have a project that is a dependency of my plugin. When I update that dependency, I still have to re-build the plugin and deps the project that uses that plugin, despite all of them being in my checkouts dir.

14:54 technomancy: duck1123: symlink into ~/.lein/plugins works

14:55 TimMc: symlink to plugin's project dir, which then has a checkouts dir?

14:56 technomancy: oh, no that won't work transitively unfortunately

15:01 tjgillies: man 'lein dep' is so much easier than bundler

15:07 duck1123: but symlinking your plugin project directory inside ~/.lein/plugins should work? I've done that, but am not seeing my task.

15:08 technomancy: duck1123: sorry, it should be a symlink to the src/ dir of your plugin

15:47 osa1_: where can I find JAR of this: https://github.com/rosado/clj-processing ?

15:53 duck1123: osa1_, http://clojars.org/processing-core/processing.core

15:54 so if you actually want the jar, http://clojars.org/repo/processing-core/processing.core/1.0.0-SNAPSHOT/ grab the latest

15:56 osa1_: duck1123: I think what I need is clj-processing, not processing

15:56 duck1123: technomancy, are you aware of the issue where if a plugin requires a project that requires ant that lein deps will fail every other time? I see several related closed issues and am not sure if I should open another one.

15:56 osa1_, that's what the readme file directs you to

15:58 osa1_, although it looks like the readme directs to 0.1.0, so I'm not sure which version is best

15:58 cemerick: weavejester: lein-ring uses clojure.contrib.prxml, but doesn't declare it in its project.clj…?

15:58 * cemerick confused

15:58 Kowboy: technomancy, ymacs inside of emacs? WHY?...macs.

16:00 weavejester: cemerick: Yeah, it's an error I need to fix, but I've been putting it off a little because an independent prxml looked like it was just around the corner.

16:01 * TimMc gets out the Repeatability Stick

16:03 cemerick: weavejester: OK; I was going to take a whack at making it lein2-ready

16:04 * cemerick wonders if hiccup would work well enough for web.xml generation?

16:04 aaelony: what's the best way to convert a java.sql.Date to something clj-time can use?

16:05 brehaut: aaelony: clj-time.coerce i think has some stuff for that

16:05 weavejester: cemerick: Probably, but… bleh, it feels like the wrong tool for the job.

16:05 cemerick: *shrug*

16:05 weavejester: java.sql.Date inherits from java.util.Date I believe.

16:05 aaelony: brehaut: cool, I'll check it out (absent other comments)

16:06 cemerick: anyway, there's about 114 libraries that produce XML.

16:07 duck1123: and many of them are wholly incompatible with the others

16:07 cemerick: weavejester: shall I leave it be, or would you be open to a patch to make it lein2-ready?

16:07 (not that I know what the changes might be right now)

16:09 weavejester: cemerick: I'd like to avoid Hiccup, because I'd like to change some of the namespaces before version 1.0.0, and that's a little difficult if older versions are dependencies of existing libraries.

16:10 cemerick: that's fine; I'm not attached to any particular approach

16:10 weavejester: cemerick: I guess with lein-ring most of my attention has been thus far focused on getting the new :plugins bit working.

16:10 Which probably comes under the "lein2" compatibility umbrella.

16:10 cemerick: definitely

16:11 if you're already working on it, I certainly won't get in your way :-)

16:12 weavejester: cemerick: If you have any good suggestions for XML generating libraries, I'm all ears :)

16:12 cemerick: weavejester: if not hiccup, just using the fork of prxml that lein2 is using might be reasonable?

16:13 it's totally an implementation detail, so it seems a stopgap is reasonable there

16:15 weavejester: cemerick: Oh yeah, that's a good idea. At least until it appears in the official clojure repos.

16:20 cemerick: Actually, let me sort it out now.

16:28 technomancy: duck1123: yeah, it's tracked in https://github.com/technomancy/leiningen/issues/420

16:30 duck1123: technomancy, ok. I didn't see that one. (was searching for 'ant') I won't open a dupe then

16:30 technomancy: cemerick: implicit dependency on lein's own dependencies was actually totally kosher in lein1

16:32 mdeboard: What's the third argument to (nil?)

16:32 &(nil? {:a nil :b 1} :a 1)

16:32 lazybot: clojure.lang.ArityException: Wrong number of args (3) passed to: core$nil-QMARK-

16:32 mdeboard: wat

16:32 aaelony: is there a freenode channel for Incanter? I'm in, but see no one there...

16:33 weavejester: technomancy: Nice to know it wasn't a mistake in lein1 :)

16:33 mdeboard: &(nil? ({:a nil :b 1} :a 1))

16:34 TimMc: mdeboard: nil? is only taking one arg there

16:34 mdeboard: Yeah

16:35 misread a solution on 4clojure

16:35 TimMc: hah, OK

16:35 cemerick: technomancy: well, weavejester can just add the same dep to lein-ring anyway, whether implicit dependencies are kosher or not now :-)

16:35 weavejester: Is it my imagination, or was prxml slated for one of the clojure core repos?

16:36 technomancy: cemerick: yep, definitely good to be explicit in this case

16:36 weavejester: I thought data.xml, but that's for emitting clojure.xml-style data.

16:36 TimMc: technomancy: Wouldn't implicit deps fail for lein trampoline?

16:37 cemerick: weavejester: not according to http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go

16:37 BostX: guys do you know how to use 'apply' or 'map' together with a java constructor? I wanna do something like:

16:37 (new #(new Double) [0.1])

16:37 technomancy: TimMc: implicit deps of plugins shouldn't affect trampoline

16:37 BostX: I meant: (map #(new Double) [0.1])

16:37 TimMc: technomancy: The same classpath is used?

16:37 technomancy: TimMc: leiningen's classpath is totally orthogonal to the project

16:37 weavejester: cemerick: Huh.

16:37 TimMc: BostX: Your fn literal needs an arg

16:38 BostX: TimMc, ???

16:38 lazybot: BostX: Oh, absolutely.

16:38 weavejester: I guess data.xml would be okay

16:38 TimMc: BostX: #(Double. %)

16:38 BostX: TimMc, Ok... and if I have a constructor with more that 1 parameter?

16:39 TimMc: BostX: I recommend reading clojure.org/reader

16:39 BostX: TimMc, neither #(MyConstructor % %) nor #(MyConstructor %1 %2)

16:39 TimMc, works

16:39 TimMc: BostX: That's because you forgot the "." after the constructor name

16:40 technomancy: Oh, duh -- you're talking about plugins.

16:41 BostX: TimMc, no not really, i tried both: '.' and 'new' (it was just a typo here on IRC)

16:43 TimMc: BostX: That's why it's important to show the exact code that failed! You should be mapping over multiple collections at a time to get multiple args into that fn.

16:44 BostX: TimMc, OK :)

16:44 TimMc, (let [foo (map #(com.jjoe64.graphview.GraphView$GraphViewData.) [1 0.4])])

16:45 TimMc, and the compiler gives me: Exception in thread "main" java.lang.IllegalArgumentException: No matching ctor found for class com.jjoe64.graphview.GraphView$GraphViewData (MyFile.clj:89)

16:45 TimMc: &`#(Double.) ;; let's look at what happens when you don't put %1 etc. into a fn literal

16:45 lazybot: ⇒ (fn* [] (java.lang.Double.))

16:45 TimMc: ^ nullary functions

16:45 and in your example code, you're not passing that constructor any arguments

16:46 &(map (fn [a b] (+ a b)) [1 2 3] [300 200 100])

16:46 lazybot: ⇒ (301 202 103)

16:47 TimMc: BostX: The arity (number of params accepted) of the function you pass to map has to match the number of collections you pass to map.

16:50 BostX: TimMc, the constructor hast 2 parameters:

16:50 TimMc, this works: (let [foo (com.jjoe64.graphview.GraphView$GraphViewData. 1 0.4)])

16:51 TimMc, as I told you I just don't know how is the proper syntax if I want to use 'map' or 'apply'

16:52 TimMc: Well, look at my examples above.

16:54 BostX: TimMc, negative. this does not work: (let [foo (map (com.jjoe64.graphview.GraphView$GraphViewData.) [1] [0.4])])

16:54 TimMc, this neither: (let [foo #(map (com.jjoe64.graphview.GraphView$GraphViewData.) [1] [0.4])])

16:55 * BostX bloody syntax :(

16:56 tmciver: BostX: You're forgetting the %1 and %2 . . .

16:56 BostX: TimMc, tmciver ... hmm ok, I try %1 %2

16:57 TimMc: BostX: There's no magic -- figure out how the examples I gave you work, then apply your newfound knowledge.

16:57 BostX: TimMc, tmciver aaaaaa!!! this works: (let [foo (map #(com.jjoe64.graphview.GraphView$GraphViewData. %1 %2) [1] [0.4])])

16:58 thx guys!

17:00 Wraithan: https://github.com/wraithan/zenircbot-clojure/blob/master/src/zenircbot_clojure/core.clj -- Could I get this code critiqued a bit?

17:00 First app written in clojure

17:03 BostX: Wraithan, what zenircbot does?

17:03 muhoo: com.jjoe64.graphview.GraphView$GraphViewData ? wow that's ugly

17:03 BostX: muhoo, do u know anything nicer?

17:04 muhoo: no, but there has to be one, i'm sure.

17:04 what's with the $?

17:04 BostX: muhoo, what do u mean with $ ?

17:04 Wraithan: BostX: It is an IRC bot that uses separate services that it communicates with over redis using pub/sub for functionality. That way the core bot can stay alive and services (similar to plugins in most IRC bots) can be stopped, started, and vice versa

17:04 muhoo: GraphView$GraphViewData, the $ in the middle of there

17:05 Wraithan: BostX: http://zenircbot.readthedocs.org/en/latest/services_devel.html#service-model

17:05 brehaut: muhoo: thats part of javasc class name munging; inner classes get a $ as a seperator (for instance)

17:06 miltondsilva: Hi, how does one translate this java code to clojure? http://pastebin.com/N9Msm9gX

17:07 BostX: muhoo, if you have class A { ... class B { ... }} it compiles to A$B.class

17:08 morphling: miltondsilva: ##(doc proxy)

17:08 lazybot: ⇒ "Macro ([class-and-interfaces args & fs]); class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor. f => (name [params*] body) or (name ([params*] body) ([params+] body) ...) Expands to code which cre... https://refheap.com/paste/808

17:08 amalloy: blargh

17:08 miltondsilva: morphling: thanks ;)

17:08 amalloy: reify rather than proxy if at all possible (and it almost certainly is)

17:09 muhoo: BostX: ok makes sense. java stuff.

17:09 miltondsilva: reify it is ;)

17:10 BostX: milkpost, or you could use proxy but: reify can only implement interfaces. It cannot exted classes (proxy can); reify is directly supported by the host platform

17:10 morphling: oh, yes, reify, if it's an interface, proxy if it's an abstract class

17:11 amalloy: and that looks like apache; they usually use interfaces when it's possible

17:12 miltondsilva: this library is using apache... but it's called jung and that type of ugly think is needed to interact with it

17:12 thing*

17:14 BostX: muhoo, BTW I find com.jjoe64.graphview.GraphView$GraphViewData quite Ok... for the start

17:26 m0smith: what templating language would you recommend for a web app?

17:26 ibdknox: m0smith: depends on the team

17:26 Raynes: I'm pretty fond of mustache.

17:26 ibdknox: and the scope

17:26 Raynes: A lot of people find Enlive to be to their liking.

17:27 * TimMc whistles nonchalantly

17:27 Raynes: Others use hiccup, which is write-html-in-clojure-instead-of-html.

17:27 technomancy: if you aren't working with a designer, I'd use hiccup

17:27 duck1123: I tried using soy templates and found it too much work and went back to hiccup

17:27 ibdknox: +1

17:27 technomancy: it's basically impossible to screw up

17:28 m0smith: I would rather not write html in clojure

17:28 ibdknox: hiccup or stencil

17:28 m0smith: I'd use stencil then (mustache-based)

17:28 rplevy: is there an alternative repo for zookeeper? the maven central one seems to have problems. I don't know exactly what. Lein (maven) downloads it and then reports it being missing.

17:29 muhoo: Raynes: weren't you moving refheap to enlive?

17:29 ibdknox: heh

17:29 muhoo: or did that not work out so wel?

17:29 well?

17:30 brehaut: muhoo: careful there, hes bitter about that

17:30 muhoo: sorry

17:30 ibdknox: *chuckles*

17:30 Raynes: Mustache and Enlive are both excellent for teams with designers who aren't developers.

17:30 Because you can keep the HTML separate from the code.

17:30 Some people just have TimMc write their html for them.

17:30 I'm favoring that solution lately.

17:30 Haha

17:30 muhoo: I went with mustache.

17:31 muhoo: thanks, good to know.

17:31 Raynes: I had a bug in Enlive and was in a hurry.

17:31 Plus, Mustache just feels like a better solution for how RefHeap is designed.

17:31 muhoo: believe me, the purpose of most of mmy life has been to serve as a warning to others

17:31 Raynes: I see how Enlive is so well-liked though -- it would be excellent if you built from the ground-up with it or for scraping and stuff.

17:31 muhoo: so if you went with enlive, and found out it is... not what you wanted, that's very helpful to know.

17:32 * muhoo looks at moustache

17:32 Raynes: Yeah, that's generally how it worked out.

17:32 There was some cursing and stuff mixed in there too.

17:32 brehaut: some. heh

17:32 * brehaut <3 enlive

17:32 muhoo: if i got bitter about every blind alley i took, wasting years of my life and tens, even hundreds of thousands of dollars, i'd have kille myself decades ago

17:32 ibdknox: muhoo: http://mustache.github.com/mustache.5.html

17:33 m0smith: thanks for the input

17:33 ibdknox: the clojure impl to use is stenvil

17:33 stencil*

17:33 Raynes: And the reason it is the impl to use is because dsantiago is a nut about performance and you can rest assured he has made it as fast as possible. :p

17:33 * Raynes will be back shortly.

17:34 muhoo: i've seen this before i think, maybe in ruby

17:34 ibdknox: it's used in many languages

17:34 technomancy: problem is moustache is also a routing lib in clojure

17:34 muhoo: that's why i was confused when you said moustache!

17:35 yes, i thought moustache was an alternative to compojure

17:35 m0smith: what about something like velocity?

17:35 brehaut: muhoo: it is

17:35 but its a different moustache

17:35 muhoo: name collision! call the police.

17:35 ibdknox: mustache

17:35 not moustache

17:35 muhoo: must ache

17:35 brehaut: hah yes

17:36 clojure is the salvidor dali of programming languages: many moustaches to choose from

17:36 muhoo: moustache and mustache must exchange insurance information, license, and registration.

17:36 weavejester: A while ago I wrote Comb, a fast ERB-like templating language.

17:37 It has only two followers on the GitHub repo though, so it's not well known!

17:38 ibdknox: weavejester: huh.. do you use it?

17:38 muhoo: brehaut: http://www.youtube.com/watch?v=iXT2E9Ccc8A

17:38 weavejester: ibdknox: I wrote it for creating project skeletons generation

17:38 ibdknox: I see

17:38 weavejester: ibdknox: But I haven't got around to writing the plugin that was going to use it :)

17:38 ibdknox: haha

17:39 weavejester: lol that's so simple... well done

17:42 dnolen: tscheibl: that patch look nice, will give it a spin soon.

17:42 tscheibl: tscheibl: ok :)

17:43 talking to myself again...

17:43 dnolen: ok :)

17:46 rplevy: is there something like repository-exclusions for lein? looking for it in the source...

17:47 dsantiago: Funny enough, when I was writing stencil, the placeholder name was dali.

17:47 Also, I love you guys *so much*.

17:50 technomancy: rplevy: lein help sample | grep exclusions

17:52 m0smith: stencil or clostache?

17:52 tmciver: technomancy: Ahh, didn't know about sample; it's not listed with 'lein help'

17:52 technomancy: uh oh; it should be

17:52 m0smith: The mustache site refers to clostache

17:52 technomancy: tmciver: yeah, it is in 1.7

17:52 ibdknox: m0smith: stencil

17:53 m0smith: ibdknox: porque?

17:53 tmciver: technomancy: oh yeah, under the 'see also' part.

17:53 my bad

17:53 technomancy: tmciver: lein2 will let you do "lein sample" with partial aliases

17:54 ibdknox: m0smith: it correctly implements the mustache spec, fewer bugs, and better maintained

17:54 dsantiago: m0smith: Not an unsore spot for me!

17:54 tmciver: technomancy: I haven't been following the lein 2 dev that closely; what's partial aliases?

17:54 m0smith: compujure I assume then

17:54 technomancy: tmciver: it's like partial application, but for aliases

17:54 dsantiago: http://librelist.com/browser//mustache/2011/5/25/mustache-in-clojure/#59e582f3c353c5b9a6eb766eb0bc028c

17:54 technomancy: (partial my-function "argument1")

17:54 etc

17:55 tmciver: technomancy: but that works with lein plugins somehow?

17:55 technomancy: yeah, works for any task

17:55 ibdknox: m0smith: huh?

17:56 m0smith: dsantiago: thanks. I will give it a look

17:56 tmciver: technomancy: so you mean if a task takes several 'args' you can do a partial with some of the args?

17:56 technomancy: :aliases {"launch" ["run" "-m" "myproject.main"]} ; in project.clj

17:56 yup

17:56 m0smith: ibdknox: for some reason it came out in spanish: porque == why

17:56 technomancy: it's the leiningen 2 feature about which I am the most unreasonably excited

17:56 ibdknox: lol

17:56 I know, and I answered you

17:57 tmciver: technomancy: ha! cool.

17:57 weavejester: technomancy: Oh, you're putting in aliases then?

17:57 technomancy: weavejester: aliases in defproject, yeah

17:57 muhoo: how would a partial alias work?

17:57 weavejester: technomancy: Ah, awesome

17:57 m0smith: ibdknow: oh. I assume compojure is the way to go for a web application

17:57 tmciver: technomancy: are there docs for lein 2 yet?

17:58 weavejester: m0smith: ibdknox would probably recommend Noir ;)

17:58 technomancy: tmciver: the readme, plugin guide, and tutorial are upgraded

17:58 ibdknox: haha

17:58 technomancy: tmciver: the sample project.clj isn't, and I'd like to have a general "upgrading" doc beyond just lein-precate

17:58 ibdknox: weavejester: probably ;)

17:58 technomancy: muhoo: see above with "launch"

17:58 callen: is there a Clojure web framework that doesn't by default inline templates into the code/controllers and instead uses templates like Django or Rails?

17:59 ibdknox: m0smith: http://webnoir.org/

17:59 callen: you can do that with Noir?

17:59 callen: that is, the template shouldn't be a bunch of Clojure macros, it should be textual HTML getting injected.

17:59 brehaut_: callen: most of then ?

17:59 callen: most of what I saw was Compojure-esque

17:59 Kowboy: I haven't used Noir for anything other than to experiment, but I liked it

17:59 dsantiago: You can usually use whatever templates you want.

17:59 weavejester: m0smith: Noir is probably better if you're just starting out - Compojure is a little less structured.

17:59 callen: the examples seemed eager to come off as clever.

17:59 ibdknox: callen: ?

17:59 simonadameit: hey

18:00 weavejester: I don't think any Clojure web framework mandates a template framework.

18:00 simonadameit: i've got a question regarding the range function

18:00 ibdknox: except maybe conjure?

18:00 tmciver: technomancy: but the stuff at https://github.com/technomancy/leiningen is for lein 1.7?

18:00 ibdknox: I don't remember

18:00 callen: ibdknox: http://webnoir.org/ Your examples are all using Compojure or returning raw text.

18:00 weavejester: ibdknox: Yeah, I was thinking about that too. I'm not sure.

18:00 technomancy: tmciver: just the installation instructions

18:00 dnolen: simonadameit: you can always ask away

18:00 simonadameit: how do I specify a start, but not the end of a range (i.e. infinity)

18:00 technomancy: tmciver: everything else on the master branch is 2.x

18:00 ibdknox: callen: I think you're confused as to what compojure is :)

18:00 tmciver: technomancy: ah, OK

18:01 weavejester: callen: Do you mean Hiccup? Compojure is a routing library. Hiccup is a HTML-generating library

18:01 ibdknox: callen: that's hiccup, and I would argue hiccup is very clear, not clever

18:01 callen: either way though, you get to use whatever you want :)

18:01 callen: sure, but that's besides the point.

18:01 a designer can't write clojure

18:01 dnolen: simonadameit: (range start)

18:01 simonadameit: i tried (range 1 :infinity) but that barfs :(

18:01 technomancy: hiccup is way obvious

18:01 callen: I need to be handle to hand off data to a relatively plain HTML template and have a designer wrap around that.

18:01 designers *cannot* code.

18:01 dnolen: simonadameit: many functions have multiple aritys

18:01 ,(doc range)

18:01 technomancy: callen: if you want designers writing the html, you want enlive

18:01 ibdknox: callen: sure, stencil, comb, enlive, whatever

18:01 dsantiago: callen: So have your pick from enlive, tinsel, mustache… what else?

18:01 simonadameit: dnolen: yeah, but _end_ is the first argument according to the doc

18:02 clojurebot: #<ExecutionException java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class clojure.lang.RT>

18:02 brehaut_: callen: to be fair to designers, a lot of so called programmers ive met couldnt either

18:02 emezeske: callen: wow, that's not a sweeping generalization

18:02 technomancy: if you want to decide on the structure and have the designers just handle styling, hiccup is fine

18:02 callen: technomancy: that's still in Clojure.

18:02 emezeske: I'm talking about my specific circumstances.

18:02 technomancy: o_O

18:02 simonadameit: dnolen: in case you give only one argument, its the end

18:02 technomancy: callen: enlive templates are 100% HTML

18:02 emezeske: callen: ah

18:02 callen: technomancy: https://github.com/cgrand/enlive

18:02 ibdknox: still a sweeping generalization ;)

18:02 dnolen: simonadameit: oh yeah ... just use drop

18:02 callen: I don't need to make a sweeping generalization

18:02 dnolen: (drop n (range))

18:02 lynaghk``: simonadameit: (drop n (range))

18:03 jinx david.

18:03 callen: I'm dealing with a specific situation and I need plain HTML templates from files like Django and Rails.

18:03 technomancy: callen: the transformations are in Clojure; the templates are not.

18:03 weavejester: I need to start coding my hiccup/bootstrap library this weekend.

18:03 callen: technomancy: I don't want any template logic in Clojure, period.

18:03 ibdknox: weavejester: hiccup/bootstrap?

18:03 brehaut_: if you are going to complain about cleverness, enlive has far more of that than hiccup

18:03 callen: technomancy: I just want to hand-off a hash-map of data to the template.

18:03 simonadameit: yeah… fortunately in my case its not (drop *some-really-big-number* (range)) :)

18:03 lynaghk``: weavejester: bootstrap as in getting started kit?

18:03 ibdknox: callen: stencil

18:03 technomancy: rails and django both mix logic and presentation last I checked

18:03 callen: brehaut_: hiccup has the document in Clojure.

18:03 simonadameit: still it feels akward the range function

18:03 weavejester: Bootstrap as in: http://twitter.github.com/bootstrap/

18:04 callen: Stencil looks close enough.

18:04 brehaut_: callen: nevertheless, hiccup is way way simpler than enlive.

18:04 callen: brehaut_: does. not. matter.

18:04 at all

18:04 lynaghk``: weavejester: what are you coding, exactly?

18:04 brehaut_: but you were just complaining about it being too clever‽

18:04 callen: ibdknox: thank you.

18:04 lancepantz: so which http client are all the cool kids using today? clj-http?

18:04 ibdknox: brehaut_: not worth it

18:04 brehaut_: lancepantz: i think so, and dakrone has the central repo i think

18:05 ibdknox: lancepantz: yeah

18:05 callen: brehaut_: what is concentually simple, simple to implement, simple to understand are all three different things.

18:05 lancepantz: yeah, i'm looking at his fork

18:05 thanks dudes

18:05 m0smith: ibdknox: noir and stencil are a good fit then?

18:05 callen: brehaut_: I need limited exposure and simple to understand. The person editing the template shouldn't see anything more than {{variable}} and the HTML.

18:05 muhoo: i enjoyed stuart hollaway's presentation on "simple"

18:05 ibdknox: m0smith: very :)

18:05 muhoo: from blip.tv

18:05 weavejester: lynaghk``: Well, as a simple example, (button-to "/bar" "foo") might produce <a class="btn" href="/bar">foo</a>

18:05 callen: brehaut_: the more isolated from the code, and less powerful, the better.

18:05 muhoo: i.e. "simple just means not complex". wfm

18:05 m0smith: ibdknox: thanks

18:06 dnolen: simonadameit: it may seem weird at first but range is often used for control

18:06 brehaut_: callen: then stop raging and go look at enlive like you were suggested. there is absolutely _no_ clojure in the templates. they are pure HTML.

18:06 devn: speaking of enlive and hiccup...scraping with enlive... are there other solutions already packaged up and ready to go for scraping by xpath or selector?

18:06 weavejester: lynaghk``: Or (icon :search) might produce <i class="icon-search"></i>

18:06 lynaghk``: weavejester: ah, so you want to wrap bootstrap's classes to make a kind of web 2.0 DSL in hiccup?

18:06 rplevy: technomancy: neat, thanks

18:06 callen: brehaut_: I'm not raging, I'm clearing up a lack of perspective on your part.

18:06 lynaghk``: er, not in hiccup. In this separate project.

18:06 brehaut_: goodbye callen

18:07 technomancy: callen: it sounds like you don't know what enlive does

18:07 weavejester: lynaghk``: Exactly right.

18:07 callen: technomancy: I have to go off what the README.md says.

18:07 devn: can't we all just...get along?

18:07 ibdknox: haha

18:07 * Kowboy puts on asbestos pants

18:07 callen: technomancy: if I see transformations in Clojure, it's a no-go.

18:07 ibdknox: apparently not

18:07 emezeske: devn: what fun would that be?

18:07 technomancy: "It's not designer-friendly" is a great reason to use everything that's not enlive

18:07 muhoo: really? a templating flamewar?

18:07 can't we just argue about emacs vs vi, bsd vs linux, mac vs windoze, etc?

18:07 emezeske: muhoo: those are old hat

18:08 weavejester: lynaghk``: I'd like to be able to produce nice-looking bootstrap pages in a few lines of Clojure.

18:08 ibdknox: technomancy: remember the communism fiasco? no value in arguing

18:08 lynaghk``: weavejester: speaking of hiccup, do you have a timeline on switching over to that refactored rendering branch you pointed out to me earlier? I took a fair bit of that and shoved it into some CLJS stuff I'm working on and am getting into the CLJ side of things this afternoon

18:08 callen: muhoo: it's not a flamewar, I don't care what other people use.

18:08 technomancy: ibdknox: oh dang.

18:08 devn: callen: i do, but only because sometimes they're right and im wrong.

18:08 callen: muhoo: there are some specific limitations with my use-case and getting people to stop recommending what isn't workable is proving irritating.

18:08 lancepantz: i wanna jump in there

18:08 ibdknox: lol

18:08 lynaghk``: weavejester: hmm. I'm still using HAML for all of my precompiled-markup needs.

18:08 muhoo: http://www.google.com/url?q=http://xkcd.com/386/&amp;sa=U&ei=0cZGT6TJOYyMigLI5t3bDQ&ved=0CBEQFjAA&usg=AFQjCNG2-piMB_qrSuMnwb7pciErzye8eQ

18:08 ibdknox: lancepantz: do it, it'll only make it better ;)

18:08 lancepantz: just write a service in clojure and make all the front end dudes write a spa in javascript

18:09 muhoo: damn you gogle

18:09 weavejester: lynaghk``: It'll be a while. I'm first putting out Hiccup 1.0.0, which factors out the compiler ready to be replaced.

18:09 callen: lancepantz: that's quite doable actually.

18:09 devn: i want a spa in javascript -- a day spa

18:09 callen: lancepantz: I could do noir -> json -> bootstrap.

18:09 muhoo: http://xkcd.com/386

18:09 devn: *rimshot*

18:09 callen: lancepantz: only problem, the designers in question can't write JavaScript either.

18:09 Kowboy: is anyone using sass for your css?

18:09 lancepantz: ah

18:09 lynaghk``: Kowboy, I am

18:09 callen: lancepantz: they can't code, they can't do JS, they can really only do CSS and HTML at best.

18:09 weavejester: lynaghk``: But before people can use Hiccup 1.0, they'll probably need Ring 1.1, because Ring 1.0 depends on Hiccup 0.3.8

18:09 lancepantz: well, they suck

18:09 :)

18:09 devn: Kowboy: i use me some haml and sass

18:09 lancepantz: hehe

18:09 callen: lancepantz: yeah. yeah...doing my best here.

18:10 lancepantz: na, i guess design is a different job than front end

18:10 weavejester: lynaghk``: And before Ring 1.1, I need to release Lein-Ring 0.6.0 for Leiningen 1.7 and above.

18:10 pbostrom: ibdknox: how does crate use the crateids that it generates?

18:10 callen: lancepantz: basically yes, and I'm trying to bridge the gap there.

18:10 technomancy: weavejester: untangling your dependency graph sounds like the kind of thing you'd use core.logic for

18:10 m0smith: thanks all ttfn

18:10 lancepantz: i wonder what doing a SPA in clojurescript would be like

18:10 callen: lancepantz: but it requires that designers be able to edit a simple HTML template and hit refresh.

18:10 lynaghk``: weavejester: Ah, fair enough. I'm using hiccup outside of the standard sort of stack, so I've been just copy-paste-hackin' on code, but I'd like to keep things from diverging too much.

18:10 callen: lancepantz: clojurescript with the closure compiler seems like a good stack for a SPA to me.

18:11 weavejester: technomancy: Pretty much :) - I have too many projects.

18:11 ibdknox: pbostrom: it allows you to use ($ some-partial) among other things

18:11 Kowboy: spa?

18:11 lancepantz: Kowboy: single page application

18:11 Kowboy: ah, thanks

18:11 lancepantz: Kowboy: essentially a pure js client for your clojure service

18:11 weavejester: Does jQuery work in Clojurescript yet with optimization?

18:11 callen: Kowboy: hypothetically nicer to use, but is harder to get right.

18:11 lancepantz: no rails django php shit in the middle

18:12 devn: callen: you could look at soy templates maybe?

18:12 callen: weavejester: not officially, but I'm sure people have futzed around with it.

18:12 Kowboy: I don't think jQuery will work unless it is compatible with the Closure optimization standards

18:12 lynaghk``: weavejester: simple optimizations, yes. Advanced optimizations not really, because of how jQuery is structured.

18:12 ibdknox: Kowboy: http://github.com/ibdknox/jayq

18:12 devn: callen: https://github.com/levand/clj-soy

18:12 weavejester: Kowboy: Yeah, but I thought there was some talk about jQuery/Closure compatability...

18:12 clj_newb: Hi

18:13 callen: devn: looking, those would work if I was doing an SPA I think.

18:13 devn: clj_newb: hi!

18:13 weavejester: clj_newb: Hi

18:13 ibdknox: weavejester: http://github.com/ibdnkox/jayq

18:13 weavejester: ibdknox: 404...

18:13 devn: ibdknox: same

18:13 Kowboy: hmm...I just remember Rich Hickey saying that only libraries compatible with Closure could be optimized

18:13 clj_newb: clojure.xml, method parse is outputting this exception No matching method found: parse for class com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl

18:13 ibdknox: whoops

18:13 http://github/ibdknox/jayq

18:13 clj_newb: Any idea? Google didn't help much

18:13 ibdknox: primarily because I can't type

18:14 once more with feeling: https://github.com/ibdknox/jayq

18:14 weavejester: ibdknox: You missed out the .com that time :)

18:14 Kowboy: lol

18:14 weavejester: ibdknox: Ah, I see it now :)

18:14 Kowboy: ibdknox, you're a freak (the good kind)

18:14 ibdknox: for fun in CLJS: http://www.chris-granger.com/projects/cljs/

18:15 Kowboy: lol, there's a good kind of freak? ;)

18:15 Kowboy: I seriously need a Clojure job

18:15 yes, and you are it

18:15 * devn gives you one

18:15 weavejester: ibdknox: That looks pretty interesting

18:15 devn: your Clojure job is to write libraries for free

18:15 and then maintain them

18:15 ;)

18:16 ibdknox: weavejester: that + crate (dom'd hiccup) is awesome

18:16 Kowboy: OK, where do I start?

18:16 callen: devn ibdknox lancepantz thanks for the suggestions. Might say fuck it and go SPA.

18:16 devn: Check out the last dozen or so github.com URLs in this channel -- that's a lot of what's buzzing in the community in general

18:16 Kowboy: ^

18:17 lancepantz: callen: np

18:17 devn: Also Kowboy, overtone is really fun and the limit to what you build there is really just your imagination

18:17 gotta run, ciao all

18:17 lynaghk``: callen: I've done a singlepage iPad application entirely in ClojureScript (+ Twitter bootstrap); feel free to drop me a line if you want

18:17 devn: callen: you're definitely welcome

18:17 Kowboy: I just discovered overtone today

18:17 callen: lynaghk``: ooooh. Cool, I've been doing some stuff with bootstrap lately anyway. Thanks!

18:18 lynaghk``: callen: it's a rad stack, if you're willing to patch the ClojureScript compiler now and again =P

18:18 Kowboy: anyone familiar with Eve Online?

18:19 ibdknox: Kowboy: http://www.chris-granger.com/2012/02/20/overtone-and-clojurescript/

18:19 overtone + cljs

18:19 = loads of fun

18:19 Kowboy: I'm thinking about building a Clojure+CLJS site on top of the Eve API

18:19 muhoo: +1 for the overtone+cljs SPA demo

18:19 gtrak``: ibdknox: pretty awesome

18:20 callen: Kowboy: I used to play it ages ago. I have a 40-something million SP char on ice.

18:20 ibdknox: gtrak``: the little app? It was a fun thing to build

18:20 Kowboy: well, the API is REST-based XML payload (GET only)

18:21 gtrak``: yea, it's sweet

18:21 and just a good demo

18:21 Kowboy: but built into the response message is a cache time. The server won't send new data and sometimes will return an error if you try to hit it within that time

18:22 so one thing I was thinking about building was a caching proxy with pluggable caching strategies and expiration strategies

18:22 gtrak``: ibdknox: you coming to the Unjam?

18:23 ibdknox: gtrak``: is that at clojure west?

18:23 Kowboy: I would need to proxy the API anyway because of cross-site access

18:23 gtrak``: yea

18:23 ibdknox: sure :)

18:23 callen: Kowboy: I distinctly recall disliking their API.

18:23 ibdknox: presuming I haven't signed myself up to do something during then lol

18:23 gtrak``: right :-)

18:24 I've been working on an accordion synth just for the occasion

18:24 with a grid and midi-keyboard

18:24 ibdknox: I know very little about overtone sadly

18:24 just enough to be annoying :D

18:25 the unjam would probably be a great way to learn though

18:25 gtrak``: yea, I'm going to have to learn all the sound parts to generate goodness, but so far I have just the i/o working

18:25 muhoo: i'm really curious to hear the music that gets made with overtone

18:25 ibdknox: muhoo: it can be quite impressive

18:25 muhoo: oggs/mp3s?

18:26 pbostrom: ibdknox: one thing about the overtone demo: the overtone piano sample is a dead link, this seems to kill the process for me: http://www.ericmhobbs.com/Blackhole/music-backup/MIS_Stereo_Piano.zip

18:26 ibdknox: muhoo: did you watch sam's talk?

18:26 muhoo: no

18:26 the one at the 2011 conj?

18:26 ibdknox: yeah, watch that

18:26 * muhoo looks on blip

18:27 ibdknox: pbostrom: huh really? It was working for folks the other day :( Might want to ask on the overtone list

18:27 Kowboy: ibdknox, you using Noir to power your website?

18:27 ibdknox: Kowboy: which one?

18:27 Kowboy: http://www.chris-granger.com

18:27 ibdknox: my blog is jekyll, though I'll probably write a noir static generator at some point

18:27 http://webnoir.org and http://sqlkorma.com are both on Noir

18:28 https://www.readyforzero.com/ is also on Noir

18:28 muhoo: so far i have to say, in terms of webdev, i can't see any reason not to just use all of ibdknox libraries as the default stack

18:29 fetch, noir, jayq, etc

18:30 Kowboy: that's why I'm calling him a freak (the good kind)

18:30 sritchie: have you guys ever seen this from clojure 1.2.1?

18:30 Caused by: java.lang.NoSuchFieldException: getCopyOfContextMap

18:30 Kowboy: i.e., it's really great work

18:30 m0smith: ibdknox: do you have info regarding deploying a noir app to tomcat?

18:30 sritchie: on any call to use or require

18:30 pbostrom: ibdknox: looks like someone has already posted to the group

18:30 ibdknox: m0smith: make sure you require your views explicitly and then just use lein-ring to generate an uberwar.

18:30 sritchie: ah, probably a pallet issue

18:31 ibdknox: m0smith: then you're good to go :)

18:31 * zakwilson built something on Noir, but it's down at the moment due to having to run some really memory-heavy stuff on a small VPS.

18:31 ibdknox: there are a few other production ones out there too, don't remember them off the top of my head though

18:32 m0smith: ibdknox: What does "require your views explictly" mean?

18:32 zakwilson: Hmm... readyforzero.com users pay off their debt lots faster than average people. I wonder if that's because people who use a web app designed to help them pay off their debt are more serious about getting out of debt.

18:33 ibdknox: m0smith: in server.clj there will be a server/load-views call. Instead of that just do (:require [my.view] ..) in your ns decl

18:33 m0smith: ok

18:33 ibdknox: zakwilson: it's controlled against people who signup and then don't use it

18:34 but it's true that you can't make a statement about causation there, it's merely correlated

18:34 zakwilson: ibdknox: I don't think that invalidates the point, which is not to say that the service isn't useful (I haven't looked)

18:34 ibdknox: anecdotally it does make a difference for those who were referred to our site and would not have gone there on their own

18:35 zakwilson: Anyway, no criticism intended.

18:35 ibdknox: I certainly didn't take it that way. I said the same thing when they made the graph ;)

18:35 zakwilson: I've just trained myself to spot suspicious marketing claims.

18:36 ibdknox: I'm forever the skeptic

18:36 lol

18:36 * zakwilson was even skeptical of Clojure for several months.

18:36 amalloy: ibdknox: i don't think i believe that. can you prove it?

18:37 callen: zakwilson: skepjure?

18:37 devn: ibdknox: man, i have to say I hadn't looked into Pinot. I remember when it was in its infancy but wasn't following along at home. Breaking it up into these modules is really nice. Also, I really like your website. Very classy

18:37 lancepantz: dakrone: you around?

18:37 dakrone: lancepantz: yea, what's up?

18:37 ibdknox: amalloy: I'm pretty sure I have transcripts of me from when I was young being skeptical. Proving future intent is hard, though based on the trend... ;)

18:38 devn: thanks! designed it last saturday. I'm pretty happy with the results

18:38 zakwilson: I just didn't like that Clojure was on the JVM.

18:38 lancepantz: dakrone: Raynes was just talking to me about using cheshire over clj-json

18:38 * technomancy was primed for Clojure by taking a year or so to warm up to jruby

18:38 lancepantz: i've been maintaing clj-json, but it looks like cheshire is more complete and a wrapper around jackson as well?

18:38 * devn was primed for Clojure by Ruby in general

18:39 * zakwilson was a Lisper before.

18:39 dakrone: lancepantz: yea, cheshire was originally based off of clj-json because Mark wanted to give up maintaining it

18:39 Kowboy: Will I get spanked for this? http://java.dzone.com/polls/which-jvm-language-top-0

18:39 ibdknox: I was just interested in Clojure because it seemed so different. I'd never used a lisp and was obviously very entrenched in the C# world :)

18:39 dakrone: lancepantz: to have faster dev cycles and more active support

18:39 devn: Kowboy: I don't see why.

18:40 Kowboy: darn

18:40 lancepantz: dakrone: have you seen the coercions stuff i added to clj-json

18:40 simonadameit: can i destructure a sequence in a function argument vector like [[x xs]] ?

18:41 ibdknox: simonadameit: yes

18:41 devn: there are limits though, right ibdknox?

18:41 ibdknox: though you probably mean [x & xs]

18:41 dakrone: lancepantz: yes, although I did some timings and it added a lot of overhead

18:41 ibdknox: rather [[x & xs]]

18:41 Scriptor: simonadameit: [x & xs]

18:42 specifically, (defn first [[x & xs]] x)

18:42 simonadameit: ibdknox: no, actually the first argument to the function is a sequence and I want to desctructure that

18:42 ibdknox: yep [[x & xs] other-args]

18:42 zakwilson: ,(let [[x &xs] [1 2 3]] [x xs])

18:42 simonadameit: ah, ok thanks!

18:42 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: xs in this context, compiling:(NO_SOURCE_PATH:0)>

18:42 zakwilson: ,(let [[x & xs] [1 2 3]] [x xs])

18:42 clojurebot: [1 (2 3)]

18:43 zakwilson: All clear now?

18:43 simonadameit: yes, thanks! :)

18:43 dakrone: lancepantz: although I think I did the timings with the postwalk version of the coercions, so it's probably faster now

18:44 lancepantz: dakrone: okay, i'll take a look at it and build out a branch if i need it different

18:44 then i'll just mark clj-json as deprecated

18:45 ibdknox: more unification!

18:45 lancepantz: dakrone: i kinda like the clj-json name better than cheshire, any interest in a rename or is that silly?

18:45 ibdknox: /win

18:45 dakrone: lancepantz: you could do coercions with Cheshire's custom encoding by writing your own encoding rules in the encoders

18:45 lancepantz: ibdknox: yeah man, us geni guys roll our one, then get sick of maintaining it and give up :)

18:45 ibdknox: haha

18:46 lancepantz: to be fair, we built out our stack two years ago

18:46 ibdknox: lancepantz: maintaining things sucks. ;)

18:47 hiredman: it sure does

18:47 dakrone: lancepantz: I'm partial to Cheshire, personally, but could be persuaded otherwise if more people desired a name change

18:47 lancepantz: dakrone: i don't care, just wanted to make it an option if you were interested

18:47 m0smith: ibdknox: Does noir provide a ring handler?

18:48 dakrone: lancepantz: feel free to ping me if you have any issues with it

18:48 ibdknox: m0smith: (server/gen-handler ..) http://webnoir.org/tutorials/others

18:48 m0smith: thanks again

18:49 lancepantz: dakrone: will do, it'll be a few days probably

18:52 ibdknox: technomancy: you are like king on github. I was curious how many total repo watchers you had - it's currently 4707

18:53 technomancy: ibdknox: yeah, I have no idea why people follow stuff like my dotfiles

18:53 it's like "congratulations, you get to hear about the fact that I'm using a new color theme"

18:53 ibdknox: haha

18:53 brehaut_: thats the most important news ever though

18:54 ibdknox: seriously, how're we gonna code like you if we're using the wrong theme?

18:54 Raynes: dakrone, lancepantz: Yay for unification!

18:54 callen: technomancy: my dotfiles repo is one of the only ones that has followers. :(

18:54 technomancy: I think people follow it because I have a really large .emacs and .emacs.d

18:55 technomancy: seems like that would be more interesting as reference material

18:55 OTOH github doesn't really have a good way to say "I want to come back to this but not get fed every update"

18:55 I guess you would use regular bookmarking services for that

18:56 brehaut_: would it be useful for a clojure syntax highlighter brush to support ignoring 'user=>' at the starts of lines ?

18:56 ibdknox: yeah

18:58 weavejester: I hate Java keystores and truststores so much.

18:58 callen: technomancy: they're fortunate that my Emacs setup is very old and very stable, so they don't get bugged very often.

18:58 muhoo: thanks, sam aaron is a very funny, animated presenter. many lulz in there, and a solid overview of overtone.

18:58 callen: paredit is the only thing that's changed in like half a year for the most part.

18:58 and yasnippet.

18:58 Raynes: I change everything every few months.

18:59 arohner: I don't suppose anyone has a library for serializing fns?

18:59 Raynes: I've changed my emacs setup so radically this time that it's Vim.

18:59 callen: Raynes: I used to, but I don't need to anymore.

18:59 technomancy: arohner: catch: https://github.com/technomancy/serializable-fn

19:00 weavejester: arohner: I wrote one for Ruby, once… but not for Clojure :)

19:00 arohner: technomancy: how safe is this?

19:00 technomancy: arohner: not safe at all

19:01 arohner: it was written by a swarm of 8 developers or so pairing over coffee shop wifi during a seajure meeting

19:03 if that doesn't make you nervous, go for it

19:03 arohner: ha. does coffeeshop wifi lead to design problems?

19:03 technomancy: dunno; I've found coffee to produce better results than beer.

19:05 TimMc: dakrone: I assume "Cheshire" is because of SMILE?

19:05 Raynes: TimMc: It's because he has a fetish for mat hatters.

19:06 callen: technomancy: ditto @ coffee > beer.

19:07 Scriptor: well, code quality isn't the greatest with beer

19:07 although I wonder if the writer's mantra of "write drunk, edit sober" works

19:08 lucian: there's an xkcd that delves into the science of it

19:14 ibdknox: new ring?

19:14 weavejester: ibdknox: 1.1 snapshot

19:14 ibdknox: ah

19:15 lancepantz: i believe you're referring to the "Ballmer Peak"

19:15 lucian: ^

19:15 "remember window me?"

19:15 ibdknox: heh

19:15 lancepantz: *windows

19:15 ibdknox: windows CE, ME, NT = windows cement

19:15 lancepantz: lol

19:16 ibdknox: says the guy who worked for MS :D

19:16 muhoo: my greatest fear is that wince will take over phones

19:16 lancepantz: dude, the new windows phones are pretty slick

19:16 TimMc: ibdknox: I have no doubt that just about everyone at MS hates all but the current version.

19:16 lucian: muhoo: don't worry, it's all .net now

19:16 ibdknox: actually, as hard as people are on MSFT outside of the company, the employees are WAY hasher

19:16 harsher*

19:16 TimMc: s/at MS/in any development house/

19:17 ibdknox: yeah

19:17 TimMc: because you have to *maintain* that shit

19:18 The real question is how many people in the OS division personally dislike the current product. :-P

19:18 ibdknox: quite a few

19:19 muhoo: lancepantz: i guess if i wanted slick i'd get an iThing. freedom's more important to me, so i'm very happy with my CM7.1 with almost all open source apps and no google apps. :-)

19:19 lancepantz: muhoo: ahh, you're one of "those" :)

19:19 muhoo: yes, i am

19:20 * lucian just wants an unlocked bootloader

19:20 ibdknox: I have a WP7

19:20 technomancy: freetards represent! =D

19:20 ibdknox: and I had an iphone before that

19:20 lancepantz: the computing equivalent of vegans

19:20 lucian: but there aren't any decent <4" qwerty phones with an unlocked bootloader

19:20 ibdknox: I like the WP7 UI a lot more

19:21 muhoo: my old G1 had an awesome keyboard

19:21 alas, the one on my G2 sucks, but at least it has one.

19:21 * technomancy is convinced the input problem on mobiles is due to the size of the keyboard as much as the softwareness of it

19:22 lucian: muhoo: i like my motorola milestone, but it's old

19:22 technomancy: i can type very fast on my phoe

19:22 zakwilson: And accurately, I see.

19:22 muhoo: :-)

19:23 lucian: laptop, in the dark, on my side :)

19:23 zakwilson: I think a major problem with onscreen keyboards is that they take up a lot of screen real estate that could be used to display the text you're entering.

19:23 ibdknox: lucian: excuses are for the weak.

19:23 * lucian performs seppuku

19:24 zakwilson: I could swear I had something to say to ibdknox about one of his libraries, but I can't remember it now.

19:24 lucian: zakwilson: indeed

19:24 * ibdknox hides

19:24 zakwilson: I don't think it was bad.

19:24 TimMc: Alas, poor lucian, we knew him w-

19:24 hm

19:24 We didn't know him well.

19:24 * zakwilson likes korma and noir.

19:24 TimMc: Alas, poor lucian, we knew his hostmask.

19:25 * lucian says "boo"

19:25 ibdknox: zakwilson: they're ok. I've heard rails is better, you might want to try it out ;)

19:25 brehaut_: rails?

19:25 your out of touch

19:25 muhoo: hhe

19:25 brehaut_: node

19:25 muhoo: hahaha

19:25 zakwilson: ibdknox: I'll get right on that. This whole "simple" thing Clojure advocates is overrated anyway.

19:25 ibdknox: oh sorry, node

19:25 I've had good experiences with node myself

19:26 * zakwilson actually has an ongoing Rails project.

19:26 muhoo: http://hipstergrammers.tumblr.com

19:26 ibdknox: zakwilson: yeah.. simple means less features... it must suck.

19:26 lucian: node is ok, twisted for js mostly done right

19:26 callen: node is garbage.

19:26 ibdknox: lol

19:26 muhoo: brehaut_: http://24.media.tumblr.com/tumblr_lwxg1u1HSG1r95ui7o1_500.jpg

19:27 * ibdknox goes to get popcorn

19:27 zakwilson: And I keep thinking things like "why does this automagically make a method when it could just be a key in a map?".

19:27 brehaut_: muhoo: wow.

19:27 * ibdknox was being sarcastic about node

19:28 callen: Node is single-threaded callback spaghetti failure. I'll take my SMP Erlang, Clojure or straight Java/Netty, kthxbai.

19:28 ibdknox: I rewrote my node app into 40% the size of the node one and it was 3 orders of magnitude faster

19:28 Chousuke: heh

19:28 muhoo: ibdknox: which app?

19:28 ibdknox: http://typewire.io

19:28 lucian: callen: it's missing deferreds, yes

19:28 callen: ibdknox: give me a type signature here, node => clojure | size * 0.40, speed * 10^3?

19:28 Chousuke: I'm trying to figure out node.js at eh moment actually

19:28 callen: lucian: it's missing brains and a purpose for existing.

19:29 lucian: no, not that. with CPS or deferreds it's ok

19:29 other than all the js, of course

19:29 Chousuke: doing a blog engine/something for a course with it and coffeescript :P

19:30 callen: I don't mind coffeescript on the front-end at all.

19:30 muhoo: http://27.media.tumblr.com/tumblr_lwvn8xE2ye1r95ui7o1_500.jpg

19:30 ibdknox: callen: not sure I know what you're asking for? the size difference had to do with removing callbacks and ridiculous levels of nesting, the speed difference had to do with the hotspotter

19:30 zakwilson: ibdknox: http://www.typewire.io/event/d5893

19:30 Chousuke: haven't quite yet been hit by all the asynchronicity in node.js

19:30 callen: and I think things like backbone and ember are doing a lot for web development.

19:30 muhoo: and with that, fun meter's pegged.

19:30 callen: but node.js is garbage.

19:30 brehaut_: http://www.coboloncogs.org/INDEX.HTM

19:30 ibdknox: zakwilson: lol

19:30 callen: ibdknox: so, pretty much what I expected then.

19:30 ibdknox: the callback spaghetti is horrific.

19:30 zakwilson: I've never seen the appeal of node.

19:31 technomancy: http://tinyurl.com/7j3k86p

19:31 brehaut_: its the young kids version of cobol on cogs

19:31 ibdknox: callen: yeah it was ridiculous for something as simple as it was

19:31 zakwilson: I've never used it or read much about it. It just struck me as a bad idea right off the bat.

19:31 Chousuke: heh

19:31 muhoo: callen: http://25.media.tumblr.com/tumblr_lwvn4i6SBz1r95ui7o1_500.jpg

19:31 callen: zakwilson: it's not faster than anything, it's not more efficient/faster to make things with, it's not easier to understand, it doesn't have more libraries or support than anything, it's a failure in every category that is worth gauging.

19:31 technomancy: clojurebot: javascript is beautiful, you're just too conformist to appreciate its quirks: http://tinyurl.com/7j3k86p

19:31 clojurebot: In Ordnung

19:32 ibdknox: except popularity, oddly enough :)

19:32 TimMc: Pssh, I gave up on node in 1993.

19:32 I could tell it wasn't going anywhere.

19:32 ibdknox: TimMc is the only forward thinker here

19:32 zakwilson: callen: that's the impression I had. The only advantage is being able to use the same language on the server and the client, and that doesn't seem very useful to me.

19:32 muhoo: i actually understand the appeal of node.js. it's the same thign that makes cljs exciting: same language on the server and the client.

19:33 the problem, of course, is that javascipt, ehm, wouldn't be my first choice for that language.

19:33 callen: zakwilson: it's not a useful property for many reasons. For one, the backend environment is solving a totally different problem than the DOM and will require completely different code anyway.

19:33 zakwilson: PHP is popular too.

19:33 gfredericks: is (juxt filter remove) == separate?

19:33 technomancy: gfredericks: it is

19:33 callen: zakwilson: you can't actually *share* anything meaningful just because they're the same language.

19:33 gfredericks: technomancy: I don't know why I found that so hard to reason about

19:33 technomancy: gfredericks: because the old contrib implementation was silly and clouded your mind, perhaps

19:34 ibdknox: zakwilson: php is the best language ever ;)

19:34 TimMc: callen: Sure you can: Compile-time consistency of API.

19:34 Chousuke: I actually don't hate javascript much at all

19:34 it's pretty cool, as far as languages go

19:34 callen: TimMc: have you...seen JavaScript?

19:34 gfredericks: technomancy: I'm actually still surprised it's not in core

19:34 ibdknox: Chousuke: dynamic rebinding of this might be one of the single worst ideas in programming ever

19:34 zakwilson: Everybody has maps, lists and JSON. If you keep your data in simple data structures, you can just pass JSON back and forth.

19:34 TimMc: callen: Fairly experienced in it, yes.

19:34 gfredericks: I bothered to do a $findarg on lazybot and everything

19:34 callen: TimMc: this is not a property they're taking advantage of.

19:34 ibdknox: Chousuke: aside from that, the language isn't the problem, the platforms are :(

19:35 callen: ^^ more to the point, yes.

19:35 gfredericks: wait maybe I should have done $findfn

19:35 Chousuke: ibdknox: it's weird, but it seems to make some sort of sense if I think of "this" as the context

19:35 technomancy: ibdknox: yeah, learning a new runtime is a lot harder than learning a new language

19:35 ibdknox: technomancy: yeah, by far

19:35 TimMc: callen: How often have you mistyped a keyword in Clojure, or a URL path, etc.

19:35 technomancy: ibdknox: I had an easier time picking up ocaml than clojurescript

19:35 ibdknox: heh

19:36 zakwilson: I must admit I also don't really get Clojurescript and the like. The language isn't usually the problem with writing JS.

19:36 Chousuke: ibdknox: whatever benefits it may have iare not justified by the mental effort required to maintain a mental model of it, though.

19:36 zakwilson: And you're not likely to be able to share much between the client and server code even if they're the same language.

19:36 brehaut_: zakwilson: depends where you draw the stdlib / language line

19:36 ibdknox: zakwilson: there's a lot of value in the semantics that the default clojure structures/functions provide

19:37 Chousuke: yeah so many very hard to find bugs are the result of that one decision

19:37 * TimMc leads the channel in a rousing filk-sing of "When I Was A Boy" http://www.stevemacdonald.org/lyrics/wiwab.html

19:37 ibdknox: lol

19:37 filk-sing?

19:37 ~guards

19:37 clojurebot: SEIZE HIM!

19:37 Chousuke: ibdknox: javascript is like anti-clojure in that respect.

19:38 in clojure, immutability makes things easy to reason about. in javascript, 'this' makes everything hard to reason about. :P

19:38 ibdknox: haha pretty much

19:38 lucian: Chousuke: there's no defense for the clusterfuck that is 'this'

19:38 oh, nvm

19:38 TimMc: "Back when Fortran was not even Three-tran..."

19:39 lucian: perhaps i'm biased, but i think it should've done it like python

19:39 brehaut_: the lack of useful datastructures in JS is still my single biggest complaint

19:39 ibdknox: TimMc: lol

19:39 muhoo: http://www.shopify.com/technology/5370262-wat-a-funny-look-at-ruby-and-javascript-oddities

19:39 zakwilson: ibdknox: I don't disagree, but... my response to this isn't coherent enough to post.

19:39 lucian: brehaut_: that's getting better with es5

19:39 brehaut_: it is

19:39 but its still not great

19:39 TimMc: ibdknox: Yeah, it's filk. Got a problem with that?!

19:39 ibdknox: zakwilson: that + macros provide a great deal of potential I think

19:39 lucian: brehaut_: there's also the beginnings of a capability object model, which only E has. and quasiquoting too

19:39 ibdknox: TimMc: no, I have a problem with our guards who seemed to have done a terrible job seizing you for it.

19:40 TimMc: haha

19:40 zakwilson: ibdknox: Yeah, I have no trouble seeing the utility of macros. Oddly, I write fairly few in Clojure.

19:40 ibdknox: zakwilson: that's the ideal actually. Macros are mostly valuable at the lib level I think

19:41 they have plenty of utility outside of that, but they really shine there

19:41 brehaut_: lucian: yeah, theres lots of nice things coming (although im not sure about the quasiquoting. seems a bit weird)

19:41 lucian: brehaut_: it's just like in E. namespaced, sanitised quoting (like lisp quasiquoting)

19:41 TimMc: Wait, quasiquote in JS?

19:41 zakwilson: ibdknox: yeah, true. I write internal libraries though and still find fairly few things I can't write as functions instead. This seemed less true with CL, but I may just be more experienced now.

19:41 brehaut_: TimMc: yeah, ES5 is bringing lots of decent stuff to the language

19:42 lucian: TimMc: have a look, it's quite interesting. although the first examples are boring and the syntax sycks

19:42 ibdknox: in 5 years we'll get to use it!

19:42 TimMc: Well, bravo to whoever can make *that* work.

19:42 lucian: sucks :)

19:42 ibdknox: ~rimshot

19:42 clojurebot: Badum, *tish*

19:42 qbg: At least IE 6 is almost gone in the US (according to some sources) :)

19:42 Chousuke: lucian: It's helped me to stop thinking of it as "this" and instead think of some "context" that has little relation to anything in the lexical scope :P

19:42 * lucian gets to ignore anything that isn't latest chrome or firefox at work

19:42 TimMc: I guess if all they're doing with macros is templating, they don't need sexprs.

19:43 lucian: Chousuke: that's still no excuse. python has a sane self as a solution to a similar problem

19:43 TimMc: you can do much more, like new literals

19:43 brehaut: lucian: i cannot remember, does ES5 have mutable iterators/generators like python or did the fix that failure?

19:44 lucian: brehaut: not sure. i think they may get consumed like the python ones

19:44 brehaut: lucian: crap.

19:44 lucian: js is mutable enough already, it won't get any less mutable

19:44 can't fight that, really

19:44 brehaut: well yeah, but mutable iterators are a great sauce of pain in python

19:44 lucian: brehaut: they are? i haven't noticed

19:44 * lucian primarily uses python

19:45 brehaut: i primarily use python too

19:45 ibdknox: I primarily use VB6

19:45 muhoo: this is truly an awesome hack: https://github.com/technomancy/serializable-fn/blob/master/src/serializable/fn.clj

19:45 lucian: i don't remember ever being bothered by their consumability

19:45 muhoo: even though awesome is deprecated

19:46 any chance of serializable-fn finding its way into the core language at some point, or into repl-tools?

19:46 brehaut: extremely unlikely

19:46 technomancy: odds are low

19:46 ibdknox: too much overhead?

19:46 lucian: muhoo: i don't think the s-exp is kept along

19:47 though it wouldn't be a big deal if it were, i'd think

19:47 just put it in metadata or something

19:47 technomancy: it is in the metadata

19:47 lucian: technomancy: the actual data structure? then what would be the impediment?

19:48 * TimMc runs (source source) to find how that currently works.

19:48 technomancy: I don't think they're interested

19:48 lucian: it sounds quite interesting to me :)

19:48 technomancy: ah, if only your opinion or my opinion had some influence on the direction of Clojure

19:49 lucian: :)

19:49 ibdknox: the fact that it's a closure would make it somewhat hard to reason about I suspect

19:49 and have potentially unintended side effects

19:49 * lucian waves good night. it's late here

19:49 lucian: ibdknox: hmm

19:50 qbg: class name wouldn't be preserved either

19:51 TimMc: So... clojure.repl's source-fn uses :line and :file meta on Vars to extract source info from the declaring file

19:51 qbg: TimMc: That is why source doesn't work for fns defined on the repl

19:51 TimMc: aha

19:52 simonadameit1: hm, i stumbled upon strange behavior regarding lazy sequences

19:52 brehaut: bets on binding?

19:52 simonadameit1: see https://github.com/schaf5/euler-clojure-solutions/blob/master/src/euler_clojure_solutions/core.clj

19:52 technomancy: ibdknox: the existing implementation refuses to bind over things that aren't serializable

19:52 ibdknox: ah

19:52 simonadameit1: (nth primes 1000) returns 7927, but (nth primes 10000) returns nil

19:53 why is that, can i not build infinite lazy sequences?

19:53 ibdknox: technomancy: seems like that might rule out a lot of cases actually

19:53 technomancy: rather, cases where I would want to use it

19:53 brehaut: simonadameit1: you definately can create infinite seqs

19:54 ,(nth 10000 (iterate 1 inc))

19:54 technomancy: ibdknox: it's a 2-hour hack; it could be made smarter

19:54 clojurebot: #<ClassCastException java.lang.ClassCastException: clojure.lang.Cons cannot be cast to java.lang.Number>

19:54 technomancy: it should be made to throw on serialization, not at function instantiation time

19:54 TimMc: brehaut: I always get nth's arg order wrong.

19:54 simonadameit1: brehaut: well, could you try that example "primes" that i linked to? it stops after something like 10000 iterations and returns nil :(

19:55 ibdknox: technomancy: yeah, I didn't mean that as a critique of the impl

19:55 qbg: simonadameitl: Are you sure it isn't throw a StackOverflowException?

19:55 TimMc: simonadameit1: You're stacking up an awful lot of remove calls.

19:55 Maybe lazy-seq is swallowing the overflow?

19:56 simonadameit1: TimMc: are those stack or heap allocated?

19:56 i thought lazy-seq would move a chunk to the heap

19:56 qbg: Those thunks still need to be called

19:56 And those thunks call each other

19:56 simonadameit1: ah ok

19:56 TimMc: I'm trying to think how this interacts with lazy-seq, though.

19:57 brehaut: TimMc: the answer there is 'in a confusing way'

19:57 TimMc: I think it doesn't matter.

19:57 brehaut: yeah its definately stack overflowing here

19:57 the exception is not getting swallowed either

19:58 qbg: The solution is to an algorithm that isn't that inefficient :)

19:58 simonadameit1: no no.. the algorithm isnt inefficient

19:58 the implementation maybe

19:58 qbg: I'm seeing trial division

20:00 simonadameit1: ah, yes

20:00 you're right

20:00 now i have to think how to devise a more efficient algorithm which still returns a lazy-seq...

20:01 qbg: The solution to that problem is beautiful

20:02 There is actually a paper on it

20:02 simonadameit1: Hehe :)

20:04 hiredman: if you ask clojurebot the right way it will tell you all about it

20:05 simonadameit1: clojurebot, how do i compute a lazy seq of primes efficiently?

20:05 clojurebot: It's greek to me.

20:05 simonadameit1: haha :)

20:05 yeah i know THAT

20:05 ibdknox: ~prime

20:05 clojurebot: Cool story bro.

20:05 qbg: LULZ!

20:05 hiredman: ~sieve

20:05 clojurebot: see the genuine sieve of eratosthenes

20:06 simonadameit1: yes, but now turn it into a lazy seq algorithm!

20:06 emezeske: clojurebot, what does "It's greek to me" mean?

20:06 clojurebot: Titim gan éirí ort.

20:06 qbg: How do you get clojurebot to google something again?

20:07 emezeske: Eratosthenes was greek for one thing.

20:07 hiredman: ~google genuine sieve of eratosthenes

20:07 clojurebot: First, out of 430 results is:

20:07 The Genuine Sieve of Eratosthenes

20:07 http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

20:07 tmciver: $google

20:07 lazybot: No search term!

20:10 bbloom: so i've been using reify on some java object, but now I realize I have two different types of java objects that I want to reify with 90% the same interfaces/implementations… what's the idiomatic way to go about that?

20:10 qbg: Anyways, the broken code in the gist gives me a stackoverflowerror in 1.2

20:11 amalloy: $google stackoverflow prime sieve dbyrne

20:11 lazybot: [recursion - Recursive function causing a stack overflow - Stack ...] http://stackoverflow.com/questions/2946764/recursive-function-causing-a-stack-overflow

20:12 TimMc: amalloy: You should link to that on the(?) 4clojure primes problem once someone gets a stack overflow.

20:12 bbloom: (yes, i know, concrete inheritance is bad… i didn't design the lib)

20:13 qbg: bbloom: is it actually concrete inheritance?

20:13 I though reify was interface only

20:13 (for the Java stuff that is)

20:13 bbloom: qbg: oh no, i guess it isn't

20:14 qbg: bbloom: If you were implementing a protocol, you could use extend

20:15 bbloom: so basically, i have two concrete objects A and B which implement IBase, IA, and IB — I have been reifying both of them to various interfaces

20:15 qbg: You mean you created A and B using reify?

20:16 bbloom: some interop code is returning an A or a B & i've been doing reify to some other set of interfaces that happens to only cover the subset of functionality common to both A and B… but now I want to have a few extra functions that operate on A and B differently… but I don't want to duplicate all the common functions

20:16 does that make sense?

20:16 hiredman: have the objects delegate behaviour to other objects and "inject" (close over or pass to the constructor) different objects to get different behavior

20:17 bbloom: yeah, that's what i thought i might have to do… but does that mean I have to basically repeat the list of every method on both objects? seems kinda wordy

20:17 hiredman: bbloom: write a macro to generate them

20:17 qbg: You could use macros, but it seems a bit overkill for a small number of impls

20:17 bbloom: its 10-ish

20:18 qbg: 10ish is enough I think :)

20:18 hiredman: bbloom: I would suggest seeing if you could get the 10ish down to 1

20:18 qbg: (I was reading what you wrote before as only need 2 impls)

20:18 bbloom: it's 10ish functions

20:18 2 different concrete objects coming back from the java interface

20:19 hiredman: instead of getting different behaviour by having different implementations get different behavior by constructing the same type with different values

20:19 devn: Is lein-noir 1.2.1 really still the plugin to install?

20:20 bbloom: hiredman: since the method sets seem to be disjoint, i could probably just implement everything on either type of concrete object & let it fail at runtime....

20:20 ibdknox: devn: nothing about the template has really changed? the latest stable noir is 1.2.2

20:20 tmciver: Anyone know how to get emacs to display a list of installed packages? package-list-packages seems to only list not-installed packages.

20:21 technomancy: tmciver: installed packages should be at the bottom

20:21 devn: ibdknox: sorry, just saw 1.2.1 come across the wire as a dependency when i lein install'd the plugin

20:21 technomancy: but you can do ls ~/.emacs.d/elpa too

20:21 simonadameit1: so actually its quite simple...

20:21 technomancy: ibdknox: are you using lein-newnew yet?

20:21 devn: ibdknox: once i built a new project i realized i'd made an error

20:21 ibdknox: technomancy: next version is

20:21 technomancy: great

20:22 devn: ibdknox: one thing i notice is that I always end up fixing the indentation of the generated projct.clj

20:22 ibdknox: devn: blame vim

20:22 devn: it'll be fixed in the next one :)

20:22 tmciver: technomancy: doh! I was looking for an 'I' in the first column.

20:22 devn: :)

20:23 ibdknox: i remember when lein had a similar issue, so idk if that's worth looking into

20:23 bobhope: is update-proxy functional

20:23 ?

20:24 hiredman: no

20:24 proxy is slow

20:24 (fyi)

20:24 bobhope: I need to dynamically redefine method implementations while implementing protocols

20:24 I suppose I could reify

20:24 but I need to override equals and hashcode

20:24 tmciver: on a related question I installed color-theme package but doing M-x 'color-theme' does present any completions.

20:24 hiredman: :| don't proxy protocols

20:25 dgrnbrg: I have protocols and interfaces I need to define

20:25 hiredman: I don't believe you need any such thing

20:26 technomancy: tmciver: the autoloads on the color-theme packages are busted

20:26 I think I filed a bug for that

20:26 dgrnbrg: I need to write an object which support destructuring as a vector and as a map, which provides the results according to my spec, and I need to implement a few other protocols

20:26 this object must do all these things

20:27 tmciver: technomancy: really? any work-around?

20:28 technomancy: tmciver: https://github.com/technomancy/dotfiles/blob/master/.emacs.d/phil/workarounds.el

20:28 tmciver: technomancy: how apt!

20:28 lynaghk: What's the appropriate way to call math functions in clojure? I'd like to use Sine, but it's not in clojure.math.numeric-tower. Are there any maintained libs that wrap the host math functions?

20:29 technomancy: tmciver: that's a different package manager

20:29 hiredman: ,(Math/sin 4)

20:29 clojurebot: -0.7568024953079282

20:30 tmciver: technomancy: what's a differenct package mananger? workarounds.el?

20:30 lynaghk: hiredman: So drop to the Java eh? I'm hoping to get something that will work on CLJS too, so maybe I will have to put together some kind of wrapper lib.

20:30 technomancy: tmciver: apt is

20:30 ~ $ which apt-get # /usr/bin/apt-get

20:30 clojurebot: No entiendo

20:30 technomancy:

20:30 har har

20:30 TimMc: lynaghk: May I recommend https://github.com/baznex/imports

20:30 tmciver: funny

20:30 hiredman: clojure.math.numeric-tower is most likely too slow to be useful

20:30 brehaut: lynaghk: JS uses the same Math object as Java

20:31 hiredman: (I don't have any numbers to back that up)

20:31 TimMc: tmciver: We don't have any actual usage docs yet!

20:31 lynaghk: brehaut: think I could get away with (def Math js/Math) and use the same definitions?

20:31 TimMc: This is terrible!

20:31 echo-area: I went offline yesterday after asking my question.

20:31 brehaut: lynaghk: i know next to nothing about cljs sorry.

20:31 lynaghk: TimMc: you may, thank you.

20:32 ibdknox|away: lynaghk: I don't think that will work

20:32 echo-area: Does anyone here know Clojure's STM implementation? Every committed value is computed a millisecond-based commitment time, but it's never used. What's the purpose of this time? Isn't it slowing down transactions?

20:32 Could anyone explain this?

20:32 qbg: dgrnbrg: Looks like your object will need to be seqable and implement ILookup, or Map

20:32 dgrnbrg: qbg, I know

20:32 tmciver: TimMc: in imports?

20:32 TimMc: tmciver: Yeah. :-(

20:33 dgrnbrg: qbg: I'm pursuing an implementation based on a functional implementation of proxies using deftype

20:33 hiredman: the formatting of clojure.math.numeric-tower is pretty horrible too

20:33 https://github.com/clojure/math.numeric-tower/blob/master/src/main/clojure/clojure/math/numeric_tower.clj#L223 soooo bad

20:33 tmciver: TimMc: usage is obvious to the most casual of observers.

20:33 qbg: dgrnbrg: What do you need help with?

20:33 dgrnbrg: qbg: I wanted a better solution, if it existed :)

20:33 tmciver: TimMc: we don't need no stinkin' docs!

20:33 TimMc: tmciver: There's pretty decent usage instructions in the docstrings, actually.

20:34 qbg: dgrnbrg: Better than using deftype?

20:34 dgrnbrg: simpler, yes

20:34 tmciver: TimMc: well, that's probably a task I could tackle. That way I can feel useful.

20:34 dgrnbrg: so I don't have to provide implementations of IMeta, IObj, hashCode, and equals

20:34 since those are just boilerplate

20:35 qbg: dgrnbrg: deftype is probably the best way. You could alternatively decide that you don't need a single object to do all of that :)

20:36 dgrnbrg: I do, though, since I'm writing a system that integrates w/ clojure seamlessly, but has a code generator for a different backend

20:36 and uses runtime clojure as its compile-time macro system

20:36 qbg: IIRC, deftype provides impls of hashCodes and equals unless you override it though

20:37 TimMc: tmciver: Haha, look at all the "contributors" to baznex/imports: https://github.com/baznex/imports/contributors

20:37 dgrnbrg: defrecord explicitly mentions that it offers hashCode and equals

20:37 tmciver: TimMc: Ha! did you add them?

20:38 TimMc: tmciver: No, it's an artifact of having forked clojure-contrib.

20:38 dgrnbrg: hmm, maybe not

20:38 oh well...

20:38 tmciver: TimMc: hmm

20:38 qbg: Ah, yes right

20:38 amalloy: hiredman: that looks kinda like the indentation in common lisp, or maybe elisp, right?

20:39 zcaudate: does any know if there is a cli way to check for the latest version of a package on clojars?

20:39 hiredman: maybe some kind of common lisp, not elisp

20:39 TimMc: zcaudate: There's lein search...

20:40 devn: so, what's the buzz around the work aaron cohen is doing?

20:40 TimMc: who?

20:40 clojurebot: who is your master

20:40 devn: he's working on CinC

20:41 TimMc: Oh, that guy.

20:41 hiredman: is there buzz?

20:41 devn: i dont know, im just trying to take the temperature

20:41 im interested in what he's doing

20:41 zcaudate: thnx timmc

20:42 TimMc: Watching Rich's keynote talk, it sounds like modifying the CLJS compiler is going to be the official path forward for CinC

20:42 bbloom: are the built in clojure interfaces available in protocol form? i really wish I could use extend-type with Associative

20:42 devn: TimMc: yeah that was clear on cljs from the outset -- it's a blueprint

20:43 qbg: bbloom: Maybe one day soon...

20:43 bbloom: cljs has protocols for associative ;)

20:43 TimMc: devn: The outset? It has been around for years, as far as I can tell.

20:43 devn: TimMc: cljs?

20:43 TimMc: yep

20:43 qbg: There was a different, older cljs

20:43 TimMc: Maybe that was an older project that was scrapped.

20:43 ok

20:43 qbg: Not the same thing at all

20:44 devn: yeah that was chouser's

20:44 bbloom: qbg: is that "someday soon" related to the CinC stuff you guys are talking about now?

20:44 devn: who did a lot of work on the new one as well because, well, he's chouser.

20:45 qbg: Once we get CinC for the Java impl/backend...

20:45 bbloom: gotcha...

20:46 TimMc: I guess CinC will be 2.0 at least.

20:46 * qbg hopes the thing presented at Clojure/West is CinC

20:46 TimMc: Well, no, I take that back.

20:46 bbloom: yeah, i implemented Var for a clojurescript experiment i was doing & editing the cljs compiler was super easy compared to making sense of the clojure JVM java code

20:46 alexbaranosky: TimMc, that is a serious amount of contributors to baznex/import

20:46 TimMc: alexbaranosky: Yeah, it is basically an accidental lie.

20:47 devn: as of (first clojure/conj) there were more than a few people of repute discussing CinC

20:47 alexbaranosky: yeah, but funny - we should get all those guys to come to the next bazne gathering :)

20:47 tmciver: alexbaranosky: looks like everyone is there except for you! ;)

20:47 TimMc: But from now on, I'm going to fork leiningen or something, delete everything (keeping the commit history), and use that for each new project.

20:48 I'm gonna look like such a collaborator.

20:48 qbg: 'This leiningen fork includes a built in Sudoku plugin!'

20:48 devn: (doctor)

20:48 alexbaranosky: tmciver, ha, I've been too busy talking about QuickCheck to actually work on any code at the last couple baznexes

20:49 devn: alexbaranosky: ah, quickcheck man, eh?

20:49 tmciver: alexbaranosky: that's OK. I probably shouldn't be listed as a contributor anyway.

20:49 devn: alexbaranosky: we've been kicking around ideas a lot lately, but the quickcheck thing keeps coming up

20:49 qbg: I wonder if we can hook together leiningen build output to Overtone

20:50 devn: qbg: don't steal my idea!

20:50 qbg: i just started working on that on monday night!

20:50 alexbaranosky: devn, I've been chatting with reiddraper a lot about QuickCheck... and also how it can be incorporated into Midje

20:51 qbg: You got to hook up maven output to Overtone, and build a Clojure

20:51 alexbaranosky: devn, https://github.com/marick/Midje/tree/formulas

20:51 qbg: Probably sounds like dubstep

20:51 alexbaranosky: devn, https://github.com/AlexBaranosky/Shrink

20:51 devn: lol qbg, no, i want to do what someone did a long time ago with lazytest

20:51 they wrote lazytest-listen

20:51 bbloom: i'm finding the java interop stuff to be a pretty huge mind bender… there are so many helper macros that i feel like ONE OF THEM needs to do what i want… but i cant figure it out

20:51 devn: i want to add a plugin for midje that gives you audio output for tests

20:52 mary had a lit-tle lamb, lit-tle la*CRASH*

20:52 alexbaranosky: devn, depending on your level of seriousness, we could talk about what it would take to enable that kind of plugin to hook up wit Midje :)

20:52 qbg: Suddenly a 1000 sheep cried out and were silenced

20:52 bbloom: the dichotomy of protocols and interfaces is frustrating…. it seems like if only these things were protocols everything would work fine…. is there any way to turn an interface into a protocol?

20:52 devn: alexbaranosky: im quite serious. i'd like to do an audio output for test runs

20:53 ibdknox|away: I built a vs extension that monitored the speed of your typing and faded flight of the valkyries in as you got faster lol

20:53 bbloom: ibdknox: that is awesome.

20:53 ibdknox|away: used to install that on random people's machines. The results were hilarious

20:53 qbg: bbloom: Do you want java code to take the result?

20:53 alexbaranosky: nice

20:54 bbloom: qbg: yeah, i need an object that i can work with in clojure and pass back to java

20:54 qbg: Then no :(

20:54 bbloom: so what would be the solution if i didnt need to pass it back?

20:54 technomancy: I wrote the "lein play" plugin to give a final fantasy victory fanfare on successful test runs

20:54 alexbaranosky: devn, you can add an issue and we could hash out what that might entail on github

20:54 devn: alexbaranosky: Shrink looks really cool. Did you ANN on the list?

20:54 alexbaranosky: will do that immediately

20:54 alexbaranosky: devn, not yet, because it's not done yet

20:54 bbloom: cus in theory i could add an 'unwrap function and just call that before passing it back

20:54 devn: alexbaranosky: im excited to see it

20:55 alexbaranosky: i would like to give a talk at our next Clojure meetup about quickcheck, test.generative, and hopefully Shrink. :)

20:56 alexbaranosky: devn, shrink is really meant as a component to getting quickcheck style workign with Midje - but I made it a separate library because I noticed that test.generative doesn't shrink failures yet -- now it could be usable to other libraries

20:57 devn: alexbaranosky: perhaps there is room for contributing to test.generative? I don't actually know the particulars there, so don't take that as a strong suggestion by any stretch of the imagination.

20:57 alexbaranosky: devn ideally the test framework takes a generated failure, and keeps shrinking it, and rerunning the test to get the smallest possible failure which it then will report to the user

20:57 qbg: bbloom: Well, it sort of depends on what I mean by pass it to the Java code. You could create a protocol that mirrors the interface and extend the protocol to the interface, but not much else

20:57 alexbaranosky: stuart halloway expressed excitement when he saw Shrink, so I think there is room for collaboration there

20:58 devn: alexbaranosky: smallest meaning the most common overlapping failure between inputs?

20:58 alexbaranosky: devn, also, my current vision for midje's formula macro is for us to just borrow the generators from test.generative ... but we'll see how that goes, I haven't thought too hard on it yet

20:58 dev, smallest mean.... something like "least complex"

20:59 devn: alexbaranosky: *nod*, i was thinking in a different dimension there about the "root" being shared among many test inputs, so in some sense it is the "largest" possible failure

20:59 alexbaranosky: so if your fact fails on a generated number of 100234 then it will try to shrink it to like 50117

20:59 then run it again

20:59 and see if it fails still

21:00 the principle being that it is going to be hard to understand why a huge funky number or string is failing

21:00 devn: or incredibly obvious :)

21:00 {:pre ...}

21:01 anyway, i see the drive of it, and i think that's great

21:01 bbloom: http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ — heh…

21:01 i guess i'm not the only person who is confused

21:02 devn: bbloom: that's a great chart

21:02 alexbaranosky: yeah I enjoyed that chart too.

21:02 TimMc: I want to rearrange it, but it apparently has to fit on a book page.

21:03 devn: this community rules.

21:03 cemerick: TimMc: Feel free to mix it up however you like.

21:03 alexbaranosky: cemerick, that chart makes me wonder if the book is going to be equivalently insightful

21:04 brehaut: alexbaranosky: yes

21:05 bbloom: i realize that i'm doing java interop, so it's no surprise that it feels java-y…. it's just…. I hate java-y....

21:05 alexbaranosky: brehaut, guess I'm going to buy it then :)

21:05 brehaut: alexbaranosky: i

21:05 've liked what ive read so far

21:05 cemerick: alexbaranosky: I hope so :-)

21:06 though, I'd rather it be useful than insightful

21:06 alexbaranosky: cemerick, I think it can achieve high ranks in both categories

21:09 bbloom: ok, so i think i have an idea of how to do what i want to do by using either deftype or reify plus a macro…. my last question on this: is there an easy way to reflect over an interface & define delegation methods for my type? ie, I don't want to bother defining a dozen interface methods which are all of the form foo(x,y) { return underlying.foo(x,y); }

21:10 qbg: bbloom: take a look at clojure.reflect

21:10 And use a macro

21:11 bbloom: ah neat — ok… i'll give this all a try

21:11 …. right after i eat something :-)

21:11 thanks for the help!

21:11 qbg: Alternatively if you are in 1.2 for some reason, you can use the Java reflection API directly

21:11 bbloom: nope, 1.3

21:12 seems like this would be good enough… i was just hoping that reify had some kind of :delegate [fn1 fn2 fn3] or something like that

21:20 devn: didn't there used to be some example floating around about taking live keyboard input and playing midi notes using a java frame or something?

21:20 I can'

21:20 can't find it anywhere

21:23 TimMc: technomancy: DISASTER! serializable-fn has a compile bug!

21:23 devn: heh

21:24 why do you need serializable-fn, btw?

21:24 You just want to print-dup (defn foo [x] (+ 1 x)) to a file?

21:24 * TimMc gets a fork and digs in

21:24 TimMc: I don't!

21:24 Just playing around with it.

21:25 devn: ah, so honestly im not exactly sure what serializable-fn is good for

21:25 i guess it prints pretty on serialization?

21:25 TimMc: yes!

21:25 devn: but who cares? :D)

21:26 i looked at the code. it's interesting, but i can't imagine where i'd be serializing a fn where i'd prefer it be perfectly readable

21:26 serialization tends to be inherently unreadable

21:27 it strikes me that the very idea of serialization is often that it is the lowest energy state which preserves information

21:28 so i guess i don't get it when it comes to keeping it readable

21:28 TimMc: Hmm, can't figure out how the tests pass.

21:28 simonadameit1: he, that sieve thingy is definitely faster than trial division — and no stack-overflow/nil return this time

21:28 thank you guys!

21:29 amalloy: huh? the point of serializable-fn is that functions aren't serializable without it

21:30 TimMc: i was the last one to touch serializable-fn. what goes wrong?

21:30 qbg: simonadameitl: Got it implemented?

21:30 simonadameit1: code is here: https://github.com/schaf5/euler-clojure-solutions/blob/master/src/euler_clojure_solutions/core.clj

21:30 qbg: well … my version of it, no multi-map like in haskell

21:31 qbg: I did a map to a set, did you do the same thing?

21:31 simonadameit1: qbg: no, i push out the iterator as far i can till i find an empty slot

21:31 devn: amalloy: that's false though. why couldnt code just be written to a file and have read-string called on slurping it? that's not serialization?

21:32 simonadameit1: figured that would have the same effect with less set/map consing

21:32 devn: &(eval (read-string "(defn foo [x y] (+ 1 x y))"))

21:32 lazybot: java.lang.SecurityException: You tripped the alarm! eval is bad!

21:32 qbg: Probably a bit more work than you need towards the end of the lazy seq though

21:32 amalloy: certainly it could. but defn doesn't save the source, and you haven't handled closures yet

21:32 dgrnbrg: How do I find the first element of a sequence that satisfies a predicate? some seems to return true, not the element of interest

21:32 TimMc: amalloy: ^Writer, but no import

21:32 devn: amalloy: not trying to be snarky here: enlighten me. i don't know what you mean.

21:32 amalloy: (comp first filter)

21:33 qbg: ,(first (drop-while odd? (range)))

21:33 clojurebot: 0

21:33 dgrnbrg: thanks :)

21:34 amalloy: devn: (let [x 1] (fn [y] (+ x y))). if i pass you a pointer to that function, how do you serialize it?

21:34 simonadameit1: qbg: did you look at the code? — the build-primes reads well to me

21:34 amalloy: or even just (fn [x] x) - you can't serialize that either, because you don't have the source

21:34 brehaut: qbg: that doesnt do what you think it does

21:35 devn: amalloy: so what is the pragmatic use of such a thing?

21:35 amalloy: *shrug*

21:35 brehaut: ,(map #(first (drop-while odd? %)) [[1 2 3] [2 3 4]])

21:35 clojurebot: (2 2)

21:35 devn: &(def foo (eval (read-string "(fn [x] (+ x 1))")))

21:35 lazybot: java.lang.SecurityException: You tripped the alarm! eval is bad!

21:35 amalloy: that's technomancy's problem. but for one thing it lets you send functions over the wire

21:36 devn: couldn't you just make functions on the other end of the wire?

21:36 qbg: Yeah, no drop-until. The filter solution is better

21:36 TimMc: amalloy: What I can't figure out is how ^Writer causes a problem when I (use ...) serializable-fn, but not when it is :use'd in the tests.

21:36 dgrnbrg: amalloy, you can register a java agent and intercept the byte code of the function, then send that

21:37 brehaut: relying on the bytecode of compiled clojure is a risky proposition

21:37 devn: i guess it's just an interesting bit, and im cool with that, but it just seems sort of contrived

21:37 like that's a general use case or something

21:37 amalloy: TimMc: clojure versions? maybe the one serializable-fn uses is more forgiving of broken typehints

21:38 devn: klauern: hello!

21:38 amalloy: yeah, i think 1.3 is stricter than 1.2 in that regard

21:38 TimMc: send a pull request: definitely a bug

21:39 qbg: simonadameitl: Yeah, that looks pretty good

21:39 TimMc: amalloy: Yup, it's a 1.2/1.3 thing.

21:40 and will do

21:40 devn: amalloy: im not trying to ruffle feathers, i just dont see, despite how interesting it is, why anyone would make that their common practice

21:47 simonadameit1: qbg: im thinking about moving the lazy-seq part down, so I can use (recur..) to find the next prime

21:47 but it seems to mean always computing one more than needed

21:48 muhoo: hmm, how production-ready is aleph?

21:48 the readme says "Aleph is meant to be a sandbox for exploring how Clojure can be used effectively in this context", but maybe he's just being modest, i dunno.

21:51 simonadameit1: oh, actually it works fine without computing too much.. and the speed improvement of recur is quite much :)

21:53 alexbaranosky: what is the canonical function for getting every permutation of a sequence?

21:57 muhoo: alexbaranosky: doseq?

21:57 brehaut: surely for would be a better choice

21:57 or mapcat

22:01 TimMc: alexbaranosky: I doubt there's a core fn.

22:02 $findarg set (% [1 2]) #{[1 2] [2 1]}

22:02 lazybot: []

22:03 alexbaranosky: clojure.math.combinatorics

22:03 https://github.com/clojure/math.combinatorics/blob/master/src/main/clojure/clojure/math/combinatorics.clj#L159

22:03 TimMc: &(require 'clojure.match.combinatorics)

22:03 lazybot: java.io.FileNotFoundException: Could not locate clojure/match/combinatorics__init.class or clojure/match/combinatorics.clj on classpath:

22:03 TimMc: &(require 'clojure.math.combinatorics)

22:03 lazybot: java.io.FileNotFoundException: Could not locate clojure/math/combinatorics__init.class or clojure/math/combinatorics.clj on classpath:

22:06 bbloom: does this room have a preferred paste bin?

22:07 brehaut: refheap or gist ?

22:07 bbloom: thx

22:07 muhoo: ~paste

22:07 clojurebot: paste is http://gist.github.com/

22:08 muhoo: heh

22:08 ~paste is also http://refheap.com

22:08 clojurebot: Roger.

22:08 muhoo: ~paste

22:08 clojurebot: paste is https://gist.github.com

22:08 muhoo: :-/

22:08 brehaut: ~paste

22:08 clojurebot: paste is http://gist.github.com/

22:08 bbloom: what's the ~ operator do for clojurebot?

22:08 muhoo: if you insist

22:08 TimMc: muhoo: Multiple factoids.

22:09 muhoo: And a broken forgetting mechanism.

22:09 brehaut: bbloom: it just addresses the bot

22:09 TimMc: bbloom: It's the factoid trigger.

22:09 bbloom: gotcha

22:09 brehaut: clojurebot: paste

22:09 muhoo: ~guards

22:09 clojurebot: paste is https://gist.github.com

22:09 SEIZE HIM!

22:09 brehaut: clojurebot: guards

22:09 clojurebot: SEIZE HIM!

22:10 brehaut: i dont think its specifically for factoids

22:10 TimMc: hmm

22:10 brehaut: ~3d6

22:10 clojurebot: excusez-moi

22:10 brehaut: ~ roll 3d6

22:10 clojurebot: Excuse me?

22:11 brehaut: clojurebot: 3d6

22:11 clojurebot: No entiendo

22:11 bbloom: qbg: This is what I came up with: https://refheap.com/paste/809 simple enough!

22:11 brehaut: 3d6

22:11 clojurebot: 15

22:11 brehaut: fne

22:12 so i think ~ / clojurebot: works for ticket lookups, code lookups, google searches, seens, epigrams and factoids. everything else doesnt require nicks or ~

22:13 haha 0.1% of the time clojurebot reacts to stuff that isnt addressed to it

22:13 amalloy: bbloom: (. obj method) exists specifically so that you don't have to keep constructing (.method object) in macros

22:14 bbloom: amalloy: even better! thanks

22:14 amalloy: brehaut: you've never noticed? he's a pain

22:14 brehaut: amalloy: ive noticed, but never understood why. now i do

22:14 amalloy: he's cute, though, so he stays that way

22:15 brehaut: i had assumed there was a rule i didnt understand

22:15 turns out it was much simplier than i realised

22:16 bbloom: amalloy: new and improved: https://refheap.com/paste/810

22:16 i'm confident enough with clojure now to write things that work the first time…. but i still don't have the feel for how it should look right away

22:19 amalloy: it's rather nicer if you use ` rather than list, imo: `(~name [this# ~@args] (. this# ~name args)). but are you sure the nesting/parens are right there? it looks like it will generate (. foo put (1 2)), whereas i thought the syntax was (. foo (put 1 2))

22:19 bbloom: just did that: https://refheap.com/paste/811

22:19 :-)

22:20 amalloy: &(macroexpand '(.put foo 1 2))

22:20 lazybot: ⇒ (. foo put 1 2)

22:20 amalloy: the parens are optional either way, of course, so you can just splice with ~@args and avoid the question

22:20 bbloom: yeah the ~@ seems nicer

22:20 muhoo: ooh cool

22:20 bbloom: the ~' is a bit weird, but makes enough sense

22:20 amalloy: ~'this is tacky IMO

22:20 clojurebot: In Ordnung

22:20 bbloom: i figure you get used to it

22:20 amalloy: so what's the right thing to do?

22:20 amalloy: this#, as i suggested

22:20 bbloom: oh dur

22:20 gensym

22:20 right

22:20 muhoo: ~'this

22:20 clojurebot: 'this is tacky IMO

22:21 muhoo: heh

22:21 amalloy: you might also destructure :name and :parameter-types instead of looking them up as keywords

22:21 (defn- delegate-method [{:keys [name parameter-types]}] ...)

22:23 bbloom: i guess i could gensym for all the args too, huh?

22:24 https://refheap.com/paste/812

22:25 amalloy: repeatedly takes a count argument

22:25 bbloom: … of course it does

22:25 heh

22:26 https://refheap.com/paste/813

22:27 ok, that's looking pretty good in my book :-) going to go eat… which i had planned on HOURS ago…. thanks for all the help guys!

22:28 muhoo: optionally. i've seen repeatedly with no count before

22:28 it's fun, like typing "yes" at a unix command prompt

22:33 devn: Overwrite /, [yes/no]

22:33 super fun.

22:38 bbloom: …. i just ran `man yes`

22:38 i'm not exactly sure what i'd use that for....

22:38 lol

22:38 $ which no

22:38 no not found

22:38 *sigh*

22:39 Apage43: bbloom: $ yes no

22:39 bbloom: well of course

22:40 http://en.wikipedia.org/wiki/Yes_(Unix)

22:40 well that's super informative....

22:50 johnmn3: g'day

22:51 I bought a super low budget VPS (6 bucks a month)

22:51 unfortunately, when I attempt to do a: lein run

22:52 Caused by: java.io.IOException: java.io.IOException: error=12, Cannot allocate memory

22:52 now, the specs on the box aren't horrible

22:52 1GB ram, burstable to 1.5

22:53 and free thinks it has 1.5

22:53 and free says I'm using only 166 megs

22:53 so I'm not sure why it is doing this

22:53 So I've been looking into what the ways are to configure jvm boot options for leiningen

22:54 so I added this to the project file:

22:54 :jvm-opts ["-Xmx512m"]

22:54 is that the correct course of action, and, if so, did I execute that correctly?

22:56 by the way, running "lein help" returns the help menu, without causing a memory error... hmm, maybe only the bash file is running and no java?

22:56 going to try lein new again

22:56 k, lein new test2 works with no errors

22:56 anyone ever seen this error on a low budget box.

22:57 ?

23:00 emezeske: johnmn3: Maybe try "lein trampoline run"

23:00 johnmn3: I think that runs the app in-process instead of spawning another JVM

23:01 amalloy: bbloom: it's hard to imagine what you'd use identity or constantly for in clojure, and yet they're indispensable

23:01 johnmn3: attempting

23:03 muhoo: how do i specify which symbols to use in use? (use 'foo.bar :only ['baz]) does not work

23:03 bbloom: amalloy: identity and constantly make perfect sense to me… the `yes` command in unix didn't so much… i guess i switched to unix long after commands grew -f and -y arguments

23:03 brehaut: (use '[foo.bar :only [baz]])

23:04 muhoo: ^

23:04 muhoo: ah! i have to quote the whole damn list. got it, thanks

23:04 johnmn3: failed

23:04 muhoo: works, thanks

23:04 emezeske: johnmn3: Doh!

23:04 johnmn3: different failure

23:04 arohner: muhoo: it's not required to quote the whole list, but you do need a seq around "foo.bar :only [baz]")

23:05 johnmn3: SIGSEGV

23:05 ld-linux

23:05 arohner: muhoo: (:use '[foo.bar :only ('baz)]) or (:use ['foo.bar :only ('baz)])

23:05 johnmn3: It probably has something to do with the fact that I'm paying 6 bucks a month for a vps

23:05 arohner: erm, the inner ' quote on the left one isn't necessary

23:05 amalloy: arohner: the first one there won't work. too many quotes

23:05 emezeske: johnmn3: Yeah, segfault seems like it's probably not Java's fault

23:05 arohner: yeah, typo

23:06 muhoo: johnmn3: where can you get a vps for only $6/mo!?

23:06 cheapest i've seen is like $20/mo at linode, and like $60/mo at aws

23:06 johnmn3: I know, crazy, right?

23:07 muhoo: http://www.lowendbox.com/blog/urpad-5-99month-1024mb-openvz-vps-in-dallas-tx/

23:07 * gfredericks just came across a function that lets a new atom, performs 8 conditional swaps, derefs and returns

23:07 amalloy: the extra $14 seems to buy you a jvm that functions

23:08 johnmn3: but I may check these guys out if urpad doesn't work

23:08 http://buyvm.net/

23:08 muhoo: ah, openvz. not "real" virtualization, but useful

23:08 johnmn3: right

23:08 muhoo: and cheap

23:09 johnmn3: buyvm has some kvm options

23:09 clojurebot: I don't understand.

23:09 gfredericks: clojurebot: buyvm |has| some kvm options

23:09 clojurebot: Alles klar

23:09 johnmn3: but the 1GB ram costs 20.00

23:09 muhoo: wow, $15/YEAR? damn that's good

23:09 johnmn3: yea, but that's 128 ram

23:10 can you run clojure apps on that?

23:10 with leiningen?

23:10 emezeske: That's why I'm going with google app engine

23:10 johnmn3: geez, low budget clojure is a blog post waiting to happen

23:11 emezeske: Free, and it works

23:11 johnmn3: yea, I guess GAE and Heroku deserve an honerable mention

23:11 muhoo: heroku free too, up to a point

23:11 emezeske: For apps that aren't going to see much traffic

23:11 johnmn3: I deployed to heroku before, but there's something about having root access

23:11 emezeske: Yeah, GAE costs $$$ if you have any decent traffic

23:11 If you want root access, pay for a linode :)

23:12 johnmn3: I did

23:12 emezeske: But...?

23:12 johnmn3: I just don't use it enough to warrant 20 bucks a month

23:12 muhoo: well, openvz gives you root access, and the abillity for them to keylog you :-)

23:12 johnmn3: Is KVM unrootkitable?

23:13 muhoo: actualy kvm can probably be rootkitted too

23:13 johnmn3: If you don't have physical access...

23:13 muhoo: but it is SO easy to jump into an openvz container as root

23:13 vzctl enter xxx

23:13 bang, they've rooted you

23:14 johnmn3: yea, probably shouldn't host host any storefronts on a 6 dollar boxes

23:15 muhoo: or any shared hosting, but people do it

23:15 some are better than others. i love nearlyfreespeech.net

23:15 but, alas, they only do PHP natively :-(

23:30 gtrak: anyone know how to turn off a note on an overtone definst?

23:34 devn: (stop)

23:34 gtrak: doesn't that kill everything?

23:34 devn: (inc)

23:35 You could cheat if it has a freq and (ctl inst-name :note 0) or something

23:35 gtrak: ah

23:35 devn: otherwise im afraid im not too much help

23:35 im sure there's a cleaner way

23:36 perhaps you could (stop inst)

23:36 or something like that

23:37 gtrak: (ctl mooger :note 0) did something!

23:37 devn: yes but it is technically still playing

23:37 gtrak: yea... not quite right

23:37 devn: it's just outside your range of hearing it :)

23:37 gtrak: I really need an example

23:38 devn: gtrak: i think the examples/* dir in the overtone project is chock full of examples

23:38 gtrak: haha, I need just one, unfortunately

23:38 devn: it might take some hunting, but i recall stopping a specific instrument being in there

23:38 gtrak: the right one :-)

23:38 alexbaranosky: devn: still hoping to see the audible report failures issue :)

23:38 devn: gtrak: inspect the args stop takes

23:38 alexbaranosky: *sigh* I've slipped again haven't I?

23:38 I want to do _ALL THE THINGS_

23:39 gtrak: this looks right: :note-off (ctl (get @notes* (:note event)) :gate 0)

23:39 devn: badda bing

23:39 bbloom: is there a useful syntax for macros that expand to include metadata/type-hints? or is with-meta the best bet?

23:39 devn: that looks right to me as well gtrak

23:39 gtrak: erm, maybe

23:40 gtrak: why :gate 0

23:40 gtrak: :note-off ought to be enough I think

23:40 gtrak: hmm, not sure, it's in the midi example

23:40 i think note-off is the actual midi message

23:40 there's a map of currently-playing notes

23:42 devn: gtrak: there used to be a (kill n) sort of thing

23:42 so when you play (inst), it returns a value, like 24 or something

23:42 you used to type (kill 24)

23:42 gtrak: ah

23:42 devn: stop may be that now, stop may take args, so you might try that

23:44 gtrak: kill did something, I heard a pop

23:44 devn: heh, im not sure that's a good thing :)

23:44 gtrak: haha

23:44 yea, seems like stuff is dead

23:44 ima try the ctl way

23:46 devn: gtrak: id say do something nice like (ctl mooger :gate 0)

23:46 followed by (kill mooger)

23:46 but again, i think there's still probably a more noble way to kill an inst in progress

23:47 gtrak: ask on the list

23:48 muhoo: in docs like this, why is it map* not map ? https://github.com/ztellman/lamina

23:48 what's the * do?

23:49 devn: muhoo: https://github.com/ztellman/lamina/blob/master/src/lamina/core/seq.clj#L248

23:49 muhoo: oh thanks, it's his own variation

23:50 devn: muhoo: *nod*, when you see foo* it generally means it's custom, private, or part of the building blocks that make a true "(map ...)"

23:51 muhoo: wow, map*, filter*, reduce*, partition*, take-while*, he's got a lot

23:51 devn: i know that's vague, but in general i just see foo* and think: "must be special in some way"

23:51 muhoo: good convention, thanks for explaining it

23:52 devn: i think it's part of an older convention that a crust neckbeard would scold me for explaining in such a reductive way

23:52 gtrak: so, now I try it with ctl, I get SEVERE: Failed attempting to send an OSC message to SuperCollider server. Reason: incorrect arglist type in OSC message /n_set. Expected an integer or a string representing a control found class java.lang.Float. Message name: /n_set Type sig: [:node-id :ALTERNATING-ctl-handle-THEN-ctl-val*] Arg list: (31 60.0 "gate" 0.0)

23:52 devn: but that's the version i go with muhoo

23:52 crusty*

23:53 muhoo: so, along those lines, foo! means it has side-effects, *bar* means it's a global variable, oops dynamic var, and baz- means it's private, right?

23:53 devn: *foo* => earmuffs, and yes, it means dynamic var as of 1.3

23:53 defn- means it's private

23:54 i don't see people use (defn- foo- []) in practice

23:54 it would still be (defn- foo [])

23:54 muhoo: ok, because it won't show up in ns-publics if it's defined with defn-, i guess

23:54 starting to figure some of this out

23:54 gtrak: devn, kill works, I just gotta keep track of the return values

23:55 arohner: muhoo: earmufs and ! are conventions, not required

23:55 devn: ^- +10

23:55 do what you think is intention revealing and correct

23:56 muhoo: fwiw you might also see this: (defn foo-p [])

23:56 muhoo: that means foo-predicate, as in (defn foo? [])

23:56 where the result is true or false

23:57 muhoo: oh, interesting, thanks. i'd seen foo? a lot of places, i.e. in core even? odd? etc

23:57 devn: that's a common lispism that has bled over, but you may see it now and then in other libs

23:57 it was new to me when i first saw it, just passing that along

23:57 arohner: oh, foo-p is hideous in clojure

23:57 we have question marks for a reason

23:58 devn: i know, i know, but CL guys come to clojure and use it now and then

23:58 muhoo: it doesn't seem idiomatic, but thanks for the heads up in case i run into ported cl code

23:58 devn: if you see this sort of thing: (defn fooParser []) (defn <|> []) etc.

23:58 that's a haskeller turned clojurian

23:58 arohner: devn: I know you know. Just discouraging foo-p :-)

23:58 devn: :)

23:58 muhoo: <|> ??!

23:58 arohner: pipe is legal in variable names, though clojure-mode seems to barf on it

23:59 devn: muhoo you can write some fun fn names in clojure, it's sort of a fun little game now and again to play with ornate ascii art fn names

23:59 muhoo: for dsls

23:59 i saw the actual lambda unicode symbol in overtone, and i went, wtf?

23:59 i don't even know how to fucking type that

Logging service provided by n01se.net