Re: Question about namespaces

2010-05-09 Thread Mark Engelberg
I spent the past half-hour experimenting with what happens in Clojure if the ns declaration doesn't match the file name, and what happens if the ns declaration is not at the top of the file. Here's what I've found so far: 1. When you require/use/load a file, Clojure finds it by the filename. 2.

Re: Question about namespaces

2010-05-09 Thread Adrian Cuthbertson
Some time ago I experimented with migrating definitions between namespaces. Here's a post from then that covers some lower-level detail regarding namespaces. http://groups.google.com/group/clojure/msg/f00a82b747c1636f -Hth, Adrian. On Mon, May 10, 2010 at 12:15 AM, Mark Engelberg wrote: > The m

Re: Question about namespaces

2010-05-09 Thread Meikel Brandmeyer
Hi, On 10 Mai, 00:15, Mark Engelberg wrote: > The more I think about this, the more I feel like I don't have a good mental > model of what's going on with namespaces/loading/reading/compiling.  What is > happening when you "load" a file without reading/compiling it (e.g., > load-reader or load-f

Re: Why Clojure rocks..

2010-05-09 Thread ka
Not wanting to become an uninvited guest to your party :-) ... but do you mind elaborating .. ? On May 9, 2:31 am, Base wrote: > I just replaced 443 lines of java with 61 lines of Clojure. > > THANK YOU RICH !!! > > -- > You received this message because you are subscribed to the Google > Groups

Re: Annoying auto-signature

2010-05-09 Thread ka
+1 On May 7, 2:13 am, Mibu wrote: > Am I the only one driven mad by the new auto-appended signature to > every message in this group ("You received this message because you > are subscribed...")? It started on April 16th. Is there a way a > moderator can stop it? > > -- > You received this messag

Re: API for posting multipart/form-data

2010-05-09 Thread Richard Newman
Anyone know of a Clojure library (or wrapper) for posting HTTP multipart/form-data? Do you mean submitting or receiving? If you mean submitting, clj-apache-http will allow you to do it. Simply create any Apache HttpEntity and pass it as the value of

Re: API for posting multipart/form-data

2010-05-09 Thread Anniepoo
If you're using ring (and you should be!) there's a middleware layer that handles it http://mmcgrana.github.com/ring/middleware.multipart-params-api.html -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@goo

API for posting multipart/form-data

2010-05-09 Thread .Bill Smith
Anyone know of a Clojure library (or wrapper) for posting HTTP multipart/form-data? Bill Smith Austin, TX -- 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 a

Re: Question about namespaces

2010-05-09 Thread Mark Engelberg
The more I think about this, the more I feel like I don't have a good mental model of what's going on with namespaces/loading/reading/compiling. What is happening when you "load" a file without reading/compiling it (e.g., load-reader or load-file)? How does referring/using match up with those low

Re: Question about namespaces

2010-05-09 Thread James Reeves
On 9 May 2010 19:02, Laurent PETIT wrote: > 2010/5/9 Stuart Sierra : >>> http://www.google.com/url?sa=D&q=http://richhickey.github.com/clojure-contrib/ns-utils-api.html%23clojure.contrib.ns-utils/immigrate >> >> 'immigrate' is bad, it creates new Vars instead of new mappings to >> existing Vars, l

Re: Question about namespaces

2010-05-09 Thread Armando Blancas
> Unfortunately, this seems to break my consumer code.  Although > mylibrary can see the functions from library1 and library2, consumers > of mylibrary cannot.  So I end up manually having to go to all my > consumer files and changing them to: > (ns a-random-file-that-consumes-my-library >   (:use

Re: Question about namespaces

2010-05-09 Thread Mark Engelberg
On Sun, May 9, 2010 at 8:01 AM, David Nolen wrote: > If you just need to break up your code into smaller files another technique > is: > > ; me/lib.clj > (ns me.lib) > (load "me/foo") > (load "me/bar") > > ; me/foo.clj > (in-ns 'me.lib) > > ; me/bar.clj > (in-ns 'me.lib) > > I think this solves p

Re: Question about namespaces

2010-05-09 Thread Laurent PETIT
2010/5/9 Stuart Sierra : >> http://www.google.com/url?sa=D&q=http://richhickey.github.com/clojure-contrib/ns-utils-api.html%23clojure.contrib.ns-utils/immigrate > > 'immigrate' is bad, it creates new Vars instead of new mappings to > existing Vars, leading to very subtle and difficult-to-fix bugs.

Re: Question about namespaces

2010-05-09 Thread Stuart Sierra
> http://www.google.com/url?sa=D&q=http://richhickey.github.com/clojure-contrib/ns-utils-api.html%23clojure.contrib.ns-utils/immigrate 'immigrate' is bad, it creates new Vars instead of new mappings to existing Vars, leading to very subtle and difficult-to-fix bugs. -S -- You received this mess

Re: Testing private functions from another namespace?

2010-05-09 Thread Stuart Halloway
Please prefer the #'some.ns/var form to access a private var. I have add this to the coding standards doc: https://www.assembla.com/wiki/show/clojure/Clojure_Library_Coding_Standards Stu http://groups.google.com/group/clojure/browse_thread/thread/3835e5405ab930f6/ On May 8, 11:20 pm, Mark E

Re: Question about namespaces

2010-05-09 Thread David Nolen
If you just need to break up your code into smaller files another technique is: ; me/lib.clj (ns me.lib) (load "me/foo") (load "me/bar") ; me/foo.clj (in-ns 'me.lib) ; me/bar.clj (in-ns 'me.lib) On Sat, May 8, 2010 at 10:44 PM, Mark Engelberg wrote: > I've seen people say here that it's relati

Re: Using swank-clojure with clojure-1.2.0-master-SNAPSHOT

2010-05-09 Thread Benjamin Teuber
I'm using the following workaround for now: - remove clojure-snapshots from the secttion of the pom.xml - delete all jar's that are "too new" (guess sth. near the end of april) from maven_repository/org/clojure/clojure/1.2.0-master-SNAPSHOT - be happy This works as without the repository-declar

Re: Using swank-clojure with clojure-1.2.0-master-SNAPSHOT

2010-05-09 Thread Benjamin Teuber
Hi nipra, and which swank-clojure do you use on the emacs side? I guess not the one from ELPA, right? Cheers, Benjamin -- 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

Re: Question about namespaces

2010-05-09 Thread Laurent PETIT
Maybe this could help: http://richhickey.github.com/clojure-contrib/ns-utils-api.html#clojure.contrib.ns-utils/immigrate HTH, -- Laurent 2010/5/9 Mark Engelberg : > I've seen people say here that it's relatively easy to break up a > namespace into smaller components, so I'm wondering if I'm mi

Clojure Africa

2010-05-09 Thread Emeka
Hello All, I have heard of Clojure this , Clojure that, virtually every continent (every country) is duly represented except Africa. I have not heard of Clojure Africa, someone here is tell me to call it Clojure South Africa. Now , I have decided to start off somethingClojure Africa. Come join

Re: Testing private functions from another namespace?

2010-05-09 Thread ataggart
http://groups.google.com/group/clojure/browse_thread/thread/3835e5405ab930f6/ On May 8, 11:20 pm, Mark Engelberg wrote: > Is there an easy way to use clojure.test to test private functions of > one namespace from another namespace?  I remember seeing here that > there is some sort of trickery one