Re: Clojure at JavaOne

2009-05-19 Thread Shantanu Kumar
On May 18, 7:37 pm, verec wrote: > Whatever you chose, you probably ought to show its source with an IDE > (whichever you chose: NetBeans. Eclipse, IntelliJ) but should probably > forget about emacs: many (most?) Java developers won't even consider > anything that isn't at least partially integ

Approaching Clojure-Hibernate integration using hibernate.default_entity_mode = dynamic-map (Feedback Request)

2009-07-22 Thread Shantanu Kumar
Hi, (I am cross-posting this on Clojure and Hibernate-users mailing list.) DISCLAIMER: I am a Clojure newbie - please let me know if you find any of my assumptions / statements to be incorrect. Hibernate has an experimental support for working with maps rather than POJOs using the following co

Re: Approaching Clojure-Hibernate integration using hibernate.default_entity_mode = dynamic-map (Feedback Request)

2009-07-23 Thread Shantanu Kumar
I have an update since my last post. It is technically possible to completely bypass the HBM-XML files and do the mapping stuff programmatically, a route that I will likely take (XML generation does not fit well in the arrangement and should be avoided). Taking this route will bring the defmodel/h

Re: Java based DocDB

2009-07-27 Thread Shantanu Kumar
Can you take a look at MongoDB? It is written in C++ but you can connect to it using Java, and several other languages. http://www.mongodb.org/display/DOCS/Home Regards, Shantanu On Jul 27, 7:46 pm, Sean Devlin wrote: > Howdy everyone, > I've got a project that needs a Doc DB.  It will need to

Re: Approaching Clojure-Hibernate integration using hibernate.default_entity_mode = dynamic-map (Feedback Request)

2009-07-29 Thread Shantanu Kumar
ntioned here. > > Thanks, > Lico > > On Jul 23, 9:12 am, Shantanu Kumar wrote: > > > > > I have an update since my last post. It is technically possible to > > completely bypass the HBM-XML files and do the mapping stuff > > programmatically, a route that I wil

Re: Another Clojure Box - Version 1.4

2009-09-04 Thread Shantanu Kumar
Not sure if I am the only one - I was not able to make the copy-to- REPL and execute-block-of-code work using the keyboard shortcuts mentioned on the URL, nor using any other method. I am using Windows XP 32-bit with JDK 1.6.0_16. I look forward to somebody correcting me what I am doing wrong. :-

Re: Another Clojure Box - Version 1.4

2009-09-05 Thread Shantanu Kumar
I tried again following your checklist. My response is inline. > Be sure that: > - the REPL it's working fine (if it let you work normally then it's > fine). I am not sure if I have found the REPL in the ACB yet. Is it the WinCommand "Clojure 1.0" tab you are talking about? How do I setup ACB th

Re: Clojure in a big Java solution

2009-10-26 Thread Shantanu Kumar
You can probably settle for a set of Java data structures that are inter-operable with Clojure. 1. Use interfaces (because Clojure implements them too) such as java.util.List, java.util.Set, java.util.Map etc. 2. Use type hints and enable "warn on reflection". 3. When in Clojure, first convert to

Re: Clojure in a big Java solution

2009-10-29 Thread Shantanu Kumar
On Oct 29, 4:50 pm, vanallan wrote: > Ok thanks for the answer :) > > I have now began to implement the Java parts. The data that is going > to be processed in Clojure is mapped to clojure structs, but I now > have another question. How should I update the values in the structs? > Since function

Re: Clojure in a big Java solution

2009-10-29 Thread Shantanu Kumar
> 2. Go Functional -- pass objects and anonymous functions (Strategy and > Mediator patterns may help) I meant "anonymous objects that implement some interface or extend a class (Template pattern)", not "anonymous functions" really. :-) Regards, Shantanu --~--~-~--~~~

Re: leiningen - a Clojure build tool

2009-11-18 Thread Shantanu Kumar
Is any IDE support planned for this? As it turns out, many people (including me) stick with Ant just because the IDE support is fantastic. Regards, Shantanu On Nov 18, 12:29 pm, Phil Hagelberg wrote: > I'm pleased to announce the initial release of Leiningen. > > Leiningen is a build tool for Cl

Re: leiningen - a Clojure build tool

2009-11-18 Thread Shantanu Kumar
On Nov 18, 1:45 pm, ngocdaothanh wrote: > Which IDE and Ant plugin do you use? > > I think you can use "lein pom" to have an pom.xml file for use with > Maven. Hope that your fantastic IDE supports Maven. Earlier I used NetBeans but now I generally use Eclipse -- both of them support Ant nativel

Re: leiningen - a Clojure build tool

2009-11-18 Thread Shantanu Kumar
On Nov 19, 10:22 am, Phil Hagelberg wrote: > Shantanu Kumar writes: > > Is any IDE support planned for this? As it turns out, many people > > (including me) stick with Ant just because the IDE support is > > fantastic. > > I have no plans myself, but if writing

Maven2 repo URL required for Clojure 1.1 RC

2009-12-19 Thread Shantanu Kumar
Hi, Could anybody please give me a Clojure 1.1 Maven2 repo URL? It's not there on Maven central repo yet, and (surprise!) clojars.org doesn't seem to have it either. I am going to use the 1.1 RC JAR in my local repo until I find one. Regards, Shantanu -- You received this message because you a

Re: Clojure + Redis

2010-01-04 Thread Shantanu Kumar
On Jan 2, 5:12 am, Gabi wrote: > I am interested in the idea: Completely stateless set of Clojure nodes > (on many machines), operating on a central state stored in some > datastore. > If transactions could be managed somehow, I think it would be very > compelling model for many applications. D

Re: clojure-contrib 1.1.0 Release Candidate 2

2010-01-11 Thread Shantanu Kumar
A proper type Maven repo (whichever location, but with proper naming) for Clojure and Contrib would be great - consistent for projects that depend on Maven for dependencies and builds. Regards, Shantanu On Jan 11, 2:33 pm, Mark Derricutt wrote: > Stuart - are these RC builds available in any mav

Re: Creating an object given a class object

2010-01-12 Thread Shantanu Kumar
On Jan 12, 12:50 pm, Konrad Hinsen wrote: > On 11 Jan 2010, at 23:09, .Bill Smith wrote: > > > Every class object has a newInstance method: > > > user=> (Class/forName "java.util.HashMap") > > java.util.HashMap > > user=> (.newInstance (Class/forName "java.util.HashMap")) > > # > > user=> > > >

Re: Log4j not detected when using recent jars

2010-01-12 Thread Shantanu Kumar
This behaviour might occur due to an old Apache Commons-Logging JAR, several of which have had classpath / class-loading issues. Just a thought. Regards, Shantanu On Jan 12, 5:13 pm, Timothy Pratley wrote: > Hi, > > GOSUB raised this on IRC and I'm stumped as to the behavior, can > anyone help s

Re: Log4j not detected when using recent jars

2010-01-12 Thread Shantanu Kumar
On Jan 12, 10:52 pm, Baishampayan Ghose wrote: > On Tuesday 12 January 2010 07:30 PM, Shantanu Kumar wrote: > > > This behaviour might occur due to an old Apache Commons-Logging JAR, > > several of which have had classpath / class-loading issues. Just a > > thought. >

Re: Matt Raible: "Why is Clojure better than Scala or Groovy?"

2010-01-16 Thread Shantanu Kumar
On Jan 16, 6:22 am, Julian wrote: > Matt Raible - Spring Expert and Java consultant posted the following > entry to Twitter: > "Why is Clojure better than Scala or > Groovy?"http://twitter.com/mraible/status/7793457551 > > He went on to say: > "Let's try that again: I like Scala and Groovy and

Re: Clojure for largish web application?

2010-01-22 Thread Shantanu Kumar
On Jan 22, 11:09 am, cperkins wrote: > I've read that people have been able to use Clojure with some of the > Java web servers.  I am not familiar with any Java web servers or web > frameworks and wonder if anyone who knows more about them can advise > me. FWIW I'm also not familiar with load ba

Re: REST library

2010-02-17 Thread Shantanu Kumar
On Feb 17, 3:05 pm, Roman Roelofsen wrote: > Hi, > > does someone knows a good Clojure REST framework? It should help with > URL destructuring and maybe creating JSON return data etc. You can take a look at Taimen (in Alpha now) - http://code.google.com/p/bitumenframework/ Taimen doesn't do s

Clojars.org artifact upload issue - NullPointerException

2010-04-01 Thread Shantanu Kumar
Hi, I am trying to upload a JAR to Clojars.org but I am getting NullPointerException. Can somebody help me understand what's going on? The log is below: D:\projects\hgrepos\jettify\jettify-parent\jettify-java\target>scp pom.xml jettify-java-0.2.jar cloj...@clojars.org: Welcome to Clojars, kumarsh

Re: Clojars.org artifact upload issue - NullPointerException

2010-04-01 Thread Shantanu Kumar
On Apr 2, 4:37 am, "Alex Osborne" wrote: > Hi Shantanu, > > Shantanu Kumar writes: > >   jettify-java > >   jar > >   0.2 > >   jettify-java > >   http://code.google.com/p/bitumenframework/ > > You appear to not be specifying a groupId in

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread Shantanu Kumar
> or suggest me a nice rest framework  for clojure > > i really like jersey, i want to use it though? Jersey makes quite heavy use of annotations. Annotations are not supported in Clojure yet. You may like to take a look at Taimen for writing RESTful services: http://code.google.com/p/bitumenfram

Re: Jersey REST with Clojure is it possible?

2010-04-12 Thread Shantanu Kumar
t to port to Clojure. > > Thank you > > On Apr 12, 1:57 pm, Shantanu Kumar wrote: > > > > > > or suggest me a nice rest framework  for clojure > > > > i really like jersey, i want to use it though? > > > Jersey makes quite heavy use of annotations. A

Clojure job opportunity at Bangalore

2010-04-20 Thread Shantanu Kumar
Hi, Vipashyin Labs (at Marathalli, Bangalore) is looking for a fulltime Clojure developer. This is a long term contract position (1+ year) with attractive remuneration. The candidate should be well versed in Clojure, JVM, web development and REST. If interested, please contact at the email address

Re: Leiningen on CLR

2013-05-30 Thread Shantanu Kumar
On Thursday, 30 May 2013 19:27:34 UTC+5:30, Plinio Balduino wrote: > > Hi there > > I'm playing with Clojure CLR (good job, guys) and I miss something like > Leiningen. I quickly saw Kumar's lein-clr, but I don't know if it could be > used in a production environment (or explaining better, in a

ANN: Update to lein-localrepo, lein-servlet, lein-idefiles

2013-06-11 Thread Shantanu Kumar
Hi, I pushed new versions of three Leiningen plugins to Clojars recently: * lein-localrepo 0.5.0 This plugins lets one manage the local Maven/Leiningen repository. The 0.5.0 release fixes outstanding issues. * lein-servlet 0.3.0 This plugin lets the user work with servlet-based Clojure apps.

Re: ANN: Update to lein-localrepo, lein-servlet, lein-idefiles

2013-06-11 Thread Shantanu Kumar
Project URLs below. lein-localrepo: https://github.com/kumarshantanu/lein-localrepo lein-servlet: https://github.com/kumarshantanu/lein-servlet lein-idefiles: https://github.com/kumarshantanu/lein-idefiles Shantanu On Tuesday, 11 June 2013 18:42:08 UTC+5:30, Shantanu Kumar wrote: > &

Re: ANN: Update to lein-localrepo, lein-servlet, lein-idefiles

2013-06-11 Thread Shantanu Kumar
Project URLs below. lein-localrepo: https://github.com/kumarshantanu/lein-localrepo lein-servlet: https://github.com/kumarshantanu/lein-servlet lein-idefiles: https://github.com/kumarshantanu/lein-idefiles Shantanu On Tuesday, 11 June 2013 18:42:08 UTC+5:30, Shantanu Kumar wrote: > &

Re: Database migrations

2013-06-16 Thread Shantanu Kumar
On Friday, 14 June 2013 21:54:39 UTC+5:30, Reginald Choudari wrote: > > Hello all, > > I am trying to implement database migrations with Clojure. So far I have > been looking at Drift (https://github.com/macourtney/drift) as a > candidate for implementing this. My question is, does anyone have

Re: clojure interpreters?

2013-07-08 Thread Shantanu Kumar
An interpreter would be great! I attempted a different approach, which simply evaluates an S-expression with a user-specified environment (collection of maps), here: https://github.com/kumarshantanu/quiddity It works in Clojure and CLJS (I saw it works in ClojureCLR too but haven't managed to

Re: clojure interpreters?

2013-07-09 Thread Shantanu Kumar
On Tuesday, 9 July 2013 13:52:59 UTC+5:30, Mikera wrote: > > My post "The Environment as a Value" might be of interest to you. > > > https://groups.google.com/forum/#!searchin/clojure-dev/immutable$20environment/clojure-dev/S8BawG7nzJA/qfCd7hn67aoJ > > It contains a lot of similar ideas. An impor

Re: Possible to add dependency within leiningen plugin dynamically?

2013-07-11 Thread Shantanu Kumar
On Thursday, 11 July 2013 12:24:34 UTC+5:30, Chris Kuttruff wrote: > > Eg: > > I have a leiningen plugin I'm building that calls some jdbc stuff, but the > specific driver would be specified in the project that brings in my plugin > as a dependency. > Can you describe your use case with an ex

Re: Possible to add dependency within leiningen plugin dynamically?

2013-07-11 Thread Shantanu Kumar
On Friday, 12 July 2013 05:00:43 UTC+5:30, Chris Kuttruff wrote: > > Brilliant! worked perfectly for me... found the magic you were referring > to in load-deps ( > https://github.com/kumarshantanu/lein-servlet/blob/master/plugin/src/leiningen/servlet.clj#L35) > and the pomegranate/add-dependen

Re: easier way to write "not not"?

2013-07-16 Thread Shantanu Kumar
On Wednesday, 17 July 2013 11:42:10 UTC+5:30, JvJ wrote: > > Not that it's a big deal, but is there a standard library function for > #(not (not %))? Just say `boolean` maybe? Shantanu -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post

Re: {{ANN} clj-xmemcached release 0.2.3

2013-07-19 Thread Shantanu Kumar
Thanks for the release. Coincidentally, yesterday I wrote a command-line Kestrel client (a script) using clj-xmemcached 0.2.2, lein-exec and tools.cli - it works very well. Shantanu On Saturday, 20 July 2013 08:50:02 UTC+5:30, dennis wrote: > > An opensource memcached client for clojure,it wrap

Re: Can we please deprecate the :use directive ?

2013-07-23 Thread Shantanu Kumar
One of the main issues I have faced with :use is, understanding a non-trivial codebase becomes very difficult and almost always requires Emacs Meta-dot. I'd vote for deprecating :use. Shantanu -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To

Re: [ANN] Method-fn: augmented Java methods as functions

2013-08-10 Thread Shantanu Kumar
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+

Re: Should ` ` be trimmed using `clojure.string/trim`? EOM

2013-08-11 Thread Shantanu Kumar
On Monday, 12 August 2013 02:24:30 UTC+5:30, Tim Visher wrote: > > Should ` ` be trimmed using `clojure.string/trim`? EOM > ` ` is the representation of an HTML entity, which is technically not whitespace. I guess `trim` should not remove it. Shantanu -- -- You received this message becaus

Question on `cljx` and `lein-dalap`

2013-08-11 Thread Shantanu Kumar
Hi, I am thinking about how to use Cljx correctly in my projects (for portability); I have few questions: 1. I understand the Cljx plugin generates .clj and .cljs source code in target/classes destination. Does that mean, when I generate a JAR for distribution it again must be processed by Clj

Re: Question on `cljx` and `lein-dalap`

2013-08-12 Thread Shantanu Kumar
Thanks, Chas! Appreciate the detailed reply. Shantanu On Monday, 12 August 2013 21:26:31 UTC+5:30, Chas Emerick wrote: > > > On Aug 11, 2013, at 5:19 PM, Shantanu Kumar wrote: > > > Hi, > > > > I am thinking about how to use Cljx correctly in my projects (f

Re: Revisiting forward-chaining rules in Clojure

2013-08-18 Thread Shantanu Kumar
Thanks for posting. I will certainly explore this. Did you look at Mimir? https://github.com/hraberg/mimir Could you outline how is Clara's approach different from Mimir? Shantanu On Sunday, 18 August 2013 23:46:14 UTC+5:30, Ryan Brush wrote: > > Perhaps the best aspect of Clojure is how it can

Re: [ANN] Leiningen 2.3.2 released

2013-08-20 Thread Shantanu Kumar
ello everybody. > > > > I'm happy to announce the release of Leiningen 2.3.2, a minor bugfix > > release over 2.3.1. Changes include the following: > > > > * Write `.nrepl-port` file for better tool interoperability. (Phil > Hagelberg) > > * Support targ

Re: clojure.java.jdbc: suggestion to name mapping

2013-08-26 Thread Shantanu Kumar
Hi Alice, Do you mean default `values` for entity columns for INSERT statements? And by `identifiers function` did you mean functions that decorate an identifier representation in an SQL statement -- for example, column name emp_id could become `emp_id` on MySQL? Shantanu On Monday, 26 August

Re: Preferred way of binding jdbc connections

2013-08-28 Thread Shantanu Kumar
Hi Lyn, Dynamic vars for resource sharing is not a favored approach due to performance and several other reasons. This blog post explains it well: http://stuartsierra.com/2013/03/29/perils-of-dynamic-scope Shantanu On Thursday, 29 August 2013 07:21:46 UTC+5:30, Lyn Headley wrote: > > Hello, if

Re: [ANN] Cloc 0.1.0 - Leiningen plugin to serve project API docs through a local web server

2013-08-29 Thread Shantanu Kumar
Hi Jaley, This is pretty cool, thanks for sharing! The only nit I'd like to pick is, you may like to mention the version on README as 0.1.0 instead of 0.1.0-SNAPSHOT. Shantanu On Thursday, 29 August 2013 03:34:59 UTC+5:30, Jaley wrote: > > Hi! > > Cloc is a small web app to serve API documenta

Re: [ANN] expresso 0.1.0 released

2013-08-30 Thread Shantanu Kumar
> 2.) compiling optimized expressions to functions at runtime: > In clojure I managed to compile optimized expressions to optimized > code at runtime through a code-emitting protocol and a call to eval to > create the function. Without eval in clojurescript this couldn't be > done easily. Wit

Re: [ANN] expresso 0.1.0 released

2013-08-30 Thread Shantanu Kumar
Hi Maik, On Friday, 30 August 2013 15:04:03 UTC+5:30, Maik Schünemann wrote: > > Hi, > > > Not sure if it suits your needs, but I've been working on a simple > > S-expression evaluation library that works in Clojure and ClojureScript: > > https://github.com/kumarshantanu/quiddity > > > quiddi

Re: [ANN] core.typed 0.2.0 - Production Ready

2013-08-30 Thread Shantanu Kumar
Sorry for a late reply to the thread. This release is pretty cool. I haven't been following the development too closely, so I have two questions: 1. Is ClojureScript/ClojureCLR supported by core.typed? Or, is it planned? 2. Is there a Leiningen plugin that can help run the type checks from the

Re: "Clojure in the Large" style JDBC library

2013-09-06 Thread Shantanu Kumar
Hi Jason, Did you look at (URLs below) clojure/java.jdbc and HoneySQL? I'd be interested to know if you are looking for anything different from these: http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html https://github.com/clojure/java.jdbc/ https://github.com/jkk/honeysql Shantanu

Re: clojure.java.jdbc connection pool example

2013-09-13 Thread Shantanu Kumar
Hi Josh, On Friday, 13 September 2013 15:52:47 UTC+5:30, Josh Kamau wrote: > > Hello there ; > > I am in desparate need of a clojure.jdbc with a connection pool example. > You can see an example here that uses Apache DBCP (please excuse the plug): https://github.com/kumarshantanu/clj-dbcp There

Re: which are the pros and cons between stuartsierra/component and prismatic/graph?

2015-02-04 Thread Shantanu Kumar
On Wednesday, 4 February 2015 18:26:43 UTC+5:30, Lucas Bradstreet wrote: > > Component is more for managing state, whereas graph is for structuring > computation. All I can really tell you is that after using component I am > never going back (at least in Clojure). > With Prismatic graph you c

Re: which are the pros and cons between stuartsierra/component and prismatic/graph?

2015-02-04 Thread Shantanu Kumar
one dependency-graph per profile (i.e. prod, each test suite etc.) though the test profiles (where one wants mock impl) may require much smaller graphs depending on the scope. Shantanu > > Timothy > > On Wed, Feb 4, 2015 at 6:42 AM, Shantanu Kumar > wrote: > >> >

Re: Name of a function

2015-02-14 Thread Shantanu Kumar
See if you can put this to any use (implies no warranty) - applicable to the JVM only: (defmacro whereami [] `(try (throw (Exception.)) (catch Exception e# ;; (.printStackTrace e#) ; uncomment this line to inspect stack trace (let [ste# (aget (.getStackTrace e#) 0

Re: Name of a function

2015-02-14 Thread Shantanu Kumar
You can probably omit try and throw to achieve the same effect. (let [ste# (aget (.getStackTrace (Exception.)))] ..) Shantanu On Sunday, 15 February 2015 00:58:28 UTC+5:30, Shantanu Kumar wrote: > > See if you can put this to any use (implies no warranty) - applicable to > the

Re: Why no h2 1.4.176

2015-02-25 Thread Shantanu Kumar
This has nothing to do with Leiningen, I think. The H2 artifacts are here: http://mvnrepository.com/artifact/com.h2database/h2 You can only use the artifacts that are available, which doesn't include 1.4.176 on Maven Central. Shantanu On Wednesday, 25 February 2015 14:27:51 UTC+5:30, Cecil West

Re: Why no h2 1.4.176

2015-02-25 Thread Shantanu Kumar
On Wednesday, 25 February 2015 15:11:14 UTC+5:30, Cecil Westerhof wrote: > > 2015-02-25 10:10 GMT+01:00 Shantanu Kumar >: > >> This has nothing to do with Leiningen, I think. The H2 artifacts are here: >> http://mvnrepository.com/artifact/com.h2database/h2 >> >

Re: Idiomatic access to collaborators/services

2015-02-25 Thread Shantanu Kumar
Having tried few other ways earlier, I now prefer the `first` approach you described. Protocols decouple the contract and the implementation very well, and can be reified for various profiles (unit tests, scenario tests, integration etc.) For constructing the graph I have found Prismatic graph

contains? on String

2015-05-12 Thread Shantanu Kumar
Hi, I notice the following in Clojure 1.7.0-beta2: user=> (contains? "hello" 2) true user=> (contains? "hello" \e) IllegalArgumentException contains? not supported on type: java.lang.String clojure.lang.RT.contains (RT.java:800) Is this just a case of misleading error message or am I missing

Re: contains? on String

2015-05-12 Thread Shantanu Kumar
ontains? "a" \a) => error > (contains? '(:a) :a) => error > > - James > > On 12 May 2015 at 19:25, Shantanu Kumar > wrote: > >> Hi, >> >> I notice the following in Clojure 1.7.0-beta2: >> >> user=> (contains? "

Re: Advice when running java -jar rather than a managed server like tomcat?

2015-05-26 Thread Shantanu Kumar
I'm doing some of those things at work (http-kit, logback+slf4j+MDC+clojure.tools.logging, config via property files). My entry point (main) is a Java class that reads properties file, sets system properties to hoist logging config variables, then uses reflection to load other Java/Clojure init

Re: How to use a java web service project in clojure?

2015-05-27 Thread Shantanu Kumar
You should probably include the right dependencies in project.clj, e.g. :dependencies [[javax.ws.rs/jsr311-api "1.1.1"]] You might actually need an implementation, e.g. Apache-CXF, or RestEasy etc. as dependency but I am not sure. Shantanu On Wednesday, 27 May 2015 16:28:54 UTC+5:30, Peng Lin

Re: How to use a java web service project in clojure?

2015-05-27 Thread Shantanu Kumar
eared. But there is a lot of jars i used (in the WEB-INF/lib), how to > add all these jars once and ever? > > i found jvm-opts -Djava.library.path, but i don't know how to use it > > 在 2015年5月27日星期三 UTC+8下午9:01:15,Shantanu Kumar写道: >> >> You should probably

Re: awful performance on Windows 7 compared to anything else

2015-07-03 Thread Shantanu Kumar
Hi Colin, If you know that the delay is happening in the server-side Clojure code, maybe you can give https://github.com/kumarshantanu/espejito a try to determine where in the call stack is the latency happening? Shantanu On Friday, 3 July 2015 22:20:23 UTC+5:30, Colin Yates wrote: > > Hi all,

Re: http-kit and context root?

2015-07-07 Thread Shantanu Kumar
I think what you need on the http-kit side is a context "stripper" middleware, because http-kit would receive a URI like /server1/foo/bar that needs to be stripped down to /foo/bar to match your app routes. (defn strip-middleware [handler ^String prefix] (let [plen (count prefix)] (fn [r

Re: What is the best way to pass log configs everywhere without a global var?

2015-07-25 Thread Shantanu Kumar
Logging calls are far too frequent to practically pass config as argument everywhere, hence some kind of shared implicit context is required. Which logging libraries are you dealing with? If you use Timbre[1], you can pass config using dynamic vars or altering global state. If you use Logback[2]

Re: [Request for Feedback] Clojure Lab: IDE for Clojure in Clojure

2014-06-27 Thread Shantanu Kumar
Downloaded and tried. It's very neat! Thanks for sharing. Shantanu On Friday, 27 June 2014 20:30:37 UTC+5:30, juan.facorro wrote: > > Hello Clojurians! > > I wanted to share with you a project called *Clojure Lab*, an *IDE for > Clojure in Clojure*. > > *https://github.com/jfacorro/clojure-lab

Re: Leiningen resource-paths

2014-07-25 Thread Shantanu Kumar
> > > For our project we have decided to depend on Maven and require user to > install Maven and execute these several commands to add jars to the local > repository. > You could probably have a script that uses lein-localrepo (to install all dependencies in one go) if you don't want to instal

Re: running a jar-based cli tool

2014-08-13 Thread Shantanu Kumar
On Thursday, 14 August 2014 02:23:50 UTC+5:30, Brian Craft wrote: > > I need to run a tool while building docs which is distributed as a jar > file, and is run with "java -jar". Not sure the best way to do this. lein > can fetch the jar if I add it to dev dependencies, but then it's in some >

Re: running a jar-based cli tool

2014-08-13 Thread Shantanu Kumar
On Thursday, 14 August 2014 03:25:48 UTC+5:30, Brian Craft wrote: > > Thanks! This works perfectly. > > It took a few tries to find the right incantation, but this seems to do: > > (defn -main [& args] > (Main/main (into-array String args))) > > I note that the .clj file for this namespace ends

Re: How do I track down a painfully long pause in a small web app?

2014-09-14 Thread Shantanu Kumar
Few thing to consider: 1. Which API calls pause? If only certain calls pause, then probably you have something specific to suspect. Try adding a dummy REST call - see if that call pauses while others do. 2. Is any of your services running on a t1.micro or a burst-oriented EC2 instance on AWS? Tr

Re: [ANN] rete4frames, v. 5.2.0 - CLIPS-like expert system shell

2014-10-12 Thread Shantanu Kumar
Hi Ru, Congrat's on the release. I wonder why did you choose to release the new version as "5.2.0-SNAPSHOT" instead of "5.2.0". Shantanu On Saturday, 11 October 2014 22:29:43 UTC+5:30, ru wrote: > > Hello all, > > New version 5.2.0 of rete4frames CLIPS-like expert system shell published > on

Re: [ANN] rete4frames, v. 5.2.0 - CLIPS-like expert system shell

2014-10-13 Thread Shantanu Kumar
OK, I understand now - will report bugs if I find any, am at a newbie level now. I was confused whether it's an Alpha release, because the subject didn't mention that. Shantanu On Monday, 13 October 2014 17:46:30 UTC+5:30, ru wrote: > > Hi Shantanu, > > 1. I am waiting for bug reports from you,

Re: Clojure CLR Experiences

2014-11-11 Thread Shantanu Kumar
Not sure why you say that 1.4 is the current version. ClojureCLR releases are here: https://www.nuget.org/packages/Clojure - as of today 1.6.0.1 is the current stable version. Leiningen plugin is here: https://github.com/kumarshantanu/lein-clr Shantanu On Tuesday, 11 November 2014 21:08:58 UTC

Re: lein uberjar not creating class files with :aot

2015-01-04 Thread Shantanu Kumar
I have run into this (using lein 2.5.0 and 2.4.1) as well. `lein uberjar` seems to wipe out the pre-generated classes when creating an uberjar. Shantanu On Sunday, 4 January 2015 01:09:30 UTC+5:30, Shoeb Bhinderwala wrote: > > When I create a uberjar with aot compilation I am surprised to see ".

Re: [ANN] Clojure 1.9.0-alpha5

2016-06-07 Thread Shantanu Kumar
On Wednesday, 8 June 2016 00:31:41 UTC+5:30, Alex Miller wrote: > > I'm not opposed to it but can't say that's anywhere on my priority list. > Does anyone use incubator? > Just to add a data point, I use incubator at work for `dissoc-in`. Shantanu > > > On Tuesday, June 7, 2016 at 1:21:34 P

Re: why is it so annoying to run clojure code

2016-06-09 Thread Shantanu Kumar
Consider http://inlein.org/ or https://github.com/kumarshantanu/lein-exec HTH Shantanu On Thursday, 9 June 2016 21:38:39 UTC+5:30, Jiacai Liu wrote: > > I started learning clojure recently, and I am annoyed at the way to run > it (aka. lein run). why clojure script can't be run like python,rub

Re: Protocols for persistence - not sure about a few cases

2016-08-28 Thread Shantanu Kumar
Considering the regular use-cases with records: Create - requires record without any auto-generated identifiers Retrieve - requires primary identifier or lookup parameters Update - requires record with primary identifier and updated fields Delete - requires primary identifier or lookup parameters

Re: clojure.spec - Using :pre conditions (or not)?

2016-09-15 Thread Shantanu Kumar
Hi Joakim, You might be interested in Paul Stadig's library https://github.com/pjstadig/assertions that leverages Java's `-ea` (enable-assertions, which you may want to keep enabled in dev) command-line flag. If you have a bunch of things together to assert, you may want to use the `when-asser

Re: Good way of handling metric gathering?

2016-11-11 Thread Shantanu Kumar
Hi Tianxiang, In my experience a good way to decouple a non-trivial fn with metrics is to make the fn provide hooks for various events when metrics may be gathered. (defn nop [& args]) (defn foo->bar [foo {:keys [on-foo on-bar] :or {on-foo nop on-bar nop} :as options}] (on-foo) (let [bar (

Re: Why does "clojure.core/run!" end in an exclamation mark?

2016-12-24 Thread Shantanu Kumar
I'm curious about `clojure.core/run!` too, but my question is whether it is meant to be a `reduce` variant of `clojure.core/doseq` or it has some other purpose. Shantanu On Saturday, 24 December 2016 21:37:11 UTC+5:30, James Reeves wrote: > > My understanding is that the convention used in cloj

Compiling a library with direct-linking

2017-03-09 Thread Shantanu Kumar
Hi, As per Clojure 1.8 release info [1][2] "As of Clojure 1.8, the Clojure core library itself is compiled with direct linking." I want to know whether it is possible to compile a 3rd-party Clojure library with direct-linking - does it require AOT compilation? I know about the `-Dclojure.compi

Predicates for atom/ref/agent

2017-07-16 Thread Shantanu Kumar
Hi, Since Clojure 1.7 there's a `volatile?` predicate function, but no such equivalent for atom/ref/agent. Can anybody explain the rationale behind the difference? I found an old thread on a related topic (URL below) but would like to know if there's an updated explanation. https://groups.googl

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread Shantanu Kumar
> > > > I'm curious what others do for logging? > At Concur we using Cambium https://github.com/kumarshantanu/cambium that's being moved (WIP) here: https://github.com/cambium-clojure Cambium wraps SLF4j and gives a Clojure API (which extends tools.logging) to use it's MDC feature. Shantanu

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Shantanu Kumar
On Monday, 9 October 2017 12:31:57 UTC+5:30, lawrence...@gmail.com wrote: > > Kumar, > > Just so you know, on this page: > > https://github.com/cambium-clojure/cambium.logback.core > > you link to here: > > https://cambium-clojure.github.io/ > > but I get a 404 when I go there. > I'm sorry the

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread Shantanu Kumar
On Monday, 9 October 2017 12:34:41 UTC+5:30, lawrence...@gmail.com wrote: > > Shantanu Kumar, thanks for that, I might try it. I assume you've never had > the problem I'm talking about, of messages on background threads that > disappear? > Logback (the SLF4j impl we u

Re: Don't Laugh - How to Get the Name of an Anonymous Function

2017-10-23 Thread Shantanu Kumar
Not sure whether you can deterministically recover the exact name at all times, but the following can get you started: (re-matches #".*\$(.*)__.*" (.getName (class (fn cool-func! [] (println "hi") I have altered the name to `cool-func!` on purpose to show where it may break. Shantanu On

Re: [ANN] Clojure 1.9.0-RC1

2017-11-13 Thread Shantanu Kumar
The coercion (byte \a) works fine in Clojure 1.8, but it fails with `ClassCastException java.lang.Character cannot be cast to java.lang.Number` in 1.9.0-RC1. Is this by design? Shantanu On Monday, 13 November 2017 07:32:00 UTC+5:30, Alex Miller wrote: > > Hi David, > > Clojure 1.9 now depends

Re: [ANN] Clojure 1.9.0-RC1

2017-11-13 Thread Shantanu Kumar
a) > 97 > > On Mon, Nov 13, 2017 at 1:09 PM, Shantanu Kumar > wrote: > >> The coercion (byte \a) works fine in Clojure 1.8, but it fails with >> `ClassCastException java.lang.Character cannot be cast to java.lang.Number` >> in 1.9.0-RC1. Is this by design? &g

Re: [ANN] Clojure 1.9.0-RC1

2017-11-13 Thread Shantanu Kumar
e same behavior in Clojure 1.7.0 and 1.8.0 as you see in 1.9.0-RC1. > > Andy > > On Mon, Nov 13, 2017 at 9:48 PM, Shantanu Kumar > wrote: > >> Sorry, I did not specify the problem completely earlier. The coercion >> fails only when *uncheked-math* is set to truthy in 1.9

[ANN] Cambium - Structured logging for Clojure

2017-11-30 Thread Shantanu Kumar
Hi, I am happy to announce the availability of Cambium, an Open Source project for structured logging in Clojure using SLF4j and Logback. Details: https://cambium-clojure.github.io/ Repos: https://github.com/cambium-clojure *Highlights:* - Evolved through two years of production use at Concur f

Re: [ANN] Cambium - Structured logging for Clojure

2017-12-01 Thread Shantanu Kumar
On Friday, 1 December 2017 18:18:36 UTC+5:30, oleksand...@zalando.de wrote: > > On Thursday, November 30, 2017 at 3:35:24 PM UTC+1, Shantanu Kumar wrote: >> >> >> I am happy to announce the availability of Cambium, an Open Source >> project for structured logg

ANN: Cambium 0.9.2 (Structured logging for Clojure)

2018-03-22 Thread Shantanu Kumar
Hi, I am happy to announce the availability of Cambium 0.9.2 - Cambium is a structured logging library for Clojure, compatible based on SLF4J/Logback and clojure/tools.logging libraries. https://cambium-clojure.github.io/ The release changelog for various modules[1] are in their respective re

ANN: Promenade - Elegant handling of errors and other oddities (Clojure/ClojureScript)

2018-04-16 Thread Shantanu Kumar
Hi, I am pleased to announce Promenade - a Clojure/ClojureScript library to elegantly handle errors and other oddities: Project: https://github.com/kumarshantanu/promenade Docs: https://github.com/kumarshantanu/promenade/blob/master/doc/intro.md Promenade helps one express odd conditions (such

ANN: DIME - Dependency Injection for Clojure

2018-05-07 Thread Shantanu Kumar
Hi, I am happy to announce DIME - a "Dependency Injection" library for Clojure: Project: https://github.com/kumarshantanu/dime Docs: https://github.com/kumarshantanu/dime/blob/master/doc/intro.md Blog post: https://medium.com/@kumarshantanu/dependency-injection-with-clojure-using-dime-af57b14

Re: Protocols considered harmful?

2018-05-22 Thread Shantanu Kumar
Hi Sam, In my experience, protocols are a great mechanism for extensibility. Let's say you build an abstraction with a default implementation. If your abstraction is based on protocols, somebody can extend the abstraction to build a different implementation (that possibly integrates with anothe

ANN: Promenade 0.6.0 - Elegant error handling and more for Clojure/CLJS

2018-08-02 Thread Shantanu Kumar
Hi, Promenade is a Clojure/ClojureScript library to elegantly handle errors and other oddities. The 0.6.0 release adds support for (1) wrapping functions that throw exceptions, and (2) early termination in reducing functions. URL: https://github.com/kumarshantanu/promenade Docs: https://github

[ANN] Promenade 0.7.0 - Elegant error handling and control flow

2018-10-30 Thread Shantanu Kumar
Hi, I'm happy to release version 0.7.0 of the Promenade library. This release switches expression sequencing to use clojure.core/reduce, hence adding early termination support. Please see changelog for the list of changes. Project website: https://github.com/kumarshantanu/promenade Changelog:

  1   2   3   4   5   6   >