Trickiness with protocols and extends (1.3.0)

2011-10-28 Thread Howard Lewis Ship
I'm hitting a bit of frustration with (defprotocol) and friends and I'm hoping someone can enlighten me: Context: this is part of the Cascade layer I'm building on top of Compojure. It's all about rendering markup, borrowing ideas from Tapestry. I have a protocol that represents Assets: any kind

Re: trouble setting up emacs

2011-10-24 Thread Howard Lewis Ship
I've gotten as far as changing to a directory with a project.clj and execute C-c C-j C-i I see this in my *swank* buffer: Process swank exited abnormally with code 127 sh: line 1: lein: command not found lein is on my search path (in ~/bin). Where do I update things so that it is on the path

Re: trouble setting up emacs

2011-10-24 Thread Howard Lewis Ship
? In any case, my next step is to see if Swank is working (it would help if I knew what Swank was supposed to do!) On Mon, Oct 24, 2011 at 4:33 PM, Phil Hagelberg p...@hagelb.org wrote: On Mon, Oct 24, 2011 at 4:28 PM, Howard Lewis Ship hls...@gmail.com wrote: lein is on my search path (in ~/bin

Re: trouble setting up emacs

2011-10-24 Thread Howard Lewis Ship
on where to start? On Mon, Oct 24, 2011 at 4:55 PM, Howard Lewis Ship hls...@gmail.com wrote: This was helpful: http://www.emacswiki.org/emacs/MacOSTweaks#toc14 I added the following to my init.el: (setenv PATH (concat (getenv PATH) :~/bin)) (setq exec-path (append exec-path `(~/bin

Re: Who will be at QCon SF?

2011-10-22 Thread Howard Lewis Ship
I'll be there to talk about JVM meta programming (not about Clojure). On Fri, Oct 21, 2011 at 5:25 AM, Demetrius Nunes demetriusnu...@gmail.com wrote: Me too! It's gonna be great! On Wed, Oct 19, 2011 at 10:30 PM, Abbas abbas.r...@gmail.com wrote: Look forward to your talk. Cheers, Abbas

Re: State of Clojure web development

2010-06-24 Thread Howard Lewis Ship
On Wed, Jun 23, 2010 at 2:23 PM, James Reeves weavejes...@googlemail.com wrote: Hello there! Chas Emerick's recent State of Clojure survey [http://bit.ly/dtdAwb] indicated that a significant proportion of Clojure users are beginning to use Clojure for web development. A recent Hacker News

Re: cond formatting

2010-06-22 Thread Howard Lewis Ship
On Tue, Jun 22, 2010 at 4:42 PM, rob levy r.p.l...@gmail.com wrote: user= (ns utils) utils= (ns-unmap 'utils 'cond) utils= (defmacro cond [ body] `(clojure.core/cond ~@(apply concat body))) #'utils/cond utils= (macroexpand-1 '(cond (false false) (true true))) (clojure.core/cond false false

Submission to Duke's Choice Award

2010-06-21 Thread Howard Lewis Ship
Has anyone put together a submission for Clojure to Duke's Choice? http://www.oracle.com/dm/10q4cif/em050238/em050238_duke_choice_awards_welcome_new.html We just need to capture what makes Clojure special in 500 words. -- Howard M. Lewis Ship Creator of Apache Tapestry The source for

Re: Leiningen documentation review?

2010-06-18 Thread Howard Lewis Ship
I've been using Lein in earnest the last couple of days, prepping for a talk on Clojure for OSCON. I'm hitting enough issues to make me think that 1.2 needs a bit of TLC before a release. Don't get me wrong; I like Lein, how easy it installs, and how focused it is. I'm just finding that, despite

Re: Upgrade from 1.1 to 1.2

2010-06-18 Thread Howard Lewis Ship
On Thu, Jun 17, 2010 at 11:50 PM, Laurent PETIT laurent.pe...@gmail.com wrote: Hi, 2010/6/18 Wilson MacGyver wmacgy...@gmail.com: ^ was deprecated in 1.1 as per release note below The ^ reader macro has been deprecated as a shortcut for meta in the hopes that it can eventually replace the #^

Re: Upgrade from 1.1 to 1.2

2010-06-18 Thread Howard Lewis Ship
I've noticed that logging has moved into clojure.jar ... could Clojure start leveraging logging to identify what namespace its compiling and why; I'd love to see something like: [Compiler] Compiling namepace cascade [Compiler] Namespace cascade imports namespace cascade.asset [Compiler] Compiling

Re: eclipse/counterclockwise/maven question

2010-04-01 Thread Howard Lewis Ship
I gave up on using the two together; I don't use the M2Eclipse plugin, I just use the mvn eclipse:eclipse goal to setup the .classpath. That seems to work. I don't remember doing anything with JDK version; I must have manually switched it at some point, and I believe eclpse:eclipse honors the

Clojure talk TODAY (Feb 8) Paris, France 19:00

2010-02-08 Thread Howard Lewis Ship
Just a last minute reminder ... I'll be presenting Clojure: Towards the Essence of Programming on Monday Feb 8th at 19:00, in Paris. The event will be held at Zenika, SkillsMatter's partner in France. You must register for the talk ahead of time.

Re: Clojure talk TODAY (Feb 8) Paris, France 19:00

2010-02-08 Thread Howard Lewis Ship
I've posted it at least once on this list! On Mon, Feb 8, 2010 at 9:35 AM, Konrad Hinsen konrad.hin...@fastmail.net wrote: On 08.02.2010, at 15:10, Howard Lewis Ship wrote: Just a last minute reminder ... I'll be presenting Clojure: Towards the Essence of Programming on Monday Feb 8th at 19

Re: Seattle Clojure meeting

2010-02-04 Thread Howard Lewis Ship
I might drive up on the 15th, or take the train. I'm just getting back from London on the 14th though, so maybe next meeting for me. On Wed, Feb 3, 2010 at 7:01 PM, Phil Hagelberg p...@hagelb.org wrote: Hello, clojurists of Seattle. Let's meet! I'm thinking of getting folks together from 7pm

Re: Suggestion: Get rid of java.lang.Exception: EOF while reading..

2010-01-27 Thread Howard Lewis Ship
I too would love to see this. I can't tell you how many times I've dropped a ) from a (ns and spent forever hunting it down. On Wed, Jan 27, 2010 at 8:22 AM, Chouser chou...@gmail.com wrote: On Wed, Jan 27, 2010 at 4:03 AM, Gabi bugspy...@gmail.com wrote: This exception is the biggest time

Clojure Talk in Paris Feb 15th

2010-01-25 Thread Howard Lewis Ship
While I'm in Paris to do some Tapestry training, I'll also be doing a FREE talk on Clojure: Clojure: Towards the Essence of Programming The talk is sponsored by SkillsMatter; it's aimed at people who haven't used Clojure before, but if people on the list want to come out to show some support,

Re: Clojure for largish web application?

2010-01-23 Thread Howard Lewis Ship
It's still very young days for any of the Clojure web frameworks (including -shameless plug- Cascade). My favorite web framework (for obvious reasons) is Tapestry; there's years and years of experience behind it to make it a very effective, very productive, and extremely high-performance

Clojure Conference

2010-01-22 Thread Howard Lewis Ship
I've heard, indirectly, that you are putting together a Clojure conference. I've been speaking about Clojure at NFJS (Seattle), TheServerSide, Devoxx, CodeMash and a couple of Portland-local conferences. I'd love the opportunity to talk about Clojure at a conference such as the one your are

Re: Clojure Conference Poll

2010-01-22 Thread Howard Lewis Ship
I would prefer over a weekend (hopefully it won't conflict with a NFJS show). Bay area is nice; Portland is nicer! On Fri, Jan 22, 2010 at 1:53 PM, Luc Prefontaine lprefonta...@softaddicts.ca wrote: Either would be fine (week/weekend) for me. As for the location, being in the Montreal area, I

Re: Case-insensitive map?

2010-01-18 Thread Howard Lewis Ship
Tapestry 5 includes a case-insenstive Map and the basic idea can be adapted. It was important to that code base that the case of keys be kept, but that lookup by key be case insensitive. The hash code is based on a case normalized version of the true key, and comparisons are based on

Re: Clojure 1.1 release

2010-01-02 Thread Howard Lewis Ship
is official, I think it is great to add a link to it to the homepage of Clojure. On Jan 2, 3:01 pm, Phil Hagelberg p...@hagelb.org wrote: Howard Lewis Ship hls...@gmail.com writes: Is this available via a Maven repo yet and, if so, what version of clojure-contrib is compatible (and stable

Re: Clojure 1.1 release

2009-12-31 Thread Howard Lewis Ship
Is this available via a Maven repo yet and, if so, what version of clojure-contrib is compatible (and stable?). Can't want to check out some of the new features! On Thu, Dec 31, 2009 at 7:24 AM, Seth seth.schroe...@gmail.com wrote: Congratulations to all involved! I've been using 1.1 via the

Re: new API webpage format

2009-12-08 Thread Howard Lewis Ship
into this! On Mon, Dec 7, 2009 at 5:21 PM, Tom Faulhaber tomfaulha...@gmail.com wrote: Yup, I heard that the first time :-) It's coming, but not right this sec. Tom On Dec 7, 4:57 pm, Howard Lewis Ship hls...@gmail.com wrote: I still think it would be neat if there was some DHTML coolness

Re: new API webpage format

2009-12-07 Thread Howard Lewis Ship
I still think it would be neat if there was some DHTML coolness to help narrow down the symbol names that come down the right side of the page. On Mon, Dec 7, 2009 at 4:00 PM, Tom Faulhaber tomfaulha...@gmail.com wrote: By golly, you're right. I'll take a look at why. On Dec 7, 2:14 pm, cej38

Re: Understanding Clojure Closures

2009-11-11 Thread Howard Lewis Ship
Symbols are late resolved to functions. (def t (fn ...)) means define a Var bound to symbol t, and store the function in it. In JVM terms, the function becomes a new class that is instantiated. (t (dec x)) means locate the Var bound to symbol t -- at execution time (not compilation time) ---

Re: Mocking (with EasyMock?) java calls

2009-11-11 Thread Howard Lewis Ship
Try looking at this: http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/mock.clj On Thu, Nov 5, 2009 at 5:00 AM, vanallan vanal...@gmail.com wrote: Hi Im trying to convert a couple of Java methods in a Java project to Clojure. The Java methods have test methods that mocks

Re: ANN: Autodoc for clojure core, first rev

2009-11-09 Thread Howard Lewis Ship
It looks very nice ... still I'd love to see something like what clj-doc does (http://github.com/mmcgrana/clj-doc) ... it adds a text field that you can type into and it matches the available names against what you type, hiding the rest. So if you know part of the name, you can take a very large

Re: idiom questions

2009-10-30 Thread Howard Lewis Ship
When I first looked at Clojure, I didn't get it (I scanned the docs for 10 - 15 minutes). A few month later, Stu Halloway said to give it a second look and boy am I glad I did. Go read Stu's book, or at least the first couple of chapters online at Manning. Digest for a bit. It'll be an eye

Re: Why can't :let be first in a for

2009-10-24 Thread Howard Lewis Ship
From my perspective, having the forms be flatter (less nested) and having the call to the extend-dom function be at the outermost level is the most readable. On Fri, Oct 23, 2009 at 1:20 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 23.10.2009 um 21:16 schrieb Howard Lewis Ship: Here's

Why can't :let be first in a for

2009-10-23 Thread Howard Lewis Ship
I like to try and keep my level of nesting under control, and this often involves hiding or re-structuring the let macro. The for macro can implicitly assemble a let macro for you, but with a limitation that the :let clause can't be first: 1:5 user= (for [:let [z [:foo :bar]] x z] (name x))

Clojure gotcha: agent thread pool

2009-10-22 Thread Howard Lewis Ship
Just had a bit of a gotcha on Clojure that I thought I'd share. My tests started hanging after completion, which was a real pain on the continuous integration server. After some investigation, I determine that this unwanted behavior started when I first introduced agents into my code. I needed

Re: Discuss: Add a :let special expression to cond

2009-10-18 Thread Howard Lewis Ship
, Howard Lewis Ship hls...@gmail.com wrote: Here's my implementation. Seems to be working fine. I like it. http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/utils.clj http://github.com/hlship/cascade/blob/master/src/test/clojure/cascade/test_utils.clj On Sat, Oct 17, 2009

Discuss: Add a :let special expression to cond

2009-10-17 Thread Howard Lewis Ship
I keep coming into situations where I'd like a let in the middle of my cond. I often do a couple of tests, then would like to lock down some symbols that I'll use frequently in the remaining cases. There's a precedent for this, in that the for macro allows a :let as an alternative to a list

Re: Discuss: Add a :let special expression to cond

2009-10-17 Thread Howard Lewis Ship
Coming right up! On Sat, Oct 17, 2009 at 9:14 AM, Sean Devlin francoisdev...@gmail.com wrote: So you have a working version of this macro, as well as some use cases in actual code?  This would help the discussion a lot. Thanks! On Oct 17, 10:43 am, Howard Lewis Ship hls...@gmail.com wrote

Re: Discuss: Add a :let special expression to cond

2009-10-17 Thread Howard Lewis Ship
Here's my implementation. Seems to be working fine. I like it. http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/utils.clj http://github.com/hlship/cascade/blob/master/src/test/clojure/cascade/test_utils.clj On Sat, Oct 17, 2009 at 5:06 PM, Howard Lewis Ship hls...@gmail.com

Re: Suggestions for macro

2009-10-09 Thread Howard Lewis Ship
I'd tend to code this so that the test was the first form, and then any number of additional remaining forms become the body, in an implicit do. Obviously, if you're writing something like this, its for side effects. In addition, I'd wrap the body in an annonymous function, defined in a let, so

Re: Mocking?

2009-09-27 Thread Howard Lewis Ship
I've started a bit of a wrapper around EasyMock as part of Cascade http://github.com/hlship/cascade/blob/master/src/main/clojure/cascade/mock.clj Looks like this in practice: (deftest test-parse-url-query-parameters (with-mocks [request HttpServletRequest] (:train (expect

Please apply build patch

2009-09-23 Thread Howard Lewis Ship
I submitted this simple patch about a month ago: https://www.assembla.com/spaces/clojure-contrib/tickets/22-clojure-contrib-str-utils2-is-not-AOT-compiled As it turns out, this patch is more important than I first thought ... other necessary classes are not being AOT compiled as well. Currently,

Procedure for getting patches applied

2009-09-16 Thread Howard Lewis Ship
What is the procedure for getting patches (to clojure-contrib) committed? I've created a couple of issues in Assembla, created and attached patches. What's the next step to get it actually picked up? http://www.assembla.com/spaces/clojure-contrib/tickets/6-Add-set-of-regular-expression-functions

Re: Procedure for getting patches applied

2009-09-16 Thread Howard Lewis Ship
Thanks. Ready to test is what I missed. Fuh! On Wed, Sep 16, 2009 at 1:47 PM, Kevin Downey redc...@gmail.com wrote: have you seen http://clojure.org/patches ? On Wed, Sep 16, 2009 at 12:53 PM, Howard Lewis Ship hls...@gmail.com wrote: What is the procedure for getting patches (to clojure

Re: Order of keys within a map?

2009-09-02 Thread Howard Lewis Ship
guarantees that the keys will be in order.  I'm probably missing something here, but wouldn't that fit the bill? http://clojure.org/api#sorted-map Rob Lachlan On Aug 27, 12:35 pm, Howard Lewis Ship hls...@gmail.com wrote: Is the order of keys in a map predictable?  I have some tests I'm

Order of keys within a map?

2009-08-27 Thread Howard Lewis Ship
Is the order of keys in a map predictable? I have some tests I'm concerned about, where the keys and values in a map are converted to a string (ultimately, a URL, as query parameters) and the order will affect the output string. I could sort the keys, but then I'm changing my code to support

Confused about meta data on functions

2009-08-23 Thread Howard Lewis Ship
I keep running in circles with meta data on functions. This is my current understanding: Meta data for the function's name symbol is merged with any meta data provided as a map before the parameter decls. This combined meta-data is then applied to the Var that holds the function. However, it

Re: Continuous Integration Builds for Clojure are Back!

2009-08-23 Thread Howard Lewis Ship
see theres no agent that'll build maven2 so my builds just stuck in the queue. I guess the servers only setup to build with ant? -- On Thu, Aug 20, 2009 at 1:13 PM, Howard Lewis Ship hls...@gmail.com wrote: Why don't you do the group rename first. Bamboo is easy enough to use, I can give

Re: Confused about meta data on functions

2009-08-23 Thread Howard Lewis Ship
:path do/something} []) (defn pathed-view-fn {:cacade-type :view :path show/something} []) (defn unknown-type-fn {:cascade-type :willow}[]) (defn no-cascade-type-fn []) (println (path-to-function valid-view-fn)) On Aug 24, 1:41 am, Howard Lewis Ship hls...@gmail.com wrote: I keep running

Continuous Integration Builds for Clojure are Back!

2009-08-19 Thread Howard Lewis Ship
I've finally had a chance (after about a month of travel and other distractions) to get the Clojure and Clojure Contrib builds on Tapestry360 (http://tapestry.formos.com/bamboo) working again. There are now post-checkin builds for clojure and clojure-contrib. There are nightly builds for both

Re: New string utilities library ready

2009-08-19 Thread Howard Lewis Ship
Have you considered splitting the str-utils2 into two namespaces, one that can be imported, and another that needs to be required with a namespace? On Wed, Aug 19, 2009 at 11:22 AM, Chouserchou...@gmail.com wrote: On Wed, Aug 19, 2009 at 1:59 PM, Vagif Verdivagif.ve...@gmail.com wrote: I'm

Re: Package manager proposal

2009-08-07 Thread Howard Lewis Ship
-assed pun on Lisp's car, plus you can imagine the icon!) clib: Clojure Library clip: Clojure Library Package On Fri, Aug 7, 2009 at 2:17 AM, Lauri Pesonenlauri.peso...@iki.fi wrote: 2009/8/6 James Reeves weavejes...@googlemail.com: On Aug 6, 8:31 pm, Howard Lewis Ship hls...@gmail.com wrote

Current API doc (for HEAD)

2009-08-06 Thread Howard Lewis Ship
Is there a URL for the current API doc? I'm thinking of moving some of my code up to HEAD for clojure clojure-contrib and I need to adapt to things like the test package moving to clojure. -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos

Re: Package manager proposal

2009-08-06 Thread Howard Lewis Ship
I'm cringing at the sight of XML here. (I almost through this post away when I read down and saw the work on Corkscrew but I thought some of my ideas might still be valid). What I'd like to see is something that execute *inside* Clojure, adding necessary libraries the classpath in some way: I

Re: Package manager proposal

2009-08-06 Thread Howard Lewis Ship
Or really work this into core and add :packages to the (ns) macro. On Thu, Aug 6, 2009 at 2:30 PM, James Reevesweavejes...@googlemail.com wrote: On Aug 6, 10:16 pm, James Reeves weavejes...@googlemail.com wrote: (package/get compojure 0.2) (package/get clojure-contrib [:= 1.0-alpha3]) (ns

Re: Transient Data Structures

2009-08-04 Thread Howard Lewis Ship
These aren't criticisms, just trying to understand this better. So assoc! etc. return a new instance of the transient? Or do they return the same transient? If they return a new instance, what exactly is the advantage (though, obviously there is one, from the transcript). If they return the

Re: Transient Data Structures

2009-08-04 Thread Howard Lewis Ship
On Tue, Aug 4, 2009 at 10:03 AM, Rich Hickeyrichhic...@gmail.com wrote: On Aug 4, 12:35 pm, Howard Lewis Ship hls...@gmail.com wrote: These aren't criticisms, just trying to understand this better. So assoc! etc. return a new instance of the transient? They return the next value

Re: Protocol question: donating code to clojure-contrib

2009-07-22 Thread Howard Lewis Ship
In my repo I've created a clojure.contrib.re for regular expression oriented functions. On Tue, Jul 21, 2009 at 7:14 PM, Chouserchou...@gmail.com wrote: On Tue, Jul 21, 2009 at 7:24 PM, Howard Lewis Shiphls...@gmail.com wrote: I have some useful code related to regular expression parsing

Re: Protocol question: donating code to clojure-contrib

2009-07-22 Thread Howard Lewis Ship
Wow! I thought being on GitHub would mean that it wouldn't be necessary to send patches via e-mail. On Tue, Jul 21, 2009 at 11:29 PM, Howard Lewis Shiphls...@gmail.com wrote: In my repo I've created a clojure.contrib.re for regular expression oriented functions. Wow On Tue, Jul 21, 2009 at

Request for Assembla membership (hlship)

2009-07-22 Thread Howard Lewis Ship
I have a code contribution for clojure-contrib; please bump me up to member so I can create my ticket and attach my patch. Thanks! -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos --~--~-~--~~~---~--~~ You

Re: Can (genclass) be changed to operate when not compiling?

2009-07-22 Thread Howard Lewis Ship
On Wed, Jul 22, 2009 at 8:16 AM, Stuart Sierrathe.stuart.sie...@gmail.com wrote: On Jul 21, 6:55 pm, Howard Lewis Ship hls...@gmail.com wrote: It would be nice if (gen-class), when not in compile mode, would still create a class in memory that could be referenced by class name elsewhere

Ant build.xml snippet: compile

2009-07-21 Thread Howard Lewis Ship
I've written an Ant build script snippet that locates .clj files and compiles them. Not tested on Windows. http://gist.github.com/151387 -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos --~--~-~--~~~---~--~~ You

Re: Ant build.xml snippet: compile

2009-07-21 Thread Howard Lewis Ship
! Regards, -- Laurent 2009/7/21 Howard Lewis Ship hls...@gmail.com I've written an Ant build script snippet that locates .clj files and compiles them.  Not tested on Windows. http://gist.github.com/151387 -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source

Re: Ant build.xml snippet: compile

2009-07-21 Thread Howard Lewis Ship
to production from test files, I don't see how this would solve both problems I reported ? (unless in your source directory you stick to the one namespace / one file rule). Yes, I absolutely stick to that rule. Files are cheap, use lots! Regards, -- Laurent 2009/7/21 Howard Lewis Ship

Can (genclass) be changed to operate when not compiling?

2009-07-21 Thread Howard Lewis Ship
I'm using (:gen-class) to create javax.servlet.Filter, then creating a Jetty instance around the filter. Alas, for this to work, I have to go through my compile build to create the filter class so that I can let Jetty instantiate the filter. It would be nice if (gen-class), when not in compile

Protocol question: donating code to clojure-contrib

2009-07-21 Thread Howard Lewis Ship
I have some useful code related to regular expression parsing that I think would be useful as part of clojure-contrib. Is the protocol to add a ticket under Assembla first, or can I just update my fork and send a pull request to Rich? -- Howard M. Lewis Ship Creator of Apache Tapestry

Re: Dimming irrelevant stack trace frames

2009-07-21 Thread Howard Lewis Ship
This is a technique I've used in Tapestry and people like it. In the HTML, the excluded frames are invisible, but a toggle can make them visible (in a muted grey). Tapestry has a concept of an application package, and highlights those frames in bold blue so they stick out. That makes a big

Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
I've gotten a bit frustrated by the alpha Eclipse plugin and I'm trying my hand at (Aqua)Emacs again. My biggest frustration is gettting the classpath current directory set up correctly. I have main my code in package folders under src/main/clojure, and my tests under src/test/clojure ... and

Re: Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
line. In other words, why use an IDE if things aren't Integrated? Regards, -- Laurent (*) pun intended in relation with another thread in this ml :-p 2009/7/20 Howard Lewis Ship hls...@gmail.com I've gotten a bit frustrated by the alpha Eclipse plugin and I'm trying my hand at (Aqua

Re: Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
How well does the Emacs Starter Kit work in AquaEmacs? On Mon, Jul 20, 2009 at 10:59 AM, Phil Hagelbergp...@hagelb.org wrote: Howard Lewis Ship hls...@gmail.com writes: I have main my code in package folders under src/main/clojure, and my tests under src/test/clojure ... and I need src/main

Re: Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
(.clj) file, it doesn't switch to a Clojure (or Lisp) editor. Any advice? On Mon, Jul 20, 2009 at 12:47 PM, Phil Hagelbergp...@hagelb.org wrote: Howard Lewis Ship hls...@gmail.com writes: How well does the Emacs Starter Kit work in AquaEmacs? Unfortunately I can't test it with Aquamacs myself

Re: Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
wrote: Howard Lewis Ship hls...@gmail.com writes: How well does the Emacs Starter Kit work in AquaEmacs? Unfortunately I can't test it with Aquamacs myself since it's not portable, but I've heard reports of it working well. Aquamacs is incompatible with GNU Emacs in a number of undocumented

Re: Emacs clojure mode: how to set current directory classpath

2009-07-20 Thread Howard Lewis Ship
: Howard Lewis Ship hls...@gmail.com writes: How well does the Emacs Starter Kit work in AquaEmacs? Unfortunately I can't test it with Aquamacs myself since it's not portable, but I've heard reports of it working well. Aquamacs is incompatible with GNU Emacs in a number of undocumented edge

Re: easiest JMX API ever, in Clojure...

2009-07-14 Thread Howard Lewis Ship
Looks very nice; what are you planning to use JMX for? On Tue, Jul 14, 2009 at 11:23 AM, Stuart Hallowaystuart.hallo...@gmail.com wrote: ...wants your   help to be born! :-) There is a branch in clojure-contrib that includes work so far:

Re: Got a Clojure library?

2009-07-10 Thread Howard Lewis Ship
Library: Cascade URL: http://wiki.github.com/hlship/cascade Author: Howard M. Lewis Ship hls...@gmail.com Category: web License: ASL 2.0 A functional web application framework: 1/10th Tapestry (http://tapestry.apache.org) goodness, 9/10ths Clojure awesomeness. Adapts Tapestry's general approach

Re: Clojure in Issue 1 of Pragmatic Publishings Magazine

2009-07-01 Thread Howard Lewis Ship
I wonder if there's a solution based on some universal meta-data to identify what is lazily evaluated, and provide hooks (functions in the meta-data) to insert handlers, such as error-kit, into the lazy evaluation. On Wed, Jul 1, 2009 at 9:29 AM, Laurent PETIT laurent.pe...@gmail.comwrote: Hi,

Re: What are people using Clojure for?

2009-06-29 Thread Howard Lewis Ship
, eliminating tight coupling. jQuery showed us that css-style selectors work great in frontend javascript code, and I just asked myself: why not use that on the server side, too? Regards, Michael On 19 Jun., 19:28, Howard Lewis Ship hls...@gmail.com wrote: Cascade is coming along:http

Re: What are people using Clojure for?

2009-06-29 Thread Howard Lewis Ship
A friend of mine who worked for Sleepycat told me that the Amazon home page does up to 40 separate queries. Of course, this was at least five years ago, but still. That would be an option, a fragment that rendered its body in a new/worker thread, with a time limit, and replaced it with a

Re: debugging advice

2009-06-29 Thread Howard Lewis Ship
My negative experience with debugging touches on a number of things, but the biggest is the way that lazy evaluation makes it hard to determine cause and effect while debugging. This has been a problem, and I've had to do a lot of (prn) calls to try and identify what's going on. I eventually have

Re: What are people using Clojure for?

2009-06-19 Thread Howard Lewis Ship
, not a component framework like Tapestry. But the view and fragment templates look a lot like Tapestry templates. So far, I just have a portion of the templating system working. On Thu, Jun 18, 2009 at 7:09 PM, Vagif Verdi vagif.ve...@gmail.com wrote: On Jun 18, 8:39 am, Howard Lewis Ship hls...@gmail.com

What are people using Clojure for?

2009-06-18 Thread Howard Lewis Ship
I've been doing a number of presentations on Clojure lately (TheServerSide, Portland Code Camp, Open Source Bridge), and I'm getting some interest in Clojure and functional programming. A question that keeps coming up is: where would you use Clojure and/or functional? I've had to cite Rich's

Re: What are people using Clojure for?

2009-06-18 Thread Howard Lewis Ship
Yes I see ... right up to date with Tapestry 5.1.0.5. On Thu, Jun 18, 2009 at 2:18 PM, Toralf Wittner toralf.witt...@gmail.comwrote: On Thu, 2009-06-18 at 09:39 -0700, Howard Lewis Ship wrote: I've been doing a number of presentations on Clojure lately (TheServerSide, Portland Code Camp

Which map access is more idiomatic

2009-06-18 Thread Howard Lewis Ship
I have code that gets passed a map (actually a struct-map), should I (my-map :my-key) or (:my-key my-map) I'm beginning to gravitate towards the latter, as it is more tolerant of the map being nil. -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos

seq? vs. sequential?

2009-06-18 Thread Howard Lewis Ship
I had some code that adapted to functions that returned either a map or a seq of maps. I was using (seq?) and (map?) to analyze the return value. It then blew up when a function returned a clojure.lang.IPersistentVector. Fortunately, (sequential?) is a super-set of (seq?) and matched this

Re: A few ideas

2009-06-05 Thread Howard Lewis Ship
It would be nice if (doc) adapted to the type of thing (function, etc.) that is being displayed, that nil (where parameters would normally show) is ugly. Very low priority, of course. On Thu, Jun 4, 2009 at 8:26 PM, Chouserchou...@gmail.com wrote: On Thu, Jun 4, 2009 at 8:31 PM, Howard Lewis

A few ideas

2009-06-04 Thread Howard Lewis Ship
I was one of the lucky people who got to chat directly with Rich in SF. One idea I bounced off him was that it would be nice to be able to add documentation to struct maps; both docs about the usage of the struct in general, and further doc about each key (especially a hint about what kind of

Laziness vs. Program Flow: what can be done?

2009-06-04 Thread Howard Lewis Ship
So the times when I have the most trouble in Clojure is related to laziness. Using a lot of lazy operations (for, map, etc.) can cause some grief. I was refactoring and added a new parameter to a somewhat common function and didn't catch all the invocations. However, my exception turned up in an

Re: Concerns About Pushing Clojure 1.0.0 to Maven Central Repo?

2009-05-12 Thread Howard Lewis Ship
wrote: Howard Lewis Ship hls...@gmail.com writes: clojure-lang because there will be a clojure-contrib artifact for the same group. And this is ... a bad thing? I'm lost. -Phil -- Howard M. Lewis Ship Creator of Apache Tapestry Director of Open Source Technology at Formos

Ant tasks for Clojure

2009-05-02 Thread Howard Lewis Ship
I'm beginning to do more work in Clojure (just a side project for now, but an interesting one). A couple of things I'm missing from Clojure in terms of building deploying an application is built-in Ant tasks for common actions: - Pre-compiling Clojure - Starting up a REPL (and perhaps passing a

Re: The Path to 1.0

2009-04-24 Thread Howard Lewis Ship
Another option is for the version number to be in build.xml, and for it to generate a runtime file (so that Clojure can know its own version number) and set the version number inside a generated pom.xml. You can use Ant resource copying with filters to accomplish both these goals. On Thu, Apr

Re: The Path to 1.0

2009-04-21 Thread Howard Lewis Ship
On Sat, Apr 18, 2009 at 5:34 AM, Isak Hansen isak.han...@gmail.com wrote: On Thu, Apr 16, 2009 at 6:53 PM, Rich Hickey richhic...@gmail.com wrote: Feedback welcome, 1. I'd like to see a road map of sorts; plans for where Clojure will be going with the next couple of releases. 2.

Re: The Path to 1.0

2009-04-16 Thread Howard Lewis Ship
On Thu, Apr 16, 2009 at 9:53 AM, Rich Hickey richhic...@gmail.com wrote: People (and not just book authors :) often ask - whither 1.0? [Ok, maybe they don't use 'whither']. The fact remains, some people want a 1.0 designation, and I'm not unwilling, providing we as a community can come to an

Re: The Path to 1.0

2009-04-16 Thread Howard Lewis Ship
and tested? I would like to see the datastructures' memory and performance bounds tested, for instance. Chris On Apr 16, 2:58 pm, Howard Lewis Ship hls...@gmail.com wrote: On Thu, Apr 16, 2009 at 9:53 AM, Rich Hickey richhic...@gmail.com wrote: People (and not just book authors :) often ask

Maven access to nightly builds

2009-04-14 Thread Howard Lewis Ship
Both Clojure and Clojure-Contrib are now available as nightly builds from the Tapestry360 Maven snapshot repository. To access the nightly snapshots in Maven, you must update your pom.xml's repositories element (creating it as necessary): repositories repository

Re: [Discuss] Contribs with dependencies

2009-04-14 Thread Howard Lewis Ship
I'd say to refactor clojure-contrib into a number of seperate modules; individual modules (each with its own pom) could have their own dependencies. Thus if you choose clojure-contrib-freechart, you get that JAR (or compiled Clojure sources) plus the jfreechart dependency. In this way you are

Re: Java 6 dependency in clojure-contrib ok?

2009-04-08 Thread Howard Lewis Ship
Looks like we need a macro: (for-jvm 1.5 () 1.6 ()) What's the emoticon for 1/2 sarcastic, 1/2 happy? On Wed, Apr 8, 2009 at 4:52 PM, Stuart Halloway stuart.hallo...@gmail.com wrote: Perry's proposed props functions

Re: Suggestion for Java Clojure code, use of checkstyle or code formatter

2009-03-24 Thread Howard Lewis Ship
+1 Using regular and proper formatting assists in submitting patches. A little Javadoc would be nice as well. On Tue, Mar 24, 2009 at 4:46 AM, Mark Volkmann r.mark.volkm...@gmail.com wrote: +1 for running all the code under src/jvm through some code formatter that uses something at least

Re: STM and useful concurrency

2009-03-24 Thread Howard Lewis Ship
A relevant question is: what is the relative cost of locking and blocking (in the pure Java approach) vs. the cost of retrying (in the Clojure/STM approach). I don't want to go out on a limb, having not looked at the Clojure STM implementation. However, I would bet that the costs are roughly

Clojure talk at TSS

2009-03-23 Thread Howard Lewis Ship
I had a good time presenting an overview of Clojure at this years TheServerSide Java Symposium. A few questions from the crowd (of about 15 attendees) that I couldn't accurately respond to: 1) What prevents thread starvation when using (dosync) and ref's? It seems to me that conflicting

Re: New release 20090320

2009-03-22 Thread Howard Lewis Ship
I'd like to remind people using Clojure and Maven that they can get nightly builds of Maven via the Tapestry360 maven snapshot repository: http://tapestry.formos.com/maven-snapshot-repository To access the nightly snapshot in Maven, you must update your pom.xml's repositories element (creating

Re: Clojure Web Framework, what I want to add

2009-03-16 Thread Howard Lewis Ship
Personally, I've been noodling about what a Tapestry/Clojure hybrid might look like. I'd advise that you take a peek at Lift, a functional web framework built on Scala. I have some ideas about what a component based framework would look like in a function world (note: this would be leaving JSPs

Re: Qi's type system

2009-03-16 Thread Howard Lewis Ship
16, 2009 at 4:19 PM, Howard Lewis Ship hls...@gmail.com wrote: I antended a talk on Qi at JavaZone 2008. Qi is a kind of AOP layer that knits together concerns via a bit of configuration and some naming conventions.  I'm a bit fuzzy on the details 6 months out. A lot of the AOP solutions

Re: Bytecode optimization

2009-03-12 Thread Howard Lewis Ship
I have to wonder a bit about the ability to optimize. Everything boils down to one of the seven or so basic forms. That's a lot of function calls to do even small things, like adding numbers. You might think that simple math would be optimized and inlined, but it isn't: Clojure user= (doc +)

<    1   2   3   >