#clojure logs

2011-07-09

00:09bhenrywho is in charge of the planet clojure reader feed?
00:14hugodamalloy_: adding a :dev-resources-path to project.clj for the tools.jar file seems to work (as described in the readme under sun/orcale jdk)
01:49amalloydnolen: i see that you're helping spread the gospel of performant clojure again :)
02:31zodiakhey everyone, so, quiet in here.. but.. I have to ask; what's the web frameworks for clojure ? is there a sort of rails/django/play type of mvc framework ?
02:31talioswebnoir looks to be the new hotness
02:32zodiaktalios: danke.. off to google I go :)
02:32talioszodiak: http://www.webnoir.org
02:32zodiakoh. even better. dankeschoen
02:32taliosbuilds ontop of compojure, which itself is a webframework, webnoir is more higher level
02:33amalloyzodiak: noir is the new hotness, but it's pretty amazing how easy it is to work with the lower-level tools like ring, compojure, and hiccup
02:33zodiakperhaps a bad question but, I am coming from a smalltalk/ruby/scheme/perl background.. does clojure more closely follow scheme with minimal syntax or common lisp with 4000+ methods ? :)
02:34taliosamalloy: heh, noir is just ring/compojure/hiccup by the looks of it
02:34zodiakamalloy: looking at it now.. webnoir I mean.. seems to be fairly grokable :)
02:34amalloyzodiak: some of both
02:34zodiakamalloy: more names to google. thank you (honestly :)
02:35zodiakamalloy: as long as it's not as "bad" as CL .. that's a good thing :D
02:35amalloyclojure's "syntax" is pretty minimal, but it has more built-ins than scheme (not really the same thing as syntax)
02:35talioszodiak: noir etc. arn't fullstack tho, so theres no ActiveRecord like thing built in.
02:35amalloytalios: no? i thought that's what noir was supposed to do. i haven't looked into it
02:35zodiaktalios aah. I was going to ask at some point about "orm" (I know you can't really have the O part but, you get the point)
02:36zodiakI take it the channel is "newb friendly" ?
02:36taliosamalloy: not that I've seen. but if you adding clojureql shouldn't be hard
02:37amalloyzodiak: we only murder one in ten new users. you seem to have survived so far, so you're probably safe
02:37zodiakgood show ;)
02:37talioszodiak: http://www.clojureql.org - it's not an ORM, but a nice liibrary/framework for querying/working with dbs
02:38zodiaktalios: reading the examples. the syntax looks horribly clean :) awesome.
02:38taliosamalloy: yes but me maim three out of five people who ask annoying questions :)
02:40zodiaklast annoying newb question (promise) is clojure's performance "good" (I know, that's a very subjective question but, it's faster than python/ruby I assume since it's a jvm language)
02:46Scriptordoes doing new File() in Java do any actual IO, or does only happen when you call some method on it?
02:47Scriptorcouldn't find anything about joining paths in clojure, so just looking at the java way of doing it
02:47amalloyScriptor: no io
02:48Scriptoryay
02:49talioszodiak: Id say faster but that kinda depends on what you're doing isn't it :)
02:49zodiaktalios: oh. totally. I know it's subjective, as long as it's not the slowest kid in the class, it's all good I guess :D
02:51taliosif there's methods you really need to optimize you can give type hinting to your methods which make things more porformant, I think thats improved a lot already in 1.3 as well
02:55seancorfield_sorry for the constant part/join - the network here is *^%^$
03:09amalloyzodiak: clojure in general is pretty fast. things which can be quite slow if you do them the "easy way" are interop (calling non-clojure java code) and arithmetic.
03:10amalloybut if you find out that's your bottleneck (and you care), you can add annotations to the source to make that faster without having to restructure anything. bug dnolen about it, he loves to show off how fast clojure can be
03:15hiredmanI'm going crazy looking for a screenshot I took of a tweet were a guy said something like "people like hiredman are not helping clojure catch on" (since someone was asking about newbie friendliness) and which all my logging, etc, I can't find the stupid thing
03:18amalloypeople like hiredman are not helping clojure catch on
03:18amalloymaybe use that as a substitute?
03:19hiredmanhttp://www.thelastcitadel.com/_media/clojure.png?cache=cache <-- I did find some early work on a clojurebot logo
03:21hiredmanI know for a fact I had this thing, where did it go, it's not like I ever delete anything
03:28amalloyhiredman: hah, that's hilarious
03:33amalloyibdknox: you around?
03:33ibdknoxamalloy: sup?
03:34amalloyi'm finding it pretty hard to modify the starter bot, because everything depends on this global *game-state*. specifically, i'd like to update the state every time i move an ant, so that they don't think a space is empty anymore if another ant is on his way there
03:35amalloyi guess i can create a local copy of it, then create a new (binding) preparatory to every call into the starter kit
03:36ibdknoxI did it by adding in an ant tracker
03:36ibdknoxbecause beyond just knowing if a space is taken I wanted to be able to uniquely ID an ant so I can give it a role
03:36ibdknoxthat's not included in the starter thing because they explicitly state they don't want it to be lol
03:36amalloysure
03:37amalloybut do you have an objection to having most of the starter-kit functions accept an (optional?) explicit state argument, rather than depend on a global?
03:37amalloyincidentally, you don't need to uniquely ID ants in order to give them roles
03:38ibdknoxno?
03:38ibdknoxhow's that?
03:38amalloyyou can have a map of {location => role} pairs, which you match against the ants when you read them, and update when you move them
03:39amalloyi imagine your tracker works similarly, except you store {location=>id}
03:39amalloyand have an additional {id=>role} map
03:39ibdknoxyep
03:39amalloythat might be better, so that you can have a role like "hang out with ant 43", but it seems more complicated
03:40ibdknoxit's stupid simple, but that also means it's stupid ;)
03:41ibdknoxbtw
03:41ibdknoxthe only reason I did it the way I did was because they wanted the packs to be similar
03:41ibdknoxI originally wrote it such that the bot was passed a map of the state
03:41ibdknoxand you just worked with that directly
03:41ibdknoxI think that might be the better solution overall
03:42ibdknoxthe bot being the function you pass to start-game
03:42amalloyright
03:42ibdknoxthoughts?
03:42ibdknoxI can make that change on the grounds that it's more idiomatic
03:43amalloywell, i'd write it the way you first did
03:43amalloybut it boils down to adding a (state) argument to pretty much every function in ants.clj
03:43ibdknoxit would actually get rid of most of the functions entirely
03:43amalloyso perhaps in the interests of more-easily modeling state it's better to bind it
03:44amalloyibdknox: well, maybe. i think a lot of them are good to have around as sort of an API to the map, so you don't have to know what it contains if you don't want
03:44ibdknoxfair enough
03:45ibdknoxwater makes it slightly more complicated too
03:45ibdknoxsince it's not given every time
03:45ibdknoxthough, not any real complexity there
03:46ibdknoxcompletely unrelated, my 7 line bot is doing stupidly well
03:46ibdknoxlol
03:46amalloyibdknox: i improved the performance by switching (first) to (rand-nth) :P
03:46ibdknoxhaha
03:46ibdknoxhere's what the one I submitted is doing
03:47amalloyibdknox: but the server still doesn't run clojure bots correctly, does it? i'm curious how you submitted it in that case
03:47ibdknoxhttps://gist.github.com/1073423
03:47ibdknoxI put it all in a single file
03:47amalloyidea stealer!
03:47ibdknoxit was annoying
03:47ibdknoxbut it works :-p
03:47ibdknoxhaha
03:48ibdknoximplemented it first ;)
03:49ibdknoxamalloy: oh, something I found out and need to change in the starter thing: you can move on top of food.
03:49ibdknoxerr
03:49ibdknoxcan't*
03:50amalloyi don't see that mattering. does food spawn right next to you, and then only hatch after you've moved?
03:54ibdknoxwell if you're next to it and you're trying to move to it, it will count as an invalid move
03:54ibdknoxenough of those and you end up disqualified
03:54amalloyibdknox: but you shouldn't be next to it, is my point, since it should hatch when you get there
03:54amalloyunless it behaves as i suggedted above
03:54ibdknoxit hatches the next turn
03:56hiredmanit would be interesting to do it cps style for co-operative multitasking
03:58amalloyoh, yikes. the the :ants key is a seq of locations
03:59amalloythat makes it pretty tough to change the state to no longer include an ant
04:03ibdknoxhm, it's a seq? I must've screwed something up.. it should be a set
04:04amalloyibdknox: oh, sorry then
04:04amalloyi didn't read closely; i'm sure you're right
04:07amalloyibdknox: if you're interested i wrote up https://gist.github.com/ea397d8052c71fefbb4b as an example of keeping two ants from moving into the same square at once
04:09ibdknoxamalloy: cool! I just made a change to make passable? take other ants into account, since everywhere I kept having to do (unoccupied? (passable? loc))
04:10amalloy(def okay-move? (comp unoccupied? passable?)) :P
04:10ibdknoxhaha
04:11amalloyibdknox: do you know how to get debug information about a crash? every five or ten games my bot gets marked as "crashed" at some point
04:13ibdknoxthis works for me:
04:13ibdknox(defn run []
04:13ibdknox (try
04:13ibdknox (start-game my-bot)
04:13ibdknox (catch Exception e
04:13ibdknox (.printStackTrace e))))
04:13ibdknoxit seems if you explicitly print the trace it ends up in the output
04:14amalloyibdknox: in what output?
04:14ibdknoxwhen you run ./test_bot or ./play_one_game it lists all the turn info
04:14ibdknoxit shows up there
04:14ibdknoxas it runs
04:14amalloyoh. i guess their engine is swallowing stderr
04:15amalloybut not stdout. weird choice, imo, but what do i know
04:15ibdknoxsomething to do with the way the sandbox works?
04:15ibdknoxI have no idea
04:16ibdknoxyou might have to run it with the same flags as test_bot has too... I can't remember
04:17ibdknoxthe whole thing could use some help to be honest lol
04:17amalloy--strict --capture_errors
04:17ibdknoxyeah
04:17ibdknoxstrict will list out invalid moves and such
06:37trochalaHello, I am reading the Joy of Clojure book, and it suggests installing cljr from github.com/fogus/cljr.
06:38trochalaThis repo doesn't exist but seems to have moved to https://github.com/liebke/cljr.
06:39trochalaI can see that the last commit is one year ago. I wanted to ask if the project is outdated and if I should use some other repl package
06:40schasitrochala: I am also new, but I think installing it from lein is a good idea
06:40schasiEven though I'd like to know what the proes here have to say about it :D
07:02rbuchmannHey, quick question: What git mode, if any, do you prefer for emacs and why?
07:07rbuchmannI had a look at magit, but I'm not sure I like it
07:54lnostdal-laptopemacs and swank-clojure-1.6+ users; does evaluating (future 42) work in your repls?
07:55bsteuberyou mean leiningen-1.6+
07:55lnostdal-laptopah, yeah
07:55lnostdal-laptopi mix the numbers
07:55bsteuberme too :)
07:56lnostdal-laptopto be exact, i'm using swank-clojure-1.4.0-SNAPSHOT (from git) .. and leiningen-1.6.1 from git
07:56lnostdal-laptop..and futures doesn't work..
07:57lnostdal-laptop"Task java.util.concurrent.FutureTask@3a70dd47 rejected from java.util.concurrent.ThreadPoolExecutor@5e3c782[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 2"
07:58bsteubersame for me still
07:58bsteuberstrange technomancy couldn't reproduce it
07:58lnostdal-laptopok, yeah, i even updated clojure-mode to make sure
07:58lnostdal-laptop..though i guess that should be unrelated
07:58lnostdal-laptop..what version of emacs, bsteuber ?
07:58bsteuber24
07:59bsteuberbut that should really not matter
07:59lnostdal-laptop24.0.51.1 .. same .. but, yeah, indeed
07:59lnostdal-laptopi'm using jvm7 tho
07:59bsteuberhmm
08:00lnostdal-laptop(System/getProperty "java.version") => "1.7.0"
08:00bsteuberyeah it's really a mystery to me
08:00lnostdal-laptopmaybe he's forgotten to push some patches .. that does happen :}
08:01bsteuberjust sticking to lein 1.5.2 and getting things done for now
08:02lnostdal-laptopso ...anyone else seeing the same thing besides bsteuber and me?
08:05lnostdal-laptopand another question; what coding style does people use for global variables now in 1.3.x seeing as globals aren't dynamic by default anymore?
10:04b6nCan someone tell me how I can transform a data structure like [[:foo 1] [:bar 2]] into {:foo 1 :bar 2} ?
10:05dnolen_,(into {} [[:foo 1] [:bar 2]])
10:05clojurebot{:foo 1, :bar 2}
10:05dnolen_b6n: ^
10:06b6noh it's so easy?! thanks a lot
10:14vdrabHi all. what is the idiomatic way to do buffered reads from standard input in clojure?
10:15vdrabduck-streams? clojure.java.io?
10:16vdrabjava BufferedReader? java InputStream?
10:23fliebelvdrab: i'd say (clojure.java.io/reader *in*) should do.
10:24fliebel&(class *in*)
10:24sexpbot⟹ clojure.lang.LineNumberingPushbackReader
10:24vdrabfliebel: thanks!
10:25fliebelvdrab: Maybe skip the reader part, and just wrap *in* in a buffered reader from java.io
10:25vdrabis this also considered the most performant way to read streams? (elegance and all aside)
10:27fliebelI wouldn't know. Maybe you can get stdin from javaland without the pushback stuff.
10:27fliebel&System.in
10:27sexpbotjava.lang.ClassNotFoundException: System.in
10:28vdrab&System/in
10:28sexpbot⟹ #<BufferedInputStream java.io.BufferedInputStream@1f5a6f9>
10:28fliebelwell, there you go :)
10:28vdrabthanks
10:29vdraband wrap this in a line-seq?
10:32vdrab"(println (line-seq (clojure.java.io/reader *in*)))" gives me around 11mb/sec throughput on my little macbook
10:36vdrabcan you think of any obvious ways to improve upon this?
10:38Scorchinso has anyone got any guesses on what the july 20th announcement is?
10:41Scriptornope, I'm still too bummed about not being in the city then
10:42dnolen_Scorchin: I'm betting compiler related.
10:42Scorchindnolen_: anything specific?
10:43Scorchinclojure in clojure would be nice
10:44Scorchincan then make a clojure in JS runner
10:47dnolen_Scorchin: I'm thinking it'll be something along those lines. When I gave my preso on Logic programming at the NYC Clojure Meetup a while back, he mentioned he had new ideas for the compiler. Also to allow libraries to provide typechecking the compiler really needs to provide some kind of hook which doesn't exist right now.
10:48Scriptorhmm, I didn't overhear anything special from him at the last meetup, so that may be it
13:40chouserdnolen_: I didn't think you'd have to guess
13:41dnolen_chouser: heh, I don't have any inside knowledge :)
13:54ataggartdnolen_: What were the companion books to The Reasoned Schemer you mentioned? I'm not able to google it up.
13:55ataggartdnolen: same question ^
14:39dnolen_ataggart: Bratko's Prolog book, Sterling & Shapiro Prolog book, Byrd's thesis http://pqdtopen.proquest.com/#abstract?dispub=3380156
14:40ataggartthx
15:47arohnerI have an arrow that looks like (-> foo (bar) (.trim))
15:47arohnerwhere .trim is being called on a string. How do I add a type hint there to avoid reflection?
15:53arohnerI guess I can do the fn trick
15:53dnolen_,(do (set! *warn-on-reflection* true) (-> "foo" identity (.trim)))
15:53clojurebotjava.lang.IllegalStateException: Can't change/establish root binding of: *warn-on-reflection* with set
15:54dnolen_(-> "foo" ^String (identity) (.trim))
15:54dnolen_^ works
15:54arohneraha!
15:54arohnerdnolen: thanks
15:57dRbiGcan anyone give me some 'classic' situation/problem when macros come really really handy?
15:58AWizzArddRbiG: when developing a DSL
15:59arohnerdRbiG: with-open
15:59arohner,(doc with-open)
15:59clojurebot"([bindings & body]); bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order."
15:59AWizzArdFor nearly every lib you will probably want to have one macro that offers a little DSL.
15:59dnolen_dRbiG: day to day boilerplate is a big use case.
16:02Chousukemacros are a potential solution whenever you feel like you're writing repetitive code
16:02dRbiGright.\
16:02dRbiGthe with-open example would be a block in ruby
16:03chouserthough closures do a pretty impressive job there too
16:03ChousukeYes, the first approach should of course be a design that doesn't force you to write repetitive stuff, but whenever that's not possible (or feasible) macros help
16:04parasebadRbiG: ruby block would be similar to passing a clojure function to with-open. Macros give you the extra syntactic sugar, so you don't need to wrap everything in (fn ...)
16:04dRbiGso lets consider: i want o bind a set of x-foo variables to results of (.foo bar) - i guess i can do it nicely with a macro?
16:04Chousukesure
16:04bsod1clojure repl funcitons like dir, doc, javadoc, pprint etc. are not included in `lein swank`, right? with `lein repl` I can use it but in SLIMV repl, I can't..
16:05arohnerbsod1: they're there, but you might have to 'use' them first to get them into your user namespace
16:05bsod1arohner: thanks, that's what I was wondering..
16:05arohner(use '[clojure.pprint :only (pprint)])
16:06arohneretc
16:06arohnerlook in clojure.repl, and clojure-contrib.repl-utils
16:16dnolen_bsod1: it also useful when you're building a fairly involved embedded paradigm, the results from macro transformation in core.logic are pretty intense.
16:16dnolen_oops, dRbiG ^
16:20dnolen_dRbiG: https://gist.github.com/1073927
16:22dRbiGdefne - ? some pattern maching defn?
16:22dnolen_dRbiG: it's basically Prolog.
16:23dnolen_but yes, that pattern matching via unification.
16:24dRbiGinteresting. pattern matching and currying is always useful
16:25dnolen_dRbiG: these macros are all about controlling names, binding, scope, etc. stuff that's hard to w/o macros.
16:33amalloydRbiG: as a matter of interest, you might like to see how it's possible to implement (let ...) as a macro layered over (fn ...)
16:36dRbiGi think i've seen that somewhere already
16:38amalloywell, https://gist.github.com/1073943 if you want
16:42arohneris http://dev.clojure.org/jira/browse/CONTRIB the right place for an issue in clojure/java.jdbc?
16:44amalloyarohner: i don't think so. lemme check
16:45amalloyarohner: http://dev.clojure.org/jira/browse/JDBC
16:45arohnersimilarly, I don't see a "new" style project for c.c.zip-filter and c.c.zip-filter.xml. Are they supposed to have one?
16:46dRbiGright, now i have a really stupid question: how do i get length of *command-line-args*? :S
16:46amalloy&(doc count)
16:46sexpbot⟹ "([coll]); Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collections and Maps"
16:47dRbiGthanks. i find the lack of common agreement on verbs a major inconvenience ;)
16:47dRbiGhmm, actually now i realise it's verbs vs. nouns
16:49amalloydRbiG: indeed. java has .length and .size - verbs with noun-names :P
16:49arohnerdRbiG: ideally, in a lisp (or any FP language), all function calls are verbs
16:50dRbiGmy 'code'base is mostly ruby now, so length is indeed my first idea
16:51arohnerchouser: what's the plan with zip-filter.xml and "new" contrib projects? I have a bug in zip-filter.xml; there needs to be a small tweak in tag= to make it work with your new data.xml
16:52arohnerchouser: in tag=, need to swap ((zip/node %) :tag) for (:tag (zip/node %))
16:52dRbiGthough it makes sense not to think about length/size as a noun-property of things that can be infinite
16:53arohnerdRbiG: right, sometimes it's not a property, which is why it's a verb
16:53wilfredhso, I read that Clojure's let behaves like Scheme's let*, so is there a Clojure equivalent of Scheme's let? Would it be useful?
16:54arohnerdRbiG: I also like count because length implies a 1D view of things that isn't entirely appropriate for e.g. sets
16:54dRbiGarohner: good point there
16:55zakwilsonI have never wanted let from CL/Scheme in Clojure, and usually prefer let* in those languages.
16:59amalloywilfredh: the equivalent is easy with destructuring, but there's not much need for it, and you don't get the (mild) performance benefits
17:00amalloy&(let [a 1, b (inc a)] (let [[a b] [b (inc a)] [a b]))
17:00sexpbotjava.lang.IllegalArgumentException: let requires an even number of forms in binding vector
17:00amalloy&(let [a 1, b (inc a)] (let [[a b] [b (inc a)]] [a b]))
17:00sexpbot⟹ [2 2]
17:00amalloythe first let creates some bindings, and the second uses destructuring to assign in parallel
17:01keithwyssHey everybody. I just noticed the other day that on the clojure.org/api pages for the xml and lazy-xml libraries there are a few pubic functions that aren't listed until you view the source. The emit methods are public, but not listed. Also lazy-xml/attributes.
17:01keithwyssIs this something that should be changed, or is using those functions discouraged for some reason?
17:06sean_corfieldmornin' :)
17:07sean_corfieldi'm looking at some clojure code (that i didn't write) and it has (swap! some-atom (fn [_] val)) - isn't that equivalent to (reset! some-atom val) ?
17:07sean_corfieldwould there be any reason to use swap! here rather than reset! ?
17:07amalloysean_corfield: maybe it's an effort to make the reader cry
17:09dRbiGand another question, i've got a function that takes two arguments - can i expand a thing like *command-line-args* so i won't have to do (first ...) (second ...) on it?
17:09parasebasean_corfield: I've seen the same thing several times, and always ask me why. I don't have an answer yet
17:10arohnerdRbiG: you could let destructure it
17:10dRbiGi want the shortest way to do it
17:10parasebasean_corfield: or the other form: (swap! x (constantly ....))
17:11dnolen_,(let [*args *[1 2 3] [a1 a2 a3] *args*] [a1 a2 a3])
17:11clojurebotjava.lang.IllegalArgumentException: let requires an even number of forms in binding vector
17:11arohnerdRbiG: (defn foo [[first_arg second_arg] :as cmd-line-args] ...)
17:11dnolen_,(let [*args* [1 2 3] [a1 a2 a3] *args*] [a1 a2 a3])
17:11clojurebot[1 2 3]
17:12dRbiGright, so :as seems to be the magic here
17:12arohnerdRbiG: http://clojure.org/special_forms
17:12arohnerlook at let
17:13dRbiGi admit i haven't read all the docs so sorry in advance for questions that are already answered there - i'll try to look first though :)
17:14parasebasean_corfield: I think I read somewhere, probably in JoC that you should try to use swap!, without major explanations. And, for instance, fogus unk library uses the (swap! x (constantly form
17:14arohnerreset! is the right thing to use in that case. it's explicitly what it's designed for
17:15amalloyyes, you should use swap! because your functions shouldn't be (constantly ...). if they are, you should use reset!, not least because it makes you question your approach
17:16parasebaamalloy: I see...
17:18amalloyif you change a mutable value in a way that ignores its current value, you're not managing state very well. there are exceptions to that rule, which is why we have reset!
17:20parasebayes, initialization for instance, when you already know for sure the current value
18:08chouserarohner: that change makes sense to me
18:08chouserBut I don't know anything about plans. I've been told not to commit to old contrib anymore, but I haven't heard anything about zip-filter being included in the new contrib.
18:09arohnerhrm. It should remain "alive"
18:09arohnerI
18:09arohnerI'm currently mapping over all of wikipedia's XML dump with it
18:10chouserIt seems to me someone who has the authority to create new-contrib projects should say which will be included (eventually, even) and which will not. Those that will not should be "released" from the
18:10chouserfrom the Clojure project so authors can take ownership of them themselves.
18:11amalloyhey chouser, since we're on the topic, did you get my github message about prxml?
18:11arohnerright
18:11chouserI think that technically the copyright would allow authors to do that now, but it seems a bit rude.
18:11ibdknoxWhat exactly is the motivation for removing the contrib libraries?
18:11chouseramalloy: I did. Did you see my response?
18:11amalloyapparently not
18:11amalloymy inbox is regrettably still empty
18:13amalloyibdknox: they're too monolithic. to get one function for parsing xml, you need to depend on a jar with a bazillion unrelated .clj files
18:13amalloy(that is, the motivation is that there is "a contrib library", not "contrib libraries")
18:13ibdknoxah
18:13ibdknoxmakes sense
18:14ibdknoxamalloy: unrelated, they seem to have finally merged my changes into the aichallenge, I think we can have more than one file now ;)
18:14amalloyoh cool
18:15amalloyhuh. i seem to have chosen *not* to follow/fork either your repo or theirs, ibdknox. strange decision
18:15ibdknoxlol
18:18dRbiGanother question probably answered somewhere in the manual: how do i define a global value? i don't like the idea of passing stuff all the way down
18:18amalloyibdknox: http://aichallengebeta.hypertriangle.com/starter_packages.php doesn't list it yet, so i gather there's some lag between the git repo and actual reality
18:18ibdknoxamalloy: I'll keep an eye on it and let you know when it works :)
18:19ibdknoxdRbiG: just define it at the top of your file? (def my-const 302)
18:19amalloydRbiG: (a) use def or defn; (b) you'd be amazed how much you can do with just lets and lambdas (that is, anything). see www.4clojure.com as an example of a problem-solving site that doesn't allow any defs
18:20sean_corfieldamalloy paraseba thanx for the input on swap! / reset!
18:25dRbiGdef doesn't do it ("java.lang.Exception: Unable to resolve symbol:") - btw i actually want a constant, not a variable :)
18:26dnolen_dRbiG: 1.3.0-beta1 supports (def ^:const foo bar)
18:26ibdknoxdRbiG: what was your line?
18:28amalloydRbiG: everything's (basically) a constant already, with the immutable data structures
18:28dRbiGibdknox: you mean the exception line?
18:28dnolen_oops I mean (def ^:constant foo bar)
18:28ibdknoxdRbiG: your def line that you said doesn't work?
18:29dRbiG(def root ".") for example
18:29dRbiGi guess
18:29amalloydRbiG: well that will work for sure
18:30dRbiGthe problem is in the other part
18:30ibdknox?
18:30dRbiGi'm trying to use it in def - proxy - let
18:30amalloyibdknox: the value he's assigning to the def'd var is an invalid expr
18:31ibdknoxah, I see
18:34parasebasean_corfield: do you have any thoughts on how we should test c.j.jdbc? would you use mocking or a real (maybe embedded) database?
18:38dRbiGright, all is needed is a forward declaration :)
18:39mdeboard`I'm teaching myself Clojure, have a strong Python background but very little formal CS education, so this question might be stupid. When using the word "lazy" in Clojure, e.g. "...`for` returns a lazy `seq` whereas `doseq` is for generating side effects..." (Joy of Clojure) is this the same concept as generator functions/expressions in Python? Or even (forgive me, I know this is far afield) Django QuerySets?
18:39dRbiGi'd say it
18:39dRbiGis
18:40mdeboard`I feel like it is at first blush but I don't want to have a misconception already
18:41pdkyou could look at it that way
18:41mdeboard`Ah, "Most of the sequence library functions are lazy, i.e. functions that return seqs do so incrementally, as they are consumed, and thus consume any seq arguments incrementally as well." http://clojure.org/sequences
18:42pdk(for [i (range 5)] (- 1)) would give you a lazy sequence that contains (0 -1 -2 -3 -4)
18:42mdeboard`That's about the same as Python generators (I understand there are other differences)
18:42dnolen_mdeboard`: generators in Python are not very functional if I'm not mistaken tho right? they are stateful no?
18:42pdkdoseq always returns nil so it's intended just for producing side effects like printing and i/o on each step of the loop
18:42amalloypdk: if you use (- i) instead of (- 1), anyway :P
18:42pdkwell
18:43pdkthat's true
18:43pdkcriminy!
18:43pdkso say if i wanted to print out each value in a sequence on a line
18:43pdk(doseq [i mysequence] (print i))
18:44mdeboard`dnolen_: Yes to the fact they're stateful
18:44dnolen_mdeboard`: that makes a fairly big difference.
18:44mdeboard`but they ar ea part of Python's functional paradigm
18:45pdkyou could picture something like a function closed over a ref as an analogy for python generators
18:45mdeboard`dnolen_: I see what you mean. I'm not used to thinking about state (at least in some explicit way)
18:47amalloythe same underlying mechanism fuels clojure's lazy-seqs and python's generators, but clojure exposes it with a much more functional api
18:49dnolen_amalloy: is that true? yield is more like continuations I thought.
18:50ibdknoxIterators in C# and VB work similarly, though they also keep state
18:52mdeboard`One other thing I'm getting hung up on while reading Joy of Clojure (and other docs) is the notion of "side effects." What I *think* that means is that a function does one thing -- yields a value -- but does not in the course of its operation do anything else. Can someone give me a practical/real world & as simple an example as possible? I've seen references that IO ops are an example of a side effect, but afraid I a
18:52mdeboard`m not making a connection.
18:52amalloydnolen_: there's not really a big difference. you can implement "yield" as "return a value/thunk pair", with the python runtime building the thunk for you. that's pretty much the same as how lazy-seq works, no?
18:54ibdknoxmdeboard`: pure functions take a value in and return a value out, nothing else happens. The notion of side effects is when a function changes something outside of itself.
18:55dnolen_mdeboard`: Are you asking how it's possible to do something useful w/o side-effects? :)
18:55mdeboard`dnolen_: No, not at all.
18:55dnolen_,(print "foo")
18:55clojurebotfoo
18:55mdeboard`dnolen_: I'm asking for a practical example of side effects because I am having trouble coming up with a context
18:55dnolen_mdeboard`: print doesn't return a useful value, it's IO
18:56mdeboard`ibdknox: Yeah, I get the general idea I guess, looking for a practical example.
18:56mdeboard`dnolen_: Hm, so, ... hang on.
18:57mdeboard`dnolen_: e.g. http://p.mattdeboard.net/clos.html, line 4, the println? I put it in there just to see what was going on in internals. Is that an exampel of a side effect?
18:58dnolen_mdeboard`: yup.
18:59ibdknoxmdeboard`: here's a practical example: I have a function to create users for my website. My first implementation simply takes in a name and password and returns back a map with an ID added and the password hashed. This implementation is currently free of side effects. I provide input and it gives me an output.
18:59mdeboard`Maybe it's tough for me to contextualize because it's strongly discouraged to have side effects in Python functions. Or, at least, I always try to avoid it since it makes code gross, unwieldy and hard to read/maintain.
19:00ibdknoxmdeboard`: that's not very useful though, because I haven't stored it somewhere. In my real implementation I add a line to my function that then stores that map in a database.
19:00mdeboard`Ahhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh!
19:00mdeboard`ibdknox: Now I see
19:00ibdknoxmdeboard`: now I have a side effect. If I were to create the same user 20 times, I would have the same user in my DB 20 times. Whereas with the pure function I could do it a million times and it wouldn't matter. :)
19:00dnolen_mdeboard`: changing the contents of shared dictionary inside of a function - mutation - is also a side-effect.
19:01mdeboard`Interesting.
19:01dnolen_mdeboard`: your ability to reason about your program just went out the window.
19:03dnolen_add some concurrency and you have a real mess.
19:03mdeboard`dnolen_: I don't understand that either, though I think that's just because I'm "too close" to Python. It's like being an abused wife. Too close to the situation to recognize how effed up it is.
19:04dnolen_mdeboard`: the reason people hate mutable globals is because they decrease your ability to reason about your program. Who knows who changed what where?
19:04ibdknoxto be fair, side effects aren't bad, per se
19:04ibdknoxjust they have to be monitored intelligently
19:04ibdknoxand used carefully
19:04dnolen_mdeboard`: but even local state changes are hard to keep in your head.
19:05mdeboard`dnolen_: re; local state changes, agree completely. Though I am having trouble reasoning through clojure recursion and looping.
19:05dnolen_mdeboard`: so Clojure datastructures are immutable, you can't never change anything without it flowing in a functional manner through your code. That is not w/o resorting to the various tools for managing state change.
19:05dnolen_mdeboard`: recursion is hard.
19:06dnolen_mdeboard`: but once you get it, it's pretty sweet.
19:09mdeboard`I mean I kind of get it, I know it's "process the first item from an iterable, then with the result of that process, process (first (rest iterable))" until, say (= (count iterable) 0), but actually putting those steps into practice hurts my brain. I'm trying to rewrite in Clojure this "make change" app I originally wrote in Python for school, and it's eating holes in my brain.
19:10mdeboard`ANyway, I'm done pissing and moaning, I'm enjoying Clojure. Thanks for all the thoughtful answers.
19:10amalloymdeboard`: chapter 3.2 of On Lisp has a discussion of this that i think is neat
19:10amalloypdf freely available at http://lib.store.yahoo.net/lib/paulgraham/onlisp.pdf
19:13amalloythe whole book really is fantastic; when you have some time, have a read. the last five chapters or so are still well beyond me
19:15ibdknoxamalloy: hah! That's awesome, I didn't know it was freely available.. it's damn near impossible to find the book
19:16dnolen_hmm is there any such thing as mutually recursive generators in Python?
19:16mdeboard`amalloy: Thanks. I'm working my way through Joy of Clojure right now
19:16amalloyibdknox: http://www.paulgraham.com/lisp.html and http://www.paulgraham.com/books.html
19:16amalloymdeboard`: another excellent book
19:17mdeboard`dnolen_: If there is, using them would be extremely inefficient from what I understand.
19:17amalloydnolen_: wouldn't any generator with two different yield statements be mutally-recursive?
19:18amalloyie, you could write it in clojure as two lazy-seqs that refer to each other
19:19ibdknoxamalloy: does python allow multiple yeilds? I know C# does
19:19amalloyibdknox: i know jack-all about python
19:20mdeboard`ibdknox, amalloy: Yes, with branching logic
19:20mdeboard`but not try/except
19:21amalloymdeboard`: well. i'm imagining something more like
19:21amalloyyield 1; yield 2; # pretending that semicolons are valid separators
19:21mdeboard`Oh, no
19:22amalloymdeboard`: http://linuxgazette.net/100/pramode.html ?
19:22ibdknoxyeah, C# allows that
19:22dnolen_amalloy: yeah this is what I'm talking about generator has to happen inside the same fn
19:22mdeboard`amalloy: mind: blown
19:23mdeboard`I thought yield froze the function and returned to parent context, like "return"
19:23amalloymdeboard`: once you have the facilities for a yield to exist anywhere in a function, adding support for more than one doesn't seem like much work
19:24dnolen_mdeboard`: amalloy: I just tried to write a mutually recursive generator in Python, didn't work for me. But perhaps there is way, I don't see any literature anywhere on it.
19:24mdeboard`amalloy: I'm not well-versed enough in the "how does that work" area to come to that conclusion :\
19:25dnolen_mdeboard`: in case, IHMO lazy-sequences are strictly more powerful general than generators in Python :)
19:26dnolen_mdeboard`: lazy-seqs, recur, and trampoline in tangent recover the loss of TCO in Clojure, not as elegant as TCO to be sure, but at least you can implement the literature in Clojure.
19:31mdeboard`This isn't mutual recursion, right? Putting on my dunce cap here.
19:31mdeboard`http://p.mattdeboard.net/foo.py.html
19:32dnolen_mdeboard`: not really, bar doesn't call itself.
19:32mdeboard`I'm terrible at recursion.
19:33amalloydnolen, mdeboard`: https://gist.github.com/1074054
19:33dnolen_mdeboard`: but that may be a good clue as to how it can be done.
19:33amalloydemonstration that having multiple yields is equivalent to mutual recursion
19:34mdeboard`amalloy: https://gist.github.com/1074055
19:34dnolen_amalloy: hardly, first and second could be higher order, impossible in Python.
19:35amalloydnolen_: i don't understand
19:35dnolen_first could take a "second", second could take a "first"
19:36dnolen_lazy-seqs are not some weird special case the way generators are.
19:36amalloyso? python has lambdas and closures
19:37mdeboard`"weird special cases"?
19:37amalloyi mean, generators are built into the language, yes, in a way i wish they weren't
19:37dnolen_amalloy: which can not be transfer yield to each other.
19:37amalloyyou're talking about continuations now?
19:38dnolen_amalloy: no I'm talking about the fact that lazy-seq support a kind of open mutual recursion, yield does not.
19:41mdeboard`wait uh
19:45mdeboard`dnolen_away: What do you mean doesn't support mutual recursion?
19:46mdeboard`stand by, paste inc
19:58amalloymdeboard`: trying to win an award for longest standby?
19:58mdeboard`dnolen_away, amalloy: Mutual recursion? http://p.mattdeboard.net/foo.py.html
19:58mdeboard`lol
19:58mdeboard`nice timing!
19:59mdeboard`er, ignore baz()
19:59mdeboard`oop
19:59mdeboard`http://p.mattdeboard.net/foo.py.html
19:59mdeboard`left out the whole "recur" part
20:00amalloyugh, languages with statement/expression dichotomy make me sad
20:01amalloyif foo yield bar; else yield baz;
20:01amalloyvs (yield (if foo bar baz))
20:02mdeboard`Yeah I prefer Python's branch logic syntax less than switch/case syntax.
20:02mdeboard`amalloy: But point being, isn't that mutual recursion between even & odd?
20:03amalloyi think so, but i never needed convincing
20:03amalloyi mean, clearly it's mutual recursion
20:03mdeboard`I NEED TO BE RIGHT ON THIS MAN
20:03mdeboard`But seriously, I know, but the guy who did conveniently disappeared.
20:03amalloybut is it mutually-recursive higher-order generators? that's for dnolen to decide, since nobody else is sure what he means
20:10mdeboard`If he meant that mutually recursive generators are first-class citizen, then yeah they are (obv). Anyway just a mental exercise on my part
22:04bdeshamany idea why I get "java.lang.Exception: No dispatch macro for: )" on the last line of <https://gist.github.com/1074160&gt;?
22:06scottjreplace the # with %
22:06scottjthe last #
22:07bdeshamoh gosh
22:07scottj# is a special character that does something different (dispatches) based on it's next character. like be a set #{} or an anon func #()
22:07bdeshamthat was simple ;-)
22:08scottjso anytime you get that message the offending char will follow a #
22:08bdeshamgood to know. thanks!
22:11ihodeswhat kind of tutorials/essays/whatever are needed in the beginner/whatever clojure community right about now? i still need to write my "ins and outs of clojure, pt II"... but aside from that...?
22:12bdeshamihodes: I haven't checked recently, but one thing I found overly difficult when getting started was just how to set up source files
22:13bdeshamlike, if someone gives you a function to try out... where do you put it? if you put it into a .clj file, how do you run it? how do you get a repl to access those functions? ...stuff like that
22:15ihodesbdesham: hmmm, good idea. getting started is getting easier, but conceptually no one has really explained it (or have they? where at?)
22:16mdeboard`I just started Clojure yesterday
22:16mdeboard`and want to enthusiastically second bdesham's suggestion
22:17bdesham;-)
22:17mdeboard`what's lein? Is it required? I'm using it because I guess that's the only way to get history via up/down arrow keys
22:17bdeshammdeboard`: if you have any specific questions, fire away...
22:17mdeboard`and tab completion, I think?
22:17bdeshamoh
22:17mdeboard`lein repl > vanilla repl
22:17mdeboard`afaict
22:17bdeshamyou can use other things for that, like jline, but leiningen is probably the easiest way
22:17bdeshamright
22:18mdeboard`How are Clojure projects organized? Hell, even something explicitly saying, "The file extension for Clojure files is .clj" would be awesome
22:18mdeboard`It's a 3-second Google request but still.
22:18mdeboard`How do I load a .clj file into repl contxt?
22:19bdeshamleiningen is primarily a build system, in that it'll handle the messy work of initializing a repl (as you've seen), fetching your project's dependencies, testing, and eventually putting everything into a single .jar file
22:19bdesham(err... not sure if you were actually asking, or just suggesting things to ihodes ;-))
22:19mdeboard`I'm asking :P
22:19mdeboard`and suggesting
22:20mdeboard`I'm p smart and self-educating but still, I know in a month I'm going to look back on my clojure directry structure and facepalm
22:20bdeshamright
22:20bdeshampersonally I wish I'd known about leiningen earlier
22:21mdeboard`I only knew about it because i use emacs and swank's maintainer wrote leiningen
22:21bdeshamI started with "Programming Clojure", which is really great, but kind of glosses over these mundane beginning details as far as I can recall
22:21mdeboard`so there was some cross-pollination
22:21mdeboard`Yeah, tutorials tend to skip over things
22:21mdeboard`really low-level considerations
22:22bdeshamI'd like to write a tutorial like that, but I'm not sure I have a good enough understanding of how the internals work
22:23ihodesmdeboard`: great! tell me more, if you can think of it ;) and ask questions, if you've got any
22:23ihodesmdeboard`: i'd look on the github page for leiningen re: getting started. technomancy has some nice info there as well
22:24mdeboard`Yeah I did, followed all that. I'm good on the REPL end (though I could use some auto-indentation and colorization :) )
22:24ihodesmdeboard`: including an example project. and getting going with clojure deps etc
22:24ihodesmdeboard`: yeah that would be so nice...maybe I'll get around to it one day ;)
22:24bdeshamwhat's the best way to call (time ...) without displaying the output of the call?
22:25bdeshamat the repl
22:25bdeshamI guess I could just look at the definition of time and have it return nil
22:25mdeboard`Here's a question. What does this syntax mean:
22:26mdeboard`(defn foo [[op & args]]
22:26ihodesbdesham: it returns the value of the expression you're timing, and prints the time out
22:26mdeboard`the double-brackets
22:26ihodesbdesham: so no worries there, i don't think
22:26ihodesmdeboard`: double brackets == destructuring
22:26mdeboard`??
22:27mdeboard`destructuring is...a concept I Just need to read about?
22:27bdeshammdeboard`: yep ;-)
22:27ihodesmdeboard`: e.g. (let [[x y] [1 :a]] {x y}) => {1 :a}
22:27mdeboard`Alright. I'm reading through Joy of Clojure
22:27ihodesmdeboard`: make sense?
22:27bdeshamit's important, and a useful thing to learn
22:27bdeshamihodes: right, I just want (time) to not return that value
22:27ihodesmdeboard`: i think it's in the JoC--been a while since i've read it through. it's definitely a useful think to learn. you can destructure maps, too. which is great.
22:27bdeshamI'm testing an algorithm by making it do a lot of computations, but I don't actually want to see the output
22:28bdeshamI looked at the source for "time" and just replaced the last form with nil, that works fine
22:28ihodesbdesham: what's your use scenario? what are you trying to avoid? you could e.g. just do (do (time (first [1])) nil)
22:28ihodesbdesham: or that!
22:29mdeboard`oh, destructuring is like uh
22:29bdeshamihodes: oh, good idea with the (first ...)
22:29mdeboard`is not unfamiliar
22:29mdeboard`from py
22:29ihodesbdesham: the first is just the example algorithm i'm timing ;)
22:29bdeshamI'm doing something like (take 1000000 <my function>) and all the values overwhelm my terminal
22:29ihodesbdesham: so (do (time ALGORITHM HERE) nil) as do just returns the last form
22:30ihodesi'd use `do` i think
22:30ihodesmdeboard`: good -- do you understand sort've my example above? don't know if it was clear enough
22:30mdeboard`Yeah
22:30ihodessort of*
22:30mdeboard`That's what I used to grok the concept
22:30bdeshamd'oh... I was thinking first would evaluate the expression and not return the whole thing, but that wouldn't work for lazy sequences ;)
22:31ihodesmdeboard`: good. you can do similar things with maps, though it's a little tricker. google "destructuring maps clojure" to get some good info, i'd say. or read JoC ;)
22:31mdeboard`that's like uh
22:32mdeboard`(lambda x,y: {x:y})(1, 'a')
22:34ihodesmdeboard`: in a way, i suppose. though that's just a function application there, but the effect is similar. you'll get the hang of it the more you see and use it--feel free to ask any Qs here too
22:45mdeboard`wow joy of clojure fisting my third eye
22:46ihodesmdeboard`: haha how so?
22:46mdeboard`explanation of what state is, difference between mutable & immutable state, and the advantages of immutable state gave me that, "Ohholyshit!" moment of comprehension
22:47mdeboard`mostly about the nature of OOP
22:47ihodesmdeboard`: there you go :) it's such a great read. what langs are you coming from?
22:47mdeboard`Python mostly, but some js as well.
22:48mdeboard`Toyed with lots of others but nothing I'd ever claim any kind of knowledge about
22:49ihodesvery nice. i like python. welcome to Clojure though! i'm off--being kicked out of my coffee shop. happy coding
22:49mdeboard`tt
23:00Yamazaki-kun340-2899999999999999999999999999999999999999999999999999999999999999999999999 opppppaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
23:00mdeboard`arigato gozaimas
23:01Yamazaki-kunsorry; my cat apparently really need to say that.
23:02mdeboard`Yamazaki-kun: thought you were having issue with floating point
23:02mdeboard`340.289999999999999999999999999999999999999999999999
23:09jimi_hendrixhello, what is the prefered editor for writing clojure?
23:10mdeboard`jimi_hendrix: What editor are you used to?
23:10mdeboard`or, what editor do you normally use?
23:11jimi_hendrixmdeboard`, depends. typically i use vim, but i also use eclipse for jvm stuff. i know that emacs is the popular editor in the lisp community
23:11hiredmanemacs is very popular for clojure as well
23:11mdeboard`Yeah I use emacs for everything, personally
23:12mdeboard`python, js/node, clojure
23:12tufflaxvim is ok for clojure
23:13mdeboard`jimi_hendrix: emacs is popular for lisps because it's written in a lisp, so is well-suited to handling lisp syntax out of the box.
23:13jimi_hendrixright
23:13jimi_hendrixit also has slime/swank
23:13tufflaxjimi_hendrix you may wanna look at this or something http://www.deepbluelambda.org/programming/clojure/programming-clojure-with-vim
23:14tufflaxi use vimclojure myself and im pretty happy with it
23:14mdeboard`jimi_hendrix: Eh slime/swank are a bridge too far for me right now. I'm sure it's handy but I just use vanilla clojure-mode and lein repl. I'm sure vim is fine too
23:14mdeboard`as long as it has auto-indent & parens matching I can't imagine it mattering too much in the beginning
23:16mdeboard`i spent a couple hours mucking about with slime/swank yesterday, finally just threw up my hands and am using vanilla clojure-mode. Don't really miss anything.
23:16Scriptoras a vim user, I like having a separate window for slime right below the main editor in emacs
23:16Scriptorone of the reasons why I started learning it
23:17mdeboard`sigh I should probably get slime up-and-running
23:17tufflaxScriptor hm what do you mean exactly... main editor?
23:17Scriptortufflax: the window that contains whichever file I'm working on
23:18Scriptorjust in case anyone is confused, I'm talking about emacs windows...or whatever they called
23:18jimi_hendrixScriptor, i have messed around with slime and that is a very nice feature
23:18mdeboard`buffers
23:18tufflaxok... but what is emacs? but you are a vim user?
23:18mdeboard`http://common-lisp.net/project/slime/images/more-slime.png
23:18tufflaxthats*
23:19mdeboard`tufflax: I think he just means, like, "I am not an emacs zealot and use mostly vim, but I like having slime emacs separate buffers etc etc"
23:19Scriptortufflax: mpost of the time I use vim, but I've been tinkering with clojure using emacs (don't use vim with clojure otherwise)
23:20tufflaxI've not used emacs a lot but one can get a decent repl and all that in vim too
23:20Scriptoryea, but it was just simpler to set up slime/swank with emacs :)
23:20Scriptoralthough I do have vimclojure
23:20jimi_hendrixtufflax, i am reading the link you gave me right now. i do very much prefer vim to emacs 99% of the time
23:21hiredmanwhen I wrote clojure in vim I prefered to just have a seperate repl running over using vimclojure, but I never use vim anymore
23:24tufflaxAlthough I'm new to both vim and emacs, I imagined the basic editing being much nicer in vim, so I went with that
23:24hiredmanmeh
23:24Scriptorthe super-simplified way of putting it is that vim is the better text editor, emacs the better dev environment
23:25hiredmanI used vim for years, had to switch to emacs for work, so much better
23:25tufflaxoh yeah? but doesn't your wrists hurt? :p
23:26hiredmanI think the joke is the pinky starts to hurt
23:27tufflaxbut seriously, why is it so much better?
23:27hiredmanI have capslock mapped to control, and have for many months now but still haven't gotten into the habbit of using it instead of control
23:27hiredmantufflax: have you ever written vimscript?
23:27tufflaxjust a little
23:27hiredmanelisp is horrible but it beats the pants off of vimscript
23:27tufflaxhehe'
23:28mdeboard`tufflax: It's so much better iff. you want a fully customizable dev environment
23:28tufflax:)
23:28hiredmanemacs has org-mode which is amazing, all you can write all kinds of crazy extensions
23:28hiredmanand
23:28mdeboard`and no insert-mode
23:29hiredmanfullscreen gui emacs on my mac is just so damn pretty
23:29tufflaxi made a totally new keyboard layout where i bound my caps lock to alt-gr, and have every symbol on the keyboard on alt-gr + letters, its really good with vim
23:29hiredman(emacs 24 + the cocoa fullscreen patch)
23:30mdeboard`scpaste :)
23:32hiredmanto be fare vimscript is #11 on the github rankings which is kind of crazy
23:32hiredmanelisp is #13
23:32hiredmanfair
23:32hiredmanI can't believe anyone would put themselves through writing that much vimscript
23:34jimi_hendrixvimscript is crazy though
23:34scottjalso perhaps more elisp projects are included in emacs itself or emacswiki than vimscript projects in vim and whatever
23:34mdeboard`Plus, I mean, irc in my editor? Yes pls
23:34jimi_hendrixmdeboard`, i tried that. it wasnt that great
23:34mdeboard`doin it wrong
23:34mdeboard`:P
23:35Scriptormdeboard`: emacs is my favorite windows irc client
23:35jimi_hendrixidk, i need my xchat
23:35jimi_hendrixeven though i hate it
23:35mdeboard`...
23:35jimi_hendrixits like an abusive relationship
23:36mdeboard`people need all these features for IRC, I don't get it
23:36ScriptorI love seeing 4 irc channels at the same time
23:36mdeboard`tab completion of names, event notifications, auto ID to services is all I really need
23:36Scriptorwith xchat I'd have to keep tabbing around
23:36jimi_hendrixmdeboard`, i barely use any
23:36hiredmanI get notifications from irssi
23:37jimi_hendrixScriptor, thats true, but many other clients support windows/panels
23:37hiredmanI have a program that reads the irssi log and sends it to SQS and then I pull it down from SQS and growl it
23:37hiredmancosts about $1.20 a month
23:37mdeboard`rcirc is a great IRC/IM client. Plus fully scriptable :)
23:38scottjhiredman: why now pull it from whatever host you're running irssi on?
23:38Scriptor"and doesn't light up like a christmas tree"
23:38Scriptorheh
23:38hiredmanscottj: I could, but SQS is webscale :)
23:39hiredmanactually my first version used hornetq running on the host irssi is running on
23:39scottjhiredman: hehe :) I do a similar thing with one line of bash
23:39clojurebothiredmans euler.clj is so embarassing
23:39hiredmanclojurebot: thanks
23:39clojurebotthanks for your suggestion, but as usual it is irrelevant
23:39Scriptorharsh
23:40tufflaxhaha
23:51mdeboard`mmkay just got slime/swank installed for emacs. Wow. Enormous, enormous boost.