Quite right, thanks for the explanation!
On Mar 17, 3:50 pm, Mark Engelberg mark.engelb...@gmail.com wrote:
On Mon, Mar 16, 2009 at 9:44 PM, Timothy Pratley
timothyprat...@gmail.com wrote:
Hi Keith,
I don't follow the 'lazy-init' part... It seems to me that you create
a delay but
On Mar 17, 4:54 am, Paul Mooser taron...@gmail.com wrote:
I've been using clojure in a similar way at work. I run a swank server
in a separate thread inside of a running application instance, and I
can connect to it remotely using SLIME. It works pretty well!
Me too, I put a swank server in
Paul Mooser taron...@gmail.com writes:
Hi Paul,
I've been using clojure in a similar way at work. I run a swank server
in a separate thread inside of a running application instance, and I
can connect to it remotely using SLIME. It works pretty well!
I could benefit from such an approach,
How do you cope with type-hinted vars or macros? (ok #'declare does not
work for macros neither)
With autodef, one could have to either move the definition or add a
declare just to be able to add a type hint.
Christophe
Stephen C. Gilardi a écrit :
On Mar 16, 2009, at 6:59 PM, Elena
Hello,
I want to use REPL to quickly test Java code.
Is it possible to reload a modified Java class in REPL?
I've searched this forum for answers but haven't found any.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Mar 17, 12:15 am, Stephen C. Gilardi squee...@mac.com wrote:
If *autodef-unresolved-symbols* is true, and if a has never been
mentioned before, this interaction with Clojure:
user= a
java.lang.Exception: Unable to resolve symbol: a in this context
would become:
On Mar 16, 2:08 pm, David Nolen dnolen.li...@gmail.com wrote:
On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn tass...@member.fsf.orgwrote:
When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting
SLIME, htop shows that this directory is not in the -cp java option.
On Mar 16, 11:17 pm, BerlinBrown berlin.br...@gmail.com wrote:
After many years (decade) of web development, here are the things that
I want in a framework, mostly based in clojure:
What do you think and what you add. This is ambitious and just a
ideas of what I would add. What would you
I'm writing a Clojure source file. I thought that C-M-x (slime-eval-
defun) would send the current toplevel form to the REPL but I was
wrong. For instance, if I evaluate:
(ns test
(:import (java.net InetAddress)))
from the source file and then I evaluate *ns* at the REPL, I get:
On Mar 17, 1:27 am, Jeffrey Straszheim straszheimjeff...@gmail.com
wrote:
Only to do a tiny little test w/ not-deployed code. But still: I am a
professional Clojure developer now :)
(Please don't kill my dream.)
Me too ^_^
I'm writing an automated test suite for a legacy application I've
On Mar 17, 10:46 am, Michael Wood esiot...@gmail.com wrote:
I understand why people want to be able to do things like this:
(defn b [] (a))
(defn a [] (...))
That's what I'm asking for.
But that's completely different from the above. The above is more like:
(a)
(defn a [] (...))
Why
On Mar 17, 2009, at 4:44 AM, Christophe Grand wrote:
How do you cope with type-hinted vars or macros? (ok #'declare does
not
work for macros neither)
With autodef, one could have to either move the definition or add a
declare just to be able to add a type hint.
The class of vars you're
Hello Phil,
I see that you have your CA in already:
http://clojure.org/contributing
so you can start with creating issues and posting patches for them:
http://code.google.com/p/clojure-contrib/issues/list
Then somebody from clojure-contrib members looks at it and eventually checks
it in.
On Tue, Mar 17, 2009 at 1:01 PM, Elena egarr...@gmail.com wrote:
On Mar 17, 10:46 am, Michael Wood esiot...@gmail.com wrote:
I understand why people want to be able to do things like this:
(defn b [] (a))
(defn a [] (...))
That's what I'm asking for.
But that's completely different from
AndrewC. mr.bl...@gmail.com writes:
On Mar 16, 2:08 pm, David Nolen dnolen.li...@gmail.com wrote:
On Mon, Mar 16, 2009 at 3:42 AM, Tassilo Horn tass...@member.fsf.orgwrote:
When adding ~/.clojure/ to `swank-clojure-extra-classpaths' and starting
SLIME, htop shows that this directory is
On Mar 17, 2009, at 7:20 AM, Elena wrote:
I wanted to say that entering:
(defn a []
(b))
should issue a warning (and I don't think an exception is the right
way to warn the user).
The autodef I described would not warn, nor throw an exception in this
case.
I think warn on autodef
Hi Jeffrey,
I was recently thinking of adding support for https://grizzly.dev.java.net/
in http://github.com/weavejester/compojure/tree/master.
Just need some time to get my head around compojure.
Cheers,
Hubert.
On Tue, Mar 17, 2009 at 12:52 AM, Jeffrey Straszheim
straszheimjeff...@gmail.com
On IRC we were discussing the behavior of into, and this lead us to
dive into core.clj to look at its implementation. We discovered that
it was not implemented with reduce, which would produce the same
behavior, and we also discovered that implementing it with reduce may
have a performance
On Mar 16, 3:38 pm, Stuart Sierra the.stuart.sie...@gmail.com wrote:
On Mar 16, 8:14 am, Rich Hickey richhic...@gmail.com wrote:
Sorry to jump in late, but one problem with seek is that it is a
homophone of seq.
Did anyone consider ffilter or find-first?
I thought find-first was too
On Mar 16, 4:35 pm, Mark Engelberg mark.engelb...@gmail.com wrote:
Of course, with respect to Clojure, probably the most important thing
is to learn the Java *libraries*. What are good books about that?
The Sun Java tutorials are actually pretty good:
http://java.sun.com/docs/books/tutorial/
It depends which SVN release you use. We pulled version 1242 and went to
production with it.
It's used in services running non stop 24/24 7 days a week. No crashes,
no glitches, ...
That's before the lazy branch became the base for all future
developments.
Of course we were expecting some
I hadn't heard of Grizzly before. Thanks for the pointer (er..., reference,
or whatever we're calling them these days).
On Tue, Mar 17, 2009 at 5:31 AM, Hubert Iwaniuk neo...@kungfoo.pl wrote:
Hi Jeffrey,
I was recently thinking of adding support for
https://grizzly.dev.java.net/ in
Hello Rich,
2009/3/17 Rich Hickey richhic...@gmail.com
I remain opposed, and here are some more reasons:
when you say
(def foo [x]
(bar x 42))
you are as likely to be referring to a forgot-to-require bar-lib as
you are to a to-be-defined bar.
The compiler can only default the latter,
On Tue, Mar 17, 2009 at 6:40 AM, Elena egarr...@gmail.com wrote:
I'm writing a Clojure source file. I thought that C-M-x (slime-eval-
defun) would send the current toplevel form to the REPL but I was
wrong. For instance, if I evaluate:
(ns test
(:import (java.net InetAddress)))
On Mar 16, 7:13 pm, Mark Engelberg mark.engelb...@gmail.com wrote:
On Mon, Mar 16, 2009 at 3:54 PM, Frantisek Sodomka fsodo...@gmail.com wrote:
(empty (seq [1 2])) = nil
Now that there is the concept of empty sequences, maybe this should
actually return an empty sequence, such as ().
Is there a good standalone library to create HTML from Clojure, preferably
something like the CL-WHO? This will be for a standalone application, not
an application server. I just need to generate some populated HTML and put
it in to a file. Thanks.
I have another question! I've found your article very interesting. I
really like how you have buttons and keybindings to the same
AbstractAction. However when I run your app if I press ctrl-x while in
a textbox nothing happens... If I'm not in a textbox it exits. I
believe this is because the
Is there a summary somewhere of the steps Clojure STM takes to avoid
deadlocks? I'm just trying to understand the basics of what, if
anything, it does to avoid them.
--
R. Mark Volkmann
Object Computing, Inc.
--~--~-~--~~~---~--~~
You received this message
On Mar 16, 7:58 pm, Dex Wood slash2...@gmail.com wrote:
On IRC we were discussing the behavior of into, and this lead us to
dive into core.clj to look at its implementation. We discovered that
it was not implemented with reduce, which would produce the same
behavior, and we also discovered
The code isn't too hard to follow, 'cept the barging stuff gets a bit
tricky. A nice 10,000 foot overview would be nice, however.
On Tue, Mar 17, 2009 at 8:04 AM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
Is there a summary somewhere of the steps Clojure STM takes to avoid
deadlocks? I'm
Hi all,
I thought this article might present some ideas of interest to
everyone.
http://briancarper.net/blog/clojure-1-php-0
Originally found via HackerNews.
--
Onorio Catenacci III
It is the greatest of all mistakes to do nothing because you can only
do a little. -Sydney Smith, writer and
Awesome! Thanks.
On Tue, Mar 17, 2009 at 8:08 AM, Timothy Pratley
timothyprat...@gmail.comwrote:
I can highly recommend clojure.contrib.prxml
James Reeves gave a really good example in the 2nd last post of this
thread:
And what about lazy sequences? Is this behavior correct?
user= (lazy-seq ())
()
user= (empty (lazy-seq ()))
nil
user= (empty (lazy-seq []))
nil
user= (lazy-seq [1 2])
(1 2)
user= (empty (lazy-seq [1 2]))
nil
Thank you, Frantisek
On 17 Bře, 13:54, Rich Hickey richhic...@gmail.com wrote:
On
On Tue, Mar 17, 2009 at 12:03 AM, Phil Hagelberg p...@hagelb.org wrote:
OK, so I've posted a fair amount of smack talk about test suites and
how important they are--I figure it's time to help out.
What are some ways in which test-clojure is lacking? How can I help
improve the coverage?
On Mar 17, 11:10 am, Tassilo Horn tass...@member.fsf.org wrote:
AndrewC. mr.bl...@gmail.com writes:
snip
The other problem is that it uses add-to-list so if you reload slime
to refresh the value of slime-lisp-implementations, you end up with
two clojure entries in the list.
Why do
On Mar 17, 2009, at 9:18 AM, Frantisek Sodomka wrote:
And what about lazy sequences? Is this behavior correct?
user= (lazy-seq ())
()
user= (empty (lazy-seq ()))
nil
user= (empty (lazy-seq []))
nil
user= (lazy-seq [1 2])
(1 2)
user= (empty (lazy-seq [1 2]))
nil
Fixed in svn 1332
On Mar 17, 12:51 pm, Shawn Hoover shawn.hoo...@gmail.com wrote:
If you want to set the REPL package from your .clj
buffer, use C-c M-p (slime-repl-set-package).
That worked, thanks.
For newbies, I'll add that slime-repl-set-package is in a slime
contribution not available by default, so
On Mar 17, 12:43 pm, Luc Prefontaine lprefonta...@softaddicts.ca
wrote:
It depends which SVN release you use. We pulled version 1242 and went to
production with it.
It's used in services running non stop 24/24 7 days a week. No crashes,
no glitches, ...
I didn't mean I don't trust the
Sometimes I feel lucky to be able to take my own decisions and turn our
development
strategy on a dime :. My partners rely on me for these decisions and
we never regretted one so far.
1.0 should not be too far away so your waiting is near it's end... :)))
Luc
On Tue, 2009-03-17 at 07:23
Sorry, missed your message. See:
http://github.com/remvee/clojurehelloandroid/
for a hello world example.
On Thu, Mar 12, 2009 at 3:04 PM, rob r.p.l...@gmail.com wrote:
Ok, duh, somehow didn't catch that this link was the code I was
wondering about:
It's actually fairly straightforward. In my (ordinary java)
application, I create a thread which loads a clojure program passed on
the command line (I don't have the source in front of me, but if you
need it, I can give you a hand), and that program typically contains
something like the
I found one way to make 'global hotkeys' (its a bit verbose though):
http://groups.google.com/group/clojure/web/global-hotkey.clj
adapted from http://www.javaspecialists.eu/archive/Issue007.html
Just mentioning it for interest seeing key controls in swing has been
driving me nuts :P
Regards,
Paul Mooser taron...@gmail.com writes:
Hi Paul,
It's actually fairly straightforward. In my (ordinary java)
application, I create a thread which loads a clojure program passed on
the command line (I don't have the source in front of me, but if you
need it, I can give you a hand),
That
I think I have a fix for Issue 34 (Disable EvalReader with a *read-
eval* flag). I added the *read-eval* variable and also created a
dispatch reader that sets the value at read time. Let me know any
comments.
Joshua
### Eclipse Workspace Patch 1.0
#P Clojure
Index:
Sample syntax is:
#r()
#r(eval (def x 3)) works fine
#r(#=(eval (def x 3))) will throw an exception
Joshua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to
Hi,
Am 17.03.2009 um 09:46 schrieb linh:
I want to use REPL to quickly test Java code.
Is it possible to reload a modified Java class in REPL?
I've searched this forum for answers but haven't found any.
I'm not a Java expert, but I get that this is difficult.
Maybe Java Rebel could help you
Updated the patch based on comments from rhickey.
New sample syntax is:
(binding [*read-eval* false] (read-string #=(eval (def x 3)) ))
throws an Exception
Joshua
### Eclipse Workspace Patch 1.0
#P Clojure
Index: src/clj/clojure/core.clj
Hello Rich all!
I have question about the reader http://clojure.org/reader
Numbers say as per Java. I found that e.g. 2. reads Java as double
and Clojure as int.
All these read as double in Java:
2. .1 +.0 -.0 +2. -2.
Clojure either sees them as ints or errors out. I am wondering about
Does anyone have suggestions on the best way to store Clojure objects
to a file and later read them back in?
The obvious option would be to use the build-in printer and reader.
One limitation here, which I'm OK with for now, is that this doesn't
work for arbitrary serializable objects (which
Jason Wolfe jawo...@berkeley.edu writes:
Finally, has anyone tried printing something with closures in it, and
then reading it back in another JVM instance?
Closures are dependent upon their lexical environment. While you can
serialize the code they contain, you can't serialize their whole
On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim
straszheimjeff...@gmail.com wrote:
The code isn't too hard to follow, 'cept the barging stuff gets a bit
tricky. A nice 10,000 foot overview would be nice, however.
On Tue, Mar 17, 2009 at 8:04 AM, Mark Volkmann r.mark.volkm...@gmail.com
On Mar 17, 2:32 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim
straszheimjeff...@gmail.com wrote:
The code isn't too hard to follow, 'cept the barging stuff gets a bit
tricky. A nice 10,000 foot overview would be nice, however.
I've used print-dup and read for saving and restoring data and it
worked well for me once I defined the needed print-dup methods.
Since you said it's ok for you to read your struct back in as a hash
map, you can do the following:
(defmethod print-dup clojure.lang.PersistentStructMap [o w]
On Tue, Mar 17, 2009 at 12:21 PM, Tassilo Horn tass...@member.fsf.org wrote:
Paul Mooser taron...@gmail.com writes:
Hi Paul,
It's actually fairly straightforward. In my (ordinary java)
Take a look at this blog post:
On Mar 17, 4:46 am, linh nguyenlinh.m...@gmail.com wrote:
Is it possible to reload a modified Java class in REPL?
You could write a custom ClassLoader to load (and then reload) your
Java classes. Not impossible, but not trivial.
-Stuart Sierra
On Mar 17, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Tue, Mar 17, 2009 at 1:41 PM, Rich Hickey richhic...@gmail.com wrote:
On Mar 17, 2:32 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Tue, Mar 17, 2009 at 8:08 AM, Jeffrey Straszheim
straszheimjeff...@gmail.com
Maybe Clojure-Haml helps you
http://github.com/antoniogarrote/clj-haml/tree/master
On 17 mar, 14:01, Jeffrey Straszheim straszheimjeff...@gmail.com
wrote:
Is there a good standalone library to create HTML from Clojure, preferably
something like the CL-WHO? This will be for a standalone
On Tue, Mar 17, 2009 at 3:21 PM, Rich Hickey richhic...@gmail.com wrote:
On Mar 17, 3:21 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Tue, Mar 17, 2009 at 1:41 PM, Rich Hickey richhic...@gmail.com wrote:
On Mar 17, 2:32 pm, Mark Volkmann r.mark.volkm...@gmail.com wrote:
On Tue,
A quick suggestion about rand-int. It would be useful if you could
supply it with a second argument to give a random integer over a
range. For example, (rand-int 5 10) to give a random integer between 5
(inclusive) and 10 (exclusive):
Do we have to know how Oracle deals with concurrency issues internally
in a specific application transaction when coding a database centric
application ?!?!?!
Most of the time, you do not really care about these things. You stick
to a few minimal rules
and that's it. These rules vary a bit
2009/3/17 Stephen C. Gilardi squee...@mac.com
On Mar 16, 2009, at 8:25 PM, Laurent PETIT wrote:
Hi Laurent,
Your solution is indeed close to what I had in mind in terms of
requirements. I was currently hacking with clojure java class Compiler to
enhance Timothy's patch and add a
Hey everyone,
I'm writing a macro library for myself, and I'm thinking about
publishing it. Before I do so, I'd like to write run some unit
tests for it. I was hoping the crowd could chime in on how they test
macros. Any links examples would be great. Thanks!
On Mar 16, 8:14 am, Rich Hickey richhic...@gmail.com wrote:
Did anyone consider ffilter or find-first?
I've changed it to find-first in seq-utils. That seems to be the
least objectionable name, all things considered, and has the virtue of
being easy to remember.
-Stuart Sierra
On Mar 17, 2009, at 5:52 PM, Laurent PETIT wrote:
I give up on this one. I've now been half convinced that it's even
less an ideal solution than I expected at first, and I prefer use
the little free time I have to enhance clojuredev.
Sounds good. Thanks for closing the loop on this.
On 17 mar, 14:04, Mark Volkmann r.mark.volkm...@gmail.com wrote:
Is there a summary somewhere of the steps Clojure STM takes to avoid
deadlocks? I'm just trying to understand the basics of what, if
anything, it does to avoid them.
--
R. Mark Volkmann
Object Computing, Inc.
Perhaps this
On 17 Mar, 13:23, Rich Hickey richhic...@gmail.com wrote:
I remain opposed, and here are some more reasons:
when you say
(def foo [x]
(bar x 42))
you are as likely to be referring to a forgot-to-require bar-lib as
you are to a to-be-defined bar.
The compiler can only default the
And of course, if somebody agrees that is a worth proposal and could
provide some directions, I'm here ready to churn out some code.
Here in Italy we say Help yourself and God will help you along the
way ^_^
Did I mention I'm Italian? I bet you guessed it already since I talk
too much for sure.
Another way to look at it - people are always asking for sequential
versions of find/contains?, so seq-find, seq-contains? Both would take
predicates instead of keys, and do sequential lookup.
those discussions are what made me think of 'get'. (seq-get ...) or your
names is starting to
I think I prefer find-first as well, rather than ffilter. I worry that
ffilter isn't clear enough, and reads too similarly to filter.
On Mar 16, 7:51 am, Laurent PETIT laurent.pe...@gmail.com wrote:
Just to make me more enemies ;-), I would prefer, on the other hand,
find-first over ffirst
69 matches
Mail list logo