Precedence is an overrated thing. You dont run into that issue every day.
When we do we have the support of (). So, a developer must have the option
to disambiguate it when necessary, but otherwise should not have to type the
otherwise redundant () all the time. (All this talk is about arithmetic
e
ajay gopalakrishnan writes:
> If possible, I would also want to see a macro that allows me to write (x < y)
> instead of (< x y).
Here's Chouser's infix function, which he apparently has never used
since writing it:
http://paste.lisp.org/display/75230
> (+ x y) can be read literally as "add
> (< x y) how do you read this literally left-to-right?
I've been writing Common Lisp and Clojure for about 6 years now, and I
read that "less-than x y" without any confusion.
I have almost no problems with prefix notation; even arithmetic (which
I was taught in infix for years) rarely trips
Yes, Martin, please give it a try. Only then can we know if the parenthesis
is real issue or not. There is no point arguing about it. The only
disadvantage is that, over time, people will forget that it is actually a
list. But, hey, if it does not prevent us from writing efficient and correct
code
(defn- special-form [form]
(and (list form)
(symbol? (first form))
(#{#'handle #'bind-continue} (resolve (first form)
I think the second line should say (list? form). (list form) is
always true.
--Brian
--
You received this message because you are subscribed to the Google
> Is it possible that people are confusing their inability to comprehend
> deeply nested function calls (no offense intended by that - I hit this
> often myself) with the strangeness of the perens? I think what others
> have said about having to think more about each line of Clojure is
> true. It
Give it a shot. Hack up a prototype. Let's see what happens.
On Dec 20, 12:07 am, "Alex Osborne" wrote:
> Phil Hagelberg writes:
> > "Alex Osborne" writes:
> >> But this is the same "great idea" that everyone who's ever used a lisp
> >> since the dawn of programming has come up with and despi
Phil Hagelberg writes:
> "Alex Osborne" writes:
>> But this is the same "great idea" that everyone who's ever used a lisp
>> since the dawn of programming has come up with and despite numerous
>> attempts, to my knowledge not a single one of them has ever taken off.
>
> You're forgetting about D
On Dec 19, 8:27 pm, Sean Devlin wrote:
> :else was chose because it is simply not nil, and therefor always true.
I suspected something along these lines soon after I posted. I did
some more experimenting and discovered that :foo will work just as
well as :else. So if I understand correctly, :e
Is it possible that people are confusing their inability to comprehend
deeply nested function calls (no offense intended by that - I hit this
often myself) with the strangeness of the perens? I think what others
have said about having to think more about each line of Clojure is
true. It is more e
On Fri, 18 Dec 2009 08:55:13 -0800 (PST)
IslandRick wrote:
> Can anyone here offer some advice to those who are too ingrained in
> using an object-oriented hammer on every nail they see? I know Rich
> and Stuart have some good design examples around (I've read many), but
> if there are any tutori
On Sat, 19 Dec 2009 14:22:22 +
Martin Coxall wrote:
> On 19 Dec 2009, at 13:50, Stefan Kamphausen wrote:
> > * Reason. They could have been taken away in more than 50 years of
> > history. Guess what, they are still there.
> Guess what? NOBODY uses Lisp. Because of those parens.
You've over
I think this discussion is getting too long, but anyway ..
Coming from an imperative background, especially Java which is a lot
bloated, when I tried to read Lisp code, I start to get the feeling that I
am staring at the same place for a long time. In an imperative setting, it
definitely means tha
Hi,
Am 18.12.2009 um 19:43 schrieb Alex Ott:
> Question - this is feature of require? or this is a bug?
The current require cannot handle this situation. You will have to reload all
namespaces with :reload in the right order manually.
See here for more on this issue:
http://groups.google.com/g
can't believe, you guys, WAIST! your time discussing about
parentheses. There are far more interesting things to discuss. Please
don't waist time (time is life, is all we have) in that, and
specially, this is a public group, where knowledge should be share,
not nonsense discussions.
If somebody l
Ah, :else is an unfortunate choice. The cond macro keeps testing
clauses until it finds one that is true. :else was chose because it
is simply not nil, and therefor always true.
I would re-write your fn like so:
(defn sign [x] (cond (> x 0) "Positive" (< x 0) "Negative" true
"Zero"))
Sean
On
What, exactly, is a "clause" in clojure? From seeing the term used in
context, I inferred that it meant something along the lines of "a
keyword which can optionally be used to change the semantics of a
form". Apparently, it means more than that.
This is valid clojure:
(defn sign [x] (cond (> x
"Alex Osborne" writes:
>> But I'm trying to think of it from the point of view of Joe Q. Coder,
>> who will take one look at our beloved elegant, expressive Clojure, see
>> all the parens and run screaming.
> But this is the same "great idea" that everyone who's ever used a lisp
> since the dawn
On Sat, Dec 19, 2009 at 10:30 AM, Sean Devlin wrote:
> Steve,
> I've been checking out the Java, and it looks the same to me. I think
> this raises a couple issues:
>
> 1. Should sorted versions get transient support in 1.1?
> 2. The docs should be updated to reflect the 1.1 status of
> transie
On Dec 19, 2009, at 5:23 PM, Stefan Kamphausen wrote:
> 1. Is my explanation correct?
It is. The binding form operates on the var, it doesn't affect name resolution
within the binding form's body. *val* within the body of the binding still
resolves to the let-bound local. While *val* is shadow
Martin Coxall writes:
> I trust the many, many more people that have rejected Lisp for its
> hostile syntax and delusions of importance than the statistically
> insignificant minority who have actually stuck with it.
Sometimes people are just looking for excuse to criticize. Before it
was cons
John writes:
> I am trying to use lein.py, from above, on Windows (Vista).
> But I still have the following error with the 'lein.py install' and
> 'lein.py jar' commands:
I don't know Python myself, so I will wait until I hear about these
being resolved before I check this in.
-Phil
--
You re
Andrea Tortorella writes:
> Yes, I'd like to use the new branch not the master one, anyway having
> this dependency in project.clj:
>
> [org.clojure/clojure "1.1.0-new-SNAPSHOT"]
>
> and using lein repl, I still have 1.1.0-alpha-SNAPSHOT at the repl.
That's a bug. Currently due to I/O limitation
On 19 dec, 15:25, Martin Coxall wrote:
> > I guess it's mostly a matter of judging a language by its long-term
> > merits instead of initial appearance -- just like with so many other
> > things in life.
>
> That - right there - is a tacit admission that the Clojure community will
> find it activ
Occasionally I have to write a custom def macro, and this would make
life easier. I would have to use it to provide specific feedback, but
it seems like an idea worth pursuing.
On Dec 19, 3:58 pm, Stuart Halloway wrote:
> In Clojure it is idiomatic to have optional args at the front of the
>
John writes:
> Hi,
>
> I am trying to use lein.py, from above, on Windows (Vista).
>
> It works nicely for some commands (e.g. lein.py compile),
> after removing the extra space in two places e.g.
> 'leiningen-%s-standalone .jar' ->
> 'leiningen-%s-standalone.jar'
> and
> '1.1.0-alpha-SNAPSHOT/cl
Hi,
just found that a binding-form within a let-form does still use the
outer value.
user> (def *val* "root binding")
#'user/*val*
user> (defn print-val [] (println "*val* is: " *val*))
#'user/print-val
user> (defn let-vs-binding []
(println "beginning: " *val*)
(let [*val* "bound
Oh and another thing:
In my experience, it's easier to start by putting all the code in a
single package, and only split it up once you get to a level of
complexity that really demands splitting it up.
Emacs/SLIME (and probably other interactive environments) really help
too: once you've written/
On 18 dec, 17:55, IslandRick wrote:
> Can anyone here offer some advice to those who are too ingrained in
> using an object-oriented hammer on every nail they see? I know Rich
> and Stuart have some good design examples around (I've read many), but
> if there are any tutorials that show how to re
Shantanu Kumar writes:
> Could anybody please give me a Clojure 1.1 Maven2 repo URL? It's not
> there on Maven central repo yet, and (surprise!) clojars.org doesn't
> seem to have it either.
http://build.clojure.org/snapshots/
--
You received this message because you are subscribed to the Goog
In Clojure it is idiomatic to have optional args at the front of the
signature. This makes it easy to define convenient caller APIs, but it
leads to bulky let forms like this one (from clojure.core/defmulti)
(let [docstring (if (string? (first options))
(first optio
Well, good thing you repented of your evil ways
On Dec 19, 3:37 pm, Stuart Sierra wrote:
> On Dec 18, 9:28 pm, Sean Devlin wrote:
>
> > It is proudly a Lisp for people that want to get things done. Any
> > Java/.NET/Python/Brainfuck/Ruby/Basic/C/C++ (No Perlmongers :))
>
> I was a Perlmonge
On Dec 18, 9:03 am, David Thomas Hume wrote:
> From the 1.1 release notes:
>
> "Futures represent asynchronous computations. They are away to get
> code to run in another thread, and obtain the result."
That's been fixed now in the 1.1.x branch; thanks for the report.
-SS
--
You received this m
On Dec 18, 9:28 pm, Sean Devlin wrote:
> It is proudly a Lisp for people that want to get things done. Any
> Java/.NET/Python/Brainfuck/Ruby/Basic/C/C++ (No Perlmongers :))
I was a Perlmonger back in the day. :)
-SS
--
You received this message because you are subscribed to the Google
Groups
Parens are really a non-issue once you are using an editor
that counts them and highlights matching appropriately.
--
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
Note that posts from new m
On Sat, Dec 19, 2009 at 9:21 AM, David Nolen wrote:
> I don't think anybody in the Clojure community wants to Clojure to be a
> fringe language.
Actually, I don't mind if Clojure retains a certain degree of "fringe" status.
To clarify, I think the ideal size for a language community is
somewhere
The intended audience are Software Engineers. Not the people who hide
behind "this-is-not-intuitive" their lack of willing to learn the most
effective way to spend their professional life.
Why is it that you believe them to be mutually exclusive events? You portray
Software engineers as if they ar
Hi,
Could anybody please give me a Clojure 1.1 Maven2 repo URL? It's not
there on Maven central repo yet, and (surprise!) clojars.org doesn't
seem to have it either.
I am going to use the 1.1 RC JAR in my local repo until I find one.
Regards,
Shantanu
--
You received this message because you a
Oops.. left two parentheses out in my Java code. Guess that just furthers my
point. :)
> List newObjects = ArrayList();
On Dec 19, 2009, at 12:04 PM, Joseph Smith wrote:
> Very abstract java example (as concise as possible):
>
> List processList(List oldObjects)
> {
>List newObjects
Very abstract java example (as concise as possible):
List processList(List oldObjects)
{
List newObjects = ArrayList;
for(Object object : oldObjects)
{
newObjects.add(manipulate(object));
}
return newObjects;
}
Clojure equivalent:
(defn processList [#^Object list]
Martin,
I was short with you yesterday. I'm sorry about that. Please let me
try again.
I'm all for providing better documentation, eliminating bad design,
and holding hands as people get up to speed. As a community, we
constantly need to do more work to make it accessible. That's the
point of
On Sat, Dec 19, 2009 at 8:25 AM, Martin Coxall wrote:
> >
> > I guess it's mostly a matter of judging a language by its long-term
> > merits instead of initial appearance -- just like with so many other
> > things in life.
> >
>
> That - right there - is a tacit admission that the Clojure communi
>
> I guess it's mostly a matter of judging a language by its long-term
> merits instead of initial appearance -- just like with so many other
> things in life.
>
That - right there - is a tacit admission that the Clojure community will find
it actively desirable that it remain a minority langu
Thanks for your answers.
Yes, I'd like to use the new branch not the master one, anyway having
this dependency in project.clj:
[org.clojure/clojure "1.1.0-new-SNAPSHOT"]
and using lein repl, I still have 1.1.0-alpha-SNAPSHOT at the repl.
I added the spec to the dev-dependencies too, but still ha
Hi,
I am trying to use lein.py, from above, on Windows (Vista).
It works nicely for some commands (e.g. lein.py compile),
after removing the extra space in two places e.g.
'leiningen-%s-standalone .jar' ->
'leiningen-%s-standalone.jar'
and
'1.1.0-alpha-SNAPSHOT/cloju re-1.1.0-alpha-SNAPSHOT.jar'
Thanks!
I found this one, it involves a function that does the resolve:
(defn -dynlet [bvec body]
`(let ~bvec ~body))
(defmacro dynlet [bvec body]
`(eval (-dynlet ~bvec ~body)))
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gr
I want to thank you all for your suggestions, the clojure community is
really great!
On Dec 18, 1:35 pm, Patrick Kristiansen
wrote:
> Hi
>
> We're two students that have been working with concurrent programming
> languages (Erlang and Clojure), and while both languages are very
> interesting, we
On 19 Dec 2009, at 13:50, Stefan Kamphausen wrote:
> Hi,
>
> On 18 Dez., 20:07, Martin Coxall wrote:
>> One of the things that always puts people off of Lisp, as we all know, are
>> the parentheses.
>
> one of the things that always put Lispers off is this same question.
>
> I have three arg
>
>
> It is proudly a Lisp for people that want to get things done. Any
> Java/.NET/Python/Brainfuck/Ruby/Basic/C/C++ (No Perlmongers :)) that
> want to get better are welcome. However, there is a way things are
> done in the language, driven by the underlying problems reality
> imposes on deve
Predicate dispatch would be an interesting topic. The #1 problem with
predicate dispatch is method ordering. Predicate dispatch as described
in the orignal paper [http://www.cs.washington.edu/homes/mernst/pubs/
dispatching-ecoop98-abstract.html] decides what order to used based on
implication betwe
On Dec 18, 3:03 pm, David Thomas Hume wrote:
> From the 1.1 release notes:
>
> "Futures represent asynchronous computations. They are away to get
> code to run in another thread, and obtain the result."
>
> I know "away" is just a typo for "a way", but be damned if that isn't
> the best pun I've s
Steve,
I've been checking out the Java, and it looks the same to me. I think
this raises a couple issues:
1. Should sorted versions get transient support in 1.1?
2. The docs should be updated to reflect the 1.1 status of
transients.
Sean
On Dec 19, 10:23 am, "Stephen C. Gilardi" wrote:
> > I
Personally, I don't think the problem for non-Lispers is with the
number of parentheses so much as with the *depth* of parens-nesting
and having to invert the reading order, starting from the deepest
s-expr and reading your way back out.
I'm still very new to Clojure (basically I have only been pa
> I was experimenting with transients, and they don't seem to work for
> sorted collections:
>
> user=> (transient (sorted-map 1 2 3 4))
> java.lang.ClassCastException: clojure.lang.PersistentTreeMap cannot be
> cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
>
> user=> (transient (s
IIRC, you can use transient only with maps and vectors.
David
On Sat, Dec 19, 2009 at 8:46 AM, Sean Devlin wrote:
> Hey,
> I was experimenting with transients, and they don't seem to work for
> sorted collections:
>
> user=> (transient (sorted-map 1 2 3 4))
> java.lang.ClassCastException: clojur
Hey,
I was experimenting with transients, and they don't seem to work for
sorted collections:
user=> (transient (sorted-map 1 2 3 4))
java.lang.ClassCastException: clojure.lang.PersistentTreeMap cannot be
cast to clojure.lang.IEditableCollection (NO_SOURCE_FILE:0)
user=> (transient (sorted-set 1
On Dec 18, 8:07 pm, Martin Coxall wrote:
> I had this thought at work, when I should have been working, so please bear
> with me if it's nonsense.
>
> One of the things that always puts people off of Lisp, as we all know, are
> the parentheses. Now, many ways have been suggested of doing this in
On Dec 19, 1:52 am, ajay gopalakrishnan wrote:
> Put
>
> *Comparative performance evaluation of Java threads for embedded
> applications**: Linux thread vs. Green thread
Your Google search skills are obviously beyond ours. :) I've found it
now.
--
You received this message because you are subsc
Hi,
On 18 Dez., 20:07, Martin Coxall wrote:
> One of the things that always puts people off of Lisp, as we all know, are
> the parentheses.
one of the things that always put Lispers off is this same question.
I have three arguments to make. Love, reason and trust.
* Love. Parentheses are an
It's certainly something I would like to add to counterclockwise.
If only paredit's code was written in clojure, it could have been more
easily reused by enclojure, La Clojure and counterclockwise ! :-(
2009/12/19 Avital Oliver
> It seems that noone has brought up the amazing paredit mode for
How about static analysis? Plenty of interesting problems there. For
example:
1. detect incorrect uses of transients (those that would certainly
lead to exceptions) and report them during compile-time.
2. related to (1), but different: detect places where the compiler can
implicitly convert colle
It seems that noone has brought up the amazing paredit mode for emacs which
gives you keyboard commands for s-expression structure manipulation. It also
makes sure you never get your close parenthesis wrong. I use it and can't
imagine writing any medium+-complexity code without it.
On Dec 19, 2009
If you could share more detail, the end result of helping you could be
interesting : both versions (OOP & clojure) of a same program.
2009/12/18 IslandRick
> Up until a month ago, my total Lisp experience consisted of hacking
> my .emacs file to bend it to my will -- a lot. Discovering Clojure
What about adding circular dependency resolution to the compiler
between Clojure -> Java code ?
I know, I know - it's not very sexy but it would go a long way for
companies with larger legacy Java code bases that may be considering
moving to Clojure. Being able to replace Java code 'one step at a
64 matches
Mail list logo