Re: generating a static method

2009-03-10 Thread Christophe Grand
.Bill Smith a écrit : > The genclass documentation says, "Static methods can be specified with > #^{:static true} in the signature's metadata." I thought that would > mean this: > > (ns tango.test.unit.StaticTest > (:gen-class > :methods [[f [] #^{:static true} void ]])) > > Try: (n

Re: generating a static method

2009-03-10 Thread Adrian Cuthbertson
Hi Christophe, It works as per your example, but not with arguments to the method... ns gncls.MyStatic (:gen-class :methods [#^{:static true} [f [String] void ]])) (defn -f [s] ; also [this s] doesn't work (prn "Hi from " s )) (gncls.MyStatic/f "me") java.lang.Exception: No such var

Re: version of -> short-circuiting on nil

2009-03-10 Thread Laurent PETIT
Hello, 2009/3/10 Jason Wolfe > > > (let [person (get-the-person)] > > (when-not (nil? person) > > (let [address (.getAddress person)] > > (when-not (nil? address) > > (let [street (.getStreet address)] > > (when-not (nil? street) > >(do-something-

Re: Question about instance?

2009-03-10 Thread Christian Vest Hansen
On Mon, Mar 9, 2009 at 11:10 PM, Laurent PETIT wrote: > Hello, > > I have the use case for calling instance? where, once instance? returns > true, I want to do something with the successful instance, such as binding > it, or directly calling something on it. > > For instance, I have in my code :

Re: generating a static method

2009-03-10 Thread Christophe Grand
Adrian Cuthbertson a écrit : > Hi Christophe, > > It works as per your example, but not with arguments to the method... > > ns gncls.MyStatic > (:gen-class > :methods [#^{:static true} [f [String] void ]])) > > (defn -f > [s] ; also [this s] doesn't work > (prn "Hi from " s )) > > (gncl

Re: Is proxy the right tool for this job ? Cyclic vector ? Proxy bug ?

2009-03-10 Thread Timothy Pratley
> I really don't know why you are trying to dissuade Paul in all this. I was (stupidly) wrong. Sorry Paul for the misinformation. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this gr

Re: Question about instance?

2009-03-10 Thread Timothy Pratley
How about a cast variant that doesn't throw an exception but returns nil? user=> (cast java.lang.Boolean false) false user=> (cast java.lang.Integer false) java.lang.ClassCastException (NO_SOURCE_FILE:0) user=> (defn instance [c i] (try (cast c i) (catch Exception e))) #'user/instance user=> (ins

Re: What is Clojure NOT good for?

2009-03-10 Thread Christian Vest Hansen
On Tue, Mar 10, 2009 at 12:17 AM, bOR_ wrote: > > I'm not from the software engineers field, but how difficult is it for > some non-lisp, but java-savvy software writer to pick up a 600-line > clojure program and learn to understand it? I think the majority of Java programmers will be able to pu

How to find lazy discards

2009-03-10 Thread Timothy Pratley
How to implement a check for: (my-fun [] (map x y) 5) Visually you can see that map is probably the wrong thing in this case (I can't think of a valid scenario where it would be right)... just by virtue that the lazy is not returned or passed to a function. Regards, Tim. --~--~-~

Re: Question about instance?

2009-03-10 Thread Christian Vest Hansen
On Tue, Mar 10, 2009 at 9:40 AM, Timothy Pratley wrote: > > How about a cast variant that doesn't throw an exception but returns > nil? > > user=> (cast java.lang.Boolean false) > false > user=> (cast java.lang.Integer false) > java.lang.ClassCastException (NO_SOURCE_FILE:0) > user=> (defn instan

Re: What is Clojure NOT good for?

2009-03-10 Thread bOR_
> Also, how do you think this increase in required effort grows? What if > we are talking about a +10.000-line Clojure program? Now add schedule > pressure, deadlines and the cost of missed oppotunities and you will > find that many companies sees the introduction of a new programming > language -

Re: Question about instance?

2009-03-10 Thread Tassilo Horn
Laurent PETIT writes: Hi Laurent, > For this to work, instance? would have to return logical true instead > of real true. I'm new to clojure, so please forgive any stupid questions. But you mean that (instance? java.lang.Integer 17) should return 17 instead of true, right? Seems plausible, b

New in the group and question about Java interaction

2009-03-10 Thread Javier
Hello, I'd like to thank you for providing us Clojure. This is fantastic. My background in Lisp if for several years now, just for fun, and using Common Lisp, mainly. I have some programs in Java, and would like to use Clojure to test/develop them. My question is: Is it easy to test/load Java co

Two quick questions on functions...

2009-03-10 Thread Rich
I'm relatively new to Clojure, and I just want to make sure I understand things correctly. There are two issues that I'm struggling with. Neither is major, but if there is a good solution, I'd like to find out. 1) You must define a method before you call it from another function. Stylistically, I

Re: Two quick questions on functions...

2009-03-10 Thread Paul Drummond
Hi Rich, for your first issue "declare" does exactly what you want. => (doc declare) - clojure.core/declare ([& names]) Macro defs the supplied var names with no bindings, useful for making forward declarations. nil Cheers, Paul. 2009/3/10 Rich : > > I'm relatively n

Re: Question about instance?

2009-03-10 Thread Laurent PETIT
Thank you both, those are indeed good points. I'm not sure if I prefer coerce over cast, because (but I may be wrong), coerce implies to me some conversion. And, indeed, cast already exists in clojure, which I hadn't seen. Is there a strong requirement for cast throwing an exception rather than j

Re: Two quick questions on functions...

2009-03-10 Thread David Sletten
On Mar 9, 2009, at 11:11 PM, Rich wrote: > 1) You must define a method before you call it from another function. > Stylistically, I prefer to define helper functions after the main > function, but that seems to cause errors. If I move them in front of > the main function, the errors go away. I do

Re: Question about instance?

2009-03-10 Thread Laurent PETIT
Hello, yes, you are right, for the change to be correct, instance? should not return false, but nil if it is not an instance. (nil is a logical false too). But maybe, as was suggested by others, just having a variant of cast returning nil instead of throwing an exception (or making returning nil

contrib api documentation?

2009-03-10 Thread rb
Hi, is there a place where I can find the documentation of clojure.contrib in the same vein as clojure.core is documented at http://clojure.org/API ? Thanks Raphaël --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "

Re: letfn - mutually recursive local functions

2009-03-10 Thread David Sletten
On Feb 28, 2009, at 2:38 PM, Rich Hickey wrote: > > I've added letfn, which lets you define mutually recursive local > functions a la CL's labels. > > (defn ring [n] > (letfn [(a [n] (if (zero? n) n (b (dec n > (b [n] (if (zero? n) n (c (dec n > (c [n] (if (zero? n)

Re: New in the group and question about Java interaction

2009-03-10 Thread Chas Emerick
In general, no -- in a typical project setup, any changes to Java code precipitate a rebuild and a restart of your application. There are plenty of ways to avoid this, but currently, they're only used in the major IDEs when debugging (e.g. while debugging an application, you can usually mak

Re: contrib api documentation?

2009-03-10 Thread Chas Emerick
This is a pretty nice reference: http://clj-doc.s3.amazonaws.com/tmp/doc-1116/index.html A little old now, though. The tool that generated it is open-source (on github, I think), so refreshing it for yourself shouldn't be too difficult. - Chas On Mar 10, 2009, at 6:16 AM, rb wrote: > > H

Re: Two quick questions on functions...

2009-03-10 Thread Jeff Rose
Rich wrote: > I'm relatively new to Clojure, and I just want to make sure I > understand things correctly. There are two issues that I'm struggling > with. Neither is major, but if there is a good solution, I'd like to > find out. > > 1) You must define a method before you call it from another fun

swank-clojure-extra-classpaths troubles

2009-03-10 Thread Tassilo Horn
Hi all, to get started with Clojure I've bought the PDF version of "Programming Clojure". But I don't get how I have to setup swank-clojure in order to make the examples work. I tried both --8<---cut here---start->8--- (swank-clojure-config (add-to-list 'sw

Re: How can I make the smallest structure possible?

2009-03-10 Thread mac
Arrays also have some overhead though so if your "objects" are all of equal size you could use just one array (of ints?) for all of them and create functions for indexing correctly in your array. A bit brittle but very space efficient. Of course this throws all of the benefits of Clojure or even J

Re: (ancestors ClassName) does not include tag ancestors of ClassName's superclasses

2009-03-10 Thread Chas Emerick
FWIW, a version of ancestors that exhibits proper (IMO) behaviour: (defn ancestors ([tag] (ancestors global-hierarchy tag)) ([h tag] (not-empty (let [ta (get (:ancestors h) tag)] (if (class? tag) (let [superclasses (set (supers tag))]

Re: New in the group and question about Java interaction

2009-03-10 Thread Javier
Thank you for your response. I'm actually using BeanShell for doing most of this stuff, as it provides reloadClasses(), wich allows a very fast reloading of every change (anyway, changes in code which is actually in use are not propagated, but this is an expected issue). I'll have a glance to the

Re: Static type guy trying to convert

2009-03-10 Thread GS
Timothy Pratley wrote: > Jump on in! Just like with swimming the cold soon goes away. [...] Bad analogy. In swimming, the cold returns about half an hour later :) Gavin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou

Re: generating a static method

2009-03-10 Thread .Bill Smith
That worked. Thank you for your help, Christophe. Bill Smith, Austin, TX --~--~-~--~~~---~--~~ 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 To unsubscribe

Re: Static type guy trying to convert

2009-03-10 Thread Vincent Foley
Here's my feeling on it (note that I am talking about languages from the C family, not Haskell or ML). 1. Like Jason Wolfe said, the interactive REPL means that you can manually test a function as soon as you're done writing it, so it's easy to get feedback and know if something breaks. 2. The w

Re: contrib api documentation?

2009-03-10 Thread rb
On Mar 10, 11:47 am, Chas Emerick wrote: > This is a pretty nice reference: > > http://clj-doc.s3.amazonaws.com/tmp/doc-1116/index.html Nice, especially after you update the css to have #doc-items position set to fixed :-) > > A little old now, though.  The tool that generated it is open-sour

Re: New in the group and question about Java interaction

2009-03-10 Thread Adrian Cuthbertson
> One more question: is there a way to call a function similar to > reloadClasses in Clojure? If so, it would be my solution. Yep, I work with a multi-tab console with a rlwrap repl window and another window for builds (ant) and other general stuff, then I use the clojure load function to reload

transposing a small java class in clojure

2009-03-10 Thread rb
Hi, I'm experimenting with http://mina.apache.org/ftpserver I have written a small java class that gets used by the ftp server, and am trying to transpose it to clojure, but unsuccessfully until now The class generated with clojure is detected and used by the server, but the code of the meth

Re: generating a static method

2009-03-10 Thread Mark Volkmann
On Mon, Mar 9, 2009 at 9:52 PM, .Bill Smith wrote: > > Would someone mind showing me a brief example of how to define a > static method (using gen-class)? Look for "static" under http://www.ociweb.com/mark/clojure/article.html#Compiling. -- R. Mark Volkmann Object Computing, Inc. --~--~--

List comprehension examples for Wikibook

2009-03-10 Thread David Sletten
I translated some examples from the book "The Haskell Road" (http:// homepages.cwi.nl/~jve/HR/): (defn naturals [] (iterate inc 0)) (def evens1 (for [n (naturals) :when (even? n)] n)) (def odds1 (for [n (naturals) :when (odd? n)] n)) (def evens2 (for [n (naturals)] (* 2 n))) (def small-squares1 (

Re: Static type guy trying to convert

2009-03-10 Thread mikel
On Mar 10, 8:26 am, Vincent Foley wrote: [...snip...] > I'd like to > mention that I'm also a fan of static typing and that to this day, I > still don't know whether I prefer the freedom and flexibility of > dynamic typing or the constraint and safety of static typing. That dichotomy seems t

Re: contrib api documentation?

2009-03-10 Thread Mark McGranaghan
The GitHub project is here: http://github.com/mmcgrana/clj-doc/tree/master You can find recently generated docs for clojure and clojure contrib in the examples directory of that project, or you can use the provided script to generate your own. You mentioned adding a position fixed property; did

Re: categorizing forms

2009-03-10 Thread Timothy Pratley
> What form would you suggest? XML, something else ... Just a regular Clojure map is what I was thinking: http://groups.google.com/group/clojure/web/categories.clj Obviously having the categories as metadata would be neat, but the advantage of having a separate regular map is that no change to c

Re: categorizing forms

2009-03-10 Thread Mark Volkmann
On Tue, Mar 10, 2009 at 9:40 AM, Timothy Pratley wrote: > >> What form would you suggest? XML, something else ... > > Just a regular Clojure map is what I was thinking: > http://groups.google.com/group/clojure/web/categories.clj Looks great! > Obviously having the categories as metadata would b

Re: Static type guy trying to convert

2009-03-10 Thread CuppoJava
I just jumped on Clojure five months ago, and I was a little lost without types at first also. Then I've come to realize that types is not as essential to bug-less software as I previously thought it was. For the following reasons: 1) There's less "types" to begin with. I was a Java programmer, a

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread Tom Ayerst
Liking it so far. Can you get jline style functionality into the REPL, I really miss it. Cheers Tom 2009/2/27 AndrewC. > > > > On Feb 26, 7:08 pm, CuppoJava wrote: > > Hello Ilya, > > Thanks for the workaround. > > > > I'm glad to hear you're working on a "surround with" feature. Some > > ot

Re: Static type guy trying to convert

2009-03-10 Thread zoltar
Thanks everyone! That gives me a lot more confidence in trying Clojure. There is a certain freedom in not worrying about types. I spend a lot of time in Java trying to get types and type hierarchies right (especially generics). I haven't been doing a lot of unit testing but I can see how that woul

Re: Static type guy trying to convert

2009-03-10 Thread Vincent Foley
With Clojure you don't need to understand Monads. And I don't think they're hard to understand, I think they're hard to come to grips with because of what they are capable of. Anyway, I hope you enjoy Clojure :) On Mar 10, 11:30 am, zoltar wrote: > Thanks everyone! That gives me a lot more con

Re: Static type guy trying to convert

2009-03-10 Thread zoltar
On Mar 10, 10:03 am, Vincent Foley wrote: > With Clojure you don't need to understand Monads.  And I don't think > they're hard to understand, I think they're hard to come to grips with > because of what they are capable of. > > Anyway, I hope you enjoy Clojure :) Yes, I know, but I'd like to

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread Howard Lewis Ship
Is there any kind of debugger support (now, or coming?). On Tue, Mar 10, 2009 at 8:10 AM, Tom Ayerst wrote: > Liking it so far.  Can you get jline style functionality into the REPL, I > really miss it. > > Cheers > > Tom > > 2009/2/27 AndrewC. >> >> >> >> On Feb 26, 7:08 pm, CuppoJava wrote: >

Re: transposing a small java class in clojure

2009-03-10 Thread chris
I can see one possible difference, depending on how you are loading the code into the ftp server. In your clojure example you are accessing the logger through a top- level define. I believe this will run *during the file loading process* as static code. In your working java example, you aren't

Re: Static type guy trying to convert

2009-03-10 Thread chris
http://www.mindview.net/WebLog/log-0025 I am not actually as in favor of untyped programming as this article is, but I can see the points and I agree with most of them. Chris On Mar 10, 10:34 am, zoltar wrote: > On Mar 10, 10:03 am, Vincent Foley wrote: > > > With Clojure you don't need to un

Macros problem

2009-03-10 Thread Howard Lewis Ship
I'm trying to build something using macros ... my long goal is a simple embedded DSL. Here's a simplified version: (defmacro to-fn "Converts a collection of forms into an anonymous function of no arguments." [forms] `(fn [] ~...@forms)) (defn run-example [fn] (printf "BEFORE\n") (f

Re: transposing a small java class in clojure

2009-03-10 Thread rb
HI Chris, thanks for your response, and I'll update the code as you suggest. However, I actually have problems even when the -onLogin function is empty, returns nil, or returns FtpletResult/DEFAULT. It seems it causes trouble once it's defined. I'll post an update tomorrow Raphaël On Mar 10, 6

Re: transposing a small java class in clojure

2009-03-10 Thread Kevin Downey
I don't know how many arguments the method you are overriding with onLogin takes, but the function you define should take one more argument then the method you are overiding, the first argument being an explicit reference to an instance On Tue, Mar 10, 2009 at 12:16 PM, rb wrote: > > HI Chris, >

Re: Macros problem

2009-03-10 Thread Chouser
On Tue, Mar 10, 2009 at 2:45 PM, Howard Lewis Ship wrote: > > (defmacro example >  [& code] >  `(let [rcode# ~(reverse code) >        fn# (to-fn rcode#)] >    (run-example fn#))) Thanks for the complete example, it really helps. Macroexpand might help you see at least one of the problems: (clo

Re: The Application Context Pattern

2009-03-10 Thread Krešimir Šojat
> Does anyone have similar example using one of the cells > implementations? > What would be pros/cons between this and cells approach? Sorry for a late reply but some of the code didn't exist when you asked your question. This example can be done using neman cells and swing wrapper like this: h

Re: Static type guy trying to convert

2009-03-10 Thread falcon
I am in the same boat. However, even more than type safety, I miss my IDE giving me the most appropriate options. I often have objects with many call-backs, it's nice to be able to ctrl+space (in eclipse) and quickly get a list available methods, pressing enter gives you some skeleton code. Clo

Re: Macros problem

2009-03-10 Thread Meikel Brandmeyer
Hi, Am 10.03.2009 um 19:45 schrieb Howard Lewis Ship: (defmacro example [& code] `(let [rcode# ~(reverse code) fn# (to-fn rcode#)] (run-example fn#))) Your problem is, to-fn is a macro. So when you expand the macro, the expansion calls to-fn with the symbol generated by rcode#. Th

Re: Macros problem

2009-03-10 Thread Howard Lewis Ship
Thanks! That got me back on track. I'm off and running on my DSL: (defmacro sketch [title & code] (let [code-map (assemble-map #{:setup :draw} :draw code) setup-slice (:setup code-map) draw-slice (:draw code-map)] `(let [setup-fn# (to-fn ~setup-slice) draw-fn# (to-

Re: Static type guy trying to convert

2009-03-10 Thread Raoul Duke
> IDE giving me the most appropriate options. i'm under the updated impression that some Smalltalk IDEs can and do look at the current AST of the system to give you proper completion, rather than giving up because there aren't explicit types. so maybe some such could be done some day for Clojure

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread Ilya Sergey
Hi, Tom. >Can you get jline style functionality into the REPL Sure, we're working on it now. With best regards, Ilya On Mar 10, 4:10 pm, Tom Ayerst wrote: > Liking it so far.  Can you get jline style functionality into the REPL, I > really miss it. > > Cheers > > Tom > > 2009/2/27 AndrewC. >

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread Ilya Sergey
Hi, Howard Yes, we support debugging for Clojure scripts (even from libary). To launch debugger, create run configuration (for this you may just press Ctrl-Shift-F10 on appropriate script to be run) and launch it in debug mode (Shift-f9 in Linux/Windows keymap). You may set breakpoints and naviga

Debugging support for clojure?

2009-03-10 Thread Tassilo Horn
Hi all, is there any debugging support for clojure which lets one step though a function? If not, is there better way than inserting gazillions of printlns to check why and where a function doesn't do the right thing? Bye, Tassilo --~--~-~--~~~---~--~~ You recei

Re: Static type guy trying to convert

2009-03-10 Thread Mark Engelberg
I think the key to feeling confident in dynamically typed code is to go ahead and write out the "contract" for the function in your comments. You should always state what the "domain" and the "range" of the function are, so that you and other people can use the function appropriately. A static t

Re: Debugging support for clojure?

2009-03-10 Thread Phil Hagelberg
Tassilo Horn writes: > If not, is there better way than inserting gazillions of printlns to > check why and where a function doesn't do the right thing? Most definitely! Break your functions up into smaller pieces, then write tests for them using test-is. If your functions are hard to test, it'

Re: Debugging support for clojure?

2009-03-10 Thread CuppoJava
The IntelliJ plugin supports debugging. And using JSwat is also possible, but a little less streamlined. -Patrick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email t

macros

2009-03-10 Thread .Bill Smith
Does the Clojure book contain much conceptual material on macros? I keep finding places where I think a macro might be useful, and then the macro doesn't work and it's hard to understand why. Bill Smith Austin, TX --~--~-~--~~~---~--~~ You received this message be

Re: macros

2009-03-10 Thread David Nolen
It does. Also Practical Common Lisp and On Lisp cover this in depth as well, though you'll need to convert commas into tildes as well as use ~' for each level of backquote depth that you don't want Clojure to namespace free symbols. On Tue, Mar 10, 2009 at 6:05 PM, .Bill Smith wrote: > > Does the

Re: macros

2009-03-10 Thread David Nolen
Practical Common Lisp and On Lisp are available online and free. On Tue, Mar 10, 2009 at 6:16 PM, David Nolen wrote: > It does. Also Practical Common Lisp and On Lisp cover this in depth as > well, though you'll need to convert commas into tildes as well as use ~' for > each level of backquote d

Re: filter1 interesting?

2009-03-10 Thread gray...@gmail.com
Doesn't (some pred coll) do the same thing as (first (filter pred coll))? On Mar 9, 11:34 am, Stuart Sierra wrote: > I do use this pattern, but if I were naming it I think I'd call it > "find-first".  But that's scarcely shorter than "(first (filter ...)", > which is why I've never actually defi

z/OS and codepage issues?

2009-03-10 Thread David Andrews
I'm having difficulty running Clojure under z/OS. If I download a current Clojure onto my Gentoo Linux system and build it so: svn checkout http://clojure.googlecode.com/svn/trunk/ clojure-read- only cd clojure-read-only ant Then I can treat myself to a delicious REPL: ~/clojure-read-

Importing classes with an anonymous package

2009-03-10 Thread Duncan Mak
Hello all, I needed to import a class (that I didn't write) today into Clojure. The problem is that the class has no explicit package declaration. The solution that I found out (thanks to Chouser on #clojure) is this: (.importClass *ns* 'Foo (clojure.lang.RT/classForName "Foo")) This tip might

z/OS and codepage issues?

2009-03-10 Thread David Andrews
I'm having difficulty running Clojure under z/OS. If I download a current Clojure onto my Gentoo Linux system and build it so: svn checkout http://clojure.googlecode.com/svn/trunk/ clojure-read- only cd clojure-read-only ant Then I can treat myself to a delicious REPL: ~/clojure-read-

Re: Debugging support for clojure?

2009-03-10 Thread Joshua
The eclipse plugin also provides some debugging support. Joshua On Mar 10, 5:33 pm, Tassilo Horn wrote: > Hi all, > > is there any debugging support for clojure which lets one step though a > function?  If not, is there better way than inserting gazillions of > printlns to check why and where a

VimClojure 2.0.0 released (merged with Gorilla)

2009-03-10 Thread Meikel Brandmeyer
Dear vimming Clojurians, I'm proud to announce VimClojure 2.0! I want to thank durka42 on #clojure for being a patient guinea pig - eh - beta tester, finding the bugs within minutes. :) Updates and Fixes: * Updated higlighting to SVN 1327 * Fixed completion bug on Windows (thanks to jb) Gori

Re: Debugging support for clojure?

2009-03-10 Thread Howard Lewis Ship
On Tue, Mar 10, 2009 at 2:44 PM, CuppoJava wrote: > > The IntelliJ plugin supports debugging. > I must have missed this; the UI didn't seem to allow for setting of breakpoints. > And using JSwat is also possible, but a little less streamlined. >  -Patrick > > > -- Howard M. Lewis Ship Cre

Re: Debugging support for clojure?

2009-03-10 Thread CuppoJava
Have you updated to the latest version? If it's setup properly, you should be able to set breakpoints by clicking on the grey column on the left side of your code. Also, not every line can be breakpointed. Try breakpointing some different lines if you're having problems there. -Patrick --~--~--

Re: filter1 interesting?

2009-03-10 Thread CuppoJava
That's what I was going to say. (some pred col) is what I use so far. --~--~-~--~~~---~--~~ 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 To unsubscribe from

Re: VimClojure 2.0.0 released (merged with Gorilla)

2009-03-10 Thread Jeff Rose
Awesome! This is really sweet. I've got it up and running, and this is really getting good now. I've got a couple quick questions: * Is there a smart way to install it? I've been copying each .vim file into its place inside my $HOME/.vim directory, but this gets repetitive and annoying fas

Re: Static type guy trying to convert

2009-03-10 Thread e
this is an interesting question to me. Seems like there are at least two parts: a) do you like compilation and static code analysis, b) do you like a strong type system? Some has already been said about (a) and more about (b). For me, it's still bizarre in python that I can be running a program

Re: filter1 interesting?

2009-03-10 Thread Rob
On Mar 10, 2:45 pm, "gray...@gmail.com" wrote: > Doesn't (some pred coll) do the same thing as (first (filter pred > coll))? Not quite, because ... (some even? [1 2 3]) --> true (first (filter even? [1 2 3])) --> 2 `some' only works like that when the "predicate" returns it's argument instead

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread AlamedaMike
Hi Ilya, I would like to use the IntelliJ IDEA to create a GUI in the forms designer and then code the rest of the app in Clojure. I would like both Java and Clojure code to be registered in a single project and compiled together. If you can do that, you've got yourself another sale. Can you tell

Clojure in Atlanta, Meetup event on

2009-03-10 Thread BerlinBrown
http://leafhopper.github.com/clojure.html 1. Step through the Programming Clojure book. 2. Reinforce above by creating a draft of an online course mimicking the style of Ruby Learning. * read material * review a list of important points * do (create) a few exer

Re: What is Clojure NOT good for?

2009-03-10 Thread e
- You aren't going to find a job in your favorite city using your favorite > language in your favorite domain. Decide what you value the most and go from > there. nice post! but only the cities and domains are fairly well enumerated. I guess 2 out of 3 ain't bad. --~--~-~--~~--

Re: filter1 interesting?

2009-03-10 Thread e
seems like a good reason all predicates should be required to return their argument, contractually. So this is a good lesson for me. Even if I'm wrong about all predicates, how would one do such a thing in a functional language? That is, I'm not even sure what "all predicates" means. In OO, it

Re: filter1 interesting?

2009-03-10 Thread Chouser
On Tue, Mar 10, 2009 at 9:03 PM, e wrote: > seems like a good reason all predicates should be required to return their > argument, contractually. You'd have some trouble with 'nil?' and 'false?' at the very least. --Chouser --~--~-~--~~~---~--~~ You received thi

Re: Static type guy trying to convert

2009-03-10 Thread Jon Harrop
On Tuesday 10 March 2009 21:33:38 Mark Engelberg wrote: > A static type system also documents these properties, but you're > restricted to certain concepts that the computer can understand and > prove things about. You'll start to realize that there are concepts > that are difficult or impossible

Re: VimClojure 2.0.0 released (merged with Gorilla)

2009-03-10 Thread Timothy Pratley
*cheer* thanks Meikel! --~--~-~--~~~---~--~~ 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 To unsubscribe from this group, send email to clojure+unsubscr...@

Re: VimClojure 2.0.0 released (merged with Gorilla)

2009-03-10 Thread Mark Feeney
I've got it up and running on Windows and it looks great. Thanks Meikel! On Mar 10, 7:36 pm, Meikel Brandmeyer wrote: > Dear vimming Clojurians, > > I'm proud to announce VimClojure 2.0! > > I want to thank durka42 on #clojure for being a > patient guinea pig - eh - beta tester, finding the > b

Re: Static type guy trying to convert

2009-03-10 Thread Jon Harrop
On Tuesday 10 March 2009 13:26:32 Vincent Foley wrote: > Here's my feeling on it (note that I am talking about languages from > the C family, not Haskell or ML). Then the feelings you are describing are specifically about C and are not related to static typing in general. > 1. Like Jason Wolfe

Re: What is Clojure NOT good for?

2009-03-10 Thread Luc Prefontaine
That's the whole idea, if your current "coding" habits are not efficient well changing them involves taking a risk... otherwise everyone would do it. Humans have a tendency to stay within their comfort zone. Stretching that bubble takes time. No change however = stagnation and eventually obsolesce

Re: What profilers are you using?

2009-03-10 Thread Allen Rohner
On Feb 7, 9:16 am, David Powell wrote: > Newer versions of JDK 1.6, eg Update 11, have an application called > 'jvisualvm' in the bin directory. It lets you attach to any running > Java process and it has aprofilerthat you can switch on at runtime. > > It seems quite good. It does profiling via

Identifying maps.

2009-03-10 Thread budu
Hi, I've just read the "On the importance of recognizing and using maps" post and it made wonder about the best way for identifying maps. Obviously, when the situation permit it, we better use some kind of label to identify them. But sometimes, it's preferable to test for multiple keys and I'm not

Re: What profilers are you using?

2009-03-10 Thread Allen Rohner
> Can you go into more detail about how you used visualvm? I'm trying to > run it (visualvm 1.1.1), and it seems to have a race condition with > the clojure classloader. Sometimes it won't find all of the compiled > clojure source, and sometimes it will correctly profile methods until > I reload

Resurrecting request for infinity

2009-03-10 Thread Allen Rohner
http://groups.google.com/group/clojure/browse_frm/thread/5e665ce7a318f44a/3ddb49bd3ca34709?lnk=gst&q=infinite+inc+0#3ddb49bd3ca34709 I would have replied to the above post, but google groups doesn't seem to want to let me. In it, Stephen Gilardi makes the case for a fn equivalent to "(iterate inc

Re: filter1 interesting?

2009-03-10 Thread e
> You'd have some trouble with 'nil?' and 'false?' at the very least. > wouldn't be the first time :) ... I mean, oh, ok. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send e

Re: Static type guy trying to convert

2009-03-10 Thread Raffael Cavallaro
Some of you may not know of Jon's behvior on comp.lang.lisp so some background will be useful here. He runs a business selling ocaml and f# consulting and training services and materials. He routinely posts insulting and inflammatory remarks about lispers and lisp in comp.lang.lisp. He admits hi

Re: Static type guy trying to convert

2009-03-10 Thread e
On Wed, Mar 11, 2009 at 12:26 AM, Raffael Cavallaro < raffaelcavall...@gmail.com> wrote: > > Some of you may not know of Jon's behvior on comp.lang.lisp so some > background will be useful here. > > He runs a business selling ocaml and f# consulting and training > services and materials. He routin

Re: Static type guy trying to convert

2009-03-10 Thread Raffael Cavallaro
On Mar 11, 12:44 am, e wrote: > h, that could sound like more of an endorsement than anything he could > have said, himself!  Afterall he could have chosen a dynamically typed > language for his business if he had wanted to. You have to be an expert in something to run a business selling

Enjoying test-is

2009-03-10 Thread mikel
I just wanted to say thanks to Stuart Sierra for test-is. When I start using some new compiler, there always comes a point, if I keep it up long enough, that I get annoyed with my little ad hoc tests and want some sort of testing framework to make things easier. test-is does the job. Thanks, Stuar

Re: Debugging support for clojure?

2009-03-10 Thread Tassilo Horn
Joshua writes: Hi Joshua, > The eclipse plugin also provides some debugging support. Ok, so Eclipse & IntelliJ support debugging. Does SLIME do, too? Bye, Tassilo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Static type guy trying to convert

2009-03-10 Thread mikel
On Mar 10, 11:44 pm, e wrote: > On Wed, Mar 11, 2009 at 12:26 AM, Raffael Cavallaro < > > > > > > raffaelcavall...@gmail.com> wrote: > [...comments on Harrop's marketing tactics...] > h, that could sound like more of an endorsement than anything he could > have said, himself!  Afterall he