Hi Andrew,
It's getting old now but you mind find this helpful:
http://groups.google.com/group/clojure/browse_thread/thread/6333791e49fbca7f/c724f1681dac3102?lnk=gst&q=drummond#c724f1681dac3102
and this:
http://clojure.org/state
Cheers,
Paul Drummond
On 25 April 2010 18:45, Andrew
2009/4/18 Laurent PETIT :
> [snip] at least Rich disagrees (and unanimity
> implies "all people", not even one let apart).
> And you can also count on me, Meikel Brandmeyer (author of VimClojure),
> maybe Paul Drummond (?) that pointed to python's decision to use Mercu
and I've added that feature. Again, this
> needs contrib so if it's not there it'll fallback on plain old
> macroexpand.
>
> - Jeff
>
> On Apr 17, 2:22 pm, Paul Drummond wrote:
>> Thanks guys - it's great that this is in clojure-swank now as well! I
>&g
2009/4/17 Tom Faulhaber :
> While I agree that "what is clojure.contrib?" is a pretty big issue, I
> think we could leave it a little fuzzy for a while longer. One thing
> we should probably do is do a real comparison of how we stack up
> against python's "batteries included" model and see how we
2009/4/17 Laurent PETIT :
> do you prefer to have some clojure users united against subversion, or
> divided by Rich not having chosen their preferred DVCS (Mercurial users vs
> Git users, not sure whether clojure needs those kinds of nonsense internal
> wars in the community )
I agree the la
ring]
>> (binding [*print-suppress-namespaces* true]
>> (with-pprint-dispatch *code-dispatch*
>> (write (expander (read-from-string string)) :pretty true :stream
>> nil
>>
>> Now that pprint is a part of contrib, these two changes should probably be
>
Up until now I have made do with a simple clojure repl in Emacs but as
I am playing around with macros I feel it's time to test drive
clojure-swank and it's fancy macro expansion features!
I have installed clojure-swank following the instructions on the wiki
and the installation seems to have wor
2009/4/16 Rich Hickey :
> What does 1.0 mean to you?
I just wanted to give some thoughts on what I think are the main
points coming from this discussion. It seems like most agree that
"Clojure the language" is ready for a 1.0 release (and all that comes
with it). The main issues are A) choice o
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
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
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 am looking for something similar to flatten (in contrib.seq-utils)
but the function will only flatten one level deep:
[ 1 2 3 [4 5 [6 7] ] ] ---> [ 1 2 3 4 5 [6 7] ]
I have tried combining functions in the seq library and I've studied
the code for flatten and tree-seq to look for hints but so
2009/4/3 Rich Hickey :
> Could you please submit an issue for that one?
No problem: http://code.google.com/p/clojure/issues/detail?id=102
Thanks,
Paul.
--
Iode Software Ltd, registered in England No. 6299803.
Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring, Tyne
& Wear, DH5 8N
The following works - note ActionListener is fully qualified:
-
user=> (.addActionListener (javax.swing.JButton.)
(proxy [java.awt.event.ActionListener] []
(actionPerformed [evt]
(println "button press"
nil
-
2009/3/26 Jon :
> You probably figured this out, but what you want is something like:
> (map rand-int (repeat SIZE MAX))
In fact - I didn't think of this - thanks! This is what I used:
(map rand-int (repeat Integer/MAX_VALUE))
I have been around since the beginning of Clojure but my journey to
2009/3/25 David Plumpton :
> I think this explains your problem:
> http://xkcd.com/221/
There is something to be said for that function. At least it has no
side-effects ;)
--
Iode Software Ltd, registered in England No. 6299803.
Registered Office Address: 12 Sancroft Drive, Houghton-le-Spring,
2009/3/25 e :
> For example, "slurp" is, perhaps, marginally better than "read" because it
> may help express that it reads the whole file.
Anyone else hate the names 'slurp' and 'spit' as much as me? IMO
changing these names would be a great idea whether these functions are
moved up to core or
2009/3/24 Joshua Fox :
>> Why "presumably with side effects?"
> Otherwise you would use repeat. A pure function returns the same value
> every time, so there is no reason to call it repeatedly.
Yup, that makes sense.
Random numbers are side-effecting (is that the right term?) and I was
trying t
2009/3/23 Krešimir Šojat :
> (rand-int 49) will produce one integer, and repeat will repeat it 10
> times, that is why you see same number repeated.
How embarrassing!
As soon as I switched my machine off last night I realised rand-int
was only being called once - of course it was!
I did consid
Hi all,
user=> (repeat 10 (rand-int 49))
(4 4 4 4 4 4 4 4 4 4)
Can someone please tell me why this doesn't work?
It must be something obvious but I can't see the wood for the trees
right now - it's late and my head hurts!
Thanks,
Paul.
--
Iode Software Ltd, registered in England No. 6299803.
I'm (fashionably?) late to share my appreciation. Excellent language
- I can only imagine good things for Clojure in the future.
Thanks Rich!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post
2009/3/16 Paul Stadig :
> The 3rd edition of Thinking in Java is available on the author's website for
> free.
>
> http://www.mindview.net/Books/TIJ/
>
That's true but beware it is quite old now and doesn't cover Java 5 or 6.
The fourth edition (which isn't freely available) is the latest and it
but then
so is the Java language :)
2. Effective Java by Joshua Bloch
Not for learning Java but excellent for learning how to write quality
Java code. A must read IMO.
3. Java Concurrency in Practise
I have not read this yet but I want to as Rich praises it in his
concurrency talk.
Chee
Not sure about "XEmacs vs Gnu Emacs" but for GNU Emacs there are some
options. By far the best option when starting out is ClojureBox:
http://clojure.bighugh.com/
It's a one-click installer to get you started. It includes everything
you need to develop in Clojure with Emacs including Slime.
I
Hi Rich,
for your first issue "declare" does exactly what you want.
=> (doc declare)
-
clojure.core/declare
([& names])
Macro
defs the supplied var names with no bindings, useful for making
forward declarations.
nil
Cheers,
Paul.
2009/3/10 Rich :
>
> I'm relatively n
Hi all,
I just thought I would share that I managed to get Gorilla working in
Windows by using special build of of Vim 7.2 with Ruby support by Wu
Yongwei. The page is linked to from the vim-online download. Here's
the link:
http://wyw.dcweb.cn/#download
It contains gvim.exe and vim.exe so I
2009/1/14 Cosmin Stejerean
> You could try moving to something like git and checking out the source code
> from one of the unofficial mirrors, like http://*github*.com/kevinoneill/*
> clojure*
>
Works perfectly - thanks! I considered trying git but didn't have a clue
where to look for mirrors -
2009/1/14 Mark Feeney
>
> I was just referring to the svn command you posted in your original
> message:
>
> > svn checkout
> http://clojure-contrib.googlecode.com/svn/trunk/clojure-contrib
>
> What it should be is:
>
> svn checkout http://clojure-contrib.googlecode.com/svn/trunk/ clojure-
> con
2009/1/14 Rich Hickey
> I think the salient difference is http, not https, for non-members.
Hi Rich,
The point is that I could use https on Sourceforge to get around the proxy
issue.
I've had the same problem before when using SVN for Clojure (sourceforge)
and assembla (a personal repos). W
2009/1/14 Mark Feeney
>
> (no /clojure-contrib on the end of the URL now)
>
Thanks for your reply Mark but I don't get what you mean. Can you elaborate?
You say "no /clojure-contrib on the end of the URL" but it's not on there
anyway. The url is exactly as it is on the google-code checkout pa
Hi all,
I realised today that my "work" machine still has the old Sourceforge
version of clojure-contrib but when I try to get the latest version from
google-code it falls over - most likely due to a proxy:
>svn checkout http://clojure-contrib.googlecode.com/svn/trunk/clojure-contrib
svn: REPORT
Hi Mark,
Most modules in clojure-contrib (including test-is) contain documentation
and examples directly in the header comment of the source file.
Cheers,
Paul.
2008/12/9 Mark Volkmann <[EMAIL PROTECTED]>
>
> Is there a primary website that provides documentation and examples of
> using the var
2008/12/1 Michael Wood <[EMAIL PROTECTED]>
> I think his point is that if he gets an "Unable to resolve symbol:
> Polygon" error and also an "Unable to resolve symbol: Point2D" error
> then he still has to figure out which one is in java.awt and which is
> in java.awt.geom. He wants a tool to spi
2008/11/28 Martin DeMello <[EMAIL PROTECTED]>
> No, I'd be perfectly happy with a command line tool that could analyse
> my clojure program and tell me what imports I'm missing - I just don't
> want to have to tediously go through the javadocs one by one and see,
> for instance, that I need java.a
Hi Martin,
Well, this is the sort of feature provided by IDEs rather than editors as
you say, so it's not a "clojure" specific issue. It's whether your chosen
IDE supports the feature you require.
FYI, there is a NetBeans plugin (http://enclojure.org/) and a Eclipse plugin
(http://code.google.co
This looks very interesting but when I try to execute clojure code (either
from the editor or the REPL) I get the following error:
"Could not initialize class clojure.lang.RT"
2008/11/18 Ted Kosan <[EMAIL PROTECTED]>
>
> I am in the process of developing a mathematics-oriented IDE called
> Math
At the risk of sounding like an old fart, I cringe when I hear "Clojury" and
"Jewel" - they are too "cute" (as Rich nicely put it a while back -
http://groups.google.com/group/clojure/msg/0351ca20c758b0b3).
I agree with Brian Carper - we should keep it readable so +1 for something
like "clojurefor
Hi Stuart,
Cool additions - I will certainly use them.
Regarding test-is additions, did you ever get a chance to check out the
patch I submitted a while back?
http://groups.google.com/group/clojure/browse_thread/thread/c509d589e181df1e/4319c02c9930d12e?lnk=gst&q=PATCH+test-is#4319c02c9930d12e
I
2008/11/12 Howard Lewis Ship <[EMAIL PROTECTED]>
>
> I'm looking at the Clojure SVN and I'm wondering, where are the unit
> tests?
>
There is test-clojure in clojure-contrib - see the following thread for
details:
http://groups.google.com/group/clojure/browse_thread/thread/697d59883a273795/bb057
2008/11/4 Rich Hickey <[EMAIL PROTECTED]>
> I know people have built UIs with Netbean's Matisse, which is supposed
> to be very good, and wired them up with Clojure. IMO that's a
> promising approach.
I have quite a lot of experience with Swing/Qt so for once I can contribute
something informati
2008/11/4 Stuart Halloway <[EMAIL PROTECTED]>
>
> For the book would people rather see Swing or Qt Jambi examples?
Personally, Qt Jambi definitely. While Swing is the standard Java UI
library it pales in comparison to Qt and is still under-supported by Sun
IMO. But if Qt licensing issues put p
I have been using the test-is library from clojure.contrib very
effectively - thanks Stuart and contributors!
One thing I have noticed is that errors like StackOverflowError cause
"run-tests" to terminate prematurely.
I know java.lang.Errors should not be caught in general but I think
it's accep
On Oct 29, 1:46 pm, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> How about this:
>
>(defn abs [x]
> (if (< x 0) (- x) x))
I will use that - I should have considered making my own version
rather than messing around with BigDecimal.abs(). Thanks!
--~--~-~--~~---
))
java.lang.NullPointerException (NO_SOURCE_FILE:0)
Would be nice to be able to use:
(abs -1.0)
1
(abs 1.0M)
1M
and get the overloading provided by the Numbers interface.
Cheers,
Paul Drummond
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Thanks guys, I get it now. I was forgetting that #^ attaches to the
next thing read, it makes sense now!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clo
I am a bit puzzled by how metadata seems to behave differently
depeding on where it's used and whether #^ is included or not:
(defn #^{:doc "doc"} my-fn ([x] x)) ;;Works
(defn {:doc "doc"} my-fn ([x] x)) ;;Error: Second argument to def
must be a Symbol
(defn my-fn [x] x #^{:doc "doc"});;E
Sunderland, UK.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more o
Congratulations Rich!
I remember when Clojure was first announced (it doesn't feel like a
year ago!) it was like a breath of fresh air! It was during a time
when I was trying learn Lisp as a newbie and finding it hard to focus
on learning the language because I couldn't settle for a particular
d
On Oct 15, 5:05 pm, Mike Hinchey <[EMAIL PROTECTED]> wrote:
> I use emacs and slime, also. Has anyone used http://jdee.sourceforge.net/
> with Clojure, or even just with Java?
>
I tried to get it working in Java a while back but failed miserably -
I can't really remember exactly what the problem
It's funny how things suddenly click. While out for a run (the only
time I seem to be able find clarity it seems) I started thinking that
it would be nice to have macros for "require" and "use" so that you
don't have to worry about quoting then I realized that's exactly what
ns is for!
I *should
On Oct 15, 2:21 pm, "Stephen C. Gilardi" <[EMAIL PROTECTED]> wrote:
> Here's the portion of (doc require) where it's mentioned:
>
> [...]
> Libspecs
>
> A libspec is a lib name or a vector containing a lib name followed by
> options expressed as sequential keywords and arguments.
>
> R
On Oct 15, 9:34 am, mb <[EMAIL PROTECTED]> wrote:
> You might want to try (require ['clojure.contrib.zip-filter :as 'zf]).
> AFAIR, you have to use [] when you want to specify :as.
Ah, that's it! This isn't clear (or mentioned unless I'm mistaken) in
the docs.
Thanks for your help.
Paul.
--~--
Hmmm. Now I am getting this:
(require 'clojure.contrib.zip-filter :as 'zf)
java.lang.ClassCastException: java.lang.Boolean cannot be cast to
clojure.lang.Symbol (NO_SOURCE_FILE:0)
Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscrib
ote:
> On Oct 14, 2008, at 5:24 PM, Paul Drummond wrote:
>
> > I want to use the zip-filter library so at the REPL I tried this:
>
> > (require 'clojure.contrib.zip-filter :as zf)
>
> > which failed with:
>
> > java.lang.Exception: Unabl
Hi all,
After a short break from hacking in Clojure I am back and eager to try
out all the new features but I am having trouble getting familiar with
the new lib/namespace feature.
I want to use the zip-filter library so at the REPL I tried this:
(require 'clojure.contrib.zip-filter :as zf)
wh
rn to it very soon!
Cheers,
Paul Drummond
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send
56 matches
Mail list logo