Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Shantanu Kumar
On Mar 27, 11:21 am, ultranewb wrote: > On Mar 27, 6:40 am, Mark Engelberg wrote: > > > Make sure the pane with your code is the active pane when you type > > Ctrl-c Ctrl-k.  It won't work if the focus is on the REPL. > > Nope, it doesn't work, no matter where the focus is. I'm curious - did/c

Generating cross recursive lazy sequences in clojure

2011-03-27 Thread Christian Schuhegger
Hi all, I am continuing on my path to explore clojure in more detail and am trying to implement the following haskell algorithm in clojure: http://www.csse.monash.edu.au/~lloyd/tildeFP/Haskell/1998/Edit01/ Even after trying several different approaches and investing several hours I do not seem to

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread ultranewb
On Mar 27, 2:29 pm, Shantanu Kumar wrote: > I'm curious - did/could you give Eclipse and Counter-ClockWise plugin > a try? I did not try Eclipse. I had a bad experience before with it. It seems to be the worst to deal with as far as all the project and dependency garbage, and none of that garba

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread ultranewb
For newbs, I did not see this anywhere, but just discovered it, and it is of immense value. In a REPL, you can just (load-file "path/to/ filename") to load the code you typed into an editor. On Mar 27, 12:24 am, ultranewb wrote: > NetBeans w/ Enclosure - > Could get a REPL, couldn't figure out h

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Shantanu Kumar
On Mar 27, 1:45 pm, ultranewb wrote: > On Mar 27, 2:29 pm, Shantanu Kumar wrote: > > > I'm curious - did/could you give Eclipse and Counter-ClockWise plugin > > a try? > > I did not try Eclipse.  I had a bad experience before with it.  It > seems to be the worst to deal with as far as all the p

Re: ClojureCLR in production ?

2011-03-27 Thread Jules
Thanks David, fortunately this is not one of the things that I would be using it for :-) but the heads up is very welcome and useful as well, I am sure, to other people reading this list. regards, Jules -- You received this message because you are subscribed to the Google Groups "Clojure" gr

Re: gen-class and state...

2011-03-27 Thread Stefan Sigurdsson
How do you guys normally manage resources when using lazy sequences? I was playing around with this question, and I looked into extending line-seq to take a file path parameter that is coerced to reader: (defn line-seq ([^java.io.BufferedReader rdr] (when-let [line (.readL

Re: gen-class and state...

2011-03-27 Thread Stefan Sigurdsson
Aieh, I oversimplified a bit here, and forgot about not being able to overload with the same arity, without multimethods. Here is the actual code I was experimenting with, which actually runs... (defn- read-seq- [reader extract advance] (let [segment (extract reader) reader (advance r

Re: Generating cross recursive lazy sequences in clojure

2011-03-27 Thread Christian Schuhegger
I understand now the problem. Clojure is really not lazy enough :) I was forgetting that clojure evaluates its function arguments eagerly like lisp and not lazily like haskell. I have to wrap the function arguments that should be evaluated lazily into closures "(fn [] value)". Once I have a solut

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Luc Prefontaine
On Sun, 27 Mar 2011 01:45:37 -0700 (PDT) ultranewb wrote: > On Mar 27, 2:29 pm, Shantanu Kumar wrote: > > I'm curious - did/could you give Eclipse and Counter-ClockWise > > plugin a try? > > I did not try Eclipse. I had a bad experience before with it. It > seems to be the worst to deal with

Re: Generating cross recursive lazy sequences in clojure

2011-03-27 Thread Christian Schuhegger
Finally! I have a solution. You can have a look at it here: https://gist.github.com/889354/ I would like to hear comments about how to do it better or in a more idiomatic clojure way. Especially I am uncertain about my use of "binding" and the top level declares. I needed the ability to reference

clojure.contrib.str-utils in counterclockwise

2011-03-27 Thread larry
In installed counterclockwise plugin for eclipse. clojure.contrib is supposed to be installed with this but when I try: (require 'clojure-contrib.str-utils) I Could not locate clojure_contrib/str_utils__init.class or clojure_contrib/str_utils.clj on classpath: (test.clj:2) How do I fix this? T

Re: clojure.contrib.str-utils in counterclockwise

2011-03-27 Thread Shantanu Kumar
On Mar 27, 10:03 pm, larry wrote: > In installed counterclockwise plugin for eclipse. clojure.contrib is > supposed to be installed with this but when I try: > > (require 'clojure-contrib.str-utils) > > I > Could not locate clojure_contrib/str_utils__init.class or > clojure_contrib/str_utils.clj

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread ultranewb
On Mar 27, 11:09 pm, Luc Prefontaine wrote: > You cannot expect a tool to "guess" your project dependencies. > Dependencies are a fact of life and cannot be avoided in any significant > project. > It's not "gargage"... Anything I have to do besides what I should be doing is "garbage," but I'm we

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Laurent PETIT
2011/3/27 ultranewb > On Mar 27, 11:09 pm, Luc Prefontaine > wrote: > > You cannot expect a tool to "guess" your project dependencies. > > Dependencies are a fact of life and cannot be avoided in any significant > project. > > It's not "gargage"... > > Anything I have to do besides what I should

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Shantanu Kumar
On Mar 27, 11:52 pm, ultranewb wrote: > On Mar 27, 11:09 pm, Luc Prefontaine > wrote: > > > You cannot expect a tool to "guess" your project dependencies. > > Dependencies are a fact of life and cannot be avoided in any significant > > project. > > It's not "gargage"... > > Anything I have to

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Chas Emerick
On Mar 27, 2011, at 2:52 PM, ultranewb wrote: > On Mar 27, 11:09 pm, Luc Prefontaine > wrote: >> You cannot expect a tool to "guess" your project dependencies. >> Dependencies are a fact of life and cannot be avoided in any significant >> project. >> It's not "gargage"... > > Anything I have t

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Lee Spector
On Mar 27, 2011, at 8:12 PM, Chas Emerick wrote: > > Dependency management and other garbage are definitely garbage, but I know of > no nontrivial programming language that doesn't have its share of it. If you > know of any magical environments that eliminate such administrivia, do share. A l

Why I'm getting an empty result?

2011-03-27 Thread HB
Hi, Would you please have a look at this code: (def *objects* '(bottle bucket frog chain)) (def *object-locations* {:bottle 'living-room, :bucket 'living- room, :chain 'garden, :frog 'garden}) (defn objects-at [loc objs obj-locs] (letfn [(is-obj-at? [obj] (= (obj obj-locs) loc))] (filte

Re: Why I'm getting an empty result?

2011-03-27 Thread CuppoJava
What exactly does the line (= (obj obj-locs) loc) do? What is an "obj" exactly? From your code it seems that an obj is going to be 'bottle or 'bucket. I'm not sure what happens if you treat a symbol as a function. -Patrick On Mar 27, 10:02 pm, HB wrote: > Hi, > Would you please have a look at

Re: Why I'm getting an empty result?

2011-03-27 Thread HB
I figured it out. My code is going to compare keywords with non-keywords which will returns false and hence an empty result set from filter function. On Mar 28, 4:09 am, CuppoJava wrote: > What exactly does the line > (= (obj obj-locs) loc) > do? > > What is an "obj" exactly? From your code it se

[ANN] appengine-magic 0.4.0: Clojure on Google App Engine

2011-03-27 Thread Constantine Vetoshev
I would like to announce the release of appengine-magic version 0.4.0, a library designed to make it easier to write Clojure applications for Google App Engine. appengine-magic abstracts away nearly all the boilerplate necessary to deploy an App Engine application. It also enables interactive deve

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread ultranewb
On Mar 28, 7:51 am, Lee Spector wrote: > > Dependency management and other garbage are definitely garbage, but I know > > of no nontrivial programming language that doesn't have its share of it.   > > If you know of any magical environments that eliminate such administrivia, > > do share. > > A

Re: Generating cross recursive lazy sequences in clojure

2011-03-27 Thread Alan
(1) lazy-cat is old. There's no reason to use it anymore; lazy-seq is better for generating custom lazy seqs, and concat is already lazy. (2) declare is overkill for this; just use letfn and avoid creating a bunch of global functions that nobody else will ever use. On Mar 27, 9:43 am, Christian Sc

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Kasim
Hi, I am the guy who did ClojureW. I just updated the instruction to get a REPL with Jline. Thank you for reporting. I am also working on a "Just Works" emacs setup for all platforms and would be happy to hear your opinion. I really want to make it as simple as ClojureW. Have fun, Kasim --

Re: Generating cross recursive lazy sequences in clojure

2011-03-27 Thread Meikel Brandmeyer
Hi, On 28 Mrz., 07:11, Alan wrote: > (1) lazy-cat is old. There's no reason to use it anymore; lazy-seq is > better for generating custom lazy seqs, and concat is already lazy. You confuse this with lazy-cons. lazy-cat is just a really lazy version of concat and there is no reason not to use it

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Mike Meyer
On Sun, 27 Mar 2011 21:30:54 -0700 (PDT) ultranewb wrote: > But with any other language I've ever used, at most I include a > library I need in a directive at the top, or I include my own code in > a similar directive. Question: how did you find the library you were going to use? If you only se

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Mark Engelberg
On Sun, Mar 27, 2011 at 11:15 PM, Mike Meyer wrote: > So, assuming you found a library you really needed that wasn't already > locally installed, how did you deal with that? If you could add a > "require library" to your source and your language would go find it, > download it and install it, I'd

Re: A newbie's summary - what worked, what didn't

2011-03-27 Thread Shantanu Kumar
On Mar 28, 11:31 am, Mark Engelberg wrote: > On Sun, Mar 27, 2011 at 11:15 PM, Mike Meyer wrote: > > So, assuming you found a library you really needed that wasn't already > > locally installed, how did you deal with that? If you could add a > > "require library" to your source and your languag