#clojure logs

2009-01-19

00:02blbrownhas the xml/parse library been moved. like with the code found at the bottom is giving me an error. http://clojure.org/java_interop
00:03durka42clojure.xml/parse
00:03durka42or import clojure.xml first
00:04blbrownsomeone update the docs!!! just kidding
00:04danlarkindurka42: still managing to find time for clojure at school eh?
00:05durka42well, classes start tomorrow
00:10eyerisI am trying to use clojureql with compojure. When I use a compojure route with: (my-func (route :id)), then in (defn my-func [id] (sql/run [*conn* rows] (sql/query [[*]] MyTable (= ID id)) (first rows)))
00:10eyerisThe SQL passed to the mysql server contains WHERE ID = id, instead of WHERE ID = <the value stored in id>
00:15eyerisI'm pretty sure the problem is with the call to (= ID id) rather than what is passed to (my-func)
00:16eyerisHowever all of the clojueql demos use literals in their use of query conditions
00:20danlarkineyeris: your all up to date on clojureql?
00:21eyerisA few days old, IIRC. I will update now.
00:24eyerisYep, just updated. The problem is still there
00:27eyerisThis is a paste of the code: http://pastebin.ca/1312292
00:27eyerisI'm probably just doing something stupid, since I'm a lisp newb
00:28eyerisThe problem is in (get-case-record)
00:29durka42do you need to use ~id like ~sort-col in get-cases?
00:30eyerisYep
00:30eyerisThat worked
00:30eyerisThanks for spotting it
00:30eyerisI knew it had to be a silly mistake
00:31eyerisI think I am just over tired :/
00:51blbrownanyone think the docs should have examples ...<runs for cover>
00:52blbrownin terms of an example for each function or form
00:54Carkyou're not the first one mentioning that
00:54Carki beleive someone started a list of examples on the wiki
02:13eyerisHow can I tell whether a given class contains a given static method?
02:16blbrownis there no length function against sequences
02:17eyerisblbrown count?
02:18blbrowngot ya
02:43blbrowncan I create a map datastructure but not have all the values known at once. E.g. with the java hash map, I can create the object and then populate the data later?
02:44Cark{:name nil :address nil} or {:name :empty :address :empty}
02:46Carkstill working on that octane viewer ?
02:47blbrownyea
02:47Carkwhat's the secondary buffer view for ?
02:48blbrownCark, ideally this is a kind of a log viewer. I want to be able to open a log file and then on exception, open up the Java code in the secondary buffer view
02:48blbrownthat and it is a misc window
02:48Carkah ok
02:49blbrownI have simple Java parsing code too with syntax highlighting
02:50blbrown(let [a {:name nil :address nil} or {:name :empty :address :empty}] ...) can I update 'a' with another value?
02:50blbrown(set! (a :name) "dog") ...maybe?
02:50blbrownCark ...
02:50Carknot quite, 'a' is imutable !
02:50blbrownexactly, that is I might go with the java.util.HashMap for now
02:51Cark,(let [a {:name nil :address nil} b (assoc a :name "cark")] b)
02:51clojurebot{:name "cark", :address nil}
02:51Carkwell you're not embracing clojure then
02:52Carkthe idea is to have all your state in a single ref
02:52Carkor atom i guess
02:52Carkand use functional programing
03:02Cark,(let [a (ref {:name nil})] (dosync (alter a assoc :name "cark")))
03:02clojurebot{:name "cark"}
04:01Lau_of_DKTop of the morning gents
05:07Lau_of_DKAnyone here who can lend a hand in producing a somewhat complicated RegEx ? :)
05:12hoeckLau_of_DK: don't ask to ask, just paste :)
05:15Lau_of_DK<span>blablabla<nobr>RECORD THIS STRING</nobr>blabla<nobr>RECORD THIS STRING</nobr>...continue until </span>
05:15Lau_of_DKHow do I regex-capture this?
05:17Lau_of_DK@ hoeck
05:18hoeckmhh, maybe "<nobr>.*?<nobr>"
05:19hoeckor do you mean the whole line starting with <span>?
05:20Lau_of_DKNo, but the stuff I capture needs to be between two spans, <span> and </span>
05:20Lau_of_DKAnd your regex works OK, but it captures too much
05:22Lau_of_DKNo wait, I think I can actually manage from here
05:22Lau_of_DKThe filter needs to be a little more advanced
05:22Lau_of_DKThanks alot hoeck
06:11Lau_of_DK(def reGetSpan #"<span>(.|\n)+?</span>") <-- Returns nil
06:12Lau_of_DK(def reGetSpan #"<(.|\n)+?>") <-- Returns all text inside html-tags
06:12Lau_of_DKWhy doesnt the first, return everything in spans ?
06:17hoeckLau_of_DK: try #"<span>(.*)</span>"
06:18Lau_of_DKnil
06:19Lau_of_DK@ hoeck
06:19hoeckbtw, which re-* function do you use?
06:19Lau_of_DKre-seq
06:20Lau_of_DKIt does look like [<span>](.*)[^</span>] seems to work
06:24hoeckand i thought i knew regular expressions :(
06:26Lau_of_DKIts tough...and cryptic
06:31cgrandLau_of_DK: your last one doesn't work: try to put an "s" at the start of your input
06:32cgrandtry #"\<span\>(.*)\</span\>"
06:33Lau_of_DKNo dice cgrand
06:34cgrandsample input + expected output?
06:34Lau_of_DK(def reGetSpan #"[<span>](.*)[^</span>]") <-- This seems to be the closest thing
06:35Lau_of_DK<span style="font-size:16px;font-family:Times">
06:35Lau_of_DK<div style="position:absolute;top:2062;left:48"><nobr><b>ZZ0169 </b>Vurdering af </nobr></div>
06:35Lau_of_DK<div style="position:absolute;top:2082;left:132"><nobr>behov for </nobr></div>
06:35Lau_of_DK<div style="position:absolute;top:2103;left:132"><nobr>foranstaltninger </nobr></div>
06:35Lau_of_DK</span>
06:35Lau_of_DK
06:35Lau_of_DKThis is what Im parsing. For that example, I need to get "ZZ0169" and "Vurdering af behov for foranstaltninger"
06:39cgrand1and as a first step you try to get the content of teh surrounding span?
06:42Lau_of_DKYes, if I could isolate the spans, then parse them individually
06:42Lau_of_DKIt might not be the best way, but it was my first idea
06:42Lau_of_DK1) Get spans, 2) get <b>CODE</b>, 3) get all content of <nobr></nobr>
06:42Lau_of_DKThat would work
06:55cgrand1I encounter troubles with the input string being multiline. On one line, the following regex seems to work: #"(?m)<span[^>]*>((?:(?!</span>).)*)</span>"
06:55Chousukeeh. :P
06:59Lau_of_DKeh...
06:59cgrand1well the (?m) is not required since it does not work (it is intended tow switch the regx to multiline mode)
07:00cgrand1are you sure you can't use a proper html or xhtml parser?
07:00Lau_of_DKNo I think they would work - But when I thought out the above strategy, it seemed very simple
07:02Lau_of_DKcgrand1: Do you know of a Java tool that I could use to wrap this up in a hurry, Ive wasted too much time on it
07:03cgrand1use tagsoup it's an html sax parser
07:07cgrand1if you can store the whole document in memory, use tagsoupe + clojure.xml + chouser's zip-filter
07:10Lau_of_DKI can... I'll look into it, thanks alot
08:13AWizzArdHow can I dynamically instatiate objects of a given class? (defn foo [class] (new class)) ==> java.lang.IllegalArgumentException: Unable to resolve classname: class
08:13AWizzArdThis could be nice for a Swing app, where I want to have one Clojure function (show-frame FrameClass).
08:16cgrand1(.newInstance class)
08:37AWizzArdws�
08:37AWizzArdoops...
08:37AWizzArdthx cgrand1
08:43Chousercgrand1: enlive is an interesting idea.
08:46Chouserthe replacement part of each deftemplate pair can be either a string or a seq of whatever 'at' returns?
08:50cgrand1chouser: thanks
08:52cgrand1each replacement site (a node matched by a selector) is replaced by a form which, at runtime, yields a string or a seq of strings
08:54cgrand1'at denotes a sub-template (the definition of deftemplate uses 'at)
08:56Chouserok
09:20gnuvinceDid you guys read the blog post by Brian Carper? I thought it was very good
09:22rhickeycgrand1: did you see this? http://paste.lisp.org/display/73823
09:23rhickeymy take on the LFEs, still no map, but early termination and (potentially) chaining. I think the model is still difficult for extenders (if not consumers) though
09:23rhickeyno multi-source map
09:23Lau_of_DKrhickey: I didnt understand, what are the great advantages of LFE ?
09:24rhickeyLau_of_DK: it is one way to manage resource scope (scope and when-scope discussed yesterday are another), and it is purely functional
09:25Lau_of_DKOh ok - And what alternatives are there?
09:25cgrand1rhickey: ok, looking at it
09:26rhickeyLau_of_DK: scopes handle resources: http://paste.lisp.org/display/73838
09:26rhickeyso, scopes + seqs are enough
09:27Lau_of_DKOk
09:27rhickeyBut I have been working on 'safe' streams
09:27ChousukeI wish I'd understand how that LFE stuff actually works so I could see if I could use monads to implement it
09:28rhickeyChousuke: if you want a description in terms of monads: http://okmij.org/ftp/Haskell/Iteratee/DEFUN08-talk-notes.pdf
09:29ChousukeI'm really bad at reading haskell though :p
09:29rhickeymonads do nothing to simplify the inherent model, which involves handling: source termination, consumer termination, leftover source items, horizontal and vertical combination and errors
09:31rhickeycgrand1: I don't have your vote on fully-lazy seqs vs nil punning either
09:32Lau_of_DKcgrand1: You really liked the idea of fully-lazy seqs right? :)
09:33cgrand1rhickey: I wrote a similar implementation (fn returning either a fn or [value] or [value remaining]) after reading thoses slides (some days after my initial experiment with LFE)
09:35rhickeycgrand1: I'd hate to have to explain how to write a correct enumerator or iteratee though
09:36cgrand1I agree: right now it's an interesting formal exercise
09:40cgrand1About nil punning, I like it but I also understand that fully lazy seq would get us rid of a whole family of subtle and nasty bugs. I haven't make my mind yet.
09:55cgrand1Las time I thought about it I ended up thinking that I would prefer to have map and filter always return fully-lazy-seqs but to have thess fully lazy seqs treated like another collection type: calling seq on them would return an usual seq.
10:04Chousergnuvince: I thought that blog post was good too. His commenters were brutal, though.
10:05gnuvinceChouser: that's to be expected from people who hang on c.l.l
10:06gnuvinceClojure seems to get a lot of flak there for being a more practical Lisp.
10:07gnuvincePeople complain about the JVM, lack of TCO (and ignore the mentions of recur and trampolines), that the Java libs are not Lispy enough, and a bunch of other stuff.
10:07gnuvinceBut the reality is, I've had pretty much the same experience as Brian's had: getting something working in Clojure is just easier and faster.
10:08Chouseryep, me too.
10:11rhickeythe problem is inherently X vs Y - while it should always be ok to say - I had a better experience with X, saying X is better than Y will always rankle fans of Y
10:11rhickeyhow they behave when rankled is another matter :)
10:12Lau_of_DKWhere can I observe this rankling? :)
10:13rhickeyhttp://briancarper.net/2009/01/19/clojure-1-common-lisp-0/
10:13Lau_of_DKThanks
10:16Chouserrhickey: too true, though even "fans of Y" suggests an unhelpful emotional connection, especially when Y is programming language.
10:17ChouserI wouldn't deny such a connection with Clojure personally, but I'll admit it can be unhelpful. :-)
10:17gnuvinceAlthough there was a bit of "mini trash talk" against CL, I think that most of his argument were based on reasonable points.
10:18gnuvinceUsing dates and times within Clojure *is* easier than in CL
10:18gnuvinceIt doesn't mean that it couldn't be easy in CL
10:18gnuvinceJust that at the moment, Clojure has an advantage there.
10:20rhickeyI think Brian was fair, and did qualify "better language for the job", but most people stop at "better"
10:30gnuvinceOn reddit, the longest comment thread is about Emacs and SLIME
10:30gnuvinceThat's sort of missing the point of the article
10:30Chouserand it's pain you can import directly to Clojure!
10:31arbscht_gnuvince: standard reddit fare, then :)
10:37gnuvincearbscht_: yeah
10:37gnuvinceReddit:
10:37gnuvinceHaskell story: Monads are hard
10:37gnuvinceJava story: JVM is bloated, Yahoo toolbar!
10:37gnuvinceetc.
10:50schluetewhy does (defn addone-plain [x] (lazy-cons x (addone (+ 1 x))))
10:50schluetework as expected while (defn addone-recur [x] (lazy-cons x (addone (+ 1 x))))
10:50schluetedoesn't do anything at all?
10:51schlueteI thought I understood the way recur works...
10:52edwThe only differene I see between those two functions is their names.
10:53schluetehmm... sorry, cut'copy'paste... the second example should have been
10:53schluete(defn addone-recur [x] (lazy-cons x (recur (+ 1 x))))
10:54schlueteI tried to use recur instead of the function name for the recursion, but when calling (take 10 (addone-recur 1)) clojure just stalled.
10:55danlarkinschluete: you don't want recur there, you want addone-recur
10:56schluetebut addone-recur would call the method itself, eventually exhausting the stack because of the missing tail call optimisation in clojure
10:56schlueteI always thought that this was the rational for the recur form...
10:58danlarkinexcept that you're using lazy-cons
10:58edwThis is an interesting question.
10:58danlarkinchange lazy-cons to cons and yep, you blow the stack
10:59edw`lazy-cons' leads to...something happening.
10:59danlarkinbut look at the doc for lazy-cons
10:59danlarkin(doc lazy-cons)
10:59clojurebotExpands to code which produces a seq object whose first is first-expr and whose rest is rest-expr, neither of which is evaluated until first/rest is called. Each expr will be evaluated at most once per step in the sequence, e.g. calling first/rest repeatedly on the same node of the seq evaluates first/rest-expr once - the values they yield are cached.; arglists ([first-expr & rest-expr])
11:00schluetedanlarkin: but lazy-cons IMHO only delays the execution but doesn't change the way the recursion works?
11:01edwSo the `recur' is calling some dynamic var, not a captured reference to the `addone-recur' function?
11:01schlueteeither way, what's the explanation for clojure just stalling with 100% cpu on the "recur" version? a bug?
11:02edwSome `*most-recently-encountered-recursion-point*' sort of dynamic variable?
11:02edwThat makes sense...but is nasty.
11:02danlarkinto be honest I don't really know
11:02edwBut that makes total sense.
11:04schlueteedw: IMHO recur it meant to replace the recursion you would normally have by a jump, preventing the stack from blowing on deep recursion levels. This is because the JVM doesn't support proper TCO
11:04Chouserwhen the compiler sees a 'loop' or 'fn', it pushes its location onto a stack (I think), so that when it sees a 'recur' it essentially puts in a goto to the item at the top of that stack.
11:04schluetebut obviously I'm using recur the wrong way... and I don't understand why
11:06Chouserso using a self-call in the 'rest' part of a lazy-cons does not endanger the stack.
11:08schlueteChouser: could you elaborate this a little more? what does the usage of lazy-cons vs. cons change in terms of stack behaviour?
11:08Chouserlazy-cons returns an object with its 'first' and 'rest' args each in a closure.
11:09Chouserthe key to our discussion being "returns"
11:09Chouserso the stack shrinks by one frame.
11:09Chouserwhen you call 'rest' on that object, only then does it execute that closure
11:10edwIf something like this is happening, you never know what context that `rest' is going to be evaluated, so a delayed evaluation for should set the recurison point to something that throws an exception.
11:10Chouserin the self-call case, this calls your functions again (consuming a stack frame) which then returns a new lazy-cons object (giving back that stack frame). Net stack usage is none.
11:10edw"...so a delayed evaluation FORM..."
11:11schlueteChouser: thanks, this makes sense.
11:12Chouserin the case of calling 'recur' from the "rest" clause, as soon as you call 'rest' on the seq, it'll go into an unterminated loop. 'first' works fine though.
11:13Chouseredw: you're right about not know the context where 'rest' is called, but what do you mean by a "delayed evaluation form"?
11:13edwSo let's get this out there: the recursion point for a lazily evaluated expression should be something like #(throw "no sensical recursion point").
11:14Chouser'recur' is used in places where you're *not* creating a lazy seq, but still want to avoid consuming the stack. For an example like this, along with 'recur' you'd want 'cons' instead of 'lazy-cons', and you'd want to add a termination case.
11:14Chouserthe recursion point for 'recur' is lexical, not dynamic.
11:15edwRight, but can you see my point? Clojure should not explode -- or implode or whatever -- when someone does that.
11:16edwActually, isn't it dynamic? Because it's about what's on the stack right now, in the dynamic context of the running program.
11:17ChouserI'm not sure clojure can know what you meant for it to do. I don't see why 'recur' in a lazy-cons 'rest' would always be wrong.
11:17edwHow could it ever be correct?
11:18Chouser'recur' is always in danger of becoming an infinite loop, just while "while" in any imperative language.
11:18Chouseranytime you see a 'recur' you should look for how you're going to escape the loop.
11:18edwWhat function is being invoked in that `addone-recur' when I type (first (rest (addone-recur 1)))?
11:19edwWhen I type that at the REPL?
11:19edwChouser, yes, I am familiar with the concept. I've written tens of thousands of lines of Scheme code.
11:24rhickeylazy-cons wraps the rest-expr in a fn, so if you use recur there that wrapping fn is the target of the recur, if you haven't used loop in your rest-expr
11:24Chouserok, I see your point. The lexical recur point for both a lazy-cons' first and rest clause is a fn created by lazy-cons.
11:24rhickeyChouser: right
11:25Chouserin which case it might be useful to have some sort of flag to tell 'recur' that this fn may not be used as a recur point.
11:25edwI was trying to write a `safe-lazy-cons' macro but getting that to work would take a bit thinking.
11:26edw(set! *recur-point* #(throw "no cookie for you"))
11:26Chouserbut it's not dynamic. I still don't see how a var is going to help.
11:27edwHow is it not dynamic? The recur point is the top of stack, no?
11:27Chouserat compile time
11:28edw`Let' is just an evaled lambda: (let [x 1] (+ x 1)) => ((lambda (x) (+ x 1)) 1).
11:28rhickeyedw:not true
11:28Chouserat runtime, the call stack has no knowledge of recur points. That's kinda the idea, to avoid using the Java stack so that we don't use it up.
11:29edwAm I thinking too schemely?
11:29rhickeyedw: in Clojure let is not lambda
11:29rhickeylet is sequential
11:29rhickeybinding-wise
11:30edwErr, how about: `Loop' is just an evaled lambda?
11:30rhickeyalso not true in Clojure
11:30edwAre you referring to `let' being "really" `let*'?
11:31rhickeyedw: it is more like let*, but also is not defined in terms of lambda, ditto loop
11:32rhickeyIn Scheme, lamba has properties that allow its use for looping with the same guarantees as loop, in Clojure it doesn't, so loop is not defined in terms of it
11:32rhickeylambda
11:32rhickeyfn
11:33rhickeyso Clojure has more primitive ops let/loop and fn
11:34ChouserI hadn't thought about how the fact that Clojure (and code written in it) doesn't assume the VM has TCO will help get it into more VMs -- javascript, android, CLR, etc.
11:35Chousereven if/when JVM gets TCO, these others might not.
11:35edwrhickey: Can you think of a use for `recur' inside a delayed expression without an enclosing, recursion point-defining form? Alternatively, do you think it makes sense to throw an exception if you try to `recur' without an explicit enclosing form in a delayed expression?
11:36edwAnd if not, is there a way to get out of an infinite loop in SLIME without blowing up the inferior Lisp process? ;)
11:36rhickeyedw: there is no use without an enclosing fn/loop
11:38rhickeynot sure what it would take to throw an exception in that case, but adding runtime overhead to loop is a non-option
11:38edwI hear you. I was thinking of overhead inside lazy-cons and friends.
11:39rhickeyedw: an unfortunately, you'll find the JVM far less tolerant of infinite loops than your typical CL/Scheme :(
11:39rhickeyand thus Clojure too
11:39edwWhen in doubt, trace?
11:40Chouser(defmacro no-recur [& body] `(loop [x# 'x#] (assert (= x# 'x#)) ~@body))
11:40rhickeyedw: in a debugger, you'd have break options
11:40Chouserbut that's an extra compare per iteration
11:41edwUsing a Java IDE is something I promised my mother I'd never do again.
11:41rhickeyChouser: yeah, any runtime overhead here is bad
11:41rhickeyedw: you can use Clojure with JSwat and leave the IDE out of it
11:41Chouserright, you don't use 'recur' generally, unless you're in a tight inner loop. Otherwise you'd probably be using seqs.
11:42rhickeythis problem might best be solved with enhanced documentation
11:42rhickeyI don't consider it a common problem
11:48Chouserthe fn produced by lazy-cons could take 8 or 9 args instead of 0 or 1. That would catch most attempts at using 'recur'.
11:50hiredmanChouser: heh
11:55rhickeyChouser: actually just switching first to one arg, rest to zero would catch a bunch, as recur most likely in rest and with value
11:55kotarakWould it be possible to include a trivial patch, to make :source in Var meta data a classpath relative/full pathname?
11:55lisppaste8kotarak pasted "trivial patch to help IDEs" at http://paste.lisp.org/display/73866
11:55kotarakJust the basename of the file is ambiguous....
11:56rhickeykotarak: you have CA?
11:56kotarakYes. Meikel Brandmeyer. Shall I open a ticket on gc?
11:57rhickeykotarak: sure, thanks
11:57kotarakok.
12:04danlarkinrhickey: with regard to the CA, do I /need/ to provide my mailing address, phone number? My mailing address will be changing soon so it won't be applicable for much longer
12:05scottjShould {:foo 1\n:bar 2} be indented with the : in :foo and :bar lined up, or with :bar one character to the right of :foo? I feel like clojure mode in emacs often indents incorrectly.
12:06rhickeydanlarkin: you should supply whatever is current
12:07rhickeyscottj: :foo and :bar should line up
12:07danlarkinrhickey: will you send me a present? :)
12:07rhickeydanlarkin: unlikely :)
12:07scottjrhickey: that's how I felt, but I don't think that's the default behavior of the clojure emacs mode
12:07rhickeyscottj: seems to be how it works for me
12:08hiredmanclojure.vim often does some wonky indents too, like pulling :bar out so it lines up with {
12:08hiredman(btw)
12:08danlarkinFWIW I updated clojure-mode yesterday and my indenting still works as you'd expect
12:09kotarakhiredman: huh? Could you give me an example? I try very hard to indent correctly....
12:10scottjok, I'll look at it. thanks!
12:11hiredmankotarak: you never know, could be something else I have installed fighting with clojure.vim
12:12hiredmanI just opened up test.clj and type "{:a 1\n:b 2}" and the :b lined up with the curly brace
12:12kotarakhiredman: the indent works for more in 95% of the cases. There are some edges which are round yet, but "often" should definitively be not the word you have to use...
12:12kotarakLet me check.
12:12scottjrhickey: do you have any indent settings beyond the clojure-mode defaults?
12:13kotarakhiredman: nope. Works for me. :a and :b are lined up.
12:13rhickeyscottj: nope, just clojure-mode
12:15hiredmankotarak: *shrug*
12:15hiredmanonce I line :a and :b up, :c lines up correctly
12:16kotarakHmm... Ominous....
12:33drewrhttp://is.gd/gt4s/clojure/search/
12:57hiredmanclojurebot: emacs is also <reply>"Learning Emacs and SLIME was just about the most painful computer experience I've ever been through."
12:57clojurebotOk.
13:00danlarkinclojurebot: how many things do you know?
13:00clojurebotPardon?
13:00danlarkinjerk!
13:01technomancythat's funny; you'd think a bot written in Lisp would have an easier time learning how to use a lisp machine.
13:04hiredman131
13:05danlarkinOoo lots
13:09Lau_of_DKGood evening all
13:09technomancyhi Lau
13:10danlarkinAfternoon
13:13Lau_of_DKrhickey: I read through that blog/comparison of CL and Clojure you posted earlier today. Two interesting things come-up. 1) The blogger would probably have enjoyed it even more if we picked up ClojureQL, and 2) The guy "Lars" in the comment was actually the guy who got me into Lisp way back when :)
13:13technomancyLau_of_DK: link?
13:14Lau_of_DKhttp://briancarper.net/2009/01/19/clojure-1-common-lisp-0/
13:14hiredmanLau_of_DK: I am reading the comment thread on reddit for that right now
13:14technomancyLau_of_DK: I like it already. =)
13:14Lau_of_DKhehe :)
13:14hiredmanman those CL people are militant
13:15hiredmanwhich, uh, I guess I can understand, but wow
13:15Lau_of_DKNo its just Lars :)
13:15Lau_of_DKThe rest are peaceful, when I first met him, his words and arguments didnt do alot for me, but his code sure did
13:16hiredmanLau_of_DK: I am looking at the comments on reddit, not the blog itsself
13:17Lau_of_DKk
13:17Lau_of_DKI referred to the comments directly on the Blog
13:18hiredman"I don't find most of these criticisms particularly valid. It sounds like the author just didn't bother to understand CL, and then his lack of understanding bit him."
13:18Lau_of_DKI think he makes valid points
13:19gnuvinceWho? The author or the commenter?
13:19Lau_of_DKauthor
13:19gnuvinceYes he does.
13:20gnuvinceThat's a second success story in 2 weeks
13:20Lau_of_DKThe first being?
13:21hiredmanwell, uh, his gallery is not up, so I dunno about calling it a success
13:21gnuvinceThe Veterinarian Hspital
13:21gnuvincehiredman: it was up.
13:21hiredman503's
13:22gnuvinceReddit effect must have brought it down.
13:22hiredmanyeah
13:22gnuvinceI was able to view it earlier this morning.
13:22gnuvinceNothing amazing per se, but it's a cute site written quickly in Clojure
13:23technomancydo you think there'd be a good market for a commercial hour-long screencast on Clojure?
13:23hiredmanugh, I hate the web
13:23mattreplwould be interesting to see server stats and an autopsy to identify what failed
13:33gnuvincetechnomancy: peepcode?
13:35technomancygnuvince: yeah. thinking about putting one together.
13:35gnuvincetechnomancy: If it's the same quality as the Emacs one, I'd definitely be in.
13:35gnuvinceI wonder however how much you can cover in one hour
13:35technomancyit's a small market, but since there's hardly any docs out there, I think there's a chance it could sell well.
13:36technomancygnuvince: that's the problem, it would be very beginner-level; you personally might not learn much you don't already know.
13:36gnuvinceYeah
13:36gnuvinceUnlike the Emacs screencast where I learned about a bunch of packages.
13:36technomancygnuvince: I haven't been using Clojure for as long as I've been using Emacs, (actually... no one has!) but I think it could turn out pretty well. =)
13:38technomancyI'm playing with writing a simple MUD as an example project to step through for the video. fun stuff.
13:38technomancyseems like a pretty fun, approachable project that still involves a fair amount of concurrency code.
13:40hiredmanhmmmmm
13:41hiredmanring seems to be breaking my unicode
13:41technomancygnuvince: if I act fast I could get it out before the book, which would make it the first published commercial documentation for Clojure.
13:46gnuvinceI need some assistance with compiling Java code: there's one file in a Java project that I want to compile and use from Clojure. I did javac File.java to create the class files. Now what? Do I need to jar them together?
13:46danlarkinhiredman: mmcgrana/ring? I haven't tried it with any unicode inputs yet
13:48rhickeygnuvince: the .class files just need to be in your classpath, in dir structure corresponding to package
13:48hiredmanclojurebot has some unicode in its factoids
13:49hiredmanclojurebot: pcl -> clojure?
13:49clojurebotpcl -> clojure is http://blog.thinkrelevance.com/2008/09/16/pcl-clojure
13:49gnuvincerhickey: that's it?
13:49hiredmanI have a webpage dumping clojurebot's brain, and the -> shows up as ?
13:49hiredmandamn it
13:49hiredmanwrong character encoding in the browser
13:50gnuvinceAh, cool. Thanks rhickey
13:50danlarkinhiredman: :-o
13:52blbrownhave any of you considered working with your existing spring mvc app or you wouldn'
13:52blbrownwant to mix the two?
13:52hiredmanstill no unicode love
13:52hiredmanI wonder why that would be
13:53hiredmanmaybe the font the browser is using doesn't have this glyph
13:54danlarkinclojurebot: brain dump
13:54clojurebotbrain dump is http://clj.thelastcitadel.com/clojurebot
13:54danlarkinshows up as ? for me too
13:54danlarkinit's literally "?" in the HTML
13:55hiredman:(
13:55technomancyshould probably be encoded as HTML entities anyway
13:55danlarkinso yeah, coding problem somewhere in the line
13:55technomancyclojurebot: seattle?
13:55clojurebotseattle is have the coldest temps since the 1950's
13:56hiredmanoh, which reminds me
14:20Lau_of_DKPoll: If ClojureQL was totally DB-agnostic, EXCEPT for adding FOREIGN keys in Create-table (which would break on Oracle), would that be good enough?
14:21technomancyas long as it doesn't require code modification to switch DBs, it should be fine.
14:21hiredmansounds good enough to me, but I've never used Oracle
14:21technomancy(so just don't do the FK stuff; simply warn instead of making folks go in and disable FK-related code.)
14:22Lau_of_DKtechnomancy: You never specify which DB youre working on with ClojureQL technomancy , it always works it out on its own
14:24technomancysure
14:24Lau_of_DKThe only thing it would mean in practice, was that if you know about this, you can actually modify the create string manually when writing it up
14:25Lau_of_DKBut standard (create-table foo [id "int" name "varchar"] :foreign-key (id bar)) would break on Oracle
14:26technomancysee I would prefer if it simply discarded the incompatible bits with a warning but continued to work without modification
14:26karmazillaOracle supports foreign keys, doesn't it?
14:26technomancy... but I'm not ever going to use Oracle, so whatever. =)
14:28danlarkinLau_of_DK: so the issue is that you can make clojureql work for all DBs on all operations /except/ CREATE TABLE on Oracle?
14:34Lau_of_DKdanlarkin: More specifically. ClojureQL works on all major SQL implementations, with every single operation without knowing which DB its interfacing with, with 1 single exceptions: Create-table with a foreign key constraint on Oracle
14:34Lau_of_DKkarmazilla: It sure does, but has a bad way of declaring them
14:36danlarkinAdd check for oracle in there, I'd say. Always better to let the library encapsulate ugly code than force it on the user
14:38Lau_of_DKdanlarkin: Its not possible to add a check, because the statements never realize which DB theyre working on. I think the best path would then be in the docs to specificy, that in this unique case, supply a key like :oracle)
14:39danlarkin:-/ I'll never use oracle so this doesn't bother me practically, but bothers me in principle
14:39gnuvinceLau_of_DK: I like how Django's ORM does it: common operations (selecting, inserting, updating) are DB agnostic, but it is possible to drop down to raw SQL to use some of the DB-specific features.
14:40danlarkinWhen creating a connection to the database could you allow a parameter for database type? that would be the correct place for :oracle to go
14:41danlarkinand then it would let you scale when you find other idiosyncrasies for other RDBMS'
14:41Lau_of_DKTrue, but the backend works very simply like (run conn-info (query foo bar baz)). Its the query construct that needs to conform to any specific syntax, not the backend bit
14:42danlarkinperhaps the backend could pass its db-type parameter in to query?
14:42ChouserLau_of_DK: have you tried any tables or columns with mixed upper/lower case?
14:43danlarkinI haven't spent much time with the source of clojureql, sorry if my suggestions don't really jive with how it works
14:43Lau_of_DKChouser: Tried with Capital firsts
14:43Lau_of_DKdanlarkin: Its always nice to have feedback, disregarding the depths of your understanding
14:44Chouserhm. I'm really surprised this is the only time you've had to know which dbms you're producing SQL for.
14:45Lau_of_DKChouser: Its quite an impressive piece of work
14:45danlarkinLau_of_DK: you forgot to feign modesty :)
14:45Lau_of_DKYea, I dont use that very often
14:46hiredmanclojurebot: clojureql is also a quite impressive piece of work
14:46clojurebot'Sea, mhuise.
14:46Lau_of_DKChouser, if you consider this
14:46Lau_of_DK(create-table table1 [id "int" name "varchar(100)"] :primary id :auto-inc id)
14:47Lau_of_DKThis will need to be written directly to either Oracle, Mysql, or Sqllite, theyre all different
14:47Lau_of_DKInstead we do this
14:47Lau_of_DKdk.bestinclass.clojureql> (vb (create-table table1 [id "int" name "varchar(100)"] :primary id :auto-inc id))
14:47Lau_of_DK(primary key)
14:47Lau_of_DKCREATE TABLE table1 ( id int,name varchar(100) )
14:47Lau_of_DKALTER TABLE table1 add primary key (id)
14:47Lau_of_DKALTER TABLE table1 change id id int AUTO_INCREMENT
14:47Lau_of_DK
14:47Lau_of_DK(vb= View batch)
14:47Lau_of_DKThat works on all dbms's
14:47technomancysqlite supports foreign keys?
14:49Lau_of_DKkotarak ?
14:49kotarakhere?
14:49Lau_of_DKsqllite + foreign keys?
14:50kotarakIt seems, it is supported.
14:50danlarkinI definitely think eventually you're going to need to produce custom SQL for different RDBMS'. It's impressive you've gone this far without having to
14:50technomancycool! guess I haven't really looked into it in a while.
14:50Chousera column named FooBar requires double-quotes in psql, but mysql interprets double-quotes as a string, and requires back-quotes instead.
14:51kotarakThis alter table was a good idea. Chapeau
14:53hiredmanLau_of_DK: doesn't work with postgresql
14:54Lau_of_DKhiredman: Post is next on my test list, most cases should work fine with it
14:54hiredmanwell, the create-table example you just gave does not
14:54Lau_of_DKI'll look into it
14:58Lau_of_DKhiredman: A little odd, since it matches what their docs specificies.. I'll have to install to check it out
14:59hiredmanLau_of_DK: actually I looked at it before, and from what I recall, you need the word "set" in there somewhere
14:59Lau_of_DKhttp://www.postgresql.org/docs/7.4/interactive/sql-altertable.html
15:00Lau_of_DKIf you find the ADD PRIMARY KEY example, and check your batch, you'll see its the same
15:00hiredmanLau_of_DK: that is not where it fails
15:00hiredmanit fails on the auto inc bit
15:00Lau_of_DK"The ADD COLUMN form conforms with the SQL standard, with the exception that it does not support defaults and not-null constraints, as explained above. The ALTER COLUMN form is in full conformance. "
15:03danlarkinAFAIK postgres uses sequences for auto incrementing behavior
15:03danlarkinnot int AUTO INCREMENT
15:04Lau_of_DKHow do you mean ?
15:06danlarkinso I have table auth_user with "id serial NOT NULL"
15:07danlarkinand then I have an auth_user_id_seq sequence
15:07hiredmanhttp://pointbeing.net/weblog/2008/03/mysql-versus-postgresql-adding-an-auto-increment-column-to-a-table.html
15:09danlarkinthe first comment makes it seem not too bad to deal with
15:10Lau_of_DKhaha
15:10Lau_of_DKNice omment
15:10Lau_of_DKcomment
16:37durka42i can't figure out how to formulate this with lazy-cons
16:38durka42the server returns 100 results at a time, and i want a lazy seq of results
16:38durka42if you have 100 elements, you don't know whether there is another page
16:38durka42if there isn't, the server throws a 404 and i get a FileNotFoundException
16:39durka42i've been trying things with flatten and lazy-cons, but lazy-cons seems to freeze when an exception is thrown inside it
16:39hiredmandurka42: you can put a (try (catch)) in the rest part of the lazy-cons
16:40durka42i did... maybe i'm catching the wrong exception
16:40Chouseryou want a lazy seq of more than 100?
16:40durka42is that a bad idea?
16:40hiredmanwait
16:41Chouserno, I'm just trying to understand.
16:42ChouserI think I need a more concrete example. Like some code. But in general one might produce a lazy seq out of several others seqs by using 'concat'
16:42durka42the idea is that an http request occurs when you ask for the 100n+1'th element
16:42durka42right, the problem is knowing where to end it
16:43hiredmansounds kind of icky
16:43durka42i need my "rest" to either call lazy-cons again or swallow an exception and return nil
16:43durka42or i need to rethink this function
16:43Chouserah!
16:43durka42i'll paste what did, except i know it can't work because recur isn't allowed across try
16:43Chouserlazy-cons isn't going to swallow any exception by itself, nor will it "freeze"
16:44durka42the freeze could be in gorilla somewhere
16:44lisppaste8durka pasted "broken lazy seq" at http://paste.lisp.org/display/73888
16:45hiredmanyou have a recur in your lazy-cons
16:45Chouserhe knows
16:45hiredmanthat is pretty much a no-no
16:46durka42i guess i don't really understand how to use lazy-cons
16:46hiredmanChouser: you can never be sure
16:46Chouserdurka42: I think you're close
16:52durka42i meant to recur to the fetch fn, because i need the offset variable as state
16:54ChousukeOT, but did you see this already? I'm laughing, but I think I shouldn't be. http://blog.uncool.in/2009/01/19/computer-science-fail-higher-education-in-india/
16:55durka42yeah that's pretty bad
16:56ChousukeI'd classify that as antieducation
16:56Chousukebetter remain ignorant than be taught by someone with that level of knowledge.
16:56danlarkinthose poor students
16:56Lau_of_DKThats impressive, imagine in a general introduction stateting "to compile code hit ALT-F9"
16:57Lau_of_DK:)
16:57lisppaste8Chouser annotated #73888 with "maybe more like this?" at http://paste.lisp.org/display/73888#1
16:57ChousukeAt that point I'd probably contact the administration and request they check the professor's qualifications.
16:57Lau_of_DKThat might be the way to go
16:59durka42Chouser: but, there may be an indefinite number of pages
17:00Chouserdurka42: yes, the 'rest' part should be recursive. I didn't quite understand what the two different arg-overloaded bodies of that function were doing.
17:03durka42hmm, what if the second overload swallows the exception itself, and then lazy-cons will stop at nil...
17:04durka42i have to go, but we'll see what happens to the s-exps floating around in my head
17:04Chouseroh, is the one that takes 'offset' essentially just internal? never called from outside the fn?
17:04durka42yes
17:05durka42i mean, maybe if you wanted the third page -- but i kind of want the fact that it's broken up to be an implementation detail
17:05durka42especially because offset is only allowed to be multiples of 100
17:15lisppaste8Chouser annotated #73888 with "tell me if I'm getting warmer" at http://paste.lisp.org/display/73888#2
17:16durka42ooh, i like that one
17:17durka42so in (at 200), (request ...) dies with a FNFE, lazy-cat never gets called, and the lazy-cat from (at 100) gets a nil
17:19Chouserare you saying it works? this is the sort of thing you could run through seque to let it do the fetching a little ahead-of-time in another thread.
17:20durka42it works with a one-page query
17:20durka42let me try to find a two-page query
17:23durka42yeah, that works
17:24durka42thanks chouser
17:24durka42and thanks for the pointer to seque
17:31Chouseryou're welcome
17:34Chouserit'd be pretty easy to allow for an initial offset without fetching early pages unnecessarily.
17:35durka42yeah, although the new york times only allows multiples of 100
17:38technomancyso if I accidentally def a symbol in a namespace and then realize that I actually want that symbol to refer to another namespace, how do I unset it?
17:39hiredman,(doc unmap)
17:39clojurebotjava.lang.Exception: Unable to resolve var: unmap in this context
17:39hiredman,(doc ns-unmap)
17:39clojurebot"([ns sym]); Removes the mappings for the symbol from the namespace."
17:39technomancythanks!
17:40karmazillanewsflash: textjure* grows new arms: undo-redo (chunking still pending), toggle/configurable word-wrap in editor and - dun-dudun - closing files! :)
17:41hiredmannice
17:41danlarkinyesss closing files!!! the killer feature!!!
17:41danlarkin:)
17:42karmazillasurvey concludes: all users agree; newest feature is "the killer"
17:43clowswouldn't that have to be "delete files"?
17:43Chouserdurka42: ok, but if you wanted the 104th item, right now you'd have to fetch the first 100 and throw them away.
17:43edwA question, karmazilla: How do you start textjure
17:43edw?
17:44karmazillaclj textjure.clj
17:44karmazillawhere "clj" is your favority Clojure shell script
17:44Chouseryou might need to give it a filename to open.
17:44durka42Chouser: yes. I added an initial-offset version, so the 104th item is (nth (donor-search "president" 2008 {...} 1) 4)
17:48durka42by the way, this project is bindings for http://developer.nytimes.com/docs/campaign_finance_api
17:48edwkarmazilla: Thanks.
17:50ecretanyone know when clojure-dev(eclipse plugin) will be released?
17:54edwkarmazilla: Where does textjure live? The github code looks a month old.
17:55karmazillaedw: my fork: http://github.com/karmazilla/textjure/tree/master
17:55edwThanks.
17:59technomancysweet; server-sockets.clj just got checked into contrib
18:15technomancysince keywords are functions of maps, is this something you should always take advantage of?
18:15technomancyin other words, when is it idiomatic to have the keyword first vs the map first?
18:16danlarkinIMO it's just preference
18:17danlarkinalthough I am trying to put the hash as the first arg
18:17danlarkinbecause I have a lot of cases where the keys are not keywords
18:18danlarkinso it's nice to always use the same order for lookups
18:19ChouserI aim for putting keywords first iff it's a literal keyword
18:19hiredman^-
18:20ChouserDunno if that's good or correct or anything, just the rule I'm following for now. When I think of it.
18:20technomancyChouser: that's what I've been doing; yeah
18:20danlarkinI will admit that (:keyword map) looks better than (map :keyword) to me, at least... visually
18:20technomancybecause it's easy to tell at a glance that it's a lookup
18:21technomancybut when :keyword is a variable that's bound to a keyword, you don't have the colors to tell you what's going on right away, so it's better to put the map first
18:21technomancyam I right in supposing that the problem with this code is that it calls remove with the args in the wrong order? (dosync (alter (ref [1 2 3]) remove #(= 2 %)))
18:22maaclComplete newb here - Can anybody explain why I can't get the practical-cl-clojure examples at http://github.com/stuarthalloway/practical-cl-clojure/tree/master to run - I get a lot of complaints about "No such namespace: clojure"
18:22hiredmanmaacl: old code
18:22hiredmanthe clojure namespace is now clojure.core
18:23hiredman,(doc remove)
18:23clojurebot"([pred coll]); Returns a lazy seq of the items in coll for which (pred item) returns false. pred must be free of side-effects."
18:23maaclok
18:24technomancyhiredman: but alter will try to call remove with the collection first?
18:25hiredman,(doc alter)
18:25clojurebot"([ref fun & args]); Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref args) and returns the in-transaction-value of ref."
18:25technomancylooks like it then.
18:25hiredman(apply remove [1 2 3] #(= 2 %))
18:26hiredmanyou could use partial,
18:26technomancyyeah, embed the call to remove inside an fn then?
18:26hiredman,(alter (ref [1 2 3]) (partial remove #(= 2 %)))
18:26clojurebotjava.lang.IllegalStateException: No transaction running
18:26technomancyhuh
18:26maaclhiredman: any idea how to update it ? has this at the top:(clojure.core/in-ns 'pcl.chap_03)
18:26maacl(clojure.core/refer 'clojure)
18:26maacl(use 'clojure.core.contrib.duck-streams)
18:26hiredman,(dosync (alter (ref [1 2 3]) (partial remove #(= 2 %))))
18:27clojurebot(1 3)
18:27technomancysweet.
18:27hiredmanmaacl: looks like a bug, the (clojure.core/refer 'clojure) only got halfway updated
18:27technomancyhiredman: what's the benefit of partial over just constructing an fn there? easier for the compiler to optimize?
18:27hiredmanshould be (clojure.core/refer 'clojure.core)
18:27hiredmantechnomancy: no idea
18:28hiredmanit lets use a #()
18:28technomancyok, will check it out; thanks
18:28hiredmanand you cannot nest #()
18:28Chousuketechnomancy: I think it just looks nicer. :p
18:29hiredmanit is very functional
18:29hiredmanpartially applying functions
18:29hiredmanI would use it way more often if I did have to type 'partial' each time
18:29technomancyyeah. to me the fn approach looks more recognizable, but that's just because I didn't know about partial until now I guess. =)
18:30maaclhiredman: thanks - that got me some of the way - now have to figure out how to get contrib working
18:30hiredmanmaacl: I think you just need a copy of the contrib jar in your classpath
21:24gnuvince_Is there a reason I can refer to a class by its FQDN, but cannot import it?
21:25durka42that seems a little strange
21:25durka42was the class compiled by a JVM newer than the one you are running?
21:25Chouserwhat does your attempt to import it look like?
21:25gnuvince_user> hu.belicza.andras.bwhf.control.BinReplayUnpacker
21:25gnuvince_hu.belicza.andras.bwhf.control.BinReplayUnpacker
21:25gnuvince_user> (import '(hu.belicza.andras.bwhf.control BinReplayUnpacker))
21:25gnuvince_; Evaluation aborted.
21:26gnuvince_Just trying to play around with the class
21:26gnuvince_durka42: I just compiled it now
21:29gnuvince_I did add the path with add-classpath
21:31gnuvince_Yeah, it works with -cp directly
21:49djkthxis this a recent change?
21:49djkthxuser=> (clojure.contrib.str-utils/str-join "." [127 0 0 1])
21:49djkthxjava.lang.ClassNotFoundException: clojure.contrib.str-utils (NO_SOURCE_FILE:1)
21:49djkthxuser=> (use 'clojure.contrib.str-utils)
21:49djkthxnil
21:49djkthxuser=> (str-join "." [127 0 0 1])
21:49djkthx"127.0.0.1"
21:51Chouseryou have to use 'require' or 'use' before you can call a function
21:51Chouserfrom another namespace
21:51djkthxeven if i give the full qualified namespace?
21:51djkthxhmm
21:51djkthxweird, alright
21:51djkthxthanks :)
21:52danlarkindjkthx: weird? I've never seen a language that doesn't require such a thing
21:52Chouserwell, you can refer to a class without ever loading it in any way
21:52djkthxwell, weird because the beta version of the clojure book i have seems to imply you can/coule at some point
21:53djkthxcould just be an old version
21:54Chouserno
21:55Chouserbeta 4 of the book? what page?
21:55djkthx53
21:55djkthxb4
21:57durka42are you looking at the ellipsize example?
21:58Chouserintro to namespaces
21:59durka42oh
21:59durka42yes, it does say you can do that
21:59Chouserlooks like an oversight in the prose
22:03djkthxhmm
22:03djkthxwell, good to know i'm not crazy
22:08yangsxwhat are possible reasons to prefer structmap to map besides giving a name to the map for the compiler to check?
22:09Chousermore space efficient
22:11yangsxChouser: I see.
22:11Chouseractually, I think that's just about it. access can be made a bit faster
22:12devinuswhat does java -server do?
22:13Chouseras i understand it, that causes it to use a completely different VM implementation
22:14hiredmanthe hotspot vm
22:14Chouserthe -server vm does takes a bigger CPU hit early to do more long-term optimization
22:15devinusnice
22:15devinusis there a script that packages jLine and clojure into an easy to use unix command?
22:24durka42there's a pretty simplistic one here http://clojure.org/getting_started
22:24durka42you'd probably want to add things to the classpath, at least
22:24durka42also, clojure.lang.Repl has been replaced by clojure.main
22:25hiredmanI still use Repl
22:26hiredmanI could not figure out how to load a script and launch a Repl at the same time with clojure.main
22:26Carkhum
22:26Chouserhiredman: I asked about that on the group.
22:27Carkthat may be why i didn't manage to make the new clojure work with slime !
22:33Chouserhttp://groups.google.com/group/clojure/msg/ea51b0fb25dbb402
22:35hiredmanugh
22:35Chouserwhat?
22:35hiredmanNothing.
22:41hiredmaninteresting
22:44Chouserdjkthx: in the beta5 version of the book, the previous page has a call to 'use' to load str-utils and and refer str-join
22:56djkthxah
22:57djkthxgotcha
23:24djkthxim curious why a LOOP macro hasn't been written for clojure
23:24djkthxis there anything similar?
23:24djkthx(like the CL macro)
23:25Chouserthere are 'for' and 'doseq' which are vaguely related
23:25technomancyhrm... I updated my swank-clojure and slime, and now my slime-repl buffer doesn't show up anymore.
23:25ChouserLOOP is far more powerful, of corse, as well as much more complicated.
23:26technomancyis there a fix, or should I roll back to a known good version?
23:26technomancyotherwise I'm stuck with the repl I've got and have to be veeeeery careful not to quit this one session that's working. =)
23:26Chouserheh
23:27Carktechnomancy : i have the same problem, i'm now using clojure-mode + a repl in *inferior-lisp*
23:27Chouserslime must be pretty great to be worth so much pain
23:27technomancyit is!
23:27djkthxslime is quite nice
23:27technomancyCark: you didn't happen to notice the SHA of the last good rev, did you?
23:28djkthxtechnomancy: i had similar issues because (require 'slime-fancy) didn't work before
23:28Carknope, sorry
23:28djkthxso i did some weirdass workaround
23:28djkthxif you did the same thing, switch it out for just (require 'slime-fancy) and you should be fine
23:28technomancyCark: inferior-lisp is probably OK as long as C-c C-l works
23:28technomancydjkthx: what's slime-fancy?
23:28djkthxit just loads a bunch of extra stuff
23:28djkthxdoc info, autocomplete, etc.
23:29Carktechnomancy : ah i had to edit the source code of clojure mode to make it work
23:29djkthxit's a feature you add to your ~/.emacs
23:44technomancyyeah, inf- is pretty reasonable; doesn't look like you miss too much without rep
23:46apage43slime is alright...
23:46apage43gorilla is good enough for me =P
23:47technomancyhttp://github.com/technomancy/mire/tree/master <= my simple MUD
23:48technomancyserver-socket is really nice; gets you what you need without a lot of java.io.fuss
23:50Carkhey if you have 2 players and one takes the key for instance
23:51Carkwhat happens when he is disconnected ?
23:51technomancyit's gone!
23:51technomancyforever
23:51Cark=)
23:51technomancybut it's not too big of a deal since the key isn't good for anything anyway
23:51technomancythe bunny, on the other hand...
23:53technomancyI was pretty excited just to get to the "player 1 took the key, now player 2 doesn't see it any more" stage. =)
23:54Carkyep pretty nice already
23:54Carkand very readable
23:54technomancynext step is to make it so players can see each other
23:55technomancythe logic should be very similar to take/drop of items though
23:55Carkand most importantly, fight the bunny !
23:55technomancyoh man... I should base it on Dwemthy's Array
23:55Carkwhat is it ?
23:56technomancy(http://poignantguide.net/dwemthy/)
23:56technomancy"These are the living, breathing monstrosities of Dwemthy's Array. I don't know how they got there. No one knows. Actually, I'm guessing the IntrepidDecomposedCyclist rode his ten-speed. But the others: NO ONE knows."
23:57Carkbleh better do your own stuff
23:58technomancyI don't do enough drugs to really pull something like that off