On Feb 23, 10:47 am, Alfred Tarski wrote:
> Hi,
>
> I have this function:
>
> (defn wrap [x]
> (str "%" x "%"))
>
> and I do
>
> bf=> (str "boo hoo " (map wrap ["fdfd" "ggfs"]))
> "boo hoo clojure.lang.lazy...@9e050eb0"
>
> This looks odd to me, but if the powers that be consider this to be
>
Great, that makes sense. Thanks very much guys.
On Feb 24, 1:00 am, James Reeves wrote:
> Ah yep, (var app) is probably a better idea than #(app %).
>
> - James
>
> On Feb 23, 11:55 pm, Mark McGranaghan wrote:
>
> > > Basically because wrap-reload is a function, so app is evaluated
> > > before
Hi,
Some assemblies are loaded by default an can be used directly. But
like IronPython, you will need to *explicitly* load most assemblies to
be imported into your program. This differs from C# which does it
"under the hood". The Assemblies can be loaded from the GAC or from a
dll if it is not loa
Guys,
I seem to have thrown myself in at the deep end here !
I'm writing some clojure which interacts very heavily with some pojos,
making, hopefully, millions of method invocations a second.
I tried :
Clojure 1.1.0-new-SNAPSHOT
user=> (set! *warn-on-reflection* true)
true
user=> (defn fn1 [s]
Hi,
On Feb 24, 12:50 pm, Jules wrote:
> user=> (let [arg (with-meta 's {:tag String}) arglist [arg] body (list
> '.length arg)] (eval (list 'fn arglist body)))
> Reflection warning, NO_SOURCE_PATH:40 - reference to field length
> can't be resolved.
> #
> user=> (*1 "foo")
> 3
The following seem
Meikel,
Thanks for the quick answer.
So I was only one step away from a solution !
I had :
user=> (let [arg (with-meta 's {:tag String}) arglist [arg] body (list
'.length arg)] (eval (list 'fn arglist body)))
Reflection warning, NO_SOURCE_PATH:52 - reference to field length
can't be resolved.
#
Here's what I would suspect after running the following at the REPL
user=> (set! *warn-on-reflection* true)
true
user=> (defn bar [o] (.toString o))
Reflection warning, NO_SOURCE_PATH:605 - reference to field toString
can't be resolved.
#'user/bar
user=> (bar 1)
"1"
How does the reader know the d
I am sure this is really obvious but as I don't know the technical
term for what I am trying to do I can't google it
(def age 3)
then
(cons (symbol "age") [2 1])
I get
(age 2 1)
rather than
(3 2 1)
which is what I was hoping for. Or maybe you cannot do this at runtime?
--
You received thi
Anyone!!!
.
Anyway if your using Enclojure etc in Netbeans let me describe exactly what
happens when I attempt to install plugin
Latest MacOS Snow Leopard
NetBeans 6.8 with just Ruby
Enclojure plugin from Git
File came down with a .zip extention
Hi,
I've made progress in creating a simple app to show a windows form,
however I am having trouble wiring up a delegate (to handle button
clicks).
The Java version uses Proxy to implement ActionListener, instead I am
just trying to create an EventHandler passing as the 2nd constructor
argument t
I just joined, got confirm, the clicked link. Posted msg to group. got email
back confirming but is not showing up
in messages
Lar
--
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 tha
I've written an XPath library in clojure that wraps the Java api to
make it easier to use from clojure [1]. What is the process for
submitting libraries for inclusion on the clojure library page? I'm
also not sure if the community feels this is worth including but I
thought I'd offer it to see if
Have found what I am trying to do eval
I am working through the Halloway book, which doesn't seem to have
eval in the index, so I probably should excuse myself my ignorance.
Is there much a performance impact of using eval,as presumably the
compiler can't do much until runtime? Or is the idea of
Tried to encapsulate what you want to put in the eventhandler in an
anonymous function?
And I don't know how that works in Clojure-CLR, but you might need proxy...
2010/2/24 adam11235 :
> Hi,
>
> I've made progress in creating a simple app to show a windows form,
> however I am having trouble wir
Forget about the proxy part, re-read your message... =x
2010/2/24 Joop Kiefte :
> Tried to encapsulate what you want to put in the eventhandler in an
> anonymous function?
>
> And I don't know how that works in Clojure-CLR, but you might need proxy...
>
> 2010/2/24 adam11235 :
>> Hi,
>>
>> I've ma
On 24.02.2010, at 14:43, Sean Devlin wrote:
> How does the reader know the difference between .hashCode
> and .reallyObsureMethod? It would need to keep a whitelist of
> everything in object, and know that these methods can be called
> directly. Maybe the reader should be upgraded to handle this
You don't need (and shouldn't use) eval for this:
@(resolve (symbol "age")))
Stu
Have found what I am trying to do eval
I am working through the Halloway book, which doesn't seem to have
eval in the index, so I probably should excuse myself my ignorance.
Is there much a performance impact of
Konrad,
Okay, I was looking in the wrong place. Which leads me to suggest the
following:
Create a local fork of Clojure, make a new branch, and hack on the
compiler. Run the experiment, see what happens :)
Sean
On Feb 24, 9:15 am, Konrad Hinsen wrote:
> On 24.02.2010, at 14:43, Sean Devlin wr
On 24 February 2010 15:40, Larry Wykel wrote:
> I just joined, got confirm, the clicked link. Posted msg to group. got email
> back confirming but is not showing up
> in messages
>
> Lar
It looks like your message about Enclojure did take a little while to
come through.
[...]
Received: by 10.15
Hi,
On Feb 24, 2:59 pm, "Kyle R. Burton" wrote:
> I've written an XPath library in clojure that wraps the Java api to
> make it easier to use from clojure [1]. What is the process for
> submitting libraries for inclusion on the clojure library page?
Instructions on how to get listed are at:
htt
On 24.02.2010, at 15:42, Sean Devlin wrote:
> Create a local fork of Clojure, make a new branch, and hack on the
> compiler. Run the experiment, see what happens :)
Right now I have better ways to use my time than hacking on a compiler that
Rich is replacing with a new one written in Clojure!
Hi all
I made a naïve attempt to implement the minimax algorithm in Clojure.
I would appreciate any comment on style, wrong (or right) use of
idioms etc.
Specifically, can I create a “contract” for the function I use, like
heuristic, to formalize minimax requirement from it?
Thanks
Tzach
Pseudoco
Hello,
2010/2/24 Tzach :
> [...]
> Specifically, can I create a “contract” for the function I use, like
> heuristic, to formalize minimax requirement from it?
Yes, you can add pre- and post- conditions, have a look here:
http://clojure.org/special_forms
HTH,
--
Laurent
--
You received this m
Thanks.
So it isn't a counterexample to my rule of Thumb
'If it is isn't in Halloway you shouldn't be using it'
I'll catch you out one day.
On Feb 24, 2:19 pm, Stuart Halloway wrote:
> You don't need (and shouldn't use) eval for this:
>
> @(resolve (symbol "age")))
>
> Stu
>
> > Have found wha
> Alternatively, amalgamation works fine, though you probably want to
> amalgamate with vector instead of str. That prevents inadvertent
> collisions in cases where the elements in are similar (not a problem
> for you). Again, assuming appropriate definitions for M and F:
>
> {[1 M] [ 1 2 3 4 5 6
Thank you!
I have not yet picked a license for the library, I am open to any of
them, but would like to know what the preferred license is for the
project. My first leaning is towards a permissive license such as
BSD. What is preferred or recommended for clojure and its libraries?
Thank you,
K
IANAL.
The standard seems to be EPL 1.0, because it's what Rich uses for
Clojure & Contrib. My understanding is that this causes problems w/
the GPL, so you'll probably want to stay away from that.
Sean
On Feb 24, 1:36 pm, "Kyle R. Burton" wrote:
> Thank you!
>
> I have not yet picked a licens
> The name of your library
clj-xpath
> Library home page URL
http://github.com/kyleburton/clj-xpath
> Your name
Kyle Burton
> Category (db, web, UI, parsing etc)
XML Processing, XPath
> License
EPL
> A one-paragraph description. Include 3rd party dependencies if any.
Simplified XPath Lib
Base writes:
> So this may be an extraordinary dumb question (even for me...) but is
> there such a thing as a map with compound keys?
[...]
> I could do map - in - map, or do something like a (str cat gender) to
> amalgamate 2 fields to set the key but I was just wondering if this
> even exis
You can use a map as a key in another map. The clojure.set namespace
has a function index that does this:
user=> (doc index)
-
clojure.set/index
([xrel ks])
Returns a map of the distinct values of ks in the xrel mapped to a
set of the maps in xrel with the corresponding
Hi Adam,
You need to use the gen-delegate macro to create delegates,
See http://wiki.github.com/richhickey/clojure-clr/clr-interop
The signature of the macro is (gen-delegate Type [args] body) whereby
in case of event-handlers you would typically use the EventHandler
class.
The code becomes then
I think I know this one: you need NetBeans with the Java module
activated. I had the same problems trying to use NetBeans with just
PHP.
Mark
On Wed, Feb 24, 2010 at 8:18 AM, Larry Wykel wrote:
> Anyone!!!
>
> .
>
> Anyway if your using Enclojure etc in Netbeans let me describe exactly what
> h
When it comes to distinguishing certain types of symbols from other
things, should one use prefixes or suffixes?
Example: naming tests with clojure.test/deftest. If you distinguish
your tests’ symbols at all, do you do “t-addition” or “addition-t”?
(I need to know what the standard is, if there i
Wonderfull. Thanks so Much. Well you know I suspected as much. I did
not want all the Java stuff right now. I went on to other things. So
tommorow I will do the Java se plugin. ''
Again thanks much. Its been fun last five days attempting to get a
good Clojure IDE thats good.
Larry
On Feb 24, 5:
I noticed a thread on the clojure developer's google group last night,
http://groups.google.com/group/clojure-dev/browse_thread/thread/97e5fa7c49f457b2#
I first want to give my vote for including:
io
seq
string
I would also like to see seq include more functionality. Two
examples, which I use a
Excellent that worked.
For other clojure-clr newbies, the Clojure.Source project has some
samples that are helpful.
Thanks, Adam.
On Feb 25, 7:39 am, soyrochus wrote:
> Hi Adam,
>
> You need to use the gen-delegate macro to create delegates,
>
> Seehttp://wiki.github.com/richhickey/clojure-clr/
Hi all,
I am trying to use (abuse? *) zip-filter to remove some nodes and
return the xml tree to me.
If I do something like this:
(xml1-> zipped-xml zf/descendants :model zip/remove zip/root)
I can remove one :model node, but what if I want to remove more than
one or all of the :model nodes?
Ouch. Burned by documented behavior :). Thanks for pointing that
out.
Seriously, though, I'm not the last that will get confused by this.
My suggestion would be to make (case) copy the value from the *var* at
compile time and use that. In fact, I decided to do just that and
created (case-eval).
On Wed, Feb 24, 2010 at 8:57 PM, pthatcher wrote:
> Ouch. Burned by documented behavior :). Thanks for pointing that
> out.
>
> Seriously, though, I'm not the last that will get confused by this.
> My suggestion would be to make (case) copy the value from the *var* at
> compile time and use that
On Wed, Feb 24, 2010 at 8:09 PM, James Sofra wrote:
> Hi all,
>
> I am trying to use (abuse? *) zip-filter to remove some nodes and
> return the xml tree to me.
> If I do something like this:
> (xml1-> zipped-xml zf/descendants :model zip/remove zip/root)
>
> I can remove one :model node, but w
Rich has stated in a later thread on the dev list that he's more
concerned with library refinement for the time being. The idea seemed
to be that our efforts should be placed in getting signatures right &
improving performance. I'm all for having the "what if" discussions,
but now doesn't seem to
On 25 February 2010 03:57, pthatcher wrote:
[...]
> (defn count-from [start]
> (iterate inc start))
>
> ; like python
> (defn zip [& lists]
> (apply map vector lists))
>
> ; like python
> (defn enumerate [vals]
> (zip (count-from 0) vals))
[...]
By the way, there's an implementation of "enumer
42 matches
Mail list logo