Re: [ANN] clojure.test.check (previously, simple-check)
Hi Reid, This is excellent. Just experimenting and trying to get my head around it. Not sure if I'm doing any wrong or stupid!! If I test a function that relies on Exception handling internally as I reach 100 tests it takes forever and eventually blows the heap. Simple contrived example: (ns check (:require [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] )) (defn format1 [x] (try (- (double x) (format %,.0f)) (catch Exception e ))) (def prop1 (prop/for-all [v gen/any] (string? (format1 v #_ (tc/quick-check 100 prop1) ;; blows heap Thanks, Andrew On Thursday, 27 February 2014 17:22:44 UTC, Reid Draper wrote: I'm happy to announce the first release of the newest Clojure contrib library: test.check [1]. Previously named simple-check [1], test.check is a property-based testing library, based on QuickCheck. The README has a guide for migrating from simple-check, as well as some getting-started documentation. I'm happy to answer any questions here as well. Or, stop by my Clojure/West talk in March. [1] https://github.com/clojure/test.check [2] https://github.com/reiddraper/simple-check -- 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: The future of CongoMongo?
I used CongoMongo for my base web app with authentication (https://github.com/xavi/noir-auth-app). When asked (a year ago) why I didn't use Monger I said I prefer CongoMongo because it's smaller and so probably easier to understand, and it does all I need (https://github.com/xavi/noir-auth-app/issues/2). I still think the same. Currently I'm using CongoMongo in a side project. I've built a kind of Rails' Active Record on top of CongoMongo: it provides callback hooks like :validator, :before-save, :before-create, or :after-create, and a few other things that I needed for my project, like range-based pagination. I plan to make it an open source library (although right now my priority is to finish the project). If CongoMongo is discontinued I would eventually have to rewrite this using Monger or something else, but I'm not interested in following that path now. CongoMongo has worked, and it still works for me. Like Mark said, I would like CongoMongo to stay nice and simple. Not having used Monger, I don't know what you mean by much richer composable DSL, but in general I don't like using specific DSLs for something that it already has its own language (I mean that MongoDB already has a query language, so I prefer to use something as close as possible to that, not another abstraction on top of that with its own limitations and problems that at the ends doesn't save me from having to learn the original language). Also, more documentation is not necessarily better documentation. Just my two cents. Xavi On Thursday, February 27, 2014 3:50:01 AM UTC+1, Michael Klishin wrote: 2014-02-27 4:56 GMT+04:00 Mark Engelberg mark.en...@gmail.comjavascript: : I've looked at monger a couple of times, and felt it was more involved than I wanted. For example, I was turned off by the need to manually create object IDs as part of creating records. I like how congomongo does it for me. See monger.collection/insert-and-return -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- 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] clojure.test.check (previously, simple-check)
Congrats Reid, thanks a lot for all your work on this! Have only been using simple-check for a little while now, but it's already paid big dividends in production. One of the most concretely useful testing tools I've ever used. For folks that haven't tried it, I'd absolutely recommend taking a look. Great stuff. Cheers! :-) - Peter -- 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: Do you recommend the book: Web Development with Clojure
Maybe one additional thing to note is that the book shows that the Clojure web development ecosystem is a reflection of its general philosophy and it's not about any particular framework but more focused on composing simple components/libraries. Once you understand the basic concepts (HTTP ring, routing, etc) you can essentially compose them and change them as you need. Cheers, Manuel Il giorno giovedì 27 febbraio 2014 23:45:45 UTC+1, Hari Krishnan ha scritto: My experience.. 1. It is a well written book. You will have to read sequentially. 2. Prior knowledge of clojure is required -- list, vector, map, let etc. (Or at least review the clojure summary at the back first). 3. Since I knew Rails before, a lot of the concepts seemed to be straight forward -- routes, handlers (controllers), Urls, Ring (wardern) etc. 4. One benefit is you can build a decent web application quickly. 5. The auther is the creator of Luminusweb. But he doesn't tout that framework. There is only a paragraph at the end. But if you are going to choose that web framework (or libraries), or similar ones such as Joodo, reading this book will help get us some low level understanding of all the pieces working together. Worth the investment (imho). On Friday, February 21, 2014 8:43:59 AM UTC-8, Stefan Kanev wrote: On 19/02/14, Erlis Vidal wrote: Hi all, Have any of you read the book *Web Development with Clojure*? http://www.amazon.com/Web-Development-Clojure-Build-Bulletproof/dp/1937785645 There's only one review on amazon, and it's a fantastic review but I'm wondering if this is the book I should read if I wanted to start using Clojure for web programming. Any advice will be greatly appreciated. I'll share my 2c. Before picking the book, I already knew some Clojure, but I hadn't used it for web. The book was a nice overview of some of the popular tools for web development in Clojure. I enjoyed reading it. In a few cases I felt that I needed to write the example code and play with it in order to truly grok what it is about. If you know some Clojure (O'Reilly's Clojure Programming is a great book for that, in my opinion), then it is a perfect follow-up if you're interested in web apps (IMHO). -- Stefan Kanev ¦ @skanev ¦ http://skanev.com/ You can measure a programmer's perspective by noting his attitude on the continuing vitality of FORTRAN. -- 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: Latest web framework for clojure
I would recommend this combination of libraries: - Compojure - lib-noir - Enlive and Enfocus, for server-side and client-side templating respectively (I've also used Hiccup, but I prefer Enlive/Enfocus because with these, templates are pure HTML; I prefer them even for solo projects, but I would especially recommend them if the HTML/CSS is going to be written by people that don't necessarily know anything about Clojure/ClojureScript). - CongoMongo, if you're using MongoDB as a database (there's also Monger, but I don't have any experience with it) Some time ago I open-sourced a base web, with a complete authentication system, that used these libraries. Maybe you'll find it useful https://github.com/xavi/noir-auth-app Cheers, Xavi On Thursday, February 27, 2014 2:57:07 AM UTC+1, Moritz Ulrich wrote: Om is well-suited to handle the UI-part for you. It doesn't do any server communication or forces you into any particular programming style or project layout. On Thu, Feb 27, 2014 at 2:35 AM, Mark Engelberg mark.en...@gmail.com javascript: wrote: As far as I can tell, neither luminus nor caribou are well-suited to building, for example, interactive web apps like this web-based chat room which serves as the Hello World for the Opa web framework: https://github.com/MLstate/opalang/wiki/Hello%2C-chat Is this the kind of thing that Pedestal and Hoplon are meant for? Or Om? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.comjavascript: 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 javascript: 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 javascript:. 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: Problem with nREPL handle* function
OK, took my usual approach when stuck, which is to try and turn it into a different problem! Decided to stop trying to use handle* directly, but rather explicitly start an nREPL server on a socket, and relay those messages over websocket. Seems to work fine :-) Thanks, Jony On Thursday, 27 February 2014 17:58:27 UTC, Jony Hudson wrote: Hi Folks, I'm stuck and would like a bit of help. This is following on from a question I posted to clojure.tools, but I've reduced the problem to its essence, and figure it might get a few more eyes on it here. My apologies to anyone who has to suffer reading about it twice :-) My actual problem is that I'm unable to get a Websocket transport for gorilla-repl running. But I think I've boiled down the problem to something that doesn't involve websockets. I'm trying to handle messages with nREPL. If I run the following in the REPL to make an nREPL handler: (require '[clojure.tools.nrepl.transport :as transport]) (require '[clojure.tools.nrepl.server :as nrepl-server]) (def handler (nrepl-server/default-handler)) (def trans (transport/fn-transport nil println)) (nrepl-server/handle* {:op clone} handler trans) Then everything goes as I would hope. The nREPL server replies with a new-session message, which is printed to the console by the dopey transport I've provided. If I then lift the new session ID (copy and paste) and send an evaluation message to the nREPL handler (nrepl-server/handle* {:op eval :code (+ 1 5) :session 2c8b0464-7e09-4c94-81d7-c4e0c7d1314f} handler trans) It works as I'd expect, replying with the value and a 'done' status message. {status #{:done}, session 2c8b0464-7e09-4c94-81d7-c4e0c7d1314f} {ns user, value 6, session 2c8b0464-7e09-4c94-81d7-c4e0c7d1314f} The problem comes if I try and execute the same command again, which should I would have thought should give the same answer, but instead I get an extremely long stack trace, a snippet of which is below. Exception in thread nREPL-worker-0 java.lang.StackOverflowError at clojure.lang.RestFn.applyTo(RestFn.java:130) at clojure.core$apply.invoke(core.clj:617) at clojure.core$prn.doInvoke(core.clj:3367) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:617) at clojure.core$println.doInvoke(core.clj:3387) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:28) at clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__2353.send(pr_values.clj:23) at clojure.tools.nrepl.middleware.session$session_out$fn__2437.invoke(session.clj:51) at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$0.flush(Unknown Source) at clojure.tools.nrepl.middleware.session$session_out$fn__2444.doInvoke(session.clj:44) at clojure.lang.RestFn.invoke(RestFn.java:460) at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$0.write(Unknown Source) at java.io.PrintWriter.write(PrintWriter.java:456) at java.io.PrintWriter.write(PrintWriter.java:473) at clojure.core$fn__5420.invoke(core_print.clj:187) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at clojure.core$pr_on.invoke(core.clj:3322) at clojure.core$print_map$fn__5428.invoke(core_print.clj:200) at clojure.core$print_sequential.invoke(core_print.clj:58) at clojure.core$print_map.invoke(core_print.clj:203) at clojure.core$fn__5431.invoke(core_print.clj:207) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at clojure.core$pr_on.invoke(core.clj:3322) at clojure.core$pr.invoke(core.clj:3334) at clojure.lang.AFn.applyToHelper(AFn.java:161) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invoke(core.clj:617) at clojure.core$prn.doInvoke(core.clj:3367) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:617) at clojure.core$println.doInvoke(core.clj:3387) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.tools.nrepl.transport.FnTransport.send(transport.clj:28) at clojure.tools.nrepl.middleware.pr_values$pr_values$fn$reify__2353.send(pr_values.clj:23) at clojure.tools.nrepl.middleware.session$session_out$fn__2437.invoke(session.clj:51) at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$0.flush(Unknown Source) at clojure.tools.nrepl.middleware.session$session_out$fn__2444.doInvoke(session.clj:44) [snip] Somehow, drawbridge gets this to work, even though as far as I can tell I'm doing the same thing. I can't figure out what's going on. Help! Thanks, Jony -- 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
Re: ANN: ring-token-authentication. A ring middleware to authenticate API requests
Really useful, concise library - thanks! James On Saturday, 15 February 2014 18:53:58 UTC, Jason Stewart wrote: I've just pushed the first version of ring-token-authentication, a Ring middleware to authenticate HTTP API requests. Token authentication is a popular way to authenticate API requests over HTTP. A client sends a token in the Authorization header like so: Authorization: Token token=notasecret The token is then parsed from the authorization header and checked for authenticity on the server side. This middleware aims to make it easy to add HTTP token authentication to your application, like it is in many other frameworks. This is my first open source Clojure project, and I'm excited to share it with you. Come check it out at https://github.com/jstewart/ring-token-authenticationor on clojars here: https://clojars.org/ring-token-authentication -- 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.
Reagent: ReactCSSTransitionGroup
is there a recommended way of accessing the ReactCSSTransitionGroup tag that is a part of react-wtih-add-ons.js? Specifically I am having trouble avoiding an Uncaught Error: Assert failed: Unknown tag: ':ReactCSSTransitionGroup' -- 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: Image processing
I assume you're referring to https://github.com/neatonk/im4clj ? On Thu, Feb 27, 2014 at 10:24 PM, exel...@gmail.com exel...@gmail.com wrote: Hi Michael, Got some good results on img processing tests. I got image resizer working nice, it was a resource path issue. However after some side by side testing with graphicmagick, I found imgscalr outputs files at a 30% to 50% larger file size. About 30% on larger dimensions, 50% on thumbnails. So I've opted for graphicmagick as it processes faster, same quality, much smaller static files and v elegant syntax, I've been using it in ruby and coldfusion for years. One other thing is it bypasses java, does the buffering internally. If you have an image processing use case, hope that's helpful for anyone going so far as a cdn to scale static assets. Here's a couple syntax examples: ;resize to 300 proportionally (convert photofile (-antialias) (-resize 300 300) (str (img-path) /lg_ new-file-name)) ; resize to 150 proportionally then crop to a 150 square (convert photofile (-antialias) (-resize 150 150) (-gravity Center) (-extent 100 100) photofile) photofile is resource path and file name. I'll check into clojure-docs, see if I can help out on the web dev section based on my experience last few weeks. Best, Pardeep. -- 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: Reagent: ReactCSSTransitionGroup
Yes, Reagent doesn't know about React components that don't live in React.DOM (ReactCSSTransitionGroup is in React.addons). So what you would need to do is to get hold of the component constructor, with something like (def ctg (- js/React (aget addons) (aget ReactCSSTransitionGroup))) and then call that with e.g [ctg {:transitionName foo} [:p child1] [:p child2]] or somesuch (I'm probably messing something up here, being away from Emacs for the moment, but you get the idea...). /dan On 28 feb 2014, at 14:10, Chris Sutela chris.sut...@gmail.com wrote: is there a recommended way of accessing the ReactCSSTransitionGroup tag that is a part of react-wtih-add-ons.js? Specifically I am having trouble avoiding an Uncaught Error: Assert failed: Unknown tag: ':ReactCSSTransitionGroup' -- 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: Latest web framework for clojure
If you are learning go with a simple approach (compojure + http-kit + hiccup for example). If you already know clojure I recommend going with some library that provide everything as data, specially the routes, as the function composition approach of compojure only gets you so far (been there). On Friday, February 28, 2014 12:05:08 PM UTC+1, xavi wrote: I would recommend this combination of libraries: - Compojure - lib-noir - Enlive and Enfocus, for server-side and client-side templating respectively (I've also used Hiccup, but I prefer Enlive/Enfocus because with these, templates are pure HTML; I prefer them even for solo projects, but I would especially recommend them if the HTML/CSS is going to be written by people that don't necessarily know anything about Clojure/ClojureScript). - CongoMongo, if you're using MongoDB as a database (there's also Monger, but I don't have any experience with it) Some time ago I open-sourced a base web, with a complete authentication system, that used these libraries. Maybe you'll find it useful https://github.com/xavi/noir-auth-app Cheers, Xavi On Thursday, February 27, 2014 2:57:07 AM UTC+1, Moritz Ulrich wrote: Om is well-suited to handle the UI-part for you. It doesn't do any server communication or forces you into any particular programming style or project layout. On Thu, Feb 27, 2014 at 2:35 AM, Mark Engelberg mark.en...@gmail.com wrote: As far as I can tell, neither luminus nor caribou are well-suited to building, for example, interactive web apps like this web-based chat room which serves as the Hello World for the Opa web framework: https://github.com/MLstate/opalang/wiki/Hello%2C-chat Is this the kind of thing that Pedestal and Hoplon are meant for? Or Om? -- 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.
A faster clojure startup
Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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.
mongodb driver for clojure?
Monger, and any other popular driver? -- 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: A faster clojure startup
Great, will it impact the runtime performance? On Friday, February 28, 2014 11:16:44 PM UTC+8, Gal Dolber wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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: A faster clojure startup
The runtime impact should be none or minimal, but I didn't benchmark it yet. On Fri, Feb 28, 2014 at 12:44 PM, bob wee@gmail.com wrote: Great, will it impact the runtime performance? On Friday, February 28, 2014 11:16:44 PM UTC+8, Gal Dolber wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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: A faster clojure startup
This sounds like an awesome shortcut to speeding things up on android/ios while we're waiting for CinC and friends. Do you know how much work it would be to port your changes to clojure-android and try it out there? I'd be very interested to test it out and do some debugging on android. Is it just a tweaked Var class or is there more to it? Adam On Fri, Feb 28, 2014 at 3:16 PM, Gal Dolber g...@dolber.com wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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: The future of CongoMongo?
2014-02-28 14:35 GMT+04:00 xavi xavi.caba...@gmail.com: When asked (a year ago) why I didn't use Monger I said I prefer CongoMongo because it's smaller and so probably easier to understand Monger's API follows MongoDB shell. CongoMongo invents a completely new API. I'll let you decide which one is easier to understand. Not having used Monger, I don't know what you mean by much richer composable DSL, but in general I don't like using specific DSLs for something that it already has its own language (I mean that MongoDB already has a query language, so I prefer to use something as close as possible to that, not another abstraction on top of that with its own limitations and problems that at the ends doesn't save me from having to learn the original language). Monger's query DSL is documented and completely optional: http://clojuremongodb.info/articles/querying.html#monger_query_dsl If you don't use it, you query/update/etc using the same constructs as in Mongo shell. -- MK http://github.com/michaelklishin http://twitter.com/michaelklishin -- 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: A faster clojure startup
No, its a bit more than that, but it shouldn't be hard to port. The changes already generate the right bytecode. I'm working a clean patch for clojure-jvm that should work on android. On Fri, Feb 28, 2014 at 12:58 PM, Adam Clements adam.cleme...@gmail.comwrote: This sounds like an awesome shortcut to speeding things up on android/ios while we're waiting for CinC and friends. Do you know how much work it would be to port your changes to clojure-android and try it out there? I'd be very interested to test it out and do some debugging on android. Is it just a tweaked Var class or is there more to it? Adam On Fri, Feb 28, 2014 at 3:16 PM, Gal Dolber g...@dolber.com wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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. -- 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: A faster clojure startup
Sounds promising, looking forward to testing the clojure-jvm patch! Ambrose On Sat, Mar 1, 2014 at 12:08 AM, Gal Dolber g...@dolber.com wrote: No, its a bit more than that, but it shouldn't be hard to port. The changes already generate the right bytecode. I'm working a clean patch for clojure-jvm that should work on android. On Fri, Feb 28, 2014 at 12:58 PM, Adam Clements adam.cleme...@gmail.comwrote: This sounds like an awesome shortcut to speeding things up on android/ios while we're waiting for CinC and friends. Do you know how much work it would be to port your changes to clojure-android and try it out there? I'd be very interested to test it out and do some debugging on android. Is it just a tweaked Var class or is there more to it? Adam On Fri, Feb 28, 2014 at 3:16 PM, Gal Dolber g...@dolber.com wrote: Here're some notes on the lean compiler I've been working on for clojure-objc http://galdolber.tumblr.com/post/78110050703/reduce-startup Feedback's welcome -- 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. -- 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.
case statement and java constants
I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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: case statement and java constants
I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clements adam.cleme...@gmail.comwrote: I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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: case statement and java constants
IMO that would needlessly complicate an otherwise simple construct, especially since a simple macro can endlessly customise it. Thanks, Ambrose On Sat, Mar 1, 2014 at 12:40 AM, Adam Clements adam.cleme...@gmail.comwrote: That works perfectly, thanks! It does feel like it should just work as a normal case statement though, where the value is static final, and warn if it isn't. Is there a good reason this shouldn't be supported by the case statement that anyone can think of? Worth filing an enhancement request on clojure core? Thanks, Adam Adam On Fri, Feb 28, 2014 at 4:21 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clements adam.cleme...@gmail.comwrote: I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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. -- 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: case statement and java constants
That works perfectly, thanks! It does feel like it should just work as a normal case statement though, where the value is static final, and warn if it isn't. Is there a good reason this shouldn't be supported by the case statement that anyone can think of? Worth filing an enhancement request on clojure core? Thanks, Adam Adam On Fri, Feb 28, 2014 at 4:21 PM, Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com wrote: I'm not 100% sure if this works, but have you tried writing a macro that gets the Java field value, and inserting into the case statement? (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~ MotionEvent/ACTION_UP ... )) On Sat, Mar 1, 2014 at 12:15 AM, Adam Clements adam.cleme...@gmail.comwrote: I'm having some trouble with java constants in a case statement. I know I could use condp, but these are things I could put in a java switch statement and so it's annoying to give up constant time dispatch: (case (.getActionMasked event) MotionEvent/ACTION_POINTER_DOWN :down MotionEvent/ACTION_UP :up MotionEvent/ACTION_POINTER_UP :up MotionEvent/ACTION_MOVE :move MotionEvent/ACTION_CANCEL :cancel MotionEvent/ACTION_OUTSIDE :outside :none)) Always gives me :none because java constants aren't literals, it dispatches on the symbol instead. Is there a way to do this without resorting to condp = or am I stuck? Should this be a something that case handles by default? I can't think of a reason these couldn't be converted to literals... Thanks, Adam -- 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. -- 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.
map and lazy sequence
Hi, Can someone correct my misunderstanding here. I was lead to believe that map produced a lazy sequence, so why do I get three printed trace lines in the following code : user= (take 1 (map #(do (println (str trace: %)) %) [1 2 3])) (trace:1 trace:2 trace:3 1) Thanks for your help Andy -- 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: map and lazy sequence
Clojure works on a chunked basis for performance reasons...THe size of a chunk is 32 elements - thus you would actually get 32 printouts if you supplied a collection larger than 31 elements. Jim On 28/02/14 17:04, Andy Smith wrote: Hi, Can someone correct my misunderstanding here. I was lead to believe that map produced a lazy sequence, so why do I get three printed trace lines in the following code : user= (take 1 (map #(do (println (str trace: %)) %) [1 2 3])) (trace:1 trace:2 trace:3 1) Thanks for your help Andy -- 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: map and lazy sequence
Hi Andy, Lazy sequences are realised in chunks of 32. You can see this by running: (take 1 (map prn (range))) (0 1 .. 30 31 nil) Thanks, Ambrose On Sat, Mar 1, 2014 at 1:04 AM, Andy Smith the4thamig...@googlemail.comwrote: Hi, Can someone correct my misunderstanding here. I was lead to believe that map produced a lazy sequence, so why do I get three printed trace lines in the following code : user= (take 1 (map #(do (println (str trace: %)) %) [1 2 3])) (trace:1 trace:2 trace:3 1) Thanks for your help Andy -- 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: The future of CongoMongo?
On Friday, February 28, 2014 5:04:59 PM UTC+1, Michael Klishin wrote: Monger's API follows MongoDB shell. CongoMongo invents a completely new API. I'll let you decide which one is easier to understand. How is CongoMongo inventing a completely new API? Taking an example adapted from Monger's documentation (http://clojuremongodb.info/articles/querying.html#using_mongodb_query_operators), what in Monger would be... (monger.collection/find products { :price_in_subunits { gt 1200 lte 4000 } }) in CongoMongo would be... (somnium.congomongo/fetch :products :where { :price_in_subunits { :$gt 1200 :$lte 4000 } }) and in the Mongo shell... db.products.find( { price_in_subunits: { $gt: 1200 $lte: 4000 } ) Ok, now that I've written it, I see that CongoMongo changes `find` with `fetch` for example. Is that what you're referring to when saying that CongoMongo invents a completely new API? Good to know that the DSL in Monger is completely optional. Cheers, Xavi -- 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: map and lazy sequence
Not everything is chunked, but data-structures like vectors produce chunked-seqs. On Fri, Feb 28, 2014 at 5:06 PM, Jim - FooBar(); jimpil1...@gmail.comwrote: Clojure works on a chunked basis for performance reasons...THe size of a chunk is 32 elements - thus you would actually get 32 printouts if you supplied a collection larger than 31 elements. Jim On 28/02/14 17:04, Andy Smith wrote: Hi, Can someone correct my misunderstanding here. I was lead to believe that map produced a lazy sequence, so why do I get three printed trace lines in the following code : user= (take 1 (map #(do (println (str trace: %)) %) [1 2 3])) (trace:1 trace:2 trace:3 1) Thanks for your help Andy -- 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. -- 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: case statement and java constants
2014-02-28 17:21 GMT+01:00 Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com: (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~MotionEvent/ACTION_UP ... )) That's a neat trick! Didn't know case could do this. Wouldn't it be great to mention this in the docs + the class of values for which this is legal, i.e. roughly those with a stable hash? cheers -- 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.
Latest web framework for clojure
Long story short. You should be learning Pedestal, but the app component is on pause at the moment. My advice is to learn pedestal-service and Om. When Pedestal-app gets going again, learning Om will have given you a good context for transitioning to Pedestal 100%. -- 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: map and lazy sequence
doh!, thanks for the above. I actually did read this a few weeks ago but totally forgot about it. :o/ -- 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: The future of CongoMongo?
On Feb 28, 2014, at 9:08 AM, xavi xavi.caba...@gmail.com wrote: (monger.collection/find products { :price_in_subunits { gt 1200 lte 4000 } }) And you could use $gt, $lte directly if you require/refer Monger's operators namespace: (monger.multi.collection/find db :products {:price_in_subunits {$gt 1200 $lte 4000}}) Note that Monger seems to accept keywords for collection names, even tho' they are type-hinted as ^String, because it calls `name` on collection before passing it to MongoDB's driver (so I'm not sure why the ^String hint is even there?). (somnium.congomongo/fetch :products :where { :price_in_subunits { :$gt 1200 :$lte 4000 } }) Michael pointed out to me that :$gt is not sanctioned by Clojure's definition of keywords (even tho' it currently works). db.products.find( { price_in_subunits: { $gt: 1200 $lte: 4000 } ) Yes, the fetch vs find aspect of CongoMongo has always bothered me too and I don't understand the various deviations from the MongoDB API / shell syntax. Some are subtle and confusing (IMO), but it's what I'm used to now... :) Good to know that the DSL in Monger is completely optional. I like the DSL: (with-collection coll (find {:_id id}) (limit 1) (options {:slaveok slave-ok?}) (keywordize-fields true))) although we have to jump through some hoops with coll to support multiple databases (dropping down to the Java API to get a Collection object from a specific DB object). Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) signature.asc Description: Message signed with OpenPGP using GPGMail
Re: case statement and java constants
Anyone who has a good working example of this can add it to clojuredocs.orgin a few minutes, if they are so inclined: http://clojuredocs.org/clojure_core/clojure.core/case I know that within 5 seconds of reading this one or more people will complain that the site is out of date. It is true that its doc strings and source code are for Clojure 1.3, but the examples are free form and can say whatever you want, and there is very useful info in those examples that applies to Clojure 1.4, 1.5.1, and the forthcoming 1.6 just as well. Andy On Fri, Feb 28, 2014 at 9:36 AM, Herwig Hochleitner hhochleit...@gmail.comwrote: 2014-02-28 17:21 GMT+01:00 Ambrose Bonnaire-Sergeant abonnaireserge...@gmail.com: (defmacro motion-case [...] `(case .. ~MotionEvent/ACTION_POINTER_DOWN ... ~MotionEvent/ACTION_UP ... )) That's a neat trick! Didn't know case could do this. Wouldn't it be great to mention this in the docs + the class of values for which this is legal, i.e. roughly those with a stable hash? cheers -- 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: mongodb driver for clojure?
On Feb 28, 2014, at 7:29 AM, action actioncao2...@gmail.com wrote: Monger, and any other popular driver? CongoMongo -- but see this thread: https://groups.google.com/forum/#!topic/clojure/JOREq-Jl1Ns Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) signature.asc Description: Message signed with OpenPGP using GPGMail
Re: Image processing
Yes via im4clj - https://github.com/neatonk/im4clj [im4clj 0.0.1] The developer recommends shell scripting with Conch with standard command line syntax, however im4clj works perfectly fine for 2 core needs for photo gallery apps: 1. resize with proportions, and 2. crop thumbnails from center If shell scripting is preferred, here's the command line version of resize crop from center: gm convert in_path_and_file -antialias -resize '150x150' -gravity center -extent 100x100 out_path_and_file -- 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] clojure.test.check (previously, simple-check)
Hey Andrew, Good question. tl;dr, change your test to: (tc/quick-check 100 prop1 :max-size 50) ;; and that should pass. Longer explanation: test.check's generators take two parameters, a random number generator, and an integer 'size'. During testing, the size starts at 0, and increases up to some fixed maximum. This is used to that the 'size' of the generated data increases as more and more tests pass. The rationale here is that you don't want your very first to generate a million-length vector, when, if there is a bug, its more than likely also present with 'smaller' data. As it turns out, with a complex generator like gen/any, a size of 100 (the default maximum) can generate very large, nested data-structures. This is explained in some detail in the documentation [1]. I've tried to make all of the built-in generators have sane defaults, but its appear like gen/any can still generate massive, nested structures with the default values. I'll look into a more sane default sizing strategy for this generator. As I mention in the tl;dr above, you can set the maximum 'size' used during testing. [1] https://github.com/clojure/test.check/blob/master/doc/intro.md#recursive-generators On Feb 28, 2014, at 3:41 AM, keeds akee...@gmail.com wrote: Hi Reid, This is excellent. Just experimenting and trying to get my head around it. Not sure if I'm doing any wrong or stupid!! If I test a function that relies on Exception handling internally as I reach 100 tests it takes forever and eventually blows the heap. Simple contrived example: (ns check (:require [clojure.test.check :as tc] [clojure.test.check.generators :as gen] [clojure.test.check.properties :as prop] )) (defn format1 [x] (try (- (double x) (format %,.0f)) (catch Exception e ))) (def prop1 (prop/for-all [v gen/any] (string? (format1 v #_ (tc/quick-check 100 prop1) ;; blows heap Thanks, Andrew On Thursday, 27 February 2014 17:22:44 UTC, Reid Draper wrote: I'm happy to announce the first release of the newest Clojure contrib library: test.check [1]. Previously named simple-check [1], test.check is a property-based testing library, based on QuickCheck. The README has a guide for migrating from simple-check, as well as some getting-started documentation. I'm happy to answer any questions here as well. Or, stop by my Clojure/West talk in March. [1] https://github.com/clojure/test.check [2] https://github.com/reiddraper/simple-check -- 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 a topic in the Google Groups Clojure group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/clojure/EPNoH4JEiVQ/unsubscribe. To unsubscribe from this group and all its topics, 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.
LazySeq.seq()
Hi, Looking at the codehttps://github.com/clojure/clojure/blob/master/src/jvm/clojure/lang/LazySeq.javafor LazySeq.seq() I was wondering why a 'while' loop is used rather than an 'if' and a recursive call to ls.seq(), which would be cleaner code I guess? Am I right to suspect this simply an optimization to avoid possible stack overflow, or maybe for performance reasons, or is it some other reason? final synchronized public ISeq seq(){ sval(); if(sv != null) { Object ls = sv; sv = null; while(ls instanceof LazySeq) { ls = ((LazySeq)ls).sval(); } s = RT.seq(ls); } return s; } -- 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: Image processing
The main disadvantage with this, of course, being requiring imagemagick on the command line. On Fri, Feb 28, 2014 at 2:51 PM, The Dude (Abides) exel...@gmail.com wrote: Yes via im4clj - https://github.com/neatonk/im4clj [im4clj 0.0.1] The developer recommends shell scripting with Conch with standard command line syntax, however im4clj works perfectly fine for 2 core needs for photo gallery apps: 1. resize with proportions, and 2. crop thumbnails from center If shell scripting is preferred, here's the command line version of resize crop from center: gm convert in_path_and_file -antialias -resize '150x150' -gravity center -extent 100x100 out_path_and_file -- 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: Image processing
Agreed if your img processing use case is minor, prob not worth it. If there's a lot of member submitted content for example and speed/smaller file sizes are important, there's value in graphicmagick. Its a simple 1 line command install and thereafter I've never touched it except via code to process imgs or to update. Graphicmagick is a fork of Imagemagick, more performant and more actively updated. Ref the addl dependency point, as a frame of reference most common way folks in ruby world process images is via gems for imagemagick/graphicmagick, not with native ruby img proc libs. They bring in sass, coffeescript, etc, best tool for the job. They even use Go Worker in Go lang than a ruby equivalent for background processing. -- 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.
core.cache strange behaviour for short ttl
Taking the code below, if I repeatedly read from a cache I will occasionally get nil back from the cache. This seems to happen on my machine for ttl's under 5 ms. Although I'm sure I would never use such a short TTL in the wild, I would like to know why I am seeing this... Has anybody else noticed this issue? (ns cache-test.core (:require [clojure.core.cache :as cache])) (def data (atom foo)) (def ttl (atom (cache/ttl-cache-factory {} :ttl 1))) (defn get-data [] (let [c @ttl nc (if (cache/has? c {}) (cache/hit c {}) (cache/miss c {} @data))] (reset! ttl nc) (cache/lookup nc {}))) (def results (atom '())) ;; there will *sometimes* be ;; nil elements in the seq, seems dependent on cpu speed, which would make sense due to side effect of taking system/currentTimeMillis internally. (set (map (fn [_] (get-data)) (range 1))) -- 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: Source code reloading with leiningen checkouts
So I just booted up my ubuntu to check if the same happens here too. And see, it does. What I did was: 1. run lein install for subproject 2. create checkouts folder in main project 3. do an ln -s ../../subproject Then I fired up my server to see if hot code reloading works, but still it wont. So I must do anything else wrong. Someone please? Best Regards, Sven Am Montag, 24. Februar 2014 06:46:20 UTC+1 schrieb Sven Richter: Hi, I already posted this on SO, but as I got no answer there yet I will try here too. I have two clojure projects, one a luminus project (main) with http-kit and a second (sub) plain clojure project with a single dependency to datomic. Now I added the checkouts folder to main and inside made a link to sub. When I start main with lein run -dev sub is recognized and put on the classpath, however, every change I do to sub source files are not recognized until I restart my server. I am working on W7 with Oracle JDK7 and created the link with windows mklink tool. Any Ideas what might be wrong here? Best Regards, Sven -- 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: Source code reloading with leiningen checkouts
Ok, finally i found it myself after days of days of digging :D In core.clj there is this code: (http-kit/run-server (if (dev? args) (reload/wrap-reload app) app) Simply change it to this one: (http-kit/run-server (if (dev? args) (reload/wrap-reload app {:dirs [src checkouts/subproject/src]}) app) You can add as many folders you want, all will get watched for source changes. Am Montag, 24. Februar 2014 06:46:20 UTC+1 schrieb Sven Richter: Hi, I already posted this on SO, but as I got no answer there yet I will try here too. I have two clojure projects, one a luminus project (main) with http-kit and a second (sub) plain clojure project with a single dependency to datomic. Now I added the checkouts folder to main and inside made a link to sub. When I start main with lein run -dev sub is recognized and put on the classpath, however, every change I do to sub source files are not recognized until I restart my server. I am working on W7 with Oracle JDK7 and created the link with windows mklink tool. Any Ideas what might be wrong here? Best Regards, Sven -- 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: case statement and java constants
I would appreciate a jira enhancement ticket for this. Alex -- 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.
Clojure performance question
Hi, Can I ask a newbie question about clojure performance? What make clojure performance slow than java?, it seems clojure has the 1/4 performance compared to java in general, according to tests, some cases it might be 1/10. the reasons I can think out are - the byte code is not efficient sometimes - the byte code might not enjoy the jvm optimization - the reflection - the immutable data structure - the abstract interface design The abstract interface like seq offers its power, but it is easy to drop in the performance trap. And it seems to me that it is easy to write a slow clojure program, I know the efficiency of code depends on coder, you can write the code faster than java sometimes,but need to know a lot of deep thing and tricky, and clojure is not the funny clojure any more. 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 --- 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: mongodb driver for clojure?
Think you. 在 2014年3月1日星期六UTC+8上午3时44分19秒,Sean Corfield写道: On Feb 28, 2014, at 7:29 AM, action action...@gmail.com javascript: wrote: Monger, and any other popular driver? CongoMongo -- but see this thread: https://groups.google.com/forum/#!topic/clojure/JOREq-Jl1Ns Sean Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ 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 --- 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 performance question
I have seen (and I keep seeing) a ton of Java code that performs poorly. Empirically, it's equally easy to write a slow Java app. You always need a discerning programmer to get good performance from any language/tool. Numbers like 1/4 or 1/10 can be better discussed in presence of the use-cases and perf test cases. Most of the problems you listed can be mitigated by `-server` JIT, avoiding reflection, transients, loop-recur, arrays, perf libraries and some Java code. Shantanu On Saturday, 1 March 2014 10:32:26 UTC+5:30, bob wrote: Hi, Can I ask a newbie question about clojure performance? What make clojure performance slow than java?, it seems clojure has the 1/4 performance compared to java in general, according to tests, some cases it might be 1/10. the reasons I can think out are - the byte code is not efficient sometimes - the byte code might not enjoy the jvm optimization - the reflection - the immutable data structure - the abstract interface design The abstract interface like seq offers its power, but it is easy to drop in the performance trap. And it seems to me that it is easy to write a slow clojure program, I know the efficiency of code depends on coder, you can write the code faster than java sometimes,but need to know a lot of deep thing and tricky, and clojure is not the funny clojure any more. 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 --- 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.
ace / codemirror in cljs
Hi, Is there anything like http://codemirror.net/ or http://ace.c9.io/#nav=about in cljs ? The goal is not to use codemirror/ace in a cljs project. The goal is to read some interesting cljs code on how to write an editor. 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 --- 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.