On Fri, Sep 25, 2009 at 1:46 AM, Richard Newman wrote:
>
> > I guess this is already ticketed. I should have searched first, sorry
> > for the noise.
>
> It's not already ticketed, even if the root cause might be the same.
> As I pointed out in my message, these are not hash maps, they're array
> I guess this is already ticketed. I should have searched first, sorry
> for the noise.
It's not already ticketed, even if the root cause might be the same.
As I pointed out in my message, these are not hash maps, they're array
maps.
You should file a new ticket and refer to #192.
--~--~--
anybody tried that route?
--~--~-~--~~~---~--~~
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 patie
I guess this is already ticketed. I should have searched first, sorry
for the noise.
http://www.assembla.com/spaces/clojure/tickets/192-hashmaps--count-is-not-always-updated-when-associng-dissocing-a-nil-key
-Jason
--~--~-~--~~~---~--~~
You received this message
On Sep 24, 12:33 am, Phil Hagelberg wrote:
> It looks like it's actually a subclass of Exception instead:
>
> user=> (eval '(throw (InterruptedException.)))
> java.lang.InterruptedException (NO_SOURCE_FILE:7)
> user=> (class *e)
> clojure.lang.Compiler$CompilerException
> use
2009/9/23 Emeka :
> Mic,
>
> Or use "script" . I don't think I understood clearly what you are referring
> to.
There's a UNIX command called script which records a command line
session to a file (called typescript by default).
mich...@egret:/tmp$ script
Script started, file is typescript
mich...
Hi,
Am 15.09.2009 um 23:05 schrieb Elliott Slaughter:
But suppose I want to (foo ::b) to print both "It's a b!" and "It's an
a!"? (This is equivalent to a super.foo() call in Java, or method
combination in CL.)
A little late answer, but well...
(defmethod foo ::b
[b]
((get-method foo ::a
Confirmed. I'm using clojure from git:
$ git status
# On branch master
nothing to commit (working directory clean)
I also tried with the ':'
Clojure=> (count {:1 nil :2 nil :3 nil :4 nil :5 nil :6 nil :7 nil :8
nil :9 nil})
0
--~--~-~--~~~---~--~~
You received t
Thanks for the replies, everyone. I'll look into the clojurebot and
see how that works.
Also, I do understand that this is potentially opening the door to
mis-use of resources, but for now, I'm running in a sufficiently
trusted environment that the benefits outweigh the risks (an OOM or
CPU DoS
Thanks for the pointer. Looking into this.
On Wed, Sep 23, 2009 at 3:30 AM, Timothy Pratley
wrote:
>
> Tom Faulhaber wrote a great article which uses fill-queue to create a
> lazy-seq from a data stream, I think you might find it quite
> applicable:
>
> http://infolace.blogspot.com/2009/08/simple
> Use it just like you use defstruct, e.g.: (defstruct* person :first-
> name :last-name :age), but it will also create a little type-checker
> function: is-person? Here are some tests to see how it works:
Note that your type checker will give false positives if you're
intending to use accessor
On Sep 24, 10:59 am, Miron Brezuleanu wrote:
> Well, I only want to enforce duck-typing :-) - for instance, make sure
> via unit tests that a function that should return a data structure
> with certain properties always returns such a data structure.
Not exactly what you asked for, but I added a
Excellent summary of each language's sweet spot. I'd like to suggest a
different book for Erlang though.
For learning Erlang, I'd suggest Erlang Programming by Francesco
Cesarini & Simon Thompson, published by O'Reilly
On Thu, Sep 24, 2009 at 11:16 AM, tmountain wrote:
...
> 1) Haskell - mathem
Clojure and Haskell both include STM systems for controlled access to
shared resources. There's a Haskell distribution known as Glasgow
Distributed Haskell (GdH), which provides facilities for small-scale
distributed programming. Clojure can achieve the same effect through
the use of third-party l
Hello,
On Thu, Sep 24, 2009 at 5:09 PM, tmountain wrote:
>
> To apply that to a data structure, you'd need to walk your structure
> and compare the elements contained within against the desired type.
> Depending on the structure, you could do something similar to this.
>
> (defn exclusively-cont
Hi,
On Thu, Sep 24, 2009 at 12:12 PM, Jarkko Oranen wrote:
>
> On Sep 24, 11:01 am, Miron Brezuleanu wrote:
>> Hello,
>>
>> I find that I tend to name struct instances like the struct. For instance,
>>
>
> You could name the struct base or something. I vaguely
> remember reading somewhere tha
With respect to Stuart's comment above - "Erlang is designed for
distributed operation across many machines; Clojure is designed for a
single machine with many cores.", how are Clojure and Haskell
different? I am just curious to know how do Haskell, Clojure and
Erlang compare.
On Sep 24, 4:36 am,
You might be looking for the instance? function. It can be used to
determine if something is an instance of a particular class.
user=> (instance? java.lang.Integer 5)
true
user=> (instance? java.lang.Integer "5")
false
To apply that to a data structure, you'd need to walk your structure
and comp
Rich,
Hmm, it is what I'm looking for.Just the way I planned it to be. The next
issue now is on how to craft it into clojure.
Regards,
Emeka
On Thu, Sep 24, 2009 at 7:59 AM, Richard Newman wrote:
>
> > Actually, that suggests a more general point: that we can have
> > programmatic access to
>From Mark Volkmann tutorial - http://java.ociweb.com/mark/clojure/article.html
"The send function uses a "fixed thread pool" (see the
newFixedThreadPool method in java.util.concurrent.Executors) where the
number of threads is the number of processors plus two. If all of
those threads are busy,
On Sep 24, 11:01 am, Miron Brezuleanu wrote:
> Hello,
>
> I find that I tend to name struct instances like the struct. For instance,
>
> (defstruct person :name)
>
> and then
>
> (let [person (struct person "John")]
> )
>
> which breaks further use of (struct person ...) in that let.
>
> Is t
I'd recommend an architecture where you utilize ejabberd and create
bots/components that read XML stanzas and react. That way you can just
scale your application servers separately and use any language you
choose. You also get chat for free.
On Thu, Sep 24, 2009 at 4:23 AM, ngocdaothanh wrote:
>
Hello,
is there a way to check if a data structure complies to a given
schema? (e.g. people is a vector of persons).
I'm using C# a lot and maybe the static typing has changed the way I
think. I feel like adding "type checks" in unit tests and being able
to say something like:
(is-type (people
I think there are 2 kinds of concurrency: local concurrency (one
machine) and distributed concurrency (parallel).
Is there a comparison about the speed of local concurrency of Clojure
and Erlang?
I would like to create an online multiplayer game server which serves
thousands of persistent flash
> Is there an established naming convention that I could use? (I'm
> trying to use (let [aperson (struct person "John")]...) but I'm not
> completely happy with it.)
AppleScript uses "the-person", but I don't recommend that :)
I'd go for one of two avenues — descriptive:
(let [recipient (str
> Can anyone else confirm?
I see the same thing. Both working and non-working lengths are
PersistentArrayMaps, so this isn't a hash map thing.
user=> (type {1 nil 2 nil 3 nil 4 nil 5 nil 6 nil 7 nil 8 nil 9 nil})
clojure.lang.PersistentArrayMap
user=> (type {1 nil 2 nil 3 nil 4 nil 5 nil 6 nil
Hello,
I find that I tend to name struct instances like the struct. For instance,
(defstruct person :name)
and then
(let [person (struct person "John")]
)
which breaks further use of (struct person ...) in that let.
Is there an established naming convention that I could use? (I'm
trying
> Actually, that suggests a more general point: that we can have
> programmatic access to the REPL's backlog if we modify the REPL
> process's Java code somewhat. A simple example would be to make a
> repl.class that would provide an interactive stdin/stdout repl but
> log everything to a
Hello John ,
>
> A standalone REPL on Windows is amenable to making the command prompt
> window's backscroll big enough, if needed, and then copying from it using
> the prompt window's mark/copy mode. A standalone REPL on MS-DOS is tougher.
> The only way I know of short of installing Windows is t
29 matches
Mail list logo