Re: Warning: *retry-limit* not declared dynamic and thus is not dynamically rebindable

2013-04-18 Thread ljcppunix

Dear Marko Topolnik 

 You are right, it's correct when I upgrade to leiningen213, and no 
these warning messages, thank you again!

On Wednesday, April 17, 2013 9:04:18 AM UTC+8, ljcp...@gmail.com wrote:
>
> Dear all,
>
> When I installed leiningen and clojure, I run command "lein repl",
> then prompt some message like such ---
>
> C:\lein>lein repl
> Warning: *default-javac-options* not declared dynamic and thus is not
> dynamicall
> y rebindable, but its name suggests otherwise. Please either indicate
> ^:dynamic
> *default-javac-options* or change the name.
> Warning: *silently* not declared dynamic and thus is not dynamically
> rebindable,
>  but its name suggests otherwise. Please either indicate ^:dynamic
> *silently* or
>  change the name.
> Warning: *skip-auto-compile* not declared dynamic and thus is not
> dynamically re
> bindable, but its name suggests otherwise. Please either indicate
> ^:dynamic *ski
> p-auto-compile* or change the name.
> Warning: *retry-limit* not declared dynamic and thus is not
> dynamically rebindab
> le, but its name suggests otherwise. Please either indicate ^:dynamic
> *retry-lim
> it* or change the name.
> REPL started; server listening on localhost:53849.
>
> I think some thing is wrong, and I spent a lot of time and can't solve
> these problem,
> so ask help for me, thanks very much!

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Warning: *retry-limit* not declared dynamic and thus is not dynamically rebindable

2013-04-18 Thread ljcppunix


On Wednesday, April 17, 2013 7:23:32 PM UTC+8, Marko Topolnik wrote:
>
> Seems like old leiningen + new Clojure. You should upgrade to the latest 
> leiningen, which is 2.1.3.
>
> On Wednesday, April 17, 2013 3:04:18 AM UTC+2, ljcp...@gmail.com wrote:
>>
>> Dear all,
>>
>> When I installed leiningen and clojure, I run command "lein repl",
>> then prompt some message like such ---
>>
>> C:\lein>lein repl
>> Warning: *default-javac-options* not declared dynamic and thus is not
>> dynamicall
>> y rebindable, but its name suggests otherwise. Please either indicate
>> ^:dynamic
>> *default-javac-options* or change the name.
>> Warning: *silently* not declared dynamic and thus is not dynamically
>> rebindable,
>>  but its name suggests otherwise. Please either indicate ^:dynamic
>> *silently* or
>>  change the name.
>> Warning: *skip-auto-compile* not declared dynamic and thus is not
>> dynamically re
>> bindable, but its name suggests otherwise. Please either indicate
>> ^:dynamic *ski
>> p-auto-compile* or change the name.
>> Warning: *retry-limit* not declared dynamic and thus is not
>> dynamically rebindab
>> le, but its name suggests otherwise. Please either indicate ^:dynamic
>> *retry-lim
>> it* or change the name.
>> REPL started; server listening on localhost:53849.
>>
>> I think some thing is wrong, and I spent a lot of time and can't solve
>> these problem,
>> so ask help for me, thanks very much!
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] lein-html5-docs 2.0.0

2013-04-18 Thread John Gabriele
On Thursday, April 18, 2013 6:19:26 PM UTC-4, Tassilo Horn wrote:
>
>
>
> That's how docs generated with the plugin look like: 
>
>   http://userpages.uni-koblenz.de/~horn/funnyqt-docs/ 
>
>
Nice, Tassilo!

Incidentally, it looks like most of the doc strings there are pretty-much 
markdown-formatted. I think the final output would look better if you 
assumed the docstrings themselves were markdown-formatted and rendered them 
as html. (That is, only have the items under "Arglists" in a preformatted 
block --- everything else would be html.)

---John

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Setting content type in a resouce response

2013-04-18 Thread David Della Costa
Hi Josh, you should post Ring-related questions here:

https://groups.google.com/forum/?fromgroups#!forum/ring-clojure

To answer your question, it's hard to say without seeing your code.  In
fact, I'm having a hard time reproducing the problem without explicitly
telling ring to serve an HTML file as text/plain--it's showing up as
text/html without me explicitly setting it.

Also, did you mean ring.util.response (
http://ring-clojure.github.io/ring/ring.util.response.html) rather than
ring.util.resource (which doesn't exist as far as I know)?

For a very vanilla example which explicitly sets Content-Type, take a look
at this.  Let's say we had a plain file-response (note again that this is
giving me text/html, but anyways...):


(defn handler [request]
 (resource-response "index.html" {:root "public"}))

If we wanted to explicitly set it as text/html, we could wrap it using the
content-type function:

(defn handler [request]
  (->
   (resource-response "index.html" {:root "public"})
   (content-type "text/html")))

Of course, this is the most basic method--there are smarter ways to do it.
 Check out the Ring wiki for more, especially the section on creating
responses (https://github.com/ring-clojure/ring/wiki/Creating-responses),
static resources (https://github.com/ring-clojure/ring/wiki/Static-Resources)
and Content Types (https://github.com/ring-clojure/ring/wiki/Content-Types).

And again, I would suggest using the Ring list for these questions.

Hope this helps!

Best,
Dave

2013/4/19 Josh Kamau 

> Hi there ;
>
> Please help. How do i set the ContentType header in a
> (ring.util.resouce/resource-response ) ?
>
> I am serving html file and its being served as plain text.
>
> Josh
>
> --
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - 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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Clojurescript Error: Undefined nameToPath for goog.ui

2013-04-18 Thread Michał Marczyk
Firstly, :import in ClojureScript only supports symbols as libspecs,
so you'd need to write

  (:import goog.ui.Button)

(foo Bar Quux) support could be added easily, but currently
ClojureScript's ns form doesn't support the equivalents for :require
and :use, to it makes sense to expect full names in :import too. This
wouldn't trigger this particular assertion error though.

Apart from that, I thought lein-cljsbuild's default ClojureScript
version does support :import, but in any case it is outdated, so you
may want to add an explicit dependency on 0.0-1586 to your project.clj
and see if that makes things work.

In case it doesn't, this particular assertions needs to have its
message adjusted, but it actually accepts :import too. So, if it
doesn't go away, you may want to make sure that there are no funky ns
forms in any dependencies you're pulling in and such.

In any event, please let as know how it goes!

Cheers,
Michał


On 18 April 2013 22:48, Răzvan Rotaru  wrote:
> Hmm, I'm stuck again. :)
>
> I don't know why, but it seems that building the project with lein-cljsbuild
> does not accept :import. Here's the code:
>
> (ns habarnam
>   (:use [domina :only [xpath]])
>   (:import [goog.ui [Button]])
>
>
> And here's the compilation error:
>
> Compiling ClojureScript.
> Compiling "res/bootstrap.js" from ["src/cljs"]...
> ←[31mCompiling "res/bootstrap.js" failed.←[0m
> ←[31mjava.lang.AssertionError: ←[39m←[31mAssert failed: Only :refer-clojure,
> :require, :require-macros, :use and :use-macros libspecs supported
> (#{:use-macros :require-macros :require :use} k)←[39m
> ←[32m  analyzer.clj:627 cljs.analyzer/eval381[fn]←[39m
> ←[35m protocols.clj:143 clojure.core.protocols/fn←[39m
> ←[35m  protocols.clj:19 clojure.core.protocols/fn[fn]←[39m
> ←[35m  protocols.clj:31 clojure.core.protocols/seq-reduce←[39m
> ←[35m  protocols.clj:54 clojure.core.protocols/fn←[39m
> ←[35m  protocols.clj:13 clojure.core.protocols/fn[fn]←[39m
> ←[35m core.clj:6177 clojure.core/reduce←[39m
> ←[32m  analyzer.clj:637 cljs.analyzer/eval381[fn]←[39m
> ←[36m  MultiFn.java:241 clojure.lang.MultiFn.invoke←[39m
> ←[32m  analyzer.clj:862 cljs.analyzer/analyze-seq←[39m
> ←[32m  analyzer.clj:917 cljs.analyzer/analyze←[39m
> ←[32m  analyzer.clj:909 cljs.analyzer/analyze←[39m
> ←[32m  compiler.clj:756 cljs.compiler/compile-file*←[39m
> ←[32m  compiler.clj:794 cljs.compiler/compile-file←[39m
> ←[32m  compiler.clj:855 cljs.compiler/compile-root←[39m
> ←[32m   closure.clj:365 cljs.closure/compile-dir←[39m
> ←[32m   closure.clj:397 cljs.closure/eval1496[fn]←[39m
> ←[32m   closure.clj:267 cljs.closure/eval1423[fn]←[39m
> ←[32m   closure.clj:411 cljs.closure/eval1483[fn]←[39m
> ←[32m   closure.clj:267 cljs.closure/eval1423[fn]←[39m
> ←[32m   compiler.clj:43 cljsbuild.compiler.SourcePaths/fn←[39m
> ←[35m core.clj:2485 clojure.core/map[fn]←[39m
> ←[36m   LazySeq.java:42 clojure.lang.LazySeq.sval←[39m
> ←[36m   LazySeq.java:60 clojure.lang.LazySeq.seq←[39m
> ←[36m   RT.java:484 clojure.lang.RT.seq←[39m
> ←[35m  core.clj:133 clojure.core/seq←[39m
> ←[35m  core.clj:617 clojure.core/apply←[39m
> ←[35m core.clj:2514 clojure.core/mapcat←[39m
> ←[36m   RestFn.java:423 clojure.lang.RestFn.invoke←[39m
> ←[32m   compiler.clj:43
> cljsbuild.compiler/cljsbuild.compiler.SourcePaths←[39m
> ←[32m   closure.clj:875 cljs.closure/build←[39m
> ←[32m   compiler.clj:57 cljsbuild.compiler/compile-cljs[fn]←[39m
> ←[32m   compiler.clj:56 cljsbuild.compiler/compile-cljs←[39m
> ←[32m  compiler.clj:140 cljsbuild.compiler/run-compiler←[39m
> ←[33m  NO_SOURCE_FILE:1 user/eval1979[fn]←[39m
> ←[36m   LazySeq.java:42 clojure.lang.LazySeq.sval←[39m
> ←[36m   LazySeq.java:60 clojure.lang.LazySeq.seq←[39m
> ←[36m   RT.java:484 clojure.lang.RT.seq←[39m
> ←[35m  core.clj:133 clojure.core/seq←[39m
> ←[35m core.clj:2780 clojure.core/dorun←[39m
> ←[35m core.clj:2796 clojure.core/doall←[39m
> ←[33m  NO_SOURCE_FILE:1 user/eval1979[fn]←[39m
> ←[33m  NO_SOURCE_FILE:1 user/eval1979←[39m
> ←[36mCompiler.java:6619 clojure.lang.Compiler.eval←[39m
> ←[36mCompiler.java:6609 clojure.lang.Compiler.eval←[39m
> ←[36mCompiler.java:6582 clojure.lang.Compiler.eval←[39m
> ←[35m core.clj:2852 clojure.core/eval←[39m
> ←[35m  main.clj:308 clojure.main/eval-opt←[39m
> ←[35m  main.clj:327 clojure.main/initialize←[39m
> ←[35m  main.clj:362 clojure.main/null-opt←[39m
> ←[35m  main.clj:440 clojure.main/main←[39m
> ←[36m   RestFn.java:421 clojure.lang.RestFn.invoke←[39m
> ←[36m  Var.java:419 clojure.lang.Var.invoke←[39m
> ←[36m

[ANN] lein-html5-docs 2.0.0

2013-04-18 Thread Tassilo Horn
Hi all,

I've just released version 2.0.0 of the lein-html5-docs plugin.  Since
version 1.2.3, I've slightly refactored some parts of the code (but it's
still messy), and I have added one new killer feature: *SEARCH*! Yay!

That's how docs generated with the plugin look like:

  http://userpages.uni-koblenz.de/~horn/funnyqt-docs/

Be sure to type something into the API Search box!

Bye,
Tassilo

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Setting content type in a resouce response

2013-04-18 Thread Josh Kamau
Hi there ;

Please help. How do i set the ContentType header in a
(ring.util.resouce/resource-response ) ?

I am serving html file and its being served as plain text.

Josh

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Clojurescript Error: Undefined nameToPath for goog.ui

2013-04-18 Thread Răzvan Rotaru
Hmm, I'm stuck again. :)

I don't know why, but it seems that building the project with *
lein-cljsbuild* does not accept :import. Here's the code:

(ns habarnam
  (:use [domina :only [xpath]])
  (:import [goog.ui [Button]])
  

And here's the compilation error:

Compiling ClojureScript.
Compiling "res/bootstrap.js" from ["src/cljs"]...
←[31mCompiling "res/bootstrap.js" failed.←[0m
←[31mjava.lang.AssertionError: ←[39m←[31mAssert failed: Only 
:refer-clojure, :require, :require-macros, :use and :use-macros libspecs 
supported
(#{:use-macros :require-macros :require :use} k)←[39m
←[32m  analyzer.clj:627 cljs.analyzer/eval381[fn]←[39m
←[35m protocols.clj:143 clojure.core.protocols/fn←[39m
←[35m  protocols.clj:19 clojure.core.protocols/fn[fn]←[39m
←[35m  protocols.clj:31 clojure.core.protocols/seq-reduce←[39m
←[35m  protocols.clj:54 clojure.core.protocols/fn←[39m
←[35m  protocols.clj:13 clojure.core.protocols/fn[fn]←[39m
←[35m core.clj:6177 clojure.core/reduce←[39m
←[32m  analyzer.clj:637 cljs.analyzer/eval381[fn]←[39m
←[36m  MultiFn.java:241 clojure.lang.MultiFn.invoke←[39m
←[32m  analyzer.clj:862 cljs.analyzer/analyze-seq←[39m
←[32m  analyzer.clj:917 cljs.analyzer/analyze←[39m
←[32m  analyzer.clj:909 cljs.analyzer/analyze←[39m
←[32m  compiler.clj:756 cljs.compiler/compile-file*←[39m
←[32m  compiler.clj:794 cljs.compiler/compile-file←[39m
←[32m  compiler.clj:855 cljs.compiler/compile-root←[39m
←[32m   closure.clj:365 cljs.closure/compile-dir←[39m
←[32m   closure.clj:397 cljs.closure/eval1496[fn]←[39m
←[32m   closure.clj:267 cljs.closure/eval1423[fn]←[39m
←[32m   closure.clj:411 cljs.closure/eval1483[fn]←[39m
←[32m   closure.clj:267 cljs.closure/eval1423[fn]←[39m
←[32m   compiler.clj:43 cljsbuild.compiler.SourcePaths/fn←[39m
←[35m core.clj:2485 clojure.core/map[fn]←[39m
←[36m   LazySeq.java:42 clojure.lang.LazySeq.sval←[39m
←[36m   LazySeq.java:60 clojure.lang.LazySeq.seq←[39m
←[36m   RT.java:484 clojure.lang.RT.seq←[39m
←[35m  core.clj:133 clojure.core/seq←[39m
←[35m  core.clj:617 clojure.core/apply←[39m
←[35m core.clj:2514 clojure.core/mapcat←[39m
←[36m   RestFn.java:423 clojure.lang.RestFn.invoke←[39m
←[32m   compiler.clj:43 
cljsbuild.compiler/cljsbuild.compiler.SourcePaths←[39m
←[32m   closure.clj:875 cljs.closure/build←[39m
←[32m   compiler.clj:57 cljsbuild.compiler/compile-cljs[fn]←[39m
←[32m   compiler.clj:56 cljsbuild.compiler/compile-cljs←[39m
←[32m  compiler.clj:140 cljsbuild.compiler/run-compiler←[39m
←[33m  NO_SOURCE_FILE:1 user/eval1979[fn]←[39m
←[36m   LazySeq.java:42 clojure.lang.LazySeq.sval←[39m
←[36m   LazySeq.java:60 clojure.lang.LazySeq.seq←[39m
←[36m   RT.java:484 clojure.lang.RT.seq←[39m
←[35m  core.clj:133 clojure.core/seq←[39m
←[35m core.clj:2780 clojure.core/dorun←[39m
←[35m core.clj:2796 clojure.core/doall←[39m
←[33m  NO_SOURCE_FILE:1 user/eval1979[fn]←[39m
←[33m  NO_SOURCE_FILE:1 user/eval1979←[39m
←[36mCompiler.java:6619 clojure.lang.Compiler.eval←[39m
←[36mCompiler.java:6609 clojure.lang.Compiler.eval←[39m
←[36mCompiler.java:6582 clojure.lang.Compiler.eval←[39m
←[35m core.clj:2852 clojure.core/eval←[39m
←[35m  main.clj:308 clojure.main/eval-opt←[39m
←[35m  main.clj:327 clojure.main/initialize←[39m
←[35m  main.clj:362 clojure.main/null-opt←[39m
←[35m  main.clj:440 clojure.main/main←[39m
←[36m   RestFn.java:421 clojure.lang.RestFn.invoke←[39m
←[36m  Var.java:419 clojure.lang.Var.invoke←[39m
←[36m  AFn.java:163 clojure.lang.AFn.applyToHelper←[39m
←[36m  Var.java:532 clojure.lang.Var.applyTo←[39m
←[36m  main.java:37 clojure.main.main←[39m

Any ideas what could be wrong?

Thanks,
Razvan

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [GSoC] Clojure refactoring library and integration in Counterclockwise

2013-04-18 Thread Devin Walters
A few more: 

- Slamhound https://github.com/technomancy/slamhound
- Eastwood https://github.com/jonase/eastwood
- Here's an emacs lisp refactoring mode: 
https://github.com/magnars/clj-refactor.el
- This one is out of date but maybe useful to you: 
https://github.com/joodie/clojure-refactoring

-- 
'(Devin Walters)


On Thursday, April 18, 2013 at 11:54 AM, Malcolm Sparks wrote:

> Michael, 
> 
> There are some pre-existing libraries that could give you a headstart in this 
> work :-
> 
> tools.reader - can help you parse Clojure source - 
> https://github.com/clojure/tools.reader
> 
> tools.namespace can help you parse and manage graphs of namespaces - 
> https://github.com/clojure/tools.namespace
> 
> tools.analyzer can help you resolve symbols - 
> https://github.com/clojure/jvm.tools.analyzer
> 
> kibit - can help you detect non-idiomatic code - 
> https://github.com/jonase/kibit
> 
> Each of these is in active development but you should consider using them in 
> their current state if you can.
> 
> Regards,
> 
> Malcolm
> 
> 
> 
> 
> 
> On Thursday, 18 April 2013 07:52:57 UTC+1, Mikera wrote:
> > On Tuesday, 9 April 2013 00:05:35 UTC+8, michael holzer wrote:
> > > 
> > > And now to the part that will be hopefully of broader interest for every 
> > > Clojure user: 
> > > What do you expect from a refactoring library or from an IDE providing 
> > > refactoring tools? 
> > 
> > 
> > There are a bunch of operations that would be very useful to support: 
> > rename var, fix namespace aliases etc. all the usual stuff.
> > 
> > But more important than the actual refactoring operations are IMHO the 
> > warnings that the IDE provides. Refactoring activity often causes you to 
> > break previously true assumptions (e.g. changing the arity of a function by 
> > adding a new parameter, or changing the type of a parameter). Automatically 
> > detecting these and providing a warning would be a huge boost to 
> > productivity: Otherwise you will only detect the problem when something 
> > fails at runtime / test time and you might get left with a particularly 
> > nasty stack trace to debug.
> > 
> > I wrote a bit more on this topic in an old blog post you may find 
> > interesting:
> > http://clojurefun.wordpress.com/2012/09/06/something-i-still-love-about-java/
> > 
> > Apart from that, I think there is some interesting Clojure specific 
> > refactoring you might do, e.g. warn on unidiomatic style and offer 
> > conversion to a better alternative. I'm thinking of things like:
> > 
> > (let [a (some-condition)] (if a (do ...)))
> > => 
> > (when-let [a (some-condition)] ..)
> 
> -- 
> -- 
> 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 
> (mailto: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 
> (mailto: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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com 
> (mailto:clojure+unsubscr...@googlegroups.com).
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 



-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - 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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [ANN] Schejulure 0.1.3

2013-04-18 Thread Alan Thompson
Looks nice!
Alan


On Mon, Apr 15, 2013 at 12:40 PM, Anthony Grimes wrote:

> You had me at the changelog entry regarding Sundays.
>
> I was actually tasked with writing pretty much this at work last Friday.
> My thanks for doing my work for me. Unfortunately I don't think you will be
> paid for your troubles.
>
> On Monday, April 15, 2013 6:02:02 AM UTC-7, Adam Clements wrote:
>
>> I forgot to mention, schejulure can be obtained from the normal places:
>>
>> Github:
>> https://github.com/**AdamClements/schejulure
>>
>>
>> Clojars:
>> [schejulure "0.1.3"]
>>
>>
>> Adam Clements
>>
>> +44 7947 724 795
>> --
>> This email and any files transmitted with it are confidential. If you are
>> not the intended recipient, you are hereby notified that any disclosure,
>> distribution or copying of this communication is strictly prohibited.
>>
>>
>> On Mon, Apr 15, 2013 at 11:27 AM, Adam Clements wrote:
>>
>>> 0.1.3 - Bugfix release fixing a discrepancy between clj-time and cron's
>>> representation of Sunday (thanks dwwoelfel)
>>>
>>> *What is Schejulure?*
>>> Schejulure is a lightweight, cron-inspired, minute resolution scheduling
>>> library. It has a neat, concise api and no stateful central scheduler.
>>>  It's tiny (~60 lines) and aims to do one task well. It's modelled after
>>> futures, and in fact returns a future, so use it in the same places/way you
>>> might use a future, but for recurring events.
>>>
>>> To schedule things, it's like a cron setup (so by default fires every
>>> minute of every hour of every day...) but you can merge a map with lists of
>>> times when it should fire, so for example {:minute [0 15 30 45] :day :tue}
>>> will fire every 15 minutes on a tuesday where {:hour 9} will fire every
>>> minute from 9-10am every day. Beyond that you simply call schedule with
>>> pairs of schedule maps to functions which should fire.
>>>
>>> *Example:*
>>> => (def my-running-scheduler
>>>  (schedule {:hour 12 :minute [0 15 30 45]} my-function
>>>{:hour (range 0 24 6) :minute 0 :day [:sat :sun]}
>>> batch-job))
>>>
>>> ...
>>> => (future-cancel my-running-scheduler)
>>>
>>> Simple as that.
>>>
>>> --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clo...@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+u...@**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 unsubscribe from this group and stop receiving emails from it, send
>>> an email to clojure+u...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - 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 unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - 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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Arrays and indexes

2013-04-18 Thread Alan Malloy
(for [[y cols] (map-indexed vector rows)
  [x cell] (map-indexed vector cols)]
  (display cell y x))

?

On Thursday, April 18, 2013 3:14:19 AM UTC-7, edw...@kenworthy.info wrote:
>
> So, I want a 2 dimensional array.
>
> I think the best way to implement this is a vector of vectors.
>
> Now I want to display that array drawing each element relative to its 
> position in the array.
>
> Is the best way to use doseq and manually maintain the indices? Or is it 
> to use nested for-loops manually iterating of the vector-of-vectors?
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Interop for primitive types

2013-04-18 Thread Softaddicts
1) Your signature has to match your java method,
(Foo/bar (byte 1)) will work.

2) There's been a long thread about this. People wanted ints and longs to
 have a similar behavior and match whatever signature is available when 
doing
 interop.
 When passing (Long. 1), interop tries to match two primitive types, int
 and long in Java method signatures. It cannot to choose on your behalf 
between
 two signatures  that match your args, and it warns you consequently.
 Using an explicit cast (int ...) or (long ...) would solve the issue and 
direct
 to the proper method.

I did not like this idea of collapsing ints and longs when searching for an 
interop
signature but at least there is a trap to tell you that you have a signature 
"clash".

This behavior has not been extended to bytes and shorts which are rarely used
interchangeably with ints and longs.

Beware, the above applies to primitive types in method signatures.
(Long. 1) is an object so there should be no possible confusion between the 
Long and 
Integer classes used in a Java method signature. They would not be considered
equivalent candidates.

All of the above come from the top of my head but I think it's accurate.

Luc P.

> 1)
> 
> public class Foo {
>   public static String bar(byte b) {
> return "byte";
>   }
> }
> 
> user=> (Foo/bar 1)
> "byte"
> 
> public class Foo {
>   public static String bar(byte b) {
> return "byte";
>   }
> 
>   public static String bar(Thread thread) {
> return "thread";
>   }
> }
> 
> user=> (Foo/bar 1)
> IllegalArgumentException No matching method found: bar
> clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)
> 
> 
> Is this a bug or a feature?
> 
> 
> 2)
> 
> public class Foo {
>   public static String bar(int i) {
> return "int";
>   }
> 
>   public static String bar(long l) {
> return "long";
>   }
> }
> 
> user=> (Foo/bar 1)
> "long"
> 
> user=> (Foo/bar (Long. 1))
> CompilerException java.lang.IllegalArgumentException: More than one
> matching method found: bar, compiling:(NO_SOURCE_PATH:3:1)
> 
> user=> (Foo/bar (Integer. 1))  ; Shouldn't this also fail?
> "int"
> 
> user=> (def x (Long. 1))   ; same as (def x 1)
> #'user/x
> 
> user=> (Foo/bar x) ; a bug?
> "int"
> 
> -- 
> -- 
> 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 unsubscribe from this group and stop receiving emails from it, send an 
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 
> 
--
Softaddicts sent by ibisMail from my ipad!

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [GSoC] Clojure refactoring library and integration in Counterclockwise

2013-04-18 Thread Malcolm Sparks
Michael, 

There are some pre-existing libraries that could give you a headstart in 
this work :-

tools.reader - can help you parse Clojure source - 
https://github.com/clojure/tools.reader

tools.namespace can help you parse and manage graphs of namespaces - 
https://github.com/clojure/tools.namespace

tools.analyzer can help you resolve symbols - 
https://github.com/clojure/jvm.tools.analyzer

kibit - can help you detect non-idiomatic code - 
https://github.com/jonase/kibit

Each of these is in active development but you should consider using them 
in their current state if you can.

Regards,

Malcolm





On Thursday, 18 April 2013 07:52:57 UTC+1, Mikera wrote:
>
> On Tuesday, 9 April 2013 00:05:35 UTC+8, michael holzer wrote:
>>
>>
>> And now to the part that will be hopefully of broader interest for every 
>> Clojure user: 
>> What do you expect from a refactoring library or from an IDE providing 
>> refactoring tools? 
>>
>
> There are a bunch of operations that would be very useful to support: 
> rename var, fix namespace aliases etc. all the usual stuff.
>
> But more important than the actual refactoring operations are IMHO the 
> warnings that the IDE provides. Refactoring activity often causes you to 
> break previously true assumptions (e.g. changing the arity of a function by 
> adding a new parameter, or changing the type of a parameter). Automatically 
> detecting these and providing a warning would be a huge boost to 
> productivity: Otherwise you will only detect the problem when something 
> fails at runtime / test time and you might get left with a particularly 
> nasty stack trace to debug.
>
> I wrote a bit more on this topic in an old blog post you may find 
> interesting:
>
> http://clojurefun.wordpress.com/2012/09/06/something-i-still-love-about-java/
>
> Apart from that, I think there is some interesting Clojure specific 
> refactoring you might do, e.g. warn on unidiomatic style and offer 
> conversion to a better alternative. I'm thinking of things like:
>
> (let [a (some-condition)] (if a (do ...)))
> => 
> (when-let [a (some-condition)] ..)
>
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Interop for primitive types

2013-04-18 Thread Alice
1)

public class Foo {
  public static String bar(byte b) {
return "byte";
  }
}

user=> (Foo/bar 1)
"byte"

public class Foo {
  public static String bar(byte b) {
return "byte";
  }

  public static String bar(Thread thread) {
return "thread";
  }
}

user=> (Foo/bar 1)
IllegalArgumentException No matching method found: bar
clojure.lang.Reflector.invokeMatchingMethod (Reflector.java:80)


Is this a bug or a feature?


2)

public class Foo {
  public static String bar(int i) {
return "int";
  }

  public static String bar(long l) {
return "long";
  }
}

user=> (Foo/bar 1)
"long"

user=> (Foo/bar (Long. 1))
CompilerException java.lang.IllegalArgumentException: More than one
matching method found: bar, compiling:(NO_SOURCE_PATH:3:1)

user=> (Foo/bar (Integer. 1))  ; Shouldn't this also fail?
"int"

user=> (def x (Long. 1))   ; same as (def x 1)
#'user/x

user=> (Foo/bar x) ; a bug?
"int"

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Combimouse

2013-04-18 Thread Jacob Goodson
Check it out, please support it if you think it has potential...

http://www.indiegogo.com/projects/combimouse-combination-keyboard-and-mouse?c=home

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Surprising behaviour related to records, protocols and AOT

2013-04-18 Thread Ragnar Dahlén
Thank you for your explanation. I also suspect there is some subtle
issue with the class file being used by the different constructors.

However, I would be surprised if this behaviour is intended, and that 
the 'hackery' you proposed is the only, and prefered way of solving this.

To better illustrate the core issue, I updated the example slightly
as follows:

Premise: 
defrecordissue.arecord and defrecordissue.protocol constitute some
library.

1. defrecordissue.arecord defines a record type, and a function that
   will return an instance of the record:

(ns defrecordissue.arecord)

(defrecord ARecord [])

(defn make-record
  []
  (->ARecord))

2. defrecordissue.protocol defines a protocol, and extends it to the
   record type defined in 1. It also defines a public function
   intended to be used by libraries:

(ns defrecordissue.aprotocol
  (:require [defrecordissue.arecord])
  (:import [defrecordissue.arecord ARecord]))
 
(defprotocol AProtocol
  (afn [this]))
 
(extend-protocol AProtocol
  ARecord
  (afn [this] 42))

(defn some-public-fn
  []
  (afn (defrecordissue.arecord/make-record)))

3. defrecordissue.consumer is a consumer of the library, knows
   nothing of any protocols or records, but only wants to call a
   function thats part of the public api:

(ns defrecordissue.consumer
  (:require [defrecordissue.aprotocol]))
 
(defrecordissue.aprotocol/some-public-fn)

This fails with the same root cause.

I've created a new branch for this in the GitHub repo.

https://github.com/ragnard/defrecordissue/tree/more-realistic

/Ragge

On Thursday, 18 April 2013 12:19:35 UTC+1, Andrew Sernyak wrote:
>
> I guess extend-type does changes only to generated java class and the var 
> defrecordissue.arecord->ARecord 
> contains the 'old' version of ARecord constructor. Obviously it would be 
> weird for defprotocol to change the variable in another namespace. 
> Especially when you can extend a record from anywhere.
>
> So If you want to create a record that implements your protocol via var 
> from record namespace, you should do some hackery to update that variable. 
> I've done a pull-request for you, but using direct constructor will be more 
> idiomatic
>
> ;
>> ; this won't work unless you update manualy a variable ->ARecord in the 
>> namespace
>> ;
>> ;(defrecordissue.aprotocol/afn (defrecordissue.arecord/->ARecord))
>> ; 
>> ; like
>> (defmacro from-ns[nmsps & body] 
>>   "launches body from namespace"
>>   `(binding 
>>  [*ns* (find-ns ~nmsps)] 
>>(eval
>>   (quote (do ~@body)
>> (from-ns 'defrecordissue.arecord 
>>  (import '(defrecordissue.arecord.ARecord))
>>  (alter-var-root 
>>('->ARecord (ns-publics 'defrecordissue.arecord)) 
>>(fn[x] (fn[] (new ARecord)
>> (println  (defrecordissue.aprotocol/afn 
>> (defrecordissue.arecord/->ARecord)))
>> ; 42
>
>
> ndrw 
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Surprising behaviour related to records, protocols and AOT

2013-04-18 Thread Andrew Sernyak
I guess extend-type does changes only to generated java class and the var 
defrecordissue.arecord->ARecord 
contains the 'old' version of ARecord constructor. Obviously it would be 
weird for defprotocol to change the variable in another namespace. 
Especially when you can extend a record from anywhere.

So If you want to create a record that implements your protocol via var 
from record namespace, you should do some hackery to update that variable. 
I've done a pull-request for you, but using direct constructor will be more 
idiomatic

;
> ; this won't work unless you update manualy a variable ->ARecord in the 
> namespace
> ;
> ;(defrecordissue.aprotocol/afn (defrecordissue.arecord/->ARecord))
> ; 
> ; like
> (defmacro from-ns[nmsps & body] 
>   "launches body from namespace"
>   `(binding 
>  [*ns* (find-ns ~nmsps)] 
>(eval
>   (quote (do ~@body)
> (from-ns 'defrecordissue.arecord 
>  (import '(defrecordissue.arecord.ARecord))
>  (alter-var-root 
>('->ARecord (ns-publics 'defrecordissue.arecord)) 
>(fn[x] (fn[] (new ARecord)
> (println  (defrecordissue.aprotocol/afn 
> (defrecordissue.arecord/->ARecord)))
> ; 42


ndrw 

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Clojure question

2013-04-18 Thread Phillip Lord

 writes:
> Hello, I'm doing a school paper on Clojure but there are two questions that 
> i just can't find answers to anywhere they are:
>
>
> Are data types bound to variables and parameters at compile-time? run-time? a 
> combination?
>
> and also,
>
> How are parameters passed? (Pass by value? Pass by reference? Pass by 
> value-result? etc.)
>
> If anybody knows the answers to these two questions I would greatly 
> appreciate it! 


If you can't find the answers to these questions anywhere, you either
have not looked, or don't understand the questions. Either way, you will
learn nothing from the answers you are getting. 

You probably wouldn't be able to tell the difference between a correct
answer and one which is just a wind-up. Which category do you think
Marko's answer comes into?

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
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: invokedynamic instructions in Clojure

2013-04-18 Thread Marek Srank
Anyway, nice to see that somebody is doing some work in that direction... :)

Marek

On Wednesday, April 17, 2013 8:10:37 PM UTC+2, Ghadi Shayban wrote:
>
> Brandon,
> Not really, but I don't want to deter anyone from exploration as its own 
> goal. There are a lot of interesting ways that Clojure can leverage indy, 
> this was an experiment.  I'm going to try to put it in more high value 
> places, and let the ideas marinate. This modification does nothing but 
> actually use the instruction and pass all the tests. Obviously a lot of the 
> really useful call sites for indy require much rework (and will break ABI 
> and JVM compatibility, ick).  The microarchitecture of how a language 
> runtime can interact with its host platform is fascinating to explore.
> Btw, Attila Szegedi wrote the dynalink [1] library that has some 
> abstractions over a lot of the machinery inside java.lang.invoke, 
> definitely worth a look through.
>
> I think that performance is something exciting for developers, and I think 
> indy will help with that...eventually. This needs hammock time, Clojure is 
> definitely not slow today.
>
> [1] https://github.com/szegedi/dynalink/wiki/User-Guide-0.5
>
> Ghadi
> @smashthepast
>
>
> On Tuesday, April 16, 2013 10:58:50 PM UTC-4, Brandon Bloom wrote:
>>
>> Do you have any measurements, results, or conclusions to report?
>>
>> On Tuesday, April 16, 2013 12:12:15 PM UTC-4, Ghadi Shayban wrote:
>>>
>>> I've added a very minimal usage of invokedynamic to the compiler.  
>>> Basically the smallest delta without having to change internals of ObjExpr 
>>> or break ABI compatibility.  This is minimal and raw.  There are many many 
>>> usages of indy that will really help the Clojure runtime, this ain't one of 
>>> them.  No benchmarks here, it's probably slower.
>>>
>>> In current Clojure mainline, a Fn has reference slots to any vars it 
>>> needs in its constant pool, like a cache. Anytime a non-dynamic Var's value 
>>> needs to be accessed, the Var goes from the constant pool to the stack, and 
>>> getRawRoot() is invoked on it.
>>>
>>> With this change, an invokedynamic instruction instead creates a 
>>> ConstantCallSite, which closes over a looked-up Var, and then binds the 
>>> call site to invoke getRawRoot() on it directly.  This is only for 
>>> non-dynamic Vars.
>>>
>>> Simple todos:
>>> cache the CallSite as a member on the Var itself so that all identical 
>>> indy lookup instructions have fast bootstrapping.
>>> emit a similar call for dynamic vars
>>> remove the emission of Vars into the constant pool of a class
>>>
>>> Lots of really interesting use cases for invokedynamic and all the 
>>> associated combinators in java.lang.invoke:
>>>
>>> Better protocol callsite caching
>>> CallSite "middleware" for things like CLJ specific instrumentation
>>> equality could be a special instruction
>>> KeywordCallSite could be its own instruction as well
>>> (apply) argument "spreading"/varargs array collection (through the 
>>> combinators)
>>> potentially removing IFn.invoke(*) and using MethodHandle invocation 
>>> instead (fat chance)
>>>
>>> You can pull down the changes at github.com/ghadishayban/clojure.
>>> mvn clean package, tested on OpenJDK 1.7
>>>
>>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Arrays and indexes

2013-04-18 Thread edward
So, I want a 2 dimensional array.

I think the best way to implement this is a vector of vectors.

Now I want to display that array drawing each element relative to its 
position in the array.

Is the best way to use doseq and manually maintain the indices? Or is it to 
use nested for-loops manually iterating of the vector-of-vectors?

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[GSoC 2013] core.matrix development

2013-04-18 Thread Damian Skrodzki
Hi,

I'm Damian Skrodzki and I study at Gdańsk University of Technology. I don't 
know Clojure yet - I have academic experiance with Lisp. I sow the lecture 
about Clojure at 33rd Degree conference in Warsaw and I really liked it. I 
really would like to participate in Clojure development.

I feel good at Math and I saw there are a few projects related to Math 
library to be done. Which projects from:
  Algebraic Expressions
Incanter support
API Contract Validation
are most important to you? And do think that there is a chance for me to 
qualify for it having no experience in Clojure in I would be engaged 
enough? This experience is listed as a requirement. Which one you would 
suggest me to look through deeper if there are any real chances?

Regards,
Damian

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




what is the issue: NullPointerException com.mongodb.DBCursor._check (DBCursor.java:365) for congomongo

2013-04-18 Thread Zhi Yang
I use a mongodb which use sharding, so I connect to mongos.

but when I query like: 
(fetch :locations)
NullPointerException   com.mongodb.DBCursor._check (DBCursor.java:365)

there is error

if the use (fetch :locations :one? true) it works.

anyone know what is going on? I use version  [congomongo "0.4.1"], is it 
driver issue or usage issue?


-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




what is the issue: NullPointerException com.mongodb.DBCursor._check (DBCursor.java:365) for congomongo

2013-04-18 Thread Zhi Yang
I use a mongodb which use sharding, so I connect to mongos.

but when I query like: 
(fetch :locations)
NullPointerException   com.mongodb.DBCursor._check (DBCursor.java:365)

there is error

if the use (fetch :locations :one? true) it works.

anyone know what is going on? I use version  [congomongo "0.4.1"], is it 
driver issue or usage issue?


-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[ANN] least, a last.fm client

2013-04-18 Thread Anthony Grimes
https://github.com/Raynes/least

I wrote this a little while ago. My intentions are to make use of it in 
lazybot for some last.fm integration. Haven't actually done that yet 
(tomorrow is another wonderful day) so it hasn't seen real world use. If 
you find any boogs, shoot me an issue on Github.

Enjoy,

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Hacker News, Clojure, and GSOC

2013-04-18 Thread Zack Maril
Some fun facts:
1. You could probably get a full history of Hacker News by carefully 
crawling the HNSearch API[0]. Chronically crawling the new page for links 
would allow you to stay in synch with Hacker News proper, and a monthly 
refresh of the data would probably be smart to hit anything you might miss. 
2. The source code for an early version of Hacker News has been floating 
around, distributed with Arc if I remember correctly. From PG's comments, 
the main updates to the site has mainly been dealing with spammers and 
voting ring detection.

Combining the two together, it is quite possible to make a read-only 
version of hacker news with a full history and proper linking. Most of the 
changes have been made only to the write only sections. So, it would be 
pretty straightforward to clone hacker news and keep it cloned if you throw 
out the write parts. Additionally, if you got the lag for updates down 
below a few seconds, you could piggyback off hacker news and just redirect 
submissions and comments there (you could even really tricky with an iframe 
if that tickles your fancy). In that manner, you could clone the 
functionality of hacker news with a full history. It seems like this 
wouldn't even really take a whole summer to do. Maybe a week of 
concentrated effort, depending on how fast you can pull down the data from 
the API and how well you understand your stack.

-Zack

[0] https://www.hnsearch.com/api

On Wednesday, April 17, 2013 5:13:19 PM UTC+4, Stuart Sierra wrote:
>
>
>
> On Wednesday, April 17, 2013 3:27:59 AM UTC-4, da...@axiom-developer.orgwrote:
>>
>> Does anyone know anyone associated with Hacker News? 
>> Can we clue them into immutable data structures? 
>>
>
> I know that Hacker News is mostly written by Paul Graham in Arc [1], his 
> personal dialect of Lisp. As such, it's unlikely anyone will be able to 
> convince him to switch to Clojure. :)
>
> P.G. recently wrote an article [2] about how he broke the site when 
> manipulating the production database from the REPL.
>
> -S
>
> [1]: http://paulgraham.com/arc.html
> [2]: https://news.ycombinator.com/item?id=5239673
>

-- 
-- 
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 unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.