Re: new Getting Started page

2011-09-03 Thread Kevin Downey
The idea that the way to get started is with a fancy editor and a fancy ide is just crazy. The way to get started with Clojure is: write functions, and run them, and be happy. None of that requires any of the mandated complications that come from sophisticated editing environments. Now once you

Re: not= counterintuitive?

2011-09-03 Thread Vijay Lakshminarayanan
ax2groin ax2gr...@gmail.com writes: This code doesn't return the value I intuitively expect: user= (not= 1 2 1) true When I write that, I was expecting the equivalent of (and (= 1 2) (= 1 1)), but the macro expansion is essentially (not (= 1 2 1)). If you were expecting (not (and (= 1

Re: clojure-based non-blocking webserver like Node.js

2011-09-03 Thread Andreas Kostler
Can someone explain please what class threads are?? And whether is threads are expensive depends on the is On Sep 3, 2011 5:09 AM, Raoul Duke rao...@gmail.com wrote: On Fri, Sep 2, 2011 at 11:20 AM, billh2233 bill.har...@gmail.com wrote: I like Node.js's non-blocking IO for performance

Re: new Getting Started page

2011-09-03 Thread Ambrose Bonnaire-Sergeant
I think the closer we get to recommending the equivalent of DrRacket for Racket, the better. Clooj has that lightweight feel, like DrRacket. It's not intimidating, and the basics are laid out in front of you. I've never used a command line REPL for Clojure that didn't suck in some way. I'd want

Re: Eval in future ... Bug or feature?

2011-09-03 Thread Nils Bertschinger
On Sep 3, 2:35 am, Brian Goslinga quickbasicg...@gmail.com wrote: The future is probably executing in a different thread, so the dynamic binding of *ns* probably isn't the user namespace. Thanks Brian. That's exactly what happens: user (future *ns*) #core$future_call$reify__5496@489a44f1:

Re: not= counterintuitive?

2011-09-03 Thread Alex Baranosky
Sounds like you want a function such as: none= On Sep 3, 2011 4:30 AM, Vijay Lakshminarayanan liyer.vi...@gmail.com wrote: ax2groin ax2gr...@gmail.com writes: This code doesn't return the value I intuitively expect: user= (not= 1 2 1) true When I write that, I was expecting the equivalent

Re: Eval in future ... Bug or feature?

2011-09-03 Thread Meikel Brandmeyer
Hi, Am 03.09.2011 um 15:22 schrieb Nils Bertschinger: Thus, I have to either re-bind *ns* or use one of the bound-fn forms: Or use syntax-quote (`) instead of normal quote ('). quote is in 95% of the cases not what you want. Sincerely Meikel -- You received this message because you are

Re: not= counterintuitive?

2011-09-03 Thread Chouser
On Sat, Sep 3, 2011 at 10:59 AM, Alex Baranosky alexander.barano...@gmail.com wrote: Sounds like you want a function such as: none= ...which could be written as #(not-any? #{1} [1 2 3]) --Chouser -- You received this message because you are subscribed to the Google Groups Clojure group. To

Re: not= counterintuitive?

2011-09-03 Thread Despite
On Sep 2, 4:48 pm, ax2groin ax2gr...@gmail.com wrote: That's what I get for posting a question while feeding a 1-year-old child and getting ready to leave for lunch. I was trying to put together a (for) construct to output the combinations of a set, and my logic was flawed. Here's what I

Re: new Getting Started page

2011-09-03 Thread Sean Corfield
On Fri, Sep 2, 2011 at 11:11 PM, Kevin Downey redc...@gmail.com wrote: I spent a lot of time on a windows netbook writing solutions to euler project problems notepad++ and just pasting the functions into a repl running in a console. It worked great. Yup, and that's just fine _for you_ but you

Re: new Getting Started page

2011-09-03 Thread Laurent PETIT
Sean, I agree with you, of course 2011/9/3 Sean Corfield seancorfi...@gmail.com On Fri, Sep 2, 2011 at 11:11 PM, Kevin Downey redc...@gmail.com wrote: I spent a lot of time on a windows netbook writing solutions to euler project problems notepad++ and just pasting the functions into a repl

Re: new Getting Started page

2011-09-03 Thread Colin Yates
For me, unlearning 15 years of OO and Java/j2ee makes a trifle thing like a new environment a walk in the park :) My semi-serious point is that as a beginner the question being answered is more like what is it all about and how can I try these samples/examples rather than how do I do 'proper'

Re: new Getting Started page

2011-09-03 Thread Laurent PETIT
2011/9/3 Colin Yates colin.ya...@gmail.com For me, unlearning 15 years of OO and Java/j2ee makes a trifle thing like a new environment a walk in the park :) My semi-serious point is that as a beginner the question being answered is more like what is it all about and how can I try these

Documentation For Lisp Programming in Clojure.

2011-09-03 Thread octopusgrabbus
I have seen the three current books on Clojure. They are all good general books that describe the whole language. I have not had a chance to see Chas Emerick's new Clojure O'Reilly book, so cannot comment on that. Are there any books available or upcoming that concentrate more on Lisp

Re: new Getting Started page

2011-09-03 Thread Lee Spector
On Sep 3, 2011, at 2:58 PM, Colin Yates wrote: My semi-serious point is that as a beginner the question being answered is more like what is it all about and how can I try these samples/examples rather than how do I do 'proper' enterprise development with this. The best answer for the

Re: Differences Between seq? and sequential?

2011-09-03 Thread Alan Malloy
user (map (juxt seq? sequential?) '([1 2] (1 2))) ([false true] [true true]) All seqs are sequential, but not all sequential things are seqs. On Sep 3, 12:14 pm, octopusgrabbus octopusgrab...@gmail.com wrote: I've noticed that solutions to rolling your own Clojure flatten involve the

An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Chris Granger
Hey Folks, With the release of 1.3 growing ever nearer, it's time that we as a community do everything we can to make the migration smooth. In general, this means relatively simple changes to the libs under your control, but I also think we should take this opportunity to do some house cleaning.

Re: not= counterintuitive?

2011-09-03 Thread Meikel Brandmeyer
Hi, Am 03.09.2011 um 19:30 schrieb Despite: So, you want to make sure each value in the vector is unique? My first thought was to put them into a set, then see if the set was equal to the vector, but clojure's equality doesn't allow for that. And if you put the set back into a vector,

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Alan Malloy
I prefer to use ^{:dynamic true} instead of ^:dynamic, unless you're recommending intentionally breaking compatibility with 1.2 so as to encourage people to move to 1.3. On Sep 3, 12:27 pm, Chris Granger ibdk...@gmail.com wrote: Hey Folks, With the release of 1.3 growing ever nearer, it's time

Re: not= counterintuitive?

2011-09-03 Thread Alan Malloy
(= (seq v) (distinct v)) will short-circuit as soon as an inequality is found. On Sep 3, 12:47 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 03.09.2011 um 19:30 schrieb Despite: So, you want to make sure each value in the vector is unique?  My first thought was to put them into a set,

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Mark Rathwell
I prefer to use ^{:dynamic true} instead of ^:dynamic, unless you're recommending intentionally breaking compatibility with 1.2 so as to encourage people to move to 1.3. What is meant by breaking compatibility? I haven't noticed any issues using ^:dynamic with 1.2, am I missing something?

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Brian Goslinga
On Sep 3, 3:13 pm, Alan Malloy a...@malloys.org wrote: I prefer to use ^{:dynamic true} instead of ^:dynamic, unless you're recommending intentionally breaking compatibility with 1.2 so as to encourage people to move to 1.3. Presumably you would be doing this on a 1.3 branch of your code. --

coming from statically typed oo languages - how do deal with complex objects graphs in clojure?

2011-09-03 Thread HamsterofDeath
this might seem like a stupid question, but for me, not knowing the type of something is like being stuck in a dead end for anything non trivial. i've made a few little experiments with clojure (not much, just testing some features) and i see how powerful clojure can be - for small to medium sized

Re: clojure-based non-blocking webserver like Node.js

2011-09-03 Thread Sergey Didenko
On Sat, Sep 3, 2011 at 3:01 AM, Tal Liron tal.li...@gmail.com wrote: I always ask, though, why people think they need async I/O for a web server. Async might be important if you are streaming video, audio, etc. (And if you are, you're probably better off with a robust CDN.) Async can also

Re: new Getting Started page

2011-09-03 Thread nchurch
2. Fun stuff to do with the basic repl     - some swing stuff         - copy and pastable code snippets     - some parallel stuff with futures or pmap or something     - something with the stm     - agents are cool, right?     - links to 4clojure and project euler Kevin I think

Re: coming from statically typed oo languages - how do deal with complex objects graphs in clojure?

2011-09-03 Thread Luc Prefontaine
On Sat, 3 Sep 2011 13:43:42 -0700 (PDT) HamsterofDeath d.haup...@googlemail.com wrote: this might seem like a stupid question, but for me, not knowing the type of something is like being stuck in a dead end for anything non trivial. It's not stupid, it's normal :) In functional programming,

Re: coming from statically typed oo languages - how do deal with complex objects graphs in clojure?

2011-09-03 Thread Sergey Didenko
You can also put a commented out example call of the function, like this: (defn some-magic [spells wizards] ...) ; (some-magic 5 [:gendalf :einstein]) Which is also handy for quick evaluation in the REPL. Or you can put these example calls in the (automatic) test code. -- You received this

Re: new Getting Started page

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 11:58 AM, Colin Yates colin.ya...@gmail.com wrote: Getting started should be the smallest set of steps possible; the REPL. http://try-clojure.org is probably the very simplest step. Nothing to download or install and it has a built in tutorial. And that is the very first

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Lee Hinman
I recommend the lein-multi plugin for testing against multiple versions of Clojure: https://github.com/maravillas/lein-multi Makes it easy to make sure you continue to support both 1.2 and 1.3 for a while. On Sep 3, 1:27 pm, Chris Granger ibdk...@gmail.com wrote: Hey Folks, With the release

Re: new Getting Started page

2011-09-03 Thread Lee Spector
On Sep 3, 2011, at 5:29 PM, nchurch wrote: I've edited the page a little bit to make it less prescriptive towards Clooj. http://dev.clojure.org/display/doc/Getting+Started+for+Beginners I like the revision too. I'm not even sure we should put up labrepl, because there are no

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 3:43 PM, Lee Hinman matthew.hin...@gmail.com wrote: I recommend the lein-multi plugin for testing against multiple versions of Clojure: https://github.com/maravillas/lein-multi Makes it easy to make sure you continue to support both 1.2 and 1.3 for a while. Good idea.

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Luc Prefontaine
Being curious I checked references to contrib in our code base. Anyone knows what will happen to clojure.contrib.def and clojure.contrib.trace ? Luc P. On Sat, 3 Sep 2011 15:43:06 -0700 (PDT) Lee Hinman matthew.hin...@gmail.com wrote: I recommend the lein-multi plugin for testing against

Re: Stanford AI Class

2011-09-03 Thread myriam abramson
Good news! The FAQ mentions that any programming language will do. On Mon, Aug 8, 2011 at 2:47 PM, labwor...@gmail.com wrote: As most of you probably already know, Peter Norvig and S. Thrun will offer a free online intro to AI class in the Fall. The problem is that it will probably require

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 4:40 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: Being curious I checked references to contrib in our code base. Anyone knows what will happen to clojure.contrib.def and clojure.contrib.trace ? According to

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Luc Prefontaine
Thanx I crossed another list in a different page stating the new names and structures but did not find this one. I'll keep the bookmark. So the only thing left on my list is c.c.trace. Any ideas of the future plans ? Need a volunteer ? Is there a bigger plan to regroup dev utilities ? Luc On

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Sean Corfield
On Sat, Sep 3, 2011 at 5:37 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: So the only thing left on my list is c.c.trace. Any ideas of the future plans ? Stuart Sierra may chip in since he seems to have been the author of that? It does look useful. -- Sean A Corfield -- (904)

Re: clojure and emacs

2011-09-03 Thread Benny Tsai
You can set lein repl as your inferior lisp program via: M-x describe-variable inferior-lisp-program And as long as you start emacs somewhere in your lein project directory (or M-x cd to it), you'll have all the libraries loaded in your REPL buffer. On Thursday, September 1, 2011 11:03:13 AM

Re: clojure and emacs

2011-09-03 Thread Benny Tsai
Sorry, what I meant to say in the last line is: And as long as you start emacs somewhere in your lein project directory (or M-x cd to it), you'll automatically be dropped into the main namespace (if you have one defined via :main in project.clj), and the other project namespaces will be

Re: An open call to the community: Let's prepare for 1.3

2011-09-03 Thread Luc Prefontaine
Hi Phil, We use Eclipse/CCW, not much choices here, we have a mixed language app and as I age I have less memory space for different dev tools :) I'll ask Stuart if he has any plans for this. On Sat, 3 Sep 2011 20:37:36 -0700 Phil Hagelberg p...@hagelb.org wrote: On Sat, Sep 3, 2011 at 5:37