#clojure logs

2010-11-24

00:06LajlaSo why don't lists implement lFn?
00:06Lajlaraek, I bet you know this.
00:06LajlaMaybe go first/rest on true/false?
00:12replacaLajla: the IFn indexers only work on O(1) (or O(log32)) accesses. Lists are O(n)
00:13replacaLajla: Strings are a result of strings having built-in Java semantics
00:14Lajlareplaca, hmm
00:14LajlaWhat what reason i the first rule?
00:15replacaLajla: Rich doesn't like "surprise" performance hits
00:15replacaLajla: and I think this is an example of that
00:18LajlaAhh
00:18LajlaBut like
00:18Lajlait's not more or less surprise than any accessing function right?
00:18LajlaOr isn't there a generic sequence accessor?
00:19replacaLajla: nth works for anything
00:19replacabut is understood to be variant in it's performance
00:20LajlaAhhh
00:20Lajlaand can't using lFn accessing be?
00:20Lajlaalso be understood
00:20replacaif you think of maps as functions: f(k) -> v
00:21LajlaAlso, you don't really know in vectors when it's O(1) or O(log32) right?
00:21LajlaYes, I do!
00:21replacaand a vector is just a special kind of map (where k is the index)
00:21LajlaYes I do!
00:21LajlaI like that.
00:21LajlaAnd like, sets being maps where k = v
00:21replacathat's what's getting executed in the (m k) style
00:21replacaexactly
00:22replacaand lists don't seem to follow that model
00:22replaca(and least to Rich)
00:22replacain fact, I *do* find that I'm using maps and vectors as substitutes for "real" functions
00:23LajlaYeah, but why don't lists?
00:23replacabecause lists are not innately indexable
00:23LajlaAnd can't lists at least be f : {true,false} -> V
00:23replacayou have to walk them
00:23LajlaAhh
00:23LajlaYeah, I guess like, it's not primitive.
00:23replacaright
00:24replacanow, that doesn't mean you're argument is without merit, and I get where you're coming from
00:24replacabut I think that was basically Rich's logic
00:25replacaso as a matter of style, we really only use that (m k) style when we mean for the map (or vector) to be a function
00:25LajlaYeah, I guess.
00:25replacain that context
00:26LajlaAhhh
00:26LajlaI guess.
00:26LajlaRich is dictator in perpetuo.
00:26replacaand we use nth, get, or (:key m) when we're doing lookups
00:27replacayup, and we're all the better for it, even if we disagree about a feature here or there
00:27LajlaFor some decisions though, I want to stab him, and have him look at me, and say και συ, τηκνον;, and then I'll reply with 'What on earth are you saying mate?'
00:27LajlaClojure is one of those languages for me which is really nice in some spots, but really awful in others.
00:27replacabut I do find I end up agreeing with him a lot of the time after things have soaked in
00:27LajlaKind of like French.
00:28replacaHmmm - I'm pretty happy with the language itself
00:28replacasome things like error messages have room for improvement
00:28replaca(but folks are working on them)
00:29LajlaI was hoping that you mentioned the lack of TCO.
00:29LajlaBut I do love how vectors and hash maps evaluate to their evaluations
00:29LajlaIt almost makes me wish that lists did so as well.
00:30LajlaAnd a new special datum just for code was invented.
00:30replacaclojure folks typically just use vectors when they want that semantic
00:30replacaI don't care about TCO
00:30replacathere, I said it! :)
00:31LajlaI do. =(
00:31LajlaI am addicted to it.
00:32replacaYeh, I think it's just a fixation.
00:32LajlaBut clojure is kind of oddball in how it treats functional programming, I'd say its a paradigm on its own.
00:32LajlaNahh, I use mutual recursion quite often.
00:32replacaWhen I'm writing big systems in production, the lack of TCO is not a pain point at all
00:33replacaas far as I can tell, all functional languages are oddballs relative to ech other
00:33replacaexcept maybe OCaml and F#
00:34LajlaI wouldn't say that per se.
00:34LajlaBut clojure's treatment of generics is unusual I guess.
00:34LajlaHow functions can accept multiple types which are often structurally unrelated.
00:34replacawell, clojure is a dynamically types language
00:34replaca*typed
00:35LajlaUsually, functional languages become obsessed with structural perfection to the point that it becomes impractal.
00:35LajlaWell, not that.
00:35LajlaBut like, for instance, in clojure it's quite possible that a function accepts strings.
00:35LajlaAnd when you give it a character
00:35replacato varying degrees, yeah
00:35Lajlait just treats it like a string of length 1
00:35LajlaMost functional language eschew such things because it's not 'mathematically elegant' if you get what I mean
00:35replacayup
00:36replacaI've ridden the Haskell train
00:36replaca:)
00:36LajlaYeah, it's not per se a thing of dynamic typing, scheme would also not do that.
00:36replacabut rich type systems are just one part of functional programming
00:37LajlaIt's more 'elegance over practicality' I guess
00:37LajlaAnd well, it _could_ go wrong.
00:37replacaLajla: really, where is scheme different in that than Clojure
00:37replaca?
00:38LajlaAs in functional programming, functions tend to in some way be isomorphic to mathematical definitions, and if the definition is 'inconsistent', you often get infinite recursion or something nonsensical.
00:38LajlaWell, scheme would pretty much never do that.
00:38LajlaSuch 'conveniences'
00:38replacaI don't think Clojure really does either
00:38LajlaIt would either do something different with that character, or report a type error.
00:38LajlaWell, like
00:38Lajlathe -> macro.
00:38replacaUnless you mean at the protocol/interop level where you overload a function
00:38LajlaLike (-> f y x z)
00:39LajlaIf y x z are symbols it does something fundamentally differetn then when they are lists.
00:39replacawhy couldn't you do the same thing in Scheme
00:39replacaI can do that in CL.
00:39LajlaScheme would say you have to use (-> 1 (inc) (inc) and not (-> 1 inc inc)
00:39LajlaWell, you can.
00:39LajlaBut the standard will never do that.
00:39Lajlaand it's seen as 'un scheme'
00:39replacathe macro just looks at what they are when it's expanding
00:40replacaoh yeah, that's a stylistic difference
00:40LajlaYeah, but such things are generally eschewed in functional programming langauge.
00:40LajlaAnd clojure does do these things quite often, because it's practical.
00:40LajlaWhereas most functional languages tend to favour 'mathematical elegance'.
00:40replacayup and because it makes java interop better
00:40replacayup, no doubt
00:41LajlaMost functional langauges would also not care that much about java interop. =P
00:41replacato greater or lesser degrees
00:41LajlaBut these things somewhat make me 'uncomfortable' I guess, I would write (-> 1 (inc) (inc) (inc)) myself.
00:41replacafor example, Scala is closer to Clojure on that scale, though with a different set of design desicions
00:42replaca*decisions
00:42replacaI think you get used to the idiom and it becomes transparent
00:42replacasimilar discussions happen in the Haskell world about how far to take point-free expressions
00:43Lajlareplaca, hmm, explain?
00:43LajlaYou mean point free function definitions?
00:44replacawell you an use point-free expressions all over and it's not defining a function per se
00:44replacaand it's mind warping when you start to read code that does that a lot
00:45replacabut then you get used to it and you find that it's actually a pretty natural way to express yourself
00:45LajlaAhhh
00:45Lajlabut point free expressions retain the mathematical elegance.
00:45LajlaMore so than non point free I would say.
00:46replacaright, but lots of folks don't like them cause they feel opaque
00:46LajlaIt's not about redability so much as that in the case of (-> 1 inc) it checks to what inc evaluates, and in the case of (-> 1 (+ 1)) it doesn't check what the (+ 1) expressione valuates to, but just inline inserts it.
00:46LajlaI love these people that express reasonably complex list operations by folding ( : ) and all that though. =P
00:47replacaI know, that's the part I miss in Clojure
00:47LajlaThe only one I can do I think is append x y = foldr ( : ) y x
00:47LajlaNot TCO?
00:47amalloyLajla: -> doesn't check what inc evaluates to at all
00:48amalloy&(macroexpand '(-> 1 bamboozle))
00:48sexpbot⟹ (bamboozle 1)
00:48amalloyit just sees that it's a symbol rather than a list
00:48replacaLajla: nope. I tend to use lazyness more often
00:48replacaor HOFs that give me lazyness
00:49replacaamalloy: that's right, the whole thing is done *before* evaluation starts as a structural transformation
00:49replacaa game that's mostly unique to lisps
00:50amalloyreplaca: of course. lajla sounded like he might be confused about that
00:50replacaamalloy: yup, just expanding on your point a little
00:53amalloyLajla: and if you think about it, it couldn't possibly work even if there were a way for ->> to know what type the expression evaluated to: ##(macroexpand '(->> x (fn [x])))##(macroexpand '(->> x ((fn [x]))))
00:53sexpbot(macroexpand (quote (->> x (fn [x])))) ⟹ (fn* ([x] x))
00:53sexpbot(macroexpand (quote (->> x ((fn [x]))))) ⟹ ((fn* ([x])) x)
00:53KirinDaveMan I wish I hadn't missed the start of this conversation
00:54replacaKirinDave: I'm not sure it's *that* exciting :)
00:54amalloyKirinDave: http://clojure-log.n01se.net/date/2010-11-24.html has most of it
00:54amalloybut it's not that interesting really
00:55Lajlaamalloy, yeah, sorry, my phrasing was bad.
00:55LajlaI meant that in the case of a symbol, it inserts it like that, and with a list, it does some thing that is totally unrelated.
00:56replacaLajla: makes sure it's a list and adds the predecessor as the 2nd element
00:56replacasimple enough
00:56LajlaYeah, but it does a completely unrelated thing if it's a symbol.
00:56LajlaMaybe it works out on the 'conceptual' level.
00:56replacaLajla: no, it makes sure it's a list
00:56amalloyLajla: you keep using that word. i don't think it means what you think it means
00:56LajlaBut on the mechanical level it's bizarre.
00:56replacathat was the first part
00:57Lajlathe -> macro performs two completely unrealted operations depending on whether it ś a symbol or a list.
00:57Lajlaunrelated*
00:58amalloyLajla: (factorial n) does two completely unrelated operations depending on whether n is greater than one
00:58LajlaYap
00:58replaca,((fn [x] (if (list? x) x (list x))) '(a b c) )
00:58clojurebot(a b c)
00:58Lajlaand that is why I do not like such a definition of factorial.
00:58amalloyit's like you're objecting to the fact that clojure has an (if) form
00:58replaca,((fn [x] (if (list? x) x (list x))) 'a )
00:58clojurebot(a)
00:58LajlaEither generalize it to all numbers, or live with the fact that it doesn't terminate if it ś negative.
00:59replacasame operation as the first step
00:59KirinDaveLajla: That seems like an impractical stance.
00:59LajlaMaybe, but avoiding it makes me uncomfortable using a language.
00:59amalloyLajla: if you prefer, it does something different when n is 1 (return 1) than when it isn't (do some multiplication)
00:59KirinDaveLajla: Besides, we can't express all numbers on our computers :)
01:00LajlaWell, let me rephrase, all numbers it doesn't give a type error on.
01:00KirinDaveThere's always more of them, you see? :D
01:00LajlaI'd rather have two different macros for both cases.
01:00replacaLajla: even in mathematics, that's not a useful definition
01:00Lajlareplaca, what isn't?
01:01replacaFactorial not special-casing 1
01:01LajlaOh, I wasn't talking about that.
01:01replacaok
01:01LajlaI mean
01:01Lajlaíf you supply a negative number.
01:01LajlaYou can either guard against that
01:01LajlaOr accept that it goes on forever.
01:01LajlaYou can let it report an error.
01:01LajlaWhich is cool with me.
01:02LajlaOr say that the factorial number of negative numbers is like 1.
01:02LajlaWhich is quite commonly done.
01:02replacaok, but how does that relate to -> ?
01:02LajlaUse (<= 0 n) instead of (zero? n)
01:02KirinDavereplaca: He wants function definitions to be continuous.
01:02LajlaWell, the idea is that factorial then performs two functions which I think should have different names.
01:02replacaYou mean to accept all elements of the domain
01:03LajlaAt the very least, it's not the factorial function
01:03amalloyKirinDave: that's an interesting way to think about what he's saying
01:03Lajlathe factorial function is only defined on naturals.
01:03KirinDaveLajla: Lots of functions are defined as different operations within ranges.
01:03LajlaKirinDave, sure.
01:03LajlaBut those more often than not freak me out.
01:03LajlaAnd are more often just approximate modeling of real life cases.
01:03KirinDaveLajla: Then recursion must make you tremendously uncomfortable, as must induction.
01:03LajlaThan something that follows from some elegant mathematical result.
01:03replacaLajla: the real world is like that
01:03Lajlareplaca, well, an approximate model of the real world is like that.
01:04replacaeven in advanced math
01:04LajlaKirinDave, the difference is in the case of recursion is that there is a base case, and not a base range.
01:04LajlaAnd it's actually still 'continuous' then quite often, as you phrased it.
01:04LajlaLike, the definition of the factorial.
01:04amalloyLajla: how do you feel about fobonacci numbers?
01:04LajlaWhere 0 is the base case.
01:05LajlaI'm also fine with that.
01:05amalloy*fib
01:05replacaIn response to Lajla, I'll make KirinDave's night with http://xkcd.com/224/
01:05LajlaBut my point about the -> macro is that, to my intuition/feeling, it perofrms two unrelated operations.
01:05KirinDavereplaca: Haha. You did the opposite
01:05LajlaAnd I'd rather see those have different names.
01:05KirinDavereplaca: I am one of the writers for xkcdexplained.
01:05replacaKirinDave: that was sarcasm, I know that :)
01:06LajlaWhat is xkcdexplained?
01:06KirinDaveLololol
01:06KirinDaveI never know
01:06KirinDaveActually I haven't written there for months.
01:06KirinDaveIan finally kicked off.
01:06amalloyLajla: i'd wager that it's xkcd, explained
01:06KirinDaveWe couldn't take it.
01:06LajlaExplained to whom?
01:06LajlaYou mean people who are not as smart as I and don't get them on their won?
01:06KirinDaveLajla: Why not check out the site?
01:06LajlaAh
01:06replacaKirinDave: nonetheless, there are a few (like that one) that I simply can't resisit
01:06Lajlayou could not explain the mutual dream one.
01:06replaca*resist
01:07KirinDavereplaca: He hits a few good ones.
01:07LajlaKirinDave, I'm not too pleased with your explanation of the knuth joke.
01:07LajlaI think the principle of explosion deserves a mention.
01:08LajlaBut
01:08Lajlathe strip is actually incorrect.
01:08LajlaThe idea is I think that by exploding logic, she proves that all statements are true, including the negation of any statement.
01:08LajlaBut that does not disprove anything.
01:08replacaI think that we need an existence proof of something Lajla *is* happy with before proceeding :)
01:08LajlaThat's the fun thing a lot of people misunderstanda bout it.
01:09LajlaIt proves that all statements are true, including for intance that the system is consistent
01:09Lajlaand that it's not consistent at the same time.
01:09LajlaThe whole fact that you can disprove statements by proving their negation relies on the assumption that the model is consistent.
01:09LajlaYou can't really disprove statemnets any more by proving their negation once the model is inconsistent. =P
01:09Lajlareplaca, =(
01:10KirinDaveLajla: I ahven't written for awhile. But I have a favorite you might enjoy
01:10LajlaI do have dysthimia.
01:10replacaAn actual Clojure question: has "as-str" migrated to core in 1.3?
01:10LajlaKirinDave: http://thisdomainisirrelevant.net/1238
01:10LajlaHow do you like that one?
01:11replacaLajla: sorry to hear it.
01:11KirinDaveLajla: http://xkcdexplained.com/post/805553793/real-medicine
01:11LajlaTHat one is also incorrect.
01:11LajlaI know that one.
01:11KirinDaveLajla: Oh?
01:12LajlaIt actually inverses it.
01:12LajlaIt would be homoeopathic.
01:12KirinDaveI can't make heads or tails of what you're saying.
01:12LajlaIf semen praevented pregnancy.
01:12LajlaNot caused it.
01:12KirinDaveIndeed.
01:12dthomasCan anyone tell me what the equivalent of (vec collection) is for lists? Just (apply list collection)?
01:12LajlaOr ehh
01:12LajlaThe reverse
01:12Lajlaif it was a homeopathic anti-conception means
01:12amalloydthomas: list* should work, i think
01:13KirinDaveLajla: Most people don't understand the actual rules of homeopathy.
01:13amalloy&(list* [1 2 3])
01:13sexpbot⟹ (1 2 3)
01:13KirinDaveLajla: That they actually use a "law of sympathy"
01:13KirinDaveAs a preventative.
01:13replacaKirinDave: so if we do understand, are we any better off?
01:13KirinDavereplaca: Oh no. The whole thing is absurd
01:14KirinDavereplaca: But that explanation touched off a firestorm.
01:14replaca(since asking about Clojure is getting me nowhere :))
01:14KirinDavereplaca: We actually got ddos'd for it.
01:14replacaKirinDave: excellent! that's an accomplishment
01:14KirinDaveI was pleased.
01:14LajlaKirinDave, I guess most people think homoeopathy is basically 'natural cures'
01:14_msthomoeopathic DoS attacks... one packet an hour or something?
01:15KirinDave_mst: Haha
01:15LajlaLittle do they know that there is no difference between 'natural' and 'unnatural'and that advertisement guys just invented that.
01:15KirinDave_mst: Content-Length attacks could work that way.
01:15Lajla_mst, that would be a homoeopathic guard against DoS
01:15Lajlareplaca, also, dysthimia is not that bad I guess, especially because you never knew any other.
01:16dthomas&(list? (list* [1 2 3]))
01:16sexpbot⟹ false
01:16LajlaIt's more of a 'symptomal' disease I guess, in that people who have it would have accepted it as normal because it's all they know and just display symptoms like lack of sleep, energy, appitite et cetera.
01:16replacaLajla: I think it's natural that we all feel like the balance we have is the only one to have
01:17LajlaYeah
01:17LajlaIf someone asks me 'are you unhappy', I can't really answer that, I have nothing to compare it to.
01:17dthomasamalloy: So the result of list* doesn't seem to be a "list," is that right?
01:17replacaLajla: the cheerleaders feel the same way at the other end of the spectrum
01:17LajlaAll I know is that I display certain outward symptoms associated with it.
01:17LajlaYeah, I guess.
01:17LajlaIt's a philosophical thing.
01:17LajlaLike 'when I see green, do I see the same green others think'
01:17replacayup
01:18amalloydthomas: right, it's probably a lazy-seq. but that will behave like a list in every way i can think of
01:18amalloy&(map class (apply list [1 2 3]) (list* [1 2 3]))
01:18sexpbotjava.lang.IllegalArgumentException: Wrong number of args (2) passed to: core$class
01:18amalloy&(map class [(apply list [1 2 3]) (list* [1 2 3])])
01:18sexpbot⟹ (clojure.lang.PersistentList clojure.lang.PersistentVector$ChunkedSeq)
01:19dthomasamalloy: You may be right about that, that this code will work despite it not actually being a list.
01:20amalloydthomas: most code will work fine on any seq
01:20LajlaBut to be honest, I'm not so sure about the desirability of 'happiness', a lot of recent studies seem to suggest that truly ignorance is bliss. And happiness is basically caused by just ignoring any bad news or finding a way to not believe in it.
01:20amalloywhat are you doing that you think you need a list for?
01:20LajlaAre lists used in clojure often for anything but code?
01:20dthomasamalloy: Reading forms from Emacs/SLIME in the Clojure swank server.
01:21replacaLajla: lists are useful when you want to be able to add at the front cheaply
01:23LajlaAhh
01:23Lajlayeah
01:23LajlaHow well does this conj work in generic code by the way?
01:23LajlaI mean, with lists adding the other way than vectors
01:25amalloydthomas: what about just seq? ##(seq [1 2 3])
01:25sexpbot⟹ (1 2 3)
01:25amalloy##(conj (seq [1 2 3]) 0)
01:25sexpbot⟹ (0 1 2 3)
01:27dthomasamalloy: Certainly seems to have the same effect as list*.
01:28dthomasamalloy: (In this case where I have just one collection.)
01:28amalloydthomas: list* isn't really designed for this nonsense; it's actually the same as (apply list) but i thought of it first :P
01:28RaynesMan, don't use ## when it's the first thing in the message. :\
01:28amalloyRaynes: the # key is easier for me to find than &
01:29RaynesMaybe so, but it's a more limited form of evaluation designed for embedded code that people unfamiliar with him might thing is the shoddy default.
01:29Raynesthink, even
01:29amalloyif this is wrong, i don't want to be right
01:29RaynesYou make sexpbot cry.
01:30amalloy$kill Raynes
01:30sexpbotKILL IT WITH FIRE!
02:47amalloythanks clojurebot
02:49replacawow that was impressive
02:49replacaI caused that by checking in a fix to java-utils
03:00amalloy$mail hiredman fyi, around midnight pacific time clojurebot sent this message five times in as many seconds: (notice) [clojure/clojure-contrib] null - null (null) null
03:00sexpbotMessage saved.
03:02Raynesamalloy: He wont get that.
03:02Raynesamalloy: He has sexpbot ignored.
03:02RaynesBut your highlighting should suffice.
03:02amalloyRaynes: i figured one or the other would do it
03:03Deranderhot
03:03kryft#clojure - a warm community
03:06amalloyheh. silent for hours, until someone drops a gay joke. good old irc
03:06replacalet's see if clojurebot spews again
03:13LajlaI like sexpbot more.
03:13LajlaIt doesn't ignore me.
03:33jackdempseyanyway familiar with lein? trying to install relevance's labrepl and i can't tell if it's lein or their project that's borked
03:35LajlaSerial Experimens Lein
03:43LauJensen"Java is a DSL for taking large XML files and converting them to stack traces" AHAHAH :)
03:47kryftLauJensen: Ouch. :)
03:48dirchhLauJensen: quite appropriate. where's that quote from?
03:49LauJensendirchh: twitter somewhere
04:02javeI want to start a repl inside a portlet running inside liferay, so I can change the code interactively. any hints?
04:11raekclojure.main/repl
04:12jave`Thanks
06:19bartjhow do I print the unicode code-points of a string?
06:24raek,(map int "åäöčšž")
06:24clojurebot(229 228 246 269 353 382)
06:27bartjraek, I thought unicode code points were something like this: \u00a0
06:27bartjif no, then what is \u00a0 ?
06:28dreamrealbartj: code points are integers, too. \u00a0 is an escaped form of a hex value.
06:28bartjdreamreal, thank you; but I am unable to get the hex value of \u00a0
06:29dreamrealyou don't know what a0 is in decimal?
06:29dreamreal,(map char 160)
06:29clojurebotjava.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer
06:30dreamrealdarn it, had to try :)
06:30dreamreal(I don't know clojure)
06:30Tordmor,(map char '(229 228 246 269 353 382))
06:30clojurebot(\å \ä \ö \č \š \ž)
06:30dreamreal,(map char '(160))
06:30clojurebot(\ )
06:30dreamrealthere you go.
06:34bartjdreamreal, Tordmor thank you very much
06:34bartjthe wierd thing is that 160 looks like space but it isn't!
06:35dreamrealit... doesn't.
06:35dreamreal#160 is a nonbreaking space in html, though
06:46trybeingarun(def head-fibo (lazy-cat [0 1] (map + head-fibo (rest head-fibo))))
06:46trybeingarunThis is from programming clojure
06:47trybeingarunCan anybody explain how this works?
06:47Chousuketrybeingarun: lazy-cat doesn't actually evaluate all the expressions immediately
06:48trybeingarunOkay
06:48trybeingarunMy first question is what is map expected to do here?
06:48trybeingarunWhen map is called the first time would head-fibo have been defined?
06:48Chousuke,(map + [1 2] [10 20])
06:48clojurebot(11 22)
06:48kenshoHi. Is there something like doto for static methods? This is a bit verbose: (Math/round (Math/max (Math/ceil (Math/sqrt total-area)) (* max-width 1.2)))))
06:48Chousuketrybeingarun: yes.
06:49Chousuketrybeingarun: when you def head-fibo, you just get a thunk. and then when you get to the third element of the sequence, lazy-cat evaluates the (map ...)
06:49Chousuketrybeingarun: and since head-fibo is defined by then, it works
06:50trybeingarunOkay.
06:50kenshoHi. Is there something like doto for static methods, I'd like to make this shorter: (Math/round (Math/max (Math/ceil (Math/sqrt total-area)) (* max-width 1.2)))))
06:50Chousukekensho: use ->
06:51Chousukeor you can write your own macro
06:51kenshoAh I see. I will try to wrap my head around this :) thanks
06:53ChousukeI don't think you can do much in that case though.
06:54Chousuketoo bad clojure doesn't yet have macrolet. Could write a macro like (with-statics Math [round max ceil sqrt] (round ...))
06:55trybeingarunI would like to understand lazy-seq better. Is there any good material available for that?
06:55trybeingarunI mean right from intro level material...
06:57ChousukeI don't know, but if you have something specific that you don't understand, just ask :)
06:58javeI'm having trouble overriding a method with aot and calling a super method. I get a circular call chain and a stack overflow
06:59trybeingarunI am not getting how lazy-seq works. I would like to understand what the flow for
06:59trybeingarun(take 1 head-fibo)
06:59trybeingarun(take 2 head-fibo) similarly for 3
06:59trybeingarunworks
06:59kenshoChousuke: If I understand correctly -> won't get rid of the repetive "Math" identifier. But it's possible with a custom macro?
06:59Chousukekensho: yeah
06:59kenshook I will look into macros then, thanks!
06:59trybeingarunI want to know how the synthesis of the new seq element happens
07:00Chousuketrybeingarun: a lazy seq is basically just one thing: a chunk of code that generates the rest of the sequence
07:00Chousukethat is, until it's realised
07:00Chousukeonce the element is generated, it's cached
07:00Chousukeso on subsequent accesses the code is not re-executed
07:00trybeingarunUnderstood.
07:01trybeingarunComing back to the example, how does (head-fibo) work?
07:02Chousukelazy-cat creates a lazy sequence by lazily evaluating the expressions you give to it.
07:02Chousuke:P
07:02Chousukeso it returns a thunk that at first does nothing
07:03Chousukebut when you request the first element, it evaluates the first expression (in this case, [0 1])
07:03Chousukeand takes the first element of that (after making a sequence out of it, so it actually becomes (0 1))
07:04trybeingarunOkay. I am beginning to understand it
07:04Chousukethen the "rest" of the sequence is another thunk that does the same for the next element of the vector
07:04Chousukeand the rest of that then notices there are no more elements in the vector and evaluates the next expression (the map one)
07:05Chousukewhich gives another lazy sequence; an infinite one in this case.
07:05Chousukehead-fibo is not the easiest lazy seq to explain I guess :P
07:06trybeingarunMay be.
07:06trybeingarunBut thanks man. At least I am beginning to see the point
07:06Chousukebut let's make a custom one. (defn lazy-ones [] (lazy-seq (cons 1 (lazy-ones))))
07:07trybeingarunAh, a simple one at last!!!
07:07Chousukewhen you call lazy-ones, it returns a thunk that, when you call seq on it, retuns a sequence of 1, (lazy-ones)
07:08trybeingarunokay
07:08Chousukebut since lazy-ones returns only a thunk, the recursion stops until you really access the next element of the sequence. :)
07:08Chousukein which case you get another 1 and a thunk
07:08trybeingarunThis is how it does not blow up the stack
07:09Chousukeyeah
07:09Chousukewhen the thunk is evaluated, the original function call has already completed.
07:09trybeingarunso internally it maintains some sort of a state which says how many elements have actually been realized
07:10trybeingarunand then it will have some object to compute the next element
07:10trybeingarunam i getting it right?
07:10ChousukeYou can use parameters too (defn increments [n] (lazy-seq (cons n (series (inc n)))))
07:11Chousuketrybeingarun: there's no need for that.
07:11Chousuketrybeingarun: since sequences are just linked lists of head -> rest
07:11Chousukeand the rest can be either a thunk, or another sequence which is head -> rest
07:12trybeingarunOkay.
07:12trybeingarunFine. Think I got it. Let me think abt the example you gave and also the example in the book and get back :)
07:13Chousuketry writing some simple lazy seqs yourself
07:13Chousukesee how it works.
07:13trybeingarunOkay. I will write some code with some side effects
07:13Chousukeyou can also add print statements to the function so you can see whenever one is evaluated
07:15Chousuke(let [ones (fn ones [] (lazy-seq (print "got one; ") (cons 1 (ones)))) s (ones)] (doseq [i (take 3 ones)] (print "a " i)) (take 3 ones))
07:16Chousuke,(let [ones (fn ones [] (lazy-seq (print "got one; ") (cons 1 (ones)))) s (ones)] (doseq [i (take 3 ones)] (print "a " i)) (take 3 ones))
07:16clojurebotjava.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: sandbox$eval589$ones__590
07:16Chousukeoops
07:16Chousuke,(let [ones (fn ones [] (lazy-seq (print "got one; ") (cons 1 (ones)))) s (ones)] (doseq [i (take 3 s)] (print "a " i)) (take 3 s))
07:16clojurebotgot one; a 1got one; a 1got one; a 1
07:16clojurebot(1 1 1)
07:17Chousuke(note it's not printing the "got one"s twice even though I do (take 3 s) twice)
07:18trybeingarunYa
07:20Chousuketake itself returns a lazy seq though; but in this case both of those sequences are forced to be fully realised.
07:20Chousukeone by doseq and one because it's the return value that is printed
07:24trybeingarununderstood your code and stu halloway's code dude
07:24trybeingarunI did not realize that head-fibo itself is of type lazy-seq
07:25trybeingarunnow I am getting how the sequence is being generated :)
07:25trybeingarunThanks Chousuke :D
07:28djpowellwhat's the deal with jira - it says i have an account, but i cant figure out what the password might be - were the accounts imported from assembla, without passwords?
07:50raektrybeingarun: try this: https://gist.github.com/480608
07:50raekit makes it very clear when the seq is forced
07:54raekalthough, it does not add very much to Chousuke's explanation
08:26jweiss_is there an explanation somewhere for what *ns* is exactly? Is it the namespace of the surrounding code? Can i refer to it in a macro? If so, does it refer to the namespace of the macro or the place where the macro is called?
08:27jweiss_i suppose what i'm asking is, when is the value of *ns* changed.
08:31chouserjweiss_: the value of *ns* is changed by in-ns and ns
08:31jweiss_chouser: what about at compile time
08:32LauJensenClojureQL news: 100% transparent auto-parameterization of queries now in MASTER! :)
08:32chouserjweiss_: you should be able to refer to it in a macro (not a macro expansion) and get the namespace being compiled while the macro is being expanded
08:33jweiss_chouser: the ns where the macro lives, or the ns where the macro call lives?
08:35jweiss_ok seems to be where the call lives
08:35jweiss_that's what i wanted
08:36raekjweiss_: it depends on whether you do (defmacro ... *ns* ...) or (defmacro ... `(... *ns* ...))
08:36jweiss_raek: *ns* is not quoted
08:37raekhrm.
08:37jweiss_oh hm, but i did a "use" on the ns with my macro. wonder if it behaves the same if i did require.
08:38raek*ns* is probably dynamically bound during the compilation of the macro
08:38raekand a reference to the var (not the value) is compiled into the macro
08:39raek(let [my-ns *ns*] (defmacro ...)) could perhaps be a way
08:39raekI guess it depends on what you are trying to do
08:40jweiss_raek: what i want is when i call my macro, i want the macro to get the ns-publics from the namespace I called the macro from, pull the metadata from each 'public', and create a call to gen-class
08:40jweiss_public = ns-publics
08:41jweiss_my macro works in that it generates the classes for the right namespace. but it has no annotations. but if i expand the macro myself at the repl, and paste that code in place of the call to the macro in my test file, and compile it, i get the annotations.
08:42jweiss_that's the part that i'm scratching my head about.
08:44jweiss_perhaps this has something to do with the order things are compiled
08:46chouseryour macro is itself expanding to the gen-class form?
08:46jweiss_chouser: correct
08:47chouserand you AOT compile the namespace that includes the use of that macro, and can observe that it generates the class but without annotations.
08:47jweiss_chouser: that's right
08:47chousercan you paste somewhere the macro itself and its expansion?
08:48jweiss_chouser: yes, 1 sec
08:56jweiss_chouser: https://gist.github.com/712134
09:01chouserjweiss_: testng-map is a map? Is there any chance it's values are classes instead of symbols?
09:03jweiss_chouser: i guess they're classes, i just use the class name with no quote
09:03chouserthat may be the problem
09:03jweiss_as in {:beforeSuite BeforeSuite ...
09:03chousergen-class is probably expecting symbols that name classes, not classes themselves
09:04chouserso try either quoting your class names, or in as-annotation get the symbol name of the class
09:04chouser,(symbol (.getName Integer))
09:04clojurebotjava.lang.Integer
09:05jweiss_chouser: ok thanks
09:11jweiss_chouser: THANK YOU!!! that was the problem. i could have spent days on this and never figured that out.
09:12chouserheh
09:12chouseryou're quite welcome. it's a common "gotcha" with metadata
09:12raek,java.lang.String
09:12clojurebotjava.lang.String
09:12raek,'java.lang.String
09:12clojurebotjava.lang.String
09:13chouserright
09:13raek,(map class [java.lang.String 'java.lang.String])
09:13clojurebot(java.lang.Class clojure.lang.Symbol)
09:13raektricky.
09:13jweiss_well i guess i am happy that my problem wasn't an obvious one that i should have seen myself :)
09:18AWizzArdLet's say I want to write a dynamical web application. Many people would go with html+js, but let's say I want to run the client inside a JVM instead of a Webbrowser-VM, and do it with Clojure+Swing. Now instead of html my server transfers specs (lists) out of which the client can construct the UI components and position them.
09:19chouserI wonder if it'd be worth having classes print themselves differently than symbols, and then optionally read with that syntax as well
09:19AWizzArdThe JS parts become the handlers for UI elements. To transfer those I could simply send out lists to the clients which then eval those.
09:20AWizzArdBut if I wanted to send out precompiled code, is then the best way to precompile the code on my server into a class (byte code generation) and load this from the client via Clojures DynClassLoader?
09:21chouserAWizzArd: would that be better than sending uncompiled s-exprs and having the client eval it?
09:21AWizzArdYes, that is my question basically. I am not sure about it.
09:21AWizzArdIt is a not so typical way to create a dynamic web app.
09:22AWizzArdIf it were about html+js then yes, the client code would come as open source. And the browsers compile the js then to byte code for their VMs.
09:22chouserwell, it stretches the definition of "web app" doesn't it?
09:22chouserif you send compiled Clojure code, the client and server Clojure versions would have to match up pretty well
09:22AWizzArdIn some sense yes. A container JFrame plus the JVM of course would take the role of the browser.
09:23AWizzArdThe client is just a very small application that basically just loads code from the server.
09:23AWizzArdLike an empty browser window so to say.
09:23AWizzArdOnly the server hosts the (mostly static) client code and sends it out.
09:24AWizzArdThis then tells the client how to construct itself on the other side.
09:24maravillasSounds kind of scary when you say it like that
09:24maravillas(loads code from the server)
09:24AWizzArdThis is what happens on 97% of all websites.
09:24AWizzArdThey load js into the browser.
09:25AWizzArdPretty static js files get a GET request, and get transmitted as clear text (source code) to the VM, where it gets compiled and executed.
09:25maravillasBut your browser won't have the same sandbox and security that browsers get for free
09:25maravillas"free," of course
09:25AWizzArdRight. And my browser has more rights.
09:26AWizzArdI don't know if JS can run sql queries, do ssh, do good bits of file processing, write files to the computer of the user, etc.
09:26AWizzArdAt least older versions of JS could basically just do some stuff on the client side. I want to do everything that Clojure allows, plus be able to reuse all Java libs that I need.
09:27maravillasI mentioned that as a downside :)
09:27woobywhat's the easiest way to build a maven project against a local build of clojure?
09:27AWizzArdWhen I did JS and wanted to run a sql query, then I had to do an ajax request to the server and let the server do the work.
09:28AWizzArdBut maybe JS can now do sql and basically access the right to run outside the browser sandbox, dunno.
09:29AWizzArdCurrently my plan is, like chouser said, to send out lists and let the client eval them.
09:31AWizzArdAnother option could be to try to touch the code that eval produces and send out the compiled result directly.
09:32chouserif you send compiled Clojure code, the client and server Clojure versions would have to match up pretty well
09:33AWizzArdYes. The user receives its Clojure from an initial request during application startup.
09:33AWizzArdBut it is true that this can be a disadvantage.
09:34TordmorAWizzArd: There's java WebStart that does that. Or at least has been some years ago ;)
09:34chouserdebugging a stream of bytecode will be trickier than debugging a stream of s-exprs
09:34AWizzArdTordmor: yes, I have already used that along with Clojure successfuly.
09:34AWizzArdchouser: though in principle instead of Firebug the Client could use any JVM debugger :)
09:35chouserbut without access to the source code, a JVM debugger will be less helpful
09:35AWizzArdBut yes, with code it is of course much better.
09:35AWizzArdtrue
09:39chouserAWizzArd: I was once involved in a one-day spike to do roughly what you're describing using jvm+qt for the client, sending UI code from the server in the form of jython
09:40chouserthis was before canvas tag, websockets, etc.
09:40chouserwe thought it was an interesting way to create a thin client with a rich UI
09:40AWizzArdThis solution has its own advantages and disadvantages.
09:40chouserwe called it "paris" because we couldn't think of anyone else as thin and rich
09:41AWizzArd(:
09:42AWizzArdWhat I propose will not run on ipads and Android, but on the classical OSes on desktop PCs or notebooks it will give very much control over what the client can do, run probably more efficiently than JS, and allows us to write Clojure code, instead of having Clojure+html+JS.
09:51chouserI'd rather have a nice brower-compatibility lib in JS, and clojure compiling to JS, and run all that in a regular browser client
09:53AWizzArdThis does however not solve the problem to leave the browsers sandbox, to get full control of what programs can do with a computer.
09:54chouserAWizzArd: it strikes me as a rare circumstance that that would be desirable
09:54AWizzArdFor websites that want to reach hundreds of thousands of users and just presents some content it is not required.
09:55AWizzArdBut what if you want to read data that sits in a local sql db at the client side?
09:55chouserbrowsers now come with local sql db's that can be read from js. :-)
09:56AWizzArdLet's say your program must be able to read from any db that Java can read from. Is that then also possible?
09:56AWizzArdAlso, there are useful Java libs that you may want to use on the client side. Not possible with JS (without starting a JVM).
09:57chousernot without an extra component such as a signed java applet or browser plugin, or something like a websocket adapter for your client-side db.
09:57AWizzArdBut sure, if there were a Clojure implementation written in JS which compiles to Browser-Byte-Code, then this would allow for ClojureScript running in browsers, which is nice for the typical case.
09:58AWizzArdI would more like to target a few hundred users who have specific needs. Plus there is no Clojure implementation yet written in JS as far as I know.
09:58AWizzArdOtherwise I could consider it again, though as I said, it would be pretty limited.
09:59chousernot a recent version of clojure, no.
09:59AWizzArdIf the browsers would offer a way to go around the sandbox then the browsers could become the new JVM, with JS as their low-level language, which can compile to byte code.
10:00chouserAWizzArd: http://www.mozilla.org/projects/security/components/signed-scripts.html#privs
10:00AWizzArdI am not sure that JS offers random acess to huge files, or good local file handling at all
10:01AWizzArdchouser: yes, interesting. The browsers could come to agreements and produce slowly their replacement of Java and .NET in this decade.
10:02AWizzArdLet's see how soon popular programming language implementations will be available for JS.
10:03chouserjs is already more popular than whatever language you're thinking of. :-)
10:04AWizzArdYes. It sneaked in into our homes by simplicity.
10:04chouseror by ubiquity
10:04djpowelljs is an excellent language for animating your geocities 'under contruction' marquee text
10:04AWizzArdVery light weight and simple it was, and grew over time.
10:04AWizzArdchouser: yes
10:05djpowellis there anyone around who can answer my 'how do i log in to jira' question?
10:05AWizzArdNow as it is so popular and gains and power the browser implementors can continue to build upon that base, and add all major functionality that can be found today in Java and .NET.
10:21tape_dispencerI'm having some problems using recur, there error is "Can only occur from tail position", but to me it is in a tail position. Is it appropriate to paste a 6 line function?
10:22chousertape_dispencer: please paste using paste.lisp.org, gist.github.com, or something similar
10:23chouser(if a b c) ; b and c are tail positions, a is not.
10:24chouser(if a (b (x y) (z)) (c 1 2 (+ 3 4))) ; b and c are still tail positions, as is 'if', but nothing else there is.
10:24tape_dispencerThank you, i was not aware of such a site
10:25tape_dispencerhttp://paste.lisp.org/display/116991
10:25chouserin that paste, 'cons' is in a tail position, but none of its arguments are
10:27chouserx is in the tail position of a function *only* when the return value of the whole function may be exactly x
10:27octei'm tinkering with writing a game in clojure
10:27tape_dispencerOhh really? Ahh. In you example, if is a special form, so it can't be in the tail position
10:28octekind of wondering what a functional way of having state is
10:28chouserin your paste, (fn [] (cons x y)), fn will return cons, but never just x or just y, so x and y are not tail position
10:29octei made a small test: http://paste.lisp.org/display/116992
10:29octebut that doesn't feel very scalable once the world grows
10:30tape_dispencerthank you chouser, I'll see what I can do to fix it!
10:30chouserocte: it may or may not be. Have you seen rhickey's ant demo?
10:31chousertape_dispencer: I learned about moving things into the tail position while reading "On Lisp" by Paul Graham. I'm sure there are other ways to learn it. :-)
10:31octechouser, nope
10:32chouserocte: he uses one ref for each cell of the board, plus one agent per ant moving on the board. Might be worth looking at.
10:32dpritchetti learned tail recursion by reading SICP-educated schemers dismissing clojure :/
10:32dpritchetti still havent finished sicp myself
10:32tape_dispencerchouser: That was a good book. I guess I need to re-read it. Thanks
10:32octechouser, hmm ok
10:33octeis there a prettier way of doing this:
10:33octe(assoc world :player (assoc (:player world) :y (+ (:y (:player world)) 1)))
10:33dpritchettdoes anyone know how swannodette got websockets working in his iOS video yesterday? I've wanted to try them in clojure but didn't really know where to start
10:34dpritchettSocket.IO in node.js was pretty easy for me
10:34chousertape_dispencer: the general technique is to pass in an accumulator instead of returning the accumulated value.
10:35jarpiainocte: (update-in world [:player :y] + 1)
10:35mduerksenocte: have a look at "assoc-in"
10:35tape_dispencerchouser" ohh yeah! I remember that now. Yo uhave been a great help.
10:36mduerksenocte: update-in is right :)
10:40octethanks
10:43dpritchettFogus's review of Land of Lisp is very complimentary. That was nice of him.
11:29trybeingarunNice to see RH again in IRC channel!
11:44replacahiredman: did you see that clojurebot was spewing nulls when I checked stuff into contrib last night?
11:57lrennI've been meaning to ask this since the conj, does anyone know Rich's Go rank?
12:14ohpauleezlrenn: That's a good question. I also play Go, so I started wondering how many people in the community are go players
12:20gfrlogI'm trying to learn clojureql and am having trouble with the project function
12:20gfrlogthe example given shows passing it a set containing one column name
12:20gfrlogif I give it 2 columns names I get java.lang.UnsupportedOperationException: nth not supported on this type: PersistentHashSet
12:21gfrlog,(println "echo")
12:21clojurebotecho
12:21LauJensengfrlog: Which example?
12:22ohpauleezgfrlog: You should checkout #clojureql
12:22ohpauleezI think Lau and a few others are in there
12:22gfrlogI probably should
12:22gfrlogthe example has
12:22gfrlog@(-> (select users (where (< :id 3)))
12:22gfrlog (project #{:title}))
12:22LauJensengfrlog: I mean, where did you find that ?
12:23gfrlogthe project readme on github
12:23gfrloghttps://github.com/LauJensen/clojureql
12:23LauJensengfrlog: Okay, sorry about that, its outdated, I'll update it asap
12:23LauJensenCheck out this post http://bestinclass.dk/index.clj/2010/11/clojureql--1.0.0-now-in-beta.html and the example in there
12:23gfrlogcool, thanks
12:23LauJensen(-> (table :users) (project [:a :b [:c :as :d]])) ...
12:23gfrlogI forked the project earlier, I can update the readme if you like
12:24LauJensenThanks, but I think I got it, it needs a visit anyway :) You're welcome to join us in #clojureql
12:24gfrlogI just added it in
12:24gfrloger, joined
12:25LauJensenfixed
12:42gfrlogI use primitive dev tools like vim and "lein repl", and for months now I've had issues with the repl output buffer not flushing
12:42gfrlogI have to issue a second command before the output from the last one will finish printing to the console
12:43gfrlogthis happens on every machine I work on, so I imagine this is well known?
12:43technomancygfrlog: fixed in 1.4
12:43gfrlogthat's lein 1.4?
12:44technomancyright. it's still in release candidate stage, but it's totally usable for everyday work.
12:44gfrlogokay. I'm switching now, thanks
12:45technomancyI never use the repl task, so the bugs there take longer to get fixed =)
12:47gfrlogtechnomancy: and I have an irrational bias against emacs, so my programs take longer to get written
12:48technomancyIt's OK; Emacs will wait for you... as long as it takes.
12:48gfrlogha
12:50gfrlogtechnomancy: it looks like upgrading to 1.4 lost my line-runner-reader-whatever stuff?
12:50gfrlog(up-arrow)
12:50gfrlogI just downloaded the script and ran "lein self-install"
12:51gfrlogsorry if that jumble of words wasn't specific enough
12:53technomancymake sure rlwrap is installed?
13:17gfrlogtechnomancy: that worked, thanks; I'd never heard of that package
13:26technomancygfrlog: it's a lot better than jline, but the disadvantage is that you can't distribute it in a jar; it has to be installed separately.
13:32rlbIf you have an operation that can be naturally expressed as a reduction, but that might need to stop somewhere in the middle and return a particular value, would it be idomatic to use reduce and throw, or something else?
13:33chouserreduce and throw would not be idiomatic. have you looked at 'reductions'?
13:33leafwwhat do you call a function with 2 arguments? Does it have a formal name? And a function with one argument?
13:34rlbchouser: I had, but had forgotten about it, thx. Though I'm not sure that'll be beter in this particular case.
13:34qbgContinuations would make that nice
13:35chouserrlb: it might not be, depending on how you determine when to stop
13:35rlbleafw: binary and unary?
13:35chouserrlb: loop/recur is often quite nice in such situations
13:35amalloyrlb: reductions is (i think?) lazy, so (first (filter is-okay-return-value (reductions whatever))) should do what you want
13:35rlbchouser: right -- I was wondering if that might actually be better here.
13:35leafwrlb: that's what I thought, but somehow I recall a different set of names
13:36leafwrlb: thanks in any case
13:36Raynesleafw: I call them foo and bar respectively.
13:36leafwRaynes: xD
13:37amalloyrlb: yeah, reductions is lazy, and it's not chunked, so if you filter/remove for the first valid return value, that's effectively stopping in the middle
13:37rlbamalloy: in this case, I want either the *last* value, or BAD-VALUE (nil perhaps), if that comes sooner.
13:38rlbI suspect loop/recur or throw is what I want -- I'll see how it goes. thx.
13:39chouserrlb: I'd really recommend not using throw for that kind of flow control
13:39amalloyrlb: (let [results (reductions ...)] (or (seq (filter is-bad? results)) (last results)))
13:40rlbchouser: right, I'm changing it from a reduce to loop/recur now.
13:40rlb(see how it looks)
13:40rlbOriginally, it was a reduce because I didn't need to stop in the middle except when there was an actual error.
13:41rlbamalloy: right, though that keeps the whole seq around (which in this case would be fine)...
13:47dpritchettis there a clojure equivalent to the python raw string? ex: r'/home/daniel/folder name' vs. '/home/daniel/folder\ name'
13:48replaca_dpritchett: no, but you don't need a \ in front of a space
13:48dpritchetteh that was just an example
13:48replaca_dpritchett: and there are regex literals
13:48dpritchetti didn't want to say r'c:\program files\Internet Explorer' :P
13:49replaca_hah hah. You've got to buckle down and double the \s there
13:49replaca_but that's usually the only place
13:49dpritchetti remember getting really confused reading a regex with the double \\s, i guess the literals are a must for readability
13:49amalloydpritchett: though don't newer versions of windows tolerate usage of / instead of \?
13:50dpritchettwho knows amalloy, i use xp pro at work, vista at home, cygwin on both... hard to keep up with what's allowed and what's just a result of a customization i forgot
13:50dpritchettallowed by default i mean
13:50amalloyheh, so true
13:52amalloywait until you write a bash script that uses perl to test strings against a windows-path regex. you need at least 8 \s in a row
14:12BahmanHi all!
14:15apgwozis the best way to get a number from a string still to use Integer/parseInt, Double/parseDouble?
14:15dmart_I'm pretty new at it, but I started using the reader after I encountered an integer too big for Integer
14:16apgwozthat makes a lot of sense
14:17dmart_&(read-string "123456")
14:17sexpbot⟹ 123456
14:17apgwozthat's probably the most appropriate thing to do
14:17apgwoz:)
14:17dmart_&(read-string "123456.12")
14:17sexpbot⟹ 123456.12
14:17dmart_:)
14:18dmart_I'm waiting for one of the knowledgeable people in here to smite me
14:18serp__hi guys. how do I access elements in a multidimensional array?
14:19chouser&(read-string "#=(clojure.core/println \"hi!\")")
14:19Chousukeusing read is problematic in that you might not get a number
14:19Chousuke&(read-string "x123")
14:19sexpbot⟹ x123
14:19sexpbotjava.lang.Exception: EvalReader not allowed when *read-eval* is false.
14:20amalloyserp__: aget takes multiple indexes
14:20serp__oh... I am stupid and didn't see it
14:22apgwozChousuke: of course, i'm taking care of that though
14:28Rayneschouser: Thought you were being sneaky, didn't ya? ;)
14:28chouserYes I did.
14:29Raynes&(* 9999999999999999999999 999999999999999999999) ; I'm still trying to figure this one out.
14:29sexpbotjava.lang.Exception: EvalReader not allowed when *read-eval* is false.
14:29chouser&(binding [*read-eval* true] (read-string "#=(clojure.core/println \"hi!\")"))
14:29sexpbot⟹ hi! nil
14:29chouserhee hee
14:29amalloychouser: omg haxxx
14:29Rayneschouser: Nice catch. I forgot to blacklist *read-eval*.
14:29raek&((resolve (symbol "eval")) '(+ 1 2))
14:29sexpbot⟹ 3
14:29raekRaynes: touché
14:29RaynesI'm pretty sure I did remember to blacklist resolve, so that one is odd.
14:30amalloyRaynes: (not= ns-resolve resolve)
14:30Raynesamalloy: Oh, right!
14:30RaynesFixes, comin' up.
14:42rata_hi
14:42ossarehhey
14:42rata_=)
14:42rata_does anybody know how to import a leiningen project into eclipse?
14:42ossarehnot me
14:43ossarehdoes anyone remember the name of the function that takes a fn and it's args and returns an fn that takes more args and applies the new args to the function
14:43ossarehI thought it was comp
14:44ossarehbut seems it isn't.
14:44rata_partial
14:45rata_=)
14:45jweiss_ossareh: comp is like f(g(x))
14:45rata_a good nmemonic for that is "partial evaluation"
14:45rata_:)
14:46Raynes&(binding [*read-eval* true] (read-string "#=(clojure.core/println \"hi!\")"))
14:46sexpbotjava.lang.SecurityException: You tripped the alarm! *read-eval* is bad!
14:46chouser&(((symbol "eval") (ns-publics 'clojure.core)) '(+ 1 2))
14:46sexpbot⟹ 3
14:46chouser,(((symbol "eval") (ns-publics 'clojure.core)) '(+ 1 2))
14:46clojurebot3
14:47Rayneschouser: Man, you'd be doing a huge favor by not making me do these one at a time. :p
14:47chousersorry, just came up with it
14:47mjg123Hi - how to fix this java.lang.IllegalArgumentException: Can't call public method of non-public class...
14:47Raynes<3
14:49raekmjg123: if the class is private, are you supposed to fiddle with it?
14:49Lajla&(eval (list (symbol "eval") (list (symbol "+") 1 2 3)))
14:49sexpbotjava.lang.SecurityException: You tripped the alarm! eval is bad!
14:49chouserRaynes: how will you be blocking that one?
14:49LajlaBuurrr
14:49Raynesblacklisting ns-publics.
14:49LajlaRaynes, you don't trust me with eval?
14:49chouserreally?
14:49chouserok
14:49Rayneschouser: There isn't really a way around it, unfortunately.
14:49raekmjg123: or is it your own class?
14:49mjg123no it's a com.sun class
14:50raekwhich one?
14:50LauJensenin case anybody cares I started on of these http://laujensen.tumblr.com for various rants
14:50mjg123the code is here: http://paste.lisp.org/display/116997
14:50chouserRaynes: ns-map
14:50amalloyRaynes: the way around it, eventually, is incremental evaluation
14:50RaynesYeah.
14:50chouserRaynes: ns-interns
14:51mjg123.write is a public method on SourceDataLine (an interface) but clojure is complaining...
14:51Rayneschouser: amalloy and I have been cooking up some ideas for incremental evaluation that would make blacklisting useful stuff like this less important.
14:51jarpiainmjg123: try type hinting it as a public superclass or interface
14:51ohpauleezLauJensen: I always care
14:52ohpauleezhaha :)
14:52jarpiainmjg123: (.write ^SourceDataLine sdl ...)
14:52chouser&(.findInternedVar (the-ns 'clojure.core) 'eval)
14:52sexpbotjava.lang.SecurityException: You tripped the alarm! eval is bad!
14:52ohpauleezAlso, this is a good write up to happen upon, I wanted to know the details of the rewrite (saw the commit on github. attn: LauJensen)
14:52chouser&(.findInternedVar (the-ns 'clojure.core) (symbol "eval"))
14:52sexpbot⟹ #'clojure.core/eval
14:53RaynesI can understand how clojurebot can care a little less about how secure it is since it's sandbox is just a homemade sandbox designed especially for clojurebot. However, I have to make sure that clojail is as safe as imaginably possible by default, since I'm not the only one using it.
14:53mjg123jarpiain: yes
14:53mjg123nice one
14:53chouserRaynes: .getMapping .getMappings .intern
14:54amalloy&(class (the-ns 'clojure.core))
14:54sexpbot⟹ clojure.lang.Namespace
14:54amalloyRaynes: disallow use of clojure.lang.Namespace's interop methods
14:54amalloyis a better approach than chouser's suggestion
14:54Raynesamalloy: I'd have to disallow clojure.lang.Namespace
14:54RaynesWhat are the consequences of that?
14:55amalloynothing i can think of, since you're only intercepting .foo interop calls, right?
14:56RaynesBlacklisting the class will mean that nothing can be called on a namespace object.
14:56RaynesIf I remember correctly, I can still blacklist individual methods on a class if that's a problem.
14:56RaynesJust more tedious.
14:57chouseris this blacklisting via JVM sandbox or via s-expr analysis?
14:57amalloyRaynes: clojure functions could still be called on it, iirc
14:57clojurebotsandbox is http://calumleslie.blogspot.com/2008/06/simple-jvm-sandboxing.html
14:57amalloychouser: sexp
14:58amalloyi'd prefer jvm, but Raynes assures me that's hard, and he's the one doing it
14:58RaynesI know essentially nothing about the JVM sandbox. I'm mostly following along with the other sandboxes at this point.
15:00chouser&((clojure.lang.Reflector/invokeInstanceMethod (the-ns 'clojure.core) "intern" (to-array [(symbol "eval")])) '(+ 1 2))
15:00sexpbot⟹ 3
15:01chousersandboxes are hard
15:01RaynesThat one is an actual bug, since I nixed the Reflector class.
15:01amalloyRaynes: (foo/bar) instead of (.bar foo)
15:02RaynesIt gets expanded.
15:02amalloy&(macroexpand '(Integer/parseInt "1"))
15:02sexpbot⟹ (let* [obj-class__3987__auto__ (clojure.core/class Integer)] (clojure.core/if-not (clojure.core/some (if (clojure.core/map? clojail.core/tester) (clojure.core/let [{:keys [blacklist__3988__auto__ whitelist__3989__auto__]} clojail.core/tester] (clojure.core/fn [target... http://gist.github.com/714298
15:02RaynesIt's probably a bug in dot.
15:04LauJensenohpauleez: thanks :)
15:04amalloyyeah, that is weird
15:04amalloyRaynes: have you thought of giving sexpbot a github account so his gists aren't anonymous?
15:04RaynesNope.
15:05LauJensenamalloy: great idea though
15:05RaynesIt looks like I'm only checking symbols in dot here. How odd.
15:05ohpauleezI half thought about doing that before too
15:05ohpauleezor plugging solr into sexpbot
15:06ohpauleezso you could use him to search all previously seen solutions
15:09amalloyRaynes: is it because in (. Reflector invokeBlah), the target (Reflector) is a Class?
15:11Raynesamalloy_afk: That's probably it.
15:11chouser&(let [[m & a] [(the-ns 'clojure.core) (symbol "eval")] [cm & ca] (map class (cons m a))] ((.invoke (.getMethod cm "intern" (into-array ca)) m (to-array a)) '(+ 1 2)))
15:11sexpbotjava.lang.SecurityException: You tripped the alarm! class java.lang.reflect.Method is bad!
15:11RaynesYeah, at least it blocks that properly.
15:12chouserwhere's it getting that from?
15:13chouser,(let [[m & a] [(the-ns 'clojure.core) (symbol "eval")] [cm & ca] (map class (cons m a))] ((.invoke (.getMethod cm "intern" (into-array ca)) m (to-array a)) '(+ 1 2)))
15:13clojurebot3
15:13Rayneschouser: Magics.
15:16Chousukeit looks like you need to replace eval with your own function :P
15:21LajlaChousuke, was that addressed to me?
15:21LajlaBecause they also won't let me def.
15:21LajlaBut like, how does eval in clojure work.
15:21LajlaIs it just a clojure interpreter written in clojure?
15:21LajlaLike, how much is the penalty.
15:22LajlaHow much faster is using (+ 1 2) stead of (eval '(+ 1 2)) ?
15:22Chousukeit's not an interpreter.
15:22Chousukebut it's slower, since it calls the compiler at runtime
15:23serp__I have a sequence of integer tuples. how do I check if the sequence contains a certain tuple? contains? doesn't work
15:23serp__,(contains? [[0 0]] [0 0])
15:23serp__=> false
15:23clojurebotfalse
15:24Chousuke,(some #{[0 0]} [[0 0]]) ; this is the common idiom
15:24clojurebot[0 0]
15:24LajlaChousuke, so it's a clojure compiler written in clojure?
15:24LajlaOr in Java?
15:24LajlaSo like
15:24ChousukeLajla: it's the same compiler that compiles everything else.
15:24LajlaAn arbitrary clojure program has a clojure compiler included?
15:24LajlaSo that compiler is included with any clojure executable?
15:24LajlaAlso, it's an interpreter.
15:24LajlaPeople need to learn their terms.
15:25Chousukeno, it's not an interpreter
15:25LajlaA compiler is a translator from one source code to another.
15:25Chousukeit compiles to bytecode
15:25LajlaAn interpreter runs a program
15:25LajlaYes
15:25Chousukeand then that bytecode is run
15:25Lajlaan interpreter can feature compilation internally.
15:25LajlaSure
15:25LajlaSo it's an interpreter.
15:25Chousukewhatever
15:25LajlaAny interpreter uses some form of transofmration internally.
15:25Lajla'interpretation' just has a bad name.
15:25LajlaBut a CPU is an interpreter formally.
15:26LajlaIt's all too simple, an interpreter runs your program, by whatever means, a compiler translates your program into a program that does the same, but in another language.
15:26LajlaAnd almost any interpreter does feature some components inside that could be called compilers.
15:27Chousukethat's all completely irrelevant to the common usage of these words.
15:28LauJensen,(do (time (dotimes [_ 1000] (+ 1 2))) (time (dotimes [_ 1000] (eval '(+ 1 2)))))
15:28clojurebotDENIED
15:28LauJensen&(do (time (dotimes [_ 1000] (+ 1 2))) (time (dotimes [_ 1000] (eval '(+ 1 2)))))
15:28sexpbotjava.lang.SecurityException: You tripped the alarm! eval is bad!
15:28LauJensenoh right, they hate that :)
15:28LajlaChousuke, what is the common usage then?
15:28LajlaThe common usage has no meaning because it's not a formal technical term.
15:28LajlaIt's as vague as things like 'tree', it has no place in scientific literature.
15:28LajlaOr 'bread'
15:29ChousukeI see no scientific literature here
15:30chouserLajla: I can't comprehend your use of the informally defined terms "vague", "scientific", and "literature"
15:30LajlaChousuke, well, this isn't scientific literature.
15:30LajlaBut clojure's documentation ought to be.
15:30Chousuke,(doc eval)
15:30clojurebotDENIED
15:30Chousuke... duh
15:31chouserclojure's eval converts an s-expression to JVM bytecode using the one clojure compiler that is always used, and then passes it to the JVM to be run.
15:31Chousuke(doc eval)
15:31clojurebotDENIED
15:31LajlaAnd he's quite simply wrong when he says 'there is no risk of your code being interpreted', that is ludicrous.
15:31LajlaAnd I have some vague idea what he does mean with it.
15:31LajlaEmphasis on vague.
15:31LajlaBut in the end, it's not a clear meaningful statement.
15:31LajlaThe repl is an interpreter because it runs your code, by whatever means, some thing which outputs bytecode but doesn't run the process is a compiler.
15:31LajlaSure
15:31Lajlabut the repl returns that result.
15:32Chousukethis is all pointless. :P
15:32LajlaAnd by that, the whole stuff together is an interpeter, albeit one composed of multiple components, like any interpreter today.
15:32LajlaThe JVM is an interpreter for one.
15:32LajlaAs is a CPU.
15:32LajlaWhat he probably just means is 'stuff runs fast'
15:33ChousukeThe problem is that that definition of interpreter is completely useless in an informal context.
15:33LajlaBut really, any modern interpreter does some translation to a lower level and runs that translated code on some internal virtual machine for efficiency's sake.
15:33Chousukeeverything is an interpreter, so why use the word at all?
15:33LajlaA compiler is not an interpreter.
15:33LajlaBut the thing on which the compiler runs is.
15:33LajlaA compiler is a translator from one language to another.
15:34LajlaAn interpeter is a, perhaps abstract, machine that runs a program specified in a language accordingly its definition to produce the I/O associated with it.
15:34ChousukeLajla: except when you want to talk about implementation techniques for a language, there is a definition of "interpreter" that is more specific than yours.
15:34ChousukeLajla: which is what is being used here.
15:34LajlaChousuke, go on.
15:34dnolenLajla: Joe Marshall has excellent perspective on the dichotomy of compilation/interpretation, came up on the Racket ML, http://www.mail-archive.com/users@racket-lang.org/msg02358.html
15:36Lajladnolen, isn't that sort of what I said?
15:37dnolenLajla: yes but perhaps not as clearly ;)
15:37LajlaClarity has never been my strength.
15:37Lajlahttp://community.schemewiki.org/?interpreter I like this explanation though.
15:37LajlaSchemewiki is often quite excellent in making whole articles about terms and concluding at the end that the term is completely vague, useless, and should be avoided.
15:38chouserugh
15:43Lajlachouser, you're dealing with the big boys babe.
15:46Raynes&((clojure.lang.Reflector/invokeInstanceMethod (the-ns 'clojure.core) "intern" (to-array [(symbol "eval")])) '(+ 1 2))
15:46sexpbotjava.lang.SecurityException: You tripped the alarm! the-ns is bad!
15:46Raynes&((clojure.lang.Reflector/invokeInstanceMethod ( 'clojure.core) "intern" (to-array [(symbol "eval")])) '(+ 1 2))
15:46sexpbotjava.lang.SecurityException: You tripped the alarm! class clojure.lang.Reflector is bad!
15:46Rayneschouser, amalloy_afk: I just forgot to check the actual class instead of just the class of the 'object', which in this case is a class.
15:47Rayneschouser: I really appreciate the breakage, by the way. I'd really hate for someone other than me using clojail to run into these sorts of silly problems. <3
15:52mrBliss`LauJensen: are you gonna post your experiences with Awesome on that new blog?
15:53RaynesI'm waiting on him to blog about how he got compiz to tile.
15:53LauJensenmrBliss`: I might :) It was a request about that, which got me thinking about Tumblr
15:54ohpauleezI will write an equally long comment just reiterating the points
15:54mrBliss`LauJensen: I'm currently using StumpWM, the Emacs of windows manager.
15:54RaynesLauJensen: Why Tumblr versus your blog?
15:54LauJensenmrBliss`: Yea I was going to try tht myself but ran into installation problems
15:54ohpauleeztmux on OSX Term, Awesome running on one of my spaces on OSX, and Awesome on my Linux box
15:54mrBliss`LauJensen: did you try SBCL or Clisp?
15:54LauJensenRaynes: My blog is for in-depth lengthy Clojure posts, Tumblr is for everything else
15:54RaynesSounds good.
15:54LauJensenmrBliss`: Ive done SBCL but not for WM
15:55gfrlogis there a recognized clojure style guide?
15:55LauJensengfrlog: http://www.assembla.com/wiki/show/clojure/Clojure_Library_Coding_Standards
15:56gfrlogawesome, thanks
15:57LauJensennp
15:59mrBlissI didn't realize you could write map, filter, every?, take-while, group-by, cycle... using reduce or Haskell's foldl/foldr
15:59RaynesmrBliss: It's beautiful, isn't it?
15:59mrBlissRaynes: exactly
16:00mrBlisseven more concise than the beauty of cons/car/cdr
16:00chousercan you write clojure's map with clojure's reduce?
16:01chouserI don't think so
16:01mrBlisschouser: I just wrote the 'mapcar' version with only one collection
16:01chouserlazy?
16:01clojurebotlazy is hard
16:02Rayneschouser: That's not fair.
16:02Rayneschouser: You can write Haskell's version though. It wont be lazy in Clojure, but it would be in Haskell because Haskell is lazy.
16:02mrBliss(letfn [(mapf [f xs] (reduce (fn [mapped x] (conj mapped (f x))) [] xs))] (mapf inc '(1 2 3)))
16:03amalloymrBliss: i thought it was pretty neat when i realized (comp) is a special case of (reduce)
16:03mrBliss,(letfn [(mapf [f xs] (reduce (fn [mapped x] (conj mapped (f x))) [] xs))] (mapf inc '(1 2 3)))
16:03clojurebot[2 3 4]
16:04mrBlissamalloy: it's almost like a fold-calculus (<-> lambda-calculus)
16:06amalloy&((reduce (fn [f1 f2] (fn [& args] (f1 (apply f2 args)))) [inc inc inc]) 1)
16:06sexpbot⟹ 4
16:07amalloymrBliss: ^^ shiny?
16:07mrBlissamalloy: nice
16:40jsandawhat's the best way to dynamically access a function in another namespace? i have a function that takes as an arg the name of another function to invoke and that function will be in a different namespace
16:41amalloy&(doc ns-resolve)
16:41sexpbotjava.lang.SecurityException: You tripped the alarm! ns-resolve is bad!
16:41amalloy(doc ns-resolve)
16:41clojurebot"([ns sym]); Returns the var or Class to which a symbol will be resolved in the namespace, else nil. Note that if the symbol is fully qualified, the var/Class to which it resolves need not be present in the namespace."
16:41amalloyjsanda: ^^
16:42jsandathx
16:42Raynes,*ns*
16:42clojurebot#<Namespace sandbox>
16:42chouserjsanda: have you considered passing the function itself or its var instead of its name?
16:42jsandai won't be able to
16:43jsandaactually what will get passed is the name space with functions to invoke
16:45jkndrknhi there. has anyone recently experienced lein deps issues related to the clojure-contrib jar?
16:45jkndrknspecifically:
16:45jkndrknCaused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
16:45jkndrkn----------
16:45jkndrkn1) org.clojure:clojure-contrib:jar:1.2.0-SNAPSHOT
16:45jkndrkn Path to dependency:
16:45jkndrkn 1) org.apache.maven:super-pom:jar:2.0
16:45jkndrkn 2) org.clojars.leadtune:orolo:jar:0.1
16:45jkndrkn 3) org.clojure:clojure-contrib:jar:1.2.0-SNAPSHOT
16:46jkndrknwe are currently requiring clojure-contrib as follows:
16:46jkndrkn...
16:46jkndrkn :dependencies [[org.clojure/clojure "1.2.0"]
16:46jkndrkn [org.clojure/clojure-contrib "1.2.0"]
16:46jkndrkn...
16:46jsandachouser: basicallym at start up my function is called with the name of another name space that defines some functions that i want to call
16:47jkndrknmy apologies ^_^;
16:47Raynesjkndrkn: That looks like a problem with one of your other dependencies.
16:47RaynesIt looks like one of your other dependencies is trying to find something that doesn't exist.
16:48jsandaso i want to load that name space and then call functions within it. and i am making an assumption that functions with specific names/signatures exist
16:49Rayneshttps://github.com/leadtune/orolo/blob/master/project.clj this one.
16:49RaynesYou might be able to exclude it's version of clojure-contrib, since you have your own.
16:50RaynesI do not remember the syntax for doing so, however.
16:50Raynesjkndrkn: https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L38
16:51jkndrkncool, thanks for clearing that up!
16:51RaynesI don't know if that will work for sure, but it's worth a try.
16:51RaynesNever had to do it before.
16:56LauJensenIf somebody here has a Flattr account and can help me test something please msg me
17:57lpetitDid I already publicly say that cemerick did a splendid work for ccw lately ? Maybe not, so now's the time. Expect a new version of ccw soon, with the brand new REPL UI which is a for-mi-da-ble addition to CCW ! And it already integrates well with the work done on the editor the previous months (paredit, jump to definition) and I'm working on adding the missing pieces (code completion, more...
17:57lpetit...paredit commands)
17:58lpetitcu soon !
17:58chouservery cool!
17:58lpetitAnd again, because he deserves it: long live to cemerick !
18:47ossarehwhat is CCW?
18:47ossarehah, http://code.google.com/p/counterclockwise/
18:47amalloyclojurebot: ccw?
18:47clojurebotccw is http://github.com/laurentpetit/ccw
18:53zakwilsonGuy L. Steele says you should learn Clojure.
18:56mengu_he is damn right
19:02zakwilsonHe also suggests Haskell.
19:04jweiss_anyone tried to use labrepl recently? running lein deps fails for me - org.apache.maven:super-pom:jar:2.0 artifact is missing
19:05jweiss_oh wait, it seems to really be complaining that it can't find org.clojure:clojure-contrib:jar:1.1.0-master-SNAPSHOT
19:05jweiss_i can't figure out why it's trying to get that old version, it's not in the project.clj
19:11jweiss_looks like autodoc 0.7.0 depends on it
19:31jkndrknRaynes: thanks for your help earlier. exclusions were of great help here. looks like a bunch of old SNAPSHOT versions of clojure and clojure-contrib are no longer offered up for download via lein deps.
20:19amalloysilly question here: (< x y) always confuses me - it reads like "less than x? y". does anyone have a useful mnemonic so i'll stop writing all my comparisons backwards?
20:21_atoamalloy: some people think of < as "ascending?"
20:26_mstamalloy: I just got into the habit of switching to infix in my head, I have to admit :) Read the first argument first, then the comparator, then the second argument for "x is less than y"
20:46Lajlaamalloy, this is why you should keep English out of code I guess.
20:47LajlaRead it as it is, five tokens (, <, x, y, and )
21:23Deranderit's not really x < y though, is it? it's "is this monotonically increasing?"
21:24Deranderthat's how I remember, at least
21:24Deranderit's like a crescendo symbol
21:36amalloyDerander: yeah i know. but it could as easily be "is this monotonically decreasing". what's this crescendo symbol?
21:36Derandermusic
21:36Derander< says "get louder"
21:37Deranderamalloy: http://www.scenicnewengland.net/guitar/notate/images/cres.gif
21:37Deranderif you look at it like the music symbol it can only be increasing
21:38amalloyDerander: hm
21:41LajlaDerander, yap.
21:41LajlaBut.
21:42LajlaIsn't x < y that also.
21:42LajlaBut for only two arguments?
21:42DeranderI guess
21:42LajlaInfix notation is stupid anyway.
21:42LajlaIt's like the imperial system.
21:42Derander:P
21:42LajlaCompletely arbitrary, stupid, overly complicated.
21:42LajlaThe only reason people still use it is because they are used for it.
21:42LajlaLike how the US and UK still haven't switched to metric.
21:42LajlaEven though it's much simpler and self-evident how it works.
21:42Deranderwell, it limits ambiguity in handwriting
21:43LajlaNahhh
21:43LajlaI mean
21:43Derander+ 2 2 2.. is that 6 or 22 + 2?
21:43Lajlaif handwriting used praefix only.
21:43LajlaThen handwriting would adapt.
21:43LajlaI mean
21:43Lajlahandwriting of mathematicans generally destinguishes × and x.
21:43LajlaAnd those of non-mathematicians often doesn't.
21:43LajlaPeople adapt automatically to these situations
21:43Deranderhahahahahaha. my handwriting is just terrible everywhere
21:44DeranderI've lost a lot of credit in my higher math classes because of the inability to distinguish "s" and "5" in my writing
21:46amalloyDerander: i eventually learned to write my t with a tail, cause otherwise it looked exactly like my + :P
21:46Deranderyes!
21:46DeranderI do that and my 7 with a cross
21:46Deranderbut 5 and s are just doomed
21:47amalloywhat does 7 without a cross look like?
21:47DeranderI'm talking about the cross in the middle
21:47Deranderthere are 2 horizontal lines in my 7
21:47amalloyoh i see
21:47amalloyer, no idon't
21:47amalloywhat did it look like before you put the cross in it
21:47Derander7
21:48amalloyargh
21:48Deranderhahaha
21:48amalloyie, what was the problem you solved by putting a cross in
21:48Deranderhttp://upload.wikimedia.org/wikipedia/commons/thumb/6/6a/Hand_written_7.png/50px-Hand_written_7.png
21:48Deranderoh
21:48Deranderit looks like a 1
21:48Deranderor a t
21:48Deranderdepending on how sloppy I was
21:49Deranderyeah
21:49DeranderI think I just suck at handwriting :-)
23:22technomancyLicenser: ping
23:23RaynesGood luck with that.
23:23RaynesHe is here about as often as Martin Odersky is around in #scala.
23:24technomancybummer
23:24RaynesPoor guy. He has a needy girlfriend.
23:24technomancyruh roh
23:25technomancyhe's my only solaris tester.
23:26RaynesWhat are you needing to test? Leiningen?
23:26technomancyyeah.
23:26RaynesI have ssh access to his solaris server, if it helps.
23:27technomancyit's a minor thing; wanted to confirm my latest commit doesn't break jline for situations when rlwrap is not installed.
23:28Raynestechnomancy: I'll try it out in a few.
23:28technomancycool; thanks
23:28technomancyand here I thought Licenser was the only person on IRC who touched Solaris
23:29LajlaProgramming and girlfriends to together like jewishness and no large megacorp in your position.
23:29Lajlaposession
23:29Raynestechnomancy: He really is. However, he hosts try-clojure.org, so I have to have ssh access to maintain that. I also used to run sexpbot on there before I decided to use mongo, which apparently doesn't work on solaris.
23:30amalloyLajla: possession
23:30technomancyheh; that explains it
23:30LajlaI never claimed I could English with the best of them. =(
23:30Lajlaamalloy, let's worship His Shadow together.
23:31LajlaYou and I.
23:49Raynestechnomancy: It can't find it's dependencies. I did lein deps in the clone with the main version of leiningen than symlinked bin/lein to ~/bin/lein-n
23:49RaynesIs there a magical step in between that I missed?
23:49Raynesthen*
23:51technomancystrange... but bin/lein self-install should do the trick, I think.
23:51LajlaBin Leiden
23:52Raynestechnomancy: That seems to have done the trick.
23:52technomancyjline comes through OK?
23:53RaynesChecking.
23:53RaynesSeems to be working.
23:53RaynesAnd rlwrap isn't installed.
23:53technomancyexcellent; thanks
23:53RaynesAny time.
23:54technomancyso I realized that class lists in :import should be wrapped in () instead of []
23:54technomancyI've been doing it wrong for years.
23:54technomancy(for indentation purposes)
23:55RaynesSeriously? I'm not sure I want to be right. :<
23:55technomancyhttp://p.hagelb.org/import-indent.html
23:56technomancysince [] implies entries are peers, while () implies the first entry is special and the rest should be indented together
23:56technomancy[] is still correct for :use :only
23:57RaynesGood. Not sure I could give up this gorgeous ns declaration: https://github.com/Raynes/sexpbot/blob/protocols/src/sexpbot/twitter.clj#L4