Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread Howard Lewis Ship
At the risk of over-complicating things, perhaps there should be a macro/function to require a specific version of Clojure? In this way, a script written for the new naming could prevent itself from executing incorrectly using the old naming. Something like Python's from future concept. On

Re: Fully lazy sequences are coming - feedback wanted!

2009-02-15 Thread Howard Lewis Ship
How about next-seq or rest-seq? On Sun, Feb 15, 2009 at 3:34 PM, James G. Sack (jim) jgs...@san.rr.com wrote: Rich Hickey wrote: .. The second option is to choose the best possible names, and deal with some short term pain in porting and confusion. I think the best names are: ;item

Clojure Naming Conventions

2009-02-21 Thread Howard Lewis Ship
I'm kind of used to Java nowadays, where CONSTANTS_ARE_UPPERCASE. I'm trying to figure out if Clojure has equivalent conventions. What I've seen: names-with-dashes instead of CamelCase *global* for global variables (?) Parameter name conventions (from Stu's book): val, coll, a, etc. What are

Clojure-Contrib: Maven/Continous Integration

2009-02-23 Thread Howard Lewis Ship
I've added a patch for clojure-contrib so that the clojure-contrib module can build post-checkin, and nightly. I'd really like to see it taken, so I can set up continuous integration on tapestry.formos.com. Basically, we'll be able to have clojure-contrib build after any change to

Re: Clojure plugin for IntelliJ IDEA published

2009-02-26 Thread Howard Lewis Ship
I've only had a couple of minutes to work with it, but I'm already liking it. I just can't keep switching between Emacs and IDEA and IDEA is the work that pays the bills! On Thu, Feb 26, 2009 at 11:08 AM, CuppoJava patrickli_2...@hotmail.com wrote: Hello Ilya, Thanks for the workaround.

Re: Clojure plugin for IntelliJ IDEA published

2009-03-10 Thread Howard Lewis Ship
Is there any kind of debugger support (now, or coming?). On Tue, Mar 10, 2009 at 8:10 AM, Tom Ayerst tom.aye...@gmail.com wrote: Liking it so far.  Can you get jline style functionality into the REPL, I really miss it. Cheers Tom 2009/2/27 AndrewC. mr.bl...@gmail.com On Feb 26, 7:08 

Macros problem

2009-03-10 Thread Howard Lewis Ship
I'm trying to build something using macros ... my long goal is a simple embedded DSL. Here's a simplified version: (defmacro to-fn Converts a collection of forms into an anonymous function of no arguments. [forms] `(fn [] ~...@forms)) (defn run-example [fn] (printf BEFORE\n) (fn)

Re: Macros problem

2009-03-10 Thread Howard Lewis Ship
passed to the macro; by the time those passed forms are ever evaluated, the (let) in the macro is long gone and the namespaces are clean. On Tue, Mar 10, 2009 at 12:30 PM, Chouser chou...@gmail.com wrote: On Tue, Mar 10, 2009 at 2:45 PM, Howard Lewis Ship hls...@gmail.com wrote: (defmacro

Re: Debugging support for clojure?

2009-03-10 Thread Howard Lewis Ship
On Tue, Mar 10, 2009 at 2:44 PM, CuppoJava patrickli_2...@hotmail.com wrote: The IntelliJ plugin supports debugging. I must have missed this; the UI didn't seem to allow for setting of breakpoints. And using JSwat is also possible, but a little less streamlined.  -Patrick -- Howard

Re: Debugging support for clojure?

2009-03-11 Thread Howard Lewis Ship
Just updated, working like a charm. On Tue, Mar 10, 2009 at 5:17 PM, CuppoJava patrickli_2...@hotmail.com wrote: Have you updated to the latest version? If it's setup properly, you should be able to set breakpoints by clicking on the grey column on the left side of your code. Also, not

Re: What is Clojure NOT good for?

2009-03-11 Thread Howard Lewis Ship
I ran into a bit of the but we can hire Java coders mentality when I presented Clojure at a local JUG. Due to time constraints, I didn't get into it at the time, but my basic thought is: I don't care what you know, I care what you can learn! Also, there's the myth of the immediately productive

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 +)

Re: Bytecode optimization

2009-03-12 Thread Howard Lewis Ship
Well, at some point I'll open up the code and check. Though I'll be overly tempted to write some comments, fix the indentation and write some tests if I do! On Thu, Mar 12, 2009 at 2:36 PM, Jarkko Oranen chous...@gmail.com wrote: On Mar 12, 11:15 pm, Howard Lewis Ship hls...@gmail.com wrote

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: 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

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: 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

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

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: 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

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-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

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: 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

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: 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

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: 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

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: Has search path just changed?

2008-11-13 Thread Howard Lewis Ship
. [127 0 0 1]) 127.0.0.1 user= On Thu, Nov 13, 2008 at 9:35 AM, Howard Lewis Ship [EMAIL PROTECTED] wrote: I just built Clojure and clojure-contrib from source. I'm getting something odd: $ ls total 1288 drwxr-xr-x 8 root wheel 272B Nov 12 12:15 . drwxr-xr-x 24 root wheel 816B Nov

Correct place to report bugs?

2008-11-14 Thread Howard Lewis Ship
Is this mailing list the correct place to report bugs? The bug list on the SF page looks pretty sparse. -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[DISCUSS] Improved exception reporting

2008-11-14 Thread Howard Lewis Ship
As a new developer to Clojure, coming from a strong Java/OO background and NOT a functional one, I'd like to make a few observations. One challenge to new developers are exception messages generated by Clojure. I'm seeing a lot of ClassCastExceptions: cribbage= (sort-by card-order (take 11

[DISCUSS] Automatic defs for Repl?

2008-11-14 Thread Howard Lewis Ship
On option I would like for the Repl is an option such that each evaluated expression that does not define a new symbol itself, would (nethertheless) bind a symbol. Many other Repl's for other languages (such as, I believe, Scala) do this: the Repl identifies the bound symbol and the value, not

Re: Poll: Which clojure.contrib libs should be bundled with Clojure?

2008-11-15 Thread Howard Lewis Ship
I'd like to see Clojure properly packaged (with source jars as well as binary jars), available via a maven repository, with the main Clojure site being a multi project so that you could download and build Clojure and standard libraries all in a single go. I'm checking with my management to see

Re: Improved exception reporting

2008-11-16 Thread Howard Lewis Ship
, Stephen C. Gilardi [EMAIL PROTECTED] wrote: On Nov 14, 2008, at 3:11 PM, Howard Lewis Ship wrote: The point is, an exception that said something like: Expected java.lang.Comparable but received :king would have helped me unravel this much, much easier! I agree. Clojure should give all

Re: Running Clojure scripts at the command line

2008-11-16 Thread Howard Lewis Ship
On Sun, Nov 16, 2008 at 10:21 AM, Stuart Sierra [EMAIL PROTECTED] wrote: I would like both the REPL and Script to be callable from the same main (), i.e. you should just be able to call java -jar clojure.jar without naming a class. +1 -- Howard M. Lewis Ship Creator Apache Tapestry and

Re: Clojure for LISP programmers....

2008-11-16 Thread Howard Lewis Ship
I generally like that Clojure dispenses with parens that exist for the benefit of the evaluator rather than the developer; thus far fewer parens when using (cond). Still, my old Lisp habits (20 years without use) succumbed as much as Simons. See my earlier thread about exception reporting.

Re: thanks, errata, and one gaffe

2008-11-17 Thread Howard Lewis Ship
I'm really interested in how you would coordinate a database transaction with an STM transaction. Do you message an agent to do the database update? On Mon, Nov 17, 2008 at 6:13 AM, Stuart Halloway [EMAIL PROTECTED] wrote: Hi Brian, The libraries chapter will cover a bunch of different

[PATCH] Improved Maven Build

2008-12-02 Thread Howard Lewis Ship
I've created a patch for the clojure source that does the following: - Adds a minimal site build, with links to the main Clojure web site (http://clojure.org) - Generates a source JAR to go with the binary JAR - Generates JavaDoc for the project site (if profile javadoc is enabled) - Adds a

Re: [PATCH] Improved Maven Build

2008-12-02 Thread Howard Lewis Ship
Sorry, that http://tapestry.formos.com as the project hosting site. It currently runs Bamboo at http://tapestry.formos.com/bamboo On Tue, Dec 2, 2008 at 10:05 PM, Howard Lewis Ship [EMAIL PROTECTED] wrote: I've created a patch for the clojure source that does the following: - Adds a minimal

Re: Improved Maven Build

2008-12-03 Thread Howard Lewis Ship
+1 (avoid Maven, keep POM) I'm moving Tapestry away from Maven as soon as I get chance, but I'll still have a POM for each module, and I'll still distribute it to the Maven central repository ... that part is the one thing that Maven gets really right. In some ways, avoiding Maven for the build

Re: Improved Maven Build

2008-12-05 Thread Howard Lewis Ship
I think the best solution is to use Ant to build, but: - Include a pom.xml - Build binary and source artifacts - Use the Maven Ant Tasks to deploy the artifacts to a local (for snapshots) or remove (for final builds) repository Also, I think if the Java code was published, along with Javadoc,

[DISCUSS] Use an Issue tracker?

2009-01-23 Thread Howard Lewis Ship
I'm always a fan of using a real issue tracking system; I'd love to see Clojure using JIRA to track what's going on, and what's coming up, in a public and visible way. It'll make it feel more like a community project, less like a one-man show (I deal with that perception all the time on

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: 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: 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:

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

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

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

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

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: 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

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

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

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

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

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

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,

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

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

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: 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

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

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))

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

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: 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: 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) ---

  1   2   3   >