Re: Clojure Box Windows XP

2010-11-08 Thread Shawn Hoover
On Fri, Nov 5, 2010 at 9:41 PM, Scott Jaderholm wrote: > This sounds like a problem with emacs server/client that might be unrelated > to Clojure or Slime. Some configurations of emacs will start a server mode > so that you can run emacsclient and have a new frame pop up instantaneously. > If you

Re: Clojure for VS2010

2010-09-23 Thread Shawn Hoover
On Thu, Sep 23, 2010 at 4:20 PM, Will Kennedy wrote: > Some background: I've been spending some of my free time providing by > basic Clojure support in VS 2010. To be honest, I'm a bit of a Clojure > newbie, so I figured something that would require me to build a lexer > and parser for the langua

Re: Compilation fails in Clojure Box 1.2.0

2010-08-23 Thread Shawn Hoover
It's because slime-compile-file (C-c M-k) doesn't do anything unless the optional load parameter is true, and when you run the function from the keyboard shortcut, it doesn't get set. C-c C-k ends up calling that function with load=true. The distinction between to the two is false in Clojure anyway

Re: Windows distribution for Leiningen 1.3.0

2010-08-20 Thread Shawn Hoover
Works for me, thanks! On Fri, Aug 20, 2010 at 5:35 AM, Shantanu Kumar wrote: > Hi, > > I have created a Windows distribution for Leiningen 1.3.0 (by pruning > and modifying the lein.bat file a bit) that can be downloaded from > here: > > http://github.com/downloads/kumarshantanu/leiningen/leining

Re: Feedback on Clojure web development post

2010-07-26 Thread Shawn Hoover
On Sat, Jul 24, 2010 at 3:30 AM, Mark McGranaghan wrote: > Hi All, > > I recently posted to my blog on the process of developing and > deploying a simple Clojure web application: > > > http://mmcgrana.github.com/2010/07/develop-deploy-clojure-web-applications.html > > The purpose of this post is t

Re: How to: an anonymous recursive function

2010-06-30 Thread Shawn Hoover
On Wed, Jun 30, 2010 at 1:44 AM, Tim Robinson wrote: > So I am reading On Lisp + some blogs while learning Clojure (I know, > scary stuff :) > > Anyway, I've been playing around to see if I can get an anonymous > recursive function to work, but alas I am still a n00b and not even > sure what Cloju

Re: newline and println on windows

2010-06-30 Thread Shawn Hoover
On Wed, Jun 30, 2010 at 7:39 AM, David Powell wrote: > > I raised a ticket a while ago regarding newline and println on Windows. > > http://www.assembla.com/spaces/clojure/tickets/300-newline-should-output- > platform-specific-newline-sequence > > Currently these functions always output ASCII 10

Can't send from agent error handler?

2010-06-23 Thread Shawn Hoover
My first thought for an agent error handler was to send the exception to another agent. user=> (let [handler (agent nil) a (agent 42 :error-handler (fn [_ ex] (send handler (fn [_] (println ex)]

Re: working with agents and atoms - a beginner question

2010-06-15 Thread Shawn Hoover
On Tue, Jun 15, 2010 at 12:01 PM, Ryan Waters wrote: > I'm working with the code at the following gist and also pasted below: > > http://gist.github.com/421550 > > I'd like to have execution of a separate thread (agent) continue > running until it sees the atom 'running' change to false. > > Unfo

Re: clojure box: Problem with classpath (noob question)

2010-04-30 Thread Shawn Hoover
On Thu, Apr 29, 2010 at 6:58 PM, Rainer wrote: > Hello, > > I'm stuck with "Programming Clojure" on page 37 on a Windows 7 > machine. After downloading the "examples" dir into "C:/clojure", I > typed: > > user> (require 'examples.introduction) > > and I got > > ; Evaluation aborted. > > java.io.F

Re: ANN: labrepl, making Clojure more accessible

2010-03-24 Thread Shawn Hoover
On Wed, Mar 24, 2010 at 11:59 AM, invis wrote: > I am trying to start labrepl with emacs. > Labrepl is working nice, but I cant "slime-connect" :( > Have this message: > "open-network-stream: make client process failed: connection > refused, :name, SLIME Lisp, :buffer, nil, :host, 127.0.0.1, :ser

Re: Protocols and Types

2010-03-03 Thread Shawn Hoover
On Wed, Mar 3, 2010 at 8:43 AM, Andrea Tortorella wrote: > Hi everyone, > > if I run this code: > > (defprotocol P > (foo [x])) > > (deftype T [] > P > (foo [] "dummy")) > > (extends? P T) > ;==> nil > (satisfies? P T) > ;==> nil > (extenders P) > ;==>nil > > are they not yet implemented? > Ni

Re: ClojureCLR under slime / emacs?

2010-02-14 Thread Shawn Hoover
On Sat, Feb 13, 2010 at 11:43 PM, Mike K wrote: > Does anyone have ClojureCLR running under emacs via slime? > > Failing that, can anyone give me some pointers as to how I might > hacking swank-clojure.el (or whatever) to get this to work? > > Mike Hi Mike, I've not heard of anyone doing thi

Re: Clojars question

2010-02-03 Thread Shawn Hoover
On Tue, Feb 2, 2010 at 2:35 PM, Meikel Brandmeyer wrote: > PS: On Windows deployment to Clojars does not work due to scp trouble. Only > Unix/Mac OS X supported at the moment for deployment. > If that's a blocker for anyone on Windows, they should parameterize the Clojars scp program and set it

Re: clojure box 1.0 failed to connect to emacs server

2010-01-31 Thread Shawn Hoover
On Sat, Jan 30, 2010 at 10:11 PM, Shawn Hoover wrote: > > On Sat, Jan 30, 2010 at 5:48 PM, Rollo wrote: > >> Hi Shawn, >> >> Just tried with 1.1.RC1 - no luck. Emacs server won't start and system >> will start spawning thousands of cmdproxy processes again.

Re: clojure box 1.0 failed to connect to emacs server

2010-01-30 Thread Shawn Hoover
On Sat, Jan 30, 2010 at 5:48 PM, Rollo wrote: > Hi Shawn, > > Just tried with 1.1.RC1 - no luck. Emacs server won't start and system > will start spawning thousands of cmdproxy processes again. > Where does that bad condition comes from? > Let me know if I can help diagnose or test further. > > T

Re: clojure box 1.0 failed to connect to emacs server

2010-01-30 Thread Shawn Hoover
Sounds pretty bad! I'll look into it. Can one of you confirm the versions in play? The thread is talking about 1.0 and 1.0rc1, but I'm wondering if you mean 1.1.0. Shawn On Fri, Jan 29, 2010 at 1:41 PM, Rollo wrote: > Seconded. I have the same problem on win7, augmented by the fact that > emacs

Re: classpath in clojure box

2010-01-14 Thread Shawn Hoover
On Thu, Jan 14, 2010 at 3:17 AM, brian wrote: > The above didn't work, but apparently it doesn't pick up my .emacs file, > which has > > (setq swank-clojure-classpath >(list "c:/shcloj-code/code/examples")) > > itknows where home is, when it boots up, the default is my home dir, where > .emac

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Wed, Jan 13, 2010 at 8:38 PM, brian wrote: > > I was wondering if this is the right statement for setting the external > classpath? > > setq swank-clojure-classpath > Another way is to use M-x swank-clojure-project. You enter a directory and it automatically adds that directory/src to the cl

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Wed, Jan 13, 2010 at 8:38 PM, brian wrote: > > I was wondering if this is the right statement for setting the external > classpath? > > setq swank-clojure-classpath > That's the right variable. You can set it, and then Clojure Box's setup appends to it to make sure clojure, contrib, and swan

Re: trying to call jar files in clojure box

2010-01-13 Thread Shawn Hoover
On Tue, Jan 12, 2010 at 8:20 PM, brian wrote: > Hi, > > I am not sure if this is a Clojure Box problem or a compojure problem but > in an attempt to try calling external jars files in clojure box,and wanting > to try compojure, to eliminate any possible path problems, I've put > compojure and all

Re: classpath in clojure box

2010-01-13 Thread Shawn Hoover
On Tue, Jan 12, 2010 at 10:05 PM, brian wrote: > Hi all, > > > I put the example code from Programming Clojure book > here: > > C:\shcloj-code\code\examples > > I verified that "introduction.clj" is there. > > This is cut and pasted from my .emacs file located in c:\program > files\brian > > > (

Re: clojure box "value as variable is void ?"

2010-01-11 Thread Shawn Hoover
On Mon, Jan 11, 2010 at 5:36 PM, brian wrote: > > (setq swank-clojure-classpath > > (list “c:/dev/project/src” “c:/dev/my-lib.jar”)) > > > > and I get this error when I bring clojure box up: > > Warning (initialization): An error occurred while loading `c:/Documents and > Settings/brian/.emacs':

Re: Clojure Box 1.1

2010-01-11 Thread Shawn Hoover
On Mon, Jan 11, 2010 at 3:49 PM, Chris Jenkins wrote: > Out of curiosity, what configuration do you have in place that's causing >> clojure.contrib.pprint to be loaded? >> >> > I'm not sure - all I did was to install Clojure Box and then I immediately > saw the error message when it started up. D

Re: Clojure Box 1.1

2010-01-11 Thread Shawn Hoover
On Mon, Jan 11, 2010 at 2:01 PM, Chris Jenkins wrote: > PS: FYI here's the full text that I see in my *inferior-lisp* buffer: > > (require 'swank.swank) > > (swank.swank/ignore-protocol-version nil) > > (do (.. java.net.InetAddress getLocalHost getHostAddress) > nil)(swank.swank/start-server > "c

Re: Having difficulties with compilation in slime, emacs and clojure-project

2010-01-08 Thread Shawn Hoover
On Fri, Jan 8, 2010 at 4:39 AM, Zef Hemel wrote: > After I do the swank clojure project command, enter the directory and > press return my Emacs gets stuck doing this: http://imgur.com/Ap8mo > When I just go to the Slime CLI that works fine. Any idea what could > be wrong there? > > Zef > Check

Re: Having difficulties with compilation in slime, emacs and clojure-project

2010-01-08 Thread Shawn Hoover
On Thu, Jan 7, 2010 at 11:37 PM, Joel wrote: > Hello, > I have an emacs setup on OSX using elpa with the latest clojure-mode, > swank-clojure, slime, slime-repl all from ELPA. When I upgraded to the > latest swank-clojure in ELPA (swank-clojure-1.1.0), I began to get > this error as well: > > > S

Re: swank-clojure installation failure via ELPA

2010-01-02 Thread Shawn Hoover
on (point-min) (point-max) - (concat pkg-dir file-name ".el") - nil nil nil 'excl) + (package-write-file-no-coding (concat pkg-dir file-name ".el") 'excl) On Sat, Jan 2, 2010 at 12:35 PM, Mike K wrote: > On Jan 2, 9:

Re: swank-clojure installation failure via ELPA

2010-01-02 Thread Shawn Hoover
Hi Mike, Is there anything useful going on in *messages*? On Sat, Jan 2, 2010 at 9:07 AM, Mike K wrote: > Hi all, > > I'm trying to get all the latest and greatest swank-clojure 1.1.0 > goodness via ELPA, but no joy. I'm starting with an absolutely clean > slate. I'm running a freshly install

Re: Deprecate replicate?

2009-12-17 Thread Shawn Hoover
On Thu, Dec 17, 2009 at 7:50 PM, Sean Devlin wrote: > Hey everyone, > I just noticed that replicate's functionality is now duplicated by > repeat. Should this function be deprecated? > > Sean > This was discussed before [1] as part of another issue [2], but I don't know what happened to the sepa

Re: variation of time macro

2009-12-14 Thread Shawn Hoover
On Mon, Dec 14, 2009 at 3:18 PM, Sean Devlin wrote: > Could you add support for stdev as well, or better yet a helper macro > to return a vector of run times? > > I don't want Zed to find out... > > Read at your own risk: > http://www.zedshaw.com/essays/programmer_stats.html Uh oh, I *have *read

variation of time macro

2009-12-13 Thread Shawn Hoover
I see usages of the time macro that wrap the expression of interest in a call to dotimes. Is there any interest in an overload of time that takes an additional parameter for a number of iterations, evaluates the expression that many times, and prints the average time in the report? Usage: user> (t

Re: Help with closures

2009-10-09 Thread Shawn Hoover
On Fri, Oct 9, 2009 at 10:37 PM, Mark Tomko wrote: > ; a returns a new similarity function that applies the provided > transform function > ; before comparing a pair of collections > (defn make-coll-similarity-fn [coll-transform] > (fn [coll1 coll2] coll-similarity [coll1 coll2 coll-transform]))

Re: ClojureCLR and CLR structs

2009-10-01 Thread Shawn Hoover
Works for me. Thanks! On Thu, Oct 1, 2009 at 1:24 AM, David Miller wrote: > > Should be fixed in the latest commit. > Any of the following will work. > > > (System.Reflection.Assembly/Load "WindowsBase, Version=3.0.0.0, > Culture=neutral, PublicKeyToken=31bf3856ad364e35") > (import '(System.Wind

Re: ClojureCLR and CLR structs

2009-09-30 Thread Shawn Hoover
et; > > (a2) looks like: > > object obj2 = new Matrix(); >((Matrix) obj2).Scale(2.0, 3.0); >return obj2; > > I need to make (a2) look like: > > Matrix obj2 = new Matrix(); >obj2.Scale(2.0, 3.0); >return obj2; > > > -David > > >

Re: ClojureCLR installation?

2009-09-30 Thread Shawn Hoover
On Wed, Sep 30, 2009 at 1:39 PM, John Harrop wrote: > On Tue, Sep 29, 2009 at 7:21 PM, David Miller wrote: > >> Mono: >> - One BigDecimal implementation away from getting serious about >> this. > > > Why doesn't Mono have a BigDecimal analogue? It shouldn't, in principle, be > difficult to crea

ClojureCLR and CLR structs

2009-09-29 Thread Shawn Hoover
Updates to local CLR struct instances seem to be lost as soon as they're made. Is this expected? In the test below, function a2 returns the identity matrix despite my attempt to scale it. Function a passes the newly constructed matrix to another function to do the scaling, and it returns the scaled

Re: ClojureCLR installation?

2009-09-28 Thread Shawn Hoover
On Mon, Sep 28, 2009 at 9:58 AM, Sean Devlin wrote: > > Hey guys, > I recently found a need to use the CLR. As such, I've got some > general questions about ClojureCLR > > 1. Is there a ClojureCLRBox or anything similar? > No, just the instructions on the github wiki. > 2. Does anyone know o

Re: ClojureCLR NullReferenceException

2009-09-16 Thread Shawn Hoover
On Wed, Sep 16, 2009 at 12:28 PM, Shawn Hoover wrote: > I'm trying to run the celsius sample recently committed to ClojureCLR. It > works fine when I run Clojure.Main from Visual Studio, but from a command > line I get this: > c:\Users\Shawn\clojure-clr\Clojure\Cloju

ClojureCLR NullReferenceException

2009-09-16 Thread Shawn Hoover
I'm trying to run the celsius sample recently committed to ClojureCLR. It works fine when I run Clojure.Main from Visual Studio, but from a command line I get this: c:\Users\Shawn\clojure-clr\Clojure\Clojure.Main\bin\Debug >Clojure.Main.exe Clojure 1.1.0-alpha-SNAPSHOT user=> (import '(System.Windo

Re: Why doesn't regex implement ifn?

2009-08-28 Thread Shawn Hoover
On Thu, Aug 27, 2009 at 9:05 PM, Chas Emerick wrote: > > > On Aug 27, 2009, at 1:34 PM, Chouser wrote: > > > The benefits of #"" producing a real java.util.regex.Pattern > > object instead of some Clojury wrapper will decrease as it > > becomes more common to write Clojure code that can run on >

Re: Getting .NET Version of Clojure to run

2009-08-26 Thread Shawn Hoover
On Sat, Aug 15, 2009 at 8:36 AM, David Miller wrote: > Clojure.Compile is just for AOT-compilation. It will compile whatever > libs are on the command line. As you state, it is used to bootstrap, > i.e. compile core.clj and the rest of the bootstap clojure code into > assemblies, which can then

Re: Clojure box - loading book examples from "Programming Clojure"

2009-07-08 Thread Shawn Hoover
On Wed, Jul 8, 2009 at 2:56 PM, Mani wrote: > > Thanks Shawn, Robert. > From Robert's post, I am bit confused here. I also read that .emacs is > in %appdata% folder (vista), but all I see is .emacs.d folder (which I > guess is for the emacs server). I tried creating one "C-x C-f > ~/.emacs" - und

Re: Clojure box - loading book examples from "Programming Clojure"

2009-07-08 Thread Shawn Hoover
Sorry, the snippet author was Daniel Lyons. Here's a link to the other thread: http://groups.google.com/group/clojure/browse_thread/thread/6198db7d82610293 On Wed, Jul 8, 2009 at 2:14 PM, Shawn Hoover wrote: > Oh, here's an example snippet I just saw from Daniel Lyon on another t

Re: Clojure box - loading book examples from "Programming Clojure"

2009-07-08 Thread Shawn Hoover
;-Dclojure.compile.path=/Users/ fusion/Projects/Languages/Clojure/classes")) On Wed, Jul 8, 2009 at 2:02 PM, Shawn Hoover wrote: > > On Wed, Jul 8, 2009 at 2:55 AM, dumb me wrote: > >> >> Hi All, >> >> I am a dumb around here. my first post among many to co

Re: Clojure box - loading book examples from "Programming Clojure"

2009-07-08 Thread Shawn Hoover
On Wed, Jul 8, 2009 at 2:55 AM, dumb me wrote: > > Hi All, > > I am a dumb around here. my first post among many to come :) > > I setup clojurebox to work thru the book. I am a newbie to emacs and > to clojure. I don't mind the learning curve to emacs. > > I am completely blank about configuring

Re: Questions / guidelines for adopting Clojure

2009-07-07 Thread Shawn Hoover
On Tue, Jul 7, 2009 at 11:47 AM, Chouser wrote: > > On Tue, Jul 7, 2009 at 8:08 AM, Roman > Roelofsen wrote: > > * Real-world macros * > > > > Correct me if I am wrong, but it seems that people often use macros > > for lazy evaluation of parameters. In Scala, it is quite easy to > > accomplish th

Re: loneclojurian at ICFP programming contest

2009-07-03 Thread Shawn Hoover
On Fri, Jul 3, 2009 at 9:29 AM, igorrumiha wrote: > > On Jul 2, 7:13 pm, Nicolas Oury wrote: > > You can also try to replace the arithmetic by unchecked arithmetic. (Is it > > correct from the point of view of the semantic of the VM you are > > implementing?). > > I didn't get to that yet becaus

Re: loneclojurian at ICFP programming contest

2009-07-01 Thread Shawn Hoover
Another one: http://bitbucket.org/shoover/icfp. Like Jeff we had fun on the VM but didn't get to post a solution :) On Wed, Jul 1, 2009 at 1:34 AM, Jeff Foster wrote: > > I looked at the ICFP Contest too. I didn't even get as far as solving > the first problem, but I did implement a virtual mach

Re: Updating a running app

2009-06-11 Thread Shawn Hoover
On Thu, Jun 11, 2009 at 5:06 AM, rb wrote: > > HI, > > in his post "Macro design, by example" [1], Meikel Brandmeyer > mentioned that it is possible to reload a function (in contrast to a > macro) in a running application: > > "Now all you have to do is to just reload the single function in the >

Re: (Potentially stupid) Question about recursion / trampoline

2009-06-10 Thread Shawn Hoover
On Tue, Jun 9, 2009 at 6:04 PM, arasoft wrote: > > I tried this: > > (declare F) > > (defn M [n] > (if (zero? n) >0 >(- n (F (M (dec n)) > > (defn F [n] > (if (zero? n) >1 >(- n (M (F (dec n)) > > and for large n I got the expected stack overflow. Then I tried to > tramp

Re: You know you've been writing too much Clojure when...

2009-06-02 Thread Shawn Hoover
On Tue, Jun 2, 2009 at 9:52 AM, Michael Reid wrote: > > On Fri, May 29, 2009 at 2:51 PM, Paul Stadig wrote: > > You meant to type disclosure, but instead you typed disclojure. > > > > Paul > > > How about when you try to write code in other languages, and > reflexively place parentheses before f

Re: ClojureCLR updated

2009-06-01 Thread Shawn Hoover
On Mon, Jun 1, 2009 at 4:15 PM, Konrad Hinsen wrote: > > On 01.06.2009, at 19:57, David Miller wrote: > > > :> It'd be much easier to play with if you provide a precompiled > > :> executable :) > > > > I thought about that. Adding assembilies of my code as a download is > > easy enough. However

Re: ClojureCLR updated

2009-05-31 Thread Shawn Hoover
On Sun, May 31, 2009 at 4:08 AM, dmiller wrote: > > I've posted a major update to the ClojureCLR code to clojure-contrib. > However, if you want to stay up with the latest changes, I recommend > gitting the code at http://github.com/dmiller/ClojureCLR. Consult the > wiki there for information on

Re: Weird Clojure Box - library issue

2009-05-29 Thread Shawn Hoover
On Tue, May 26, 2009 at 4:24 AM, hoeck wrote: > > > > On 20 Mai, 14:25, Shawn Hoover wrote: > > I can't help with COM, but this patch might help slime automatically > connect > > to the REPL on Windows XP: > http://bitbucket.org/shoover/clojure-box-swank-clo

Re: Weird Clojure Box - library issue

2009-05-20 Thread Shawn Hoover
On Wed, May 20, 2009 at 3:32 AM, hoeck wrote: > > i tried importing those two classes from a recent jacob with slime, > xemacs and w2k and exactly the same is happening here. I have a > similar problem when starting slime, my emacs blocks and doesn't start > the repl until i evaluate some random

Re: stumped by class not found (vista)

2009-05-11 Thread Shawn Hoover
On Mon, May 11, 2009 at 7:13 PM, tarvydas wrote: > > - Where does the output from println go? I put println's in the proxy > callbacks, but I don't see the output in the slime repl nor in the > *Messages* buffer (I know that the callbacks are working, because they > also alter components of the g

Re: Getting slime-edit-definition to work with Clojure

2009-05-11 Thread Shawn Hoover
On Fri, May 8, 2009 at 5:43 AM, Baishampayan Ghose wrote: > > Stephen C. Gilardi wrote: > > > I've simplified my .emacs file and clojure launch script to only what's > > required for my slime setup to work with swank-clojure. With this > > simplified setup, I confirmed that slime's repl works and

Re: HTTP clients in clojure

2009-05-06 Thread Shawn Hoover
I was recently tipped off to this nascent project: http://github.com/technomancy/clojure-http-client/tree/master On Wed, May 6, 2009 at 8:34 PM, Eric Tschetter wrote: > > Last I checked the various clojure libraries, it seemed like noone has > publicized a set of wrappers/clojure-native implemen

Re: Printing to REPL from other threads in Slime

2009-05-06 Thread Shawn Hoover
On Tue, May 5, 2009 at 11:18 PM, Mark Engelberg wrote: > > I'm using Clojure Box's Emacs/Slime setup. When I invoke println > from a newly-spun thread, I don't see the output in the REPL. > > Suggestions? > It's going to the *inferior-lisp* buffer. If you run M-x slime-redirect-inferior-output

Re: Getting slime-edit-definition to work with Clojure

2009-04-28 Thread Shawn Hoover
On Mon, Apr 27, 2009 at 3:08 AM, Baishampayan Ghose wrote: > > Phil, > > It works for me. Are you trying to look up a built-in clojure function > > or one from your own application? How did you install SLIME and > > swank-clojure etc? > > It doesn't work for either. When I try looking up a clojure

contrib mercurial mirror is back up

2009-04-23 Thread Shawn Hoover
My bitbucket contrib mirror is public again at http://bitbucket.org/shoover/clojure-contrib-mirror. Thanks to bitbucket for munging unrecognized email addresses per my request. Shawn --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: DISCUSS: clojure.contrib.java-utils/with-system-properties

2009-04-05 Thread Shawn Hoover
I was wondering if anyone would ever need this functionality. Knock yourself out. In retrospect a map is definitely the way to go. Shawn On Sun, Apr 5, 2009 at 12:36 PM, Stuart Halloway wrote: > Don't work with the yucky properties API, just install a map of properties > for the duration of a bl

Re: March 20th 2009 Rich Hickey Appreciation Day!

2009-03-21 Thread Shawn Hoover
On Fri, Mar 20, 2009 at 2:26 PM, Rayne wrote: > > I Anthony Simpson, with the support of fellow Clojurists hereby > declare March 20th, the first day of spring, Rich Hickey appreciation > day! > The first day of spring is very fitting for this occasion. Rich, the pragmatism, objectivity, clarity

Re: Improving the test suite

2009-03-17 Thread Shawn Hoover
On Tue, Mar 17, 2009 at 12:03 AM, Phil Hagelberg wrote: > > > OK, so I've posted a fair amount of "smack talk" about test suites and > how important they are--I figure it's time to help out. > > What are some ways in which test-clojure is lacking? How can I help > improve the coverage? > > -Phil

Re: SLIME: evaluating forms?

2009-03-17 Thread Shawn Hoover
On Tue, Mar 17, 2009 at 6:40 AM, Elena wrote: > > I'm writing a Clojure source file. I thought that C-M-x (slime-eval- > defun) would send the current toplevel form to the REPL but I was > wrong. For instance, if I evaluate: > > (ns test >(:import (java.net InetAddress))) > > from the sou

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Shawn Hoover
On Mon, Mar 16, 2009 at 9:18 PM, Stuart Sierra wrote: > > On Mar 16, 7:17 pm, BerlinBrown wrote: > > After many years (decade) of web development, here are the things that > > I want in a framework, mostly based in clojure: > > > > What do you think and what you add. This is ambitious and just a

Re: Clojure Box

2009-03-16 Thread Shawn Hoover
On Mon, Mar 16, 2009 at 1:08 PM, Kyle R. Burton wrote: > > Clojure Box works well, I'd like to make a feature request: can you > add paredit [1]? Including it in the distribution (perhaps with it > disabled) would be great. > Good idea. It used to be packaged with clojure-mode automatically, bu

Re: swank-clojure-extra-classpaths troubles

2009-03-16 Thread Shawn Hoover
On Mon, Mar 16, 2009 at 2:39 PM, Tassilo Horn wrote: > Yes, for me having directories in `swank-clojure-extra-classpaths' > doesn't work at all. Everything except jar files are discarded. So > that's the general problem for me, the examples are one specific case > which bites me. > > Bye, > Tass

Re: swank-clojure-extra-classpaths troubles

2009-03-16 Thread Shawn Hoover
On Tue, Mar 10, 2009 at 7:21 AM, Tassilo Horn wrote: > user> (require 'examples.introduction) > > I get this exception: > > , > | java.io.FileNotFoundException: Could not locate \ > | examples/introduction__init.class or \ > | examples/introduction.clj on classpath: (NO_SOURCE_FIL

Re: "08" and "09" are invalid numbers, but "01" through "07" are fine?

2009-03-12 Thread Shawn Hoover
On Thu, Mar 12, 2009 at 5:13 PM, Meikel Brandmeyer wrote: > Hi, > > Am 12.03.2009 um 22:08 schrieb levand: > > Seems like there's a bug here. All the digits less than 8 work. If >> leading zeros aren't allowed, at least the behavior ought to be >> consistent. >> > > Leading zeros indicate octal,

Re: Workflow poll?

2009-03-11 Thread Shawn Hoover
On Sat, Mar 7, 2009 at 4:53 PM, Mark Engelberg wrote: > > I've been using the Clojure-in-a-box setup for Windows, which was > absolutely instrumental in getting me to try out Clojure. But if I > keep downloading the latest versions of Clojure, it drifts out of sync > with the included SLIME devel

Re: Privacy problems with clojure-contrib mirrors

2009-03-09 Thread Shawn Hoover
Konrad, I wish you had used a normal Google account instead of one with your personal email address--I didn't know Google allowed that, but or course there's no changing the past commits now. Since Bitbucket is ignoring my request to display email addresses the way Google Code does, I've made my re

Re: On the importance of recognizing and using maps

2009-03-08 Thread Shawn Hoover
On Sun, Mar 8, 2009 at 6:13 PM, Dan wrote: > > > I'm pretty sure structs are only appropriate for when you need to eek > > the absolute last iota of performance out of a collection, in which case > > they can provide greater speed than maps. But since the list of keys is > > fixed, it means it's

Re: Clojure infinite loop

2009-03-06 Thread Shawn Hoover
On Fri, Mar 6, 2009 at 12:24 AM, mike.farn...@gmail.com < mike.farn...@gmail.com> wrote: > > So, I downloaded clojure and started it up with the command: > java -cp clojure.jar clojure.lang.Repl > > The docs indicate: "This will bring up a simple read-eval-print loop > (REPL)." > > Is this truly a

Re: "Adding" strings

2009-02-26 Thread Shawn Hoover
On Thu, Feb 26, 2009 at 11:11 AM, Peter Wolf wrote: > > Hey all, > > What is the idiomatic way to concatenate strings? Here are some things > that I expected to work, but didn't > >(+ "foo" "bah") >(conj "foo" "bah") >(into "foo" "bah") > > For the moment I am doing > >(.concat "

Re: Contributing

2009-02-19 Thread Shawn Hoover
On Thu, Feb 19, 2009 at 9:44 AM, Joshua wrote: > > Thanks, Ill see what I can do. > > Joshua > If you decide to pitch in, be sure to read http://clojure.org/contributing. Discuss on this list before getting too far into something, to make sure the direction is acceptable and that there's no dupl

Re: how to learn clojure ?

2009-02-18 Thread Shawn Hoover
On Wed, Feb 18, 2009 at 9:04 AM, Joshua Fox wrote: > Try this book http://www.pragprog.com/titles/shcloj/programming-clojure > Agreed, that book is a good introduction to Lisp and Clojure for programmers from other backgrounds, as are the Clojure for Java Programmers screencasts at http://clojur

with-properties macro

2009-02-15 Thread Shawn Hoover
In testing some code in clojure.main I needed a macro to set system properties, run the test, and pop off the properties. If others find this useful, we can make it more accessible in contrib. Look here if you're interested: http://code.google.com/p/clojure-contrib/source/browse/trunk/src/clojure/c

Re: Concurrency and file writing

2009-02-15 Thread Shawn Hoover
On Sat, Feb 14, 2009 at 5:44 PM, James Reeves wrote: > > On Feb 14, 5:30 pm, Dan wrote: > > What about making the file an agent and sending write actions to it? > > I don't see how that would solve the problem, unless you're suggesting > that I have a single agent to handle all reads and writes?

Re: error running example

2009-02-11 Thread Shawn Hoover
On Wed, Feb 11, 2009 at 3:10 PM, Harrison Maseko wrote: > > Hi everyone, > I just downloaded Clojure Box today and tried to run the example found > at http://clojure.org/jvm_hosted and I get the error below. What is > the problem? > Harrison > > java.lang.Exception: Unable to resolve symbol: setL

Re: newbie question on compilation

2009-02-10 Thread Shawn Hoover
On Tue, Feb 10, 2009 at 11:32 AM, Tzach wrote: > > Thanks for the response > Yes, I'm using Emacs SLIM. > > what should be the relation between the file (hello.clj) path to the > classpath? > Is the compile work on the file name, or on the function? in other > word, should I evaluate the function

Re: newbie question on compilation

2009-02-10 Thread Shawn Hoover
On Tue, Feb 10, 2009 at 10:07 AM, Lennart Staflin wrote: > > > > On Feb 10, 2:45 pm, Tzach wrote: > > > I got "error in process filter: Wrong number of arguments: nil, 3". > > What am I missing here? > > Are you using Emacs with slime? > > Psychic debugging skills in action :) --~--~-~--

Re: Discarding entire transactions

2009-02-08 Thread Shawn Hoover
On Sun, Feb 8, 2009 at 12:23 PM, Anand Patil < anand.prabhakar.pa...@gmail.com> wrote: > > Hello again, > > In my application, I'll frequently want to quickly discard all the > changes made during a transaction involving many refs. I don't want to > force the refs to roll back to their values at t

Re: General form of apply

2009-02-06 Thread Shawn Hoover
On Fri, Feb 6, 2009 at 1:19 PM, Konrad Hinsen wrote: > > The doc string of apply says: > >([f args* argseq]) >"Applies fn f to the argument list formed by prepending args to > argseq." > > This looks like I could pass in several argument PLUS one sequence of > arguments, which just

Re: Stumped - Java hangs when using Swing in Slime

2009-02-05 Thread Shawn Hoover
On Thu, Feb 5, 2009 at 4:52 AM, David wrote: > > I've got the same problem as srolls24 and CuppoJava on Windows XP, > using Emacs 23 > and versions of Clojure, Slime and Swank fetched today. > > Also, when starting Slime, it opens a connection to *inferior-lisp*, > but keeps polling > for Swank u

Indy .NET programmers discover parentheses

2009-01-29 Thread Shawn Hoover
Heartland Clojure Users, I'm giving a presentation on Clojure next month for the Indianapolis ALT.NETgroup. The talk is aimed at .NET programmers, introducing Clojure and showing them why they might care. More description and meeting details: http://indyalt.net/cms/meeting/february-2009/clojure

Re: repeat and replicate

2009-01-28 Thread Shawn Hoover
On Wed, Jan 28, 2009 at 4:36 PM, Stephen C. Gilardi wrote: > > On Jan 28, 2009, at 10:17 AM, Christian Vest Hansen wrote: > > Or replicate could go away. > > More likely, I think one of them could take multiple arities and make > the other obsolete. > > > I like "repeat" with multiple arities and

Re: changes to test_clojure and test_contrib

2009-01-28 Thread Shawn Hoover
On Wed, Jan 28, 2009 at 11:18 AM, Frantisek Sodomka wrote: > > Shawn, I keep wondering where is the best place to put tests for bug fixes. > One way would be to create a separate file (bugs.clj) and put all these > tests there. Another way is to include these tests into their respective > categori

repeat and replicate

2009-01-27 Thread Shawn Hoover
Why do we have both repeat and replicate? I can sort of keep them straight, but as they only differ by arity I wonder if they can be combined... or if I'm missing a subtle reason for separate names. A user in IRC threw out the possibility of infinite vs. finite functions, but interleave and map see

Regression tests for contrib consideration

2009-01-26 Thread Shawn Hoover
I've written a few tests for bug fixes from the main line of Clojure, and I would like to get feedback and contribute them to contrib if they're useful. I have patches to clojure.contrib.test-clojure for the following topics: reader: numeric constants of different types don't overwrite each other

Re: changes to test_clojure and test_contrib

2009-01-26 Thread Shawn Hoover
On Sun, Jan 25, 2009 at 6:51 PM, Frantisek Sodomka wrote: > I have some tests ready for test_clojure. I asked Rich for SVN access > rights. There is gonna be more tests soon :-) > > Frantisek > Contrib Stewards, I have a few tests in the works and am lacking commit access as well. Should test co

Re: Newbie problem

2009-01-17 Thread Shawn Hoover
On Sat, Jan 17, 2009 at 9:09 AM, mbrodersen wrote: > > Hi > > I am having fun learning Clojure but have a problem with the following > code. If you run the code with the ;OK removed then it works. If you > run the code with ;ERROR removed then it doesn't. > > The code is my own implementation of s

Re: File organization & bootstrapping

2009-01-07 Thread Shawn Hoover
On Wed, Jan 7, 2009 at 1:45 PM, Greg Harman wrote: > > Bingo - *compile-path* was a relative dir. Defining it as the full > path did the trick. > > Thanks! > > > Also, make sure the directory named by *compile-path* exists on the file > > system. Compilation creates subdirs, but not *compile-path

Re: File organization & bootstrapping

2009-01-07 Thread Shawn Hoover
On Wed, Jan 7, 2009 at 12:34 PM, Greg Harman wrote: > > This is frustrating - with a fresh REPL I'm back to the compile > problem. I can't think of anything I changed that would cause it to > work intermittently, and I don't know what file it's looking for... > the source files are on the classpa

Re: Clojure Box, alpha

2009-01-05 Thread Shawn Hoover
On Mon, Jan 5, 2009 at 4:24 PM, bOR_ wrote: > > Just downloaded clojurebox and it installs like a charm here (windows > vista business). It looks like I am stuck with windows at my new > workspace (just had my first day of work there), so to have clojurebox > was a nice thing. One question is how

Re: Emacs / Slime questions

2008-12-12 Thread Shawn Hoover
On Fri, Dec 12, 2008 at 6:40 AM, Mark Engelberg wrote: > > On Sun, Dec 7, 2008 at 12:24 PM, Bill Clementson > wrote: > >> 3. If something in the REPL is running in an infinite loop, how do I > >> interrupt evaluation? > > > > C-c C-c usually works for me (not sure about Windows) > > This isn't w

Re: xml/parse

2008-12-11 Thread Shawn Hoover
On Thu, Dec 11, 2008 at 3:01 PM, Robert Koberg wrote: > > Hi, (very new to clojure, emacs and lispish things) > > I am using the latest downloadable clojure (rather than SVN, which I > do have and see it is a bit different) in Aquamacs. I have installed > the clojure mode and am using it with inf

Re: Emacs / Slime questions

2008-12-08 Thread Shawn Hoover
On Sun, Dec 7, 2008 at 10:03 PM, Mark Engelberg <[EMAIL PROTECTED]>wrote: > > Thanks for all the info. I've searched my whole hard drive for a > .emacs file, and can't find one. Can someone tell me where Clojure > Box stores this file, or whether it's called something entirely > different? > Cl

Re: commute

2008-11-26 Thread Shawn Hoover
On Wed, Nov 26, 2008 at 1:55 PM, Mark Volkmann <[EMAIL PROTECTED]>wrote: > > The documentation for commute says "Sets the in-transaction-value of > ref ...". This implies to me that when the transaction ends, the ref > will have its previous value. > > (def myRef (ref 19)) > (dosync (commute myRef

  1   2   >