Hi, FYI, it seems that the old web site of enclojure is still up and
running, and not referencing the new wikispaces web site.
HTH,
--
Laurent
2009/4/7 Eric Thorsen
>
> There is a new release of the Enclojure plugin that addresses many of
> the items I have seen discuss here recently with reg
On Thu, Apr 9, 2009 at 1:23 PM, Onorio Catenacci wrote:
> [..]
>
> I know you were mentioning some real performance issues when starting
> a Clojure app from Android (I see them too). I wonder if using
> TraceView to profile the Dalvik code generated by the conversion from
> the Clojure bytecod
2009/4/9 Chouser :
> (defn flat1 [coll]
> (mapcat #(if (coll? %) % [%]) coll))
Ah, I see. So for each item, if its already a collection we leave it
alone and if not we make a vector of one item, then at the end we use
mapcat to concatinate all the top-level items into one list.
Excellent - tha
I think it makes sense for (str) to return "", but I'm not sure about
(as-str) being "". It doesn't seem as obvious and expected to me.
Paul
On Thu, Apr 9, 2009 at 2:57 AM, Eric Tschetter wrote:
>
> Might I suggest
>
> (defn as-str
> ([] "")
> ([& args]
>(apply str (map #(if (instance? c
Looks like an interesting idea for me; it would also allow for
automated dependency analysis for a given target jvm.
btw, I'd also prefer to have 1.5 compatibility
Francesco
On Apr 9, 2:24 am, Howard Lewis Ship wrote:
> Looks like we need a macro:
>
> (for-jvm 1.5 ()
> 1.6 (..
On Apr 9, 8:03 am, "Remco van 't Veer" wrote:
> On Thu, Apr 9, 2009 at 1:23 PM, Onorio Catenacci wrote:
> > [..]
>
> > I know you were mentioning some real performance issues when starting
> > a Clojure app from Android (I see them too). I wonder if using
> > TraceView to profile the Dalvik c
Hi, I am trying to define a macro something like this:
(defwidget
(vlayout
(create-button b)
(create-label l))
(on-event b "pressed" (fn [] (.setText l "Hello World"
After a lot of messing around (I am learning all the time here!) I
have a version of defwidget that ge
On Apr 9, 2009, at 2:57 AM, Eric Tschetter wrote:
Might I suggest
(defn as-str
([] "")
([& args]
(apply str (map #(if (instance? clojure.lang.Named %) (name %) %)
args)))
I like it for its simplicity. It can actually be a little simpler yet
as the general case gives the same result
Hi Paul
Paul Drummond a écrit :
> (defmacro defwidget [& body]
> `(let [panel# (javax.swing.JPanel.)
>~@(flat1 (map (fn [[type inst]] [inst (list type)]) (rest (first
> body]
> ~(second body)
> (doto panel#
> (.setLayout (javax.swing.BoxLayout. panel#
> javax.swing.B
I have experienced this as well. My problem is that I would like my test suite
to exit
the proper way
so that CI knows that the build actually failed. Currently test-is seems to
just report
to stdout, but
not set anything that would cause the suite to fail with the proper exit code.
Any ide
2009/4/9 Christophe Grand :
> The problem is with the last two lines of your macro (the let expansion
> is fine):
>
> (.add l)
> (.add b
> Do you really want to hardcode l and b here or emit as many .add as
> required?
No - this is where the macro is incomplete - these lines are jus
On Thu, Apr 9, 2009 at 3:17 PM, Rich Hickey wrote:
> On Apr 9, 8:03 am, "Remco van 't Veer" wrote:
>> On Thu, Apr 9, 2009 at 1:23 PM, Onorio Catenacci wrote:
>> > [..]
>>
>> > I know you were mentioning some real performance issues when starting
>> > a Clojure app from Android (I see them too)
Yes to 5! I'm on a Mac and don't feel like dealing w/ upgrading to 6.
On Thu, Apr 9, 2009 at 9:03 AM, Francesco Bellomi <
francesco.bell...@gmail.com> wrote:
>
> Looks like an interesting idea for me; it would also allow for
> automated dependency analysis for a given target jvm.
>
> btw, I'd al
I think the consensus is that 1.5 is the target, so I've attached
props.1.5.clj to the group, which is 1.5 compatiblle (i.e. uses
streams, not readers or writers).
Best,
Perry
On Apr 8, 6:49 pm, Stuart Halloway wrote:
> Perry,
>
> Cool -- I will add this pending the result of the Java 6 thread
I've been whipping up a simple schema library for validating Clojure
data based on their tags, but I'm worried that what I'm doing might be
redundant with an already existing library. Is there something, such
as in clojure-contrib, that can do things similar to the code below
(note the make-schema
Hi,
Am 09.04.2009 um 15:49 schrieb Stephen C. Gilardi:
I like it for its simplicity. It can actually be a little simpler
yet as the general case gives the same result when passed no
arguments as the special case does:
(defn as-str
[& args]
(apply str (map #(if (instance? clojure.lang.Nam
I spent a few minutes this morning trying to get an emma coverage
report over contrib. Short answer is that it doesn't work -- emma
throws an exception while instrumenting the code (see attached
console.txt).
I will go and bug the emma folks, but first wanted to ask here if
there is any sp
-
clojure.contrib.singleton/singleton
([f])
Returns a memoized version of a function with no arguments. The
memoized version caches the function's return value.
This is useful for lazily creating global objects that are expensive
to initialize. Warning: Make sure
Enclojure is shaping up to be a really nice development environment
for Clojure. Great work Eric.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googleg
As of 12:30 (Central Standard), a better props.1.5.clj is in Groups --
sorry for the revision if you've already looked.
Perry
On Apr 9, 10:55 am, Perry Trolard wrote:
> I think the consensus is that 1.5 is the target, so I've attached
> props.1.5.clj to the group, which is 1.5 compatiblle (i.e.
Too late :-). I have already committed (r659) -- take a look and see
if you are happy with the changes I made.
Stu
> As of 12:30 (Central Standard), a better props.1.5.clj is in Groups --
> sorry for the revision if you've already looked.
>
> Perry
>
> On Apr 9, 10:55 am, Perry Trolard wrote
In r659 I added a unit test to clojure-contrib that needed to read and
write from the filesystem. I picked a dumb and simple convention, and
welcome review from other committers to move to something that is just-
smart-enough.
Stu
--~--~-~--~~~---~--~~
You re
Stuart Halloway wrote:
> I will go and bug the emma folks, but first wanted to ask here if
> there is any specific reason that Clojure-generated bytecode might
> surprise emma?
I might be totally wrong, but from what I've heard, Emma's development
has stopped a few years ago and it doesn't suppor
OK, I'll try Cobertura next.
There is a reason my Java knowledge sounds about 5 years old ... :-)
Stu
>
> Stuart Halloway wrote:
>> I will go and bug the emma folks, but first wanted to ask here if
>> there is any specific reason that Clojure-generated bytecode might
>> surprise emma?
>
> I mig
My recommendation would be to use a temporary file that is created and
deleted in a macro or fixture.
(defmacro with-tmp-properties-file [& body]
`(binding [*tmp-properties-file* (File/createTempFile "temp"
".properties")]
(spit *tmp-properties-file* "contents of the test file")
~...@
By the way, recent versions of duck-streams assume UTF-8 unless you
rebind *default-encoding*.
-Stuart S.
On Apr 8, 6:15 pm, Perry Trolard wrote:
> Hi Stuart,
>
> Not sure if you saw my post athttp://bit.ly/sRnfG(links to list), or
> the props.clj file in the Google Group. In short, it's got a
>
I keep a "Clojure stuff" dir with the latest revisions of all the
projects I track -- Clojure, contrib, swank, slime, etc. -- and update
them all with a shell script that runs the various "svn update" and
"git pull" commands. So I always have access to the latest version of
everything. But I don
On Thu, Apr 9, 2009 at 11:34 AM, Stuart Sierra
wrote:
>
> I keep a "Clojure stuff" dir with the latest revisions of all the
> projects I track -- Clojure, contrib, swank, slime, etc. -- and update
> them all with a shell script that runs the various "svn update" and
> "git pull" commands. So I al
I have Cobertura running and producing reports against contrib, sort-of.
Problems:
(1) AFAICT, cobertura *insists* in trying to parse the source code as
Java to do cyclomatic complexity analysis. This blows up, of course.
(2) The red/green coloring of the lines does not match what I know is
Hi Stuart,
Thanks very much for writing this book. Do you think the release of
the completed book is pretty close? I'm very excited about it.
-Patrick
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
I recently came across a situation where I very much wanted to delay
the calculation of some values, but where I also wanted those delays
to use their calculated values for equality determinations. This is
particularly important when comparing vectors or maps that contain
delayed values,
Got a Clojure user group, meetup etc?
Reply to this message and let me know, I'll add them to the Clojure
site.
Please supply a primary URL for getting info for your group.
Thanks!
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Three concerns:
(1) Would like to see the file after a failed test.
(2) Also have tests that read a file, and I would be much more
comfortable not having to rely on code to write the file first.
Doesn't feel like a unit test.
(3) The macro is more complex than the code being tested. :-) (Th
On Thu, Apr 9, 2009 at 3:57 PM, Stuart Halloway
wrote:
>
> Three concerns:
>
> (1) Would like to see the file after a failed test.
Unit tests should write their files to the temp directory (using the
system property java.io.tmpdir). This way, unit tests do not pollute
your project directory, an
On Apr 9, 2:55 pm, Chas Emerick wrote:
> I recently came across a situation where I very much wanted to delay
> the calculation of some values, but where I also wanted those delays
> to use their calculated values for equality determinations. This is
> particularly important when comparing vec
Stuart Halloway wrote:
> concerns:
> (1) Would like to see the file after a failed test.
> (2) [...] I would be much more
> comfortable not having to rely on code to write the file first.
> Doesn't feel like a unit test.
>
> But I am much more interested in having a shared approach that all
On Thu, Apr 9, 2009 at 11:58 AM, samppi wrote:
> I've been whipping up a simple schema library for validating Clojure
> data based on their tags, but I'm worried that what I'm doing might be
> redundant with an already existing library. Is there something, such
> as in clojure-contrib, that can d
Our God has spoken.
On Apr 8, 7:31 pm, Rich Hickey wrote:
> On Apr 8, 7:52 pm, Stuart Halloway wrote:
>
> > Perry's proposed props functions
> > (http://groups.google.com/group/clojure/browse_thread/thread/c8ec751b8...
> > ) uses some Java 6 methods.
>
> > Is it ok for me to add such things to
>
> For what it's worth, I haven't upgraded from Tiger so I'm stuck with
> Java 1.5, so I'd like to keep 1.5 compatibility.
As an aside, I have Tiger and do stuff with Java 6 all the time. It's
called soylatte:
http://landonf.bikemonkey.org/static/soylatte/
The only thing is that I didn't kno
Hi Stu,
> Too late :-). I have already committed (r659) -- take a look and see
> if you are happy with the changes I made.
> Stu
Thanks -- looks great to me. One remark: how about returning a map
from read-properties (by wrapping the body with
(into {} )
)? I know you can just destructure t
Hi Chas,
Have you considered wrapping the computation in a lazy sequence?
(lazy-seq [(expensive-calculation)])
The, instead of (force ...), you just use (first ...). I think
equality and hashing will automatically work like you want them to.
Cheers,
Jason
On Apr 9, 11:55 am, Chas Emerick wr
I would strongly recommend Java 5 and plan on staying with that version for a
while if you have a goal seeing corporate uptake for Clojure.
The Java version debate comes up every few months on the Groovy lists. The most
common argument I've heard was that any company progressive enough to use a
Yes to almost all of this (r662). I am not totally comfortable with
the false/"false" conversion.
Stu
> Hi Stuart H! Comment on:
>
> (defn set-system-properties
> [settings]
> "Set some system properties. Nil clears a property."
> (doseq [[name val] settings]
>(if val
> (System/se
So, I was wondering if anyone had implemented the amb operator in
Clojure, so I decided to give it a try. This is my first Clojure
program bigger then 5 lines, the code still needs ALOT of work, it is
ugly as hell atm, but I think it kind of works. (Yes, I know, it's
very easy to bug it, its just
I just tracked down a bug in my code, which boiled down to this:
user> ^(key (first (assoc {[] :old-val} (with-meta []
{:some :metadata}) :val)))
nil
Namely, if a map already contains a given key, when you attempt to
assoc in a version of the key with new metadata this is not recorded.
It seems
Name: clj-web-crawler
URL: http://github.com/heyZeus/clj-web-crawler/tree/master
Author: Brian Doyle
Categories: Web, Automation
License: MIT
Dependencies: clojure, clojure-contrib, Apache commons-client 3.1
Description:
clj-web-crawler is a wrapper around the Apache commons-client Java
library tha
46 matches
Mail list logo