Re: noob questions - Hello world + learning

2014-07-03 Thread Andy Fingerhut
In your example, [1 2 3 4 5] allocates and initializes a vector with the 5 elements 1 2 3 4 5. The first (def my-vec ...) also allocates a Var, and makes it 'point' at the vector [1 2 3 4 5]. When you do (assoc my-vec 2 "hello"), it looks up the current value pointed at by my-vec, which is the im

Re: noob questions - Hello world + learning

2014-07-03 Thread Evan Zamir
New to Clojure (find it fascinating so far, in large part due to watching approximately a billion Rich Hickey vids on YouTube). I had a similar question and figured I just resurrect this thread on it. My naive thought was that when you (re)def a variable, you aren't actually copying over the ol

Re: noob questions - Hello world + learning

2010-06-15 Thread Adrian Cuthbertson
Hi Jared, Some good clojure specific learning resources; http://java.ociweb.com/mark/clojure/article.html and the essential http://clojure.org/ - Regards, Adrian -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to

Re: noob questions - Hello world + learning

2010-06-15 Thread David Nolen
On Mon, Jun 14, 2010 at 4:09 PM, Jared wrote: > I'm trying to grok this hello world template before I move on to other > stuff. What is the ns line for? I read the documentation on ns, but it > didn't make much sense to me. Is ns related to scope? All I know is > when I delete the ns line the pro

Re: noob questions - Hello world + learning

2010-06-15 Thread Joost
On Jun 14, 10:09 pm, Jared wrote: > Also, I thought this language is functional but I'm able to do change > declarations in the repl. For example: > user=> (def x 1) > #'user/x > user=> x > 1 > user=> (def x 2) > #'user/x > user=> x > 2 > user=> (def x (+ 1 x)) > #'user/x > user=> x > 3 > > Why do

Re: noob questions - Hello world + learning

2010-06-15 Thread Jared
I want to thank everyone for the helpful comments, and no worries about the typing nickikt. I'll check out SICP. I've been playing around in the repl, getting used to prefix notation, and I found out the doc command. It makes learning this stuff much faster. I guess I should have been more clear

Re: noob questions - Hello world + learning

2010-06-14 Thread nickikt
Hello, I have a some comments (on comments and more :)) First this (comment . ) There are diffrent kind ofs comments. If you just want to note something you can do ; but mabey you want to have a example how to use something in your Code then use (comment ). With "defn" you creat a new f

Re: noob questions - Hello world + learning

2010-06-13 Thread Moritz Ulrich
I don't think that Structure and Interpretion of Computer Programs is a good first-book if you want to start lisp-programming (Especially Clojure). It's very detailed and gives much insights, but Clojure is way more practical than this book. If you want to start programming Clojure, I'd recommend "

Re: noob questions - Hello world + learning

2010-06-13 Thread David Nolen
If your are new to programming I recommend reading at least the first three chapters of The Structure and Interpretation of Computer Programs. It's available online. David On Friday, June 11, 2010, Jared wrote: > Hi everyone, > > I'm 100% new to LISP, 95% new to Java, and 90% new to programming