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

2011-03-26 Thread ultranewb
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.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Base
Thank you all so much (and michaelyou rock!!)

I will give Riak a shot.

Thanks again.


On Mar 26, 5:55 pm, Benny Tsai  wrote:
> A Clojure wrapper for neo4j was recently 
> posted:https://github.com/wagjo/borneo
>
> There's also Jiraph, another embedded graph database for 
> Clojure:https://github.com/ninjudd/jiraph

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Emacs with Lisp and Clojure.

2011-03-26 Thread Daniel Bell
http://thtatithticth.blogspot.com/2011/02/obligatory-development-environment-post.html

On Mar 24, 11:31 am, MarisO  wrote:
> swank-clojure is deprecated, don't use it.  Instead start swank from
> leiningen.
>
> I found these instructions how to install clojure support in 
> emacshttp://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html
>
> No need to use elpa with broken packages or starter-kit.
>
> Maris
>
> On Mar 24, 8:14 am, Tassilo Horn  wrote:
>
> > mmwaikar  writes:
> > > But the same enter key works properly when I am using Lisp, so why
> > > shouldn't it be the default in Clojure as well?
>
> > What's considered "properly" for RET is purely subjective. :-)
>
> > But I have to admit that I was wrong.  When paredit-mode is enabled, RET
> > is indeed bound to `paredit-newline', which does indentation
> > automatically.  For me that does the trick for Clojure, Elisp, and CL
> > buffers...
>
> > > Also, after removing clojure-mode, when I try to install swank-
> > > clojure, it again installs the clojure-mode, but fails to install
> > > itself?
>
> > Do you get some error messages?
>
> > Using emacs 24 from bzr, I only added
>
> >   (add-to-list 'package-archives
> >                '("technomancy" . "http://repo.technomancy.us/emacs/";) t)
>
> > to get the most recent packages from technomancy listed in M-x
> > package-list-packages, and there I installed these ones:
>
> >   clojure-mode      1.8.0       installed  Major mode for Clojure code
> >   slime             20100404.1  installed  Superior Lisp Interaction Mode 
> > for Emacs
> >   slime-repl        20100404    installed  Read-Eval-Print Loop written in 
> > Emacs Lisp
> >   swank-clojure     1.1.0       installed  Slime adapter for clojure
>
> > Bye,
> > Tassilo

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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

2011-03-26 Thread Daniel Bell
I'm sure you're sick of how-to's by now (I was), but I took the
trouble to write down EXACTLY what I did for an Ubuntu/emacs/swank/
SLIME/leiningen set-up.

On Mar 26, 5:40 pm, Mark Engelberg  wrote:
> On Sat, Mar 26, 2011 at 4:29 PM, ultranewb  wrote:
> > On Mar 27, 12:35 am, Mark Engelberg  wrote:
> >> Type some Clojure code into the file you created.  Save periodically
> >> with "Ctrl-x Ctrl-s".  When you want to try out your code, type
> >> "Ctrl-c ctrl-k" and all your code will be evaluated and those
> >> definitions will now be available for interactive use in your REPL.
>
> > Everything works up until C-c Ck, where I get a "C-c C-k is undefined"
> > error :-(
>
> 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.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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

2011-03-26 Thread Mark Engelberg
On Sat, Mar 26, 2011 at 4:29 PM, ultranewb  wrote:
> On Mar 27, 12:35 am, Mark Engelberg  wrote:
>> Type some Clojure code into the file you created.  Save periodically
>> with "Ctrl-x Ctrl-s".  When you want to try out your code, type
>> "Ctrl-c ctrl-k" and all your code will be evaluated and those
>> definitions will now be available for interactive use in your REPL.
>
> Everything works up until C-c Ck, where I get a "C-c C-k is undefined"
> error :-(

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.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Jesus, how the heck to do anything?

2011-03-26 Thread ultranewb
On Mar 27, 12:16 am, Preecha P  wrote:
> I think you should take a look at clojure box again. You could split
> the windows and have both code/repl open at the same times.

Doesn't work for me.  See this thread:
http://groups.google.com/group/clojure/browse_thread/thread/3c61be467d783415

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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

2011-03-26 Thread ultranewb
On Mar 27, 12:35 am, Mark Engelberg  wrote:
> Type some Clojure code into the file you created.  Save periodically
> with "Ctrl-x Ctrl-s".  When you want to try out your code, type
> "Ctrl-c ctrl-k" and all your code will be evaluated and those
> definitions will now be available for interactive use in your REPL.

Everything works up until C-c Ck, where I get a "C-c C-k is undefined"
error :-(

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Benny Tsai
A Clojure wrapper for neo4j was recently posted:
https://github.com/wagjo/borneo

There's also Jiraph, another embedded graph database for Clojure:
https://github.com/ninjudd/jiraph

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Wilson MacGyver
Since you want a graph db with search, and you want to use it with clojure 
which means at least a decent java API.

I recommend you check out 
http://neo4j.org/

It's a graph db with search ability, and has a very good java API.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Announcement: flutter - hiccup-based form field generation

2011-03-26 Thread Joost
I'm currently working on a library to provide a consistent and
extensible method for generating form fields, based on hiccup.

The code is at github: https://github.com/joodie/flutter

The README should give you a decent indication of what I'm aiming for.
In any case, this library will NOT provide validation routines (though
it should integrate nicely with clj-decline or whatever you might
prefer). I'm keeping my sights on the "do one thing, but do it right"
goal.

I'm still working on the tests, but in any case, the tests are the
right spot to look at right now to see some examples.

Some more convenience functions should be coming soon. For now, I've
been mostly trying to get a consistent internal API.

Check it out if you want. Let me know if the API prevents you from
doing stuff; preferably using pull requests ~ assume that I'm lazy and
you'll have a good chance that I'll accept your suggestions :-)

Cheers,
Joost Diepenmaat
Zeekat Softwareontwikkeling.
http://joost.zeekat.nl

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Sean Allen
On Sat, Mar 26, 2011 at 4:12 PM, Base  wrote:
> Thanks All!  I guess I didnt even realize that they were so different
> (though that certainly makes sense).
>
> Basically I want to design a system that will have maybe 30M
> (eventually) complex graphs of data that need to be searchable through
> either pattern matching or unification or ?...
> The pattern s could conceivably become very complicated.
>
> My thought was that this would need to scale out horizontally and
> allow for a map-reduce like process to burn through these searches
> (though at this point i am still planning this part out and currently
> have my data in an RDBMS (using H2 in development - great little
> database).
>
> This is very new territory for me, as i am very much used to working
> with traditional databases so I kind of dont know where to start...
>

Couchdb and other document oriented stores def sound like
they wouldnt be what you are looking for.

I havent done anything really like what you are doing so I don't know
what would be right, I have done some work with Couchdb
and know it wouldnt be the best fit for what you are doing.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Noob Question - Clojure number rounding

2011-03-26 Thread .Bill Smith
I think that is what Brenton posted on Mar 23.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Michael Ossareh
On Sat, Mar 26, 2011 at 13:12, Base  wrote:

> Thanks All!  I guess I didnt even realize that they were so different
> (though that certainly makes sense).
>
> Basically I want to design a system that will have maybe 30M
> (eventually) complex graphs of data that need to be searchable through
> either pattern matching or unification or ?...
> The pattern s could conceivably become very complicated.
>
> My thought was that this would need to scale out horizontally and
> allow for a map-reduce like process to burn through these searches
> (though at this point i am still planning this part out and currently
> have my data in an RDBMS (using H2 in development - great little
> database).
>

That helps, so you need:

 - key:value store
 - support for graph structures.
 - mapreduce

My experience is with Riak, and none of the others, which can certainly help
you here (in the same order as above):

 - You store your objects,
 - You can define links between objects,
 - You can walk these links during map reduce jobs


This is very new territory for me, as i am very much used to working
> with traditional databases so I kind of dont know where to start...
>


http://mmcgrana.github.com/2010/08/riak-clojure.html does a decent job of
giving you a low down on riak with clojure. I've accentuated the api to
permit storing links against your objects:
https://github.com/ossareh/clj-riak - this hasn't been pulled into Mark's
main branch yet. A high level run through (tested):

(ns riak-test
  (:require [clj-riak.client :as riak]
[clojure.contrib.json :as json]))

(def rc (riak/init {:host "127.0.0.1" :port 8087}))

(defn fetch [type key]
  (try
(let [bucket (name type)
  val (riak/get rc bucket key)

  links (:links val)

  val (->> val
 :value
 String.
 json/read-json)]

  (with-meta val {:links links}))
(catch Exception e nil)))

(defn put [bucket key data]
  (let [bucket (name bucket)
 links (or (:links (meta data)) '())

data {:value (.getBytes (json/json-str data))
:content-type "application/json"
:links links}]

(riak/put rc bucket key data)))

(defn link [obj to-type to-id type]
  (let [links (:links (meta obj))

links (conj links {:bucket (name to-type)
   :key to-id
   :tag (name type)})]

(with-meta obj {:links links})))


;; now you can store objects with links.
(put :test "foo" {:some "data" :about {:your "domain"}})

(put :test "bar" (link {:more "data"}
 :test "foo" :example))


;; The following is from the repl

riak-test> (fetch :test "foo")
{:some "data", :about {:your "domain"}}

riak-test> (fetch :test "bar")
{:more "data"}
riak-test> (:links (meta (fetch :test "bar")))
({:bucket "test", :key "foo", :tag "example"})



Now you'd have two independent objects in riak, which during map reduce
could be used in a graph like manner. In this case the "bar" object points
to the "foo" object.


A point worth making is that Riak is a dynamo based kv store. Which, most
notably to a RDBMS user, means you don't have the concept of updating in
place. That is, if I wanted to change the bar object to have a key of :name
with a value of "bob" you have to do this:

riak-test> (put :test "bar" (assoc (fetch :test "bar") :name "bob"))
nil
riak-test> (fetch :test "bar")
{:name "bob", :more "data"}

i.e.

fetch bar,
assoc bar :name bob
put result.

HTH



> On Mar 26, 2:55 pm, Michael Ossareh  wrote:
> > On Sat, Mar 26, 2011 at 12:15, Michael Ossareh 
> wrote:
> >
> > > On Sat, Mar 26, 2011 at 09:56, Base  wrote:
> >
> > >> hi All -
> >
> > >> Any recommendations on a NoSQL database to use with clojure?  I am
> > >> experimenting if it will fit my project better than a SQL db and have
> > >> no real experience with them.
> >
> > > I've replaced my rdbms with Riak (www.basho.com).
> >
> > >> Strong clojure support is obviously important for this.  The only one
> > >> I know of is MongoDb...
> >
> > > It doesn't have the best clojure interface into it unfortunately, so if
> > > you're looking for 0-60 in the shortest time choose something else. It
> is a
> > > medium term plan of mine to build a clojure implementation.
> >
> >  a clojure implementation of the interface into riak.
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > >> Thoughts??
> >
> > > Were I making the decisions again, i'd definitely look into Redis. Not
> > > least because every page of their documentation has a live redis
> connection
> > > on it, so you can play with the function which you're reading about:
> > >http://redis.io/commands/expire
> >
> > >> Thanks
> >
> > >> Base
> >
> > >> --
> > >> 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 - ple

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Base
Thanks All!  I guess I didnt even realize that they were so different
(though that certainly makes sense).

Basically I want to design a system that will have maybe 30M
(eventually) complex graphs of data that need to be searchable through
either pattern matching or unification or ?...
The pattern s could conceivably become very complicated.

My thought was that this would need to scale out horizontally and
allow for a map-reduce like process to burn through these searches
(though at this point i am still planning this part out and currently
have my data in an RDBMS (using H2 in development - great little
database).

This is very new territory for me, as i am very much used to working
with traditional databases so I kind of dont know where to start...

On Mar 26, 2:55 pm, Michael Ossareh  wrote:
> On Sat, Mar 26, 2011 at 12:15, Michael Ossareh  wrote:
>
> > On Sat, Mar 26, 2011 at 09:56, Base  wrote:
>
> >> hi All -
>
> >> Any recommendations on a NoSQL database to use with clojure?  I am
> >> experimenting if it will fit my project better than a SQL db and have
> >> no real experience with them.
>
> > I've replaced my rdbms with Riak (www.basho.com).
>
> >> Strong clojure support is obviously important for this.  The only one
> >> I know of is MongoDb...
>
> > It doesn't have the best clojure interface into it unfortunately, so if
> > you're looking for 0-60 in the shortest time choose something else. It is a
> > medium term plan of mine to build a clojure implementation.
>
>  a clojure implementation of the interface into riak.
>
>
>
>
>
>
>
>
>
> >> Thoughts??
>
> > Were I making the decisions again, i'd definitely look into Redis. Not
> > least because every page of their documentation has a live redis connection
> > on it, so you can play with the function which you're reading about:
> >http://redis.io/commands/expire
>
> >> Thanks
>
> >> Base
>
> >> --
> >> 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 - please be patient with
> >> your first post.
> >> To unsubscribe from this group, send email to
> >> clojure+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/clojure?hl=en

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Michael Ossareh
On Sat, Mar 26, 2011 at 12:15, Michael Ossareh  wrote:

>
>
> On Sat, Mar 26, 2011 at 09:56, Base  wrote:
>
>> hi All -
>>
>> Any recommendations on a NoSQL database to use with clojure?  I am
>> experimenting if it will fit my project better than a SQL db and have
>> no real experience with them.
>>
>>
> I've replaced my rdbms with Riak (www.basho.com).
>
>
>> Strong clojure support is obviously important for this.  The only one
>> I know of is MongoDb...
>>
>
> It doesn't have the best clojure interface into it unfortunately, so if
> you're looking for 0-60 in the shortest time choose something else. It is a
> medium term plan of mine to build a clojure implementation.
>

 a clojure implementation of the interface into riak.


>
>
>>
>> Thoughts??
>>
>
> Were I making the decisions again, i'd definitely look into Redis. Not
> least because every page of their documentation has a live redis connection
> on it, so you can play with the function which you're reading about:
> http://redis.io/commands/expire
>
>
>
>>
>> Thanks
>>
>> Base
>>
>> --
>> 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 - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
>

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Timothy Washington
I briefly tried out FleetDB , which is a DB with a
clojure, s-expression data model. It works very well for what it does. But
there were things I needed that it didn't supply:


   - A) adding / searching within sub-directories
   - B) inability to search within a document that's more than 1 level deep


I'm currently trying out MongoDB with
congomongo on
a test project. It mostly works very well, although I haven't tested it out
under load. The main gap I'm finding though, is that


   - A) congomongo doesn't handle (from what I can see) Mongo's DB
   references as described
here



HTH
Tim Washington


On Sat, Mar 26, 2011 at 3:15 PM, Michael Ossareh  wrote:

>
>
> On Sat, Mar 26, 2011 at 09:56, Base  wrote:
>
>> hi All -
>>
>> Any recommendations on a NoSQL database to use with clojure?  I am
>> experimenting if it will fit my project better than a SQL db and have
>> no real experience with them.
>>
>>
> I've replaced my rdbms with Riak (www.basho.com).
>
>
>> Strong clojure support is obviously important for this.  The only one
>> I know of is MongoDb...
>>
>
> It doesn't have the best clojure interface into it unfortunately, so if
> you're looking for 0-60 in the shortest time choose something else. It is a
> medium term plan of mine to build a clojure implementation.
>
>
>>
>> Thoughts??
>>
>
> Were I making the decisions again, i'd definitely look into Redis. Not
> least because every page of their documentation has a live redis connection
> on it, so you can play with the function which you're reading about:
> http://redis.io/commands/expire
>
>
>
>>
>> Thanks
>>
>> Base
>>
>> --
>> 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 - please be patient with
>> your first post.
>> To unsubscribe from this group, send email to
>> clojure+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/clojure?hl=en
>
>
>  --
> 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 - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
>

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: int or long as map key

2011-03-26 Thread Stuart Sierra
Through version 1.2.0, Clojure used Java's Object.equals method for map 
lookups.  Java specifies Object.equals to be false for numbers of different 
types.

Clojure 1.3.0-alpha* uses its own = function for map lookups specifically to 
avoid this problem.  The = function is true for numbers of different types 
but the same value.  Note that Java code dealing with Clojure maps using the 
java.util.Map interface will still get the standard Java behavior using 
Object.equals.

Clojure 1.3.0-alpha* also uses longs by default for all integer literals.

Clojure 1.3.0-master-SNAPSHOT
user=> (def m {1 10 2 20})
#'user/m
user=> (m 2)
20
user=> (m (long 2))
20
user=> (type 2)
java.lang.Long

Stuart Sierra
clojure.com

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Michael Ossareh
On Sat, Mar 26, 2011 at 09:56, Base  wrote:

> hi All -
>
> Any recommendations on a NoSQL database to use with clojure?  I am
> experimenting if it will fit my project better than a SQL db and have
> no real experience with them.
>
>
I've replaced my rdbms with Riak (www.basho.com).


> Strong clojure support is obviously important for this.  The only one
> I know of is MongoDb...
>

It doesn't have the best clojure interface into it unfortunately, so if
you're looking for 0-60 in the shortest time choose something else. It is a
medium term plan of mine to build a clojure implementation.


>
> Thoughts??
>

Were I making the decisions again, i'd definitely look into Redis. Not least
because every page of their documentation has a live redis connection on it,
so you can play with the function which you're reading about:
http://redis.io/commands/expire



>
> Thanks
>
> Base
>
> --
> 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 - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Vivek Khurana
On Sat, Mar 26, 2011 at 10:26 PM, Base  wrote:
> hi All -
>
> Any recommendations on a NoSQL database to use with clojure?  I am
> experimenting if it will fit my project better than a SQL db and have
> no real experience with them.
>
> Strong clojure support is obviously important for this.  The only one
> I know of is MongoDb...
>
> Thoughts??

 What problem are you trying to solve ? I am using mongodb with
clojure with no issues..

regards
Vivek

-- 
The hidden harmony is better than the obvious!!

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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

2011-03-26 Thread Mark Engelberg
On Sat, Mar 26, 2011 at 10:24 AM, ultranewb  wrote:
> Clojure Box -
> Could get a REPL, couldn't figure out how to do anything else (i.e.
> Leinegen blah blah).  Result - kept the install, as this was the 2nd
> most promising solution tried thus far.

If you don't care about building projects into self-executable jars,
try the following in Clojure Box:

After starting Clojure Box, use "Ctrl-x 2" to split the window.  The
keystroke "Ctrl-x o" moves you back and forth between the two panes
(or click with the mouse within the pane that you want to have the
focus).  In one of the panes, create a new file with "Ctrl-x Ctrl-f"
and name it with the .clj extension.  The other pane should still show
the REPL.

Type some Clojure code into the file you created.  Save periodically
with "Ctrl-x Ctrl-s".  When you want to try out your code, type
"Ctrl-c ctrl-k" and all your code will be evaluated and those
definitions will now be available for interactive use in your REPL.

I used Clojure for many months in this manner before I started caring
about project files and such.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


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

2011-03-26 Thread ultranewb
NetBeans w/ Enclosure -
Could get a REPL, couldn't figure out how to do anything else.  Result
- uninstalled.

IntelliJ w/ La Clojure -
Could get a REPL, couldn't figure out how to do anything else.  In
particular, I followed some specific instructions from somewhere
(can't remember where) for how to set up a project, edit a source file
(hello world or whatever), and "run" that source file.  All I got was
some kind of error.  Result - uninstalled.

Configuring already-owned version of Emacs -
Followed varying instructions from various websites and how-to's -
mostly using elpa to download this and that.  Used elpa, but could
never successfully get anything to work afterwards.  Result - kept the
install for other projects I am using Emacs for.

Clojure Box -
Could get a REPL, couldn't figure out how to do anything else (i.e.
Leinegen blah blah).  Result - kept the install, as this was the 2nd
most promising solution tried thus far.

ClojureW -
So far, this is the only thing that "just works" for me.  Just
download, add the path to the bin directory, DONE.  Can get a REPL,
but more importantly, can easily "run" a source file by doing "clj
sourcefile."  The only thing that didn't work was the jline thing
(tried clj -jl per the instructions, and also clj -jline just for the
heck of it, both fail).

ClojureW UPDATE:  Out of the blue, tried clj jline and that seemed to
work as far as running this jline thing.  In other words, it didn't
give an error, and when I hit the up arrow, it shows historical
commands.  To run a file like this (although in hindsight, I don't
know what that gives you), do: clj cljfile.clj jline

I guess the optimum solution I see for myself at this point is getting
Clojure Box to talk to ClojureW (i.e. editing a source file with
Clojure Box, then "running" that source inside some Emacs window by
running clj).  I'm guessing this would be trivial for the Emacs
experts out there, but if someone wants to point me to a quick
resource on it, I'll try it.

For the time being, my personal suggestion to any newbs coming along
is to try ClojureW:

https://bitbucket.org/kasim/clojurew

Perhaps the link should be posted more prominently somewhere, if it
isn't already?  A further suggestion - perhaps Clojure Box could be
rigged to use ClojureW "out of the box."  This would give a working
IDE by simply downloading the package and running it.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Jesus, how the heck to do anything?

2011-03-26 Thread Sean Allen
On Wed, Mar 23, 2011 at 11:04 PM, ultranewb  wrote:
> On Mar 24, 7:26 am, Armando Blancas  wrote:
>> That's quite alright. Nine out of ten people here hate java;
>
> Actually, I didn't know that.  I imagined that 9 out of 10 people here
> would be java-ites.  It's good to know that I'm in good company.
>

The majority of java people I know who I didn't meet through clojure,
aren't interested in functional programming and find lisp weird and wrong,
so that doesn't really surprise me.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Sean Allen
On Sat, Mar 26, 2011 at 12:56 PM, Base  wrote:
> hi All -
>
> Any recommendations on a NoSQL database to use with clojure?  I am
> experimenting if it will fit my project better than a SQL db and have
> no real experience with them.
>
> Strong clojure support is obviously important for this.  The only one
> I know of is MongoDb...
>
> Thoughts??
>
>

That depends on what you are storing, how you want to access it etc.
Couch and Mongo and Riak etc etc each solve different problems.
So, what is your problem? Figure that out. Then pick the one that is
aimed at solving that problem.

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Jesus, how the heck to do anything?

2011-03-26 Thread Preecha P
I think you should take a look at clojure box again. You could split
the windows and have both code/repl open at the same times.

After you feel comfortable with that, try leiningen and build some
project.

On Mar 23, 2:50 pm, ultranewb  wrote:
> Short version:  How do I just open an editor, type in some Clojure
> code, save it in a file, and then run it?
>
> Long version:  Okay, I'm very new to Clojure.  But I'm not a Java
> programmer (don't want to be).  I'm not used to all this complexity
> just to do something simple.  What I want to do is the "normal
> programming" that I do with every other environment and language I
> work with, i.e. I edit some source code on screen, save it in a file,
> and either compile/run, or interpret it or whatever.  But I haven't
> figured out how to do that yet, and don't know if it's possible.
>
> I downloaded Netbeans and Enclojure.  It runs fine.  I can get a REPL,
> blah blah.  But have no idea how to do anything "real" i.e. execute a
> program saved in a file.  Again, I want to edit some code with the
> very nice editor, save it, and hit some button that says "execute" or
> perhaps "compile and execute" or perhaps "build and execute" or
> whatever.  But apparently there is a heck of a lot more to it than
> that.  I understand that you have to build a "project" or whatever.
> Fine - I did that.  Still, I have no idea which directory out of that
> huge structure I'm supposed to put code in, I have no idea how to set
> up all these "dependencies" or whatever.  I did try some random stuff,
> i.e. saving a file in various directories and hitting "build" but that
> didn't work.  I also tried editing various files that were already
> there, hoping one of them was the "main" file I was supposed to be
> dumping source code into, but that didn't work either.
>
> So I downloaded Clojure Box.  It installs and runs fine.  Again, I get
> a REPL no problem.  But there's only so much coding I can do in a
> REPL.  Again, I'd like to do more.
>
> I spent a long time trying to find some help online (googling, etc),
> but everything I've found assumes I know too much, i.e. how to set up
> all these projects and dependencies.
>
> Actually, I'm not interested in fooling with all the boilerplate and
> crap AT ALL.  So if I HAVE to do that, I'm outta here.  But something
> tells me I may not have to, i.e. there may be some automated tool
> somewhere, or some "template" files I can just use over and over, or
> some "trick" to use like "just name your program 'main' and stick it
> in such-and-such directory."
>
> Any help?

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Timothy Baldridge
> Any recommendations on a NoSQL database to use with clojure?  I am
> experimenting if it will fit my project better than a SQL db and have
> no real experience with them.

I highly recommend couchdb via the clutch clojure lib. It's fast, and
works well. CouchDB is very easy to setup and learn. And it has a
decent front-end. As a plus side it's even written in a functional
language (Erlang).

More info here:

http://www.ibm.com/developerworks/java/library/j-couchdb-clojure/index.html?ca=drs-

Timothy

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Good choices for a NoSQL database with Clojure?

2011-03-26 Thread Base
hi All -

Any recommendations on a NoSQL database to use with clojure?  I am
experimenting if it will fit my project better than a SQL db and have
no real experience with them.

Strong clojure support is obviously important for this.  The only one
I know of is MongoDb...

Thoughts??

Thanks

Base

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureCLR in production ?

2011-03-26 Thread David Jagoe
Jules,

I ran into a problem implementing a Clojure CLR http client for a
Clojure web server. I can't remember the details off-hand but I recall
that it had something to do with a static global variable in some .NET
http client library and SSL certificate handling. It wasn't a problem
with ClojureCLR per se, more a problem with weird implementation of
the lib. I was under a lot of pressure to release the client so just
rewrote it in IronPython without finishing the investigation into my
problem. But if you like I could try dig out the code. Otherwise I
suggest that if you are using .NET http client with SSL certs that you
spike that early on.


Cheers,
David

On 26 March 2011 15:34, Jules  wrote:
> Thanks for getting back to me Timothy - I'm encouraged - I'll give it a
> whirl.
>
> Jules
>
> --
> 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 - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: ClojureCLR in production ?

2011-03-26 Thread Jules
Thanks for getting back to me Timothy - I'm encouraged - I'll give it a 
whirl.

Jules

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: bindings & lazy-seq

2011-03-26 Thread Mark Nutter
I'll take a stab at this and then someone can tell me if I'm
understanding it myself.

> (lazy-seq
>  (binding [*in* in#]
><-- some code -->))

This is inside the definition, so it executes whenever you actually
USE the definition--i.e. it binds *in* to in# at the time the lazy seq
is used, which is probably what you want.

> (binding [*in* in#]
>  (lazy-seq
><-- some code -->))

This is outside the definition, so it executes and binds *in* to in#
at the time the lazy seq is defined. In other words, the binding ends
as soon as the lazy seq is defined, so when you go to actually use the
seq, the binding has ended, and *in* has its original value.

How'd I do?

On Fri, Mar 25, 2011 at 7:47 AM, Carlos-K  wrote:
> Hi,
>
> Why when you create a lazy sequence, you need to do the bindings
> inside the definition?, e.g.,
>
> (lazy-seq
>  (binding [*in* in#]
>    <-- some code -->))
>
> As opposed to make the bindings first and call the lazy-seq later,
> e.g.,
>
> (binding [*in* in#]
>  (lazy-seq
>    <-- some code -->))
>
>
> 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 - please be patient with your 
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Random "IllegalArgumentException: No distinct mapping found" after replacing defmultis with protocols

2011-03-26 Thread Tassilo Horn
Michael Wood  writes:

Hi Michael,

>>> Given that you don't use case at all, and the backtrace suggests the
>>> case call is in dispatching for the protocol, it sounds to me like a
>>> bug in the protocol dispatcher.
>>
>> I would have preferred a bug in my code...
>
> It's definitely a bug in case.  See this thread:
>
> http://groups.google.com/group/clojure/browse_thread/thread/9b864358a49f99fa/5b5a1a2b12316604?pli=1
>
> and the ticket it refers to:
>
> http://dev.clojure.org/jira/browse/CLJ-426
>
> Looking at the ticket it is being worked on.

Great.  Thank you for the pointer.

Bye,
Tassilo

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Random "IllegalArgumentException: No distinct mapping found" after replacing defmultis with protocols

2011-03-26 Thread Michael Wood
On 26 March 2011 02:57, Tassilo Horn  wrote:
> Alan  writes:
>
> Hi Alan,
>
>> That error message is coming from some use of (case), usually in your
>> code but conceivably from somewhere in Clojure.  It tries to do some
>> clever bit-fiddling to generate a constant-time-dispatch on the
>> hashcodes of its clauses, and if that fails it throws a compiler error
>> (arguably it could degrade into to a cond, but it doesn't).
>>
>> Given that you don't use case at all, and the backtrace suggests the
>> case call is in dispatching for the protocol, it sounds to me like a
>> bug in the protocol dispatcher.
>
> I would have preferred a bug in my code...

It's definitely a bug in case.  See this thread:

http://groups.google.com/group/clojure/browse_thread/thread/9b864358a49f99fa/5b5a1a2b12316604?pli=1

and the ticket it refers to:

http://dev.clojure.org/jira/browse/CLJ-426

Looking at the ticket it is being worked on.

-- 
Michael Wood 

-- 
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 - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en