Hello,
That is an interesting blog post. I am not a clojure specialist, but if I
was to try to change your program to get towards C-like speed (or better), I
would :
- Use java arrays for memory. You don't seem to use the vectors in a
persistent way, and there does not seem to be easy parallelizat
On Jun 30, 2009, at 11:50 PM, Krukow wrote:
> I like the pragmatics of :min-history, and I believe it would be
> sufficient for many scenarios. However, I suspect we are now moving
> closer to the situation that Cliff Click was predicting [1] where as a
> programmer you need more precise knowledg
Manoj,
In case this helps, I've had a bit longer to dwell on this problem and
I have a couple of ideas. I do think this raises the general question
of, are Clojure .NET and Clojure Java two different languages or two
implementations of the same language? Normally in a situation like
this
On Jun 30, 6:01 pm, Rich Hickey wrote:
> MVCC history in Clojure's STM is dynamic, created by need. There is no
> read tracking, and more important for this case, no transaction
> tracking. So, if a read transaction is unable to satisfy its snapshot
> view from history, it will flag the offendin
I looked at the ICFP Contest too. I didn't even get as far as solving
the first problem, but I did implement a virtual machine that appeared
to work. I really enjoyed the coding, though I didn't get very far
with the physics! I tried a couple of approaches but settling on the
functional side.
Manoj,
On Jun 30, 2009, at 8:55 PM, mmwaikar wrote:
> I am learning clojure these days, but on .Net. I have the following
> code -
>
> (import '(System.IO Path Directory File DirectoryNotFoundException))
>
> (defn starts-with-hmorx [name]
> (if (or (= (.ToUpper (.ToString name)) "H")
>
Hi,
I am learning clojure these days, but on .Net. I have the following
code -
(import '(System.IO Path Directory File DirectoryNotFoundException))
(defn starts-with-hmorx [name]
(if (or (= (.ToUpper (.ToString name)) "H")
(= (.ToUpper (.ToString name)) "M")
I couldn't say whether it should or not but I've faced similar issues with
attaching metadata to various collections. It becomes very easy to lose the
metadata when you're dealing with collections since many high level
functions tend to return new seqs. I found myself having to reappy the
metadat
On Jun 30, 3:02 pm, igorrumiha wrote:
> Greetings everyone,
>
> I didn't actually plan it but I ended up participating in the ICFP
> programming contest (http://www.icfpcontest.org). This year the task
> was to move satellites from one orbit to another, to meet with other
> satellites etc. Quit
On Jun 30, 2009, at 5:30 PM, Kai wrote:
From scheduling I know that there are CPU-bound and IO-bound
processes. Perhaps send-off tends to hold off on yielding for longer
durations since it expects frequent interrupts. If this is the case, I
think it would be useful to elaborate on that in the d
Pre Notes: I put most of the code for my unit testing here:
http://groups.google.com/group/clojure/web/MostCodeIssue.java
http://groups.google.com/group/clojure/web/NoClassDefIssue.zip
http://clojure.googlegroups.com/web/MostCodeIssue.java?gsc=XGm71ws6-FUP8n2vUln2lQc9yyLJ
This is t
Greetings everyone,
I didn't actually plan it but I ended up participating in the ICFP
programming contest (http://www.icfpcontest.org). This year the task
was to move satellites from one orbit to another, to meet with other
satellites etc. Quite interesting, and to start it all you need to
imple
Hi,
Am 30.06.2009 um 23:30 schrieb Kai:
Why is there a distinction between an action and a blocking action?
What kind of concerns arise when you send a potentially blocking
action to an agent and why is send-off better accommodated to deal
with it?
send serves the agent from a fixed ThreadPoo
Count me in
At Stuart's presentation to LispNYC, someone took down an email list
for a proposed ClojureNYC group - if only I could remember who .
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To
I can't imagine that this hasn't been asked before, so please direct
this post to an appropriate link if you know of it.
(send a f & args)
Dispatch an action to an agent. Returns the agent immediately.
Subsequently, in a thread from a thread pool, the state of the agent
will be set to the value o
On Tue, Jun 30, 2009 at 4:47 PM, Kai wrote:
>
> I would be interested in meeting in NYC.
>
Me too!
Rich
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@g
Not sure if I could make it on a regular basis, but on a related note,
those in NYC may be interested in:
http://bits.blogs.nytimes.com/2009/06/29/new-york-city-starts-contest-for-big-apple-apps/?ref=technology
Could be an interesting use case for clj + cloud resources
On Thu, Jun 4, 2009 a
I would be interested in meeting in NYC.
On Jun 6, 11:38 am, "John D. Hume" wrote:
> On Thu, Jun 4, 2009 at 12:09 PM, Eric Thorsen wrote:
> > what kind of interest there might be in creating a Clojure user group
> > in the NY metro area to meet up in Manhattan once a month to discuss
> > all thi
Hey Sam,
I'm glad you were able to refactor the code, I had a fear that it was
too unreadable.
There were several other bugs in that version that you should know of:
- First version didn't use StringBuilder, which accounted for very
slow times.
- Semicolons aren't handled correctly in code and c
The subject says all: Should subvec keep the parent vector's metadata
(it currently doesn't) or not?
Similar functions like conj, assoc, dissoc DO keep the metadata of the
collection.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
> -Mr. Not Yet With The Programme.
thanks to all for the helpful replies. i might actually be 'getting
it' now. (well, at least minimally :-)
sincerely.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Clojure" grou
On Tue, Jun 30, 2009 at 12:29 AM, Konrad
Hinsen wrote:
> What is particularly nice about Clojure is that in most situations
> you don't need to switch to Java for speed. You can optimize your
> code by adding type hints and switching to low-level data structures
> (unboxed ints and floats, arrays,
On Tue, 2009-06-30 at 01:55 -0600, Daniel Lyons wrote:
>
> On Jun 29, 2009, at 12:41 PM, fft1976 wrote:
>
> >
> > Based on the recent survey "What are people using Clojure for?",
> > people are mostly using it for non-CPU-intensive work, like parsing,
> > report generation, GUIs, "glue" code.
>
Hi Laurent,
I think that pprint might be a good foundation for what you are doing,
but there are a couple of issues that need to be dealt with first.
First, pprint works directly on Clojure objects and not strings, so
the code will need to be read first.
Second, the Clojure reader is lossy - it
On Tue, Jun 30, 2009 at 7:50 AM, Krukow wrote:
>
> On Jun 29, 7:51 pm, B Smith-Mannschott wrote:
> [snip...]
>> much on my netbook. The problem seems to be that with only a single
>> (hyperthreaded) core the render agent is almost constantly interrupted
>> by some pesky ant while attempting to sn
On Tue, Jun 30, 2009 at 10:10, Daniel B Lucraft wrote:
>
> I didn't think it was possible for the render agent to be interrupted
> like that. Isn't the point of the MVCC system that the render agent
> will see a consistent view of the world as it was when the render
> started? And that the ants ca
On Tue, Jun 30, 2009 at 8:37 AM, Rowdy Rednose wrote:
>
> Would it be easy to implement an in-memory database in clojure that
> allows concurrent access?
>
> It sounds pretty easy, as most of the features are already provided by
> Clojure. I'm not sure though about the "locking granularity".
> Of
Hi all,
I want to add source code formatting / auto-indenting to the clojure
plugin for eclipse.
I had asked other IDE plugin creators, and it seems that they
leveraged the specifics of their respective platforms to do so. So I
have nothing substantial to "steal from them" not requiring a fair
a
I think I remember running the ants.clj demo on my netbook and it running
normally. I'll check again this evening.
On Tue, Jun 30, 2009 at 12:40 PM, Daniel B Lucraft
wrote:
>
> I didn't think it was possible for the render agent to be interrupted
> like that. Isn't the point of the MVCC system
Thanks for doing this.
I think I fixed one bug so wanted to mention it. In your html-post-
format function, you have a string that creates the first . It
has a explicit style set to have a font-family: courier new and a font-
size of 14px. I took those styles out so that the style sheet
contro
I didn't think it was possible for the render agent to be interrupted
like that. Isn't the point of the MVCC system that the render agent
will see a consistent view of the world as it was when the render
started? And that the ants can continue modifying the world during the
render's processing but
Would it be easy to implement an in-memory database in clojure that
allows concurrent access?
It sounds pretty easy, as most of the features are already provided by
Clojure. I'm not sure though about the "locking granularity".
Of course you don't pessimistically lock in Clojure, but if you have a
2009/6/29 C. Florian Ebeling :
>
>>> I randomly get ClassNotFoundExceptions when I try to compile a file.
>>> This is a paste from the repl:
>>>
>>> Clojure 1.0.0-
>>> user=> (compile 'app.hello)
>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>> app.hello$exec__4 (NO_SOURCE_FIL
On Jun 29, 7:51 pm, B Smith-Mannschott wrote:
[snip...]
> much on my netbook. The problem seems to be that with only a single
> (hyperthreaded) core the render agent is almost constantly interrupted
> by some pesky ant while attempting to snapshot the world, forcing the
> render agent to automati
(defn depth [tree]
(if (nil? tree) 0
(+ 1 (max (depth (left tree)) (depth (right tree)
This looks close to what I need. Let me see if I can't get my head around
it.
Regards,
Emeka
On Tue, Jun 30, 2009 at 8:28 AM, Daniel Lyons wrote:
>
> On Jun 30, 2009, at 1:05 AM, Emeka wrote:
>
>
On Tue, 2009-06-30 at 13:10 +0200, Meikel Brandmeyer wrote:
> I'm not sure agents are the right idea here. The forms
> are used in dialogs. So when the dialog closes I need
> the result immediately. So updating the IRef needs to
> be synchronous. agents cannot assure that.
>
Then it could be gre
Hi,
Am 30.06.2009 um 11:57 schrieb Nicolas Oury:
It seems a very nice idea. I would suggest the use of agents, for the
states, rather than atom. Especially, the possibility to
have watchers seems good.
I'm not sure agents are the right idea here. The forms
are used in dialogs. So when the dia
Hi,
Am 30.06.2009 um 11:32 schrieb Laurent PETIT:
Yes, what I have in mind is that, in some point in time, parts of
clojuredev (ouch, still not decided on a new name :) will be
implemented in clojure, and so I'll have to somewhat create the same
kind of dsl for swt based "forms".
Ah! I see th
On Jun 30, 2009, at 3:53 AM, fft1976 wrote:
>
> On Jun 30, 12:55 am, Daniel Lyons wrote:
>
>> I don't see why that wouldn't be the case, if you were using Java's
>> native multidimensional arrays. I don't think it would be as much
>> fun,
>
> That's my point. It's often argued that you can ju
On Jun 30, 2009, at 3:50 AM, Nicolas Oury wrote:
>
> If you use depth/size a lot, it might be faster to store them in the
> nodes. (it is pseudo code)
>
> (defstruct bintree :head :left :right :size :depth)
>
> (defn make-tree [head left right]
> (struct bintree head left right
>
Hi Meikel,
> (make-panel
>[{:label "Flogiston Pressure" :constraints "1, 1"}
> {:editor Integer :initial 0 :min 0 :max 5 :atom flogiston-
> pressure :constraints "2, 1"}
> {:label "Security Override" :constraints "1, 3"}
> {:editor Boolean :initial false :atom sec-override :const
On Jun 30, 12:55 am, Daniel Lyons wrote:
> I don't see why that wouldn't be the case, if you were using Java's
> native multidimensional arrays. I don't think it would be as much fun,
That's my point. It's often argued that you can just optimize the
teeny "bottleneck" by adding type declara
If you use depth/size a lot, it might be faster to store them in the
nodes. (it is pseudo code)
(defstruct bintree :head :left :right :size :depth)
(defn make-tree [head left right]
(struct bintree head left right
(+ (left :size) (right :size))
Hi,
2009/6/30 Meikel Brandmeyer :
> Hi Laurent,
>
> Am 30.06.2009 um 10:56 schrieb Laurent PETIT:
>
>> the name of the library is very general, while when reading its
>> description it seems that it handles just a particular kind of
>> implementation forms (JGoodies). I can also see that the use
Hi Laurent,
Am 30.06.2009 um 10:56 schrieb Laurent PETIT:
the name of the library is very general, while when reading its
description it seems that it handles just a particular kind of
implementation forms (JGoodies). I can also see that the use by a user
requires the explicit usage of swing co
Hi Meikel,
the name of the library is very general, while when reading its
description it seems that it handles just a particular kind of
implementation forms (JGoodies). I can also see that the use by a user
requires the explicit usage of swing constructors.
So I was wondering whether you could
>>> I randomly get ClassNotFoundExceptions when I try to compile a file.
>>> This is a paste from the repl:
>>>
>>> Clojure 1.0.0-
>>> user=> (compile 'app.hello)
>>> java.lang.RuntimeException: java.lang.ClassNotFoundException:
>>> app.hello$exec__4 (NO_SOURCE_FILE:0)
It doesn't happen under lin
On Jun 30, 2009, at 1:05 AM, Emeka wrote:
> Hello All,
>
> I have a BinaryTree Nodes that I want to resolve it's depth and the
> BinaryTree may be unbalanced. How do I do this? Can't just figure it
> out on my own?
> It is in the form of vector of vectors, and from one cell of any
> vector
Dear Clojurians,
I herewith announce a new library: clj-forms.
It provides a small embedded DSL to allow easy creation
of forms by providing a sequence of maps giving the
necessary information. The boilerplate is hidden in the
Forms driver.
Here you can find an example:
http://kotka.de/projec
On Jun 29, 2009, at 8:21 AM, Andrew Garman wrote:
> I'd also suggest that folks rate the posts that are exceptionally good
> or exceptionally bad. If a user account is noted predominately for
> bad posts, a moderator - whether in this group or another - will think
> twice about allowing the use
Hi,
Am 30.06.2009 um 09:05 schrieb Emeka:
I have a BinaryTree Nodes that I want to resolve it's depth and the
BinaryTree may be unbalanced. How do I do this? Can't just figure it
out on my own?
It is in the form of vector of vectors, and from one cell of any
vector I can move to the next r
On Jun 29, 2009, at 12:41 PM, fft1976 wrote:
>
> Based on the recent survey "What are people using Clojure for?",
> people are mostly using it for non-CPU-intensive work, like parsing,
> report generation, GUIs, "glue" code.
>
> It's been argued by some that Clojure is as fast as Java, because a
On 29.06.2009, at 20:41, fft1976 wrote:
> It's been argued by some that Clojure is as fast as Java, because at
> worst, you can implement your bottlenecks in Java. I have a problem
> with this argument, because the data structures that your Java has to
> work with are still (wasteful) Clojure one
Hello All,
I have a BinaryTree Nodes that I want to resolve it's depth and the
BinaryTree may be unbalanced. How do I do this? Can't just figure it out on
my own?
It is in the form of vector of vectors, and from one cell of any vector I
can move to the next row however the column index has to be
2009/6/30 Meikel Brandmeyer :
> Hi,
>
> Am 30.06.2009 um 08:22 schrieb Laurent PETIT:
>
>> Here would be the function returning a lazy seq of the map entries :
>>
>> (def #^{:docstring "Returns a lazy seq of java.util.Map.MapEntry for
>> the map given as an argument." } mapentries (partial map ide
Hi,
Am 30.06.2009 um 08:22 schrieb Laurent PETIT:
Here would be the function returning a lazy seq of the map entries :
(def #^{:docstring "Returns a lazy seq of java.util.Map.MapEntry for
the map given as an argument." } mapentries (partial map identity))
(mapentries {:a 1 :b 2}) => ([:a 1] [
56 matches
Mail list logo