: The responsiveness, the
skill, the quality and power of the code, never cease to amaze me.
Thanks also to everyone who read and commented on the article.
Regards,
Joshua
On Wed, Mar 4, 2009 at 8:33 PM, Joshua Fox joshuat...@gmail.com wrote:
I am working on a short article to appear in JavaWorld sometime
When I have been experimenting on the REPL, I sometimes want to save my
work. Is there a way of serializing an image of the REPL into Clojure
sourcecode?
Joshua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
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.
Joshua
On Tue, Mar 24, 2009 at 10:04 AM, Paul Drummond paul.drumm...@iode.co.ukwrote:
2009/3/23 Krešimir Šojat kso...@gmail.com:
Eric Rochester has a debug macro, together with a walkthrough of how he
built it, here
http://writingcoding.blogspot.com/2008/09/stemming-part-19-debugging.html
Joshua
On Tue, Mar 24, 2009 at 4:43 PM, Mark Volkmann r.mark.volkm...@gmail.comwrote:
I want to write a function or macro that
Any other tricks or techniques
There is defn- http://clojure.org/api#toc189 as well as the :private
metadata tag.
Joshua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send
I was envisioning .. only traverse the public keys
You could provide a function which uses select-keys to return a new map
with only the public* *keys.
This can be seen as an interface into the map held in the ref for read
access, though not for write.
Joshua
I dove into Lisp and Scheme several times in the past, but only with Clojure
did Lisp really catch?
1. Clojure abandons the 1950's cruft, with all-caps and abbreviations like
SETQ and CDR. However, Scheme does this too, without achieving the ease of
Clojure.
2. Clojure is typically illustrated
Hear, Hear!
It was far more natural to learn than Lisp and Scheme.
The language has lots of brilliant features that make me think I wish I had
thought of that.
And I like the way Rich has built the community.
Joshua
--~--~-~--~~~---~--~~
You received this
I like the sequential let too. For one thing, it allows for the breaking
apart of complex expressions into more comprehensible parts, with well named
intermediate variables resulting in self documenting code.
About the 7-part *let* as shown in your example: Could we get some opinions
about
Great article! Although I’ve done only a little Ruby metaprogramming, my
sense is that Clojure’s macros make
it more powerful than Ruby in this respect
It would be good to see a comparison of metaprogramming with macros. They
sometimes are used for similar purposes, but of course are not the same
On Wed, Mar 18, 2009 at 10:40 PM, Stephen C. Gilardi squee...@mac.com
wrote:
Because parallel bindings are also useful
Could you explain? I don't understand the justification for let in Lisp,
when let* seems so much more useful.
Joshua
Of course, defining the function makes it easier to invoke your code if you
think it might have wider usefulness.
Joshua
On Sun, Mar 15, 2009 at 3:55 AM, Keith Bennett keithrbenn...@gmail.comwrote:
Is it a good idea or a bad idea to provide a main() function as the
program's entry point?
As
I was just reading
thishttp://developer.amd.com/documentation/Articles/pages/01302008_jvm.aspx
and
wondering: Does Clojure's pure-functional design enhance VM-level bytecode
optimization by simplifying escape analysis?
Joshua
--~--~-~--~~~---~--~~
You received
How about this?
user= (defn upper-first [s] (apply str (Character/toUpperCase (first
s)) (rest s)))
#'user/upper-first
user= (upper-first a)
A
On Sun, Mar 8, 2009 at 3:39 PM, David Sletten da...@bosatsu.net wrote:
Is there a function to capitalize the first letter of a string or a
Is it fair to say that Clojure shines in algorithmic processing, string
processing, concurrency management, but that there are better choices in
other areas:
- Application programming , where the key challenge is fitting a standard
three-tier application to the business domain.
- Enterprise
expressions get evaluated and which don't, at least when you are dealing
with side effects.
I think that this is the key point. The Clojure syntax is built around its
pure-functional core. Side effects are dangerous, and the rule there is
mutator beware.
Joshua
With pointer-based strings or arrays, as in C , it is natural to start at
index 0, so that you can do pointer arithmetic: address+0 is the first
character/item.
Then, if you have a string or array of length n, the last item is at n-1.
Joshua
On Wed, Mar 4, 2009 at 2:07 PM, Mibu
This is discussed, with references, here
http://en.wikipedia.org/wiki/Array#Index_of_the_first_element
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to
I think it is the best way to load and discard lots of dynamically-loaded
and in fact dynamically-generated classes.
Joshua
On Wed, Mar 4, 2009 at 5:21 PM, Hendrik geheimm...@gmail.com wrote:
Hi,
I got a question: Clojure seems to create poopillions of
DynamicClassLoader instances. Why does
Can Clojure generate warnings when a function has side effects, particularly
in transactions and other places where one should avoid them?
Perhaps just a warning on access to any objects other than those of Clojure
types and pre-approved immutable Java types (String, Number, etc.)?
Joshua
I am working on a short article to appear in JavaWorld sometime this
spring.
Its goal is to encourage senior Java developers to learn more about Clojure.
The audience is experienced and knowledgeable about Java, but LISP to them
is a distant memory from college. So, rather than present a tutorial,
is a function of more than one argument. Re-written with place-
holders it would be:
(- a-thing (frobnicate ,,) (baz ,,) (bar ,, bla) (foo ,,))
Does that make it more clear?
-Drew
On Feb 28, 9:39 pm, Joshua Fox joshuat...@gmail.com wrote:
- confuses me: Does it treat functions with multiple
I find it confusing. Nothing seems to be where it should be, there are
almost no examples
Just my opinion, but I think that Clojure is very well documented, both on
clojure.org and on various online articles.
But I'm tired of doing it every time when some (sub)results type gets
changed
In
- confuses me: Does it treat functions with multiple parameters different
from functions with one parameter? Am I right that it can only be used with
the latter?
Joshua
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Of course, the use of let does not make the code any more imperative or
less functional, as long as there are no side effects. Also, the scope is
limited to the let block, keeping it clean, and there should be no harm
to performance.
IMHO, the code with let is simply more readable and therefore
Why do many core macros pass bindings as a vector, then destructure them in
various ways into symbols and values.
This is instead of just providing the symbol and value, e.g.,
(defmacro my-macro
[s v body]
`(let [~s ~v] ...
In at least five macros in core.clj, this was changed
It's a good idea. Not for anyone to actually use, but as an demonstration of
code is data, and of the separation of surface syntax from the code
data-structure.
Can you do this without reader macros? Can you keep it homoiconic?
(Apparently so, given the transformation rules, but I wonder if there
Ahead of Time compilation might be what you are looking for . This lets you
distribute.class files rather than your .clj source files, and makes for
slightly faster code at startup.
http://groups.google.com/group/clojure/msg/58e3f8e5dfb876c9
Joshua
On Mon, Feb 9, 2009 at 6:52 PM, hank williams
A related point about the validator function (for Refs), possible the result
of the same change in the Clojure codebaseOn page 133 of Beta 5.0,
(def messages (ref () :validator validate-message-list)
The code samples, using, the bundled clojure, do work. However, right above
the code on p.
29 matches
Mail list logo