Re: [ANN] Envvar 1.1.0 — a library for handling environment variables

2014-08-14 Thread Constantine Vetoshev
On Thursday, August 14, 2014 6:46:56 AM UTC-7, James Reeves wrote: You can do this with Environ. Leiningen checks for a profiles.clj in your project directory, as well as then one in $HOME/.lein. If you add profiles.clj to your .gitignore file, you can use it for local overrides during

Re: [ANN] Envvar 1.1.0 — a library for handling environment variables

2014-08-14 Thread Constantine Vetoshev
On Thursday, August 14, 2014 2:53:30 AM UTC-7, Tony Tam wrote: It wasn't really clear to me from the README why use this instead of environ. Care to explain a little more in detail? I.e. give a concrete use case. Any particular reason for not supporting .lein-env files? Also, if a .env is

[ANN] Envvar 1.1.0 — a library for handling environment variables

2014-08-13 Thread Constantine Vetoshev
The JVM does not make using environment variables easy or convenient. The environ https://github.com/weavejester/environ library took a step in the right direction by abstracting away the distinction between environment variables and Java properties into a Clojure map data structure. However, I

[ANN] appengine-magic 0.4.6 released

2011-11-07 Thread Constantine Vetoshev
, Constantine Vetoshev -- 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

Re: Exception handling changes in Clojure 1.3.0

2011-10-09 Thread Constantine Vetoshev
I finally came up with a simple example which shows the broken exception handling behavior I described in my earlier post on this thread. (defn broken-catch [filename] (try (java.io.FileReader. filename) (catch java.io.FileNotFoundException fnfe FileNotFoundException caught)

Exception handling changes in Clojure 1.3.0

2011-10-03 Thread Constantine Vetoshev
I ran into an interesting problem while porting appengine-magic to Clojure 1.3.0. The Google App Engine SDK uses checked exceptions on many of its API methods. In many cases, I want to catch these exceptions and do something Clojure-friendly with them. With Clojure 1.2.x, I had no trouble

Re: Exception handling changes in Clojure 1.3.0

2011-10-03 Thread Constantine Vetoshev
On Oct 3, 12:27 pm, Stuart Halloway stuart.hallo...@gmail.com wrote: Catching checked exceptions seems to work fine. Try e.g. (try (throw (java.io.IOException.)) (catch java.io.IOException _ caught!)) I suspect something else is going wrong in the GAE example. Can you narrow the code down to

[ANN] appengine-magic 0.4.0: Clojure on Google App Engine

2011-03-27 Thread Constantine Vetoshev
/appengine-magic The library is available in Clojars. The README file fully documents the available API. Please note that this release includes several minor breaking changes; they are detailed in the HISTORY file. Comments, bug reports, questions, and patches welcome. Thanks, Constantine Vetoshev

Re: Help - .class files and GAE's too many files problem

2011-02-13 Thread Constantine Vetoshev
On Feb 10, 7:47 pm, Edgar Gonçalves edgar.goncal...@gmail.com wrote: So for future reference, if you come up with the same issue, the solution is to compile your gen'ed-classes and delete all the others from the war/WEB-INF directory, making sure you have a standalone jar along the remaining

Re: Library and development process for GAE

2011-01-09 Thread Constantine Vetoshev
On Jan 9, 10:54 am, Stefan Kamphausen ska2...@googlemail.com wrote: Given that decision I'd like to understand the general development process.   Does one always compile to a class (ns ...gen-class ..extends ..Servlet) and will the appengine development server pick up the changes, or will I

Re: Automatically unmapping unit tests from namespaces

2010-12-22 Thread Constantine Vetoshev
On Dec 21, 7:16 pm, Phil Hagelberg p...@hagelb.org wrote: If you're already using swank then you can try clojure-test-mode; it clears out all deftests in between test runs. https://github.com/technomancy/clojure-mode/blob/master/clojure-test-... It also highlights failures in the test buffer

Re: ANN: Dr. Evil - the evil web debugger

2010-11-30 Thread Constantine Vetoshev
On Nov 29, 2:25 pm, Miki miki.teb...@gmail.com wrote: Yeah, it uses load-string which IMO default to clojure.core namespace. I've tried some namespace hacking to allow the user to define the namespace, but couldn't make it work (there's a FIXME in the code about that). Currently I using

Re: ANN: Dr. Evil - the evil web debugger

2010-11-29 Thread Constantine Vetoshev
On Nov 22, 6:43 pm, Miki miki.teb...@gmail.com wrote: Dr.Evilis a simple web debugger that provides a REPL to your web application in a hidden location. This is pretty useful, thanks! I tried adding Dr. Evil into a test app, but I'm having trouble switching namespaces in the REPL: = *ns*

Re: appengine-magic 0.3.0: Clojure on Google App Engine

2010-11-24 Thread Constantine Vetoshev
On Nov 24, 6:41 am, Vesa Marttila vtmartt...@gmail.com wrote: I have a question about this release: I understood from this release announcement that entities can be saved from the REPL, but I was not able to do so and the official documentation still states that it can't be done, which is the

[ANN] appengine-magic 0.3.0: Clojure on Google App Engine

2010-11-23 Thread Constantine Vetoshev
in Clojars. The README file fully documents the available API. Comments, bug reports, questions, and patches welcome. Thanks, Constantine Vetoshev -- 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

Re: appengine-magic: using Clojure with Google App Engine

2010-10-06 Thread Constantine Vetoshev
On Oct 4, 10:52 pm, Glen Stampoultzis gst...@gmail.com wrote: On 21 September 2010 07:15, Constantine Vetoshev gepar...@gmail.com wrote: I'd like to announce the release of a working version of appengine- magic, a library designed to make it easier to get started with Google App Engine

VerifyError with symbol metadata, macros, and defrecord

2010-09-26 Thread Constantine Vetoshev
In Clojure 1.2, compiling the code below blows up with: error: java.lang.VerifyError: (class: t1/core/One, method: clinit signature: ()V) Incompatible argument to function (core.clj:11) Something about this problem causes damage to the running Clojure process. Once the exception happens,

Re: Making Clojure really work with Google App Engine

2010-09-20 Thread Constantine Vetoshev
On Sep 20, 9:17 am, Stefan Kamphausen ska2...@googlemail.com wrote: So it might be a good idea to avoid creating threads automatically or importing file/socket packages. I think you're right. Dependencies are always a double-edged sword, and in the case of App Engine, they are more toxic than

[ANN] appengine-magic: using Clojure with Google App Engine

2010-09-20 Thread Constantine Vetoshev
, as always. Constantine Vetoshev -- 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

Making Clojure really work with Google App Engine

2010-09-19 Thread Constantine Vetoshev
I recently spent some time trying to abstract away some of the incidental complexity of using Google App Engine with Clojure. Right now, setting up interactive development and understanding what to do requires reading several blog posts, and pasting in a lot of boilerplate code. I ended up making

Re: Extending Clojure's STM with external transactions

2010-09-07 Thread Constantine Vetoshev
On Sep 5, 8:56 pm, Alyssa Kwan alyssa.c.k...@gmail.com wrote: Any thoughts on how to marshal functions? What about vars and dynamic binding? I don't think marshaling closures will ever happen without changes to Clojure itself. I haven't looked into how much work it would require, or how much it

Re: Extending Clojure's STM with external transactions

2010-09-05 Thread Constantine Vetoshev
On Aug 30, 5:02 pm, nchubrich nchubr...@gmail.com wrote: Persistence libraries always end up warping the entire codebase; I've never succeeded in keeping them at bay.  Using data with Incanter is different from ClojureQL, which is different from just using contrib.sql, and all of it is

Re: My non-ELPA Emacs swank-clojure setup

2010-04-11 Thread Constantine Vetoshev
On Apr 8, 12:45 pm, Ævar Arnfjörð Bjarmason ava...@gmail.com wrote: If I have 10 Clojure projects I'm going to have 10 src/clojure.jar files. Do they really need to be there or could I just use the clojure that comes with my operating system (Debian)? When I hack Common Lisp I don't copy sbcl

Re: My non-ELPA Emacs swank-clojure setup

2010-04-11 Thread Constantine Vetoshev
This thread encouraged me to post what I did to make swank-clojure 1.1.0 work with the the latest SLIME. It does not use any of swank- clojure's automatic .jar downloading features (as of version 1.1.0). These instructions won't work on Windows, but may work if you have Cygwin. Note that this

Re: Clojure for financial applications

2010-03-09 Thread Constantine Vetoshev
On Mar 8, 11:50 am, Jonathan Shore jonathan.sh...@gmail.com wrote: How would I encapsulate this into a data structure to be passed into functions efficiently?    I could use a map of symbols to various structures, but that would be inefficient in access and memory.   I could bind into a

Re: Prepping clojure for packaging (was: Re: Clojure for system administration)

2010-02-06 Thread Constantine Vetoshev
On Feb 6, 1:06 pm, Peter Schuller peter.schul...@infidyne.com wrote: But the practical issue remains that if I want to write some software that I want sysadmins in various situations to want to use effortlessly (in my case, a backup tool), problems like these do get in the way of choosing

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-19 Thread Constantine Vetoshev
On Jan 18, 2:14 am, mac markus.gustavs...@gmail.com wrote: Updating stuff in the map became a little bit of a hassle so I made versions of assoc-in and update-in that work on dgraphs. Here they are in case anyone else is interested: (defn assoc-node   [dgraph m ks v]   (dgraph m (assoc-in

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-17 Thread Constantine Vetoshev
On Jan 17, 4:05 am, Albert Cardona sapri...@gmail.com wrote: The link gives a not found--did you push? I did, but then I moved the examples directory around to make everything more Leiningen-layout-friendly. Here is the updated link:

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-16 Thread Constantine Vetoshev
On Jan 16, 4:01 am, mac markus.gustavs...@gmail.com wrote: I am just now in a situation where I have to do some swing programming and this seems like it has great potential! Since it's already version 1.0 you should put it on Clojars so that it is easier to use from leiningen or maven etc.

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-15 Thread Constantine Vetoshev
On Jan 14, 7:29 pm, Timothy Pratley timothyprat...@gmail.com wrote: To give me a head-start, are there key differences with clojure.contrib.dataflow so I can better understand? Thank you for your interest. I have not extensively used c.c.dataflow, so I apologize if I misrepresent it, but here

Re: ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-15 Thread Constantine Vetoshev
On Jan 15, 5:59 am, Laurent PETIT laurent.pe...@gmail.com wrote: I would like to know, is there an essential reason for not having stored the dependency graph as a hidden property of the graph ? I'm not sure I understand your question. You can see the stored graph if you take the function

ANN: dgraph 1.0, a dependency graph library for Clojure

2010-01-14 Thread Constantine Vetoshev
helped reduce the pain significantly. The README file in the GitHub repository has some usage examples and ideas. Comments and bug reports welcome. Thanks, Constantine Vetoshev -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: Clojure + Redis

2009-12-31 Thread Constantine Vetoshev
On Dec 30, 10:40 am, Robert Campbell rrc...@gmail.com wrote: I think anything which lowers the impedance mismatch between Clojure data structures and a persistent store is worth investigating. I'd love to find an ACID, transactional store which accepts native structures. Have you looked at

Re: Clojure as a first programming language?

2009-12-01 Thread Constantine Vetoshev
On Dec 1, 12:38 am, Towle towle.m...@gmail.com wrote: So after shopping around thoroughly and picking up bits about on theoretical computer science and the history of programming languages, I decided to pick up a Lisp; I'm intrigued by the greater concept/idea behind the Lisp family of

Re: A macro for flexible keyword argument handling

2009-11-20 Thread Constantine Vetoshev
On Nov 20, 8:33 am, nchubrich nicholas.chubr...@gmail.com wrote: I guess this is getting to be a pretty epic macro!  I figured it was worth inviting boos and/or cheers and suggestions before setting out... Far be it from me to discourage making function invocation semantics more flexible! Just

Re: A macro for flexible keyword argument handling

2009-11-18 Thread Constantine Vetoshev
On Nov 17, 11:33 pm, nchubrich nicholas.chubr...@gmail.com wrote: can it be any more general or minimal than this? Seems to me that your suggestion effectively makes every positional argument optional. You did note that the scheme calls for supplied- predicates, but this pushes responsibility

Re: A macro for flexible keyword argument handling

2009-11-17 Thread Constantine Vetoshev
On Nov 16, 4:28 pm, Chouser chou...@gmail.com wrote: 'let' is also careful to always have the user provide the symbol being bound as a symbol.  That is you say {:keys [a b c]} not {:keys [:a :b :c]}.  What do you think of having let-kw take symbols instead of keywords for the names being

Re: SLIME REPL broken

2009-11-17 Thread Constantine Vetoshev
On Nov 17, 2:52 pm, David Nolen dnolen.li...@gmail.com wrote: Thanks for pursuing this so adamantly :) For a long time (more than a year) it was possible to use SLIME tip. It would be great for that to continue. You can still use SLIME; just avoid the slime-autodoc contrib. Use (slime-setup

Re: A macro for flexible keyword argument handling

2009-11-16 Thread Constantine Vetoshev
1. Looks like everyone prefers the let-kw name. Sounds good to me. 2. I tried it with the more let-like form, but I don't like the number of opening braces required. For a full kw-spec, the form would end up (let-kw [[[:kw default supplied?]] kw-args] ...). Clojure tends to err on the side of

A macro for flexible keyword argument handling

2009-11-15 Thread Constantine Vetoshev
:kw2 kw2}))] (inner :kw1 hello :kw2 world))) Credit where it's due: I lifted ideas and bits of code from defnk. Thanks, Meikel! Comments welcome. -- Constantine Vetoshev -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: A macro for flexible keyword argument handling

2009-11-15 Thread Constantine Vetoshev
Looks like Google Groups posting software forced line wraps at less than 80 columns, breaking the code. Lovely. Here's the fn-keywords macro reformatted for 72 column wrapping. (defmacro fn-keywords Adds flexible keyword handling to any form which has a parameter list: fn, defn, defmethod,

ANN: Cupboard, an embedded database library for Clojure

2009-10-15 Thread Constantine Vetoshev
familiarity with Berkeley DB will help, but is not required. All comments and bug reports welcome. Thanks, Constantine Vetoshev --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: Macros, namespaces, and lexical scope

2009-09-26 Thread Constantine Vetoshev
On Sep 26, 7:35 am, Meikel Brandmeyer m...@kotka.de wrote: The problem is, that you quote the symbol you inject into the inner defmacro. Hence it does not get resolved. The solution in this case seems to be to syntax-quote the symbol correctly before injection. Replace the two ~'~ with ~~ and

Macros, namespaces, and lexical scope

2009-09-25 Thread Constantine Vetoshev
(I asked these questions on #clojure, and the friendly locals suggested I open the question up for a wider audience.) I'm trying to write a macro-writing-macro. My code has a bunch of resources which have -open and -close type of calls, and they could all benefit from with- wrappers. The with-

Re: Macros, namespaces, and lexical scope

2009-09-25 Thread Constantine Vetoshev
On Sep 25, 6:02 pm, John Harrop jharrop...@gmail.com wrote: I don't think you can use things like defmacro in a let. This works: (let [y 10] (defmacro m1 [] `(list ~y))) (m1) = (10) --~--~-~--~~~---~--~~ You received this message because you are

Re: Schema for data structures

2009-09-24 Thread Constantine Vetoshev
On Sep 24, 10:59 am, Miron Brezuleanu mbr...@gmail.com wrote: Well, I only want to enforce duck-typing :-) - for instance, make sure via unit tests that a function that should return a data structure with certain properties always returns such a data structure. Not exactly what you asked for,

Re: Redefining Special Forms

2009-09-18 Thread Constantine Vetoshev
On Sep 17, 2:55 pm, Chouser chou...@gmail.com wrote: In a new thread, vars always start with their root binding. There's an ongoing discussion about the best way to provide other options when this is not the desired behavior: http://www.assembla.com/spaces/clojure/tickets/170-bound-fn-macro

Correct idiom for looping inside a catch or finally form?

2009-09-13 Thread Constantine Vetoshev
I have some code which opens a bunch of resources (say, files), and needs to make sure they all get closed. Something like this: (let [files (atom [])] (try (open-my-many-files files) ;; the files atom now refers to a vector of open file handles (do-dangerous-io @files) (finally

Re: Correct idiom for looping inside a catch or finally form?

2009-09-13 Thread Constantine Vetoshev
: you are using an atom as a temporary variable. please don't do that. (doseq [f files]   (with-open [of (open-file f)]     (do-dangerous-io of))) On Sun, Sep 13, 2009 at 1:05 PM, Constantine Vetoshev gepar...@gmail.com wrote: I have some code which opens a bunch of resources (say, files

Re: Correct idiom for looping inside a catch or finally form?

2009-09-13 Thread Constantine Vetoshev
On Sep 13, 11:18 pm, Richard Newman holyg...@gmail.com wrote: I think the OP's issue was that he has a sequence of things to close,   determined at runtime. with-open itself is no use there, because the   things to close must be known at compile-time. Exactly. He is correct that finally and

Inheriting Clojure special variables in child threads

2009-08-18 Thread Constantine Vetoshev
thread can alter a def'ed global variable for any other thread. If the thread starts in a binding*, it would, at worst, affect itself and its children. Seems useful. Any comments? Is this possible? How difficult would this be to implement? Best regards, Constantine Vetoshev