Re: Help with this error and comment.

2012-04-04 Thread Jacek Laskowski
On Wed, Apr 4, 2012 at 5:50 AM, Cedric Greevey cgree...@gmail.com wrote:

 So, the version of some dependency of another dependency is wrong,
 most likely -- for instance, if your project.clj calls for a 1.3
 contrib library and Clojure 1.2, or something like that.

I'm unsure if it's the real issue, but just recently read a blog entry
about something similar and lein pom with mvn dependency:tree was a
suggestion to narrow the dependency problem down to a managable task.

Jacek

-- 
Jacek Laskowski
Functional languages (Clojure), Java EE, and IBM WebSphere -
http://blog.japila.pl
Never discourage anyone who continually makes progress, no matter how
slow. Plato

-- 
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: Using JPPF in Clojure - Class Loading Issues

2012-04-04 Thread Gunnar Völkel
My first try to get JPPF to work from REPL is changing the 
ContextClassLoader to an implementation derived from 
clojure.lang.DynamicClassLoader which caches the class bytes on definition.
That did not work so far. Sometimes (.setContextClassLoader 
(Thread/currentThread) cacheClassLoader) does not even seem to work - since 
(.getContextClassLoader (Thread/currentThread)) still returns a 
DynamicClassLoader afterwards.

In case caching dynamically created classes will not be included in any 
future Clojure version, I want to be able to intercept class definition for 
the caching.
The best scenario would be, if Clojure had a compiler option that creates 
class files for dynamically created classes like *compile-files* in 
Clojure's compiler does when using (compile 'my-ns). *compile-files* seems 
not usable for that case in REPL by simply binding it to true.

-- 
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

Google Summer of Code 2012 Application

2012-04-04 Thread Raphaël AMIARD
Hi there,

I've been a hobbyist Clojure developer for some time now, and a lurker in 
the community.

I'm very interrested in participating to the Google Summer of Code on the 
Clojure team. Clojure is a language that i love, and i would love 
contributing to it.

My main field of knowledge is in compilation, and two projects exposed on 
the are of particular interrest to me:


   - The first is the Pluggable backend 
Projecthttp://dev.clojure.org/display/community/Google+Summer+of+Code+2012#GoogleSummerofCode2012-Pluggablebackend
- My application http://raph-amiard.github.com/ClojureScript.html which 
   i would like to pair with the development of a new backend for 
   ClojureScript.
   - The second is the Native Clojure 
Projecthttp://dev.clojure.org/display/community/Google+Summer+of+Code+2012#GoogleSummerofCode2012-NativeClojure
- My application http://raph-amiard.github.com/NativeClojure.html

I've put every detail I've thought of about the way i intend to work 
through those projects, the understanding i have of the task, and my 
experience with the problem in each project application.

They are still in draft stage, most notably, the code for some of my 
projects is not yet online, and so is my personal page.

I'm posting those here now to have a chance to get some feedback before i 
actually submit the applications.

I know i'm quite late in the application process, i hope it's not too late, 
because i would really like to work with the clojure/dev team !

Thanks in advance,

-- 
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: Google Summer of Code 2012 Application

2012-04-04 Thread Aaron Cohen
2012/4/4 Raphaël AMIARD raph.ami...@gmail.com:
 Hi there,

 I've been a hobbyist Clojure developer for some time now, and a lurker in
 the community.

 I'm very interrested in participating to the Google Summer of Code on the
 Clojure team. Clojure is a language that i love, and i would love
 contributing to it.

 My main field of knowledge is in compilation, and two projects exposed on
 the are of particular interrest to me:

 The first is the Pluggable backend Project - My application which i would
 like to pair with the development of a new backend for ClojureScript.
 The second is the Native Clojure Project - My application

 I've put every detail I've thought of about the way i intend to work through
 those projects, the understanding i have of the task, and my experience with
 the problem in each project application.

 They are still in draft stage, most notably, the code for some of my
 projects is not yet online, and so is my personal page.

 I'm posting those here now to have a chance to get some feedback before i
 actually submit the applications.

 I know i'm quite late in the application process, i hope it's not too late,
 because i would really like to work with the clojure/dev team !

 Thanks in advance,

Hi Raphael,

   What audience is this application intended for, clojure developers
or Google? Either way, if you would like some editing help, I would be
happy to do a pass over it. There are a lot of grammatical/style
problems at the moment.

   For the native clojure project, you might want to look at the
recently announced clojure to gambit scheme compiler, also based on
clojurescript, at https://github.com/takeoutweight/clojure-scheme.
Gambit scheme has C code generation, so that provides one pathway to
native.

   I see that David Nolen is the mentor for the pluggable backend. I
think you might also be interested in looking at my work on Clojure in
Clojure at https://github.com/remleduff/CinC, I'd be happy to work
with you or any other GSoC students, though I don't really have time
to be a full-fledged mentor.

--Aaron

-- 
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: Google Summer of Code 2012 Application

2012-04-04 Thread Raphaël AMIARD
Hi Aaron ! 

Those application are intended for submission on the google summer of code 
site. I think both Clojure developer and google will eventually get them if 
i understood the system right.

Thank you very much for the editing help proposition, it would be terribly 
helpful, since i'm not used to write long prose in english :) The markdown 
source for the applications is disponible on my github pages 
repositoryhttps://github.com/raph-amiard/raph-amiard.github.com. 
A lot of the text is shared between the two applications.

I'm gonna look more seriously into the ClojureScript to gambit scheme 
compiler, but from a preliminary look, it seems like there is mostly the 
emit function/methods changing, like i thought. It would be interresting to 
modularize the backend in clojurescript, and then modify clojure-scheme to 
fit the new modular backend scheme.

I have more trouble understanding the CinC project. Is it an attempt to 
port the Clojure java compiler to clojure ? I'm gonna look at the code more 
closely this afternoon.

Thanks !



On Wednesday, April 4, 2012 1:33:11 PM UTC+2, Aaron Cohen wrote:

 2012/4/4 Raphaël AMIARD 
  Hi there,
 
  I've been a hobbyist Clojure developer for some time now, and a lurker in
  the community.
 
  I'm very interrested in participating to the Google Summer of Code on the
  Clojure team. Clojure is a language that i love, and i would love
  contributing to it.
 
  My main field of knowledge is in compilation, and two projects exposed on
  the are of particular interrest to me:
 
  The first is the Pluggable backend Project - My application which i would
  like to pair with the development of a new backend for ClojureScript.
  The second is the Native Clojure Project - My application
 
  I've put every detail I've thought of about the way i intend to work 
 through
  those projects, the understanding i have of the task, and my experience 
 with
  the problem in each project application.
 
  They are still in draft stage, most notably, the code for some of my
  projects is not yet online, and so is my personal page.
 
  I'm posting those here now to have a chance to get some feedback before i
  actually submit the applications.
 
  I know i'm quite late in the application process, i hope it's not too 
 late,
  because i would really like to work with the clojure/dev team !
 
  Thanks in advance,

 Hi Raphael,

What audience is this application intended for, clojure developers
 or Google? Either way, if you would like some editing help, I would be
 happy to do a pass over it. There are a lot of grammatical/style
 problems at the moment.

For the native clojure project, you might want to look at the
 recently announced clojure to gambit scheme compiler, also based on
 clojurescript, at https://github.com/takeoutweight/clojure-scheme.
 Gambit scheme has C code generation, so that provides one pathway to
 native.

I see that David Nolen is the mentor for the pluggable backend. I
 think you might also be interested in looking at my work on Clojure in
 Clojure at https://github.com/remleduff/CinC, I'd be happy to work
 with you or any other GSoC students, though I don't really have time
 to be a full-fledged mentor.

 --Aaron



-- 
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: Google Summer of Code 2012 Application

2012-04-04 Thread Aaron Cohen
2012/4/4 Raphaël AMIARD raph.ami...@gmail.com:
 Hi Aaron !

 Those application are intended for submission on the google summer of code
 site. I think both Clojure developer and google will eventually get them if
 i understood the system right.

 Thank you very much for the editing help proposition, it would be terribly
 helpful, since i'm not used to write long prose in english :) The markdown
 source for the applications is disponible on my github pages repository. A
 lot of the text is shared between the two applications.

 I'm gonna look more seriously into the ClojureScript to gambit scheme
 compiler, but from a preliminary look, it seems like there is mostly the
 emit function/methods changing, like i thought. It would be interresting to
 modularize the backend in clojurescript, and then modify clojure-scheme to
 fit the new modular backend scheme.

 I have more trouble understanding the CinC project. Is it an attempt to port
 the Clojure java compiler to clojure ? I'm gonna look at the code more
 closely this afternoon.

Yes, one way of looking at CinC would be as porting the clojure java
compiler to be a backend to the clojurescript compiler. I started by
extracting the analyzer from clojurescript and removing several
assumptions it was making about cljs. I then moved the compiler into
clojure.java.compiler and started porting over the java compiler to
the same multimethod framework. Outputting java requires more type
information than outputting javascript, that's all calculated by
walking the ast in clojure.java.compiler/ast.clj

 Eventually (that's such a loaded word, it's very dependent on the
amount of time I have to work on it), once I finish the java backend
I'd like to add back the javascript one. In my scheme it would end up
somewhere like clojure.js.compiler and basically just be the emit
multimethods from cljs moved.

My todos:
  1) Finish porting over the remaining special forms (I have try/catch
mostly working locally, just need to finish it and push it out)
  2) Verify that I can compile core.clj from nothing. Currently I'm
cheating by just copying the defs from the bootstrap compiler, the
target compiler should be able to build all its functionality just by
compiling core.clj just like the current one does
  3*) Move protocols to the bottom. There are a few places where
I've kept the assumptions of the current compiler about how FNs extend
abstract classes using inheritance. It would be nice to be more like
clojurescript here, only using protocols and deftype rather than
Interfaces and inheritance.
  4*) Write nice deftype based implementations of the persistent
datastructures. This is probably a worthy GSoC task of its own and it
would help clojurescript even without my project
  5*) Add clojurescript back as target of the CinC compiler.
  6*) It would also be neat to look at some of the other compilers
that have been popping up (rpython, scheme) and see if they would work
as CinC backends

-- 
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


Advice on style implementation

2012-04-04 Thread David Jagoe
Hi all,

Please have a look at the following function (explained in the doc
string). I have a bunch of rows that I need to aggregate using
different functions per field. I also need to apply the aggregate to a
subset of the rows. Obviously this is just like SQL aggregation, hence
the interface I've specified.

However I'm left wondering whether my implementation could be improved.

Particularly I very often find myself doing

(apply hash-map (flatten (for [[k v] some-map] ...)))

so often in fact that I feel like I'm missing something.

Any pointers or advice on improving my style will be much appreciated!


(defn aggregate
  Aggregate rows using the functions provided in select and after
   filtering the rows by where.

E.g.

  (aggregate [{:a 1 :b 2} {:a 3 :b 4} {:a 5 :b 6}] :select {:a +}
:where (fn [r] ( (:b r) 6))) -- {:a 4}

[rows  {select :select where :where}]
(letfn [(selected? [col] (some #{col} (keys select)))
 (agg [col] (get select col))]
  (apply hash-map
 (flatten
  (for [[k vs] (apply merge-with vector (filter where
rows)) :when (selected? k)]
[k (apply (agg k) vs)])


Thanks,

-- 
David Jagoe

davidja...@gmail.com
+447535268218

-- 
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: Advice on style implementation

2012-04-04 Thread Baishampayan Ghose
 Please have a look at the following function (explained in the doc
 string). I have a bunch of rows that I need to aggregate using
 different functions per field. I also need to apply the aggregate to a
 subset of the rows. Obviously this is just like SQL aggregation, hence
 the interface I've specified.

 However I'm left wondering whether my implementation could be improved.

 Particularly I very often find myself doing

 (apply hash-map (flatten (for [[k v] some-map] ...)))

 so often in fact that I feel like I'm missing something.

 Any pointers or advice on improving my style will be much appreciated!

Don't have a direct answer to your question, but what about
implementing aggregate like this -

(defn aggregate [rows  {select :select where :where}]
(let [projection (apply merge-with vector (map #(select-keys %
(keys select)) (filter where rows)))]
(reduce (fn [agg [k v]] (assoc agg k (apply (select k) v))) {}
projection)))

Regards,
BG

-- 
Baishampayan Ghose
b.ghose at 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 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: Google Summer of Code 2012 Application

2012-04-04 Thread Raphaël AMIARD
Oh that's very interresting, so in some way you *are* also decoupling 
ClojureScript backend from it's parse and analysis components ! But 
doing so in a separate project, and in a more ambitious form than 
what i proposed in my application. 

Maybe there is a possibility of pairing the projects ? It would be nice 
to have David Nolen feedback about that.

Anyway, i'm gonna spend some more time studying your CinC code, and
i will probably get back to you with numerous questions :)
If you have any comments or corrections that you'd think may be nice for the
GSOC applications, i'd be very happy !

On Wednesday, April 4, 2012 2:52:16 PM UTC+2, Aaron Cohen wrote:

 2012/4/4 Raphaël AMIARD:
  Hi Aaron !
 
  Those application are intended for submission on the google summer of 
 code
  site. I think both Clojure developer and google will eventually get them 
 if
  i understood the system right.
 
  Thank you very much for the editing help proposition, it would be 
 terribly
  helpful, since i'm not used to write long prose in english :) The 
 markdown
  source for the applications is disponible on my github pages repository. 
 A
  lot of the text is shared between the two applications.
 
  I'm gonna look more seriously into the ClojureScript to gambit scheme
  compiler, but from a preliminary look, it seems like there is mostly the
  emit function/methods changing, like i thought. It would be interresting 
 to
  modularize the backend in clojurescript, and then modify clojure-scheme 
 to
  fit the new modular backend scheme.
 
  I have more trouble understanding the CinC project. Is it an attempt to 
 port
  the Clojure java compiler to clojure ? I'm gonna look at the code more
  closely this afternoon.

 Yes, one way of looking at CinC would be as porting the clojure java
 compiler to be a backend to the clojurescript compiler. I started by
 extracting the analyzer from clojurescript and removing several
 assumptions it was making about cljs. I then moved the compiler into
 clojure.java.compiler and started porting over the java compiler to
 the same multimethod framework. Outputting java requires more type
 information than outputting javascript, that's all calculated by
 walking the ast in clojure.java.compiler/ast.clj

  Eventually (that's such a loaded word, it's very dependent on the
 amount of time I have to work on it), once I finish the java backend
 I'd like to add back the javascript one. In my scheme it would end up
 somewhere like clojure.js.compiler and basically just be the emit
 multimethods from cljs moved.

 My todos:
   1) Finish porting over the remaining special forms (I have try/catch
 mostly working locally, just need to finish it and push it out)
   2) Verify that I can compile core.clj from nothing. Currently I'm
 cheating by just copying the defs from the bootstrap compiler, the
 target compiler should be able to build all its functionality just by
 compiling core.clj just like the current one does
   3*) Move protocols to the bottom. There are a few places where
 I've kept the assumptions of the current compiler about how FNs extend
 abstract classes using inheritance. It would be nice to be more like
 clojurescript here, only using protocols and deftype rather than
 Interfaces and inheritance.
   4*) Write nice deftype based implementations of the persistent
 datastructures. This is probably a worthy GSoC task of its own and it
 would help clojurescript even without my project
   5*) Add clojurescript back as target of the CinC compiler.
   6*) It would also be neat to look at some of the other compilers
 that have been popping up (rpython, scheme) and see if they would work
 as CinC backends



-- 
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: GSoC: Browser-based Clojure(Script) editor

2012-04-04 Thread Martin Forsgren
Hi again!
I've played around a little with Chris Grangers editor and changed it into 
a simple repl.
The code is on github: https://github.com/dentrado/cljs-repl
If the return value is a HTMLElement or a JQuery object it gets attached to 
the repl-div.
try:
($ video / 
   (map-js {:src http://html5demos.com/assets/dizzy.webm;
 :type video/webm
 :controls controls}))
or
(let [$canvas ($ canvas /)
  ctx (.getContext (aget $canvas 0) 2d) ]
  (bind $canvas :mousemove 
(fn [e]
  (.fillRect ctx (.-offsetX e) (.-offsetY e) 10 10)
  (.stroke ctx)))
  $canvas) 
for example.


Den torsdagen den 22:e mars 2012 kl. 11:23:53 UTC+1 skrev Martin Forsgren:

 Hello! 
 I am thinking of applying to GSoC and I found the proposal to continue 
 working on Chris Grangers Clojure(script)-editor in Bret Victor- 
 style really interesting. 

 I have some ideas on features that I think would be nice to have, 
 other than opening, saving and compiling files: 

 Visualization of functions à la Bret Victor (Let the user give example 
 input, then print the values of all local vars (and maybe return 
 values of function calls) at the side of the function). Using 
 clojure.tools.trace or CDT perhaps? 
 Possibility to add the example input and the corresponding expected 
 output as an unit test for the function. 

 Pluggable ui-widgets (like the slider and colorpicker in Brets talk). 
 Examples: slider, checkbox, colorpicker, filechooser, datepicker, 
 mouse movement recorder, piano?, whatever. 
 (predicate dispatch to determine what widget to choose? :) 

 Pluggable widgets for visualising data(structures) could also be 
 created.(Perhaps inline widgets? Although I think that most often 
 would be more annoying than helpful.) 

 Use kibit to highlight code that could be rewritten. 

 Visualising the call-stack (as Chris suggested) 

 Graphs of relations between namespaces. 

 What do you think? Do you have other ideas? What features do you think 
 one should focus on first ? Please give some feedback. 


Den torsdagen den 22:e mars 2012 kl. 11:23:53 UTC+1 skrev Martin Forsgren:

 Hello! 
 I am thinking of applying to GSoC and I found the proposal to continue 
 working on Chris Grangers Clojure(script)-editor in Bret Victor- 
 style really interesting. 

 I have some ideas on features that I think would be nice to have, 
 other than opening, saving and compiling files: 

 Visualization of functions à la Bret Victor (Let the user give example 
 input, then print the values of all local vars (and maybe return 
 values of function calls) at the side of the function). Using 
 clojure.tools.trace or CDT perhaps? 
 Possibility to add the example input and the corresponding expected 
 output as an unit test for the function. 

 Pluggable ui-widgets (like the slider and colorpicker in Brets talk). 
 Examples: slider, checkbox, colorpicker, filechooser, datepicker, 
 mouse movement recorder, piano?, whatever. 
 (predicate dispatch to determine what widget to choose? :) 

 Pluggable widgets for visualising data(structures) could also be 
 created.(Perhaps inline widgets? Although I think that most often 
 would be more annoying than helpful.) 

 Use kibit to highlight code that could be rewritten. 

 Visualising the call-stack (as Chris suggested) 

 Graphs of relations between namespaces. 

 What do you think? Do you have other ideas? What features do you think 
 one should focus on first ? Please give some feedback. 


Den torsdagen den 22:e mars 2012 kl. 11:23:53 UTC+1 skrev Martin Forsgren:

 Hello! 
 I am thinking of applying to GSoC and I found the proposal to continue 
 working on Chris Grangers Clojure(script)-editor in Bret Victor- 
 style really interesting. 

 I have some ideas on features that I think would be nice to have, 
 other than opening, saving and compiling files: 

 Visualization of functions à la Bret Victor (Let the user give example 
 input, then print the values of all local vars (and maybe return 
 values of function calls) at the side of the function). Using 
 clojure.tools.trace or CDT perhaps? 
 Possibility to add the example input and the corresponding expected 
 output as an unit test for the function. 

 Pluggable ui-widgets (like the slider and colorpicker in Brets talk). 
 Examples: slider, checkbox, colorpicker, filechooser, datepicker, 
 mouse movement recorder, piano?, whatever. 
 (predicate dispatch to determine what widget to choose? :) 

 Pluggable widgets for visualising data(structures) could also be 
 created.(Perhaps inline widgets? Although I think that most often 
 would be more annoying than helpful.) 

 Use kibit to highlight code that could be rewritten. 

 Visualising the call-stack (as Chris suggested) 

 Graphs of relations between namespaces. 

 What do you think? Do you have other ideas? What features do you think 
 one should focus on first ? Please give some feedback. 


Den torsdagen den 22:e mars 2012 kl. 11:23:53 UTC+1 skrev Martin 

Viterbi

2012-04-04 Thread myriam abramson
Hello,
I was wondering if you could give me some advice on my Viterbi algorithm in
clojure posted at git://gist.github.com/2301728.git.
I am a complete novice at Clojure. Hopefully, we could include it as an
implementation on the Wikipedia page for the Viterbi algorithm.

TIA,
melipone

-- 
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

[ANN] shady 0.1.0: JVM interop classes with less heartache

2012-04-04 Thread Marshall T. Vandegrift
Hi all:

Shady is intended to be a collection of JVM interop facilities.  Right
now it contains two useful pieces of functionality for producing iterop
classes: a version of `gen-class` supporting dynamic redefinition like
`deftype`; and a `defclass` macro providing a `deftype`-like interface
to that `gen-class`.

For example:

(ns example.defclass
  (:use [shady.defclass :only [defclass]]))

(defclass Example [field1 field2]
  :extend BaseClass
  :constructors {[String String] [String]}

  Example
  (-init [arg1 arg2] [[arg1] [arg1 arg2]])
  (newMethod ^String [^int param]
(str example: field1 : param : field2))

  BaseClass
  (override ^Long [^Class class] 10)

  SomeInterface
  (implementedMethod []
Types defaulting to Object, as you'd hope.))

The interface is cleaner (IMHO), and normalized with the other Clojure
type-definition facilities.  The support for dynamic class redefinition
is clinically proven to produce 73% less heartache for interop
situations where you need full JVM classes.  Be warned though, under the
hood `defclass` does still use the same class-generation code as
`gen-class`, with all that implies (performance, methods backed by
functions bound to vars in the implementing namespace, etc).

You can get the source from github:

https://github.com/llasram/shady

And the jar from Clojars:

[shady 0.1.0]

This is the first Clojure library I'm pushing for broader consumption,
so feedback is more than welcome.

-Marshall

-- 
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: Google Summer of Code 2012 Application

2012-04-04 Thread Aaron Cohen
Raph, rather than do an edit pass at this point, there are some larger
problems with your proposal you need to take care of. :)

In my opinion, your proposals are too informal, Hi, I'm Raphael As
I'm not going to be choosing them, I can't guarantee this is the case, but
judging from http://www.booki.cc/gsocstudentguide/proposal-examples/ these
are intended to be more like a short formal paper (with abstract or
synopsis to begin) than a resume (though your tone is probably too informal
for most resumes too for what it's worth).

Make sure you've addressed all the items here:
http://www.booki.cc/gsocstudentguide/writing-a-proposal/

Specifically:
 You don't have your full contact information (understandable since this is
on a public github, but be sure that you include it as Google requested in
the end)
 Your biographical information is too spread out, confine it to a single
section and be brief (but complete). You have some great skills listed, I'd
pull them out to a separate section (LLVM experience, VMKit experience,
experience using git, any of the things you've already done relevant to
working with clojure)
 You don't have any deliverables or a proposed timeline, and you haven't
outlined the _specific_ tasks you'd like to complete in 3 months. For
instance, your clojurescript to lua compiler says what you propose to do,
but it needs specific items describing the how.
  Related work: You should be able to find some existing projects that
relate to the proposals you are looking at, list them separately, it shows
you've done your homework

Also make sure you've address all the items on the clojure specific
requirements, here:
http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+Application+Questions
(second
paragraph)

Specifically, you seem to be missing:

   - Are you comfortable working independently under a supervisor or mentor
   who is several thousand miles away, not to mention 12 time zones away? How
   will you work with your mentor to track your work? Have you worked in this
   style before?
   - If your native language is not English, are you comfortable working
   closely with a supervisor whose native language is English? What is your
   native language, as that may help us find a mentor who has the same native
   language?
   - Where do you live, and can we assign a mentor who is local to you so
   you can meet in a coffee shop for lunch?

-- 
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: Google Summer of Code 2012 Application

2012-04-04 Thread Raphaël AMIARD
Great, thank you very much, i'm gonna address those points right away !

The thing is, there are some keys choices about the proposals that i 
probably need to make for the final application, and that's what i hoped to 
discuss here. Although i'm quite late and it leaves little time to consider 
different options.

For example, for the ClojureScript backend project, i have two very 
different backend alternatives, and i need to choose one if i want to make 
a serious timeline, so i wondered what would seem like the most realizable 
and interesting alternative.

Anyway, there is a lot of things in what you said that i can take care of 
right now anyway :) Thank you very much for your feedback !

On Wednesday, April 4, 2012 5:36:49 PM UTC+2, Aaron Cohen wrote:

 Raph, rather than do an edit pass at this point, there are some larger 
 problems with your proposal you need to take care of. :)

 In my opinion, your proposals are too informal, Hi, I'm Raphael As 
 I'm not going to be choosing them, I can't guarantee this is the case, but 
 judging from http://www.booki.cc/gsocstudentguide/proposal-examples/ these 
 are intended to be more like a short formal paper (with abstract or 
 synopsis to begin) than a resume (though your tone is probably too informal 
 for most resumes too for what it's worth).

 Make sure you've addressed all the items here:
 http://www.booki.cc/gsocstudentguide/writing-a-proposal/

 Specifically:
  You don't have your full contact information (understandable since this 
 is on a public github, but be sure that you include it as Google requested 
 in the end)
  Your biographical information is too spread out, confine it to a single 
 section and be brief (but complete). You have some great skills listed, I'd 
 pull them out to a separate section (LLVM experience, VMKit experience, 
 experience using git, any of the things you've already done relevant to 
 working with clojure)
  You don't have any deliverables or a proposed timeline, and you haven't 
 outlined the _specific_ tasks you'd like to complete in 3 months. For 
 instance, your clojurescript to lua compiler says what you propose to do, 
 but it needs specific items describing the how.
   Related work: You should be able to find some existing projects that 
 relate to the proposals you are looking at, list them separately, it shows 
 you've done your homework

 Also make sure you've address all the items on the clojure specific 
 requirements, here:

 http://dev.clojure.org/display/community/Google+Summer+of+Code+2012+Application+Questions
  (second 
 paragraph)

 Specifically, you seem to be missing:

- Are you comfortable working independently under a supervisor or 
mentor who is several thousand miles away, not to mention 12 time zones 
away? How will you work with your mentor to track your work? Have you 
worked in this style before? 
- If your native language is not English, are you comfortable working 
closely with a supervisor whose native language is English? What is your 
native language, as that may help us find a mentor who has the same native 
language? 
- Where do you live, and can we assign a mentor who is local to you so 
you can meet in a coffee shop for lunch? 



-- 
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: ClojureScript One in Eclipse

2012-04-04 Thread nchurch
 Note that the browser-connected REPL (at least, when run via 
 one.sample.repl/go) hoists itself up on top of the REPL you start via Run  
 Clojure Application, and assumes that it's in a console, and therefore 
 doesn't play well with the ccw REPL, assumes the opposite.

I assume this means the browser repl from cljs-template would not work
from ccw either?  (I tried it, and I get a continuous stream of EOF
errors scrolling by.)

Turcio, did you figure anything else out about your configuration of
One in ccw?

Thanks,

Nick.

On Feb 20, 7:05 am, Chas Emerick c...@cemerick.com wrote:
 Yes, I just cloned and started ClojureScript One usingccw.  I was able to get 
 the dev server up and running, and click around in all the tabs without any 
 exceptions.

 You didn't say whether you did this or not, but in addition to the 
 directories specified in :extra-classpath-dirs, you need to add the 
 :source-path, as well as all of the jars in lib/.

 Note that thebrowser-connectedREPL(at least, when run via one.sample.repl/go) 
 hoists itself up on top of theREPLyou start via Run  Clojure Application, 
 and assumes that it's in a console, and therefore doesn't play well with 
 theccwREPL, assumes the opposite.  Specifically, thebrowser-connectedREPLuses 
 stdin, one of the few places where regular REPLs outpaceREPLservers like 
 nREPL (whichccwuses) and swank.  For this reason, you can't use 
 thebrowser-connectedREPLfrom within SLIME either AFAIK.

 That shouldn't stop you from being able to useccwfor editing ClojureScript 
 files, managing the server side of things in accwREPL, etc.  You'd just need 
 to use lein for thebrowser-connectedREPL.

 Quality support for ClojureScript inccwwould probably require:

 1. Finishing the leiningen integration (underway now, though we're targeting 
 Leiningen 2 to start, and perhaps backfilling Leiningen 1.x support depending 
 on various factors).
 2. One of: adding an inferior-clojure mode so that 
 thebrowser-connectedREPLwill work sanely; or, figuring out how to support 
 thebrowser-connectedREPLwithin the scope of nREPL; or, something else I've 
 not thought of in the last 5 minutes. :-)

 Cheers,

 - Chas

 On Feb 19, 2012, at 5:28 PM, turcio wrote:







  Actually, has anybody succeeded to run ClojureScript One from Eclipse?

  Daniel

  On Feb 17, 12:14 pm, turcio tur...@gmail.com wrote:
  Hi,
  I'm trying to run ClojureScript One usingCCWplugin in Eclipse. I
  created a new project and imported all the source code into it. Then I
  added folders to the build path that reflect the following
  configuration from project.clj:

  :git-dependencies [[https://github.com/clojure/clojurescript.git;
  886d8dc81812962d30a741d6d05ce9d90975160f]
                       [https://github.com/levand/domina.git;
  8933b2d12c44832c9bfaecf457a1bc5db251a774]]
    :extra-classpath-dirs [.lein-git-deps/clojurescript/src/clj
                           .lein-git-deps/clojurescript/src/cljs
                           .lein-git-deps/domina/src/cljs
                           src/app/cljs
                           src/app/cljs-macros
                           src/lib/clj
                           src/lib/cljs
                           templates]

  I also executed lein bootstrap and added libraries to the build path
  in Eclipse.

  Now I'm running the app by right clicking on project folder, then Run
  as-Clojure application. InreplI execute: (in-ns 'one.sample.repl)
  (dev-server)). Thebrowsershows up the homepage, but when I click on
  Development tab the exception listed below occurs. Some files
  ClojureScript fiiles are generated but not all. Also empty out
  directory is created in the root folder.

  Any ideas?

  Thanks,
  Daniel

  ***
   *

  2012-02-17 12:06:17.393:WARN::/development
  java.lang.AssertionError: Assert failed: Can't recur here|frame
          at cljs.compiler$fn__877.invoke(compiler.clj:762)
          at clojure.lang.MultiFn.invoke(MultiFn.java:177)
          at cljs.compiler$analyze_seq.invoke(compiler.clj:1033)
          at cljs.compiler$analyze.invoke(compiler.clj:1086)
          at cljs.compiler$analyze.invoke(compiler.clj:1079)
          at cljs.compiler$fn__801.invoke(compiler.clj:606)
          at clojure.lang.MultiFn.invoke(MultiFn.java:177)
          at cljs.compiler$analyze_seq.invoke(compiler.clj:1033)
          at cljs.compiler$analyze.invoke(compiler.clj:1086)
          at cljs.compiler$analyze.invoke(compiler.clj:1079)
          at cljs.compiler$parse_invoke$fn__1014.invoke(compiler.clj:979)
          at clojure.core$map$fn__3811.invoke(core.clj:2432)
          at clojure.lang.LazySeq.sval(LazySeq.java:42)
          at clojure.lang.LazySeq.seq(LazySeq.java:60)
          at clojure.lang.Cons.next(Cons.java:39)
          at clojure.lang.PersistentVector.create(PersistentVector.java:50)
          at
  

ClojureScript allows fns to be called with too many arguments

2012-04-04 Thread Nathan Sorenson
ClojureScript doesn't complain when you supply too many arguments to a 
function, silently dropping the superfluous args. Is this a bug or feature? 

I'm not sure if I should replicate this behaviour in clojure-scheme, as it 
differs from Clojure.

P.S. is there a separate group for ClojureScript bug discussions?

-- 
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

Congomongo or monger ???

2012-04-04 Thread Simone Mosciatti
I don't like try to compare two different work, but when two programs have 
the same task, i never know...

What would you suggest, congomongo or monger (or other) ? Why ? Thoughts ???

My operation would be very easy, write more than read, and update values, 
maybe in a future use of map/reduction...

I will work a lot with json...

Thank you

-- 
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: kibit is to Clojure what SOUL is to Smalltalk

2012-04-04 Thread Gabriel Pickard
On Mon, Apr 2, 2012 at 5:53 PM, David Nolen dnolen.li...@gmail.com wrote:

 On Fri, Mar 30, 2012 at 8:20 PM, Gabriel Pickard 
 wergo...@googlemail.comwrote:

 I'm trying to build something related [1]: A temporal- and control-flow
 reasoner for software in general. My idea was to tie this into logging or
 debugging interfaces.
 I would be very, very interested in combining this with source-code
 reasoning (which might also profit from some shared higher-level logic),
 yet inexperienced.


 Inexperienced as well :) Hopefully enthusiasm counts for something. I see
 that you're a Prolog programmer - have you done something like this before
 in Prolog?



No,actually not. Building a system like that in Prolog wouldn't really feel
right either. The integration of homoiconicity and real-world applicability
in Clojure + JVM/JS with logic programming in core.logic seems like an
ideal fit for such a task.

Enthusiasm counts for sure,

Gabe :)

-- 
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: ClojureScript allows fns to be called with too many arguments

2012-04-04 Thread Phil Hagelberg
On Wed, Apr 4, 2012 at 10:39 AM, Nathan Sorenson n...@sfu.ca wrote:
 ClojureScript doesn't complain when you supply too many arguments to a
 function, silently dropping the superfluous args. Is this a bug or feature?

IIRC it's a bug of the Javascript language itself. I wouldn't expect
it to be carried over to runtimes that can perform arity checks
without incurring performance overhead.

-Phil

-- 
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: ClojureScript allows fns to be called with too many arguments

2012-04-04 Thread Timothy Baldridge
I would probably say that in questions like this, it's best to do it
the way Clojure on the JVM does it. ClojureScript is still pretty
immature, so using it as a reference standard is going to be
troublesome. This is the approach clojure-py is taking. Consider
Clojure-jvm to be the reference spec, everything else that doesn't
make sense is a bug.

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


Re: ClojureScript allows fns to be called with too many arguments

2012-04-04 Thread David Nolen
It could emit a warning but it will probably not be a hard error.
clojure-dev is good for these discussions.

David

On Wednesday, April 4, 2012, Nathan Sorenson wrote:

 ClojureScript doesn't complain when you supply too many arguments to a
 function, silently dropping the superfluous args. Is this a bug or feature?

 I'm not sure if I should replicate this behaviour in clojure-scheme, as it
 differs from Clojure.

 P.S. is there a separate group for ClojureScript bug discussions?

 --
 You received this message because you are subscribed to the Google
 Groups Clojure group.
 To post to this group, send email to 
 clojure@googlegroups.comjavascript:_e({}, 'cvml', 
 '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 javascript:_e({}, 'cvml',
 'clojure%2bunsubscr...@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

Compiling Libraries With :aot

2012-04-04 Thread octopusgrabbus
Is there any reason to compile a Clojure library with :aot?

(defproject bene-csv 1.0.0-SNAPSHOT
  :description A csv parsing library
  :dependencies [[org.clojure/clojure 1.3.0]
 [clojure-csv/clojure-csv 1.3.2]]
  :aot [bene-csv.core])

How does compiling or not compiling such a project with :aot affect the 
Clojure main project that requires the library?

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

Re: Compiling Libraries With :aot

2012-04-04 Thread Softaddicts
An AOT generated lib mainly avoids compilation on the fly when your app
starts up.

We use AOT here to avoid deployment issues that could be found at
application startup (missing component, bad fn signatures, ...) or if we call
Clojure code from Java using gen-class.

On some application containers (tomcat, weblogic, ...), AOT can simplify your 
life
when configuring your app context, you may  need to refer to some of your 
Clojure 
components but the container can only refer to compiled classes. 
On the fly compilation is not an option in this case.

I would not use AOT in dev mode or if you do not deploy frequently especially
if your project is not mission critical and the application container does not
require it.

Luc


 Is there any reason to compile a Clojure library with :aot?
 
 (defproject bene-csv 1.0.0-SNAPSHOT
   :description A csv parsing library
   :dependencies [[org.clojure/clojure 1.3.0]
  [clojure-csv/clojure-csv 1.3.2]]
   :aot [bene-csv.core])
 
 How does compiling or not compiling such a project with :aot affect the 
 Clojure main project that requires the library?
 
 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
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail!

-- 
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: Compiling Libraries With :aot

2012-04-04 Thread Marshall T. Vandegrift
octopusgrabbus octopusgrab...@gmail.com writes:

 Is there any reason to compile a Clojure library with :aot?

Here's all the reasons I know of for doing AOT-compilation:

  - The code produces JVM classes with `clojure.core/gen-class`, which
only produces any results when compiling.

  - The code needs to expose a JVM class as an entry-point for a JVM
framework which expects to find and instantiate a class through
reflection.  (Usually in tandem with the previous case.)

  - One wishes to build and distribute source-less JARs of only the
compiled code.

Any I'm missing?

An open-source Clojure library intended for use from Clojure might hit
the first case, but I don't believe very frequently.

-Marshall

-- 
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: Compiling Libraries With :aot

2012-04-04 Thread Softaddicts
I would add that you can look at the resulting jar file and you will see
both the source code and the .class files in it.

By default the source is present but you can ask leiningen to remove it
from the target. If you need to keep your code private, that's an option.
You can then deliver only byte code to untrusted platforms.

Luc


 Is there any reason to compile a Clojure library with :aot?
 
 (defproject bene-csv 1.0.0-SNAPSHOT
   :description A csv parsing library
   :dependencies [[org.clojure/clojure 1.3.0]
  [clojure-csv/clojure-csv 1.3.2]]
   :aot [bene-csv.core])
 
 How does compiling or not compiling such a project with :aot affect the 
 Clojure main project that requires the library?
 
 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
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail!

-- 
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: Advice on style implementation

2012-04-04 Thread David Jagoe
Thanks BG, I prefer your version. I'd forgotten about select-keys.


Cheers,
David

On 4 April 2012 15:20, Baishampayan Ghose b.gh...@gmail.com wrote:
 Please have a look at the following function (explained in the doc
 string). I have a bunch of rows that I need to aggregate using
 different functions per field. I also need to apply the aggregate to a
 subset of the rows. Obviously this is just like SQL aggregation, hence
 the interface I've specified.

 However I'm left wondering whether my implementation could be improved.

 Particularly I very often find myself doing

 (apply hash-map (flatten (for [[k v] some-map] ...)))

 so often in fact that I feel like I'm missing something.

 Any pointers or advice on improving my style will be much appreciated!

 Don't have a direct answer to your question, but what about
 implementing aggregate like this -

 (defn aggregate [rows  {select :select where :where}]
    (let [projection (apply merge-with vector (map #(select-keys %
 (keys select)) (filter where rows)))]
        (reduce (fn [agg [k v]] (assoc agg k (apply (select k) v))) {}
 projection)))

 Regards,
 BG

 --
 Baishampayan Ghose
 b.ghose at 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 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



-- 
David Jagoe

davidja...@gmail.com
+447535268218

-- 
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: Congomongo or monger ???

2012-04-04 Thread Marcus Lindner
I try to use monger.
Its syntax is nearer to mongoDB as CongoMongo.

But that is only my personal view :(.
I have no real experience with CongoMongo and try to learn MongoDB and
Clojure with monger.

But it might be intersting to see the opinions from more experienced people
;).


2012/4/4 Simone Mosciatti mweb@gmail.com

 I don't like try to compare two different work, but when two programs have
 the same task, i never know...

 What would you suggest, congomongo or monger (or other) ? Why ? Thoughts
 ???

 My operation would be very easy, write more than read, and update values,
 maybe in a future use of map/reduction...

 I will work a lot with json...

 Thank you

 --
 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: [ANN] Korma SQL ported to ClojureCLR

2012-04-04 Thread Rick Beerendonk


 Right now, there is nothing like leiningen for .NET


Did you take a look at NuGet?
http://nuget.codeplex.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: Advice on style implementation

2012-04-04 Thread Alan Malloy
On Apr 4, 6:50 am, David Jagoe davidja...@gmail.com wrote:
 Particularly I very often find myself doing

 (apply hash-map (flatten (for [[k v] some-map] ...)))

:( :( :( flatten is vile, never use it[1]. What if the value in the
map is a list, or the key is a vector? Now you've broken it. Instead
use into:

(into {}
  (for [[k v] some-map]
[k (f v)])) ;; or whatever k/v pair you want

I'm also very surprised to see (apply merge-with vector ...), because
this seems like it is rarely right. If you have three maps, {:a 1},
{:a 2}, and {:a 3}, do you really want the result to be {:a [[1 2]
3]}? You're probably better off converting to {:a [1]} {:a [2]} {:a
[3]} beforehand and using (apply merge-with into ...).

Your implementation of selected? is also strange - why are you
iterating through the keys, instead of using their fast lookup? I'd
write (selected? [coll] (contains? select coll)). But that brings up
another point: selected? and agg are just partial applications of
contains and get:

(let [selected? (partial contains? select)
  agg (partial get select)]
  ...)

Or, if you prefer never to repeat anything:

(let [[selected? agg] (for [f [contains? get]]
(partial f select))]
  ...)

[1] technically you want it sometimes, but I strongly suggest staying
away.


 Any pointers or advice on improving my style will be much appreciated!

 (defn aggregate
   Aggregate rows using the functions provided in select and after
    filtering the rows by where.

     E.g.

       (aggregate [{:a 1 :b 2} {:a 3 :b 4} {:a 5 :b 6}] :select {:a +}
 :where (fn [r] ( (:b r) 6))) -- {:a 4}

     [rows  {select :select where :where}]
     (letfn [(selected? [col] (some #{col} (keys select)))
              (agg [col] (get select col))]
       (apply hash-map
              (flatten
               (for [[k vs] (apply merge-with vector (filter where
 rows)) :when (selected? k)]
                 [k (apply (agg k) vs)])

 Thanks,

 --
 David Jagoe

 davidja...@gmail.com
 +447535268218

-- 
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: Advice on style implementation

2012-04-04 Thread David Jagoe
Thanks for that advice Alan. I've already run into a problem due to
merge-with vector. I get your point about flatten, and I will
certainly look closely at your suggestions regarding partial.

Thanks again for taking the time.

Cheers!

On 4 April 2012 21:11, Alan Malloy a...@malloys.org wrote:
 On Apr 4, 6:50 am, David Jagoe davidja...@gmail.com wrote:
 Particularly I very often find myself doing

 (apply hash-map (flatten (for [[k v] some-map] ...)))

 :( :( :( flatten is vile, never use it[1]. What if the value in the
 map is a list, or the key is a vector? Now you've broken it. Instead
 use into:

 (into {}
      (for [[k v] some-map]
        [k (f v)])) ;; or whatever k/v pair you want

 I'm also very surprised to see (apply merge-with vector ...), because
 this seems like it is rarely right. If you have three maps, {:a 1},
 {:a 2}, and {:a 3}, do you really want the result to be {:a [[1 2]
 3]}? You're probably better off converting to {:a [1]} {:a [2]} {:a
 [3]} beforehand and using (apply merge-with into ...).

 Your implementation of selected? is also strange - why are you
 iterating through the keys, instead of using their fast lookup? I'd
 write (selected? [coll] (contains? select coll)). But that brings up
 another point: selected? and agg are just partial applications of
 contains and get:

 (let [selected? (partial contains? select)
      agg (partial get select)]
  ...)

 Or, if you prefer never to repeat anything:

 (let [[selected? agg] (for [f [contains? get]]
                        (partial f select))]
  ...)

 [1] technically you want it sometimes, but I strongly suggest staying
 away.


 Any pointers or advice on improving my style will be much appreciated!

 (defn aggregate
   Aggregate rows using the functions provided in select and after
    filtering the rows by where.

     E.g.

       (aggregate [{:a 1 :b 2} {:a 3 :b 4} {:a 5 :b 6}] :select {:a +}
 :where (fn [r] ( (:b r) 6))) -- {:a 4}

     [rows  {select :select where :where}]
     (letfn [(selected? [col] (some #{col} (keys select)))
              (agg [col] (get select col))]
       (apply hash-map
              (flatten
               (for [[k vs] (apply merge-with vector (filter where
 rows)) :when (selected? k)]
                 [k (apply (agg k) vs)])

 Thanks,

 --
 David Jagoe

 davidja...@gmail.com
 +447535268218

 --
 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



-- 
David Jagoe

davidja...@gmail.com
+447535268218

-- 
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


[ELS 2012] Call for Participation

2012-04-04 Thread Marco Antoniotti
European Lisp Symposium 2012, Zadar, Croatia, April 29th - May 1st, 2012

Call for Participation.

http://european-lisp-symposium.org

The purpose of the European Lisp Symposium is to provide a forum for
the discussion and dissemination of all aspects of design,
implementation and application of any of the Lisp and Lisp-inspired
dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP,
Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, and so on. We
encourage everyone interested in Lisp to participate.


The main theme of the 2012 European Lisp Conference is
Interoperability: Systems, Libraries, Workflows.  Lisp based and
functional-languages based systems have grown a variety of solutions
to become more and more integrated with the wider world of Information
and Communication Technologies in current use.  There are several
dimensions to the scope of the solutions proposed, ranging from
embedding of interpreters in C-based systems, to the development of
abstractions levels that facilitate the expression of complex context
dependent tasks, to the construction of exchange formats handling
libraries, to the construction of theorem-provers for the Semantic
Web.  The European Lisp Symposium 2012 solicits the submission of
papers with this specific theme in mind, alongside the more
traditional tracks which have appeared in the past editions.

Registration:

Until April 15th the registration fee will be reduced.
Use the form on www.european-lisp-symposium.org to register.


Preliminary Program schedule:

Sunday April 29.
11:00 Sea  Sun  Coffee (meeting place: The Sea organ  Greeting to the 
Sun)
19:30 - 21:30 Welcome Cocktail at the Garden Bar

Monday April 30.
8:30 - 09:00 Registration
09:30 - 10:00 Welcome
10:00 - 11:00 Juan Jose Garcia-Ripoll, Instituto de
  Física Fundamental, CSIC, Spain
11:00 - 11:30 Coffee Break
11:30 - 13:00 Session 1
  11:30 - 12:15 Laurent Senta, Christopher Chedeau and
  Didier Verna. Generic Image Processing with Climb
  12:15 - 13:00 Giovanni Anzani, An iterative method to
  solve overdetermined systems of nonlinear equations
applied to the restitution of planimetric measurements 


13:00 - 15:00 Lunch Break

15:00 - 16:30 Session 2
  15:00 - 15:45 Alessio Stalla. Java interop with ABCL, a
practical example
  15:45 - 16:30 Nils Bertschinger. Embedded probabilistic
programming in Clojure
16:30 - 17:30   Pascal Costanza, ExaScience Lab, Intel, Belgium
17:30 - 18:00 Lightening Talk (1)
18:00 - 20:00 Buffet at the University of Zadar

Thusday May 1.
10:00 - 11:00 Ernst van Waning, Infometrics, Netherlands
11:00 - 11:30 Coffee Break
11:30 - 13:00 Session 3
  11:30 - 12:15 Marco Benelli. Scheme in Industrial Automation
  12:15 - 13:00 Gunnar Völkel, Johann M. Kraus and Hans A. Kestler
Algorithm Engineering with Clojure
13:00 - 15:00 Lunch Break

15:00 - 16:30 Session 4
  15:00 - 15:45 Irène Anne Durand. Object enumeration
  15:45 - 16:30 Alessio Stalla. Doplus, the high-level,
  Lispy, extensible iteration construct

16:30 - 17:00 Lightening Talk (2)
17:00 - 18:00 Announcements  Wrap-up


Venue:

Zadar is one of the enchanting cities on the Adriatic coast rich in
history. It still preserves a very old network of narrow and charming
city streets, as well as a Roman forum dating back to the first
century AD. In addition, Zadar region encompasses many natural
beauties, most prominent among them is the Kornati National Park, the
most unusual and indented set of small islands in the Mediterranean
(89 islands, islets and reefs) located only 15 nautical miles south of
Zadar – a visit to Kornati is planned as a part of the conference.


Accomoodation:

Participants are responsible for their own accommodation
arrangements. Reservations should be made directly to the hotels.

When making reservations in hotel Hotel Kolovare, please indicate that
you are with ELS 2012 / University of Zadar and you will get a
discount.  Due to the popularity of the location in spring, an early
reservations is recommended.

Hotel Kolovare * * * *
www.hotel-kolovare.com, +385 23 211 017, +385 203 200

Other accommodation options:
Hotel Bastion * * * *
www.hotel-bastion.hr, +385 23 / 494 950, info [at] hotel-bastion.hr

Falkenstiner Hotels  resorts – (Funimation)* * *
www.falkensteiner.com, +385 (0)23 206 400, +385 (0)23 332 065,
sales.borik [at] falkensteiner.com

Hotel Mediteran * * *
www.hotelmediteran-zd.hr, info [at] hotelmediteran-zd.hr

Hotel Porto * * *
www.hotel-porto.hr, +385-(0)23-292300, hotel.porto [at] zd.t-com.hr

Hotel Villa Nico * * *
www.hotel-villanico.com, +385 23 331198, +385 23 331960,
nico.moric [at] villanico.t-com.hr

Hotel President * * * *
www.hotel-president.hr, +385 23 337 500+385 (23) 333 696 ,
info [at] hotel-president.hr

Hostel Zadar
+385 331-145



Web site:

www.european-lisp-symposium.org

-- 
You received this message because you are 

Re: Congomongo or monger ???

2012-04-04 Thread Michael Klishin
Marcus Lindner:

 But it might be intersting to see the opinions from more experienced people 
 ;).

Monger [1] has several things Congomongo does not (or did not last time I 
looked at it):

* No integration of clj-time (transparent Joda Time types serialization)
* No integration with clojure.data.json
* No query DSL à la Korma
* No recommended way of validating your data

Which means more choices to make and boilerplate code to write on your part. 
For basic usage they are probably very similar.

CongoMongo still supports Clojure 1.2 while Monger was created from the ground 
up for 1.3 and its dependencies such as Validateur [2] also require Clojure 
1.3. So if you have reasons to use 1.2, CongoMongo is a safe bet.

Full disclosure: I am the author of Monger.

1. https://github.com/michaelklishin/monger
2. https://github.com/michaelklishin/validateur

MK


-- 
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: ClojureScript Debug

2012-04-04 Thread Brian Goslinga
On Monday, April 2, 2012 8:54:07 AM UTC-5, Moritz Ulrich wrote:

 See [1]: Agents are currently not implemented

 They wouldn't be very useful, as javascript is single threaded in most
 implementations.

 [1]: 
 https://github.com/clojure/clojurescript/wiki/Differences-from-Clojure

Even in a single threaded agents are useful because they let you queue a 
task to be completed later. 

-- 
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: Compiling Libraries With :aot

2012-04-04 Thread Sean Corfield
On Wed, Apr 4, 2012 at 12:44 PM, Softaddicts
lprefonta...@softaddicts.ca wrote:
 On some application containers (tomcat, weblogic, ...), AOT can simplify your 
 life
 when configuring your app context, you may  need to refer to some of your 
 Clojure
 components but the container can only refer to compiled classes.
 On the fly compilation is not an option in this case.

I'll add a caveat here: you need AOT for code that is _directly_
called from Java (such as from an application container), but for code
that is called indirectly, you can certainly avoid AOT by requiring
namespaces / resolving symbols at runtime. At World Singles, we only
have a thin layer of AOT'd code and it does a require followed by a
resolve to get at the entry point to the non-AOT'd code. That means we
can mostly just ignore all the downsides of AOT :)

We have a small project for our AOT code and the rest of our code is
in a separate non-AOT'd project.
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

Perfection is the enemy of the good.
-- Gustave Flaubert, French realist novelist (1821-1880)

-- 
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: Compiling Libraries With :aot

2012-04-04 Thread Softaddicts
Agree, I still wonder about the downsides of AOT, comments ?


 On Wed, Apr 4, 2012 at 12:44 PM, Softaddicts
 lprefonta...@softaddicts.ca wrote:
  On some application containers (tomcat, weblogic, ...), AOT can simplify 
  your life
  when configuring your app context, you may  need to refer to some of your 
  Clojure
  components but the container can only refer to compiled classes.
  On the fly compilation is not an option in this case.
 
 I'll add a caveat here: you need AOT for code that is _directly_
 called from Java (such as from an application container), but for code
 that is called indirectly, you can certainly avoid AOT by requiring
 namespaces / resolving symbols at runtime. At World Singles, we only
 have a thin layer of AOT'd code and it does a require followed by a
 resolve to get at the entry point to the non-AOT'd code. That means we
 can mostly just ignore all the downsides of AOT :)
 
 We have a small project for our AOT code and the rest of our code is
 in a separate non-AOT'd project.
 -- 
 Sean A Corfield -- (904) 302-SEAN
 An Architect's View -- http://corfield.org/
 World Singles, LLC. -- http://worldsingles.com/
 
 Perfection is the enemy of the good.
 -- Gustave Flaubert, French realist novelist (1821-1880)
 
 -- 
 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
 
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail!

-- 
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: Compiling Libraries With :aot

2012-04-04 Thread Softaddicts
This email is not from me, did'nt type anything... I wonder if my email
client is buggy...


 
  Listed as a downer for Scala: Functional programming can be difficult
  to understand for a Java developer - same can be said for Clojure, so
  I think it is a similarity but he presents it as a difference.
 
 
 Wow.  All the more reason for a Java developer to mess with it then!  After
 all, Java doesn't (in general) preclude using a functional style so that
 would imply many Java programmers are missing an important tool in their
 arsenal.
 
 --~--~-~--~~~---~--~~
 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
 -~--~~~~--~~--~--~---
 
 
--
Softaddictslprefonta...@softaddicts.ca sent by ibisMail!

-- 
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


cljsbuild and checkouts?

2012-04-04 Thread Dave Sann
Can anyone confirm whether lein cljsbuild can support use of the 
checkouts directory?

I have tried this with a simple test. The code compiles without error but 
the checkouts dependencies are not included.

I know that you can jar the cljs files but it is good to be able to work 
without doing this for small edits.

I currently use a modified version of cljs-watch that does this - but I 
would like to switch to a more standard build path

If not supported I will add this as an enhancement request.

Cheers

Dave

-- 
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: cljsbuild and checkouts?

2012-04-04 Thread Dave Sann
Correction - the code does not compile in simple mode and above because the 
checkouts do not appear to be found.

On Thursday, 5 April 2012 13:31:51 UTC+10, Dave Sann wrote:

 Can anyone confirm whether lein cljsbuild can support use of the 
 checkouts directory?

 I have tried this with a simple test. The code compiles without error but 
 the checkouts dependencies are not included.

 I know that you can jar the cljs files but it is good to be able to work 
 without doing this for small edits.

 I currently use a modified version of cljs-watch that does this - but I 
 would like to switch to a more standard build path

 If not supported I will add this as an enhancement request.

 Cheers

 Dave



-- 
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

[ANN] Clojure Namespace Browser (clj-ns-browser 1.0.0)

2012-04-04 Thread Frank Siebenlist
I still remember the first time I was introduced to Smalltalk, when my 
colleague demonstrated the class-browser - it was one of those jaw-dropping 
moments: all that information at your finger-tips of a live- and living system…

Guess nowadays it's more nostalgia than anything else, but in many ways that 
Smalltalk development environment is still a hard act to follow.

Hopefully this Clojure Namespace Browser will get us one small step closer to 
our ultimate development environment (… although I'm sure that some of you 
emacs-gurus believe you're already there ;-) ).

The graphical browser should give you easier access to the documentation 
strings of all the vars in your live clojure project, as well as the source 
code, and clojuredocs' examplescomments. You can get all that info from the 
repl, but hopefully this browser should make it easier to … browse, explore, 
and find stuff in Clojure's vast collection of libraries.

The installation is dead-simple - just add: 

  :dev-development [[clj-ns-browser 1.0.0]]

to your project.clj file, start your repl, evaluate (use 'clj-ns-browser.sdoc), 
and then (sdoc), and your up and running with this namespace browser always one 
click or (sdoc…) away…

Caveat… it all works well on my MacOSX, but I have seen some issues with 
Lubuntu and missing unloaded namespaces - also I haven't tested it on windoze 
or other OS-flavors. So you mileage may vary…

The code and some more info with some screenshots are available at:

https://github.com/franks42/clj-ns-browser

Finally, kudos to Dave Ray and his Seesaw - fantastic tool and near real-time 
support on the mailing list.
(this has essentially been a 2 week project after Clojure-Conj/West - an after 
the kids are asleep project - no experience with Swing… a testament of how 
good seesaw is as an abstraction tool…)

Please let me know if it works for you, and suggestions and feedback are more 
than welcome.

Enjoy, FrankS.

-- 
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