Re: [ANN] Leiningen 2.3.0 released
2013/8/10 Sean Corfield seancorfi...@gmail.com Perhaps put Leiningen JARs on Clojars instead of this flaky custom location? I personally think there should be a fallback location for the jar that does not use SSL. I'd be happy to host one if needed. -- 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: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata
On Friday, 9 August 2013 21:50:13 UTC+8, Jace Bennett wrote: Thanks again, Mike. That's really helpful. I'll take a look at the core.matrix stuff to try and understand implementation and motivation better. What games did you make? I'd love to check them out. One is Ironclad - a steampunk themed strategy game: http://www.mikera.net/ironclad/ or https://github.com/mikera/ironclad The other is Alchemy, a 7-day Roguelike game: https://github.com/mikera/alchemy Both are somewhat interesting from technical perspective in the sense that the game state is fully functional and immutable. Jace On Fri, Aug 9, 2013 at 4:10 AM, Mikera mike.r.an...@gmail.comjavascript: wrote: On Friday, 9 August 2013 05:07:10 UTC+8, Jonathan Fischer Friberg wrote: I'd suggest avoiding macros until you absolutely know that you need them. Usually they aren't necessary. Problem with this is that you don't really know when you need them unless you know what they do. I'm not saying don't learn how macros work. Learning is always good. My recommendation is just that your default approach should be to avoid using them unless you have tried very hard to achieve your goal with pure functions first, and convinced yourself that it isn't possible. Macros are only *needed* IMHO when one of the following applies: - You want to create new language/DSL syntax that isn't expressible with normal function application rules (e.g. short-circuiting evaluation, new control structures etc.) - You need to do custom code generation at compile time for some good reason (e.g. performance, since macros enable you to do compile-time specialisation of code) I wrote about these and gave some examples in a blog post a few months back for anyone interested: http://clojurefun.wordpress.com/2013/01/09/when-do-you-need-macros-in-clojure/ On Thu, Aug 8, 2013 at 9:58 PM, Jace Bennett jace.b...@gmail.comwrote: Thanks, Mike. I guess my simple example is too simple. Out of the hypothetical, have you used techniques like this? I have this nagging feeling that there is a more direct and idiomatic way to glean this sort of information from my code. I mean, that's why we use AST's, right? So we can process them? I shouldn't need a data structure like the endpoint map in the first place. I just don't know how to capitalize on this rather abstract and vague notion. How do folks usually go about it when they have a desire to query the running system about its shape and structure? On Thu, Aug 8, 2013 at 2:36 AM, Mikera mike.r.an...@gmail.com wrote: I'd suggest avoiding macros until you absolutely know that you need them. Usually they aren't necessary. Prefer writing pure functions (without side effects) - these are easier to reason about, easier to test, simpler to write correctly and easier to plug together / compose via higher order functions. For example, in your endpoint example I would probably just use three functions: - a pure add endpoint metadata to an endpoint map function - an impure update endpoints function that updates endpoints using an endpoint map - a function that calls both of the above to declare and launch a new endpoint There might be a few other helper functions as well but hopefully you get the idea. On Thursday, 8 August 2013 03:19:15 UTC+1, Jace Bennett wrote: Thanks to the community for a wondrous programming environment. I discovered SICP last year, and fell in love with the idea of lisp. But I've come to a point where I think I need practice on moderately sized projects before more reading will help. When starting on almost any moderately scoped effort, I quickly run into a class of problems which I think may be a fit for macros, but I want to understand what is the idiomatic way to approach them in clojure. Most of my professional experience is in .NET, and that is probably coloring my thought patterns a bit. In that context, I often use reflection scans and type metadata to configure infrastructural bits and dry things up. Instead of having to explicitly register components in the more dynamic areas of my app, I use conventions to select components to register from the metadata I have about my code. I can imagine using macros in clojure to accumulate metadata about my declarations so that I can query them at runtime. For example, maybe a defendpoint macro that sets up a handler AND adds it to the routing table (or more directly an endpoint map which I then use to make routing decisions among other things). Admittedly, something about the sound of the phrase it's just data tells me I'm sniffin up the wrong tree here. But I don't know how to turn that nagging feeling into working code. Is this a reasonable use of the macro? What about doing the registration at macro-expansion time vs emitting runtime code to do it? How should one approach the problems space otherwise?
Re: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata
Try these in a REPL user= (ns-map *ns*) user= (keys (ns-map *ns*)) user= (vals (ns-map *ns*)) user= (map meta (vals (ns-map *ns*))) user= (ns proof) proof= (defn ^:my-x-comp func1 [] (prn func1 executed)) proof= (filter #(:my-x-comp (meta %)) (vals (ns-map *ns*))) proof= ((first (filter #(:my-x-comp (meta %)) (vals (ns-map *ns*) not sure this is the right way, just an experiment with REPL. (I chose the wrong reply option and send this only to you, Jace, this morning. Sorry.) Luca Out of curiousity, where do the defs go? Could one iterate over all the vars in the runtime environment? Would I just get pointers to native code? -- -- 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] Leiningen 2.3.0 released
On 10 August 2013 08:39, Michael Klishin michael.s.klis...@gmail.com wrote: I personally think there should be a fallback location for the jar that does not use SSL. As long as it isn't used automatically or after flashing a y/n prompt. (Offering a flag like --no-ssl and mentioning it to the user when appropriate would be fine.) To explain, while I don't mind the occasional wait for an upgrade at all, I would very much mind if lein tricked me into downloading its jar over a connection not using SSL. I'll also take this opportunity to note that if one has an earlier self-install in place, downgrading can be accomplished by replacing the lein script with the version from the appropriate tag in the Leiningen repo: $ cp /path/to/source/of/leiningen git checkout 2.1.3 cp bin/lein ~/bin Or go to GitHub and download manually in absence of a local clone. This works at least in Linux; hopefully adjusting paths (and the script name on Windows) would make it work on other platforms. Cheers, Michał -- -- 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.
Leiningen 2.3.0 and uberjar
Hi, I've installed the last lein version. But when I do: $ lein new app jartest $ lein uberjar At this time, 2 jars are created. Then I call: $ java -jar target/jartest-0.1.0-SNAPSHOT-standalone.jar And I get this error: Caused by: java.lang.ClassNotFoundException: jartest.core at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) In the jartest/core.clj, the :gen-class option of ns is well defined and there's the main function. What did I miss? Thanks for your help. -- -- 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] Compliment - a completion library you deserve
I think I am going to love this! On Friday, August 9, 2013 6:19:40 PM UTC+2, Alexander Yakushev wrote: Dear community, I've just released the initial version of my clojure-complete fork, Compliment. I decided to move it into a separate project after I rewrote most of it. Here is project's link: https://github.com/alexander-yakushev/compliment . There is a rationale in README, where I explain why I had to write this fork (initially the reason was clojure-complete being very slow to work on Android with Emacs' ac-complete, then other reasons turned up). You can see examples of what Compliment can do here: https://github.com/alexander-yakushev/compliment/wiki/Examples . Right now only Emacs is supported as a client, via my yet another fork, of ac-nrepl: https://github.com/alexander-yakushev/ac-nrepl-compliment . Finally, I don't want to seem like I'm hijacking clojure-complete's positions. It's just that clojure-complete happens to be a faithful swank-clojure's completion port, and it is pretty rigid; I think there is much to be improved in this area. -- -- 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: sending errors to the ui - web development using luminus
I am using Validateur (http://clojurevalidations.info/) as the basis for a custom validation mechanism with Luminus. The validation-set fn gets you about 90% of the way there: it takes a list of rules and returns a function. Pass your data map to the function, and it returns a set of the error messages. You can also write custom validation rules in case the basic set isn't what you need. On Fri, Aug 9, 2013 at 2:02 AM, Abraham abev...@gmail.com wrote: Dear How to send validate the input and then send all errors at a time .? I am using luminus , the doc shows send one error at a time. Thanks in advance A -- -- 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: [ANN] Leiningen 2.3.0 released
On Friday, August 9, 2013 10:07:39 PM UTC-7, Sean Corfield wrote: Can we _please_ get the Leiningen artifacts placed somewhere that doesn't cause all sorts of SSL problems? This has been a repeated problem over the last several releases. Mac and Windows users have been s.o.l. each time until it is resolved. None of these problems have had anything to do with SSL. It's been two things: the self-install function was moved, and the S3 ACL was incorrect due to a typo while uploading. The S3 issues are being addressed by ensuring more of the Leiningen team has access to the AWS account; the reason I'm waiting for the 2.3.1 release is that I want to find a time when I can step through it with one of the other contributors so they are familiar with the process and can do it when I'm not around. The self-install was broken such that the implicit self-install happened before HTTP_CLIENT was set. The explicit self-install command happens later if you're running it from a checkout of Leiningen itself, which must have been the case when I was testing. Anyway, a new download location wouldn't solve either of these issues. In the mean time I've reset the stable branch back to 2.2.0, so upgrades and new users won't be affected. If you want to use 2.3.0, you can export HTTP_CLIENT and run `lein upgrade 2.3.0` specifically and it will still pull it in. You can always back out of an upgrade by running `lein upgrade 2.1.3` or whatever; the upgrade command doesn't care which direction it's going. -Phil -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Data Profiling
Hi, I have about 2.5 Gb of web transaction data (values submitted to forms etc) held as CSV files that my fairly non-technical users want to analyse. I want to make it easy for them to run basic analytics - averages, distribution of values, percentage nil etc - across all or a subset of the files. I've seen commercial data profilers do this kind of thing and I think I could knock up something fairly quickly using incanter. However, I can't help but feel it's a solved problem and I was wondering if anyone here knows of any github projects I could use to get me started? Many Thanks Adrian -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[ANN] Method-fn: augmented Java methods as functions
Do Clojure’s built-in methods for bridging the distinction between functions and host platform methods seem clunky to you? Then the method-fn library may hold the solution!: (require 'method.fn) (map #mf/i String/trim [ a b ]) ;; Look ma, no reflection! (map #mf/s Math/log (range 1 5));; Static methods too Artifacts in Clojars, source code and README on github: https://github.com/llasram/method-fn -Marshall -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- 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: [Proposal] Simplified 'ns' declaration
How does gen-class etc. fit into this new (ns) world? I'm not sure. I've stepped away from this thread (and the mailing list in general) for a bit to focus on the mounting amount of work I have to finish before the deadline hits, so I haven't had much more time to think about this, and I'm also not very familiar with :gen-class. Looking at the example in The Joy of Clojure, my first impression is that :gen-class looks like one hell of an ugly beast by itself: (ns joy.gui.DynaFrame (:gen-class :name joy.gui.DynaFrame :extends javax.swing.JFrame :implements [clojure.lang.IMeta] :prefix df- :state state :init init :constructors {[String] [String]} :methods [[display [java.awt.Container] void] ^{:static true} [version [] String]]) (:import ... )) Looking at that, I think most of it can be kept as-is, except perhaps for the sake of supporting both versions of ns it might be worth turning the outer parenthesis into brackets. Also, what is the purpose of the :name keyword? Are there legitimate situations where you'd want to have a name other than the namespace that can't be called poor design? Other than that, I don't personally have any ideas on how that could be simplified. I hope to respond to the other emails in this thread when I get the time to, especially Timothy's. Hopefully that'll happen once I finish one project in about a week or so. Cheers, Greg -- Please do not email me anything that you are not comfortable also sharing with the NSA. On Aug 9, 2013, at 6:23 PM, Mark Derricutt m...@talios.com wrote: How does gen-class etc. fit into this new (ns) world? On 6/08/2013, at 4:28 AM, Greg g...@kinostudios.com wrote: I haven't put enough thought into this as I could, but this seems good enough already to kick the ball rolling. If the above syntax can't be made to support the old school syntax as well, another thought would be to create a new name for the declaration, calling it include or something like that instead of ns. -- -- 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. signature.asc Description: Message signed with OpenPGP using GPGMail
Re: [ANN] Method-fn: augmented Java methods as functions
Wow! This is neat. Congratulations on the release. A minor observation: It may help some readers if you mention on the README that it may not work with lein-try (as I found) and that the user must `require` the ns first: (require '[method.fn]) Shantanu On Saturday, 10 August 2013 21:58:43 UTC+5:30, Marshall Bockrath-Vandegrift wrote: Do Clojure’s built-in methods for bridging the distinction between functions and host platform methods seem clunky to you? Then the method-fn library may hold the solution!: (require 'method.fn) (map #mf/i String/trim [ a b ]) ;; Look ma, no reflection! (map #mf/s Math/log (range 1 5));; Static methods too Artifacts in Clojars, source code and README on github: https://github.com/llasram/method-fn -Marshall -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- 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] Method-fn: augmented Java methods as functions
Shantanu Kumar kumar.shant...@gmail.com writes: Wow! This is neat. Congratulations on the release. Thank you! A minor observation: It may help some readers if you mention on the README that it may not work with lein-try (as I found) and that the user must `require` the ns first: (require '[method.fn]) Good point. I’ve updated the README accordingly. -Marshall -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- 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: Lisp newbie seeks (macro?) wisdom - instrumentation and app metadata
Here is where I started... http://www.lisperati.com/clojure-spels/casting.html I personally disagree about being so timid with macros, however, I do not code Clojure with a team of other people =P. The one thing you will find about Clojure is that it slaps a limit on the types of macros you can do. This limit does not necessarily stop you from creating amazing things with macros but it is there. So of the macros that you will find in these LISP SPEL books will not be easily recreated in the hampered(pampered?) Clojure language. Clojure was meant to be a more corporate friendly, pragmatic language; thus, no reader macros. On Friday, August 9, 2013 6:21:02 PM UTC-4, Jace Bennett wrote: Thanks everyone. Good stuff. I have Let over Lambda, but I didn't glean what I wanted from it (or probably even what it wanted from me). I'll pick up On Lisp. I didn't realize it was focused on macros. Also, I think Luca has given me a clue. I used code gen techniques long before I started using reflection based techniques. Macros are more like code gen, so I'll think back to those techniques, and search for analogues and maybe even epiphanies. I think I had the ideas of dynamism and DRY complected (sorry, had to). The dynamism will obviously require state. The DRY shouldn't. But in C# I've usually gone dynamic to get dry. Out of curiousity, where do the defs go? Could one iterate over all the vars in the runtime environment? Would I just get pointers to native code? On Fri, Aug 9, 2013 at 1:04 PM, Andrew Stine illumin...@gmail.comjavascript: wrote: The difficulty with On Lisp when applied to Clojure is that the specific macros On Lisp demonstrates either depend on state, which Clojure avoids, or are already present in Clojure core. (if-let is a big one in my book.) Some of them also run into conflicts with Clojure implicit gensyming. I don't suggest it for the specific macros it demonstrates, but because it demonstrates very clearly what they are for, why and where you would use them, and how, in general, they are used. I also don't write macro much anymore in Clojure but that's mostly because Clojure has a few macros already which handle most of the things I would do with them in Common Lisp. On Friday, August 9, 2013 11:13:44 AM UTC-4, Lee wrote: On Aug 9, 2013, at 11:01 AM, Andrew Stine wrote: For a pretty decent cover of when and how to use macros, On Lisp[1] is a pretty good book. It's written mainly for Common Lisp but most of it translates to Clojure well enough. I find that for common code, writing macros isn't so useful as most of the goods ones are already part of clojure.core. But if you ever find yourself in the position where you'd really like to have a control structure just for your program, or introduce a compile-time code generator, or subtly add a new paradigm to the language, a macro is your ticket. 1. http://code.google.com/p/**onlisp/http://code.google.com/p/onlisp/ I think that On Lisp is completely awesome -- one of the best technical books of any kind that I've ever read. However, my recollection is that the macro stuff, in particular, doesn't translate so well to Clojure because the differences between Common Lisp and Clojure macros are pretty fundamental. Or at least that has been my impression and I mostly stopped writing macros when I switched from Common Lisp to Clojure because I found the differences confusing. Your experience may be different but I thought that a warning might be in order. -Lee -- -- 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
apply inc
Hi there: Why does (apply str [2 3]) work and not (apply inc [4 5]) though (apply inc [4]) does work? 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: apply inc
(apply str [2 3]) does the same thing as (str 2 3), which is to attempt to convert each of its args to a string, then concatenate them all. (apply inc [4 5]) does the same thing as (inc 4 5), which is to throw an exception because inc takes exactly one argument and returns that value plus 1. This site has more examples of apply, and many other Clojure functions, too: http://clojuredocs.org/clojure_core/clojure.core/apply Andy On Sat, Aug 10, 2013 at 7:21 AM, drclj deepikaro...@gmail.com wrote: Hi there: Why does (apply str [2 3]) work and not (apply inc [4 5]) though (apply inc [4]) does work? 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. -- -- 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: apply inc
How many args does inc supports ? Only one. (apply inc [ 1 3 ]) is the same as (inc 1 3) which would also trigger an arity exception. apply does not call the given fn on each item in the collection it's given, it calls it once with the whole collection as the argument list. (map inc [1 3]) calls inc on every item in the vector and would return (2 4). Hope it's clear. Luc P. Hi there: Why does (apply str [2 3]) work and not (apply inc [4 5]) though (apply inc [4]) does work? 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. -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail from my ipad! -- -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups Clojure group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Leiningen 2.3.0 and uberjar
I experienced this as well; when I opened the resulting jar, I found source files rather than class files. Not sure what causes this. On Saturday, August 10, 2013 9:36:24 AM UTC-4, Christian Sperandio wrote: Hi, I've installed the last lein version. But when I do: $ lein new app jartest $ lein uberjar At this time, 2 jars are created. Then I call: $ java -jar target/jartest-0.1.0-SNAPSHOT-standalone.jar And I get this error: Caused by: java.lang.ClassNotFoundException: jartest.core at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) In the jartest/core.clj, the :gen-class option of ns is well defined and there's the main function. What did I miss? Thanks for your help. -- -- 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: apply inc
When you write (apply inc [4 5]) it's like (inc 4 5) But the inc function accepts only one argument. -- -- 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: Data Profiling
You could possibly batch import it all into MySQL, and let people SQL query over it. On Sat, Aug 10, 2013 at 9:21 AM, Adrian Mowat adrian.mo...@gmail.comwrote: Hi, I have about 2.5 Gb of web transaction data (values submitted to forms etc) held as CSV files that my fairly non-technical users want to analyse. I want to make it easy for them to run basic analytics - averages, distribution of values, percentage nil etc - across all or a subset of the files. I've seen commercial data profilers do this kind of thing and I think I could knock up something fairly quickly using incanter. However, I can't help but feel it's a solved problem and I was wondering if anyone here knows of any github projects I could use to get me started? Many Thanks Adrian -- -- 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: Leiningen 2.3.0 and uberjar
I believe this is https://github.com/technomancy/leiningen/issues/1283. On Sat, Aug 10, 2013 at 3:54 PM, Zach Oakes zsoa...@gmail.com wrote: I experienced this as well; when I opened the resulting jar, I found source files rather than class files. Not sure what causes this. On Saturday, August 10, 2013 9:36:24 AM UTC-4, Christian Sperandio wrote: Hi, I've installed the last lein version. But when I do: $ lein new app jartest $ lein uberjar At this time, 2 jars are created. Then I call: $ java -jar target/jartest-0.1.0-SNAPSHOT-**standalone.jar And I get this error: Caused by: java.lang.**ClassNotFoundException: jartest.core at java.net.URLClassLoader$1.run(**URLClassLoader.java:202) at java.security.**AccessController.doPrivileged(**Native Method) at java.net.URLClassLoader.**findClass(URLClassLoader.java:**190) at java.lang.ClassLoader.**loadClass(ClassLoader.java:**306) at sun.misc.Launcher$**AppClassLoader.loadClass(**Launcher.java:301) at java.lang.ClassLoader.**loadClass(ClassLoader.java:**247) In the jartest/core.clj, the :gen-class option of ns is well defined and there's the main function. What did I miss? Thanks for your help. -- -- 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: Interest in a commercial IDE for Clojure?
Instead of doing a plugin and instead of starting something from scratch like Nightcode, would it make more sense to take some of the open source components of Intellij and use that as a basis for a Clojure-based IDE? It seems to me that one of the biggest problems with IDEs like Eclipse and Intellij as compared to Emacs is that there's so much more work involved in writing a plugins as opposed to writing 20 lines of Elisp code. If you could leverage some of the components of Intellij as a basis for a Clojure based IDE/Texteditor then you don't have to start from scratch, but since you're just leveraging Intellij libraries instead of writing plugins, you can develop it as a Clojure framework/IDE instead of the other way around. Thoughts? -- -- 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: Data Profiling
Doesn't exactly fit the bill, but for doing this type of stuff at the repl, we use babbage https://github.com/ReadyForZero/babbage. ignacio cto/co-founder ReadyForZero.com On Saturday, August 10, 2013 9:21:46 AM UTC-7, Adrian Mowat wrote: Hi, I have about 2.5 Gb of web transaction data (values submitted to forms etc) held as CSV files that my fairly non-technical users want to analyse. I want to make it easy for them to run basic analytics - averages, distribution of values, percentage nil etc - across all or a subset of the files. I've seen commercial data profilers do this kind of thing and I think I could knock up something fairly quickly using incanter. However, I can't help but feel it's a solved problem and I was wondering if anyone here knows of any github projects I could use to get me started? Many Thanks Adrian -- -- 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.