Re: clojure-jack-in problem with a project using clj and cljs files.

2013-01-20 Thread mmwaikar
For everyone's benefit - I installed nrepl and used nrepl-jack-in which works fine (with the same project structure). Manoj. On Friday, January 18, 2013 4:54:41 PM UTC+5:30, mmwaikar wrote: Hi, I have a project which uses both Clojure and Clojurescript. Hence in its project.clj file, I

clojure-jack-in problem with a project using clj and cljs files.

2013-01-18 Thread mmwaikar
Hi, I have a project which uses both Clojure and Clojurescript. Hence in its project.clj file, I have - :source-paths [src/clj] and for Clojurescript - {:builds [{;; CLJS source code path :source-path src/cljs ;; Google Closure (CLS) options

How to call a Java method that expects a .class parameter.

2013-01-05 Thread mmwaikar
Hi, I can't figure out a way to call the below method using Clojure - Files.readAttributes(file, BasicFileAttributes.class) because I don't know what to pass for the second parameter BasicFileAttributes.class. Also when I am calling the other method of the same class - (Files/getAttribute

A Clojurescript Domina question.

2012-10-02 Thread mmwaikar
Hi, I am trying to do something with Clojurescript using Domina etc. Here is my project.clj - (defproject maze 0.1.0-SNAPSHOT :description FIXME: write description :url http://example.com/FIXME; :license {:name Eclipse Public License :url

A clojurescript newbie q.

2012-08-12 Thread mmwaikar
Hi, I am experimenting with clojurescript, and have the following page - (ns maze.views.mm (:use [noir.core :only [defpartial]] [hiccup.page :only [html5 include-js]] [hiccup.element :only [javascript-tag]] [maze.views.cssgenerator] [maze.constants])) (defn

Re: Clojurians in Pune

2012-07-19 Thread mmwaikar
A +10 from me. Would definitely attend any such event. Maybe, we can try fixing bugs in any of the open source Clojure libraries. Thanks, Manoj. On Tuesday, July 17, 2012 3:45:39 PM UTC+5:30, Murtaza Husain wrote: Hi, Anyone interested in organizing a clojure dojo in Pune ? Thanks,

Re: Libraries for ClojureScript.

2012-01-18 Thread mmwaikar
Thanks for your responses Creighton and Kevin. D3 looks cool, so should cljs-3D be, ditto for Enlive / Enfocus. All the best for your efforts, Manoj. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Libraries for ClojureScript.

2012-01-14 Thread mmwaikar
Hi, My question is about design of libraries for ClojureScript. So for ex, there is clojure.test which has some public API. Now assume one has used it and is comfortable with its API. Now he has to write some ClojureScript code and wants to write some unit tests as well. Obviously, he'll use

Re: ClojureScriptOne HelloWorld problem

2012-01-13 Thread mmwaikar
Right. I had several tabs open, and I was reading the Clojure One tutorial and the same thing happened. Then I switched to the tab with the Development page and then when I ran alert, I saw it there and it returns. -- You received this message because you are subscribed to the Google Groups

Re: [ANN] ClojureScript One - Getting Started with ClojureScript

2012-01-12 Thread mmwaikar
Heart felt thanks to everyone who contributed to this. I hope to catch up with my lack of JS skills through ClojureScript :) Everything about ClojureScript is exciting stuff. Cheers, Manoj. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Idiomatic way to include doc-string for multimethods.

2011-12-04 Thread mmwaikar
Hi, I've seen this particular discussion - https://groups.google.com/d/topic/clojure/Ia9uBDGuLmM/discussion I am talking specifically about multimethods here. So if you do - (defmulti my-method some doc string identity) then this particular doc-string is not visible in emacs (like in an

Re: The Clojure way to solve this problem?

2011-12-01 Thread mmwaikar
Thanks BG. I wasn't aware of the with-redefs. Then Gaz's way is cool. -- 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

Re: The Clojure way to solve this problem?

2011-11-30 Thread mmwaikar
I think you should look at the binding function - http://clojuredocs.org/clojure_core/clojure.core/binding In my tests, I am using this to run the same tests using two different functions, which are supposed to do the same thing (using two different methods, internally). In your case though,

Re: Rich Hickey: Simple Made Easy from Strange Loop 2011

2011-10-20 Thread mmwaikar
I can understand your situation because I've seen a C# code where most of the classes in some 5-6 different assemblies had all (or 90%) static methods :) -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Clojure jar files.

2011-10-20 Thread mmwaikar
Clojure.jar does not have a project.clj file because it is all java code, right? If it is all java code then it's a (java) jar file. I found this convention of bundling a clojure jar file with a project.clj file - lein does this and that's all I know - so I was curious to know if every other

Re: Finding a function's expected argument list length

2011-10-20 Thread mmwaikar
In a REPL, user (defn hello [name] (println hi, name)) #'user/hello user (meta (var hello)) {:ns #Namespace user, :name hello, :file NO_SOURCE_FILE, :line 1, :arglists ([name])} Please also check - http://clojuredocs.org/clojure_core/clojure.core/meta -- You received this message

Re: About metadat and #^ macro.

2011-10-20 Thread mmwaikar
Thanks everyone for your inputs and the discussion. Manoj. -- 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

A problem with using enumeration-seq with java.util.jar.JarFile.

2011-10-19 Thread mmwaikar
Hi, I want to read the contents of one of the files in a jar file. Here's the documentation - http://download.oracle.com/javase/6/docs/api/java/util/jar/JarFile.html Now, the doc. of entries method specifies it returns an EnumerationJarEntry, whereas - (map #(class %) (enumeration-seq

Re: A problem with using enumeration-seq with java.util.jar.JarFile.

2011-10-19 Thread mmwaikar
But then why does this fail - (slurp (.getInputStream (first (enumeration-seq (.entries f) with - No matching field found: getInputStream for class java.util.jar.JarFile$JarFileEntry. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to

Re: A problem with using enumeration-seq with java.util.jar.JarFile.

2011-10-19 Thread mmwaikar
Oops. Sorry, my bad. I am not using the JarFile object for the call. -- 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

About metadat and #^ macro.

2011-10-19 Thread mmwaikar
Hi, I read in Clojure in Action book by Amit Rathore, that #^ associates metadata for the next form. He also mentions that it is deprecated. So what is the current way of doing it? Also, in code like this - (defn filenames-in-jar Returns a sequence of Strings naming the non-directory entries

Clojure jar files.

2011-10-19 Thread mmwaikar
Hi, Is it mandatory that a clojure jar file, no matter packaged using whichever tool (other than leiningen, for ex.), should have a project.clj file? Thanks, Manoj. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

A question about lazy-seq fn.

2011-10-13 Thread mmwaikar
Hi, Most of the examples I see about using the lazy-seq fn. make use of cons to build the list (or a seq). Can we not use lazy-seq with a conj? And why? If it possible to use lazy-seq with a conj, then an example would be great. Thanks, Manoj. -- You received this message because you are

Re: The Website / Wikispaces

2011-10-11 Thread mmwaikar
It has happened to me too a couple of times (I can't explain why, though). However, I've done *pin as app tab* for the clojure docs tab (this functionality is available in latest versions of Firefox), so even if I reopen FF, I don't get this problem often. -- You received this message because

Re: Re: clojure and emacs

2011-09-06 Thread mmwaikar
I too used to do lein swank from the cmd prompt and then used to load emacs and then used to M-x slime-connect. However I've come to know three modes in emacs - multi-term, shell and eshell mode (which is like a command prompt in emacs), so you can do M-x multi-term, M-x shell or M-x eshell.

Problem in downloading StringTemplate using lein deps.

2011-08-22 Thread mmwaikar
Hi, There is no jar available for StringTemplate in clojars. But StringTemplate v3.2 jar is available in Maven. So I included the necessary entry for StringTemplate in project.clj and tried downloading using lein deps. It gives me the below error - Downloading:

Re: How to read project.clj file.

2011-08-10 Thread mmwaikar
Thanks Shantanu and Daniel. I am trying to merge some functionality from two different projects, so the credentials could be stored in properties file or the project.clj file. And mine is not a leiningen plugin so I parsed the project.clj file. -- You received this message because you are

How to read project.clj file.

2011-08-09 Thread mmwaikar
Hi, Assuming there are some DB credentials specified in a project.clj file as a map, how should I read those credentials in my clojure code - 1) should I use slurp and then parse that text? 2) should I (use 'leiningen.core) and then (load-file project.clj) 3) or something else Please let me

Re: Calling clojure from java.

2011-07-28 Thread mmwaikar
Thanks again Meikel. Where can I read about things like bindRoot, intern or to be precise java-clojure interop? -- 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

Re: Aw: Calling clojure from java.

2011-07-26 Thread mmwaikar
Thanks Meikel, I tried the below stuff - package com.codionics.flyway; import clojure.lang.RT; import clojure.lang.Var; public class wrapper { static final Var symbol = RT.var(clojure.core, symbol); static final Var require = RT.var(clojrue.core, require); static final Var keyword

Calling clojure from java.

2011-07-25 Thread mmwaikar
Hi, I am using the Lobos library - https://github.com/budu/lobos In it there's a function create, which is called like this - (create db (table :some-name)), where db is earlier defined as - (def db {:classname org.postgresql.Driver :subprotocol postgresql :user postgres

Re: Retrieving individual maps (items) from a list.

2011-06-03 Thread mmwaikar
Thanks a lot for all the replies. Sorry for the trouble Allen that the highlighted parentheses caused you - Michael is absolutely right, I wrote them in Google groups which might have caused the error - next time I won't highlight anything. Finally, I used apply with insert-values. Regards,

Retrieving individual maps (items) from a list.

2011-05-31 Thread mmwaikar
Hi, I've to use clojure.contrib.sql's insert-records fn. Usage: (insert-records table records) Inserts records into a table. records are maps from strings or keywords (identifying columns) to values. So, for ex. this works - (clojure.contrib.sql/insert-records :blogs

Re: Emacs 23 issues.

2011-04-23 Thread mmwaikar
Thanks a lot Vincent. At least now I can run Emacs with Clojure, otherwise I was stuck at the very first step :) Thx again. Manoj. On Apr 21, 8:06 pm, Vincent Liard vincent.li...@free.fr wrote: Hi Manoj, unreadable message: (:emacs-rex (swank:autodoc (quote (d swank:: %cursor-marker%))

Emacs 23 issues.

2011-04-21 Thread mmwaikar
I am facing problem in using Emacs with Clojure. I am able to use it with Lisp without any problems. The problem is - I start the server using lein swank (from my project dir) and then I start Emacs using M-x slime-connect but then as soon as I start typing something in Emacs I get the error -

Emacs with Lisp and Clojure.

2011-03-23 Thread mmwaikar
Hi, I am a newbie to Ubuntu (10.10) and Emacs (23). I have been able to satisfactorily setup Eclipse and CCW, thanks to feedback from CCW user group members. However, I wanted to explore Clojure through Emacs. I have clojure-mode 1.7.1, slime and slime-repl 20100404 installed. I've also

Re: Emacs with Lisp and Clojure.

2011-03-23 Thread mmwaikar
But the same enter key works properly when I am using Lisp, so why shouldn't it be the default in Clojure as well? Also, after removing clojure-mode, when I try to install swank- clojure, it again installs the clojure-mode, but fails to install itself? regards, Manoj. On Mar 24, 12:45 am,

Re: Monad Lessons

2011-03-09 Thread mmwaikar
+1 (though I'll have to read about tmux first) :) Regards, Manoj. On Mar 10, 12:15 am, jim jim.d...@gmail.com wrote: I gave a talk at CodePaLOUsa on monads and got some favorable feedback. So I thought I'd offer to do a live training session on monads using pretty much the same material, but

Re: let's all link to the getting started pages!

2010-06-02 Thread mmwaikar
Hi, Sorry for posting to an old thread, but thought this might be a good one to ask. My question is this - isn't ClojureBox an Emacs? If yes, then why don't we include it in the above Wiki? Thanks, Manoj. On Apr 7, 3:39 pm, Avi Schwartz the1...@gmail.com wrote: On March 30th Eric Thorsen

Re: Which GUI toolkit would you like to see wrapped in an idiomatic Clojure library?

2010-05-28 Thread mmwaikar
I work on .Net, so my observation could be totally wrong, but I think JavaFx could be an option to consider (specially because of its JSON kind of syntax). I am working on a WPF project currently, and although WPF is big and complex, the kind of UIs one can build with it is amazing, and JavaFx

Re: Visual Studio plugin

2010-03-12 Thread mmwaikar
come from the solution or some other way of setting up a context for REPLs. 2. Have the plugin know about Clojure files. Syntax highlighting, completion, folding, etc. 3. Debugger support Eric On Mar 9, 1:47 pm, mmwaikar mmwai...@gmail.com wrote: Forgot to ask the below mentioned questions

Re: Visual Studio plugin

2010-03-09 Thread mmwaikar
Is it possible to write a plug-in in Clojure CLR? And if it is, would you prefer it in Clojure CLR or C# is fine? Also do you want both REPL and syntax highlighting for clj files in Visual Studio? Thanks, Manoj. On Mar 8, 2:17 pm, Eric Thorsen ethor...@enclojure.org wrote: Is there/is anyone

Re: Visual Studio plugin

2010-03-09 Thread mmwaikar
Forgot to ask the below mentioned questions earlier - Which version of Visual Studio are you targeting - 2008 or 2010? Do you have a development road-map for your plug-in features? Thanks, Manoj. On Mar 9, 1:05 pm, mmwaikar mmwai...@gmail.com wrote: Is it possible to write a plug-in in Clojure

Re: Can anyone here give a comparison between Clojure and Erlang on concurrent programming?

2009-09-25 Thread mmwaikar
Thanks everyone for your enlightening responses. On Sep 25, 3:35 am, Rick Moynihan rick.moyni...@gmail.com wrote: 2009/9/24 wmacgyver wmacgy...@gmail.com: Excellent summary of each language's sweet spot. I'd like to suggest a different book for Erlang though. For learning Erlang, I'd

Re: Can anyone here give a comparison between Clojure and Erlang on concurrent programming?

2009-09-24 Thread mmwaikar
With respect to Stuart's comment above - Erlang is designed for distributed operation across many machines; Clojure is designed for a single machine with many cores., how are Clojure and Haskell different? I am just curious to know how do Haskell, Clojure and Erlang compare. On Sep 24, 4:36 am,

Confusion with apply.

2009-07-22 Thread mmwaikar
Hi, I am getting a little confused in how apply works. I thought that (apply f args* argseq) means applying f to each of the elements of argseq one by one (assuming one doesn't pass any args), but it is not like that. So for ex, I wrote this: (defn mul5 [arg] (* arg 5)) and wanted to do this:

Re: Confusion with apply.

2009-07-22 Thread mmwaikar
will be stopped at each step. Regards, -- Laurent 2009/7/22 mmwaikar mmwai...@gmail.com Hi, I am getting a little confused in how apply works. I thought that (apply f args* argseq) means applying f to each of the elements of argseq one by one (assuming one doesn't pass any args

Re: Problem with running clojure on java.

2009-07-14 Thread mmwaikar
Arghhh...this was causing me a lot of pain. Thanks for the reply. On Jul 13, 11:54 pm, Richard Newman holyg...@gmail.com wrote: Manoj, require is for Clojure libraries only. You probably want import: http://clojure.org/api#toc297 but note that you don't need to *load* Java libraries per

Problem with running clojure on java.

2009-07-13 Thread mmwaikar
Hi, I am basically a .Net programmer, trying out Clojure on both java and .net. I have the following bat file, which I use to run Clojure - java -cp C:\Program Files\Java\jdk1.6.0_13\jre\lib\rt.jar;D:\Manoj \Languages\Clojure\clojure\clojure-contrib.jar;D:\Manoj\Languages

Re: Problem with clojure code on .net.

2009-07-10 Thread mmwaikar
) at AFunction_impl.invoke() at REPLCall(Closure ) Please let me know where's the issue. Thanks and regards, Manoj. On Jul 2, 11:43 pm, Baishampayan Ghose b.gh...@ocricket.com wrote: mmwaikar wrote: Thanks Michael, and you are spot on about your observation on parentheses :) but when I wasn't putting (def

Re: Problem with clojure code on .net.

2009-07-01 Thread mmwaikar
Thanks a lot Daniel for your suggestions. As per my understanding Clojure for Java and .Net are two implementations of the same language, but they have to support different things because the underlying platforms support different things - e.g. extension methods (are in C# but most likely not in

Re: Problem with clojure code on .net.

2009-07-01 Thread mmwaikar
Wood esiot...@gmail.com wrote: Hi 2009/7/1 mmwaikar mmwai...@gmail.com: Hi, I am learning clojure these days, but on .Net. I have the following code - I only have a tiny bit to add to what Daniel's already said. [...] (defn GetSubfolderName [filename]        ((def name-wo-extn

Problem with clojure code on .net.

2009-06-30 Thread mmwaikar
Hi, I am learning clojure these days, but on .Net. I have the following code - (import '(System.IO Path Directory File DirectoryNotFoundException)) (defn starts-with-hmorx [name] (if (or (= (.ToUpper (.ToString name)) H) (= (.ToUpper (.ToString name)) M)

Contributing to Clojure CLR.

2009-06-11 Thread mmwaikar
Hi, How can one contribute to the development of Clojure on CLR? I was trying the following - (.ToString DateTime/Now) and was getting - System.Exception: Unable to find static field: Now in System.DateTime. I added some code in Reflector.cs, Compiler.cs and StaticFieldExpr.cs and got it

Re: Contributing to Clojure CLR.

2009-06-11 Thread mmwaikar
a pull request. Paul On Wed, Jun 10, 2009 at 10:25 PM, mmwaikar mmwai...@gmail.com wrote: Hi, How can one contribute to the development of Clojure on CLR? I was trying the following - (.ToString DateTime/Now) and was getting - System.Exception: Unable to find static field