#clojure logs

2008-11-25

00:16arohnerdid anyone check out my expectation test post today? Since nobody responded I'm wondering if I'm off base by proposing it in a functional language
00:29fyuryuarohner: I think it's pretty cool. I hope it gets added to contrib
00:30fyuryuarohner: (unless you want it remain its own thing)
00:30arohnerno, I was hoping it would be useful
01:43_Jordan_My stupid question for today: Why aren't ((fn [] 42)) and (#(42)) equivalent?
01:46notallama#(42) is the same as (fn [] (42))
01:47_Jordan_notallama: Thanks! As an aside, is there a shortcut for a function that just returns 42?
01:49albinoIsn't (fn [] 42) a shortcut?
01:49albino_Jordan_: you trying to get rid of the argument vector?
01:49_Jordan_yeah, but I was pretty sure I saw a shorter way used in a snippet on here once
02:11hiredman#(identity 42)
02:14_Jordan_hiredman: thanks, that does read better
02:32PupenoGood morning.
02:32PupenoHow would you iterate over the keys and values of a map?
02:34hiredmanmap?
02:34_Jordan_:)
02:35hiredman(seq ...) on a hash map gives you a seq of [key val] vectors
02:35hiredmanmost sequence functions call seq on what you pass in first
02:36hiredmanso if you (map ...) on a hashmap, the function you map with sees a vector
02:36_Jordan_hiredman: I thought you were making a joke about using (map ...) to iterate over a map
02:37hiredmanI am pretty hilarious
02:37_Jordan_lol
02:56PupenoThanks.
03:08_Jordan_in (take-while (complement #{some-value}) coll), is a new set created for every iteration of take-while? (e.g. if some-value never changes, is it better to do (let [v #{some-value}] and call (complement v)?)
03:21hiredmanuh
03:33PupenoIs there a simple way to concatenate a list of strings?
03:35Pupenoah, (reduce str ...)
03:42fyuryuI compile a lib, no exceptions thrown, I see #{my.lib} in the repl, but no files are saved in the classes dir
03:55fyuryu1. create dirs: /test and /test/classes, 2. in /test create /test/my/lib.clj. 3 put (ns my.lib) in it 4. enter a directory with existing project and classes directory (eg. /som/proj/classes). 5. run java -cp /test;/test/classes;clojure.jar clojure.lang.Repl 6. invoke (compile 'my.lib).
03:56fyuryuand class files appear in /some/proj/classes/
04:01fyuryubinding *compile-path* to /test/classes does the job, but why did it work in the first place? /some/proj is not even in the classpath
05:05Lau_of_DKHi guys =)
05:07danlei`Top of the morning, Mr. Lau
05:55Lau_of_DKGood morning rhickey. I had a question which I almost posted for the group yesterday, but you might have the deciding insight. I made an ant simulator, in many ways similar to yours. One difference was that mine read its sleep times from globals refs (yours used static values). When I profiled the app, I saw that all agents had 2 tasks, getTask() and runTask(). getTask() usually took 80-90% of the available 100% for each thread, causing
05:55Lau_of_DKa great performance drop. Even before the first call to render, each thread averaged with 1000 calls to getTask(). Do you have any idea how I can get around this?
05:57rhickeyLau_of_DK: sounds like you have a bug
05:59Lau_of_DKrhickey: What should I be looking for?
06:01Lau_of_DKrhickey: I ask because, it must be that I somehow am not using the STM correctly.
07:59aperottehello all!
08:01aperotteI had a quick question. I was trying to define several things in a loop and do it by generating symbols like this (def (symbol (str "test" "123")) (+ 1 1))
08:02aperottewhich I thought would create a new mapping in the environment for test123 to 2
08:03ChousukeI think you need a macro for that.
08:03aperotteok
08:03aperotteI created a macro
08:04aperottebut then I got an InstantiationError
08:04Chousukethough def'ing a lot of generated symbols like that sounds a bit fishy.
08:04aperotteok
08:04Chousukewhat are you trying to accomplish with it?
08:05aperotteI was using a 3d library to create many instances of a sphere
08:05aperotteand wanted to name each object in the environment
08:06aperottehmm ... now that I think about it, I could probably use a hashmap
08:07aperotteI'd still be generating keys though
08:14aperotteUsing keywords worked fine
08:14aperotteI'm still a little confused as to why using def didn't work though
08:15rhickey_aperotte: def is a special operator, not a function
08:18aperotteI wanted to be able to do something like this (dotimes i 20 (def (symbol (str "sphere" i)) ("Sphere constructor")))
08:18rhickey_aperotte: you could make a macro that emitted defs in a do
08:20aperotterhickey_: It seemed like the problem was that def required that the first thing be a symbol, and not a list that evaluates to a symbol
08:21aperotteI wrote this macro:
08:21aperotte(defmacro def-sym [sym & body]
08:21aperotte (if (symbol? sym)
08:21aperotte `(def ~sym ~@body)
08:21aperotte `(def ~(eval sym) ~@body)))
08:21rhickey_hmm... eval
08:24aperotteafter defining a ref named spheres containing the empty list
08:24aperottecode that looked like this:
08:24aperotte(defmacro def-sym [sym & body]
08:24aperotte (if (symbol? sym)
08:24aperotte `(def ~sym ~@body)
08:24aperotte `(def ~(eval sym) ~@body)))
08:24aperotteoops, that wasn't corrent
08:24aperottecorrect
08:25aperottelike this:
08:25aperotte(dotimes i 20
08:25aperotte (dosync
08:25aperotte (ref-set spheres
08:25aperotte (conj @spheres
08:25aperotte (def-sym (symbol (str "sphere" i))
08:25aperotte ("Sphere Constructor here")))))
08:25aperottegave me an InstantiationError
08:31Chousukeaperotte: any reason you need a separate symbol for each sphere?
08:31Chousukeaperotte: you could just have a vector of spheres
08:32aperotteeventually I am going to have more unique names for each sphere (not indexed) and would like to be able to refer to them by name
08:33aperottethe hashmap did work without giving me an InstantiationException
08:33Chousuke(def spheres (ref [])) (dotimes [i 20] (dosync (ref-set spheres (conj @spheres (new-sphere i)))))
08:33aperotteI just didn't understand why I was getting the exception in the first place
08:33Chousukeor just use a map with strings as keys
08:34rhickey_aperotte: using do like this is not the way to build up data structures - use map or reduce
08:34aperotteahh, ok
08:35rhickey_you won't need a ref
08:36aperottebut if I want to be able to add and remove elements later, I would need a ref, no?
08:37Chousukeif the set of spheres is to be shared, yes.
08:38aperotteif it weren't going to be shared, I would use a var?
08:38rhickey_aperotte: It's a bit hard to understand what you are trying to do - why put names into a namespace with def - what code could reference them?
08:39Chousukeaperotte: you don't really "add" or "remove" anything though. the sets of spheres you have never change, the ref will only point to different sets over time :)
08:39aperotterhickey_: I apologize, I realize now that using a hashmap is the appropriate thing to do, but I was just trying to understand the exception
08:41aperotteChousuke: haha, yes, I remembered that but I should probably force myself into using the right vocabulary
08:41rhickey_ok, so if you are going to have a map as a runtime environment, that will be modified over time, you would put that in a ref, but still would keep you 'modification' logic (creating a changed map), separate from storing it into the ref after change, don't use the ref inside a loop/reduce/map
08:45aperotterhickey: ok, I'll do that, thanks!
08:45aperotteChousuke: Thanks!
08:58lisppaste8SnowBuddy pasted "Re-binding in recur" at http://paste.lisp.org/display/71016
09:00SnowBuddyQuick question. I thought that bindings in recur were done sequentially, but the paste suggests otherwise. The reduce seems to work on the unfiltered sequence rather than the other way around. What am I missing?
09:02rhickey_SnowBuddy: nope, parallel: http://clojure.org/special_forms#recur
09:07SnowBuddySo what would be a good way to have one binding depend on a previous binding? I know I can do it by restructuring so that it's not done in the recur, but that doesn't feel as clean.
09:09rhickey_SnowBuddy: you'll have to use let
09:10rhickey_Trampolines for tails calls added: http://groups.google.com/group/clojure/msg/3addf875319c5c10
09:19Chouserifn? sounds like some corrupt offspring of defn and if
09:20rhickey_Chouser: get your alternative in before it becomes legacy :)
09:21cemerickcallable?
09:21Chouserheh, yeah, I'm useless.
09:21rhickey_cemerick: the problem with callable? is Callable
09:21Chousercemerick: not bad, except isn't Callable a Java interface name?
09:21Chouserrunnable?
09:21rhickey_Runnable
09:21Chouser:-P
09:21Chouserfunnable
09:22rhickey_argh
09:23cemerickrhickey_: the struct mismatch issue is proving *very* thorny. You had an idea to avoid that, but I'll take a shot if it's not really on your radar.
09:23rhickey_Actually, I'm quite happy to leave it out, only there for legacy conversion
09:23Chouserand it has to be shorter than (instance? IFn x) to justify its existance.
09:25rhickey_cemerick: the hash technique can't be on the fast path, as it could still be wrong. Could do interned concat of field names
09:25rhickey_patch welcome
09:26cemerickrhickey_: what do you think of interning Defs to begin with (using a thorough .equals), so object identity can continue to be used?
09:27rhickey_just include a symbol-illegal separator, like comma, so foo bar and foob ar are different
09:27rhickey_with interned strings it's still an identity compare
09:27rhickey_just of the strings, not the Defs
09:28rhickey_cemerick: interning Defs means another intern table and all of the MT and GC complexity of that
09:29rhickey_the string goes in the Def, still space efficient
09:30cemerickrhickey_: sure. Q: you threw out the idea of struct-maps becoming classes with the def-ed keys becoming instance fields. Are you really planning on that? If so, I'll wait for it; otherwise, I'll put together a patch.
09:31rhickey_I have not thrown that out, just haven't gotten to it - proxy is next up for AOT special handling
09:32cemerickby "thrown out", I meant "casually suggested"
09:33rhickey_I understood, and I have to say that what's pending is really thinking about it, not simply doing it, so I can't commit that it will happen
09:34rhickey_I imagine the concat-of-names will be a very small patch if you are stuck
09:35cemerickyeah, it should be cake. I didn't think you would go for that approach, is all.
09:36cemerickI'm not stuck, but struct mismatches are happen every 5 minutes when I'm plugging away at running code through a remote REPL.
09:36rhickey_of course, it changes the semantics to structural 'type' equality - you might want to ask on the group if anyone is relying on identity type equality for structs
09:38cemerickthat'd be a little hard to do unless you explicitly carry the def in a slot of your map. PSM doesn't offer a way to obtain its Def.
09:38rhickey_could fix by including the struct name in the string, but that isn't passed in right now
09:38rhickey_cemerick: right, it's just the error protection semantics that change
09:40rhickey_accessor mismatch
09:41rhickey_probably a non-problem
09:41blackdog_awayi just had an error in my user.clj but message was simply that it could not initialise clojure.lang.RT, it would be good to get a more specific error there
09:50cemerickrhickey_: is the name at all relevant, anyway? A struct is defined by its keys. The fact that a unique Def is returned by create-struct each time is entirely an implementation detail right now, right?
09:52cemerickput another way, I'd expect that two structs with the same set of keys would be interchangeable in every circumstance
10:00sethtrainwilkes: should that error handling middleware also handle 404 errors?
10:00sethtraini just built it for 500 but could continue with 404 if needed
10:58ChouserWell, I give up. 'ifn?' is fine unless it's sufficient to by default bring in the clojure.lang.I* interfaces, so you could just say (instance? IFn)
10:59ChouserI'd suggest allowing (inst? IFn) for brevity, but the only options would be a rename (a breaking change) which isn't worth the trouble, or an alias (both 'inst?' and 'instance?' would work) but I very much dislike aliases.
11:00Chouserof that sort, anyway.
11:00ChouserSo. :-P
11:09danlarkinpoor rich
11:09rhickey:)
11:10gnuvincetrampoline? The technique to get TCO?
11:10rhickeygnuvince: manual tco
11:18cemerickrhickey: don't be sad. The fact that the biggest topics are typically bikeshed discussions about naming means that everyone's pretty thrilled with the meat of it all. :-)
11:19cemerickThe same thing happened with isa?; meanwhile, the multimethod impl is killer.
11:20rhickeyI'm really happy at how clean a transformation is, just prepend #s on tails and add trampoline to the top-level call
11:21cemerickYeah -- and that's the point. People like to provide feedback, but when the impl is so clean and obviously useful, that energy is channeled to the first obvious point of friction.
11:22cooldude127ok what the hell does this error mean: arg literal not in #()
11:22cooldude127it's an illegalstateexception
11:22cemerickcooldude127: it means you're using '%' outside of an anonymous fn
11:22cooldude127oh
11:22Chousercooldude127: you've got a % where you shouldn't
11:23Chouserrhickey: I snipe because I care. :-)
11:23cooldude127i see, i used a % in a macro name, i guess that's not cool
11:23cooldude127which makes sense now that i think about it
11:23cemerickyeah, it's reserved by the reader
11:23cooldude127i forgot about stuff like %1 and such
11:38cooldude127well fuck
11:38cooldude127Chouser: i finally tried to port the continuation macros
11:39cooldude127i was not lucky
11:39cooldude127Can't use qualified name as parameter: clojure.contrib.onlisp/*cont*
11:40Chousercooldude127: in your macros, use ~'*cont*
11:40cooldude127it looks like clojure is more restrictive on parameters than cl
11:40cooldude127well, let's give it a try
11:42cooldude127ok that fixed basic functions, i need to try some crazier examples.
11:44Chousernice
11:50cooldude127ahh this is not working
11:51cooldude127also why do we not have a clojure macroexpand that will do subforms?
11:53cemerickcooldude127: macroexpand should fully expand a macro. macroexpand-1 only does the top level
11:54cooldude127neither one works on any subforms
11:54cooldude127macros inside macros
11:54cooldude127for example: (let [f (fn= [n] (add1 n))] (bind= [y] (call= f 9) (return= (str "9 + 1 = " y))))
11:54cooldude127everything that ends in = is a macro
11:54cooldude127but macroexpand only handles the let
11:54cooldude127it stops after that
11:55cooldude127we need a macroexpand that actually walks the tree
11:55cemerickhuh: (doc macroexpand) => "... Note neither macroexpand-1 nor macroexpand expand macros in subforms."
11:55cooldude127yeah wtf?
11:55cooldude127macroexpand just keeps going until the first element of the form is no longer a macro
11:56cemerickThere might be a deep macroexpand -- I haven't needed one as of yet.
11:56cooldude127i've got so much going on there, a deep one would help me, maybe i'm the only one
11:58mmcgranathere is one on the group
11:59mmcgranahttp://groups.google.com/group/clojure/browse_thread/thread/bba604cee3b232d9/28837d55525306d8?lnk=gst&q=recursive+macroexpand#28837d55525306d8
12:09Lau_of_DKGood evening gents
12:11Lau_of_DKbrb
12:16mibuhmm, someone tagged the wikipedia article of clojure for deletion last week because it looked like spamcruft. maybe it's time to beef up the entry...
12:35duck1123rhickey: Have you thought about getting in touch with Leo Laporte and Randal Schwartz to do FLOSS Weekly?
12:35duck1123Clojure is on the list of projects they would like to talk about
12:36duck1123http://spreadsheets.google.com/pub?key=pYAJMbVobYCTro_z4LGo3ZQ
12:44gnuvinceduck1123: that would be cool
12:46danlarkinaye it would be
12:46danlarkin<3 leo
13:38flonkanyone good with java.swing?
13:39flonkim foing a simple gui and i want a layout like: row1: play stop next prev; row2: text-area the length of 3 buttons, find-button
13:39flonkhow do i set individual button-sizes?
13:58Lau_of_DKGooooood evening gents :)
14:00AWizzArdHello
14:12flonkGridBayLayout might e it
14:12flonkbut it seems i have to do quite a lot to make it work as i want, is there no really simple way?
14:12Lau_of_DKDo what?
14:13jedediahflonk: I think you could nest gridlayouts
14:13flonkim foing a simple gui and i want a layout like: row1: play stop next prev; row2: text-area the length of 3 buttons, find-button
14:13flonkrow3: results
14:14Lau_of_DKflonk, sounds like a simple job with mig layout?
14:15Lau_of_DK(doto panel (.add results "wrap") (.add text-area "span 3, wrap") (.add button1) (.add button2) (.add button3))
14:16Lau_of_DKI think if you check out miglayout.com, you'll find a get-started .pdf which has examples just like that
14:16blackdog_there's a miglayout lib in clojure.contrib
14:18AWizzArdAnyone of you know an easy to use web development framework for Java, that should be straightforward to use from Clojure, ready for commercial development? Rife?
14:18Lau_of_DKIf such a thing exists, Blackdog will know about it :)
14:19AWizzArdsomething like AllegroServe, but for Clojure
14:28Lau_of_DKHas anyone here made any interesting findings, when profiling the STM ?
14:29cooldude127wow i can't believe i had never seen MIG layout before
14:31Lau_of_DKMiglayout is descent for GUIs, but in my oppinion still a few light years behind qtDesigner
14:35cooldude127i have never used qtdesigner before
14:36cooldude127what's good about it?
14:38Lau_of_DKWhich OS are you on ?
14:39Lau_of_DKMr. Dude ?
14:39flonkLau: thanks
14:40Lau_of_DKflonk: np
14:42cooldude127Lau_of_DK: i'm on os x
14:43cooldude127sorry i keep irc on a different desktop, i sometimes forget about it lol
14:43Lau_of_DKEmacs, you should integrate it into Emacs, keeps things very simple. 4 split window. 1x code, 1x repl, 1x irc, 1x mail :)
14:44Lau_of_DKAnyway, if you were on *nix you would already have the designer installed and you could try it out. Its actually about the same quality as Visual Studios GUI editor
14:44cooldude127Lau_of_DK: i do. i keep emacs on its own desktop full screen
14:44cooldude127Lau_of_DK: i was browsing the interwebs
14:44Lau_of_DKoh... :)
14:45cooldude127Lau_of_DK: i know that in experience with java gui designers, they usually suck because they generate code, and the generated code is not always good
14:45cooldude127is qtdesigner protected from this problem?
14:46Lau_of_DKYes, QtDesigner outputs xml
14:49AWizzArdwhat is the easiest way in Clojure to connect to a (mysql) db?
14:49cooldude127Lau_of_DK: oh nice. kind of like interface builder uses nibs
14:53hoeckAWizzArd: there is clojure.contrib.sql which uses (shows how to use) jdbc
14:54Lau_of_DKhoeck: are you working on anything exciting in clojure these days?
14:55hoeckLau_of_DK: no, not really, except relational algebra
14:56AWizzArddanke
14:56Lau_of_DKhoeck: whatever that is :)
14:57PupenoHello.
14:57hoeckLau_of_DK: at least a little bit of fun :)
14:58Pupeno> 1
14:58cooldude127Pupeno: hello to you as well
14:58PupenoIs there a Clojure REPL on the channel?
14:58cooldude127just for some basic math
14:58cooldude127(+ 1 2)
14:58clojurebot3
14:58Lau_of_DKhoeck: good, I'll look it up later :)
14:58cooldude127and documentation
14:58cooldude127(doc doc)
14:58clojurebotPrints documentation for a var or special form given its name; arglists ([name])
14:58Pupenoah, ok.
14:59Lau_of_DK(doc map)
14:59clojurebotReturns a lazy seq consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.; arglists ([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
14:59PupenoHow are the Clojurist doing?
15:00Pupenocooldude127, Lau_of_DK: oh, ok... :/
15:01Lau_of_DKPupeno: ?
15:03cemerickhrm, does it try to evaluate any parenthetical form?
15:03Pupenonevermind.
15:03cemerick(fooey 5)
15:03Pupeno(+ + +)
15:03cemerickguess not
15:03Pupeno(+)
15:03Pupeno(+ 1)
15:03clojurebot1
15:03cemerick(apply + (range 5))
15:03Pupeno(- 4)
15:04cemerickodd. where does clojurebot come from?
15:04cemerickclojurebot: help
15:04clojurebotI don't understand.
15:04cemerickclojurebot: (apply + (range 5))
15:04clojurebot728=8B5?
15:04cemerickclojurebot: "fooey"
15:04clojurebotI don't understand.
15:04cemerickclojurebot: 34
15:04clojurebotNo entiendo
15:04cooldude127wtf happened with the apply one
15:04cemericknothing, I guess
15:05cemerickclojurebot: #(identity %)
15:05clojurebotHuh?
15:05technomancycemerick: hiredman created clojurebot
15:06duck1123clojurebot: how much do you know?
15:06clojurebotI know 28 things
15:07Pupenohehe.
15:07cooldude127clojurebot: what do you know?
15:07clojurebotHuh?
15:07cooldude127dumbass
15:07Pupenoclojurebot: about
15:07clojurebotNo entiendo
15:07Pupenoclojurebot: who are you?
15:07clojurebotTitim gan ?ir? ort.
15:07cooldude127how many languages does it know?
15:07Pupenoclojurebot: who created you?
15:07clojurebotTitim gan ?ir? ort.
15:08cemericklooks like it's wired for doing math, doc lookups, and a few other things: http://gist.github.com/raw/27733/fdfe3db932a7c95809af00f5147ede4cb2817e67
15:10PupenoAhg, a spurious parenthesis that accidentally gets balanced can be hard to find on Lisp. I need that Emacs mode that highlight forms. Does it work with Clojure?
15:10technomancyPupeno: yeah, it works fine.
15:10technomancyclojurebot: clojure-mode?
15:10clojurebotPardon?
15:11Pupenotechnomancy: I'm using clojure-mode already3
15:11technomancyclojurebot: clojure-mode is an Emacs mode for Clojure, found at git://github.com/jochu/clojure-mode.git
15:11clojurebotAlles klar
15:12technomancyPupeno: oh, gotcha. (show-paren-mode 1) ;; <= is that what you want?
15:12technomancy(no idea why that's not enabled by default...)
15:13Pupenotechnomancy: I have that enabled as well, let me find what I mean.
15:13duck1123I wonder if it would be worth it to replace dashes with spaces when doing pattern matching
15:13hiredmanclojurebot: how much do you know?
15:13clojurebotI know 29 things
15:13technomancyPupeno: oh, like it highlights the whole form when you have the point on the paren or something?
15:14Pupenotechnomancy: it highlights the whole form when you are in the form, and the sorounding forms with other colors, very handy. lisppaste does that.
15:14technomancyPupeno: paredit is supposed to provide a number of handy paren-matching features, but I haven't used it myself.
15:14technomancyoooh... yeah, the stuff that lisppaste does is awesome. never seen that in Emacs, but I'm sure it's possible
15:14flonkim trying to use miglayout from contrib
15:14flonkjava.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout (miglayout.clj:0)
15:15mehrheitPupeno: show-paren-mode has whole form highlighting as a custom option
15:15Lau_of_DKflonk: (import '(net.miginfocom.swing MigLayout))
15:15mehrheitPupeno: ant there's hl-paren which colors parenthesis based on their depth relative to point
15:16Pupenomehrheit: interesting.
15:17Lau_of_DKflonk: retraction. Thats how you import when using the miglayout-swing.jar, Ive never used the one in contrib, its probably (use clojure.contrib.sql)
15:20Pupenomehrheit: can't find the options, I suppose they can only be set with elisp?
15:22mehrheitPupeno: M-x customize-variable show-paren-style
15:27flonk(ns clojure.contrib.miglayout.test
15:27flonk (:import (javax.swing JButton JFrame JLabel JList JPanel
15:27flonk JScrollPane JTabbedPane JTextField JSeparator))
15:27flonk (:use clojure.contrib.miglayout))
15:28flonkadding (import '(net.miginfocom.swing MigLayout)) diesnt help
15:29mehrheitflonk: if the class is not found, it's apparently not in the classpath
15:29flonkwell how do i add it then?
15:29Chousukehow do you run clojure?
15:29flonki thought clojure-box automatically fixed that for me?
15:29Chousukeflonk: clojure-box doesn't automatically add things to your classpath
15:30flonkdownloaded clojurebox, start it with M-x slime
15:30mehrheitflonk: it only adds clojure to the classpath
15:30flonkok, how do i add o classpath(on windows) then?
15:30AWizzArd(add-classpath "/file/here.jar")
15:30Chousukehm :/
15:30flonkC:/?
15:30flonkin the repl?
15:30Chousukethat works, but only use it from the repl
15:31Chousukeit's only supported as a quick hack kind of thing :P
15:32hoeckflonk: or M-x customize-group swank-clojure
15:32flonkdo i only need the contrib.jar, does that collect them all?
15:32Chousukeno
15:32mehrheitclojurebox should probably have some simple configuration tool for the classpath
15:32mehrheitflonk: you need miglayout's jar. it's separate from clojure-contrib.
15:32Chousukeflonk: the miglayout thing is probably a completely separate jar that you'll need to get from somewhere.
15:32Chousukeprobably :P
15:33flonkthere is no miglayout.jar
15:33flonkjust .clj-files
15:33mehrheitflonk: clojure.contrib.miglayout is just a clojurier binding for the java library
15:34flonkso i need to download the lib separately? couldnt it get shipped with clojurebox?
15:34pwadeChouser: Where is your reflection helper code?
15:34mehrheitflonk: clojurebox ships clojure, emacs and swank. miglayout is a java library
15:35Chousukeflonk: that'd just be an unnecessary dependency for most people.
15:35mehrheits/swank/slime
15:35Chousukehttp://www.migcalendar.com/miglayout/versions/3.6/
15:35Chousukeyou probably want miglayout-3.6-swing.jar
15:37PupenoIs there any shorter version to (not (nil? x))?
15:38Chousukex
15:38Chousuke:)
15:40Chousuke(nil? foo) is generally nonidiomatic. you can usually just use "foo" or (not foo)
15:40Chouserpwade: you mean 'show' for at the REPL?
15:40ChouserPupeno: or (seq x) is x is a container
15:41mehrheitChousuke: unless you want to test only for nil and not for false
15:41Chousukeyou really need nil? only if you need to make a distinction between false and nil I guess.
15:41pwadeChouser: yes
15:42mehrheithivemind
15:45cooldude127for clojure-contrib, what's the most up-to-date repository?
15:50hoeckcooldude127: the one from sourceforge
15:50cooldude127ok
15:58Chouserpwade: http://groups.google.com/group/clojure/msg/96ed91f823305f02
15:59Chouserclojurebot: show is http://groups.google.com/group/clojure/msg/96ed91f823305f02
15:59clojurebotRoger.
16:03flonkhttp://www.migcalendar.com/miglayout/versions/3.6/
16:03flonkwhich of those do i need?
16:04flonkoh you said already
16:07pwadeChouser: thank you
16:08flonkjava.net.MalformedURLException: unknown protocol: c (NO_SOURCE_FILE:0)
16:08flonkwhen
16:08flonkuser> (add-classpath "C:/Program Files/Clojure Box/libjars/miglayout-3.6-swing.jar")
16:09mehrheitflonk: add-classpath expects an URL; prepend the string with file://
16:10flonkcan you show exactly how?
16:10flonkuser> (add-classpath "://C:/Program Files/Clojure Box/libjars/miglayout-3.6-swing.jar") doesnt work
16:10mehrheit(add-classpath "file://C:/Program Files/Clojure
16:10mehrheit Box/libjars/miglayout-3.6-swing.jar")
16:14flonkhmm import works now thanks
16:14flonkstill program crashes, oh well first prison breka then back to coding
16:21flonkok the import retusn nil, but so does it if i mess up the path
16:21flonkcouldnt that be changed, silent errors is the worst thing i know
16:33Lau_of_DKflonk: I dont get silent errors when I import something thats not there
16:36hiredmanflonk: what is the exact import form you are using?
16:37hiredmanthere are import forms that, infact, do nothing, so no errors are ever thrown
16:37hiredmanhiredman.clojurebot=> (import '(does.not.exist))
16:37hiredmannil
16:38hiredmanyou need to import specific names from the class
16:39hiredmanhiredman.clojurebot=> (import '(does.not.exist something))
16:39hiredmanjava.lang.ClassNotFoundException: does.not.exist.something (NO_SOURCE_FILE:0)
16:41shoovermehrheit: good point about clojurebox and the classpath. I will fix it to at least pick up jars in ~/.clojure
16:51shooverflonk: when you're done watching tv, you might also try add-classpath with file:///c:/... note the third slash
16:56Lau_of_DKflonk: you still havent got miglayout working?
17:08traskan(add-classpath "file:///C:/Program Files/Clojure Box/libjars/miglayout-3.6-swing.jar")
17:08traskansame again
17:08traskanLau: no it is not working
17:08traskani downloaded the lib you said and placed it ^^
17:09Lau_of_DKAnd youre on windows?
17:12traskanyes
17:12traskansometime i have to do Progra~1
17:13traskanbut it doenst seem to work either
17:13hiredmantraskan: how do you know the add-classpath is not working?
17:13hoecktraskan: on my win2k machine add-classpath works with "file:/c:/program ..." (don't know why)
17:13Lau_of_DKOk, traskan, just as an experiment, can you open a cmd, and move to the directory wherein you have miglayout-swing.jar ?
17:13Lau_of_DK(ex. "cd c:\test"
17:14traskani am there
17:14Lau_of_DKCan you copy clojure.jar to the same dir ?
17:16traskandone
17:16Lau_of_DKthen try "java -cp . clojure.lang.Repl"
17:17Lau_of_DKIf that gives you a repl, try "(import '(net.miginfocom.swing Miglayout))" which should return nil
17:17traskanexception in thread main
17:17Lau_of_DKWhich one?
17:17traskanjava -cp . clojure.lang.Repl
17:17Lau_of_DKWhich exception?
17:18traskanException in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Repl
17:18traskanCaused by: java.lang.ClassNotFoundException: clojure.lang.Repl
17:18Lau_of_DKoh thats right, Windows has got a different syntax for cp
17:19Lau_of_DKMaybe "java -cp "." clojure.lang.Repl" ?
17:19traskanhuh?
17:19Lau_of_DK?
17:19traskantwo parts?
17:19Lau_of_DKsorry
17:20Lau_of_DK'java -cp "." clojure.lang.Repl'
17:20traskansame
17:20Lau_of_DKI seem to remember that Windows wants quote, so that it doesnt mess up the command line
17:20Lau_of_DKoh
17:20hiredmanLau_of_DK: he needs to name the jar in the cp
17:20hiredmanjust having a . does not work
17:20Lau_of_DKhiredman: on windows?
17:20hiredmanevery where
17:20Lau_of_DKhiredman: It works fine on Linux
17:20traskani must have in .emacs in my "real" emacs, wait
17:21Lau_of_DKtraskan: We can solve this in a way that takes a little longer, but will give you the best result. Browse to www.ubuntu.org and follow the installation guide, report here when ready for step #2
17:21hiredmanLau_of_DK: It may apear to work that way on linux, but I really doubt it does
17:21Lau_of_DKhiredman: it does
17:21traskanLau: ok done
17:21hiredmanLau_of_DK: I doubt it
17:21Lau_of_DKhiredman: dont doubt, it works
17:21hiredmantraskan: how do you know the add-classpath is not working?
17:22traskani have ubuntu installed
17:22traskanhiredman: i dont but the program doesnt start
17:22hiredmantraskan: which program?
17:22traskanjava.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout (miglayout.clj:0)
17:22traskan [Thrown class clojure.lang.Compiler$CompilerException]
17:22traskancontrib miglayout test.clj
17:22Lau_of_DKtraskan: in ubuntu 'java -cp /path/to/clojure.jar:/path/to/miglayout-swing.jar clojure.lang.Repl
17:22Lau_of_DK'
17:23ChouserFor me, on ubuntu, this works: java -cp ~/build/clojure/clojure.jar clojure.lang.Repl
17:23traskangiot the rrepl
17:23ChouserThis fails: java -cp ~/build/clojure/ clojure.lang.Repl
17:23traskanjava -cp clojure.jar clojure.lang.Repl
17:23hiredmanChouser: word
17:25traskani try to import and get classnotfoundexception there too
17:26traskanLau: im not intereste din Ubuntu anyway, I run it on vmware and it is to slow
17:28traskanlol did i offedn anone? i didnt trahs ubuntu just saying im not gonna use it for this. probably will make a real install one day though
17:29hiredmantraskan: good, tell him to take is ubango and shove it
17:29traskanyoure what, a Suse guy?
17:29hiredmanno
17:29traskanarchlinux?
17:29traskanfedora?
17:29traskandebian?
17:30hiredmanthe idea of suggesting that you install a whole new OS as part of trouble shooting this issue is outragous
17:30hiredmantraskan: what does it matter what my personal choice is?
17:30traskanyes but he as just joking i think
17:30traskanjust asking
17:31hiredmanFreeBSD actually
17:31traskanim fairly new to linux an im not blown away,
17:31traskanok
17:31traskanit is better than windows ina lot of ways but some not
17:31hiredmanuh, in my personal opinion, just about anything is better then windows in everyway
17:32hiredmanbut I am evangelical about it
17:32traskanlol, is freebsd easy to use?
17:32hiredmanI find it easy to use
17:33hiredmanbut I have been using it for about eight years
17:33traskani jsut want something easy to use that is superstable and fast and good for programming. and youtube and stuff works..
17:33danleiit's very well documented
17:33traskanok
17:33traskananyway back to clojure
17:33traskanjava.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout (miglayout.clj:0)
17:33traskan [Thrown class clojure.lang.Compiler$CompilerException]
17:33traskanso i need to get Miglayout in my classpath
17:33hiredmanso what exactly are you doing to get that error?
17:34traskanand i never get the friggin java classpath
17:34traskanuim running miglayout/test.clj in clojure-contrib
17:34traskanim
17:34hiredmanhow are you running it?
17:34traskanC-c C-l
17:34hiredmanI see
17:34traskanclojure-box
17:35mehrheittraskan: add-classpath may not work for some java libraries
17:35traskanok
17:35hiredmanrhicky has stated that add-classpath was a mistake
17:35hiredmanand may be removed
17:35blackdog_it's only for the repl
17:36traskanbut now i have decided to put all my jars in ~pathto/clojure box/libjars/
17:36blackdog_he said yesterday
17:36danleimehrheit: why might it not work?
17:36traskanhow do i permanently add that to my classpath?
17:36mehrheitdanlei: I don't know exactly; it doesn't work for Qt-Jambi, I think
17:36hiredmantraskan: I think you have to right click on my computer
17:36hiredmantraskan: go to the advacned tab
17:36danleimehrheit: hm, good to know
17:37hiredmantraskan: click environment variables button near the bottom
17:37hiredmanand one of the variables is CLASSPATH
17:37hiredmanbut add the directory the jars are in to the classpath is not enough
17:37hiredmaneach jar file needs to be explicitly in the cp
17:38traskanok i see
17:38traskanretarded but ok
17:38hiredman*shrug*
17:38traskanwindonks + java -> uberclusterfuck
17:38danleirhickey wrote 2 days ago, i think, a way to set a directory up, so that you would just have to put your jars in that directory
17:38AWizzArdwhy? :-)
17:39hiredmanthere are trade offs
17:39hiredmanas always
17:39hiredmanI rather like jar files myself, so tiddy
17:39blackdog_ -Djava.ext.dirs=$LIBS
17:39danleiblackdog_: yes, that's what i meant
17:39hiredmanclojurebot: jar directory is -Djava.ext.dirs=$LIBS
17:39clojurebotAlles klar
17:39danleihuh
17:40blackdog_onto your java command to get at all the jars in $LIBS
17:40hiredmangood to know
17:40danleider schwaetzt deutsch?
17:40AWizzArddanlei: yes :-)
17:40danlei=)
17:40AWizzArdbut you will now wonder much more how in the world I could answer so fast
17:40hiredmanclojurebot: der schwaetzt deutsch is <reply>#who: dah!
17:40clojurebotAck. Ack.
17:42hiredmanclojurebot: der schwaetzt deutsch is <reply>#who: Jah!
17:42clojurebotOk.
17:42hiredman*cough*
17:42danleiclojurebot: schwaetzt du deutsch is <reply>aber sicher, #who!
17:42clojurebotYou don't have to tell me twice.
17:43danleiclojurebot: schwaetzt du deutsch?
17:43clojurebotaber sicher, danlei!
17:43danleiclojurebot: botsnack
17:43clojurebotthanks; that was delicious. (nom nom nom)
17:47traskanstill the same error after adding to classpath
17:47hiredmanclojurebot: halting problem is <reply>not a problem, the average bid for it on getacoder is $821.00
17:47clojurebotc'est bon!
17:48traskancan i apt-get clojure-box on ubuntu?
17:48ChouserIsn't clojure-box only for Windows?
17:48AWizzArdAnyone here who has used Rife in either Java or Clojure?
17:48hiredmantraskan: do you still have the miglayout jar and the clojure jar together in a directory somewhere?
17:49traskanyes
17:50hiredmanjava -cp clojure.jar;miglayout.jar clojure.lang.Repl
17:50hiredmanmiglayout.jar replaced with the name of the jar
17:50hiredmanactually
17:51hiredmanjava -cp clojure.jar;miglayout.jar clojure.lang.Repl c:\where\ever\miglayout\test.clj
17:51hiredmanugh, but that will throw an exception about not finding clojure.contrib
17:53traskanjava -cp clojure.jar;miglayout.jar clojure.lang.Repl
17:53traskanlol that didnt complaing
17:53hiredmanyeah
17:53traskanwhen it should right?
17:53hiredmanwell, type in net.miginfocom.swing.MigLayout
17:53hiredmanno quotes, no parens, see what it does
17:54traskanworks
17:54traskanor returns what iw rote
17:54hiredmanok
17:55hiredmanso that means that somehow miglayout.jar has just not been in your classpath this whole time
17:55traskanyes
17:55traskanbut it still doesnt seem to work from clojurebox
17:55hiredmanyeah
17:56hiredmanwhat kind of settings knobs does clojurebox have?
17:57mehrheittraskan: C-h v swank-clojure-binary
17:57mehrheitwhat is the value of this variable?
17:58traskanswank-clojure-binary is a variable defined in `c:/Program Files/Clojure Box/swank-clojure/swank-clojure.el'.
17:58traskanIts value is nil
18:02mehrheittraskan: M-: (setq swank-clojure-extra-classpaths (list "C:/path/to/miglayout.jar"))
18:02mehrheitthen you should restart slime
18:03mehrheitor, better, insert that form into your .emacs and restart clojurebox, but I don't know where .emacs is found on windows
18:05traskani do
18:05traskanbut i dont know where lcojurbeox is reading it from because it isnt the normal place
18:05traskanstill the same though
18:05traskanjava.lang.ClassNotFoundException: net.miginfocom.swing.MigLayout (miglayout.clj:0)
18:06mehrheittraskan: did you restart slime?
18:06traskanno
18:06traskanhow?
18:06traskanthe whole clojure-box?
18:06hiredmanheh
18:06mehrheityou should only the whole box in case you put the change into .emacs
18:07hiredmanclojurebot: emacs?
18:07clojurebotuggada buggada
18:07mehrheit,sayoonara in slime-repl, M-x slime
18:07hiredmanclojurebot: emacs is also <reply>emacs is hard, lets go shopping!
18:07clojurebotYou don't have to tell me twice.
18:07mehrheitactually, maybe (add-to-list 'swank-clojure-extra-classpaths "C:/path/to/miglayout.jar") would be better, since that wouldn't remove the contribs
18:09traskanstillt he same
18:09mehrheitdon't know then. try posting in the google group's clojurebox thread
18:09mehrheitclojurebot: group?
18:09clojurebotgroup is http://groups.google.com/group/clojure/
18:20traskan(ns clojure.contrib.miglayout.test
18:20traskan (:import (javax.swing JButton JFrame JLabel JList JPanel
18:20traskan JScrollPane JTabbedPane JTextField JSeparator))
18:20traskan (:use clojure.contrib.miglayout))
18:20traskanwhen i eval that i get error too
18:20traskan(ns clojure.contrib.miglayout.test
18:20traskan (:import (javax.swing JButton JFrame JLabel JList JPanel
18:20traskan JScrollPane JTabbedPane JTextField JSeparator))) works though
18:20traskanso the problem is :use clojure.contrib.miglayout
18:21hiredmanyou may have clobbered the clojure.contrib entry in classpath
18:21traskanuh oh
18:22traskani dont have it in my classpath *red face*
18:22hiredman(.get (System/getProperties) "java.class.path")
18:22traskan"c:/Program Files/Clojure Box/clojure/clojure.jar;c:/Program Files/Clojure Box/clojure-contrib/clojure-contrib.jar"
18:22traskanoh
18:22hiredmanhmmmm
18:23hiredmanstill no miglayout
18:23traskannope
18:23traskanah
18:23traskanit should be there?
18:23danleihm,
18:23hiredmanfrom my understanding of the swank stuff mehrheit spoke of, yes
18:24danleiyesterday, someone mentioned, that (System/getProperty "java.class.path") doesn't get updated
18:24traskanbut where is that
18:24hiredmandanlei: if you use add-classpath
18:24traskani didnt
18:24danleihiredman: yes
18:24hiredmanyeah
18:24traskani add do CLASSPATH in windows
18:24traskan.;C:\Program Files\Java\jre1.6.0_07\lib\ext\QTJava.zip;C:/Program Files/Clojure Box/libjars/miglayout-3.6-swing.jar;C:/Program Files/ImageJ/ij.jar
18:24hiredmanhmmm
18:25hiredmanswank must be ignoreing that
18:25traskanhmm why si a zip int he path?
18:25hiredmanjars are zips
18:25traskanok
18:25danleias far as i know (not sure), the CLASSPATH won't be used, if java is called with the -cp option
18:25hiredmandanlei: yeah
18:25hiredmanwhich swank does
18:26hiredmanthe swank in clojurebox will add all the jars in ~/.clojure to the classpath
18:26hiredmanbut where ~/.clojure is on windows is, uh, unkown to me
18:26traskanso i place it there?
18:26traskanok
18:26hiredmanyeah
18:26hiredmanif you can figure out where it is
18:29hoecktraskan: or try M-x customize-variable swank-clojure-extra-classpaths and append the path, sth like "c:\\bla\\bar"
18:29traskanwho created clojure-box?
18:31traskani can in nornal emacs do $home to get to .emacs
18:31traskanisnt there a way to find out where .clojure is ?
18:31traskanlike that?
18:31hoecktraskan: dot-paths are sometimes under c:\ (eg my .xemacs) and normally in the documents'n'settings\username\
18:33hiredmantraskan: try and edit ~/foo in emacs, and see where it is
18:35traskan~/foo ?
18:35hiredmanuh
18:35traskanhow do i get that?
18:35hiredmanI dunno emacs
18:35hiredmanbut vim :e ~/foo
18:35hiredmanor maybe on windows :e ~\foo
18:35traskanwell how do then get where that is
18:36traskani know what u mean to do
18:36traskani did now
18:36traskanbut when i do C-c C-f again i only get ~/ as apth anyway
18:36hiredmanwell
18:36hiredmanlook around for the file :P
18:36hiredmanDocs and settings\username
18:36traskanthe slime-history.eld is there
18:36hiredmanall the usual places
18:37hiredmanlook in the clojurebox dir
18:37hiredmanc:\program files\clojurebox
18:48traskanis last expensive?
18:48traskanor O(1)?
18:49traskanlinear time it says
18:49traskanfor both lists and vectors?
18:51hiredmantraskan: O(n) I believe
18:52hiredmanO(1) is constant time
18:56traskanout of memory error, java heap space
18:57traskansumming over 10K elem list abd building a list(scanl for you who know haskell), can i do something about that?
18:57hiredmanclojurebot: out of memory error, java heap space is <reply>hmm... sounds like your out of heap space
18:57clojurebotRoger.
18:57Chousuketraskan: building a list of what?
18:57hiredmantraskan: my guess is you did this recursively?
18:58traskanloop-recur
18:58Chousukecan you show the code you have?
18:58traskanyes last is very slow
18:59lisppaste8trasken pasted "scanl" at http://paste.lisp.org/display/71049
19:04Chousukehmm :/
19:05ChousukeI can't see anything wrong with the looping versin
19:05Chousukeversion*
19:08Chousukethe default maximum heap size for java appears to be 64MB. maybe your million items just can't fit in that :/
19:09traskanyeah
19:09hiredmanH4ns said something many moons ago about scanl
19:09traskananyway could loop [fun f] be faster than not having the f in the loop?
19:09traskani not declaring it again?
19:09traskani emans till using it obv
19:09traskan(loop [fun f
19:09traskan i init
19:09traskan [x & xs] coll
19:09traskan acc []]
19:09traskan(loop [i init
19:09traskan [x & xs] coll
19:09traskan acc []]
19:09traskanseems it shouldnt matter
19:10traskanbut the result differs slightly, maybe just coincidence
19:10Chousukeshouldn't matter that much.
19:10hiredmanhmmm
19:11hiredmanlose the loop and maybe recur to the function frame?
19:11traskanhow?
19:11traskanrecur scnal?
19:11hiredman(recur ...) can target the function body
19:12hiredmanso you just take all the bindings in (loop [ ...] and but them in the function args list
19:12hiredmanit can making calling the function a little messier
19:13hiredmanI think that might not make a difference
19:13hiredmanI am unsure
19:17Chousukeit shouldn't matter
19:18traskanuh
19:19traskani did foldl(reduce) with and without loop
19:19traskanand no loop was twice as fast
19:19traskanhow come?
19:19traskanis it the destructuring?
19:20traskanyeah seems like it
19:20traskandoing first and rest is a lot faster than [x & xs]
19:57traskanthis feels like premature optimization but i investigaed the above and it seems by my naive profiling(just using time ) that having 2 functions(nested ones) and binding recur to the fucntion instead of loop and not using destructuring spees it up
20:01Chousukehmm :/
20:02ChousukeI wonder why having two functions would be faster than loop
20:02Chousukedestructuring is understandable I guess.
20:15rhickey1000th member on the Google Group!
20:16mmcgrananice
20:30abrooksrhickey: Congrats!
20:36danlarkintraskan: indeed, I have found destructuring to be slower than not, so for inner loops it makes sense to avoid it, but elsewhere the convenience can outweigh the (small) efficiency loss
20:37traskanyes that sounds reasonable, felt like i was doing pointless optimizations but you have a good point, could be used for inner loops
20:59mattreplargh, having a difficult time pulling up examples of new class definition. anyone have a link handy?
21:15mattreplthat wasn't very clear, I was referring to the new Java class creation format that replaced the gen-class-*
22:04Chouserclojurebot: main?
22:04clojurebot728=8B5?
22:04Chouserclojurebot: AOT main?
22:04clojurebotPardon?
22:06Chouserclojurebot: AOT genclass is http://paste.lisp.org/display/70665 and http://clojure-log.n01se.net/date/2008-11-18.html#14:19
22:06clojurebotRoger.
22:06Chousermattrepl: ^^
22:06mattreplChouser: thank you
22:33mmcgranais anyone else having problems with clojure.contrib.except/throwf on recent versions of clojure and contrib - I'm getting the dreaded "ClassCastException" error
22:34lisppaste8mmcgrana pasted "throwf problem" at http://paste.lisp.org/display/71056
23:18flonkit really is awesome
23:18flonkgit
23:19flonkwhy doesnt clojure siwtch to git and github entirely?
23:25r2q2What is a good way to learn clojure? The lectures by Hitchey?
23:26Chouserr2q2: yeah, that's probably the best until the book comes out
23:27ChouserProbably seqs and concurrency, and then read through the topic pages on the web site
23:31pjb3r2q2: I'd say buy the beta book now
23:31pjb3There's plenty of useful stuff in there, especially for getting you started
23:32pjb3After that, you pretty much learn by doing, looking stuff up from the docs
23:32Chouserclojurebot: book?
23:32clojurebotPardon?
23:33Chouserclojurebot: book is http://www.pragprog.com/titles/shcloj/programming-clojure
23:33clojurebotc'est bon!
23:34r2q2clojurebot: yow
23:34clojurebotI don't understand.
23:34r2q2clojurebot: help
23:34clojurebot728=8B5?
23:34pjb3wtf is clojurebot?
23:34pjb3clojurebot: book?
23:34clojurebotbook is http://www.pragprog.com/titles/shcloj/programming-clojure
23:34pjb3fancy
23:34r2q2I think I will buy the book after my christmas money comes in.
23:35pjb3There's a 25% sale on friday: http://pragprog.com/frequently-asked-questions/black-friday
23:35pjb3So the beta book will only cost you $15.25
23:36pjb3clojurebot: AOT?
23:36clojurebotNo entiendo
23:36pjb3clojurebot: AOT genclass?
23:36clojurebotAOT genclass is http://paste.lisp.org/display/70665 and http://clojure-log.n01se.net/date/2008-11-18.html#14:19
23:54notallamaclojurebot: compile?
23:54clojurebotPardon?
23:54notallamaclojurebot: AOT compilation?
23:54clojurebotNo entiendo
23:54notallamaclojurebot: tell me your secrets?
23:54clojurebotI don't understand.
23:55notallamacurses. foiled again.
23:56notallamaso. for (compile [lib]), what's lib? and what does compile do?
23:57notallamaor probably a better question: how do i compile into .class files?