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
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))]
? 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 hubaghd...@gmail.com wrote:
Hi,
Would you please have a look at this code:
(def *objects* '(bottle bucket frog
Here is the file:
http://dl.dropbox.com/u/3630641/wizard-game.clj
On Mar 4, 4:24 am, HB hubaghd...@gmail.com 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)
On Mar 4, 4:12 am, HB
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 a...@malloys.org wrote:
On Mar 4, 4:53 pm, HB hubaghd...@gmail.com wrote:
Here is the file:http://dl.dropbox.com/u/3630641/wizard-game.clj
On Mar 4, 4
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 kwess...@gmail.com wrote:
On Fri, Mar 4, 2011 at 8:25 PM, HB hubaghd...@gmail.com wrote:
On Mar 5, 3:05 am, Alan a...@malloys.org wrote:
Does my answer to your
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 for
})
#'user/*places*
user= (defn describe-place [place places]
(places place))
#'user/describe-place
user= (describe-place :room *places*)
Nice room
user= (get *places* :room)
Nice room
On Mar 3, 5:33 pm, HB hubaghd...@gmail.com wrote:
Hi,
I'm trying to write a function that gets
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 hubaghd...@gmail.com wrote:
Yes indeed, it runs on my REPL too!
However, if I save the code to a file and try to run
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 =
AM, HB hubaghd...@gmail.com wrote:
I'm trying to write a function that determines if a number is a prime
or not.
Here is my first shot:
(defn prime? [num]
(loop [i 2]
(if (= (* i i) num)
false)
(recur (inc i)))
true)
It is not working to be sure :)
Please blow
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)
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
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 hubaghd...@gmail.com wrote:
Hi,
I downloaded Clojure
1.2https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip
:
HB hubaghd...@gmail.com writes:
I checked clj script under the script directory:
#!/bin/sh
CLASSPATH=src/clj:test:test-classes:classes/:script/
jline-0.9.94.jar:../clojure-contrib/target/clojure-contrib-1.2.0-
SNAPSHOT.jar
if [ -z $1 ]; then
exec java -server 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 kwess...@gmail.com wrote:
On Mon,
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
, HB hubaghd...@gmail.com wrote:
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
wrote:
HB hubaghd...@gmail.com writes:
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
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 kwess...@gmail.com wrote:
On Sun, Dec 5, 2010 at 5:16 PM, Robert McIntyre r...@mit.edu wrote:
Your function never
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.
--
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):
thing
that 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 hubaghd...@gmail.com wrote:
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
Reeves jree...@weavejester.com wrote:
On 4 September 2010 16:44, HB hubaghd...@gmail.com 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
the size
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.
--
.
On Sep 4, 4:32 pm, Aaron Bedra aaron.be...@gmail.com 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 working on creating a new web framework
, Shantanu Kumar kumar.shant...@gmail.com wrote:
On Sep 4, 8:51 pm, HB hubaghd...@gmail.com 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).
I read that Relevance
.
It shows you the why things are the way they are, and how to
do things the clojure way as much as possible.
On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure and Practical Clojure and
I'm hooked :)
Please count me in the Clojure
understanding at all.
-Patrick
On Sep 3, 12:12 pm, HB hubaghd...@gmail.com wrote:
Really nice example Peter,
Thanks, I appreciate it.
On Sep 3, 6:36 am, Peter Buckley buckmeist...@gmail.com wrote:
I'm only a little ways through Joy of Clojure (my first Clojure book)
but bear with me
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
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 -
, 2010 at 12:21 PM, HB hubaghd...@gmail.com 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
Groups Clojure group.
To post to this group, send email to clojure
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
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 dnolen.li...@gmail.com wrote:
On Thu, Sep 2, 2010 at 9:29 PM, HB hubaghd...@gmail.com wrote:
Hey,
I finished reading Programming Clojure
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 new
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
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 stuff yourself
it will become clear.
On 26 Aug., 17:02, HB hubaghd...@gmail.com wrote:
Hey,
Basically, I understand what let form does
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
-and-primes) would therefore look like this
([1 2] [2 3] [3 5] [4 7] [5 11])
On 28 Aug., 16:57, HB hubaghd...@gmail.com wrote:
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
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
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
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.com
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
Currently, I just to play around Clojure and TextMate.
Ne need for the heavy guns :)
On Aug 17, 6:39 pm, cej38 junkerme...@gmail.com 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
How cake is differ from Dejour?
http://github.com/russolsen/dejour
Thanks all for help.
On Aug 17, 6:41 pm, David Nolen dnolen.li...@gmail.com wrote:
On Tue, Aug 17, 2010 at 10:59 AM, HB hubaghd...@gmail.com wrote:
Hey,
How to install Clojure on Mac OS X?
I googled the web, some use
://clojure.org/concurrent_programming
On Mon, Aug 16, 2010 at 4:32 AM, Wilson MacGyver wmacgy...@gmail.com wrote:
It's clojure's STM(Software Transaction Memory). More info
athttp://clojure.org/concurrent_programming
On Aug 15, 2010, at 11:26 PM, HB hubaghd...@gmail.com wrote:
Hey,
I
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
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 -
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 marvot...@gmail.com wrote:
On Wed, 14 Jan 2009 04:15:18 -0800 (PST)
HB hubaghd...@gmail.com wrote:
Lets say that the result of each method invocation will be saved
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 squee...@mac.com wrote:
On Jan 15, 2009, at 7:28 AM, HB wrote:
Do *1 *2 *3 ... are saved in a built in sequence that we can inspect
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 ?
Environment:
evaluations count.
In short, you were Heisenberged.
--Steve
On Jan 14, 2009, at 3:59 AM, HB hubaghd...@gmail.com wrote:
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
into the stack.
So the stack now contains:
Google, Wicket, Wicket
Am I right?
On Jan 14, 1:33 pm, Martin Wood-Mitrovski marvot...@gmail.com wrote:
On Wed, 14 Jan 2009 02:47:23 -0800 (PST)
HB hubaghd...@gmail.com wrote:
I didn't get you, would you please hold my hand and walking me as you
explain line
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 evier...@gmail.com wrote:
is that just
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 opus...@gmail.com wrote:
Hi Aria,
Actually, I am just in the process of writing up the install
instructions. Watch this space!
aria42 wrote:
Did you
(conj {:arglists (list 'quote (sigs fdecl))} m)]
(list 'def (with-meta name (conj (if (meta name) (meta name)
{}) m))
(cons `fn fdecl)
On Jan 13, 8:51 am, HB hubaghd...@gmail.com wrote:
Hey,
How much Clojure source code is complicated?
I'm not a programming
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 hubaghd...@gmail.com wrote:
Do you suggest that I read Programming Clojure first and then trying
to study the source code?
What is the best place (file, package
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.com/p/clojure/source/browse/trunk/src/?r=1205#src/...
On Jan 13, 9:41 am, HB
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
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
To
What is (Yet Another Clojure Snake)?
Something like YACC?
On Jan 12, 1:15 pm, Tom Ayerst tom.aye...@gmail.com 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 tom.aye...@gmail.com
Hi,
Following in a growing
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
62 matches
Mail list logo