Re: Rebinding Defs

2011-03-09 Thread Tassilo Horn
Alan writes: Hi Alan, > And yes, it slows things down a bit, so in 1.3 the default is to not > support rebinding (though re-def'ing is still supported). What do you mean by doesn't support rebinding? Does that mean, that things like (def foo false) (binding [foo true] (dostuff)) (let [f

Re: Rebinding Defs

2011-03-09 Thread Baishampayan Ghose
>> And yes, it slows things down a bit, so in 1.3 the default is to not >> support rebinding (though re-def'ing is still supported). > > What do you mean by doesn't support rebinding?  Does that mean, that > things like > >  (def foo false) >  (binding [foo true] (dostuff)) >  (let [foo true] (dost

Re: Macros, macros, macros

2011-03-09 Thread Meikel Brandmeyer
Hi, On 9 Mrz., 08:52, Andreas Kostler wrote: >>> (defn make-native-query [db str foo] >>>             (. (proxy [ONativeSynchQuery] >>>                    [db str foo] >>>                    (filter [rec] >>>                         (.. rec (field "location") (eq "Madrid") and (field >>> "name"

Re: Issue with lein-ring...

2011-03-09 Thread Saul Hazledine
On Mar 8, 8:31 pm, John Szakmeister wrote: > I've been working on a web app, and it was using leiningen-war.  The > author of that suggest moving to the lein-ring plugin on his github > site... so, I did that. Apologies if the wording in the README of leiningen-war has caused any problems. The ro

Re: Macros, macros, macros

2011-03-09 Thread Meikel Brandmeyer
Hi again, On 9 Mrz., 09:23, Meikel Brandmeyer wrote: > (defmacro query >   [rec [lhs op rhs]] >   (case op >     'and `(-> ~rec (query ~lhs) .and (query ~rhs)) >     'eq  `(-> ~rec (.field ~(name lhs)) (.eq ~rhs Here a short note, why a macro can be actually annoying: If you write macro wh

Newbie: General question about concurrency in Clojure

2011-03-09 Thread Nick Wiedenbrueck
I'm still getting started with Clojure and I'm wondering about how one should generally go about concurrency and how transparent concurrency is in Clojure. So, to me there would be two approaches: A) Be aware of the parts of your system that will be concurrent and only within these parts write con

Re: Rebinding Defs

2011-03-09 Thread Tassilo Horn
Baishampayan Ghose writes: Hi! >> What do you mean by doesn't support rebinding?  Does that mean, that >> things like >> >>  (def foo false) >>  (binding [foo true] (dostuff)) >>  (let [foo true] (dostuff) (println foo)) > > Not allowed unless you mark `foo' as dynamic. The syntax looks like thi

Re: Newbie: General question about concurrency in Clojure

2011-03-09 Thread Joost
On Mar 9, 9:26 am, Nick Wiedenbrueck wrote: > I'm still getting started with Clojure and I'm wondering about how one > should generally go about concurrency and how transparent concurrency > is in Clojure. So, to me there would be two approaches: > > A) Be aware of the parts of your system that wi

with-timeout... ?

2011-03-09 Thread Sean Allen
Yesterday I was writing a bit of code that needs to wait for an external event to happen but if it doesn't happen with X amount of time, to timeout with an error. Is there a library to handle this? I know you can do it with a future and if you google the general idea, there are a few blog posts, s

Re: Newbie: General question about concurrency in Clojure

2011-03-09 Thread Rasmus Svensson
The answer would be a mix of A and B, mostly because there seems to be an assumption that you have to consider concurrency everywhere in order to be able to have it at some point later. This is not the case. You do tend to be very explicit about concurrency and only use the concurrency primitives

Re: with-timeout... ?

2011-03-09 Thread Baishampayan Ghose
> Yesterday I was writing a bit of code that needs to wait for an > external event to happen but if it doesn't happen with X amount of > time, > to timeout with an error. > > Is there a library to handle this? I know you can do it with a future > and if you google the general idea, there are a few

Re: Rebinding Defs

2011-03-09 Thread Chris Perkins
On Mar 8, 6:59 pm, Timothy Baldridge wrote: > If in a namespace I bind a var: > > (def foo 3) > > And then later on in my program re-bind that var: > > (def foo 1) > > Will all parts of my program instantly see that update? How is it > possible to have any sort performance when we're basically hav

Re: with-timeout... ?

2011-03-09 Thread Sean Allen
On Wed, Mar 9, 2011 at 7:25 AM, Baishampayan Ghose wrote: >> Yesterday I was writing a bit of code that needs to wait for an >> external event to happen but if it doesn't happen with X amount of >> time, >> to timeout with an error. >> >> Is there a library to handle this? I know you can do it wit

Re: Newbie: General question about concurrency in Clojure

2011-03-09 Thread Nick Wiedenbrueck
Thanks for your answers. Guess, I just got a little bit lost after digging deeper into the whole thing. Just didn't see anymore that the core problem is mutability. But it's much clearer again now. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To po

[ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Jozef Wagner
Hello, I've released a Clojure wrapper for Neo4j called borneo. Purpose of this library is to provide intiutive access to commonly used Neo4j operations. It uses official Neo4j Java bindings. It does not use Blueprints interface. Project page, examples: http://github.com/wagjo/borneo API: http

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Baishampayan Ghose
> I've released a Clojure wrapper for Neo4j called borneo. > Purpose of this library is to provide intiutive access to commonly used > Neo4j operations. It uses official Neo4j Java bindings. It does not use > Blueprints interface. Looks awesome! Many thanks for this :) Regards, BG -- Baishampay

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Baishampayan Ghose
> I've released a Clojure wrapper for Neo4j called borneo. > Purpose of this library is to provide intiutive access to commonly used > Neo4j operations. It uses official Neo4j Java bindings. It does not use > Blueprints interface. Minor observation, it seems you are using `proxy` to implement inte

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Jozef Wagner
On Wednesday, March 9, 2011 3:09:05 PM UTC+1, Baishampayan Ghose wrote: > > > I've released a Clojure wrapper for Neo4j called borneo. > > Purpose of this library is to provide intiutive access to commonly used > > Neo4j operations. It uses official Neo4j Java bindings. It does not use > > Blueprin

Re: Issue with lein-ring...

2011-03-09 Thread John Szakmeister
On Tue, Mar 8, 2011 at 4:04 PM, Michael Ossareh wrote: [snip] > > 90% of the time I find that: > lein clean && rm -rf lib && lein deps > solves this type of issue. Yeah... I've done that a few times. :-) I should say that I'm using the 1.3.0-master-snapshot of Clojure. I did find that ring.util

Re: Rebinding Defs

2011-03-09 Thread Alan
On Mar 9, 12:00 am, Tassilo Horn wrote: > Alan writes: > > Hi Alan, > > > And yes, it slows things down a bit, so in 1.3 the default is to not > > support rebinding (though re-def'ing is still supported). > > What do you mean by doesn't support rebinding?  Does that mean, that > things like > >  

Re: with-timeout... ?

2011-03-09 Thread Alan
See https://github.com/Raynes/clojail It's a sandboxing library for Clojure, which among other things means it needs to try running an operation and give up after N seconds. You can skip the sandboxing part entirely if you want; it exposes a pretty general thunk-timeout function. On Mar 9, 4:43 a

Nano Text Editor Syntax Highlighting

2011-03-09 Thread Hugo Blanco
For the Nano text editor, is there syntax highlighting clojure? I have not been able to find the highlighting config file for Clojure (or at least for Lisp) and I do not know (yet) enough Clojure to create one. Do you have one? Do you know where I can get it? Thanks in advance guys =) -- You rec

Monad Lessons

2011-03-09 Thread jim
I gave a talk at CodePaLOUsa on monads and got some favorable feedback. So I thought I'd offer to do a live training session on monads using pretty much the same material, but at a shared REPL rather than with slides. How it would work is I would start a Skype conference for 5 to 10 people. We wou

Tracking Clojure 1.3/2.0 progress

2011-03-09 Thread Fogus
Hi all, I've put together a Jira dashboard to display a distillation of the current progress toward the 1.3/2.0 release. I believe that anyone can view it, so pass the link far and wide. http://dev.clojure.org/jira/secure/Dashboard.jspa?selectPageId=10014 There is additional information display

Re: Nano Text Editor Syntax Highlighting

2011-03-09 Thread Alan
I think the best way to get this is to close Nano and open Emacs... On Mar 9, 10:45 am, Hugo Blanco wrote: > For the Nano text editor, is there syntax highlighting clojure? I have > not been able to find the highlighting config file for Clojure (or at > least for Lisp) and I do not know (yet) eno

Re: Issue with lein-ring...

2011-03-09 Thread John Szakmeister
On Wed, Mar 9, 2011 at 1:29 PM, John Szakmeister wrote: > On Tue, Mar 8, 2011 at 4:04 PM, Michael Ossareh wrote: > [snip] >> >> 90% of the time I find that: >> lein clean && rm -rf lib && lein deps >> solves this type of issue. > > Yeah... I've done that a few times. :-)  I should say that I'm us

Re: Rebinding Defs

2011-03-09 Thread Chris Perkins
On Mar 9, 7:31 am, Chris Perkins wrote: > On Mar 8, 6:59 pm, Timothy Baldridge wrote: > > > If in a namespace I bind a var: > > > (def foo 3) > > > And then later on in my program re-bind that var: > > > (def foo 1) > > > Will all parts of my program instantly see that update? How is it > > possi

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Ken Wesson
On Wed, Mar 9, 2011 at 1:22 PM, Jozef Wagner wrote: > On Wednesday, March 9, 2011 3:09:05 PM UTC+1, Baishampayan Ghose wrote: >> >> > I've released a Clojure wrapper for Neo4j called borneo. >> > Purpose of this library is to provide intiutive access to commonly used >> > Neo4j operations. It uses

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Jozef Wagner
On Wednesday, March 9, 2011 9:23:54 PM UTC+1, Ken Wesson wrote: > > On Wed, Mar 9, 2011 at 1:22 PM, Jozef Wagner wrote: > > On Wednesday, March 9, 2011 3:09:05 PM UTC+1, Baishampayan Ghose wrote: > >> > >> > I've released a Clojure wrapper for Neo4j called borneo. > >> > Purpose of this library is

Re: Tracking Clojure 1.3/2.0 progress

2011-03-09 Thread Aaron Bedra
On 03/09/2011 02:18 PM, Fogus wrote: Hi all, I've put together a Jira dashboard to display a distillation of the current progress toward the 1.3/2.0 release. I believe that anyone can view it, so pass the link far and wide. http://dev.clojure.org/jira/secure/Dashboard.jspa?selectPageId=10014

Re: Tracking Clojure 1.3/2.0 progress

2011-03-09 Thread Michael Ossareh
On Wed, Mar 9, 2011 at 13:23, Aaron Bedra wrote: > On 03/09/2011 02:18 PM, Fogus wrote: > >> Hi all, >> >> I've put together a Jira dashboard to display a distillation of the >> current progress toward the 1.3/2.0 release. I believe that anyone >> can view it, so pass the link far and wide. >> >

Re: 1.3 (inc alpha4)?

2011-03-09 Thread OGINO Masanori
Hello. I understand what it means. Thank you. -- Name: OGINO Masanori (荻野 雅紀) E-mail: masanori.og...@gmail.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

Making the JVM's stack effectively deeper

2011-03-09 Thread Ken Wesson
It seems to me there is a way to make the JVM's stack effectively deeper -- even limited only by available memory. Threads have separate stacks, and there's no limit on threads, *especially* if they're nearly all sleeping. So ... (defn apply-with-stack-extension [f & args] (let [x (future

Re: with-timeout... ?

2011-03-09 Thread Seth
Or you could just modify the source of promise ... i dont know why promises dont support timeouts (defprotocol PWait (wait-for [this timeout units] [this timeout])) ;;copied from clojure source, but adding timeout wait-for (defn promise "Alpha - subject to change. Returns a promise obje

Re: Issue with lein-ring...

2011-03-09 Thread John Szakmeister
On Wed, Mar 9, 2011 at 3:29 AM, Saul Hazledine wrote: > On Mar 8, 8:31 pm, John Szakmeister wrote: >> I've been working on a web app, and it was using leiningen-war.  The >> author of that suggest moving to the lein-ring plugin on his github >> site... so, I did that. > > Apologies if the wording

Re: Making the JVM's stack effectively deeper

2011-03-09 Thread Alan
On Mar 9, 2:27 pm, Ken Wesson wrote: > It seems to me there is a way to make the JVM's stack effectively > deeper -- even limited only by available memory. > > Threads have separate stacks, and there's no limit on threads, > *especially* if they're nearly all sleeping. So ... > > (defn apply-with-

Re: Making the JVM's stack effectively deeper

2011-03-09 Thread Ken Wesson
On Wed, Mar 9, 2011 at 6:59 PM, Alan wrote: > Clever, but do we really want to encourage writing code that blows > infinite stack, by burying the problem until all of the JVM's memory > has been used up for stack? I agree there's a place for this sort of > thing, but I don't think we would want to

Re: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Baishampayan Ghose
>>> Minor observation, it seems you are using `proxy` to implement >>> interfaces. Why not use `reify` instead? >> >> Thank you for this remark. reify would be more idiomatic, I'll change it. >> proxy is a clojure-neo4j leftover, from which I've forked. > > Last I checked, proxy can extend a concre

Re: with-timeout... ?

2011-03-09 Thread Stuart Sierra
I've been working in this direction with Cljque, for example http://bit.ly/gCtmAl Cljque is still an experiment and has no stable API or documentation. -Stuart Sierra clojure.com -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group

Re: with-timeout... ?

2011-03-09 Thread Seth
oooh ... I can definitely find a use for this in my project! Thanks for pointing it out. -- 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: [ANN] borneo - Clojure wrapper for Neo4j, a graph database.

2011-03-09 Thread Ken Wesson
On Wed, Mar 9, 2011 at 8:15 PM, Baishampayan Ghose wrote: Minor observation, it seems you are using `proxy` to implement interfaces. Why not use `reify` instead? >>> >>> Thank you for this remark. reify would be more idiomatic, I'll change it. >>> proxy is a clojure-neo4j leftover, from

Re: Monad Lessons

2011-03-09 Thread mmwaikar
+1 (though I'll have to read about tmux first) :) Regards, Manoj. On Mar 10, 12:15 am, jim wrote: > I gave a talk at CodePaLOUsa on monads and got some favorable > feedback. So I thought I'd offer to do a live training session on > monads using pretty much the same material, but at a shared REPL

Re: Monad Lessons

2011-03-09 Thread Scott Jaderholm
I'd be interested. This doesn't really scale though in the way a recording does. Are you thinking this would give you a chance to practice teaching it before making a recording? Maybe post the slides so people can get an idea of what will be covered. Also, maybe clarify whether this is free (http

Re: Monad Lessons

2011-03-09 Thread Vivek Khurana
On Thu, Mar 10, 2011 at 12:45 AM, jim wrote: > I gave a talk at CodePaLOUsa on monads and got some favorable > feedback. So I thought I'd offer to do a live training session on > monads using pretty much the same material, but at a shared REPL > rather than with slides. > > How it would work is I