Re: GSoC Report: NDArray for core.matrix

2013-09-23 Thread Mikera
Great work Dmitry! It's superb that we now have a general purpose N-dimensional array implementation that is comparable with NumPy, written in pure Clojure. This will be a big boost for people doing data science / scientific computing with Clojure. You've also shown that it's possible to write

Re: GSoC Report: Expresso, symbolic manipulation of Algebraic Expressions in clojure

2013-09-23 Thread Mikera
Great work Maik! It's an impressive library - the fact that you can implement a general purpose symbolic analysis technique like "extremata" in a dozen lines of Clojure shows just how powerful this is. On Monday, 23 September 2013 23:38:47 UTC+8, Maik Schünemann wrote: > > GSoC ends today and I

[ANN] clara-rules 0.1.0 released -- rules as a control structure

2013-09-23 Thread Ryan Brush
This is the first release of Clara, forward-chaining rules in Clojure. Details on the github site: https://github.com/rbrush/clara-rules I've also posted the rationale for what I'm doing here: http://www.toomuchcode.org/2013/09/rules-as-control-structure.html The gist is that forward-chaining

ANN: core.match 0.2.0-rc6

2013-09-23 Thread David Nolen
I believe this release finally eliminates all the remaining bugs around AOT. Will likely be the final release candidate. http://github.com/clojure/core.match Feedback welcome! David -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to thi

GSoC report: Extend Neko library for Android

2013-09-23 Thread Alexander Yakushev
As you might already figured out from similar topics, GSoC 2013 is over and it is time to collect the fruit. As of my proposal, I achieved several things this year at both lein-droid[1] and Neko[2]. Here is the list of them: 1. Rewrote neko.ui from macros to functions to allow true dynamic UI

Re: much lower recursion depth with memoization

2013-09-23 Thread yair
Of course John, the reason you can do the sum of 1-200 in your head is thanks to Gauss's formula, I'm assuming you're not really recursing 200 times in your head :) Love your blog too BTW, especially your style of presentation and the types of things you write about (i.e. non-trivial but still

GSoC Report: NDArray for core.matrix

2013-09-23 Thread Dmitry Groshev
Today Google Summer of Code finally ends. NDArray is pretty stable now and will be the default implementation used by core.matrix in the upcoming release. It was an epic journey through bugs, unexpected slowness and weird macros, but now I can proudly state that in some cases NDArray can be fas

Re: *db* binding with jetty

2013-09-23 Thread Christopher Allen
Most web apps will either have a top-level def'd var that points to the database or they'll use a middleware to chain it into the request map. Which you do depends on your DB library. On Monday, September 23, 2013 1:23:50 PM UTC-7, Brian Craft wrote: > > My question is more about how to pass som

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
Puzzler, thanks for all your excellent ideas! I get the impression that you're as troubled as I am by the brokenness of recursion, but it looks like it can be worked around. A bit of memory thrown at the JVM stack combined with a better memoization technique should work in most of the cases tha

Re: *db* binding with jetty

2013-09-23 Thread Brian Craft
My question is more about how to pass something to the app without sticking it in a global. This might be a noir question. Handlers are called without any passed context. I'm not sure if that's peculiar to noir, or something inherited from ring. So, the only way I know to get context to the app

Re: *db* binding with jetty

2013-09-23 Thread Sean Corfield
Take a look at http://clojure-doc.org/articles/ecosystem/java_jdbc/connection_pooling.html You would want to set up a connection pool and pass that into your app as part of its context. Does that help? Sean On Mon, Sep 23, 2013 at 11:25 AM, Brian Craft wrote: > Trying to get a small app off t

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
Jim, increasing the stack size solved the problem in so far as it allowed the code to run (I needed a tree depth of 2000), but then it just sat and churned for hours and ran down the battery bank on my narrowboat, so I killed it. This morning I bit the bullet and got the clojure program to outp

Re: *db* binding with jetty

2013-09-23 Thread Brian Craft
Even in that case you have to get the db info to the handlers somehow. A lot of demo code I see just hard-codes the db stuff, which is not useful. I can make it work via middleware, like (partial db db-middleware) then add db-middleware to ring before starting jetty. I'm not sure if this is a

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
James, it will generate a stack overflow on a sufficiently large problem, certainly. Most of the cases where recursions are a good idea are order (n^2) and worse algorithms, though, so the question is rather 'will the stack overflow before the heap is exhausted or the processor catches fire?'.

Re: *db* binding with jetty

2013-09-23 Thread Andy Fingerhut
Caveat: I am experienced with Clojure, but a newbie at web development in *any* language. I have recently begun going through the beta version of the book "Web Development with Clojure" http://pragprog.com/book/dswdcloj/web-development-with-clojure Hopefully others with more web dev experien

Re: much lower recursion depth with memoization

2013-09-23 Thread John Lawrence Aspden
Chris, thank you! That looks like the explanation, which cheers me up immensely, since it should be easy to work round. I looked at the same memoize code and it never occured to me that that was what was going on. I just thought Clojure hated me. A combination of fixing memoize and increasing

*db* binding with jetty

2013-09-23 Thread Brian Craft
Trying to get a small app off the ground with noir/jdbc/jetty (jdbc 0.2.2, I think), I'm getting a "No valid DB connection selected" error. I suspect this is because I start it something like (with-connection mydb (server/start)) which creates a thread-local binding of *db* in jdbc, then star

GSoC Report: Expresso, symbolic manipulation of Algebraic Expressions in clojure

2013-09-23 Thread Maik Schünemann
GSoC ends today and I can announce the 0.2.0 version of the expresso [1] library. It is build on top of core.logic and core.matrix and provides symbolic manipulation of algebraic expressions. What's there? 1. An api/dsl for manipulation of algebraic expressions which doesn't get in your way. E

Re: two pass compilation, intern and def

2013-09-23 Thread Phillip Lord
"Meikel Brandmeyer (kotarak)" writes: > you are right. require-owl also works as a function: > > (defn require-owl > [file & {nspace :namespace :or {nspace *ns*}}] > (with-open [rdr (io/reader file)] > (doseq [entry (owl-seq rdr) > :let [entry-name (translate-name (:name entry)

Re: Hosting clojure web app ( deployment strategies)

2013-09-23 Thread Antonio Terreno
On Mon, Sep 23, 2013 at 10:52 AM, Michael Klishin < michael.s.klis...@gmail.com> wrote: > > 2013/9/23 Roman Yakovlev > >> So as i plan to make pretty heavy app (say 1000-3000+ hits a day) what >> best strategy i should choose for now ? >> > > As long as you have enough RAM for the app not to swap

Re: two pass compilation, intern and def

2013-09-23 Thread Meikel Brandmeyer (kotarak)
Hi, you are right. require-owl also works as a function: (defn require-owl [file & {nspace :namespace :or {nspace *ns*}}] (with-open [rdr (io/reader file)] (doseq [entry (owl-seq rdr) :let [entry-name (translate-name (:name entry))]] (intern nspace entry-name (:init entr

Re: two pass compilation, intern and def

2013-09-23 Thread Phillip Lord
"Meikel Brandmeyer (kotarak)" writes: > Am Montag, 23. September 2013 11:37:10 UTC+2 schrieb Phillip Lord: >> >> So, now I can refer to an OWL file in >> exactly the same way as if it were written in Clojure. >> > > Ok. So, it is correct to think of this as a fancy require-owl, isn't it? > Then

Re: much lower recursion depth with memoization

2013-09-23 Thread Chris Perkins
On Sunday, September 22, 2013 5:28:37 PM UTC-6, John Lawrence Aspden wrote: > > This recursion limit really is quite nasty. I could probably live with > 4000, but 200? And why would memoization make it worse anyway? > > > The factor of 20-or-so smaller recursion limit comes not from memoize direc

Re: much lower recursion depth with memoization

2013-09-23 Thread Jim - FooBar();
as Armando pointed out unless you remove the stack-issue memoization is not going become your friend. My take would be to simply use loop/recur and then you can memoize 'relentlessly', as Rich likes to put it :) (defn gauss-recurse [n] (loop [i n acc n] (if (zero? i) acc (recur (de

Re: Hosting clojure web app ( deployment strategies)

2013-09-23 Thread Waldemar
In my master thesis I used compojure/ring with a jetty adapter. It's a recommender engine that runs completely in memory, so no need for external services calls or DB connections. Deployed it as a jar to a amazon c1.large instance. It is hit with 800+ request per second from 9 to 23 -> 40,320,00

Re: two pass compilation, intern and def

2013-09-23 Thread Meikel Brandmeyer (kotarak)
Hi, Am Montag, 23. September 2013 11:37:10 UTC+2 schrieb Phillip Lord: > > So, now I can refer to an OWL file in > exactly the same way as if it were written in Clojure. > Ok. So, it is correct to think of this as a fancy require-owl, isn't it? Then this means you read the OWL files at compilat

Re: Reading single characters...?

2013-09-23 Thread Simon Brooke
OK, thank you very much chaps. I shall investigate! On Monday, 23 September 2013, John Jacobsen wrote: > The JLine story is indeed confusing. I believe > https://github.com/jline/jline2 is the current one you want ([jline > "2.11"] in your project.clj deps). See the forthcoming Clojure Cookbook

Re: Hosting clojure web app ( deployment strategies)

2013-09-23 Thread Michael Klishin
2013/9/23 Roman Yakovlev > So as i plan to make pretty heavy app (say 1000-3000+ hits a day) what > best strategy i should choose for now ? > As long as you have enough RAM for the app not to swap in/out all the time, 3000 requests per day is child's play for JVM-based services. > What's your

Hosting clojure web app ( deployment strategies)

2013-09-23 Thread Roman Yakovlev
Hi Let's discuss some modern strategies to deploy clojure web app, from easiest to heavy ( for heavy traffic apps). I suggest some ways. 1. Heorku way - the easiest one. I had experience with deploy to heroku it works out of the box

Re: two pass compilation, intern and def

2013-09-23 Thread Phillip Lord
"Meikel Brandmeyer (kotarak)" writes: > don't get me wrong: I don't want to discuss away your use case! But I don't > understand it, yet. After your calling intern, do you compile other code > referencing the created Vars? If no: why do you need Vars? If yes: why > don't you just generate cod

uberrepl

2013-09-23 Thread benedek fazekas
Hi All, would like to announce uberrepl (https://github.com/benedekfazekas/uberrepl). Uberrepl is a REPL to work with multiple, possible related projects in *one* REPL. See details in the readme. If you use Stuart Sierra's reloaded workflow in your projects it also gives you functions to batc

Re: two pass compilation, intern and def

2013-09-23 Thread Meikel Brandmeyer (kotarak)
Hi, don't get me wrong: I don't want to discuss away your use case! But I don't understand it, yet. After your calling intern, do you compile other code referencing the created Vars? If no: why do you need Vars? If yes: why don't you just generate code with a def and compile it? Meikel -- --

Re: two pass compilation, intern and def

2013-09-23 Thread Phillip Lord
Gary Verhaegen writes: > Well, do actually means "execute all of the following forms, sequentially, > at this point". It seems to me that the position of saying this also works > when "this point" is the top-level is sensible. Perhaps; what does not seem sensible is that it *only* works at top-

Re: GSoC Report: CinC, port of the clojure compiler in clojure

2013-09-23 Thread Colin Fleming
Congratulations Nicola, and thanks for all the hard work - this is a great project! On 23 September 2013 14:26, Ambrose Bonnaire-Sergeant < abonnaireserge...@gmail.com> wrote: > Excellent work! To hear CinC is a long term project is music to my ears! > > Ambrose > > > On Mon, Sep 23, 2013 at 4:5

Re: much lower recursion depth with memoization

2013-09-23 Thread Mark Engelberg
Sorry, I wrote that implementation off-the-cuff and then realized that breadth-first search doesn't actually give you an appropriate dependency ordering. In the above examples I gave, I had: => (all-dependencies 30) (0 1 3 2 5 6 7 10 12 20 15 25 30) which isn't right because 20 depends on 15 which

Re: ANN: lein-midje-doc 0.0.9 released

2013-09-23 Thread zcaudate
Ooops! Really sorry guys. the resource directory was not included in the v0.0.9 jar file... it is now fixed in v0.0.10. lein-midje-doc lein-midje-doc fixes the problem of incorrectly documented examples by bridging the gap between writing tests and writing documentation.