#clojure logs

2011-01-30

02:37duck1123Does anyone know if CDT works with 1.3? I'm able to set breakpoints and step around, but whenever I try to reval, I get an exception
06:23LauJensenMorning all ya'll
06:25robonobomornin'
06:25bsteuberhi
07:57robonobois there a macro for (cond (= foo bar) (...) (= baz bar) (...) ...)
07:57robonobo?
07:59MayDanielrobonobo: (case bar foo (..) baz (...)) or (condp = bar foo (...) baz (...))
07:59robonoboMayDaniel: thanks!
08:24pyrhi
08:24pyrwhen starting lein repl, should i be able to directly access my namespaces ?
09:11odyssomaywhich is best? http://pastebin.com/5DcT5zM8
09:13cinchpyr: yes, when you start the repl you're in the user namespace, then you can switch to another namespace with (in-ns 'my.name.space)
09:16bsteuberodyssomay: I'd use (reduce * (range 1 x))
09:16bsteuber,(reduce * (range 1 3))
09:16clojurebot2
09:17bsteuber,(reduce * (range 1 (inc 3)))
09:17clojurebot6
09:18odyssomaybsteuber: yes, that's alot better
09:21odyssomayMore generally: is it OK to create different versions of a function wich is only used by the function itself? (as I did with fact2 in the paste above)
09:22bsteuberI think if it's not meant to be used from other functions, an inner function is cleaner
09:23odyssomayok
09:23bsteuberor a private helper function
09:30odyssomaybsteuber: btw, using (reduce * (range 1 (inc x))) takes ~10ms with x=1000, recursively (with recur) it takes ~4ms
09:44LauJensenodyssomay: Like, that is just Hotspot warming up, test with Criterium
09:49odyssomayLauJensen: hotspot?
09:49LauJensenodyssomay: yes sir
09:51LauJensenodyssomay: grab this https://github.com/hugoduncan/criterium then run (bench :verbose ...) where ... is first your reducer version and second the recur version, then paste the results in here
10:17no_mindis there an online index for clojure symbols/operators such as ~@, ->, --> . Searching google for these is useless
10:19opqdonutclojuredocs.org is pretty nice
10:20Vinzentthere is cheatsheet in pdf on clojure.org
10:21mrBlissno_mind: like opqdonut said: http://clojuredocs.org/quickref/Clojure%20Core
10:44raekhow would you interleave two sequences (def a [0 1 2 3]) (def b [:a :b :c]) into (0 :a 1 :b 2 :c 3)?
10:45raekI'm only interested in interleaving two sequences, where the first one might have one element more than the second one
10:45opqdonut,(flatten (map vector [0 1 2 3] [:a :b :c]))
10:45clojurebot(0 :a 1 :b 2 :c)
10:46raekthe 3 is missing ;-)
10:46opqdonutyeah
10:46tomojI think this works https://gist.github.com/73c9627bb97c36bbe6e0
10:46tomojgotta be a nicer way to do it of course
10:46opqdonutof course a recursive solution is easy to write
10:51raekmy recursive solution: https://gist.github.com/802959
10:53raektomoj: opqdonut: thanks for the input
11:22robonoboi tried to make a lazy interweave as well, but the lazy part doesn't seem to work. https://gist.github.com/802982 What am i doing wrong?
11:24Chousukerobonobo: loop is not lazy
11:25robonobois there something i could use in replacement?
11:25raekrobonobo: you should do the work inside the lazy-seq form
11:25Chousukewhat is interweave supposed to do?
11:25odyssomayLauJensen: http://pastebin.com/MarSzNJs
11:25robonoboChousuke: Take two collections and return a lazy seq of alternating items
11:25robonobo from the first coll, then from the second etc until one of the
11:25robonobo collections is runs out of elements.
11:25raekrobonobo: yes. ordinary recursive calls, but having the code that performs the recursive call inside a lazy-seq form
11:25Chousukerobonobo: interleave? :P
11:26raek(I renamed mine "alternate")
11:26LauJensenodyssomay: Would be great to see the code as well
11:26robonoboraek: so (lazy-seq (loop [] (recur)) ?
11:27raekalmost. do the looping by recursive calls: (defn foo [x] (lazy-seq ... (foo (rest x)) ...))
11:27odyssomayLauJensen: http://pastebin.com/pWNP7z7x
11:27raekall code inside lazy-seq will be delayed
11:28raekit will be evaluated when the you call seq (or any sequence function) on the object returned by the lazy-seq form
11:28raeks/when the you/when you/
11:28sexpbot<raek> it will be evaluated when you call seq (or any sequence function) on the object returned by the lazy-seq form
11:29LauJensenodyssomay: I think it may be because fact4 is working on a seq and fact3 isnt. Also internalReduce is probably doing some optimization.
11:30tomoj&(do (map inc (lazy-seq (println "foo") '(3))) nil)
11:30sexpbot⟹ nil
11:30LauJensen&(time (dotimes [i 1000] (loop [acc 1 x (range 1 100)] (if (seq x) (recur (* acc (first x)) (next x))))))
11:30sexpbot⟹ "Elapsed time: 122.954677 msecs" nil
11:30LauJensen&(time (dotimes [i 1000] (reduce * (range 1 100))))
11:30sexpbot⟹ "Elapsed time: 117.813001 msecs" nil
11:33odyssomayLauJensen: I see
11:35raekrobonobo: to play around with laziness, I recommend something like this: https://gist.github.com/480608
11:36raektry something like (def x (ask-the-user-seq)) and try to call (first x) (take 3 x) etc
11:36robonoboraek: thanks, I find laziness hard to wrap my brain around. Are there any good tutorials?
11:38raekwell, there's this one: http://clojure.blip.tv/file/734409/
11:38raekbut it's slightly out of date
11:39robonobothe example you gave is a pretty good starting point
11:39raek(lazy-cons has been replaced by lazy-seq, empty seq and nil is not the same thing anymore)
11:39raek,(doc lazy-seq)
11:39clojurebot"([& body]); Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it ...
11:40pppaulhey, i'm having problems with (ns mynamespace (:require [myfile :as :mycode]). clojure can't find myfile.clj even though it's in the same folder as the file looking for it
11:41raekI think the docs for lazy-seq accurately describes how it works. though it probably does not help you with getting a feel for how lazy seqs are written
11:41raekrobonobo: also, check out this: http://clojure.org/lazy
11:41pppaul,(#(% # (% %)))
11:41clojurebotNo dispatch macro for:
11:42raekpppaul: are you using leiningen or cake?
11:42pppaulleiningen (but i'm outside of it now, running from emacs)
11:42pppaulshould i start up my project from leiningen
11:43raekwhy? swank-clojure + slime allows you to have both...
11:43pppauli cus i think my emacs is a bit broken (swank/slime problems)
11:43pppaulmy slime is fucked
11:44pppaulis it hard to do this without swank/slime?
11:44raekI find it easiest to install slime from ELPA/package.el
11:44raekand then M-x slime-connect to the swank server
11:44raekthat you start with "lein swank" at the terminal
11:45pppaulso, do i start up the server via lein, and then connect in emacs?
11:45raekmanaging the classpath yourself is (IMHO) not worth it
11:45pppaulwill this solve the problem i'm having with clojure having the wrong classpath?
11:45raekpppaul: yes
11:45pppaulbooooo classpath
11:45raeklein is made for handling the classpath
11:45pppaulok, time to fix slime
11:46pppaulis cake easier?
11:46raekhttps://github.com/technomancy/swank-clojure
11:46raekI would say it's fairy equivalent
11:46raekyou use it the same way
11:46pppauli don't know the difference
11:47raekit started as a separate project. lein and cake are now very similar for basic tasks
11:47raekthe swank-clojure readme (see previous link) contains most that you need to use swank-clojure and slime
11:49raekif you use technomancy's emacs-starter-kit, installing slime is even more simpler, since you have package.el from the beginning
11:50pppaulok, i didn't do the starter kit, i'll try that too
11:50pppauli have problems installing slime or swank-clojure in emacs now
11:50pppaultroubleshooting time
11:50raekanyway, beware that the 'swank-clojure.el' emacs file (which used to let you start a swank server by running M-x slime) is deprecated
11:51raekdon't install swank-clojure in emacs
11:52raektechnomancy's Durendal project is a good replacement for it. it uses leiningen to do its tasks, but makes it easy to call from emacs
11:55raekthere's two things called "swank-clojure": 1) the clojure library swank-clojure and 2) the deprecated emacs file "swank-clojure.el", which was used for starting 1)
12:20no_mindhow do I include a clojure lib for use in repl /
12:22markskilbeckno_mind: http://clojure.org/libs
12:22tomojhow do you get at a public field with the same name as a public nullary method?
12:23tomojneed to read it I mean
12:23raektomoj: does Foo/bar for the field and (Foo/bar) for the nullary method work?
12:24tomojinstance fields and methods, I should've said
12:24raekno_mind: use a build tool like leiningen or cake
12:25raek,(.width (java.awt.Dimension. 1 2)) ; <-- instance field
12:25clojurebot1
12:25raek,(.getWidth (java.awt.Dimension. 1 2)) ; <-- instance field
12:25clojurebot1.0
12:25raeks/field/method/
12:25sexpbot<raek> ,(.getWidth (java.awt.Dimension. 1 2)) ; <-- instance method
12:26raekhrm. but what happens when they have the same name?
12:26tomojexactly
12:26tomojthe method appears to be called
12:26no_mindmarkskilbeck: that doesnt solve the problem. I have downloaded congomongo in a dir and I can :use it in a program. My problem is, i want to use the congomongo in repl. From repl when I execute (:use somnium.congomongo), I get an error java.lang.ClassNotFoundException: somnium.congomongo (NO_SOURCE_FILE:1)
12:26tomojhaven't found a way to get the value of the fields
12:27raektomoj: maybe you can use the . form directly... don't know if that would fix the problem though...
12:27tomoj(. d width) didn't
12:28raekno_mind: that means that you didn't start the repl with that jar on the classpath. leiningen handles that stuff automatically
12:28no_mindraek: I specified the classpath with -cp
12:29raekno_mind: did you list the jar in the classpath, or the directory containing it?
12:29tomoj"...the name of the field is the name of the symbol, and the value of the expression is the value of the field, unless there is a no argument public method of the same name, in which case it resolves to a call to the method."
12:30raek(also note that if you use the -jar option, -cp is silently ignored)
12:30no_mindraek: I used this java -cp "lib/*" -jar lib/clojure-1.1.0.jar
12:31no_mindraek: so how do I get congomongo in repl ?
12:31raekjava -cp "lib/*" clojure.main
12:32raekthe -jar option causes -cp to be ignored
12:32raekclojure.main is the main class of clojure.jar
12:33tomojwall-hack-field appears to work :(
12:33no_mindraek: same error while :use-ing congomongo with your method
12:34raekno_mind: do you run (use 'somnium.congomongo) or (:use somnium.congomongo) at the repl?
12:34no_mind(:use somnium.congomongo)
12:42raekno_mind: you must use the (use 'somnium.congomongo) form at the repl. the other one is for use inside the ns macro
12:42raekyou got the error because you accidentally tried to look up the :use key in the somnium.congomongo java class, which does not exist.
14:34zvrbahmm, is there a way to write just StreamTokenizer instead of java.io.StreamTokenizer ?
14:35Chousukeimport it.
14:45zvrbahow?
14:45clojurebotwith style and grace
14:46raekin the ns form: (ns your.namespace (:import java.io.StreamTokenizer)), when playing in the repl: (import 'java.io.StreamTokenizer)
14:48raek...either one, preferably, with style and grace ;-)
14:49zvrbathanks :)
15:05brehautmorning everyone
15:06brehautmorning __name__
15:06__name__hello brehaut
15:06__name__brehaut: it's 9 pm over here :D
15:06brehautclojurebot: UGT
15:06clojurebotugt is Universal Greeting Time: http://www.total-knowledge.com/~ilya/mips/ugt.html
15:48svdberghi!
15:48__name__hi!
15:48xkbwhat's the idiomatic way of creating lists?
15:49brehautxkb: literals or programmatically?
15:49xkb'(1 2 3) or (list 1 2 3)
15:49xkblike that
15:49xkblike in for example a test
15:49brehauti think the former is prefered
15:49Chousukethe former only works with literals
15:50Chousukebut most of the time you'd use lists in other lisps, you will use a vector in clojure
15:51xkbI ran into the problem defining the expected result of a function on seq's in a test
15:51xkblike (is (= expected_result (function)))
15:52xkbwhere function returns something like (1 2 3)
15:52xkbhow would you define expected_result?
15:52Chousukeif it only has literals, '(1 2 3)
15:52brehautxkb: as long as both expected_result and (function)'s return are both seq's (rather than maps or sets)
15:52brehautthey should be comparable
15:52brehaut,(= '(1 2 3) [1 2 3])
15:52clojurebottrue
15:53xkbok, that's how I defined expected_result now
15:53brehautregardless of the implementation type
15:53xkbin for example the empty seq case: (is (= '() (function '()))
15:54xkbbut the literals hint is good to think about
15:55xkbin this specific case the elements are always Strings, numbers or nil
15:56brehautxkb have you actually encountered a problem or are you trying to prevent a potential problem?
15:57xkbbrehaut: the latter
15:57xkbI tried to identify the error cases
15:57xkblike the empty seq
15:58xkbso rather the potential error cases
15:58brehautthen dont worry. as long as both sides are sequences (lists, vectors, lazy-seqs, etc) = will do the right thing
15:58xkbI got some comments from a friend of mine regarding the use of ' to define a list
15:58brehautand keep in mind Chousukes comment about vectors being the idiomatic sequential type in clojure
15:58xkbthat's what triggered me to ask here :)
16:00xkbperhaps I should define my testdata as vectors indeed. That avoids the "problem" alltogehter
16:01xkband the actual test remains the same
16:01xkbthanks for the help. Always nice to get quick answers to these kind of questions
16:01brehautno problem
16:06fpsjust following this tutorial http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
16:08fpswhen setting up the test project in project.clj, I replaced the dependencies clojure with version 1.3.0-master-SNAPSHOT, which works.
16:09fpsbut for clojure-contrib I used "1.3.0-SNAPSHOT", which results in a maven error, where the clojure-contrib.jar could not be found...
16:11fpsany tips?
16:11brehautfps are you just getting started with clj?
16:12fpsyep
16:12brehautthen stick with 1.2
16:12brehautclj 1.3 is still in alpha, i dont think contrib is following closely yet
16:13fpsok, will try. Thanks
16:15raekthe syntax looks very clojure-inspired
16:19Dranikhi all!
16:19Dranikwhat web framework to choose for web application development on clojure?
16:20brehautDranik: there is only one 'web framework'
16:20brehautbut there is a range of good web libraries
16:20brehautthat work together
16:20Dranikbrehaut, so what's the web framework?
16:20brehautDranik: everything is built ontop of 'ring'
16:20raekhttp://www.glenstampoultzis.net/blog/clojure-web-infrastructure/
16:21Dranikraek, thanks
16:21brehaut(inc raek)
16:21sexpbot⟹ 4
16:21Dranikwow! it's really distributed...
16:23brehautDranik: common combinations to start with are Ring, (Moustache or Compojure), (Enlive or Hiccup)
16:23Dranikbrehaut, seems like you have some practical experience?
16:23Dranikbrehaut, do you blog about that?
16:24brehautDranik: ive built my own site/blog on ring, moustache and enlive
16:24Dranikwow!
16:24brehautand ive written an xml-rpc library. my experience is a little limited
16:24Dranikwhere is it deployed?
16:24brehauthttp://brehaut.net
16:24brehautits nothing fancy
16:24Dranikbrehaut, oh, looks great!
16:24Dranikreally!
16:25brehautthanks :)
16:25Dranikbrehaut, do you share the sources?
16:25brehautnope sorry
16:25Dranik:-(
16:25brehautmy site is always my 'learn stuff' project, so its a horrible mess
16:26Dranikbrehaut, actually my clojure experience is so little that everything goes
16:26brehautLauJensen does have an example site or two
16:26brehauthttps://github.com/LauJensen/bestinclass.dk
16:27Dranikthanks!
16:27brehauthes also blogged about building a social media site too http://www.bestinclass.dk/index.clj/2011/01/building-a-social-media-site.html
16:28Dranikhttps://github.com/LauJensen/bestinclass.dk -- his site looks lovely
16:29brehauthis code is real clean. note that it 'bakes' the site for him, rather than dynamic generation. nevertheless it should show you a good example of moustache and enlive
16:29Dranikbendlas, yep, thank you
16:29fpsI am not familiar with ant, how would I build the clojure-contrib 1.2.0-SNAPSHOT?
16:29Dranikbrehaut, and your post about monads is really interesting
16:30brehautfps are you using leiningen or cake?
16:30Dranikbrehaut, I guess I translate some to my blog. Its in russian
16:30brehautDranik: monads are not an approved method of solving problems in clojure.
16:30fpsbrehaut: leiningen
16:31brehautfps dont use a snapshot then
16:31fpshaha ok
16:31brehautfps [org.clojure/clojure "1.2.0"]
16:31brehaut [org.clojure/clojure-contrib "1.2.0"]
16:31brehautput those into your :dependancies in project.clj
16:31Guest51521brehaut: what do you mean about monads not being approved?
16:31Dranikbrehaut, yep, I thought so. But it's interesting bcs it is not idiomatic
16:31fpsok. thanks brehaut
16:32Dranikbrehaut, I've just coped creating anaphoric macross with lexical variable capturing -- it was also not idiomatic but very interesting!
16:32brehautGuest51521: clojure has a bunch of more specific tools to solve 95% of the problems monads solve, and they are more idiomatic
16:33raekfps: the tutorial you linked to uses a bit of an unusual approach to clojure development (compiling everything from source). it seems to be the norm to use pre-compiled jar files and let the build tool (lein/cake) handle the downloading and the classpath
16:33brehautGuest51521: while they exists, rhickey has commented more than once that he doesnt think they are appropriate
16:34fpsraek: ok, will remember
16:34brehautGuest51521: here is teh appropriate logs http://clojure-log.n01se.net/date/2010-02-12.html#i70
16:34Guest51521brehaut: i'm no functional guru but from my novice perspective, they seem like a cleaner way to handle code that throws exceptions everywhere when doing interop with java
16:34Guest51521thanks brehaut. i'll read
16:34brehautGuest51521: Java exceptions arent idiomatic clojure either.
16:35Guest51521brehaut: but you have no choice but to deal with them for java interop. the world isn't clojure on the jvm :)
16:35Guest51521i guess that's one of the 5%
16:36brehautGuest51521: correct. java interop is first class, so clojure provides exception handling when you need it
16:36brehautbut most clojure code wont throw exceptions
16:36brehautGuest51521: ive used monads to make error handling cleaner for some of my code, only because it makes implementing the appropriate macros simpler, especially while prototyping.
16:37raekbrehaut: looked at that article recently. very interesting!
16:37brehautHowever, consumers of my code dont need to know that there are monads under the hood
16:37brehautraek: cheers :)
16:37brehautraek: hopefully with the changes to the colors scheme, you can read it without loosing your eyesight too
16:38raekyeah, saw that that you toned down the yellow a bit
16:39raekI think it's perfectly acceptable now
16:39brehautraek: im a bit sad about that, but ive gotten such an overwhelm grumpy response i really couldnt not
16:40raek:(
16:47Guest51521is this a good place to ask a question about ccw in eclipse?
16:47brehautGuest51521: good as any
16:48Guest51521i was using the stable version of teh plugin but am trying out 0.2.0.RC05 now and it doesn't give a prompt in the repl showing the namespace lke it used to. in fact there is no prompt at all in the repl, cursor is just all the way to the left. is that a bug or can i set some var to show the namespace prompt that i'm used to?
16:50Guest51521everything seems to work fine but i don't like that it doesn't display the current namespace
16:51brehauti never used the repl in ccw sorry
16:55brehautDranik: just done some reading on anaphoric macros; not kidding about non-idiomatic
16:56Dranikbrehaut, sorry?
16:56Dranikdidn't get it
16:56brehautYou mentioned that you had recently ported anaphoric macros to clojure?
16:57Dranikbrehaut, yep. did you read about it from Paul Graham's On LIsp?
16:57brehautapparently so
16:57Dranikthe main point there was variable capture
16:57Dranikand that is not possible in clojure, isn't it?
16:59brehautnot out of the box at any rate
17:00Dranikthat what I meant
17:00Dranikactually, everything I had to do -- creating my own version of gensym
17:01Dranikit looks like this
17:01Dranik(defn make-sym [name] (. clojure.lang.Symbol (intern (str name))))
17:01Dranikit generates unqualified predictable names for variables
17:01brehautwhy not just (symbol (str name))
17:01Dranikand the rest was just translating from lisp to clojure
17:02Dranikbrehaut, guess, intern is also needed here
17:02Dranikthe function make-sym is just a simplified version of usual gensym
17:29wjlroeWhen I do (print "αβγ") from the REPL, it prints fine, but from a .clj file run from the terminal it prints "???" - why is this?
17:30rlbwjlroe: both from a terminal?
17:30wjlroeyep
17:31rlbwjlroe: I'd guess that clojure hooks up a fancier stream to the prompt then.
17:31mjg123I'm having trouble using 3rd party library in the repl. Probably a real simple problem: http://pastebin.com/SzyWS89t
17:31rlbjust a guess, though
17:32wjlroemmm
17:32rlbwjlroe: or the stream encoding defaults are different
17:32wjlroerlb: how would I find out?
17:32rlbi.e. utf-8 vs something-else
17:32brehautmjg123: you need to wrap parents around your use
17:33brehauts/nts/ns/
17:33sexpbot<brehaut> mjg123: you need to wrap parens around your use
17:33brehauteg (use 'somnium.congomongo)
17:33mjg123brehaut: cheers
17:33brehautmjg123: no worries. you can see the repl has evaluated both expressions (eg 'use
17:34kjeldahlHas anybody done simple "log to stderr" type logging from running a jetty/ring webserver with handlers from repl (with join? false)? I'm having some trouble figuring where output goes, if anywhere...
17:34brehaut and the quoted symbol 'somnium.congomongo) and printed them on the repl
17:34rlbrelevant? http://jkndrkn.livejournal.com/264856.html
17:35wjlroerlb: I get "MacRoman" for (.getEncoding *out*) from the REPL and from the script
17:35rlbwjlroe: try the -D
17:35wjlroerlb: okey dokey
17:35rlbperhaps i.e. force utf-8 (assuming that's appropriate)
17:36mjg123kjeldahl: stdout/stderr are usually into logfiles for jetty/tomcat/etc
17:37brehautkjeldahl: my jetty in a repl just logs to is just printed the console running the repl
17:37kjeldahlmjg123: Ok, thanks.
17:37kjeldahlbrehaut: How did you set jetty up to log to the console? Is that the log4j config or something?
17:38wjlroerlb: this is -Dproperty=value right? what's the property I'm setting?
17:38brehauti just start it in a seperate thread
17:38brehautkjeldahl: (doto (Thread. #(run-jetty #'wendigo-app {:port 8000})) .start)
17:39rlbwjlroe: just from glancing at that web page, perhaps "java -server -Dfile.encoding=UTF-8 ..."
17:39brehautkjeldahl: i wouldnt trust that approach as canonical
17:39rlbwjlroe: though I'm just guessing -- I haven't really investigated
17:39wjlroerlb: ok, cheers
17:40wjlroerlb: that worked
17:40kjeldahlbrehaut: Ok, thanks. I guess it's running in a thread already, with the "run-jetty" join? false thingy. But I'll give your method a try.
17:41brehautkjeldahl: i have no idea sorry. i cobbled that together ages ago. i actually need to work out a better way to run it
17:44wjlroerlb: if you are a stackoverflower, feel free to add that as an answer to my question: http://stackoverflow.com/questions/4843976/unicode-clojure-unit-test-output
17:45rlbI'm not, but feel free to add it yourself if you like.
17:45rlb(if that helps)
17:45wjlroerlb: ok thanks
18:19Guest51521brehaut: regarding my earlier question about the namespace prompt in ccw... i see now that the namespace is displayed on the tab for the repl window. i didn't notice that at first. that is sufficient so i really don't care about the prompt then.
18:19brehautGuest51521: oh true, cool
18:43mjg123How to read an InputStream? I just want to be able to treat it as a string.
18:48tonylI haven't use InputStream but have you taken a look in clojure.java.io http://clojuredocs.org/clojure_core/clojure.java.io/
18:52mjg123hmm they don't make this easy in Java either...
18:52RaynesCalling clojure.java.io/reader on an input stream will give you a buffered reader. You can't treat it as a string, but you can do stuff like .readLine on it to get a line at a time from it.
19:00Guest51521mjg123: you can call read-lines from duck-streams and it will return a collection of strings
19:01Guest51521mjg123: i should say a sequence of strings
19:02Guest51521mjg123: oh sorry, you didn't say a file, just an inputstream.
19:04Guest51521http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/line-seq
19:04Guest51521combined with InputStreamReader
19:09mjg123Yeah, it'd be nice to have something as easy as slurp, imho
19:11Guest51521line-seq looks pretty nice. you just have to turn the inputstream into a reader first. no biggie
19:14mjg123(concat (line-seq (reader *stream*)))
19:15mjg123indeed
19:17AWizzArdhiredman: ping
19:18AWizzArdhiredman: just saw the msg you sent a while ago. Thanks for the info about declaring vars as dynamic explicitly.
19:20AWizzArdbtw, anyone, why do I get warnings in Clojure 1.3 that a var is not marked as dynamic? The compiler then sets them dynamic for me, but I don't want them to be dynamic…
19:58technomancyAWizzArd: that will go away during the release
20:56replacatechnomancy: did you get C-right and C-left working in tmux? That's the one part of paredit that's not working for me under tmux and I was wondering if anyone had gotten that going.
21:23technomancyreplaca: I had to rebind those
21:23technomancydon't want to reach that far off the home row anyway
22:33replacatechnomancy: what bindings worked well for you?
22:33replacathanks!
22:52technomancyreplaca: I use M-)
23:24replacatechnomancy: (sorry, coming and going tonight) sounds like a good choice, thanks