Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Ralph Ritoch
Thank you. I have signed the contributor agreement and applied to join 
clojure-dev (request pending).

On Monday, December 8, 2014 3:38:15 AM UTC+8, Alan Forrester wrote:

 On 7 December 2014 at 19:27, Fluid Dynamics a209...@trbvm.com 
 javascript: wrote: 
  On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote: 
  
  I think you should post this to cloju...@googlegroups.com 
  
  
  To where? Your post displayed like that, and I couldn't get a usable 
 tooltip 
  expanding the address by mousing over it either. 

 clojure slash dev at googlegroups dot com 

 with no spaces and with @ and - in place of slash and at. 

 Alan 


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Gary Verhaegen
Naive question: does that solve the dependency problem where two explicit
dependencies depend on different versions of a transitive one and something
breaks because of it?

On Monday, 8 December 2014, Ralph Ritoch rrit...@gmail.com wrote:

 Thank you. I have signed the contributor agreement and applied to join
 clojure-dev (request pending).

 On Monday, December 8, 2014 3:38:15 AM UTC+8, Alan Forrester wrote:

 On 7 December 2014 at 19:27, Fluid Dynamics a209...@trbvm.com wrote:
  On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote:
 
  I think you should post this to cloju...@googlegroups.com
 
 
  To where? Your post displayed like that, and I couldn't get a usable
 tooltip
  expanding the address by mousing over it either.

 clojure slash dev at googlegroups dot com

 with no spaces and with @ and - in place of slash and at.

 Alan

  --
 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
 javascript:_e(%7B%7D,'cvml','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
 javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com
 javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');.
 For more options, visit https://groups.google.com/d/optout.


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Ralph Ritoch
Gary,

   What your stating is possible with this, but it wouldn't be automatic. 
You could load the one dependency in one isolation, and load the second 
dependency in a second isolation.  This is where a bit of hard work would 
be needed to keep the pointers returned when you create the two 
environments, Go into each environment to grab pointers to the namespace(s) 
you depend on. Then you need to create your own instance of a namespace 
container (clojure.lang.NamespaceContainer.) which gives you the capability 
of calling it's putIfAbsent method to import object references of those 
namespaces from the two environments.  This was not an intended feature, 
but it is a feature that can be accessed.

Best Regards,
  Ralph Ritoch

On Monday, December 8, 2014 8:39:29 PM UTC+8, Gary Verhaegen wrote:

 Naive question: does that solve the dependency problem where two explicit 
 dependencies depend on different versions of a transitive one and something 
 breaks because of it?

 On Monday, 8 December 2014, Ralph Ritoch rri...@gmail.com javascript: 
 wrote:

 Thank you. I have signed the contributor agreement and applied to join 
 clojure-dev (request pending).

 On Monday, December 8, 2014 3:38:15 AM UTC+8, Alan Forrester wrote:

 On 7 December 2014 at 19:27, Fluid Dynamics a209...@trbvm.com wrote: 
  On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote: 
  
  I think you should post this to cloju...@googlegroups.com 
  
  
  To where? Your post displayed like that, and I couldn't get a usable 
 tooltip 
  expanding the address by mousing over it either. 

 clojure slash dev at googlegroups dot com 

 with no spaces and with @ and - in place of slash and at. 

 Alan 

  -- 
 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
 --- 
 You received this message because you are subscribed to the Google Groups 
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Ralph Ritoch
Gary,

  One additional note. When your about to use a dependency you will still 
need to enter into the isolation of that dependency for any feature that 
accesses namespaces not in your current environment (such as any call to 
the dependency which uses conflicting namespaces). Not every feature of a 
dependency will require the conflicting dependencies, but some will. It 
wouldn't be easy, or automatic, but it would become possible.

Best Regards,
  Ralph Ritoch

On Monday, December 8, 2014 9:23:12 PM UTC+8, Ralph Ritoch wrote:

 Gary,

What your stating is possible with this, but it wouldn't be automatic. 
 You could load the one dependency in one isolation, and load the second 
 dependency in a second isolation.  This is where a bit of hard work would 
 be needed to keep the pointers returned when you create the two 
 environments, Go into each environment to grab pointers to the namespace(s) 
 you depend on. Then you need to create your own instance of a namespace 
 container (clojure.lang.NamespaceContainer.) which gives you the capability 
 of calling it's putIfAbsent method to import object references of those 
 namespaces from the two environments.  This was not an intended feature, 
 but it is a feature that can be accessed.

 Best Regards,
   Ralph Ritoch

 On Monday, December 8, 2014 8:39:29 PM UTC+8, Gary Verhaegen wrote:

 Naive question: does that solve the dependency problem where two explicit 
 dependencies depend on different versions of a transitive one and something 
 breaks because of it?

 On Monday, 8 December 2014, Ralph Ritoch rri...@gmail.com wrote:

 Thank you. I have signed the contributor agreement and applied to join 
 clojure-dev (request pending).

 On Monday, December 8, 2014 3:38:15 AM UTC+8, Alan Forrester wrote:

 On 7 December 2014 at 19:27, Fluid Dynamics a209...@trbvm.com wrote: 
  On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote: 
  
  I think you should post this to cloju...@googlegroups.com 
  
  
  To where? Your post displayed like that, and I couldn't get a usable 
 tooltip 
  expanding the address by mousing over it either. 

 clojure slash dev at googlegroups dot com 

 with no spaces and with @ and - in place of slash and at. 

 Alan 

  -- 
 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
 --- 
 You received this message because you are subscribed to the Google 
 Groups Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to clojure+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.



-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Ralph Ritoch
One important piece of information about this feature is that it doesn't 
manipulate classloaders.  This feature was designed to be used with OSGi or 
applications that handle their own classloading issues.  In a typical 
application when entering a namespace isolation you may also need to bind a 
separate Compiler/LOADER and Thread context loader, but those classloaders 
can, and should, have common parent classloaders to load clojure from the 
same classloader. This feature simply isolates clojure namespaces, it 
doesn't manipulate the underlying Java support systems which can already be 
manipulated with existing clojure features.  The benefit of this feature is 
that you can create separate namespace environments with different copies 
of the same namespace names without needing to run separate run-times 
making it possible for them to directly share all clojure data types via 
shared namespaces since they're loaded by the same classloader. A side 
effect of the implementation is that it is possible to copy namespaces from 
one environment to another if you have the pointer returned from creating 
the environment. I have considered adding automatic creation of dynamic 
classloaders and associating them with isolation environments but that can 
be done from libraries using existing clojure features. 

For future reference since additional features will likely be added to this 
fork, this feature is implemented via the git commit 
https://github.com/rritoch/clojure/commit/0f4804bbf584049fd85ffa872f10522cc41eff9a






-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-08 Thread Gary Verhaegen
Thanks for these clarifications!

On Monday, 8 December 2014, Ralph Ritoch rrit...@gmail.com wrote:

 One important piece of information about this feature is that it doesn't
 manipulate classloaders.  This feature was designed to be used with OSGi or
 applications that handle their own classloading issues.  In a typical
 application when entering a namespace isolation you may also need to bind a
 separate Compiler/LOADER and Thread context loader, but those classloaders
 can, and should, have common parent classloaders to load clojure from the
 same classloader. This feature simply isolates clojure namespaces, it
 doesn't manipulate the underlying Java support systems which can already be
 manipulated with existing clojure features.  The benefit of this feature is
 that you can create separate namespace environments with different copies
 of the same namespace names without needing to run separate run-times
 making it possible for them to directly share all clojure data types via
 shared namespaces since they're loaded by the same classloader. A side
 effect of the implementation is that it is possible to copy namespaces from
 one environment to another if you have the pointer returned from creating
 the environment. I have considered adding automatic creation of dynamic
 classloaders and associating them with isolation environments but that can
 be done from libraries using existing clojure features.

 For future reference since additional features will likely be added to
 this fork, this feature is implemented via the git commit
 https://github.com/rritoch/clojure/commit/0f4804bbf584049fd85ffa872f10522cc41eff9a






  --
 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
 javascript:_e(%7B%7D,'cvml','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
 javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Clojure group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to clojure+unsubscr...@googlegroups.com
 javascript:_e(%7B%7D,'cvml','clojure%2bunsubscr...@googlegroups.com');.
 For more options, visit https://groups.google.com/d/optout.


-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-07 Thread Bozhidar Batsov
I think you should post this to clojure-...@googlegroups.com

— 
Cheers,
Bozhidar

On December 7, 2014 at 07:32:38, Ralph Ritoch (rrit...@gmail.com) wrote:

Hello,

   I have created a way to create namespace isolation within clojure. The code 
is available on github @ https://github.com/rritoch/clojure .  What this new 
code does is it replaces the clojure.lang.Namespace/namespaces static property 
with a clojure.lang.NamespaceContainer object that is a version which utilizes 
thread local memory and facilitates creating separate namespace environments 
within a single Runtime.

To create and enter a new environment.

(clojure.lang.NamespaceContainer/enter)

This returns a pointer which can later be used to re-enter the namespace as the 
enter method also takes a single argument of that pointer.

To leave the isolation environment ...

(clojure.lang.NamespaceContainer/exit)

When used with OSGi this should make it possible to maintain a single Runtime 
per clojure version running on a system.

To ensure maximum stability, the current namespace and all of it's dependent 
namespaces are copied into the newly created container. Once inside a new 
container, changes can be made without any risk of namespace conflicts with 
other parts of the system.

I would like to submit these features for addition to Clojure.

Best Regards,
  Ralph Ritoch
--
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
---
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-07 Thread Fluid Dynamics
On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote:

 I think you should post this to cloju...@googlegroups.com 


To where? Your post displayed like that, and I couldn't get a usable 
tooltip expanding the address by mousing over it either.

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: For review: Clojure Namespace Isolation

2014-12-07 Thread Alan Forrester
On 7 December 2014 at 19:27, Fluid Dynamics a2093...@trbvm.com wrote:
 On Sunday, December 7, 2014 11:12:37 AM UTC-5, Bozhidar Batsov wrote:

 I think you should post this to cloju...@googlegroups.com


 To where? Your post displayed like that, and I couldn't get a usable tooltip
 expanding the address by mousing over it either.

clojure slash dev at googlegroups dot com

with no spaces and with @ and - in place of slash and at.

Alan

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


For review: Clojure Namespace Isolation

2014-12-06 Thread Ralph Ritoch
Hello,

   I have created a way to create namespace isolation within clojure. The 
code is available on github @ https://github.com/rritoch/clojure .  What 
this new code does is it replaces the clojure.lang.Namespace/namespaces 
static property with a clojure.lang.NamespaceContainer object that is a 
version which utilizes thread local memory and facilitates creating 
separate namespace environments within a single Runtime.

To create and enter a new environment.

(clojure.lang.NamespaceContainer/enter)

This returns a pointer which can later be used to re-enter the namespace as 
the enter method also takes a single argument of that pointer.

To leave the isolation environment ...

(clojure.lang.NamespaceContainer/exit)

When used with OSGi this should make it possible to maintain a single 
Runtime per clojure version running on a system. 

To ensure maximum stability, the current namespace and all of it's 
dependent namespaces are copied into the newly created container. Once 
inside a new container, changes can be made without any risk of namespace 
conflicts with other parts of the system.

I would like to submit these features for addition to Clojure.

Best Regards,
  Ralph Ritoch

-- 
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
--- 
You received this message because you are subscribed to the Google Groups 
Clojure group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.