>>Let's also say you receive update to specific point every few milliseconds, 
>>so each update will create a new point and will set the point inside the 
>>persistent vector and the new vector will now be stored inside a member 
>>variable?

Correct. In my situation, I imported the entire Clojure-CLR dlls into
my solution, then wrapped a few methods so I could convert C#'s Func<>
to a Clojure IFn. From there you can simply use Refs, Atoms, and
transactions to create the same data structures you would in C#.

Some things to get you started:

The C# version of dosync is:

 LockingTransaction.runInTransaction(new TFunc(func));

where TFunc is your Func->IFn wrapper.

RT doesn't like being run this way, so we have to disable some of it's
Init routines. Just stick this somewhere in the start of your app:

clojure.lang.RT_Bootstrap_Flag._doRTBootstrap = false;

Timothy

On Wed, Feb 15, 2012 at 4:47 AM, Ido Ran <ido....@gmail.com> wrote:
> Hi,
> Thank you for the answer.
> I agree it does not fell right and I have to be super careful not to modify
> anything.
> It will be helpful if you can elaborate on how you use those immutable
> classes inside immutable collections.
> In the example you show you had immutable point, if you now keep
> an equalizer line made up of 5000 points, let's also say you receive update
> to specific point every few milliseconds, so each update will create a new
> point and will set the point inside the persistent vector and the new vector
> will now be stored inside a member variable?
> After all at the end you must have at least one known root object to use,
> right?
>
> Thank you,
> Ido
>
> --
> 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 this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en



-- 
“One of the main causes of the fall of the Roman Empire was
that–lacking zero–they had no way to indicate successful termination
of their C programs.”
(Robert Firth)

-- 
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 this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to