Hi Karl,
It sounds like a classloader problem.
Are you using clojure 1.0 or a recent build? If one, can you try with the
other?
Christophe
On Fri, Aug 14, 2009 at 7:04 AM, Krukow wrote:
>
> When running the AOT compiled Clojure (clojure.jar) on an Azul box I
> get an error during startup (in
On Aug 14, 2009, at 12:12 AM, Chouser wrote:
> That particular example may not have to be a macro at all:
>
> http://paste.lisp.org/display/75230
Wonderful! :)
> I think people want reader macros for a couple different reasons.
> Sometimes it's just to remove parens from a function or macro cal
Just to add a bit of contradiction to the debate: it is generally told to
people coming to lisp that "lisp is all about giving power to users, and
it's up to them to take care of not shooting themselves in the foot".
E.g. that' the general answer when one complains that there's no static
typing wit
Is there a historical reason why (inc) and (dec) overflow instead of
automatically promoting from Integer to Long when crossing
Integer.MAX_VALUE or Integer.MIN_VALUE? The latter would be consistent
with (+) and (-).
user=> (inc Integer/MAX_VALUE)
java.lang.ArithmeticException: integer overflow (
The difference is MAX_VALUE is a primitive int, but 1 (any literal) is an
Integer.
user> Integer/MAX_VALUE
2147483647
user> (inc 2147483647)
2147483648
But, I agree there is inconsistency. They should all check, except for the
unchecked-* fns.
user> (* Double/MAX_VALUE Double/MAX_VALUE)
Infinity
> user=> (.getClass (+ 1 Integer/MAX_VALUE))
> java.lang.Long
Also,
user=> (def i (Integer/MAX_VALUE))
user=> (class (+ 1 i))
java.lang.Long
user=> (class (inc i))
java.math.BigInteger
I'd expect inc to overflow to a Long rather than a BigInteger.
--
Dave
--~--~-~--~~
On Aug 14, 9:20 am, Christophe Grand wrote:
> Hi Karl,
>
> It sounds like a classloader problem.
> Are you using clojure 1.0 or a recent build? If one, can you try with the
> other?
I've tried it with 1.0 and with the 1-1-0-alpha-snapshot (latest from
github). Same error... :-(
--~--~-
>>> And might it be a
>>> good idea to be able to name .clj files instead of namespaces as an
>>> option? Then one could use regular ant filesets constucted
>>> automatically from expressions, instead of naming namespaces
>>> individually.
>
> And now this has also been added. Both the compile and
I suspect that reader macros are necessary to fully realize named-
argument message passing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.co
I posted the message below on the dev group but did not get a response
and thought perhaps the folks who handled the maven support were over
here.
Thanks,
Eric
Begin forwarded message:
> From: Eric Thorsen
> Date: July 2, 2009 10:32:36 PM EDT
> To: Clojure Dev
> Subject: maven source dir(s
One thing that I would like to see implemented seems like a good
candidate for a reader macro...
I find it useful to have a way to comment out an expression by
prefixing it with some symbol.
I.E. if a '/' before an expression is an expression comment, it is
easy to experiment with code:
(foo
On Fri, Aug 14, 2009 at 10:20 AM, Boris Mizhen - 迷阵 wrote:
>
> One thing that I would like to see implemented seems like a good
> candidate for a reader macro...
>
> I find it useful to have a way to comment out an expression by
> prefixing it with some symbol.
>
> I.E. if a '/' before an expressi
> Clojure spells this #_ instead of / and it is indeed
> implemented as a (builtin) reader macro.
Nice, thanks!
:)
>
> --Chouser
>
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to thi
Hello everyone,
Recently the following lib were promoted from contrib to the standard
library:
* clojure.contrib.test-is becomes clojure.test
* clojure.contrib.stacktrace becomes clojure.stacktrace
* clojure.contrib.template becomes clojure.template
* clojure.contrib.walk becomes clojure.walk
I
On Fri, Aug 14, 2009 at 3:28 AM, Daniel Lyons wrote:
>
> On Aug 14, 2009, at 12:12 AM, Chouser wrote:
>> Perhaps these different desires can fulfilled with two different
>> constructs.
>
> The two being:
>
> 1. To remove parens from a function or macro call. You mean e.g. #"
> and #()?
Right, tho
> Similarly #"" is pretty close to what the re-pattern
> function does. One difference is that #"" compiles the
> regex at read time while re-pattern compiles it runtime. If
> re-pattern were a macro that difference would essentially
> disappear.
In code, yes, it would disappear because you can
On Aug 14, 2009, at 10:49 AM, Chouser wrote:
> So in general 1 is in my opinion a fairly minor syntax
> thing, while 2 could be somewhat alleviated if Clojure had
> a string literal format that allowed un-escaped double
> quotes and left backslashes unmolested. This would allow
> things like (in
On Thu, Aug 13, 2009 at 4:59 PM, Daniel Lyons wrote:
>
> On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
>
> I'm just wondering what people's response would be to allow user-generated
> reader macros. I'm not sure, but I think the only change to the clojure
> core that would be necessary in order
Seeing that some contrib libs have been promoted into the main clojure
project, I'd like to suggest that the same be done for
clojure.contrib.def (or, the majority of it). We use it nearly
everywhere, and I suspect many others do as well.
As a slight caveat, I'm not sure that the defalias,
On Fri, Aug 14, 2009 at 1:04 AM, Krukow wrote:
>
> When running the AOT compiled Clojure (clojure.jar) on an Azul box I
> get an error during startup (in particular in the class-initializer
> for clojure.main). This error does not occur in the clojure-slim.jar.
> The stacktrace is this:
>
> k...@
On Aug 14, 2009, at 10:10 AM, Chas Emerick wrote:
>
> Seeing that some contrib libs have been promoted into the main clojure
> project, I'd like to suggest that the same be done for
> clojure.contrib.def (or, the majority of it). We use it nearly
> everywhere, and I suspect many others do as we
As long as the documentation doesn't disappear between the time the
library is removed from contrib and the appropriate version (1.1, 1.2)
of Clojure is released.
Not-so-subtle hint:
http://groups.google.com/group/clojure/browse_thread/thread/8f191d3a9620977
Sean
On Aug 14, 12:52 pm, Daniel Lyo
I'm in favour.
Though, I think that a "def-" would be redundant if the defvar macros
are promoted. Perhaps it would be sensible to keep def as a the
underlying special form and just move in defvar, defvar- and
defmacro-.
I'm not sure whether defonce is useful enough that it should be moved
to co
Hey Meikel,
first of all, thanks for your work. It just fun to code Clojure with
that
plugin.
I've found a nice little trick from Jonathan Palardy. I thought this
would
be a nice place to feature him a bit.
First, a pretty cool video how it feels in action:
http://blip.tv/file/1370310/
And her
We have just released flightcaster.com which uses statistical inference and
machine learning to predict flight delays in advance of airlines (initial
results appear to do so with 85 - 90 % accuracy.)
The webserver and webapp are all rails running on the Heroku platform; which
also serves our black
whoa...missed the google spellcheckers' warning on: paralleizm ... although
that may be the proper lolkidde spelling :-)
On Fri, Aug 14, 2009 at 12:10 PM, bradford cross wrote:
> We have just released flightcaster.com which uses statistical inference
> and machine learning to predict flight dela
the serializeability issues also come up with cascading/hadoop.
On Thu, Aug 13, 2009 at 7:58 PM, Chas Emerick wrote:
>
> On Jul 31, 1:47 pm, Chris Kent wrote:
> > Great. As far as my (possibly flawed) understanding goes it should be
> > pretty simple. Make it implementSerializableand add a re
Wanna play golf?
(defn filter-collecting [predicate collector & lists]
(lazy-seq
(loop [lists lists out []]
(if (empty? (first lists))
(reverse out)
(let [heads (map first lists)]
(if (apply predicate heads)
(recur (map rest lists) (cons (apply collecto
I'd start with you usage docs
;; usage:
;; (filter-collecting
;; (fn [x y] (< x y))
;; (fn [x y] (+ x y))
;; [1 7 3 9]
;; [5 5 5 5])
;; ==> (6 8)
On Aug 14, 3:43 pm, Fogus wrote:
> Wanna play golf?
>
> (defn filter-collecting [predicate collector & lists]
> (lazy-seq
> (loop [list
On Fri, Aug 14, 2009 at 3:43 PM, Fogus wrote:
>
> Wanna play golf?
Yes I do!
(defn filter-collecting [p c & l]
(remove nil? (apply map #(when % (apply c %&)) (apply map p l) l)))
But that gives incorrect results if c ever returns nil, so
I guess it should be:
(defn filter-collecting [p c & l
On Aug 14, 10:51 pm, Sean Devlin wrote:
> I'd start with you usage docs
>
> ;; usage:
> ;; (filter-collecting
> ;; (fn [x y] (< x y))
> ;; (fn [x y] (+ x y))
> ;; [1 7 3 9]
> ;; [5 5 5 5])
> ;; ==> (6 8)
;; usage:
;; (filter-collecting < +
;; [1 7 3 9]
;; [5 5 5 5])
;; ==> (6 8)
(defn filter-collecting [predicate collector & lists]
(for [v (apply map vector lists) :when (apply predicate v)] (apply
collector v)))
On Fri, Aug 14, 2009 at 10:22 PM, Jarkko Oranen wrote:
>
>
>
> On Aug 14, 10:51 pm, Sean Devlin wrote:
> > I'd start with you usage docs
> >
> > ;; usage:
>
Let's play !
First:
Slight variation on Chouser's second version (presuming it should be faster
for the token comparison, which is evil - presuming performance instead of
testing it ! ) :
(let [x (Object.)]
(defn filter-collecting [p c & l]
(remove #(identical? % x)
(apply map #
On Thu, Aug 13, 2009 at 4:58 AM, Chas Emerick wrote:
>
>> I know that if you have a dosync call in some function executed by a
>> thread, and then that function calls other functions (which might have
>> their own dosyncs, which get bundled together with the original
>> transaction), then everythi
On Aug 14, 3:43 pm, Fogus wrote:
> Wanna play golf?
ok...
Not efficient or elegant, but certainly weird...
(defn filter-collecting [p c & seqs]
(let [fun #(if (apply p %1)
(conj! %2 (apply c %1))
%2)]
(loop [hs (map first seqs)
ts (map rest seqs)
On Aug 14, 11:46 am, Brian Hurt wrote:
> On Thu, Aug 13, 2009 at 4:59 PM, Daniel Lyons wrote:
>
>
>
>
>
> > On Aug 13, 2009, at 2:30 PM, Brian Hurt wrote:
>
> > I'm just wondering what people's response would be to allow user-generated
> > reader macros. I'm not sure, but I think the only chang
Bradford,
I just bought the iPhone app. Looks very cool.
I saw a presentation at the JavaOne after-meeting with Rich Hickey about
flightcaster. Were you the presenter? The machine learning notation seemed
to work very well in Clojure. Are there any portions of this cool stuff
that you can shar
On Aug 13, 9:57 pm, Daniel Lyons wrote:
> the code is open source and the techniques for adding
> optimizations to compilers are well known. So marshall your impulses
> for the good and we'll all benefit.
It does seem that the optimizations Andy Fingernut did by hand are
pretty braindead, a
I am trying to learn Clojure and since I am also a .NET developer I
thought I would compile the CLR version.
I have successfully built it and it runs but when I try and run
Simple.Console (or the Clojure.Compile, which appears to be the
renamed bootstrapper) I get a series of error messages simil
Hi Chad, yep, that was me. We do hope to open source some stuff soon.
First will probably be our wrappers for cascading/hadoop and s3.
Next might be some core language extensions which might be good in contrib
or some other lib.
If we release any basic stats or machine learning stuff we may try
> Reading the responses to this thread, and thinking about things,
> I've come around to this point of view.
>
> What I wanted was the ability to read Clojure data structures from a
> file or from stdin in a way that I could extend- for long, involved
> reasons I need to specify byte arrays
If there is a better place to report things like this, let me know.
I've done some looking at how much memory various kinds of Clojure
data structures use, and come across some behavior that I think might
be a memory leak, in the sense that perhaps a reference to a
java.util.concurrent.atomic.Ato
fft1976 wrote:
> On Aug 13, 9:57 pm, Daniel Lyons wrote:
>
> > the code is open source and the techniques for adding
> > optimizations to compilers are well known. So marshall your impulses
> > for the good and we'll all benefit.
>
> It does seem that the optimizations Andy Fingernut did by h
On Fri, Aug 14, 2009 at 4:17 PM, Mark Volkmann wrote:
> On Thu, Aug 13, 2009 at 4:58 AM, Chas Emerick wrote:
>>
>>> I know that if you have a dosync call in some function executed by a
>>> thread, and then that function calls other functions (which might have
>>> their own dosyncs, which get bundl
Docs for cutting edge Clojure are on the way. Rich said he was going
to think about the approach he wanted to take and we'll get it up and
running when he gets back from vacation.
Hang tight,
Tom
On Aug 14, 10:21 am, Sean Devlin wrote:
> As long as the documentation doesn't disappear between t
On Aug 12, 1:30 am, Nicolas Oury wrote:
> Next laziness was thought to be too slow to be practical, and now
> someone used ghc in this thread as an example of fast language.
There is a lot of misinformed people (and fanboys who are not
misinformed but willing to "exaggerate", putting it charita
> P.S. The moderators (Chouser) are now censoring my posts, so if you
> don't see this message on the list as well, I wrote something they
> want to suppress.
As a random member of this community, I'd rather you didn't insinuate
this kind of thing.
Your messages are being moderated for *tone*
> (defn filter-collecting [predicate collector & lists]
> (for [v (apply map vector lists) :when (apply predicate v)] (apply
> collector v)))
This is very nice. It's short, sweet, and actually describes the
functionality.
-m
--~--~-~--~~~---~--~~
You received
I think Andy's number 10 program is only 3 times slower now.
On Aug 14, 4:47 pm, fft1976 wrote:
> On Aug 12, 1:30 am, Nicolas Oury wrote:
>
> > Next laziness was thought to be too slow to be practical, and now
> > someone used ghc in this thread as an example of fast language.
>
> There is a lo
Oh, sorry I didn't realize that your post was delayed. So I guess my
other response was irrelevant.
On Aug 14, 4:47 pm, fft1976 wrote:
> On Aug 12, 1:30 am, Nicolas Oury wrote:
>
> > Next laziness was thought to be too slow to be practical, and now
> > someone used ghc in this thread as an exam
50 matches
Mail list logo