Re: Any chance of a module system being added to the language?
On 13 Apr 2015, at 19:22, Colin Yates wrote: Ok, thanks Mark. Ping me on IRC (friend) or Twitter @talios if you have any questions.. -- Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt -- 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. signature.asc Description: OpenPGP digital signature
Re: Any chance of a module system being added to the language?
Ok, thanks Mark. On 13 Apr 2015 06:37, Mark Derricutt m...@talios.com wrote: On 3 Apr 2015, at 3:14, Colin Yates wrote: Do you have any references to OSGi and Clojure? My fork of clojure.osgi is updated for 1.6 and in Maven Central: https://github.com/talios/clojure.osgi and a simple demo: https://github.com/talios/clojure.osgi.demo ( read: very very simple ). We've not really progressed much using clojure.osgi at work really, sadly that got lost amongst other commitments. -- Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt -- 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: Any chance of a module system being added to the language?
On 3 Apr 2015, at 3:14, Colin Yates wrote: Do you have any references to OSGi and Clojure? My fork of clojure.osgi is updated for 1.6 and in Maven Central: https://github.com/talios/clojure.osgi and a simple demo: https://github.com/talios/clojure.osgi.demo ( read: very very simple ). We've not really progressed much using clojure.osgi at work really, sadly that got lost amongst other commitments. -- Mark Derricutt http://www.theoryinpractice.net http://www.chaliceofblood.net http://plus.google.com/+MarkDerricutt http://twitter.com/talios http://facebook.com/mderricutt -- 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. signature.asc Description: OpenPGP digital signature
Re: Any chance of a module system being added to the language?
Osgi brings in so many other things to worry about. Imo not a route to consider. The main issue is every jar you use would have to have an osgi friendly implementation. For this reason a lot of libs are duplicated after source alteration into a new repo. Great for tightly controlled embedded systems not so great for just grabbing random lob X off of maven. -- 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.
Any chance of a module system being added to the language?
I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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: Any chance of a module system being added to the language?
I'm not really in a position to say which implementation is superior. We tried both source re-writing and an isolated classloader for refactor-nrepl and I couldn't get the classpath to work right (we want our own deps isolated, but also access to the project's deps, resources etc for refactorings) so we ended up with source re-writing. But I do feel the pain of this problem, and judging by the issues I see pop up on clj projects on github others are suffering too. On Thursday, April 2, 2015 at 3:28:05 PM UTC+2, Andy Fingerhut wrote: Dependency isolation without isolated class loaders or source rewriting would be interesting, but how would you propose to achieve dependency isolation without using either of those techniques? Or perhaps a solution where the module system did the source level rewriting for you 'under the hood' would be acceptable? Andy On Thu, Apr 2, 2015 at 4:05 AM, Lars Andersen ex...@expez.com javascript: wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clo...@googlegroups.com javascript: Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+u...@googlegroups.com javascript: 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+u...@googlegroups.com javascript:. 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: Any chance of a module system being added to the language?
I agree that it's important to think about how you should organize your namespaces, but it would be nice present a clean outward API without disturbing the implementation too much. I think the rational for import-vars in the potemkin readme makes a good case: https://github.com/ztellman/potemkin#import-vars On Thursday, April 2, 2015 at 4:11:09 PM UTC+2, Alex Miller wrote: It's possible we could make use of Java's module system if it ever actually gets released in Java 9. While I followed it pretty extensively when they first started discussing it (7 or 8 years ago!) I have not been keeping up on it lately. Some people have used OSGi with Clojure but I don't gather that it's a picnic. Designing a good module system, especially one that takes into account Java's classloader architecture, is a challenging task. Personally, I think it's probably useful to think about your namespace layout, so I'm not really looking to get rid of the thinking part. :) On Thursday, April 2, 2015 at 6:05:25 AM UTC-5, Lars Andersen wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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: Any chance of a module system being added to the language?
I did it with protege-nrepl. Protege is a tool build on eclipse, which is build on OSGi. protege-nrepl embed clojure inside Protege, and enables it to put up an NREPL server. I found it to be a bit of a nightmare to be honest. The key problem was was that for protege-nrepl to be useful, I need to able to expand the running Clojure dynamically. Otherwise, I have to bundle all of the clojure that I want to use with protege. Theoretically, this should be easy with pomegranate, but in practice this fails because OSGi requires the package to state before what classes a package is going to use when the OSGi package is built. But I don't know what those are! The eventually solution was to add this DynamicImport-Package*/DynamicImport-Package to my maven config. https://github.com/phillord/protege-nrepl/blob/master/nrepl-plugin/pom.xml This solves the problem, but AFAICT defeats the point of OSGi since now there is no isolation. Phil Colin Yates colin.ya...@gmail.com writes: Do you have any references to OSGi and Clojure? On 2 April 2015 at 15:11, Alex Miller a...@puredanger.com wrote: It's possible we could make use of Java's module system if it ever actually gets released in Java 9. While I followed it pretty extensively when they first started discussing it (7 or 8 years ago!) I have not been keeping up on it lately. Some people have used OSGi with Clojure but I don't gather that it's a picnic. Designing a good module system, especially one that takes into account Java's classloader architecture, is a challenging task. Personally, I think it's probably useful to think about your namespace layout, so I'm not really looking to get rid of the thinking part. :) On Thursday, April 2, 2015 at 6:05:25 AM UTC-5, Lars Andersen wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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. -- Phillip Lord, Phone: +44 (0) 191 208 7827 Lecturer in Bioinformatics, Email: phillip.l...@newcastle.ac.uk School of Computing Science, http://homepages.cs.ncl.ac.uk/phillip.lord Room 914 Claremont Tower, skype: russet_apples Newcastle University, twitter: phillord NE1 7RU -- 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: Any chance of a module system being added to the language?
Dependency isolation without isolated class loaders or source rewriting would be interesting, but how would you propose to achieve dependency isolation without using either of those techniques? Or perhaps a solution where the module system did the source level rewriting for you 'under the hood' would be acceptable? Andy On Thu, Apr 2, 2015 at 4:05 AM, Lars Andersen ex...@expez.com wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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: Any chance of a module system being added to the language?
It's possible we could make use of Java's module system if it ever actually gets released in Java 9. While I followed it pretty extensively when they first started discussing it (7 or 8 years ago!) I have not been keeping up on it lately. Some people have used OSGi with Clojure but I don't gather that it's a picnic. Designing a good module system, especially one that takes into account Java's classloader architecture, is a challenging task. Personally, I think it's probably useful to think about your namespace layout, so I'm not really looking to get rid of the thinking part. :) On Thursday, April 2, 2015 at 6:05:25 AM UTC-5, Lars Andersen wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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: Any chance of a module system being added to the language?
Counterclockwise is an eclipse plugin, and thus an Osgi bundle. There has been some effort to try to fill the gap between Osgi and clojure ( search github for the work of aav on clojure-osgi). I have tried hard to follow these steps of purity by separating things in different eclipse plugins. But overall is was a niche of bugs with no real advantages. So now CCW just use one eclipse plugin, embeds all its dependencies inside the plugin, and let eclipse manage its classpath. Still, this is not an easy solution, because Osgi bundles are started from the Osgi framework and when trying to load new clojure code, one needs to take care that the right classloaders are set in the thread context classloader, some clojure RT dyn vars, etc. Le jeudi 2 avril 2015, Colin Yates colin.ya...@gmail.com a écrit : Do you have any references to OSGi and Clojure? On 2 April 2015 at 15:11, Alex Miller a...@puredanger.com javascript:; wrote: It's possible we could make use of Java's module system if it ever actually gets released in Java 9. While I followed it pretty extensively when they first started discussing it (7 or 8 years ago!) I have not been keeping up on it lately. Some people have used OSGi with Clojure but I don't gather that it's a picnic. Designing a good module system, especially one that takes into account Java's classloader architecture, is a challenging task. Personally, I think it's probably useful to think about your namespace layout, so I'm not really looking to get rid of the thinking part. :) On Thursday, April 2, 2015 at 6:05:25 AM UTC-5, Lars Andersen wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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:; 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:; 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:;. 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 javascript:; 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:; 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:;. For more options, visit https://groups.google.com/d/optout. -- Laurent Petit -- 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: Any chance of a module system being added to the language?
Do you have any references to OSGi and Clojure? On 2 April 2015 at 15:11, Alex Miller a...@puredanger.com wrote: It's possible we could make use of Java's module system if it ever actually gets released in Java 9. While I followed it pretty extensively when they first started discussing it (7 or 8 years ago!) I have not been keeping up on it lately. Some people have used OSGi with Clojure but I don't gather that it's a picnic. Designing a good module system, especially one that takes into account Java's classloader architecture, is a challenging task. Personally, I think it's probably useful to think about your namespace layout, so I'm not really looking to get rid of the thinking part. :) On Thursday, April 2, 2015 at 6:05:25 AM UTC-5, Lars Andersen wrote: I'd love a module system solving the following problems: 1. Dependency isolation 2. Being able to export vars without having to think about namespace layout in the project 1. Is a serious problem where transitive dependencies on the classpath put consumers in jar hell and force library and tooling authors to either inline code, re-invent the wheel, attempt to run their code in isolated classloaders or turn to source rewriting. 2. Is a nice to have which is solved today by in potemkin's import-vars, but I think this makes sense to include if modules are added to the language. We might get some of this for free whenever project jigsaw gets released, but considering it was due in 2007, originally, I'm hoping this can be solved without the help of Oracle. -- 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.