Re: Odd behavior calling a fn test or try

2011-01-11 Thread Daniel Werner
On Jan 11, 2:28 am, Tom Hall thattommyh...@gmail.com wrote: I know I should not be naming my functions the same thing as ones in core You can and should, as long as it makes your life easier and doesn't get too confusing for readers. Just make sure you're able to access the original core

Re: ANN: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-11 Thread Daniel Werner
Hi Ram, your take on Clojure to JS translation seems very interesting to say the least. Thanks for sharing your work. A few points I tripped over while reading the example: * Why are functions being defined as join = function (...) instead of function join (...)? Does this make a semantic

Re: Question about sorted-sets

2011-01-11 Thread Travis Treseder
My guess is that it's your likelihood function that's actually broken. If sr1 and sr2 don't come out with the same likelihood, then in some cases of putting them into the sorted set they'll never end up compared with each other for equality. (Actually, I'd have thought in all cases. Perhaps

Re: which IDEs are you all using?

2011-01-11 Thread Jay Fields
I use IntelliJ + LaClojure at work. We do a lot of java + clojure integration and IntelliJ seems to be the best solution for that. (tho, I've never bothered to look at eclipse) I use emacs at home where most of my work is clojure exclusively. You could argue: the right tool for the job. But,

Re: Multidimensional Float arrays

2011-01-11 Thread WoodHacker
When all else fails, read the directions. Thanks for the help. On Jan 10, 4:44 pm, Ken Wesson kwess...@gmail.com wrote: On Mon, Jan 10, 2011 at 4:40 PM, WoodHacker ramsa...@comcast.net wrote: The question was how to place data in the array, not create it.   I've been doing that.   How do

Re: Question about sorted-sets

2011-01-11 Thread Stuart Halloway
All, I'm hoping another, wiser set of eyes can help me to see what I'm doing wrong. I've defined a deftype below that stores a likelihood and a tree structure (nested vectors). The deftype overrides equals, etc, and implements Comparable so I can add SearchResults to a sorted-set and

Re: ANN: clojurejs -- a Clojure (subset) to Javascript translator

2011-01-11 Thread Ram Krishnan
On Jan 11, 3:55 am, Daniel Werner daniel.d.wer...@googlemail.com wrote: Hi Ram, your take on Clojure to JS translation seems very interesting to say the least. Thanks for sharing your work. You're very welcome, and thanks for the quick feedback. A few points I tripped over while reading the

Re: how do I improve indentation of reify methods in clojure-mode

2011-01-11 Thread Eric Schulte
As an example of a user-accessible function for customizing indentation, the following can be used with the latest clojure-mode either interactively or from a user's config. (defun clojure-new-indent (optional func level) Set the indentation level of FUNC to LEVEL. (interactive)

Re: how do I improve indentation of reify methods in clojure-mode

2011-01-11 Thread B Smith-Mannschott
On Tue, Jan 11, 2011 at 08:12, Eric Schulte schulte.e...@gmail.com wrote: As an example of a user-accessible function for customizing indentation, the following can be used with the latest clojure-mode either interactively or from a user's config.  (defun clojure-new-indent (optional func

Re: Question about sorted-sets

2011-01-11 Thread Travis Treseder
Stuart, In order for this to work, the quasi-isomorphic? function has be reflexive. Is it? (The .equals implementation is also missing a type test, but that probably isn't the problem here.) Yes, it is reflexive, and symmetric: user (quasi-isomorphic? t2 t1) true user (quasi-isomorphic?

Re: which IDEs are you all using?

2011-01-11 Thread Mark Engelberg
The counterclockwise site indicates that it doesn't format your code. Is that still the case? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated -

How do I find implemented protocols in Clojure object?

2011-01-11 Thread Maurits
Is there a documented way to find which protocols are implemented by a Clojure object? The other way around (show for which classes a given protocol is extended) is easy: (extenders protocol). Maurits -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: Question about sorted-sets

2011-01-11 Thread Travis Treseder
You should also try using a TreeSet and see if you get the same results as with sorted-set. I get the same results with TreeSet. After looking at the javadocs more carefully, I realized the Comparator isn't implemented properly, namely, it's not doing this: The implementor must ensure

Re: which IDEs are you all using?

2011-01-11 Thread Laurent PETIT
2011/1/11 Mark Engelberg mark.engelb...@gmail.com The counterclockwise site indicates that it doesn't format your code. Is that still the case? no and yes. It does auto-indent your code when you hit enter, as well as reindent the current line when you explicitly ask to (hitting the Tab key,

Re: which IDEs are you all using?

2011-01-11 Thread Laurent PETIT
I should also add that emacs users would probably be disappointed with the current state of affairs of (auto)(re)indentation in ccw, which is very minimalistic (but very predictable ;) : literal lists are indented 2 chars, other literal datastructures are indented 1 char. Of course, if you indent

running just one test

2011-01-11 Thread .Bill Smith
I have a namespace that uses clojure.test to define multiple tests. The namespace also has a test fixture. Let's say I just ran all the tests and one of them failed. The entire suite takes a while to run, so while I debug the problem, I want to run just that one test. What's the idiomatic

Re: running just one test

2011-01-11 Thread Stuart Sierra
Unfortunately, clojure.test can't support that. Best you can do is comment out the other tests while you work. -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new

Re: Compiling dynamically created namespaces, without on-disk source code?

2011-01-11 Thread Stuart Sierra
You would have to capture the source form of each definition before it's compiled. Not too hard if you hack the REPL a bit; someone has probably already worked on it. -S -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: java 7

2011-01-11 Thread Stuart Sierra
So far, Clojure has targeted JVMs that are widely used in enterprise Java environments. That's why it still targets JDK 1.5 instead of 1.6. So if/when Java 7 arrives, Clojure probably wouldn't switch until it is widely deployed. -S -- You received this message because you are subscribed to

Re: distributeted computing newby, clojure ...

2011-01-11 Thread Nick Zbinden
I have a simple library that mimics newLISP's net-eval command, which will allow you to evaluate expressions in parallel on remote network nodes, http://nakkaya.com/net-eval.html Regards... Very Nice. I looked at it and its what I need. I tested it sucessfully and I am using it with in my

Re: which IDEs are you all using?

2011-01-11 Thread Sean Corfield
On Sun, Jan 9, 2011 at 11:01 AM, Alex Baranosky alexander.barano...@gmail.com wrote: I've been considering switching to Emacs because it seems to be the de facto standard for the community. I'd disagree with that. Yes, there are a lot of Emacs users in the Clojure community but I think that's

Re: which IDEs are you all using?

2011-01-11 Thread Ken Wesson
On Tue, Jan 11, 2011 at 6:50 PM, Sean Corfield seancorfi...@gmail.com wrote: On Sun, Jan 9, 2011 at 11:01 AM, Alex Baranosky alexander.barano...@gmail.com wrote: I've been considering switching to Emacs because it seems to be the de facto standard for the community. I'd disagree with that.

Re: Entity component system

2011-01-11 Thread Daniel Kersten
Thanks for sharing! Entity component systems are something I'm very interested in and something I have tinkered with in the past. I hope to (eventually) find some time to play around with them in Clojure too. I would be very interested in hearing more about your solution and would be delighted if

Re: which IDEs are you all using?

2011-01-11 Thread Sean Corfield
On Tue, Jan 11, 2011 at 4:11 PM, Ken Wesson kwess...@gmail.com wrote: anything else. If you're working extensively with Java (as well), you'll want to either stick to IntelliJ or look at Eclipse + CCW. Or Netbeans+Enclojure. Ah, yes, another option for Java folk. Sorry, I tend to forget that

Re: Clojure Quizzes?

2011-01-11 Thread Sean Corfield
Ah, that does look like more fun - thanx for the link, hadn't heard of it before! On Wed, Jan 5, 2011 at 10:11 PM, benjamin.s.r benjamin.s.rho...@gmail.com wrote: http://coderloop.com/ like Project Euler but more modern -- You received this message because you are subscribed to the Google

Re: Clojure Quizzes?

2011-01-11 Thread Robert McIntyre
Coderloop is a lot of fun. I'm wondering how people are submitting their code? You can use the latest version of clojure if you include it as a dependency in your submission, so even though they say they only support clojure1.0 they really support all of them. I wrote a short clojure program

Re: which IDEs are you all using?

2011-01-11 Thread Mark Engelberg
A related question: What IDE are people on Windows using? I've struggled for a long time to find an acceptable environment on Windows and would love to have more detailed pointers. My experience: Clojure Box - Easiest way to get started. Runs without much hassle. Dependency management is

Re: Clojure Quizzes?

2011-01-11 Thread Robert McIntyre
hurrr. teh codes are at https://gist.github.com/775623 sorry for leaving that out. I'm rather new at this; all criticisms are welcome. ---Robert McIntyre On Tue, Jan 11, 2011 at 10:07 PM, Robert McIntyre r...@mit.edu wrote: Coderloop is a lot of fun.  I'm wondering how people are submitting

Re: which IDEs are you all using?

2011-01-11 Thread Wilson MacGyver
easiest way to do this is, Go to Run- Edit Configuration. under clojure script, you'll see options for VM parameters, and a checkbox on run script in REPL. the plugin is actively being developed. in fact, it has been rewritten in clojure. Most recent release was on Dec 29th

Re: which IDEs are you all using?

2011-01-11 Thread ka
Here's one way to use eclipse + ccw + lein 1. Download latest eclipse helios. Go to market place and search for counter clockwise plugin. Install the latest stable. 2. Create a new Clojure project. Delete the 4 jars it provides :) (yes that's right delete them). 3. Install lein

Re: running just one test

2011-01-11 Thread ka
@Bill, If you have a REPL open you can just run the test as a zero arg function. (ns 'abc) (detest xyz ...) user= (abc/xyz) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that

Re: which IDEs are you all using?

2011-01-11 Thread Meikel Brandmeyer
Hi, of course this doesn't help you directly, because you don't like vi, but it may be of interest for other vi users. On 12 Jan., 04:40, Mark Engelberg mark.engelb...@gmail.com wrote: Looking back over the above comments, it looks like my major checklist points for an IDE are: 1.  

Re: Question about sorted-sets

2011-01-11 Thread ka
Yes that compareTo doesn't define a total order on your class. I think you are missing a clause in cond: (cond (= sr sr2) 0 (= (.lik sr) (.lik s2)) return something based on quasi-isomorphic ( (.lik sr) (.lik sr2)) -1 :default 1) I think you should implement quasi-isomorphic as a