Hi,
Is this the intended behavior?
(sorted-set-by (constantly 0) 1 2 3 4) returns #{1}.
I would expect the set to contain all the elements, and the comparator
to only affect sort order.
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure"
Why should sorting be related to the primary key? You should be able
to sort on any attribute. If you wanted to sort a set of people by age
would it make sense to only retain one person of each age? Sort order
and identity should be orthogonal. Besides, if you need a collection
based on primary key
FlightCaster were just mentioned in a recent thread. They use Incanter
in production: http://measuringmeasures.com/
Razvan
--
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
I think it returns :a rather than just a so that you can print stuff, then
read it back in and it would be the same. You can use it to dump
configuration data to a file for example then load it later easily.
Razvan
On Thu, May 6, 2010 at 10:21 PM, Meikel Brandmeyer wrote:
> Hi,
>
>
ot;heuristic commit", when all resources confirmed the
"prepare" stage, but not the final "commit". This situation does not
exist with pure STM, so one would have to be aware of the risk and
settle for less guarantees when using "composite" transactions.
Razvan.
Cool stuff, Dave. I'm interested to see/test it, could you post it as
an attachment to this group or commit it to contrib ?
Cheers,
Razvan.
On Dec 8, 9:08 pm, Dave Griffith <[EMAIL PROTECTED]> wrote:
> Okay, hacking complete. I've got a patch that extends the Clojure ST
Hi,
I'm curious, why doesn't toString of clojure.lang.LazySeq return the entire
sequence as a String, and returns the Java pointer instead? I find it
annoying when I do this:
user> (str (map + [1 2 3]))
"clojure.lang.LazySeq@7861"
What's the reason behind this decision? Shouldn't toString tr
(recur (rest user-pass)))
false)
))
Calling this function throws a NullPointerException. Any hint is
greatly appreciated.
Thanks,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure&q
Thanks. But still I don't get something. Shouldn't partition return a
sequence? Shouldn't every sequence end with nil?
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
You may also want to have a look at slimv.
http://www.vim.org/scripts/script.php?script_id=2531
It performs quite nice (can't compare it with vimclojure though,
'cause I don't know vimclojure).
Razvan
--
You received this message because you are subscribed to the Google
Groups
Thanks for the hint. And don't worry about the meaning of this
function. :) Name parameter has no use. And the regex stuff's for the
url.
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, s
ang.RestFn.applyTo(RestFn.java:137)
9: clojure.core$apply.invoke(core.clj:544)
Cheers,
Razvan
--
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
Hi,
Assuming I have:
(defrecord myrecord [:a :b :c])
is there a way to get the list of keys from the record definition?
Thanks,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@google
Hi,
Is there a way to attach metadata to defrecord ?
Razvan
--
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
f something at
macro expansion time. Apparently clojure does not (fully) support
this, so I'm looking then for alternatives.
Cheers,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@goo
e variable "stuff". Something like:
(let [stuff car]
(new stuff 1982 "Mercedes"))
(let [stuff bike]
(new stuff 1990 "Harley Davidson"))
Obviously new does not work. I'm gratefull for suggestions of how to
do it best.
Thanks,
Razvan
--
You received this mes
...
(assoc stuff :year 2001 :manufacturer "Seat"))
But this will work only if all my types have the same parameters. If
bike would be:
(defrecord bike [manufacturer year type])
then i'm stuck again.
Razvan
On Oct 6, 8:32 pm, Aaron Bedra wrote:
> Assuming you want to do things wi
This is what I'm looking for. Thanks. I have not seen this kind of
expression before: ->foo. Is is created by defrecord or is it
implemented at reader level?
I realize now that I can also keep a generating function in the
variable stuff:
(let [stuff #(car. %1 %2)]
(stuff 1982 "Mercedes")
(stu
changing the query macro. So, for the moment I'm waiting for a new
version.
Thanks anyway. I really appreciate the activity on this group.
Razvan
On Oct 3, 11:49 pm, Michał Marczyk wrote:
> Ok, so I mailed off the above discussion without including any
> suggestions for alternative
ve some suggestion, I'd be glad to hear it.
Thanks,
Razvan
--
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
Yeah, you are probably right. But I figured asking never hurts...
Thanks for the reply.
Razvan
On Oct 19, 10:50 pm, Alan Malloy wrote:
> Not really. In _Let Over Lambda_'s section on reader macros, he
> creates a reader macro #`(foo bar a1 a2) that expands to (lambda (a1
> a2) `(f
Hi,
appengine-magic (https://github.com/gcv/appengine-magic) uses ring-
handlers to turn into servlets that are accepted by GAE. Does anybody
know how to use servlets directly with appengine-magic? I'm not using
ring, I have a servlet which I need to feed to appengine-magic.
Thanks,
R
hat in the lisp world, code analysis tools are that
wanted. We have Common Lisp for quite some time now, and people seem
quite happy with slime.
Razvan
On Nov 5, 2:16 pm, Dennis Haupt wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> hi,
>
> i'm half done with my
e/def-appengine-servlet-app my-app #'my-servlet)
Razvan
On Nov 6, 4:32 pm, Mark Rathwell wrote:
> > I'm not using
> > ring, I have a servlet which I need to feed to appengine-magic.
>
> Not sure what you mean by this, could you expand on it a little more?
> You have an ex
The servlet is coming from an external jar, which is written in Java.
I need appengine-magic for the other services, like datastore.
Razvan
On Nov 6, 7:45 pm, Mark Rathwell wrote:
> I'm still not quite following. What appengine-magic does is provides
> Clojure wrappers for many
let. I just want to feed this servlet to
appengine-magic.
Thanks,
Razvan
On Nov 6, 10:43 pm, Mark Rathwell wrote:
> I'm still having trouble figuring out what it is you are wanting to
> do, but if you have an existing Java servlet that will handle some url
> pattern, and you want to write
check args in the
code (i.e. checking should be done when evaluating/creating the
function, and not when executing).
Thanks,
Razvan
--
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
ff, but then again I
don't know of another language that borrows these kind of macros. Does
anybody know?
And lastly, a question to Rich Hickey, should he read this post: what
is the reasoning behind the choice of lisp macros over scheme's?
Cheers,
Razvan
--
You received this message becaus
gt; Scheme style macros in Clojure:https://github.com/qbg/syntax-rules
>
> Scott
>
> On Sat, Dec 3, 2011 at 1:20 PM, Razvan Rotaru wrote:
>
>
>
>
>
>
>
> > Hi everyone,
>
> > I was searching the web these days trying to find out more about these
an I check in a macro that a particular java method exists for a
class or not?
Thanks,
Razvan
--
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 m
Thanks. I was missing the call to resolve.
(let [klass (resolve c)]
)
With it it works.
Razvan
On Dec 8, 11:39 pm, Stuart Sierra wrote:
> Not sure if it helps, but here's my example of using reflection in a macro:
>
> http://stuartsierra.com/2010/12/16/single-abstract-metho
I know but I need some way to get around this. Any
idea would be greatly appreciated.
(What I need is basically a workaround for the lisp-style multiple
values: in the default context, my value is evaluated to the java
instance, and with some special context I can get the values of other
fields as w
Thanks Tom. Using proxy like this could work. But i'm worried about
one thing.What happens if I have many instances? With proxy there's a
new class with each instance. Could I run out of permgen space?
On Dec 13, 9:38 am, Tom Faulhaber wrote:
> Razvan,
>
> I think that you
I don't want to change the interface i'm exposing to the outer world.
May be that I'm thinking too javaish, but what I miss here is a
possibility to extend the base class. :)
On Dec 12, 9:31 pm, James Reeves wrote:
> On 12 December 2011 18:54, Razvan Rotaru wrote:
>
>
Thanks. I don't know how this hashmap works, but at the first glance
there seems to be one problem: the two values don't get garbage
collected at the same time. I'll look more into it, thanks.
On Dec 13, 3:10 am, Stephen Compall wrote:
> On Mon, 2011-12-12 at 10:54 -0800, R
Hi,
Is there a reliable implementation of letrec in clojure? Anybody using
it?
I have found a post from 2008, with an implementation which I don't
understand (and it's said to be slow), and which I don't know whether
to trust.(It's also supposed to be slow).
Thanks,
Razvan
-
I don't quite understand why people are saying this. Anyway, It's not
enough for me.
On Dec 14, 9:13 pm, Kevin Downey wrote:
> lazy-seq and letfn should cover anything you would need letrec for
>
>
>
>
>
>
>
>
>
> On Wed, Dec 14, 2011 at 11:09 AM, Razv
letfn defines functions. I'm just defining some values. The values
contain anonymous functions which need to refer to other values.I know
there are workarounds for this, but this means I must change the
interface.
Razvan
On Dec 14, 9:56 pm, David Nolen wrote:
> On Wed, Dec 14, 2011 at
Yes. Assuming I have following macros:
(button :id b1 :listener #(...)) => (let [b1 (new JButton)] ...)
(panel [:id p1] (button :id b1 ...) (button :id b2 ...)) => (let [p1
(new JPanel) b1 (button :id b1 ...) b2 (button :id b2 ...)] ...)
How to make the listener in b1 refer to b2?
Razv
Thanks.
On Dec 14, 8:30 pm, Alan Malloy wrote:
> Correct, just like closures and reifies.
>
> On Dec 14, 7:33 am, Tom Faulhaber wrote:
>
>
>
>
>
>
>
> > Razvan,
>
> > I believe that proxy actually only creates a new class per call site,
> > not
.] [:body ...])
The result of get-header needs to "spliced" into the rest of the
structure for the html macro to work.
Thanks,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojur
Great. Thanks.
On Dec 17, 6:08 pm, Baishampayan Ghose wrote:
> > This may sound a bit weird, but can I "unquote-splice" something when
> > calling a macro. Here's an attempt to do this with hiccup:
>
> > (defn get-header
> > [[:link {:type "text/css" ...}]
> > [:script {:type "text/javascrip
kind of sequence, it does the splicing that I want.
Razvan
On Dec 17, 6:32 pm, Razvan Rotaru wrote:
> Great. Thanks.
>
> On Dec 17, 6:08 pm, Baishampayan Ghose wrote:
>
>
>
>
>
>
>
> > > This may sound a bit weird, but can I "unquote-splice" so
On Dec 14, 5:33 pm, Tom Faulhaber wrote:
> Razvan,
>
> I believe that proxy actually only creates a new class per call site,
> not per instance. However, I can't completely swear to this.
>
> Anyone with more detailed knowledge than I have want to comment?
>
> Assum
On Dec 23, 5:08 am, Alan Malloy wrote:
>
> It turns out even this is not true, becauseproxyuses some kind of
> deep JVM magic called (appropriately)ProxyClasses. So every time you
> write (proxy[Object] (...anything at all...)), you get an instance of
> the same class, initialized with a differe
Hi,
Is it possible to give the class as value at runtime to proxy?
(defn create-proxy [clazz]
(proxy [clazz] ))
I know this can be done with a macro, but my question is whether it
can be done as function.
Thanks,
Razvan
--
You received this message because you are subscribed to the
has something to do with macros qualifying symbols with the current
namespace. I am yet to fully understand the mechanism here, but my
question for the moment is whether this kind of construct is idiomatic
in clojure. Or is there another way to introduce symbols in macros?
Thanks,
Razvan
--
You r
s value as a function parameter.
>From design point of view, my proxy contruct tries to add an interface
to a class. (Like a mixin). The interface is always the same (and
therefore the methods), but the class can be anything, and i'd like to
have it as a parameter to the function.
Macros
ically (e.g. deftype), so why not create a proxy dynamically?
Razvan
--
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 pat
Thanks. Razvan
--
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
Yes, it's more clear now. Thanks.
--
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 fr
Hi,
What's the clojure way to filter out null values from a sequence?
I have following code:
(filter identity (map myfun myseq))
Is there a better/faster way?
Thanks,
Razvan
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To pos
tored in the actual widget,
even if it's not mixed with Label. I still want to point this out in
case there are other ways of achieving this.
How can I achieve 1? Are there alternatives for 2?
Thanks for reading,
Razvan
--
You received this message because you are subscribed to the
) ;=> Name: [Foo]
Oh, and I'd like to stay away from macros, if possible. :)
Razvan
On Feb 6, 12:20 pm, Matthias Diehn Ingesman
wrote:
> It sounds a little like the decorator pattern would do the trick for
> you in this case - am I missing something? In case I am not, I have
@dokondr: the blackboard mechanism you mention is just a distributed
associative memory, and there is already a Java specification for such
a system (search for Jini and Javaspaces), with several open source
and commercial implementations available. Unfortunately, anyone who
has ever worked with s
55 matches
Mail list logo