Hi,
Would you please have a look at this thread:
http://stackoverflow.com/questions/9087817/unable-to-bootstrap-clojurescript
Thanks for help and time.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
xactly? 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
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
Sorry, my mistake.
I will do this in the future, sorry for any inconvenience that may
happened.
On Mar 5, 3:54 am, Ken Wesson wrote:
> On Fri, Mar 4, 2011 at 8:25 PM, HB wrote:
> > On Mar 5, 3:05 am, Alan wrote:
> >> Does my answer to your StackOverflow question also
Yes, it did and I was about resolving this post.
Thanks.
The issue is solved guys, thank you all for passing.
On Mar 5, 3:05 am, Alan wrote:
> On Mar 4, 4:53 pm, HB wrote:
>
>
>
>
>
> > Here is the file:http://dl.dropbox.com/u/3630641/wizard-game.clj
>
>
Here is the file:
http://dl.dropbox.com/u/3630641/wizard-game.clj
On Mar 4, 4:24 am, HB wrote:
> Sorry, it is:
>
> Exception in thread "main" java.lang.IllegalArgumentException: Wrong
> number of args (1) passed to: user$describe-place (wizard-game.clj:
> 0)
>
&g
Sorry, it is:
Exception in thread "main" java.lang.IllegalArgumentException: Wrong
number of args (1) passed to: user$describe-place (wizard-game.clj:
0)
On Mar 4, 4:12 am, HB wrote:
> Yes indeed, it runs on my REPL too!
> However, if I save the code to a file and try to ru
"
> :basement "what ever"})
> #'user/*places*
> user=> (defn describe-place [place places]
> (places place))
> #'user/describe-place
> user=> (describe-place :room *places*)
> "Nice room"
> user=> (get
Hi,
I'm trying to write a function that gets the value for a key of a map.
(def *places* {:room "Nice room"
:basement "what ever"})
(defn describe-place [place places]
(places place))
(describe-place :room *places*)
Of course it isn't running :)
What should I do?
Thanks
Hi,
I'm trying to implement searching algorithm for binary tree.
Here is my Java implementation:
public Node findNode(Integer data) {
Node current = root;
while (!data.equals(current.getData())) {
if (data < current.getData())
current = current.getL
This code looks it working:
(defn prime-2? [num]
(loop [i 2]
(if (<= (* i i) num)
(if (zero? (mod num i))
false
(recur (inc i)))
true)))
Any potential logic error?
On Feb 17, 2:01 am, Marek Stępniowski wrote:
> On Thu, Feb 17, 2011 at 12:34 AM, HB
Hi,
I'm trying to write a function that determines if a number is a prime
or not.
I Java I have no problem:
private boolean isPrime(int n) {
for(int j=2; (j*j <= n); j++) if( n % j == 0)
return false; return true;
}
Here is my first shot:
(defn prime? [num]
(loop [i 2]
(if (<= (* i i)
I think it is unacceptable to provide broken, unpolished and not
working scripts.
I'm definitely respect the maintainers, I'm just annoyed because I
spent a couple of hours trying to make it works.
Thanks Alex, I owe you a huge mug of beer :)
On Dec 9, 6:39 am, Alex Osborne wrote:
&g
Tim Robinson wrote:
> Did you download jline and put it in a location where it can been
> accessed with the classpath?
>
> http://jline.sourceforge.net/
>
> On Dec 8, 6:47 pm, HB wrote:
>
>
>
> > Hi,
> > I downloaded Clojure
> > 1.2https://githu
Hi,
I downloaded Clojure 1.2
https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip
and extract it.
I created CLOJURE_HOME and added $CLOJURE_HOME/script to my $PATH
Upon trying clj or repl , I got this error:
Exception in thread "main" java.lang.NoClassDefFoundError: jline/
ConsoleRunner
I didn't expect my question would initiate such a wonderful
discussion, I'm speechless.
Thank you all guys, you are amazing.
Alex, your posts killed in a very good way :)
It was really helpful to morph the code and transform it.
On Dec 6, 11:14 am, Ken Wesson wrote:
> On Mon, Dec 6, 2010 at 4:02
Ken & Alex,
Why you aren't calling empty? when you want to check if a collection
is empty?
Isn't (if s) supposed to return true if s is empty ?
On Dec 6, 12:27 am, Ken Wesson wrote:
> On Sun, Dec 5, 2010 at 5:16 PM, Robert McIntyre wrote:
> > Your function never actually ends because even the
OMG, this is too much Clojure code for me to handle O.o
Alex, you just killed me :)
Do you previous Lisp knowledge? or Clojure is your first Lisp? you are
so good.
I will spend the next couple of hours studying it.
Thanks all, you are awesome.
On Dec 6, 12:47 am, Alex Osborne wrote:
>
(range 5))
> 5
>
> hope that helps,
> --Robert McIntyre
>
>
>
> On Sun, Dec 5, 2010 at 4:52 PM, HB wrote:
> > Hi,
> > I'm trying to write a function that calculates the length of a list:
>
> > (defn list-length [col]
> > (if col
> >
Hi,
I'm trying to write a function that calculates the length of a list:
(defn list-length [col]
(if col
(+ 1 (list-length(rest col)))
0))
(list-length '(Java, Clojure, Scala))
Upon running it in the REPL, I got the error:
java.lang.StackOverflowError (test.clj:3)
What is going wron
Emacs is *made* for programming in Lisp because it's written in a lisp
> (Emacs Lisp).
>
>
>
>
>
> On Mon, Nov 22, 2010 at 2:36 PM, HB wrote:
> > Hi,
> > I'm pretty sure that this question is already been asked but failed to
> > find it.
> >
Hi,
I installed this Clojure Textmate bundle:
https://github.com/swannodette/textmate-clojure
and Cake build tool:
https://github.com/ninjudd/cake
Running cake start in the terminal, I got these warnings (actually,
all Cake commands are generating these warning):
/Library/Ruby/Gems/1.8/gems/cake-
Hi,
I'm pretty sure that this question is already been asked but failed to
find it.
What is your editor/IDE for Clojure?
I didn't try them all, which IDE has the best Clojure support these
days: IntelliJ, NetBeans or Eclipse?
I'm not pretty happy with IntelliJ plugin.
Thanks for help and time.
--
pm, James Reeves wrote:
> On 4 September 2010 16:44, HB wrote:
>
> > If Compojure is micro web framework like Sinatra, does this means it
> > is not suitable for large web applications?
>
> The "micro" refers to how much the framework does for you, rather than
> th
n
fit.
On Sep 4, 8:26 pm, Shantanu Kumar wrote:
> On Sep 4, 8:51 pm, HB wrote:
>
> > My wish is vanquished :)
> > But I really wish if Relevance will work on a web framework since it
> > is in a unique position to achieve this (having the brightest Clojure
> > folks).
a nice day all.
On Sep 4, 4:32 pm, Aaron Bedra wrote:
> On 9/3/10 11:45 PM, HB wrote:> Hey,
> > Since Relevance is heavily investing in Clojure, do you think they are
> > working on a Clojure web framework?
> > Personally, I wish.
>
> We aren't currently work
Hey,
If Compojure is micro web framework like Sinatra, does this means it
is not suitable for large web applications?
(since Sinatra isn't suitable for large applications, it is mainly
used for very small applications and particularly to create some kind
of an API).
Thanks for help and time.
--
Y
Hey,
Since Relevance is heavily investing in Clojure, do you think they are
working on a Clojure web framework?
Personally, I wish.
--
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
not help my
> understanding at all.
> -Patrick
>
> On Sep 3, 12:12 pm, HB wrote:
>
>
>
> > Really nice example Peter,
> > Thanks, I appreciate it.
>
> > On Sep 3, 6:36 am, Peter Buckley wrote:
>
> > > I'm only a little ways through Joy of
to do yet on learning
> Clojure the language.
>
> HTH,
> Peter
>
>
>
>
>
> On Thu, Sep 2, 2010 at 10:02 PM, Wilson MacGyver wrote:
> > I highly recommend "Joy of Clojure". It's a good "2nd book on clojure".
> > It shows you the &quo
So in idiomatic Clojure applications, maps are considered like
objects?
And to operate on them we pass them to functions?
On Sep 3, 4:55 am, David Nolen wrote:
> On Thu, Sep 2, 2010 at 9:29 PM, HB wrote:
> > Hey,
> > I finished reading "Programming Clojure" and "
Hey,
I finished reading "Programming Clojure" and "Practical Clojure" and
I'm hooked :)
Please count me in the Clojure club.
But I failed how to think in Clojure.
My main career is around Java web applications (Hibernate, Spring,
Lucene) and Web services.
Lets not talk about Java web frameworks nei
z.com
>
>
>
> On Thu, Sep 2, 2010 at 12:21 PM, HB wrote:
> > Hey,
> > Would you please recommend some good Blogs/Twitter accounts about
> > Clojure?
> > Thanks.
>
> > --
> > You received this message because you are subscribed to the Google
>
Hey,
Would you please recommend some good Blogs/Twitter accounts about
Clojure?
Thanks.
--
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 - plea
Hey,
How a multimethod in Clojure differs from a method that have multiple
bodies?
When to use each approach?
Thanks.
--
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 ne
Hey,
Having this function:
(defn printall [s]
(if (not (empty? s))
(do
(println (str "Item: " (first s)))
(recur (rest s)
Why do is used here? what happens if I drop it?
Thanks for help and time.
--
You received this message because you are subscribed to the
he corresponding
> prime number
>
> (take 5 ordinals-and-primes) would therefore look like this
> ([1 2] [2 3] [3 5] [4 7] [5 11])
>
> On 28 Aug., 16:57, HB wrote:
>
>
>
> > Hey,
> > I came across this method:
>
> > (use '[clojure.contrib.lazy-se
Hey,
I came across this method:
(use '[clojure.contrib.lazy-seqs :only (primes)])
(def ordinals-and-primes (map vector (iterate inc 1) primes))
map macro has this format:
(map function collection)
primes is the collection and (iterate inc 1) is the function to apply
on each element of the collect
lus-one (map inc (iterate inc 1))
> my-range (take 10 (drop 10 N-plus-one))]
> (filter even? my-range))
>
> You can do destructoring in the binding block.http://clojure.org/special_forms
> (search destructoring)
>
> Thats just some stuff, but as soon you have done some
Hey,
Basically, I understand what let form does but I'm not sure when to
use it.
Would you please enlighten me about it? (if possible some typical Java
code and then covert it to Clojure let form).
I really appreciate your time and help.
Thanks.
--
You received this message because you are subscr
Hey,
Both Groovy and Scala have a compiler to produce class files.
Does Clojure has a compiler?
Do Clojure files are compiled usually?
Thanks.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.co
Hey,
I just want to be sure that I understand the proxy macro correctly.
proxy macro is used to create a block of code that implements/extends
Java interface/class , so we don't have to create Java object
explicitly.
Please correct me if I'm wrong.
Thanks.
--
You received this message because you
How cake is differ from Dejour?
http://github.com/russolsen/dejour
Thanks all for help.
On Aug 17, 6:41 pm, David Nolen wrote:
> On Tue, Aug 17, 2010 at 10:59 AM, HB wrote:
> > Hey,
> > How to install Clojure on Mac OS X?
> > I googled the web, some use MacPorts, others wri
Currently, I just to play around Clojure and TextMate.
Ne need for the heavy guns :)
On Aug 17, 6:39 pm, cej38 wrote:
> My first question would be how do you want to interact with clojure?
> Are you going to be using something like Netbeans, or emacs, or
> [shudder] vi? The answer really kinda d
Hey,
How to install Clojure on Mac OS X?
I googled the web, some use MacPorts, others write some shell scripts.
Is there a -standard- way to install Clojure on OS X (if possible,
please don't refer me to MacPorts)?
Thanks all for help and time.
--
You received this message because you are subscri
ll explanation, as Wilson tells
> :http://clojure.org/concurrent_programming
>
>
>
> On Mon, Aug 16, 2010 at 4:32 AM, Wilson MacGyver wrote:
> > It's clojure's STM(Software Transaction Memory). More info
> > athttp://clojure.org/concurrent_programming
>
>
Hey,
I don't understand what "references" are.
(ref #{})
This creates a reference to an empty set but what is "reference" any
way?
Thanks for help and time.
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
Hey,
Since Clojure is a LISP dialect, does this mean that it doesn't
support OOP?
Thanks.
--
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 - pl
>>As a group, *1, *2, and *3 form (effectively) a small queue (not a stack as
>>someone mentioned previously).
It was me :)
On Jan 15, 3:00 pm, "Stephen C. Gilardi" wrote:
> On Jan 15, 2009, at 7:28 AM, HB wrote:
>
> > Do *1 *2 *3 ... are saved in a bui
Do *1 *2 *3 ... are saved in a built in sequence that we can inspect
its contents?
On Jan 14, 2:20 pm, Martin Wood-Mitrovski wrote:
> On Wed, 14 Jan 2009 04:15:18 -0800 (PST)
>
> HB wrote:
>
> > Lets say that the result of each method invocation will be saved in a
> >
I'm an IntelliJ 8 user and I can test the plugin on my own machine if
this helps the plugin's development.
On Jan 14, 3:52 pm, Peter Wolf wrote:
> Hi Aria,
>
> Actually, I am just in the process of writing up the install
> instructions. Watch this space!
>
> aria42 wrote:
> > Did you ever get a
>> is that just for fun or can it be used in programs?
Consider it a shenanigan :)
>> HB, how'd you even learn about that so fast? do I suck at reading?
I'm reading the beta version of "Programming Clojure"
;
Am I doing fine Stu? :D
On Jan 14, 2:31 pm, e wrot
will be pushed into the stack.
So the stack now contains:
Google, Wicket, Wicket
Am I right?
On Jan 14, 1:33 pm, Martin Wood-Mitrovski wrote:
> On Wed, 14 Jan 2009 02:47:23 -0800 (PST)
>
> HB wrote:
>
> > I didn't get you, would you please hold my hand and walking me as you
vel evaluations count.
>
> In short, you were Heisenberged.
>
> --Steve
>
> On Jan 14, 2009, at 3:59 AM, HB wrote:
>
>
>
> > Hey,
> > I'm trying to run my first Clojure example
>
> > user=> (defn hello [name] (str "Cool! " name))
&g
Hey,
I'm trying to run my first Clojure example
user=> (defn hello [name] (str "Cool! " name))
#'user/hello
user=> (hello "Google")
"Cool! Google"
user=> (hello "Wicket")
"Cool! Wicket"
user=> (str *1)
"Cool! Wicket"
user=> (str *2)
"Cool! Wicket"
Isn't (str *2) supposed to return "Cool! Google"
t; Thanks for the answer. I think you'll need a reply from Chouser or
> > Rich (or someone alike) when they wake up. The best I can give you is
> > this part of the source, where (I think) it is defined how clojure is
> > build upon java.
>
> >http://code.google
gave before is a direct link to the source
> code of clojure. That is the source.
>
> http://code.google.com/p/clojure/source/browse/trunk/src/clj/clojure/...
>
> On Jan 13, 9:04 am, HB wrote:
>
> > Do you suggest that I read "Programming Clojure" first and then trying
(conj m (last fdecl))
> m)
> fdecl (if (map? (last fdecl))
> (butlast fdecl)
> fdecl)
> m (conj {:arglists (list 'quote (sigs fdecl))} m)]
> (list 'def (with-meta name (conj (if (meta name)
Hey,
How much Clojure source code is complicated?
I'm not a programming Godfather but I would like to study Clojure
source code.
Could an intermediate programmer like me grasp the source code?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are s
What is (Yet Another Clojure Snake)?
Something like YACC?
On Jan 12, 1:15 pm, "Tom Ayerst" wrote:
> For example, I am pretty sure I don't need to wrap 'send' in 'dosync' (it
> works without it).
>
> Tom
>
> 2009/1/12 Tom Ayerst
>
> > Hi,
>
> > Following in a growing tradition I have written YAC
Hey,
I would like to contribute to Clojure but I'm not a language designer,
neither familiar with LISP :(
How can I be useful to Clojure project?
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" grou
Hey,
Clojure is described as a modern dialect of LISP.
What is a "LISP dialect"?
Thanks.
--~--~-~--~~~---~--~~
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
62 matches
Mail list logo