Re: How to log a precondition in clojure 1.3
As I understand it, pre and post conditions are there to support contracts-based programming. Violating a contract should be considered as bad as having a compile-time error. So, as I see it, no, they are not meant for basic validations, they are meant for strictly enforced rules. If your contracts are not met, your software is wrong. Exceptions are for writing code that is correct under exceptional circumstances. These are orthogonal concerns, hence the Error type. (This is just how I see it; I have no authority on the subject.) On Friday, December 7, 2012, Jason Bennett wrote: I hate to resurrect a dead thread, but I've been dealing with the same problem. Pre/postconditions throw an Error, not an exception, meaning you have to catch Throwable instead. This would violate most all good practice in Java/JVM programming. Are pre/postconditions just not designed for basic validation like nil handling, or should we consider Throwable to be the root of Clojure exceptions? jason On Wednesday, March 21, 2012 4:06:11 PM UTC-7, Sean Corfield wrote: On Wed, Mar 21, 2012 at 9:34 AM, ron peterson peterso...@gmail.com wrote: So I'd like to log the AssertionError using clojure.tools.logging library. For example if my function throws the following: #AssertionError java.lang.AssertionError: Assert failed: (= resource s) How do I redirect it to be printed in the console using the clojure.tools.logging library? Wrap the call in try/catch and log the exception in the catch. Exceptions are meant to bubble up to whatever can handle them. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ World Singles, LLC. -- http://worldsingles.com/ Perfection is the enemy of the good. -- Gustave Flaubert, French realist novelist (1821-1880) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.comjavascript:_e({}, 'cvml', 'clojure@googlegroups.com'); Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com javascript:_e({}, 'cvml', 'clojure%2bunsubscr...@googlegroups.com'); For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
[ANN] rotor 0.1.0
rotor is a basic rotating log file appender without dependencies, but designed for use with Timbre: More info example usage here: http://hg.postspectacular.com/rotor Ideas for future improvements: * re-using of file handles/streams instead of just using spit * custom backlog naming fns * automatic gzipping of backlogs Happy holidays everyone! K. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: abysmal multicore performance, especially on AMD processors
On Dec 21, 2012, at 6:59 PM, Meikel Brandmeyer wrote: Is there a much simpler way that I overlooked? I'm not sure it's simpler, but it's more straight-forward, I'd say. Thanks Marshall and Mikel on the struct-record conversion code. I'll definitely make a change along those lines. -Lee -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Differences between data.csv and clojure-csv
Examining the source code, you can see that * clojure.data.csv reads forward-only, so I suppose it might work with any Reader. * clojure-csv.core uses mark and reset, so it might not work with all Readers. clojure.data.csv makes the problem look simpler to solve, and its source code is about half the size of clojure-csv's. Meanwhile, clojure-csv deserves credit for mentioning the RFC. But they both use transient and persistent!. What's the world coming to? -- 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
Clojure 1.5.0 RC 1
I just kicked off the RC1 build for Clojure. With luck, within a few hours it will show up at Maven Central [1] Please test it. It would be fantastic if as many people as possible updated their projects and tested with the RC, so we can flush out issues now instead of in release. Regards, Stu [1] http://bit.ly/WEnjAi -- 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
reader literal , tagged literal
Are reader literals the same thing as tagged literals? (It appears that the Clojure 1.4 changes.md file refers to them as reader literals, but http://clojure.org/reader calls them tagged literals.) Thanks, ---John -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: How to structure a Clojure day for noobs?
Only one link: http://www.4clojure.com/ That's what we did a few month ago when we did an introduction to Clojure for our fellow co-workers. It worked well, to the point that it crashed www.4clojure.com :) But on Clojure IRC, Anthony Grimes (IORayne) was kind to reboot the server, it demonstrated in an unattended way the friendlyness of the Clojure community. On Sat, Dec 15, 2012 at 11:13 PM, ulsa ulrik.sandb...@gmail.com wrote: In a couple of months, I'll have a whole day of teaching Clojure to ten of my colleagues. They are experienced Java programmers, but otherwise Clojure rookies. Any tips on how to structure such a workshop day? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: reader literal , tagged literal
On Saturday, December 22, 2012 12:03:00 PM UTC-5, John Gabriele wrote: Are reader literals the same thing as tagged literals? While on the subject, I added the term tagged literal to the CDS glossary: https://github.com/clojuredocs/cds/blob/master/articles/language/glossary.md . Please let me know if it's incorrect or could be worded better. Thanks! ---John -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure 1.5.0 RC 1
Is the release note here: https://github.com/clojure/clojure/blob/master/changes.md ? Anyway it looks tasty: - New and Improved Features: Reducers - New threading macros: - cond- - cond- - as- - some- ... On Sat, Dec 22, 2012 at 5:09 PM, Stuart Halloway stuart.hallo...@gmail.comwrote: I just kicked off the RC1 build for Clojure. With luck, within a few hours it will show up at Maven Central [1] Please test it. It would be fantastic if as many people as possible updated their projects and tested with the RC, so we can flush out issues now instead of in release. Regards, Stu [1] http://bit.ly/WEnjAi -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Best way to include a passwords file in a project?
Il giorno mercoledì 19 dicembre 2012 22:40:18 UTC+1, Alex Baranosky ha scritto: I don't like the environment variable approach because of the dependency on global state makes deploying harder. I'd usually have a config file like config.clj whose contents were just a Clojure map. When loading the application I'd pass in the location of the config file as a parameter, and read-string the file at run-time. That said, it can sometimes be convenient for development to have some default config file location, so you don't always need to pass the config location in. This is a good idea, but I don't see how this approach is different from the environment variables one. You simply pass the configuration file path directly instead that through an environment variable. A generic application needs several configurations, and here we have two different approaches: a) Write them in a config.clj file and pass that file location when app is started b) Set some environment variables and let the app get by itself the parameters that it needs from it Both are valid approaches IMHO. Maybe (a) has the advantage that you can write sample config.clj file and pass them around, but other than that I don't see any difference on ease of deployment. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: reader literal , tagged literal
I'd say that tagged literal is the preferred term for expressions like #inst 2012. The term reader literal might perhaps refer to any literal (number, string, etc.) that doesn't need any further evaluation, although I think people use it loosely to mean the same thing as tagged literal. A data-reader would be the function assigned to read the tagged literal. See *data-readers* and default-data-readers. On Dec 22, 2012, at 12:03 PM, John Gabriele jmg3...@gmail.com wrote: Are reader literals the same thing as tagged literals? (It appears that the Clojure 1.4 changes.md file refers to them as reader literals, but http://clojure.org/reader calls them tagged literals.) Thanks, ---John -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Clojure 1.5.0 RC 1
Awesome stuff. I'm using those threading macros already. :) --- Joseph Smith j...@uwcreations.com @solussd On Dec 22, 2012, at 1:16 PM, Denis Labaye denis.lab...@gmail.com wrote: Is the release note here: https://github.com/clojure/clojure/blob/master/changes.md ? Anyway it looks tasty: New and Improved Features: Reducers New threading macros: cond- cond- as- some- ... On Sat, Dec 22, 2012 at 5:09 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: I just kicked off the RC1 build for Clojure. With luck, within a few hours it will show up at Maven Central [1] Please test it. It would be fantastic if as many people as possible updated their projects and tested with the RC, so we can flush out issues now instead of in release. Regards, Stu [1] http://bit.ly/WEnjAi -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
[ANN] Jida - Explore Clojure projects via hosted Codeq
Hey all, Wei and I put together Jida, a pastie-bin for running Codeq/Datomic queries on Clojure repos. To dive in, here's a query that shows all of the authors for a given imported clojure repo (domina, in this case): http://jida.herokuapp.com/?query-id=50ba637ae4b0d89fb0a4ae40 You can 3 do things: 1. Execute basic Codeq/Datomic queries againt imported git repos 2. Save and share your queries with a link 3. Import publicly-accessible clojure repos We thought it could be a great way for people to - Expermient with Codeq - Explore/share high-level stats about the Clojure code and community - Possibly drive visualization using C2? We're looking to you for ideas, feedback, and most importantly, pull-requests! - Site: http://jida.herokuapp.com/ - Code: https://github.com/yayitswei/jida - Wiki https://github.com/yayitswei/jida/wiki Note that Datomic is running on a very under-powered server, so Jida may go down from time to time. If you're interested in helping out with hosting, we would really appreciate it! Best, Sean -- 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
clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?
I was playing around with 1.5-RC1 and stumbled unto this behavior: https://www.refheap.com/paste/7817 Clojure lets me define a var which name contains a dot, but I can't dereference it by name (because it is seen as a classname with a method or field). Clojure shouldn't let me let define it in the first place I think? (I was trying to get a list of all vars added to clojure 1.5, the fact that I have used the value 2 in the refheap isn't the point). -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?
It looks like Clojure 1.4 does the same thing so it's probably been hiding for a while. The fully qualified var works. user= (def foo1. 2) #'user/foo1. user= foo1. CompilerException java.lang.ClassNotFoundException: foo1., compiling:(NO_SOURCE_PATH:0) user= user/foo1. 2 On Dec 22, 2012, at 3:34 PM, Borkdude michielbork...@gmail.com wrote: I was playing around with 1.5-RC1 and stumbled unto this behavior: https://www.refheap.com/paste/7817 Clojure lets me define a var which name contains a dot, but I can't dereference it by name (because it is seen as a classname with a method or field). Clojure shouldn't let me let define it in the first place I think? (I was trying to get a list of all vars added to clojure 1.5, the fact that I have used the value 2 in the refheap isn't the point). -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: Differences between data.csv and clojure-csv
Hi, Can you be a bit more explicit about your last remark ? Can't figure out the But... and the last sentence... Anything wrong in your mind about transient ? Or the way they are used in these libs ? Luc P. But they both use transient and persistent!. What's the world coming to? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -- Softaddictslprefonta...@softaddicts.ca sent by ibisMail 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
Re: reader literal , tagged literal
yes On Saturday, December 22, 2012 12:03:00 PM UTC-5, John Gabriele wrote: Are reader literals the same thing as tagged literals? (It appears that the Clojure 1.4 changes.md file refers to them as reader literals, but http://clojure.org/reader calls them tagged literals.) Thanks, ---John -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?
On Saturday, December 22, 2012 3:34:52 PM UTC-5, Borkdude wrote: Clojure lets me define a var which name contains a dot, but I can't dereference it by name (because it is seen as a classname with a method or field). Clojure shouldn't let me let define it in the first place I think? It all depends on that magical little word should. Clojure has generally not gone out of its way to prevent you from doing things even if they don't make a lot of sense. Symbols with dots in them are certainly valid (namespace identifiers being a common example). One could argue that this is an unhandled edge case in the Clojure reader. Maybe the Clojure reader should not automatically assume that symbols with dots in them are classes and instead try to resolve them as Vars first. -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
Re: clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?
2012/12/23 Stuart Sierra the.stuart.sie...@gmail.com On Saturday, December 22, 2012 3:34:52 PM UTC-5, Borkdude wrote: Clojure lets me define a var which name contains a dot, but I can't dereference it by name (because it is seen as a classname with a method or field). Clojure shouldn't let me let define it in the first place I think? It all depends on that magical little word should. Clojure has generally not gone out of its way to prevent you from doing things even if they don't make a lot of sense. Symbols with dots in them are certainly valid (namespace identifiers being a common example). One could argue that this is an unhandled edge case in the Clojure reader. Maybe the Clojure reader should not automatically assume that symbols with dots in them are classes and instead try to resolve them as Vars first. Actually it's clojure.lang.Compiler/maybeResolveIn responsable for that -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 post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en
Re: clojure defining a var with a dot in the name is accepted in clojure 1.5-RC1, but probably shouldn't?
Actually it's clojure.lang.Compiler/maybeResolveIn responsable for that Of course. I meant the compiler, not the reader. ;) -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