Re: Why does this not work? (for :let ...)

2012-09-05 Thread Tassilo Horn
yongqli writes: > Ah, thanks. No, I was wondering whether it was possible to iterate > over something created in a :let > > This works: > > (for [x (range 10) > :let [ys (range 10)] > y ys] > [x y]) Yes, that's possible. It's just that :let cannot be the first thing in a for. S

Re: Why does this not work? (for :let ...)

2012-09-05 Thread yongqli
Ah, thanks. No, I was wondering whether it was possible to iterate over something created in a :let This works: (for [x (range 10) :let [ys (range 10)] y ys] [x y]) On Wednesday, September 5, 2012 10:11:08 PM UTC-7, Sean Corfield wrote: > > On Wed, Sep 5, 2012 at 9:51 PM, yongql

Re: Clojure / RootBeer / CUDA / GPU

2012-09-05 Thread Karsten Schmidt
Although a CLJ->OpenCL translator has crossed my mind recently too, here's something slightly different to what you're trying, but still related... A few weeks ago I started a new Clojure wrapper around JOCL (jogamp.org) to at least help to take out the hassle/tedium of setting up, configuring and

Re: Why does this not work? (for :let ...)

2012-09-05 Thread Sean Corfield
On Wed, Sep 5, 2012 at 9:51 PM, yongqli wrote: > This code doesn't work: > > (for [:let [x (range 100)] > y x] > [y]) My understanding is that :let is a modifier that must follow a binding. Did you mean: (for [x (range 100) :let [y x]] [y]) -- Sean A Corfield -- (904) 302-SEAN A

Why does this not work? (for :let ...)

2012-09-05 Thread yongqli
This code doesn't work: (for [:let [x (range 100)] y x] [y]) IllegalStateException Can't pop empty vector clojure.lang.PersistentVector.pop (PersistentVector.java:346) but maybe it should? -- You received this message because you are subscribed to the Google Groups "Clojure" group. T

Re: Fund raiser for our projects

2012-09-05 Thread nchurch
It's worth pointing out that the tools Clojure is built on (chiefly Java) are themselves the products of companies. If Sun hadn't stayed behind Java, we'd probably still be coding Java in a C ecosystem, rather than Clojure in a Java ecosystem. Sun of course was a huge companybut that doesn't

Re: redefining multimethods at the repl

2012-09-05 Thread Brian Marick
On Sep 5, 2012, at 11:58 AM, Stuart Halloway wrote: > I share your pain. A standardized contrib solution for this would be > welcomed. > What I'm doing will be somewhat specific to the chapter in the book. But if it matters, it will be here: https://github.com/marick/fp-oo/blob/master/sourc

Re: redefining multimethods at the repl

2012-09-05 Thread Stuart Sierra
This is what I started working on tools.namespace to solve. I came to the conclusion that it's impossible to make something that works in 100% of all cases, but I'm hoping to get to 90%. I added some notes to the wiki page too. -S -- You received this message because you are subscribed to the

Re: clj-logging-config, lein2 and AOT compilation == NullPointerException

2012-09-05 Thread Leonardo Borges
I haven't really found out what the problem is - and haven't been looking into it - but I put a small clojure app together to replicate the issue. You can find it on dropbox[1] I've also updated the issue I had opened on the clj-logging-config github issues page [2] If you're keen on debugging

ANN Langohr 1.0.0-beta4

2012-09-05 Thread Michael Klishin
Langohr is an idiomatic Clojure client for RabbitMQ that embraces AMQP 0.9.1 model. 1.0.0-beta4 includes a couple of usability improvements: * Payloads will now be coerced to bytes (by default, Langohr comes with implementations for strings and byte arrays) instead of assuming it is always a

Re: Fund raiser for our projects

2012-09-05 Thread Brian Marick
On Sep 5, 2012, at 12:15 PM, Simone Mosciatti wrote: > I would say raise money to help people improve their project (documentation > is a very important part that). Many people who are good at writing code are not good at writing documentation. Writing good explanations is hard, even if you ha

Re: redefining multimethods at the repl

2012-09-05 Thread Stuart Halloway
I started a wiki page for this: http://dev.clojure.org/display/design/Never+Close+a+REPL If you have other REPL-reloading annoyances please add them there. Stuart Halloway Clojure/core http://clojure.com > Kevin Downey writes: > >> if I recall, the current defonce like behavior of multimethod

Re: ANN ritz 0.4.0 release with nREPL debugger support

2012-09-05 Thread Phil Hagelberg
Hugo Duncan writes: > ritz started life as a swank server for emacs SLIME. If you're a swank-clojure user who needs a debugger you should definitely check out ritz now that swank-clojure is deprecated. -Phil -- You received this message because you are subscribed to the Google Groups "Clojure

Re: Fund raiser for our projects

2012-09-05 Thread Phil Hagelberg
Paul deGrandis writes: > We keep bringing up the same social problem: We have brilliant people > contributing quality code, with a lack of documentation, polish, and > to some degree community management/engagement. > > The solution is simple: help out by writing or improving > documentation, bui

Re: redefining multimethods at the repl

2012-09-05 Thread Phil Hagelberg
Kevin Downey writes: > if I recall, the current defonce like behavior of multimethods was a > response to the situation where if you have your multimethods split > across multiple files reloading the file with the defmulti in it would > re-def the multimethod with the new dispatch, but it would n

Re: Clojure / RootBeer / CUDA / GPU

2012-09-05 Thread Timothy Baldridge
OpenCL has some pretty major limitations that CUDA does not have. Namely, no support for function pointers, vtables (needed for OOP) or malloc on the device. These all make it quite hard to implement something as dynamic as a Java VM. The only RootBeer example I can see actually is more like a C pr

Re: Clojure / RootBeer / CUDA / GPU

2012-09-05 Thread Jules
Sounds like fun too :-) I have an NVidia card and when I heard about Rootbeer, I couldn't resist, but I can understand your taking the OpenCL route for portability... although I imagined that OpenCL would define an abstract layer that would require another level of compilation to a target platf

ANN ritz 0.4.0 release with nREPL debugger support

2012-09-05 Thread Hugo Duncan
ritz started life as a swank server for emacs SLIME. With this release it has evolved into several components: * ritz-nrepl provides both nREPL middleware, that can be used in any nREPL server (and any client), and a debugger for use with nrepl.el, the emacs client for nREPL. The nrepl middle

Re: core.logic: Defining facts and relations on a per-thread basis

2012-09-05 Thread David Nolen
On Wed, Sep 5, 2012 at 4:30 PM, JvJ wrote: > If anyone is familiar with the implementation of core.logic, I'd like to > know if it's possible to re-bind the globals in such a way as to give > distinct fact and relation databases for each thread. Any help would be > appreciated. This is not somet

core.logic: Defining facts and relations on a per-thread basis

2012-09-05 Thread JvJ
If anyone is familiar with the implementation of core.logic, I'd like to know if it's possible to re-bind the globals in such a way as to give distinct fact and relation databases for each thread. Any help would be appreciated. -- You received this message because you are subscribed to the Go

Re: Fund raiser for our projects

2012-09-05 Thread Simone Mosciatti
My point is that by the time that I am able to write a nice/useful article about any library a maintaners of the lib would be able to write 10 articles way better. Then still there if I write one article, you write another and @whoever write the next we will have 3 different articles in 3 diffe

Re: Fund raiser for our projects

2012-09-05 Thread Jim - FooBar();
On 05/09/12 19:37, Jim - FooBar(); wrote: On 05/09/12 19:35, Paul deGrandis wrote: Don't be scared to reach out and approach the authors of the libraries you're using. I've had much success directly contracting creators/maintainers of open source projects. me too :-) Jim and by looking at

Re: Fund raiser for our projects

2012-09-05 Thread Jim - FooBar();
On 05/09/12 19:35, Paul deGrandis wrote: Don't be scared to reach out and approach the authors of the libraries you're using. I've had much success directly contracting creators/maintainers of open source projects. me too :-) Jim -- You received this message because you are subscribed to th

Re: Fund raiser for our projects

2012-09-05 Thread Paul deGrandis
We keep bringing up the same social problem: We have brilliant people contributing quality code, with a lack of documentation, polish, and to some degree community management/engagement. The solution is simple: help out by writing or improving documentation, building demo apps, writing tutorial

Re: Question about sets

2012-09-05 Thread Andy Fingerhut
I've copied and pasted Mark's arguments to the Wiki page here: http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements Andy On Sep 5, 2012, at 6:41 AM, Stuart Halloway wrote: > Hi Mark, > > Thanks for extracting a summary of the conversation so far, and +1 for making >

Re: Fund raiser for our projects

2012-09-05 Thread Jim - FooBar();
aaa ok that makes things clearer...thank you I get your point now! i can't say it doesn't make sense but i would say it's rather ambitious. :-) Jim On 05/09/12 18:15, Simone Mosciatti wrote: I would say raise money to help people improve their project (documentation is a very important part t

Re: Fund raiser for our projects

2012-09-05 Thread Simone Mosciatti
I would say raise money to help people improve their project (documentation is a very important part that). With a little of our effort and a big jump thank to some company we would improve a lot of projects. It will help everybody... The developers that finally get something from their open s

Re: redefining multimethods at the repl

2012-09-05 Thread Kevin Downey
if I recall, the current defonce like behavior of multimethods was a response to the situation where if you have your multimethods split across multiple files reloading the file with the defmulti in it would re-def the multimethod with the new dispatch, but it would not have any of the methods load

Re: redefining multimethods at the repl

2012-09-05 Thread Hugo Duncan
Stuart Halloway writes: > Are there other things like this that cause people to "restart REPL" > unnecessarily? I would like to identify the whole list of such things and > kill them. Maybe related. Ritz has slime-load-file hooked up to code that tries to remove dead vars from a namespace. i.e

Re: redefining multimethods at the repl

2012-09-05 Thread Stuart Halloway
Brian, I share your pain. A standardized contrib solution for this would be welcomed. Are there other things like this that cause people to "restart REPL" unnecessarily? I would like to identify the whole list of such things and kill them. Stu > Thanks. I think I'll write my own `defgeneric`

Re: Fund raiser for our projects

2012-09-05 Thread Jim - FooBar();
I'll be honest with you... I 'm not sure I understand at all what you mean! raise money for people to document their open-source projects better? forgive me but I missed your point... :-) Jim On 05/09/12 17:37, Simone Mosciatti wrote: Hi everybody, I get a little idea now that we are headi

Fund raiser for our projects

2012-09-05 Thread Simone Mosciatti
Hi everybody, I get a little idea now that we are heading to Christmas. Would be nice to organize a little fund raiser to support our projects. We have a lot of great project, but first of all good documentation is not the norm. Then there are a lot of spot where we can improve-- I am thinking

[CUFP 2012] Birds of a Feather sessions

2012-09-05 Thread Ashish Agarwal
= Birds of a Feather sessions (BOFs) Commercial Users of Functional Programming Workshop (CUFP 2012) http://cufp.org/bofs-2012 Co

Re: Routing HTTP/ JSON in clojure

2012-09-05 Thread Russell Whitaker
On Tue, Sep 4, 2012 at 7:05 PM, gaz jones wrote: > We do all of the things you mention (minus the replay, but that would > be trivial) in Clojure where I work, and it is remarkably easy. We > use: > > * ring + compojure and an embedded jetty server to create lightweight > webservers > * the Chesh

Re: Where is Clojure CLR ?

2012-09-05 Thread Jim - FooBar();
Of course you can... http://clojureclr.blogspot.co.uk/ Jim On 05/09/12 16:36, Erlis Vidal wrote: Hi group, Have been a while since I don't into that project. Is the CRL version of clojure using another mailing list? How is the status of the project? I think it would be very very interesting

Where is Clojure CLR ?

2012-09-05 Thread Erlis Vidal
Hi group, Have been a while since I don't into that project. Is the CRL version of clojure using another mailing list? How is the status of the project? I think it would be very very interesting if we can start using clojure in the .net framework. Any information you can give me about this projec

Re: redefining multimethods at the repl

2012-09-05 Thread Brian Marick
Thanks. I think I'll write my own `defgeneric` to hide an `ns-unmap` from the reader. (I like the terminology of "generic function" better than multimethod anyway, as an introduction to the idea.) On Sep 4, 2012, at 5:41 PM, Ulises wrote: >> Binding to the var instead of the value will allow i

Re: Question about sets

2012-09-05 Thread Stuart Halloway
Hi Mark, Thanks for extracting a summary of the conversation so far, and +1 for making sure this is on the wiki. Stu > On Tue, Sep 4, 2012 at 9:30 AM, Andy Fingerhut > wrote: > I'm just trying to get the argument for change as clearly as possible. > > The major bullet points: > 1. "It's a bu

Re: using take-while with pred function that has state

2012-09-05 Thread shaobohou
On Monday, 3 September 2012 14:03:42 UTC+1, Dave Sann wrote: > > (defn take-while-reduce > "fancy take accumulating a reduced value on taken items > this value can then be tested in the take fn > Much appreciated. -- You received this message because you are subscribed to the Google Grou

Re: using take-while with pred function that has state

2012-09-05 Thread shaobohou
On Monday, 3 September 2012 06:26:07 UTC+1, Stephen Compall wrote: > > (->> ss (map tok-fn), (reductions (partial apply merge) #{}), > (take-while #(...)), (map #(do %2 %1) ss), last) > > Use of `atom' for this sort of thing is certainly an antipattern, so > consider any alternative that su

Plural dispatch

2012-09-05 Thread Chris Ford
I was watching David Nolan's talk about predicate dispatch, and he articulated something that I've found frustrating about multimethods - the set of implementations is open, but the dispatch function is closed. That means that if your d

Re: Found bug in contains? used with vectors.

2012-09-05 Thread Wolodja Wentland
On Tue, Sep 04, 2012 at 13:51 +0200, Ben Smith-Mannschott wrote: > The naming of contains? is one of Clojure's small warts. Almost > everyone seems to stumble over it when they're starting out. I know I > did. Naming it contains-key? would have prevented a great deal of > confusion, but I guess tha

Re: Routing HTTP/ JSON in clojure

2012-09-05 Thread Mayank Jain
On Wed, Sep 5, 2012 at 1:35 PM, abp wrote: > For a decent intro to ring and compojure you probably want to watch > http://skillsmatter.com/podcast/home/functional-web > It's an introduction to the libraries by their author/maintainer, James > Reeves. > > Thanks for the link. -- You received thi

Re: Question about sets

2012-09-05 Thread abp
I too approve of Mark's reasoning and solution. Probably that should be moved into http://dev.clojure.org/display/design/Allow+duplicate+map+keys+and+set+elements On Wednesday, September 5, 2012 6:40:50 AM UTC+2, Peter Taoussanis wrote: > > +1 on Mark's most recent reply, that is: > > * Revert

Re: Routing HTTP/ JSON in clojure

2012-09-05 Thread abp
For a decent intro to ring and compojure you probably want to watch http://skillsmatter.com/podcast/home/functional-web It's an introduction to the libraries by their author/maintainer, James Reeves. On Wednesday, September 5, 2012 9:56:51 AM UTC+2, David Dawson wrote: > > Thanks guys! > > I'll

Re: Routing HTTP/ JSON in clojure

2012-09-05 Thread David Dawson
Thanks guys! I'll go with ring + compojure bundled with cheshire json and clojuremongodb as a starting point and see where I get to. I'm all in favour of pleasant suprises! David. On Wednesday, 5 September 2012 03:05:33 UTC+1, Gaz wrote: > > We do all of the things you mention (minus the replay

Re: How create dynamic var programmatically

2012-09-05 Thread Andrei Zhlobich
Try: (.setDynamic (intern *ns* 'a 0)) -- 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 unsubscrib

Re: An instance of an abstract class in the repl?

2012-09-05 Thread Mark Hamstra
Yup, something like that is gonna work. Thanks! On Tuesday, September 4, 2012 2:34:27 PM UTC-7, Mark Hamstra wrote: > > So I'm working on developing a Clojure api for a distributed data analysis > framework. A key part of that has to be the ability to pass functions as > parameters into vario