3 ms·
True clojure assumes the existence of the JVM. However no other jvm language has gone with the language as library system which is a shame. Also, I don't think
by babs474 14y ago
True clojure assumes the existence of the JVM. However no other jvm language has gone with the language as library system which is a shame.
Also, I don't think anything would preclude non jvm hosted languages from doing something similar. I think it is a better solution than say virtualenv from python.
- eeperson 14y agoI believe that is what all of the other JVM languages do. How is what Clojure does any different that what Scala or Groovy does?
- pekk 14y agomatthavener wrote: "Running everything inside the JVM means you only need to ship what any arbitrary JVM library requires. In this case, its as simple as a .jar." Considering a .jar is a zipped directory tree, and a virtualenv is a directory tree, would you be happy if we zipped up virtualenvs and called them .par or something? I'm not sure what "language as library" will mean if you are not installing a VM or interpreter such as the JVM.
- babs474 14y agoI think the important difference between virtualenv and lein is not the implementation detail of whether it is a zipped file or whatever, but in how you use them. If you run a python program with virtualenv who decides weather to use python2.5 python2.7 or python3? Is it the author of the program? No, typically it is the user of the program who decides by symlinking /usr/bin/python If you run a clojure program "lein run" who decides weather to use clojure1.3 clojure1.4 or clojure1.5. It is the author of the clojure program who decides by specifying in the project.clj file. What I am saying is, I really prefer what seems to be the idomatic way of running clojure programs. This is totally possible with any programming language, but other jvm languages seem want to emulate the /usr/bin/runtime strategy. For instance the idomatic way to run a groovy script is to point /usr/bin/groovy --> ~/groovy-2.0/bin/groovy and $>groovy myscript.groovy
- eeperson 14y agoThat is exactly what the other JVM languages do. You download your version, of the language compiler and runtime, as libraries with a build tool. Then the build tool uses that compiler library to build your code. Saying that the idiomatic way of running groovy code is 'groovy myscript.groovy' is no more true than saying that the idiomatic way of running clojure code is 'clojure myscript.clj' edit: grammer
- draegtun 14y ago... and called them .par or something? .par is already taken. See PAR, the Perl Archiving Toolkit, which attempts to replicate jar for Perl. - http://par.perl.org/ http://par.perl.org/ - https://metacpan.org/module/PAR https://metacpan.org/module/PAR