Approximately how much RAM is required to deploy a small Ring app on
64-bit Ubuntu?
--
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 members are moderated - please b
That more or less what I had in mind, but I was wondering if someone has
already an Open Sourced
code for HashTries in Clojure.
But I can try your idea with binary tree first. It seems simpler.
Thanks again,
Nicolas
On Sun, Jun 27, 2010 at 5:13 AM, Jules wrote:
>
> You can use the same idea fo
That's a super cool idea, but my data have no similar size. Anyway, that's
both simple and always better than what I do.(At worst it has an expected
complexity of O(n) if all the mass is in one value and the n-1 are
zero-ish).
I think you can solve the holes on delete by permuting the removed elem
Hi,
Is there any way to generate class in runtime and then use it?
How far I can only generate interfaces.
This works:
(do
(gen-interface :name test.commons.Me
:methods [[ me [ String ] void ]])
(def z (reify test.commons.Me
(me [t z] (println "hello wor
Can I change the title to:
"Duplicate key error handling feature in hash-sets" ?
I was using the '#' thinking it was short for a hash-map, rather than
a hash-set.
Clojure has more data structures available than I'm used to working
with.
So thanks for the error handling.
Tim
On Jun 25, 9:37 a
Thirded.
On Jun 25, 4:55 pm, Mark Engelberg wrote:
> On Fri, Jun 25, 2010 at 2:39 PM, Garth Sheldon-Coulson wrote:
> > Personally, I think (= 3 3M) => true and (= 3/10 0.3M) => true would be nice
> > to have, given that (= 3 3N) => true. Both are currently false in equiv. I
> > also think (= 3.0
Thank you very much to all for comprehensive explanations.
As newcomer to Clojure dare to remark that this is not very consistent
semantics of "contains" :)
On 25 июн, 21:25, ataggart wrote:
> My sense from reading Rich's writing on the subject is that 'contains?
> was named with the use of sets
I agree that duplicate keys in literals are probably a coder error but
IMO this deserves some kind of compiler warning rather than an error.
You're going to get into lots of sticky situations otherwise that only
confuse people if the semantics are different between literals and
other usage. Simple
Easy to explain - absolutely, consistent - mm, not really...
I found this new behavior a bit confusing, imo it breaks principle of
least surprise.
This feature is uncommon in dynamic languages (even Scala allows
duplicate keys - Set('a,'a)/Map('a->1,'a->1)).
Also, from the practical point of view
Sounds good to me. The first version of that function I wrote without
returning nil, but just bubbling up the exception. I changed it because I
couldn't think of another area of the Clojure core that threw an exception
like that. Looking through some of the agents code, I think there are some
si
Possibly of interest here, although I've only tested it using Clojure
1.1:
I just did an implementation of the n-body problem from
http://shootout.alioth.debian.org/u32q/benchmark.php?test=nbody&lang=all
The fastest code I've managed so far is here:
http://github.com/j-g-faustus/Clojure-test-code
(running clojure 1.2 snapshot)
Q1: Why does pmap use the number of available processors + 2? I would
have thought it would just use the number of avail processors...
Q2: Could someone clear up my misunderstanding of pmap w/ respect to the
code snippets below? Pmap doesn't seem to be limiting
I tried to find something in core / on Google to do this but didn't,
here is what I have anyway:
(defn lst-to-map [lst]
(reduce
(fn [hsh chunk]
(assoc hsh (first chunk) (last chunk)))
(hash-map)
(partition 2 lst)))
Is there an easier/shorter way?
--
You received th
(running clojure 1.2 snapshot)
Q1: Why does pmap use the number of available processors + 2? I would
have thought it would just use the number of avail processors...
Q2: Could someone clear up my misunderstanding of pmap w/ respect to
the code snippets below? Pmap doesn't seem to be limiting the
If there is some sort of new numeric tower on the plate, what would be
some desirable properties?
On Jun 25, 10:58 pm, Andrzej wrote:
> On Sat, Jun 26, 2010 at 4:04 AM, Rich Hickey wrote:
> > equiv, the revenge of num
>
> Has it already been decided that some sort of this new numeric tower
> wil
On Sat, 26 Jun 2010 15:54:34 -0700 (PDT)
hsarvell wrote:
> I tried to find something in core / on Google to do this but didn't,
> here is what I have anyway:
>
> (defn lst-to-map [lst]
>(reduce
> (fn [hsh chunk]
> (assoc hsh (first chunk) (last chunk)))
> (hash-map)
>
On Jun 27, 2010, at 1:09 AM, Mark Engelberg wrote:
Is there a list somewhere of all the protocols built-in to Clojure
1.2's core that are available for extension?
There are no extension points built on protocols in Clojure yet.
Delivering protocols is step one, re-architecting the core
a
On Sat, Jun 26, 2010 at 6:56 PM, j-g-faustus wrote:
>
> On my machine this is about 4x slower than the shootout Java
> implementation. Using Java as the baseline and comparing my local
> results to the shootout timings, it puts Clojure 1.1 on par with
> Erlang, Go and OCaml.
>
> On profiling I hav
>
> I think you can solve the holes on delete by permuting the removed element
> with the last element and keeping a map from value to their index.
>
Good idea!
Thanks you very much for these suggestions.
>
You're welcome. The hashtrie is a much better idea for this situation, of
course.
Couldn
When I read about new "features" in other languages that would be
simple macros in Lisp I just have to smile:
http://docs.python.org/dev/reference/compound_stmts.html#with
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send ema
On Sun, 27 Jun 2010 11:58:16 -0700 (PDT)
cageface wrote:
> When I read about new "features" in other languages that would be
> simple macros in Lisp I just have to smile:
> http://docs.python.org/dev/reference/compound_stmts.html#with
Many in the Python community consider this an advantage of Py
At Akamai we are using Clojure combined with Compojure for a project that
involves the live transcoding of mobile content. I can't talk about the
details, nor mention any specific libraries or features we are using, except to
say that we chose Clojure for the normal reasons: its meta-programm
Python definitely seems to be the product of a very different design
philosophy than Lisp. I've always felt it was too prescriptive.
Omitting features that *might* be misused in an effort to keep the
language simple seems to have backfired on them. Too keep up with the
competition they've had to ad
On Sun, 27 Jun 2010 12:41:36 -0700 (PDT)
cageface wrote:
> Python definitely seems to be the product of a very different design
> philosophy than Lisp. I've always felt it was too prescriptive.
> Omitting features that *might* be misused in an effort to keep the
> language simple seems to have ba
HI Michael,
If I understand correctly, the proxy function might be what you are looking
for. I think gen-class can only be used with AOT compilation.
-Rob
On Sun, Jun 27, 2010 at 8:19 AM, Michael Jaaka wrote:
> Hi,
>
> Is there any way to generate class in runtime and then use it?
> How far I
On Jun 27, 1:17 pm, Mike Meyer wrote:
> Not quite - it's to keep the language *readable*. And if there's a use
> case for a feature that outweighs the damage done by abusing it,
> they'll add it. Witness with, list comprehensions, and those
> never-to-sufficiently-cursed augmented assignment opera
I spent some time today trying unsuccessfully to get the equiv branch
up and running on Windows. I'd appreciate some guidance.
I downloaded git, installed git.
Used git to "clone" the github repository.
Used git to "checkout origin/equiv".
Downloaded ant.
Installed ant.
Ran ant.
Seemed to work.
U
Certainly macros can be dangerous if used recklessly or clumsily, but
> isn't trusting the programmer and giving him powerful tools what Lisp
> is all about? No other language provides the same power of expression.
> A tour through the Clojure code demonstrates just how powerful this
> idea is and
On 28 June 2010 01:53, Mark Engelberg wrote:
> Ran ant. Didn't work (no ant build file. Why does clojure-contrib
> have a different build process than clojure?).
Good question.
> Ran "maven package" in the clojure-contrib directory.
You need to tell it where to look for clojure.jar. On Linux,
On Sun, Jun 27, 2010 at 5:33 PM, Michał Marczyk
wrote:
> mvn package -Dclojure.jar=/absolute/path/to/clojure.jar
Thanks. I had tried that, but I got further as soon as I tried:
mvn package -Dclojure.jar=c:/absolute/path/to/clojure.jar
I'm now getting 3 failures in clojure.contrib.test_io and 1
On 28 June 2010 03:23, Mark Engelberg wrote:
> Thanks. I had tried that, but I got further as soon as I tried:
> mvn package -Dclojure.jar=c:/absolute/path/to/clojure.jar
>
> I'm now getting 3 failures in clojure.contrib.test_io and 1 in test_profile.
>
> Is this normal, or is something else goi
When I try to compile clojure-contrib with the equiv branch on archlinux,
maven 2.2.1, jre 1.6.0_20, I get:
Compiling clojure.contrib.condition.Condition to
/mnt/hgfs/sirfoobar/Documents/Eclipse/clojure-contrib/target/classes
Exception in thread "main" java.lang.NoClassDefFoundError:
clojure/lang/
On 28 June 2010 05:11, Garth Sheldon-Coulson wrote:
> When I try to compile clojure-contrib with the equiv branch on archlinux,
> maven 2.2.1, jre 1.6.0_20, I get:
Be sure to run mvn clean first.
Sincerely,
Michał
--
You received this message because you are subscribed to the Google
Groups "Cl
On Sun, Jun 27, 2010 at 4:54 PM, rob levy wrote:
> HI Michael,
>
> If I understand correctly, the proxy function might be what you are looking
> for. I think gen-class can only be used with AOT compilation.
>
> -Rob
>
>
This is actually something that has been bugging me for a while. Most of
th
On 28 June 2010 05:11, Garth Sheldon-Coulson wrote:
> Compiling clojure.contrib.condition.Condition to
> /mnt/hgfs/sirfoobar/Documents/Eclipse/clojure-contrib/target/classes
> Exception in thread "main" java.lang.NoClassDefFoundError:
> clojure/lang/ILookupHost
Ah, sorry, it just occurred to me t
Ah, thanks. I also see no test failures (archlinux).
On Sun, Jun 27, 2010 at 11:31 PM, Michał Marczyk
wrote:
> On 28 June 2010 05:11, Garth Sheldon-Coulson wrote:
> > When I try to compile clojure-contrib with the equiv branch on archlinux,
> > maven 2.2.1, jre 1.6.0_20, I get:
>
> Be sure to ru
On 28 June 2010 06:11, Garth Sheldon-Coulson wrote:
> Ah, thanks. I also see no test failures (archlinux).
After realising that the not-AOT-compiled namespaces might still break
when require'd, I went ahead and tested a couple of them. There was
about a 50/50 split between the working namespaces
I am using clojure to rewrite an online bookkeeping application (currently
only a test site). I have wanted to learn Lisp and functional programming
for a while now. And the emergence of Clojure, and the need to refactor my
application, gave me the opportunity.
While I'm still new to the language
OK, I just tried building clojure-contrib pointing at a clojure.jar
built from the current master branch. I get the same errors (on
Windows). Here are more details:
Testing clojure.contrib.test-io
FAIL in (test-as-url) (run-test9074812622524104689.clj:45)
expected: (= (URL. "file:/foo") (as-url
I ran mvn clean first.
--
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 members are moderated - please be patient with your
first post.
To unsubscribe from this gro
Hi,
On Jun 28, 5:38 am, Brian Hurt wrote:
> This is actually something that has been bugging me for a while. Most of
> the time this isn't a problem (being unable to generate classes in the repl,
> basically), except in one case: exceptions. It'd be nice to be able to
> define classes that inh
41 matches
Mail list logo