A while back there was some discussion on the fact that
clojure.java.shell can hang under various circumstances, and some
patches were submitted:
But doesn't seem to have made it into the release.
Is there a known way to avoid these issues? I suspect my particular
problem is the output of my process is too big for the buffer.
Perhaps a reasonable hack is to increase the buffer size, but I
wouldn't know which one to increase. Is it
clojure.contrib.io/*buffer-size* ?
I'm also running several instances of clojure.java.shell/sh in a pmap,
I assume that is safe?
Thanks in advance.
(2) Clojure does not depend on anything in the clojure.contrib namespace.
(3) Running inside a pmap should be ok, but make sure you understand the interleavings you are seeing.
Cheers,
Stu
> --
> 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
> 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
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
Looking at the source code I'm not sure if the patches were applied.
Maybe there was a "regression". The symptoms seem consistent with what
was supposed to have been fixed.
Following the clojure.org api docs, I clicked through on the source code link on
http://richhickey.github.com/clojure-contrib/shell-api.html
to get to
and that doesn't look like the code in the patches, but maybe its
pointing at the wrong place?
I also tried to find the source code in
https://github.com/clojure/clojure-contrib but failed.
is also without the patches.
;; DEPRECATED in 1.2: Promoted to clojure.java.shell
clojure.java.shell is clojure itself, you should not need contrib at all.
Cheers,
Stu
At the top of which files? If you mean the library's source code, it's
very likely he didn't read a single line of it -- just installed the
contrib jar along with Clojure and then :required or :used it.
If something people have been using in version x is deprecated in
later version y, this needs to be announced somewhere more prominently
than in its source code, like, oh, say, the main documentation page.
Better yet, the compiler should say something -- javac emits warnings
if you call a method marked deprecated with Javadoc; maybe we need a
{:deprecated true} meta tag that can be used on defns and that makes
clojure emit warnings when deprecated functions are called? (These can
be printlns to stderr in the same vein as the warnings generated by
(set! *warn-on-reflection* true).)
The main "problem" was just that there are a lot of references to the
old lib lying around in various forms of documentation that seemed
current.
Thanks,
Stu
This is partially in place already. Deprecated namespaces are marked as such with {:deprecated true}, and the top of the documentation page shows this (e.g. http://clojure.github.com/clojure-contrib/shell-api.html).
However, the styling of the deprecation warning is such that it can be easily missed.
> Better yet, the compiler should say something -- javac emits warnings
> if you call a method marked deprecated with Javadoc; maybe we need a
> {:deprecated true} meta tag that can be used on defns and that makes
> clojure emit warnings when deprecated functions are called? (These can
> be printlns to stderr in the same vein as the warnings generated by
> (set! *warn-on-reflection* true).)
Ticket created: http://dev.clojure.org/jira/browse/CLJ-706.
Thanks,
Stu
An analogous case that is handled well I think:
http://reference.wolfram.com/mathematica/NonlinearRegression/ref/NonlinearRegress.html
On Wed, Jan 5, 2011 at 6:40 PM, Stuart Halloway
The granularity is limited to whole namespaces?
Ick.
How about:
{:deprecated true} metadata can be attached to any var.
(defnd ... ) sets this, so you can just change "defn" to "defnd" to
deprecate a function.
Deprecation shows up in the generated docs, along with the arities,
docstring, etc.; and that includes on generated web pages like those
for the contrib libraries.
On generated web pages it can show up in blinking red 100 point Gothic
if you like.
And the compiler emits a warning when it compiles something that
references a deprecated var, just as it does if *warn-on-reflection*
is set and it compiles an interop call that needs reflection.
I'm curious as to how you got here? I went to clojure.org, clicked
API, clicked clojure.java.shell in the left column and ended up here:
http://clojure.github.com/clojure/clojure.java.shell-api.html
Clicking the source link took me here:
Looks like there are still erroneous links to out of date docs and the old repo?
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
Looking at the source code I'm not sure if the patches were applied.
Maybe there was a "regression". The symptoms seem consistent with what
was supposed to have been fixed.Following the clojure.org api docs, I clicked through on the source code link on