Re: Re: java logging properties and lein

2011-11-14 Thread Mark Rathwell
You still need to load the properties and tell the logger to use them.  Assuming it is using log4j, something like the following should do that (completely untested though): ...  (:require [clojure.java.io :as io]) ... (with-open [s (io/input-stream (io/resource logging.properties))]  

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Mark Rathwell
slime-connect should connect you and give you a repl). - Mark On Wed, Nov 16, 2011 at 4:15 PM, Andrew ache...@gmail.com wrote: Having trouble setting up Clojure/Emacs on Windows again. Earlier Mark Rathwell helped me by pointing out a recipe for Windows that resolved an issue with sh. After having

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-16 Thread Mark Rathwell
I think there is some path issue in your setup between Cygwin and Windows that will take some work to diagnose. You might try installing everything from scratch, or maybe try a Linux vm with VirtualBox (free) or VMWare. Either way, you can use lein swank and slime-connect in the meantime. On

Re: start-process-shell-command: Spawning child process: invalid argument

2011-11-17 Thread Mark Rathwell
Do I need Cygwin at all for Clojure work on Windows/Emacs/Swank/clojure-mode/lein? I don't think so. If lein.bat is on your path and is working, and if emacs and clojure-mode are working, that's really all you need. There are utilities and tools out there that you may want to use at some

Re: Change var in other namespace

2011-11-17 Thread Mark Rathwell
You rebind dynamic vars with binding, so your use would look something like this: (binding [*logger-factory* (log-impl/log4j-factory)] (do-stuff-with-the-logger-factory-rebound)) On Thu, Nov 17, 2011 at 5:17 PM, vitalyper vitaly...@yahoo.com wrote: clojure.tools.logging defines

Re: keyword arguments

2011-11-27 Thread Mark Rathwell
You can use the :pre and :post assertions on functions. Something like the following would do what you are asking: (defn myfun [ {:keys [arg1 arg2 arg3] :or {arg1 default-value} :as args}] {:pre [(every? #{:arg1 :arg2 :arg3} (keys args))]} (println arg1 arg2 arg3 args: args)) Also,

Re: keyword arguments

2011-11-27 Thread Mark Rathwell
: On Nov 27, 8:43 am, Mark Rathwell mark.rathw...@gmail.com wrote: Also, another way to take keyword arguments is: (defn foo [ opts]   (let [opts (apply hash-map opts)]     (println opts))) This is what already happens internally with the {:keys ...} notation. You can actually be rather

Re: Are reader macros and regular macros handled differently by the compiler?

2011-12-01 Thread Mark Rathwell
Reader macros are expanded by the reader, regular macros are expanded by the compiler. The reader is what translates the text strings that you have typed into Clojure data structures, the compiler translates those data structures into executable code. Clojure does not allow you to define custom

Re: Null-safe threading macro?

2010-12-09 Thread Mark Rathwell
it's in clojure.contrib On Thu, Dec 9, 2010 at 11:58 PM, Alex Baranosky alexander.barano...@gmail.com wrote: I could have sworn I had seen a clojure macro -? which was just like - except that if it, at any point, evaluated to nil, then it would return nil, instead of throwing a

Re: Why won't leiningen install for me?

2011-01-22 Thread Mark Rathwell
Are you using a MacPorts version of wget or curl? If so, see: http://stackoverflow.com/questions/2065904/macports-on-snow-leopard-rsync-library-not-loaded-libintl (note the comment regarding upgrading from Leopard to Snow Leopard) Also, for consistency, you will probably want to name your lein

Re: Why won't leiningen install for me?

2011-01-22 Thread Mark Rathwell
Probably also should have mentioned, there is a leiningen specific group that is fairly active, probably a better place to post these types of questions: http://groups.google.com/group/leiningen On Sat, Jan 22, 2011 at 10:28 AM, Mark Rathwell mark.rathw...@gmail.comwrote: Are you using

Re: Why won't leiningen install for me?

2011-01-24 Thread Mark Rathwell
Seems pretty clear that your macports version of curl is the problem, it's up to you what you want to do about it. I don't know if uninstalling it would leave you with the OS X version of curl or not. Link to get you started:

Re: Confusion about JARs Leiningen

2011-02-04 Thread Mark Rathwell
These are all questions about Maven, the dependency management / build system used by many Java developers, on top of which leiningen is built. 1. The sources are publicly accessible maven repositories, of which clojars is one. When running 'lein deps', you can see the repositories that

Re: clojure xmpp

2011-02-10 Thread Mark Rathwell
I just created my own clojure wrappers around the jive (igniterealtime) java libraries. Created an xmpp client library with their Smack library, and a server component library with Tinder (you will need to build from source with this one). They are fairly solid java xmpp libraries.

Re: Clojure namespace conventions

2011-02-23 Thread Mark Rathwell
This discussion has been had multiple times on this list, not sure how much new information you will get. See the following for a couple examples: http://groups.google.com/group/clojure/browse_thread/thread/968e9066223c3a2b/fbce84869dbf4ce6?lnk=gst#

Re: Anyone using the sdb library?

2011-02-24 Thread Mark Rathwell
I used it as a starting point for an sdb lib a while back, moved that project to GAE though. One note, it uses an outdated version of the AWS java libraries, you should probably update that if you're in there. On Thu, Feb 24, 2011 at 3:36 PM, Chas Emerick cemer...@snowtide.com wrote: Is

Re: Anyone using the sdb library?

2011-02-27 Thread Mark Rathwell
If you have time, I posted a gist containing a data access library I built on top of Rich's sdb library (data.clj), and the modifications I made to his sdb library (sdb.clj) for consistent reads, etc. This is some of the first real clojure code I wrote, so not the prettiest, but maybe you can see

Re: Anyone using the sdb library?

2011-02-27 Thread Mark Rathwell
Forgot the link: https://gist.github.com/846363 If you have time, I posted a gist containing a data access library I built on top of Rich's sdb library (data.clj), and the modifications I made to his sdb library (sdb.clj) for consistent reads, etc. This is some of the first real clojure

Re: Anyone using the sdb library?

2011-03-01 Thread Mark Rathwell
- How to account for nil / blank values That's a tough one. As you might have seen, I'm strongly leaning towards eliminating the type tags in formatted values, which would make representing nil pretty difficult. Is this really a desired feature to begin with? As it stands,

Re: [Code Bounty] Implementing ClojureScript - command-line/sys-admin scripting with Clojure

2011-03-04 Thread Mark Rathwell
I've decided to offer a 200 USD bounty for implementing ClojureScript I think you are missing a couple zeros in your offer price ;) Seriously though, these things tend to go better when you say something like I've decided to work on this new project, who wants to help?, instead of offering a

Re: RabbitMQ

2011-03-24 Thread Mark Rathwell
I just wrapped their java client library: http://www.rabbitmq.com/java-client.html http://www.rabbitmq.com/java-client.html On Thu, Mar 24, 2011 at 11:15 AM, Max Weber weber.maximil...@googlemail.com wrote: What is the best Clojure library to work with RabbitMQ? Best regards Max -- You

Re: How to add a java library (that is not in maven) as a dependency for a clojure library?

2011-04-07 Thread Mark Rathwell
The easiest way would be to install the library to you local maven repository with the command below (assuming you have maven installed. That way, you can add the dependency to all of your projects on your local box. If you do not want to use maven, you make sure the library is on your classpath

Re: How to add a java library (that is not in maven) as a dependency for a clojure library?

2011-04-07 Thread Mark Rathwell
Oops, just reread your question, looks like you may be more interested in deployment. For deployment, try 'lein uberjar' to bundle all dependencies into one distributable jar file. Hopefully answered the right question this time ;) - Mark On Thu, Apr 7, 2011 at 9:54 AM, Mark Rathwell

Re: How to add a java library (that is not in maven) as a dependency for a clojure library?

2011-04-07 Thread Mark Rathwell
the library's developer to get it into a common repo or do it yourself. Sorry for any confusion. - Mark On Thu, Apr 7, 2011 at 9:56 AM, Mark Rathwell mark.rathw...@gmail.comwrote: Oops, just reread your question, looks like you may be more interested in deployment. For deployment, try 'lein

Re: How to add a java library (that is not in maven) as a dependency for a clojure library?

2011-04-07 Thread Mark Rathwell
understanding of clojars was that it was for clojure libraries? Thanks. On Apr 7, 3:19 pm, Mark Rathwell mark.rathw...@gmail.com wrote: Wow, I really shouldn't be reading this early in the morning. Just realized you want to publish to clojars.org. In that case, yes, you do need to alert

Re: partial vs anonymous function?

2011-04-14 Thread Mark Rathwell
Try this: (eval (mapper `(partial + 1) [10 11 12])) On Thu, Apr 14, 2011 at 9:46 AM, David McNeil mcneil.da...@gmail.comwrote: I am puzzled by the results below. Can anyone explain the difference in behavior? -David (defn mapper [f stream] `(map ~f ~stream)) (eval (mapper #(+

Re: partial vs anonymous function?

2011-04-14 Thread Mark Rathwell
I think it has to do with partial's use of apply, but you would need someone smarter than me to tell you for sure ;) On Thu, Apr 14, 2011 at 9:58 AM, David McNeil mcneil.da...@gmail.comwrote: Mark - Thanks. I am able to permute it to make it work. However, I cannot explain why the original

Re: partial vs anonymous function?

2011-04-14 Thread Mark Rathwell
(mapper (fn [x] (+ 1 x)) [1 2 3])) (2 3 4) On Thu, Apr 14, 2011 at 10:17 AM, Mark Rathwell mark.rathw...@gmail.comwrote: I think it has to do with partial's use of apply, but you would need someone smarter than me to tell you for sure ;) On Thu, Apr 14, 2011 at 9:58 AM, David McNeil mcneil.da

Re: Strange error

2011-04-25 Thread Mark Rathwell
It's probably a paren off, but it would be easier to tell for sure if you posted the code to a github gist, or here. On Mon, Apr 25, 2011 at 10:02 AM, WoodHacker ramsa...@comcast.net wrote: Can anyone help me with this? I get the following error: Exception in thread main

Re: New to Clojure

2011-05-20 Thread Mark Rathwell
In the clojars repository, looks like the most recent versions are: [work 0.1.2-SNAPSHOT] http://clojars.org/work [clj-time 0.3.0] http://clojars.org/clj-time On Fri, May 20, 2011 at 1:01 PM, dudaroo duda...@gmail.com wrote: I am trying to help with an existing project and have no

Re: New to Clojure

2011-05-20 Thread Mark Rathwell
Look at the code on github: http://github.com/clj-sys/work http://github.com/clj-sys/workThis has moved to: https://github.com/getwoven/work You might also ask the maintainers of this project if they would be able to upload more recent versions to clojars. - Mark

Re: New to Clojure

2011-05-20 Thread Mark Rathwell
) at org.apache.maven.artifact.resolver.DefaultArtifactResolver.resolveTransitively(DefaultArtifactResolver.java: 324) at org.apache.maven.artifact.ant.DependenciesTask.doExecute(DependenciesTask.java: 170) ... 34 more On May 20, 1:19 pm, Mark Rathwell mark.rathw...@gmail.com wrote: In the clojars

Re: lein usage

2011-05-21 Thread Mark Rathwell
A project.clj with clojure.contrib: (defproject foo 1.0.0-SNAPSHOT :description FIXME: write description :dependencies [[org.clojure/clojure 1.2.1] [org.clojure/clojure-contrib 1.2.0]]) To find libraries, search http://clojars.org Documentation for lein is in the

Re: New to Clojure

2011-05-24 Thread Mark Rathwell
the folks at woven about uploading the most current version of the work build to clojars? :) On May 20, 5:20 pm, Mark Rathwell mark.rathw...@gmail.com wrote: A couple things going on here, I think: First, it looks like maven is having problems communicating with the Woven repositories

Re: lein and private locally installed classes

2011-05-24 Thread Mark Rathwell
Yes, this key was recently added, and is currently only available in the development snapshot (1.6.0-SNAPSHOT). You have the most recent stable version, 1.5.2, which is what lein upgrade pulls down. The current development version is available at:

Re: Best Installation Option

2011-06-05 Thread Mark Rathwell
Leiningen, via maven, will handle your clojure dependencies for you, no need to copy and paste any jar files. Lein is actually the only thing you need to install, and it will take care of everything else. I think the easiest way to start learning about leiningen is reading the readme and all of

Re: Free Compojure Hosting? (or mostly free)

2011-06-08 Thread Mark Rathwell
Also released since this thread started, not free, but starting at about $14/month USD, Amazon's Elastic Beanstalk ( http://aws.amazon.com/elasticbeanstalk/) . And VMWare has their Cloud Foundry hosting in beta for free, but it will cost money once it is out ( http://www.cloudfoundry.com/). GAE

Re: Using slurp to read changing JSON string

2011-06-10 Thread Mark Rathwell
I don't think the issue you are having is with slurp. If you could post more of the code that is causing you problems, it would be easier to debug. Entering the following at the repl seems to work fine for me (you can just do (slurp http://tycho.usno.navy.mil/cgi-bin/timer.pl;) and notice that

Re: bug in partition?

2011-06-13 Thread Mark Rathwell
This, or wrap user-pass with seq in the conditional, which will return nil for an empty list: (defn authenticate? [uri name pass] (loop [user-pass (seq (partition 2 (.getStringArray *conf* authentication)))] (if (seq user-pass) (if (re-matches (re-pattern (ffirst user-pass)) uri)

Re: Having trouble figuring out dependencies

2011-06-15 Thread Mark Rathwell
Just to be clear, you do not need to download and build all of your dependencies, and you do not need to worry about whether they are on your classpath. I don't know cake, but I assume it is similar to leiningen in that is manages all of your dependencies for you, via maven, and again, if like

Re: Why is class name not found?

2011-06-15 Thread Mark Rathwell
It is standard to name your filenames with underscores, but your clojure names with dashes (so 'ns test_csv' should be 'ns test-csv'). Also update that in your project.clj :main key. That may or may not be the cause of the problem here. On Wed, Jun 15, 2011 at 1:19 PM, octopusgrabbus

Re: Why is class name not found?

2011-06-15 Thread Mark Rathwell
[ args] (println Hello world!)) I took the[clojure-csv/clojure-csv 1.2.4] for project.clj right from clojure-csv's README.md. On Jun 15, 1:37 pm, Mark Rathwell mark.rathw...@gmail.com wrote: It is standard to name your filenames with underscores, but your clojure names with dashes (so 'ns

Re: Why is class name not found?

2011-06-15 Thread Mark Rathwell
See Ken's post, there is a paren out of place in test_csv.clj. On Wed, Jun 15, 2011 at 2:02 PM, octopusgrabbus octopusgrab...@gmail.comwrote: Yes, I did all that. On Jun 15, 2:01 pm, Mark Rathwell mark.rathw...@gmail.com wrote: Did you run the command to re-pull the dependencies

Re: Properly including clojure-contrib

2011-06-16 Thread Mark Rathwell
The clojure.contrib.string namespace contains many function names which are already defined clojure.core. So, by :use-ing clojure.contrib.string, you will be replacing the core functions with the string functions. Rarely do you really want to do this. It is generally best to :require instead of

Re: Am I getting back a vector of lines and can I split each line?

2011-06-17 Thread Mark Rathwell
Some resources, in case they help: 1. http://clojuredocs.org/ has documentation for core and contrib, and often has examples http://clojuredocs.org/2. http://clojure.org has a lot of reading material about the language, including a nice cheat sheet ( http://clojure.org/cheatsheet) 3.

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
In Java, varargs are actually converted to arrays at compile time. It is really just some syntactic sugar allowing you to use nicer syntax for array arguments, and you can pass the arguments as an array, or as a comma delimited sequence of arguments. On Fri, Jun 17, 2011 at 10:57 AM, Gregg

Re: Java interop: casting

2011-06-17 Thread Mark Rathwell
}); } On Fri, Jun 17, 2011 at 1:35 PM, Gregg Reynolds d...@mobileink.com wrote: On Fri, Jun 17, 2011 at 10:17 AM, Mark Rathwell mark.rathw...@gmail.com wrote: In Java, varargs are actually converted to arrays at compile time. It is really just some syntactic sugar allowing you to use nicer syntax

Re: Trying to set up clojure... and failing

2011-06-20 Thread Mark Rathwell
Agreed, you should definitely start with lein. If you have ~/bin on your path (and curl): 1. Get lein: curl -L https://github.com/technomancy/leiningen/raw/stable/bin/lein ~/lein chmod a+x ~/lein 2. Create a new project with lein (in current working directory) lein new first-time 3. Get a

Re: Trying to set up clojure... and failing

2011-06-20 Thread Mark Rathwell
I think lein runs 'deps' with the 'repl' task, but just in case you may also want to include a 'lein deps' in step 3: 3. Get a repl to play around with: cd first-time lein deps lein repl On Mon, Jun 20, 2011 at 2:17 AM, Mark Rathwell mark.rathw...@gmail.comwrote: Agreed, you should

Re: why does this anonymous function work with 'map' but not 'apply'?

2012-07-17 Thread Mark Rathwell
your apply will end up doing sometihng like this: (#(println %1) stu mary lawrence) since apply takes @visitors as a collection and passes each item as an argument to the function you give it. In other words, apply essentially unpacks the collection and passes the items as individual

Re: Redefining vars

2012-07-19 Thread Mark Rathwell
partial returns a closure, closing over a at the time b is defined. On Wed, Jul 18, 2012 at 7:18 AM, Alice dofflt...@gmail.com wrote: I'm reading Clojure Programming from O'Reilly. (defn a [b] (+ 5 b)) ;= #'user/a (def b (partial a 5)) ;= #'user/b (b) ;= 10 (defn a [b] (+ 10 b)) ;=

Re: why does this anonymous function work with 'map' but not 'apply'?

2012-07-22 Thread Mark Rathwell
, Mark Rathwell wrote: your apply will end up doing sometihng like this: (#(println %1) stu mary lawrence) since apply takes @visitors as a collection and passes each item as an argument to the function you give it. In other words, apply essentially unpacks the collection

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-27 Thread Mark Rathwell
I haven't setup the naked domain, as heroku advises against that. Perhaps I should? Usually you can setup a 301 redirect from the naked domain to www with your registrar. On Fri, Jul 27, 2012 at 4:06 PM, Aaron Lebo aaron.m.l...@gmail.com wrote: It is http://www.kodefund.com. I haven't setup

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-27 Thread Mark Rathwell
for DNS. On Fri, Jul 27, 2012 at 4:10 PM, Mark Rathwell mark.rathw...@gmail.com wrote: I haven't setup the naked domain, as heroku advises against that. Perhaps I should? Usually you can setup a 301 redirect from the naked domain to www with your registrar. On Fri, Jul 27, 2012 at 4:06 PM

Re: Experiences developing a crowdfunding site for open source projects in Clojure (from a Python background)

2012-07-27 Thread Mark Rathwell
wrote: Yes, I actually just set it up. Very easy. Thank you. Vincent thanks for pointing that out. On Friday, July 27, 2012 3:12:02 PM UTC-5, Mark Rathwell wrote: I haven't setup the naked domain, as heroku advises against that. Perhaps I should? Usually you can setup a 301 redirect

Re:

2012-07-29 Thread Mark Rathwell
In your has22 definition, (by-pairs [a]) should be (by-pairs a) On Sun, Jul 29, 2012 at 9:07 AM, John Holland jbholl...@gmail.com wrote: I'm doing some exercises in coding that are meant for Java but I'm doing them in Clojure. I'm stuck on this one. The goal is to return true if an array of

Re: function parameters were working, and now I suddenly get a cast error

2012-08-28 Thread Mark Rathwell
See [1]. Valid ServerSocket constructors: ServerSocket() ServerSocket(int) ServerSocket(int,int) ServerSocket(int,int,InetAddress) Your code is trying: ServerSocket(int,string) [1] http://docs.oracle.com/javase/1.4.2/docs/api/java/net/ServerSocket.html On Tue, Aug 28, 2012 at 8:25 PM, larry

Re: Question: Looking at Noir code - hey, are those singletons?

2012-09-13 Thread Mark Rathwell
If I'm right then defining your 'globals' (for lack of a better word) like this would mean, among other things, that you really can't have two independent Noir apps defined/running in the same project - is that a correct assessment? Just out of curiosity, could you expand on what you mean

Re: Question: Looking at Noir code - hey, are those singletons?

2012-09-13 Thread Mark Rathwell
Emerick c...@cemerick.com wrote: On Sep 13, 2012, at 11:57 AM, Mark Rathwell wrote: If I'm right then defining your 'globals' (for lack of a better word) like this would mean, among other things, that you really can't have two independent Noir apps defined/running in the same project

Re: Clojure web framework

2012-09-28 Thread Mark Rathwell
Documentation around libraries (and elsewhere) is recognized as a primary weakness, but starting a new, larger web Framework project isn't an obvious solution to that very distributed problem. Agree 100% with this. I think the various libraries are mostly at the right level, and are mostly

Re: Clojure web framework

2012-09-28 Thread Mark Rathwell
Well there are many usefull libs for web development you can choose this and that combine them and get something. But from newbie perspective it's kind of a difficult question where to start from, what to use, what good practice is. What lib to use for persistance with Mysql, Postgre, for

Re: Clojurejs: a lightweight clojure to javascript compiler

2012-10-08 Thread Mark Rathwell
Now I'm confused! Isn't clojureScript exactly that? ClojureScript is a Clojure implementation that targets Javascript (meaning that Clojure core, et al, is also necessarily converted to Javascript in the build process and a part of what you ship). I'm assuming this project is a straight

Re: What is this function?

2012-10-09 Thread Mark Rathwell
https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L588 On Tue, Oct 9, 2012 at 1:03 PM, Larry Travis tra...@cs.wisc.edu wrote: As participants in this googlegroup have often observed, an excellent way to learn Clojure is to study the source definitions of its API functions.

Re: *foo*

2012-10-09 Thread Mark Rathwell
It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals On Tue, Oct 9, 2012 at 1:58 PM, Grant Rettke gret...@acm.org wrote: Gosh I thought it was in there... maybe it is not. Sorry. On Tue, Oct 9, 2012 at 12:55 PM, Grant Rettke gret...@acm.org wrote: On Tue, Oct 9, 2012

Re: *foo*

2012-10-09 Thread Mark Rathwell
It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals Should have noted that's not how it is used in Clojure though On Tue, Oct 9, 2012 at 2:00 PM, Mark Rathwell mark.rathw...@gmail.com wrote: It's in there, search Asterisks: Variants, Internal Routines, Mutable Globals

Re: ANN: lein-clr for building ClojureCLR projects

2012-10-28 Thread Mark Rathwell
Great work! Really looking forward to NuGet integration. On Sun, Oct 28, 2012 at 9:13 AM, Shantanu Kumar kumar.shant...@gmail.comwrote: Hi, I am happy to announce `lein-clr`, a Leiningen plugin for building ClojureCLR projects: https://github.com/kumarshantanu/lein-clr As of 0.1.0,

Re: First foray into clojure - questions for new project

2012-11-12 Thread Mark Rathwell
These 4 should help you get from zero to a simple web app running on Heroku pretty quickly: https://github.com/technomancy/leiningen/wiki/Upgrading https://github.com/technomancy/swank-clojure https://github.com/kingtim/nrepl.el https://devcenter.heroku.com/articles/clojure-web-application Some

Re: First foray into clojure - questions for new project

2012-11-13 Thread Mark Rathwell
Should I dive into Ring as well? What about Compojure versus Noir? Noir is higher level than Compojure, and usually easier for new people to jump into, but not always as flexible, functional or composable. On Tue, Nov 13, 2012 at 10:27 AM, Jonathon McKitrick jmckitr...@gmail.com wrote:

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Mark Rathwell
You can contact the maintainers at the address found at the bottom of [1] and ask them to remove the clj-xpath group, but you probably don't want to do that if anyone is using the library. [1] https://github.com/ato/clojars-web/wiki/Contact On Tue, Nov 20, 2012 at 10:07 AM, Kyle R. Burton

Re: [ANN] clj-xpath 1.3.3

2012-11-20 Thread Mark Rathwell
any issues. On Tue, Nov 20, 2012 at 10:47 AM, Kyle R. Burton kyle.bur...@gmail.com wrote: On Tue, Nov 20, 2012 at 10:35 AM, Mark Rathwell mark.rathw...@gmail.com wrote: You can contact the maintainers at the address found at the bottom of [1] and ask them to remove the clj-xpath group

Re: help with webserver

2011-12-14 Thread Mark Rathwell
Generally, in production, jetty or tomcat would be fronted by a web server like nginx or apache httpd, and those would be setup to serve your static files. In development, or if you just don't want to set that up, with Compojure you can use compojure.route/files to serve static files [1]. Or, as

Re: Clojurescript, is it ready yet?

2011-12-15 Thread Mark Rathwell
Is clojurescript ready for wide water? It's getting there. +1 How far i can only see obscure compilation env and low level ops on html elemnts. I find the compilation environment is quite nice, if there's something you find confusing you should discuss it. I don't think that

Re: same ns multiple file

2011-12-19 Thread Mark Rathwell
in-ns and load are what you are looking for: ;; foo.clj (ns my.foo ... ... (load foo_a) ;; foo_a.clj (in-ns 'my.foo) ... On Mon, Dec 19, 2011 at 11:37 AM, FD du...@hotmail.com wrote: Hello, In lisp, one can define functions within a package in multiple file. Files have just to start with

Re: Clojure list syntax sugar: f(x) notation

2011-12-29 Thread Mark Rathwell
The thing about lisps, though, is that code and data are represented with the same structure. Adding sugar that makes them appear to be different things would not help anyone, especially the beginner. It will make grasping macros, among other things, much more difficult down the road. Getting

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

2012-01-11 Thread Mark Rathwell
Thank you for this! It looks to be very cohesive and comprehensive, very nice work. On Wed, Jan 11, 2012 at 2:27 PM, Brenton bashw...@gmail.com wrote: Today we are releasing ClojureScript One. A project to help you get started writing single-page applications in ClojureScript.

Re: Clojure doesn't find java class

2012-01-17 Thread Mark Rathwell
1. Does the mahout-collections jar contain compiled classes? Or only java source? 2. Is the mahout-collections jar making it to the lib directory when you run `lein deps`? On Mon, Jan 16, 2012 at 7:24 PM, joachim joachim.de.be...@gmail.com wrote: Hello all, I am trying to use the mahout math

Re: How to use goog.dom.query

2012-01-24 Thread Mark Rathwell
You can look at how Pinot does it, some links to get you started: https://github.com/ibdknox/pinot https://github.com/ibdknox/pinot/blob/master/project.clj https://github.com/ibdknox/pinot/blob/master/src/pinot/dom.cljs https://groups.google.com/forum/#!msg/clj-noir/x5x9vcI-T4E/FaCfb8jhDXoJ On

Re: ClojureScript {:optimizations :advanced}

2012-02-06 Thread Mark Rathwell
In short, yes, if you stick to gClosure, advanced compilation will work fine. Closure advanced compilation is an optimizing compilation that minifies names and removes dead (unused, uncalled) code. Trying to use jQuery without special effort will result in calls to jQuery being unaddressable.

Re: Print only by clojure code

2012-02-08 Thread Mark Rathwell
It's logging, and assuming the logging implementation it is using log4j, you can specify the logging properties in a properties file, as system properties, or set the properties in code. The easiest way is to place a file called log4j.properties on the classpath (in the resources directory of

Re: Print only by clojure code

2012-02-08 Thread Mark Rathwell
possibilities. Sent from my iPhone On Feb 8, 2012, at 3:15 PM, Tassilo Horn tass...@member.fsf.org wrote: Mark Rathwell mark.rathw...@gmail.com writes: It's logging, and assuming the logging implementation it is using log4j, Why do you know that from the information given? Just

Re: options for a function

2012-02-22 Thread Mark Rathwell
I don't know that there is necessarily a recommended way to offer options. Sometimes people want keyword options, sometime the want to take options as a map, sometimes they need to do it one way or another for various reasons, sometime they do it one way and later learn of a better way. To take

Re: Bret Victor - Inventing on Principle

2012-02-24 Thread Mark Rathwell
On Fri, Feb 24, 2012 at 2:25 PM, Jay Fields j...@jayfields.com wrote: On Fri, Feb 24, 2012 at 2:12 PM, Cedric Greevey cgree...@gmail.com wrote: On Fri, Feb 24, 2012 at 2:06 PM, gaz jones gareth.e.jo...@gmail.com wrote: Are you Ken Wesson with a new account? Who? Wait. Surely you don't think

Re: lazyness

2012-02-24 Thread Mark Rathwell
Try this (you need to wrap the return val of helper in lazy-seq also): (defn pair-sequences-by ([seq-1 seq-2 f1 f2] s1 and s2 are guaranteed to be strictly monotonically increasing whith respect to f1 and f2 as keys respectively. The return value is pairs of elements e1 from s1 and e2

Re: ClojureScript use statement not working

2012-02-25 Thread Mark Rathwell
You must (:use ... :only ...) with ClojureScript On Sat, Feb 25, 2012 at 3:31 PM, Chris McBride cmm7...@gmail.com wrote: I have a namespace statement like this: (ns alephtest.websocket  (:require [alephtest.js-utils :as util])) If I change this to: (ns alephtest.websocket  (:use

Clojure in Python

2012-02-29 Thread Mark Rathwell
Not sure how many people have seen this, looks interesting though: https://github.com/halgari/clojure-py -- 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

Re: Clojure in Python

2012-02-29 Thread Mark Rathwell
Currently we have about half of core.clj ported from JVM clojure to python clojure. I know it's early, but have there been any thoughts/plans around interop and dependency management, possibly providing some sort of bridge between lein and pip/easy_install/virtualenv? And is performance the

Re: Pretty print defn

2012-03-02 Thread Mark Rathwell
(clojure.repl/source-fn 'qw) will give you the source. On Fri, Mar 2, 2012 at 10:32 AM, Nikem gni...@gmail.com wrote: Hi. Is it possible to pretty print a source code of the function defined with defn? I have tried the following: (defn qw []  (inc 2)) (with-pprint-dispatch code-dispatch

Re: Pretty print defn

2012-03-06 Thread Mark Rathwell
If you are just printing it to the screen, print or println will do what you want. There shouldn't be a need for a pretty printer, the source is already formatted exactly as it was written. On Tue, Mar 6, 2012 at 1:02 AM, Nikem gni...@gmail.com wrote: Thank you for your help! :) I managed to

Re: How I can use InteractionEvent in clojure?

2012-03-07 Thread Mark Rathwell
You are trying to call method GetTransform on an instance of vtk.vtkTransform, and this method does not exist (you are probably wanting to call that method on boxWidget, not t). On Thu, Mar 8, 2012 at 12:32 AM, Antonio Recio amdx6...@gmail.com wrote: You are right. I have capitalized

Re: Frustrations in being moderated

2012-03-23 Thread Mark Rathwell
I'm sure that some level of moderation is necessary to keep the list clean, but does it have to be so draconian? Hmm, I didn't even know the list was moderated (beyond first post moderation which I'd assume was the norm on Google Groups). Perhaps Clojure/core can comment on what the actual

Re: Multiple ClojureScript (sub)projects with shared CLJS libraries per single clojure project

2012-03-30 Thread Mark Rathwell
I haven't tried yet, but lein-cljsbuild [1] is meant to support multiple builds, and I believe something like the below config would be what you are looking for: :cljsbuild { :builds [{:source-path src/cljs/project1 :compiler {:output-to resources/public/cljs/script1.js

Re: Clojurescript standards to integrate other libraries

2012-04-13 Thread Mark Rathwell
Hi, Below are some good resources for the questions you have. Just a note, you can advanced compile your own code that calls out to jQuery, and others, you just can't compile those libraries in. So, there are existing extern files for jQuery, and for other libraries you might be using, you can

Re: noir response

2012-04-13 Thread Mark Rathwell
See [1] for this morning's response to a very similar question ;) There is also a group for Noir-specific questions at [2]. [1] https://groups.google.com/forum/#!msg/clj-noir/mT8L2hnMnNg/jRJ2UdOqKuQJ [2] https://groups.google.com/forum/#!forum/clj-noir On Fri, Apr 13, 2012 at 11:10 AM, Rups

Re: Tornado-like async (web) server framework?

2012-04-15 Thread Mark Rathwell
https://github.com/ztellman/aleph On Sun, Apr 15, 2012 at 9:51 PM, Stefan Arentz ste...@arentz.ca wrote: There is a lovely little web server for Python called Tornado. Tornado is an async server that also includes an async http client that plugs right in the server's event loop. This makes

Re: Code shared between clj and cljs

2012-04-18 Thread Mark Rathwell
The main options for sharing Clojure and ClojureScript code at this point are: 1. Use lein-cljsbuilds crossover feature [1] 2. Kevin Lynagh's cljx [2] 3. Symlink your .clj source as a .cljs file [1] https://github.com/emezeske/lein-cljsbuild/blob/0.1.8/doc/CROSSOVERS.md [2]

Re: Clojure alternatives to Esper

2012-04-23 Thread Mark Rathwell
I would start with storm: https://github.com/nathanmarz/storm On Apr 23, 2012, at 9:51 AM, Rogier Peters rogier.pet...@gmail.com wrote: Hi, For a java project I have been looking at Esper (esper.codehaus.org), a component for complex event processing: Complex event processing (CEP)

Re: Socket Library in Clojure

2012-04-27 Thread Mark Rathwell
Depending on what you are trying to do, you will probably also want to have a look at pallet [1], clj-ssh [2], and clojure-control [3]. [1] http://palletops.com/ [2] https://github.com/hugoduncan/clj-ssh [3] https://github.com/killme2008/clojure-control On Fri, Apr 27, 2012 at 6:15 AM,

Re: Help with clojurescript code for google charts

2012-04-27 Thread Mark Rathwell
Try this: (defn add-rows [] (let [data (js/google.visualization.DataTable.)] (.addColumn data string Topping) (.addColumn data number slices) (.addRows data (clj-js [[Mushrooms 3] [Onions 1] [Olives 1]])) data)) (defn chart-options [] (clj-js {:title How much Pizza i ate

Re: how to get good at clojure?

2012-05-08 Thread Mark Rathwell
1. does anyone have advice on getting somewhat competent for a newb? (alternatively, how did you get good?) - Think of some (smaller) project you've had on your mind for a while, and try to implement it using clojure - Read all of the incoming questions on this list, or StackOverflow if you

Re: How to use third-party libraries with Leiningen that are not found in Clojars or Maven

2012-05-14 Thread Mark Rathwell
Depending on who else you are wanting to share the dependency with, you may find Phil Hagelberg's s3-wagon-private useful: https://github.com/technomancy/s3-wagon-private On Mon, May 14, 2012 at 4:23 PM, Sean Corfield seancorfi...@gmail.com wrote: Check out lein-localrepo - a way to install

<    1   2   3   >