Re: Seattle Clojure meeting

2010-02-05 Thread pthatcher
11th should work for me. On Feb 3, 7:01 pm, Phil Hagelberg wrote: > Hello, clojurists of Seattle. > > Let's meet! I'm thinking of getting folks together from 7pm to 9pm at Zoka > in the University District:http://bit.ly/c9jinWTopics may include > Leiningen, deftype/protocols, getting set up with

Re: Seattle Clojure meeting

2010-02-05 Thread pthatcher
11th should work for me. On Feb 3, 7:01 pm, Phil Hagelberg wrote: > Hello, clojurists of Seattle. > > Let's meet! I'm thinking of getting folks together from 7pm to 9pm at Zoka > in the University District:http://bit.ly/c9jinWTopics may include > Leiningen, deftype/protocols, getting set up with

Opening for Clojure Developers in Chennai

2010-02-05 Thread praveen
Role: Clojure Developer Work Experience - 2 - 5 years Skills Required - Clojure, Lisp, Java, Adobe Flex, Git Location – Chennai Pre Requisite: 2+ years of experience as a Clojure or Lisp Programmer Previous experience on Flash application development Knowledge of Java programming language an

Re: Clojure for system administration

2010-02-05 Thread Chouser
On Thu, Feb 4, 2010 at 11:33 AM, Stuart Sierra wrote: > Clojure can certainly do these things; clojure-contrib contains many > file and io-related utilities.  But remember that Clojure, like any > Java program, takes more time to start up than "scripting" languages > like Perl/Bash/Ruby/Python, so

Re: Clojure for system administration

2010-02-05 Thread Meikel Brandmeyer
Hi, On Feb 5, 6:42 am, Tim Clemons wrote: > Perhaps the solution is to have a *nix shell implemented in Clojure. > That would limit the start-up issue to a single initial instance. > Then the user can proceed to use regular command-line functionality > interspersed with Clojure scripts.  Think o

Re: Clojure for system administration

2010-02-05 Thread e
On Fri, Feb 5, 2010 at 12:56 AM, Greg wrote: > A much easier solution is to go with a lisp designed for exactly the task > of scripting. > > Woah! Seems like an understatement. This newLISP looks POWERFUL. Lot's of new stuff to read. Thank you, thank you. > I whole-heartedly recommend newLI

Re: Pattern Matching

2010-02-05 Thread Jon Harrop
On Thursday 04 February 2010 23:53:19 Base wrote: > Hi John - > > Thanks for a very intersting response. > > Do you have any real experience in F#? Yes. I consulted for Microsoft on F# twice, wrote both the first and the most recent books on F#, wrote and published the world's first and second c

Re: Clojure for system administration

2010-02-05 Thread Greg
> Woah! Seems like an understatement. This newLISP looks POWERFUL. Lot's of > new stuff to read. Thank you, thank you. No problem! Here are some more resources on it you might find useful: http://www.newlisp.org/index.cgi?Documentation http://www.newlisp.org/downloads/CodePatterns.html http

Re: Full Disclojure - I Need Topics!

2010-02-05 Thread Seth
Laurent, Merci beaucoup! I have linked to the video. I will be presenting Clojure to the company I work for soon, and videos for Eclipse and NetBeans really help me out. The fewer times I mention Emacs the better, apparently :-| Seth On Feb 5, 12:10 am, Laurent PETIT wrote: > 2010/2/5 Seth : >

Re: Clojure for system administration

2010-02-05 Thread Phil Hagelberg
On Thu, Feb 4, 2010 at 11:55 PM, ataggart wrote: > On Feb 4, 9:35 am, Phil Hagelberg wrote: >> On Thu, Feb 4, 2010 at 8:33 AM, Stuart Sierra >> >> wrote: >> > Clojure can certainly do these things; clojure-contrib contains many >> > file and io-related utilities.  But remember that Clojure, like

Re: Clojure for system administration

2010-02-05 Thread Jeff Rose
On Feb 5, 6:02 pm, Phil Hagelberg wrote: > On Thu, Feb 4, 2010 at 11:55 PM, ataggart wrote: > > On Feb 4, 9:35 am, Phil Hagelberg wrote: > >> On Thu, Feb 4, 2010 at 8:33 AM, Stuart Sierra > > >> wrote: > >> > Clojure can certainly do these things; clojure-contrib contains many > >> > file and

Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-05 Thread Peter Schuller
> I've been wondering about this.  The classpath issue seems like a > major thorn in the side of the JVM, especially for Clojure and other It seems to be that there are two problems here. One problem is that there needs to be a convention for a clojure "binary" that works consistently across plat

Re: Clojure for system administration

2010-02-05 Thread nchubrich
Chouser--- The Parrot vm looks really great for Clojurepresumably Clojure could have continuations and TCO there. On Feb 5, 9:59 am, Chouser wrote: > On Thu, Feb 4, 2010 at 11:33 AM, Stuart Sierra > > wrote: > > Clojure can certainly do these things; clojure-contrib contains many > > file

Re: Clojure for system administration

2010-02-05 Thread Greg
What about a Clojure directly on top of the LLVM? It would be super-fast, you could start from scratch and leave behind all of the issues associated with the JVM, no more complicated classpath, namespace, imports, etc. and the startup time would be very fast. I only wish I had the time to work

Re: Seattle Clojure meeting

2010-02-05 Thread bzimmer
I'm interested, either day works. thanks, brian On Feb 3, 7:01 pm, Phil Hagelberg wrote: > Hello, clojurists of Seattle. > > Let's meet! I'm thinking of getting folks together from 7pm to 9pm at Zoka > in the University District:http://bit.ly/c9jinWTopics may include > Leiningen, deftype/protoco

newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
I'm writing a clojure program which is getting sort of large, so I'd like to split it up into separate source files. However, I'm having trouble figuring out how to tell the files about each other's existence. I'd like all the source files to be in the same namespace. Can someone straighten me o

Re: newbie question: splitting up source files

2010-02-05 Thread Sean Devlin
What development environment are you using? On Feb 5, 1:57 pm, Mike Jarmy wrote: > I'm writing a clojure program which is getting sort of large, so I'd > like to split it up into separate source files.  However, I'm having > trouble figuring out how to tell the files about each other's > existenc

Applying arguments to Java methods.

2010-02-05 Thread Nicolas Buduroi
Hi, I'm searching for a way of applying a sequence of arguments to a Java method, but haven't found anything yet. Tried to write a macro for it and don't even see how that would be possible. Is there a way to do that? Thanks - budu -- You received this message because you are subscribed to the

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
winXP, java 1.6 On Fri, Feb 5, 2010 at 3:31 PM, Sean Devlin wrote: > What development environment are you using? > > On Feb 5, 1:57 pm, Mike Jarmy wrote: >> I'm writing a clojure program which is getting sort of large, so I'd >> like to split it up into separate source files.  However, I'm havin

Re: Applying arguments to Java methods.

2010-02-05 Thread Meikel Brandmeyer
Hi, Am 05.02.2010 um 21:34 schrieb Nicolas Buduroi: > Hi, I'm searching for a way of applying a sequence of arguments to a > Java method, but haven't found anything yet. Tried to write a macro > for it and don't even see how that would be possible. Is there a way > to do that? http://paste.lisp

Re: newbie question: splitting up source files

2010-02-05 Thread Sean Devlin
You're running into a classpath issue. You'll need to have both files on you classpath. If you're just getting started, I'd suggest using Netbeans/Enclojure, as it handles the classpath stuff for you, and you can focus on learning Clojure. On Feb 5, 3:41 pm, Mike Jarmy wrote: > winXP, java 1.6

Re: Seattle Clojure meeting

2010-02-05 Thread Phil Hagelberg
Wow, I certainly was not expecting that level of response; this is great. Looks like the 11th (Thursday) is the crowd favorite. Once again, the location is http://bit.ly/c9jinW We'll be meeting in the back. Zoka is a big place, but it can get crowded with all those college students around, so I'l

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
I'd like to take a stab at fixing it from the command line if I can. I'm working on a script that I actually want to use from the command line -- the clojure part I think I have under control for now, since the script works just fine as one big file. I've got cygwin installed, and when I run env,

Re: newbie question: splitting up source files

2010-02-05 Thread Sean Devlin
This expression will provide a string that is the classpath ((into {} (System/getProperties)) "java.class.path") There's probably a more elegant way... anyone? On Feb 5, 4:03 pm, Mike Jarmy wrote: > I'd like to take a stab at fixing it from the command line if I can. > I'm working on a script

Re: newbie question: splitting up source files

2010-02-05 Thread Meikel Brandmeyer
Hi, Am 05.02.2010 um 22:13 schrieb Sean Devlin: > This expression will provide a string that is the classpath > > ((into {} (System/getProperties)) "java.class.path") > > There's probably a more elegant way... anyone? Simply (System/getProperty "java.class.path")? Sincerely Meikel -- You r

Re: Applying arguments to Java methods.

2010-02-05 Thread ataggart
On Feb 5, 12:34 pm, Nicolas Buduroi wrote: > Hi, I'm searching for a way of applying a sequence of arguments to a > Java method, but haven't found anything yet. Tried to write a macro > for it and don't even see how that would be possible. Is there a way > to do that? > > Thanks > > - budu You

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
That yields ".;lib/clojure.jar", just as we'd expect. I also tried, "java -cp foo.clj;foo-util.clj;lib/clojure.jar clojure.main foo.clj", but that gave the same error. All of these classpaths work when I comment out the calls to "(require 'foo-util)" and "(frob)" -- which you would expect, since

Re: newbie question: splitting up source files

2010-02-05 Thread Greg
Mike, I'd say this is not your fault. I'm a clojure newbie too and the answer to your question is nowhere to be found in Clojure's barren documentation. You're using the right command line stuff, but you need to change your code: ;; foo.clj (ns foo (:load "foo-util")) (defn main [] (print "he

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
Greg: your code works, if I go back to the original classpath. Thanks. The 2nd classpath I posted was purely out of desperation, I didn't think it was really going to work. What your code implies to me is that for each namespace, there should be one source file that is sort of the 'master' file -

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
OK, here's a slightly more elaborate toy example that works. In this example, foo-main.clj needs foo-a.clj, and they both need foo-util.clj. I was expecting the (in-ns) call in foo-a to have a ":load" keyword, just like (ns) in foo-main, but it doesn't, so I just called (load) afterwards. Anyway

cond, condp and :>>

2010-02-05 Thread Niels Aan de Brugh
Hi there. A quick question about cond and condp. The latter has a nice feature that allows the re-use of a test-expression result in the result part of a clause. I figure it can be quite handy in the cond macro as well. For example: (cond ;; ... (some (fn [[k v]] (some-test v)) c

Re: newbie question: splitting up source files

2010-02-05 Thread Sean Devlin
Personally, I don't load individual .clj file at the command line. I'll usually build a .jar & include it in my classpath. On Feb 5, 5:52 pm, Mike Jarmy wrote: > OK, here's a slightly more elaborate toy example that works.  In this > example, foo-main.clj needs foo-a.clj, and they both need > foo

Re: newbie question: splitting up source files

2010-02-05 Thread Richard Newman
It might be helpful if the documentation at http://clojure.org/namespaces mentioned how to split out a namespace into multiple files. I never split a namespace into multiple files: I split my project into multiple namespaces. That way I can simply :require and :use them from each other, and

Re: newbie question: splitting up source files

2010-02-05 Thread Mike Jarmy
@Richard: Yes, I think that makes sense. I am running into dependency problems when I try to split up the namespace -- my split-up files have a hard time refering to each other. So I think that file-per-namespace is the answer. @Sean: yes I will probably compile the app to a jar at some point. T

Re: Applying arguments to Java methods.

2010-02-05 Thread Nicolas Buduroi
On Feb 5, 4:20 pm, ataggart wrote: > You could also use memfn. Exactly what I wanted! > Though it requires reflection.  To deal with that you could make your > own type-hinted function: That's a good point. I've finally gave up using apply (well, the version based on Rich code above) on methods

Re: cond, condp and :>>

2010-02-05 Thread ataggart
On Feb 5, 2:20 pm, Niels Aan de Brugh wrote: > Hi there. > > A quick question about cond and condp. The latter has a nice feature > that allows the re-use of a test-expression result in the result part > of a clause. I figure it can be quite handy in the cond macro as well. > For example: > >  

Re: Applying arguments to Java methods.

2010-02-05 Thread nchubrich
Is there ever any reason to use memfn as opposed to ordinary functions, i.e. (def div (fn [x y] (.divide x y))) On Feb 5, 4:20 pm, ataggart wrote: > On Feb 5, 12:34 pm, Nicolas Buduroi wrote: > > > Hi, I'm searching for a way of applying a sequence of arguments to a > > Java method, but haven't

Re: Clojure for system administration

2010-02-05 Thread e
sounds like a good idea to me, too. On Fri, Feb 5, 2010 at 2:02 PM, Greg wrote: > What about a Clojure directly on top of the LLVM? > > It would be super-fast, you could start from scratch and leave behind all > of the issues associated with the JVM, no more complicated classpath, > namespace, i

Re: Clojure for system administration

2010-02-05 Thread e
along these lines, it seems like this (see link below) was supposed to be included, but I'm not sure. It combines bash with newLISP. for those wanting to do this with clojure, this could be a good model. That is, it might be instructive to check out the newLISP progress, even if clj is your prim

compiled namespaces referencing each other

2010-02-05 Thread Mike Jarmy
I've followed the directions at http://java.ociweb.com/mark/clojure/article.html#Compiling to compile a simple clojure app. In my base directory, I have a dir called classes, and another called src. I am attempting to follow Richard Newman's advice in the thread called "newbie question: splitting

Re: compiled namespaces referencing each other

2010-02-05 Thread Richard Newman
which invokes "(compile 'foo.main)". I then get "java.lang.Exception: Unable to resolve symbol: a in this context". foo.main uses foo.util. foo.util uses foo.main. That's a circular reference. There are ways around this (e.g., create foo.main in foo.util, then use declare to ensure that `a`

Re: Seattle Clojure meeting

2010-02-05 Thread Greg
> Look for the laptop with the "my other car is a cdr" sticker :-D I need to get that for my car, it should synergize with the Starfleet Academy sticker... On Feb 5, 2010, at 3:50 PM, Phil Hagelberg wrote: > Wow, I certainly was not expecting that level of response; this is great. > > Looks

Re: Applying arguments to Java methods.

2010-02-05 Thread ataggart
I only bound it to a var to be clear; the intent was that it would be called directly for the first arg to apply, thus (memfn divide x) may end up being fewer chars and more informational than #(.divide %1 %2). But yeah, not a huge thing. It very well may precede the .prefix notation. On Feb 5,

Re: compiled namespaces referencing each other

2010-02-05 Thread ataggart
Circular references mean your namespace design is broken. -- 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 - please be patient with your first