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
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
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
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
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.
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
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)
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
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
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
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
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 +)
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
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
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
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
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
+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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
, 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
,
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
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
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
. [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
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
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
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
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
, 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
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
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.
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
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
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
+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
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,
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
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,
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
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:
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
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
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
(.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
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
:
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
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
!
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
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
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
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
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
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
: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
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
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
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
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
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,
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
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
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
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
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
, 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
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
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))
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
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
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
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 - 100 of 226 matches
Mail list logo