On Jun 20, 3:42 am, "Stephen C. Gilardi" wrote:
> One important need filled by gen-class is exactly this case: you need
> a class with a name you can specify completely and use elsewhere.
>
> > I need to enter the Main class in a jar's Manifest, and was wondering
> > how you guys have done it.
I've been finding it difficult to work Clojure into the mix at my job
due to its Lispiness, therefore my experiences have been isolated to
free time hacking. However, I hope to make some headway on getting
buy-in on using clojure.jar -- specifically the immutable structs and
the Ref class. I was
On Jun 18, 12:39 pm, Howard Lewis Ship wrote:
> I've been doing a number of presentations on Clojure lately (TheServerSide,
> Portland Code Camp, Open Source Bridge), and I'm getting some interest in
> Clojure and functional programming.
>
> A question that keeps coming up is: where would you u
I used Clojure recently for prototyping a piece of a face detection
system running on Java ME. I had learned a bit of Scheme and wondered
if there was already a Lisp implementation for the JVM. A little
search and then I found it.
When I started playing with it, we could already locate a face in
On Jun 19, 11:13 am, Chouser wrote:
> On Fri, Jun 19, 2009 at 3:46 AM, Christophe Grand
> wrote:
>
> > I would further your reasoning on tolerance: it depends on whether the key,
> > the map or both are variable.
> > (key map) is safe as long as you know that key is a symbol or a keyword.
> >
On Jun 19, 1:50 pm, Berlin Brown wrote:
> On Jun 19, 1:04 pm, Four of Seventeen wrote:
>
> > On Jun 19, 10:12 am, BerlinBrown wrote:
>
> > > 574 instances of class clojure.lang.DynamicClassLoader
>
> > That is curious. Ordinarily one only needs one instance of any
> > particular classloader,
On Fri, Jun 19, 2009 at 9:35 AM, Eric Willigers wrote:
>
> On Jun 18, 9:35 pm, Rich Hickey wrote:
>> http://clojure.org/refs
>>
>> point #8:
>>
>> "If a constraint on the validity of a value of a Ref that is being
>> changed depends upon the simultaneous value of a Ref that is not being
>> change
On Jun 19, 1:04 pm, Four of Seventeen wrote:
> On Jun 19, 10:12 am, BerlinBrown wrote:
>
> > 574 instances of class clojure.lang.DynamicClassLoader
>
> That is curious. Ordinarily one only needs one instance of any
> particular classloader, not 574 of them. :) Not that I know much about
> cloj
On Jun 19, 2009, at 1:02 PM, timshawn wrote:
Hello clojure developers,
I had a question regarding jar-ring up clojure generated source using
gen-class.
When I do a gen-class, and say either :main is true, or add a -main
method, the class file that gets generated always has a random prefix.
O
Cascade is coming along: http://wiki.github.com/hlship/cascade
I don't have a lot of time to work on it. It's a way to use Clojure
earnestly, and hit real world problems, and to learn to think more
functionally, in a problem domain I know very, very well.
It's an action framework, not a component
On Jun 19, 10:12 am, BerlinBrown wrote:
> 574 instances of class clojure.lang.DynamicClassLoader
That is curious. Ordinarily one only needs one instance of any
particular classloader, not 574 of them. :) Not that I know much about
clojure's internals.
--~--~-~--~~~---
Hello clojure developers,
I had a question regarding jar-ring up clojure generated source using
gen-class.
When I do a gen-class, and say either :main is true, or add a -main
method, the class file that gets generated always has a random prefix.
I need to enter the Main class in a jar's Manifest
I had a feeling I might have been wrong on the primitive hint part.
Your explanation makes a lot of sense. Thanks for the clear
explanation.
Travis
On Jun 19, 12:15 pm, Chouser wrote:
> On Fri, Jun 19, 2009 at 11:40 AM, tmountain wrote:
>
> > It looks like Clojure auto-boxes from long to Long b
On Fri, Jun 19, 2009 at 11:40 AM, tmountain wrote:
>
> It looks like Clojure auto-boxes from long to Long by default:
>
> user=> (type (long 3))
> java.lang.Long
Right.
> If you want to type hint something to primitive long you'd use #^long.
> For object long, use #^Long. Be warned that I'm stil
Taken from http://en.wikibooks.org/wiki/Learning_Clojure:
Java includes wrapper reference types for its primitive number types,
e.g. java.lang.Integer "boxes" (wraps) the primitive int type. Because
every Clojure function is a JVM method expecting Object arguments,
Java primitives are usually box
We are looking to assess it's suitability for building automated
trading systems. Our "pilot" project is an exchange simulator to help
automate testing of our existing systems.
Tom.
On Jun 18, 11:39 am, Howard Lewis Ship wrote:
> I've been doing a number of presentations on Clojure lately (The
On Jun 18, 9:35 pm, Rich Hickey wrote:
> http://clojure.org/refs
>
> point #8:
>
> "If a constraint on the validity of a value of a Ref that is being
> changed depends upon the simultaneous value of a Ref that is not being
> changed, that second Ref can be protected from modification by calli
If by "the book" you mean Programming Clojure by Stuart Halloway you
may want this:
http://www.pragprog.com/titles/shcloj/source_code
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this
On Fri, Jun 19, 2009 at 3:46 AM, Christophe Grand wrote:
>
> I would further your reasoning on tolerance: it depends on whether the key,
> the map or both are variable.
> (key map) is safe as long as you know that key is a symbol or a keyword.
> (map key) is safe as long as you know that map will
What are the type hints on primitives.
For example,
long abc = 3
is the type hint
#^long
or
#^Long
I also saw use of the java assembly? syntax before:
#^[[L?
or neither.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
On Jun 18, 3:34 pm, Rich Hickey wrote:
> On Jun 18, 5:23 pm, "Stephen C. Gilardi" wrote:
> > On Jun 18, 2009, at 1:25 PM, Adam Blinkinsop wrote:
> > > Does ref-set not set the "in-transaction-value"? It looks like the
> > > only difference is the signature, and that can't be right.
>
> > Both
Hi Justin,
The easiest solution is to download the sample code for the book from
[1] (this is referenced in the Preface under "Downloading Sample
Code"). The sample code includes everything you need: clojure, clojure-
contrib, and the book samples, plus launch scripts that get all the
clas
This may be a throw a comment, but I was running hprof against this
SWT gui application that I have. I have about 10,000 lines of clojure
code, so I don't know where to reduce my memory. But I thought these
stats were interesting on the number of Clojure objects created.
Right now, the apps is e
Hi Tim,
Thanks for the feedback and for taking the time to read the article. I
realized that pmap was probably a better solution as I was writing the
code, but pmap doesn't make for much of an agent demo, so I carried on
with my original plan. The point you make about bucketing is very
interesting
Never mind.. I talked to a local Ruby guru who explained Rack to me.
I went ahead and replaced my Jetty server script with a Ring server
script and everything worked. I'm surprised it only took about an hour
to do.
The Ring adapter and server will be added in the next release.
On Jun 19, 8:07 a
On Fri, Jun 19, 2009 at 2:13 PM, pmf wrote:
> On Jun 19, 1:31 pm, Josip Gracin wrote:
>> How do I dispatch on Java primitive array? I mean, my dispatch
>> function is 'class' and I'd like to add method for byte arrays.
>
> A not very elegant way would be to simply use (class (make-array Byte/
> T
On Jun 19, 1:31 pm, Josip Gracin wrote:
> Hi!
>
> How do I dispatch on Java primitive array? I mean, my dispatch
> function is 'class' and I'd like to add method for byte arrays.
A not very elegant way would be to simply use (class (make-array Byte/
TYPE 0)) as dispatch value, as in the followin
I do plan on continuing it's development longer term. I have a couple
projects which Conjure would work great with.
On Jun 19, 7:47 am, rb wrote:
> On Jun 18, 11:11 pm, Matt wrote:
>
>
>
> > Hi all,
>
> > I was recently introduced to Clojure by a coworker, and have been
> > loving it ever since
I've taken a look at Ring's Github pages, but I still don't fully
understand it. Is there a good tutorial on how to use it, or is it
best just to look at example code?
On Jun 18, 7:48 pm, James Reeves wrote:
> On Jun 18, 10:11 pm, Matt wrote:
>
> > I've also added a simple hello world tutorial
pmf writes:
Hi!
> On Jun 19, 12:52 pm, Tassilo Horn wrote:
>> foo/bar/baz.clj
>> foo/bar/i1.png
>> foo/bar/i2.png
>>
>> I tried (ClassLoader/getSystemResource "i1.png"), but that looks
>> somewhere in the clojure location, not my apps location...
>
> The right thought,
I'm very happy I
On Jun 18, 11:11 pm, Matt wrote:
> Hi all,
>
> I was recently introduced to Clojure by a coworker, and have been
> loving it ever since. I jumped in head first writing a Rails like web
> framework with it before I realized how many other basic web
> frameworks are out there. Anyways, it's a fun p
Hi!
How do I dispatch on Java primitive array? I mean, my dispatch
function is 'class' and I'd like to add method for byte arrays.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this grou
On Jun 19, 3:11 am, Justin wrote:
> Is clojure.contrib.* not included with clojure?
No; you need to get it from the git-repository at
http://github.com/richhickey/clojure-contrib and build it yourself
(and don't forget to include the built JAR in your classpath).
--~--~-~--~~
On Jun 19, 12:52 pm, Tassilo Horn wrote:
> foo/bar/baz.clj
> foo/bar/i1.png
> foo/bar/i2.png
>
> I tried (ClassLoader/getSystemResource "i1.png"), but that looks
> somewhere in the clojure location, not my apps location...
The right thought, but you need to use the full relative path to th
Hi all,
I did some Swing app in clojure. For some JLabels I want to provide an
icon, but I cannot load them. In Java the tutorial says I would do
class Foo {...
new ImageIcon(getClass().getResource("image.png"));
}
to load the image. The "image.png" is relative to the location of the
c
Is clojure.contrib.* not included with clojure?
I'm reading the book and in chapter two "re-split" doesnt work for me.
I may have missed some instructions- was I supposed to install
something else?
--~--~-~--~~~---~--~~
You received this message because you are
> Feedback is always welcome.
Very entertaining! :)
Bucketing is actually counter productive in your example. send already
takes care of limiting the active threads by using a thread pool, and
can ballance the work better than bucketing. When I run your code
unchanged it takes 2400ms, if I set t
Hi,
On Fri, Jun 19, 2009 at 1:30 AM, Howard Lewis Ship wrote:
> I have code that gets passed a map (actually a struct-map), should I
>
> (my-map :my-key)
> or
> (:my-key my-map)
>
> I'm beginning to gravitate towards the latter, as it is more tolerant of
> the map being nil.
I would further y
I'm currently using terracotta as both a message passing fabric in a cluster
of four servers, and as a cache to store images and structured information.
I'm not measuring performance hit, mainly because the machines i have are
seriously over specified for the problem at hand =)
On Fri, Jun 19, 200
On Thursday 18 June 2009 17:48:03 Konrad Hinsen wrote:
> The problem is that neither one is particularly well suited for the
> majority of scientific applications, which work best on distributed-
> memory machines. Of course this may change with the increasing number
> of cores-per-processor, shar
On 19.06.2009, at 00:07, Brett Morgan wrote:
> Silly question of the week, clojure+terracotta be used to do
> scientific cluster computing?
The big question is what the performance impact of terracotta is,
both for simple but large date (a big array, for example) and for big
complex data s
41 matches
Mail list logo