2010-03-04
| 01:46 | konr | test |
| 01:55 | TheBusby | You 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:55 | TheBusby | (which is the hours the US West sleeps, until EU awakes) |
| 02:08 | zmila | pre-US awaken |
| 02:09 | gregh | it's prime time for down under |
| 02:23 | langtree | Does anyone know who supports the Ubuntu clojure package ? |
| 02:37 | cads | langtree: seems to be a guy named peter collingbourne: http://packages.debian.org/sid/devel/clojure |
| 02:38 | cads | langtree: also, this is the first time I've heard of this, thanks! |
| 02:41 | langtree | No problem. It needs to get the readline type thing integrated. |
| 04:03 | esj | Good Morning Parentherati |
| 04:09 | zmila | u 2 |
| 08:48 | esj | i'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:49 | cgrand | esj: (defmacro alter-name [name] `(defn ~(symbol name) [x#] x#)) |
| 08:51 | esj | splendid, thanks. |
| 08:58 | aldebrn | Shot-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:01 | esj | potentially 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:05 | esj | maybe 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:09 | aldebrn | esj, 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:10 | esj | wow, that's some serious crunching. |
| 09:11 | aldebrn | My 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:13 | aldebrn | Yeah, 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:13 | esj | enjoy |
| 09:13 | aldebrn | I meant, A is a concatenation of multiple FFT matrixes, /fix |
| 09:26 | esj | If 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:29 | esj | so you do that, fiddle your A according to CG or whatnot, distribute it to the cluster, wash, repeat. |
| 09:39 | powr-toc | Does clojure have a bidirectional map at all? |
| 09:50 | powr-toc | ok, I can make one with: (let [m {:foo "foo" :bar "bar"}] (merge m (apply hash-map (mapcat (fn [[a b]] [b a]) m)))) |
| 09:51 | aldebrn | esj, 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:52 | chouser | ,(into {} (for [[b a] {:foo "foo" :bar "bar"}] [a b])) |
| 09:52 | clojurebot | {"foo" :foo, "bar" :bar} |
| 09:52 | esj | aldebrn: this might have some interesting stuff http://lucene.apache.org/mahout/ |
| 09:55 | aldebrn | esj, 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:55 | aldebrn | It does seem like that could be a part of the solution |
| 09:56 | esj | bummer, it was a stab in the dark, sorry. |
| 10:06 | powr-toc | is there anyway for a function to know the name of the symbol or var it is bound to? |
| 10:07 | powr-toc | or do I need to do a big search of ns-interns? |
| 10:14 | powr-toc | Infact, 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:17 | chouser | you can name a function locally and then use that name |
| 10:24 | stuartsierra | ,((fn thisfn [] (prn thisfn))) |
| 10:24 | clojurebot | #<sandbox$eval__11043$thisfn__11045 sandbox$eval__11043$thisfn__11045@c6344f> |
| 10:28 | powr-toc | chouser: cool |
| 10:29 | powr-toc | chouser: can you reuse the names? |
| 10:29 | powr-toc | without overwriting function definitions? |
| 10:29 | powr-toc | i'm guessing you can |
| 10:33 | chouser | they're local names -- same scope as the fn's parameters |
| 10:40 | jcromartie | I've got compojure set up to serve files with (GET "/*" (or (serve-file (:* params)) :next)) |
| 10:40 | jcromartie | and public/404.html exists, among other things |
| 10:41 | jcromartie | but I still get java.io.FileNotFoundException for any route |
| 10:41 | jcromartie | I have (ANY "*" (page-not-found)) set up too |
| 10:42 | jcromartie | slime seems to be running in my home directory |
| 10:42 | jcromartie | hmm |
| 10:46 | jcromartie | what's the proper way to start swank-clojure-project so that the current directory of the clojure process is the project dir? |
| 10:50 | jcromartie | I think I just have to run my dev REPL from the command line? |
| 10:52 | spariev__ | are you using lein ? lein swank + slime-connect work flawlessly for me |
| 10:53 | jcromartie | ah, I haven't used that before |
| 10:53 | jcromartie | I'll try it |
| 10:55 | bsteuber | jcromartie: I ran into a similar issue with swank-clojure-project - when loading a file, my current directory was src, not the project root |
| 10:56 | bsteuber | so I wrote a function that recursed outwards until I was at the project root |
| 10:56 | bsteuber | which smells very fishy, of course :) |
| 10:56 | jcromartie | ah, yes |
| 10:56 | jcromartie | yes it does |
| 10:56 | jcromartie | I mean ideally we'd not be depending on the current directory at all |
| 11:00 | spariev__ | I wish Clojure was free of all these Java oddnesses while keeping wast amount of libs and reliable VM :) |
| 11:00 | bsteuber | :) |
| 11:01 | bsteuber | maybe swank-clojure-project and lein swank should set something like *project-directory* |
| 11:01 | bsteuber | or maybe they do already and I don't know |
| 11:03 | jcromartie | spariev__: I just see it as a working directory thing |
| 11:03 | jcromartie | all processes have to deal with it |
| 11:03 | jcromartie | but I guess other processes can cd |
| 11:03 | jcromartie | java can't? |
| 11:03 | spariev__ | yep, you're right |
| 11:05 | spariev__ | http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4045688 - here's relevant bug with WontFix resolution |
| 11:09 | DeusExPikachu | i can't import java.util.concurrent, is there something I need to change in my classpath? |
| 11:09 | DeusExPikachu | my java version is 1.6.0 |
| 12:25 | stuartsierra | DeusExPikachu: you can't import a package. |
| 12:27 | DeusExPikachu | stuartsierra, ok, I see my problem now |
| 12:42 | esj | I 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:44 | esj | doubtless it can be done my a clueful person in 3 lines :) |
| 12:44 | chouser | did you consider storing the decorations in the collection's metadata? |
| 12:45 | esj | i had not. i'm not sure they're orgothonal though. will need to think about that. |
| 12:46 | chouser | not sure either. I don't quite see what decorators are doing yet. :-) |
| 12:52 | esj | yeah, 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:53 | esj | So 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:55 | mattrepl | technomancy: any reason not to add "resources/" to classpath in `swank-clojure-project`? |
| 12:55 | esj | this was the first time I've actually used macros, so that was quite fun |
| 12:57 | mattrepl | esj: that sounds very side-effect-y |
| 12:58 | esj | actually its all functional |
| 12:58 | esj | everything is threaded |
| 12:58 | esj | no side-effects at all |
| 13:00 | esj | ok, other than writing to the DB, but that's just in the example |
| 13:00 | mattrepl | ah, I was thinking of 'add' in the sense of math operator. yeah, that part is difficult to avoid and get thing done though. =) |
| 13:02 | technomancy | mattrepl: I think it does now |
| 13:02 | chouser | esj: in your examples you're mutating test-fn, aren't you? |
| 13:03 | esj | chouser: this is true, in the exact sense that (def-method ...) mutates a multimethod. |
| 13:03 | mattrepl | technomancy: in elpa? |
| 13:04 | mattrepl | I'm looking at 1.1.0 from elpa |
| 13:05 | esj | chouser: 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:08 | duncanm | anyone 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:15 | arohner | I think I remember hearing someone wrote an (assert) function that printed the arguments when the assert failed. Is that true? |
| 13:15 | arohner | i.e. (assert (foo? bar)) would print the eval'd value of bar in the assert exception message |
| 13:19 | technomancy | mattrepl: no, I haven't released a new version |
| 13:19 | technomancy | so far it's just in git |
| 13:19 | technomancy | I hope to give it some attention and maybe a new release soon |
| 13:21 | mattrepl | technomancy: cool, thanks for maintaining it |
| 13:21 | technomancy | maintaining is probably too strong a word for what I'm doing with it, but sure. =) |
| 14:14 | stuartsierra | arohner: clojure.test does that, more or less |
| 14:46 | wthidden | I have a list of keys and a list of values how do i transform this pair of lists to a hashmap? |
| 14:47 | wthidden | i thought there was a function that did this nicely, but I forgot where? |
| 14:47 | _fogus_ | ,(doc zipmap) |
| 14:47 | clojurebot | "([keys vals]); Returns a map with the keys mapped to the corresponding vals." |
| 14:47 | bosie | how would one go about using a immutable data structure for a concurrency program? |
| 14:48 | _fogus_ | wthidden: ^^^^^^^^ |
| 14:48 | wthidden | ah.. no hash in the function name what so ever.. :) thanks _fogus_ |
| 14:52 | _fogus_ | wthidden: my pleasure |
| 14:53 | technomancy | bosie: like this: (send (agent []) conj 1) |
| 14:53 | technomancy | but that is a pretty vague question. |
| 14:54 | bosie | technomancy: right. but isn't that pretty much the same as using threads in java? |
| 14:54 | bosie | technomancy: at that point |
| 14:55 | technomancy | bosie: that example is so trivial that it's meaningless to compare it to non-FP approaches, yes. |
| 14:55 | bosie | technomancy: ? |
| 14:55 | bosie | technomancy: whatever you do, if the datat structure is immutable i have to enforce thread isolation |
| 14:56 | technomancy | I just mean your initial question is so broad as to be difficult to give a useful answer for. |
| 14:56 | technomancy | you don't have to enforce thread isolation with immutable data structures, no. |
| 14:56 | bosie | sorry i meant mutuable |
| 14:56 | bosie | since i won't use the datastructure from clojure |
| 14:57 | technomancy | oh, I see. yes, that's much trickier. putting it in an agent will enforce thread isolation. |
| 14:58 | technomancy | there are other ways, but that's the most straightforward I think. |
| 14:58 | chouser | well, not really. putting it in an agent and promising to not change the value outside the agent does work. |
| 14:58 | chouser | but calling it enforcement might be a bit much. |
| 14:59 | technomancy | true, it's not actually isolation. you just have to promise to always modify it inside send. |
| 14:59 | chouser | using a cell comes closer to enforcement, but they're not fully baked yet |
| 15:02 | bosie | great |
| 15:04 | bosie | that takes the fun out of clojure |
| 15:04 | triyo_ | Any work or thoughts happening around Clojure and support for actor model for distributed programming? |
| 15:05 | chouser | trying to do multithreads with uncontrolled mutable objects isn't fun in any language |
| 15:06 | bosie | chouser: true but is there any documentation out there in clojure? |
| 15:06 | bosie | chouser: 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:07 | bosie | yes |
| 15:08 | chouser | all the Java concurrency features are available, and if you're using someone else's mutable objects, applicable. |
| 15:09 | bosie | chouser: COLT :/ |
| 15:09 | chouser | Incanter? |
| 15:10 | bosie | chouser: yea maybe, but the features of incanter aren't looking that impressive so far |
| 15:10 | chouser | I just wondered if you were using it, as there might be examples of what you want there. |
| 15:11 | hiredman | and the problem with using colt directly is what? |
| 15:11 | chouser | you're asking me? |
| 15:11 | hiredman | anyone |
| 15:11 | bosie | hiredman: wouldn't that give me mutable data structures? |
| 15:11 | chouser | oh. I assume just that colt's matrix objects are mutable |
| 15:11 | bosie | chouser: yea me too |
| 15:12 | _fogus_ | bosie: I'm not sure that Incanter was written to solve the problems of concurrent programming. |
| 15:12 | hiredman | bosie: yes, and? |
| 15:12 | hiredman | as chouser said all the java concurrency stuff is available for use with java style mutable objects |
| 15:12 | bosie | hiredman: but why bothering with clojure then? |
| 15:14 | Chousuke | because it's better in other ways too :) |
| 15:14 | chouser | clojure's agents and cells (if you're feeling adventurous) can be helpful and more convenient than similar constructs in Java. |
| 15:14 | hiredman | because even when using locking instead of the stm clojure still has all the benefits of a lisp |
| 15:14 | chouser | Also macros, REPL, seq abstraction, multimethods, etc. |
| 15:14 | bosie | hiredman: being slow? ;) |
| 15:14 | hiredman | code as date & macros, much nicer to read and write than java |
| 15:14 | hiredman | bosie: why do you think lisp is slow? |
| 15:15 | bosie | hiredman: not lisp, just clojure |
| 15:15 | hiredman | why do you think clojure is slow? |
| 15:15 | bosie | just a feeling i get ;) |
| 15:15 | hiredman | well, you feel wrong |
| 15:15 | bosie | looking at some blogs i guess i am right |
| 15:16 | technomancy | bosie: reflection is slow, and clojure can use a lot of reflection. |
| 15:16 | technomancy | but that doesn't mean clojure can't be fast. |
| 15:16 | hiredman | bosie: so it's not a feeling, it's from some blog posts you've read |
| 15:16 | bosie | technomancy: i can make ruby fast too by using inline C, but that ain't ruby |
| 15:17 | bosie | hiredman: and when i think about it. how can one outperform another language if its written in the language and adds tons of features? |
| 15:17 | technomancy | I 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:18 | bosie | technomancy: i am open to any articles you have about how you get performance out of clojure |
| 15:18 | technomancy | clojurebot: google ato benchmarking wide finder |
| 15:18 | clojurebot | First, out of 833 results is: |
| 15:18 | clojurebot | jessenoller.com - Python Threads and the Global Interpreter Lock |
| 15:18 | clojurebot | http://jessenoller.com/2009/02/01/python-threads-and-the-global-interpreter-lock/ |
| 15:18 | technomancy | clojurebot: no botsnack for you! |
| 15:18 | clojurebot | da da king of the road |
| 15:18 | hiredman | bosie: speed is about the generated bytecode |
| 15:18 | hiredman | and what the jit does with it |
| 15:19 | technomancy | bosie: if you're in the mood for a long, in-depth read: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html |
| 15:19 | chouser | or: speed is about algorithms and having the time and ability to implement good ones. |
| 15:19 | technomancy | clojurebot: widefinder is optimized by _ato: http://meshy.org/2009/12/13/widefinder-2-with-clojure.html |
| 15:19 | clojurebot | Ack. Ack. |
| 15:20 | bosie | technomancy: by optimize you mean rape a dynamic language by providing type hints? |
| 15:20 | chouser | bosie: is there something we can help you with? |
| 15:20 | bosie | chouser: not really |
| 15:22 | bosie | but if anybody wants to have a crack at it: http://leon.bottou.org/projects/sgd |
| 15:23 | _fogus_ | bosie: Is that your project? |
| 15:23 | bosie | no |
| 15:27 | bosie | _fogus_: does that matter? |
| 15:28 | _fogus_ | bosie: not at all |
| 15:31 | bosie | technomancy|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:32 | chouser | bosie: if you'd like to use C, by all means please do. |
| 15:33 | bosie | chouser: i won't. just wanted to paste that line because i got attacked before for even thinking clojurer was slow |
| 15:33 | bosie | yea ok not 'attacks' |
| 15:34 | joegg | Is 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:34 | bosie | corrections |
| 15:34 | mattrepl | joegg: the mailing list and here |
| 15:36 | _fogus_ | joegg: If you tweet it then it might get picked up by http://disclojure.org/ |
| 15:37 | joegg | mattrepl: Okay, thanks! In that case: |
| 15:37 | joegg | I'd like to invite everyone to the first meeting of the Pittsburgh Clojure Users Group. |
| 15:37 | joegg | http://www.meetup.com/Clojure-PGH/ |
| 15:37 | joegg | We're meeting next Wednesday at 7pm at The Library (a bar). |
| 15:37 | mattrepl | awesome bar name |
| 15:37 | hiredman | http://github.com/texodus/saturnine <-- oooo |
| 15:37 | joegg | In addition to a great language, we have a nifty logo. |
| 15:39 | Chousuke | arr, there needs to be some kind of public announcement discouraging single-segment namespaces |
| 15:39 | hiredman | "Common functionality built-in, including Handlers for Bytes, Strings, (simple) streaming XML, HTTP, JSON, XMPP and Clojure forms." :D |
| 15:40 | chouser | Chousuke: there are people still advocating it |
| 15:41 | mattrepl | Chousuke: ns.core or com.somedomain.ns or either? |
| 15:42 | hiredman | I think the most recetn lein release defaults to projectname.core |
| 15:43 | Chousuke | mattrepl: either. |
| 16:17 | dnolen | nice, http://enfranchisedmind.com/blog/posts/what-killed-lisp-could-kill-haskell-as-well/#comment-37144 |
| 16:40 | arohner | to disable pre/post conditions, *assert* needs to be false at compile time, right? |
| 16:40 | arohner | or run time? |
| 16:44 | chouser | compile time |
| 16:50 | arohner | ,(alter-var-root (var clojure.core/*assert*) (constantly false)) |
| 16:50 | clojurebot | DENIED |
| 16:51 | arohner | that doesn't seem to work |
| 16:55 | arohner | aha, it was also bound in my thread |
| 17:12 | DeusExPikachu | I'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:13 | kotarak | DeusExPikachu: paste the problematic code? |
| 17:14 | hiredman | DeusExPikachu: are you strying to call a constructor? |
| 17:14 | hiredman | trying |
| 17:14 | DeusExPikachu | I'll get the code pasted, one sec |
| 17:18 | DeusExPikachu | http://paste.lisp.org/+220Z |
| 17:19 | kotarak | How can defaultThreadFactory be called on a Interface? |
| 17:20 | kotarak | Maybe you have to pass some arguments to the constructor of Executors? |
| 17:20 | DeusExPikachu | kotarak, huh that's not the interface, I just need that for the method execute |
| 17:20 | DeusExPikachu | from the java API docs, there are not required args to the constructor for Executor |
| 17:21 | DeusExPikachu | http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executor.html |
| 17:21 | duncanm | when did clojure.contrib.io got accepted? |
| 17:22 | technomancy | duncanm: mid-february? |
| 17:22 | kotarak | DeusExPikachu: Executors does not have a public constructor it seems. Maybe you meant Executor in the proxy? |
| 17:22 | hiredman | DeusExPikachu: Executors and Executor are different |
| 17:22 | DeusExPikachu | oh crap, figured out problem, there's a difference between Executors and Executor |
| 17:22 | DeusExPikachu | yeah |
| 18:11 | DeusExPikachu | is there a given way to get all the thread names or do I have to track that myself? |
| 18:13 | technomancy | ,(Thread/getAllStackTraces) |
| 18:13 | clojurebot | java.security.AccessControlException: access denied (java.lang.RuntimePermission getStackTrace) |
| 18:13 | technomancy | DeusExPikachu: ^ |
| 18:14 | hugod | technomancy, what can I do to get an updated package regexp into swank-clojure? |
| 18:15 | technomancy | hugod: if you're interested in helping out I can give you commit rights to put it in directly |
| 18:15 | hugod | ok, I could do that |
| 18:16 | technomancy | would allow you to bypass the fact that I'm a pretty crappy maintainer when it comes to swank. |
| 18:16 | aedon | could anyone give me a cannonical way to add folders to classpath when using swank/slime/clojure from elpa? or is elpa discouraged? |
| 18:17 | hugod | technomancy: better a maintainer than no maintainer |
| 18:17 | technomancy | aedon: no, elpa is great. but how the classpath is calculated depends on how you launch slime. |
| 18:17 | aedon | technomancy: so far I was doing m-x slime |
| 18:17 | aedon | but I tried slime-project? too |
| 18:17 | technomancy | aedon: 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:18 | hugod | I have to projects that I might get round to with swank - debugging with jdi, and restarts for error-kit |
| 18:18 | technomancy | hugod: are you hugoduncan on github? |
| 18:18 | hugod | I am |
| 18:18 | mattrepl | there's also swank-clojure-extra-classpaths |
| 18:18 | aedon | technomancy: does it matter where in your .emacs you set that? |
| 18:18 | technomancy | hugod: cool; added |
| 18:18 | hugod | technomancy: thanks |
| 18:19 | technomancy | mattrepl: they're actually aliases for each other |
| 18:19 | technomancy | -extra is the old name |
| 18:19 | technomancy | aedon: shouldn't matter |
| 18:19 | mattrepl | oh, didn't know that changed |
| 18:19 | technomancy | btw: if anyone else wants to help out with swank maintenance please let me know |
| 18:20 | technomancy | hugod: if you can keep work out of the master branch until it's well-tested that would be great. |
| 18:20 | technomancy | hugod: I like to run it by at least one other person before merging as a rule. |
| 18:20 | aedon | technomancy: thanks for the help |
| 18:20 | hugod | technomancy: sounds wise to me |
| 18:22 | technomancy | hell of a regex you got there |
| 18:22 | technomancy | (for detecting metadata-having ns forms) |
| 18:23 | hugod | if you have other suggestions.... |
| 18:23 | technomancy | not at all, just commenting on the verbosity of the elisp regex flavour |
| 18:23 | technomancy | plus it's a tricky thing to have to match. |
| 18:23 | hugod | it's not overly reliable in the face of {} in the doc string, or escaped quotes |
| 18:24 | technomancy | might end up being cleaner using something like forward-sexp |
| 18:24 | technomancy | but this is definitely an improvement |
| 18:24 | hugod | at least it picks up a few more cases |
| 18:24 | technomancy | yep, good stuff. |
| 18:26 | DeusExPikachu | technomancy, does Thread/getAllStackTraces print out blocking threads? It seems to be missing some threads I believe should exist |
| 18:27 | technomancy | hugod: feel free to merge the ns detection regex patch; consider it reviewed |
| 18:28 | technomancy | and thanks for putting that together |
| 18:31 | hugod | technomancy: will do in while - I have to go cook for the kids... |
| 18:32 | technomancy | have some good noms. |
| 18:32 | Apage43 | man |
| 18:32 | Apage43 | i've been secretly using clojure at work |
| 18:33 | technomancy | DeusExPikachu: hrm; I think it does, but I'm not sure. You could try just spinning up a few manually to check. |
| 18:33 | Apage43 | great way to learn =P |
| 18:33 | the-kenny | Does 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:34 | technomancy | the-kenny: uh... that already works. =) |
| 18:35 | the-kenny | technomancy: huh? Not with fuzzy I think. It just expands to (clojure/core |
| 18:35 | the-kenny | s/\/\./ |
| 18:35 | technomancy | works for me using tab in the repl and dabbrev in regular buffers |
| 18:35 | technomancy | oh... I don't remember if I have fuzzy enabled |
| 18:36 | the-kenny | Maybe it's a problem with fuzzy |
| 18:49 | DeusExPikachu | for 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:51 | DeusExPikachu | crap nm, I realized I'm running it remotely... hehe |
| 18:59 | tomoj | how would you deal with a java library which expects you to use synchronized statements? |
| 19:00 | hiredman | synchronizing is locking |
| 19:00 | hiredman | ,(doc locking) |
| 19:00 | clojurebot | "([x & body]); Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances." |
| 19:01 | tomoj | great |
| 19:01 | tomoj | I hadn't ever seen locking before |
| 19:01 | technomancy | hiredman: you coming to Zoka tonight? |
| 19:01 | tomoj | thanks |
| 19:02 | hiredman | technomancy: yessir |
| 19:02 | technomancy | cools |
| 19:03 | technomancy | I'm staking out the table as we speak. |
| 19:08 | hiredman | excellent, have to beat the rush... |
| 19:21 | kotrin | trying 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:40 | maxhodak | has anyone here used allegrograph? |
| 21:14 | technomancy | hugod: went ahead and applied your ns-with-metadata patch to swank; thanks. |
| 21:15 | technomancy | err--never mind |
| 21:15 | hugod | technomancy: I think I beat you to it |
| 21:16 | technomancy | yup; nice |
| 21:31 | hugod | technomancy: looks like you've been busy... |
| 22:57 | technomancy | hugod: mostly just cleanup |
| 22:57 | technomancy | old branches to prune |
| 22:58 | hugod | technomancy: anything pressing that needs doing? |
| 23:01 | technomancy | hugod: I really want to get the debug-repl working in swank |
| 23:03 | technomancy | but it's currently getting confused about inputstreams |
| 23:03 | hugod | technomancy: is it on a branch? |
| 23:04 | technomancy | no, I haven't done anything towards that yet. |
| 23:05 | hugod | by debug-repl you mean using the new env support? |
| 23:05 | technomancy | yeah |
| 23:05 | technomancy | http://georgejahad.com/clojure/debug-repl.html |
| 23:06 | hugod | I'll take a look... |
| 23:06 | technomancy | that would be great! |
| 23:06 | technomancy | right now it only works from the inferior-lisp buffer |
| 23:07 | hugod | I get very frustrated with the lack of inspection in the stack trace |
| 23:07 | technomancy | yeah, that's been another top complaint |
| 23:10 | technomancy | integrating the clj-stacktrace prettification library would be a big win too |
| 23:11 | hugod | and adding a 'go to the end of the exception cause chain' option |
| 23:14 | technomancy | that would be great |
| 23:31 | pdk | test |
| 23:37 | rickmode | I'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:39 | rickmode | actually I used (use 'foo) just not instead of (require 'foo)... I'm a little unclear about the distinction there as well |
| 23:43 | dnolen | rickmode: file name and directory path has to match. |
| 23:44 | rickmode | dnolen: is that true in general, or just with use with leiningen? |
| 23:44 | dnolen | rickmode: true in general |
| 23:44 | rickmode | ic |
| 23:45 | rickmode | dnolen: similar to java then. not a bad idea... keeps things easy to find |
| 23:45 | dnolen | I think it is actually imposed by Java (always forget). also note that dash becomes underscores. |
| 23:45 | rickmode | for some reason I though the namespace marker in a file trumped |
| 23:45 | dnolen | com.foo.bar.my-file -> com/foo/bar/my_file.clj |
| 23:45 | rickmode | that - to _ is odd, but easy to remember |
| 23:46 | dnolen | again Java thing, - not allowed in file names. |
| 23:46 | dnolen | if 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:47 | rickmode | dnoles I guess that's the price we pay vs. CL's package madness. |
| 23:47 | dnolen | of course there's _plenty_ of goodness from Java as well. |
| 23:47 | dnolen | rickmode: CL package madness always blew my mind. |
| 23:48 | dnolen | at one point I understood it and thought, super powerful but too many subtleties |
| 23:48 | rickmode | I *really* wanted to use CL and gave it an honest shot. |
| 23:48 | dnolen | I also chanced upon Clojure because of dabbling in CL. |
| 23:49 | rickmode | what 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:49 | rickmode | at least not as far as I could see |
| 23:50 | rickmode | anyway - 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:51 | dnolen | rickmode: 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:51 | dnolen | use is convenient but name clashes likely. require with an alias is common if you want to avoid typing |
| 23:51 | dnolen | (:require [some.cool.lib :as cool]) |
| 23:51 | rickmode | dnolen... aaaaah... is that it? sheesh.. I"m overthinking it |
| 23:52 | dnolen | also |
| 23:52 | dnolen | (:use [some.coo.lib :only [foo bar]]) handy |
| 23:54 | rickmode | ya... i think i see why i got confused... both allow aliases but "require" aliases packages while "use" aliases symbols |
| 23:54 | rickmode | ... it hink |
| 23:54 | rickmode | ... er ... i think |
| 23:54 | dnolen | personally I don't see the point of alias + use, but perhaps somebody knows better. |
| 23:54 | dnolen | for me its' either, use, use + only, require, require + as |
| 23:57 | joshua-choi | How many people here use REPLs to develop Clojure? |
| 23:57 | joshua-choi | Like, actually? I've always just run tests, and I've never figured out how to really productively integrate the REPL into my programming. |
| 23:57 | Raynes | I'd venture a guess that everybody does. If you use Clojure without an REPL, I'm not sure how you get anything done. |
| 23:58 | joshua-choi | Yeah, sometimes I wonder that myself. :P |
| 23:58 | Raynes | I don't think I'm capable of coding in a language without one anymore. :o |
| 23:58 | joshua-choi | Whatever 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:59 | joshua-choi | I just don't "get" the REPL right now. Maybe it's because I'm not using an IDE. |
| 23:59 | Raynes | Neither am I. |
| 23:59 | dnolen | joshua-choi: i only use REPL, but Emacs makes it easier. Enclojure's REPL support seemed passable. |
| 23:59 | Raynes | I use Emacs. |