Since we're being all high-level, it'd be good for a random function
which allows us to specify the range of numbers, since % doesn't
promise an even spread of probabilities (especially for large ranges).
--~--~-~--~~~---~--~~
You received this message because you
Hi Stuart,
That's very neat! Thanks! I'll apply your patch but I don't want to require
java 6 since there's the swing fallback for java 5: I'll keep the
refelector-based open-url-in-browser.
Christophe
On Wed, Dec 3, 2008 at 7:28 PM, Stuart Sierra
[EMAIL PROTECTED]wrote:
Hi Christophe, hi
I was at the Munich LISP User Group meeting last night. We had a
presentation from Tobias C. Rittweiler. Although it was mostly Common Lisp
focused (and SBCL at that), it was very interesting. Tobias said he will
put the detailed slides up on http://planet.lisp.org for anyone who is
On Thu, Dec 4, 2008 at 8:09 AM, mac [EMAIL PROTECTED] wrote:
I am partial to a guideline for number of lines in a function because
that has a lot to do with program factoring, not just aesthetics. But
80 characters for a line is a bit drastic.
Sure it prints well on paper but who prints code
On 02.12.2008, at 18:49, jim wrote:
One thing I saw is that 'replace-syms' could be simplified. I rewrote
it as:
(defn- replace-syms [sym-map expr]
(cond
(seq? expr) (map #(replace-syms sym-map %) expr)
(coll? expr) (into (empty expr)
A typo made me discover a behaviour of Clojure for which I haven't
found an explanation yet:
user= (def a 2)
#'user/a
user= a
2
user= a'
2
user= a
a
user= a'
2
user= (+ a 1)
(+ a 1)
What does a' do to the symbol a to make it behave differently?
Konrad.
Hello Rich,
On 4 Dez., 02:30, Rich Hickey [EMAIL PROTECTED] wrote:
needle is a strange name - what's the origin? expr is probably better.
I thought of it as needle, which we search in the haystack. But
this comparison is not very good after a second thought. Changed
needle to expr.
I think
Hi,
On 4 Dez., 10:08, Konrad Hinsen [EMAIL PROTECTED] wrote:
user= a'
2
user= a
a
a' is parsed as:
a = symbol = evaluate = 2 = print prompt
' = reader macro = wait for more
Then you type the second a and it goes on:
a = translate 'a = (quote a) = a = print prompt
So reader is actually in
Just thought the same... But when I use quoting there is always a whitespace
before the quote to seperate it from the preceding text. Is this a
misleading behavior of the reader, or a feature? ;)
-Ralf
On Thu, Dec 4, 2008 at 10:50 AM, Meikel Brandmeyer [EMAIL PROTECTED] wrote:
Hi,
On 4 Dez.,
On Dec 4, 2008, at 10:50, Meikel Brandmeyer wrote:
On 4 Dez., 10:08, Konrad Hinsen [EMAIL PROTECTED] wrote:
user= a'
2
user= a
a
a' is parsed as:
a = symbol = evaluate = 2 = print prompt
' = reader macro = wait for more
Then you type the second a and it goes on:
a = translate 'a =
On Dec 3, 11:30 pm, samppi [EMAIL PROTECTED] wrote:
I want to put the Clojure
logo:http://clojure.googlegroups.com/web/Clojure-logo.png?gda=y8lqvUIAAABo...
...on Wikipedia's article on Clojure. What is the license of Clojure's
logo--is it a free image? Or can Mr. Hickley give me
On Dec 4, 2:32 am, puzzler [EMAIL PROTECTED] wrote:
OK, after my last goof-up in reporting a bug, I'm reluctant to state
with certainty that this is a bug, but it sure seems that way:
This works:
(sort [[5 2] [1 0] [3 4]])
This works:
(sort [3243214324324132413243243243243243243234
+1 (avoid Maven, drop pom)
I'm just out of a project that has used Maven for more than 18 month.
The pain and frustration caused by the slowness and compexity of
Maven's download the whole internet approach can be matched only
bu the willingness of team astronauts to introduce Maven plugins in
I've finished my MUD - 240 lines including blanks and comments
http://clojure.googlegroups.com/web/funmud.clj
http://clojure.googlegroups.com/web/funmud.PNG
Obviously it is in no way comparable as mine is a PvP whereas the OP
was a single player (not really a Multi User Dungeon you know!).
On Dec 2, 12:52 pm, Jan Rychter [EMAIL PROTECTED] wrote:
Rich Hickey [EMAIL PROTECTED] writes:
On Jun 20, 11:58 am, Jaime Barciela [EMAIL PROTECTED] wrote:
Hello Phil,
My understanding is that Common Lisp doesn't have support for
continuations either and that's why Weblocks uses
with a delimited continuation, you're capturing it from the outside, so you
don't have that problem.
Yeah I'm pretty sure its possible. I've been intrigued by this
continuations based web programming trend as well. Early on when I
learned of Clojure I made a very poor attempt to port cl-cont
Hi,
This morning after I svn up -ed Clojure Contrib, I could no longer
build. It turns out that was 'cause I was still using Ant 1.6.2. But I
looked at the line about which the old Ant complained, and it is:
path location=CPL.txt/
However, the name of the file in the SVN repository is
On Thursday 04 December 2008 06:04, Rich Hickey wrote:
...
StringTemplate
http://www.stringtemplate.org/
StringTemplate, by the way, is how ANTLR generates its parser code
(ANTLR is target-language-neutral, not Java-specific).
...
Rich
Randall Schulz
On Dec 4, 9:04 am, Rich Hickey [EMAIL PROTECTED] wrote:
StringTemplate http://www.stringtemplate.org/
StringTemplate looks cool -- a functional, context-free template
language, with a less annoying syntax than either ERB or Google XML
Pages. From the author: Just so you know, I've never been a
StringTemplate http://www.stringtemplate.org/
In StringTemplate's case, the design was more than a stylistic issue;
the author wanted a specific kind of separation between the template
and the business logic. He wrote a short paper on the subject (see
his website for details), which is worth
A nice solution is PURE : http://beebole.com/pure/ JavaScript
templating engine converting Json to HTML.
With a Clojure version you have identical code for HTML and AJAX :
Server side :
Clojure/PURE + HTML - HTML
Client side :
Clojure/JSON - JavaScript/PURE + AJAX
pierre
and the property clojure.jar should be defined somewhere for the
library files to compile.
On Dec 4, 11:05 pm, Stuart Sierra [EMAIL PROTECTED] wrote:
I just pushed a fix.
-Stuart Sierra
On Dec 4, 9:33 am, Randall R Schulz [EMAIL PROTECTED] wrote:
Hi,
This morning after I svn up -ed
Hello,
On 4 Dez., 16:51, walterc [EMAIL PROTECTED] wrote:
and the property clojure.jar should be defined somewhere for the
library files to compile.
It's not a bug, it's a feature. In case the property is not defined,
they sources are only jar'd. To compile the files specify the
property with
Hi Dave. I think your proposal would be useful to have in Clojure, I
have thought about something similar since I read about the STM. But I
also think there are quite a few difficulties in implementing this in
a sane way. Actually, the more I think about it, the more it seems
that the goal of STM
For what it's worth SBCL has this same behavior (although I don't like
it).
On Dec 4, 2008, at 5:45 AM, Konrad Hinsen wrote:
On Dec 4, 2008, at 10:50, Meikel Brandmeyer wrote:
On 4 Dez., 10:08, Konrad Hinsen [EMAIL PROTECTED] wrote:
user= a'
2
user= a
a
a' is parsed as:
a = symbol
Ah ha ha ha. Wow, my mistake. I'll make sure to spell it correctly.
I totally agree with cogfun, though—it's a really nice logo. Did you
make it yourself?
On Dec 4, 5:23 am, Rich Hickey [EMAIL PROTECTED] wrote:
On Dec 3, 11:30 pm, samppi [EMAIL PROTECTED] wrote:
I want to put the Clojure
You can find a little demo I put together for lauofdk here:
http://www.ipowerhouse.com/lau.zip
It is exactly what ppierre mentioned, clojure servlets returning
json with a jquery/pure client hello world.
the dl includes jetty, and can be fired up with
./run test.clj
test.clj configures
the same issue is there for sorted-map and sorted-set.
--~--~-~--~~~---~--~~
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
The part after the argument vector goes into the function body, which
is wrapped in a do. do evaluates the expressions and returns the
value of the last one. The results of evaluating the other expressions
are discarded.
Ok. That provides the clarity I was after. Thank You.
It looks like
Here is a patch that appears to fix the issue I found in the sql
library's doPrepared function, which I mentioned earlier.
--
Tom Emerson
[EMAIL PROTECTED]
http://www.dreamersrealm.net/~tree
--~--~-~--~~~---~--~~
You received this message because you are
I'm a newbie, so feel free to bash me on the noggin if i'm missing
something:
Personally, I would love = to support null-ary case; being able to
use apply with = seems very powerful, and would remove the need to
check for an empty sequence.
-Scott
On Dec 3, 9:39 pm, Krukow [EMAIL PROTECTED]
Hi Tom,
Thanks for the report. I had made an accidental checkin at svn258.
I've reverted to code identical to svn257 which I believe is correct.
Please give it a try.
--Steve
On Dec 4, 2008, at 2:08 PM, Tom Emerson [EMAIL PROTECTED] wrote:
Here is a patch that appears to fix the issue I
On Thu, Dec 4, 2008 at 2:44 PM, Stephen C. Gilardi [EMAIL PROTECTED] wrote:
Thanks for the report. I had made an accidental checkin at svn258.
I've reverted to code identical to svn257 which I believe is correct.
Please give it a try.
That did it, thanks!
-tree
--
Tom Emerson
[EMAIL
I
On Dec 4, 2:55 pm, PeterB [EMAIL PROTECTED] wrote:
Hi,
I downloaded clojure_20080916.zip and had a go with a simple tree
benchmark (cut-down version of the one in the computer language
shootout http://shootout.alioth.debian.org/).
The Java version is pretty simple and runs in about 2s
ahhh... to answer my own question (and if I had looked at the code
and the API a bit closer),
it turns out that recur can only be used in tail-position... and
your code (as a tree-recursor) would
not benefit from this.
On Dec 4, 5:39 pm, Daniel Eklund [EMAIL PROTECTED] wrote:
oops...
I am
Hi,
Am 04.12.2008 um 20:55 schrieb PeterB:
However, there is a heavy price to be paid for this elegance:
'Elapsed time: 100730.161515 msecs'
Ouch! That's rather disappointing :-(
Any suggestions for improving the performance?
I've been writing a few different functions that return and operate on
some very long sequences. Everything I've been doing has been written
in terms of underlying operations that are described as lazy, so I
assumed everything would be fine as long as I don't retain the head of
any sequences.
(reduce #(+ %1 %2) 0 (map sum (range 1 (inc iterations
can be replaced by (reduce + (map sum (range 1 (inc iterations
There is at least some functions in clojure's api for doing unchecked
calculations. That should speed up things. I'm not yet familiar
enough
with clojure or
using (int ..) should also help (type hinting)
--~--~-~--~~~---~--~~
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
I already tried bOR's two suggestions (replace anonymous function with
+ and type hinting), but they made no difference on my machine.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this
On Thursday 04 December 2008 14:41, Meikel Brandmeyer wrote:
Hi,
Am 04.12.2008 um 18:30 schrieb Mon Key:
It looks like I was getting turned around by the implicit do (and
by my preconceptions coming from other Lisps where the docstring
likes to sit behind the arglist)
This doesn't work
This doesn't work well with Clojure, because you can have
multiple argument vectors:
(defn foo
docstring here
([x] (do-something-with-one-arg x))
([x y] (we-can-also-do-two x y)))
Behind which arglist should we put the docstring. ;)
That makes perfect sense, this is the
On Dec 4, 6:20 pm, Paul Mooser [EMAIL PROTECTED] wrote:
However, I'm running out of heap space using the following function to
filter my sequences:
...
I know that filter is lazy, and I see that the documentation of lazy-
cons says that lazy-conses are cached. Cached for what duration ? Does
Ah, disregard that. I found the rules:
http://shootout.alioth.debian.org/u32q/benchmark.php?test=binarytreeslang=all#about
On Fri, Dec 5, 2008 at 1:04 AM, Christian Vest Hansen
[EMAIL PROTECTED] wrote:
Is it important that we build and deconstruct a complete tree in the
process, or is merely
Hi,
I have a fairly elaborate library for representing roughly JSON-like
data. It has the ability to create JavaBean counterparts to any of its
values, whether atomic or structured.
In order to see how this might interact with (bean ...), I tried this:
user= (bean (new Boolean true))
I've added a new reference type - atom.
Docs here:
http://clojure.org/atoms
Feedback welcome,
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Clojure group.
To post to this group, send email to
On Dec 4, 8:01 pm, Randall R Schulz [EMAIL PROTECTED] wrote:
Hi,
I have a fairly elaborate library for representing roughly JSON-like
data. It has the ability to create JavaBean counterparts to any of its
values, whether atomic or structured.
In order to see how this might interact with
On Thursday 04 December 2008 17:01, Randall R Schulz wrote:
Hi,
...
user= (bean (new Boolean true))
java.lang.NoClassDefFoundError: clojure/core$bean__4456$fn__4458
In fact, I've yet to find an invocation of (bean ...) that produces
anything other than a NCDFE.
...
OK. Here's the
On Thu, 4 Dec 2008 00:07:56 -0800 (PST)
don.aman [EMAIL PROTECTED] wrote:
Since we're being all high-level, it'd be good for a random function
which allows us to specify the range of numbers, since % doesn't
promise an even spread of probabilities (especially for large ranges).
If one plans
Didn't commute essentially give this behavior for refs? How is this
different?
On Thu, Dec 4, 2008 at 5:02 PM, Rich Hickey [EMAIL PROTECTED] wrote:
I've added a new reference type - atom.
--~--~-~--~~~---~--~~
You received this message because you are
One difference would be if a ref is already inside of a bigger transaction
that failed to commit for other reasons. With atoms it seems like the
transaction is implicitly isolated to the atom (instead of explicitly
wrapping around a ref.)
On Thu, Dec 4, 2008 at 9:26 PM, Mark Engelberg [EMAIL
The attached patch fixes the compile error when in-case macro is used in
different name space. The expanded code contains a private function from
clojure.contrib.fcase name space.
--Tchavdar
--~--~-~--~~~---~--~~
You received this message because you are
On Dec 5, 2:02 am, Rich Hickey [EMAIL PROTECTED] wrote:
I've added a new reference type - atom.
Looks useful as a kind of high-level interface to
java.util.concurrent.AtomicReference. Am I correct
--~--~-~--~~~---~--~~
You received this message because you are
On Dec 5, 7:51 am, Krukow [EMAIL PROTECTED] wrote:
Looks useful as a kind of high-level interface to
java.util.concurrent.AtomicReference. Am I correct
to think of this as being (semantically) equivalent to combining send-
off and await with agents?
E.g.,
(defn memoize [f]
(let [mem
On Dec 3, 11:59 pm, Vijay Lakshminarayanan [EMAIL PROTECTED]
wrote:
This is far from complete and should be expanded but I got this from a
few hours of hacking:
Good stuff, thanks!
martin
--~--~-~--~~~---~--~~
You received this message because you are
55 matches
Mail list logo