#clojure logs

2010-03-04

01:46konrtest
01:55TheBusbyYou are about to enter another dimension. A dimension not only of sight and sound, but of mind. A journey into a wondrous land of imagination. Next stop, the Twilight Zone!
01:55TheBusby(which is the hours the US West sleeps, until EU awakes)
02:08zmilapre-US awaken
02:09greghit's prime time for down under
02:23langtreeDoes anyone know who supports the Ubuntu clojure package ?
02:37cadslangtree: seems to be a guy named peter collingbourne: http://packages.debian.org/sid/devel/clojure
02:38cadslangtree: also, this is the first time I've heard of this, thanks!
02:41langtreeNo problem. It needs to get the readline type thing integrated.
04:03esjGood Morning Parentherati
04:09zmilau 2
08:48esji'm trying to define a macro that returns a function who's name is constructed, but I'm failing: (defmacro alter-name [name] `(defn (symbol ~name) [x#] x#)). Any hints ?
08:49cgrandesj: (defmacro alter-name [name] `(defn ~(symbol name) [x#] x#))
08:51esjsplendid, thanks.
08:58aldebrnShot-in-the-dark noob question: to implement a distributed linear algebra algorithm (conjugate gradient solver, on an implicitly-defined matrix, such that there will be some inter-node communication), should one look at Cascading/Hadoop?
09:01esjpotentially uninformed answer: but conj-grad is pretty serial in nature, ie after each iter you get to a point in spcae, and recalc your gradient. Hadoop is better for batch jobs, ie where you calculate a bunch of stuff in parallel and the bring it all together. So I don't think its a good match. No doubt somebody can correct me, though ;)
09:05esjmaybe I misunderstood - if the gradient calculation based on your implicitly defined matrix is what you're looking to do in parallel, then it makes more sense. I'm not sure what the overhead in living in Hadoop for that would be.
09:09aldebrnesj, all your intuitions are right. The matrix itself is implicitly defined and is pleasingly parallel, and the solution vector that's being solved for is too large to fit on one node. So each node would store a chunk of the solution vector, and code for the implicit operation.
09:10esjwow, that's some serious crunching.
09:11aldebrnMy HPC colleagues are going to jump on this and do it in their custom MPI-like frameworks, but I'd like to learn more about using Cascading/Clojure on such problems.
09:13aldebrnYeah, if y=Ax, y is "short" and each node has that; x is very "tall" and has to be distributed-stored. A is short-and-fat, and is basically an FFT matrix (with a pre-multiplier). And I will need to do CG repeatedly, changing that pre-multiplier till convergence.
09:13esjenjoy
09:13aldebrnI meant, A is a concatenation of multiple FFT matrixes, /fix
09:26esjIf I understand, you can definitely do this is a Hadoop setup. Your distributed calculation looks like Ax = A_1*x_1 + ... + A_n*x_n, where each i happens on a machine in the cluster. So the map part is A_i*x_i, and the reduce is the sum. Then you have Ax. Is that what you're after ?
09:29esjso you do that, fiddle your A according to CG or whatnot, distribute it to the cluster, wash, repeat.
09:39powr-tocDoes clojure have a bidirectional map at all?
09:50powr-tocok, I can make one with: (let [m {:foo "foo" :bar "bar"}] (merge m (apply hash-map (mapcat (fn [[a b]] [b a]) m))))
09:51aldebrnesj, quite right. That's encouraging. I've been searching for some literature on math + hadoop/cascading (I'd rather use Cascading), nothing yet, besides some matrix-multiply examples from Hama and an example for computing digits of pi with Hadoop
09:52chouser,(into {} (for [[b a] {:foo "foo" :bar "bar"}] [a b]))
09:52clojurebot{"foo" :foo, "bar" :bar}
09:52esjaldebrn: this might have some interesting stuff http://lucene.apache.org/mahout/
09:55aldebrnesj, quite so, I was slightly discouraged though by this statement there, 'They are not intended for applications requiring vectors or matrices that exceed the size of a single JVM, though such applications might be able to utilize them within a larger organizing framework.'
09:55aldebrnIt does seem like that could be a part of the solution
09:56esjbummer, it was a stab in the dark, sorry.
10:06powr-tocis there anyway for a function to know the name of the symbol or var it is bound to?
10:07powr-tocor do I need to do a big search of ns-interns?
10:14powr-tocInfact, is there a way for a function to get a hold its own value... i.e. is there a concept of this or self?
10:17chouseryou can name a function locally and then use that name
10:24stuartsierra,((fn thisfn [] (prn thisfn)))
10:24clojurebot#<sandbox$eval__11043$thisfn__11045 sandbox$eval__11043$thisfn__11045@c6344f>
10:28powr-tocchouser: cool
10:29powr-tocchouser: can you reuse the names?
10:29powr-tocwithout overwriting function definitions?
10:29powr-toci'm guessing you can
10:33chouserthey're local names -- same scope as the fn's parameters
10:40jcromartieI've got compojure set up to serve files with (GET "/*" (or (serve-file (:* params)) :next))
10:40jcromartieand public/404.html exists, among other things
10:41jcromartiebut I still get java.io.FileNotFoundException for any route
10:41jcromartieI have (ANY "*" (page-not-found)) set up too
10:42jcromartieslime seems to be running in my home directory
10:42jcromartiehmm
10:46jcromartiewhat's the proper way to start swank-clojure-project so that the current directory of the clojure process is the project dir?
10:50jcromartieI think I just have to run my dev REPL from the command line?
10:52spariev__are you using lein ? lein swank + slime-connect work flawlessly for me
10:53jcromartieah, I haven't used that before
10:53jcromartieI'll try it
10:55bsteuberjcromartie: I ran into a similar issue with swank-clojure-project - when loading a file, my current directory was src, not the project root
10:56bsteuberso I wrote a function that recursed outwards until I was at the project root
10:56bsteuberwhich smells very fishy, of course :)
10:56jcromartieah, yes
10:56jcromartieyes it does
10:56jcromartieI mean ideally we'd not be depending on the current directory at all
11:00spariev__I wish Clojure was free of all these Java oddnesses while keeping wast amount of libs and reliable VM :)
11:00bsteuber:)
11:01bsteubermaybe swank-clojure-project and lein swank should set something like *project-directory*
11:01bsteuberor maybe they do already and I don't know
11:03jcromartiespariev__: I just see it as a working directory thing
11:03jcromartieall processes have to deal with it
11:03jcromartiebut I guess other processes can cd
11:03jcromartiejava can't?
11:03spariev__yep, you're right
11:05spariev__http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4045688 - here's relevant bug with WontFix resolution
11:09DeusExPikachui can't import java.util.concurrent, is there something I need to change in my classpath?
11:09DeusExPikachumy java version is 1.6.0
12:25stuartsierraDeusExPikachu: you can't import a package.
12:27DeusExPikachustuartsierra, ok, I see my problem now
12:42esjI was puzzling around an equivalent of the GoF Decorate pattern for Clojure. I've put together an idea of what it could look like http://gist.github.com/321938. Any thoughts ?
12:44esjdoubtless it can be done my a clueful person in 3 lines :)
12:44chouserdid you consider storing the decorations in the collection's metadata?
12:45esji had not. i'm not sure they're orgothonal though. will need to think about that.
12:46chousernot sure either. I don't quite see what decorators are doing yet. :-)
12:52esjyeah, its probably totally twisted up. The idea is just to have a polymorphic function which composes itself based on an attribute of the state passed in.
12:53esjSo in my work you have a collection, and an add function. Now for some collections you want them to be db-backed, and or of fixed size. So you decorate the collection such that (add ...) will add data, write to the db, resize etc according to the collections decorations.
12:55mattrepltechnomancy: any reason not to add "resources/" to classpath in `swank-clojure-project`?
12:55esjthis was the first time I've actually used macros, so that was quite fun
12:57mattreplesj: that sounds very side-effect-y
12:58esjactually its all functional
12:58esjeverything is threaded
12:58esjno side-effects at all
13:00esjok, other than writing to the DB, but that's just in the example
13:00mattreplah, I was thinking of 'add' in the sense of math operator. yeah, that part is difficult to avoid and get thing done though. =)
13:02technomancymattrepl: I think it does now
13:02chouseresj: in your examples you're mutating test-fn, aren't you?
13:03esjchouser: this is true, in the exact sense that (def-method ...) mutates a multimethod.
13:03mattrepltechnomancy: in elpa?
13:04mattreplI'm looking at 1.1.0 from elpa
13:05esjchouser: woops, I'm wrong. test-fn just calls the a multifunction, once defined its not altered. The macros just add methods to the multifunction
13:08duncanmanyone good with Swing here? I'm adding a component to a JToolbar, how can I set the size (width) of the component so it doesn't span the entire toolbar?
13:15arohnerI think I remember hearing someone wrote an (assert) function that printed the arguments when the assert failed. Is that true?
13:15arohneri.e. (assert (foo? bar)) would print the eval'd value of bar in the assert exception message
13:19technomancymattrepl: no, I haven't released a new version
13:19technomancyso far it's just in git
13:19technomancyI hope to give it some attention and maybe a new release soon
13:21mattrepltechnomancy: cool, thanks for maintaining it
13:21technomancymaintaining is probably too strong a word for what I'm doing with it, but sure. =)
14:14stuartsierraarohner: clojure.test does that, more or less
14:46wthiddenI have a list of keys and a list of values how do i transform this pair of lists to a hashmap?
14:47wthiddeni thought there was a function that did this nicely, but I forgot where?
14:47_fogus_,(doc zipmap)
14:47clojurebot"([keys vals]); Returns a map with the keys mapped to the corresponding vals."
14:47bosiehow would one go about using a immutable data structure for a concurrency program?
14:48_fogus_wthidden: ^^^^^^^^
14:48wthiddenah.. no hash in the function name what so ever.. :) thanks _fogus_
14:52_fogus_wthidden: my pleasure
14:53technomancybosie: like this: (send (agent []) conj 1)
14:53technomancybut that is a pretty vague question.
14:54bosietechnomancy: right. but isn't that pretty much the same as using threads in java?
14:54bosietechnomancy: at that point
14:55technomancybosie: that example is so trivial that it's meaningless to compare it to non-FP approaches, yes.
14:55bosietechnomancy: ?
14:55bosietechnomancy: whatever you do, if the datat structure is immutable i have to enforce thread isolation
14:56technomancyI just mean your initial question is so broad as to be difficult to give a useful answer for.
14:56technomancyyou don't have to enforce thread isolation with immutable data structures, no.
14:56bosiesorry i meant mutuable
14:56bosiesince i won't use the datastructure from clojure
14:57technomancyoh, I see. yes, that's much trickier. putting it in an agent will enforce thread isolation.
14:58technomancythere are other ways, but that's the most straightforward I think.
14:58chouserwell, not really. putting it in an agent and promising to not change the value outside the agent does work.
14:58chouserbut calling it enforcement might be a bit much.
14:59technomancytrue, it's not actually isolation. you just have to promise to always modify it inside send.
14:59chouserusing a cell comes closer to enforcement, but they're not fully baked yet
15:02bosiegreat
15:04bosiethat takes the fun out of clojure
15:04triyo_Any work or thoughts happening around Clojure and support for actor model for distributed programming?
15:05chousertrying to do multithreads with uncontrolled mutable objects isn't fun in any language
15:06bosiechouser: true but is there any documentation out there in clojure?
15:06bosiechouser: because at least java is documented/has a concurrency book out that is rather decent
15:07_fogus_bosie: I assume you mean the Goetz book no?
15:07bosieyes
15:08chouserall the Java concurrency features are available, and if you're using someone else's mutable objects, applicable.
15:09bosiechouser: COLT :/
15:09chouserIncanter?
15:10bosiechouser: yea maybe, but the features of incanter aren't looking that impressive so far
15:10chouserI just wondered if you were using it, as there might be examples of what you want there.
15:11hiredmanand the problem with using colt directly is what?
15:11chouseryou're asking me?
15:11hiredmananyone
15:11bosiehiredman: wouldn't that give me mutable data structures?
15:11chouseroh. I assume just that colt's matrix objects are mutable
15:11bosiechouser: yea me too
15:12_fogus_bosie: I'm not sure that Incanter was written to solve the problems of concurrent programming.
15:12hiredmanbosie: yes, and?
15:12hiredmanas chouser said all the java concurrency stuff is available for use with java style mutable objects
15:12bosiehiredman: but why bothering with clojure then?
15:14Chousukebecause it's better in other ways too :)
15:14chouserclojure's agents and cells (if you're feeling adventurous) can be helpful and more convenient than similar constructs in Java.
15:14hiredmanbecause even when using locking instead of the stm clojure still has all the benefits of a lisp
15:14chouserAlso macros, REPL, seq abstraction, multimethods, etc.
15:14bosiehiredman: being slow? ;)
15:14hiredmancode as date & macros, much nicer to read and write than java
15:14hiredmanbosie: why do you think lisp is slow?
15:15bosiehiredman: not lisp, just clojure
15:15hiredmanwhy do you think clojure is slow?
15:15bosiejust a feeling i get ;)
15:15hiredmanwell, you feel wrong
15:15bosielooking at some blogs i guess i am right
15:16technomancybosie: reflection is slow, and clojure can use a lot of reflection.
15:16technomancybut that doesn't mean clojure can't be fast.
15:16hiredmanbosie: so it's not a feeling, it's from some blog posts you've read
15:16bosietechnomancy: i can make ruby fast too by using inline C, but that ain't ruby
15:17bosiehiredman: and when i think about it. how can one outperform another language if its written in the language and adds tons of features?
15:17technomancyI can make ruby fast too by putting it on a train going at a high speed, but that is also irrelevant to the discussion.
15:18bosietechnomancy: i am open to any articles you have about how you get performance out of clojure
15:18technomancyclojurebot: google ato benchmarking wide finder
15:18clojurebotFirst, out of 833 results is:
15:18clojurebotjessenoller.com - Python Threads and the Global Interpreter Lock
15:18clojurebothttp://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/
15:18technomancyclojurebot: no botsnack for you!
15:18clojurebotda da king of the road
15:18hiredmanbosie: speed is about the generated bytecode
15:18hiredmanand what the jit does with it
15:19technomancybosie: if you're in the mood for a long, in-depth read: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
15:19chouseror: speed is about algorithms and having the time and ability to implement good ones.
15:19technomancyclojurebot: widefinder is optimized by _ato: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
15:19clojurebotAck. Ack.
15:20bosietechnomancy: by optimize you mean rape a dynamic language by providing type hints?
15:20chouserbosie: is there something we can help you with?
15:20bosiechouser: not really
15:22bosiebut if anybody wants to have a crack at it: http://leon.bottou.org/projects/sgd
15:23_fogus_bosie: Is that your project?
15:23bosieno
15:27bosie_fogus_: does that matter?
15:28_fogus_bosie: not at all
15:31bosietechnomancy|away: in the 'final thoughts' of your link: "We can’t compete with a lower-level language like C or C++ on this sort of data crunching"
15:32chouserbosie: if you'd like to use C, by all means please do.
15:33bosiechouser: i won't. just wanted to paste that line because i got attacked before for even thinking clojurer was slow
15:33bosieyea ok not 'attacks'
15:34joeggIs there any particular place to announce clojure meetings? I setup a Pittsburgh Clojure Users Group on meetup.com, and I'd like to get the word out.
15:34bosiecorrections
15:34mattrepljoegg: the mailing list and here
15:36_fogus_joegg: If you tweet it then it might get picked up by http://disclojure.org/
15:37joeggmattrepl: Okay, thanks! In that case:
15:37joeggI'd like to invite everyone to the first meeting of the Pittsburgh Clojure Users Group.
15:37joegghttp://www.meetup.com/Clojure-PGH/
15:37joeggWe're meeting next Wednesday at 7pm at The Library (a bar).
15:37mattreplawesome bar name
15:37hiredmanhttp://github.com/texodus/saturnine <-- oooo
15:37joeggIn addition to a great language, we have a nifty logo.
15:39Chousukearr, there needs to be some kind of public announcement discouraging single-segment namespaces
15:39hiredman"Common functionality built-in, including Handlers for Bytes, Strings, (simple) streaming XML, HTTP, JSON, XMPP and Clojure forms." :D
15:40chouserChousuke: there are people still advocating it
15:41mattreplChousuke: ns.core or com.somedomain.ns or either?
15:42hiredmanI think the most recetn lein release defaults to projectname.core
15:43Chousukemattrepl: either.
16:17dnolennice, http://enfranchisedmind.com/blog/posts/what-killed-lisp-could-kill-haskell-as-well/#comment-37144
16:40arohnerto disable pre/post conditions, *assert* needs to be false at compile time, right?
16:40arohneror run time?
16:44chousercompile time
16:50arohner,(alter-var-root (var clojure.core/*assert*) (constantly false))
16:50clojurebotDENIED
16:51arohnerthat doesn't seem to work
16:55arohneraha, it was also bound in my thread
17:12DeusExPikachuI'm trying to implement the Executors interface using proxy and I'm getting the "No matching ctor found for..." error, How should i go about this?
17:13kotarakDeusExPikachu: paste the problematic code?
17:14hiredmanDeusExPikachu: are you strying to call a constructor?
17:14hiredmantrying
17:14DeusExPikachuI'll get the code pasted, one sec
17:18DeusExPikachuhttp://paste.lisp.org/+220Z
17:19kotarakHow can defaultThreadFactory be called on a Interface?
17:20kotarakMaybe you have to pass some arguments to the constructor of Executors?
17:20DeusExPikachukotarak, huh that's not the interface, I just need that for the method execute
17:20DeusExPikachufrom the java API docs, there are not required args to the constructor for Executor
17:21DeusExPikachuhttp://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executor.html
17:21duncanmwhen did clojure.contrib.io got accepted?
17:22technomancyduncanm: mid-february?
17:22kotarakDeusExPikachu: Executors does not have a public constructor it seems. Maybe you meant Executor in the proxy?
17:22hiredmanDeusExPikachu: Executors and Executor are different
17:22DeusExPikachuoh crap, figured out problem, there's a difference between Executors and Executor
17:22DeusExPikachuyeah
18:11DeusExPikachuis there a given way to get all the thread names or do I have to track that myself?
18:13technomancy,(Thread/getAllStackTraces)
18:13clojurebotjava.security.AccessControlException: access denied (java.lang.RuntimePermission getStackTrace)
18:13technomancyDeusExPikachu: ^
18:14hugodtechnomancy, what can I do to get an updated package regexp into swank-clojure?
18:15technomancyhugod: if you're interested in helping out I can give you commit rights to put it in directly
18:15hugodok, I could do that
18:16technomancywould allow you to bypass the fact that I'm a pretty crappy maintainer when it comes to swank.
18:16aedoncould anyone give me a cannonical way to add folders to classpath when using swank/slime/clojure from elpa? or is elpa discouraged?
18:17hugodtechnomancy: better a maintainer than no maintainer
18:17technomancyaedon: no, elpa is great. but how the classpath is calculated depends on how you launch slime.
18:17aedontechnomancy: so far I was doing m-x slime
18:17aedonbut I tried slime-project? too
18:17technomancyaedon: you can set the emacs swank-clojure-classpath defvar to a list of jars/directories; just be sure it includes the path to clojure.jar and swank-clojure.jar
18:18hugodI have to projects that I might get round to with swank - debugging with jdi, and restarts for error-kit
18:18technomancyhugod: are you hugoduncan on github?
18:18hugodI am
18:18mattreplthere's also swank-clojure-extra-classpaths
18:18aedontechnomancy: does it matter where in your .emacs you set that?
18:18technomancyhugod: cool; added
18:18hugodtechnomancy: thanks
18:19technomancymattrepl: they're actually aliases for each other
18:19technomancy-extra is the old name
18:19technomancyaedon: shouldn't matter
18:19mattreploh, didn't know that changed
18:19technomancybtw: if anyone else wants to help out with swank maintenance please let me know
18:20technomancyhugod: if you can keep work out of the master branch until it's well-tested that would be great.
18:20technomancyhugod: I like to run it by at least one other person before merging as a rule.
18:20aedontechnomancy: thanks for the help
18:20hugodtechnomancy: sounds wise to me
18:22technomancyhell of a regex you got there
18:22technomancy(for detecting metadata-having ns forms)
18:23hugodif you have other suggestions....
18:23technomancynot at all, just commenting on the verbosity of the elisp regex flavour
18:23technomancyplus it's a tricky thing to have to match.
18:23hugodit's not overly reliable in the face of {} in the doc string, or escaped quotes
18:24technomancymight end up being cleaner using something like forward-sexp
18:24technomancybut this is definitely an improvement
18:24hugodat least it picks up a few more cases
18:24technomancyyep, good stuff.
18:26DeusExPikachutechnomancy, does Thread/getAllStackTraces print out blocking threads? It seems to be missing some threads I believe should exist
18:27technomancyhugod: feel free to merge the ns detection regex patch; consider it reviewed
18:28technomancyand thanks for putting that together
18:31hugodtechnomancy: will do in while - I have to go cook for the kids...
18:32technomancyhave some good noms.
18:32Apage43man
18:32Apage43i've been secretly using clojure at work
18:33technomancyDeusExPikachu: hrm; I think it does, but I'm not sure. You could try just spinning up a few manually to check.
18:33Apage43great way to learn =P
18:33the-kennyDoes this patch does something like (clojure.core/select<TAB> -> (clojure.core/select-keys ? If so, it would be the second-best addition to swank I can think of.
18:34technomancythe-kenny: uh... that already works. =)
18:35the-kennytechnomancy: huh? Not with fuzzy I think. It just expands to (clojure/core
18:35the-kennys/\/\./
18:35technomancyworks for me using tab in the repl and dabbrev in regular buffers
18:35technomancyoh... I don't remember if I have fuzzy enabled
18:36the-kennyMaybe it's a problem with fuzzy
18:49DeusExPikachufor some reason (loop [] (when *foo* (recur))) does not increase my cpu usage when I run it and *foo* is true, is there some optimization going in the background?
18:51DeusExPikachucrap nm, I realized I'm running it remotely... hehe
18:59tomojhow would you deal with a java library which expects you to use synchronized statements?
19:00hiredmansynchronizing is locking
19:00hiredman,(doc locking)
19:00clojurebot"([x & body]); Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances."
19:01tomojgreat
19:01tomojI hadn't ever seen locking before
19:01technomancyhiredman: you coming to Zoka tonight?
19:01tomojthanks
19:02hiredmantechnomancy: yessir
19:02technomancycools
19:03technomancyI'm staking out the table as we speak.
19:08hiredmanexcellent, have to beat the rush...
19:21kotrintrying to make a shoutbox with clojure/compojure and when i submit the form it does not update the shouts listing until i restart the jetty server. anyone know why? not much on google... code: https://gist.github.com/1179a9055eea507867f6
20:40maxhodakhas anyone here used allegrograph?
21:14technomancyhugod: went ahead and applied your ns-with-metadata patch to swank; thanks.
21:15technomancyerr--never mind
21:15hugodtechnomancy: I think I beat you to it
21:16technomancyyup; nice
21:31hugodtechnomancy: looks like you've been busy...
22:57technomancyhugod: mostly just cleanup
22:57technomancyold branches to prune
22:58hugodtechnomancy: anything pressing that needs doing?
23:01technomancyhugod: I really want to get the debug-repl working in swank
23:03technomancybut it's currently getting confused about inputstreams
23:03hugodtechnomancy: is it on a branch?
23:04technomancyno, I haven't done anything towards that yet.
23:05hugodby debug-repl you mean using the new env support?
23:05technomancyyeah
23:05technomancyhttp://georgejahad.com/clojure/debug-repl.html
23:06hugodI'll take a look...
23:06technomancythat would be great!
23:06technomancyright now it only works from the inferior-lisp buffer
23:07hugodI get very frustrated with the lack of inspection in the stack trace
23:07technomancyyeah, that's been another top complaint
23:10technomancyintegrating the clj-stacktrace prettification library would be a big win too
23:11hugodand adding a 'go to the end of the exception cause chain' option
23:14technomancythat would be great
23:31pdktest
23:37rickmodeI'm using swank-clojure-project and leiningen. Do path and filenames need to match up with namespaces for (require 'foo) and (require 'foo.bar) to work?
23:39rickmodeactually I used (use 'foo) just not instead of (require 'foo)... I'm a little unclear about the distinction there as well
23:43dnolenrickmode: file name and directory path has to match.
23:44rickmodednolen: is that true in general, or just with use with leiningen?
23:44dnolenrickmode: true in general
23:44rickmodeic
23:45rickmodednolen: similar to java then. not a bad idea... keeps things easy to find
23:45dnolenI think it is actually imposed by Java (always forget). also note that dash becomes underscores.
23:45rickmodefor some reason I though the namespace marker in a file trumped
23:45dnolencom.foo.bar.my-file -> com/foo/bar/my_file.clj
23:45rickmodethat - to _ is odd, but easy to remember
23:46dnolenagain Java thing, - not allowed in file names.
23:46dnolenif something seems wack in Clojure 99% of the time it's because you can't work around it because it's imposed by Java.
23:47rickmodednoles I guess that's the price we pay vs. CL's package madness.
23:47dnolenof course there's _plenty_ of goodness from Java as well.
23:47dnolenrickmode: CL package madness always blew my mind.
23:48dnolenat one point I understood it and thought, super powerful but too many subtleties
23:48rickmodeI *really* wanted to use CL and gave it an honest shot.
23:48dnolenI also chanced upon Clojure because of dabbling in CL.
23:49rickmodewhat got me in the end was more that there didn't seem to be enough hackers involved to keep things going. Plus the ASDF thingy doesn't really deal with versions of dependences like leiningen (and maven in java)
23:49rickmodeat least not as far as I could see
23:50rickmodeanyway - can you explain the practical difference between the use and require forms? I get that a source file ought to use ns, but in the REPL, which one and why?
23:51dnolenrickmode: use bring all definitions in the library into your namespace, require brings those things in but you have to use the whole namespace to refer to something.
23:51dnolenuse is convenient but name clashes likely. require with an alias is common if you want to avoid typing
23:51dnolen(:require [some.cool.lib :as cool])
23:51rickmodednolen... aaaaah... is that it? sheesh.. I"m overthinking it
23:52dnolenalso
23:52dnolen(:use [some.coo.lib :only [foo bar]]) handy
23:54rickmodeya... i think i see why i got confused... both allow aliases but "require" aliases packages while "use" aliases symbols
23:54rickmode... it hink
23:54rickmode... er ... i think
23:54dnolenpersonally I don't see the point of alias + use, but perhaps somebody knows better.
23:54dnolenfor me its' either, use, use + only, require, require + as
23:57joshua-choiHow many people here use REPLs to develop Clojure?
23:57joshua-choiLike, actually? I've always just run tests, and I've never figured out how to really productively integrate the REPL into my programming.
23:57RaynesI'd venture a guess that everybody does. If you use Clojure without an REPL, I'm not sure how you get anything done.
23:58joshua-choiYeah, sometimes I wonder that myself. :P
23:58RaynesI don't think I'm capable of coding in a language without one anymore. :o
23:58joshua-choiWhatever project I'm working on has a script full of tests that refer to my actual project code. I just run it every time I modify my project.
23:59joshua-choiI just don't "get" the REPL right now. Maybe it's because I'm not using an IDE.
23:59RaynesNeither am I.
23:59dnolenjoshua-choi: i only use REPL, but Emacs makes it easier. Enclojure's REPL support seemed passable.
23:59RaynesI use Emacs.