Hi,
I'm just starting with clojure, and I cannot get to use the
clojure.contrib.repl-utils/source function:
user=> (use 'clojure.contrib.repl-utils)
nil
user=> (source map)
Source not found
nil
I have the clojure-sources.jar in my classpath:
alias repl='java -cp /Users/hunli/Library/clojure/c
A simpler example is the pretty printer in clojure contrib. This has
three component files that make up the common namespace and they are
just loaded in:
(ns clojure.contrib.pprint
(:use clojure.contrib.pprint.utilities)
(:import [clojure.contrib.pprint PrettyWriter]))
(load "pprint/pprint_b
as Holy wars can be (reference title), to me the same thing you edit in, has
to have decorations in the project tree showing the version control stuff,
which files have been messed with ... integrated diff, etc.
So I'm saying that a version control system is DEFINED by how well it works
with eclip
You have some valid points, but I think trying to come up with a solution
using existing components in Clojure in order to determine if there really
is a gap in Clojure's design is the best approach. I don't always use
accessor macros but that's because I don't normally build up maps that are
inten
On Fri, Apr 24, 2009 at 5:16 PM, e wrote:
> Git seems pretty interesting to me, too, which is why I tried for 7 hours on
> my somewhat outdated Mac to try to get it to work nicely with eclipse and
> the git eclipse plugin. It was a total nightmare. I want my 7 hours back.
Don't discount git ju
On Fri, Apr 24, 2009 at 3:36 PM, David Nolen wrote:
> Is this really so hard?
Are you telling me that you routinely write accessors for all your
data structures in Clojure using those macros? I'll bet very few
people do this. People make use of the facilities conveniently
available to them. U
Perhaps I'm being dense but I still fail to see what the issue is here:
(defn setter [sym]
`(defn ~(symbol (str "set-" sym)) [~'x ~'y]
(assoc ~'x ~(keyword (str sym)) ~'y)))
(defn getter [sym]
`(defn ~(symbol (str "get-" sym)) [~'x]
(~(keyword (str sym)) ~'x)))
(defmacro accessors [
I noticed today that a series of digits with a trailing decimal point
are read by Clojure as an Integer.
user=> (class 123.)
java.lang.Integer
In contrast, Java reads such a number as a double.
% javac Foo.java
Foo.java:5: possible loss of precision
fou
I'm planning on checking it out. Thanks.
On Fri, Apr 24, 2009 at 5:19 PM, Phil Hagelberg wrote:
>
> On Fri, Apr 24, 2009 at 2:08 PM, Scott Jaderholm
> wrote:
> > Thanks Phil! I just bought it and look forward to watching it this
> weekend.
> >
> > Are you planning something more advanced?
>
>
I predict some shops that end up with Git some day to wrap those steps so
they feel like it's one step again. But that could be ok because they still
get to have the whole history. Thanks for explaining.
On Fri, Apr 24, 2009 at 5:27 PM, Stuart Sierra
wrote:
>
> On Apr 24, 5:16 pm, e wrote:
> >
Laurent, I think we're actually mostly in agreement here, although we
differ on some of the details.
I agree with the Principle of Uniform Access. One interpretation of
this principle is that coders should never have a public field, and
should always use getters and setters, to make the API futu
On Fri, Apr 24, 2009 at 2:08 PM, Scott Jaderholm wrote:
> Thanks Phil! I just bought it and look forward to watching it this weekend.
>
> Are you planning something more advanced?
We don't have any plans for that right now, but if it sells well it's
definitely a possibility.
-Phil
--~--~--
On Apr 24, 5:16 pm, e wrote:
> But let me understand ... when you do a commit, you haven't really
> done anything that "counts"? Loaded question, I know, but it seems like you
> have to do a commit, and then do a "send" or something, to actually share
> your changes. Is that right?
Sort of. F
Well you have it in your local repo, that "counts" ;)
In fact that is the big advantage of a DVCS, that you can make local
commits. This also means that if for some reason the big server in the sky
goes down, your repo has all the information that the big sky one did and
can be used by anyone to c
Git seems pretty interesting to me, too, which is why I tried for 7 hours on
my somewhat outdated Mac to try to get it to work nicely with eclipse and
the git eclipse plugin. It was a total nightmare. I want my 7 hours back.
Eventually I went with tried and true svn ... planning to revisit in the
Thanks Phil! I just bought it and look forward to watching it this weekend.
Are you planning something more advanced?
On Fri, Apr 24, 2009 at 11:03 AM, Phil Hagelberg wrote:
>
> I'm proud to announce that the "Functional Programming with Clojure"
> PeepCode screencast has just been published:
>
On Fri, Apr 24, 2009 at 7:52 PM, tmountain wrote:
>
> Very cool. I actually cleaned up the code a little bit more this
> morning trying to speed things up a bit. It's still not as fast as I'd
> like, but I'm not up to speed on Closure optimization either, so I
> could be missing something.
This
On Apr 24, 3:06 pm, Victor Rodriguez wrote:
> On Fri, Apr 24, 2009 at 2:24 PM, Sean Devlin wrote:
>
> > There recently was a ton of traffic about SCM in the "Path to 1.0"
> > thread. Google made the following announcement:
>
> >http://google-code-updates.blogspot.com/2009/04/mercurial-support
On Fri, Apr 24, 2009 at 2:24 PM, Sean Devlin wrote:
>
> There recently was a ton of traffic about SCM in the "Path to 1.0"
> thread. Google made the following announcement:
>
> http://google-code-updates.blogspot.com/2009/04/mercurial-support-for-project-hosting.html
>
> Does this make changing
There recently was a ton of traffic about SCM in the "Path to 1.0"
thread. Google made the following announcement:
http://google-code-updates.blogspot.com/2009/04/mercurial-support-for-project-hosting.html
Does this make changing the SCM tool to Hg a real possibility? While
this might not be s
On 24 Apr., 15:27, al3xandr3 wrote:
> Hi guys, sharing here a little Clojure script i made that uses
> Selenium.
> In case someone finds it
> useful:http://alexandrenotebook.blogspot.com/2009/04/clojure-and-selenium.html
Thanks for your article.
I find it interesting, however, I personally pref
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 23
Very cool. I actually cleaned up the code a little bit more this
morning trying to speed things up a bit. It's still not as fast as I'd
like, but I'm not up to speed on Closure optimization either, so I
could be missing something.
Revised code:
(ns markov
(use clojure.contrib.str-utils))
(def
http://alarmingdevelopment.org/?p=217
seems like it would be an interesting fit with Clojure.
sincerely.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To post to this group, send email to clojure
I'm proud to announce that the "Functional Programming with Clojure"
PeepCode screencast has just been published:
http://peepcode.com/products/functional-programming-with-clojure
It's a professionally-produced 65-minute video that introduces all the
foundational concepts of Clojure by stepping t
Oops didn't finish my thought before sending. Anyways, the point is that
Clojure encourages the programmer to design functionality around functions
not data structures. Because Clojure is a Lisp, this syntax can be very
expressive.
On Fri, Apr 24, 2009 at 12:49 PM, David Nolen wrote:
> On Fri, Apr
Cool... I actually did a Markov chain generator myself as one of my
early Clojure projects. I posted about it at the DC Study group, here:
http://groups.google.com/group/clojure-study-dc/browse_thread/thread/26ccdc8acb102f9/d18d7627ddcaf167
It looks like yours is more succinct... I'll definitely
On Fri, Apr 24, 2009 at 12:15 PM, Mark Engelberg
wrote:
>
> The problem, of course, is that there is a language design principle
> that has evolved in the OO community that client code shouldn't need
> to know whether you are accessing a field or a method. In Clojure,
> things kind of break down
Hi guys, sharing here a little Clojure script i made that uses
Selenium in case some one finds it useful:
http://alexandrenotebook.blogspot.com/2009/04/clojure-and-selenium.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
Hi guys, sharing here a little Clojure script i made that uses
Selenium.
In case someone finds it useful:
http://alexandrenotebook.blogspot.com/2009/04/clojure-and-selenium.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Googl
2009/4/24 Mark Engelberg :
>
> On Fri, Apr 24, 2009 at 2:21 AM, AndrewC. wrote:
>> If client code is using assoc and get then you haven't really started
>> thinking of your map as a new data type - you're still thinking of it
>> as a map.
>
> I disagree with this assertion, and the comparison to
On Fri, Apr 24, 2009 at 2:21 AM, AndrewC. wrote:
> If client code is using assoc and get then you haven't really started
> thinking of your map as a new data type - you're still thinking of it
> as a map.
I disagree with this assertion, and the comparison to the SICP
example. Unlike Scheme, Clo
I just published the fourth and last part of my monad tutorial:
http://onclojure.com/2009/04/24/a-monad-tutorial-for-clojure-
programmers-part-4/
As always, comments are welcome!
Konrad.
--~--~-~--~~~---~--~~
You received this message because you are su
2009/4/24 Mark Reid :
>
> Hi,
>
> This is probably digressing a little from the original question but I
> was wondering if using namespaces here is a reasonable thing to do
> when designing ADTs.
>
>> SICP tells us that we should be defining accessor functions
>> immediately when we create a new d
In an effort to learn more about Clojure, I decided to port a markov
text generator which a friend wrote in Python. After getting through a
few snags, I completed the program and decided to have some fun
feeding in some e-books downloaded from the Gutenberg project as
input. In this case, I chose
'lo all,
I just posted a short blog entry of doing code-coverage with clojure and maven:
http://www.talios.com/code_coverage_of_clojure_code.htm
This is using the clojure-maven-compiler I started over on github:
http://github.com/talios/clojure-maven-plugin
It's a pity emma doesn't pick u
Hi,
This is probably digressing a little from the original question but I
was wondering if using namespaces here is a reasonable thing to do
when designing ADTs.
> SICP tells us that we should be defining accessor functions
> immediately when we create a new data type.
>
> (defn make-fraction [n
Laurent PETIT a écrit :
> 2009/4/24 Christophe Grand :
>
>> Konrad Hinsen a écrit :
>>
>>> What I miss most for a 1.0 release is some idea of how future changes
>>> will be handled, and what Clojure users can safely count on. For
>>> example, every new function added to clojure.core will b
2009/4/24 AndrewC. :
>
>
>
> On 23 Apr, 17:59, Mark Engelberg wrote:
>> Another problem that has already been "solved" by many OO languages is
>> that initially it is most convenient to code certain things as
>> properties of the object, and somewhere down the line, you may want to
>> change prop
On 23 Apr, 17:59, Mark Engelberg wrote:
> Another problem that has already been "solved" by many OO languages is
> that initially it is most convenient to code certain things as
> properties of the object, and somewhere down the line, you may want to
> change property access into a method call.
2009/4/24 Christophe Grand :
>
> Konrad Hinsen a écrit :
>> What I miss most for a 1.0 release is some idea of how future changes
>> will be handled, and what Clojure users can safely count on. For
>> example, every new function added to clojure.core will break code
>> that has chosen to use the s
Konrad Hinsen a écrit :
> What I miss most for a 1.0 release is some idea of how future changes
> will be handled, and what Clojure users can safely count on. For
> example, every new function added to clojure.core will break code
> that has chosen to use the same name for something else. Wh
Dimiter "malkia" Stanev a écrit :
>> Or maybe just:
>> (defn mo [op & args] (reduce op args))
>>
>
> I believe that won't make clojure make a faster code, but I might be
> wrong.
> I think the macroexpansion is the right thing if you want speed, as it
> seems clojure could optimize well this:
Hi Kevin!
Your (let [dummy 0] ...) is a single expression and, as such, is entirely
compiled before being executed.
But to properly compile (add 1 (mul magic x)) 'add need to have a value and it
will not have a value until the (compiled) expression is executed.
So, for this expression, its comp
44 matches
Mail list logo